summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/forkfd/forkfd.c16
-rw-r--r--src/3rdparty/forkfd/forkfd.h5
-rw-r--r--src/3rdparty/forkfd/forkfd_linux.c183
-rw-r--r--src/3rdparty/xcb/README35
-rw-r--r--src/3rdparty/xcb/include/xcb/fixup-xinput-h.patch15
-rw-r--r--src/3rdparty/xcb/include/xcb/randr.h5075
-rw-r--r--src/3rdparty/xcb/include/xcb/render.h4513
-rw-r--r--src/3rdparty/xcb/include/xcb/shape.h1103
-rw-r--r--src/3rdparty/xcb/include/xcb/shm.h738
-rw-r--r--src/3rdparty/xcb/include/xcb/sync.h2216
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_atom.h18
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_aux.h214
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_bitops.h212
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_event.h90
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_icccm.h1049
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_image.h630
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_keysyms.h71
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_pixel.h171
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_renderutil.h150
-rw-r--r--src/3rdparty/xcb/include/xcb/xcb_util.h8
-rw-r--r--src/3rdparty/xcb/include/xcb/xfixes.h2816
-rw-r--r--src/3rdparty/xcb/include/xcb/xinerama.h811
-rw-r--r--src/3rdparty/xcb/include/xcb/xinput.h4
-rw-r--r--src/3rdparty/xcb/include/xcb/xkb.h12085
-rw-r--r--src/3rdparty/xcb/libxcb/fix_compiler_warning_on_32bit_systems.patch15
-rw-r--r--src/3rdparty/xcb/libxcb/fixup-xinput-c.patch19
-rw-r--r--src/3rdparty/xcb/libxcb/randr.c5640
-rw-r--r--src/3rdparty/xcb/libxcb/render.c5295
-rw-r--r--src/3rdparty/xcb/libxcb/shape.c1102
-rw-r--r--src/3rdparty/xcb/libxcb/shm.c724
-rw-r--r--src/3rdparty/xcb/libxcb/sync.c2258
-rw-r--r--src/3rdparty/xcb/libxcb/xfixes.c3274
-rw-r--r--src/3rdparty/xcb/libxcb/xinerama.c703
-rw-r--r--src/3rdparty/xcb/libxcb/xinput.c6
-rw-r--r--src/3rdparty/xcb/libxcb/xkb.c15959
-rw-r--r--src/3rdparty/xcb/qt_attribution.json24
-rw-r--r--src/3rdparty/xcb/sysinclude/render.h1
-rw-r--r--src/3rdparty/xcb/sysinclude/xcb.h1
-rw-r--r--src/3rdparty/xcb/sysinclude/xcbext.h1
-rw-r--r--src/3rdparty/xcb/sysinclude/xproto.h1
-rw-r--r--src/3rdparty/xcb/xcb-util-image/xcb_image.c1011
-rw-r--r--src/3rdparty/xcb/xcb-util-keysyms/keysyms.c498
-rw-r--r--src/3rdparty/xcb/xcb-util-renderutil/util.c255
-rw-r--r--src/3rdparty/xcb/xcb-util-wm/icccm.c845
-rw-r--r--src/3rdparty/xcb/xcb-util/atoms.c76
-rw-r--r--src/3rdparty/xcb/xcb-util/event.c257
-rw-r--r--src/3rdparty/xcb/xcb-util/xcb_aux.c374
-rw-r--r--src/corelib/Qt5CoreConfigExtras.cmake.in24
-rw-r--r--src/corelib/Qt5CoreMacros.cmake177
-rw-r--r--src/corelib/animation/qabstractanimation.cpp8
-rw-r--r--src/corelib/animation/qanimationgroup.cpp13
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp8
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp6
-rw-r--r--src/corelib/animation/qvariantanimation.cpp6
-rw-r--r--src/corelib/codecs/qicucodec.cpp16
-rw-r--r--src/corelib/codecs/qisciicodec.cpp2
-rw-r--r--src/corelib/codecs/qsimplecodec.cpp66
-rw-r--r--src/corelib/configure.json20
-rw-r--r--src/corelib/corelib.pro1
-rw-r--r--src/corelib/doc/snippets/code/doc_src_properties.cpp1
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp1
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp10
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_statemachine_qstatemachine.cpp2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_thread_qfuturewatcher.cpp2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp13
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp16
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp4
-rw-r--r--src/corelib/doc/snippets/qsignalmapper/buttonwidget.cpp13
-rw-r--r--src/corelib/doc/snippets/qsignalmapper/buttonwidget.h4
-rw-r--r--src/corelib/doc/snippets/resource-system/mainwindow.cpp36
-rw-r--r--src/corelib/doc/snippets/statemachine/main.cpp13
-rw-r--r--src/corelib/doc/snippets/statemachine/main2.cpp15
-rw-r--r--src/corelib/doc/snippets/statemachine/main3.cpp2
-rw-r--r--src/corelib/doc/snippets/statemachine/main5.cpp14
-rw-r--r--src/corelib/doc/snippets/timers/analogclock.cpp2
-rw-r--r--src/corelib/doc/snippets/timers/timers.cpp6
-rw-r--r--src/corelib/doc/src/animation.qdoc4
-rw-r--r--src/corelib/doc/src/objectmodel/properties.qdoc6
-rw-r--r--src/corelib/doc/src/statemachine.qdoc4
-rw-r--r--src/corelib/global/qcompilerdetection.h1
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h3
-rw-r--r--src/corelib/global/qflags.h7
-rw-r--r--src/corelib/global/qfloat16.cpp8
-rw-r--r--src/corelib/global/qfloat16.h13
-rw-r--r--src/corelib/global/qglobal.cpp36
-rw-r--r--src/corelib/global/qglobal.h6
-rw-r--r--src/corelib/global/qlibraryinfo.cpp17
-rw-r--r--src/corelib/global/qlogging.cpp2
-rw-r--r--src/corelib/global/qnamespace.h29
-rw-r--r--src/corelib/global/qnamespace.qdoc92
-rw-r--r--src/corelib/io/io.pri5
-rw-r--r--src/corelib/io/qabstractfileengine.cpp2
-rw-r--r--src/corelib/io/qbuffer.cpp2
-rw-r--r--src/corelib/io/qdiriterator.cpp2
-rw-r--r--src/corelib/io/qfile.cpp64
-rw-r--r--src/corelib/io/qfile.h3
-rw-r--r--src/corelib/io/qfiledevice.cpp2
-rw-r--r--src/corelib/io/qfileinfo.cpp23
-rw-r--r--src/corelib/io/qfileinfo.h1
-rw-r--r--src/corelib/io/qfilesystemengine_mac.mm83
-rw-r--r--src/corelib/io/qfilesystemengine_p.h3
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp216
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp301
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h21
-rw-r--r--src/corelib/io/qfilesystemwatcher.cpp2
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp2
-rw-r--r--src/corelib/io/qfsfileengine.cpp116
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp77
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp74
-rw-r--r--src/corelib/io/qiodevice.cpp4
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice.cpp20
-rw-r--r--src/corelib/io/qprocess.cpp26
-rw-r--r--src/corelib/io/qprocess_unix.cpp37
-rw-r--r--src/corelib/io/qprocess_win.cpp15
-rw-r--r--src/corelib/io/qresource.cpp224
-rw-r--r--src/corelib/io/qresource.h5
-rw-r--r--src/corelib/io/qsavefile.cpp2
-rw-r--r--src/corelib/io/qsettings.cpp61
-rw-r--r--src/corelib/io/qsettings_p.h13
-rw-r--r--src/corelib/io/qsettings_wasm.cpp259
-rw-r--r--src/corelib/io/qurl.cpp9
-rw-r--r--src/corelib/io/qurl.h4
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp94
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.cpp2
-rw-r--r--src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp2
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel.cpp24
-rw-r--r--src/corelib/itemmodels/qidentityproxymodel.h2
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp2
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h8
-rw-r--r--src/corelib/itemmodels/qstringlistmodel.cpp23
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp2
-rw-r--r--src/corelib/kernel/qbasictimer.cpp10
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp157
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h10
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp2
-rw-r--r--src/corelib/kernel/qcoreevent.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp40
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp6
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp38
-rw-r--r--src/corelib/kernel/qeventloop.cpp43
-rw-r--r--src/corelib/kernel/qmetaobject.cpp111
-rw-r--r--src/corelib/kernel/qmetaobject.h1
-rw-r--r--src/corelib/kernel/qmetaobject_p.h3
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp32
-rw-r--r--src/corelib/kernel/qmetatype.cpp52
-rw-r--r--src/corelib/kernel/qmetatype.h24
-rw-r--r--src/corelib/kernel/qmimedata.cpp127
-rw-r--r--src/corelib/kernel/qobject.cpp192
-rw-r--r--src/corelib/kernel/qobject_p.h7
-rw-r--r--src/corelib/kernel/qobjectcleanuphandler.cpp2
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp2
-rw-r--r--src/corelib/kernel/qsharedmemory_systemv.cpp6
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp2
-rw-r--r--src/corelib/kernel/qsignalmapper.cpp115
-rw-r--r--src/corelib/kernel/qsignalmapper.h10
-rw-r--r--src/corelib/kernel/qsocketnotifier.cpp15
-rw-r--r--src/corelib/kernel/qtestsupport_core.cpp2
-rw-r--r--src/corelib/kernel/qtimer.cpp6
-rw-r--r--src/corelib/kernel/qtimerinfo_unix.cpp20
-rw-r--r--src/corelib/kernel/qtranslator.cpp80
-rw-r--r--src/corelib/kernel/qtranslator.h3
-rw-r--r--src/corelib/kernel/qvariant.cpp524
-rw-r--r--src/corelib/kernel/qvariant.h27
-rw-r--r--src/corelib/kernel/qvariant_p.h4
-rw-r--r--src/corelib/kernel/qwineventnotifier.cpp6
-rw-r--r--src/corelib/mimetypes/mime/generate.bat73
-rw-r--r--src/corelib/mimetypes/mime/generate.pl113
-rw-r--r--src/corelib/mimetypes/mime/hexdump.ps143
-rw-r--r--src/corelib/mimetypes/mimetypes.pri29
-rw-r--r--src/corelib/mimetypes/qmimedatabase.cpp13
-rw-r--r--src/corelib/mimetypes/qmimeprovider.cpp99
-rw-r--r--src/corelib/mimetypes/qmimeprovider_p.h11
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp8
-rw-r--r--src/corelib/plugin/qlibrary.cpp34
-rw-r--r--src/corelib/plugin/qlibrary_p.h2
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp2
-rw-r--r--src/corelib/plugin/qpluginloader.cpp8
-rw-r--r--src/corelib/serialization/qbinaryjson.cpp415
-rw-r--r--src/corelib/serialization/qbinaryjson_p.h617
-rw-r--r--src/corelib/serialization/qbinaryjsonarray.cpp137
-rw-r--r--src/corelib/serialization/qbinaryjsonarray_p.h98
-rw-r--r--src/corelib/serialization/qbinaryjsonobject.cpp149
-rw-r--r--src/corelib/serialization/qbinaryjsonobject_p.h97
-rw-r--r--src/corelib/serialization/qbinaryjsonvalue.cpp155
-rw-r--r--src/corelib/serialization/qbinaryjsonvalue_p.h134
-rw-r--r--src/corelib/serialization/qcborcommon.cpp328
-rw-r--r--src/corelib/serialization/qcborcommon.h2
-rw-r--r--src/corelib/serialization/qcborcommon_p.h84
-rw-r--r--src/corelib/serialization/qcborstream.h224
-rw-r--r--src/corelib/serialization/qcborstreamreader.cpp (renamed from src/corelib/serialization/qcborstream.cpp)1254
-rw-r--r--src/corelib/serialization/qcborstreamreader.h210
-rw-r--r--src/corelib/serialization/qcborstreamwriter.cpp868
-rw-r--r--src/corelib/serialization/qcborstreamwriter.h130
-rw-r--r--src/corelib/serialization/qcborvalue.cpp149
-rw-r--r--src/corelib/serialization/qcborvalue.h16
-rw-r--r--src/corelib/serialization/qdatastream.cpp1
-rw-r--r--src/corelib/serialization/qdatastream.h20
-rw-r--r--src/corelib/serialization/qjson.cpp451
-rw-r--r--src/corelib/serialization/qjson_p.h789
-rw-r--r--src/corelib/serialization/qjsonarray.cpp235
-rw-r--r--src/corelib/serialization/qjsonarray.h26
-rw-r--r--src/corelib/serialization/qjsoncbor.cpp180
-rw-r--r--src/corelib/serialization/qjsondocument.cpp367
-rw-r--r--src/corelib/serialization/qjsondocument.h33
-rw-r--r--src/corelib/serialization/qjsonobject.cpp421
-rw-r--r--src/corelib/serialization/qjsonobject.h51
-rw-r--r--src/corelib/serialization/qjsonparser.cpp453
-rw-r--r--src/corelib/serialization/qjsonparser_p.h51
-rw-r--r--src/corelib/serialization/qjsonvalue.cpp329
-rw-r--r--src/corelib/serialization/qjsonvalue.h54
-rw-r--r--src/corelib/serialization/qjsonwriter.cpp75
-rw-r--r--src/corelib/serialization/qjsonwriter_p.h4
-rw-r--r--src/corelib/serialization/qtextstream.cpp54
-rw-r--r--src/corelib/serialization/qtextstream.h42
-rw-r--r--src/corelib/serialization/serialization.pri36
-rw-r--r--src/corelib/statemachine/qabstractstate.cpp6
-rw-r--r--src/corelib/statemachine/qabstracttransition.cpp4
-rw-r--r--src/corelib/statemachine/qeventtransition.cpp2
-rw-r--r--src/corelib/statemachine/qhistorystate.cpp2
-rw-r--r--src/corelib/statemachine/qsignaltransition.cpp2
-rw-r--r--src/corelib/statemachine/qstate.cpp20
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp126
-rw-r--r--src/corelib/statemachine/qstatemachine.h11
-rw-r--r--src/corelib/text/qbytearray.cpp312
-rw-r--r--src/corelib/text/qbytearray.h60
-rw-r--r--src/corelib/text/qchar.cpp258
-rw-r--r--src/corelib/text/qchar.h20
-rw-r--r--src/corelib/text/qlocale.cpp42
-rw-r--r--src/corelib/text/qlocale.h8
-rw-r--r--src/corelib/text/qlocale_tools.cpp2
-rw-r--r--src/corelib/text/qlocale_tools_p.h16
-rw-r--r--src/corelib/text/qlocale_unix.cpp16
-rw-r--r--src/corelib/text/qregexp.cpp8
-rw-r--r--src/corelib/text/qregularexpression.cpp64
-rw-r--r--src/corelib/text/qregularexpression.h20
-rw-r--r--src/corelib/text/qstring.cpp29
-rw-r--r--src/corelib/text/qstring.h2
-rw-r--r--src/corelib/text/qstringalgorithms.h1
-rw-r--r--src/corelib/text/qstringlist.cpp10
-rw-r--r--src/corelib/text/qstringview.cpp15
-rw-r--r--src/corelib/text/qstringview.h2
-rw-r--r--src/corelib/text/qt_attribution.json2
-rw-r--r--src/corelib/text/qtextboundaryfinder.cpp16
-rw-r--r--src/corelib/text/qunicodetables.cpp15190
-rw-r--r--src/corelib/text/qunicodetables_p.h15
-rw-r--r--src/corelib/text/qunicodetools.cpp47
-rw-r--r--src/corelib/thread/qbasicatomic.h6
-rw-r--r--src/corelib/thread/qexception.cpp2
-rw-r--r--src/corelib/thread/qfutureinterface.cpp2
-rw-r--r--src/corelib/thread/qmutex.cpp8
-rw-r--r--src/corelib/thread/qmutex_linux.cpp4
-rw-r--r--src/corelib/thread/qorderedmutexlocker_p.h2
-rw-r--r--src/corelib/thread/qreadwritelock.cpp10
-rw-r--r--src/corelib/thread/qresultstore.cpp2
-rw-r--r--src/corelib/thread/qrunnable.cpp27
-rw-r--r--src/corelib/thread/qrunnable.h2
-rw-r--r--src/corelib/thread/qsemaphore.h7
-rw-r--r--src/corelib/thread/qthread.cpp42
-rw-r--r--src/corelib/thread/qthread.h8
-rw-r--r--src/corelib/thread/qthread_unix.cpp28
-rw-r--r--src/corelib/thread/qthread_win.cpp8
-rw-r--r--src/corelib/thread/qthreadpool.cpp34
-rw-r--r--src/corelib/thread/qthreadpool.h5
-rw-r--r--src/corelib/thread/qthreadstorage.cpp12
-rw-r--r--src/corelib/thread/qwaitcondition.h34
-rw-r--r--src/corelib/thread/qwaitcondition.qdoc32
-rw-r--r--src/corelib/thread/qwaitcondition_p.h153
-rw-r--r--src/corelib/thread/qwaitcondition_unix.cpp2
-rw-r--r--src/corelib/thread/thread.pri1
-rw-r--r--src/corelib/time/qcalendar.cpp11
-rw-r--r--src/corelib/time/qdatetime.cpp263
-rw-r--r--src/corelib/time/qdatetime.h16
-rw-r--r--src/corelib/time/qdatetimeparser.cpp30
-rw-r--r--src/corelib/time/qdatetimeparser_p.h6
-rw-r--r--src/corelib/time/qtimezone.cpp25
-rw-r--r--src/corelib/time/qtimezoneprivate.cpp48
-rw-r--r--src/corelib/time/qtimezoneprivate_icu.cpp12
-rw-r--r--src/corelib/time/qtimezoneprivate_p.h3
-rw-r--r--src/corelib/time/qtimezoneprivate_tz.cpp2
-rw-r--r--src/corelib/tools/qarraydata.cpp4
-rw-r--r--src/corelib/tools/qcontainerfwd.h2
-rw-r--r--src/corelib/tools/qduplicatetracker_p.h94
-rw-r--r--src/corelib/tools/qeasingcurve.cpp18
-rw-r--r--src/corelib/tools/qhash.cpp112
-rw-r--r--src/corelib/tools/qhash.h481
-rw-r--r--src/corelib/tools/qiterator.qdoc2
-rw-r--r--src/corelib/tools/qlinkedlist.cpp14
-rw-r--r--src/corelib/tools/qlinkedlist.h24
-rw-r--r--src/corelib/tools/qlist.cpp7
-rw-r--r--src/corelib/tools/qlist.h18
-rw-r--r--src/corelib/tools/qmap.cpp116
-rw-r--r--src/corelib/tools/qmap.h375
-rw-r--r--src/corelib/tools/qscopedvaluerollback.h6
-rw-r--r--src/corelib/tools/qscopeguard.h32
-rw-r--r--src/corelib/tools/qscopeguard.qdoc41
-rw-r--r--src/corelib/tools/qset.h70
-rw-r--r--src/corelib/tools/qset.qdoc8
-rw-r--r--src/corelib/tools/qsimd.cpp133
-rw-r--r--src/corelib/tools/tools.pri1
-rw-r--r--src/dbus/Qt5DBusConfigExtras.cmake.in11
-rw-r--r--src/dbus/Qt5DBusMacros.cmake51
-rw-r--r--src/dbus/qdbusabstractadaptor.cpp10
-rw-r--r--src/dbus/qdbusabstractinterface.cpp8
-rw-r--r--src/dbus/qdbusargument.cpp6
-rw-r--r--src/dbus/qdbusargument.h8
-rw-r--r--src/dbus/qdbusconnection.cpp34
-rw-r--r--src/dbus/qdbuscontext.cpp4
-rw-r--r--src/dbus/qdbusdemarshaller.cpp2
-rw-r--r--src/dbus/qdbusintegrator.cpp94
-rw-r--r--src/dbus/qdbusinterface.cpp40
-rw-r--r--src/dbus/qdbusinternalfilters.cpp2
-rw-r--r--src/dbus/qdbusmarshaller.cpp18
-rw-r--r--src/dbus/qdbusmessage.cpp30
-rw-r--r--src/dbus/qdbusmetaobject.cpp44
-rw-r--r--src/dbus/qdbusmetatype.cpp50
-rw-r--r--src/dbus/qdbusmisc.cpp6
-rw-r--r--src/dbus/qdbuspendingcall.cpp6
-rw-r--r--src/dbus/qdbuspendingreply.cpp4
-rw-r--r--src/dbus/qdbusreply.cpp2
-rw-r--r--src/dbus/qdbusreply.h1
-rw-r--r--src/dbus/qdbusunixfiledescriptor.cpp4
-rw-r--r--src/dbus/qdbusutil.cpp24
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp6
-rw-r--r--src/gui/accessible/qaccessible.cpp22
-rw-r--r--src/gui/accessible/qaccessibleobject.cpp10
-rw-r--r--src/gui/accessible/qplatformaccessibility.cpp2
-rw-r--r--src/gui/animation/qguivariantanimation.cpp10
-rw-r--r--src/gui/configure.json88
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp2
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp4
-rw-r--r--src/gui/doc/src/qtgui.qdoc2
-rw-r--r--src/gui/gui.pro2
-rw-r--r--src/gui/image/qbitmap.cpp2
-rw-r--r--src/gui/image/qbmphandler.cpp4
-rw-r--r--src/gui/image/qicon.cpp18
-rw-r--r--src/gui/image/qiconloader.cpp2
-rw-r--r--src/gui/image/qimage.cpp171
-rw-r--r--src/gui/image/qimage.h8
-rw-r--r--src/gui/image/qimage_conversions.cpp285
-rw-r--r--src/gui/image/qimageiohandler.cpp2
-rw-r--r--src/gui/image/qimagereader.cpp16
-rw-r--r--src/gui/image/qimagereader.h4
-rw-r--r--src/gui/image/qimagereaderwriterhelpers.cpp6
-rw-r--r--src/gui/image/qimagewriter.cpp18
-rw-r--r--src/gui/image/qimagewriter.h4
-rw-r--r--src/gui/image/qmovie.cpp2
-rw-r--r--src/gui/image/qpaintengine_pic.cpp6
-rw-r--r--src/gui/image/qpicture.cpp22
-rw-r--r--src/gui/image/qpixmap.cpp24
-rw-r--r--src/gui/image/qpixmap.h7
-rw-r--r--src/gui/image/qpixmap_blitter.cpp8
-rw-r--r--src/gui/image/qpixmapcache.cpp14
-rw-r--r--src/gui/image/qplatformpixmap.cpp2
-rw-r--r--src/gui/image/qpnghandler.cpp60
-rw-r--r--src/gui/image/qxpmhandler.cpp4
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp105
-rw-r--r--src/gui/kernel/qclipboard.cpp6
-rw-r--r--src/gui/kernel/qcursor.cpp92
-rw-r--r--src/gui/kernel/qcursor.h15
-rw-r--r--src/gui/kernel/qdnd.cpp12
-rw-r--r--src/gui/kernel/qdrag.cpp6
-rw-r--r--src/gui/kernel/qevent.cpp12
-rw-r--r--src/gui/kernel/qguiapplication.cpp250
-rw-r--r--src/gui/kernel/qguiapplication_p.h13
-rw-r--r--src/gui/kernel/qguivariant.cpp80
-rw-r--r--src/gui/kernel/qhighdpiscaling_p.h2
-rw-r--r--src/gui/kernel/qinternalmimedata.cpp13
-rw-r--r--src/gui/kernel/qkeymapper.cpp2
-rw-r--r--src/gui/kernel/qkeysequence.cpp2
-rw-r--r--src/gui/kernel/qoffscreensurface.cpp14
-rw-r--r--src/gui/kernel/qopenglcontext.cpp58
-rw-r--r--src/gui/kernel/qopenglwindow.cpp6
-rw-r--r--src/gui/kernel/qpaintdevicewindow.cpp2
-rw-r--r--src/gui/kernel/qpalette.cpp4
-rw-r--r--src/gui/kernel/qplatformclipboard.cpp2
-rw-r--r--src/gui/kernel/qplatformcursor.cpp12
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp22
-rw-r--r--src/gui/kernel/qplatforminputcontextfactory.cpp2
-rw-r--r--src/gui/kernel/qplatformintegration.cpp22
-rw-r--r--src/gui/kernel/qplatformintegration.h3
-rw-r--r--src/gui/kernel/qplatformintegrationplugin.cpp2
-rw-r--r--src/gui/kernel/qplatformnativeinterface.cpp20
-rw-r--r--src/gui/kernel/qplatformopenglcontext.cpp2
-rw-r--r--src/gui/kernel/qplatformscreen.cpp33
-rw-r--r--src/gui/kernel/qplatformscreen.h23
-rw-r--r--src/gui/kernel/qplatformtheme.cpp16
-rw-r--r--src/gui/kernel/qplatformtheme.h2
-rw-r--r--src/gui/kernel/qplatformwindow.cpp27
-rw-r--r--src/gui/kernel/qplatformwindow.h4
-rw-r--r--src/gui/kernel/qscreen.cpp21
-rw-r--r--src/gui/kernel/qscreen.h1
-rw-r--r--src/gui/kernel/qsessionmanager.cpp2
-rw-r--r--src/gui/kernel/qshortcutmap.cpp93
-rw-r--r--src/gui/kernel/qsimpledrag.cpp4
-rw-r--r--src/gui/kernel/qstylehints.cpp2
-rw-r--r--src/gui/kernel/qsurface.cpp2
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp2
-rw-r--r--src/gui/kernel/qtestsupport_gui.cpp13
-rw-r--r--src/gui/kernel/qwindow.cpp90
-rw-r--r--src/gui/kernel/qwindow.h2
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp12
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h1
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp12
-rw-r--r--src/gui/math3d/qmatrix4x4.h6
-rw-r--r--src/gui/math3d/qquaternion.cpp2
-rw-r--r--src/gui/math3d/qvector2d.cpp2
-rw-r--r--src/gui/math3d/qvector3d.cpp2
-rw-r--r--src/gui/math3d/qvector4d.cpp2
-rw-r--r--src/gui/opengl/qopengl.cpp2
-rw-r--r--src/gui/opengl/qopenglbuffer.cpp14
-rw-r--r--src/gui/opengl/qopenglcustomshaderstage.cpp8
-rw-r--r--src/gui/opengl/qopengldebug.cpp24
-rw-r--r--src/gui/opengl/qopenglengineshadermanager.cpp20
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp10
-rw-r--r--src/gui/opengl/qopenglfunctions_1_0.cpp6
-rw-r--r--src/gui/opengl/qopenglfunctions_1_1.cpp10
-rw-r--r--src/gui/opengl/qopenglfunctions_1_2.cpp14
-rw-r--r--src/gui/opengl/qopenglfunctions_1_3.cpp18
-rw-r--r--src/gui/opengl/qopenglfunctions_1_4.cpp22
-rw-r--r--src/gui/opengl/qopenglfunctions_1_5.cpp24
-rw-r--r--src/gui/opengl/qopenglfunctions_2_0.cpp26
-rw-r--r--src/gui/opengl/qopenglfunctions_2_1.cpp28
-rw-r--r--src/gui/opengl/qopenglfunctions_3_0.cpp30
-rw-r--r--src/gui/opengl/qopenglfunctions_3_1.cpp22
-rw-r--r--src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp34
-rw-r--r--src/gui/opengl/qopenglfunctions_3_2_core.cpp24
-rw-r--r--src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp38
-rw-r--r--src/gui/opengl/qopenglfunctions_3_3_core.cpp26
-rw-r--r--src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp40
-rw-r--r--src/gui/opengl/qopenglfunctions_4_0_core.cpp28
-rw-r--r--src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp42
-rw-r--r--src/gui/opengl/qopenglfunctions_4_1_core.cpp30
-rw-r--r--src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp44
-rw-r--r--src/gui/opengl/qopenglfunctions_4_2_core.cpp32
-rw-r--r--src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp46
-rw-r--r--src/gui/opengl/qopenglfunctions_4_3_core.cpp34
-rw-r--r--src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp48
-rw-r--r--src/gui/opengl/qopenglfunctions_4_4_core.cpp36
-rw-r--r--src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp52
-rw-r--r--src/gui/opengl/qopenglfunctions_4_5_core.cpp38
-rw-r--r--src/gui/opengl/qopenglpaintdevice.cpp2
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp22
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp12
-rw-r--r--src/gui/opengl/qopengltexture.cpp32
-rw-r--r--src/gui/opengl/qopengltextureglyphcache.cpp34
-rw-r--r--src/gui/opengl/qopengltimerquery.cpp26
-rw-r--r--src/gui/opengl/qopenglversionfunctions.cpp2
-rw-r--r--src/gui/opengl/qopenglversionfunctionsfactory.cpp2
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject.cpp16
-rw-r--r--src/gui/painting/WEBGRADIENTS_LICENSE.txt21
-rw-r--r--src/gui/painting/painting.pri5
-rw-r--r--src/gui/painting/qblittable.cpp2
-rw-r--r--src/gui/painting/qbrush.cpp81
-rw-r--r--src/gui/painting/qbrush.h33
-rw-r--r--src/gui/painting/qcolor.cpp2
-rw-r--r--src/gui/painting/qcolorspace.cpp41
-rw-r--r--src/gui/painting/qcolorspace.h2
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp6
-rw-r--r--src/gui/painting/qdrawhelper.cpp92
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp2
-rw-r--r--src/gui/painting/qimagescale.cpp4
-rw-r--r--src/gui/painting/qmatrix.cpp5
-rw-r--r--src/gui/painting/qmemrotate.cpp6
-rw-r--r--src/gui/painting/qoutlinemapper.cpp2
-rw-r--r--src/gui/painting/qpagesize.cpp20
-rw-r--r--src/gui/painting/qpaintdevice.cpp6
-rw-r--r--src/gui/painting/qpaintengine.cpp14
-rw-r--r--src/gui/painting/qpaintengine.h4
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp98
-rw-r--r--src/gui/painting/qpaintengineex.cpp32
-rw-r--r--src/gui/painting/qpainter.cpp87
-rw-r--r--src/gui/painting/qpainter.h1
-rw-r--r--src/gui/painting/qpainter_p.h21
-rw-r--r--src/gui/painting/qpainterpath.cpp24
-rw-r--r--src/gui/painting/qpainterpath.h6
-rw-r--r--src/gui/painting/qpathclipper.cpp10
-rw-r--r--src/gui/painting/qpathsimplifier.cpp42
-rw-r--r--src/gui/painting/qpdf.cpp177
-rw-r--r--src/gui/painting/qpdf_p.h22
-rw-r--r--src/gui/painting/qpdfwriter.cpp46
-rw-r--r--src/gui/painting/qpdfwriter.h5
-rw-r--r--src/gui/painting/qpen.cpp4
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp8
-rw-r--r--src/gui/painting/qplatformbackingstore.h2
-rw-r--r--src/gui/painting/qpolygon.cpp20
-rw-r--r--src/gui/painting/qrasterizer.cpp4
-rw-r--r--src/gui/painting/qregion.cpp79
-rw-r--r--src/gui/painting/qstroker.cpp10
-rw-r--r--src/gui/painting/qt_attribution.json14
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp7
-rw-r--r--src/gui/painting/qtransform.cpp8
-rw-r--r--src/gui/painting/qtransform.h4
-rw-r--r--src/gui/painting/qtriangulatingstroker.cpp4
-rw-r--r--src/gui/painting/qtriangulator.cpp28
-rw-r--r--src/gui/painting/webgradients.binaryjsonbin50792 -> 0 bytes
-rw-r--r--src/gui/painting/webgradients.cpp578
-rw-r--r--src/gui/painting/webgradients.css909
-rw-r--r--src/gui/rhi/qrhi.cpp136
-rw-r--r--src/gui/rhi/qrhi_p.h31
-rw-r--r--src/gui/rhi/qrhi_p_p.h7
-rw-r--r--src/gui/rhi/qrhid3d11.cpp76
-rw-r--r--src/gui/rhi/qrhid3d11_p.h5
-rw-r--r--src/gui/rhi/qrhid3d11_p_p.h15
-rw-r--r--src/gui/rhi/qrhigles2.cpp362
-rw-r--r--src/gui/rhi/qrhigles2_p.h5
-rw-r--r--src/gui/rhi/qrhigles2_p_p.h37
-rw-r--r--src/gui/rhi/qrhimetal.mm319
-rw-r--r--src/gui/rhi/qrhimetal_p.h5
-rw-r--r--src/gui/rhi/qrhimetal_p_p.h16
-rw-r--r--src/gui/rhi/qrhinull.cpp30
-rw-r--r--src/gui/rhi/qrhinull_p.h4
-rw-r--r--src/gui/rhi/qrhinull_p_p.h14
-rw-r--r--src/gui/rhi/qrhivulkan.cpp485
-rw-r--r--src/gui/rhi/qrhivulkan_p.h6
-rw-r--r--src/gui/rhi/qrhivulkan_p_p.h41
-rw-r--r--src/gui/rhi/qshader.cpp48
-rw-r--r--src/gui/rhi/qshader_p_p.h7
-rw-r--r--src/gui/rhi/qshaderdescription.cpp382
-rw-r--r--src/gui/rhi/qshaderdescription_p.h47
-rw-r--r--src/gui/rhi/qshaderdescription_p_p.h2
-rw-r--r--src/gui/rhi/rhi.pri6
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.cpp2
-rw-r--r--src/gui/text/qcssparser.cpp54
-rw-r--r--src/gui/text/qcssparser_p.h2
-rw-r--r--src/gui/text/qdistancefield.cpp10
-rw-r--r--src/gui/text/qfont.cpp86
-rw-r--r--src/gui/text/qfont.h6
-rw-r--r--src/gui/text/qfontdatabase.cpp50
-rw-r--r--src/gui/text/qfontengine.cpp46
-rw-r--r--src/gui/text/qfontengine_qpf2.cpp24
-rw-r--r--src/gui/text/qfontmetrics.cpp94
-rw-r--r--src/gui/text/qglyphrun.cpp2
-rw-r--r--src/gui/text/qglyphrun_p.h3
-rw-r--r--src/gui/text/qharfbuzzng.cpp25
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp4
-rw-r--r--src/gui/text/qrawfont.cpp8
-rw-r--r--src/gui/text/qstatictext.cpp4
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp6
-rw-r--r--src/gui/text/qtextcursor.cpp26
-rw-r--r--src/gui/text/qtextdocument.cpp14
-rw-r--r--src/gui/text/qtextdocument_p.cpp20
-rw-r--r--src/gui/text/qtextdocument_p.h6
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp16
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp26
-rw-r--r--src/gui/text/qtextdocumentwriter.cpp6
-rw-r--r--src/gui/text/qtextengine.cpp72
-rw-r--r--src/gui/text/qtextengine_p.h19
-rw-r--r--src/gui/text/qtextformat.cpp52
-rw-r--r--src/gui/text/qtexthtmlparser.cpp18
-rw-r--r--src/gui/text/qtextimagehandler.cpp10
-rw-r--r--src/gui/text/qtextlayout.cpp10
-rw-r--r--src/gui/text/qtextobject.cpp16
-rw-r--r--src/gui/text/qtextodfwriter.cpp16
-rw-r--r--src/gui/text/qtextoption.cpp8
-rw-r--r--src/gui/text/qzip.cpp16
-rw-r--r--src/gui/util/qdesktopservices.cpp2
-rw-r--r--src/gui/util/qgridlayoutengine.cpp28
-rw-r--r--src/gui/util/qgridlayoutengine_p.h4
-rw-r--r--src/gui/util/qshadergenerator.cpp4
-rw-r--r--src/gui/util/qshadergraphloader.cpp2
-rw-r--r--src/gui/util/qtexturefiledata.cpp2
-rw-r--r--src/gui/util/qvalidator.cpp2
-rw-r--r--src/gui/vulkan/qplatformvulkaninstance.cpp5
-rw-r--r--src/gui/vulkan/qplatformvulkaninstance.h1
-rw-r--r--src/gui/vulkan/qvulkaninstance.cpp17
-rw-r--r--src/gui/vulkan/qvulkaninstance.h1
-rw-r--r--src/gui/vulkan/qvulkanwindow.cpp124
-rw-r--r--src/gui/vulkan/qvulkanwindow.h7
-rw-r--r--src/gui/vulkan/qvulkanwindow_p.h3
-rw-r--r--src/network/access/qabstractprotocolhandler.cpp2
-rw-r--r--src/network/access/qftp.cpp30
-rw-r--r--src/network/access/qhttpmultipart.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp22
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h4
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp24
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel_p.h2
-rw-r--r--src/network/access/qhttpnetworkreply.cpp10
-rw-r--r--src/network/access/qhttpnetworkrequest.cpp2
-rw-r--r--src/network/access/qhttpprotocolhandler.cpp6
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp22
-rw-r--r--src/network/access/qhttpthreaddelegate_p.h2
-rw-r--r--src/network/access/qnetworkaccessauthenticationmanager.cpp2
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp12
-rw-r--r--src/network/access/qnetworkaccesscache.cpp22
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend.cpp10
-rw-r--r--src/network/access/qnetworkaccessfilebackend.cpp6
-rw-r--r--src/network/access/qnetworkaccessftpbackend.cpp14
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp102
-rw-r--r--src/network/access/qnetworkaccessmanager.h31
-rw-r--r--src/network/access/qnetworkaccessmanager_p.h18
-rw-r--r--src/network/access/qnetworkcookie.cpp2
-rw-r--r--src/network/access/qnetworkdiskcache.cpp22
-rw-r--r--src/network/access/qnetworkreply.cpp23
-rw-r--r--src/network/access/qnetworkreply.h7
-rw-r--r--src/network/access/qnetworkreplyfileimpl.cpp2
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp66
-rw-r--r--src/network/access/qnetworkreplyhttpimpl_p.h15
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp40
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h6
-rw-r--r--src/network/access/qnetworkrequest.cpp71
-rw-r--r--src/network/access/qnetworkrequest.h18
-rw-r--r--src/network/access/qspdyprotocolhandler.cpp24
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp4
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.cpp6
-rw-r--r--src/network/bearer/qnetworkconfiguration.cpp2
-rw-r--r--src/network/bearer/qnetworksession.cpp2
-rw-r--r--src/network/configure.json23
-rw-r--r--src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp8
-rw-r--r--src/network/doc/snippets/network/tcpwait.cpp2
-rw-r--r--src/network/doc/snippets/snippets.pro7
-rw-r--r--src/network/kernel/qauthenticator.cpp10
-rw-r--r--src/network/kernel/qdnslookup.cpp4
-rw-r--r--src/network/kernel/qdnslookup_unix.cpp8
-rw-r--r--src/network/kernel/qhostaddress.cpp2
-rw-r--r--src/network/kernel/qhostinfo.cpp25
-rw-r--r--src/network/kernel/qhostinfo_p.h7
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp8
-rw-r--r--src/network/kernel/qnetworkinterface.cpp4
-rw-r--r--src/network/kernel/qnetworkinterface_p.h2
-rw-r--r--src/network/kernel/qnetworkinterface_unix_p.h2
-rw-r--r--src/network/kernel/qnetworkproxy.cpp19
-rw-r--r--src/network/kernel/qnetworkproxy_mac.cpp7
-rw-r--r--src/network/kernel/qurlinfo.cpp10
-rw-r--r--src/network/socket/qabstractsocket.cpp77
-rw-r--r--src/network/socket/qabstractsocket.h7
-rw-r--r--src/network/socket/qabstractsocketengine.cpp6
-rw-r--r--src/network/socket/qhttpsocketengine.cpp31
-rw-r--r--src/network/socket/qlocalserver.cpp2
-rw-r--r--src/network/socket/qlocalserver_unix.cpp2
-rw-r--r--src/network/socket/qlocalsocket.cpp19
-rw-r--r--src/network/socket/qlocalsocket.h4
-rw-r--r--src/network/socket/qlocalsocket_p.h4
-rw-r--r--src/network/socket/qlocalsocket_tcp.cpp16
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp49
-rw-r--r--src/network/socket/qlocalsocket_win.cpp6
-rw-r--r--src/network/socket/qnativesocketengine.cpp18
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp6
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp15
-rw-r--r--src/network/socket/qsocks5socketengine.cpp54
-rw-r--r--src/network/socket/qtcpserver.cpp10
-rw-r--r--src/network/socket/qudpsocket.cpp2
-rw-r--r--src/network/ssl/qdtls_openssl.cpp73
-rw-r--r--src/network/ssl/qdtls_openssl_p.h5
-rw-r--r--src/network/ssl/qssl.h10
-rw-r--r--src/network/ssl/qsslcertificate.cpp107
-rw-r--r--src/network/ssl/qsslcertificate.h20
-rw-r--r--src/network/ssl/qsslconfiguration.cpp86
-rw-r--r--src/network/ssl/qsslconfiguration.h5
-rw-r--r--src/network/ssl/qsslcontext_openssl.cpp569
-rw-r--r--src/network/ssl/qsslcontext_openssl11.cpp467
-rw-r--r--src/network/ssl/qsslcontext_openssl_p.h8
-rw-r--r--src/network/ssl/qsslcontext_opensslpre11.cpp407
-rw-r--r--src/network/ssl/qsslellipticcurve_openssl.cpp4
-rw-r--r--src/network/ssl/qsslkey_openssl.cpp24
-rw-r--r--src/network/ssl/qsslsocket.cpp106
-rw-r--r--src/network/ssl/qsslsocket.h22
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp348
-rw-r--r--src/network/ssl/qsslsocket_openssl11.cpp271
-rw-r--r--src/network/ssl/qsslsocket_openssl11_symbols_p.h195
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h3
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp335
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h230
-rw-r--r--src/network/ssl/qsslsocket_opensslpre11.cpp408
-rw-r--r--src/network/ssl/qsslsocket_opensslpre11_symbols_p.h202
-rw-r--r--src/network/ssl/qsslsocket_p.h1
-rw-r--r--src/network/ssl/qsslsocket_schannel.cpp135
-rw-r--r--src/network/ssl/qsslsocket_schannel_p.h1
-rw-r--r--src/network/ssl/qsslsocket_winrt.cpp5
-rw-r--r--src/network/ssl/ssl.pri12
-rw-r--r--src/opengl/qgl.cpp3
-rw-r--r--src/opengl/qglframebufferobject.cpp2
-rw-r--r--src/opengl/qglfunctions.cpp2
-rw-r--r--src/platformheaders/nativecontexts/qglxnativecontext.h6
-rw-r--r--src/platformsupport/accessibility/qaccessiblebridgeutils.cpp2
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience.cpp6
-rw-r--r--src/platformsupport/eglconvenience/qeglpbuffer_p.h2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp12
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h2
-rw-r--r--src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp2
-rw-r--r--src/platformsupport/fbconvenience/qfbscreen.cpp2
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp96
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp4
-rw-r--r--src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp95
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm30
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp22
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft.cpp20
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp40
-rw-r--r--src/platformsupport/glxconvenience/qglxconvenience.cpp4
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp3
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h8
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp15
-rw-r--r--src/platformsupport/input/integrityhid/qintegrityhidmanager.h2
-rw-r--r--src/platformsupport/input/libinput/qlibinputtouch.cpp2
-rw-r--r--src/platformsupport/kmsconvenience/qkmsdevice.cpp121
-rw-r--r--src/platformsupport/kmsconvenience/qkmsdevice_p.h17
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor.cpp4
-rw-r--r--src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp2
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp2
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes_p.h4
-rw-r--r--src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp16
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp2
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp16
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp6
-rw-r--r--src/plugins/generic/tuiotouch/qtuiohandler.cpp40
-rw-r--r--src/plugins/imageformats/gif/main.cpp2
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.cpp12
-rw-r--r--src/plugins/imageformats/ico/main.cpp4
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp13
-rw-r--r--src/plugins/imageformats/jpeg/main.cpp4
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp43
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp4
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h2
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusproxy.cpp4
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibustypes.cpp6
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.cpp13
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.h4
-rw-r--r--src/plugins/platforms/cocoa/cocoa.pro5
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm20
-rw-r--r--src/plugins/platforms/cocoa/qcocoaclipboard.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm94
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h4
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm10
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoasessionmanager.cpp88
-rw-r--r--src/plugins/platforms/cocoa/qcocoasessionmanager.h81
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemtrayicon.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm9
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm16
-rw-r--r--src/plugins/platforms/cocoa/qmacclipboard.mm8
-rw-r--r--src/plugins/platforms/cocoa/qnsview_menus.mm3
-rw-r--r--src/plugins/platforms/eglfs/api/api.pri9
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfscontext.cpp4
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfscursor.cpp2
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp16
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsdeviceintegration_p.h4
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsintegration.cpp39
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsintegration_p.h3
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsoffscreenwindow.cpp2
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsscreen.cpp4
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfswindow.cpp13
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfswindow_p.h4
-rw-r--r--src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkaninstance.cpp280
-rw-r--r--src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkaninstance_p.h88
-rw-r--r--src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkanwindow.cpp75
-rw-r--r--src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkanwindow_p.h74
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp48
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp14
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.h4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp44
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.h16
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.h2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro6
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.h6
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.cpp218
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.h99
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h11
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.cpp2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp21
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.h6
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp16
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.h2
-rw-r--r--src/plugins/platforms/eglfs/eglfsdeviceintegration.pro3
-rw-r--r--src/plugins/platforms/eglfs/qeglfsmain.cpp2
-rw-r--r--src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm2
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm11
-rw-r--r--src/plugins/platforms/ios/quiview.h4
-rw-r--r--src/plugins/platforms/ios/quiview.mm35
-rw-r--r--src/plugins/platforms/offscreen/main.cpp2
-rw-r--r--src/plugins/platforms/offscreen/qoffscreencommon.cpp10
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration.cpp2
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp12
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenwindow.cpp2
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp27
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.h7
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp37
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.h13
-rw-r--r--src/plugins/platforms/qnx/qqnxnativeinterface.cpp5
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp2
-rw-r--r--src/plugins/platforms/vnc/main.cpp2
-rw-r--r--src/plugins/platforms/vnc/qvnc.cpp4
-rw-r--r--src/plugins/platforms/vnc/qvncclient.cpp3
-rw-r--r--src/plugins/platforms/vnc/qvncscreen.cpp2
-rw-r--r--src/plugins/platforms/wasm/qwasmeventdispatcher.cpp2
-rw-r--r--src/plugins/platforms/wasm/qwasmeventtranslator.cpp29
-rw-r--r--src/plugins/platforms/wasm/qwasmintegration.cpp9
-rw-r--r--src/plugins/platforms/wasm/qwasmopenglcontext.cpp3
-rw-r--r--src/plugins/platforms/wasm/qwasmscreen.cpp6
-rw-r--r--src/plugins/platforms/windows/qwindowsclipboard.cpp6
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp56
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.h3
-rw-r--r--src/plugins/platforms/windows/qwindowscursor.cpp14
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp64
-rw-r--r--src/plugins/platforms/windows/qwindowsdropdataobject.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowseglcontext.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp14
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.cpp3
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp36
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.h4
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp6
-rw-r--r--src/plugins/platforms/windows/qwindowsmenu.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.cpp54
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.h3
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.cpp12
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.h8
-rw-r--r--src/plugins/platforms/windows/qwindowsopengltester.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowspointerhandler.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsservices.cpp6
-rw-r--r--src/plugins/platforms/windows/qwindowssystemtrayicon.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.cpp153
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.h6
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp90
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h7
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp8
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp3
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp4
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp54
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbatom.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp12
-rw-r--r--src/plugins/platforms/xcb/qxcbclipboard.cpp25
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp44
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h22
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_basic.cpp23
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_basic.h6
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp19
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp36
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp28
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbimage.cpp8
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp29
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.h20
-rw-r--r--src/plugins/platforms/xcb/qxcbmime.cpp8
-rw-r--r--src/plugins/platforms/xcb/qxcbmime.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp10
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp8
-rw-r--r--src/plugins/platforms/xcb/qxcbsessionmanager.cpp24
-rw-r--r--src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbvulkaninstance.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbvulkanwindow.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp113
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h11
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.cpp2
-rw-r--r--src/plugins/platforms/xcb/xcb-static/xcb-static.pro80
-rw-r--r--src/plugins/platforms/xcb/xcb.pro2
-rw-r--r--src/plugins/platforms/xcb/xcb_qpa_lib.pro30
-rw-r--r--src/plugins/platformthemes/gtk3/main.cpp2
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp8
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3menu.cpp4
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3theme.cpp10
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h2
-rw-r--r--src/plugins/printsupport/cups/qcupsprintengine.cpp4
-rw-r--r--src/plugins/sqldrivers/configure.json2
-rw-r--r--src/plugins/sqldrivers/ibase/qsql_ibase.cpp9
-rw-r--r--src/plugins/sqldrivers/mysql/main.cpp4
-rw-r--r--src/plugins/sqldrivers/mysql/mysql.json2
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp272
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql_p.h4
-rw-r--r--src/plugins/sqldrivers/odbc/qsql_odbc.cpp6
-rw-r--r--src/plugins/sqldrivers/psql/qsql_psql.cpp5
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp7
-rw-r--r--src/plugins/sqldrivers/sqlite2/qsql_sqlite2_p.h4
-rw-r--r--src/plugins/sqldrivers/tds/qsql_tds_p.h4
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm87
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac_p_p.h2
-rw-r--r--src/plugins/styles/windowsvista/qwindowsvistastyle.cpp11
-rw-r--r--src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h2
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle.cpp277
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h4
-rw-r--r--src/plugins/styles/windowsvista/windowsvista.pro4
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix.cpp16
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp20
-rw-r--r--src/printsupport/dialogs/qprintsettingsoutput.ui8
-rw-r--r--src/printsupport/kernel/qcups.cpp2
-rw-r--r--src/printsupport/kernel/qpaintengine_alpha.cpp12
-rw-r--r--src/printsupport/kernel/qpaintengine_alpha_p.h2
-rw-r--r--src/printsupport/kernel/qplatformprintplugin.h2
-rw-r--r--src/printsupport/kernel/qprintengine_pdf.cpp6
-rw-r--r--src/printsupport/kernel/qprintengine_pdf_p.h1
-rw-r--r--src/printsupport/kernel/qprinter.cpp2
-rw-r--r--src/printsupport/kernel/qprinter_p.h10
-rw-r--r--src/printsupport/widgets/qcupsjobwidget.cpp6
-rw-r--r--src/printsupport/widgets/qprintpreviewwidget.cpp2
-rw-r--r--src/sql/doc/snippets/code/doc_src_sql-driver.qdoc2
-rw-r--r--src/sql/doc/src/sql-driver.qdoc32
-rw-r--r--src/sql/kernel/qsqldatabase.cpp6
-rw-r--r--src/sql/kernel/qsqldriver.cpp27
-rw-r--r--src/sql/kernel/qsqldriver.h3
-rw-r--r--src/sql/kernel/qsqlfield.cpp11
-rw-r--r--src/sql/kernel/qsqlfield.h2
-rw-r--r--src/sql/kernel/qsqlresult.cpp4
-rw-r--r--src/sql/models/qsqlrelationaltablemodel.cpp14
-rw-r--r--src/sql/models/qsqltablemodel.cpp4
-rw-r--r--src/src.pro4
-rw-r--r--src/testlib/doc/src/qttestlib-manual.qdoc8
-rw-r--r--src/testlib/qabstractitemmodeltester.cpp2
-rw-r--r--src/testlib/qjunittestlogger.cpp (renamed from src/testlib/qxunittestlogger.cpp)30
-rw-r--r--src/testlib/qjunittestlogger_p.h (renamed from src/testlib/qxunittestlogger_p.h)16
-rw-r--r--src/testlib/qtest.h2
-rw-r--r--src/testlib/qtestcase.cpp522
-rw-r--r--src/testlib/qtestjunitstreamer.cpp (renamed from src/testlib/qtestxunitstreamer.cpp)26
-rw-r--r--src/testlib/qtestjunitstreamer_p.h (renamed from src/testlib/qtestxunitstreamer_p.h)15
-rw-r--r--src/testlib/qtestlog.cpp12
-rw-r--r--src/testlib/qtestlog_p.h6
-rw-r--r--src/testlib/qtestutil_macos.mm28
-rw-r--r--src/testlib/qtestutil_macos_p.h1
-rw-r--r--src/testlib/testlib.pro10
-rw-r--r--src/tools/androidtestrunner/main.cpp2
-rw-r--r--src/tools/bootstrap/bootstrap.pro9
-rw-r--r--src/tools/moc/collectjson.cpp103
-rw-r--r--src/tools/moc/collectjson.h42
-rw-r--r--src/tools/moc/generator.cpp10
-rw-r--r--src/tools/moc/main.cpp172
-rw-r--r--src/tools/moc/moc.cpp209
-rw-r--r--src/tools/moc/moc.h14
-rw-r--r--src/tools/moc/moc.pri7
-rw-r--r--src/tools/moc/parser.cpp2
-rw-r--r--src/tools/moc/preprocessor.cpp2
-rw-r--r--src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp6
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp2
-rw-r--r--src/tools/rcc/rcc.cpp6
-rw-r--r--src/tools/tracegen/etw.cpp2
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp8
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.h5
-rw-r--r--src/tools/uic/treewalker.h2
-rw-r--r--src/tools/uic/ui4.cpp178
-rw-r--r--src/tools/uic/ui4.h116
-rw-r--r--src/widgets/Qt5WidgetsConfigExtras.cmake.in11
-rw-r--r--src/widgets/Qt5WidgetsMacros.cmake14
-rw-r--r--src/widgets/accessible/complexwidgets.cpp18
-rw-r--r--src/widgets/accessible/itemviews.cpp50
-rw-r--r--src/widgets/accessible/qaccessiblemenu.cpp14
-rw-r--r--src/widgets/accessible/qaccessiblewidget.cpp4
-rw-r--r--src/widgets/accessible/qaccessiblewidgetfactory.cpp6
-rw-r--r--src/widgets/accessible/qaccessiblewidgets.cpp28
-rw-r--r--src/widgets/accessible/simplewidgets.cpp19
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp22
-rw-r--r--src/widgets/dialogs/qdialog.cpp16
-rw-r--r--src/widgets/dialogs/qerrormessage.cpp10
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp48
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp14
-rw-r--r--src/widgets/dialogs/qfilesystemmodel_p.h2
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp22
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp10
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp62
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp24
-rw-r--r--src/widgets/dialogs/qsidebar.cpp8
-rw-r--r--src/widgets/dialogs/qwizard.cpp46
-rw-r--r--src/widgets/doc/snippets/code/doc_src_layout.cpp53
-rw-r--r--src/widgets/doc/snippets/code/src_gui_dialogs_qfiledialog.cpp17
-rw-r--r--src/widgets/doc/snippets/code/src_gui_itemviews_qtreewidget.cpp2
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp9
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qlayout.cpp5
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qlayoutitem.cpp3
-rw-r--r--src/widgets/doc/snippets/code/src_gui_qproxystyle.cpp8
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qmenubar.cpp2
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qsplashscreen.cpp4
-rw-r--r--src/widgets/doc/snippets/javastyle.cpp6
-rw-r--r--src/widgets/doc/snippets/qsplashscreen/main.cpp7
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/layout.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc17
-rw-r--r--src/widgets/effects/qgraphicseffect.cpp2
-rw-r--r--src/widgets/effects/qpixmapfilter.cpp18
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp50
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayout.cpp8
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp109
-rw-r--r--src/widgets/graphicsview/qgraphicsitemanimation.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicslayout_p.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutitem.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicslinearlayout.cpp12
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp68
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp165
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.h1
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.cpp23
-rw-r--r--src/widgets/graphicsview/qgraphicstransform.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp65
-rw-r--r--src/widgets/graphicsview/qgraphicsview.h8
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.cpp24
-rw-r--r--src/widgets/graphicsview/qgraphicswidget_p.cpp8
-rw-r--r--src/widgets/graphicsview/qsimplex_p.cpp10
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.cpp62
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp55
-rw-r--r--src/widgets/itemviews/qcolumnview.cpp12
-rw-r--r--src/widgets/itemviews/qcolumnviewgrip.cpp2
-rw-r--r--src/widgets/itemviews/qcolumnviewgrip_p.h2
-rw-r--r--src/widgets/itemviews/qdatawidgetmapper.cpp8
-rw-r--r--src/widgets/itemviews/qdirmodel.cpp26
-rw-r--r--src/widgets/itemviews/qdirmodel.h11
-rw-r--r--src/widgets/itemviews/qheaderview.cpp20
-rw-r--r--src/widgets/itemviews/qitemdelegate.cpp40
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp48
-rw-r--r--src/widgets/itemviews/qlistview.cpp14
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp46
-rw-r--r--src/widgets/itemviews/qlistwidget.h6
-rw-r--r--src/widgets/itemviews/qstyleditemdelegate.cpp20
-rw-r--r--src/widgets/itemviews/qtableview.cpp2
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp68
-rw-r--r--src/widgets/itemviews/qtablewidget.h6
-rw-r--r--src/widgets/itemviews/qtreeview.cpp18
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp71
-rw-r--r--src/widgets/itemviews/qtreewidget.h6
-rw-r--r--src/widgets/itemviews/qtreewidgetitemiterator.cpp16
-rw-r--r--src/widgets/kernel/qaction.cpp2
-rw-r--r--src/widgets/kernel/qaction.h2
-rw-r--r--src/widgets/kernel/qactiongroup.cpp6
-rw-r--r--src/widgets/kernel/qapplication.cpp396
-rw-r--r--src/widgets/kernel/qapplication.h4
-rw-r--r--src/widgets/kernel/qapplication_p.h10
-rw-r--r--src/widgets/kernel/qboxlayout.cpp22
-rw-r--r--src/widgets/kernel/qdesktopwidget.cpp2
-rw-r--r--src/widgets/kernel/qformlayout.cpp102
-rw-r--r--src/widgets/kernel/qgesture.cpp4
-rw-r--r--src/widgets/kernel/qgesture_p.h3
-rw-r--r--src/widgets/kernel/qgesturemanager.cpp25
-rw-r--r--src/widgets/kernel/qgridlayout.cpp28
-rw-r--r--src/widgets/kernel/qlayout.cpp44
-rw-r--r--src/widgets/kernel/qlayout_p.h2
-rw-r--r--src/widgets/kernel/qlayoutengine.cpp13
-rw-r--r--src/widgets/kernel/qlayoutengine_p.h6
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp20
-rw-r--r--src/widgets/kernel/qlayoutitem.h8
-rw-r--r--src/widgets/kernel/qmacgesturerecognizer.cpp4
-rw-r--r--src/widgets/kernel/qopenglwidget.cpp26
-rw-r--r--src/widgets/kernel/qshortcut.cpp76
-rw-r--r--src/widgets/kernel/qshortcut.h60
-rw-r--r--src/widgets/kernel/qsizepolicy.cpp2
-rw-r--r--src/widgets/kernel/qstackedlayout.cpp14
-rw-r--r--src/widgets/kernel/qstandardgestures.cpp4
-rw-r--r--src/widgets/kernel/qtooltip.cpp16
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp16
-rw-r--r--src/widgets/kernel/qwidget.cpp198
-rw-r--r--src/widgets/kernel/qwidget.h12
-rw-r--r--src/widgets/kernel/qwidget_p.h4
-rw-r--r--src/widgets/kernel/qwidgetaction.cpp8
-rw-r--r--src/widgets/kernel/qwidgetrepaintmanager.cpp16
-rw-r--r--src/widgets/kernel/qwidgetsvariant.cpp18
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp34
-rw-r--r--src/widgets/kernel/qwindowcontainer.cpp10
-rw-r--r--src/widgets/kernel/qwindowcontainer_p.h2
-rw-r--r--src/widgets/kernel/win.pri1
-rw-r--r--src/widgets/statemachine/qguistatemachine.cpp2
-rw-r--r--src/widgets/styles/qcommonstyle.cpp43
-rw-r--r--src/widgets/styles/qcommonstyle_p.h2
-rw-r--r--src/widgets/styles/qdrawutil.cpp20
-rw-r--r--src/widgets/styles/qfusionstyle.cpp12
-rw-r--r--src/widgets/styles/qproxystyle.cpp6
-rw-r--r--src/widgets/styles/qstyle.cpp10
-rw-r--r--src/widgets/styles/qstyle.h2
-rw-r--r--src/widgets/styles/qstylefactory.cpp2
-rw-r--r--src/widgets/styles/qstylehelper.cpp2
-rw-r--r--src/widgets/styles/qstyleoption.cpp26
-rw-r--r--src/widgets/styles/qstyleoption.h8
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp212
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp19
-rw-r--r--src/widgets/styles/qwindowsstyle_p_p.h1
-rw-r--r--src/widgets/util/qcolormap.cpp4
-rw-r--r--src/widgets/util/qcompleter.cpp12
-rw-r--r--src/widgets/util/qflickgesture.cpp38
-rw-r--r--src/widgets/util/qscroller.cpp10
-rw-r--r--src/widgets/util/qscrollerproperties.cpp12
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp10
-rw-r--r--src/widgets/util/qsystemtrayicon_x11.cpp4
-rw-r--r--src/widgets/util/qundogroup.cpp26
-rw-r--r--src/widgets/util/qundostack.cpp18
-rw-r--r--src/widgets/util/qundoview.cpp42
-rw-r--r--src/widgets/widgets.pro2
-rw-r--r--src/widgets/widgets/qabstractbutton.cpp34
-rw-r--r--src/widgets/widgets/qabstractbutton.h2
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp28
-rw-r--r--src/widgets/widgets/qabstractslider.cpp4
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp82
-rw-r--r--src/widgets/widgets/qabstractspinbox_p.h2
-rw-r--r--src/widgets/widgets/qbuttongroup.cpp10
-rw-r--r--src/widgets/widgets/qbuttongroup.h12
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp44
-rw-r--r--src/widgets/widgets/qcombobox.cpp235
-rw-r--r--src/widgets/widgets/qcombobox.h9
-rw-r--r--src/widgets/widgets/qcombobox_p.h89
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp51
-rw-r--r--src/widgets/widgets/qdatetimeedit.h3
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.cpp26
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp234
-rw-r--r--src/widgets/widgets/qdockwidget.cpp95
-rw-r--r--src/widgets/widgets/qdockwidget_p.h4
-rw-r--r--src/widgets/widgets/qeffects.cpp16
-rw-r--r--src/widgets/widgets/qfocusframe.cpp20
-rw-r--r--src/widgets/widgets/qgroupbox.cpp6
-rw-r--r--src/widgets/widgets/qgroupbox.h2
-rw-r--r--src/widgets/widgets/qkeysequenceedit.cpp2
-rw-r--r--src/widgets/widgets/qlabel.cpp78
-rw-r--r--src/widgets/widgets/qlabel.h20
-rw-r--r--src/widgets/widgets/qlcdnumber.cpp6
-rw-r--r--src/widgets/widgets/qlineedit.cpp20
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp6
-rw-r--r--src/widgets/widgets/qlineedit_p.h2
-rw-r--r--src/widgets/widgets/qmaccocoaviewcontainer_mac.mm2
-rw-r--r--src/widgets/widgets/qmainwindow.cpp16
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp88
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h2
-rw-r--r--src/widgets/widgets/qmdiarea.cpp72
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp98
-rw-r--r--src/widgets/widgets/qmenu.cpp338
-rw-r--r--src/widgets/widgets/qmenu_p.h6
-rw-r--r--src/widgets/widgets/qmenubar.cpp127
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp30
-rw-r--r--src/widgets/widgets/qprogressbar.cpp2
-rw-r--r--src/widgets/widgets/qpushbutton.cpp17
-rw-r--r--src/widgets/widgets/qpushbutton.h1
-rw-r--r--src/widgets/widgets/qscrollarea.cpp6
-rw-r--r--src/widgets/widgets/qscrollarea_p.h2
-rw-r--r--src/widgets/widgets/qscrollbar.cpp18
-rw-r--r--src/widgets/widgets/qsizegrip.cpp20
-rw-r--r--src/widgets/widgets/qspinbox.cpp4
-rw-r--r--src/widgets/widgets/qsplashscreen.cpp44
-rw-r--r--src/widgets/widgets/qsplashscreen.h4
-rw-r--r--src/widgets/widgets/qsplitter.cpp6
-rw-r--r--src/widgets/widgets/qstackedwidget.cpp2
-rw-r--r--src/widgets/widgets/qstatusbar.cpp24
-rw-r--r--src/widgets/widgets/qtabbar.cpp232
-rw-r--r--src/widgets/widgets/qtabbar.h3
-rw-r--r--src/widgets/widgets/qtabbar_p.h13
-rw-r--r--src/widgets/widgets/qtabwidget.cpp64
-rw-r--r--src/widgets/widgets/qtabwidget.h3
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp41
-rw-r--r--src/widgets/widgets/qtextbrowser.h3
-rw-r--r--src/widgets/widgets/qtextedit.cpp26
-rw-r--r--src/widgets/widgets/qtoolbar.cpp64
-rw-r--r--src/widgets/widgets/qtoolbar.h12
-rw-r--r--src/widgets/widgets/qtoolbararealayout.cpp40
-rw-r--r--src/widgets/widgets/qtoolbarlayout.cpp38
-rw-r--r--src/widgets/widgets/qtoolbox.cpp16
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp81
-rw-r--r--src/widgets/widgets/qwidgetanimator.cpp2
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp4
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp52
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p.h8
-rw-r--r--src/xml/dom/dom.pri7
-rw-r--r--src/xml/dom/qdom.cpp852
-rw-r--r--src/xml/dom/qdom.h15
-rw-r--r--src/xml/dom/qdom_p.h540
-rw-r--r--src/xml/dom/qdomhelpers.cpp663
-rw-r--r--src/xml/dom/qdomhelpers_p.h258
-rw-r--r--src/xml/sax/qxml.cpp38
-rw-r--r--src/xml/sax/qxml.h70
-rw-r--r--src/xml/sax/qxml_p.h9
1165 files changed, 35294 insertions, 96687 deletions
diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c
index e4f3bd85de..31189fa2cd 100644
--- a/src/3rdparty/forkfd/forkfd.c
+++ b/src/3rdparty/forkfd/forkfd.c
@@ -586,6 +586,12 @@ static int create_pipe(int filedes[], int flags)
* descriptor. You probably want to set this flag, since forkfd() does not work
* if the original parent process dies.
*
+ * @li @C FFD_USE_FORK Tell forkfd() to actually call fork() instead of a
+ * different system implementation that may be available. On systems where a
+ * different implementation is available, its behavior may differ from that of
+ * fork(), such as not calling the functions registered with pthread_atfork().
+ * If that's necessary, pass this flag.
+ *
* The file descriptor returned by forkfd() supports the following operations:
*
* @li read(2) When the child process exits, then the buffer supplied to
@@ -613,9 +619,11 @@ int forkfd(int flags, pid_t *ppid)
int efd;
#endif
- fd = system_forkfd(flags, ppid, &ret);
- if (ret)
- return fd;
+ if ((flags & FFD_USE_FORK) == 0) {
+ fd = system_forkfd(flags, ppid, &ret);
+ if (ret)
+ return fd;
+ }
(void) pthread_once(&forkfd_initialization, forkfd_initialize);
@@ -822,6 +830,8 @@ int forkfd_close(int ffd)
#if defined(__FreeBSD__) && __FreeBSD__ >= 9
# include "forkfd_freebsd.c"
+#elif defined(__linux__)
+# include "forkfd_linux.c"
#else
int system_has_forkfd()
{
diff --git a/src/3rdparty/forkfd/forkfd.h b/src/3rdparty/forkfd/forkfd.h
index eb121de593..fe70371719 100644
--- a/src/3rdparty/forkfd/forkfd.h
+++ b/src/3rdparty/forkfd/forkfd.h
@@ -38,8 +38,9 @@
extern "C" {
#endif
-#define FFD_CLOEXEC 1
-#define FFD_NONBLOCK 2
+#define FFD_CLOEXEC 1
+#define FFD_NONBLOCK 2
+#define FFD_USE_FORK 4
#define FFD_CHILD_PROCESS (-2)
diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c
new file mode 100644
index 0000000000..27ab09f748
--- /dev/null
+++ b/src/3rdparty/forkfd/forkfd_linux.c
@@ -0,0 +1,183 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 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 _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include "forkfd.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <sched.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/resource.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include "forkfd_atomic.h"
+
+#ifndef CLONE_PIDFD
+# define CLONE_PIDFD 0x00001000
+#endif
+#ifndef P_PIDFD
+# define P_PIDFD 3
+#endif
+
+static ffd_atomic_int system_forkfd_state = FFD_ATOMIC_INIT(0);
+
+static int sys_waitid(int which, int pid_or_pidfd, siginfo_t *infop, int options,
+ struct rusage *ru)
+{
+ /* use the waitid raw system call, which has an extra parameter that glibc
+ * doesn't offer to us */
+ return syscall(__NR_waitid, which, pid_or_pidfd, infop, options, ru);
+}
+
+static int sys_clone(unsigned long cloneflags, int *ptid)
+{
+ void *child_stack = NULL;
+ int *ctid = NULL;
+ unsigned long newtls = 0;
+#if defined(__NR_clone2)
+ size_t stack_size = 0;
+ return syscall(__NR_clone2, cloneflags, child_stack, stack_size, ptid, ctid, newtls);
+#elif defined(__cris__) || defined(__s390__)
+ /* a.k.a., CONFIG_CLONE_BACKWARDS2 architectures */
+ return syscall(__NR_clone, child_stack, cloneflags, ptid, newtls, ctid);
+#elif defined(__microblaze__)
+ /* a.k.a., CONFIG_CLONE_BACKWARDS3 architectures */
+ size_t stack_size = 0;
+ return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid);
+#elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \
+ defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \
+ defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__)
+ /* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures,
+ * but since both values are 0, there's no harm. */
+ return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls);
+#else
+ (void) child_stack;
+ (void) ctid;
+ (void) newtls;
+ errno = ENOSYS;
+ return -1;
+#endif
+}
+
+static int detect_clone_pidfd_support()
+{
+ /*
+ * Detect support for CLONE_PIDFD and P_PIDFD. Support was added in steps:
+ * - Linux 5.2 added CLONE_PIDFD support in clone(2) system call
+ * - Linux 5.2 added pidfd_send_signal(2)
+ * - Linux 5.3 added support for poll(2) on pidfds
+ * - Linux 5.3 added clone3(2)
+ * - Linux 5.4 added P_PIDFD support in waitid(2)
+ *
+ * We need CLONE_PIDFD and the poll(2) support. We could emulate the
+ * P_PIDFD support by reading the PID from /proc/self/fdinfo/n, which works
+ * in Linux 5.2, but without poll(2), we can't guarantee the functionality
+ * anyway.
+ *
+ * So we detect by trying to waitid(2) on a positive file descriptor that
+ * is definitely closed (INT_MAX). If P_PIDFD is supported, waitid(2) will
+ * return EBADF. If it isn't supported, it returns EINVAL (as it would for
+ * a negative file descriptor). This will succeed on Linux 5.4.
+ *
+ * We could have instead detected by the existence of the clone3(2) system
+ * call, but for that we would have needed to wait for __NR_clone3 to show
+ * up on the libcs. We choose to go via the waitid(2) route, which requires
+ * platform-independent constants only. It would have simplified the
+ * sys_clone() mess above...
+ */
+
+ sys_waitid(P_PIDFD, INT_MAX, NULL, WEXITED|WNOHANG, NULL);
+ return errno == EBADF ? 1 : -1;
+}
+
+int system_has_forkfd()
+{
+ return ffd_atomic_load(&system_forkfd_state, FFD_ATOMIC_RELAXED) > 0;
+}
+
+int system_forkfd(int flags, pid_t *ppid, int *system)
+{
+ pid_t pid;
+ int pidfd;
+
+ int state = ffd_atomic_load(&system_forkfd_state, FFD_ATOMIC_RELAXED);
+ if (state == 0) {
+ state = detect_clone_pidfd_support();
+ ffd_atomic_store(&system_forkfd_state, state, FFD_ATOMIC_RELAXED);
+ }
+ if (state < 0) {
+ *system = 0;
+ return state;
+ }
+
+ *system = 1;
+ pid = sys_clone(CLONE_PIDFD, &pidfd);
+ if (ppid)
+ *ppid = pid;
+
+ if (pid == 0) {
+ /* Child process */
+ return FFD_CHILD_PROCESS;
+ }
+
+ /* parent process */
+ if ((flags & FFD_CLOEXEC) == 0) {
+ /* pidfd defaults to O_CLOEXEC */
+ fcntl(pidfd, F_SETFD, 0);
+ }
+ if (flags & FFD_NONBLOCK)
+ fcntl(pidfd, F_SETFL, fcntl(pidfd, F_GETFL) | O_NONBLOCK);
+ return pidfd;
+}
+
+int system_forkfd_wait(int ffd, struct forkfd_info *info, struct rusage *rusage)
+{
+ siginfo_t si;
+ int options = WEXITED | __WALL;
+ int ret = fcntl(ffd, F_GETFL);
+ if (ret == -1)
+ return ret;
+ if (ret & O_NONBLOCK)
+ options |= WNOHANG;
+
+ ret = sys_waitid(P_PIDFD, ffd, &si, options, rusage);
+ if (ret == -1 && errno == ECHILD) {
+ errno = EWOULDBLOCK;
+ } else if (ret == 0 && info) {
+ info->code = si.si_code;
+ info->status = si.si_status;
+ }
+ return ret;
+}
diff --git a/src/3rdparty/xcb/README b/src/3rdparty/xcb/README
index 2f1ee24079..362fa54bf8 100644
--- a/src/3rdparty/xcb/README
+++ b/src/3rdparty/xcb/README
@@ -1,19 +1,22 @@
-Contains the header and sources files from selected xcb libraries:
+*****************************************************************
+From 62f053c19b917a369c4aad5b71ab150911b589aa:
- 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.9
- libxcb-util-wm-0.3.9
+xcb-xinput code was produced by build of libxcb 1.13 with xcb-proto 1.13.
-The 'include' directory was obtained by compiling and installing all of the modules.
-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.
+The following parts were removed from it:
+ - Pointer Barriers API (requires xcb-xfixes 1.9 with xcb-proto 1.9)
+ - SendExtensionEvent API (requires definition of xcb_raw_generic_event_t
+ from libxcb 1.13)
+
+*****************************************************************
+
+As of time of writing the minimal required libxcb version is 1.11, hence
+we could restore the Pointer Barriers API, but we don't use it, so it is
+not worth the hustle. When we will bump the minimal required version of libxcb
+to 1.13, then we can drop the bundled xcb-xinput altogether.
+
+The xcb-xinput files where modified to use system includes, see:
+
+src/3rdparty/xcb/include/xcb/fixup-xinput-h.patch
+src/3rdparty/xcb/libxcb/fixup-xinput-c.patch
-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/fixup-xinput-h.patch b/src/3rdparty/xcb/include/xcb/fixup-xinput-h.patch
new file mode 100644
index 0000000000..50c5ebd9f0
--- /dev/null
+++ b/src/3rdparty/xcb/include/xcb/fixup-xinput-h.patch
@@ -0,0 +1,15 @@
+diff --git a/src/3rdparty/xcb/include/xcb/xinput.h b/src/3rdparty/xcb/include/xcb/xinput.h
+index 9420047c71..729c0b5169 100644
+--- a/src/3rdparty/xcb/include/xcb/xinput.h
++++ b/src/3rdparty/xcb/include/xcb/xinput.h
+@@ -12,8 +12,8 @@
+ #ifndef __XINPUT_H
+ #define __XINPUT_H
+
+-#include "xcb.h"
+-#include "xfixes.h"
++#include <xcb/xcb.h>
++#include <xcb/xfixes.h>
+
+ #ifdef __cplusplus
+ extern "C" {
diff --git a/src/3rdparty/xcb/include/xcb/randr.h b/src/3rdparty/xcb/include/xcb/randr.h
deleted file mode 100644
index 4f4f2104cf..0000000000
--- a/src/3rdparty/xcb/include/xcb/randr.h
+++ /dev/null
@@ -1,5075 +0,0 @@
-/*
- * This file generated automatically from randr.xml by c_client.py.
- * Edit at your peril.
- */
-
-/**
- * @defgroup XCB_RandR_API XCB RandR API
- * @brief RandR XCB Protocol Implementation.
- * @{
- **/
-
-#ifndef __RANDR_H
-#define __RANDR_H
-
-#include "xcb.h"
-#include "xproto.h"
-#include "render.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XCB_RANDR_MAJOR_VERSION 1
-#define XCB_RANDR_MINOR_VERSION 3
-
-extern xcb_extension_t xcb_randr_id;
-
-typedef uint32_t xcb_randr_mode_t;
-
-/**
- * @brief xcb_randr_mode_iterator_t
- **/
-typedef struct xcb_randr_mode_iterator_t {
- xcb_randr_mode_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_mode_iterator_t;
-
-typedef uint32_t xcb_randr_crtc_t;
-
-/**
- * @brief xcb_randr_crtc_iterator_t
- **/
-typedef struct xcb_randr_crtc_iterator_t {
- xcb_randr_crtc_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_crtc_iterator_t;
-
-typedef uint32_t xcb_randr_output_t;
-
-/**
- * @brief xcb_randr_output_iterator_t
- **/
-typedef struct xcb_randr_output_iterator_t {
- xcb_randr_output_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_output_iterator_t;
-
-/** Opcode for xcb_randr_bad_output. */
-#define XCB_RANDR_BAD_OUTPUT 0
-
-/**
- * @brief xcb_randr_bad_output_error_t
- **/
-typedef struct xcb_randr_bad_output_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
-} xcb_randr_bad_output_error_t;
-
-/** Opcode for xcb_randr_bad_crtc. */
-#define XCB_RANDR_BAD_CRTC 1
-
-/**
- * @brief xcb_randr_bad_crtc_error_t
- **/
-typedef struct xcb_randr_bad_crtc_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
-} xcb_randr_bad_crtc_error_t;
-
-/** Opcode for xcb_randr_bad_mode. */
-#define XCB_RANDR_BAD_MODE 2
-
-/**
- * @brief xcb_randr_bad_mode_error_t
- **/
-typedef struct xcb_randr_bad_mode_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
-} xcb_randr_bad_mode_error_t;
-
-typedef enum xcb_randr_rotation_t {
- XCB_RANDR_ROTATION_ROTATE_0 = 1,
- XCB_RANDR_ROTATION_ROTATE_90 = 2,
- XCB_RANDR_ROTATION_ROTATE_180 = 4,
- XCB_RANDR_ROTATION_ROTATE_270 = 8,
- XCB_RANDR_ROTATION_REFLECT_X = 16,
- XCB_RANDR_ROTATION_REFLECT_Y = 32
-} xcb_randr_rotation_t;
-
-/**
- * @brief xcb_randr_screen_size_t
- **/
-typedef struct xcb_randr_screen_size_t {
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint16_t mwidth; /**< */
- uint16_t mheight; /**< */
-} xcb_randr_screen_size_t;
-
-/**
- * @brief xcb_randr_screen_size_iterator_t
- **/
-typedef struct xcb_randr_screen_size_iterator_t {
- xcb_randr_screen_size_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_screen_size_iterator_t;
-
-/**
- * @brief xcb_randr_refresh_rates_t
- **/
-typedef struct xcb_randr_refresh_rates_t {
- uint16_t nRates; /**< */
-} xcb_randr_refresh_rates_t;
-
-/**
- * @brief xcb_randr_refresh_rates_iterator_t
- **/
-typedef struct xcb_randr_refresh_rates_iterator_t {
- xcb_randr_refresh_rates_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_refresh_rates_iterator_t;
-
-/**
- * @brief xcb_randr_query_version_cookie_t
- **/
-typedef struct xcb_randr_query_version_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_query_version_cookie_t;
-
-/** Opcode for xcb_randr_query_version. */
-#define XCB_RANDR_QUERY_VERSION 0
-
-/**
- * @brief xcb_randr_query_version_request_t
- **/
-typedef struct xcb_randr_query_version_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint32_t major_version; /**< */
- uint32_t minor_version; /**< */
-} xcb_randr_query_version_request_t;
-
-/**
- * @brief xcb_randr_query_version_reply_t
- **/
-typedef struct xcb_randr_query_version_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t major_version; /**< */
- uint32_t minor_version; /**< */
- uint8_t pad1[16]; /**< */
-} xcb_randr_query_version_reply_t;
-
-typedef enum xcb_randr_set_config_t {
- XCB_RANDR_SET_CONFIG_SUCCESS = 0,
- XCB_RANDR_SET_CONFIG_INVALID_CONFIG_TIME = 1,
- XCB_RANDR_SET_CONFIG_INVALID_TIME = 2,
- XCB_RANDR_SET_CONFIG_FAILED = 3
-} xcb_randr_set_config_t;
-
-/**
- * @brief xcb_randr_set_screen_config_cookie_t
- **/
-typedef struct xcb_randr_set_screen_config_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_set_screen_config_cookie_t;
-
-/** Opcode for xcb_randr_set_screen_config. */
-#define XCB_RANDR_SET_SCREEN_CONFIG 2
-
-/**
- * @brief xcb_randr_set_screen_config_request_t
- **/
-typedef struct xcb_randr_set_screen_config_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
- xcb_timestamp_t timestamp; /**< */
- xcb_timestamp_t config_timestamp; /**< */
- uint16_t sizeID; /**< */
- uint16_t rotation; /**< */
- uint16_t rate; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_randr_set_screen_config_request_t;
-
-/**
- * @brief xcb_randr_set_screen_config_reply_t
- **/
-typedef struct xcb_randr_set_screen_config_reply_t {
- uint8_t response_type; /**< */
- uint8_t status; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_timestamp_t new_timestamp; /**< */
- xcb_timestamp_t config_timestamp; /**< */
- xcb_window_t root; /**< */
- uint16_t subpixel_order; /**< */
- uint8_t pad0[10]; /**< */
-} xcb_randr_set_screen_config_reply_t;
-
-typedef enum xcb_randr_notify_mask_t {
- XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE = 1,
- XCB_RANDR_NOTIFY_MASK_CRTC_CHANGE = 2,
- XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE = 4,
- XCB_RANDR_NOTIFY_MASK_OUTPUT_PROPERTY = 8
-} xcb_randr_notify_mask_t;
-
-/** Opcode for xcb_randr_select_input. */
-#define XCB_RANDR_SELECT_INPUT 4
-
-/**
- * @brief xcb_randr_select_input_request_t
- **/
-typedef struct xcb_randr_select_input_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
- uint16_t enable; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_randr_select_input_request_t;
-
-/**
- * @brief xcb_randr_get_screen_info_cookie_t
- **/
-typedef struct xcb_randr_get_screen_info_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_screen_info_cookie_t;
-
-/** Opcode for xcb_randr_get_screen_info. */
-#define XCB_RANDR_GET_SCREEN_INFO 5
-
-/**
- * @brief xcb_randr_get_screen_info_request_t
- **/
-typedef struct xcb_randr_get_screen_info_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_randr_get_screen_info_request_t;
-
-/**
- * @brief xcb_randr_get_screen_info_reply_t
- **/
-typedef struct xcb_randr_get_screen_info_reply_t {
- uint8_t response_type; /**< */
- uint8_t rotations; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_window_t root; /**< */
- xcb_timestamp_t timestamp; /**< */
- xcb_timestamp_t config_timestamp; /**< */
- uint16_t nSizes; /**< */
- uint16_t sizeID; /**< */
- uint16_t rotation; /**< */
- uint16_t rate; /**< */
- uint16_t nInfo; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_randr_get_screen_info_reply_t;
-
-/**
- * @brief xcb_randr_get_screen_size_range_cookie_t
- **/
-typedef struct xcb_randr_get_screen_size_range_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_screen_size_range_cookie_t;
-
-/** Opcode for xcb_randr_get_screen_size_range. */
-#define XCB_RANDR_GET_SCREEN_SIZE_RANGE 6
-
-/**
- * @brief xcb_randr_get_screen_size_range_request_t
- **/
-typedef struct xcb_randr_get_screen_size_range_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_randr_get_screen_size_range_request_t;
-
-/**
- * @brief xcb_randr_get_screen_size_range_reply_t
- **/
-typedef struct xcb_randr_get_screen_size_range_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint16_t min_width; /**< */
- uint16_t min_height; /**< */
- uint16_t max_width; /**< */
- uint16_t max_height; /**< */
- uint8_t pad1[16]; /**< */
-} xcb_randr_get_screen_size_range_reply_t;
-
-/** Opcode for xcb_randr_set_screen_size. */
-#define XCB_RANDR_SET_SCREEN_SIZE 7
-
-/**
- * @brief xcb_randr_set_screen_size_request_t
- **/
-typedef struct xcb_randr_set_screen_size_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint32_t mm_width; /**< */
- uint32_t mm_height; /**< */
-} xcb_randr_set_screen_size_request_t;
-
-typedef enum xcb_randr_mode_flag_t {
- XCB_RANDR_MODE_FLAG_HSYNC_POSITIVE = 1,
- XCB_RANDR_MODE_FLAG_HSYNC_NEGATIVE = 2,
- XCB_RANDR_MODE_FLAG_VSYNC_POSITIVE = 4,
- XCB_RANDR_MODE_FLAG_VSYNC_NEGATIVE = 8,
- XCB_RANDR_MODE_FLAG_INTERLACE = 16,
- XCB_RANDR_MODE_FLAG_DOUBLE_SCAN = 32,
- XCB_RANDR_MODE_FLAG_CSYNC = 64,
- XCB_RANDR_MODE_FLAG_CSYNC_POSITIVE = 128,
- XCB_RANDR_MODE_FLAG_CSYNC_NEGATIVE = 256,
- XCB_RANDR_MODE_FLAG_HSKEW_PRESENT = 512,
- XCB_RANDR_MODE_FLAG_BCAST = 1024,
- XCB_RANDR_MODE_FLAG_PIXEL_MULTIPLEX = 2048,
- XCB_RANDR_MODE_FLAG_DOUBLE_CLOCK = 4096,
- XCB_RANDR_MODE_FLAG_HALVE_CLOCK = 8192
-} xcb_randr_mode_flag_t;
-
-/**
- * @brief xcb_randr_mode_info_t
- **/
-typedef struct xcb_randr_mode_info_t {
- uint32_t id; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint32_t dot_clock; /**< */
- uint16_t hsync_start; /**< */
- uint16_t hsync_end; /**< */
- uint16_t htotal; /**< */
- uint16_t hskew; /**< */
- uint16_t vsync_start; /**< */
- uint16_t vsync_end; /**< */
- uint16_t vtotal; /**< */
- uint16_t name_len; /**< */
- uint32_t mode_flags; /**< */
-} xcb_randr_mode_info_t;
-
-/**
- * @brief xcb_randr_mode_info_iterator_t
- **/
-typedef struct xcb_randr_mode_info_iterator_t {
- xcb_randr_mode_info_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_mode_info_iterator_t;
-
-/**
- * @brief xcb_randr_get_screen_resources_cookie_t
- **/
-typedef struct xcb_randr_get_screen_resources_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_screen_resources_cookie_t;
-
-/** Opcode for xcb_randr_get_screen_resources. */
-#define XCB_RANDR_GET_SCREEN_RESOURCES 8
-
-/**
- * @brief xcb_randr_get_screen_resources_request_t
- **/
-typedef struct xcb_randr_get_screen_resources_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_randr_get_screen_resources_request_t;
-
-/**
- * @brief xcb_randr_get_screen_resources_reply_t
- **/
-typedef struct xcb_randr_get_screen_resources_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_timestamp_t timestamp; /**< */
- xcb_timestamp_t config_timestamp; /**< */
- uint16_t num_crtcs; /**< */
- uint16_t num_outputs; /**< */
- uint16_t num_modes; /**< */
- uint16_t names_len; /**< */
- uint8_t pad1[8]; /**< */
-} xcb_randr_get_screen_resources_reply_t;
-
-typedef enum xcb_randr_connection_t {
- XCB_RANDR_CONNECTION_CONNECTED,
- XCB_RANDR_CONNECTION_DISCONNECTED,
- XCB_RANDR_CONNECTION_UNKNOWN
-} xcb_randr_connection_t;
-
-/**
- * @brief xcb_randr_get_output_info_cookie_t
- **/
-typedef struct xcb_randr_get_output_info_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_output_info_cookie_t;
-
-/** Opcode for xcb_randr_get_output_info. */
-#define XCB_RANDR_GET_OUTPUT_INFO 9
-
-/**
- * @brief xcb_randr_get_output_info_request_t
- **/
-typedef struct xcb_randr_get_output_info_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_output_t output; /**< */
- xcb_timestamp_t config_timestamp; /**< */
-} xcb_randr_get_output_info_request_t;
-
-/**
- * @brief xcb_randr_get_output_info_reply_t
- **/
-typedef struct xcb_randr_get_output_info_reply_t {
- uint8_t response_type; /**< */
- uint8_t status; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_timestamp_t timestamp; /**< */
- xcb_randr_crtc_t crtc; /**< */
- uint32_t mm_width; /**< */
- uint32_t mm_height; /**< */
- uint8_t connection; /**< */
- uint8_t subpixel_order; /**< */
- uint16_t num_crtcs; /**< */
- uint16_t num_modes; /**< */
- uint16_t num_preferred; /**< */
- uint16_t num_clones; /**< */
- uint16_t name_len; /**< */
-} xcb_randr_get_output_info_reply_t;
-
-/**
- * @brief xcb_randr_list_output_properties_cookie_t
- **/
-typedef struct xcb_randr_list_output_properties_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_list_output_properties_cookie_t;
-
-/** Opcode for xcb_randr_list_output_properties. */
-#define XCB_RANDR_LIST_OUTPUT_PROPERTIES 10
-
-/**
- * @brief xcb_randr_list_output_properties_request_t
- **/
-typedef struct xcb_randr_list_output_properties_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_output_t output; /**< */
-} xcb_randr_list_output_properties_request_t;
-
-/**
- * @brief xcb_randr_list_output_properties_reply_t
- **/
-typedef struct xcb_randr_list_output_properties_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint16_t num_atoms; /**< */
- uint8_t pad1[22]; /**< */
-} xcb_randr_list_output_properties_reply_t;
-
-/**
- * @brief xcb_randr_query_output_property_cookie_t
- **/
-typedef struct xcb_randr_query_output_property_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_query_output_property_cookie_t;
-
-/** Opcode for xcb_randr_query_output_property. */
-#define XCB_RANDR_QUERY_OUTPUT_PROPERTY 11
-
-/**
- * @brief xcb_randr_query_output_property_request_t
- **/
-typedef struct xcb_randr_query_output_property_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_output_t output; /**< */
- xcb_atom_t property; /**< */
-} xcb_randr_query_output_property_request_t;
-
-/**
- * @brief xcb_randr_query_output_property_reply_t
- **/
-typedef struct xcb_randr_query_output_property_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint8_t pending; /**< */
- uint8_t range; /**< */
- uint8_t immutable; /**< */
- uint8_t pad1[21]; /**< */
-} xcb_randr_query_output_property_reply_t;
-
-/** Opcode for xcb_randr_configure_output_property. */
-#define XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY 12
-
-/**
- * @brief xcb_randr_configure_output_property_request_t
- **/
-typedef struct xcb_randr_configure_output_property_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_output_t output; /**< */
- xcb_atom_t property; /**< */
- uint8_t pending; /**< */
- uint8_t range; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_randr_configure_output_property_request_t;
-
-/** Opcode for xcb_randr_change_output_property. */
-#define XCB_RANDR_CHANGE_OUTPUT_PROPERTY 13
-
-/**
- * @brief xcb_randr_change_output_property_request_t
- **/
-typedef struct xcb_randr_change_output_property_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_output_t output; /**< */
- xcb_atom_t property; /**< */
- xcb_atom_t type; /**< */
- uint8_t format; /**< */
- uint8_t mode; /**< */
- uint8_t pad0[2]; /**< */
- uint32_t num_units; /**< */
-} xcb_randr_change_output_property_request_t;
-
-/** Opcode for xcb_randr_delete_output_property. */
-#define XCB_RANDR_DELETE_OUTPUT_PROPERTY 14
-
-/**
- * @brief xcb_randr_delete_output_property_request_t
- **/
-typedef struct xcb_randr_delete_output_property_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_output_t output; /**< */
- xcb_atom_t property; /**< */
-} xcb_randr_delete_output_property_request_t;
-
-/**
- * @brief xcb_randr_get_output_property_cookie_t
- **/
-typedef struct xcb_randr_get_output_property_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_output_property_cookie_t;
-
-/** Opcode for xcb_randr_get_output_property. */
-#define XCB_RANDR_GET_OUTPUT_PROPERTY 15
-
-/**
- * @brief xcb_randr_get_output_property_request_t
- **/
-typedef struct xcb_randr_get_output_property_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_output_t output; /**< */
- xcb_atom_t property; /**< */
- xcb_atom_t type; /**< */
- uint32_t long_offset; /**< */
- uint32_t long_length; /**< */
- uint8_t _delete; /**< */
- uint8_t pending; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_randr_get_output_property_request_t;
-
-/**
- * @brief xcb_randr_get_output_property_reply_t
- **/
-typedef struct xcb_randr_get_output_property_reply_t {
- uint8_t response_type; /**< */
- uint8_t format; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_atom_t type; /**< */
- uint32_t bytes_after; /**< */
- uint32_t num_items; /**< */
- uint8_t pad0[12]; /**< */
-} xcb_randr_get_output_property_reply_t;
-
-/**
- * @brief xcb_randr_create_mode_cookie_t
- **/
-typedef struct xcb_randr_create_mode_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_create_mode_cookie_t;
-
-/** Opcode for xcb_randr_create_mode. */
-#define XCB_RANDR_CREATE_MODE 16
-
-/**
- * @brief xcb_randr_create_mode_request_t
- **/
-typedef struct xcb_randr_create_mode_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
- xcb_randr_mode_info_t mode_info; /**< */
-} xcb_randr_create_mode_request_t;
-
-/**
- * @brief xcb_randr_create_mode_reply_t
- **/
-typedef struct xcb_randr_create_mode_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_randr_mode_t mode; /**< */
- uint8_t pad1[20]; /**< */
-} xcb_randr_create_mode_reply_t;
-
-/** Opcode for xcb_randr_destroy_mode. */
-#define XCB_RANDR_DESTROY_MODE 17
-
-/**
- * @brief xcb_randr_destroy_mode_request_t
- **/
-typedef struct xcb_randr_destroy_mode_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_mode_t mode; /**< */
-} xcb_randr_destroy_mode_request_t;
-
-/** Opcode for xcb_randr_add_output_mode. */
-#define XCB_RANDR_ADD_OUTPUT_MODE 18
-
-/**
- * @brief xcb_randr_add_output_mode_request_t
- **/
-typedef struct xcb_randr_add_output_mode_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_output_t output; /**< */
- xcb_randr_mode_t mode; /**< */
-} xcb_randr_add_output_mode_request_t;
-
-/** Opcode for xcb_randr_delete_output_mode. */
-#define XCB_RANDR_DELETE_OUTPUT_MODE 19
-
-/**
- * @brief xcb_randr_delete_output_mode_request_t
- **/
-typedef struct xcb_randr_delete_output_mode_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_output_t output; /**< */
- xcb_randr_mode_t mode; /**< */
-} xcb_randr_delete_output_mode_request_t;
-
-/**
- * @brief xcb_randr_get_crtc_info_cookie_t
- **/
-typedef struct xcb_randr_get_crtc_info_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_crtc_info_cookie_t;
-
-/** Opcode for xcb_randr_get_crtc_info. */
-#define XCB_RANDR_GET_CRTC_INFO 20
-
-/**
- * @brief xcb_randr_get_crtc_info_request_t
- **/
-typedef struct xcb_randr_get_crtc_info_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_crtc_t crtc; /**< */
- xcb_timestamp_t config_timestamp; /**< */
-} xcb_randr_get_crtc_info_request_t;
-
-/**
- * @brief xcb_randr_get_crtc_info_reply_t
- **/
-typedef struct xcb_randr_get_crtc_info_reply_t {
- uint8_t response_type; /**< */
- uint8_t status; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_timestamp_t timestamp; /**< */
- int16_t x; /**< */
- int16_t y; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- xcb_randr_mode_t mode; /**< */
- uint16_t rotation; /**< */
- uint16_t rotations; /**< */
- uint16_t num_outputs; /**< */
- uint16_t num_possible_outputs; /**< */
-} xcb_randr_get_crtc_info_reply_t;
-
-/**
- * @brief xcb_randr_set_crtc_config_cookie_t
- **/
-typedef struct xcb_randr_set_crtc_config_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_set_crtc_config_cookie_t;
-
-/** Opcode for xcb_randr_set_crtc_config. */
-#define XCB_RANDR_SET_CRTC_CONFIG 21
-
-/**
- * @brief xcb_randr_set_crtc_config_request_t
- **/
-typedef struct xcb_randr_set_crtc_config_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_crtc_t crtc; /**< */
- xcb_timestamp_t timestamp; /**< */
- xcb_timestamp_t config_timestamp; /**< */
- int16_t x; /**< */
- int16_t y; /**< */
- xcb_randr_mode_t mode; /**< */
- uint16_t rotation; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_randr_set_crtc_config_request_t;
-
-/**
- * @brief xcb_randr_set_crtc_config_reply_t
- **/
-typedef struct xcb_randr_set_crtc_config_reply_t {
- uint8_t response_type; /**< */
- uint8_t status; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_timestamp_t timestamp; /**< */
- uint8_t pad0[20]; /**< */
-} xcb_randr_set_crtc_config_reply_t;
-
-/**
- * @brief xcb_randr_get_crtc_gamma_size_cookie_t
- **/
-typedef struct xcb_randr_get_crtc_gamma_size_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_crtc_gamma_size_cookie_t;
-
-/** Opcode for xcb_randr_get_crtc_gamma_size. */
-#define XCB_RANDR_GET_CRTC_GAMMA_SIZE 22
-
-/**
- * @brief xcb_randr_get_crtc_gamma_size_request_t
- **/
-typedef struct xcb_randr_get_crtc_gamma_size_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_crtc_t crtc; /**< */
-} xcb_randr_get_crtc_gamma_size_request_t;
-
-/**
- * @brief xcb_randr_get_crtc_gamma_size_reply_t
- **/
-typedef struct xcb_randr_get_crtc_gamma_size_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint16_t size; /**< */
- uint8_t pad1[22]; /**< */
-} xcb_randr_get_crtc_gamma_size_reply_t;
-
-/**
- * @brief xcb_randr_get_crtc_gamma_cookie_t
- **/
-typedef struct xcb_randr_get_crtc_gamma_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_crtc_gamma_cookie_t;
-
-/** Opcode for xcb_randr_get_crtc_gamma. */
-#define XCB_RANDR_GET_CRTC_GAMMA 23
-
-/**
- * @brief xcb_randr_get_crtc_gamma_request_t
- **/
-typedef struct xcb_randr_get_crtc_gamma_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_crtc_t crtc; /**< */
-} xcb_randr_get_crtc_gamma_request_t;
-
-/**
- * @brief xcb_randr_get_crtc_gamma_reply_t
- **/
-typedef struct xcb_randr_get_crtc_gamma_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint16_t size; /**< */
- uint8_t pad1[22]; /**< */
-} xcb_randr_get_crtc_gamma_reply_t;
-
-/** Opcode for xcb_randr_set_crtc_gamma. */
-#define XCB_RANDR_SET_CRTC_GAMMA 24
-
-/**
- * @brief xcb_randr_set_crtc_gamma_request_t
- **/
-typedef struct xcb_randr_set_crtc_gamma_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_crtc_t crtc; /**< */
- uint16_t size; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_randr_set_crtc_gamma_request_t;
-
-/**
- * @brief xcb_randr_get_screen_resources_current_cookie_t
- **/
-typedef struct xcb_randr_get_screen_resources_current_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_screen_resources_current_cookie_t;
-
-/** Opcode for xcb_randr_get_screen_resources_current. */
-#define XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT 25
-
-/**
- * @brief xcb_randr_get_screen_resources_current_request_t
- **/
-typedef struct xcb_randr_get_screen_resources_current_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_randr_get_screen_resources_current_request_t;
-
-/**
- * @brief xcb_randr_get_screen_resources_current_reply_t
- **/
-typedef struct xcb_randr_get_screen_resources_current_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_timestamp_t timestamp; /**< */
- xcb_timestamp_t config_timestamp; /**< */
- uint16_t num_crtcs; /**< */
- uint16_t num_outputs; /**< */
- uint16_t num_modes; /**< */
- uint16_t names_len; /**< */
- uint8_t pad1[8]; /**< */
-} xcb_randr_get_screen_resources_current_reply_t;
-
-/** Opcode for xcb_randr_set_crtc_transform. */
-#define XCB_RANDR_SET_CRTC_TRANSFORM 26
-
-/**
- * @brief xcb_randr_set_crtc_transform_request_t
- **/
-typedef struct xcb_randr_set_crtc_transform_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_crtc_t crtc; /**< */
- xcb_render_transform_t transform; /**< */
- uint16_t filter_len; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_randr_set_crtc_transform_request_t;
-
-/**
- * @brief xcb_randr_get_crtc_transform_cookie_t
- **/
-typedef struct xcb_randr_get_crtc_transform_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_crtc_transform_cookie_t;
-
-/** Opcode for xcb_randr_get_crtc_transform. */
-#define XCB_RANDR_GET_CRTC_TRANSFORM 27
-
-/**
- * @brief xcb_randr_get_crtc_transform_request_t
- **/
-typedef struct xcb_randr_get_crtc_transform_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_crtc_t crtc; /**< */
-} xcb_randr_get_crtc_transform_request_t;
-
-/**
- * @brief xcb_randr_get_crtc_transform_reply_t
- **/
-typedef struct xcb_randr_get_crtc_transform_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_render_transform_t pending_transform; /**< */
- uint8_t has_transforms; /**< */
- uint8_t pad1[3]; /**< */
- xcb_render_transform_t current_transform; /**< */
- uint8_t pad2[4]; /**< */
- uint16_t pending_len; /**< */
- uint16_t pending_nparams; /**< */
- uint16_t current_len; /**< */
- uint16_t current_nparams; /**< */
-} xcb_randr_get_crtc_transform_reply_t;
-
-/**
- * @brief xcb_randr_get_panning_cookie_t
- **/
-typedef struct xcb_randr_get_panning_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_panning_cookie_t;
-
-/** Opcode for xcb_randr_get_panning. */
-#define XCB_RANDR_GET_PANNING 28
-
-/**
- * @brief xcb_randr_get_panning_request_t
- **/
-typedef struct xcb_randr_get_panning_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_crtc_t crtc; /**< */
-} xcb_randr_get_panning_request_t;
-
-/**
- * @brief xcb_randr_get_panning_reply_t
- **/
-typedef struct xcb_randr_get_panning_reply_t {
- uint8_t response_type; /**< */
- uint8_t status; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_timestamp_t timestamp; /**< */
- uint16_t left; /**< */
- uint16_t top; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint16_t track_left; /**< */
- uint16_t track_top; /**< */
- uint16_t track_width; /**< */
- uint16_t track_height; /**< */
- int16_t border_left; /**< */
- int16_t border_top; /**< */
- int16_t border_right; /**< */
- int16_t border_bottom; /**< */
-} xcb_randr_get_panning_reply_t;
-
-/**
- * @brief xcb_randr_set_panning_cookie_t
- **/
-typedef struct xcb_randr_set_panning_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_set_panning_cookie_t;
-
-/** Opcode for xcb_randr_set_panning. */
-#define XCB_RANDR_SET_PANNING 29
-
-/**
- * @brief xcb_randr_set_panning_request_t
- **/
-typedef struct xcb_randr_set_panning_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_randr_crtc_t crtc; /**< */
- xcb_timestamp_t timestamp; /**< */
- uint16_t left; /**< */
- uint16_t top; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint16_t track_left; /**< */
- uint16_t track_top; /**< */
- uint16_t track_width; /**< */
- uint16_t track_height; /**< */
- int16_t border_left; /**< */
- int16_t border_top; /**< */
- int16_t border_right; /**< */
- int16_t border_bottom; /**< */
-} xcb_randr_set_panning_request_t;
-
-/**
- * @brief xcb_randr_set_panning_reply_t
- **/
-typedef struct xcb_randr_set_panning_reply_t {
- uint8_t response_type; /**< */
- uint8_t status; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_timestamp_t timestamp; /**< */
-} xcb_randr_set_panning_reply_t;
-
-/** Opcode for xcb_randr_set_output_primary. */
-#define XCB_RANDR_SET_OUTPUT_PRIMARY 30
-
-/**
- * @brief xcb_randr_set_output_primary_request_t
- **/
-typedef struct xcb_randr_set_output_primary_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
- xcb_randr_output_t output; /**< */
-} xcb_randr_set_output_primary_request_t;
-
-/**
- * @brief xcb_randr_get_output_primary_cookie_t
- **/
-typedef struct xcb_randr_get_output_primary_cookie_t {
- unsigned int sequence; /**< */
-} xcb_randr_get_output_primary_cookie_t;
-
-/** Opcode for xcb_randr_get_output_primary. */
-#define XCB_RANDR_GET_OUTPUT_PRIMARY 31
-
-/**
- * @brief xcb_randr_get_output_primary_request_t
- **/
-typedef struct xcb_randr_get_output_primary_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_randr_get_output_primary_request_t;
-
-/**
- * @brief xcb_randr_get_output_primary_reply_t
- **/
-typedef struct xcb_randr_get_output_primary_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_randr_output_t output; /**< */
-} xcb_randr_get_output_primary_reply_t;
-
-/** Opcode for xcb_randr_screen_change_notify. */
-#define XCB_RANDR_SCREEN_CHANGE_NOTIFY 0
-
-/**
- * @brief xcb_randr_screen_change_notify_event_t
- **/
-typedef struct xcb_randr_screen_change_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t rotation; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t timestamp; /**< */
- xcb_timestamp_t config_timestamp; /**< */
- xcb_window_t root; /**< */
- xcb_window_t request_window; /**< */
- uint16_t sizeID; /**< */
- uint16_t subpixel_order; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint16_t mwidth; /**< */
- uint16_t mheight; /**< */
-} xcb_randr_screen_change_notify_event_t;
-
-typedef enum xcb_randr_notify_t {
- XCB_RANDR_NOTIFY_CRTC_CHANGE = 0,
- XCB_RANDR_NOTIFY_OUTPUT_CHANGE = 1,
- XCB_RANDR_NOTIFY_OUTPUT_PROPERTY = 2
-} xcb_randr_notify_t;
-
-/**
- * @brief xcb_randr_crtc_change_t
- **/
-typedef struct xcb_randr_crtc_change_t {
- xcb_timestamp_t timestamp; /**< */
- xcb_window_t window; /**< */
- xcb_randr_crtc_t crtc; /**< */
- xcb_randr_mode_t mode; /**< */
- uint16_t rotation; /**< */
- uint8_t pad0[2]; /**< */
- int16_t x; /**< */
- int16_t y; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
-} xcb_randr_crtc_change_t;
-
-/**
- * @brief xcb_randr_crtc_change_iterator_t
- **/
-typedef struct xcb_randr_crtc_change_iterator_t {
- xcb_randr_crtc_change_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_crtc_change_iterator_t;
-
-/**
- * @brief xcb_randr_output_change_t
- **/
-typedef struct xcb_randr_output_change_t {
- xcb_timestamp_t timestamp; /**< */
- xcb_timestamp_t config_timestamp; /**< */
- xcb_window_t window; /**< */
- xcb_randr_output_t output; /**< */
- xcb_randr_crtc_t crtc; /**< */
- xcb_randr_mode_t mode; /**< */
- uint16_t rotation; /**< */
- uint8_t connection; /**< */
- uint8_t subpixel_order; /**< */
-} xcb_randr_output_change_t;
-
-/**
- * @brief xcb_randr_output_change_iterator_t
- **/
-typedef struct xcb_randr_output_change_iterator_t {
- xcb_randr_output_change_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_output_change_iterator_t;
-
-/**
- * @brief xcb_randr_output_property_t
- **/
-typedef struct xcb_randr_output_property_t {
- xcb_window_t window; /**< */
- xcb_randr_output_t output; /**< */
- xcb_atom_t atom; /**< */
- xcb_timestamp_t timestamp; /**< */
- uint8_t status; /**< */
- uint8_t pad0[11]; /**< */
-} xcb_randr_output_property_t;
-
-/**
- * @brief xcb_randr_output_property_iterator_t
- **/
-typedef struct xcb_randr_output_property_iterator_t {
- xcb_randr_output_property_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_output_property_iterator_t;
-
-/**
- * @brief xcb_randr_notify_data_t
- **/
-typedef union xcb_randr_notify_data_t {
- xcb_randr_crtc_change_t cc; /**< */
- xcb_randr_output_change_t oc; /**< */
- xcb_randr_output_property_t op; /**< */
-} xcb_randr_notify_data_t;
-
-/**
- * @brief xcb_randr_notify_data_iterator_t
- **/
-typedef struct xcb_randr_notify_data_iterator_t {
- xcb_randr_notify_data_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_randr_notify_data_iterator_t;
-
-/** Opcode for xcb_randr_notify. */
-#define XCB_RANDR_NOTIFY 1
-
-/**
- * @brief xcb_randr_notify_event_t
- **/
-typedef struct xcb_randr_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t subCode; /**< */
- uint16_t sequence; /**< */
- xcb_randr_notify_data_t u; /**< */
-} xcb_randr_notify_event_t;
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_mode_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_randr_mode_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_mode_next
- **
- ** @param xcb_randr_mode_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_mode_next (xcb_randr_mode_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_mode_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_randr_mode_end
- **
- ** @param xcb_randr_mode_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_mode_end (xcb_randr_mode_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_crtc_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_randr_crtc_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_crtc_next
- **
- ** @param xcb_randr_crtc_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_crtc_next (xcb_randr_crtc_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_crtc_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_randr_crtc_end
- **
- ** @param xcb_randr_crtc_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_crtc_end (xcb_randr_crtc_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_output_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_randr_output_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_output_next
- **
- ** @param xcb_randr_output_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_output_next (xcb_randr_output_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_output_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_randr_output_end
- **
- ** @param xcb_randr_output_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_output_end (xcb_randr_output_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_screen_size_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_randr_screen_size_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_screen_size_next
- **
- ** @param xcb_randr_screen_size_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_screen_size_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_randr_screen_size_end
- **
- ** @param xcb_randr_screen_size_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-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 /**< */);
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_randr_refresh_rates_rates
- **
- ** @param const xcb_randr_refresh_rates_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_randr_refresh_rates_rates (const xcb_randr_refresh_rates_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_refresh_rates_rates_length
- **
- ** @param const xcb_randr_refresh_rates_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_refresh_rates_rates_length (const xcb_randr_refresh_rates_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_refresh_rates_rates_end
- **
- ** @param const xcb_randr_refresh_rates_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_refresh_rates_rates_end (const xcb_randr_refresh_rates_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_refresh_rates_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_randr_refresh_rates_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_refresh_rates_next
- **
- ** @param xcb_randr_refresh_rates_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_refresh_rates_next (xcb_randr_refresh_rates_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_refresh_rates_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_randr_refresh_rates_end
- **
- ** @param xcb_randr_refresh_rates_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_query_version_cookie_t xcb_randr_query_version
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t major_version
- ** @param uint32_t minor_version
- ** @returns xcb_randr_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_query_version_cookie_t
-xcb_randr_query_version (xcb_connection_t *c /**< */,
- uint32_t major_version /**< */,
- uint32_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_randr_query_version_cookie_t xcb_randr_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t major_version
- ** @param uint32_t minor_version
- ** @returns xcb_randr_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_query_version_cookie_t
-xcb_randr_query_version_unchecked (xcb_connection_t *c /**< */,
- uint32_t major_version /**< */,
- uint32_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_randr_query_version_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_query_version_reply_t * xcb_randr_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_query_version_reply_t *
-xcb_randr_query_version_reply (xcb_connection_t *c /**< */,
- xcb_randr_query_version_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_timestamp_t timestamp
- ** @param xcb_timestamp_t config_timestamp
- ** @param uint16_t sizeID
- ** @param uint16_t rotation
- ** @param uint16_t rate
- ** @returns xcb_randr_set_screen_config_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_screen_config_cookie_t
-xcb_randr_set_screen_config (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_timestamp_t timestamp /**< */,
- xcb_timestamp_t config_timestamp /**< */,
- uint16_t sizeID /**< */,
- uint16_t rotation /**< */,
- uint16_t rate /**< */);
-
-/**
- *
- * @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_randr_set_screen_config_cookie_t xcb_randr_set_screen_config_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_timestamp_t timestamp
- ** @param xcb_timestamp_t config_timestamp
- ** @param uint16_t sizeID
- ** @param uint16_t rotation
- ** @param uint16_t rate
- ** @returns xcb_randr_set_screen_config_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_screen_config_cookie_t
-xcb_randr_set_screen_config_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_timestamp_t timestamp /**< */,
- xcb_timestamp_t config_timestamp /**< */,
- uint16_t sizeID /**< */,
- uint16_t rotation /**< */,
- uint16_t rate /**< */);
-
-/**
- * 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_randr_set_screen_config_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_set_screen_config_reply_t * xcb_randr_set_screen_config_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_set_screen_config_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_set_screen_config_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_set_screen_config_reply_t *
-xcb_randr_set_screen_config_reply (xcb_connection_t *c /**< */,
- xcb_randr_set_screen_config_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_randr_select_input_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint16_t enable
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_select_input_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint16_t enable /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_select_input
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint16_t enable
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_info_cookie_t
-xcb_randr_get_screen_info (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_randr_get_screen_info_cookie_t xcb_randr_get_screen_info_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_info_cookie_t
-xcb_randr_get_screen_info_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_screen_size_t * xcb_randr_get_screen_info_sizes
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns xcb_randr_screen_size_t *
- **
- *****************************************************************************/
-
-xcb_randr_screen_size_t *
-xcb_randr_get_screen_info_sizes (const xcb_randr_get_screen_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_info_sizes_length
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_info_sizes_length (const xcb_randr_get_screen_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_screen_size_iterator_t xcb_randr_get_screen_info_sizes_iterator
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns xcb_randr_screen_size_iterator_t
- **
- *****************************************************************************/
-
-xcb_randr_screen_size_iterator_t
-xcb_randr_get_screen_info_sizes_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_info_rates_length
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_info_rates_length (const xcb_randr_get_screen_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_refresh_rates_iterator_t xcb_randr_get_screen_info_rates_iterator
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns xcb_randr_refresh_rates_iterator_t
- **
- *****************************************************************************/
-
-xcb_randr_refresh_rates_iterator_t
-xcb_randr_get_screen_info_rates_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_randr_get_screen_info_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_info_reply_t * xcb_randr_get_screen_info_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_screen_info_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_screen_info_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_info_reply_t *
-xcb_randr_get_screen_info_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_screen_info_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_size_range_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_size_range_cookie_t
-xcb_randr_get_screen_size_range (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_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_size_range_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_size_range_cookie_t
-xcb_randr_get_screen_size_range_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_randr_get_screen_size_range_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_size_range_reply_t * xcb_randr_get_screen_size_range_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_screen_size_range_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_screen_size_range_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_size_range_reply_t *
-xcb_randr_get_screen_size_range_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_screen_size_range_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_randr_set_screen_size_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint32_t mm_width
- ** @param uint32_t mm_height
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_screen_size_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint32_t mm_width /**< */,
- uint32_t mm_height /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_screen_size
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint32_t mm_width
- ** @param uint32_t mm_height
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_screen_size (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint32_t mm_width /**< */,
- uint32_t mm_height /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_mode_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_randr_mode_info_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_mode_info_next
- **
- ** @param xcb_randr_mode_info_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_mode_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_randr_mode_info_end
- **
- ** @param xcb_randr_mode_info_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_resources_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_cookie_t
-xcb_randr_get_screen_resources (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_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_resources_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_cookie_t
-xcb_randr_get_screen_resources_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_crtcs
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_randr_crtc_t *
- **
- *****************************************************************************/
-
-xcb_randr_crtc_t *
-xcb_randr_get_screen_resources_crtcs (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_crtcs_length
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_crtcs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_crtcs_end
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_crtcs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_output_t * xcb_randr_get_screen_resources_outputs
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_screen_resources_outputs (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_outputs_length
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_outputs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_outputs_end
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_outputs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_modes
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_randr_mode_info_t *
- **
- *****************************************************************************/
-
-xcb_randr_mode_info_t *
-xcb_randr_get_screen_resources_modes (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_modes_length
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_modes_length (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_modes_iterator
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_randr_mode_info_iterator_t
- **
- *****************************************************************************/
-
-xcb_randr_mode_info_iterator_t
-xcb_randr_get_screen_resources_modes_iterator (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_randr_get_screen_resources_names
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_randr_get_screen_resources_names (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_names_length
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_names_length (const xcb_randr_get_screen_resources_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_names_end
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_names_end (const xcb_randr_get_screen_resources_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_randr_get_screen_resources_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_resources_reply_t * xcb_randr_get_screen_resources_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_screen_resources_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_screen_resources_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_reply_t *
-xcb_randr_get_screen_resources_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_screen_resources_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_randr_get_output_info_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_timestamp_t config_timestamp
- ** @returns xcb_randr_get_output_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_info_cookie_t
-xcb_randr_get_output_info (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_timestamp_t config_timestamp /**< */);
-
-/**
- *
- * @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_randr_get_output_info_cookie_t xcb_randr_get_output_info_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_timestamp_t config_timestamp
- ** @returns xcb_randr_get_output_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_info_cookie_t
-xcb_randr_get_output_info_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_timestamp_t config_timestamp /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_crtc_t * xcb_randr_get_output_info_crtcs
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_randr_crtc_t *
- **
- *****************************************************************************/
-
-xcb_randr_crtc_t *
-xcb_randr_get_output_info_crtcs (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_info_crtcs_length
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_info_crtcs_length (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_info_crtcs_end
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_info_crtcs_end (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_t * xcb_randr_get_output_info_modes
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_randr_mode_t *
- **
- *****************************************************************************/
-
-xcb_randr_mode_t *
-xcb_randr_get_output_info_modes (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_info_modes_length
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_info_modes_length (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_info_modes_end
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_info_modes_end (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_output_t * xcb_randr_get_output_info_clones
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_output_info_clones (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_info_clones_length
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_info_clones_length (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_info_clones_end
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_info_clones_end (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_randr_get_output_info_name
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_randr_get_output_info_name (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_info_name_length
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_info_name_length (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_info_name_end
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_info_name_end (const xcb_randr_get_output_info_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_randr_get_output_info_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_info_reply_t * xcb_randr_get_output_info_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_output_info_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_output_info_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_output_info_reply_t *
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @returns xcb_randr_list_output_properties_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_list_output_properties_cookie_t
-xcb_randr_list_output_properties (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */);
-
-/**
- *
- * @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_randr_list_output_properties_cookie_t xcb_randr_list_output_properties_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @returns xcb_randr_list_output_properties_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_list_output_properties_cookie_t
-xcb_randr_list_output_properties_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_randr_list_output_properties_atoms
- **
- ** @param const xcb_randr_list_output_properties_reply_t *R
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_randr_list_output_properties_atoms (const xcb_randr_list_output_properties_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_list_output_properties_atoms_length
- **
- ** @param const xcb_randr_list_output_properties_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_list_output_properties_atoms_length (const xcb_randr_list_output_properties_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_list_output_properties_atoms_end
- **
- ** @param const xcb_randr_list_output_properties_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_list_output_properties_atoms_end (const xcb_randr_list_output_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_randr_list_output_properties_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_list_output_properties_reply_t * xcb_randr_list_output_properties_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_list_output_properties_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_list_output_properties_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_list_output_properties_reply_t *
-xcb_randr_list_output_properties_reply (xcb_connection_t *c /**< */,
- xcb_randr_list_output_properties_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_randr_query_output_property_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @returns xcb_randr_query_output_property_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_query_output_property_cookie_t
-xcb_randr_query_output_property (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */);
-
-/**
- *
- * @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_randr_query_output_property_cookie_t xcb_randr_query_output_property_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @returns xcb_randr_query_output_property_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_query_output_property_cookie_t
-xcb_randr_query_output_property_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */);
-
-
-/*****************************************************************************
- **
- ** int32_t * xcb_randr_query_output_property_valid_values
- **
- ** @param const xcb_randr_query_output_property_reply_t *R
- ** @returns int32_t *
- **
- *****************************************************************************/
-
-int32_t *
-xcb_randr_query_output_property_valid_values (const xcb_randr_query_output_property_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_query_output_property_valid_values_length
- **
- ** @param const xcb_randr_query_output_property_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_query_output_property_valid_values_length (const xcb_randr_query_output_property_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_query_output_property_valid_values_end
- **
- ** @param const xcb_randr_query_output_property_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_query_output_property_valid_values_end (const xcb_randr_query_output_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_randr_query_output_property_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_query_output_property_reply_t * xcb_randr_query_output_property_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_query_output_property_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_query_output_property_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_query_output_property_reply_t *
-xcb_randr_query_output_property_reply (xcb_connection_t *c /**< */,
- 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 /**< */);
-
-/**
- *
- * @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_randr_configure_output_property_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param uint8_t pending
- ** @param uint8_t range
- ** @param uint32_t values_len
- ** @param const int32_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_configure_output_property_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- uint8_t pending /**< */,
- uint8_t range /**< */,
- uint32_t values_len /**< */,
- const int32_t *values /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_configure_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param uint8_t pending
- ** @param uint8_t range
- ** @param uint32_t values_len
- ** @param const int32_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_configure_output_property (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- uint8_t pending /**< */,
- uint8_t range /**< */,
- uint32_t values_len /**< */,
- const int32_t *values /**< */);
-
-int
-xcb_randr_change_output_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_randr_change_output_property_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param xcb_atom_t type
- ** @param uint8_t format
- ** @param uint8_t mode
- ** @param uint32_t num_units
- ** @param const void *data
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_change_output_property_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- xcb_atom_t type /**< */,
- uint8_t format /**< */,
- uint8_t mode /**< */,
- uint32_t num_units /**< */,
- const void *data /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_change_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param xcb_atom_t type
- ** @param uint8_t format
- ** @param uint8_t mode
- ** @param uint32_t num_units
- ** @param const void *data
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_change_output_property (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- xcb_atom_t type /**< */,
- uint8_t format /**< */,
- uint8_t mode /**< */,
- uint32_t num_units /**< */,
- const void *data /**< */);
-
-/**
- *
- * @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_randr_delete_output_property_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_delete_output_property_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_delete_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param xcb_atom_t type
- ** @param uint32_t long_offset
- ** @param uint32_t long_length
- ** @param uint8_t _delete
- ** @param uint8_t pending
- ** @returns xcb_randr_get_output_property_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_property_cookie_t
-xcb_randr_get_output_property (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- xcb_atom_t type /**< */,
- uint32_t long_offset /**< */,
- uint32_t long_length /**< */,
- uint8_t _delete /**< */,
- uint8_t pending /**< */);
-
-/**
- *
- * @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_randr_get_output_property_cookie_t xcb_randr_get_output_property_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param xcb_atom_t type
- ** @param uint32_t long_offset
- ** @param uint32_t long_length
- ** @param uint8_t _delete
- ** @param uint8_t pending
- ** @returns xcb_randr_get_output_property_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_property_cookie_t
-xcb_randr_get_output_property_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- xcb_atom_t type /**< */,
- uint32_t long_offset /**< */,
- uint32_t long_length /**< */,
- uint8_t _delete /**< */,
- uint8_t pending /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_randr_get_output_property_data
- **
- ** @param const xcb_randr_get_output_property_reply_t *R
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_randr_get_output_property_data (const xcb_randr_get_output_property_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_property_data_length
- **
- ** @param const xcb_randr_get_output_property_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_property_data_length (const xcb_randr_get_output_property_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_property_data_end
- **
- ** @param const xcb_randr_get_output_property_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_property_data_end (const xcb_randr_get_output_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_randr_get_output_property_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_property_reply_t * xcb_randr_get_output_property_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_output_property_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_output_property_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_output_property_reply_t *
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_randr_mode_info_t mode_info
- ** @param uint32_t name_len
- ** @param const char *name
- ** @returns xcb_randr_create_mode_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_create_mode_cookie_t
-xcb_randr_create_mode (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_randr_mode_info_t mode_info /**< */,
- uint32_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_randr_create_mode_cookie_t xcb_randr_create_mode_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_randr_mode_info_t mode_info
- ** @param uint32_t name_len
- ** @param const char *name
- ** @returns xcb_randr_create_mode_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_create_mode_cookie_t
-xcb_randr_create_mode_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_randr_mode_info_t mode_info /**< */,
- uint32_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_randr_create_mode_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_create_mode_reply_t * xcb_randr_create_mode_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_create_mode_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_create_mode_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_create_mode_reply_t *
-xcb_randr_create_mode_reply (xcb_connection_t *c /**< */,
- xcb_randr_create_mode_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_randr_destroy_mode_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_destroy_mode_checked (xcb_connection_t *c /**< */,
- xcb_randr_mode_t mode /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_destroy_mode
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_destroy_mode (xcb_connection_t *c /**< */,
- xcb_randr_mode_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 not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_add_output_mode_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_add_output_mode_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_randr_mode_t mode /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_add_output_mode
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_add_output_mode (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_randr_mode_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 not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_delete_output_mode_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_delete_output_mode_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_randr_mode_t mode /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_delete_output_mode
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t config_timestamp
- ** @returns xcb_randr_get_crtc_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_info_cookie_t
-xcb_randr_get_crtc_info (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t config_timestamp /**< */);
-
-/**
- *
- * @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_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t config_timestamp
- ** @returns xcb_randr_get_crtc_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_info_cookie_t
-xcb_randr_get_crtc_info_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t config_timestamp /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_output_t * xcb_randr_get_crtc_info_outputs
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_crtc_info_outputs (const xcb_randr_get_crtc_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_info_outputs_length
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_info_outputs_length (const xcb_randr_get_crtc_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_info_outputs_end
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_info_outputs_end (const xcb_randr_get_crtc_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_output_t * xcb_randr_get_crtc_info_possible
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_crtc_info_possible (const xcb_randr_get_crtc_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_info_possible_length
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_info_possible_length (const xcb_randr_get_crtc_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_info_possible_end
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_info_possible_end (const xcb_randr_get_crtc_info_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_randr_get_crtc_info_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_info_reply_t * xcb_randr_get_crtc_info_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_crtc_info_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_crtc_info_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_info_reply_t *
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t timestamp
- ** @param xcb_timestamp_t config_timestamp
- ** @param int16_t x
- ** @param int16_t y
- ** @param xcb_randr_mode_t mode
- ** @param uint16_t rotation
- ** @param uint32_t outputs_len
- ** @param const xcb_randr_output_t *outputs
- ** @returns xcb_randr_set_crtc_config_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_crtc_config_cookie_t
-xcb_randr_set_crtc_config (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t timestamp /**< */,
- xcb_timestamp_t config_timestamp /**< */,
- int16_t x /**< */,
- int16_t y /**< */,
- xcb_randr_mode_t mode /**< */,
- uint16_t rotation /**< */,
- uint32_t outputs_len /**< */,
- const xcb_randr_output_t *outputs /**< */);
-
-/**
- *
- * @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_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t timestamp
- ** @param xcb_timestamp_t config_timestamp
- ** @param int16_t x
- ** @param int16_t y
- ** @param xcb_randr_mode_t mode
- ** @param uint16_t rotation
- ** @param uint32_t outputs_len
- ** @param const xcb_randr_output_t *outputs
- ** @returns xcb_randr_set_crtc_config_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_crtc_config_cookie_t
-xcb_randr_set_crtc_config_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t timestamp /**< */,
- xcb_timestamp_t config_timestamp /**< */,
- int16_t x /**< */,
- int16_t y /**< */,
- xcb_randr_mode_t mode /**< */,
- uint16_t rotation /**< */,
- uint32_t outputs_len /**< */,
- const xcb_randr_output_t *outputs /**< */);
-
-/**
- * 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_randr_set_crtc_config_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_set_crtc_config_reply_t * xcb_randr_set_crtc_config_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_set_crtc_config_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_set_crtc_config_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_set_crtc_config_reply_t *
-xcb_randr_set_crtc_config_reply (xcb_connection_t *c /**< */,
- xcb_randr_set_crtc_config_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_gamma_size_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_size_cookie_t
-xcb_randr_get_crtc_gamma_size (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */);
-
-/**
- *
- * @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_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_gamma_size_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_size_cookie_t
-xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */);
-
-/**
- * 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_randr_get_crtc_gamma_size_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_gamma_size_reply_t * xcb_randr_get_crtc_gamma_size_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_crtc_gamma_size_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_crtc_gamma_size_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_size_reply_t *
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_gamma_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_cookie_t
-xcb_randr_get_crtc_gamma (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */);
-
-/**
- *
- * @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_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_gamma_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_cookie_t
-xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */);
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_randr_get_crtc_gamma_red
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_randr_get_crtc_gamma_red (const xcb_randr_get_crtc_gamma_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_gamma_red_length
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_gamma_red_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_red_end
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_gamma_red_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_randr_get_crtc_gamma_green
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_randr_get_crtc_gamma_green (const xcb_randr_get_crtc_gamma_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_gamma_green_length
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_gamma_green_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_green_end
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_gamma_green_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_randr_get_crtc_gamma_blue
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_randr_get_crtc_gamma_blue (const xcb_randr_get_crtc_gamma_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_gamma_blue_length
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_gamma_blue_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_blue_end
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_gamma_blue_end (const xcb_randr_get_crtc_gamma_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_randr_get_crtc_gamma_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_gamma_reply_t * xcb_randr_get_crtc_gamma_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_crtc_gamma_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_crtc_gamma_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_reply_t *
-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 /**< */);
-
-/**
- *
- * @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_randr_set_crtc_gamma_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param uint16_t size
- ** @param const uint16_t *red
- ** @param const uint16_t *green
- ** @param const uint16_t *blue
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- uint16_t size /**< */,
- const uint16_t *red /**< */,
- const uint16_t *green /**< */,
- const uint16_t *blue /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_crtc_gamma
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param uint16_t size
- ** @param const uint16_t *red
- ** @param const uint16_t *green
- ** @param const uint16_t *blue
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_crtc_gamma (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- uint16_t size /**< */,
- const uint16_t *red /**< */,
- const uint16_t *green /**< */,
- const uint16_t *blue /**< */);
-
-int
-xcb_randr_get_screen_resources_current_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_resources_current_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_current_cookie_t
-xcb_randr_get_screen_resources_current (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_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_resources_current_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_current_cookie_t
-xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_current_crtcs
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_randr_crtc_t *
- **
- *****************************************************************************/
-
-xcb_randr_crtc_t *
-xcb_randr_get_screen_resources_current_crtcs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_current_crtcs_length
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_current_crtcs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_crtcs_end
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_current_crtcs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_output_t * xcb_randr_get_screen_resources_current_outputs
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_screen_resources_current_outputs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_current_outputs_length
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_current_outputs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_outputs_end
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_current_outputs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_current_modes
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_randr_mode_info_t *
- **
- *****************************************************************************/
-
-xcb_randr_mode_info_t *
-xcb_randr_get_screen_resources_current_modes (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_current_modes_length
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_current_modes_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_current_modes_iterator
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_randr_mode_info_iterator_t
- **
- *****************************************************************************/
-
-xcb_randr_mode_info_iterator_t
-xcb_randr_get_screen_resources_current_modes_iterator (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_randr_get_screen_resources_current_names
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_randr_get_screen_resources_current_names (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_current_names_length
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_current_names_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_names_end
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_current_names_end (const xcb_randr_get_screen_resources_current_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_randr_get_screen_resources_current_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_resources_current_reply_t * xcb_randr_get_screen_resources_current_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_screen_resources_current_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_screen_resources_current_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_current_reply_t *
-xcb_randr_get_screen_resources_current_reply (xcb_connection_t *c /**< */,
- 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 /**< */);
-
-/**
- *
- * @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_randr_set_crtc_transform_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_render_transform_t transform
- ** @param uint16_t filter_len
- ** @param const char *filter_name
- ** @param uint32_t filter_params_len
- ** @param const xcb_render_fixed_t *filter_params
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_crtc_transform_checked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_render_transform_t transform /**< */,
- uint16_t filter_len /**< */,
- const char *filter_name /**< */,
- uint32_t filter_params_len /**< */,
- const xcb_render_fixed_t *filter_params /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_crtc_transform
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_render_transform_t transform
- ** @param uint16_t filter_len
- ** @param const char *filter_name
- ** @param uint32_t filter_params_len
- ** @param const xcb_render_fixed_t *filter_params
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_crtc_transform (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_render_transform_t transform /**< */,
- uint16_t filter_len /**< */,
- const char *filter_name /**< */,
- uint32_t filter_params_len /**< */,
- const xcb_render_fixed_t *filter_params /**< */);
-
-int
-xcb_randr_get_crtc_transform_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_transform_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_transform_cookie_t
-xcb_randr_get_crtc_transform (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */);
-
-/**
- *
- * @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_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_transform_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_transform_cookie_t
-xcb_randr_get_crtc_transform_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */);
-
-
-/*****************************************************************************
- **
- ** char * xcb_randr_get_crtc_transform_pending_filter_name
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_randr_get_crtc_transform_pending_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_transform_pending_filter_name_length
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_transform_pending_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_filter_name_end
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_transform_pending_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_pending_params
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_render_fixed_t *
- **
- *****************************************************************************/
-
-xcb_render_fixed_t *
-xcb_randr_get_crtc_transform_pending_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_transform_pending_params_length
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_transform_pending_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_params_end
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_transform_pending_params_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** char * xcb_randr_get_crtc_transform_current_filter_name
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_randr_get_crtc_transform_current_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_transform_current_filter_name_length
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_transform_current_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_filter_name_end
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_transform_current_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_current_params
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_render_fixed_t *
- **
- *****************************************************************************/
-
-xcb_render_fixed_t *
-xcb_randr_get_crtc_transform_current_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_transform_current_params_length
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_transform_current_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_params_end
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_transform_current_params_end (const xcb_randr_get_crtc_transform_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_randr_get_crtc_transform_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_transform_reply_t * xcb_randr_get_crtc_transform_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_crtc_transform_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_crtc_transform_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_transform_reply_t *
-xcb_randr_get_crtc_transform_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_crtc_transform_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_panning_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_panning_cookie_t
-xcb_randr_get_panning (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */);
-
-/**
- *
- * @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_randr_get_panning_cookie_t xcb_randr_get_panning_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_panning_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_panning_cookie_t
-xcb_randr_get_panning_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */);
-
-/**
- * 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_randr_get_panning_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_panning_reply_t * xcb_randr_get_panning_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_panning_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_panning_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_panning_reply_t *
-xcb_randr_get_panning_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_panning_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t timestamp
- ** @param uint16_t left
- ** @param uint16_t top
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint16_t track_left
- ** @param uint16_t track_top
- ** @param uint16_t track_width
- ** @param uint16_t track_height
- ** @param int16_t border_left
- ** @param int16_t border_top
- ** @param int16_t border_right
- ** @param int16_t border_bottom
- ** @returns xcb_randr_set_panning_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_panning_cookie_t
-xcb_randr_set_panning (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t timestamp /**< */,
- uint16_t left /**< */,
- uint16_t top /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint16_t track_left /**< */,
- uint16_t track_top /**< */,
- uint16_t track_width /**< */,
- uint16_t track_height /**< */,
- int16_t border_left /**< */,
- int16_t border_top /**< */,
- int16_t border_right /**< */,
- int16_t border_bottom /**< */);
-
-/**
- *
- * @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_randr_set_panning_cookie_t xcb_randr_set_panning_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t timestamp
- ** @param uint16_t left
- ** @param uint16_t top
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint16_t track_left
- ** @param uint16_t track_top
- ** @param uint16_t track_width
- ** @param uint16_t track_height
- ** @param int16_t border_left
- ** @param int16_t border_top
- ** @param int16_t border_right
- ** @param int16_t border_bottom
- ** @returns xcb_randr_set_panning_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_panning_cookie_t
-xcb_randr_set_panning_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t timestamp /**< */,
- uint16_t left /**< */,
- uint16_t top /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint16_t track_left /**< */,
- uint16_t track_top /**< */,
- uint16_t track_width /**< */,
- uint16_t track_height /**< */,
- int16_t border_left /**< */,
- int16_t border_top /**< */,
- int16_t border_right /**< */,
- int16_t border_bottom /**< */);
-
-/**
- * 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_randr_set_panning_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_set_panning_reply_t * xcb_randr_set_panning_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_set_panning_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_set_panning_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_set_panning_reply_t *
-xcb_randr_set_panning_reply (xcb_connection_t *c /**< */,
- xcb_randr_set_panning_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_randr_set_output_primary_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_randr_output_t output
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_output_primary_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_randr_output_t output /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_output_primary
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_randr_output_t output
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_output_primary (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_randr_output_t output /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_output_primary_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_primary_cookie_t
-xcb_randr_get_output_primary (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_randr_get_output_primary_cookie_t xcb_randr_get_output_primary_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_output_primary_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_primary_cookie_t
-xcb_randr_get_output_primary_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_randr_get_output_primary_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_primary_reply_t * xcb_randr_get_output_primary_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_output_primary_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_output_primary_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_output_primary_reply_t *
-xcb_randr_get_output_primary_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_output_primary_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_crtc_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_randr_crtc_change_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_crtc_change_next
- **
- ** @param xcb_randr_crtc_change_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_crtc_change_next (xcb_randr_crtc_change_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_crtc_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_randr_crtc_change_end
- **
- ** @param xcb_randr_crtc_change_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_crtc_change_end (xcb_randr_crtc_change_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_output_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_randr_output_change_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_output_change_next
- **
- ** @param xcb_randr_output_change_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_output_change_next (xcb_randr_output_change_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_output_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_randr_output_change_end
- **
- ** @param xcb_randr_output_change_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_output_change_end (xcb_randr_output_change_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_output_property_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_randr_output_property_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_output_property_next
- **
- ** @param xcb_randr_output_property_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_output_property_next (xcb_randr_output_property_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_output_property_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_output_property_end
- **
- ** @param xcb_randr_output_property_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_output_property_end (xcb_randr_output_property_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_randr_notify_data_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_randr_notify_data_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_randr_notify_data_next
- **
- ** @param xcb_randr_notify_data_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_notify_data_next (xcb_randr_notify_data_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_randr_notify_data_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_randr_notify_data_end
- **
- ** @param xcb_randr_notify_data_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_notify_data_end (xcb_randr_notify_data_iterator_t i /**< */);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/**
- * @}
- */
diff --git a/src/3rdparty/xcb/include/xcb/render.h b/src/3rdparty/xcb/include/xcb/render.h
deleted file mode 100644
index eb7f0424d5..0000000000
--- a/src/3rdparty/xcb/include/xcb/render.h
+++ /dev/null
@@ -1,4513 +0,0 @@
-/*
- * This file generated automatically from render.xml by c_client.py.
- * Edit at your peril.
- */
-
-/**
- * @defgroup XCB_Render_API XCB Render API
- * @brief Render XCB Protocol Implementation.
- * @{
- **/
-
-#ifndef __RENDER_H
-#define __RENDER_H
-
-#include "xcb.h"
-#include "xproto.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XCB_RENDER_MAJOR_VERSION 0
-#define XCB_RENDER_MINOR_VERSION 11
-
-extern xcb_extension_t xcb_render_id;
-
-typedef enum xcb_render_pict_type_t {
- XCB_RENDER_PICT_TYPE_INDEXED,
- XCB_RENDER_PICT_TYPE_DIRECT
-} xcb_render_pict_type_t;
-
-typedef enum xcb_render_picture_enum_t {
- XCB_RENDER_PICTURE_NONE
-} xcb_render_picture_enum_t;
-
-typedef enum xcb_render_pict_op_t {
- XCB_RENDER_PICT_OP_CLEAR,
- XCB_RENDER_PICT_OP_SRC,
- XCB_RENDER_PICT_OP_DST,
- XCB_RENDER_PICT_OP_OVER,
- XCB_RENDER_PICT_OP_OVER_REVERSE,
- XCB_RENDER_PICT_OP_IN,
- XCB_RENDER_PICT_OP_IN_REVERSE,
- XCB_RENDER_PICT_OP_OUT,
- XCB_RENDER_PICT_OP_OUT_REVERSE,
- XCB_RENDER_PICT_OP_ATOP,
- XCB_RENDER_PICT_OP_ATOP_REVERSE,
- XCB_RENDER_PICT_OP_XOR,
- XCB_RENDER_PICT_OP_ADD,
- XCB_RENDER_PICT_OP_SATURATE,
- XCB_RENDER_PICT_OP_DISJOINT_CLEAR = 16,
- XCB_RENDER_PICT_OP_DISJOINT_SRC,
- XCB_RENDER_PICT_OP_DISJOINT_DST,
- XCB_RENDER_PICT_OP_DISJOINT_OVER,
- XCB_RENDER_PICT_OP_DISJOINT_OVER_REVERSE,
- XCB_RENDER_PICT_OP_DISJOINT_IN,
- XCB_RENDER_PICT_OP_DISJOINT_IN_REVERSE,
- XCB_RENDER_PICT_OP_DISJOINT_OUT,
- XCB_RENDER_PICT_OP_DISJOINT_OUT_REVERSE,
- XCB_RENDER_PICT_OP_DISJOINT_ATOP,
- XCB_RENDER_PICT_OP_DISJOINT_ATOP_REVERSE,
- XCB_RENDER_PICT_OP_DISJOINT_XOR,
- XCB_RENDER_PICT_OP_CONJOINT_CLEAR = 32,
- XCB_RENDER_PICT_OP_CONJOINT_SRC,
- XCB_RENDER_PICT_OP_CONJOINT_DST,
- XCB_RENDER_PICT_OP_CONJOINT_OVER,
- XCB_RENDER_PICT_OP_CONJOINT_OVER_REVERSE,
- XCB_RENDER_PICT_OP_CONJOINT_IN,
- XCB_RENDER_PICT_OP_CONJOINT_IN_REVERSE,
- XCB_RENDER_PICT_OP_CONJOINT_OUT,
- 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_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 {
- XCB_RENDER_POLY_EDGE_SHARP,
- XCB_RENDER_POLY_EDGE_SMOOTH
-} xcb_render_poly_edge_t;
-
-typedef enum xcb_render_poly_mode_t {
- XCB_RENDER_POLY_MODE_PRECISE,
- XCB_RENDER_POLY_MODE_IMPRECISE
-} xcb_render_poly_mode_t;
-
-typedef enum xcb_render_cp_t {
- XCB_RENDER_CP_REPEAT = 1,
- XCB_RENDER_CP_ALPHA_MAP = 2,
- XCB_RENDER_CP_ALPHA_X_ORIGIN = 4,
- XCB_RENDER_CP_ALPHA_Y_ORIGIN = 8,
- XCB_RENDER_CP_CLIP_X_ORIGIN = 16,
- XCB_RENDER_CP_CLIP_Y_ORIGIN = 32,
- XCB_RENDER_CP_CLIP_MASK = 64,
- XCB_RENDER_CP_GRAPHICS_EXPOSURE = 128,
- XCB_RENDER_CP_SUBWINDOW_MODE = 256,
- XCB_RENDER_CP_POLY_EDGE = 512,
- XCB_RENDER_CP_POLY_MODE = 1024,
- XCB_RENDER_CP_DITHER = 2048,
- XCB_RENDER_CP_COMPONENT_ALPHA = 4096
-} xcb_render_cp_t;
-
-typedef enum xcb_render_sub_pixel_t {
- XCB_RENDER_SUB_PIXEL_UNKNOWN,
- XCB_RENDER_SUB_PIXEL_HORIZONTAL_RGB,
- XCB_RENDER_SUB_PIXEL_HORIZONTAL_BGR,
- XCB_RENDER_SUB_PIXEL_VERTICAL_RGB,
- XCB_RENDER_SUB_PIXEL_VERTICAL_BGR,
- XCB_RENDER_SUB_PIXEL_NONE
-} xcb_render_sub_pixel_t;
-
-typedef enum xcb_render_repeat_t {
- XCB_RENDER_REPEAT_NONE,
- XCB_RENDER_REPEAT_NORMAL,
- XCB_RENDER_REPEAT_PAD,
- XCB_RENDER_REPEAT_REFLECT
-} xcb_render_repeat_t;
-
-typedef uint32_t xcb_render_glyph_t;
-
-/**
- * @brief xcb_render_glyph_iterator_t
- **/
-typedef struct xcb_render_glyph_iterator_t {
- xcb_render_glyph_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_glyph_iterator_t;
-
-typedef uint32_t xcb_render_glyphset_t;
-
-/**
- * @brief xcb_render_glyphset_iterator_t
- **/
-typedef struct xcb_render_glyphset_iterator_t {
- xcb_render_glyphset_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_glyphset_iterator_t;
-
-typedef uint32_t xcb_render_picture_t;
-
-/**
- * @brief xcb_render_picture_iterator_t
- **/
-typedef struct xcb_render_picture_iterator_t {
- xcb_render_picture_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_picture_iterator_t;
-
-typedef uint32_t xcb_render_pictformat_t;
-
-/**
- * @brief xcb_render_pictformat_iterator_t
- **/
-typedef struct xcb_render_pictformat_iterator_t {
- xcb_render_pictformat_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_pictformat_iterator_t;
-
-typedef int32_t xcb_render_fixed_t;
-
-/**
- * @brief xcb_render_fixed_iterator_t
- **/
-typedef struct xcb_render_fixed_iterator_t {
- xcb_render_fixed_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_fixed_iterator_t;
-
-/** Opcode for xcb_render_pict_format. */
-#define XCB_RENDER_PICT_FORMAT 0
-
-/**
- * @brief xcb_render_pict_format_error_t
- **/
-typedef struct xcb_render_pict_format_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
-} xcb_render_pict_format_error_t;
-
-/** Opcode for xcb_render_picture. */
-#define XCB_RENDER_PICTURE 1
-
-/**
- * @brief xcb_render_picture_error_t
- **/
-typedef struct xcb_render_picture_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
-} xcb_render_picture_error_t;
-
-/** Opcode for xcb_render_pict_op. */
-#define XCB_RENDER_PICT_OP 2
-
-/**
- * @brief xcb_render_pict_op_error_t
- **/
-typedef struct xcb_render_pict_op_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
-} xcb_render_pict_op_error_t;
-
-/** Opcode for xcb_render_glyph_set. */
-#define XCB_RENDER_GLYPH_SET 3
-
-/**
- * @brief xcb_render_glyph_set_error_t
- **/
-typedef struct xcb_render_glyph_set_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
-} xcb_render_glyph_set_error_t;
-
-/** Opcode for xcb_render_glyph. */
-#define XCB_RENDER_GLYPH 4
-
-/**
- * @brief xcb_render_glyph_error_t
- **/
-typedef struct xcb_render_glyph_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
-} xcb_render_glyph_error_t;
-
-/**
- * @brief xcb_render_directformat_t
- **/
-typedef struct xcb_render_directformat_t {
- uint16_t red_shift; /**< */
- uint16_t red_mask; /**< */
- uint16_t green_shift; /**< */
- uint16_t green_mask; /**< */
- uint16_t blue_shift; /**< */
- uint16_t blue_mask; /**< */
- uint16_t alpha_shift; /**< */
- uint16_t alpha_mask; /**< */
-} xcb_render_directformat_t;
-
-/**
- * @brief xcb_render_directformat_iterator_t
- **/
-typedef struct xcb_render_directformat_iterator_t {
- xcb_render_directformat_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_directformat_iterator_t;
-
-/**
- * @brief xcb_render_pictforminfo_t
- **/
-typedef struct xcb_render_pictforminfo_t {
- xcb_render_pictformat_t id; /**< */
- uint8_t type; /**< */
- uint8_t depth; /**< */
- uint8_t pad0[2]; /**< */
- xcb_render_directformat_t direct; /**< */
- xcb_colormap_t colormap; /**< */
-} xcb_render_pictforminfo_t;
-
-/**
- * @brief xcb_render_pictforminfo_iterator_t
- **/
-typedef struct xcb_render_pictforminfo_iterator_t {
- xcb_render_pictforminfo_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_pictforminfo_iterator_t;
-
-/**
- * @brief xcb_render_pictvisual_t
- **/
-typedef struct xcb_render_pictvisual_t {
- xcb_visualid_t visual; /**< */
- xcb_render_pictformat_t format; /**< */
-} xcb_render_pictvisual_t;
-
-/**
- * @brief xcb_render_pictvisual_iterator_t
- **/
-typedef struct xcb_render_pictvisual_iterator_t {
- xcb_render_pictvisual_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_pictvisual_iterator_t;
-
-/**
- * @brief xcb_render_pictdepth_t
- **/
-typedef struct xcb_render_pictdepth_t {
- uint8_t depth; /**< */
- uint8_t pad0; /**< */
- uint16_t num_visuals; /**< */
- uint8_t pad1[4]; /**< */
-} xcb_render_pictdepth_t;
-
-/**
- * @brief xcb_render_pictdepth_iterator_t
- **/
-typedef struct xcb_render_pictdepth_iterator_t {
- xcb_render_pictdepth_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_pictdepth_iterator_t;
-
-/**
- * @brief xcb_render_pictscreen_t
- **/
-typedef struct xcb_render_pictscreen_t {
- uint32_t num_depths; /**< */
- xcb_render_pictformat_t fallback; /**< */
-} xcb_render_pictscreen_t;
-
-/**
- * @brief xcb_render_pictscreen_iterator_t
- **/
-typedef struct xcb_render_pictscreen_iterator_t {
- xcb_render_pictscreen_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_pictscreen_iterator_t;
-
-/**
- * @brief xcb_render_indexvalue_t
- **/
-typedef struct xcb_render_indexvalue_t {
- uint32_t pixel; /**< */
- uint16_t red; /**< */
- uint16_t green; /**< */
- uint16_t blue; /**< */
- uint16_t alpha; /**< */
-} xcb_render_indexvalue_t;
-
-/**
- * @brief xcb_render_indexvalue_iterator_t
- **/
-typedef struct xcb_render_indexvalue_iterator_t {
- xcb_render_indexvalue_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_indexvalue_iterator_t;
-
-/**
- * @brief xcb_render_color_t
- **/
-typedef struct xcb_render_color_t {
- uint16_t red; /**< */
- uint16_t green; /**< */
- uint16_t blue; /**< */
- uint16_t alpha; /**< */
-} xcb_render_color_t;
-
-/**
- * @brief xcb_render_color_iterator_t
- **/
-typedef struct xcb_render_color_iterator_t {
- xcb_render_color_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_color_iterator_t;
-
-/**
- * @brief xcb_render_pointfix_t
- **/
-typedef struct xcb_render_pointfix_t {
- xcb_render_fixed_t x; /**< */
- xcb_render_fixed_t y; /**< */
-} xcb_render_pointfix_t;
-
-/**
- * @brief xcb_render_pointfix_iterator_t
- **/
-typedef struct xcb_render_pointfix_iterator_t {
- xcb_render_pointfix_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_pointfix_iterator_t;
-
-/**
- * @brief xcb_render_linefix_t
- **/
-typedef struct xcb_render_linefix_t {
- xcb_render_pointfix_t p1; /**< */
- xcb_render_pointfix_t p2; /**< */
-} xcb_render_linefix_t;
-
-/**
- * @brief xcb_render_linefix_iterator_t
- **/
-typedef struct xcb_render_linefix_iterator_t {
- xcb_render_linefix_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_linefix_iterator_t;
-
-/**
- * @brief xcb_render_triangle_t
- **/
-typedef struct xcb_render_triangle_t {
- xcb_render_pointfix_t p1; /**< */
- xcb_render_pointfix_t p2; /**< */
- xcb_render_pointfix_t p3; /**< */
-} xcb_render_triangle_t;
-
-/**
- * @brief xcb_render_triangle_iterator_t
- **/
-typedef struct xcb_render_triangle_iterator_t {
- xcb_render_triangle_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_triangle_iterator_t;
-
-/**
- * @brief xcb_render_trapezoid_t
- **/
-typedef struct xcb_render_trapezoid_t {
- xcb_render_fixed_t top; /**< */
- xcb_render_fixed_t bottom; /**< */
- xcb_render_linefix_t left; /**< */
- xcb_render_linefix_t right; /**< */
-} xcb_render_trapezoid_t;
-
-/**
- * @brief xcb_render_trapezoid_iterator_t
- **/
-typedef struct xcb_render_trapezoid_iterator_t {
- xcb_render_trapezoid_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_trapezoid_iterator_t;
-
-/**
- * @brief xcb_render_glyphinfo_t
- **/
-typedef struct xcb_render_glyphinfo_t {
- uint16_t width; /**< */
- uint16_t height; /**< */
- int16_t x; /**< */
- int16_t y; /**< */
- int16_t x_off; /**< */
- int16_t y_off; /**< */
-} xcb_render_glyphinfo_t;
-
-/**
- * @brief xcb_render_glyphinfo_iterator_t
- **/
-typedef struct xcb_render_glyphinfo_iterator_t {
- xcb_render_glyphinfo_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_glyphinfo_iterator_t;
-
-/**
- * @brief xcb_render_query_version_cookie_t
- **/
-typedef struct xcb_render_query_version_cookie_t {
- unsigned int sequence; /**< */
-} xcb_render_query_version_cookie_t;
-
-/** Opcode for xcb_render_query_version. */
-#define XCB_RENDER_QUERY_VERSION 0
-
-/**
- * @brief xcb_render_query_version_request_t
- **/
-typedef struct xcb_render_query_version_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint32_t client_major_version; /**< */
- uint32_t client_minor_version; /**< */
-} xcb_render_query_version_request_t;
-
-/**
- * @brief xcb_render_query_version_reply_t
- **/
-typedef struct xcb_render_query_version_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t major_version; /**< */
- uint32_t minor_version; /**< */
- uint8_t pad1[16]; /**< */
-} xcb_render_query_version_reply_t;
-
-/**
- * @brief xcb_render_query_pict_formats_cookie_t
- **/
-typedef struct xcb_render_query_pict_formats_cookie_t {
- unsigned int sequence; /**< */
-} xcb_render_query_pict_formats_cookie_t;
-
-/** Opcode for xcb_render_query_pict_formats. */
-#define XCB_RENDER_QUERY_PICT_FORMATS 1
-
-/**
- * @brief xcb_render_query_pict_formats_request_t
- **/
-typedef struct xcb_render_query_pict_formats_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
-} xcb_render_query_pict_formats_request_t;
-
-/**
- * @brief xcb_render_query_pict_formats_reply_t
- **/
-typedef struct xcb_render_query_pict_formats_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t num_formats; /**< */
- uint32_t num_screens; /**< */
- uint32_t num_depths; /**< */
- uint32_t num_visuals; /**< */
- uint32_t num_subpixel; /**< */
- uint8_t pad1[4]; /**< */
-} xcb_render_query_pict_formats_reply_t;
-
-/**
- * @brief xcb_render_query_pict_index_values_cookie_t
- **/
-typedef struct xcb_render_query_pict_index_values_cookie_t {
- unsigned int sequence; /**< */
-} xcb_render_query_pict_index_values_cookie_t;
-
-/** Opcode for xcb_render_query_pict_index_values. */
-#define XCB_RENDER_QUERY_PICT_INDEX_VALUES 2
-
-/**
- * @brief xcb_render_query_pict_index_values_request_t
- **/
-typedef struct xcb_render_query_pict_index_values_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_pictformat_t format; /**< */
-} xcb_render_query_pict_index_values_request_t;
-
-/**
- * @brief xcb_render_query_pict_index_values_reply_t
- **/
-typedef struct xcb_render_query_pict_index_values_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t num_values; /**< */
- uint8_t pad1[20]; /**< */
-} xcb_render_query_pict_index_values_reply_t;
-
-/** Opcode for xcb_render_create_picture. */
-#define XCB_RENDER_CREATE_PICTURE 4
-
-/**
- * @brief xcb_render_create_picture_request_t
- **/
-typedef struct xcb_render_create_picture_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t pid; /**< */
- xcb_drawable_t drawable; /**< */
- xcb_render_pictformat_t format; /**< */
- uint32_t value_mask; /**< */
-} xcb_render_create_picture_request_t;
-
-/** Opcode for xcb_render_change_picture. */
-#define XCB_RENDER_CHANGE_PICTURE 5
-
-/**
- * @brief xcb_render_change_picture_request_t
- **/
-typedef struct xcb_render_change_picture_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- uint32_t value_mask; /**< */
-} xcb_render_change_picture_request_t;
-
-/** Opcode for xcb_render_set_picture_clip_rectangles. */
-#define XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES 6
-
-/**
- * @brief xcb_render_set_picture_clip_rectangles_request_t
- **/
-typedef struct xcb_render_set_picture_clip_rectangles_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- int16_t clip_x_origin; /**< */
- int16_t clip_y_origin; /**< */
-} xcb_render_set_picture_clip_rectangles_request_t;
-
-/** Opcode for xcb_render_free_picture. */
-#define XCB_RENDER_FREE_PICTURE 7
-
-/**
- * @brief xcb_render_free_picture_request_t
- **/
-typedef struct xcb_render_free_picture_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
-} xcb_render_free_picture_request_t;
-
-/** Opcode for xcb_render_composite. */
-#define XCB_RENDER_COMPOSITE 8
-
-/**
- * @brief xcb_render_composite_request_t
- **/
-typedef struct xcb_render_composite_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t op; /**< */
- uint8_t pad0[3]; /**< */
- xcb_render_picture_t src; /**< */
- xcb_render_picture_t mask; /**< */
- xcb_render_picture_t dst; /**< */
- int16_t src_x; /**< */
- int16_t src_y; /**< */
- int16_t mask_x; /**< */
- int16_t mask_y; /**< */
- int16_t dst_x; /**< */
- int16_t dst_y; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
-} xcb_render_composite_request_t;
-
-/** Opcode for xcb_render_trapezoids. */
-#define XCB_RENDER_TRAPEZOIDS 10
-
-/**
- * @brief xcb_render_trapezoids_request_t
- **/
-typedef struct xcb_render_trapezoids_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t op; /**< */
- uint8_t pad0[3]; /**< */
- xcb_render_picture_t src; /**< */
- xcb_render_picture_t dst; /**< */
- xcb_render_pictformat_t mask_format; /**< */
- int16_t src_x; /**< */
- int16_t src_y; /**< */
-} xcb_render_trapezoids_request_t;
-
-/** Opcode for xcb_render_triangles. */
-#define XCB_RENDER_TRIANGLES 11
-
-/**
- * @brief xcb_render_triangles_request_t
- **/
-typedef struct xcb_render_triangles_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t op; /**< */
- uint8_t pad0[3]; /**< */
- xcb_render_picture_t src; /**< */
- xcb_render_picture_t dst; /**< */
- xcb_render_pictformat_t mask_format; /**< */
- int16_t src_x; /**< */
- int16_t src_y; /**< */
-} xcb_render_triangles_request_t;
-
-/** Opcode for xcb_render_tri_strip. */
-#define XCB_RENDER_TRI_STRIP 12
-
-/**
- * @brief xcb_render_tri_strip_request_t
- **/
-typedef struct xcb_render_tri_strip_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t op; /**< */
- uint8_t pad0[3]; /**< */
- xcb_render_picture_t src; /**< */
- xcb_render_picture_t dst; /**< */
- xcb_render_pictformat_t mask_format; /**< */
- int16_t src_x; /**< */
- int16_t src_y; /**< */
-} xcb_render_tri_strip_request_t;
-
-/** Opcode for xcb_render_tri_fan. */
-#define XCB_RENDER_TRI_FAN 13
-
-/**
- * @brief xcb_render_tri_fan_request_t
- **/
-typedef struct xcb_render_tri_fan_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t op; /**< */
- uint8_t pad0[3]; /**< */
- xcb_render_picture_t src; /**< */
- xcb_render_picture_t dst; /**< */
- xcb_render_pictformat_t mask_format; /**< */
- int16_t src_x; /**< */
- int16_t src_y; /**< */
-} xcb_render_tri_fan_request_t;
-
-/** Opcode for xcb_render_create_glyph_set. */
-#define XCB_RENDER_CREATE_GLYPH_SET 17
-
-/**
- * @brief xcb_render_create_glyph_set_request_t
- **/
-typedef struct xcb_render_create_glyph_set_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_glyphset_t gsid; /**< */
- xcb_render_pictformat_t format; /**< */
-} xcb_render_create_glyph_set_request_t;
-
-/** Opcode for xcb_render_reference_glyph_set. */
-#define XCB_RENDER_REFERENCE_GLYPH_SET 18
-
-/**
- * @brief xcb_render_reference_glyph_set_request_t
- **/
-typedef struct xcb_render_reference_glyph_set_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_glyphset_t gsid; /**< */
- xcb_render_glyphset_t existing; /**< */
-} xcb_render_reference_glyph_set_request_t;
-
-/** Opcode for xcb_render_free_glyph_set. */
-#define XCB_RENDER_FREE_GLYPH_SET 19
-
-/**
- * @brief xcb_render_free_glyph_set_request_t
- **/
-typedef struct xcb_render_free_glyph_set_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_glyphset_t glyphset; /**< */
-} xcb_render_free_glyph_set_request_t;
-
-/** Opcode for xcb_render_add_glyphs. */
-#define XCB_RENDER_ADD_GLYPHS 20
-
-/**
- * @brief xcb_render_add_glyphs_request_t
- **/
-typedef struct xcb_render_add_glyphs_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_glyphset_t glyphset; /**< */
- uint32_t glyphs_len; /**< */
-} xcb_render_add_glyphs_request_t;
-
-/** Opcode for xcb_render_free_glyphs. */
-#define XCB_RENDER_FREE_GLYPHS 22
-
-/**
- * @brief xcb_render_free_glyphs_request_t
- **/
-typedef struct xcb_render_free_glyphs_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_glyphset_t glyphset; /**< */
-} xcb_render_free_glyphs_request_t;
-
-/** Opcode for xcb_render_composite_glyphs_8. */
-#define XCB_RENDER_COMPOSITE_GLYPHS_8 23
-
-/**
- * @brief xcb_render_composite_glyphs_8_request_t
- **/
-typedef struct xcb_render_composite_glyphs_8_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t op; /**< */
- uint8_t pad0[3]; /**< */
- xcb_render_picture_t src; /**< */
- xcb_render_picture_t dst; /**< */
- xcb_render_pictformat_t mask_format; /**< */
- xcb_render_glyphset_t glyphset; /**< */
- int16_t src_x; /**< */
- int16_t src_y; /**< */
-} xcb_render_composite_glyphs_8_request_t;
-
-/** Opcode for xcb_render_composite_glyphs_16. */
-#define XCB_RENDER_COMPOSITE_GLYPHS_16 24
-
-/**
- * @brief xcb_render_composite_glyphs_16_request_t
- **/
-typedef struct xcb_render_composite_glyphs_16_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t op; /**< */
- uint8_t pad0[3]; /**< */
- xcb_render_picture_t src; /**< */
- xcb_render_picture_t dst; /**< */
- xcb_render_pictformat_t mask_format; /**< */
- xcb_render_glyphset_t glyphset; /**< */
- int16_t src_x; /**< */
- int16_t src_y; /**< */
-} xcb_render_composite_glyphs_16_request_t;
-
-/** Opcode for xcb_render_composite_glyphs_32. */
-#define XCB_RENDER_COMPOSITE_GLYPHS_32 25
-
-/**
- * @brief xcb_render_composite_glyphs_32_request_t
- **/
-typedef struct xcb_render_composite_glyphs_32_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t op; /**< */
- uint8_t pad0[3]; /**< */
- xcb_render_picture_t src; /**< */
- xcb_render_picture_t dst; /**< */
- xcb_render_pictformat_t mask_format; /**< */
- xcb_render_glyphset_t glyphset; /**< */
- int16_t src_x; /**< */
- int16_t src_y; /**< */
-} xcb_render_composite_glyphs_32_request_t;
-
-/** Opcode for xcb_render_fill_rectangles. */
-#define XCB_RENDER_FILL_RECTANGLES 26
-
-/**
- * @brief xcb_render_fill_rectangles_request_t
- **/
-typedef struct xcb_render_fill_rectangles_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t op; /**< */
- uint8_t pad0[3]; /**< */
- xcb_render_picture_t dst; /**< */
- xcb_render_color_t color; /**< */
-} xcb_render_fill_rectangles_request_t;
-
-/** Opcode for xcb_render_create_cursor. */
-#define XCB_RENDER_CREATE_CURSOR 27
-
-/**
- * @brief xcb_render_create_cursor_request_t
- **/
-typedef struct xcb_render_create_cursor_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_cursor_t cid; /**< */
- xcb_render_picture_t source; /**< */
- uint16_t x; /**< */
- uint16_t y; /**< */
-} xcb_render_create_cursor_request_t;
-
-/**
- * @brief xcb_render_transform_t
- **/
-typedef struct xcb_render_transform_t {
- xcb_render_fixed_t matrix11; /**< */
- xcb_render_fixed_t matrix12; /**< */
- xcb_render_fixed_t matrix13; /**< */
- xcb_render_fixed_t matrix21; /**< */
- xcb_render_fixed_t matrix22; /**< */
- xcb_render_fixed_t matrix23; /**< */
- xcb_render_fixed_t matrix31; /**< */
- xcb_render_fixed_t matrix32; /**< */
- xcb_render_fixed_t matrix33; /**< */
-} xcb_render_transform_t;
-
-/**
- * @brief xcb_render_transform_iterator_t
- **/
-typedef struct xcb_render_transform_iterator_t {
- xcb_render_transform_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_transform_iterator_t;
-
-/** Opcode for xcb_render_set_picture_transform. */
-#define XCB_RENDER_SET_PICTURE_TRANSFORM 28
-
-/**
- * @brief xcb_render_set_picture_transform_request_t
- **/
-typedef struct xcb_render_set_picture_transform_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- xcb_render_transform_t transform; /**< */
-} xcb_render_set_picture_transform_request_t;
-
-/**
- * @brief xcb_render_query_filters_cookie_t
- **/
-typedef struct xcb_render_query_filters_cookie_t {
- unsigned int sequence; /**< */
-} xcb_render_query_filters_cookie_t;
-
-/** Opcode for xcb_render_query_filters. */
-#define XCB_RENDER_QUERY_FILTERS 29
-
-/**
- * @brief xcb_render_query_filters_request_t
- **/
-typedef struct xcb_render_query_filters_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_drawable_t drawable; /**< */
-} xcb_render_query_filters_request_t;
-
-/**
- * @brief xcb_render_query_filters_reply_t
- **/
-typedef struct xcb_render_query_filters_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t num_aliases; /**< */
- uint32_t num_filters; /**< */
- uint8_t pad1[16]; /**< */
-} xcb_render_query_filters_reply_t;
-
-/** Opcode for xcb_render_set_picture_filter. */
-#define XCB_RENDER_SET_PICTURE_FILTER 30
-
-/**
- * @brief xcb_render_set_picture_filter_request_t
- **/
-typedef struct xcb_render_set_picture_filter_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- uint16_t filter_len; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_render_set_picture_filter_request_t;
-
-/**
- * @brief xcb_render_animcursorelt_t
- **/
-typedef struct xcb_render_animcursorelt_t {
- xcb_cursor_t cursor; /**< */
- uint32_t delay; /**< */
-} xcb_render_animcursorelt_t;
-
-/**
- * @brief xcb_render_animcursorelt_iterator_t
- **/
-typedef struct xcb_render_animcursorelt_iterator_t {
- xcb_render_animcursorelt_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_animcursorelt_iterator_t;
-
-/** Opcode for xcb_render_create_anim_cursor. */
-#define XCB_RENDER_CREATE_ANIM_CURSOR 31
-
-/**
- * @brief xcb_render_create_anim_cursor_request_t
- **/
-typedef struct xcb_render_create_anim_cursor_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_cursor_t cid; /**< */
-} xcb_render_create_anim_cursor_request_t;
-
-/**
- * @brief xcb_render_spanfix_t
- **/
-typedef struct xcb_render_spanfix_t {
- xcb_render_fixed_t l; /**< */
- xcb_render_fixed_t r; /**< */
- xcb_render_fixed_t y; /**< */
-} xcb_render_spanfix_t;
-
-/**
- * @brief xcb_render_spanfix_iterator_t
- **/
-typedef struct xcb_render_spanfix_iterator_t {
- xcb_render_spanfix_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_spanfix_iterator_t;
-
-/**
- * @brief xcb_render_trap_t
- **/
-typedef struct xcb_render_trap_t {
- xcb_render_spanfix_t top; /**< */
- xcb_render_spanfix_t bot; /**< */
-} xcb_render_trap_t;
-
-/**
- * @brief xcb_render_trap_iterator_t
- **/
-typedef struct xcb_render_trap_iterator_t {
- xcb_render_trap_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_render_trap_iterator_t;
-
-/** Opcode for xcb_render_add_traps. */
-#define XCB_RENDER_ADD_TRAPS 32
-
-/**
- * @brief xcb_render_add_traps_request_t
- **/
-typedef struct xcb_render_add_traps_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- int16_t x_off; /**< */
- int16_t y_off; /**< */
-} xcb_render_add_traps_request_t;
-
-/** Opcode for xcb_render_create_solid_fill. */
-#define XCB_RENDER_CREATE_SOLID_FILL 33
-
-/**
- * @brief xcb_render_create_solid_fill_request_t
- **/
-typedef struct xcb_render_create_solid_fill_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- xcb_render_color_t color; /**< */
-} xcb_render_create_solid_fill_request_t;
-
-/** Opcode for xcb_render_create_linear_gradient. */
-#define XCB_RENDER_CREATE_LINEAR_GRADIENT 34
-
-/**
- * @brief xcb_render_create_linear_gradient_request_t
- **/
-typedef struct xcb_render_create_linear_gradient_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- xcb_render_pointfix_t p1; /**< */
- xcb_render_pointfix_t p2; /**< */
- uint32_t num_stops; /**< */
-} xcb_render_create_linear_gradient_request_t;
-
-/** Opcode for xcb_render_create_radial_gradient. */
-#define XCB_RENDER_CREATE_RADIAL_GRADIENT 35
-
-/**
- * @brief xcb_render_create_radial_gradient_request_t
- **/
-typedef struct xcb_render_create_radial_gradient_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- xcb_render_pointfix_t inner; /**< */
- xcb_render_pointfix_t outer; /**< */
- xcb_render_fixed_t inner_radius; /**< */
- xcb_render_fixed_t outer_radius; /**< */
- uint32_t num_stops; /**< */
-} xcb_render_create_radial_gradient_request_t;
-
-/** Opcode for xcb_render_create_conical_gradient. */
-#define XCB_RENDER_CREATE_CONICAL_GRADIENT 36
-
-/**
- * @brief xcb_render_create_conical_gradient_request_t
- **/
-typedef struct xcb_render_create_conical_gradient_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- xcb_render_pointfix_t center; /**< */
- xcb_render_fixed_t angle; /**< */
- uint32_t num_stops; /**< */
-} xcb_render_create_conical_gradient_request_t;
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_glyph_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_render_glyph_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_glyph_next
- **
- ** @param xcb_render_glyph_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_glyph_next (xcb_render_glyph_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_glyph_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_render_glyph_end
- **
- ** @param xcb_render_glyph_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_glyph_end (xcb_render_glyph_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_glyphset_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_render_glyphset_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_glyphset_next
- **
- ** @param xcb_render_glyphset_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_glyphset_next (xcb_render_glyphset_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_glyphset_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_render_glyphset_end
- **
- ** @param xcb_render_glyphset_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_glyphset_end (xcb_render_glyphset_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_picture_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_render_picture_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_picture_next
- **
- ** @param xcb_render_picture_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_picture_next (xcb_render_picture_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_picture_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_render_picture_end
- **
- ** @param xcb_render_picture_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_picture_end (xcb_render_picture_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_pictformat_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_render_pictformat_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_pictformat_next
- **
- ** @param xcb_render_pictformat_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictformat_next (xcb_render_pictformat_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_pictformat_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_render_pictformat_end
- **
- ** @param xcb_render_pictformat_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictformat_end (xcb_render_pictformat_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_fixed_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_render_fixed_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_fixed_next
- **
- ** @param xcb_render_fixed_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_fixed_next (xcb_render_fixed_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_fixed_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_render_fixed_end
- **
- ** @param xcb_render_fixed_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_fixed_end (xcb_render_fixed_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_directformat_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_render_directformat_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_directformat_next
- **
- ** @param xcb_render_directformat_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_directformat_next (xcb_render_directformat_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_directformat_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_render_directformat_end
- **
- ** @param xcb_render_directformat_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_directformat_end (xcb_render_directformat_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_pictforminfo_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_render_pictforminfo_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_pictforminfo_next
- **
- ** @param xcb_render_pictforminfo_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictforminfo_next (xcb_render_pictforminfo_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_pictforminfo_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_render_pictforminfo_end
- **
- ** @param xcb_render_pictforminfo_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictforminfo_end (xcb_render_pictforminfo_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_pictvisual_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_render_pictvisual_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_pictvisual_next
- **
- ** @param xcb_render_pictvisual_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_pictvisual_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_render_pictvisual_end
- **
- ** @param xcb_render_pictvisual_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i /**< */);
-
-int
-xcb_render_pictdepth_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictvisual_t * xcb_render_pictdepth_visuals
- **
- ** @param const xcb_render_pictdepth_t *R
- ** @returns xcb_render_pictvisual_t *
- **
- *****************************************************************************/
-
-xcb_render_pictvisual_t *
-xcb_render_pictdepth_visuals (const xcb_render_pictdepth_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_render_pictdepth_visuals_length
- **
- ** @param const xcb_render_pictdepth_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_pictdepth_visuals_length (const xcb_render_pictdepth_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictvisual_iterator_t xcb_render_pictdepth_visuals_iterator
- **
- ** @param const xcb_render_pictdepth_t *R
- ** @returns xcb_render_pictvisual_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_pictvisual_iterator_t
-xcb_render_pictdepth_visuals_iterator (const xcb_render_pictdepth_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_pictdepth_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_render_pictdepth_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_pictdepth_next
- **
- ** @param xcb_render_pictdepth_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_pictdepth_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_render_pictdepth_end
- **
- ** @param xcb_render_pictdepth_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */);
-
-int
-xcb_render_pictscreen_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_render_pictscreen_depths_length
- **
- ** @param const xcb_render_pictscreen_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_pictscreen_depths_length (const xcb_render_pictscreen_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictdepth_iterator_t xcb_render_pictscreen_depths_iterator
- **
- ** @param const xcb_render_pictscreen_t *R
- ** @returns xcb_render_pictdepth_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_pictdepth_iterator_t
-xcb_render_pictscreen_depths_iterator (const xcb_render_pictscreen_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_pictscreen_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_render_pictscreen_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_pictscreen_next
- **
- ** @param xcb_render_pictscreen_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_pictscreen_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_render_pictscreen_end
- **
- ** @param xcb_render_pictscreen_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictscreen_end (xcb_render_pictscreen_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_indexvalue_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_render_indexvalue_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_indexvalue_next
- **
- ** @param xcb_render_indexvalue_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_indexvalue_next (xcb_render_indexvalue_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_indexvalue_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_render_indexvalue_end
- **
- ** @param xcb_render_indexvalue_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_indexvalue_end (xcb_render_indexvalue_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_color_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_render_color_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_color_next
- **
- ** @param xcb_render_color_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_color_next (xcb_render_color_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_color_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_render_color_end
- **
- ** @param xcb_render_color_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_color_end (xcb_render_color_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_pointfix_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_render_pointfix_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_pointfix_next
- **
- ** @param xcb_render_pointfix_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pointfix_next (xcb_render_pointfix_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_pointfix_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_render_pointfix_end
- **
- ** @param xcb_render_pointfix_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pointfix_end (xcb_render_pointfix_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_linefix_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_render_linefix_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_linefix_next
- **
- ** @param xcb_render_linefix_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_linefix_next (xcb_render_linefix_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_linefix_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_render_linefix_end
- **
- ** @param xcb_render_linefix_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_linefix_end (xcb_render_linefix_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_triangle_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_render_triangle_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_triangle_next
- **
- ** @param xcb_render_triangle_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_triangle_next (xcb_render_triangle_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_triangle_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_render_triangle_end
- **
- ** @param xcb_render_triangle_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_triangle_end (xcb_render_triangle_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_trapezoid_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_render_trapezoid_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_trapezoid_next
- **
- ** @param xcb_render_trapezoid_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_trapezoid_next (xcb_render_trapezoid_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_trapezoid_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_render_trapezoid_end
- **
- ** @param xcb_render_trapezoid_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_trapezoid_end (xcb_render_trapezoid_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_glyphinfo_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_render_glyphinfo_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_glyphinfo_next
- **
- ** @param xcb_render_glyphinfo_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_glyphinfo_next (xcb_render_glyphinfo_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_glyphinfo_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_render_glyphinfo_end
- **
- ** @param xcb_render_glyphinfo_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_glyphinfo_end (xcb_render_glyphinfo_iterator_t i /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_render_query_version_cookie_t xcb_render_query_version
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t client_major_version
- ** @param uint32_t client_minor_version
- ** @returns xcb_render_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_version_cookie_t
-xcb_render_query_version (xcb_connection_t *c /**< */,
- uint32_t client_major_version /**< */,
- uint32_t client_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_render_query_version_cookie_t xcb_render_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t client_major_version
- ** @param uint32_t client_minor_version
- ** @returns xcb_render_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_version_cookie_t
-xcb_render_query_version_unchecked (xcb_connection_t *c /**< */,
- uint32_t client_major_version /**< */,
- uint32_t client_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_render_query_version_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_render_query_version_reply_t * xcb_render_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_render_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_render_query_version_reply_t *
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_render_query_pict_formats_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_pict_formats_cookie_t
-xcb_render_query_pict_formats (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_render_query_pict_formats_cookie_t xcb_render_query_pict_formats_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_render_query_pict_formats_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_pict_formats_cookie_t
-xcb_render_query_pict_formats_unchecked (xcb_connection_t *c /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictforminfo_t * xcb_render_query_pict_formats_formats
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns xcb_render_pictforminfo_t *
- **
- *****************************************************************************/
-
-xcb_render_pictforminfo_t *
-xcb_render_query_pict_formats_formats (const xcb_render_query_pict_formats_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_pict_formats_formats_length
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_pict_formats_formats_length (const xcb_render_query_pict_formats_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictforminfo_iterator_t xcb_render_query_pict_formats_formats_iterator
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns xcb_render_pictforminfo_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_pictforminfo_iterator_t
-xcb_render_query_pict_formats_formats_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_pict_formats_screens_length
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_pict_formats_screens_length (const xcb_render_query_pict_formats_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictscreen_iterator_t xcb_render_query_pict_formats_screens_iterator
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns xcb_render_pictscreen_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_pictscreen_iterator_t
-xcb_render_query_pict_formats_screens_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** uint32_t * xcb_render_query_pict_formats_subpixels
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns uint32_t *
- **
- *****************************************************************************/
-
-uint32_t *
-xcb_render_query_pict_formats_subpixels (const xcb_render_query_pict_formats_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_pict_formats_subpixels_length
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_pict_formats_subpixels_length (const xcb_render_query_pict_formats_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_query_pict_formats_subpixels_end
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_query_pict_formats_subpixels_end (const xcb_render_query_pict_formats_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_render_query_pict_formats_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_render_query_pict_formats_reply_t * xcb_render_query_pict_formats_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_query_pict_formats_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_render_query_pict_formats_reply_t *
- **
- *****************************************************************************/
-
-xcb_render_query_pict_formats_reply_t *
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_pictformat_t format
- ** @returns xcb_render_query_pict_index_values_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_pict_index_values_cookie_t
-xcb_render_query_pict_index_values (xcb_connection_t *c /**< */,
- xcb_render_pictformat_t format /**< */);
-
-/**
- *
- * @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_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_pictformat_t format
- ** @returns xcb_render_query_pict_index_values_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_pict_index_values_cookie_t
-xcb_render_query_pict_index_values_unchecked (xcb_connection_t *c /**< */,
- xcb_render_pictformat_t format /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_indexvalue_t * xcb_render_query_pict_index_values_values
- **
- ** @param const xcb_render_query_pict_index_values_reply_t *R
- ** @returns xcb_render_indexvalue_t *
- **
- *****************************************************************************/
-
-xcb_render_indexvalue_t *
-xcb_render_query_pict_index_values_values (const xcb_render_query_pict_index_values_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_pict_index_values_values_length
- **
- ** @param const xcb_render_query_pict_index_values_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_pict_index_values_values_length (const xcb_render_query_pict_index_values_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_render_indexvalue_iterator_t xcb_render_query_pict_index_values_values_iterator
- **
- ** @param const xcb_render_query_pict_index_values_reply_t *R
- ** @returns xcb_render_indexvalue_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_indexvalue_iterator_t
-xcb_render_query_pict_index_values_values_iterator (const xcb_render_query_pict_index_values_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_render_query_pict_index_values_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_render_query_pict_index_values_reply_t * xcb_render_query_pict_index_values_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_query_pict_index_values_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_render_query_pict_index_values_reply_t *
- **
- *****************************************************************************/
-
-xcb_render_query_pict_index_values_reply_t *
-xcb_render_query_pict_index_values_reply (xcb_connection_t *c /**< */,
- xcb_render_query_pict_index_values_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_render_create_picture_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_render_create_picture_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t pid
- ** @param xcb_drawable_t drawable
- ** @param xcb_render_pictformat_t format
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_picture_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t pid /**< */,
- xcb_drawable_t drawable /**< */,
- xcb_render_pictformat_t format /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_picture
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t pid
- ** @param xcb_drawable_t drawable
- ** @param xcb_render_pictformat_t format
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_picture (xcb_connection_t *c /**< */,
- xcb_render_picture_t pid /**< */,
- xcb_drawable_t drawable /**< */,
- xcb_render_pictformat_t format /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */);
-
-int
-xcb_render_change_picture_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_render_change_picture_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_change_picture_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_change_picture
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_change_picture (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */);
-
-int
-xcb_render_set_picture_clip_rectangles_sizeof (const void *_buffer /**< */,
- uint32_t rectangles_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_render_set_picture_clip_rectangles_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param int16_t clip_x_origin
- ** @param int16_t clip_y_origin
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- int16_t clip_x_origin /**< */,
- int16_t clip_y_origin /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_set_picture_clip_rectangles
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param int16_t clip_x_origin
- ** @param int16_t clip_y_origin
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_clip_rectangles (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- int16_t clip_x_origin /**< */,
- int16_t clip_y_origin /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */);
-
-/**
- *
- * @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_render_free_picture_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_picture_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_free_picture
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_picture (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */);
-
-/**
- *
- * @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_render_composite_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t mask
- ** @param xcb_render_picture_t dst
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param int16_t mask_x
- ** @param int16_t mask_y
- ** @param int16_t dst_x
- ** @param int16_t dst_y
- ** @param uint16_t width
- ** @param uint16_t height
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t mask /**< */,
- xcb_render_picture_t dst /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- int16_t mask_x /**< */,
- int16_t mask_y /**< */,
- int16_t dst_x /**< */,
- int16_t dst_y /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t mask
- ** @param xcb_render_picture_t dst
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param int16_t mask_x
- ** @param int16_t mask_y
- ** @param int16_t dst_x
- ** @param int16_t dst_y
- ** @param uint16_t width
- ** @param uint16_t height
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t mask /**< */,
- xcb_render_picture_t dst /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- int16_t mask_x /**< */,
- int16_t mask_y /**< */,
- int16_t dst_x /**< */,
- int16_t dst_y /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */);
-
-int
-xcb_render_trapezoids_sizeof (const void *_buffer /**< */,
- uint32_t traps_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_render_trapezoids_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t traps_len
- ** @param const xcb_render_trapezoid_t *traps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_trapezoids_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t traps_len /**< */,
- const xcb_render_trapezoid_t *traps /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_trapezoids
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t traps_len
- ** @param const xcb_render_trapezoid_t *traps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_trapezoids (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t traps_len /**< */,
- const xcb_render_trapezoid_t *traps /**< */);
-
-int
-xcb_render_triangles_sizeof (const void *_buffer /**< */,
- uint32_t triangles_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_render_triangles_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t triangles_len
- ** @param const xcb_render_triangle_t *triangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_triangles_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t triangles_len /**< */,
- const xcb_render_triangle_t *triangles /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_triangles
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t triangles_len
- ** @param const xcb_render_triangle_t *triangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_triangles (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t triangles_len /**< */,
- const xcb_render_triangle_t *triangles /**< */);
-
-int
-xcb_render_tri_strip_sizeof (const void *_buffer /**< */,
- uint32_t points_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_render_tri_strip_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t points_len
- ** @param const xcb_render_pointfix_t *points
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_tri_strip_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t points_len /**< */,
- const xcb_render_pointfix_t *points /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_tri_strip
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t points_len
- ** @param const xcb_render_pointfix_t *points
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_tri_strip (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t points_len /**< */,
- const xcb_render_pointfix_t *points /**< */);
-
-int
-xcb_render_tri_fan_sizeof (const void *_buffer /**< */,
- uint32_t points_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_render_tri_fan_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t points_len
- ** @param const xcb_render_pointfix_t *points
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_tri_fan_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t points_len /**< */,
- const xcb_render_pointfix_t *points /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_tri_fan
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t points_len
- ** @param const xcb_render_pointfix_t *points
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_tri_fan (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t points_len /**< */,
- const xcb_render_pointfix_t *points /**< */);
-
-/**
- *
- * @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_render_create_glyph_set_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t gsid
- ** @param xcb_render_pictformat_t format
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_glyph_set_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t gsid /**< */,
- xcb_render_pictformat_t format /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_glyph_set
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t gsid
- ** @param xcb_render_pictformat_t format
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_glyph_set (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t gsid /**< */,
- xcb_render_pictformat_t format /**< */);
-
-/**
- *
- * @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_render_reference_glyph_set_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t gsid
- ** @param xcb_render_glyphset_t existing
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_reference_glyph_set_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t gsid /**< */,
- xcb_render_glyphset_t existing /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_reference_glyph_set
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t gsid
- ** @param xcb_render_glyphset_t existing
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_reference_glyph_set (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t gsid /**< */,
- xcb_render_glyphset_t existing /**< */);
-
-/**
- *
- * @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_render_free_glyph_set_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_glyph_set_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_free_glyph_set
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-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 /**< */);
-
-/**
- *
- * @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_render_add_glyphs_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @param uint32_t glyphs_len
- ** @param const uint32_t *glyphids
- ** @param const xcb_render_glyphinfo_t *glyphs
- ** @param uint32_t data_len
- ** @param const uint8_t *data
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_add_glyphs_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- uint32_t glyphs_len /**< */,
- const uint32_t *glyphids /**< */,
- const xcb_render_glyphinfo_t *glyphs /**< */,
- uint32_t data_len /**< */,
- const uint8_t *data /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_add_glyphs
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @param uint32_t glyphs_len
- ** @param const uint32_t *glyphids
- ** @param const xcb_render_glyphinfo_t *glyphs
- ** @param uint32_t data_len
- ** @param const uint8_t *data
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_add_glyphs (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- uint32_t glyphs_len /**< */,
- const uint32_t *glyphids /**< */,
- const xcb_render_glyphinfo_t *glyphs /**< */,
- uint32_t data_len /**< */,
- const uint8_t *data /**< */);
-
-int
-xcb_render_free_glyphs_sizeof (const void *_buffer /**< */,
- uint32_t glyphs_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_render_free_glyphs_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @param uint32_t glyphs_len
- ** @param const xcb_render_glyph_t *glyphs
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_glyphs_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- uint32_t glyphs_len /**< */,
- const xcb_render_glyph_t *glyphs /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_free_glyphs
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @param uint32_t glyphs_len
- ** @param const xcb_render_glyph_t *glyphs
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_glyphs (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- uint32_t glyphs_len /**< */,
- const xcb_render_glyph_t *glyphs /**< */);
-
-int
-xcb_render_composite_glyphs_8_sizeof (const void *_buffer /**< */,
- uint32_t glyphcmds_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_render_composite_glyphs_8_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_8_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite_glyphs_8
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_8 (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */);
-
-int
-xcb_render_composite_glyphs_16_sizeof (const void *_buffer /**< */,
- uint32_t glyphcmds_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_render_composite_glyphs_16_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_16_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite_glyphs_16
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_16 (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */);
-
-int
-xcb_render_composite_glyphs_32_sizeof (const void *_buffer /**< */,
- uint32_t glyphcmds_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_render_composite_glyphs_32_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_32_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite_glyphs_32
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_32 (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */);
-
-int
-xcb_render_fill_rectangles_sizeof (const void *_buffer /**< */,
- uint32_t rects_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_render_fill_rectangles_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_color_t color
- ** @param uint32_t rects_len
- ** @param const xcb_rectangle_t *rects
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_fill_rectangles_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_color_t color /**< */,
- uint32_t rects_len /**< */,
- const xcb_rectangle_t *rects /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_fill_rectangles
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_color_t color
- ** @param uint32_t rects_len
- ** @param const xcb_rectangle_t *rects
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_fill_rectangles (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_color_t color /**< */,
- uint32_t rects_len /**< */,
- const xcb_rectangle_t *rects /**< */);
-
-/**
- *
- * @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_render_create_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cid
- ** @param xcb_render_picture_t source
- ** @param uint16_t x
- ** @param uint16_t y
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_cursor_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t cid /**< */,
- xcb_render_picture_t source /**< */,
- uint16_t x /**< */,
- uint16_t y /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cid
- ** @param xcb_render_picture_t source
- ** @param uint16_t x
- ** @param uint16_t y
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_cursor (xcb_connection_t *c /**< */,
- xcb_cursor_t cid /**< */,
- xcb_render_picture_t source /**< */,
- uint16_t x /**< */,
- uint16_t y /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_transform_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_render_transform_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_transform_next
- **
- ** @param xcb_render_transform_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_transform_next (xcb_render_transform_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_transform_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_render_transform_end
- **
- ** @param xcb_render_transform_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_transform_end (xcb_render_transform_iterator_t i /**< */);
-
-/**
- *
- * @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_render_set_picture_transform_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_transform_t transform
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_transform_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_transform_t transform /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_set_picture_transform
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_transform_t transform
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_render_query_filters_cookie_t xcb_render_query_filters
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @returns xcb_render_query_filters_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_filters_cookie_t
-xcb_render_query_filters (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */);
-
-/**
- *
- * @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_render_query_filters_cookie_t xcb_render_query_filters_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @returns xcb_render_query_filters_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_filters_cookie_t
-xcb_render_query_filters_unchecked (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */);
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_render_query_filters_aliases
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_render_query_filters_aliases (const xcb_render_query_filters_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_filters_aliases_length
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_filters_aliases_length (const xcb_render_query_filters_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_query_filters_aliases_end
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_query_filters_aliases_end (const xcb_render_query_filters_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_filters_filters_length
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_filters_filters_length (const xcb_render_query_filters_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_str_iterator_t xcb_render_query_filters_filters_iterator
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns xcb_str_iterator_t
- **
- *****************************************************************************/
-
-xcb_str_iterator_t
-xcb_render_query_filters_filters_iterator (const xcb_render_query_filters_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_render_query_filters_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_render_query_filters_reply_t * xcb_render_query_filters_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_query_filters_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_render_query_filters_reply_t *
- **
- *****************************************************************************/
-
-xcb_render_query_filters_reply_t *
-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 /**< */);
-
-/**
- *
- * @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_render_set_picture_filter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param uint16_t filter_len
- ** @param const char *filter
- ** @param uint32_t values_len
- ** @param const xcb_render_fixed_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_filter_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- uint16_t filter_len /**< */,
- const char *filter /**< */,
- uint32_t values_len /**< */,
- const xcb_render_fixed_t *values /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_set_picture_filter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param uint16_t filter_len
- ** @param const char *filter
- ** @param uint32_t values_len
- ** @param const xcb_render_fixed_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_filter (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- uint16_t filter_len /**< */,
- const char *filter /**< */,
- uint32_t values_len /**< */,
- const xcb_render_fixed_t *values /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_animcursorelt_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_render_animcursorelt_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_animcursorelt_next
- **
- ** @param xcb_render_animcursorelt_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_animcursorelt_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_render_animcursorelt_end
- **
- ** @param xcb_render_animcursorelt_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-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 /**< */);
-
-/**
- *
- * @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_render_create_anim_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cid
- ** @param uint32_t cursors_len
- ** @param const xcb_render_animcursorelt_t *cursors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_anim_cursor_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t cid /**< */,
- uint32_t cursors_len /**< */,
- const xcb_render_animcursorelt_t *cursors /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_anim_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cid
- ** @param uint32_t cursors_len
- ** @param const xcb_render_animcursorelt_t *cursors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_anim_cursor (xcb_connection_t *c /**< */,
- xcb_cursor_t cid /**< */,
- uint32_t cursors_len /**< */,
- const xcb_render_animcursorelt_t *cursors /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_spanfix_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_render_spanfix_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_spanfix_next
- **
- ** @param xcb_render_spanfix_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_spanfix_next (xcb_render_spanfix_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_spanfix_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_render_spanfix_end
- **
- ** @param xcb_render_spanfix_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_spanfix_end (xcb_render_spanfix_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_render_trap_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_render_trap_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_render_trap_next
- **
- ** @param xcb_render_trap_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_trap_next (xcb_render_trap_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_render_trap_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_render_trap_end
- **
- ** @param xcb_render_trap_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-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 /**< */);
-
-/**
- *
- * @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_render_add_traps_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param int16_t x_off
- ** @param int16_t y_off
- ** @param uint32_t traps_len
- ** @param const xcb_render_trap_t *traps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_add_traps_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- int16_t x_off /**< */,
- int16_t y_off /**< */,
- uint32_t traps_len /**< */,
- const xcb_render_trap_t *traps /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_add_traps
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param int16_t x_off
- ** @param int16_t y_off
- ** @param uint32_t traps_len
- ** @param const xcb_render_trap_t *traps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_add_traps (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- int16_t x_off /**< */,
- int16_t y_off /**< */,
- uint32_t traps_len /**< */,
- const xcb_render_trap_t *traps /**< */);
-
-/**
- *
- * @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_render_create_solid_fill_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_color_t color
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_solid_fill_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_color_t color /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_solid_fill
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_color_t color
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-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 /**< */);
-
-/**
- *
- * @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_render_create_linear_gradient_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t p1
- ** @param xcb_render_pointfix_t p2
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_linear_gradient_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t p1 /**< */,
- xcb_render_pointfix_t p2 /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_linear_gradient
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t p1
- ** @param xcb_render_pointfix_t p2
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_linear_gradient (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t p1 /**< */,
- xcb_render_pointfix_t p2 /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */);
-
-int
-xcb_render_create_radial_gradient_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_render_create_radial_gradient_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t inner
- ** @param xcb_render_pointfix_t outer
- ** @param xcb_render_fixed_t inner_radius
- ** @param xcb_render_fixed_t outer_radius
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_radial_gradient_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t inner /**< */,
- xcb_render_pointfix_t outer /**< */,
- xcb_render_fixed_t inner_radius /**< */,
- xcb_render_fixed_t outer_radius /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_radial_gradient
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t inner
- ** @param xcb_render_pointfix_t outer
- ** @param xcb_render_fixed_t inner_radius
- ** @param xcb_render_fixed_t outer_radius
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_radial_gradient (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t inner /**< */,
- xcb_render_pointfix_t outer /**< */,
- xcb_render_fixed_t inner_radius /**< */,
- xcb_render_fixed_t outer_radius /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */);
-
-int
-xcb_render_create_conical_gradient_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_render_create_conical_gradient_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t center
- ** @param xcb_render_fixed_t angle
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_conical_gradient_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t center /**< */,
- xcb_render_fixed_t angle /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_conical_gradient
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t center
- ** @param xcb_render_fixed_t angle
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_conical_gradient (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t center /**< */,
- xcb_render_fixed_t angle /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/**
- * @}
- */
diff --git a/src/3rdparty/xcb/include/xcb/shape.h b/src/3rdparty/xcb/include/xcb/shape.h
deleted file mode 100644
index 63919b42c7..0000000000
--- a/src/3rdparty/xcb/include/xcb/shape.h
+++ /dev/null
@@ -1,1103 +0,0 @@
-/*
- * This file generated automatically from shape.xml by c_client.py.
- * Edit at your peril.
- */
-
-/**
- * @defgroup XCB_Shape_API XCB Shape API
- * @brief Shape XCB Protocol Implementation.
- * @{
- **/
-
-#ifndef __SHAPE_H
-#define __SHAPE_H
-
-#include "xcb.h"
-#include "xproto.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XCB_SHAPE_MAJOR_VERSION 1
-#define XCB_SHAPE_MINOR_VERSION 1
-
-extern xcb_extension_t xcb_shape_id;
-
-typedef uint8_t xcb_shape_op_t;
-
-/**
- * @brief xcb_shape_op_iterator_t
- **/
-typedef struct xcb_shape_op_iterator_t {
- xcb_shape_op_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_shape_op_iterator_t;
-
-typedef uint8_t xcb_shape_kind_t;
-
-/**
- * @brief xcb_shape_kind_iterator_t
- **/
-typedef struct xcb_shape_kind_iterator_t {
- xcb_shape_kind_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_shape_kind_iterator_t;
-
-typedef enum xcb_shape_so_t {
- XCB_SHAPE_SO_SET,
- XCB_SHAPE_SO_UNION,
- XCB_SHAPE_SO_INTERSECT,
- XCB_SHAPE_SO_SUBTRACT,
- XCB_SHAPE_SO_INVERT
-} xcb_shape_so_t;
-
-typedef enum xcb_shape_sk_t {
- XCB_SHAPE_SK_BOUNDING,
- XCB_SHAPE_SK_CLIP,
- XCB_SHAPE_SK_INPUT
-} xcb_shape_sk_t;
-
-/** Opcode for xcb_shape_notify. */
-#define XCB_SHAPE_NOTIFY 0
-
-/**
- * @brief xcb_shape_notify_event_t
- **/
-typedef struct xcb_shape_notify_event_t {
- uint8_t response_type; /**< */
- xcb_shape_kind_t shape_kind; /**< */
- uint16_t sequence; /**< */
- xcb_window_t affected_window; /**< */
- int16_t extents_x; /**< */
- int16_t extents_y; /**< */
- uint16_t extents_width; /**< */
- uint16_t extents_height; /**< */
- xcb_timestamp_t server_time; /**< */
- uint8_t shaped; /**< */
- uint8_t pad0[11]; /**< */
-} xcb_shape_notify_event_t;
-
-/**
- * @brief xcb_shape_query_version_cookie_t
- **/
-typedef struct xcb_shape_query_version_cookie_t {
- unsigned int sequence; /**< */
-} xcb_shape_query_version_cookie_t;
-
-/** Opcode for xcb_shape_query_version. */
-#define XCB_SHAPE_QUERY_VERSION 0
-
-/**
- * @brief xcb_shape_query_version_request_t
- **/
-typedef struct xcb_shape_query_version_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
-} xcb_shape_query_version_request_t;
-
-/**
- * @brief xcb_shape_query_version_reply_t
- **/
-typedef struct xcb_shape_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; /**< */
-} xcb_shape_query_version_reply_t;
-
-/** Opcode for xcb_shape_rectangles. */
-#define XCB_SHAPE_RECTANGLES 1
-
-/**
- * @brief xcb_shape_rectangles_request_t
- **/
-typedef struct xcb_shape_rectangles_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_shape_op_t operation; /**< */
- xcb_shape_kind_t destination_kind; /**< */
- uint8_t ordering; /**< */
- uint8_t pad0; /**< */
- xcb_window_t destination_window; /**< */
- int16_t x_offset; /**< */
- int16_t y_offset; /**< */
-} xcb_shape_rectangles_request_t;
-
-/** Opcode for xcb_shape_mask. */
-#define XCB_SHAPE_MASK 2
-
-/**
- * @brief xcb_shape_mask_request_t
- **/
-typedef struct xcb_shape_mask_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_shape_op_t operation; /**< */
- xcb_shape_kind_t destination_kind; /**< */
- uint8_t pad0[2]; /**< */
- xcb_window_t destination_window; /**< */
- int16_t x_offset; /**< */
- int16_t y_offset; /**< */
- xcb_pixmap_t source_bitmap; /**< */
-} xcb_shape_mask_request_t;
-
-/** Opcode for xcb_shape_combine. */
-#define XCB_SHAPE_COMBINE 3
-
-/**
- * @brief xcb_shape_combine_request_t
- **/
-typedef struct xcb_shape_combine_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_shape_op_t operation; /**< */
- xcb_shape_kind_t destination_kind; /**< */
- xcb_shape_kind_t source_kind; /**< */
- uint8_t pad0; /**< */
- xcb_window_t destination_window; /**< */
- int16_t x_offset; /**< */
- int16_t y_offset; /**< */
- xcb_window_t source_window; /**< */
-} xcb_shape_combine_request_t;
-
-/** Opcode for xcb_shape_offset. */
-#define XCB_SHAPE_OFFSET 4
-
-/**
- * @brief xcb_shape_offset_request_t
- **/
-typedef struct xcb_shape_offset_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_shape_kind_t destination_kind; /**< */
- uint8_t pad0[3]; /**< */
- xcb_window_t destination_window; /**< */
- int16_t x_offset; /**< */
- int16_t y_offset; /**< */
-} xcb_shape_offset_request_t;
-
-/**
- * @brief xcb_shape_query_extents_cookie_t
- **/
-typedef struct xcb_shape_query_extents_cookie_t {
- unsigned int sequence; /**< */
-} xcb_shape_query_extents_cookie_t;
-
-/** Opcode for xcb_shape_query_extents. */
-#define XCB_SHAPE_QUERY_EXTENTS 5
-
-/**
- * @brief xcb_shape_query_extents_request_t
- **/
-typedef struct xcb_shape_query_extents_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t destination_window; /**< */
-} xcb_shape_query_extents_request_t;
-
-/**
- * @brief xcb_shape_query_extents_reply_t
- **/
-typedef struct xcb_shape_query_extents_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint8_t bounding_shaped; /**< */
- uint8_t clip_shaped; /**< */
- uint8_t pad1[2]; /**< */
- int16_t bounding_shape_extents_x; /**< */
- int16_t bounding_shape_extents_y; /**< */
- uint16_t bounding_shape_extents_width; /**< */
- uint16_t bounding_shape_extents_height; /**< */
- int16_t clip_shape_extents_x; /**< */
- int16_t clip_shape_extents_y; /**< */
- uint16_t clip_shape_extents_width; /**< */
- uint16_t clip_shape_extents_height; /**< */
-} xcb_shape_query_extents_reply_t;
-
-/** Opcode for xcb_shape_select_input. */
-#define XCB_SHAPE_SELECT_INPUT 6
-
-/**
- * @brief xcb_shape_select_input_request_t
- **/
-typedef struct xcb_shape_select_input_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t destination_window; /**< */
- uint8_t enable; /**< */
- uint8_t pad0[3]; /**< */
-} xcb_shape_select_input_request_t;
-
-/**
- * @brief xcb_shape_input_selected_cookie_t
- **/
-typedef struct xcb_shape_input_selected_cookie_t {
- unsigned int sequence; /**< */
-} xcb_shape_input_selected_cookie_t;
-
-/** Opcode for xcb_shape_input_selected. */
-#define XCB_SHAPE_INPUT_SELECTED 7
-
-/**
- * @brief xcb_shape_input_selected_request_t
- **/
-typedef struct xcb_shape_input_selected_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t destination_window; /**< */
-} xcb_shape_input_selected_request_t;
-
-/**
- * @brief xcb_shape_input_selected_reply_t
- **/
-typedef struct xcb_shape_input_selected_reply_t {
- uint8_t response_type; /**< */
- uint8_t enabled; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
-} xcb_shape_input_selected_reply_t;
-
-/**
- * @brief xcb_shape_get_rectangles_cookie_t
- **/
-typedef struct xcb_shape_get_rectangles_cookie_t {
- unsigned int sequence; /**< */
-} xcb_shape_get_rectangles_cookie_t;
-
-/** Opcode for xcb_shape_get_rectangles. */
-#define XCB_SHAPE_GET_RECTANGLES 8
-
-/**
- * @brief xcb_shape_get_rectangles_request_t
- **/
-typedef struct xcb_shape_get_rectangles_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
- xcb_shape_kind_t source_kind; /**< */
- uint8_t pad0[3]; /**< */
-} xcb_shape_get_rectangles_request_t;
-
-/**
- * @brief xcb_shape_get_rectangles_reply_t
- **/
-typedef struct xcb_shape_get_rectangles_reply_t {
- uint8_t response_type; /**< */
- uint8_t ordering; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t rectangles_len; /**< */
- uint8_t pad0[20]; /**< */
-} xcb_shape_get_rectangles_reply_t;
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_shape_op_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_shape_op_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_shape_op_next
- **
- ** @param xcb_shape_op_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_shape_op_next (xcb_shape_op_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_shape_op_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_shape_op_end
- **
- ** @param xcb_shape_op_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_shape_op_end (xcb_shape_op_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_shape_kind_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_shape_kind_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_shape_kind_next
- **
- ** @param xcb_shape_kind_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_shape_kind_next (xcb_shape_kind_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_shape_kind_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_shape_kind_end
- **
- ** @param xcb_shape_kind_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_shape_kind_end (xcb_shape_kind_iterator_t i /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_shape_query_version_cookie_t xcb_shape_query_version
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_shape_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_query_version_cookie_t
-xcb_shape_query_version (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_shape_query_version_cookie_t xcb_shape_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_shape_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_query_version_cookie_t
-xcb_shape_query_version_unchecked (xcb_connection_t *c /**< */);
-
-/**
- * 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_shape_query_version_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_shape_query_version_reply_t * xcb_shape_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shape_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_shape_query_version_reply_t *
-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 /**< */);
-
-/**
- *
- * @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_shape_rectangles_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param uint8_t ordering
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_rectangles_checked (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- uint8_t ordering /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_rectangles
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param uint8_t ordering
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_rectangles (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- uint8_t ordering /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */);
-
-/**
- *
- * @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_shape_mask_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_pixmap_t source_bitmap
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_mask_checked (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_pixmap_t source_bitmap /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_mask
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_pixmap_t source_bitmap
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_mask (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_pixmap_t source_bitmap /**< */);
-
-/**
- *
- * @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_shape_combine_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_shape_kind_t source_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_window_t source_window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_combine_checked (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_shape_kind_t source_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_window_t source_window /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_combine
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_shape_kind_t source_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_window_t source_window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_combine (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_shape_kind_t source_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_window_t source_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 not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_offset_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_offset_checked (xcb_connection_t *c /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_offset
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_offset (xcb_connection_t *c /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @returns xcb_shape_query_extents_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_query_extents_cookie_t
-xcb_shape_query_extents (xcb_connection_t *c /**< */,
- xcb_window_t destination_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_shape_query_extents_cookie_t xcb_shape_query_extents_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @returns xcb_shape_query_extents_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_query_extents_cookie_t
-xcb_shape_query_extents_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t destination_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_shape_query_extents_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_shape_query_extents_reply_t * xcb_shape_query_extents_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_query_extents_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shape_query_extents_reply_t *
- **
- *****************************************************************************/
-
-xcb_shape_query_extents_reply_t *
-xcb_shape_query_extents_reply (xcb_connection_t *c /**< */,
- xcb_shape_query_extents_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_shape_select_input_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @param uint8_t enable
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_select_input_checked (xcb_connection_t *c /**< */,
- xcb_window_t destination_window /**< */,
- uint8_t enable /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_select_input
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @param uint8_t enable
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_select_input (xcb_connection_t *c /**< */,
- xcb_window_t destination_window /**< */,
- uint8_t enable /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @returns xcb_shape_input_selected_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_input_selected_cookie_t
-xcb_shape_input_selected (xcb_connection_t *c /**< */,
- xcb_window_t destination_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_shape_input_selected_cookie_t xcb_shape_input_selected_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @returns xcb_shape_input_selected_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_input_selected_cookie_t
-xcb_shape_input_selected_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t destination_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_shape_input_selected_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_shape_input_selected_reply_t * xcb_shape_input_selected_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_input_selected_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shape_input_selected_reply_t *
- **
- *****************************************************************************/
-
-xcb_shape_input_selected_reply_t *
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_shape_kind_t source_kind
- ** @returns xcb_shape_get_rectangles_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_get_rectangles_cookie_t
-xcb_shape_get_rectangles (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_shape_kind_t source_kind /**< */);
-
-/**
- *
- * @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_shape_get_rectangles_cookie_t xcb_shape_get_rectangles_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_shape_kind_t source_kind
- ** @returns xcb_shape_get_rectangles_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_get_rectangles_cookie_t
-xcb_shape_get_rectangles_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_shape_kind_t source_kind /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_rectangle_t * xcb_shape_get_rectangles_rectangles
- **
- ** @param const xcb_shape_get_rectangles_reply_t *R
- ** @returns xcb_rectangle_t *
- **
- *****************************************************************************/
-
-xcb_rectangle_t *
-xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_shape_get_rectangles_rectangles_length
- **
- ** @param const xcb_shape_get_rectangles_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_rectangle_iterator_t xcb_shape_get_rectangles_rectangles_iterator
- **
- ** @param const xcb_shape_get_rectangles_reply_t *R
- ** @returns xcb_rectangle_iterator_t
- **
- *****************************************************************************/
-
-xcb_rectangle_iterator_t
-xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_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_shape_get_rectangles_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_shape_get_rectangles_reply_t * xcb_shape_get_rectangles_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_get_rectangles_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shape_get_rectangles_reply_t *
- **
- *****************************************************************************/
-
-xcb_shape_get_rectangles_reply_t *
-xcb_shape_get_rectangles_reply (xcb_connection_t *c /**< */,
- xcb_shape_get_rectangles_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/**
- * @}
- */
diff --git a/src/3rdparty/xcb/include/xcb/shm.h b/src/3rdparty/xcb/include/xcb/shm.h
deleted file mode 100644
index 315f37e9b9..0000000000
--- a/src/3rdparty/xcb/include/xcb/shm.h
+++ /dev/null
@@ -1,738 +0,0 @@
-/*
- * This file generated automatically from shm.xml by c_client.py.
- * Edit at your peril.
- */
-
-/**
- * @defgroup XCB_Shm_API XCB Shm API
- * @brief Shm XCB Protocol Implementation.
- * @{
- **/
-
-#ifndef __SHM_H
-#define __SHM_H
-
-#include "xcb.h"
-#include "xproto.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XCB_SHM_MAJOR_VERSION 1
-#define XCB_SHM_MINOR_VERSION 1
-
-extern xcb_extension_t xcb_shm_id;
-
-typedef uint32_t xcb_shm_seg_t;
-
-/**
- * @brief xcb_shm_seg_iterator_t
- **/
-typedef struct xcb_shm_seg_iterator_t {
- xcb_shm_seg_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_shm_seg_iterator_t;
-
-/** Opcode for xcb_shm_completion. */
-#define XCB_SHM_COMPLETION 0
-
-/**
- * @brief xcb_shm_completion_event_t
- **/
-typedef struct xcb_shm_completion_event_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- xcb_drawable_t drawable; /**< */
- uint16_t minor_event; /**< */
- uint8_t major_event; /**< */
- uint8_t pad1; /**< */
- xcb_shm_seg_t shmseg; /**< */
- uint32_t offset; /**< */
-} xcb_shm_completion_event_t;
-
-/** Opcode for xcb_shm_bad_seg. */
-#define XCB_SHM_BAD_SEG 0
-
-typedef xcb_value_error_t xcb_shm_bad_seg_error_t;
-
-/**
- * @brief xcb_shm_query_version_cookie_t
- **/
-typedef struct xcb_shm_query_version_cookie_t {
- unsigned int sequence; /**< */
-} xcb_shm_query_version_cookie_t;
-
-/** Opcode for xcb_shm_query_version. */
-#define XCB_SHM_QUERY_VERSION 0
-
-/**
- * @brief xcb_shm_query_version_request_t
- **/
-typedef struct xcb_shm_query_version_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
-} xcb_shm_query_version_request_t;
-
-/**
- * @brief xcb_shm_query_version_reply_t
- **/
-typedef struct xcb_shm_query_version_reply_t {
- uint8_t response_type; /**< */
- uint8_t shared_pixmaps; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint16_t major_version; /**< */
- uint16_t minor_version; /**< */
- uint16_t uid; /**< */
- uint16_t gid; /**< */
- uint8_t pixmap_format; /**< */
- uint8_t pad0[15]; /**< */
-} xcb_shm_query_version_reply_t;
-
-/** Opcode for xcb_shm_attach. */
-#define XCB_SHM_ATTACH 1
-
-/**
- * @brief xcb_shm_attach_request_t
- **/
-typedef struct xcb_shm_attach_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_shm_seg_t shmseg; /**< */
- uint32_t shmid; /**< */
- uint8_t read_only; /**< */
- uint8_t pad0[3]; /**< */
-} xcb_shm_attach_request_t;
-
-/** Opcode for xcb_shm_detach. */
-#define XCB_SHM_DETACH 2
-
-/**
- * @brief xcb_shm_detach_request_t
- **/
-typedef struct xcb_shm_detach_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_shm_seg_t shmseg; /**< */
-} xcb_shm_detach_request_t;
-
-/** Opcode for xcb_shm_put_image. */
-#define XCB_SHM_PUT_IMAGE 3
-
-/**
- * @brief xcb_shm_put_image_request_t
- **/
-typedef struct xcb_shm_put_image_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_drawable_t drawable; /**< */
- xcb_gcontext_t gc; /**< */
- uint16_t total_width; /**< */
- uint16_t total_height; /**< */
- uint16_t src_x; /**< */
- uint16_t src_y; /**< */
- uint16_t src_width; /**< */
- uint16_t src_height; /**< */
- int16_t dst_x; /**< */
- int16_t dst_y; /**< */
- uint8_t depth; /**< */
- uint8_t format; /**< */
- uint8_t send_event; /**< */
- uint8_t pad0; /**< */
- xcb_shm_seg_t shmseg; /**< */
- uint32_t offset; /**< */
-} xcb_shm_put_image_request_t;
-
-/**
- * @brief xcb_shm_get_image_cookie_t
- **/
-typedef struct xcb_shm_get_image_cookie_t {
- unsigned int sequence; /**< */
-} xcb_shm_get_image_cookie_t;
-
-/** Opcode for xcb_shm_get_image. */
-#define XCB_SHM_GET_IMAGE 4
-
-/**
- * @brief xcb_shm_get_image_request_t
- **/
-typedef struct xcb_shm_get_image_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_drawable_t drawable; /**< */
- int16_t x; /**< */
- int16_t y; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint32_t plane_mask; /**< */
- uint8_t format; /**< */
- uint8_t pad0[3]; /**< */
- xcb_shm_seg_t shmseg; /**< */
- uint32_t offset; /**< */
-} xcb_shm_get_image_request_t;
-
-/**
- * @brief xcb_shm_get_image_reply_t
- **/
-typedef struct xcb_shm_get_image_reply_t {
- uint8_t response_type; /**< */
- uint8_t depth; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_visualid_t visual; /**< */
- uint32_t size; /**< */
-} xcb_shm_get_image_reply_t;
-
-/** Opcode for xcb_shm_create_pixmap. */
-#define XCB_SHM_CREATE_PIXMAP 5
-
-/**
- * @brief xcb_shm_create_pixmap_request_t
- **/
-typedef struct xcb_shm_create_pixmap_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_pixmap_t pid; /**< */
- xcb_drawable_t drawable; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint8_t depth; /**< */
- uint8_t pad0[3]; /**< */
- xcb_shm_seg_t shmseg; /**< */
- uint32_t offset; /**< */
-} xcb_shm_create_pixmap_request_t;
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_shm_seg_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_shm_seg_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_shm_seg_next
- **
- ** @param xcb_shm_seg_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_shm_seg_next (xcb_shm_seg_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_shm_seg_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_shm_seg_end
- **
- ** @param xcb_shm_seg_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_shm_seg_end (xcb_shm_seg_iterator_t i /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_shm_query_version_cookie_t xcb_shm_query_version
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_shm_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_shm_query_version_cookie_t
-xcb_shm_query_version (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_shm_query_version_cookie_t xcb_shm_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_shm_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_shm_query_version_cookie_t
-xcb_shm_query_version_unchecked (xcb_connection_t *c /**< */);
-
-/**
- * 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_shm_query_version_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_shm_query_version_reply_t * xcb_shm_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shm_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_shm_query_version_reply_t *
-xcb_shm_query_version_reply (xcb_connection_t *c /**< */,
- xcb_shm_query_version_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_shm_attach_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t shmid
- ** @param uint8_t read_only
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_attach_checked (xcb_connection_t *c /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t shmid /**< */,
- uint8_t read_only /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shm_attach
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t shmid
- ** @param uint8_t read_only
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_attach (xcb_connection_t *c /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t shmid /**< */,
- uint8_t read_only /**< */);
-
-/**
- *
- * @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_shm_detach_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_seg_t shmseg
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_detach_checked (xcb_connection_t *c /**< */,
- xcb_shm_seg_t shmseg /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shm_detach
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_seg_t shmseg
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_detach (xcb_connection_t *c /**< */,
- xcb_shm_seg_t shmseg /**< */);
-
-/**
- *
- * @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_shm_put_image_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @param xcb_gcontext_t gc
- ** @param uint16_t total_width
- ** @param uint16_t total_height
- ** @param uint16_t src_x
- ** @param uint16_t src_y
- ** @param uint16_t src_width
- ** @param uint16_t src_height
- ** @param int16_t dst_x
- ** @param int16_t dst_y
- ** @param uint8_t depth
- ** @param uint8_t format
- ** @param uint8_t send_event
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_put_image_checked (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */,
- xcb_gcontext_t gc /**< */,
- uint16_t total_width /**< */,
- uint16_t total_height /**< */,
- uint16_t src_x /**< */,
- uint16_t src_y /**< */,
- uint16_t src_width /**< */,
- uint16_t src_height /**< */,
- int16_t dst_x /**< */,
- int16_t dst_y /**< */,
- uint8_t depth /**< */,
- uint8_t format /**< */,
- uint8_t send_event /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shm_put_image
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @param xcb_gcontext_t gc
- ** @param uint16_t total_width
- ** @param uint16_t total_height
- ** @param uint16_t src_x
- ** @param uint16_t src_y
- ** @param uint16_t src_width
- ** @param uint16_t src_height
- ** @param int16_t dst_x
- ** @param int16_t dst_y
- ** @param uint8_t depth
- ** @param uint8_t format
- ** @param uint8_t send_event
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_put_image (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */,
- xcb_gcontext_t gc /**< */,
- uint16_t total_width /**< */,
- uint16_t total_height /**< */,
- uint16_t src_x /**< */,
- uint16_t src_y /**< */,
- uint16_t src_width /**< */,
- uint16_t src_height /**< */,
- int16_t dst_x /**< */,
- int16_t dst_y /**< */,
- uint8_t depth /**< */,
- uint8_t format /**< */,
- uint8_t send_event /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_shm_get_image_cookie_t xcb_shm_get_image
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @param int16_t x
- ** @param int16_t y
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint32_t plane_mask
- ** @param uint8_t format
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_shm_get_image_cookie_t
- **
- *****************************************************************************/
-
-xcb_shm_get_image_cookie_t
-xcb_shm_get_image (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */,
- int16_t x /**< */,
- int16_t y /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint32_t plane_mask /**< */,
- uint8_t format /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */);
-
-/**
- *
- * @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_shm_get_image_cookie_t xcb_shm_get_image_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @param int16_t x
- ** @param int16_t y
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint32_t plane_mask
- ** @param uint8_t format
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_shm_get_image_cookie_t
- **
- *****************************************************************************/
-
-xcb_shm_get_image_cookie_t
-xcb_shm_get_image_unchecked (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */,
- int16_t x /**< */,
- int16_t y /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint32_t plane_mask /**< */,
- uint8_t format /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */);
-
-/**
- * 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_shm_get_image_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_shm_get_image_reply_t * xcb_shm_get_image_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_get_image_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shm_get_image_reply_t *
- **
- *****************************************************************************/
-
-xcb_shm_get_image_reply_t *
-xcb_shm_get_image_reply (xcb_connection_t *c /**< */,
- xcb_shm_get_image_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_shm_create_pixmap_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_pixmap_t pid
- ** @param xcb_drawable_t drawable
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint8_t depth
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */,
- xcb_pixmap_t pid /**< */,
- xcb_drawable_t drawable /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint8_t depth /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shm_create_pixmap
- **
- ** @param xcb_connection_t *c
- ** @param xcb_pixmap_t pid
- ** @param xcb_drawable_t drawable
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint8_t depth
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_create_pixmap (xcb_connection_t *c /**< */,
- xcb_pixmap_t pid /**< */,
- xcb_drawable_t drawable /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint8_t depth /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/**
- * @}
- */
diff --git a/src/3rdparty/xcb/include/xcb/sync.h b/src/3rdparty/xcb/include/xcb/sync.h
deleted file mode 100644
index 3d0069d7ef..0000000000
--- a/src/3rdparty/xcb/include/xcb/sync.h
+++ /dev/null
@@ -1,2216 +0,0 @@
-/*
- * This file generated automatically from sync.xml by c_client.py.
- * Edit at your peril.
- */
-
-/**
- * @defgroup XCB_Sync_API XCB Sync API
- * @brief Sync XCB Protocol Implementation.
- * @{
- **/
-
-#ifndef __SYNC_H
-#define __SYNC_H
-
-#include "xcb.h"
-#include "xproto.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XCB_SYNC_MAJOR_VERSION 3
-#define XCB_SYNC_MINOR_VERSION 1
-
-extern xcb_extension_t xcb_sync_id;
-
-typedef uint32_t xcb_sync_alarm_t;
-
-/**
- * @brief xcb_sync_alarm_iterator_t
- **/
-typedef struct xcb_sync_alarm_iterator_t {
- xcb_sync_alarm_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_sync_alarm_iterator_t;
-
-typedef enum xcb_sync_alarmstate_t {
- XCB_SYNC_ALARMSTATE_ACTIVE,
- XCB_SYNC_ALARMSTATE_INACTIVE,
- XCB_SYNC_ALARMSTATE_DESTROYED
-} xcb_sync_alarmstate_t;
-
-typedef uint32_t xcb_sync_counter_t;
-
-/**
- * @brief xcb_sync_counter_iterator_t
- **/
-typedef struct xcb_sync_counter_iterator_t {
- xcb_sync_counter_t *data; /**< */
- int rem; /**< */
- 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,
- XCB_SYNC_TESTTYPE_POSITIVE_COMPARISON,
- XCB_SYNC_TESTTYPE_NEGATIVE_COMPARISON
-} xcb_sync_testtype_t;
-
-typedef enum xcb_sync_valuetype_t {
- XCB_SYNC_VALUETYPE_ABSOLUTE,
- XCB_SYNC_VALUETYPE_RELATIVE
-} xcb_sync_valuetype_t;
-
-typedef enum xcb_sync_ca_t {
- XCB_SYNC_CA_COUNTER = 1,
- XCB_SYNC_CA_VALUE_TYPE = 2,
- XCB_SYNC_CA_VALUE = 4,
- XCB_SYNC_CA_TEST_TYPE = 8,
- XCB_SYNC_CA_DELTA = 16,
- XCB_SYNC_CA_EVENTS = 32
-} xcb_sync_ca_t;
-
-/**
- * @brief xcb_sync_int64_t
- **/
-typedef struct xcb_sync_int64_t {
- int32_t hi; /**< */
- uint32_t lo; /**< */
-} xcb_sync_int64_t;
-
-/**
- * @brief xcb_sync_int64_iterator_t
- **/
-typedef struct xcb_sync_int64_iterator_t {
- xcb_sync_int64_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_sync_int64_iterator_t;
-
-/**
- * @brief xcb_sync_systemcounter_t
- **/
-typedef struct xcb_sync_systemcounter_t {
- xcb_sync_counter_t counter; /**< */
- xcb_sync_int64_t resolution; /**< */
- uint16_t name_len; /**< */
-} xcb_sync_systemcounter_t;
-
-/**
- * @brief xcb_sync_systemcounter_iterator_t
- **/
-typedef struct xcb_sync_systemcounter_iterator_t {
- xcb_sync_systemcounter_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_sync_systemcounter_iterator_t;
-
-/**
- * @brief xcb_sync_trigger_t
- **/
-typedef struct xcb_sync_trigger_t {
- xcb_sync_counter_t counter; /**< */
- uint32_t wait_type; /**< */
- xcb_sync_int64_t wait_value; /**< */
- uint32_t test_type; /**< */
-} xcb_sync_trigger_t;
-
-/**
- * @brief xcb_sync_trigger_iterator_t
- **/
-typedef struct xcb_sync_trigger_iterator_t {
- xcb_sync_trigger_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_sync_trigger_iterator_t;
-
-/**
- * @brief xcb_sync_waitcondition_t
- **/
-typedef struct xcb_sync_waitcondition_t {
- xcb_sync_trigger_t trigger; /**< */
- xcb_sync_int64_t event_threshold; /**< */
-} xcb_sync_waitcondition_t;
-
-/**
- * @brief xcb_sync_waitcondition_iterator_t
- **/
-typedef struct xcb_sync_waitcondition_iterator_t {
- xcb_sync_waitcondition_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_sync_waitcondition_iterator_t;
-
-/** Opcode for xcb_sync_counter. */
-#define XCB_SYNC_COUNTER 0
-
-/**
- * @brief xcb_sync_counter_error_t
- **/
-typedef struct xcb_sync_counter_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
- uint32_t bad_counter; /**< */
- uint16_t minor_opcode; /**< */
- uint8_t major_opcode; /**< */
-} xcb_sync_counter_error_t;
-
-/** Opcode for xcb_sync_alarm. */
-#define XCB_SYNC_ALARM 1
-
-/**
- * @brief xcb_sync_alarm_error_t
- **/
-typedef struct xcb_sync_alarm_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
- uint32_t bad_alarm; /**< */
- uint16_t minor_opcode; /**< */
- uint8_t major_opcode; /**< */
-} xcb_sync_alarm_error_t;
-
-/**
- * @brief xcb_sync_initialize_cookie_t
- **/
-typedef struct xcb_sync_initialize_cookie_t {
- unsigned int sequence; /**< */
-} xcb_sync_initialize_cookie_t;
-
-/** Opcode for xcb_sync_initialize. */
-#define XCB_SYNC_INITIALIZE 0
-
-/**
- * @brief xcb_sync_initialize_request_t
- **/
-typedef struct xcb_sync_initialize_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t desired_major_version; /**< */
- uint8_t desired_minor_version; /**< */
-} xcb_sync_initialize_request_t;
-
-/**
- * @brief xcb_sync_initialize_reply_t
- **/
-typedef struct xcb_sync_initialize_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint8_t major_version; /**< */
- uint8_t minor_version; /**< */
- uint8_t pad1[22]; /**< */
-} xcb_sync_initialize_reply_t;
-
-/**
- * @brief xcb_sync_list_system_counters_cookie_t
- **/
-typedef struct xcb_sync_list_system_counters_cookie_t {
- unsigned int sequence; /**< */
-} xcb_sync_list_system_counters_cookie_t;
-
-/** Opcode for xcb_sync_list_system_counters. */
-#define XCB_SYNC_LIST_SYSTEM_COUNTERS 1
-
-/**
- * @brief xcb_sync_list_system_counters_request_t
- **/
-typedef struct xcb_sync_list_system_counters_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
-} xcb_sync_list_system_counters_request_t;
-
-/**
- * @brief xcb_sync_list_system_counters_reply_t
- **/
-typedef struct xcb_sync_list_system_counters_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t counters_len; /**< */
- uint8_t pad1[20]; /**< */
-} xcb_sync_list_system_counters_reply_t;
-
-/** Opcode for xcb_sync_create_counter. */
-#define XCB_SYNC_CREATE_COUNTER 2
-
-/**
- * @brief xcb_sync_create_counter_request_t
- **/
-typedef struct xcb_sync_create_counter_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_sync_counter_t id; /**< */
- xcb_sync_int64_t initial_value; /**< */
-} xcb_sync_create_counter_request_t;
-
-/** Opcode for xcb_sync_destroy_counter. */
-#define XCB_SYNC_DESTROY_COUNTER 6
-
-/**
- * @brief xcb_sync_destroy_counter_request_t
- **/
-typedef struct xcb_sync_destroy_counter_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_sync_counter_t counter; /**< */
-} xcb_sync_destroy_counter_request_t;
-
-/**
- * @brief xcb_sync_query_counter_cookie_t
- **/
-typedef struct xcb_sync_query_counter_cookie_t {
- unsigned int sequence; /**< */
-} xcb_sync_query_counter_cookie_t;
-
-/** Opcode for xcb_sync_query_counter. */
-#define XCB_SYNC_QUERY_COUNTER 5
-
-/**
- * @brief xcb_sync_query_counter_request_t
- **/
-typedef struct xcb_sync_query_counter_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_sync_counter_t counter; /**< */
-} xcb_sync_query_counter_request_t;
-
-/**
- * @brief xcb_sync_query_counter_reply_t
- **/
-typedef struct xcb_sync_query_counter_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_sync_int64_t counter_value; /**< */
-} xcb_sync_query_counter_reply_t;
-
-/** Opcode for xcb_sync_await. */
-#define XCB_SYNC_AWAIT 7
-
-/**
- * @brief xcb_sync_await_request_t
- **/
-typedef struct xcb_sync_await_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
-} xcb_sync_await_request_t;
-
-/** Opcode for xcb_sync_change_counter. */
-#define XCB_SYNC_CHANGE_COUNTER 4
-
-/**
- * @brief xcb_sync_change_counter_request_t
- **/
-typedef struct xcb_sync_change_counter_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_sync_counter_t counter; /**< */
- xcb_sync_int64_t amount; /**< */
-} xcb_sync_change_counter_request_t;
-
-/** Opcode for xcb_sync_set_counter. */
-#define XCB_SYNC_SET_COUNTER 3
-
-/**
- * @brief xcb_sync_set_counter_request_t
- **/
-typedef struct xcb_sync_set_counter_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_sync_counter_t counter; /**< */
- xcb_sync_int64_t value; /**< */
-} xcb_sync_set_counter_request_t;
-
-/** Opcode for xcb_sync_create_alarm. */
-#define XCB_SYNC_CREATE_ALARM 8
-
-/**
- * @brief xcb_sync_create_alarm_request_t
- **/
-typedef struct xcb_sync_create_alarm_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_sync_alarm_t id; /**< */
- uint32_t value_mask; /**< */
-} xcb_sync_create_alarm_request_t;
-
-/** Opcode for xcb_sync_change_alarm. */
-#define XCB_SYNC_CHANGE_ALARM 9
-
-/**
- * @brief xcb_sync_change_alarm_request_t
- **/
-typedef struct xcb_sync_change_alarm_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_sync_alarm_t id; /**< */
- uint32_t value_mask; /**< */
-} xcb_sync_change_alarm_request_t;
-
-/** Opcode for xcb_sync_destroy_alarm. */
-#define XCB_SYNC_DESTROY_ALARM 11
-
-/**
- * @brief xcb_sync_destroy_alarm_request_t
- **/
-typedef struct xcb_sync_destroy_alarm_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_sync_alarm_t alarm; /**< */
-} xcb_sync_destroy_alarm_request_t;
-
-/**
- * @brief xcb_sync_query_alarm_cookie_t
- **/
-typedef struct xcb_sync_query_alarm_cookie_t {
- unsigned int sequence; /**< */
-} xcb_sync_query_alarm_cookie_t;
-
-/** Opcode for xcb_sync_query_alarm. */
-#define XCB_SYNC_QUERY_ALARM 10
-
-/**
- * @brief xcb_sync_query_alarm_request_t
- **/
-typedef struct xcb_sync_query_alarm_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_sync_alarm_t alarm; /**< */
-} xcb_sync_query_alarm_request_t;
-
-/**
- * @brief xcb_sync_query_alarm_reply_t
- **/
-typedef struct xcb_sync_query_alarm_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_sync_trigger_t trigger; /**< */
- xcb_sync_int64_t delta; /**< */
- uint8_t events; /**< */
- uint8_t state; /**< */
- uint8_t pad1[2]; /**< */
-} xcb_sync_query_alarm_reply_t;
-
-/** Opcode for xcb_sync_set_priority. */
-#define XCB_SYNC_SET_PRIORITY 12
-
-/**
- * @brief xcb_sync_set_priority_request_t
- **/
-typedef struct xcb_sync_set_priority_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint32_t id; /**< */
- int32_t priority; /**< */
-} xcb_sync_set_priority_request_t;
-
-/**
- * @brief xcb_sync_get_priority_cookie_t
- **/
-typedef struct xcb_sync_get_priority_cookie_t {
- unsigned int sequence; /**< */
-} xcb_sync_get_priority_cookie_t;
-
-/** Opcode for xcb_sync_get_priority. */
-#define XCB_SYNC_GET_PRIORITY 13
-
-/**
- * @brief xcb_sync_get_priority_request_t
- **/
-typedef struct xcb_sync_get_priority_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint32_t id; /**< */
-} xcb_sync_get_priority_request_t;
-
-/**
- * @brief xcb_sync_get_priority_reply_t
- **/
-typedef struct xcb_sync_get_priority_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- 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
-
-/**
- * @brief xcb_sync_counter_notify_event_t
- **/
-typedef struct xcb_sync_counter_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t kind; /**< */
- uint16_t sequence; /**< */
- xcb_sync_counter_t counter; /**< */
- xcb_sync_int64_t wait_value; /**< */
- xcb_sync_int64_t counter_value; /**< */
- xcb_timestamp_t timestamp; /**< */
- uint16_t count; /**< */
- uint8_t destroyed; /**< */
- uint8_t pad0; /**< */
-} xcb_sync_counter_notify_event_t;
-
-/** Opcode for xcb_sync_alarm_notify. */
-#define XCB_SYNC_ALARM_NOTIFY 1
-
-/**
- * @brief xcb_sync_alarm_notify_event_t
- **/
-typedef struct xcb_sync_alarm_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t kind; /**< */
- uint16_t sequence; /**< */
- xcb_sync_alarm_t alarm; /**< */
- xcb_sync_int64_t counter_value; /**< */
- xcb_sync_int64_t alarm_value; /**< */
- xcb_timestamp_t timestamp; /**< */
- uint8_t state; /**< */
- uint8_t pad0[3]; /**< */
-} xcb_sync_alarm_notify_event_t;
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_sync_alarm_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_alarm_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_sync_alarm_next
- **
- ** @param xcb_sync_alarm_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_alarm_next (xcb_sync_alarm_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_sync_alarm_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_alarm_end
- **
- ** @param xcb_sync_alarm_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_alarm_end (xcb_sync_alarm_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_sync_counter_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_counter_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_sync_counter_next
- **
- ** @param xcb_sync_counter_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_counter_next (xcb_sync_counter_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_sync_counter_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_counter_end
- **
- ** @param xcb_sync_counter_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-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
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_sync_int64_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_sync_int64_next
- **
- ** @param xcb_sync_int64_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_int64_next (xcb_sync_int64_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_sync_int64_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_int64_end
- **
- ** @param xcb_sync_int64_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_int64_end (xcb_sync_int64_iterator_t i /**< */);
-
-int
-xcb_sync_systemcounter_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** char * xcb_sync_systemcounter_name
- **
- ** @param const xcb_sync_systemcounter_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_sync_systemcounter_name (const xcb_sync_systemcounter_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_sync_systemcounter_name_length
- **
- ** @param const xcb_sync_systemcounter_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_sync_systemcounter_name_length (const xcb_sync_systemcounter_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_sync_systemcounter_name_end
- **
- ** @param const xcb_sync_systemcounter_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_systemcounter_name_end (const xcb_sync_systemcounter_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_sync_systemcounter_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_systemcounter_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_sync_systemcounter_next
- **
- ** @param xcb_sync_systemcounter_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_systemcounter_next (xcb_sync_systemcounter_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_sync_systemcounter_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_systemcounter_end
- **
- ** @param xcb_sync_systemcounter_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_systemcounter_end (xcb_sync_systemcounter_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_sync_trigger_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_trigger_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_sync_trigger_next
- **
- ** @param xcb_sync_trigger_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_trigger_next (xcb_sync_trigger_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_sync_trigger_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_trigger_end
- **
- ** @param xcb_sync_trigger_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_trigger_end (xcb_sync_trigger_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_sync_waitcondition_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_waitcondition_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_sync_waitcondition_next
- **
- ** @param xcb_sync_waitcondition_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_waitcondition_next (xcb_sync_waitcondition_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_sync_waitcondition_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_waitcondition_end
- **
- ** @param xcb_sync_waitcondition_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_waitcondition_end (xcb_sync_waitcondition_iterator_t i /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_initialize_cookie_t xcb_sync_initialize
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t desired_major_version
- ** @param uint8_t desired_minor_version
- ** @returns xcb_sync_initialize_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_initialize_cookie_t
-xcb_sync_initialize (xcb_connection_t *c /**< */,
- uint8_t desired_major_version /**< */,
- uint8_t desired_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_sync_initialize_cookie_t xcb_sync_initialize_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t desired_major_version
- ** @param uint8_t desired_minor_version
- ** @returns xcb_sync_initialize_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_initialize_cookie_t
-xcb_sync_initialize_unchecked (xcb_connection_t *c /**< */,
- uint8_t desired_major_version /**< */,
- uint8_t desired_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_sync_initialize_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_initialize_reply_t * xcb_sync_initialize_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_initialize_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_initialize_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_initialize_reply_t *
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_list_system_counters_cookie_t xcb_sync_list_system_counters
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_sync_list_system_counters_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_list_system_counters_cookie_t
-xcb_sync_list_system_counters (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_sync_list_system_counters_cookie_t xcb_sync_list_system_counters_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_sync_list_system_counters_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_list_system_counters_cookie_t
-xcb_sync_list_system_counters_unchecked (xcb_connection_t *c /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_sync_list_system_counters_counters_length
- **
- ** @param const xcb_sync_list_system_counters_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_sync_list_system_counters_counters_length (const xcb_sync_list_system_counters_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_sync_systemcounter_iterator_t xcb_sync_list_system_counters_counters_iterator
- **
- ** @param const xcb_sync_list_system_counters_reply_t *R
- ** @returns xcb_sync_systemcounter_iterator_t
- **
- *****************************************************************************/
-
-xcb_sync_systemcounter_iterator_t
-xcb_sync_list_system_counters_counters_iterator (const xcb_sync_list_system_counters_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_sync_list_system_counters_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_list_system_counters_reply_t * xcb_sync_list_system_counters_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_list_system_counters_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_list_system_counters_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_list_system_counters_reply_t *
-xcb_sync_list_system_counters_reply (xcb_connection_t *c /**< */,
- xcb_sync_list_system_counters_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_counter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t id
- ** @param xcb_sync_int64_t initial_value
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_create_counter_checked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t id /**< */,
- xcb_sync_int64_t initial_value /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_create_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t id
- ** @param xcb_sync_int64_t initial_value
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_create_counter (xcb_connection_t *c /**< */,
- xcb_sync_counter_t id /**< */,
- xcb_sync_int64_t initial_value /**< */);
-
-/**
- *
- * @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_counter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_destroy_counter_checked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_destroy_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_destroy_counter (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_query_counter_cookie_t xcb_sync_query_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @returns xcb_sync_query_counter_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_query_counter_cookie_t
-xcb_sync_query_counter (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */);
-
-/**
- *
- * @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_counter_cookie_t xcb_sync_query_counter_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @returns xcb_sync_query_counter_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_query_counter_cookie_t
-xcb_sync_query_counter_unchecked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */);
-
-/**
- * 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_counter_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_query_counter_reply_t * xcb_sync_query_counter_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_query_counter_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_query_counter_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_query_counter_reply_t *
-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 /**< */);
-
-/**
- *
- * @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_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t wait_list_len
- ** @param const xcb_sync_waitcondition_t *wait_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_await_checked (xcb_connection_t *c /**< */,
- uint32_t wait_list_len /**< */,
- const xcb_sync_waitcondition_t *wait_list /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_await
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t wait_list_len
- ** @param const xcb_sync_waitcondition_t *wait_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_await (xcb_connection_t *c /**< */,
- uint32_t wait_list_len /**< */,
- const xcb_sync_waitcondition_t *wait_list /**< */);
-
-/**
- *
- * @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_change_counter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @param xcb_sync_int64_t amount
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_change_counter_checked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */,
- xcb_sync_int64_t amount /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_change_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @param xcb_sync_int64_t amount
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_change_counter (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */,
- xcb_sync_int64_t amount /**< */);
-
-/**
- *
- * @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_set_counter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @param xcb_sync_int64_t value
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_set_counter_checked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */,
- xcb_sync_int64_t value /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_set_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @param xcb_sync_int64_t value
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-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 /**< */);
-
-/**
- *
- * @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_alarm_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t id
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_create_alarm_checked (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t id /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_create_alarm
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t id
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_create_alarm (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t id /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */);
-
-int
-xcb_sync_change_alarm_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_sync_change_alarm_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t id
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_change_alarm_checked (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t id /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_change_alarm
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t id
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_change_alarm (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t id /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */);
-
-/**
- *
- * @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_alarm_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t alarm
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_destroy_alarm_checked (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t alarm /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_destroy_alarm
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t alarm
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_destroy_alarm (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t alarm /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_query_alarm_cookie_t xcb_sync_query_alarm
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t alarm
- ** @returns xcb_sync_query_alarm_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_query_alarm_cookie_t
-xcb_sync_query_alarm (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t alarm /**< */);
-
-/**
- *
- * @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_alarm_cookie_t xcb_sync_query_alarm_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t alarm
- ** @returns xcb_sync_query_alarm_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_query_alarm_cookie_t
-xcb_sync_query_alarm_unchecked (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t alarm /**< */);
-
-/**
- * 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_alarm_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_query_alarm_reply_t * xcb_sync_query_alarm_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_query_alarm_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_query_alarm_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_query_alarm_reply_t *
-xcb_sync_query_alarm_reply (xcb_connection_t *c /**< */,
- xcb_sync_query_alarm_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_set_priority_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t id
- ** @param int32_t priority
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_set_priority_checked (xcb_connection_t *c /**< */,
- uint32_t id /**< */,
- int32_t priority /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_set_priority
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t id
- ** @param int32_t priority
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_set_priority (xcb_connection_t *c /**< */,
- uint32_t id /**< */,
- int32_t priority /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_get_priority_cookie_t xcb_sync_get_priority
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t id
- ** @returns xcb_sync_get_priority_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_get_priority_cookie_t
-xcb_sync_get_priority (xcb_connection_t *c /**< */,
- uint32_t 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_sync_get_priority_cookie_t xcb_sync_get_priority_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t id
- ** @returns xcb_sync_get_priority_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_get_priority_cookie_t
-xcb_sync_get_priority_unchecked (xcb_connection_t *c /**< */,
- uint32_t 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_sync_get_priority_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_sync_get_priority_reply_t * xcb_sync_get_priority_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_get_priority_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_get_priority_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_get_priority_reply_t *
-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
-}
-#endif
-
-#endif
-
-/**
- * @}
- */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_atom.h b/src/3rdparty/xcb/include/xcb/xcb_atom.h
deleted file mode 100644
index d5c4d6baa7..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_atom.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __XCB_ATOM_H__
-#define __XCB_ATOM_H__
-
-#include <xcb/xcb.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-char *xcb_atom_name_by_screen(const char *base, uint8_t screen);
-char *xcb_atom_name_by_resource(const char *base, uint32_t resource);
-char *xcb_atom_name_unique(const char *base, uint32_t id);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __XCB_ATOM_H__ */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_aux.h b/src/3rdparty/xcb/include/xcb/xcb_aux.h
deleted file mode 100644
index d49d4383e9..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_aux.h
+++ /dev/null
@@ -1,214 +0,0 @@
-#ifndef __XCB_AUX_H__
-#define __XCB_AUX_H__
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-uint8_t xcb_aux_get_depth (xcb_connection_t *c,
- xcb_screen_t *screen);
-
-uint8_t xcb_aux_get_depth_of_visual (xcb_screen_t *screen,
- xcb_visualid_t id);
-
-xcb_screen_t *xcb_aux_get_screen (xcb_connection_t *c,
- int screen);
-
-xcb_visualtype_t *xcb_aux_get_visualtype (xcb_connection_t *c,
- int screen,
- xcb_visualid_t vid);
-
-xcb_visualtype_t *
-xcb_aux_find_visual_by_id (xcb_screen_t *screen,
- xcb_visualid_t id);
-
-xcb_visualtype_t *
-xcb_aux_find_visual_by_attrs (xcb_screen_t *screen,
- int8_t class_,
- int8_t depth);
-
-void xcb_aux_sync (xcb_connection_t *c);
-
-/* internal helper macro for XCB_AUX_ADD_PARAM
-It gives the offset of the field 'param' in the structure pointed to by
-'paramsp' in multiples of an uint32_t's size. */
-#define XCB_AUX_INTERNAL_OFFSETOF(paramsp, param) \
- ((uint32_t const*)(&((paramsp)->param))-(uint32_t const*)(paramsp))
-
-/* add an optional parameter to an xcb_params_* structure
-parameters:
- maskp: pointer to bitmask whos bits mark used parameters
- paramsp: pointer to structure with parameters
- param: parameter to set
- value: value to set the parameter to
-*/
-#define XCB_AUX_ADD_PARAM(maskp, paramsp, param, value) \
- ((*(maskp)|=1<<XCB_AUX_INTERNAL_OFFSETOF((paramsp),param)), \
- ((paramsp)->param=(value)))
-
-typedef struct {
- uint32_t back_pixmap;
- uint32_t back_pixel;
- uint32_t border_pixmap;
- uint32_t border_pixel;
- uint32_t bit_gravity;
- uint32_t win_gravity;
- uint32_t backing_store;
- uint32_t backing_planes;
- uint32_t backing_pixel;
- uint32_t override_redirect;
- uint32_t save_under;
- uint32_t event_mask;
- uint32_t dont_propagate;
- uint32_t colormap;
- uint32_t cursor;
-} xcb_params_cw_t;
-
-xcb_void_cookie_t
-xcb_aux_create_window (xcb_connection_t *c,
- uint8_t depth,
- xcb_window_t wid,
- xcb_window_t parent,
- int16_t x,
- int16_t y,
- uint16_t width,
- uint16_t height,
- uint16_t border_width,
- uint16_t class_,
- xcb_visualid_t visual,
- uint32_t mask,
- const xcb_params_cw_t *params);
-
-xcb_void_cookie_t
-xcb_aux_create_window_checked (xcb_connection_t *c,
- uint8_t depth,
- xcb_window_t wid,
- xcb_window_t parent,
- int16_t x,
- int16_t y,
- uint16_t width,
- uint16_t height,
- uint16_t border_width,
- uint16_t class_,
- xcb_visualid_t visual,
- uint32_t mask,
- const xcb_params_cw_t *params);
-
-xcb_void_cookie_t
-xcb_aux_change_window_attributes (xcb_connection_t *c,
- xcb_window_t window,
- uint32_t mask,
- const xcb_params_cw_t *params);
-
-xcb_void_cookie_t
-xcb_aux_change_window_attributes_checked (xcb_connection_t *c,
- xcb_window_t window,
- uint32_t mask,
- const xcb_params_cw_t *params);
-
-typedef struct {
- int32_t x;
- int32_t y;
- uint32_t width;
- uint32_t height;
- uint32_t border_width;
- uint32_t sibling;
- uint32_t stack_mode;
-} xcb_params_configure_window_t;
-
-xcb_void_cookie_t
-xcb_aux_configure_window (xcb_connection_t *c,
- xcb_window_t window,
- uint16_t mask,
- const xcb_params_configure_window_t *params);
-
-typedef struct {
- uint32_t function;
- uint32_t plane_mask;
- uint32_t foreground;
- uint32_t background;
- uint32_t line_width;
- uint32_t line_style;
- uint32_t cap_style;
- uint32_t join_style;
- uint32_t fill_style;
- uint32_t fill_rule;
- uint32_t tile;
- uint32_t stipple;
- uint32_t tile_stipple_origin_x;
- uint32_t tile_stipple_origin_y;
- uint32_t font;
- uint32_t subwindow_mode;
- uint32_t graphics_exposures;
- uint32_t clip_originX;
- uint32_t clip_originY;
- uint32_t mask;
- uint32_t dash_offset;
- uint32_t dash_list;
- uint32_t arc_mode;
-} xcb_params_gc_t;
-
-xcb_void_cookie_t
-xcb_aux_create_gc (xcb_connection_t *c,
- xcb_gcontext_t cid,
- xcb_drawable_t drawable,
- uint32_t mask,
- const xcb_params_gc_t *params);
-
-xcb_void_cookie_t
-xcb_aux_create_gc_checked (xcb_connection_t *c,
- xcb_gcontext_t gid,
- xcb_drawable_t drawable,
- uint32_t mask,
- const xcb_params_gc_t *params);
-xcb_void_cookie_t
-xcb_aux_change_gc (xcb_connection_t *c,
- xcb_gcontext_t gc,
- uint32_t mask,
- const xcb_params_gc_t *params);
-
-xcb_void_cookie_t
-xcb_aux_change_gc_checked (xcb_connection_t *c,
- xcb_gcontext_t gc,
- uint32_t mask,
- const xcb_params_gc_t *params);
-typedef struct {
- uint32_t key_click_percent;
- uint32_t bell_percent;
- uint32_t bell_pitch;
- uint32_t bell_duration;
- uint32_t led;
- uint32_t led_mode;
- uint32_t key;
- uint32_t auto_repeat_mode;
-} xcb_params_keyboard_t;
-
-xcb_void_cookie_t
-xcb_aux_change_keyboard_control (xcb_connection_t *c,
- uint32_t mask,
- const xcb_params_keyboard_t *params);
-
-int
-xcb_aux_parse_color(char *color_name,
- uint16_t *red, uint16_t *green, uint16_t *blue);
-
-xcb_void_cookie_t
-xcb_aux_set_line_attributes_checked (xcb_connection_t *dpy,
- xcb_gcontext_t gc,
- uint16_t linewidth,
- int32_t linestyle,
- int32_t capstyle,
- int32_t joinstyle);
-
-xcb_void_cookie_t
-xcb_aux_clear_window(xcb_connection_t * dpy,
- xcb_window_t w);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __XCB_AUX_H__ */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_bitops.h b/src/3rdparty/xcb/include/xcb/xcb_bitops.h
deleted file mode 100644
index a6872a1f30..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_bitops.h
+++ /dev/null
@@ -1,212 +0,0 @@
-#ifndef __XCB_BITOPS_H__
-#define __XCB_BITOPS_H__
-
-/* Copyright (C) 2007 Bart Massey
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or their
- * institutions shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization from the authors.
- */
-
-#include <assert.h>
-#include <inttypes.h>
-#include <X11/Xfuncproto.h>
-
-/**
- * @defgroup xcb__bitops XCB Bit Operations
- *
- * Inline functions for common bit ops used in XCB and elsewhere.
- *
- * @{
- */
-
-
-/**
- * Create a low-order bitmask.
- * @param n Mask size.
- * @return Mask.
- *
- * Create a bitmask with the lower @p n bits set and the
- * rest of the word clear.
- * @ingroup xcb__bitops
- */
-_X_INLINE static uint32_t
-xcb_mask(uint32_t n)
-{
- return n == 32 ? ~0 : (1 << n) - 1;
-}
-
-
-/**
- * Population count.
- * @param n Integer representing a bitset.
- * @return Number of 1 bits in the bitset.
- *
- * This is a reasonably fast algorithm for counting the bits
- * in a 32-bit word. Currently a classic binary
- * divide-and-conquer popcount: popcount_2() from
- * http://en.wikipedia.org/wiki/Hamming_weight.
- * @ingroup xcb__bitops
- */
-
-
-/* 15 ops, 3 long immediates, 14 stages, 9 alu ops, 9 alu stages */
-_X_INLINE static uint32_t
-xcb_popcount(uint32_t x)
-{
- uint32_t m1 = 0x55555555;
- uint32_t m2 = 0x33333333;
- uint32_t m4 = 0x0f0f0f0f;
- x -= (x >> 1) & m1;
- x = (x & m2) + ((x >> 2) & m2);
- x = (x + (x >> 4)) & m4;
- x += x >> 8;
- return (x + (x >> 16)) & 0x3f;
-}
-
-
-/**
- * Round up to the next power-of-two unit size.
- * @param base Number to be rounded up.
- * @param pad Multiple to be rounded to; must be a power of two.
- * @return Rounded-up number.
- *
- * Rounds @p base up to a multiple of @p pad, where @p pad
- * is a power of two. The more general case is handled by
- * xcb_roundup().
- * @ingroup xcb__bitops
- */
-_X_INLINE static uint32_t
-xcb_roundup_2 (uint32_t base, uint32_t pad)
-{
- return (base + pad - 1) & -pad;
-}
-
-/**
- * Round down to the next power-of-two unit size.
- * @param base Number to be rounded down.
- * @param pad Multiple to be rounded to; must be a power of two.
- * @return Rounded-down number.
- *
- * Rounds @p base down to a multiple of @p pad, where @p pad
- * is a power of two. The more general case is handled by
- * xcb_rounddown().
- * @ingroup xcb__bitops
- */
-_X_INLINE static uint32_t
-xcb_rounddown_2 (uint32_t base, uint32_t pad)
-{
- return base & -pad;
-}
-
-/**
- * Round up to the next unit size.
- * @param base Number to be rounded up.
- * @param pad Multiple to be rounded to.
- * @return Rounded-up number.
- *
- * This is a general routine for rounding @p base up
- * to a multiple of @p pad. If you know that @p pad
- * is a power of two, you should probably call xcb_roundup_2()
- * instead.
- * @ingroup xcb__bitops
- */
-_X_INLINE static uint32_t
-xcb_roundup (uint32_t base, uint32_t pad)
-{
- uint32_t b = base + pad - 1;
- /* faster if pad is a power of two */
- if (((pad - 1) & pad) == 0)
- return b & -pad;
- return b - b % pad;
-}
-
-
-/**
- * Round down to the next unit size.
- * @param base Number to be rounded down.
- * @param pad Multiple to be rounded to.
- * @return Rounded-down number.
- *
- * This is a general routine for rounding @p base down
- * to a multiple of @p pad. If you know that @p pad
- * is a power of two, you should probably call xcb_rounddown_2()
- * instead.
- * @ingroup xcb__bitops
- */
-_X_INLINE static uint32_t
-xcb_rounddown (uint32_t base, uint32_t pad)
-{
- /* faster if pad is a power of two */
- if (((pad - 1) & pad) == 0)
- return base & -pad;
- return base - base % pad;
-}
-
-
-/**
- * Reverse bits of word.
- * @param x Target word.
- * @param n Number of low-order bits to reverse.
- * @return Word with low @p n bits reversed, all others 0.
- *
- * Reverses the bottom @p n bits of @p x.
- * @ingroup xcb__bitops
- */
-_X_INLINE static uint32_t
-xcb_bit_reverse(uint32_t x, uint8_t n) {
- uint32_t m1 = 0x00ff00ff;
- uint32_t m2 = 0x0f0f0f0f;
- uint32_t m3 = 0x33333333;
- uint32_t m4 = 0x55555555;
- x = ((x << 16) | (x >> 16));
- x = ((x & m1) << 8) | ((x >> 8) & m1);
- x = ((x & m2) << 4) | ((x >> 4) & m2);
- x = ((x & m3) << 2) | ((x >> 2) & m3);
- x = ((x & m4) << 1) | ((x >> 1) & m4);
- x >>= 32 - n;
- return x;
-}
-
-
-/**
- * Host byte order.
- * @return The byte order of the host.
- *
- * Tests the host's byte order and returns either
- * XCB_IMAGE_ORDER_MSB_FIRST or XCB_IMAGE_ORDER_LSB_FIRST
- * as appropriate.
- * @ingroup xcb__bitops
- */
-_X_INLINE static xcb_image_order_t
-xcb_host_byte_order(void) {
- uint32_t endian_test = 0x01020304;
-
- switch (*(char *)&endian_test) {
- case 0x01:
- return XCB_IMAGE_ORDER_MSB_FIRST;
- case 0x04:
- return XCB_IMAGE_ORDER_LSB_FIRST;
- }
- assert(0);
-}
-
-#endif /* __XCB_BITOPS_H__ */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_event.h b/src/3rdparty/xcb/include/xcb/xcb_event.h
deleted file mode 100644
index ee911fce51..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_event.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Julien Danjou <julien@danjou.info>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or
- * their institutions shall not be used in advertising or otherwise to
- * promote the sale, use or other dealings in this Software without
- * prior written authorization from the authors.
- */
-
-/**
- * @defgroup xcb__event_t XCB Event Functions
- *
- * These functions ease the handling of X events received.
- *
- * @{
- */
-
-#ifndef __XCB_EVENT_H__
-#define __XCB_EVENT_H__
-
-#include <xcb/xcb.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief Bit mask to find event type regardless of event source.
- *
- * Each event in the X11 protocol contains an 8-bit type code.
- * The most-significant bit in this code is set if the event was
- * generated from a SendEvent request. This mask can be used to
- * determine the type of event regardless of how the event was
- * generated. See the X11R6 protocol specification for details.
- */
-#define XCB_EVENT_RESPONSE_TYPE_MASK (0x7f)
-#define XCB_EVENT_RESPONSE_TYPE(e) (e->response_type & XCB_EVENT_RESPONSE_TYPE_MASK)
-#define XCB_EVENT_SENT(e) (e->response_type & ~XCB_EVENT_RESPONSE_TYPE_MASK)
-
-/**
- * @brief Convert an event response type to a label.
- * @param type The event type.
- * @return A string with the event name, or NULL if unknown.
- */
-const char * xcb_event_get_label(uint8_t type);
-
-/**
- * @brief Convert an event error type to a label.
- * @param type The error type.
- * @return A string with the event name, or NULL if unknown or if the event is
- * not an error.
- */
-const char * xcb_event_get_error_label(uint8_t type);
-
-/**
- * @brief Convert an event request type to a label.
- * @param type The request type.
- * @return A string with the event name, or NULL if unknown or if the event is
- * not an error.
- */
-const char * xcb_event_get_request_label(uint8_t type);
-
-#ifdef __cplusplus
-}
-#endif
-
-/**
- * @}
- */
-
-#endif /* __XCB_EVENT_H__ */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_icccm.h b/src/3rdparty/xcb/include/xcb/xcb_icccm.h
deleted file mode 100644
index 449a5c88ca..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_icccm.h
+++ /dev/null
@@ -1,1049 +0,0 @@
-#ifndef __XCB_ICCCM_H__
-#define __XCB_ICCCM_H__
-
-/*
- * Copyright (C) 2008 Arnaud Fontaine <arnau@debian.org>
- * Copyright (C) 2007-2008 Vincent Torri <vtorri@univ-evry.fr>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or
- * their institutions shall not be used in advertising or otherwise to
- * promote the sale, use or other dealings in this Software without
- * prior written authorization from the authors.
- */
-
-/**
- * @defgroup xcb__icccm_t XCB ICCCM Functions
- *
- * These functions allow easy handling of the protocol described in the
- * Inter-Client Communication Conventions Manual.
- *
- * @{
- */
-
-#include <xcb/xcb.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief TextProperty reply structure.
- */
-typedef struct {
-/** Store reply to avoid memory allocation, should normally not be
- used directly */
-xcb_get_property_reply_t *_reply;
-/** Encoding used */
-xcb_atom_t encoding;
-/** Length of the name field above */
-uint32_t name_len;
-/** Property value */
-char *name;
-/** Format, may be 8, 16 or 32 */
-uint8_t format;
-} xcb_icccm_get_text_property_reply_t;
-
-/**
- * @brief Deliver a GetProperty request to the X server.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param property Property atom to get.
- * @return The request cookie.
- *
- * Allow to get a window property, in most case you might want to use
- * above functions to get an ICCCM property for a given window.
- */
-xcb_get_property_cookie_t xcb_icccm_get_text_property(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property);
-
-/**
- * @see xcb_icccm_get_text_property()
- */
-xcb_get_property_cookie_t xcb_icccm_get_text_property_unchecked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property);
-
-/**
- * @brief Fill given structure with the property value of a window.
- * @param c The connection to the X server.
- * @param cookie TextProperty request cookie.
- * @param prop TextProperty reply which is to be filled.
- * @param e Error if any.
- * @return Return 1 on success, 0 otherwise.
- *
- * If the function return 0 (failure), the content of prop is unmodified and
- * therefore the structure must not be wiped.
- *
- * The parameter e supplied to this function must be NULL if
- * xcb_icccm_get_text_property_unchecked() is used. Otherwise, it stores
- * the error if any. prop structure members should be freed by
- * xcb_icccm_get_text_property_reply_wipe().
- */
-uint8_t xcb_icccm_get_text_property_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_text_property_reply_t *prop,
- xcb_generic_error_t **e);
-
-/**
- * @brief Wipe prop structure members previously allocated by
- * xcb_icccm_get_text_property_reply().
- * @param prop prop structure whose members is going to be freed.
- */
-void xcb_icccm_get_text_property_reply_wipe(xcb_icccm_get_text_property_reply_t *prop);
-
-/* WM_NAME */
-
-/**
- * @brief Deliver a SetProperty request to set WM_NAME property value.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type.
- * @param format Encoding format.
- * @param name_len Length of name value to set.
- * @param name Name value to set.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_name_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint8_t format,
- uint32_t name_len,
- const char *name);
-
-/**
- * @see xcb_icccm_set_wm_name_checked()
- */
-xcb_void_cookie_t xcb_icccm_set_wm_name(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint8_t format,
- uint32_t name_len, const char *name);
-
-/**
- * @brief Deliver a GetProperty request to the X server for WM_NAME.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_name(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @see xcb_icccm_get_wm_name()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_name_unchecked(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @brief Fill given structure with the WM_NAME property of a window.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param prop WM_NAME property value.
- * @param e Error if any.
- * @see xcb_icccm_get_text_property_reply()
- * @return Return 1 on success, 0 otherwise.
- */
-uint8_t xcb_icccm_get_wm_name_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_text_property_reply_t *prop,
- xcb_generic_error_t **e);
-
-/* WM_ICON_NAME */
-
-/**
- * @brief Deliver a SetProperty request to set WM_ICON_NAME property value.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type.
- * @param format Encoding format.
- * @param name_len Length of name value to set.
- * @param name Name value to set.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_icon_name_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint8_t format,
- uint32_t name_len,
- const char *name);
-
-/**
- * @see xcb_icccm_set_wm_icon_name_checked()
- */
-xcb_void_cookie_t xcb_icccm_set_wm_icon_name(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint8_t format,
- uint32_t name_len,
- const char *name);
-
-/**
- * @brief Send request to get WM_ICON_NAME property of a window.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_icon_name(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @see xcb_icccm_get_wm_icon_name()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_icon_name_unchecked(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @brief Fill given structure with the WM_ICON_NAME property of a window.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param prop WM_ICON_NAME property value.
- * @param e Error if any.
- * @see xcb_icccm_get_text_property_reply()
- * @return Return 1 on success, 0 otherwise.
- */
-uint8_t xcb_icccm_get_wm_icon_name_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_text_property_reply_t *prop,
- xcb_generic_error_t **e);
-
-/* WM_COLORMAP_WINDOWS */
-
-/**
- * @brief Deliver a ChangeProperty request to set WM_COLORMAP_WINDOWS property value.
- * @param c The connection to the X server.
- * @param wm_colormap_windows The WM_COLORMAP_WINDOWS atom
- * @param window Window X identifier.
- * @param list_len Windows list len.
- * @param list Windows list.
- * @return The request cookie.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_colormap_windows_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_colormap_windows_atom,
- uint32_t list_len,
- const xcb_window_t *list);
-
-/**
- * @see xcb_icccm_set_wm_colormap_windows_checked()
- */
-xcb_void_cookie_t xcb_icccm_set_wm_colormap_windows(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_colormap_windows_atom,
- uint32_t list_len,
- const xcb_window_t *list);
-
-/**
- * @brief WM_COLORMAP_WINDOWS structure.
- */
-typedef struct {
-/** Length of the windows list */
-uint32_t windows_len;
-/** Windows list */
-xcb_window_t *windows;
-/** Store reply to avoid memory allocation, should normally not be
- used directly */
-xcb_get_property_reply_t *_reply;
-} xcb_icccm_get_wm_colormap_windows_reply_t;
-
-/**
- * @brief Send request to get WM_COLORMAP_WINDOWS property of a given window.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_colormap_windows(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_colormap_windows_atom);
-
-/**
- * @see xcb_icccm_get_wm_colormap_windows()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_colormap_windows_unchecked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_colormap_windows_atom);
-
-/**
- * @brief Fill the given structure with the WM_COLORMAP_WINDOWS property of a window.
- * @param reply The reply of the GetProperty request.
- * @param colormap_windows WM_COLORMAP property value.
- * @return Return 1 on success, 0 otherwise.
- *
- * protocols structure members should be freed by
- * xcb_icccm_get_wm_protocols_reply_wipe().
- */
-uint8_t xcb_icccm_get_wm_colormap_windows_from_reply(xcb_get_property_reply_t *reply,
- xcb_icccm_get_wm_colormap_windows_reply_t *colormap_windows);
-/**
- * @brief Fill the given structure with the WM_COLORMAP_WINDOWS property of a window.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param protocols WM_COLORMAP_WINDOWS property value.
- * @param e Error if any.
- * @return Return 1 on success, 0 otherwise.
- *
- * The parameter e supplied to this function must be NULL if
- * xcb_icccm_get_wm_colormap_windows_unchecked() is used. Otherwise, it
- * stores the error if any. protocols structure members should be
- * freed by xcb_icccm_get_wm_colormap_windows_reply_wipe().
- */
-uint8_t xcb_icccm_get_wm_colormap_windows_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_wm_colormap_windows_reply_t *windows,
- xcb_generic_error_t **e);
-
-/**
- * @brief Wipe protocols structure members previously allocated by
- * xcb_icccm_get_wm_colormap_windows_reply().
- * @param windows windows structure whose members is going to be freed.
- */
-void xcb_icccm_get_wm_colormap_windows_reply_wipe(xcb_icccm_get_wm_colormap_windows_reply_t *windows);
-
-/* WM_CLIENT_MACHINE */
-
-/**
- * @brief Deliver a SetProperty request to set WM_CLIENT_MACHINE property value.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type.
- * @param format Encoding format.
- * @param name_len Length of name value to set.
- * @param name Name value to set.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_client_machine_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint8_t format,
- uint32_t name_len,
- const char *name);
-
-/**
- * @see xcb_icccm_set_wm_client_machine_checked()
- */
-xcb_void_cookie_t xcb_icccm_set_wm_client_machine(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint8_t format,
- uint32_t name_len,
- const char *name);
-
-/**
- * @brief Send request to get WM_CLIENT_MACHINE property of a window.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_client_machine(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @see xcb_icccm_get_wm_client_machine()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_client_machine_unchecked(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @brief Fill given structure with the WM_CLIENT_MACHINE property of a window.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param prop WM_CLIENT_MACHINE property value.
- * @param e Error if any.
- * @see xcb_icccm_get_text_property_reply()
- * @return Return 1 on success, 0 otherwise.
- */
-uint8_t xcb_icccm_get_wm_client_machine_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_text_property_reply_t *prop,
- xcb_generic_error_t **e);
-
-/* WM_CLASS */
-
-/**
- * @brief WM_CLASS hint structure
- */
-
-/**
- * @brief Deliver a SetProperty request to set WM_CLASS property value.
- *
- * WM_CLASS string is a concatenation of the instance and class name
- * strings respectively (including null character).
- *
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param class_len Length of WM_CLASS string.
- * @param class_name WM_CLASS string.
- * @return The request cookie.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_class_checked(xcb_connection_t *c,
- xcb_window_t window,
- uint32_t class_len,
- const char *class_name);
-
-/**
- * @see xcb_icccm_set_wm_class_checked()
- */
-xcb_void_cookie_t xcb_icccm_set_wm_class(xcb_connection_t *c,
- xcb_window_t window,
- uint32_t class_len,
- const char *class_name);
-
-typedef struct {
-/** Instance name */
-char *instance_name;
-/** Class of application */
-char *class_name;
-/** Store reply to avoid memory allocation, should normally not be
- used directly */
-xcb_get_property_reply_t *_reply;
-} xcb_icccm_get_wm_class_reply_t;
-
-/**
- * @brief Deliver a GetProperty request to the X server for WM_CLASS.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_class(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @see xcb_icccm_get_wm_class()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_class_unchecked(xcb_connection_t *c,
- xcb_window_t window);
-
-
-/**
- * @brief Fill give structure with the WM_CLASS property of a window.
- * @param prop The property structure to fill.
- * @param reply The property request reply.
- * @return Return 1 on success, 0 otherwise.
- */
-uint8_t
-xcb_icccm_get_wm_class_from_reply(xcb_icccm_get_wm_class_reply_t *prop,
- xcb_get_property_reply_t *reply);
-
-/**
- * @brief Fill given structure with the WM_CLASS property of a window.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param prop WM_CLASS property value.
- * @param e Error if any.
- * @return Return 1 on success, 0 otherwise.
- *
- * The parameter e supplied to this function must be NULL if
- * xcb_icccm_get_wm_class_unchecked() is used. Otherwise, it stores the
- * error if any. prop structure members should be freed by
- * xcb_icccm_get_wm_class_reply_wipe().
- */
-uint8_t xcb_icccm_get_wm_class_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_wm_class_reply_t *prop,
- xcb_generic_error_t **e);
-
-/**
- * @brief Wipe prop structure members previously allocated by
- * xcb_icccm_get_wm_class_reply().
- * @param prop prop structure whose members is going to be freed.
- */
-void xcb_icccm_get_wm_class_reply_wipe(xcb_icccm_get_wm_class_reply_t *prop);
-
-/* WM_TRANSIENT_FOR */
-
-/**
- * @brief Deliver a SetProperty request to set WM_TRANSIENT_FOR property value.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param transient_for_window The WM_TRANSIENT_FOR window X identifier.
- * @return The request cookie.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_transient_for_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_window_t transient_for_window);
-
-/**
- * @see xcb_icccm_set_wm_transient_for
- */
-xcb_void_cookie_t xcb_icccm_set_wm_transient_for(xcb_connection_t *c,
- xcb_window_t window,
- xcb_window_t transient_for_window);
-
-/**
- * @brief Send request to get WM_TRANSIENT_FOR property of a window.
- * @param c The connection to the X server
- * @param window Window X identifier.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_transient_for(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @see xcb_icccm_get_wm_transient_for_unchecked()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_transient_for_unchecked(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @brief Fill given window pointer with the WM_TRANSIENT_FOR property of a window.
- * @param prop WM_TRANSIENT_FOR property value.
- * @param reply The get property request reply.
- * @return Return 1 on success, 0 otherwise.
- */
-uint8_t
-xcb_icccm_get_wm_transient_for_from_reply(xcb_window_t *prop,
- xcb_get_property_reply_t *reply);
-/**
- * @brief Fill given structure with the WM_TRANSIENT_FOR property of a window.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param prop WM_TRANSIENT_FOR property value.
- * @param e Error if any.
- * @return Return 1 on success, 0 otherwise.
- *
- * The parameter e supplied to this function must be NULL if
- * xcb_icccm_get_wm_transient_for_unchecked() is used. Otherwise, it stores
- * the error if any.
- */
-uint8_t xcb_icccm_get_wm_transient_for_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_window_t *prop,
- xcb_generic_error_t **e);
-
-/* WM_SIZE_HINTS */
-
-typedef enum {
-XCB_ICCCM_SIZE_HINT_US_POSITION = 1 << 0,
- XCB_ICCCM_SIZE_HINT_US_SIZE = 1 << 1,
- XCB_ICCCM_SIZE_HINT_P_POSITION = 1 << 2,
- XCB_ICCCM_SIZE_HINT_P_SIZE = 1 << 3,
- XCB_ICCCM_SIZE_HINT_P_MIN_SIZE = 1 << 4,
- XCB_ICCCM_SIZE_HINT_P_MAX_SIZE = 1 << 5,
- XCB_ICCCM_SIZE_HINT_P_RESIZE_INC = 1 << 6,
- XCB_ICCCM_SIZE_HINT_P_ASPECT = 1 << 7,
- XCB_ICCCM_SIZE_HINT_BASE_SIZE = 1 << 8,
- XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY = 1 << 9
- } xcb_icccm_size_hints_flags_t;
-
-/**
- * @brief Size hints structure.
- */
-typedef struct {
-/** User specified flags */
-uint32_t flags;
-/** User-specified position */
-int32_t x, y;
-/** User-specified size */
-int32_t width, height;
-/** Program-specified minimum size */
-int32_t min_width, min_height;
-/** Program-specified maximum size */
-int32_t max_width, max_height;
-/** Program-specified resize increments */
-int32_t width_inc, height_inc;
-/** Program-specified minimum aspect ratios */
-int32_t min_aspect_num, min_aspect_den;
-/** Program-specified maximum aspect ratios */
-int32_t max_aspect_num, max_aspect_den;
-/** Program-specified base size */
-int32_t base_width, base_height;
-/** Program-specified window gravity */
-uint32_t win_gravity;
-} xcb_size_hints_t;
-
-/** Number of elements in this structure */
-#define XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS 18
-
-/**
- * @brief Set size hints to a given position.
- * @param hints SIZE_HINTS structure.
- * @param user_specified Is the size user-specified?
- * @param x The X position.
- * @param y The Y position.
- */
-void xcb_icccm_size_hints_set_position(xcb_size_hints_t *hints, int user_specified,
- int32_t x, int32_t y);
-
-/**
- * @brief Set size hints to a given size.
- * @param hints SIZE_HINTS structure.
- * @param user_specified is the size user-specified?
- * @param width The width.
- * @param height The height.
- */
-void xcb_icccm_size_hints_set_size(xcb_size_hints_t *hints, int user_specified,
- int32_t width, int32_t height);
-
-/**
- * @brief Set size hints to a given minimum size.
- * @param hints SIZE_HINTS structure.
- * @param width The minimum width.
- * @param height The minimum height.
- */
-void xcb_icccm_size_hints_set_min_size(xcb_size_hints_t *hints, int32_t min_width,
- int32_t min_height);
-
-/**
- * @brief Set size hints to a given maximum size.
- * @param hints SIZE_HINTS structure.
- * @param width The maximum width.
- * @param height The maximum height.
- */
-void xcb_icccm_size_hints_set_max_size(xcb_size_hints_t *hints, int32_t max_width,
- int32_t max_height);
-
-/**
- * @brief Set size hints to a given resize increments.
- * @param hints SIZE_HINTS structure.
- * @param width The resize increments width.
- * @param height The resize increments height.
- */
-void xcb_icccm_size_hints_set_resize_inc(xcb_size_hints_t *hints, int32_t width_inc,
- int32_t height_inc);
-
-/**
- * @brief Set size hints to a given aspect ratios.
- * @param hints SIZE_HINTS structure.
- * @param min_aspect_num The minimum aspect ratios for the width.
- * @param min_aspect_den The minimum aspect ratios for the height.
- * @param max_aspect_num The maximum aspect ratios for the width.
- * @param max_aspect_den The maximum aspect ratios for the height.
- */
-void xcb_icccm_size_hints_set_aspect(xcb_size_hints_t *hints, int32_t min_aspect_num,
- int32_t min_aspect_den, int32_t max_aspect_num,
- int32_t max_aspect_den);
-
-/**
- * @brief Set size hints to a given base size.
- * @param hints SIZE_HINTS structure.
- * @param base_width Base width.
- * @param base_height Base height.
- */
-void xcb_icccm_size_hints_set_base_size(xcb_size_hints_t *hints, int32_t base_width,
- int32_t base_height);
-
-/**
- * @brief Set size hints to a given window gravity.
- * @param hints SIZE_HINTS structure.
- * @param win_gravity Window gravity value.
- */
-void xcb_icccm_size_hints_set_win_gravity(xcb_size_hints_t *hints,
- xcb_gravity_t win_gravity);
-
-/**
- * @brief Deliver a ChangeProperty request to set a value to a given property.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param property Property to set value for.
- * @param hints Hints value to set.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_size_hints_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property,
- xcb_size_hints_t *hints);
-
-/**
- * @see xcb_icccm_set_wm_size_hints_checked()
- */
-xcb_void_cookie_t xcb_icccm_set_wm_size_hints(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property,
- xcb_size_hints_t *hints);
-
-/**
- * @brief Send request to get size hints structure for the named property.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param property Specify the property name.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_size_hints(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property);
-
-/**
- * @see xcb_icccm_get_wm_size_hints()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_size_hints_unchecked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property);
-
-/**
- * @brief Fill given structure with the size hints of the named property.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param hints Size hints structure.
- * @param e Error if any.
- * @return Return 1 on success, 0 otherwise.
- *
- * The parameter e supplied to this function must be NULL if
- * xcb_icccm_get_wm_size_hints_unchecked() is used. Otherwise, it stores
- * the error if any. The returned pointer should be freed.
- */
-uint8_t xcb_icccm_get_wm_size_hints_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_size_hints_t *hints,
- xcb_generic_error_t **e);
-
-/* WM_NORMAL_HINTS */
-
-/**
- * @brief Deliver a ChangeProperty request to set WM_NORMAL_HINTS property value.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param hints Hints value to set.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_normal_hints_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_size_hints_t *hints);
-
-/**
- * @see xcb_icccm_set_wm_normal_hints_checked()
- */
-xcb_void_cookie_t xcb_icccm_set_wm_normal_hints(xcb_connection_t *c,
- xcb_window_t window,
- xcb_size_hints_t *hints);
-
-/**
- * @brief Send request to get WM_NORMAL_HINTS property of a window.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_normal_hints(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @see xcb_icccm_get_wm_normal_hints()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_normal_hints_unchecked(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @brief Fill given structure with the WM_NORMAL_HINTS property of a window.
- * @param hints WM_NORMAL_HINTS property value.
- * @param reply The get property request reply.
- * @return Return 1 on success, 0 otherwise.
- */
-uint8_t
-xcb_icccm_get_wm_size_hints_from_reply(xcb_size_hints_t *hints,
- xcb_get_property_reply_t *reply);
-
-/**
- * @brief Fill given structure with the WM_NORMAL_HINTS property of a window.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param hints WM_NORMAL_HINTS property value.
- * @param e Error if any.
- * @return Return 1 on success, 0 otherwise.
- *
- * The parameter e supplied to this function must be NULL if
- * xcb_icccm_get_wm_normal_hints_unchecked() is used. Otherwise, it stores
- * the error if any. The returned pointer should be freed.
- */
-uint8_t xcb_icccm_get_wm_normal_hints_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_size_hints_t *hints,
- xcb_generic_error_t **e);
-
-/* WM_HINTS */
-
-/**
- * @brief WM hints structure (may be extended in the future).
- */
-typedef struct {
-/** Marks which fields in this structure are defined */
-int32_t flags;
-/** Does this application rely on the window manager to get keyboard
- input? */
- uint32_t input;
- /** See below */
- int32_t initial_state;
- /** Pixmap to be used as icon */
- xcb_pixmap_t icon_pixmap;
- /** Window to be used as icon */
- xcb_window_t icon_window;
- /** Initial position of icon */
- int32_t icon_x, icon_y;
- /** Icon mask bitmap */
- xcb_pixmap_t icon_mask;
- /* Identifier of related window group */
- xcb_window_t window_group;
-} xcb_icccm_wm_hints_t;
-
-/** Number of elements in this structure */
-#define XCB_ICCCM_NUM_WM_HINTS_ELEMENTS 9
-
-/**
- * @brief WM_HINTS window states.
- */
-typedef enum {
- XCB_ICCCM_WM_STATE_WITHDRAWN = 0,
- XCB_ICCCM_WM_STATE_NORMAL = 1,
- XCB_ICCCM_WM_STATE_ICONIC = 3
-} xcb_icccm_wm_state_t;
-
-typedef enum {
- XCB_ICCCM_WM_HINT_INPUT = (1L << 0),
- XCB_ICCCM_WM_HINT_STATE = (1L << 1),
- XCB_ICCCM_WM_HINT_ICON_PIXMAP = (1L << 2),
- XCB_ICCCM_WM_HINT_ICON_WINDOW = (1L << 3),
- XCB_ICCCM_WM_HINT_ICON_POSITION = (1L << 4),
- XCB_ICCCM_WM_HINT_ICON_MASK = (1L << 5),
- XCB_ICCCM_WM_HINT_WINDOW_GROUP = (1L << 6),
- XCB_ICCCM_WM_HINT_X_URGENCY = (1L << 8)
-} xcb_icccm_wm_t;
-
-#define XCB_ICCCM_WM_ALL_HINTS (XCB_ICCCM_WM_HINT_INPUT | XCB_ICCCM_WM_HINT_STATE | \
- XCB_ICCCM_WM_HINT_ICON_PIXMAP | XCB_ICCCM_WM_HINT_ICON_WINDOW | \
- XCB_ICCCM_WM_HINT_ICON_POSITION | XCB_ICCCM_WM_HINT_ICON_MASK | \
- XCB_ICCCM_WM_HINT_WINDOW_GROUP)
-
-/**
- * @brief Get urgency hint.
- * @param hints WM_HINTS structure.
- * @return Urgency hint value.
- */
-uint32_t xcb_icccm_wm_hints_get_urgency(xcb_icccm_wm_hints_t *hints);
-
-/**
- * @brief Set input focus.
- * @param hints WM_HINTS structure.
- * @param input Input focus.
- */
-void xcb_icccm_wm_hints_set_input(xcb_icccm_wm_hints_t *hints, uint8_t input);
-
-/**
- * @brief Set hints state to 'iconic'.
- * @param hints WM_HINTS structure.
- */
-void xcb_icccm_wm_hints_set_iconic(xcb_icccm_wm_hints_t *hints);
-
-/**
- * @brief Set hints state to 'normal'.
- * @param hints WM_HINTS structure.
- */
-void xcb_icccm_wm_hints_set_normal(xcb_icccm_wm_hints_t *hints);
-
-/**
- * @brief Set hints state to 'withdrawn'.
- * @param hints WM_HINTS structure.
- */
-void xcb_icccm_wm_hints_set_withdrawn(xcb_icccm_wm_hints_t *hints);
-
-/**
- * @brief Set hints state to none.
- * @param hints WM_HINTS structure.
- */
-void xcb_icccm_wm_hints_set_none(xcb_icccm_wm_hints_t *hints);
-
-/**
- * @brief Set pixmap to be used as icon.
- * @param hints WM_HINTS structure.
- * @param icon_pixmap Pixmap.
- */
-void xcb_icccm_wm_hints_set_icon_pixmap(xcb_icccm_wm_hints_t *hints,
- xcb_pixmap_t icon_pixmap);
-
-/**
- * @brief Set icon mask bitmap.
- * @param hints WM_HINTS structure.
- * @param icon_mask Pixmap.
- */
-void xcb_icccm_wm_hints_set_icon_mask(xcb_icccm_wm_hints_t *hints, xcb_pixmap_t icon_mask);
-
-/**
- * @brief Set window identifier to be used as icon.
- * @param hints WM_HINTS structure.
- * @param icon_window Window X identifier.
- */
-void xcb_icccm_wm_hints_set_icon_window(xcb_icccm_wm_hints_t *hints,
- xcb_window_t icon_window);
-
-/**
- * @brief Set identifier of related window group.
- * @param hints WM_HINTS structure.
- * @param window_group Window X identifier.
- */
-void xcb_icccm_wm_hints_set_window_group(xcb_icccm_wm_hints_t *hints,
- xcb_window_t window_group);
-
-/**
- * @brief Set urgency hints flag.
- * @param hints WM_HINTS structure.
- */
-void xcb_icccm_wm_hints_set_urgency(xcb_icccm_wm_hints_t *hints);
-
-/**
- * @brief Deliver a SetProperty request to set WM_HINTS property value.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @param hints Hints value to set.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_hints_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_icccm_wm_hints_t *hints);
-
-/**
- * @see xcb_icccm_set_wm_hints_checked()
- */
-xcb_void_cookie_t xcb_icccm_set_wm_hints(xcb_connection_t *c,
- xcb_window_t window,
- xcb_icccm_wm_hints_t *hints);
-
-/**
- * @brief Send request to get WM_HINTS property of a window.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_hints(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @see xcb_icccm_get_wm_hints()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_hints_unchecked(xcb_connection_t *c,
- xcb_window_t window);
-
-/**
- * @brief Fill given structure with the WM_HINTS property of a window.
- * @param hints WM_HINTS property value.
- * @param reply The get property request reply.
- * @return Return 1 on success, 0 otherwise.
- */
-uint8_t
-xcb_icccm_get_wm_hints_from_reply(xcb_icccm_wm_hints_t *hints,
- xcb_get_property_reply_t *reply);
-
-/**
- * @brief Fill given structure with the WM_HINTS property of a window.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param hints WM_HINTS property value.
- * @param e Error if any.
- * @return Return 1 on success, 0 otherwise.
- *
- * The parameter e supplied to this function must be NULL if
- * xcb_icccm_get_wm_hints_unchecked() is used. Otherwise, it stores the
- * error if any. The returned pointer should be freed.
- */
-uint8_t xcb_icccm_get_wm_hints_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_wm_hints_t *hints,
- xcb_generic_error_t **e);
-
-/* WM_PROTOCOLS */
-
-/**
- * @brief Deliver a SetProperty request to set WM_PROTOCOLS property value.
- * @param c The connection to the X server.
- * @param wm_protocols The WM_PROTOCOLS atom.
- * @param window Window X identifier.
- * @param list_len Atom list len.
- * @param list Atom list.
- */
-xcb_void_cookie_t xcb_icccm_set_wm_protocols_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_protocols,
- uint32_t list_len,
- xcb_atom_t *list);
-
-/**
- * @see xcb_icccm_set_wm_protocols_checked()
- */
-xcb_void_cookie_t xcb_icccm_set_wm_protocols(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_protocols,
- uint32_t list_len,
- xcb_atom_t *list);
-
-/**
- * @brief WM_PROTOCOLS structure.
- */
-typedef struct {
- /** Length of the atoms list */
- uint32_t atoms_len;
- /** Atoms list */
- xcb_atom_t *atoms;
- /** Store reply to avoid memory allocation, should normally not be
- used directly */
- xcb_get_property_reply_t *_reply;
-} xcb_icccm_get_wm_protocols_reply_t;
-
-/**
- * @brief Send request to get WM_PROTOCOLS property of a given window.
- * @param c The connection to the X server.
- * @param window Window X identifier.
- * @return The request cookie.
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_protocols(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_protocol_atom);
-
-/**
- * @see xcb_icccm_get_wm_protocols()
- */
-xcb_get_property_cookie_t xcb_icccm_get_wm_protocols_unchecked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_protocol_atom);
-
-/**
- * @brief Fill the given structure with the WM_PROTOCOLS property of a window.
- * @param reply The reply of the GetProperty request.
- * @param protocols WM_PROTOCOLS property value.
- * @return Return 1 on success, 0 otherwise.
- *
- * protocols structure members should be freed by
- * xcb_icccm_get_wm_protocols_reply_wipe().
- */
-uint8_t xcb_icccm_get_wm_protocols_from_reply(xcb_get_property_reply_t *reply,
- xcb_icccm_get_wm_protocols_reply_t *protocols);
-/**
- * @brief Fill the given structure with the WM_PROTOCOLS property of a window.
- * @param c The connection to the X server.
- * @param cookie Request cookie.
- * @param protocols WM_PROTOCOLS property value.
- * @param e Error if any.
- * @return Return 1 on success, 0 otherwise.
- *
- * The parameter e supplied to this function must be NULL if
- * xcb_icccm_get_wm_protocols_unchecked() is used. Otherwise, it stores the
- * error if any. protocols structure members should be freed by
- * xcb_icccm_get_wm_protocols_reply_wipe().
- */
-uint8_t xcb_icccm_get_wm_protocols_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_wm_protocols_reply_t *protocols,
- xcb_generic_error_t **e);
-
-/**
- * @brief Wipe protocols structure members previously allocated by
- * xcb_icccm_get_wm_protocols_reply().
- * @param protocols protocols structure whose members is going to be freed.
- */
-void xcb_icccm_get_wm_protocols_reply_wipe(xcb_icccm_get_wm_protocols_reply_t *protocols);
-
-#ifdef __cplusplus
-}
-#endif
-
-/**
- * @}
- */
-
-#endif /* __XCB_ICCCM_H__ */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_image.h b/src/3rdparty/xcb/include/xcb/xcb_image.h
deleted file mode 100644
index f41187d394..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_image.h
+++ /dev/null
@@ -1,630 +0,0 @@
-#ifndef __XCB_IMAGE_H__
-#define __XCB_IMAGE_H__
-
-/* Copyright (C) 2007 Bart Massey
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or their
- * institutions shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization from the authors.
- */
-
-#include <xcb/xcb.h>
-#include <xcb/shm.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
- * @defgroup xcb__image_t XCB Image Functions
- *
- * These are functions used to create and manipulate X images.
- *
- * The X image format we use is specific to this software,
- * which is probably a bug; it represents an intermediate
- * position between the wire format used by the X GetImage
- * and PutImage requests and standard formats like PBM. An
- * image consists of a header of type @ref xcb_image_t
- * describing the properties of the image, together with a
- * pointer to the image data itself.
- *
- * X wire images come in three formats. An xy-bitmap is a
- * bit-packed format that will be expanded to a two-color
- * pixmap using a GC when sent over the wire by PutImage.
- * An xy-pixmap is one or more bit-planes, each in the same
- * format as xy-bitmap. A z-pixmap is a more conventional
- * pixmap representation, with each pixel packed into a
- * word. Pixmaps are sent and received over the wire only
- * to/from drawables of their depth.
- *
- * Each X server defines, for each depth and format,
- * properties of images in that format that are sent and
- * received on the wire. We refer to this as a "native"
- * image for a given X server. It is not uncommon to want
- * to work with non-native images on the client side, or to
- * convert between the native images of different servers.
- *
- * This library provides several things. Facilities for
- * creating and destroying images are, of course, provided.
- * Wrappers for xcb_get_image() and xcb_put_image() are
- * provided; these utilize the image header to simplify the
- * interface. Routines for getting and putting image pixels
- * are provided: both a generic form that works with
- * arbitrary images, and fastpath forms for some common
- * cases. Conversion routines are provided for X images;
- * these routines have been fairly well optimized for the
- * common cases, and should run fast even on older hardware.
- * A routine analogous to Xlib's XCreate*FromBitmapData() is
- * provided for creating X images from xbm-format data; this
- * routine is in this library only because it is a trivial
- * use case for the library.
- *
- * @{
- */
-
-
-typedef struct xcb_image_t xcb_image_t;
-
-/**
- * @struct xcb_image_t
- * A structure that describes an xcb_image_t.
- */
-struct xcb_image_t
-{
- uint16_t width; /**< Width in pixels, excluding pads etc. */
- uint16_t height; /**< Height in pixels. */
- xcb_image_format_t format; /**< Format. */
- uint8_t scanline_pad; /**< Right pad in bits. Valid pads
- * are 8, 16, 32.
- */
- uint8_t depth; /**< Depth in bits. Valid depths
- * are 1, 4, 8, 16, 24 for z format,
- * 1 for xy-bitmap-format, anything
- * for xy-pixmap-format.
- */
- uint8_t bpp; /**< Storage per pixel in bits.
- * Must be >= depth. Valid bpp
- * are 1, 4, 8, 16, 24, 32 for z
- * format, 1 for xy-bitmap format,
- * anything for xy-pixmap-format.
- */
- uint8_t unit; /**< Scanline unit in bits for
- * xy formats and for bpp == 1,
- * in which case valid scanline
- * units are 8, 16, 32. Otherwise,
- * will be max(8, bpp). Must be >= bpp.
- */
- uint32_t plane_mask; /**< When format is
- * xy-pixmap and depth >
- * 1, this says which
- * planes are "valid" in
- * some vague sense.
- * Currently used only
- * by xcb_image_get/put_pixel(),
- * and set only by
- * xcb_image_get().
- */
- xcb_image_order_t byte_order; /**< Component byte order
- * for z-pixmap, byte
- * order of scanline unit
- * for xy-bitmap and
- * xy-pixmap. Nybble
- * order for z-pixmap
- * when bpp == 4.
- */
- xcb_image_order_t bit_order; /**< Bit order of
- * scanline unit for
- * xy-bitmap and
- * xy-pixmap.
- */
- uint32_t stride; /**< Bytes per image row.
- * Computable from other
- * data, but cached for
- * convenience/performance.
- */
- uint32_t size; /**< Size of image data in bytes.
- * Computable from other
- * data, but cached for
- * convenience/performance.
- */
- void * base; /**< Malloced block of storage that
- * will be freed by
- * @ref xcb_image_destroy() if non-null.
- */
- uint8_t * data; /**< The actual image. */
-};
-
-typedef struct xcb_shm_segment_info_t xcb_shm_segment_info_t;
-
-/**
- * @struct xcb_shm_segment_info_t
- * A structure that stores the informations needed by the MIT Shm
- * Extension.
- */
-struct xcb_shm_segment_info_t
-{
- xcb_shm_seg_t shmseg;
- uint32_t shmid;
- uint8_t *shmaddr;
-};
-
-
-/**
- * Update the cached data of an image.
- * @param image The image.
- *
- * An image's size and stride, among other things, are
- * cached in its structure. This function recomputes those
- * cached values for the given image.
- * @ingroup xcb__image_t
- */
-void
-xcb_image_annotate (xcb_image_t *image);
-
-/**
- * Create a new image.
- * @param width The width of the image, in pixels.
- * @param height The height of the image, in pixels.
- * @param format The format of the image.
- * @param xpad The scanline pad of the image.
- * @param depth The depth of the image.
- * @param bpp The depth of the image storage.
- * @param unit The unit of image representation, in bits.
- * @param byte_order The byte order of the image.
- * @param bit_order The bit order of the image.
- * @param base The base address of malloced image data.
- * @param bytes The size in bytes of the storage pointed to by base.
- * If base == 0 and bytes == ~0 and data == 0 on
- * entry, no storage will be auto-allocated.
- * @param data The image data. If data is null and bytes != ~0, then
- * an attempt will be made to fill in data; from
- * base if it is non-null (and bytes is large enough), else
- * by mallocing sufficient storage and filling in base.
- * @return The new image.
- *
- * This function allocates the memory needed for an @ref xcb_image_t structure
- * with the given properties. See the description of xcb_image_t for details.
- * This function initializes and returns a pointer to the
- * xcb_image_t structure. It may try to allocate or reserve data for the
- * structure, depending on how @p base, @p bytes and @p data are set.
- *
- * The image must be destroyed with xcb_image_destroy().
- * @ingroup xcb__image_t
- */
-xcb_image_t *
-xcb_image_create (uint16_t width,
- uint16_t height,
- xcb_image_format_t format,
- uint8_t xpad,
- uint8_t depth,
- uint8_t bpp,
- uint8_t unit,
- xcb_image_order_t byte_order,
- xcb_image_order_t bit_order,
- void * base,
- uint32_t bytes,
- uint8_t * data);
-
-
-/**
- * Create a new image in connection-native format.
- * @param c The connection.
- * @param width The width of the image, in pixels.
- * @param height The height of the image, in pixels.
- * @param format The format of the image.
- * @param depth The depth of the image.
- * @param base The base address of malloced image data.
- * @param bytes The size in bytes of the storage pointed to by base.
- * If base == 0 and bytes == ~0 and data == 0 on
- * entry, no storage will be auto-allocated.
- * @param data The image data. If data is null and bytes != ~0, then
- * an attempt will be made to fill in data; from
- * base if it is non-null (and bytes is large enough), else
- * by mallocing sufficient storage and filling in base.
- * @return The new image.
- *
- * This function calls @ref xcb_image_create() with the given
- * properties, and with the remaining properties chosen
- * according to the "native format" with the given
- * properties on the current connection.
- *
- * It is usual to use this rather
- * than calling xcb_image_create() directly.
- * @ingroup xcb__image_t
- */
-xcb_image_t *
-xcb_image_create_native (xcb_connection_t * c,
- uint16_t width,
- uint16_t height,
- xcb_image_format_t format,
- uint8_t depth,
- void * base,
- uint32_t bytes,
- uint8_t * data);
-
-
-/**
- * Destroy an image.
- * @param image The image to be destroyed.
- *
- * This function frees the memory associated with the @p image
- * parameter. If its base pointer is non-null, it frees
- * that also.
- * @ingroup xcb__image_t
- */
-void
-xcb_image_destroy (xcb_image_t *image);
-
-
-/**
- * Get an image from the X server.
- * @param conn The connection to the X server.
- * @param draw The drawable to get the image from.
- * @param x The x coordinate in pixels, relative to the origin of the
- * drawable and defining the upper-left corner of the rectangle.
- * @param y The y coordinate in pixels, relative to the origin of the
- * drawable and defining the upper-left corner of the rectangle.
- * @param width The width of the subimage in pixels.
- * @param height The height of the subimage in pixels.
- * @param plane_mask The plane mask. See the protocol document for details.
- * @param format The format of the image.
- * @return The subimage of @p draw defined by @p x, @p y, @p w, @p h.
- *
-
- * This function returns a new image taken from the
- * given drawable @p draw.
- * The image will be in connection native format. If the @p format
- * is xy-bitmap and the @p plane_mask masks bit planes out, those
- * bit planes will be made part of the returned image anyway,
- * by zero-filling them; this will require a fresh memory allocation
- * and some copying. Otherwise, the resulting image will use the
- * xcb_get_image_reply() record as its backing store.
- *
- * If a problem occurs, the function returns null.
- * @ingroup xcb__image_t
- */
-xcb_image_t *
-xcb_image_get (xcb_connection_t * conn,
- xcb_drawable_t draw,
- int16_t x,
- int16_t y,
- uint16_t width,
- uint16_t height,
- uint32_t plane_mask,
- xcb_image_format_t format);
-
-
-/**
- * Put an image onto the X server.
- * @param conn The connection to the X server.
- * @param draw The draw you get the image from.
- * @param gc The graphic context.
- * @param image The image you want to combine with the rectangle.
- * @param x The x coordinate, which is relative to the origin of the
- * drawable and defines the x coordinate of the upper-left corner of the
- * rectangle.
- * @param y The y coordinate, which is relative to the origin of the
- * drawable and defines the x coordinate of the upper-left corner of
- * the rectangle.
- * @param left_pad Notionally shift an xy-bitmap or xy-pixmap image
- * to the right some small amount, for some reason. XXX Not clear
- * this is currently supported correctly.
- * @return The cookie returned by xcb_put_image().
- *
- * This function combines an image with a rectangle of the
- * specified drawable @p draw. The image must be in native
- * format for the connection. The image is drawn at the
- * specified location in the drawable. For the xy-bitmap
- * format, the foreground pixel in @p gc defines the source
- * for the one bits in the image, and the background pixel
- * defines the source for the zero bits. For xy-pixmap and
- * z-pixmap formats, the depth of the image must match the
- * depth of the drawable; the gc is ignored.
- *
- * @ingroup xcb__image_t
- */
-xcb_void_cookie_t
-xcb_image_put (xcb_connection_t * conn,
- xcb_drawable_t draw,
- xcb_gcontext_t gc,
- xcb_image_t * image,
- int16_t x,
- int16_t y,
- uint8_t left_pad);
-
-
-/**
- * Check image for or convert image to native format.
- * @param c The connection to the X server.
- * @param image The image.
- * @param convert If 0, just check the image for native format.
- * Otherwise, actually convert it.
- * @return Null if the image is not in native format and can or will not
- * be converted. Otherwise, the native format image.
- *
- * Each X display has its own "native format" for images of a given
- * format and depth. This function either checks whether the given
- * @p image is in native format for the given connection @p c, or
- * actually tries to convert the image to native format, depending
- * on whether @p convert is true or false.
- *
- * When @p convert is true, and the image is not in native format
- * but can be converted, it will be, and a pointer to the new image
- * will be returned. The image passed in will be unharmed in this
- * case; it is the caller's responsibility to check that the returned
- * pointer is different and to dispose of the old image if desired.
- * @ingroup xcb__image_t
- */
-xcb_image_t *
-xcb_image_native (xcb_connection_t * c,
- xcb_image_t * image,
- int convert);
-
-
-/**
- * Put a pixel to an image.
- * @param image The image.
- * @param x The x coordinate of the pixel.
- * @param y The y coordinate of the pixel.
- * @param pixel The new pixel value.
- *
- * This function overwrites the pixel in the given @p image with the
- * specified @p pixel value (in client format). The image must contain the @p x
- * and @p y coordinates, as no clipping is done. This function honors
- * the plane-mask for xy-pixmap images.
- * @ingroup xcb__image_t
- */
-void
-xcb_image_put_pixel (xcb_image_t *image,
- uint32_t x,
- uint32_t y,
- uint32_t pixel);
-
-/**
- * Get a pixel from an image.
- * @param image The image.
- * @param x The x coordinate of the pixel.
- * @param y The y coordinate of the pixel.
- * @return The pixel value.
- *
- * This function retrieves a pixel from the given @p image.
- * The image must contain the @p x
- * and @p y coordinates, as no clipping is done. This function honors
- * the plane-mask for xy-pixmap images.
- * @ingroup xcb__image_t
- */
-uint32_t
-xcb_image_get_pixel (xcb_image_t *image,
- uint32_t x,
- uint32_t y);
-
-
-/**
- * Convert an image to a new format.
- * @param src Source image.
- * @param dst Destination image.
- * @return The @p dst image, or null on error.
- *
- * This function tries to convert the image data of the @p
- * src image to the format implied by the @p dst image,
- * overwriting the current destination image data.
- * The source and destination must have the same
- * width, height, and depth. When the source and destination
- * are already the same format, a simple copy is done. Otherwise,
- * when the destination has the same bits-per-pixel/scanline-unit
- * as the source, an optimized copy routine (thanks to Keith Packard)
- * is used for the conversion. Otherwise, the copy is done the
- * slow, slow way with @ref xcb_image_get_pixel() and
- * @ref xcb_image_put_pixel() calls.
- * @ingroup xcb__image_t
- */
-xcb_image_t *
-xcb_image_convert (xcb_image_t * src,
- xcb_image_t * dst);
-
-
-/**
- * Extract a subimage of an image.
- * @param image Source image.
- * @param x X coordinate of subimage.
- * @param y Y coordinate of subimage.
- * @param width Width of subimage.
- * @param height Height of subimage.
- * @param base Base of memory allocation.
- * @param bytes Size of base allocation.
- * @param data Memory allocation.
- * @return The subimage, or null on error.
- *
- * Given an image, this function extracts the subimage at the
- * given coordinates. The requested subimage must be entirely
- * contained in the source @p image. The resulting image will have the same
- * general image parameters as the source image. The @p base, @p bytes,
- * and @p data arguments are passed to @ref xcb_create_image() unaltered
- * to create the destination image---see its documentation for details.
- *
- * @ingroup xcb__image_t
- */
-xcb_image_t *
-xcb_image_subimage(xcb_image_t * image,
- uint32_t x,
- uint32_t y,
- uint32_t width,
- uint32_t height,
- void * base,
- uint32_t bytes,
- uint8_t * data);
-
-
-/*
- * Shm stuff
- */
-
-/**
- * Put the data of an xcb_image_t onto a drawable using the MIT Shm
- * Extension.
- * @param conn The connection to the X server.
- * @param draw The draw you get the image from.
- * @param gc The graphic context.
- * @param image The image you want to combine with the rectangle.
- * @param shminfo A @ref xcb_shm_segment_info_t structure.
- * @param src_x The offset in x from the left edge of the image
- * defined by the xcb_image_t structure.
- * @param src_y The offset in y from the left edge of the image
- * defined by the xcb_image_t structure.
- * @param dest_x The x coordinate, which is relative to the origin of the
- * drawable and defines the x coordinate of the upper-left corner of the
- * rectangle.
- * @param dest_y The y coordinate, which is relative to the origin of the
- * drawable and defines the x coordinate of the upper-left corner of
- * the rectangle.
- * @param src_width The width of the subimage, in pixels.
- * @param src_height The height of the subimage, in pixels.
- * @param send_event Indicates whether or not a completion event
- * should occur when the image write is complete.
- * @return 1 is no problems occurs.
- *
- * This function combines an image in memory with a shape of the
- * specified drawable. The section of the image defined by the @p x, @p y,
- * @p width, and @p height arguments is drawn on the specified part of
- * the drawable. If XYBitmap format is used, the depth must be
- * one, or a``BadMatch'' error results. The foreground pixel in the
- * Graphic Context @p gc defines the source for the one bits in the
- * image, and the background pixel defines the source for the zero
- * bits. For XYPixmap and ZPixmap, the depth must match the depth of
- * the drawable, or a ``BadMatch'' error results.
- *
- * If a problem occurs, the function returns @c 0. Otherwise, it
- * returns @c 1.
- * @ingroup xcb__image_t
- */
-xcb_image_t *
-xcb_image_shm_put (xcb_connection_t * conn,
- xcb_drawable_t draw,
- xcb_gcontext_t gc,
- xcb_image_t * image,
- xcb_shm_segment_info_t shminfo,
- int16_t src_x,
- int16_t src_y,
- int16_t dest_x,
- int16_t dest_y,
- uint16_t src_width,
- uint16_t src_height,
- uint8_t send_event);
-
-
-/**
- * Read image data into a shared memory xcb_image_t.
- * @param conn The connection to the X server.
- * @param draw The draw you get the image from.
- * @param image The image you want to combine with the rectangle.
- * @param shminfo A @ref xcb_shm_segment_info_t structure.
- * @param x The x coordinate, which are relative to the origin of the
- * drawable and define the upper-left corner of the rectangle.
- * @param y The y coordinate, which are relative to the origin of the
- * drawable and define the upper-left corner of the rectangle.
- * @param plane_mask The plane mask.
- * @return The subimage of @p draw defined by @p x, @p y, @p w, @p h.
- *
- * This function reads image data into a shared memory xcb_image_t where
- * @p conn is the connection to the X server, @p draw is the source
- * drawable, @p image is the destination xcb_image_t, @p x and @p y are offsets
- * within the drawable, and @p plane_mask defines which planes are to be
- * read.
- *
- * If a problem occurs, the function returns @c 0. It returns 1
- * otherwise.
- * @ingroup xcb__image_t
- */
-int xcb_image_shm_get (xcb_connection_t * conn,
- xcb_drawable_t draw,
- xcb_image_t * image,
- xcb_shm_segment_info_t shminfo,
- int16_t x,
- int16_t y,
- uint32_t plane_mask);
-
-
-/**
- * Create an image from user-supplied bitmap data.
- * @param data Image data in packed bitmap format.
- * @param width Width in bits of image data.
- * @param height Height in bits of image data.
- * @return The image constructed from the image data, or 0 on error.
- *
- * This function creates an image from the user-supplied
- * bitmap @p data. The bitmap data is assumed to be in
- * xbm format (i.e., 8-bit scanline unit, LSB-first, 8-bit pad).
- * @ingroup xcb__image_t
- */
-xcb_image_t *
-xcb_image_create_from_bitmap_data (uint8_t * data,
- uint32_t width,
- uint32_t height);
-
-/**
- * Create a pixmap from user-supplied bitmap data.
- * @param display The connection to the X server.
- * @param d The parent drawable for the pixmap.
- * @param data Image data in packed bitmap format.
- * @param width Width in bits of image data.
- * @param height Height in bits of image data.
- * @param depth Depth of the desired pixmap.
- * @param fg Pixel for one-bits of pixmaps with depth larger than one.
- * @param bg Pixel for zero-bits of pixmaps with depth larger than one.
- * @param gcp If this pointer is non-null, the GC created to
- * fill in the pixmap is stored here; it will have its foreground
- * and background set to the supplied value. Otherwise, the GC
- * will be freed.
- * @return The pixmap constructed from the image data, or 0 on error.
- *
- * This function creates a pixmap from the user-supplied
- * bitmap @p data. The bitmap data is assumed to be in
- * xbm format (i.e., 8-bit scanline unit, LSB-first, 8-bit pad).
- * If @p depth is greater than 1, the
- * bitmap will be expanded to a pixmap using the given
- * foreground and background pixels @p fg and @p bg.
- * @ingroup xcb__image_t
- */
-xcb_pixmap_t
-xcb_create_pixmap_from_bitmap_data (xcb_connection_t * display,
- xcb_drawable_t d,
- uint8_t * data,
- uint32_t width,
- uint32_t height,
- uint32_t depth,
- uint32_t fg,
- uint32_t bg,
- xcb_gcontext_t * gcp);
-
-
-/**
- * @}
- */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __XCB_IMAGE_H__ */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_keysyms.h b/src/3rdparty/xcb/include/xcb/xcb_keysyms.h
deleted file mode 100644
index 9d34a50ad1..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_keysyms.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef __XCB_KEYSYMS_H__
-#define __XCB_KEYSYMS_H__
-
-#include <xcb/xcb.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-typedef struct _XCBKeySymbols xcb_key_symbols_t;
-
-xcb_key_symbols_t *xcb_key_symbols_alloc (xcb_connection_t *c);
-
-void xcb_key_symbols_free (xcb_key_symbols_t *syms);
-
-xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms,
- xcb_keycode_t keycode,
- int col);
-
-/**
- * @brief Get the keycodes attached to a keysyms.
- * There can be several value, so what is returned is an array of keycode
- * terminated by XCB_NO_SYMBOL. You are responsible to free it.
- * Be aware that this function can be slow. It will convert all
- * combinations of all available keycodes to keysyms to find the ones that
- * match.
- * @param syms Key symbols.
- * @param keysym The keysym to look for.
- * @return A XCB_NO_SYMBOL terminated array of keycode, or NULL if nothing is found.
- */
-xcb_keycode_t * xcb_key_symbols_get_keycode(xcb_key_symbols_t *syms,
- xcb_keysym_t keysym);
-
-xcb_keysym_t xcb_key_press_lookup_keysym (xcb_key_symbols_t *syms,
- xcb_key_press_event_t *event,
- int col);
-
-xcb_keysym_t xcb_key_release_lookup_keysym (xcb_key_symbols_t *syms,
- xcb_key_release_event_t *event,
- int col);
-
-int xcb_refresh_keyboard_mapping (xcb_key_symbols_t *syms,
- xcb_mapping_notify_event_t *event);
-
-/* TODO: need XLookupString equivalent */
-
-/* Tests for classes of symbols */
-
-int xcb_is_keypad_key (xcb_keysym_t keysym);
-
-int xcb_is_private_keypad_key (xcb_keysym_t keysym);
-
-int xcb_is_cursor_key (xcb_keysym_t keysym);
-
-int xcb_is_pf_key (xcb_keysym_t keysym);
-
-int xcb_is_function_key (xcb_keysym_t keysym);
-
-int xcb_is_misc_function_key (xcb_keysym_t keysym);
-
-int xcb_is_modifier_key (xcb_keysym_t keysym);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __XCB_KEYSYMS_H__ */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_pixel.h b/src/3rdparty/xcb/include/xcb/xcb_pixel.h
deleted file mode 100644
index fcb22b4826..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_pixel.h
+++ /dev/null
@@ -1,171 +0,0 @@
-#ifndef __XCB_PIXEL_H__
-#define __XCB_PIXEL_H__
-
-/* Copyright (C) 2007 Bart Massey
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or their
- * institutions shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization from the authors.
- */
-
-#include <inttypes.h>
-#include <X11/Xfuncproto.h>
-#ifndef BUILD
-#include <xcb/xcb_bitops.h>
-#include <xcb/xcb_image.h>
-#endif
-
-/**
- * XCB Image fast pixel ops.
- *
- * Fast inline versions of xcb_image_get_pixel() and
- * xcb_image_put_pixel() for various common cases.
- * The naming convention is xcb_image_put_pixel_FUB()
- * where F is the format and is either XY for bitmaps
- * or Z for pixmaps, U is the bitmap unit size or pixmap
- * bits-per-pixel, and B is the endianness (if needed)
- * and is either M for most-significant-first or L for
- * least-significant-first. Note that no checking
- * is done on the arguments to these routines---caller beware.
- * Also note that the pixel type is chosen to be appropriate
- * to the unit; bitmaps use int and pixmaps use the appropriate
- * size of unsigned.
- * @ingroup xcb__image_t
- */
-
-_X_INLINE static void
-xcb_image_put_pixel_XY32M (xcb_image_t *image,
- uint32_t x,
- uint32_t y,
- int pixel)
-{
- uint32_t unit = (x >> 3) & ~xcb_mask(2);
- uint32_t byte = xcb_mask(2) - ((x >> 3) & xcb_mask(2));
- uint32_t bit = xcb_mask(3) - (x & xcb_mask(3));
- uint8_t m = 1 << bit;
- uint8_t p = pixel << bit;
- uint8_t * bp = image->data + (y * image->stride) + (unit | byte);
- *bp = (*bp & ~m) | p;
-}
-
-_X_INLINE static void
-xcb_image_put_pixel_XY32L (xcb_image_t *image,
- uint32_t x,
- uint32_t y,
- int pixel)
-{
- uint32_t bit = x & xcb_mask(3);
- uint8_t m = 1 << bit;
- uint8_t p = pixel << bit;
- uint8_t * bp = image->data + (y * image->stride) + (x >> 3);
- *bp = (*bp & ~m) | p;
-}
-
-_X_INLINE static int
-xcb_image_get_pixel_XY32M (xcb_image_t *image,
- uint32_t x,
- uint32_t y)
-{
- uint32_t unit = (x >> 3) & ~xcb_mask(2);
- uint32_t byte = xcb_mask(2) - ((x >> 3) & xcb_mask(2));
- uint32_t bit = xcb_mask(3) - (x & xcb_mask(3));
- uint8_t * bp = image->data + (y * image->stride) + (unit | byte);
- return (*bp >> bit) & 1;
-}
-
-_X_INLINE static int
-xcb_image_get_pixel_XY32L (xcb_image_t *image,
- uint32_t x,
- uint32_t y)
-{
- uint32_t bit = x & xcb_mask(3);
- uint8_t * bp = image->data + (y * image->stride) + (x >> 3);
- return (*bp >> bit) & 1;
-}
-
-_X_INLINE static void
-xcb_image_put_pixel_Z8 (xcb_image_t *image,
- uint32_t x,
- uint32_t y,
- uint8_t pixel)
-{
- image->data[x + y * image->stride] = pixel;
-}
-
-_X_INLINE static uint8_t
-xcb_image_get_pixel_Z8 (xcb_image_t *image,
- uint32_t x,
- uint32_t y)
-{
- return image->data[x + y * image->stride];
-}
-
-_X_INLINE static void
-xcb_image_put_pixel_Z32M (xcb_image_t *image,
- uint32_t x,
- uint32_t y,
- uint32_t pixel)
-{
- uint8_t * row = image->data + (y * image->stride);
- row[x << 2] = pixel >> 24;
- row[(x << 2) + 1] = pixel >> 16;
- row[(x << 2) + 2] = pixel >> 8;
- row[(x << 2) + 3] = pixel;
-}
-
-_X_INLINE static void
-xcb_image_put_pixel_Z32L (xcb_image_t *image,
- uint32_t x,
- uint32_t y,
- uint32_t pixel)
-{
- uint8_t * row = image->data + (y * image->stride);
- row[x << 2] = pixel;
- row[(x << 2) + 1] = pixel >> 8;
- row[(x << 2) + 2] = pixel >> 16;
- row[(x << 2) + 3] = pixel >> 24;
-}
-
-_X_INLINE static uint32_t
-xcb_image_get_pixel_Z32M (xcb_image_t *image,
- uint32_t x,
- uint32_t y)
-{
- uint8_t * row = image->data + (y * image->stride);
- uint32_t pixel = row[x << 2] << 24;
- pixel |= row[(x << 2) + 1] << 16;
- pixel |= row[(x << 2) + 2] << 8;
- return pixel | row[(x << 2) + 3];
-}
-
-_X_INLINE static uint32_t
-xcb_image_get_pixel_Z32L (xcb_image_t *image,
- uint32_t x,
- uint32_t y)
-{
- uint8_t * row = image->data + (y * image->stride);
- uint32_t pixel = row[x << 2];
- pixel |= row[(x << 2) + 1] << 8;
- pixel |= row[(x << 2) + 2] << 16;
- return pixel | row[(x << 2) + 3] << 24;
-}
-
-#endif /* __XCB_PIXEL_H__ */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_renderutil.h b/src/3rdparty/xcb/include/xcb/xcb_renderutil.h
deleted file mode 100644
index 77c5b7f054..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_renderutil.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/* Copyright © 2006 Jamey Sharp.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or their
- * institutions shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization from the authors.
- */
-
-#ifndef XCB_RENDERUTIL
-#define XCB_RENDERUTIL
-#include <xcb/render.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum xcb_pict_format_t {
- XCB_PICT_FORMAT_ID = (1 << 0),
- XCB_PICT_FORMAT_TYPE = (1 << 1),
- XCB_PICT_FORMAT_DEPTH = (1 << 2),
- XCB_PICT_FORMAT_RED = (1 << 3),
- XCB_PICT_FORMAT_RED_MASK = (1 << 4),
- XCB_PICT_FORMAT_GREEN = (1 << 5),
- XCB_PICT_FORMAT_GREEN_MASK = (1 << 6),
- XCB_PICT_FORMAT_BLUE = (1 << 7),
- XCB_PICT_FORMAT_BLUE_MASK = (1 << 8),
- XCB_PICT_FORMAT_ALPHA = (1 << 9),
- XCB_PICT_FORMAT_ALPHA_MASK = (1 << 10),
- XCB_PICT_FORMAT_COLORMAP = (1 << 11)
-} xcb_pict_format_t;
-
-typedef enum xcb_pict_standard_t {
- XCB_PICT_STANDARD_ARGB_32,
- XCB_PICT_STANDARD_RGB_24,
- XCB_PICT_STANDARD_A_8,
- XCB_PICT_STANDARD_A_4,
- XCB_PICT_STANDARD_A_1
-} xcb_pict_standard_t;
-
-
-xcb_render_pictvisual_t *
-xcb_render_util_find_visual_format (const xcb_render_query_pict_formats_reply_t *formats,
- const xcb_visualid_t visual);
-
-xcb_render_pictforminfo_t *
-xcb_render_util_find_format (const xcb_render_query_pict_formats_reply_t *formats,
- unsigned long mask,
- const xcb_render_pictforminfo_t *ptemplate,
- int count);
-
-xcb_render_pictforminfo_t *
-xcb_render_util_find_standard_format (const xcb_render_query_pict_formats_reply_t *formats,
- xcb_pict_standard_t format);
-
-const xcb_render_query_version_reply_t *
-xcb_render_util_query_version (xcb_connection_t *c);
-
-const xcb_render_query_pict_formats_reply_t *
-xcb_render_util_query_formats (xcb_connection_t *c);
-
-int
-xcb_render_util_disconnect (xcb_connection_t *c);
-
-/* wrappers for xcb_render_composite_glyphs_8/16/32 */
-
-typedef struct xcb_render_util_composite_text_stream_t xcb_render_util_composite_text_stream_t;
-
-xcb_render_util_composite_text_stream_t *
-xcb_render_util_composite_text_stream (
- xcb_render_glyphset_t initial_glyphset,
- uint32_t total_glyphs,
- uint32_t total_glyphset_changes );
-
-void
-xcb_render_util_glyphs_8 (
- xcb_render_util_composite_text_stream_t *stream,
- int16_t dx,
- int16_t dy,
- uint32_t count,
- const uint8_t *glyphs );
-
-void
-xcb_render_util_glyphs_16 (
- xcb_render_util_composite_text_stream_t *stream,
- int16_t dx,
- int16_t dy,
- uint32_t count,
- const uint16_t *glyphs );
-
-void
-xcb_render_util_glyphs_32 (
- xcb_render_util_composite_text_stream_t *stream,
- int16_t dx,
- int16_t dy,
- uint32_t count,
- const uint32_t *glyphs );
-
-void
-xcb_render_util_change_glyphset (
- xcb_render_util_composite_text_stream_t *stream,
- xcb_render_glyphset_t glyphset );
-
-xcb_void_cookie_t
-xcb_render_util_composite_text (
- xcb_connection_t *xc,
- uint8_t op,
- xcb_render_picture_t src,
- xcb_render_picture_t dst,
- xcb_render_pictformat_t mask_format,
- int16_t src_x,
- int16_t src_y,
- xcb_render_util_composite_text_stream_t *stream );
-
-xcb_void_cookie_t
-xcb_render_util_composite_text_checked (
- xcb_connection_t *xc,
- uint8_t op,
- xcb_render_picture_t src,
- xcb_render_picture_t dst,
- xcb_render_pictformat_t mask_format,
- int16_t src_x,
- int16_t src_y,
- xcb_render_util_composite_text_stream_t *stream );
-
-void
-xcb_render_util_composite_text_free (
- xcb_render_util_composite_text_stream_t *stream );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* XCB_RENDERUTIL */
diff --git a/src/3rdparty/xcb/include/xcb/xcb_util.h b/src/3rdparty/xcb/include/xcb/xcb_util.h
deleted file mode 100644
index 0f06f1b06e..0000000000
--- a/src/3rdparty/xcb/include/xcb/xcb_util.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __XCB_UTIL_H__
-#define __XCB_UTIL_H__
-
-#include <xcb/xcb_atom.h>
-#include <xcb/xcb_aux.h>
-#include <xcb/xcb_event.h>
-
-#endif /* __XCB_UTIL_H__ */
diff --git a/src/3rdparty/xcb/include/xcb/xfixes.h b/src/3rdparty/xcb/include/xcb/xfixes.h
deleted file mode 100644
index b67aa85135..0000000000
--- a/src/3rdparty/xcb/include/xcb/xfixes.h
+++ /dev/null
@@ -1,2816 +0,0 @@
-/*
- * This file generated automatically from xfixes.xml by c_client.py.
- * Edit at your peril.
- */
-
-/**
- * @defgroup XCB_XFixes_API XCB XFixes API
- * @brief XFixes XCB Protocol Implementation.
- * @{
- **/
-
-#ifndef __XFIXES_H
-#define __XFIXES_H
-
-#include "xcb.h"
-#include "xproto.h"
-#include "render.h"
-#include "shape.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XCB_XFIXES_MAJOR_VERSION 4
-#define XCB_XFIXES_MINOR_VERSION 0
-
-extern xcb_extension_t xcb_xfixes_id;
-
-/**
- * @brief xcb_xfixes_query_version_cookie_t
- **/
-typedef struct xcb_xfixes_query_version_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xfixes_query_version_cookie_t;
-
-/** Opcode for xcb_xfixes_query_version. */
-#define XCB_XFIXES_QUERY_VERSION 0
-
-/**
- * @brief xcb_xfixes_query_version_request_t
- **/
-typedef struct xcb_xfixes_query_version_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint32_t client_major_version; /**< */
- uint32_t client_minor_version; /**< */
-} xcb_xfixes_query_version_request_t;
-
-/**
- * @brief xcb_xfixes_query_version_reply_t
- **/
-typedef struct xcb_xfixes_query_version_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t major_version; /**< */
- uint32_t minor_version; /**< */
- uint8_t pad1[16]; /**< */
-} xcb_xfixes_query_version_reply_t;
-
-typedef enum xcb_xfixes_save_set_mode_t {
- XCB_XFIXES_SAVE_SET_MODE_INSERT,
- XCB_XFIXES_SAVE_SET_MODE_DELETE
-} xcb_xfixes_save_set_mode_t;
-
-typedef enum xcb_xfixes_save_set_target_t {
- XCB_XFIXES_SAVE_SET_TARGET_NEAREST,
- XCB_XFIXES_SAVE_SET_TARGET_ROOT
-} xcb_xfixes_save_set_target_t;
-
-typedef enum xcb_xfixes_save_set_mapping_t {
- XCB_XFIXES_SAVE_SET_MAPPING_MAP,
- XCB_XFIXES_SAVE_SET_MAPPING_UNMAP
-} xcb_xfixes_save_set_mapping_t;
-
-/** Opcode for xcb_xfixes_change_save_set. */
-#define XCB_XFIXES_CHANGE_SAVE_SET 1
-
-/**
- * @brief xcb_xfixes_change_save_set_request_t
- **/
-typedef struct xcb_xfixes_change_save_set_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t mode; /**< */
- uint8_t target; /**< */
- uint8_t map; /**< */
- uint8_t pad0; /**< */
- xcb_window_t window; /**< */
-} xcb_xfixes_change_save_set_request_t;
-
-typedef enum xcb_xfixes_selection_event_t {
- XCB_XFIXES_SELECTION_EVENT_SET_SELECTION_OWNER,
- XCB_XFIXES_SELECTION_EVENT_SELECTION_WINDOW_DESTROY,
- XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE
-} xcb_xfixes_selection_event_t;
-
-typedef enum xcb_xfixes_selection_event_mask_t {
- XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER = 1,
- XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY = 2,
- XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE = 4
-} xcb_xfixes_selection_event_mask_t;
-
-/** Opcode for xcb_xfixes_selection_notify. */
-#define XCB_XFIXES_SELECTION_NOTIFY 0
-
-/**
- * @brief xcb_xfixes_selection_notify_event_t
- **/
-typedef struct xcb_xfixes_selection_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t subtype; /**< */
- uint16_t sequence; /**< */
- xcb_window_t window; /**< */
- xcb_window_t owner; /**< */
- xcb_atom_t selection; /**< */
- xcb_timestamp_t timestamp; /**< */
- xcb_timestamp_t selection_timestamp; /**< */
- uint8_t pad0[8]; /**< */
-} xcb_xfixes_selection_notify_event_t;
-
-/** Opcode for xcb_xfixes_select_selection_input. */
-#define XCB_XFIXES_SELECT_SELECTION_INPUT 2
-
-/**
- * @brief xcb_xfixes_select_selection_input_request_t
- **/
-typedef struct xcb_xfixes_select_selection_input_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
- xcb_atom_t selection; /**< */
- uint32_t event_mask; /**< */
-} xcb_xfixes_select_selection_input_request_t;
-
-typedef enum xcb_xfixes_cursor_notify_t {
- XCB_XFIXES_CURSOR_NOTIFY_DISPLAY_CURSOR
-} xcb_xfixes_cursor_notify_t;
-
-typedef enum xcb_xfixes_cursor_notify_mask_t {
- XCB_XFIXES_CURSOR_NOTIFY_MASK_DISPLAY_CURSOR = 1
-} xcb_xfixes_cursor_notify_mask_t;
-
-/** Opcode for xcb_xfixes_cursor_notify. */
-#define XCB_XFIXES_CURSOR_NOTIFY 1
-
-/**
- * @brief xcb_xfixes_cursor_notify_event_t
- **/
-typedef struct xcb_xfixes_cursor_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t subtype; /**< */
- uint16_t sequence; /**< */
- xcb_window_t window; /**< */
- uint32_t cursor_serial; /**< */
- xcb_timestamp_t timestamp; /**< */
- xcb_atom_t name; /**< */
- uint8_t pad0[12]; /**< */
-} xcb_xfixes_cursor_notify_event_t;
-
-/** Opcode for xcb_xfixes_select_cursor_input. */
-#define XCB_XFIXES_SELECT_CURSOR_INPUT 3
-
-/**
- * @brief xcb_xfixes_select_cursor_input_request_t
- **/
-typedef struct xcb_xfixes_select_cursor_input_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
- uint32_t event_mask; /**< */
-} xcb_xfixes_select_cursor_input_request_t;
-
-/**
- * @brief xcb_xfixes_get_cursor_image_cookie_t
- **/
-typedef struct xcb_xfixes_get_cursor_image_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xfixes_get_cursor_image_cookie_t;
-
-/** Opcode for xcb_xfixes_get_cursor_image. */
-#define XCB_XFIXES_GET_CURSOR_IMAGE 4
-
-/**
- * @brief xcb_xfixes_get_cursor_image_request_t
- **/
-typedef struct xcb_xfixes_get_cursor_image_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
-} xcb_xfixes_get_cursor_image_request_t;
-
-/**
- * @brief xcb_xfixes_get_cursor_image_reply_t
- **/
-typedef struct xcb_xfixes_get_cursor_image_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- int16_t x; /**< */
- int16_t y; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint16_t xhot; /**< */
- uint16_t yhot; /**< */
- uint32_t cursor_serial; /**< */
- uint8_t pad1[8]; /**< */
-} xcb_xfixes_get_cursor_image_reply_t;
-
-typedef uint32_t xcb_xfixes_region_t;
-
-/**
- * @brief xcb_xfixes_region_iterator_t
- **/
-typedef struct xcb_xfixes_region_iterator_t {
- xcb_xfixes_region_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xfixes_region_iterator_t;
-
-/** Opcode for xcb_xfixes_bad_region. */
-#define XCB_XFIXES_BAD_REGION 0
-
-/**
- * @brief xcb_xfixes_bad_region_error_t
- **/
-typedef struct xcb_xfixes_bad_region_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
-} xcb_xfixes_bad_region_error_t;
-
-typedef enum xcb_xfixes_region_enum_t {
- XCB_XFIXES_REGION_NONE
-} xcb_xfixes_region_enum_t;
-
-/** Opcode for xcb_xfixes_create_region. */
-#define XCB_XFIXES_CREATE_REGION 5
-
-/**
- * @brief xcb_xfixes_create_region_request_t
- **/
-typedef struct xcb_xfixes_create_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t region; /**< */
-} xcb_xfixes_create_region_request_t;
-
-/** Opcode for xcb_xfixes_create_region_from_bitmap. */
-#define XCB_XFIXES_CREATE_REGION_FROM_BITMAP 6
-
-/**
- * @brief xcb_xfixes_create_region_from_bitmap_request_t
- **/
-typedef struct xcb_xfixes_create_region_from_bitmap_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t region; /**< */
- xcb_pixmap_t bitmap; /**< */
-} xcb_xfixes_create_region_from_bitmap_request_t;
-
-/** Opcode for xcb_xfixes_create_region_from_window. */
-#define XCB_XFIXES_CREATE_REGION_FROM_WINDOW 7
-
-/**
- * @brief xcb_xfixes_create_region_from_window_request_t
- **/
-typedef struct xcb_xfixes_create_region_from_window_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t region; /**< */
- xcb_window_t window; /**< */
- xcb_shape_kind_t kind; /**< */
- uint8_t pad0[3]; /**< */
-} xcb_xfixes_create_region_from_window_request_t;
-
-/** Opcode for xcb_xfixes_create_region_from_gc. */
-#define XCB_XFIXES_CREATE_REGION_FROM_GC 8
-
-/**
- * @brief xcb_xfixes_create_region_from_gc_request_t
- **/
-typedef struct xcb_xfixes_create_region_from_gc_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t region; /**< */
- xcb_gcontext_t gc; /**< */
-} xcb_xfixes_create_region_from_gc_request_t;
-
-/** Opcode for xcb_xfixes_create_region_from_picture. */
-#define XCB_XFIXES_CREATE_REGION_FROM_PICTURE 9
-
-/**
- * @brief xcb_xfixes_create_region_from_picture_request_t
- **/
-typedef struct xcb_xfixes_create_region_from_picture_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t region; /**< */
- xcb_render_picture_t picture; /**< */
-} xcb_xfixes_create_region_from_picture_request_t;
-
-/** Opcode for xcb_xfixes_destroy_region. */
-#define XCB_XFIXES_DESTROY_REGION 10
-
-/**
- * @brief xcb_xfixes_destroy_region_request_t
- **/
-typedef struct xcb_xfixes_destroy_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t region; /**< */
-} xcb_xfixes_destroy_region_request_t;
-
-/** Opcode for xcb_xfixes_set_region. */
-#define XCB_XFIXES_SET_REGION 11
-
-/**
- * @brief xcb_xfixes_set_region_request_t
- **/
-typedef struct xcb_xfixes_set_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t region; /**< */
-} xcb_xfixes_set_region_request_t;
-
-/** Opcode for xcb_xfixes_copy_region. */
-#define XCB_XFIXES_COPY_REGION 12
-
-/**
- * @brief xcb_xfixes_copy_region_request_t
- **/
-typedef struct xcb_xfixes_copy_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t source; /**< */
- xcb_xfixes_region_t destination; /**< */
-} xcb_xfixes_copy_region_request_t;
-
-/** Opcode for xcb_xfixes_union_region. */
-#define XCB_XFIXES_UNION_REGION 13
-
-/**
- * @brief xcb_xfixes_union_region_request_t
- **/
-typedef struct xcb_xfixes_union_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t source1; /**< */
- xcb_xfixes_region_t source2; /**< */
- xcb_xfixes_region_t destination; /**< */
-} xcb_xfixes_union_region_request_t;
-
-/** Opcode for xcb_xfixes_intersect_region. */
-#define XCB_XFIXES_INTERSECT_REGION 14
-
-/**
- * @brief xcb_xfixes_intersect_region_request_t
- **/
-typedef struct xcb_xfixes_intersect_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t source1; /**< */
- xcb_xfixes_region_t source2; /**< */
- xcb_xfixes_region_t destination; /**< */
-} xcb_xfixes_intersect_region_request_t;
-
-/** Opcode for xcb_xfixes_subtract_region. */
-#define XCB_XFIXES_SUBTRACT_REGION 15
-
-/**
- * @brief xcb_xfixes_subtract_region_request_t
- **/
-typedef struct xcb_xfixes_subtract_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t source1; /**< */
- xcb_xfixes_region_t source2; /**< */
- xcb_xfixes_region_t destination; /**< */
-} xcb_xfixes_subtract_region_request_t;
-
-/** Opcode for xcb_xfixes_invert_region. */
-#define XCB_XFIXES_INVERT_REGION 16
-
-/**
- * @brief xcb_xfixes_invert_region_request_t
- **/
-typedef struct xcb_xfixes_invert_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t source; /**< */
- xcb_rectangle_t bounds; /**< */
- xcb_xfixes_region_t destination; /**< */
-} xcb_xfixes_invert_region_request_t;
-
-/** Opcode for xcb_xfixes_translate_region. */
-#define XCB_XFIXES_TRANSLATE_REGION 17
-
-/**
- * @brief xcb_xfixes_translate_region_request_t
- **/
-typedef struct xcb_xfixes_translate_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t region; /**< */
- int16_t dx; /**< */
- int16_t dy; /**< */
-} xcb_xfixes_translate_region_request_t;
-
-/** Opcode for xcb_xfixes_region_extents. */
-#define XCB_XFIXES_REGION_EXTENTS 18
-
-/**
- * @brief xcb_xfixes_region_extents_request_t
- **/
-typedef struct xcb_xfixes_region_extents_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t source; /**< */
- xcb_xfixes_region_t destination; /**< */
-} xcb_xfixes_region_extents_request_t;
-
-/**
- * @brief xcb_xfixes_fetch_region_cookie_t
- **/
-typedef struct xcb_xfixes_fetch_region_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xfixes_fetch_region_cookie_t;
-
-/** Opcode for xcb_xfixes_fetch_region. */
-#define XCB_XFIXES_FETCH_REGION 19
-
-/**
- * @brief xcb_xfixes_fetch_region_request_t
- **/
-typedef struct xcb_xfixes_fetch_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t region; /**< */
-} xcb_xfixes_fetch_region_request_t;
-
-/**
- * @brief xcb_xfixes_fetch_region_reply_t
- **/
-typedef struct xcb_xfixes_fetch_region_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_rectangle_t extents; /**< */
- uint8_t pad1[16]; /**< */
-} xcb_xfixes_fetch_region_reply_t;
-
-/** Opcode for xcb_xfixes_set_gc_clip_region. */
-#define XCB_XFIXES_SET_GC_CLIP_REGION 20
-
-/**
- * @brief xcb_xfixes_set_gc_clip_region_request_t
- **/
-typedef struct xcb_xfixes_set_gc_clip_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_gcontext_t gc; /**< */
- xcb_xfixes_region_t region; /**< */
- int16_t x_origin; /**< */
- int16_t y_origin; /**< */
-} xcb_xfixes_set_gc_clip_region_request_t;
-
-/** Opcode for xcb_xfixes_set_window_shape_region. */
-#define XCB_XFIXES_SET_WINDOW_SHAPE_REGION 21
-
-/**
- * @brief xcb_xfixes_set_window_shape_region_request_t
- **/
-typedef struct xcb_xfixes_set_window_shape_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t dest; /**< */
- xcb_shape_kind_t dest_kind; /**< */
- uint8_t pad0[3]; /**< */
- int16_t x_offset; /**< */
- int16_t y_offset; /**< */
- xcb_xfixes_region_t region; /**< */
-} xcb_xfixes_set_window_shape_region_request_t;
-
-/** Opcode for xcb_xfixes_set_picture_clip_region. */
-#define XCB_XFIXES_SET_PICTURE_CLIP_REGION 22
-
-/**
- * @brief xcb_xfixes_set_picture_clip_region_request_t
- **/
-typedef struct xcb_xfixes_set_picture_clip_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_render_picture_t picture; /**< */
- xcb_xfixes_region_t region; /**< */
- int16_t x_origin; /**< */
- int16_t y_origin; /**< */
-} xcb_xfixes_set_picture_clip_region_request_t;
-
-/** Opcode for xcb_xfixes_set_cursor_name. */
-#define XCB_XFIXES_SET_CURSOR_NAME 23
-
-/**
- * @brief xcb_xfixes_set_cursor_name_request_t
- **/
-typedef struct xcb_xfixes_set_cursor_name_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_cursor_t cursor; /**< */
- uint16_t nbytes; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xfixes_set_cursor_name_request_t;
-
-/**
- * @brief xcb_xfixes_get_cursor_name_cookie_t
- **/
-typedef struct xcb_xfixes_get_cursor_name_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xfixes_get_cursor_name_cookie_t;
-
-/** Opcode for xcb_xfixes_get_cursor_name. */
-#define XCB_XFIXES_GET_CURSOR_NAME 24
-
-/**
- * @brief xcb_xfixes_get_cursor_name_request_t
- **/
-typedef struct xcb_xfixes_get_cursor_name_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_cursor_t cursor; /**< */
-} xcb_xfixes_get_cursor_name_request_t;
-
-/**
- * @brief xcb_xfixes_get_cursor_name_reply_t
- **/
-typedef struct xcb_xfixes_get_cursor_name_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_atom_t atom; /**< */
- uint16_t nbytes; /**< */
- uint8_t pad1[18]; /**< */
-} xcb_xfixes_get_cursor_name_reply_t;
-
-/**
- * @brief xcb_xfixes_get_cursor_image_and_name_cookie_t
- **/
-typedef struct xcb_xfixes_get_cursor_image_and_name_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xfixes_get_cursor_image_and_name_cookie_t;
-
-/** Opcode for xcb_xfixes_get_cursor_image_and_name. */
-#define XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME 25
-
-/**
- * @brief xcb_xfixes_get_cursor_image_and_name_request_t
- **/
-typedef struct xcb_xfixes_get_cursor_image_and_name_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
-} xcb_xfixes_get_cursor_image_and_name_request_t;
-
-/**
- * @brief xcb_xfixes_get_cursor_image_and_name_reply_t
- **/
-typedef struct xcb_xfixes_get_cursor_image_and_name_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- int16_t x; /**< */
- int16_t y; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
- uint16_t xhot; /**< */
- uint16_t yhot; /**< */
- uint32_t cursor_serial; /**< */
- xcb_atom_t cursor_atom; /**< */
- uint16_t nbytes; /**< */
- uint8_t pad1[2]; /**< */
-} xcb_xfixes_get_cursor_image_and_name_reply_t;
-
-/** Opcode for xcb_xfixes_change_cursor. */
-#define XCB_XFIXES_CHANGE_CURSOR 26
-
-/**
- * @brief xcb_xfixes_change_cursor_request_t
- **/
-typedef struct xcb_xfixes_change_cursor_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_cursor_t source; /**< */
- xcb_cursor_t destination; /**< */
-} xcb_xfixes_change_cursor_request_t;
-
-/** Opcode for xcb_xfixes_change_cursor_by_name. */
-#define XCB_XFIXES_CHANGE_CURSOR_BY_NAME 27
-
-/**
- * @brief xcb_xfixes_change_cursor_by_name_request_t
- **/
-typedef struct xcb_xfixes_change_cursor_by_name_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_cursor_t src; /**< */
- uint16_t nbytes; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xfixes_change_cursor_by_name_request_t;
-
-/** Opcode for xcb_xfixes_expand_region. */
-#define XCB_XFIXES_EXPAND_REGION 28
-
-/**
- * @brief xcb_xfixes_expand_region_request_t
- **/
-typedef struct xcb_xfixes_expand_region_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xfixes_region_t source; /**< */
- xcb_xfixes_region_t destination; /**< */
- uint16_t left; /**< */
- uint16_t right; /**< */
- uint16_t top; /**< */
- uint16_t bottom; /**< */
-} xcb_xfixes_expand_region_request_t;
-
-/** Opcode for xcb_xfixes_hide_cursor. */
-#define XCB_XFIXES_HIDE_CURSOR 29
-
-/**
- * @brief xcb_xfixes_hide_cursor_request_t
- **/
-typedef struct xcb_xfixes_hide_cursor_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_xfixes_hide_cursor_request_t;
-
-/** Opcode for xcb_xfixes_show_cursor. */
-#define XCB_XFIXES_SHOW_CURSOR 30
-
-/**
- * @brief xcb_xfixes_show_cursor_request_t
- **/
-typedef struct xcb_xfixes_show_cursor_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_xfixes_show_cursor_request_t;
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t client_major_version
- ** @param uint32_t client_minor_version
- ** @returns xcb_xfixes_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_query_version_cookie_t
-xcb_xfixes_query_version (xcb_connection_t *c /**< */,
- uint32_t client_major_version /**< */,
- uint32_t client_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_xfixes_query_version_cookie_t xcb_xfixes_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t client_major_version
- ** @param uint32_t client_minor_version
- ** @returns xcb_xfixes_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_query_version_cookie_t
-xcb_xfixes_query_version_unchecked (xcb_connection_t *c /**< */,
- uint32_t client_major_version /**< */,
- uint32_t client_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_xfixes_query_version_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_query_version_reply_t * xcb_xfixes_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_query_version_reply_t *
-xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */,
- xcb_xfixes_query_version_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_xfixes_change_save_set_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t mode
- ** @param uint8_t target
- ** @param uint8_t map
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */,
- uint8_t mode /**< */,
- uint8_t target /**< */,
- uint8_t map /**< */,
- xcb_window_t window /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_change_save_set
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t mode
- ** @param uint8_t target
- ** @param uint8_t map
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_save_set (xcb_connection_t *c /**< */,
- uint8_t mode /**< */,
- uint8_t target /**< */,
- uint8_t map /**< */,
- 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 not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_select_selection_input_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_atom_t selection
- ** @param uint32_t event_mask
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_atom_t selection /**< */,
- uint32_t event_mask /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_select_selection_input
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_atom_t selection
- ** @param uint32_t event_mask
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_atom_t selection /**< */,
- uint32_t event_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 not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_select_cursor_input_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint32_t event_mask
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint32_t event_mask /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_select_cursor_input
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint32_t event_mask
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_xfixes_get_cursor_image_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_cookie_t
-xcb_xfixes_get_cursor_image (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_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_xfixes_get_cursor_image_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_cookie_t
-xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c /**< */);
-
-
-/*****************************************************************************
- **
- ** uint32_t * xcb_xfixes_get_cursor_image_cursor_image
- **
- ** @param const xcb_xfixes_get_cursor_image_reply_t *R
- ** @returns uint32_t *
- **
- *****************************************************************************/
-
-uint32_t *
-xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_get_cursor_image_cursor_image_length
- **
- ** @param const xcb_xfixes_get_cursor_image_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_cursor_image_end
- **
- ** @param const xcb_xfixes_get_cursor_image_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_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_xfixes_get_cursor_image_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_image_reply_t * xcb_xfixes_get_cursor_image_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_get_cursor_image_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_get_cursor_image_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_reply_t *
-xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c /**< */,
- xcb_xfixes_get_cursor_image_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xfixes_region_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_xfixes_region_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xfixes_region_next
- **
- ** @param xcb_xfixes_region_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xfixes_region_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_xfixes_region_end
- **
- ** @param xcb_xfixes_region_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-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 /**< */);
-
-/**
- *
- * @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_xfixes_create_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_create_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */);
-
-/**
- *
- * @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_xfixes_create_region_from_bitmap_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_pixmap_t bitmap
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_pixmap_t bitmap /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_pixmap_t bitmap
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_pixmap_t bitmap /**< */);
-
-/**
- *
- * @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_xfixes_create_region_from_window_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_window_t window
- ** @param xcb_shape_kind_t kind
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_window_t window /**< */,
- xcb_shape_kind_t kind /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_create_region_from_window
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_window_t window
- ** @param xcb_shape_kind_t kind
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_window_t window /**< */,
- xcb_shape_kind_t kind /**< */);
-
-/**
- *
- * @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_xfixes_create_region_from_gc_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_gcontext_t gc
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_gcontext_t gc /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_create_region_from_gc
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_gcontext_t gc
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_gcontext_t gc /**< */);
-
-/**
- *
- * @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_xfixes_create_region_from_picture_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_render_picture_t picture
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_render_picture_t picture /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_create_region_from_picture
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_render_picture_t picture
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_render_picture_t picture /**< */);
-
-/**
- *
- * @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_xfixes_destroy_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_destroy_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-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 /**< */);
-
-/**
- *
- * @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_xfixes_set_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */);
-
-/**
- *
- * @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_xfixes_copy_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_copy_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_copy_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @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_xfixes_union_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_union_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_union_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @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_xfixes_intersect_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_intersect_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_intersect_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @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_xfixes_subtract_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_subtract_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_subtract_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @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_xfixes_invert_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_rectangle_t bounds
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_rectangle_t bounds /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_invert_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_rectangle_t bounds
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_invert_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_rectangle_t bounds /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @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_xfixes_translate_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param int16_t dx
- ** @param int16_t dy
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t dx /**< */,
- int16_t dy /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_translate_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param int16_t dx
- ** @param int16_t dy
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_translate_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t dx /**< */,
- int16_t dy /**< */);
-
-/**
- *
- * @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_xfixes_region_extents_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_region_extents
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_xfixes_fetch_region_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_fetch_region_cookie_t
-xcb_xfixes_fetch_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */);
-
-/**
- *
- * @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_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_xfixes_fetch_region_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_fetch_region_cookie_t
-xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_rectangle_t * xcb_xfixes_fetch_region_rectangles
- **
- ** @param const xcb_xfixes_fetch_region_reply_t *R
- ** @returns xcb_rectangle_t *
- **
- *****************************************************************************/
-
-xcb_rectangle_t *
-xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_fetch_region_rectangles_length
- **
- ** @param const xcb_xfixes_fetch_region_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_rectangle_iterator_t xcb_xfixes_fetch_region_rectangles_iterator
- **
- ** @param const xcb_xfixes_fetch_region_reply_t *R
- ** @returns xcb_rectangle_iterator_t
- **
- *****************************************************************************/
-
-xcb_rectangle_iterator_t
-xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_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_xfixes_fetch_region_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_fetch_region_reply_t * xcb_xfixes_fetch_region_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_fetch_region_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_fetch_region_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_fetch_region_reply_t *
-xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */,
- xcb_xfixes_fetch_region_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_xfixes_set_gc_clip_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_gcontext_t gc
- ** @param xcb_xfixes_region_t region
- ** @param int16_t x_origin
- ** @param int16_t y_origin
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */,
- xcb_gcontext_t gc /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t x_origin /**< */,
- int16_t y_origin /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_gc_clip_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_gcontext_t gc
- ** @param xcb_xfixes_region_t region
- ** @param int16_t x_origin
- ** @param int16_t y_origin
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */,
- xcb_gcontext_t gc /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t x_origin /**< */,
- int16_t y_origin /**< */);
-
-/**
- *
- * @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_xfixes_set_window_shape_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t dest
- ** @param xcb_shape_kind_t dest_kind
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */,
- xcb_window_t dest /**< */,
- xcb_shape_kind_t dest_kind /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_xfixes_region_t region /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_window_shape_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t dest
- ** @param xcb_shape_kind_t dest_kind
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */,
- xcb_window_t dest /**< */,
- xcb_shape_kind_t dest_kind /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_xfixes_region_t region /**< */);
-
-/**
- *
- * @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_xfixes_set_picture_clip_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_xfixes_region_t region
- ** @param int16_t x_origin
- ** @param int16_t y_origin
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t x_origin /**< */,
- int16_t y_origin /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_picture_clip_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_xfixes_region_t region
- ** @param int16_t x_origin
- ** @param int16_t y_origin
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t x_origin /**< */,
- int16_t y_origin /**< */);
-
-int
-xcb_xfixes_set_cursor_name_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_xfixes_set_cursor_name_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cursor
- ** @param uint16_t nbytes
- ** @param const char *name
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t cursor /**< */,
- uint16_t nbytes /**< */,
- const char *name /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_cursor_name
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cursor
- ** @param uint16_t nbytes
- ** @param const char *name
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */,
- xcb_cursor_t cursor /**< */,
- uint16_t nbytes /**< */,
- const char *name /**< */);
-
-int
-xcb_xfixes_get_cursor_name_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cursor
- ** @returns xcb_xfixes_get_cursor_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_name_cookie_t
-xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */,
- xcb_cursor_t cursor /**< */);
-
-/**
- *
- * @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_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cursor
- ** @returns xcb_xfixes_get_cursor_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_name_cookie_t
-xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c /**< */,
- xcb_cursor_t cursor /**< */);
-
-
-/*****************************************************************************
- **
- ** char * xcb_xfixes_get_cursor_name_name
- **
- ** @param const xcb_xfixes_get_cursor_name_reply_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_get_cursor_name_name_length
- **
- ** @param const xcb_xfixes_get_cursor_name_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xfixes_get_cursor_name_name_end
- **
- ** @param const xcb_xfixes_get_cursor_name_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xfixes_get_cursor_name_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_name_reply_t * xcb_xfixes_get_cursor_name_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_get_cursor_name_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_get_cursor_name_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_name_reply_t *
-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 /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_and_name_cookie_t
-xcb_xfixes_get_cursor_image_and_name (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_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_and_name_cookie_t
-xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c /**< */);
-
-
-/*****************************************************************************
- **
- ** char * xcb_xfixes_get_cursor_image_and_name_name
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_get_cursor_image_and_name_name_length
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_name_end
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** uint32_t * xcb_xfixes_get_cursor_image_and_name_cursor_image
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns uint32_t *
- **
- *****************************************************************************/
-
-uint32_t *
-xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_get_cursor_image_and_name_cursor_image_length
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_cursor_image_end
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xfixes_get_cursor_image_and_name_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_image_and_name_reply_t * xcb_xfixes_get_cursor_image_and_name_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_get_cursor_image_and_name_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_get_cursor_image_and_name_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_and_name_reply_t *
-xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c /**< */,
- xcb_xfixes_get_cursor_image_and_name_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_xfixes_change_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t source
- ** @param xcb_cursor_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t source /**< */,
- xcb_cursor_t destination /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_change_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t source
- ** @param xcb_cursor_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-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 /**< */);
-
-/**
- *
- * @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_xfixes_change_cursor_by_name_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t src
- ** @param uint16_t nbytes
- ** @param const char *name
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t src /**< */,
- uint16_t nbytes /**< */,
- const char *name /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_change_cursor_by_name
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t src
- ** @param uint16_t nbytes
- ** @param const char *name
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */,
- xcb_cursor_t src /**< */,
- uint16_t nbytes /**< */,
- 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 not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_expand_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @param uint16_t left
- ** @param uint16_t right
- ** @param uint16_t top
- ** @param uint16_t bottom
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */,
- uint16_t left /**< */,
- uint16_t right /**< */,
- uint16_t top /**< */,
- uint16_t bottom /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_expand_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @param uint16_t left
- ** @param uint16_t right
- ** @param uint16_t top
- ** @param uint16_t bottom
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_expand_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */,
- uint16_t left /**< */,
- uint16_t right /**< */,
- uint16_t top /**< */,
- uint16_t bottom /**< */);
-
-/**
- *
- * @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_xfixes_hide_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_hide_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_hide_cursor (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 not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_show_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_show_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_show_cursor (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/**
- * @}
- */
diff --git a/src/3rdparty/xcb/include/xcb/xinerama.h b/src/3rdparty/xcb/include/xcb/xinerama.h
deleted file mode 100644
index f18a96c791..0000000000
--- a/src/3rdparty/xcb/include/xcb/xinerama.h
+++ /dev/null
@@ -1,811 +0,0 @@
-/*
- * This file generated automatically from xinerama.xml by c_client.py.
- * Edit at your peril.
- */
-
-/**
- * @defgroup XCB_Xinerama_API XCB Xinerama API
- * @brief Xinerama XCB Protocol Implementation.
- * @{
- **/
-
-#ifndef __XINERAMA_H
-#define __XINERAMA_H
-
-#include "xcb.h"
-#include "xproto.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XCB_XINERAMA_MAJOR_VERSION 1
-#define XCB_XINERAMA_MINOR_VERSION 1
-
-extern xcb_extension_t xcb_xinerama_id;
-
-/**
- * @brief xcb_xinerama_screen_info_t
- **/
-typedef struct xcb_xinerama_screen_info_t {
- int16_t x_org; /**< */
- int16_t y_org; /**< */
- uint16_t width; /**< */
- uint16_t height; /**< */
-} xcb_xinerama_screen_info_t;
-
-/**
- * @brief xcb_xinerama_screen_info_iterator_t
- **/
-typedef struct xcb_xinerama_screen_info_iterator_t {
- xcb_xinerama_screen_info_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xinerama_screen_info_iterator_t;
-
-/**
- * @brief xcb_xinerama_query_version_cookie_t
- **/
-typedef struct xcb_xinerama_query_version_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xinerama_query_version_cookie_t;
-
-/** Opcode for xcb_xinerama_query_version. */
-#define XCB_XINERAMA_QUERY_VERSION 0
-
-/**
- * @brief xcb_xinerama_query_version_request_t
- **/
-typedef struct xcb_xinerama_query_version_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint8_t major; /**< */
- uint8_t minor; /**< */
-} xcb_xinerama_query_version_request_t;
-
-/**
- * @brief xcb_xinerama_query_version_reply_t
- **/
-typedef struct xcb_xinerama_query_version_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint16_t major; /**< */
- uint16_t minor; /**< */
-} xcb_xinerama_query_version_reply_t;
-
-/**
- * @brief xcb_xinerama_get_state_cookie_t
- **/
-typedef struct xcb_xinerama_get_state_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xinerama_get_state_cookie_t;
-
-/** Opcode for xcb_xinerama_get_state. */
-#define XCB_XINERAMA_GET_STATE 1
-
-/**
- * @brief xcb_xinerama_get_state_request_t
- **/
-typedef struct xcb_xinerama_get_state_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_xinerama_get_state_request_t;
-
-/**
- * @brief xcb_xinerama_get_state_reply_t
- **/
-typedef struct xcb_xinerama_get_state_reply_t {
- uint8_t response_type; /**< */
- uint8_t state; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_xinerama_get_state_reply_t;
-
-/**
- * @brief xcb_xinerama_get_screen_count_cookie_t
- **/
-typedef struct xcb_xinerama_get_screen_count_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xinerama_get_screen_count_cookie_t;
-
-/** Opcode for xcb_xinerama_get_screen_count. */
-#define XCB_XINERAMA_GET_SCREEN_COUNT 2
-
-/**
- * @brief xcb_xinerama_get_screen_count_request_t
- **/
-typedef struct xcb_xinerama_get_screen_count_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_xinerama_get_screen_count_request_t;
-
-/**
- * @brief xcb_xinerama_get_screen_count_reply_t
- **/
-typedef struct xcb_xinerama_get_screen_count_reply_t {
- uint8_t response_type; /**< */
- uint8_t screen_count; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_window_t window; /**< */
-} xcb_xinerama_get_screen_count_reply_t;
-
-/**
- * @brief xcb_xinerama_get_screen_size_cookie_t
- **/
-typedef struct xcb_xinerama_get_screen_size_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xinerama_get_screen_size_cookie_t;
-
-/** Opcode for xcb_xinerama_get_screen_size. */
-#define XCB_XINERAMA_GET_SCREEN_SIZE 3
-
-/**
- * @brief xcb_xinerama_get_screen_size_request_t
- **/
-typedef struct xcb_xinerama_get_screen_size_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_window_t window; /**< */
- uint32_t screen; /**< */
-} xcb_xinerama_get_screen_size_request_t;
-
-/**
- * @brief xcb_xinerama_get_screen_size_reply_t
- **/
-typedef struct xcb_xinerama_get_screen_size_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t width; /**< */
- uint32_t height; /**< */
- xcb_window_t window; /**< */
- uint32_t screen; /**< */
-} xcb_xinerama_get_screen_size_reply_t;
-
-/**
- * @brief xcb_xinerama_is_active_cookie_t
- **/
-typedef struct xcb_xinerama_is_active_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xinerama_is_active_cookie_t;
-
-/** Opcode for xcb_xinerama_is_active. */
-#define XCB_XINERAMA_IS_ACTIVE 4
-
-/**
- * @brief xcb_xinerama_is_active_request_t
- **/
-typedef struct xcb_xinerama_is_active_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
-} xcb_xinerama_is_active_request_t;
-
-/**
- * @brief xcb_xinerama_is_active_reply_t
- **/
-typedef struct xcb_xinerama_is_active_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t state; /**< */
-} xcb_xinerama_is_active_reply_t;
-
-/**
- * @brief xcb_xinerama_query_screens_cookie_t
- **/
-typedef struct xcb_xinerama_query_screens_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xinerama_query_screens_cookie_t;
-
-/** Opcode for xcb_xinerama_query_screens. */
-#define XCB_XINERAMA_QUERY_SCREENS 5
-
-/**
- * @brief xcb_xinerama_query_screens_request_t
- **/
-typedef struct xcb_xinerama_query_screens_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
-} xcb_xinerama_query_screens_request_t;
-
-/**
- * @brief xcb_xinerama_query_screens_reply_t
- **/
-typedef struct xcb_xinerama_query_screens_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t number; /**< */
- uint8_t pad1[20]; /**< */
-} xcb_xinerama_query_screens_reply_t;
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xinerama_screen_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_xinerama_screen_info_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 /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xinerama_screen_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_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 /**< */);
-
-/**
- *
- * @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 /**< */);
-
-/**
- *
- * @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_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 /**< */,
- uint8_t minor /**< */);
-
-/**
- * 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_xinerama_query_version_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** 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 /**< */);
-
-/**
- *
- * @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 /**< */);
-
-/**
- *
- * @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_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 /**< */);
-
-/**
- * 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_xinerama_get_state_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** 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 /**< */);
-
-/**
- *
- * @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 /**< */);
-
-/**
- *
- * @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_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 /**< */);
-
-/**
- * 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_xinerama_get_screen_count_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** 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 /**< */);
-
-/**
- *
- * @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 /**< */);
-
-/**
- *
- * @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_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 /**< */,
- uint32_t screen /**< */);
-
-/**
- * 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_xinerama_get_screen_size_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** 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 /**< */);
-
-/**
- *
- * @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 /**< */);
-
-/**
- *
- * @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_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 /**< */);
-
-/**
- * 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_xinerama_is_active_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** 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 /**< */);
-
-/**
- *
- * @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 /**< */);
-
-/**
- *
- * @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_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 /**< */);
-
-
-/*****************************************************************************
- **
- ** 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 /**< */);
-
-
-/*****************************************************************************
- **
- ** 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 /**< */);
-
-
-/*****************************************************************************
- **
- ** 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 /**< */);
-
-/**
- * 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_xinerama_query_screens_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** 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 /**< */,
- xcb_generic_error_t **e /**< */);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/**
- * @}
- */
diff --git a/src/3rdparty/xcb/include/xcb/xinput.h b/src/3rdparty/xcb/include/xcb/xinput.h
index 9420047c71..729c0b5169 100644
--- a/src/3rdparty/xcb/include/xcb/xinput.h
+++ b/src/3rdparty/xcb/include/xcb/xinput.h
@@ -12,8 +12,8 @@
#ifndef __XINPUT_H
#define __XINPUT_H
-#include "xcb.h"
-#include "xfixes.h"
+#include <xcb/xcb.h>
+#include <xcb/xfixes.h>
#ifdef __cplusplus
extern "C" {
diff --git a/src/3rdparty/xcb/include/xcb/xkb.h b/src/3rdparty/xcb/include/xcb/xkb.h
deleted file mode 100644
index 66b4712194..0000000000
--- a/src/3rdparty/xcb/include/xcb/xkb.h
+++ /dev/null
@@ -1,12085 +0,0 @@
-/*
- * This file generated automatically from xkb.xml by c_client.py.
- * Edit at your peril.
- */
-
-/**
- * @defgroup XCB_xkb_API XCB xkb API
- * @brief xkb XCB Protocol Implementation.
- * @{
- **/
-
-#ifndef __XKB_H
-#define __XKB_H
-
-#include "xcb.h"
-#include "xproto.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XCB_XKB_MAJOR_VERSION 1
-#define XCB_XKB_MINOR_VERSION 0
-
-extern xcb_extension_t xcb_xkb_id;
-
-typedef enum xcb_xkb_const_t {
- XCB_XKB_CONST_MAX_LEGAL_KEY_CODE = 255,
- XCB_XKB_CONST_PER_KEY_BIT_ARRAY_SIZE = 32,
- XCB_XKB_CONST_KEY_NAME_LENGTH = 4
-} xcb_xkb_const_t;
-
-typedef enum xcb_xkb_event_type_t {
- XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY = 1,
- XCB_XKB_EVENT_TYPE_MAP_NOTIFY = 2,
- XCB_XKB_EVENT_TYPE_STATE_NOTIFY = 4,
- XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY = 8,
- XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY = 16,
- XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY = 32,
- XCB_XKB_EVENT_TYPE_NAMES_NOTIFY = 64,
- XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY = 128,
- XCB_XKB_EVENT_TYPE_BELL_NOTIFY = 256,
- XCB_XKB_EVENT_TYPE_ACTION_MESSAGE = 512,
- XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY = 1024,
- XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY = 2048
-} xcb_xkb_event_type_t;
-
-typedef enum xcb_xkb_nkn_detail_t {
- XCB_XKB_NKN_DETAIL_KEYCODES = 1,
- XCB_XKB_NKN_DETAIL_GEOMETRY = 2,
- XCB_XKB_NKN_DETAIL_DEVICE_ID = 4
-} xcb_xkb_nkn_detail_t;
-
-typedef enum xcb_xkb_axn_detail_t {
- XCB_XKB_AXN_DETAIL_SK_PRESS = 1,
- XCB_XKB_AXN_DETAIL_SK_ACCEPT = 2,
- XCB_XKB_AXN_DETAIL_SK_REJECT = 4,
- XCB_XKB_AXN_DETAIL_SK_RELEASE = 8,
- XCB_XKB_AXN_DETAIL_BK_ACCEPT = 16,
- XCB_XKB_AXN_DETAIL_BK_REJECT = 32,
- XCB_XKB_AXN_DETAIL_AXK_WARNING = 64
-} xcb_xkb_axn_detail_t;
-
-typedef enum xcb_xkb_map_part_t {
- XCB_XKB_MAP_PART_KEY_TYPES = 1,
- XCB_XKB_MAP_PART_KEY_SYMS = 2,
- XCB_XKB_MAP_PART_MODIFIER_MAP = 4,
- XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS = 8,
- XCB_XKB_MAP_PART_KEY_ACTIONS = 16,
- XCB_XKB_MAP_PART_KEY_BEHAVIORS = 32,
- XCB_XKB_MAP_PART_VIRTUAL_MODS = 64,
- XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP = 128
-} xcb_xkb_map_part_t;
-
-typedef enum xcb_xkb_set_map_flags_t {
- XCB_XKB_SET_MAP_FLAGS_RESIZE_TYPES = 1,
- XCB_XKB_SET_MAP_FLAGS_RECOMPUTE_ACTIONS = 2
-} xcb_xkb_set_map_flags_t;
-
-typedef enum xcb_xkb_state_part_t {
- XCB_XKB_STATE_PART_MODIFIER_STATE = 1,
- XCB_XKB_STATE_PART_MODIFIER_BASE = 2,
- XCB_XKB_STATE_PART_MODIFIER_LATCH = 4,
- XCB_XKB_STATE_PART_MODIFIER_LOCK = 8,
- XCB_XKB_STATE_PART_GROUP_STATE = 16,
- XCB_XKB_STATE_PART_GROUP_BASE = 32,
- XCB_XKB_STATE_PART_GROUP_LATCH = 64,
- XCB_XKB_STATE_PART_GROUP_LOCK = 128,
- XCB_XKB_STATE_PART_COMPAT_STATE = 256,
- XCB_XKB_STATE_PART_GRAB_MODS = 512,
- XCB_XKB_STATE_PART_COMPAT_GRAB_MODS = 1024,
- XCB_XKB_STATE_PART_LOOKUP_MODS = 2048,
- XCB_XKB_STATE_PART_COMPAT_LOOKUP_MODS = 4096,
- XCB_XKB_STATE_PART_POINTER_BUTTONS = 8192
-} xcb_xkb_state_part_t;
-
-typedef enum xcb_xkb_bool_ctrl_t {
- XCB_XKB_BOOL_CTRL_REPEAT_KEYS = 1,
- XCB_XKB_BOOL_CTRL_SLOW_KEYS = 2,
- XCB_XKB_BOOL_CTRL_BOUNCE_KEYS = 4,
- XCB_XKB_BOOL_CTRL_STICKY_KEYS = 8,
- XCB_XKB_BOOL_CTRL_MOUSE_KEYS = 16,
- XCB_XKB_BOOL_CTRL_MOUSE_KEYS_ACCEL = 32,
- XCB_XKB_BOOL_CTRL_ACCESS_X_KEYS = 64,
- XCB_XKB_BOOL_CTRL_ACCESS_X_TIMEOUT_MASK = 128,
- XCB_XKB_BOOL_CTRL_ACCESS_X_FEEDBACK_MASK = 256,
- XCB_XKB_BOOL_CTRL_AUDIBLE_BELL_MASK = 512,
- XCB_XKB_BOOL_CTRL_OVERLAY_1_MASK = 1024,
- XCB_XKB_BOOL_CTRL_OVERLAY_2_MASK = 2048,
- XCB_XKB_BOOL_CTRL_IGNORE_GROUP_LOCK_MASK = 4096
-} xcb_xkb_bool_ctrl_t;
-
-typedef enum xcb_xkb_control_t {
- XCB_XKB_CONTROL_GROUPS_WRAP = 134217728,
- XCB_XKB_CONTROL_INTERNAL_MODS = 268435456,
- XCB_XKB_CONTROL_IGNORE_LOCK_MODS = 536870912,
- XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824u,
- XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648u
-} xcb_xkb_control_t;
-
-typedef enum xcb_xkb_ax_option_t {
- XCB_XKB_AX_OPTION_SK_PRESS_FB = 1,
- XCB_XKB_AX_OPTION_SK_ACCEPT_FB = 2,
- XCB_XKB_AX_OPTION_FEATURE_FB = 4,
- XCB_XKB_AX_OPTION_SLOW_WARN_FB = 8,
- XCB_XKB_AX_OPTION_INDICATOR_FB = 16,
- XCB_XKB_AX_OPTION_STICKY_KEYS_FB = 32,
- XCB_XKB_AX_OPTION_TWO_KEYS = 64,
- XCB_XKB_AX_OPTION_LATCH_TO_LOCK = 128,
- XCB_XKB_AX_OPTION_SK_RELEASE_FB = 256,
- XCB_XKB_AX_OPTION_SK_REJECT_FB = 512,
- XCB_XKB_AX_OPTION_BK_REJECT_FB = 1024,
- XCB_XKB_AX_OPTION_DUMB_BELL = 2048
-} xcb_xkb_ax_option_t;
-
-typedef uint16_t xcb_xkb_device_spec_t;
-
-/**
- * @brief xcb_xkb_device_spec_iterator_t
- **/
-typedef struct xcb_xkb_device_spec_iterator_t {
- xcb_xkb_device_spec_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_device_spec_iterator_t;
-
-typedef enum xcb_xkb_led_class_result_t {
- XCB_XKB_LED_CLASS_RESULT_KBD_FEEDBACK_CLASS = 0,
- XCB_XKB_LED_CLASS_RESULT_LED_FEEDBACK_CLASS = 4
-} xcb_xkb_led_class_result_t;
-
-typedef enum xcb_xkb_led_class_t {
- XCB_XKB_LED_CLASS_KBD_FEEDBACK_CLASS = 0,
- XCB_XKB_LED_CLASS_LED_FEEDBACK_CLASS = 4,
- XCB_XKB_LED_CLASS_DFLT_XI_CLASS = 768,
- XCB_XKB_LED_CLASS_ALL_XI_CLASSES = 1280
-} xcb_xkb_led_class_t;
-
-typedef uint16_t xcb_xkb_led_class_spec_t;
-
-/**
- * @brief xcb_xkb_led_class_spec_iterator_t
- **/
-typedef struct xcb_xkb_led_class_spec_iterator_t {
- xcb_xkb_led_class_spec_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_led_class_spec_iterator_t;
-
-typedef enum xcb_xkb_bell_class_result_t {
- XCB_XKB_BELL_CLASS_RESULT_KBD_FEEDBACK_CLASS = 0,
- XCB_XKB_BELL_CLASS_RESULT_BELL_FEEDBACK_CLASS = 5
-} xcb_xkb_bell_class_result_t;
-
-typedef enum xcb_xkb_bell_class_t {
- XCB_XKB_BELL_CLASS_KBD_FEEDBACK_CLASS = 0,
- XCB_XKB_BELL_CLASS_BELL_FEEDBACK_CLASS = 5,
- XCB_XKB_BELL_CLASS_DFLT_XI_CLASS = 768
-} xcb_xkb_bell_class_t;
-
-typedef uint16_t xcb_xkb_bell_class_spec_t;
-
-/**
- * @brief xcb_xkb_bell_class_spec_iterator_t
- **/
-typedef struct xcb_xkb_bell_class_spec_iterator_t {
- xcb_xkb_bell_class_spec_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_bell_class_spec_iterator_t;
-
-typedef enum xcb_xkb_id_t {
- XCB_XKB_ID_USE_CORE_KBD = 256,
- XCB_XKB_ID_USE_CORE_PTR = 512,
- XCB_XKB_ID_DFLT_XI_CLASS = 768,
- XCB_XKB_ID_DFLT_XI_ID = 1024,
- XCB_XKB_ID_ALL_XI_CLASS = 1280,
- XCB_XKB_ID_ALL_XI_ID = 1536,
- XCB_XKB_ID_XI_NONE = 65280
-} xcb_xkb_id_t;
-
-typedef uint16_t xcb_xkb_id_spec_t;
-
-/**
- * @brief xcb_xkb_id_spec_iterator_t
- **/
-typedef struct xcb_xkb_id_spec_iterator_t {
- xcb_xkb_id_spec_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_id_spec_iterator_t;
-
-typedef enum xcb_xkb_group_t {
- XCB_XKB_GROUP_1 = 0,
- XCB_XKB_GROUP_2 = 1,
- XCB_XKB_GROUP_3 = 2,
- XCB_XKB_GROUP_4 = 3
-} xcb_xkb_group_t;
-
-typedef enum xcb_xkb_groups_t {
- XCB_XKB_GROUPS_ANY = 254,
- XCB_XKB_GROUPS_ALL = 255
-} xcb_xkb_groups_t;
-
-typedef enum xcb_xkb_set_of_group_t {
- XCB_XKB_SET_OF_GROUP_GROUP_1 = 1,
- XCB_XKB_SET_OF_GROUP_GROUP_2 = 2,
- XCB_XKB_SET_OF_GROUP_GROUP_3 = 4,
- XCB_XKB_SET_OF_GROUP_GROUP_4 = 8
-} xcb_xkb_set_of_group_t;
-
-typedef enum xcb_xkb_set_of_groups_t {
- XCB_XKB_SET_OF_GROUPS_ANY = 128
-} xcb_xkb_set_of_groups_t;
-
-typedef enum xcb_xkb_groups_wrap_t {
- XCB_XKB_GROUPS_WRAP_WRAP_INTO_RANGE = 0,
- XCB_XKB_GROUPS_WRAP_CLAMP_INTO_RANGE = 64,
- XCB_XKB_GROUPS_WRAP_REDIRECT_INTO_RANGE = 128
-} xcb_xkb_groups_wrap_t;
-
-typedef enum xcb_xkb_v_mods_high_t {
- XCB_XKB_V_MODS_HIGH_15 = 128,
- XCB_XKB_V_MODS_HIGH_14 = 64,
- XCB_XKB_V_MODS_HIGH_13 = 32,
- XCB_XKB_V_MODS_HIGH_12 = 16,
- XCB_XKB_V_MODS_HIGH_11 = 8,
- XCB_XKB_V_MODS_HIGH_10 = 4,
- XCB_XKB_V_MODS_HIGH_9 = 2,
- XCB_XKB_V_MODS_HIGH_8 = 1
-} xcb_xkb_v_mods_high_t;
-
-typedef enum xcb_xkb_v_mods_low_t {
- XCB_XKB_V_MODS_LOW_7 = 128,
- XCB_XKB_V_MODS_LOW_6 = 64,
- XCB_XKB_V_MODS_LOW_5 = 32,
- XCB_XKB_V_MODS_LOW_4 = 16,
- XCB_XKB_V_MODS_LOW_3 = 8,
- XCB_XKB_V_MODS_LOW_2 = 4,
- XCB_XKB_V_MODS_LOW_1 = 2,
- XCB_XKB_V_MODS_LOW_0 = 1
-} xcb_xkb_v_mods_low_t;
-
-typedef enum xcb_xkb_v_mod_t {
- XCB_XKB_V_MOD_15 = 32768,
- XCB_XKB_V_MOD_14 = 16384,
- XCB_XKB_V_MOD_13 = 8192,
- XCB_XKB_V_MOD_12 = 4096,
- XCB_XKB_V_MOD_11 = 2048,
- XCB_XKB_V_MOD_10 = 1024,
- XCB_XKB_V_MOD_9 = 512,
- XCB_XKB_V_MOD_8 = 256,
- XCB_XKB_V_MOD_7 = 128,
- XCB_XKB_V_MOD_6 = 64,
- XCB_XKB_V_MOD_5 = 32,
- XCB_XKB_V_MOD_4 = 16,
- XCB_XKB_V_MOD_3 = 8,
- XCB_XKB_V_MOD_2 = 4,
- XCB_XKB_V_MOD_1 = 2,
- XCB_XKB_V_MOD_0 = 1
-} xcb_xkb_v_mod_t;
-
-typedef enum xcb_xkb_explicit_t {
- XCB_XKB_EXPLICIT_V_MOD_MAP = 128,
- XCB_XKB_EXPLICIT_BEHAVIOR = 64,
- XCB_XKB_EXPLICIT_AUTO_REPEAT = 32,
- XCB_XKB_EXPLICIT_INTERPRET = 16,
- XCB_XKB_EXPLICIT_KEY_TYPE_4 = 8,
- XCB_XKB_EXPLICIT_KEY_TYPE_3 = 4,
- XCB_XKB_EXPLICIT_KEY_TYPE_2 = 2,
- XCB_XKB_EXPLICIT_KEY_TYPE_1 = 1
-} xcb_xkb_explicit_t;
-
-typedef enum xcb_xkb_sym_interpret_match_t {
- XCB_XKB_SYM_INTERPRET_MATCH_NONE_OF = 0,
- XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF_OR_NONE = 1,
- XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF = 2,
- XCB_XKB_SYM_INTERPRET_MATCH_ALL_OF = 3,
- XCB_XKB_SYM_INTERPRET_MATCH_EXACTLY = 4
-} xcb_xkb_sym_interpret_match_t;
-
-typedef enum xcb_xkb_sym_interp_match_t {
- XCB_XKB_SYM_INTERP_MATCH_LEVEL_ONE_ONLY = 128,
- XCB_XKB_SYM_INTERP_MATCH_OP_MASK = 127
-} xcb_xkb_sym_interp_match_t;
-
-typedef enum xcb_xkb_im_flag_t {
- XCB_XKB_IM_FLAG_NO_EXPLICIT = 128,
- XCB_XKB_IM_FLAG_NO_AUTOMATIC = 64,
- XCB_XKB_IM_FLAG_LED_DRIVES_KB = 32
-} xcb_xkb_im_flag_t;
-
-typedef enum xcb_xkb_im_mods_which_t {
- XCB_XKB_IM_MODS_WHICH_USE_COMPAT = 16,
- XCB_XKB_IM_MODS_WHICH_USE_EFFECTIVE = 8,
- XCB_XKB_IM_MODS_WHICH_USE_LOCKED = 4,
- XCB_XKB_IM_MODS_WHICH_USE_LATCHED = 2,
- XCB_XKB_IM_MODS_WHICH_USE_BASE = 1
-} xcb_xkb_im_mods_which_t;
-
-typedef enum xcb_xkb_im_groups_which_t {
- XCB_XKB_IM_GROUPS_WHICH_USE_COMPAT = 16,
- XCB_XKB_IM_GROUPS_WHICH_USE_EFFECTIVE = 8,
- XCB_XKB_IM_GROUPS_WHICH_USE_LOCKED = 4,
- XCB_XKB_IM_GROUPS_WHICH_USE_LATCHED = 2,
- XCB_XKB_IM_GROUPS_WHICH_USE_BASE = 1
-} xcb_xkb_im_groups_which_t;
-
-/**
- * @brief xcb_xkb_indicator_map_t
- **/
-typedef struct xcb_xkb_indicator_map_t {
- uint8_t flags; /**< */
- uint8_t whichGroups; /**< */
- uint8_t groups; /**< */
- uint8_t whichMods; /**< */
- uint8_t mods; /**< */
- uint8_t realMods; /**< */
- uint16_t vmods; /**< */
- uint32_t ctrls; /**< */
-} xcb_xkb_indicator_map_t;
-
-/**
- * @brief xcb_xkb_indicator_map_iterator_t
- **/
-typedef struct xcb_xkb_indicator_map_iterator_t {
- xcb_xkb_indicator_map_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_indicator_map_iterator_t;
-
-typedef enum xcb_xkb_cm_detail_t {
- XCB_XKB_CM_DETAIL_SYM_INTERP = 1,
- XCB_XKB_CM_DETAIL_GROUP_COMPAT = 2
-} xcb_xkb_cm_detail_t;
-
-typedef enum xcb_xkb_name_detail_t {
- XCB_XKB_NAME_DETAIL_KEYCODES = 1,
- XCB_XKB_NAME_DETAIL_GEOMETRY = 2,
- XCB_XKB_NAME_DETAIL_SYMBOLS = 4,
- XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS = 8,
- XCB_XKB_NAME_DETAIL_TYPES = 16,
- XCB_XKB_NAME_DETAIL_COMPAT = 32,
- XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES = 64,
- XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES = 128,
- XCB_XKB_NAME_DETAIL_INDICATOR_NAMES = 256,
- XCB_XKB_NAME_DETAIL_KEY_NAMES = 512,
- XCB_XKB_NAME_DETAIL_KEY_ALIASES = 1024,
- XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES = 2048,
- XCB_XKB_NAME_DETAIL_GROUP_NAMES = 4096,
- XCB_XKB_NAME_DETAIL_RG_NAMES = 8192
-} xcb_xkb_name_detail_t;
-
-typedef enum xcb_xkb_gbn_detail_t {
- XCB_XKB_GBN_DETAIL_TYPES = 1,
- XCB_XKB_GBN_DETAIL_COMPAT_MAP = 2,
- XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS = 4,
- XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS = 8,
- XCB_XKB_GBN_DETAIL_INDICATOR_MAPS = 16,
- XCB_XKB_GBN_DETAIL_KEY_NAMES = 32,
- XCB_XKB_GBN_DETAIL_GEOMETRY = 64,
- XCB_XKB_GBN_DETAIL_OTHER_NAMES = 128
-} xcb_xkb_gbn_detail_t;
-
-typedef enum xcb_xkb_xi_feature_t {
- XCB_XKB_XI_FEATURE_KEYBOARDS = 1,
- XCB_XKB_XI_FEATURE_BUTTON_ACTIONS = 2,
- XCB_XKB_XI_FEATURE_INDICATOR_NAMES = 4,
- XCB_XKB_XI_FEATURE_INDICATOR_MAPS = 8,
- XCB_XKB_XI_FEATURE_INDICATOR_STATE = 16
-} xcb_xkb_xi_feature_t;
-
-typedef enum xcb_xkb_per_client_flag_t {
- XCB_XKB_PER_CLIENT_FLAG_DETECTABLE_AUTO_REPEAT = 1,
- XCB_XKB_PER_CLIENT_FLAG_GRABS_USE_XKB_STATE = 2,
- XCB_XKB_PER_CLIENT_FLAG_AUTO_RESET_CONTROLS = 4,
- XCB_XKB_PER_CLIENT_FLAG_LOOKUP_STATE_WHEN_GRABBED = 8,
- XCB_XKB_PER_CLIENT_FLAG_SEND_EVENT_USES_XKB_STATE = 16
-} xcb_xkb_per_client_flag_t;
-
-/**
- * @brief xcb_xkb_mod_def_t
- **/
-typedef struct xcb_xkb_mod_def_t {
- uint8_t mask; /**< */
- uint8_t realMods; /**< */
- uint16_t vmods; /**< */
-} xcb_xkb_mod_def_t;
-
-/**
- * @brief xcb_xkb_mod_def_iterator_t
- **/
-typedef struct xcb_xkb_mod_def_iterator_t {
- xcb_xkb_mod_def_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_mod_def_iterator_t;
-
-/**
- * @brief xcb_xkb_key_name_t
- **/
-typedef struct xcb_xkb_key_name_t {
- char name[4]; /**< */
-} xcb_xkb_key_name_t;
-
-/**
- * @brief xcb_xkb_key_name_iterator_t
- **/
-typedef struct xcb_xkb_key_name_iterator_t {
- xcb_xkb_key_name_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_key_name_iterator_t;
-
-/**
- * @brief xcb_xkb_key_alias_t
- **/
-typedef struct xcb_xkb_key_alias_t {
- char real[4]; /**< */
- char alias[4]; /**< */
-} xcb_xkb_key_alias_t;
-
-/**
- * @brief xcb_xkb_key_alias_iterator_t
- **/
-typedef struct xcb_xkb_key_alias_iterator_t {
- xcb_xkb_key_alias_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_key_alias_iterator_t;
-
-/**
- * @brief xcb_xkb_counted_string_16_t
- **/
-typedef struct xcb_xkb_counted_string_16_t {
- uint16_t length; /**< */
-} xcb_xkb_counted_string_16_t;
-
-/**
- * @brief xcb_xkb_counted_string_16_iterator_t
- **/
-typedef struct xcb_xkb_counted_string_16_iterator_t {
- xcb_xkb_counted_string_16_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_counted_string_16_iterator_t;
-
-/**
- * @brief xcb_xkb_kt_map_entry_t
- **/
-typedef struct xcb_xkb_kt_map_entry_t {
- uint8_t active; /**< */
- uint8_t mods_mask; /**< */
- uint8_t level; /**< */
- uint8_t mods_mods; /**< */
- uint16_t mods_vmods; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_kt_map_entry_t;
-
-/**
- * @brief xcb_xkb_kt_map_entry_iterator_t
- **/
-typedef struct xcb_xkb_kt_map_entry_iterator_t {
- xcb_xkb_kt_map_entry_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_kt_map_entry_iterator_t;
-
-/**
- * @brief xcb_xkb_key_type_t
- **/
-typedef struct xcb_xkb_key_type_t {
- uint8_t mods_mask; /**< */
- uint8_t mods_mods; /**< */
- uint16_t mods_vmods; /**< */
- uint8_t numLevels; /**< */
- uint8_t nMapEntries; /**< */
- uint8_t hasPreserve; /**< */
- uint8_t pad0; /**< */
-} xcb_xkb_key_type_t;
-
-/**
- * @brief xcb_xkb_key_type_iterator_t
- **/
-typedef struct xcb_xkb_key_type_iterator_t {
- xcb_xkb_key_type_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_key_type_iterator_t;
-
-/**
- * @brief xcb_xkb_key_sym_map_t
- **/
-typedef struct xcb_xkb_key_sym_map_t {
- uint8_t kt_index[4]; /**< */
- uint8_t groupInfo; /**< */
- uint8_t width; /**< */
- uint16_t nSyms; /**< */
-} xcb_xkb_key_sym_map_t;
-
-/**
- * @brief xcb_xkb_key_sym_map_iterator_t
- **/
-typedef struct xcb_xkb_key_sym_map_iterator_t {
- xcb_xkb_key_sym_map_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_key_sym_map_iterator_t;
-
-/**
- * @brief xcb_xkb_common_behavior_t
- **/
-typedef struct xcb_xkb_common_behavior_t {
- uint8_t type; /**< */
- uint8_t data; /**< */
-} xcb_xkb_common_behavior_t;
-
-/**
- * @brief xcb_xkb_common_behavior_iterator_t
- **/
-typedef struct xcb_xkb_common_behavior_iterator_t {
- xcb_xkb_common_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_common_behavior_iterator_t;
-
-/**
- * @brief xcb_xkb_default_behavior_t
- **/
-typedef struct xcb_xkb_default_behavior_t {
- uint8_t type; /**< */
- uint8_t pad0; /**< */
-} xcb_xkb_default_behavior_t;
-
-/**
- * @brief xcb_xkb_default_behavior_iterator_t
- **/
-typedef struct xcb_xkb_default_behavior_iterator_t {
- xcb_xkb_default_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_default_behavior_iterator_t;
-
-/**
- * @brief xcb_xkb_lock_behavior_t
- **/
-typedef struct xcb_xkb_lock_behavior_t {
- uint8_t type; /**< */
- uint8_t pad0; /**< */
-} xcb_xkb_lock_behavior_t;
-
-/**
- * @brief xcb_xkb_lock_behavior_iterator_t
- **/
-typedef struct xcb_xkb_lock_behavior_iterator_t {
- xcb_xkb_lock_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_lock_behavior_iterator_t;
-
-/**
- * @brief xcb_xkb_radio_group_behavior_t
- **/
-typedef struct xcb_xkb_radio_group_behavior_t {
- uint8_t type; /**< */
- uint8_t group; /**< */
-} xcb_xkb_radio_group_behavior_t;
-
-/**
- * @brief xcb_xkb_radio_group_behavior_iterator_t
- **/
-typedef struct xcb_xkb_radio_group_behavior_iterator_t {
- xcb_xkb_radio_group_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_radio_group_behavior_iterator_t;
-
-/**
- * @brief xcb_xkb_overlay_behavior_t
- **/
-typedef struct xcb_xkb_overlay_behavior_t {
- uint8_t type; /**< */
- xcb_keycode_t key; /**< */
-} xcb_xkb_overlay_behavior_t;
-
-/**
- * @brief xcb_xkb_overlay_behavior_iterator_t
- **/
-typedef struct xcb_xkb_overlay_behavior_iterator_t {
- xcb_xkb_overlay_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_overlay_behavior_iterator_t;
-
-/**
- * @brief xcb_xkb_permament_lock_behavior_t
- **/
-typedef struct xcb_xkb_permament_lock_behavior_t {
- uint8_t type; /**< */
- uint8_t pad0; /**< */
-} xcb_xkb_permament_lock_behavior_t;
-
-/**
- * @brief xcb_xkb_permament_lock_behavior_iterator_t
- **/
-typedef struct xcb_xkb_permament_lock_behavior_iterator_t {
- xcb_xkb_permament_lock_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_permament_lock_behavior_iterator_t;
-
-/**
- * @brief xcb_xkb_permament_radio_group_behavior_t
- **/
-typedef struct xcb_xkb_permament_radio_group_behavior_t {
- uint8_t type; /**< */
- uint8_t group; /**< */
-} xcb_xkb_permament_radio_group_behavior_t;
-
-/**
- * @brief xcb_xkb_permament_radio_group_behavior_iterator_t
- **/
-typedef struct xcb_xkb_permament_radio_group_behavior_iterator_t {
- xcb_xkb_permament_radio_group_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_permament_radio_group_behavior_iterator_t;
-
-/**
- * @brief xcb_xkb_permament_overlay_behavior_t
- **/
-typedef struct xcb_xkb_permament_overlay_behavior_t {
- uint8_t type; /**< */
- xcb_keycode_t key; /**< */
-} xcb_xkb_permament_overlay_behavior_t;
-
-/**
- * @brief xcb_xkb_permament_overlay_behavior_iterator_t
- **/
-typedef struct xcb_xkb_permament_overlay_behavior_iterator_t {
- xcb_xkb_permament_overlay_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_permament_overlay_behavior_iterator_t;
-
-/**
- * @brief xcb_xkb_behavior_t
- **/
-typedef union xcb_xkb_behavior_t {
- xcb_xkb_common_behavior_t common; /**< */
- xcb_xkb_default_behavior_t _default; /**< */
- xcb_xkb_lock_behavior_t lock; /**< */
- xcb_xkb_radio_group_behavior_t radioGroup; /**< */
- xcb_xkb_overlay_behavior_t overlay1; /**< */
- xcb_xkb_overlay_behavior_t overlay2; /**< */
- xcb_xkb_permament_lock_behavior_t permamentLock; /**< */
- xcb_xkb_permament_radio_group_behavior_t permamentRadioGroup; /**< */
- xcb_xkb_permament_overlay_behavior_t permamentOverlay1; /**< */
- xcb_xkb_permament_overlay_behavior_t permamentOverlay2; /**< */
- uint8_t type; /**< */
-} xcb_xkb_behavior_t;
-
-/**
- * @brief xcb_xkb_behavior_iterator_t
- **/
-typedef struct xcb_xkb_behavior_iterator_t {
- xcb_xkb_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_behavior_iterator_t;
-
-typedef enum xcb_xkb_behavior_type_t {
- XCB_XKB_BEHAVIOR_TYPE_DEFAULT = 0,
- XCB_XKB_BEHAVIOR_TYPE_LOCK = 1,
- XCB_XKB_BEHAVIOR_TYPE_RADIO_GROUP = 2,
- XCB_XKB_BEHAVIOR_TYPE_OVERLAY_1 = 3,
- XCB_XKB_BEHAVIOR_TYPE_OVERLAY_2 = 4,
- XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_LOCK = 129,
- XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_RADIO_GROUP = 130,
- XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_1 = 131,
- XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_2 = 132
-} xcb_xkb_behavior_type_t;
-
-/**
- * @brief xcb_xkb_set_behavior_t
- **/
-typedef struct xcb_xkb_set_behavior_t {
- xcb_keycode_t keycode; /**< */
- xcb_xkb_behavior_t behavior; /**< */
- uint8_t pad0; /**< */
-} xcb_xkb_set_behavior_t;
-
-/**
- * @brief xcb_xkb_set_behavior_iterator_t
- **/
-typedef struct xcb_xkb_set_behavior_iterator_t {
- xcb_xkb_set_behavior_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_set_behavior_iterator_t;
-
-/**
- * @brief xcb_xkb_set_explicit_t
- **/
-typedef struct xcb_xkb_set_explicit_t {
- xcb_keycode_t keycode; /**< */
- uint8_t explicit; /**< */
-} xcb_xkb_set_explicit_t;
-
-/**
- * @brief xcb_xkb_set_explicit_iterator_t
- **/
-typedef struct xcb_xkb_set_explicit_iterator_t {
- xcb_xkb_set_explicit_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_set_explicit_iterator_t;
-
-/**
- * @brief xcb_xkb_key_mod_map_t
- **/
-typedef struct xcb_xkb_key_mod_map_t {
- xcb_keycode_t keycode; /**< */
- uint8_t mods; /**< */
-} xcb_xkb_key_mod_map_t;
-
-/**
- * @brief xcb_xkb_key_mod_map_iterator_t
- **/
-typedef struct xcb_xkb_key_mod_map_iterator_t {
- xcb_xkb_key_mod_map_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_key_mod_map_iterator_t;
-
-/**
- * @brief xcb_xkb_key_v_mod_map_t
- **/
-typedef struct xcb_xkb_key_v_mod_map_t {
- xcb_keycode_t keycode; /**< */
- uint8_t pad0; /**< */
- uint16_t vmods; /**< */
-} xcb_xkb_key_v_mod_map_t;
-
-/**
- * @brief xcb_xkb_key_v_mod_map_iterator_t
- **/
-typedef struct xcb_xkb_key_v_mod_map_iterator_t {
- xcb_xkb_key_v_mod_map_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_key_v_mod_map_iterator_t;
-
-/**
- * @brief xcb_xkb_kt_set_map_entry_t
- **/
-typedef struct xcb_xkb_kt_set_map_entry_t {
- uint8_t level; /**< */
- uint8_t realMods; /**< */
- uint16_t virtualMods; /**< */
-} xcb_xkb_kt_set_map_entry_t;
-
-/**
- * @brief xcb_xkb_kt_set_map_entry_iterator_t
- **/
-typedef struct xcb_xkb_kt_set_map_entry_iterator_t {
- xcb_xkb_kt_set_map_entry_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_kt_set_map_entry_iterator_t;
-
-/**
- * @brief xcb_xkb_set_key_type_t
- **/
-typedef struct xcb_xkb_set_key_type_t {
- uint8_t mask; /**< */
- uint8_t realMods; /**< */
- uint16_t virtualMods; /**< */
- uint8_t numLevels; /**< */
- uint8_t nMapEntries; /**< */
- uint8_t preserve; /**< */
- uint8_t pad0; /**< */
-} xcb_xkb_set_key_type_t;
-
-/**
- * @brief xcb_xkb_set_key_type_iterator_t
- **/
-typedef struct xcb_xkb_set_key_type_iterator_t {
- xcb_xkb_set_key_type_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_set_key_type_iterator_t;
-
-typedef char xcb_xkb_string8_t;
-
-/**
- * @brief xcb_xkb_string8_iterator_t
- **/
-typedef struct xcb_xkb_string8_iterator_t {
- xcb_xkb_string8_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_string8_iterator_t;
-
-/**
- * @brief xcb_xkb_outline_t
- **/
-typedef struct xcb_xkb_outline_t {
- uint8_t nPoints; /**< */
- uint8_t cornerRadius; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_outline_t;
-
-/**
- * @brief xcb_xkb_outline_iterator_t
- **/
-typedef struct xcb_xkb_outline_iterator_t {
- xcb_xkb_outline_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_outline_iterator_t;
-
-/**
- * @brief xcb_xkb_shape_t
- **/
-typedef struct xcb_xkb_shape_t {
- xcb_atom_t name; /**< */
- uint8_t nOutlines; /**< */
- uint8_t primaryNdx; /**< */
- uint8_t approxNdx; /**< */
- uint8_t pad0; /**< */
-} xcb_xkb_shape_t;
-
-/**
- * @brief xcb_xkb_shape_iterator_t
- **/
-typedef struct xcb_xkb_shape_iterator_t {
- xcb_xkb_shape_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_shape_iterator_t;
-
-/**
- * @brief xcb_xkb_key_t
- **/
-typedef struct xcb_xkb_key_t {
- xcb_xkb_string8_t name[4]; /**< */
- int16_t gap; /**< */
- uint8_t shapeNdx; /**< */
- uint8_t colorNdx; /**< */
-} xcb_xkb_key_t;
-
-/**
- * @brief xcb_xkb_key_iterator_t
- **/
-typedef struct xcb_xkb_key_iterator_t {
- xcb_xkb_key_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_key_iterator_t;
-
-/**
- * @brief xcb_xkb_overlay_key_t
- **/
-typedef struct xcb_xkb_overlay_key_t {
- xcb_xkb_string8_t over[4]; /**< */
- xcb_xkb_string8_t under[4]; /**< */
-} xcb_xkb_overlay_key_t;
-
-/**
- * @brief xcb_xkb_overlay_key_iterator_t
- **/
-typedef struct xcb_xkb_overlay_key_iterator_t {
- xcb_xkb_overlay_key_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_overlay_key_iterator_t;
-
-/**
- * @brief xcb_xkb_overlay_row_t
- **/
-typedef struct xcb_xkb_overlay_row_t {
- uint8_t rowUnder; /**< */
- uint8_t nKeys; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_overlay_row_t;
-
-/**
- * @brief xcb_xkb_overlay_row_iterator_t
- **/
-typedef struct xcb_xkb_overlay_row_iterator_t {
- xcb_xkb_overlay_row_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_overlay_row_iterator_t;
-
-/**
- * @brief xcb_xkb_overlay_t
- **/
-typedef struct xcb_xkb_overlay_t {
- xcb_atom_t name; /**< */
- uint8_t nRows; /**< */
- uint8_t pad0[3]; /**< */
-} xcb_xkb_overlay_t;
-
-/**
- * @brief xcb_xkb_overlay_iterator_t
- **/
-typedef struct xcb_xkb_overlay_iterator_t {
- xcb_xkb_overlay_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_overlay_iterator_t;
-
-/**
- * @brief xcb_xkb_row_t
- **/
-typedef struct xcb_xkb_row_t {
- int16_t top; /**< */
- int16_t left; /**< */
- uint8_t nKeys; /**< */
- uint8_t vertical; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_row_t;
-
-/**
- * @brief xcb_xkb_row_iterator_t
- **/
-typedef struct xcb_xkb_row_iterator_t {
- xcb_xkb_row_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_row_iterator_t;
-
-typedef enum xcb_xkb_doodad_type_t {
- XCB_XKB_DOODAD_TYPE_OUTLINE = 1,
- XCB_XKB_DOODAD_TYPE_SOLID = 2,
- XCB_XKB_DOODAD_TYPE_TEXT = 3,
- XCB_XKB_DOODAD_TYPE_INDICATOR = 4,
- XCB_XKB_DOODAD_TYPE_LOGO = 5
-} xcb_xkb_doodad_type_t;
-
-/**
- * @brief xcb_xkb_listing_t
- **/
-typedef struct xcb_xkb_listing_t {
- uint16_t flags; /**< */
- uint16_t length; /**< */
-} xcb_xkb_listing_t;
-
-/**
- * @brief xcb_xkb_listing_iterator_t
- **/
-typedef struct xcb_xkb_listing_iterator_t {
- xcb_xkb_listing_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_listing_iterator_t;
-
-/**
- * @brief xcb_xkb_device_led_info_t
- **/
-typedef struct xcb_xkb_device_led_info_t {
- xcb_xkb_led_class_spec_t ledClass; /**< */
- xcb_xkb_id_spec_t ledID; /**< */
- uint32_t namesPresent; /**< */
- uint32_t mapsPresent; /**< */
- uint32_t physIndicators; /**< */
- uint32_t state; /**< */
-} xcb_xkb_device_led_info_t;
-
-/**
- * @brief xcb_xkb_device_led_info_iterator_t
- **/
-typedef struct xcb_xkb_device_led_info_iterator_t {
- xcb_xkb_device_led_info_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_device_led_info_iterator_t;
-
-typedef enum xcb_xkb_error_t {
- XCB_XKB_ERROR_BAD_DEVICE = 255,
- XCB_XKB_ERROR_BAD_CLASS = 254,
- XCB_XKB_ERROR_BAD_ID = 253
-} xcb_xkb_error_t;
-
-/** Opcode for xcb_xkb_keyboard. */
-#define XCB_XKB_KEYBOARD 0
-
-/**
- * @brief xcb_xkb_keyboard_error_t
- **/
-typedef struct xcb_xkb_keyboard_error_t {
- uint8_t response_type; /**< */
- uint8_t error_code; /**< */
- uint16_t sequence; /**< */
- uint32_t value; /**< */
- uint16_t minorOpcode; /**< */
- uint8_t majorOpcode; /**< */
- uint8_t pad0[21]; /**< */
-} xcb_xkb_keyboard_error_t;
-
-typedef enum xcb_xkb_sa_t {
- XCB_XKB_SA_CLEAR_LOCKS = 1,
- XCB_XKB_SA_LATCH_TO_LOCK = 2,
- XCB_XKB_SA_USE_MOD_MAP_MODS = 4,
- XCB_XKB_SA_GROUP_ABSOLUTE = 4
-} xcb_xkb_sa_t;
-
-typedef enum xcb_xkb_sa_type_t {
- XCB_XKB_SA_TYPE_NO_ACTION = 0,
- XCB_XKB_SA_TYPE_SET_MODS = 1,
- XCB_XKB_SA_TYPE_LATCH_MODS = 2,
- XCB_XKB_SA_TYPE_LOCK_MODS = 3,
- XCB_XKB_SA_TYPE_SET_GROUP = 4,
- XCB_XKB_SA_TYPE_LATCH_GROUP = 5,
- XCB_XKB_SA_TYPE_LOCK_GROUP = 6,
- XCB_XKB_SA_TYPE_MOVE_PTR = 7,
- XCB_XKB_SA_TYPE_PTR_BTN = 8,
- XCB_XKB_SA_TYPE_LOCK_PTR_BTN = 9,
- XCB_XKB_SA_TYPE_SET_PTR_DFLT = 10,
- XCB_XKB_SA_TYPE_ISO_LOCK = 11,
- XCB_XKB_SA_TYPE_TERMINATE = 12,
- XCB_XKB_SA_TYPE_SWITCH_SCREEN = 13,
- XCB_XKB_SA_TYPE_SET_CONTROLS = 14,
- XCB_XKB_SA_TYPE_LOCK_CONTROLS = 15,
- XCB_XKB_SA_TYPE_ACTION_MESSAGE = 16,
- XCB_XKB_SA_TYPE_REDIRECT_KEY = 17,
- XCB_XKB_SA_TYPE_DEVICE_BTN = 18,
- XCB_XKB_SA_TYPE_LOCK_DEVICE_BTN = 19,
- XCB_XKB_SA_TYPE_DEVICE_VALUATOR = 20
-} xcb_xkb_sa_type_t;
-
-/**
- * @brief xcb_xkb_sa_no_action_t
- **/
-typedef struct xcb_xkb_sa_no_action_t {
- uint8_t type; /**< */
- uint8_t pad0[7]; /**< */
-} xcb_xkb_sa_no_action_t;
-
-/**
- * @brief xcb_xkb_sa_no_action_iterator_t
- **/
-typedef struct xcb_xkb_sa_no_action_iterator_t {
- xcb_xkb_sa_no_action_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_no_action_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_set_mods_t
- **/
-typedef struct xcb_xkb_sa_set_mods_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t mask; /**< */
- uint8_t realMods; /**< */
- uint8_t vmodsHigh; /**< */
- uint8_t vmodsLow; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_sa_set_mods_t;
-
-/**
- * @brief xcb_xkb_sa_set_mods_iterator_t
- **/
-typedef struct xcb_xkb_sa_set_mods_iterator_t {
- xcb_xkb_sa_set_mods_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_set_mods_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_latch_mods_t
- **/
-typedef struct xcb_xkb_sa_latch_mods_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t mask; /**< */
- uint8_t realMods; /**< */
- uint8_t vmodsHigh; /**< */
- uint8_t vmodsLow; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_sa_latch_mods_t;
-
-/**
- * @brief xcb_xkb_sa_latch_mods_iterator_t
- **/
-typedef struct xcb_xkb_sa_latch_mods_iterator_t {
- xcb_xkb_sa_latch_mods_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_latch_mods_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_lock_mods_t
- **/
-typedef struct xcb_xkb_sa_lock_mods_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t mask; /**< */
- uint8_t realMods; /**< */
- uint8_t vmodsHigh; /**< */
- uint8_t vmodsLow; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_sa_lock_mods_t;
-
-/**
- * @brief xcb_xkb_sa_lock_mods_iterator_t
- **/
-typedef struct xcb_xkb_sa_lock_mods_iterator_t {
- xcb_xkb_sa_lock_mods_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_lock_mods_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_set_group_t
- **/
-typedef struct xcb_xkb_sa_set_group_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- int8_t group; /**< */
- uint8_t pad0[5]; /**< */
-} xcb_xkb_sa_set_group_t;
-
-/**
- * @brief xcb_xkb_sa_set_group_iterator_t
- **/
-typedef struct xcb_xkb_sa_set_group_iterator_t {
- xcb_xkb_sa_set_group_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_set_group_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_latch_group_t
- **/
-typedef struct xcb_xkb_sa_latch_group_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- int8_t group; /**< */
- uint8_t pad0[5]; /**< */
-} xcb_xkb_sa_latch_group_t;
-
-/**
- * @brief xcb_xkb_sa_latch_group_iterator_t
- **/
-typedef struct xcb_xkb_sa_latch_group_iterator_t {
- xcb_xkb_sa_latch_group_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_latch_group_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_lock_group_t
- **/
-typedef struct xcb_xkb_sa_lock_group_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- int8_t group; /**< */
- uint8_t pad0[5]; /**< */
-} xcb_xkb_sa_lock_group_t;
-
-/**
- * @brief xcb_xkb_sa_lock_group_iterator_t
- **/
-typedef struct xcb_xkb_sa_lock_group_iterator_t {
- xcb_xkb_sa_lock_group_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_lock_group_iterator_t;
-
-typedef enum xcb_xkb_sa_move_ptr_flag_t {
- XCB_XKB_SA_MOVE_PTR_FLAG_NO_ACCELERATION = 1,
- XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_X = 2,
- XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_Y = 4
-} xcb_xkb_sa_move_ptr_flag_t;
-
-/**
- * @brief xcb_xkb_sa_move_ptr_t
- **/
-typedef struct xcb_xkb_sa_move_ptr_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- int8_t xHigh; /**< */
- uint8_t xLow; /**< */
- int8_t yHigh; /**< */
- uint8_t yLow; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_sa_move_ptr_t;
-
-/**
- * @brief xcb_xkb_sa_move_ptr_iterator_t
- **/
-typedef struct xcb_xkb_sa_move_ptr_iterator_t {
- xcb_xkb_sa_move_ptr_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_move_ptr_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_ptr_btn_t
- **/
-typedef struct xcb_xkb_sa_ptr_btn_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t count; /**< */
- uint8_t button; /**< */
- uint8_t pad0[4]; /**< */
-} xcb_xkb_sa_ptr_btn_t;
-
-/**
- * @brief xcb_xkb_sa_ptr_btn_iterator_t
- **/
-typedef struct xcb_xkb_sa_ptr_btn_iterator_t {
- xcb_xkb_sa_ptr_btn_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_ptr_btn_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_lock_ptr_btn_t
- **/
-typedef struct xcb_xkb_sa_lock_ptr_btn_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t pad0; /**< */
- uint8_t button; /**< */
- uint8_t pad1[4]; /**< */
-} xcb_xkb_sa_lock_ptr_btn_t;
-
-/**
- * @brief xcb_xkb_sa_lock_ptr_btn_iterator_t
- **/
-typedef struct xcb_xkb_sa_lock_ptr_btn_iterator_t {
- xcb_xkb_sa_lock_ptr_btn_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_lock_ptr_btn_iterator_t;
-
-typedef enum xcb_xkb_sa_set_ptr_dflt_flag_t {
- XCB_XKB_SA_SET_PTR_DFLT_FLAG_DFLT_BTN_ABSOLUTE = 4,
- XCB_XKB_SA_SET_PTR_DFLT_FLAG_AFFECT_DFLT_BUTTON = 1
-} xcb_xkb_sa_set_ptr_dflt_flag_t;
-
-/**
- * @brief xcb_xkb_sa_set_ptr_dflt_t
- **/
-typedef struct xcb_xkb_sa_set_ptr_dflt_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t affect; /**< */
- int8_t value; /**< */
- uint8_t pad0[4]; /**< */
-} xcb_xkb_sa_set_ptr_dflt_t;
-
-/**
- * @brief xcb_xkb_sa_set_ptr_dflt_iterator_t
- **/
-typedef struct xcb_xkb_sa_set_ptr_dflt_iterator_t {
- xcb_xkb_sa_set_ptr_dflt_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_set_ptr_dflt_iterator_t;
-
-typedef enum xcb_xkb_sa_iso_lock_flag_t {
- XCB_XKB_SA_ISO_LOCK_FLAG_NO_LOCK = 1,
- XCB_XKB_SA_ISO_LOCK_FLAG_NO_UNLOCK = 2,
- XCB_XKB_SA_ISO_LOCK_FLAG_USE_MOD_MAP_MODS = 4,
- XCB_XKB_SA_ISO_LOCK_FLAG_GROUP_ABSOLUTE = 4,
- XCB_XKB_SA_ISO_LOCK_FLAG_ISO_DFLT_IS_GROUP = 8
-} xcb_xkb_sa_iso_lock_flag_t;
-
-typedef enum xcb_xkb_sa_iso_lock_no_affect_t {
- XCB_XKB_SA_ISO_LOCK_NO_AFFECT_CTRLS = 8,
- XCB_XKB_SA_ISO_LOCK_NO_AFFECT_PTR = 16,
- XCB_XKB_SA_ISO_LOCK_NO_AFFECT_GROUP = 32,
- XCB_XKB_SA_ISO_LOCK_NO_AFFECT_MODS = 64
-} xcb_xkb_sa_iso_lock_no_affect_t;
-
-/**
- * @brief xcb_xkb_sa_iso_lock_t
- **/
-typedef struct xcb_xkb_sa_iso_lock_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t mask; /**< */
- uint8_t realMods; /**< */
- int8_t group; /**< */
- uint8_t affect; /**< */
- uint8_t vmodsHigh; /**< */
- uint8_t vmodsLow; /**< */
-} xcb_xkb_sa_iso_lock_t;
-
-/**
- * @brief xcb_xkb_sa_iso_lock_iterator_t
- **/
-typedef struct xcb_xkb_sa_iso_lock_iterator_t {
- xcb_xkb_sa_iso_lock_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_iso_lock_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_terminate_t
- **/
-typedef struct xcb_xkb_sa_terminate_t {
- uint8_t type; /**< */
- uint8_t pad0[7]; /**< */
-} xcb_xkb_sa_terminate_t;
-
-/**
- * @brief xcb_xkb_sa_terminate_iterator_t
- **/
-typedef struct xcb_xkb_sa_terminate_iterator_t {
- xcb_xkb_sa_terminate_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_terminate_iterator_t;
-
-typedef enum xcb_xkb_switch_screen_flag_t {
- XCB_XKB_SWITCH_SCREEN_FLAG_APPLICATION = 1,
- XCB_XKB_SWITCH_SCREEN_FLAG_ABSOLUTE = 4
-} xcb_xkb_switch_screen_flag_t;
-
-/**
- * @brief xcb_xkb_sa_switch_screen_t
- **/
-typedef struct xcb_xkb_sa_switch_screen_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- int8_t newScreen; /**< */
- uint8_t pad0[5]; /**< */
-} xcb_xkb_sa_switch_screen_t;
-
-/**
- * @brief xcb_xkb_sa_switch_screen_iterator_t
- **/
-typedef struct xcb_xkb_sa_switch_screen_iterator_t {
- xcb_xkb_sa_switch_screen_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_switch_screen_iterator_t;
-
-typedef enum xcb_xkb_bool_ctrls_high_t {
- XCB_XKB_BOOL_CTRLS_HIGH_ACCESS_X_FEEDBACK = 1,
- XCB_XKB_BOOL_CTRLS_HIGH_AUDIBLE_BELL = 2,
- XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_1 = 4,
- XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_2 = 8,
- XCB_XKB_BOOL_CTRLS_HIGH_IGNORE_GROUP_LOCK = 16
-} xcb_xkb_bool_ctrls_high_t;
-
-typedef enum xcb_xkb_bool_ctrls_low_t {
- XCB_XKB_BOOL_CTRLS_LOW_REPEAT_KEYS = 1,
- XCB_XKB_BOOL_CTRLS_LOW_SLOW_KEYS = 2,
- XCB_XKB_BOOL_CTRLS_LOW_BOUNCE_KEYS = 4,
- XCB_XKB_BOOL_CTRLS_LOW_STICKY_KEYS = 8,
- XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS = 16,
- XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS_ACCEL = 32,
- XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_KEYS = 64,
- XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_TIMEOUT = 128
-} xcb_xkb_bool_ctrls_low_t;
-
-/**
- * @brief xcb_xkb_sa_set_controls_t
- **/
-typedef struct xcb_xkb_sa_set_controls_t {
- uint8_t type; /**< */
- uint8_t pad0[3]; /**< */
- uint8_t boolCtrlsHigh; /**< */
- uint8_t boolCtrlsLow; /**< */
- uint8_t pad1[2]; /**< */
-} xcb_xkb_sa_set_controls_t;
-
-/**
- * @brief xcb_xkb_sa_set_controls_iterator_t
- **/
-typedef struct xcb_xkb_sa_set_controls_iterator_t {
- xcb_xkb_sa_set_controls_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_set_controls_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_lock_controls_t
- **/
-typedef struct xcb_xkb_sa_lock_controls_t {
- uint8_t type; /**< */
- uint8_t pad0[3]; /**< */
- uint8_t boolCtrlsHigh; /**< */
- uint8_t boolCtrlsLow; /**< */
- uint8_t pad1[2]; /**< */
-} xcb_xkb_sa_lock_controls_t;
-
-/**
- * @brief xcb_xkb_sa_lock_controls_iterator_t
- **/
-typedef struct xcb_xkb_sa_lock_controls_iterator_t {
- xcb_xkb_sa_lock_controls_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_lock_controls_iterator_t;
-
-typedef enum xcb_xkb_action_message_flag_t {
- XCB_XKB_ACTION_MESSAGE_FLAG_ON_PRESS = 1,
- XCB_XKB_ACTION_MESSAGE_FLAG_ON_RELEASE = 2,
- XCB_XKB_ACTION_MESSAGE_FLAG_GEN_KEY_EVENT = 4
-} xcb_xkb_action_message_flag_t;
-
-/**
- * @brief xcb_xkb_sa_action_message_t
- **/
-typedef struct xcb_xkb_sa_action_message_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t message[6]; /**< */
-} xcb_xkb_sa_action_message_t;
-
-/**
- * @brief xcb_xkb_sa_action_message_iterator_t
- **/
-typedef struct xcb_xkb_sa_action_message_iterator_t {
- xcb_xkb_sa_action_message_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_action_message_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_redirect_key_t
- **/
-typedef struct xcb_xkb_sa_redirect_key_t {
- uint8_t type; /**< */
- xcb_keycode_t newkey; /**< */
- uint8_t mask; /**< */
- uint8_t realModifiers; /**< */
- uint8_t vmodsMaskHigh; /**< */
- uint8_t vmodsMaskLow; /**< */
- uint8_t vmodsHigh; /**< */
- uint8_t vmodsLow; /**< */
-} xcb_xkb_sa_redirect_key_t;
-
-/**
- * @brief xcb_xkb_sa_redirect_key_iterator_t
- **/
-typedef struct xcb_xkb_sa_redirect_key_iterator_t {
- xcb_xkb_sa_redirect_key_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_redirect_key_iterator_t;
-
-/**
- * @brief xcb_xkb_sa_device_btn_t
- **/
-typedef struct xcb_xkb_sa_device_btn_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t count; /**< */
- uint8_t button; /**< */
- uint8_t device; /**< */
- uint8_t pad0[3]; /**< */
-} xcb_xkb_sa_device_btn_t;
-
-/**
- * @brief xcb_xkb_sa_device_btn_iterator_t
- **/
-typedef struct xcb_xkb_sa_device_btn_iterator_t {
- xcb_xkb_sa_device_btn_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_device_btn_iterator_t;
-
-typedef enum xcb_xkb_lock_device_flags_t {
- XCB_XKB_LOCK_DEVICE_FLAGS_NO_LOCK = 1,
- XCB_XKB_LOCK_DEVICE_FLAGS_NO_UNLOCK = 2
-} xcb_xkb_lock_device_flags_t;
-
-/**
- * @brief xcb_xkb_sa_lock_device_btn_t
- **/
-typedef struct xcb_xkb_sa_lock_device_btn_t {
- uint8_t type; /**< */
- uint8_t flags; /**< */
- uint8_t pad0; /**< */
- uint8_t button; /**< */
- uint8_t device; /**< */
- uint8_t pad1[3]; /**< */
-} xcb_xkb_sa_lock_device_btn_t;
-
-/**
- * @brief xcb_xkb_sa_lock_device_btn_iterator_t
- **/
-typedef struct xcb_xkb_sa_lock_device_btn_iterator_t {
- xcb_xkb_sa_lock_device_btn_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_lock_device_btn_iterator_t;
-
-typedef enum xcb_xkb_sa_val_what_t {
- XCB_XKB_SA_VAL_WHAT_IGNORE_VAL = 0,
- XCB_XKB_SA_VAL_WHAT_SET_VAL_MIN = 1,
- XCB_XKB_SA_VAL_WHAT_SET_VAL_CENTER = 2,
- XCB_XKB_SA_VAL_WHAT_SET_VAL_MAX = 3,
- XCB_XKB_SA_VAL_WHAT_SET_VAL_RELATIVE = 4,
- XCB_XKB_SA_VAL_WHAT_SET_VAL_ABSOLUTE = 5
-} xcb_xkb_sa_val_what_t;
-
-/**
- * @brief xcb_xkb_sa_device_valuator_t
- **/
-typedef struct xcb_xkb_sa_device_valuator_t {
- uint8_t type; /**< */
- uint8_t device; /**< */
- uint8_t val1what; /**< */
- uint8_t val1index; /**< */
- uint8_t val1value; /**< */
- uint8_t val2what; /**< */
- uint8_t val2index; /**< */
- uint8_t val2value; /**< */
-} xcb_xkb_sa_device_valuator_t;
-
-/**
- * @brief xcb_xkb_sa_device_valuator_iterator_t
- **/
-typedef struct xcb_xkb_sa_device_valuator_iterator_t {
- xcb_xkb_sa_device_valuator_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sa_device_valuator_iterator_t;
-
-/**
- * @brief xcb_xkb_si_action_t
- **/
-typedef struct xcb_xkb_si_action_t {
- uint8_t type; /**< */
- uint8_t data[7]; /**< */
-} xcb_xkb_si_action_t;
-
-/**
- * @brief xcb_xkb_si_action_iterator_t
- **/
-typedef struct xcb_xkb_si_action_iterator_t {
- xcb_xkb_si_action_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_si_action_iterator_t;
-
-/**
- * @brief xcb_xkb_sym_interpret_t
- **/
-typedef struct xcb_xkb_sym_interpret_t {
- xcb_keysym_t sym; /**< */
- uint8_t mods; /**< */
- uint8_t match; /**< */
- uint8_t virtualMod; /**< */
- uint8_t flags; /**< */
- xcb_xkb_si_action_t action; /**< */
-} xcb_xkb_sym_interpret_t;
-
-/**
- * @brief xcb_xkb_sym_interpret_iterator_t
- **/
-typedef struct xcb_xkb_sym_interpret_iterator_t {
- xcb_xkb_sym_interpret_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_sym_interpret_iterator_t;
-
-/**
- * @brief xcb_xkb_action_t
- **/
-typedef union xcb_xkb_action_t {
- xcb_xkb_sa_no_action_t noaction; /**< */
- xcb_xkb_sa_set_mods_t setmods; /**< */
- xcb_xkb_sa_latch_mods_t latchmods; /**< */
- xcb_xkb_sa_lock_mods_t lockmods; /**< */
- xcb_xkb_sa_set_group_t setgroup; /**< */
- xcb_xkb_sa_latch_group_t latchgroup; /**< */
- xcb_xkb_sa_lock_group_t lockgroup; /**< */
- xcb_xkb_sa_move_ptr_t moveptr; /**< */
- xcb_xkb_sa_ptr_btn_t ptrbtn; /**< */
- xcb_xkb_sa_lock_ptr_btn_t lockptrbtn; /**< */
- xcb_xkb_sa_set_ptr_dflt_t setptrdflt; /**< */
- xcb_xkb_sa_iso_lock_t isolock; /**< */
- xcb_xkb_sa_terminate_t terminate; /**< */
- xcb_xkb_sa_switch_screen_t switchscreen; /**< */
- xcb_xkb_sa_set_controls_t setcontrols; /**< */
- xcb_xkb_sa_lock_controls_t lockcontrols; /**< */
- xcb_xkb_sa_action_message_t message; /**< */
- xcb_xkb_sa_redirect_key_t redirect; /**< */
- xcb_xkb_sa_device_btn_t devbtn; /**< */
- xcb_xkb_sa_lock_device_btn_t lockdevbtn; /**< */
- xcb_xkb_sa_device_valuator_t devval; /**< */
- uint8_t type; /**< */
-} xcb_xkb_action_t;
-
-/**
- * @brief xcb_xkb_action_iterator_t
- **/
-typedef struct xcb_xkb_action_iterator_t {
- xcb_xkb_action_t *data; /**< */
- int rem; /**< */
- int index; /**< */
-} xcb_xkb_action_iterator_t;
-
-/**
- * @brief xcb_xkb_use_extension_cookie_t
- **/
-typedef struct xcb_xkb_use_extension_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_use_extension_cookie_t;
-
-/** Opcode for xcb_xkb_use_extension. */
-#define XCB_XKB_USE_EXTENSION 0
-
-/**
- * @brief xcb_xkb_use_extension_request_t
- **/
-typedef struct xcb_xkb_use_extension_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint16_t wantedMajor; /**< */
- uint16_t wantedMinor; /**< */
-} xcb_xkb_use_extension_request_t;
-
-/**
- * @brief xcb_xkb_use_extension_reply_t
- **/
-typedef struct xcb_xkb_use_extension_reply_t {
- uint8_t response_type; /**< */
- uint8_t supported; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint16_t serverMajor; /**< */
- uint16_t serverMinor; /**< */
- uint8_t pad0[20]; /**< */
-} xcb_xkb_use_extension_reply_t;
-
-/**
- * @brief xcb_xkb_select_events_details_t
- **/
-typedef struct xcb_xkb_select_events_details_t {
- uint16_t affectNewKeyboard; /**< */
- uint16_t newKeyboardDetails; /**< */
- uint16_t affectState; /**< */
- uint16_t stateDetails; /**< */
- uint32_t affectCtrls; /**< */
- uint32_t ctrlDetails; /**< */
- uint32_t affectIndicatorState; /**< */
- uint32_t indicatorStateDetails; /**< */
- uint32_t affectIndicatorMap; /**< */
- uint32_t indicatorMapDetails; /**< */
- uint16_t affectNames; /**< */
- uint16_t namesDetails; /**< */
- uint8_t affectCompat; /**< */
- uint8_t compatDetails; /**< */
- uint8_t affectBell; /**< */
- uint8_t bellDetails; /**< */
- uint8_t affectMsgDetails; /**< */
- uint8_t msgDetails; /**< */
- uint16_t affectAccessX; /**< */
- uint16_t accessXDetails; /**< */
- uint16_t affectExtDev; /**< */
- uint16_t extdevDetails; /**< */
-} xcb_xkb_select_events_details_t;
-
-/** Opcode for xcb_xkb_select_events. */
-#define XCB_XKB_SELECT_EVENTS 1
-
-/**
- * @brief xcb_xkb_select_events_request_t
- **/
-typedef struct xcb_xkb_select_events_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint16_t affectWhich; /**< */
- uint16_t clear; /**< */
- uint16_t selectAll; /**< */
- uint16_t affectMap; /**< */
- uint16_t map; /**< */
-} xcb_xkb_select_events_request_t;
-
-/** Opcode for xcb_xkb_bell. */
-#define XCB_XKB_BELL 3
-
-/**
- * @brief xcb_xkb_bell_request_t
- **/
-typedef struct xcb_xkb_bell_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- xcb_xkb_bell_class_spec_t bellClass; /**< */
- xcb_xkb_id_spec_t bellID; /**< */
- int8_t percent; /**< */
- uint8_t forceSound; /**< */
- uint8_t eventOnly; /**< */
- uint8_t pad0; /**< */
- int16_t pitch; /**< */
- int16_t duration; /**< */
- uint8_t pad1[2]; /**< */
- xcb_atom_t name; /**< */
- xcb_window_t window; /**< */
-} xcb_xkb_bell_request_t;
-
-/**
- * @brief xcb_xkb_get_state_cookie_t
- **/
-typedef struct xcb_xkb_get_state_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_state_cookie_t;
-
-/** Opcode for xcb_xkb_get_state. */
-#define XCB_XKB_GET_STATE 4
-
-/**
- * @brief xcb_xkb_get_state_request_t
- **/
-typedef struct xcb_xkb_get_state_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_get_state_request_t;
-
-/**
- * @brief xcb_xkb_get_state_reply_t
- **/
-typedef struct xcb_xkb_get_state_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint8_t mods; /**< */
- uint8_t baseMods; /**< */
- uint8_t latchedMods; /**< */
- uint8_t lockedMods; /**< */
- uint8_t group; /**< */
- uint8_t lockedGroup; /**< */
- int16_t baseGroup; /**< */
- int16_t latchedGroup; /**< */
- uint8_t compatState; /**< */
- uint8_t grabMods; /**< */
- uint8_t compatGrabMods; /**< */
- uint8_t lookupMods; /**< */
- uint8_t compatLookupMods; /**< */
- uint8_t pad0; /**< */
- uint16_t ptrBtnState; /**< */
- uint8_t pad1[6]; /**< */
-} xcb_xkb_get_state_reply_t;
-
-/** Opcode for xcb_xkb_latch_lock_state. */
-#define XCB_XKB_LATCH_LOCK_STATE 5
-
-/**
- * @brief xcb_xkb_latch_lock_state_request_t
- **/
-typedef struct xcb_xkb_latch_lock_state_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t affectModLocks; /**< */
- uint8_t modLocks; /**< */
- uint8_t lockGroup; /**< */
- uint8_t groupLock; /**< */
- uint8_t affectModLatches; /**< */
- uint8_t pad0; /**< */
- uint8_t latchGroup; /**< */
- uint16_t groupLatch; /**< */
-} xcb_xkb_latch_lock_state_request_t;
-
-/**
- * @brief xcb_xkb_get_controls_cookie_t
- **/
-typedef struct xcb_xkb_get_controls_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_controls_cookie_t;
-
-/** Opcode for xcb_xkb_get_controls. */
-#define XCB_XKB_GET_CONTROLS 6
-
-/**
- * @brief xcb_xkb_get_controls_request_t
- **/
-typedef struct xcb_xkb_get_controls_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_get_controls_request_t;
-
-/**
- * @brief xcb_xkb_get_controls_reply_t
- **/
-typedef struct xcb_xkb_get_controls_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint8_t mouseKeysDfltBtn; /**< */
- uint8_t numGroups; /**< */
- uint8_t groupsWrap; /**< */
- uint8_t internalModsMask; /**< */
- uint8_t ignoreLockModsMask; /**< */
- uint8_t internalModsRealMods; /**< */
- uint8_t ignoreLockModsRealMods; /**< */
- uint8_t pad0; /**< */
- uint16_t internalModsVmods; /**< */
- uint16_t ignoreLockModsVmods; /**< */
- uint16_t repeatDelay; /**< */
- uint16_t repeatInterval; /**< */
- uint16_t slowKeysDelay; /**< */
- uint16_t debounceDelay; /**< */
- uint16_t mouseKeysDelay; /**< */
- uint16_t mouseKeysInterval; /**< */
- uint16_t mouseKeysTimeToMax; /**< */
- uint16_t mouseKeysMaxSpeed; /**< */
- int16_t mouseKeysCurve; /**< */
- uint16_t accessXOption; /**< */
- uint16_t accessXTimeout; /**< */
- uint16_t accessXTimeoutOptionsMask; /**< */
- uint16_t accessXTimeoutOptionsValues; /**< */
- uint8_t pad1[2]; /**< */
- uint32_t accessXTimeoutMask; /**< */
- uint32_t accessXTimeoutValues; /**< */
- uint32_t enabledControls; /**< */
- uint8_t perKeyRepeat[32]; /**< */
-} xcb_xkb_get_controls_reply_t;
-
-/** Opcode for xcb_xkb_set_controls. */
-#define XCB_XKB_SET_CONTROLS 7
-
-/**
- * @brief xcb_xkb_set_controls_request_t
- **/
-typedef struct xcb_xkb_set_controls_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t affectInternalRealMods; /**< */
- uint8_t internalRealMods; /**< */
- uint8_t affectIgnoreLockRealMods; /**< */
- uint8_t ignoreLockRealMods; /**< */
- uint16_t affectInternalVirtualMods; /**< */
- uint16_t internalVirtualMods; /**< */
- uint16_t affectIgnoreLockVirtualMods; /**< */
- uint16_t ignoreLockVirtualMods; /**< */
- uint8_t mouseKeysDfltBtn; /**< */
- uint8_t groupsWrap; /**< */
- uint16_t accessXOptions; /**< */
- uint8_t pad0[2]; /**< */
- uint32_t affectEnabledControls; /**< */
- uint32_t enabledControls; /**< */
- uint32_t changeControls; /**< */
- uint16_t repeatDelay; /**< */
- uint16_t repeatInterval; /**< */
- uint16_t slowKeysDelay; /**< */
- uint16_t debounceDelay; /**< */
- uint16_t mouseKeysDelay; /**< */
- uint16_t mouseKeysInterval; /**< */
- uint16_t mouseKeysTimeToMax; /**< */
- uint16_t mouseKeysMaxSpeed; /**< */
- int16_t mouseKeysCurve; /**< */
- uint16_t accessXTimeout; /**< */
- uint32_t accessXTimeoutMask; /**< */
- uint32_t accessXTimeoutValues; /**< */
- uint16_t accessXTimeoutOptionsMask; /**< */
- uint16_t accessXTimeoutOptionsValues; /**< */
- uint8_t perKeyRepeat[32]; /**< */
-} xcb_xkb_set_controls_request_t;
-
-/**
- * @brief xcb_xkb_get_map_cookie_t
- **/
-typedef struct xcb_xkb_get_map_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_map_cookie_t;
-
-/** Opcode for xcb_xkb_get_map. */
-#define XCB_XKB_GET_MAP 8
-
-/**
- * @brief xcb_xkb_get_map_request_t
- **/
-typedef struct xcb_xkb_get_map_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint16_t full; /**< */
- uint16_t partial; /**< */
- uint8_t firstType; /**< */
- uint8_t nTypes; /**< */
- xcb_keycode_t firstKeySym; /**< */
- uint8_t nKeySyms; /**< */
- xcb_keycode_t firstKeyAction; /**< */
- uint8_t nKeyActions; /**< */
- xcb_keycode_t firstKeyBehavior; /**< */
- uint8_t nKeyBehaviors; /**< */
- uint16_t virtualMods; /**< */
- xcb_keycode_t firstKeyExplicit; /**< */
- uint8_t nKeyExplicit; /**< */
- xcb_keycode_t firstModMapKey; /**< */
- uint8_t nModMapKeys; /**< */
- xcb_keycode_t firstVModMapKey; /**< */
- uint8_t nVModMapKeys; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_get_map_request_t;
-
-/**
- * @brief xcb_xkb_get_map_map_t
- **/
-typedef struct xcb_xkb_get_map_map_t {
- xcb_xkb_key_type_t *types_rtrn; /**< */
- xcb_xkb_key_sym_map_t *syms_rtrn; /**< */
- uint8_t *acts_rtrn_count; /**< */
- uint8_t *alignment_pad; /**< */
- xcb_xkb_action_t *acts_rtrn_acts; /**< */
- xcb_xkb_set_behavior_t *behaviors_rtrn; /**< */
- uint8_t *vmods_rtrn; /**< */
- uint8_t *alignment_pad2; /**< */
- xcb_xkb_set_explicit_t *explicit_rtrn; /**< */
- uint16_t *alignment_pad3; /**< */
- xcb_xkb_key_mod_map_t *modmap_rtrn; /**< */
- uint16_t *alignment_pad4; /**< */
- xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; /**< */
-} xcb_xkb_get_map_map_t;
-
-/**
- * @brief xcb_xkb_get_map_reply_t
- **/
-typedef struct xcb_xkb_get_map_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint8_t pad0[2]; /**< */
- xcb_keycode_t minKeyCode; /**< */
- xcb_keycode_t maxKeyCode; /**< */
- uint16_t present; /**< */
- uint8_t firstType; /**< */
- uint8_t nTypes; /**< */
- uint8_t totalTypes; /**< */
- xcb_keycode_t firstKeySym; /**< */
- uint16_t totalSyms; /**< */
- uint8_t nKeySyms; /**< */
- xcb_keycode_t firstKeyAction; /**< */
- uint16_t totalActions; /**< */
- uint8_t nKeyActions; /**< */
- xcb_keycode_t firstKeyBehavior; /**< */
- uint8_t nKeyBehaviors; /**< */
- uint8_t totalKeyBehaviors; /**< */
- xcb_keycode_t firstKeyExplicit; /**< */
- uint8_t nKeyExplicit; /**< */
- uint8_t totalKeyExplicit; /**< */
- xcb_keycode_t firstModMapKey; /**< */
- uint8_t nModMapKeys; /**< */
- uint8_t totalModMapKeys; /**< */
- xcb_keycode_t firstVModMapKey; /**< */
- uint8_t nVModMapKeys; /**< */
- uint8_t totalVModMapKeys; /**< */
- uint8_t pad1; /**< */
- uint16_t virtualMods; /**< */
-} xcb_xkb_get_map_reply_t;
-
-/**
- * @brief xcb_xkb_set_map_values_t
- **/
-typedef struct xcb_xkb_set_map_values_t {
- xcb_xkb_set_key_type_t *types; /**< */
- xcb_xkb_key_sym_map_t *syms; /**< */
- uint8_t *actionsCount; /**< */
- xcb_xkb_action_t *actions; /**< */
- xcb_xkb_set_behavior_t *behaviors; /**< */
- uint8_t *vmods; /**< */
- xcb_xkb_set_explicit_t *explicit; /**< */
- xcb_xkb_key_mod_map_t *modmap; /**< */
- xcb_xkb_key_v_mod_map_t *vmodmap; /**< */
-} xcb_xkb_set_map_values_t;
-
-/** Opcode for xcb_xkb_set_map. */
-#define XCB_XKB_SET_MAP 9
-
-/**
- * @brief xcb_xkb_set_map_request_t
- **/
-typedef struct xcb_xkb_set_map_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint16_t present; /**< */
- uint16_t flags; /**< */
- xcb_keycode_t minKeyCode; /**< */
- xcb_keycode_t maxKeyCode; /**< */
- uint8_t firstType; /**< */
- uint8_t nTypes; /**< */
- xcb_keycode_t firstKeySym; /**< */
- uint8_t nKeySyms; /**< */
- uint16_t totalSyms; /**< */
- xcb_keycode_t firstKeyAction; /**< */
- uint8_t nKeyActions; /**< */
- uint16_t totalActions; /**< */
- xcb_keycode_t firstKeyBehavior; /**< */
- uint8_t nKeyBehaviors; /**< */
- uint8_t totalKeyBehaviors; /**< */
- xcb_keycode_t firstKeyExplicit; /**< */
- uint8_t nKeyExplicit; /**< */
- uint8_t totalKeyExplicit; /**< */
- xcb_keycode_t firstModMapKey; /**< */
- uint8_t nModMapKeys; /**< */
- uint8_t totalModMapKeys; /**< */
- xcb_keycode_t firstVModMapKey; /**< */
- uint8_t nVModMapKeys; /**< */
- uint8_t totalVModMapKeys; /**< */
- uint16_t virtualMods; /**< */
-} xcb_xkb_set_map_request_t;
-
-/**
- * @brief xcb_xkb_get_compat_map_cookie_t
- **/
-typedef struct xcb_xkb_get_compat_map_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_compat_map_cookie_t;
-
-/** Opcode for xcb_xkb_get_compat_map. */
-#define XCB_XKB_GET_COMPAT_MAP 10
-
-/**
- * @brief xcb_xkb_get_compat_map_request_t
- **/
-typedef struct xcb_xkb_get_compat_map_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t groups; /**< */
- uint8_t getAllSI; /**< */
- uint16_t firstSI; /**< */
- uint16_t nSI; /**< */
-} xcb_xkb_get_compat_map_request_t;
-
-/**
- * @brief xcb_xkb_get_compat_map_reply_t
- **/
-typedef struct xcb_xkb_get_compat_map_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint8_t groupsRtrn; /**< */
- uint8_t pad0; /**< */
- uint16_t firstSIRtrn; /**< */
- uint16_t nSIRtrn; /**< */
- uint16_t nTotalSI; /**< */
- uint8_t pad1[16]; /**< */
-} xcb_xkb_get_compat_map_reply_t;
-
-/** Opcode for xcb_xkb_set_compat_map. */
-#define XCB_XKB_SET_COMPAT_MAP 11
-
-/**
- * @brief xcb_xkb_set_compat_map_request_t
- **/
-typedef struct xcb_xkb_set_compat_map_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t pad0; /**< */
- uint8_t recomputeActions; /**< */
- uint8_t truncateSI; /**< */
- uint8_t groups; /**< */
- uint16_t firstSI; /**< */
- uint16_t nSI; /**< */
- uint8_t pad1[2]; /**< */
-} xcb_xkb_set_compat_map_request_t;
-
-/**
- * @brief xcb_xkb_get_indicator_state_cookie_t
- **/
-typedef struct xcb_xkb_get_indicator_state_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_indicator_state_cookie_t;
-
-/** Opcode for xcb_xkb_get_indicator_state. */
-#define XCB_XKB_GET_INDICATOR_STATE 12
-
-/**
- * @brief xcb_xkb_get_indicator_state_request_t
- **/
-typedef struct xcb_xkb_get_indicator_state_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_get_indicator_state_request_t;
-
-/**
- * @brief xcb_xkb_get_indicator_state_reply_t
- **/
-typedef struct xcb_xkb_get_indicator_state_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t state; /**< */
- uint8_t pad0[20]; /**< */
-} xcb_xkb_get_indicator_state_reply_t;
-
-/**
- * @brief xcb_xkb_get_indicator_map_cookie_t
- **/
-typedef struct xcb_xkb_get_indicator_map_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_indicator_map_cookie_t;
-
-/** Opcode for xcb_xkb_get_indicator_map. */
-#define XCB_XKB_GET_INDICATOR_MAP 13
-
-/**
- * @brief xcb_xkb_get_indicator_map_request_t
- **/
-typedef struct xcb_xkb_get_indicator_map_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t pad0[2]; /**< */
- uint32_t which; /**< */
-} xcb_xkb_get_indicator_map_request_t;
-
-/**
- * @brief xcb_xkb_get_indicator_map_reply_t
- **/
-typedef struct xcb_xkb_get_indicator_map_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t which; /**< */
- uint32_t realIndicators; /**< */
- uint8_t nIndicators; /**< */
- uint8_t pad0[15]; /**< */
-} xcb_xkb_get_indicator_map_reply_t;
-
-/** Opcode for xcb_xkb_set_indicator_map. */
-#define XCB_XKB_SET_INDICATOR_MAP 14
-
-/**
- * @brief xcb_xkb_set_indicator_map_request_t
- **/
-typedef struct xcb_xkb_set_indicator_map_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t pad0[2]; /**< */
- uint32_t which; /**< */
-} xcb_xkb_set_indicator_map_request_t;
-
-/**
- * @brief xcb_xkb_get_named_indicator_cookie_t
- **/
-typedef struct xcb_xkb_get_named_indicator_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_named_indicator_cookie_t;
-
-/** Opcode for xcb_xkb_get_named_indicator. */
-#define XCB_XKB_GET_NAMED_INDICATOR 15
-
-/**
- * @brief xcb_xkb_get_named_indicator_request_t
- **/
-typedef struct xcb_xkb_get_named_indicator_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- xcb_xkb_led_class_spec_t ledClass; /**< */
- xcb_xkb_id_spec_t ledID; /**< */
- uint8_t pad0[2]; /**< */
- xcb_atom_t indicator; /**< */
-} xcb_xkb_get_named_indicator_request_t;
-
-/**
- * @brief xcb_xkb_get_named_indicator_reply_t
- **/
-typedef struct xcb_xkb_get_named_indicator_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_atom_t indicator; /**< */
- uint8_t found; /**< */
- uint8_t on; /**< */
- uint8_t realIndicator; /**< */
- uint8_t ndx; /**< */
- uint8_t map_flags; /**< */
- uint8_t map_whichGroups; /**< */
- uint8_t map_groups; /**< */
- uint8_t map_whichMods; /**< */
- uint8_t map_mods; /**< */
- uint8_t map_realMods; /**< */
- uint16_t map_vmod; /**< */
- uint32_t map_ctrls; /**< */
- uint8_t supported; /**< */
- uint8_t pad0[3]; /**< */
-} xcb_xkb_get_named_indicator_reply_t;
-
-/** Opcode for xcb_xkb_set_named_indicator. */
-#define XCB_XKB_SET_NAMED_INDICATOR 16
-
-/**
- * @brief xcb_xkb_set_named_indicator_request_t
- **/
-typedef struct xcb_xkb_set_named_indicator_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- xcb_xkb_led_class_spec_t ledClass; /**< */
- xcb_xkb_id_spec_t ledID; /**< */
- uint8_t pad0[2]; /**< */
- xcb_atom_t indicator; /**< */
- uint8_t setState; /**< */
- uint8_t on; /**< */
- uint8_t setMap; /**< */
- uint8_t createMap; /**< */
- uint8_t pad1; /**< */
- uint8_t map_flags; /**< */
- uint8_t map_whichGroups; /**< */
- uint8_t map_groups; /**< */
- uint8_t map_whichMods; /**< */
- uint8_t map_realMods; /**< */
- uint16_t map_vmods; /**< */
- uint32_t map_ctrls; /**< */
-} xcb_xkb_set_named_indicator_request_t;
-
-/**
- * @brief xcb_xkb_get_names_cookie_t
- **/
-typedef struct xcb_xkb_get_names_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_names_cookie_t;
-
-/** Opcode for xcb_xkb_get_names. */
-#define XCB_XKB_GET_NAMES 17
-
-/**
- * @brief xcb_xkb_get_names_request_t
- **/
-typedef struct xcb_xkb_get_names_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t pad0[2]; /**< */
- uint32_t which; /**< */
-} xcb_xkb_get_names_request_t;
-
-/**
- * @brief xcb_xkb_get_names_value_list_t
- **/
-typedef struct xcb_xkb_get_names_value_list_t {
- xcb_atom_t keycodesName; /**< */
- xcb_atom_t geometryName; /**< */
- xcb_atom_t symbolsName; /**< */
- xcb_atom_t physSymbolsName; /**< */
- xcb_atom_t typesName; /**< */
- xcb_atom_t compatName; /**< */
- xcb_atom_t *typeNames; /**< */
- uint8_t *nLevelsPerType; /**< */
- uint8_t *alignment_pad; /**< */
- xcb_atom_t *ktLevelNames; /**< */
- xcb_atom_t *indicatorNames; /**< */
- xcb_atom_t *virtualModNames; /**< */
- xcb_atom_t *groups; /**< */
- xcb_xkb_key_name_t *keyNames; /**< */
- xcb_xkb_key_alias_t *keyAliases; /**< */
- xcb_atom_t *radioGroupNames; /**< */
-} xcb_xkb_get_names_value_list_t;
-
-/**
- * @brief xcb_xkb_get_names_reply_t
- **/
-typedef struct xcb_xkb_get_names_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t which; /**< */
- xcb_keycode_t minKeyCode; /**< */
- xcb_keycode_t maxKeyCode; /**< */
- uint8_t nTypes; /**< */
- uint8_t groupNames; /**< */
- uint16_t virtualMods; /**< */
- xcb_keycode_t firstKey; /**< */
- uint8_t nKeys; /**< */
- uint32_t indicators; /**< */
- uint8_t nRadioGroups; /**< */
- uint8_t nKeyAliases; /**< */
- uint16_t nKTLevels; /**< */
- uint8_t pad0[4]; /**< */
-} xcb_xkb_get_names_reply_t;
-
-/**
- * @brief xcb_xkb_set_names_values_t
- **/
-typedef struct xcb_xkb_set_names_values_t {
- xcb_atom_t keycodesName; /**< */
- xcb_atom_t geometryName; /**< */
- xcb_atom_t symbolsName; /**< */
- xcb_atom_t physSymbolsName; /**< */
- xcb_atom_t typesName; /**< */
- xcb_atom_t compatName; /**< */
- xcb_atom_t *typeNames; /**< */
- uint8_t *nLevelsPerType; /**< */
- xcb_atom_t *ktLevelNames; /**< */
- xcb_atom_t *indicatorNames; /**< */
- xcb_atom_t *virtualModNames; /**< */
- xcb_atom_t *groups; /**< */
- xcb_xkb_key_name_t *keyNames; /**< */
- xcb_xkb_key_alias_t *keyAliases; /**< */
- xcb_atom_t *radioGroupNames; /**< */
-} xcb_xkb_set_names_values_t;
-
-/** Opcode for xcb_xkb_set_names. */
-#define XCB_XKB_SET_NAMES 18
-
-/**
- * @brief xcb_xkb_set_names_request_t
- **/
-typedef struct xcb_xkb_set_names_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint16_t virtualMods; /**< */
- uint32_t which; /**< */
- uint8_t firstType; /**< */
- uint8_t nTypes; /**< */
- uint8_t firstKTLevelt; /**< */
- uint8_t nKTLevels; /**< */
- uint32_t indicators; /**< */
- uint8_t groupNames; /**< */
- uint8_t nRadioGroups; /**< */
- xcb_keycode_t firstKey; /**< */
- uint8_t nKeys; /**< */
- uint8_t nKeyAliases; /**< */
- uint8_t pad0; /**< */
- uint16_t totalKTLevelNames; /**< */
-} xcb_xkb_set_names_request_t;
-
-/**
- * @brief xcb_xkb_per_client_flags_cookie_t
- **/
-typedef struct xcb_xkb_per_client_flags_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_per_client_flags_cookie_t;
-
-/** Opcode for xcb_xkb_per_client_flags. */
-#define XCB_XKB_PER_CLIENT_FLAGS 21
-
-/**
- * @brief xcb_xkb_per_client_flags_request_t
- **/
-typedef struct xcb_xkb_per_client_flags_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t pad0[2]; /**< */
- uint32_t change; /**< */
- uint32_t value; /**< */
- uint32_t ctrlsToChange; /**< */
- uint32_t autoCtrls; /**< */
- uint32_t autoCtrlsValues; /**< */
-} xcb_xkb_per_client_flags_request_t;
-
-/**
- * @brief xcb_xkb_per_client_flags_reply_t
- **/
-typedef struct xcb_xkb_per_client_flags_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t supported; /**< */
- uint32_t value; /**< */
- uint32_t autoCtrls; /**< */
- uint32_t autoCtrlsValues; /**< */
- uint8_t pad0[8]; /**< */
-} xcb_xkb_per_client_flags_reply_t;
-
-/**
- * @brief xcb_xkb_list_components_cookie_t
- **/
-typedef struct xcb_xkb_list_components_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_list_components_cookie_t;
-
-/** Opcode for xcb_xkb_list_components. */
-#define XCB_XKB_LIST_COMPONENTS 22
-
-/**
- * @brief xcb_xkb_list_components_request_t
- **/
-typedef struct xcb_xkb_list_components_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint16_t maxNames; /**< */
-} xcb_xkb_list_components_request_t;
-
-/**
- * @brief xcb_xkb_list_components_reply_t
- **/
-typedef struct xcb_xkb_list_components_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint16_t nKeymaps; /**< */
- uint16_t nKeycodes; /**< */
- uint16_t nTypes; /**< */
- uint16_t nCompatMaps; /**< */
- uint16_t nSymbols; /**< */
- uint16_t nGeometries; /**< */
- uint16_t extra; /**< */
- uint8_t pad0[10]; /**< */
-} xcb_xkb_list_components_reply_t;
-
-/**
- * @brief xcb_xkb_get_kbd_by_name_cookie_t
- **/
-typedef struct xcb_xkb_get_kbd_by_name_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_kbd_by_name_cookie_t;
-
-/** Opcode for xcb_xkb_get_kbd_by_name. */
-#define XCB_XKB_GET_KBD_BY_NAME 23
-
-/**
- * @brief xcb_xkb_get_kbd_by_name_request_t
- **/
-typedef struct xcb_xkb_get_kbd_by_name_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint16_t need; /**< */
- uint16_t want; /**< */
- uint8_t load; /**< */
- uint8_t pad0; /**< */
-} xcb_xkb_get_kbd_by_name_request_t;
-
-/**
- * @brief xcb_xkb_get_kbd_by_name_replies_types_map_t
- **/
-typedef struct xcb_xkb_get_kbd_by_name_replies_types_map_t {
- xcb_xkb_key_type_t *types_rtrn; /**< */
- xcb_xkb_key_sym_map_t *syms_rtrn; /**< */
- uint8_t *acts_rtrn_count; /**< */
- xcb_xkb_action_t *acts_rtrn_acts; /**< */
- xcb_xkb_set_behavior_t *behaviors_rtrn; /**< */
- uint8_t *vmods_rtrn; /**< */
- xcb_xkb_set_explicit_t *explicit_rtrn; /**< */
- xcb_xkb_key_mod_map_t *modmap_rtrn; /**< */
- xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; /**< */
-} xcb_xkb_get_kbd_by_name_replies_types_map_t;
-
-/**
- * @brief xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t
- **/
-typedef struct xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t {
- xcb_atom_t keycodesName; /**< */
- xcb_atom_t geometryName; /**< */
- xcb_atom_t symbolsName; /**< */
- xcb_atom_t physSymbolsName; /**< */
- xcb_atom_t typesName; /**< */
- xcb_atom_t compatName; /**< */
- xcb_atom_t *typeNames; /**< */
- uint8_t *nLevelsPerType; /**< */
- xcb_atom_t *ktLevelNames; /**< */
- xcb_atom_t *indicatorNames; /**< */
- xcb_atom_t *virtualModNames; /**< */
- xcb_atom_t *groups; /**< */
- xcb_xkb_key_name_t *keyNames; /**< */
- xcb_xkb_key_alias_t *keyAliases; /**< */
- xcb_atom_t *radioGroupNames; /**< */
-} xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t;
-
-/**
- * @brief xcb_xkb_get_kbd_by_name_replies_t
- **/
-typedef struct xcb_xkb_get_kbd_by_name_replies_t {
- struct _types {
- uint8_t getmap_type; /**< */
- uint8_t typeDeviceID; /**< */
- uint16_t getmap_sequence; /**< */
- uint32_t getmap_length; /**< */
- uint8_t pad0[2]; /**< */
- xcb_keycode_t typeMinKeyCode; /**< */
- xcb_keycode_t typeMaxKeyCode; /**< */
- uint16_t present; /**< */
- uint8_t firstType; /**< */
- uint8_t nTypes; /**< */
- uint8_t totalTypes; /**< */
- xcb_keycode_t firstKeySym; /**< */
- uint16_t totalSyms; /**< */
- uint8_t nKeySyms; /**< */
- xcb_keycode_t firstKeyAction; /**< */
- uint16_t totalActions; /**< */
- uint8_t nKeyActions; /**< */
- xcb_keycode_t firstKeyBehavior; /**< */
- uint8_t nKeyBehaviors; /**< */
- uint8_t totalKeyBehaviors; /**< */
- xcb_keycode_t firstKeyExplicit; /**< */
- uint8_t nKeyExplicit; /**< */
- uint8_t totalKeyExplicit; /**< */
- xcb_keycode_t firstModMapKey; /**< */
- uint8_t nModMapKeys; /**< */
- uint8_t totalModMapKeys; /**< */
- xcb_keycode_t firstVModMapKey; /**< */
- uint8_t nVModMapKeys; /**< */
- uint8_t totalVModMapKeys; /**< */
- uint8_t pad1; /**< */
- uint16_t virtualMods; /**< */
- xcb_xkb_get_kbd_by_name_replies_types_map_t map; /**< */
- } types;
- struct _compat_map {
- uint8_t compatmap_type; /**< */
- uint8_t compatDeviceID; /**< */
- uint16_t compatmap_sequence; /**< */
- uint32_t compatmap_length; /**< */
- uint8_t groupsRtrn; /**< */
- uint8_t pad0; /**< */
- uint16_t firstSIRtrn; /**< */
- uint16_t nSIRtrn; /**< */
- uint16_t nTotalSI; /**< */
- uint8_t pad1[16]; /**< */
- xcb_xkb_sym_interpret_t *si_rtrn; /**< */
- xcb_xkb_mod_def_t *group_rtrn; /**< */
- } compat_map;
- struct _indicator_maps {
- uint8_t indicatormap_type; /**< */
- uint8_t indicatorDeviceID; /**< */
- uint16_t indicatormap_sequence; /**< */
- uint32_t indicatormap_length; /**< */
- uint32_t which; /**< */
- uint32_t realIndicators; /**< */
- uint8_t nIndicators; /**< */
- uint8_t pad0[15]; /**< */
- xcb_xkb_indicator_map_t *maps; /**< */
- } indicator_maps;
- struct _key_names {
- uint8_t keyname_type; /**< */
- uint8_t keyDeviceID; /**< */
- uint16_t keyname_sequence; /**< */
- uint32_t keyname_length; /**< */
- uint32_t which; /**< */
- xcb_keycode_t keyMinKeyCode; /**< */
- xcb_keycode_t keyMaxKeyCode; /**< */
- uint8_t nTypes; /**< */
- uint8_t groupNames; /**< */
- uint16_t virtualMods; /**< */
- xcb_keycode_t firstKey; /**< */
- uint8_t nKeys; /**< */
- uint32_t indicators; /**< */
- uint8_t nRadioGroups; /**< */
- uint8_t nKeyAliases; /**< */
- uint16_t nKTLevels; /**< */
- uint8_t pad0[4]; /**< */
- xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t valueList; /**< */
- } key_names;
- struct _geometry {
- uint8_t geometry_type; /**< */
- uint8_t geometryDeviceID; /**< */
- uint16_t geometry_sequence; /**< */
- uint32_t geometry_length; /**< */
- xcb_atom_t name; /**< */
- uint8_t geometryFound; /**< */
- uint8_t pad0; /**< */
- uint16_t widthMM; /**< */
- uint16_t heightMM; /**< */
- uint16_t nProperties; /**< */
- uint16_t nColors; /**< */
- uint16_t nShapes; /**< */
- uint16_t nSections; /**< */
- uint16_t nDoodads; /**< */
- uint16_t nKeyAliases; /**< */
- uint8_t baseColorNdx; /**< */
- uint8_t labelColorNdx; /**< */
- xcb_xkb_counted_string_16_t *labelFont; /**< */
- } geometry;
-} xcb_xkb_get_kbd_by_name_replies_t;
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_replies_types_map_t * xcb_xkb_get_kbd_by_name_replies_types_map
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_get_kbd_by_name_replies_types_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_replies_types_map_t *
-xcb_xkb_get_kbd_by_name_replies_types_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */);
-
-/**
- * @brief xcb_xkb_get_kbd_by_name_reply_t
- **/
-typedef struct xcb_xkb_get_kbd_by_name_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- xcb_keycode_t minKeyCode; /**< */
- xcb_keycode_t maxKeyCode; /**< */
- uint8_t loaded; /**< */
- uint8_t newKeyboard; /**< */
- uint16_t found; /**< */
- uint16_t reported; /**< */
- uint8_t pad0[16]; /**< */
-} xcb_xkb_get_kbd_by_name_reply_t;
-
-/**
- * @brief xcb_xkb_get_device_info_cookie_t
- **/
-typedef struct xcb_xkb_get_device_info_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_get_device_info_cookie_t;
-
-/** Opcode for xcb_xkb_get_device_info. */
-#define XCB_XKB_GET_DEVICE_INFO 24
-
-/**
- * @brief xcb_xkb_get_device_info_request_t
- **/
-typedef struct xcb_xkb_get_device_info_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint16_t wanted; /**< */
- uint8_t allButtons; /**< */
- uint8_t firstButton; /**< */
- uint8_t nButtons; /**< */
- uint8_t pad0; /**< */
- xcb_xkb_led_class_spec_t ledClass; /**< */
- xcb_xkb_id_spec_t ledID; /**< */
-} xcb_xkb_get_device_info_request_t;
-
-/**
- * @brief xcb_xkb_get_device_info_reply_t
- **/
-typedef struct xcb_xkb_get_device_info_reply_t {
- uint8_t response_type; /**< */
- uint8_t deviceID; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint16_t present; /**< */
- uint16_t supported; /**< */
- uint16_t unsupported; /**< */
- uint16_t nDeviceLedFBs; /**< */
- uint8_t firstBtnWanted; /**< */
- uint8_t nBtnsWanted; /**< */
- uint8_t firstBtnRtrn; /**< */
- uint8_t nBtnsRtrn; /**< */
- uint8_t totalBtns; /**< */
- uint8_t hasOwnState; /**< */
- uint16_t dfltKbdFB; /**< */
- uint16_t dfltLedFB; /**< */
- uint8_t pad0[2]; /**< */
- xcb_atom_t devType; /**< */
- uint16_t nameLen; /**< */
-} xcb_xkb_get_device_info_reply_t;
-
-/** Opcode for xcb_xkb_set_device_info. */
-#define XCB_XKB_SET_DEVICE_INFO 25
-
-/**
- * @brief xcb_xkb_set_device_info_request_t
- **/
-typedef struct xcb_xkb_set_device_info_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- xcb_xkb_device_spec_t deviceSpec; /**< */
- uint8_t firstBtn; /**< */
- uint8_t nBtns; /**< */
- uint16_t change; /**< */
- uint16_t nDeviceLedFBs; /**< */
-} xcb_xkb_set_device_info_request_t;
-
-/**
- * @brief xcb_xkb_set_debugging_flags_cookie_t
- **/
-typedef struct xcb_xkb_set_debugging_flags_cookie_t {
- unsigned int sequence; /**< */
-} xcb_xkb_set_debugging_flags_cookie_t;
-
-/** Opcode for xcb_xkb_set_debugging_flags. */
-#define XCB_XKB_SET_DEBUGGING_FLAGS 101
-
-/**
- * @brief xcb_xkb_set_debugging_flags_request_t
- **/
-typedef struct xcb_xkb_set_debugging_flags_request_t {
- uint8_t major_opcode; /**< */
- uint8_t minor_opcode; /**< */
- uint16_t length; /**< */
- uint16_t msgLength; /**< */
- uint8_t pad0[2]; /**< */
- uint32_t affectFlags; /**< */
- uint32_t flags; /**< */
- uint32_t affectCtrls; /**< */
- uint32_t ctrls; /**< */
-} xcb_xkb_set_debugging_flags_request_t;
-
-/**
- * @brief xcb_xkb_set_debugging_flags_reply_t
- **/
-typedef struct xcb_xkb_set_debugging_flags_reply_t {
- uint8_t response_type; /**< */
- uint8_t pad0; /**< */
- uint16_t sequence; /**< */
- uint32_t length; /**< */
- uint32_t currentFlags; /**< */
- uint32_t currentCtrls; /**< */
- uint32_t supportedFlags; /**< */
- uint32_t supportedCtrls; /**< */
- uint8_t pad1[8]; /**< */
-} xcb_xkb_set_debugging_flags_reply_t;
-
-/** Opcode for xcb_xkb_new_keyboard_notify. */
-#define XCB_XKB_NEW_KEYBOARD_NOTIFY 0
-
-/**
- * @brief xcb_xkb_new_keyboard_notify_event_t
- **/
-typedef struct xcb_xkb_new_keyboard_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t oldDeviceID; /**< */
- xcb_keycode_t minKeyCode; /**< */
- xcb_keycode_t maxKeyCode; /**< */
- xcb_keycode_t oldMinKeyCode; /**< */
- xcb_keycode_t oldMaxKeyCode; /**< */
- uint8_t requestMajor; /**< */
- uint8_t requestMinor; /**< */
- uint16_t changed; /**< */
- uint8_t pad0[14]; /**< */
-} xcb_xkb_new_keyboard_notify_event_t;
-
-/** Opcode for xcb_xkb_map_notify. */
-#define XCB_XKB_MAP_NOTIFY 1
-
-/**
- * @brief xcb_xkb_map_notify_event_t
- **/
-typedef struct xcb_xkb_map_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t ptrBtnActions; /**< */
- uint16_t changed; /**< */
- xcb_keycode_t minKeyCode; /**< */
- xcb_keycode_t maxKeyCode; /**< */
- uint8_t firstType; /**< */
- uint8_t nTypes; /**< */
- xcb_keycode_t firstKeySym; /**< */
- uint8_t nKeySyms; /**< */
- xcb_keycode_t firstKeyAct; /**< */
- uint8_t nKeyActs; /**< */
- xcb_keycode_t firstKeyBehavior; /**< */
- uint8_t nKeyBehavior; /**< */
- xcb_keycode_t firstKeyExplicit; /**< */
- uint8_t nKeyExplicit; /**< */
- xcb_keycode_t firstModMapKey; /**< */
- uint8_t nModMapKeys; /**< */
- xcb_keycode_t firstVModMapKey; /**< */
- uint8_t nVModMapKeys; /**< */
- uint16_t virtualMods; /**< */
- uint8_t pad0[2]; /**< */
-} xcb_xkb_map_notify_event_t;
-
-/** Opcode for xcb_xkb_state_notify. */
-#define XCB_XKB_STATE_NOTIFY 2
-
-/**
- * @brief xcb_xkb_state_notify_event_t
- **/
-typedef struct xcb_xkb_state_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t mods; /**< */
- uint8_t baseMods; /**< */
- uint8_t latchedMods; /**< */
- uint8_t lockedMods; /**< */
- uint8_t group; /**< */
- int16_t baseGroup; /**< */
- int16_t latchedGroup; /**< */
- uint8_t lockedGroup; /**< */
- uint8_t compatState; /**< */
- uint8_t grabMods; /**< */
- uint8_t compatGrabMods; /**< */
- uint8_t lookupMods; /**< */
- uint8_t compatLoockupMods; /**< */
- uint16_t ptrBtnState; /**< */
- uint16_t changed; /**< */
- xcb_keycode_t keycode; /**< */
- uint8_t eventType; /**< */
- uint8_t requestMajor; /**< */
- uint8_t requestMinor; /**< */
-} xcb_xkb_state_notify_event_t;
-
-/** Opcode for xcb_xkb_controls_notify. */
-#define XCB_XKB_CONTROLS_NOTIFY 3
-
-/**
- * @brief xcb_xkb_controls_notify_event_t
- **/
-typedef struct xcb_xkb_controls_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t numGroups; /**< */
- uint8_t pad0[2]; /**< */
- uint32_t changedControls; /**< */
- uint32_t enabledControls; /**< */
- uint32_t enabledControlChanges; /**< */
- xcb_keycode_t keycode; /**< */
- uint8_t eventType; /**< */
- uint8_t requestMajor; /**< */
- uint8_t requestMinor; /**< */
- uint8_t pad1[4]; /**< */
-} xcb_xkb_controls_notify_event_t;
-
-/** Opcode for xcb_xkb_indicator_state_notify. */
-#define XCB_XKB_INDICATOR_STATE_NOTIFY 4
-
-/**
- * @brief xcb_xkb_indicator_state_notify_event_t
- **/
-typedef struct xcb_xkb_indicator_state_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t pad0[3]; /**< */
- uint32_t state; /**< */
- uint32_t stateChanged; /**< */
- uint8_t pad1[12]; /**< */
-} xcb_xkb_indicator_state_notify_event_t;
-
-/** Opcode for xcb_xkb_indicator_map_notify. */
-#define XCB_XKB_INDICATOR_MAP_NOTIFY 5
-
-/**
- * @brief xcb_xkb_indicator_map_notify_event_t
- **/
-typedef struct xcb_xkb_indicator_map_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t pad0[3]; /**< */
- uint32_t state; /**< */
- uint32_t mapChanged; /**< */
- uint8_t pad1[12]; /**< */
-} xcb_xkb_indicator_map_notify_event_t;
-
-/** Opcode for xcb_xkb_names_notify. */
-#define XCB_XKB_NAMES_NOTIFY 6
-
-/**
- * @brief xcb_xkb_names_notify_event_t
- **/
-typedef struct xcb_xkb_names_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t pad0; /**< */
- uint16_t changed; /**< */
- uint8_t firstType; /**< */
- uint8_t nTypes; /**< */
- uint8_t firstLevelName; /**< */
- uint8_t nLevelNames; /**< */
- uint8_t pad1; /**< */
- uint8_t nRadioGroups; /**< */
- uint8_t nKeyAliases; /**< */
- uint8_t changedGroupNames; /**< */
- uint16_t changedVirtualMods; /**< */
- xcb_keycode_t firstKey; /**< */
- uint8_t nKeys; /**< */
- uint32_t changedIndicators; /**< */
- uint8_t pad2[4]; /**< */
-} xcb_xkb_names_notify_event_t;
-
-/** Opcode for xcb_xkb_compat_map_notify. */
-#define XCB_XKB_COMPAT_MAP_NOTIFY 7
-
-/**
- * @brief xcb_xkb_compat_map_notify_event_t
- **/
-typedef struct xcb_xkb_compat_map_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t changedGroups; /**< */
- uint16_t firstSI; /**< */
- uint16_t nSI; /**< */
- uint16_t nTotalSI; /**< */
- uint8_t pad0[16]; /**< */
-} xcb_xkb_compat_map_notify_event_t;
-
-/** Opcode for xcb_xkb_bell_notify. */
-#define XCB_XKB_BELL_NOTIFY 8
-
-/**
- * @brief xcb_xkb_bell_notify_event_t
- **/
-typedef struct xcb_xkb_bell_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t bellClass; /**< */
- uint8_t bellID; /**< */
- uint8_t percent; /**< */
- uint16_t pitch; /**< */
- uint16_t duration; /**< */
- xcb_atom_t name; /**< */
- xcb_window_t window; /**< */
- uint8_t eventOnly; /**< */
- uint8_t pad0[7]; /**< */
-} xcb_xkb_bell_notify_event_t;
-
-/** Opcode for xcb_xkb_action_message. */
-#define XCB_XKB_ACTION_MESSAGE 9
-
-/**
- * @brief xcb_xkb_action_message_event_t
- **/
-typedef struct xcb_xkb_action_message_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- xcb_keycode_t keycode; /**< */
- uint8_t press; /**< */
- uint8_t keyEventFollows; /**< */
- uint8_t mods; /**< */
- uint8_t group; /**< */
- xcb_xkb_string8_t message[8]; /**< */
- uint8_t pad0[10]; /**< */
-} xcb_xkb_action_message_event_t;
-
-/** Opcode for xcb_xkb_access_x_notify. */
-#define XCB_XKB_ACCESS_X_NOTIFY 10
-
-/**
- * @brief xcb_xkb_access_x_notify_event_t
- **/
-typedef struct xcb_xkb_access_x_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- xcb_keycode_t keycode; /**< */
- uint16_t detailt; /**< */
- uint16_t slowKeysDelay; /**< */
- uint16_t debounceDelay; /**< */
- uint8_t pad0[16]; /**< */
-} xcb_xkb_access_x_notify_event_t;
-
-/** Opcode for xcb_xkb_extension_device_notify. */
-#define XCB_XKB_EXTENSION_DEVICE_NOTIFY 11
-
-/**
- * @brief xcb_xkb_extension_device_notify_event_t
- **/
-typedef struct xcb_xkb_extension_device_notify_event_t {
- uint8_t response_type; /**< */
- uint8_t xkbType; /**< */
- uint16_t sequence; /**< */
- xcb_timestamp_t time; /**< */
- uint8_t deviceID; /**< */
- uint8_t pad0; /**< */
- uint16_t reason; /**< */
- uint16_t ledClass; /**< */
- uint16_t ledID; /**< */
- uint32_t ledsDefined; /**< */
- uint32_t ledState; /**< */
- uint8_t firstButton; /**< */
- uint8_t nButtons; /**< */
- uint16_t supported; /**< */
- uint16_t unsupported; /**< */
- uint8_t pad1[2]; /**< */
-} xcb_xkb_extension_device_notify_event_t;
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_device_spec_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_device_spec_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_device_spec_next
- **
- ** @param xcb_xkb_device_spec_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_device_spec_next (xcb_xkb_device_spec_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_device_spec_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_device_spec_end
- **
- ** @param xcb_xkb_device_spec_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_device_spec_end (xcb_xkb_device_spec_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_led_class_spec_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_led_class_spec_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_led_class_spec_next
- **
- ** @param xcb_xkb_led_class_spec_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_led_class_spec_next (xcb_xkb_led_class_spec_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_led_class_spec_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_led_class_spec_end
- **
- ** @param xcb_xkb_led_class_spec_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_led_class_spec_end (xcb_xkb_led_class_spec_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_bell_class_spec_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_bell_class_spec_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_bell_class_spec_next
- **
- ** @param xcb_xkb_bell_class_spec_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_bell_class_spec_next (xcb_xkb_bell_class_spec_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_bell_class_spec_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_bell_class_spec_end
- **
- ** @param xcb_xkb_bell_class_spec_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_bell_class_spec_end (xcb_xkb_bell_class_spec_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_id_spec_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_id_spec_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_id_spec_next
- **
- ** @param xcb_xkb_id_spec_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_id_spec_next (xcb_xkb_id_spec_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_id_spec_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_id_spec_end
- **
- ** @param xcb_xkb_id_spec_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_id_spec_end (xcb_xkb_id_spec_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_indicator_map_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_indicator_map_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_indicator_map_next
- **
- ** @param xcb_xkb_indicator_map_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_indicator_map_next (xcb_xkb_indicator_map_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_indicator_map_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_indicator_map_end
- **
- ** @param xcb_xkb_indicator_map_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_indicator_map_end (xcb_xkb_indicator_map_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_mod_def_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_mod_def_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_mod_def_next
- **
- ** @param xcb_xkb_mod_def_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_mod_def_next (xcb_xkb_mod_def_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_mod_def_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_mod_def_end
- **
- ** @param xcb_xkb_mod_def_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_mod_def_end (xcb_xkb_mod_def_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_key_name_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_key_name_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_name_next
- **
- ** @param xcb_xkb_key_name_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_name_next (xcb_xkb_key_name_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_key_name_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_name_end
- **
- ** @param xcb_xkb_key_name_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_name_end (xcb_xkb_key_name_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_key_alias_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_key_alias_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_alias_next
- **
- ** @param xcb_xkb_key_alias_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_alias_next (xcb_xkb_key_alias_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_key_alias_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_alias_end
- **
- ** @param xcb_xkb_key_alias_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_alias_end (xcb_xkb_key_alias_iterator_t i /**< */);
-
-int
-xcb_xkb_counted_string_16_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** char * xcb_xkb_counted_string_16_string
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_counted_string_16_string_length
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_counted_string_16_string_end (const xcb_xkb_counted_string_16_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** void * xcb_xkb_counted_string_16_alignment_pad
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns void *
- **
- *****************************************************************************/
-
-void *
-xcb_xkb_counted_string_16_alignment_pad (const xcb_xkb_counted_string_16_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_counted_string_16_alignment_pad_length
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_counted_string_16_alignment_pad_length (const xcb_xkb_counted_string_16_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_counted_string_16_alignment_pad_end
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_counted_string_16_alignment_pad_end (const xcb_xkb_counted_string_16_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_counted_string_16_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_counted_string_16_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_counted_string_16_next
- **
- ** @param xcb_xkb_counted_string_16_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_counted_string_16_next (xcb_xkb_counted_string_16_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_counted_string_16_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_counted_string_16_end
- **
- ** @param xcb_xkb_counted_string_16_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_counted_string_16_end (xcb_xkb_counted_string_16_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_kt_map_entry_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_kt_map_entry_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_kt_map_entry_next
- **
- ** @param xcb_xkb_kt_map_entry_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_kt_map_entry_next (xcb_xkb_kt_map_entry_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_kt_map_entry_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_kt_map_entry_end
- **
- ** @param xcb_xkb_kt_map_entry_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_kt_map_entry_end (xcb_xkb_kt_map_entry_iterator_t i /**< */);
-
-int
-xcb_xkb_key_type_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_map_entry_t * xcb_xkb_key_type_map
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns xcb_xkb_kt_map_entry_t *
- **
- *****************************************************************************/
-
-xcb_xkb_kt_map_entry_t *
-xcb_xkb_key_type_map (const xcb_xkb_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_key_type_map_length
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_key_type_map_length (const xcb_xkb_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_map_entry_iterator_t xcb_xkb_key_type_map_iterator
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns xcb_xkb_kt_map_entry_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_kt_map_entry_iterator_t
-xcb_xkb_key_type_map_iterator (const xcb_xkb_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_t * xcb_xkb_key_type_preserve
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns xcb_xkb_mod_def_t *
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_t *
-xcb_xkb_key_type_preserve (const xcb_xkb_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_key_type_preserve_length
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_key_type_preserve_length (const xcb_xkb_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_iterator_t xcb_xkb_key_type_preserve_iterator
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns xcb_xkb_mod_def_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_iterator_t
-xcb_xkb_key_type_preserve_iterator (const xcb_xkb_key_type_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_key_type_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_key_type_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_type_next
- **
- ** @param xcb_xkb_key_type_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_type_next (xcb_xkb_key_type_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_key_type_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_type_end
- **
- ** @param xcb_xkb_key_type_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_type_end (xcb_xkb_key_type_iterator_t i /**< */);
-
-int
-xcb_xkb_key_sym_map_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_keysym_t * xcb_xkb_key_sym_map_syms
- **
- ** @param const xcb_xkb_key_sym_map_t *R
- ** @returns xcb_keysym_t *
- **
- *****************************************************************************/
-
-xcb_keysym_t *
-xcb_xkb_key_sym_map_syms (const xcb_xkb_key_sym_map_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_key_sym_map_syms_length
- **
- ** @param const xcb_xkb_key_sym_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_key_sym_map_syms_length (const xcb_xkb_key_sym_map_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_sym_map_syms_end
- **
- ** @param const xcb_xkb_key_sym_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_sym_map_syms_end (const xcb_xkb_key_sym_map_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_key_sym_map_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_key_sym_map_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_sym_map_next
- **
- ** @param xcb_xkb_key_sym_map_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_sym_map_next (xcb_xkb_key_sym_map_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_key_sym_map_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_sym_map_end
- **
- ** @param xcb_xkb_key_sym_map_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_sym_map_end (xcb_xkb_key_sym_map_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_common_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_common_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_common_behavior_next
- **
- ** @param xcb_xkb_common_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_common_behavior_next (xcb_xkb_common_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_common_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_common_behavior_end
- **
- ** @param xcb_xkb_common_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_common_behavior_end (xcb_xkb_common_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_default_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_default_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_default_behavior_next
- **
- ** @param xcb_xkb_default_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_default_behavior_next (xcb_xkb_default_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_default_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_default_behavior_end
- **
- ** @param xcb_xkb_default_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_default_behavior_end (xcb_xkb_default_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_lock_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_lock_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_lock_behavior_next
- **
- ** @param xcb_xkb_lock_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_lock_behavior_next (xcb_xkb_lock_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_lock_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_lock_behavior_end
- **
- ** @param xcb_xkb_lock_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_lock_behavior_end (xcb_xkb_lock_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_radio_group_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_radio_group_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_radio_group_behavior_next
- **
- ** @param xcb_xkb_radio_group_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_radio_group_behavior_next (xcb_xkb_radio_group_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_radio_group_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_radio_group_behavior_end
- **
- ** @param xcb_xkb_radio_group_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_radio_group_behavior_end (xcb_xkb_radio_group_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_overlay_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_overlay_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_overlay_behavior_next
- **
- ** @param xcb_xkb_overlay_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_overlay_behavior_next (xcb_xkb_overlay_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_overlay_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_overlay_behavior_end
- **
- ** @param xcb_xkb_overlay_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_overlay_behavior_end (xcb_xkb_overlay_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_permament_lock_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_permament_lock_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_permament_lock_behavior_next
- **
- ** @param xcb_xkb_permament_lock_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_permament_lock_behavior_next (xcb_xkb_permament_lock_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_permament_lock_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_permament_lock_behavior_end
- **
- ** @param xcb_xkb_permament_lock_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_permament_lock_behavior_end (xcb_xkb_permament_lock_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_permament_radio_group_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_permament_radio_group_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_permament_radio_group_behavior_next
- **
- ** @param xcb_xkb_permament_radio_group_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_permament_radio_group_behavior_next (xcb_xkb_permament_radio_group_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_permament_radio_group_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_permament_radio_group_behavior_end
- **
- ** @param xcb_xkb_permament_radio_group_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_permament_overlay_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_permament_overlay_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_permament_overlay_behavior_next
- **
- ** @param xcb_xkb_permament_overlay_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_permament_overlay_behavior_next (xcb_xkb_permament_overlay_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_permament_overlay_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_permament_overlay_behavior_end
- **
- ** @param xcb_xkb_permament_overlay_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_permament_overlay_behavior_end (xcb_xkb_permament_overlay_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_behavior_next
- **
- ** @param xcb_xkb_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_behavior_next (xcb_xkb_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_behavior_end
- **
- ** @param xcb_xkb_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_behavior_end (xcb_xkb_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_set_behavior_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_set_behavior_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_set_behavior_next
- **
- ** @param xcb_xkb_set_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_set_behavior_next (xcb_xkb_set_behavior_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_set_behavior_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_behavior_end
- **
- ** @param xcb_xkb_set_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_behavior_end (xcb_xkb_set_behavior_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_set_explicit_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_set_explicit_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_set_explicit_next
- **
- ** @param xcb_xkb_set_explicit_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_set_explicit_next (xcb_xkb_set_explicit_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_set_explicit_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_explicit_end
- **
- ** @param xcb_xkb_set_explicit_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_explicit_end (xcb_xkb_set_explicit_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_key_mod_map_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_key_mod_map_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_mod_map_next
- **
- ** @param xcb_xkb_key_mod_map_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_mod_map_next (xcb_xkb_key_mod_map_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_key_mod_map_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_mod_map_end
- **
- ** @param xcb_xkb_key_mod_map_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_mod_map_end (xcb_xkb_key_mod_map_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_key_v_mod_map_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_key_v_mod_map_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_v_mod_map_next
- **
- ** @param xcb_xkb_key_v_mod_map_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_v_mod_map_next (xcb_xkb_key_v_mod_map_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_key_v_mod_map_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_v_mod_map_end
- **
- ** @param xcb_xkb_key_v_mod_map_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_v_mod_map_end (xcb_xkb_key_v_mod_map_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_kt_set_map_entry_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_kt_set_map_entry_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_kt_set_map_entry_next
- **
- ** @param xcb_xkb_kt_set_map_entry_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_kt_set_map_entry_next (xcb_xkb_kt_set_map_entry_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_kt_set_map_entry_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_kt_set_map_entry_end
- **
- ** @param xcb_xkb_kt_set_map_entry_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_kt_set_map_entry_end (xcb_xkb_kt_set_map_entry_iterator_t i /**< */);
-
-int
-xcb_xkb_set_key_type_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_entries
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns xcb_xkb_kt_set_map_entry_t *
- **
- *****************************************************************************/
-
-xcb_xkb_kt_set_map_entry_t *
-xcb_xkb_set_key_type_entries (const xcb_xkb_set_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_key_type_entries_length
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_key_type_entries_length (const xcb_xkb_set_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_entries_iterator
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns xcb_xkb_kt_set_map_entry_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_kt_set_map_entry_iterator_t
-xcb_xkb_set_key_type_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_preserve_entries
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns xcb_xkb_kt_set_map_entry_t *
- **
- *****************************************************************************/
-
-xcb_xkb_kt_set_map_entry_t *
-xcb_xkb_set_key_type_preserve_entries (const xcb_xkb_set_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_key_type_preserve_entries_length
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_key_type_preserve_entries_length (const xcb_xkb_set_key_type_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_preserve_entries_iterator
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns xcb_xkb_kt_set_map_entry_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_kt_set_map_entry_iterator_t
-xcb_xkb_set_key_type_preserve_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_set_key_type_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_set_key_type_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_set_key_type_next
- **
- ** @param xcb_xkb_set_key_type_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_set_key_type_next (xcb_xkb_set_key_type_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_set_key_type_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_key_type_end
- **
- ** @param xcb_xkb_set_key_type_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_key_type_end (xcb_xkb_set_key_type_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_string8_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_string8_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_string8_next
- **
- ** @param xcb_xkb_string8_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_string8_next (xcb_xkb_string8_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_string8_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_string8_end
- **
- ** @param xcb_xkb_string8_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_string8_end (xcb_xkb_string8_iterator_t i /**< */);
-
-int
-xcb_xkb_outline_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_point_t * xcb_xkb_outline_points
- **
- ** @param const xcb_xkb_outline_t *R
- ** @returns xcb_point_t *
- **
- *****************************************************************************/
-
-xcb_point_t *
-xcb_xkb_outline_points (const xcb_xkb_outline_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_outline_points_length
- **
- ** @param const xcb_xkb_outline_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_outline_points_length (const xcb_xkb_outline_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_point_iterator_t xcb_xkb_outline_points_iterator
- **
- ** @param const xcb_xkb_outline_t *R
- ** @returns xcb_point_iterator_t
- **
- *****************************************************************************/
-
-xcb_point_iterator_t
-xcb_xkb_outline_points_iterator (const xcb_xkb_outline_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_outline_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_outline_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_outline_next
- **
- ** @param xcb_xkb_outline_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_outline_next (xcb_xkb_outline_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_outline_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_outline_end
- **
- ** @param xcb_xkb_outline_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_outline_end (xcb_xkb_outline_iterator_t i /**< */);
-
-int
-xcb_xkb_shape_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_shape_outlines_length
- **
- ** @param const xcb_xkb_shape_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_shape_outlines_length (const xcb_xkb_shape_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_outline_iterator_t xcb_xkb_shape_outlines_iterator
- **
- ** @param const xcb_xkb_shape_t *R
- ** @returns xcb_xkb_outline_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_outline_iterator_t
-xcb_xkb_shape_outlines_iterator (const xcb_xkb_shape_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_shape_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_shape_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_shape_next
- **
- ** @param xcb_xkb_shape_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_shape_next (xcb_xkb_shape_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_shape_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_shape_end
- **
- ** @param xcb_xkb_shape_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_shape_end (xcb_xkb_shape_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_key_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_key_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_next
- **
- ** @param xcb_xkb_key_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_next (xcb_xkb_key_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_key_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_end
- **
- ** @param xcb_xkb_key_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_end (xcb_xkb_key_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_overlay_key_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_overlay_key_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_overlay_key_next
- **
- ** @param xcb_xkb_overlay_key_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_overlay_key_next (xcb_xkb_overlay_key_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_overlay_key_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_overlay_key_end
- **
- ** @param xcb_xkb_overlay_key_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_overlay_key_end (xcb_xkb_overlay_key_iterator_t i /**< */);
-
-int
-xcb_xkb_overlay_row_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_overlay_key_t * xcb_xkb_overlay_row_keys
- **
- ** @param const xcb_xkb_overlay_row_t *R
- ** @returns xcb_xkb_overlay_key_t *
- **
- *****************************************************************************/
-
-xcb_xkb_overlay_key_t *
-xcb_xkb_overlay_row_keys (const xcb_xkb_overlay_row_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_overlay_row_keys_length
- **
- ** @param const xcb_xkb_overlay_row_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_overlay_row_keys_length (const xcb_xkb_overlay_row_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_overlay_key_iterator_t xcb_xkb_overlay_row_keys_iterator
- **
- ** @param const xcb_xkb_overlay_row_t *R
- ** @returns xcb_xkb_overlay_key_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_overlay_key_iterator_t
-xcb_xkb_overlay_row_keys_iterator (const xcb_xkb_overlay_row_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_overlay_row_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_overlay_row_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_overlay_row_next
- **
- ** @param xcb_xkb_overlay_row_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_overlay_row_next (xcb_xkb_overlay_row_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_overlay_row_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_overlay_row_end
- **
- ** @param xcb_xkb_overlay_row_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_overlay_row_end (xcb_xkb_overlay_row_iterator_t i /**< */);
-
-int
-xcb_xkb_overlay_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_overlay_rows_length
- **
- ** @param const xcb_xkb_overlay_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_overlay_rows_length (const xcb_xkb_overlay_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_overlay_row_iterator_t xcb_xkb_overlay_rows_iterator
- **
- ** @param const xcb_xkb_overlay_t *R
- ** @returns xcb_xkb_overlay_row_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_overlay_row_iterator_t
-xcb_xkb_overlay_rows_iterator (const xcb_xkb_overlay_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_overlay_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_overlay_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_overlay_next
- **
- ** @param xcb_xkb_overlay_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_overlay_next (xcb_xkb_overlay_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_overlay_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_overlay_end
- **
- ** @param xcb_xkb_overlay_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_overlay_end (xcb_xkb_overlay_iterator_t i /**< */);
-
-int
-xcb_xkb_row_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_t * xcb_xkb_row_keys
- **
- ** @param const xcb_xkb_row_t *R
- ** @returns xcb_xkb_key_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_t *
-xcb_xkb_row_keys (const xcb_xkb_row_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_row_keys_length
- **
- ** @param const xcb_xkb_row_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_row_keys_length (const xcb_xkb_row_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_iterator_t xcb_xkb_row_keys_iterator
- **
- ** @param const xcb_xkb_row_t *R
- ** @returns xcb_xkb_key_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_iterator_t
-xcb_xkb_row_keys_iterator (const xcb_xkb_row_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_row_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_row_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_row_next
- **
- ** @param xcb_xkb_row_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_row_next (xcb_xkb_row_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_row_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_row_end
- **
- ** @param xcb_xkb_row_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_row_end (xcb_xkb_row_iterator_t i /**< */);
-
-int
-xcb_xkb_listing_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_string8_t * xcb_xkb_listing_string
- **
- ** @param const xcb_xkb_listing_t *R
- ** @returns xcb_xkb_string8_t *
- **
- *****************************************************************************/
-
-xcb_xkb_string8_t *
-xcb_xkb_listing_string (const xcb_xkb_listing_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_listing_string_length
- **
- ** @param const xcb_xkb_listing_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_listing_string_length (const xcb_xkb_listing_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_listing_string_end
- **
- ** @param const xcb_xkb_listing_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_listing_string_end (const xcb_xkb_listing_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_listing_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_listing_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_listing_next
- **
- ** @param xcb_xkb_listing_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_listing_next (xcb_xkb_listing_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_listing_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_listing_end
- **
- ** @param xcb_xkb_listing_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_listing_end (xcb_xkb_listing_iterator_t i /**< */);
-
-int
-xcb_xkb_device_led_info_sizeof (const void *_buffer /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_device_led_info_names
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_device_led_info_names (const xcb_xkb_device_led_info_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_device_led_info_names_length
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_device_led_info_names_length (const xcb_xkb_device_led_info_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_device_led_info_names_end
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_device_led_info_names_end (const xcb_xkb_device_led_info_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_t * xcb_xkb_device_led_info_maps
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns xcb_xkb_indicator_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_t *
-xcb_xkb_device_led_info_maps (const xcb_xkb_device_led_info_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_device_led_info_maps_length
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_device_led_info_maps_length (const xcb_xkb_device_led_info_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_iterator_t xcb_xkb_device_led_info_maps_iterator
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns xcb_xkb_indicator_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_iterator_t
-xcb_xkb_device_led_info_maps_iterator (const xcb_xkb_device_led_info_t *R /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_device_led_info_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_device_led_info_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_device_led_info_next
- **
- ** @param xcb_xkb_device_led_info_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_device_led_info_next (xcb_xkb_device_led_info_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_device_led_info_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_device_led_info_end
- **
- ** @param xcb_xkb_device_led_info_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_device_led_info_end (xcb_xkb_device_led_info_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_no_action_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_no_action_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_no_action_next
- **
- ** @param xcb_xkb_sa_no_action_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_no_action_next (xcb_xkb_sa_no_action_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_no_action_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_no_action_end
- **
- ** @param xcb_xkb_sa_no_action_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_no_action_end (xcb_xkb_sa_no_action_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_set_mods_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_set_mods_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_set_mods_next
- **
- ** @param xcb_xkb_sa_set_mods_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_set_mods_next (xcb_xkb_sa_set_mods_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_set_mods_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_set_mods_end
- **
- ** @param xcb_xkb_sa_set_mods_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_set_mods_end (xcb_xkb_sa_set_mods_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_latch_mods_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_latch_mods_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_latch_mods_next
- **
- ** @param xcb_xkb_sa_latch_mods_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_latch_mods_next (xcb_xkb_sa_latch_mods_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_latch_mods_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_latch_mods_end
- **
- ** @param xcb_xkb_sa_latch_mods_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_latch_mods_end (xcb_xkb_sa_latch_mods_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_lock_mods_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_lock_mods_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_mods_next
- **
- ** @param xcb_xkb_sa_lock_mods_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_mods_next (xcb_xkb_sa_lock_mods_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_lock_mods_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_mods_end
- **
- ** @param xcb_xkb_sa_lock_mods_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_mods_end (xcb_xkb_sa_lock_mods_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_set_group_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_set_group_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_set_group_next
- **
- ** @param xcb_xkb_sa_set_group_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_set_group_next (xcb_xkb_sa_set_group_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_set_group_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_set_group_end
- **
- ** @param xcb_xkb_sa_set_group_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_set_group_end (xcb_xkb_sa_set_group_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_latch_group_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_latch_group_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_latch_group_next
- **
- ** @param xcb_xkb_sa_latch_group_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_latch_group_next (xcb_xkb_sa_latch_group_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_latch_group_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_latch_group_end
- **
- ** @param xcb_xkb_sa_latch_group_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_latch_group_end (xcb_xkb_sa_latch_group_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_lock_group_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_lock_group_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_group_next
- **
- ** @param xcb_xkb_sa_lock_group_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_group_next (xcb_xkb_sa_lock_group_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_lock_group_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_group_end
- **
- ** @param xcb_xkb_sa_lock_group_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_group_end (xcb_xkb_sa_lock_group_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_move_ptr_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_move_ptr_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_move_ptr_next
- **
- ** @param xcb_xkb_sa_move_ptr_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_move_ptr_next (xcb_xkb_sa_move_ptr_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_move_ptr_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_move_ptr_end
- **
- ** @param xcb_xkb_sa_move_ptr_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_move_ptr_end (xcb_xkb_sa_move_ptr_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_ptr_btn_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_ptr_btn_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_ptr_btn_next
- **
- ** @param xcb_xkb_sa_ptr_btn_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_ptr_btn_next (xcb_xkb_sa_ptr_btn_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_ptr_btn_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_ptr_btn_end
- **
- ** @param xcb_xkb_sa_ptr_btn_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_ptr_btn_end (xcb_xkb_sa_ptr_btn_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_lock_ptr_btn_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_lock_ptr_btn_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_ptr_btn_next
- **
- ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_ptr_btn_next (xcb_xkb_sa_lock_ptr_btn_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_lock_ptr_btn_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_ptr_btn_end
- **
- ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_ptr_btn_end (xcb_xkb_sa_lock_ptr_btn_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_set_ptr_dflt_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_set_ptr_dflt_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_set_ptr_dflt_next
- **
- ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_set_ptr_dflt_next (xcb_xkb_sa_set_ptr_dflt_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_set_ptr_dflt_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_set_ptr_dflt_end
- **
- ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_set_ptr_dflt_end (xcb_xkb_sa_set_ptr_dflt_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_iso_lock_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_iso_lock_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_iso_lock_next
- **
- ** @param xcb_xkb_sa_iso_lock_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_iso_lock_next (xcb_xkb_sa_iso_lock_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_iso_lock_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_iso_lock_end
- **
- ** @param xcb_xkb_sa_iso_lock_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_iso_lock_end (xcb_xkb_sa_iso_lock_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_terminate_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_terminate_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_terminate_next
- **
- ** @param xcb_xkb_sa_terminate_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_terminate_next (xcb_xkb_sa_terminate_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_terminate_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_terminate_end
- **
- ** @param xcb_xkb_sa_terminate_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_terminate_end (xcb_xkb_sa_terminate_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_switch_screen_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_switch_screen_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_switch_screen_next
- **
- ** @param xcb_xkb_sa_switch_screen_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_switch_screen_next (xcb_xkb_sa_switch_screen_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_switch_screen_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_switch_screen_end
- **
- ** @param xcb_xkb_sa_switch_screen_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_switch_screen_end (xcb_xkb_sa_switch_screen_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_set_controls_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_set_controls_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_set_controls_next
- **
- ** @param xcb_xkb_sa_set_controls_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_set_controls_next (xcb_xkb_sa_set_controls_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_set_controls_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_set_controls_end
- **
- ** @param xcb_xkb_sa_set_controls_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_set_controls_end (xcb_xkb_sa_set_controls_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_lock_controls_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_lock_controls_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_controls_next
- **
- ** @param xcb_xkb_sa_lock_controls_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_controls_next (xcb_xkb_sa_lock_controls_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_lock_controls_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_controls_end
- **
- ** @param xcb_xkb_sa_lock_controls_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_controls_end (xcb_xkb_sa_lock_controls_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_action_message_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_action_message_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_action_message_next
- **
- ** @param xcb_xkb_sa_action_message_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_action_message_next (xcb_xkb_sa_action_message_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_action_message_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_action_message_end
- **
- ** @param xcb_xkb_sa_action_message_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_action_message_end (xcb_xkb_sa_action_message_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_redirect_key_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_redirect_key_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_redirect_key_next
- **
- ** @param xcb_xkb_sa_redirect_key_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_redirect_key_next (xcb_xkb_sa_redirect_key_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_redirect_key_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_redirect_key_end
- **
- ** @param xcb_xkb_sa_redirect_key_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_redirect_key_end (xcb_xkb_sa_redirect_key_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_device_btn_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_device_btn_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_device_btn_next
- **
- ** @param xcb_xkb_sa_device_btn_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_device_btn_next (xcb_xkb_sa_device_btn_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_device_btn_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_device_btn_end
- **
- ** @param xcb_xkb_sa_device_btn_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_device_btn_end (xcb_xkb_sa_device_btn_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_lock_device_btn_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_lock_device_btn_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_device_btn_next
- **
- ** @param xcb_xkb_sa_lock_device_btn_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_device_btn_next (xcb_xkb_sa_lock_device_btn_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_lock_device_btn_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_device_btn_end
- **
- ** @param xcb_xkb_sa_lock_device_btn_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_device_btn_end (xcb_xkb_sa_lock_device_btn_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sa_device_valuator_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sa_device_valuator_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_device_valuator_next
- **
- ** @param xcb_xkb_sa_device_valuator_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_device_valuator_next (xcb_xkb_sa_device_valuator_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sa_device_valuator_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_device_valuator_end
- **
- ** @param xcb_xkb_sa_device_valuator_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_device_valuator_end (xcb_xkb_sa_device_valuator_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_si_action_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_si_action_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_si_action_next
- **
- ** @param xcb_xkb_si_action_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_si_action_next (xcb_xkb_si_action_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_si_action_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_si_action_end
- **
- ** @param xcb_xkb_si_action_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_si_action_end (xcb_xkb_si_action_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_sym_interpret_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_sym_interpret_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sym_interpret_next
- **
- ** @param xcb_xkb_sym_interpret_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sym_interpret_next (xcb_xkb_sym_interpret_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_sym_interpret_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sym_interpret_end
- **
- ** @param xcb_xkb_sym_interpret_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sym_interpret_end (xcb_xkb_sym_interpret_iterator_t i /**< */);
-
-/**
- * Get the next element of the iterator
- * @param i Pointer to a xcb_xkb_action_iterator_t
- *
- * Get the next element in the iterator. The member rem is
- * decreased by one. The member data points to the next
- * element. The member index is increased by sizeof(xcb_xkb_action_t)
- */
-
-/*****************************************************************************
- **
- ** void xcb_xkb_action_next
- **
- ** @param xcb_xkb_action_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_action_next (xcb_xkb_action_iterator_t *i /**< */);
-
-/**
- * Return the iterator pointing to the last element
- * @param i An xcb_xkb_action_iterator_t
- * @return The iterator pointing to the last element
- *
- * Set the current element in the iterator to the last element.
- * The member rem is set to 0. The member data points to the
- * last element.
- */
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_action_end
- **
- ** @param xcb_xkb_action_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_action_end (xcb_xkb_action_iterator_t i /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension
- **
- ** @param xcb_connection_t *c
- ** @param uint16_t wantedMajor
- ** @param uint16_t wantedMinor
- ** @returns xcb_xkb_use_extension_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_use_extension_cookie_t
-xcb_xkb_use_extension (xcb_connection_t *c /**< */,
- uint16_t wantedMajor /**< */,
- uint16_t wantedMinor /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint16_t wantedMajor
- ** @param uint16_t wantedMinor
- ** @returns xcb_xkb_use_extension_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_use_extension_cookie_t
-xcb_xkb_use_extension_unchecked (xcb_connection_t *c /**< */,
- uint16_t wantedMajor /**< */,
- uint16_t wantedMinor /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_use_extension_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_use_extension_reply_t * xcb_xkb_use_extension_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_use_extension_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_use_extension_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_use_extension_reply_t *
-xcb_xkb_use_extension_reply (xcb_connection_t *c /**< */,
- xcb_xkb_use_extension_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_xkb_select_events_details_serialize (void **_buffer /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- const xcb_xkb_select_events_details_t *_aux /**< */);
-
-int
-xcb_xkb_select_events_details_unpack (const void *_buffer /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- xcb_xkb_select_events_details_t *_aux /**< */);
-
-int
-xcb_xkb_select_events_details_sizeof (const void *_buffer /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_select_events_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t affectWhich
- ** @param uint16_t clear
- ** @param uint16_t selectAll
- ** @param uint16_t affectMap
- ** @param uint16_t map
- ** @param const void *details
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_select_events_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- uint16_t affectMap /**< */,
- uint16_t map /**< */,
- const void *details /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_select_events
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t affectWhich
- ** @param uint16_t clear
- ** @param uint16_t selectAll
- ** @param uint16_t affectMap
- ** @param uint16_t map
- ** @param const void *details
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_select_events (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- uint16_t affectMap /**< */,
- uint16_t map /**< */,
- const void *details /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_select_events_aux_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t affectWhich
- ** @param uint16_t clear
- ** @param uint16_t selectAll
- ** @param uint16_t affectMap
- ** @param uint16_t map
- ** @param const xcb_xkb_select_events_details_t *details
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_select_events_aux_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- uint16_t affectMap /**< */,
- uint16_t map /**< */,
- const xcb_xkb_select_events_details_t *details /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_select_events_aux
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t affectWhich
- ** @param uint16_t clear
- ** @param uint16_t selectAll
- ** @param uint16_t affectMap
- ** @param uint16_t map
- ** @param const xcb_xkb_select_events_details_t *details
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_select_events_aux (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- uint16_t affectMap /**< */,
- uint16_t map /**< */,
- const xcb_xkb_select_events_details_t *details /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_bell_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_bell_class_spec_t bellClass
- ** @param xcb_xkb_id_spec_t bellID
- ** @param int8_t percent
- ** @param uint8_t forceSound
- ** @param uint8_t eventOnly
- ** @param int16_t pitch
- ** @param int16_t duration
- ** @param xcb_atom_t name
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_bell_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_bell_class_spec_t bellClass /**< */,
- xcb_xkb_id_spec_t bellID /**< */,
- int8_t percent /**< */,
- uint8_t forceSound /**< */,
- uint8_t eventOnly /**< */,
- int16_t pitch /**< */,
- int16_t duration /**< */,
- xcb_atom_t name /**< */,
- xcb_window_t window /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_bell
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_bell_class_spec_t bellClass
- ** @param xcb_xkb_id_spec_t bellID
- ** @param int8_t percent
- ** @param uint8_t forceSound
- ** @param uint8_t eventOnly
- ** @param int16_t pitch
- ** @param int16_t duration
- ** @param xcb_atom_t name
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_bell (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_bell_class_spec_t bellClass /**< */,
- xcb_xkb_id_spec_t bellID /**< */,
- int8_t percent /**< */,
- uint8_t forceSound /**< */,
- uint8_t eventOnly /**< */,
- int16_t pitch /**< */,
- int16_t duration /**< */,
- xcb_atom_t name /**< */,
- xcb_window_t window /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_state_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_state_cookie_t
-xcb_xkb_get_state (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_state_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_state_cookie_t
-xcb_xkb_get_state_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_state_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_state_reply_t * xcb_xkb_get_state_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_state_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_state_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_state_reply_t *
-xcb_xkb_get_state_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_state_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_latch_lock_state_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t affectModLocks
- ** @param uint8_t modLocks
- ** @param uint8_t lockGroup
- ** @param uint8_t groupLock
- ** @param uint8_t affectModLatches
- ** @param uint8_t latchGroup
- ** @param uint16_t groupLatch
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_latch_lock_state_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t affectModLocks /**< */,
- uint8_t modLocks /**< */,
- uint8_t lockGroup /**< */,
- uint8_t groupLock /**< */,
- uint8_t affectModLatches /**< */,
- uint8_t latchGroup /**< */,
- uint16_t groupLatch /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_latch_lock_state
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t affectModLocks
- ** @param uint8_t modLocks
- ** @param uint8_t lockGroup
- ** @param uint8_t groupLock
- ** @param uint8_t affectModLatches
- ** @param uint8_t latchGroup
- ** @param uint16_t groupLatch
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_latch_lock_state (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t affectModLocks /**< */,
- uint8_t modLocks /**< */,
- uint8_t lockGroup /**< */,
- uint8_t groupLock /**< */,
- uint8_t affectModLatches /**< */,
- uint8_t latchGroup /**< */,
- uint16_t groupLatch /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_controls_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_controls_cookie_t
-xcb_xkb_get_controls (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_controls_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_controls_cookie_t
-xcb_xkb_get_controls_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_controls_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_controls_reply_t * xcb_xkb_get_controls_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_controls_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_controls_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_controls_reply_t *
-xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_controls_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_controls_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t affectInternalRealMods
- ** @param uint8_t internalRealMods
- ** @param uint8_t affectIgnoreLockRealMods
- ** @param uint8_t ignoreLockRealMods
- ** @param uint16_t affectInternalVirtualMods
- ** @param uint16_t internalVirtualMods
- ** @param uint16_t affectIgnoreLockVirtualMods
- ** @param uint16_t ignoreLockVirtualMods
- ** @param uint8_t mouseKeysDfltBtn
- ** @param uint8_t groupsWrap
- ** @param uint16_t accessXOptions
- ** @param uint32_t affectEnabledControls
- ** @param uint32_t enabledControls
- ** @param uint32_t changeControls
- ** @param uint16_t repeatDelay
- ** @param uint16_t repeatInterval
- ** @param uint16_t slowKeysDelay
- ** @param uint16_t debounceDelay
- ** @param uint16_t mouseKeysDelay
- ** @param uint16_t mouseKeysInterval
- ** @param uint16_t mouseKeysTimeToMax
- ** @param uint16_t mouseKeysMaxSpeed
- ** @param int16_t mouseKeysCurve
- ** @param uint16_t accessXTimeout
- ** @param uint32_t accessXTimeoutMask
- ** @param uint32_t accessXTimeoutValues
- ** @param uint16_t accessXTimeoutOptionsMask
- ** @param uint16_t accessXTimeoutOptionsValues
- ** @param const uint8_t *perKeyRepeat
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t affectInternalRealMods /**< */,
- uint8_t internalRealMods /**< */,
- uint8_t affectIgnoreLockRealMods /**< */,
- uint8_t ignoreLockRealMods /**< */,
- uint16_t affectInternalVirtualMods /**< */,
- uint16_t internalVirtualMods /**< */,
- uint16_t affectIgnoreLockVirtualMods /**< */,
- uint16_t ignoreLockVirtualMods /**< */,
- uint8_t mouseKeysDfltBtn /**< */,
- uint8_t groupsWrap /**< */,
- uint16_t accessXOptions /**< */,
- uint32_t affectEnabledControls /**< */,
- uint32_t enabledControls /**< */,
- uint32_t changeControls /**< */,
- uint16_t repeatDelay /**< */,
- uint16_t repeatInterval /**< */,
- uint16_t slowKeysDelay /**< */,
- uint16_t debounceDelay /**< */,
- uint16_t mouseKeysDelay /**< */,
- uint16_t mouseKeysInterval /**< */,
- uint16_t mouseKeysTimeToMax /**< */,
- uint16_t mouseKeysMaxSpeed /**< */,
- int16_t mouseKeysCurve /**< */,
- uint16_t accessXTimeout /**< */,
- uint32_t accessXTimeoutMask /**< */,
- uint32_t accessXTimeoutValues /**< */,
- uint16_t accessXTimeoutOptionsMask /**< */,
- uint16_t accessXTimeoutOptionsValues /**< */,
- const uint8_t *perKeyRepeat /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_controls
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t affectInternalRealMods
- ** @param uint8_t internalRealMods
- ** @param uint8_t affectIgnoreLockRealMods
- ** @param uint8_t ignoreLockRealMods
- ** @param uint16_t affectInternalVirtualMods
- ** @param uint16_t internalVirtualMods
- ** @param uint16_t affectIgnoreLockVirtualMods
- ** @param uint16_t ignoreLockVirtualMods
- ** @param uint8_t mouseKeysDfltBtn
- ** @param uint8_t groupsWrap
- ** @param uint16_t accessXOptions
- ** @param uint32_t affectEnabledControls
- ** @param uint32_t enabledControls
- ** @param uint32_t changeControls
- ** @param uint16_t repeatDelay
- ** @param uint16_t repeatInterval
- ** @param uint16_t slowKeysDelay
- ** @param uint16_t debounceDelay
- ** @param uint16_t mouseKeysDelay
- ** @param uint16_t mouseKeysInterval
- ** @param uint16_t mouseKeysTimeToMax
- ** @param uint16_t mouseKeysMaxSpeed
- ** @param int16_t mouseKeysCurve
- ** @param uint16_t accessXTimeout
- ** @param uint32_t accessXTimeoutMask
- ** @param uint32_t accessXTimeoutValues
- ** @param uint16_t accessXTimeoutOptionsMask
- ** @param uint16_t accessXTimeoutOptionsValues
- ** @param const uint8_t *perKeyRepeat
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_controls (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t affectInternalRealMods /**< */,
- uint8_t internalRealMods /**< */,
- uint8_t affectIgnoreLockRealMods /**< */,
- uint8_t ignoreLockRealMods /**< */,
- uint16_t affectInternalVirtualMods /**< */,
- uint16_t internalVirtualMods /**< */,
- uint16_t affectIgnoreLockVirtualMods /**< */,
- uint16_t ignoreLockVirtualMods /**< */,
- uint8_t mouseKeysDfltBtn /**< */,
- uint8_t groupsWrap /**< */,
- uint16_t accessXOptions /**< */,
- uint32_t affectEnabledControls /**< */,
- uint32_t enabledControls /**< */,
- uint32_t changeControls /**< */,
- uint16_t repeatDelay /**< */,
- uint16_t repeatInterval /**< */,
- uint16_t slowKeysDelay /**< */,
- uint16_t debounceDelay /**< */,
- uint16_t mouseKeysDelay /**< */,
- uint16_t mouseKeysInterval /**< */,
- uint16_t mouseKeysTimeToMax /**< */,
- uint16_t mouseKeysMaxSpeed /**< */,
- int16_t mouseKeysCurve /**< */,
- uint16_t accessXTimeout /**< */,
- uint32_t accessXTimeoutMask /**< */,
- uint32_t accessXTimeoutValues /**< */,
- uint16_t accessXTimeoutOptionsMask /**< */,
- uint16_t accessXTimeoutOptionsValues /**< */,
- const uint8_t *perKeyRepeat /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_types_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_types_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_type_iterator_t xcb_xkb_get_map_map_types_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_key_type_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_type_iterator_t
-xcb_xkb_get_map_map_types_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_syms_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_syms_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_map_map_syms_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_key_sym_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_sym_map_iterator_t
-xcb_xkb_get_map_map_syms_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_map_map_acts_rtrn_count
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_map_map_acts_rtrn_count (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_acts_rtrn_count_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_acts_rtrn_count_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_acts_rtrn_count_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_map_map_alignment_pad
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_map_map_alignment_pad (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_alignment_pad_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_alignment_pad_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_alignment_pad_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_t * xcb_xkb_get_map_map_acts_rtrn_acts
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_action_t *
- **
- *****************************************************************************/
-
-xcb_xkb_action_t *
-xcb_xkb_get_map_map_acts_rtrn_acts (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_acts_rtrn_acts_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_acts_rtrn_acts_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_iterator_t xcb_xkb_get_map_map_acts_rtrn_acts_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_action_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_action_iterator_t
-xcb_xkb_get_map_map_acts_rtrn_acts_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_t * xcb_xkb_get_map_map_behaviors_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_set_behavior_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_t *
-xcb_xkb_get_map_map_behaviors_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_behaviors_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_behaviors_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_map_map_behaviors_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_set_behavior_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_iterator_t
-xcb_xkb_get_map_map_behaviors_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_map_map_vmods_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_map_map_vmods_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_vmods_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_vmods_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_vmods_rtrn_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_vmods_rtrn_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_map_map_alignment_pad_2
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_map_map_alignment_pad_2 (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_alignment_pad_2_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_alignment_pad_2_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_2_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_alignment_pad_2_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_t * xcb_xkb_get_map_map_explicit_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_set_explicit_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_t *
-xcb_xkb_get_map_map_explicit_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_explicit_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_explicit_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_map_map_explicit_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_set_explicit_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_iterator_t
-xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_xkb_get_map_map_alignment_pad_3
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_xkb_get_map_map_alignment_pad_3 (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_alignment_pad_3_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_alignment_pad_3_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_3_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_alignment_pad_3_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_t * xcb_xkb_get_map_map_modmap_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_key_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_t *
-xcb_xkb_get_map_map_modmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_modmap_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_modmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_map_map_modmap_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_key_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_iterator_t
-xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_xkb_get_map_map_alignment_pad_4
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_xkb_get_map_map_alignment_pad_4 (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_alignment_pad_4_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_alignment_pad_4_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_4_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_alignment_pad_4_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_map_map_vmodmap_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_key_v_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_t *
-xcb_xkb_get_map_map_vmodmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_vmodmap_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_vmodmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_map_map_vmodmap_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_key_v_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_iterator_t
-xcb_xkb_get_map_map_vmodmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */);
-
-int
-xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- const xcb_xkb_get_map_map_t *_aux /**< */);
-
-int
-xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- xcb_xkb_get_map_map_t *_aux /**< */);
-
-int
-xcb_xkb_get_map_map_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t full
- ** @param uint16_t partial
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint16_t virtualMods
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @returns xcb_xkb_get_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_map_cookie_t
-xcb_xkb_get_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t full /**< */,
- uint16_t partial /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t full
- ** @param uint16_t partial
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint16_t virtualMods
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @returns xcb_xkb_get_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_map_cookie_t
-xcb_xkb_get_map_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t full /**< */,
- uint16_t partial /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_map_map_t * xcb_xkb_get_map_map
- **
- ** @param const xcb_xkb_get_map_reply_t *R
- ** @returns xcb_xkb_get_map_map_t *
- **
- *****************************************************************************/
-
-void *
-xcb_xkb_get_map_map (const xcb_xkb_get_map_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_map_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_map_reply_t * xcb_xkb_get_map_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_map_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_map_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_map_reply_t *
-xcb_xkb_get_map_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_map_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_types_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_types_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_key_type_iterator_t xcb_xkb_set_map_values_types_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_set_key_type_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_key_type_iterator_t
-xcb_xkb_set_map_values_types_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_syms_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_syms_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_set_map_values_syms_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_key_sym_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_sym_map_iterator_t
-xcb_xkb_set_map_values_syms_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_set_map_values_actions_count
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_set_map_values_actions_count (const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_actions_count_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_actions_count_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_map_values_actions_count_end
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_map_values_actions_count_end (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_t * xcb_xkb_set_map_values_actions
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_action_t *
- **
- *****************************************************************************/
-
-xcb_xkb_action_t *
-xcb_xkb_set_map_values_actions (const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_actions_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_actions_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_iterator_t xcb_xkb_set_map_values_actions_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_action_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_action_iterator_t
-xcb_xkb_set_map_values_actions_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_t * xcb_xkb_set_map_values_behaviors
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_set_behavior_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_t *
-xcb_xkb_set_map_values_behaviors (const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_behaviors_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_behaviors_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_iterator_t xcb_xkb_set_map_values_behaviors_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_set_behavior_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_iterator_t
-xcb_xkb_set_map_values_behaviors_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_set_map_values_vmods
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_set_map_values_vmods (const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_vmods_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_vmods_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_map_values_vmods_end
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_map_values_vmods_end (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_t * xcb_xkb_set_map_values_explicit
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_set_explicit_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_t *
-xcb_xkb_set_map_values_explicit (const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_explicit_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_explicit_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_iterator_t xcb_xkb_set_map_values_explicit_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_set_explicit_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_iterator_t
-xcb_xkb_set_map_values_explicit_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_t * xcb_xkb_set_map_values_modmap
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_key_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_t *
-xcb_xkb_set_map_values_modmap (const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_modmap_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_modmap_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_set_map_values_modmap_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_key_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_iterator_t
-xcb_xkb_set_map_values_modmap_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_t * xcb_xkb_set_map_values_vmodmap
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_key_v_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_t *
-xcb_xkb_set_map_values_vmodmap (const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_vmodmap_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_vmodmap_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_set_map_values_vmodmap_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_key_v_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_iterator_t
-xcb_xkb_set_map_values_vmodmap_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */);
-
-int
-xcb_xkb_set_map_values_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- const xcb_xkb_set_map_values_t *_aux /**< */);
-
-int
-xcb_xkb_set_map_values_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- xcb_xkb_set_map_values_t *_aux /**< */);
-
-int
-xcb_xkb_set_map_values_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_map_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t present
- ** @param uint16_t flags
- ** @param xcb_keycode_t minKeyCode
- ** @param xcb_keycode_t maxKeyCode
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param uint16_t totalSyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param uint16_t totalActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint8_t totalKeyBehaviors
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param uint8_t totalKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param uint8_t totalModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @param uint8_t totalVModMapKeys
- ** @param uint16_t virtualMods
- ** @param const void *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_map_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t present /**< */,
- uint16_t flags /**< */,
- xcb_keycode_t minKeyCode /**< */,
- xcb_keycode_t maxKeyCode /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- uint16_t totalSyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint8_t totalKeyBehaviors /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- uint8_t totalKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- uint8_t totalModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t virtualMods /**< */,
- const void *values /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t present
- ** @param uint16_t flags
- ** @param xcb_keycode_t minKeyCode
- ** @param xcb_keycode_t maxKeyCode
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param uint16_t totalSyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param uint16_t totalActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint8_t totalKeyBehaviors
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param uint8_t totalKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param uint8_t totalModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @param uint8_t totalVModMapKeys
- ** @param uint16_t virtualMods
- ** @param const void *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t present /**< */,
- uint16_t flags /**< */,
- xcb_keycode_t minKeyCode /**< */,
- xcb_keycode_t maxKeyCode /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- uint16_t totalSyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint8_t totalKeyBehaviors /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- uint8_t totalKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- uint8_t totalModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t virtualMods /**< */,
- const void *values /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_map_aux_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t present
- ** @param uint16_t flags
- ** @param xcb_keycode_t minKeyCode
- ** @param xcb_keycode_t maxKeyCode
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param uint16_t totalSyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param uint16_t totalActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint8_t totalKeyBehaviors
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param uint8_t totalKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param uint8_t totalModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @param uint8_t totalVModMapKeys
- ** @param uint16_t virtualMods
- ** @param const xcb_xkb_set_map_values_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_map_aux_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t present /**< */,
- uint16_t flags /**< */,
- xcb_keycode_t minKeyCode /**< */,
- xcb_keycode_t maxKeyCode /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- uint16_t totalSyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint8_t totalKeyBehaviors /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- uint8_t totalKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- uint8_t totalModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t virtualMods /**< */,
- const xcb_xkb_set_map_values_t *values /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_map_aux
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t present
- ** @param uint16_t flags
- ** @param xcb_keycode_t minKeyCode
- ** @param xcb_keycode_t maxKeyCode
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param uint16_t totalSyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param uint16_t totalActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint8_t totalKeyBehaviors
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param uint8_t totalKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param uint8_t totalModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @param uint8_t totalVModMapKeys
- ** @param uint16_t virtualMods
- ** @param const xcb_xkb_set_map_values_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_map_aux (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t present /**< */,
- uint16_t flags /**< */,
- xcb_keycode_t minKeyCode /**< */,
- xcb_keycode_t maxKeyCode /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- uint16_t totalSyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint8_t totalKeyBehaviors /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- uint8_t totalKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- uint8_t totalModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t virtualMods /**< */,
- const xcb_xkb_set_map_values_t *values /**< */);
-
-int
-xcb_xkb_get_compat_map_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t groups
- ** @param uint8_t getAllSI
- ** @param uint16_t firstSI
- ** @param uint16_t nSI
- ** @returns xcb_xkb_get_compat_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_compat_map_cookie_t
-xcb_xkb_get_compat_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t groups /**< */,
- uint8_t getAllSI /**< */,
- uint16_t firstSI /**< */,
- uint16_t nSI /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t groups
- ** @param uint8_t getAllSI
- ** @param uint16_t firstSI
- ** @param uint16_t nSI
- ** @returns xcb_xkb_get_compat_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_compat_map_cookie_t
-xcb_xkb_get_compat_map_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t groups /**< */,
- uint8_t getAllSI /**< */,
- uint16_t firstSI /**< */,
- uint16_t nSI /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_sym_interpret_t * xcb_xkb_get_compat_map_si_rtrn
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_xkb_sym_interpret_t *
- **
- *****************************************************************************/
-
-xcb_xkb_sym_interpret_t *
-xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_compat_map_si_rtrn_length
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_compat_map_si_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_compat_map_si_rtrn_iterator
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_xkb_sym_interpret_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_sym_interpret_iterator_t
-xcb_xkb_get_compat_map_si_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_t * xcb_xkb_get_compat_map_group_rtrn
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_xkb_mod_def_t *
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_t *
-xcb_xkb_get_compat_map_group_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_compat_map_group_rtrn_length
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_compat_map_group_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_compat_map_group_rtrn_iterator
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_xkb_mod_def_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_iterator_t
-xcb_xkb_get_compat_map_group_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_compat_map_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_compat_map_reply_t * xcb_xkb_get_compat_map_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_compat_map_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_compat_map_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_compat_map_reply_t *
-xcb_xkb_get_compat_map_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_compat_map_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_xkb_set_compat_map_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_compat_map_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t recomputeActions
- ** @param uint8_t truncateSI
- ** @param uint8_t groups
- ** @param uint16_t firstSI
- ** @param uint16_t nSI
- ** @param const xcb_xkb_sym_interpret_t *si
- ** @param const xcb_xkb_mod_def_t *groupMaps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_compat_map_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t recomputeActions /**< */,
- uint8_t truncateSI /**< */,
- uint8_t groups /**< */,
- uint16_t firstSI /**< */,
- uint16_t nSI /**< */,
- const xcb_xkb_sym_interpret_t *si /**< */,
- const xcb_xkb_mod_def_t *groupMaps /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_compat_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t recomputeActions
- ** @param uint8_t truncateSI
- ** @param uint8_t groups
- ** @param uint16_t firstSI
- ** @param uint16_t nSI
- ** @param const xcb_xkb_sym_interpret_t *si
- ** @param const xcb_xkb_mod_def_t *groupMaps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_compat_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t recomputeActions /**< */,
- uint8_t truncateSI /**< */,
- uint8_t groups /**< */,
- uint16_t firstSI /**< */,
- uint16_t nSI /**< */,
- const xcb_xkb_sym_interpret_t *si /**< */,
- const xcb_xkb_mod_def_t *groupMaps /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_indicator_state_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_state_cookie_t
-xcb_xkb_get_indicator_state (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_indicator_state_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_state_cookie_t
-xcb_xkb_get_indicator_state_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_indicator_state_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_state_reply_t * xcb_xkb_get_indicator_state_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_indicator_state_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_indicator_state_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_state_reply_t *
-xcb_xkb_get_indicator_state_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_indicator_state_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_xkb_get_indicator_map_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @returns xcb_xkb_get_indicator_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_map_cookie_t
-xcb_xkb_get_indicator_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @returns xcb_xkb_get_indicator_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_map_cookie_t
-xcb_xkb_get_indicator_map_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_t * xcb_xkb_get_indicator_map_maps
- **
- ** @param const xcb_xkb_get_indicator_map_reply_t *R
- ** @returns xcb_xkb_indicator_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_t *
-xcb_xkb_get_indicator_map_maps (const xcb_xkb_get_indicator_map_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_indicator_map_maps_length
- **
- ** @param const xcb_xkb_get_indicator_map_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_indicator_map_maps_length (const xcb_xkb_get_indicator_map_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_indicator_map_maps_iterator
- **
- ** @param const xcb_xkb_get_indicator_map_reply_t *R
- ** @returns xcb_xkb_indicator_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_iterator_t
-xcb_xkb_get_indicator_map_maps_iterator (const xcb_xkb_get_indicator_map_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_indicator_map_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_map_reply_t * xcb_xkb_get_indicator_map_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_indicator_map_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_indicator_map_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_map_reply_t *
-xcb_xkb_get_indicator_map_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_indicator_map_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_xkb_set_indicator_map_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_indicator_map_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @param const xcb_xkb_indicator_map_t *maps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_indicator_map_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */,
- const xcb_xkb_indicator_map_t *maps /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_indicator_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @param const xcb_xkb_indicator_map_t *maps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_indicator_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */,
- const xcb_xkb_indicator_map_t *maps /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @param xcb_atom_t indicator
- ** @returns xcb_xkb_get_named_indicator_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_named_indicator_cookie_t
-xcb_xkb_get_named_indicator (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */,
- xcb_atom_t indicator /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @param xcb_atom_t indicator
- ** @returns xcb_xkb_get_named_indicator_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_named_indicator_cookie_t
-xcb_xkb_get_named_indicator_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */,
- xcb_atom_t indicator /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_named_indicator_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_named_indicator_reply_t * xcb_xkb_get_named_indicator_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_named_indicator_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_named_indicator_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_named_indicator_reply_t *
-xcb_xkb_get_named_indicator_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_named_indicator_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_named_indicator_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @param xcb_atom_t indicator
- ** @param uint8_t setState
- ** @param uint8_t on
- ** @param uint8_t setMap
- ** @param uint8_t createMap
- ** @param uint8_t map_flags
- ** @param uint8_t map_whichGroups
- ** @param uint8_t map_groups
- ** @param uint8_t map_whichMods
- ** @param uint8_t map_realMods
- ** @param uint16_t map_vmods
- ** @param uint32_t map_ctrls
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_named_indicator_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */,
- xcb_atom_t indicator /**< */,
- uint8_t setState /**< */,
- uint8_t on /**< */,
- uint8_t setMap /**< */,
- uint8_t createMap /**< */,
- uint8_t map_flags /**< */,
- uint8_t map_whichGroups /**< */,
- uint8_t map_groups /**< */,
- uint8_t map_whichMods /**< */,
- uint8_t map_realMods /**< */,
- uint16_t map_vmods /**< */,
- uint32_t map_ctrls /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_named_indicator
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @param xcb_atom_t indicator
- ** @param uint8_t setState
- ** @param uint8_t on
- ** @param uint8_t setMap
- ** @param uint8_t createMap
- ** @param uint8_t map_flags
- ** @param uint8_t map_whichGroups
- ** @param uint8_t map_groups
- ** @param uint8_t map_whichMods
- ** @param uint8_t map_realMods
- ** @param uint16_t map_vmods
- ** @param uint32_t map_ctrls
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_named_indicator (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */,
- xcb_atom_t indicator /**< */,
- uint8_t setState /**< */,
- uint8_t on /**< */,
- uint8_t setMap /**< */,
- uint8_t createMap /**< */,
- uint8_t map_flags /**< */,
- uint8_t map_whichGroups /**< */,
- uint8_t map_groups /**< */,
- uint8_t map_whichMods /**< */,
- uint8_t map_realMods /**< */,
- uint16_t map_vmods /**< */,
- uint32_t map_ctrls /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_type_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_type_names (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_type_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_type_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_type_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_type_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_names_value_list_n_levels_per_type
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_names_value_list_n_levels_per_type (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_n_levels_per_type_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_n_levels_per_type_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_n_levels_per_type_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_names_value_list_alignment_pad
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_names_value_list_alignment_pad (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_alignment_pad_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_alignment_pad_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_alignment_pad_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_alignment_pad_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_kt_level_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_kt_level_names (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_kt_level_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_kt_level_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_kt_level_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_kt_level_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_indicator_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_indicator_names (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_indicator_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_indicator_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_indicator_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_indicator_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_virtual_mod_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_virtual_mod_names (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_virtual_mod_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_virtual_mod_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_virtual_mod_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_virtual_mod_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_groups
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_groups (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_groups_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_groups_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_groups_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_groups_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_t * xcb_xkb_get_names_value_list_key_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_xkb_key_name_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_t *
-xcb_xkb_get_names_value_list_key_names (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_key_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_key_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_iterator_t xcb_xkb_get_names_value_list_key_names_iterator
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_xkb_key_name_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_iterator_t
-xcb_xkb_get_names_value_list_key_names_iterator (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_t * xcb_xkb_get_names_value_list_key_aliases
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_xkb_key_alias_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_t *
-xcb_xkb_get_names_value_list_key_aliases (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_key_aliases_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_key_aliases_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_names_value_list_key_aliases_iterator
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_xkb_key_alias_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_iterator_t
-xcb_xkb_get_names_value_list_key_aliases_iterator (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_radio_group_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_radio_group_names (const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_radio_group_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_radio_group_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_radio_group_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_radio_group_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */);
-
-int
-xcb_xkb_get_names_value_list_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- const xcb_xkb_get_names_value_list_t *_aux /**< */);
-
-int
-xcb_xkb_get_names_value_list_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- xcb_xkb_get_names_value_list_t *_aux /**< */);
-
-int
-xcb_xkb_get_names_value_list_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @returns xcb_xkb_get_names_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_names_cookie_t
-xcb_xkb_get_names (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @returns xcb_xkb_get_names_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_names_cookie_t
-xcb_xkb_get_names_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_names_value_list_t * xcb_xkb_get_names_value_list
- **
- ** @param const xcb_xkb_get_names_reply_t *R
- ** @returns xcb_xkb_get_names_value_list_t *
- **
- *****************************************************************************/
-
-void *
-xcb_xkb_get_names_value_list (const xcb_xkb_get_names_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_names_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_names_reply_t * xcb_xkb_get_names_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_names_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_names_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_names_reply_t *
-xcb_xkb_get_names_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_names_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_type_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_type_names (const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_type_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_type_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_type_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_type_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_set_names_values_n_levels_per_type
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_set_names_values_n_levels_per_type (const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_n_levels_per_type_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_n_levels_per_type_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_n_levels_per_type_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_n_levels_per_type_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_kt_level_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_kt_level_names (const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_kt_level_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_kt_level_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_kt_level_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_kt_level_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_indicator_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_indicator_names (const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_indicator_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_indicator_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_indicator_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_indicator_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_virtual_mod_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_virtual_mod_names (const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_virtual_mod_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_virtual_mod_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_virtual_mod_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_virtual_mod_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_groups
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_groups (const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_groups_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_groups_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_groups_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_groups_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_t * xcb_xkb_set_names_values_key_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_xkb_key_name_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_t *
-xcb_xkb_set_names_values_key_names (const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_key_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_key_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_iterator_t xcb_xkb_set_names_values_key_names_iterator
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_xkb_key_name_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_iterator_t
-xcb_xkb_set_names_values_key_names_iterator (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_t * xcb_xkb_set_names_values_key_aliases
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_xkb_key_alias_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_t *
-xcb_xkb_set_names_values_key_aliases (const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_key_aliases_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_key_aliases_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_iterator_t xcb_xkb_set_names_values_key_aliases_iterator
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_xkb_key_alias_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_iterator_t
-xcb_xkb_set_names_values_key_aliases_iterator (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_radio_group_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_radio_group_names (const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_radio_group_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_radio_group_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_radio_group_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_radio_group_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */);
-
-int
-xcb_xkb_set_names_values_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- const xcb_xkb_set_names_values_t *_aux /**< */);
-
-int
-xcb_xkb_set_names_values_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- xcb_xkb_set_names_values_t *_aux /**< */);
-
-int
-xcb_xkb_set_names_values_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_names_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t virtualMods
- ** @param uint32_t which
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param uint8_t firstKTLevelt
- ** @param uint8_t nKTLevels
- ** @param uint32_t indicators
- ** @param uint8_t groupNames
- ** @param uint8_t nRadioGroups
- ** @param xcb_keycode_t firstKey
- ** @param uint8_t nKeys
- ** @param uint8_t nKeyAliases
- ** @param uint16_t totalKTLevelNames
- ** @param const void *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_names_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t virtualMods /**< */,
- uint32_t which /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- uint8_t firstKTLevelt /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint8_t groupNames /**< */,
- uint8_t nRadioGroups /**< */,
- xcb_keycode_t firstKey /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint16_t totalKTLevelNames /**< */,
- const void *values /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_names
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t virtualMods
- ** @param uint32_t which
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param uint8_t firstKTLevelt
- ** @param uint8_t nKTLevels
- ** @param uint32_t indicators
- ** @param uint8_t groupNames
- ** @param uint8_t nRadioGroups
- ** @param xcb_keycode_t firstKey
- ** @param uint8_t nKeys
- ** @param uint8_t nKeyAliases
- ** @param uint16_t totalKTLevelNames
- ** @param const void *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_names (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t virtualMods /**< */,
- uint32_t which /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- uint8_t firstKTLevelt /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint8_t groupNames /**< */,
- uint8_t nRadioGroups /**< */,
- xcb_keycode_t firstKey /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint16_t totalKTLevelNames /**< */,
- const void *values /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_names_aux_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t virtualMods
- ** @param uint32_t which
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param uint8_t firstKTLevelt
- ** @param uint8_t nKTLevels
- ** @param uint32_t indicators
- ** @param uint8_t groupNames
- ** @param uint8_t nRadioGroups
- ** @param xcb_keycode_t firstKey
- ** @param uint8_t nKeys
- ** @param uint8_t nKeyAliases
- ** @param uint16_t totalKTLevelNames
- ** @param const xcb_xkb_set_names_values_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_names_aux_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t virtualMods /**< */,
- uint32_t which /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- uint8_t firstKTLevelt /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint8_t groupNames /**< */,
- uint8_t nRadioGroups /**< */,
- xcb_keycode_t firstKey /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint16_t totalKTLevelNames /**< */,
- const xcb_xkb_set_names_values_t *values /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_names_aux
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t virtualMods
- ** @param uint32_t which
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param uint8_t firstKTLevelt
- ** @param uint8_t nKTLevels
- ** @param uint32_t indicators
- ** @param uint8_t groupNames
- ** @param uint8_t nRadioGroups
- ** @param xcb_keycode_t firstKey
- ** @param uint8_t nKeys
- ** @param uint8_t nKeyAliases
- ** @param uint16_t totalKTLevelNames
- ** @param const xcb_xkb_set_names_values_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_names_aux (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t virtualMods /**< */,
- uint32_t which /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- uint8_t firstKTLevelt /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint8_t groupNames /**< */,
- uint8_t nRadioGroups /**< */,
- xcb_keycode_t firstKey /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint16_t totalKTLevelNames /**< */,
- const xcb_xkb_set_names_values_t *values /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t change
- ** @param uint32_t value
- ** @param uint32_t ctrlsToChange
- ** @param uint32_t autoCtrls
- ** @param uint32_t autoCtrlsValues
- ** @returns xcb_xkb_per_client_flags_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_per_client_flags_cookie_t
-xcb_xkb_per_client_flags (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t change /**< */,
- uint32_t value /**< */,
- uint32_t ctrlsToChange /**< */,
- uint32_t autoCtrls /**< */,
- uint32_t autoCtrlsValues /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t change
- ** @param uint32_t value
- ** @param uint32_t ctrlsToChange
- ** @param uint32_t autoCtrls
- ** @param uint32_t autoCtrlsValues
- ** @returns xcb_xkb_per_client_flags_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_per_client_flags_cookie_t
-xcb_xkb_per_client_flags_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t change /**< */,
- uint32_t value /**< */,
- uint32_t ctrlsToChange /**< */,
- uint32_t autoCtrls /**< */,
- uint32_t autoCtrlsValues /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_per_client_flags_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_per_client_flags_reply_t * xcb_xkb_per_client_flags_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_per_client_flags_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_per_client_flags_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_per_client_flags_reply_t *
-xcb_xkb_per_client_flags_reply (xcb_connection_t *c /**< */,
- xcb_xkb_per_client_flags_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_xkb_list_components_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t maxNames
- ** @returns xcb_xkb_list_components_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_list_components_cookie_t
-xcb_xkb_list_components (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t maxNames /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t maxNames
- ** @returns xcb_xkb_list_components_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_list_components_cookie_t
-xcb_xkb_list_components_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t maxNames /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_keymaps_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_keymaps_length (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keymaps_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_keymaps_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_keycodes_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_keycodes_length (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keycodes_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_keycodes_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_types_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_types_length (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_types_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_types_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_compat_maps_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_compat_maps_length (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_compat_maps_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_compat_maps_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_symbols_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_symbols_length (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_symbols_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_symbols_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_geometries_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_geometries_length (const xcb_xkb_list_components_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_geometries_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_geometries_iterator (const xcb_xkb_list_components_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_list_components_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_list_components_reply_t * xcb_xkb_list_components_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_list_components_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_list_components_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_list_components_reply_t *
-xcb_xkb_list_components_reply (xcb_connection_t *c /**< */,
- xcb_xkb_list_components_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_key_type_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_type_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_key_sym_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_sym_map_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_action_t *
- **
- *****************************************************************************/
-
-xcb_xkb_action_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_action_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_action_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_set_behavior_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_set_behavior_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_set_explicit_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_set_explicit_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_key_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_key_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_key_v_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_key_v_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- const xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */);
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */);
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_key_name_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_xkb_key_name_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_key_alias_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_xkb_key_alias_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint16_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */);
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint16_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */);
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint16_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_sym_interpret_t * xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_sym_interpret_t *
- **
- *****************************************************************************/
-
-xcb_xkb_sym_interpret_t *
-xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_sym_interpret_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_sym_interpret_iterator_t
-xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_t * xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_mod_def_t *
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_t *
-xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_mod_def_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_iterator_t
-xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_t * xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_indicator_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_t *
-xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_indicator_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_iterator_t
-xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_counted_string_16_t * xcb_xkb_get_kbd_by_name_replies_geometry_label_font
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_counted_string_16_t *
- **
- *****************************************************************************/
-
-xcb_xkb_counted_string_16_t *
-xcb_xkb_get_kbd_by_name_replies_geometry_label_font (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */);
-
-int
-xcb_xkb_get_kbd_by_name_replies_serialize (void **_buffer /**< */,
- uint16_t reported /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */);
-
-int
-xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buffer /**< */,
- uint16_t reported /**< */,
- xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */);
-
-int
-xcb_xkb_get_kbd_by_name_replies_sizeof (const void *_buffer /**< */,
- uint16_t reported /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t need
- ** @param uint16_t want
- ** @param uint8_t load
- ** @returns xcb_xkb_get_kbd_by_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_cookie_t
-xcb_xkb_get_kbd_by_name (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t need /**< */,
- uint16_t want /**< */,
- uint8_t load /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t need
- ** @param uint16_t want
- ** @param uint8_t load
- ** @returns xcb_xkb_get_kbd_by_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_cookie_t
-xcb_xkb_get_kbd_by_name_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t need /**< */,
- uint16_t want /**< */,
- uint8_t load /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_replies_t * xcb_xkb_get_kbd_by_name_replies
- **
- ** @param const xcb_xkb_get_kbd_by_name_reply_t *R
- ** @returns xcb_xkb_get_kbd_by_name_replies_t *
- **
- *****************************************************************************/
-
-void *
-xcb_xkb_get_kbd_by_name_replies (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_kbd_by_name_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_reply_t * xcb_xkb_get_kbd_by_name_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_kbd_by_name_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_kbd_by_name_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_reply_t *
-xcb_xkb_get_kbd_by_name_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_kbd_by_name_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_xkb_get_device_info_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t wanted
- ** @param uint8_t allButtons
- ** @param uint8_t firstButton
- ** @param uint8_t nButtons
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @returns xcb_xkb_get_device_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_device_info_cookie_t
-xcb_xkb_get_device_info (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t wanted /**< */,
- uint8_t allButtons /**< */,
- uint8_t firstButton /**< */,
- uint8_t nButtons /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t wanted
- ** @param uint8_t allButtons
- ** @param uint8_t firstButton
- ** @param uint8_t nButtons
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @returns xcb_xkb_get_device_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_device_info_cookie_t
-xcb_xkb_get_device_info_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t wanted /**< */,
- uint8_t allButtons /**< */,
- uint8_t firstButton /**< */,
- uint8_t nButtons /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_string8_t * xcb_xkb_get_device_info_name
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_xkb_string8_t *
- **
- *****************************************************************************/
-
-xcb_xkb_string8_t *
-xcb_xkb_get_device_info_name (const xcb_xkb_get_device_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_device_info_name_length
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_device_info_name_length (const xcb_xkb_get_device_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_device_info_name_end
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_device_info_name_end (const xcb_xkb_get_device_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_t * xcb_xkb_get_device_info_btn_actions
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_xkb_action_t *
- **
- *****************************************************************************/
-
-xcb_xkb_action_t *
-xcb_xkb_get_device_info_btn_actions (const xcb_xkb_get_device_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_device_info_btn_actions_length
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_device_info_btn_actions_length (const xcb_xkb_get_device_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_iterator_t xcb_xkb_get_device_info_btn_actions_iterator
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_xkb_action_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_action_iterator_t
-xcb_xkb_get_device_info_btn_actions_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_device_info_leds_length
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_device_info_leds_length (const xcb_xkb_get_device_info_reply_t *R /**< */);
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_device_led_info_iterator_t xcb_xkb_get_device_info_leds_iterator
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_xkb_device_led_info_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_device_led_info_iterator_t
-xcb_xkb_get_device_info_leds_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_get_device_info_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_device_info_reply_t * xcb_xkb_get_device_info_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_device_info_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_device_info_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_device_info_reply_t *
-xcb_xkb_get_device_info_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_device_info_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-int
-xcb_xkb_set_device_info_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will not cause
- * a reply to be generated. Any returned error will be
- * saved for handling by xcb_request_check().
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_device_info_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t firstBtn
- ** @param uint8_t nBtns
- ** @param uint16_t change
- ** @param uint16_t nDeviceLedFBs
- ** @param const xcb_xkb_action_t *btnActions
- ** @param const xcb_xkb_device_led_info_t *leds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_device_info_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t firstBtn /**< */,
- uint8_t nBtns /**< */,
- uint16_t change /**< */,
- uint16_t nDeviceLedFBs /**< */,
- const xcb_xkb_action_t *btnActions /**< */,
- const xcb_xkb_device_led_info_t *leds /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_device_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t firstBtn
- ** @param uint8_t nBtns
- ** @param uint16_t change
- ** @param uint16_t nDeviceLedFBs
- ** @param const xcb_xkb_action_t *btnActions
- ** @param const xcb_xkb_device_led_info_t *leds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_device_info (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t firstBtn /**< */,
- uint8_t nBtns /**< */,
- uint16_t change /**< */,
- uint16_t nDeviceLedFBs /**< */,
- const xcb_xkb_action_t *btnActions /**< */,
- const xcb_xkb_device_led_info_t *leds /**< */);
-
-int
-xcb_xkb_set_debugging_flags_sizeof (const void *_buffer /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags
- **
- ** @param xcb_connection_t *c
- ** @param uint16_t msgLength
- ** @param uint32_t affectFlags
- ** @param uint32_t flags
- ** @param uint32_t affectCtrls
- ** @param uint32_t ctrls
- ** @param const xcb_xkb_string8_t *message
- ** @returns xcb_xkb_set_debugging_flags_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_debugging_flags_cookie_t
-xcb_xkb_set_debugging_flags (xcb_connection_t *c /**< */,
- uint16_t msgLength /**< */,
- uint32_t affectFlags /**< */,
- uint32_t flags /**< */,
- uint32_t affectCtrls /**< */,
- uint32_t ctrls /**< */,
- const xcb_xkb_string8_t *message /**< */);
-
-/**
- *
- * @param c The connection
- * @return A cookie
- *
- * Delivers a request to the X server.
- *
- * This form can be used only if the request will cause
- * a reply to be generated. Any returned error will be
- * placed in the event queue.
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint16_t msgLength
- ** @param uint32_t affectFlags
- ** @param uint32_t flags
- ** @param uint32_t affectCtrls
- ** @param uint32_t ctrls
- ** @param const xcb_xkb_string8_t *message
- ** @returns xcb_xkb_set_debugging_flags_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_debugging_flags_cookie_t
-xcb_xkb_set_debugging_flags_unchecked (xcb_connection_t *c /**< */,
- uint16_t msgLength /**< */,
- uint32_t affectFlags /**< */,
- uint32_t flags /**< */,
- uint32_t affectCtrls /**< */,
- uint32_t ctrls /**< */,
- const xcb_xkb_string8_t *message /**< */);
-
-/**
- * Return the reply
- * @param c The connection
- * @param cookie The cookie
- * @param e The xcb_generic_error_t supplied
- *
- * Returns the reply of the request asked by
- *
- * The parameter @p e supplied to this function must be NULL if
- * xcb_xkb_set_debugging_flags_unchecked(). is used.
- * Otherwise, it stores the error if any.
- *
- * The returned value must be freed by the caller using free().
- */
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_debugging_flags_reply_t * xcb_xkb_set_debugging_flags_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_set_debugging_flags_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_set_debugging_flags_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_debugging_flags_reply_t *
-xcb_xkb_set_debugging_flags_reply (xcb_connection_t *c /**< */,
- xcb_xkb_set_debugging_flags_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/**
- * @}
- */
diff --git a/src/3rdparty/xcb/libxcb/fix_compiler_warning_on_32bit_systems.patch b/src/3rdparty/xcb/libxcb/fix_compiler_warning_on_32bit_systems.patch
deleted file mode 100644
index 240c20d2ac..0000000000
--- a/src/3rdparty/xcb/libxcb/fix_compiler_warning_on_32bit_systems.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/3rdparty/xcb/include/xcb/xkb.h b/src/3rdparty/xcb/include/xcb/xkb.h
-index 44b0a8d..0180ec8 100644
---- a/src/3rdparty/xcb/include/xcb/xkb.h
-+++ b/src/3rdparty/xcb/include/xcb/xkb.h
-@@ -114,8 +114,8 @@ typedef enum xcb_xkb_control_t {
- XCB_XKB_CONTROL_GROUPS_WRAP = 134217728,
- XCB_XKB_CONTROL_INTERNAL_MODS = 268435456,
- XCB_XKB_CONTROL_IGNORE_LOCK_MODS = 536870912,
-- XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824,
-- XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648
-+ XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824u,
-+ XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648u
- } xcb_xkb_control_t;
-
- typedef enum xcb_xkb_axfb_opt_t {
diff --git a/src/3rdparty/xcb/libxcb/fixup-xinput-c.patch b/src/3rdparty/xcb/libxcb/fixup-xinput-c.patch
new file mode 100644
index 0000000000..9ddaf6c59a
--- /dev/null
+++ b/src/3rdparty/xcb/libxcb/fixup-xinput-c.patch
@@ -0,0 +1,19 @@
+diff --git a/src/3rdparty/xcb/libxcb/xinput.c b/src/3rdparty/xcb/libxcb/xinput.c
+index 0edfde656c..d4e3c250bc 100644
+--- a/src/3rdparty/xcb/libxcb/xinput.c
++++ b/src/3rdparty/xcb/libxcb/xinput.c
+@@ -10,11 +10,11 @@
+ #include <string.h>
+ #include <assert.h>
+ #include <stddef.h> /* for offsetof() */
+-#include "xcbext.h"
+-#include "xinput.h"
++#include <xcb/xcbext.h>
++#include <xcb/xinput.h>
+
+ #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
+-#include "xfixes.h"
++#include <xcb/xfixes.h>
+
+ xcb_extension_t xcb_input_id = { "XInputExtension", 0 };
+
diff --git a/src/3rdparty/xcb/libxcb/randr.c b/src/3rdparty/xcb/libxcb/randr.c
deleted file mode 100644
index 0232af802f..0000000000
--- a/src/3rdparty/xcb/libxcb/randr.c
+++ /dev/null
@@ -1,5640 +0,0 @@
-/*
- * This file generated automatically from randr.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 "randr.h"
-
-#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
-#include "xproto.h"
-#include "render.h"
-
-xcb_extension_t xcb_randr_id = { "RANDR", 0 };
-
-
-/*****************************************************************************
- **
- ** void xcb_randr_mode_next
- **
- ** @param xcb_randr_mode_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_mode_next (xcb_randr_mode_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_randr_mode_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_mode_end
- **
- ** @param xcb_randr_mode_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_mode_end (xcb_randr_mode_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_randr_crtc_next
- **
- ** @param xcb_randr_crtc_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_crtc_next (xcb_randr_crtc_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_randr_crtc_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_crtc_end
- **
- ** @param xcb_randr_crtc_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_crtc_end (xcb_randr_crtc_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_randr_output_next
- **
- ** @param xcb_randr_output_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_output_next (xcb_randr_output_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_randr_output_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_output_end
- **
- ** @param xcb_randr_output_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_output_end (xcb_randr_output_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_randr_screen_size_next
- **
- ** @param xcb_randr_screen_size_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_randr_screen_size_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_screen_size_end
- **
- ** @param xcb_randr_screen_size_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_screen_size_end (xcb_randr_screen_size_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_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;
-}
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_randr_refresh_rates_rates
- **
- ** @param const xcb_randr_refresh_rates_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_randr_refresh_rates_rates (const xcb_randr_refresh_rates_t *R /**< */)
-{
- return (uint16_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_refresh_rates_rates_length
- **
- ** @param const xcb_randr_refresh_rates_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_refresh_rates_rates_length (const xcb_randr_refresh_rates_t *R /**< */)
-{
- return R->nRates;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_refresh_rates_rates_end
- **
- ** @param const xcb_randr_refresh_rates_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_refresh_rates_rates_end (const xcb_randr_refresh_rates_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((uint16_t *) (R + 1)) + (R->nRates);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_randr_refresh_rates_next
- **
- ** @param xcb_randr_refresh_rates_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-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;
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_refresh_rates_end
- **
- ** @param xcb_randr_refresh_rates_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_randr_refresh_rates_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_query_version_cookie_t xcb_randr_query_version
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t major_version
- ** @param uint32_t minor_version
- ** @returns xcb_randr_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_query_version_cookie_t
-xcb_randr_query_version (xcb_connection_t *c /**< */,
- uint32_t major_version /**< */,
- uint32_t minor_version /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_query_version_cookie_t xcb_ret;
- xcb_randr_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_randr_query_version_cookie_t xcb_randr_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t major_version
- ** @param uint32_t minor_version
- ** @returns xcb_randr_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_query_version_cookie_t
-xcb_randr_query_version_unchecked (xcb_connection_t *c /**< */,
- uint32_t major_version /**< */,
- uint32_t minor_version /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_query_version_cookie_t xcb_ret;
- xcb_randr_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_randr_query_version_reply_t * xcb_randr_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_query_version_reply_t *
-xcb_randr_query_version_reply (xcb_connection_t *c /**< */,
- xcb_randr_query_version_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_timestamp_t timestamp
- ** @param xcb_timestamp_t config_timestamp
- ** @param uint16_t sizeID
- ** @param uint16_t rotation
- ** @param uint16_t rate
- ** @returns xcb_randr_set_screen_config_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_screen_config_cookie_t
-xcb_randr_set_screen_config (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_timestamp_t timestamp /**< */,
- xcb_timestamp_t config_timestamp /**< */,
- uint16_t sizeID /**< */,
- uint16_t rotation /**< */,
- uint16_t rate /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_set_screen_config_cookie_t xcb_ret;
- xcb_randr_set_screen_config_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.timestamp = timestamp;
- xcb_out.config_timestamp = config_timestamp;
- xcb_out.sizeID = sizeID;
- xcb_out.rotation = rotation;
- xcb_out.rate = rate;
- 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_randr_set_screen_config_cookie_t xcb_randr_set_screen_config_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_timestamp_t timestamp
- ** @param xcb_timestamp_t config_timestamp
- ** @param uint16_t sizeID
- ** @param uint16_t rotation
- ** @param uint16_t rate
- ** @returns xcb_randr_set_screen_config_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_screen_config_cookie_t
-xcb_randr_set_screen_config_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_timestamp_t timestamp /**< */,
- xcb_timestamp_t config_timestamp /**< */,
- uint16_t sizeID /**< */,
- uint16_t rotation /**< */,
- uint16_t rate /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_set_screen_config_cookie_t xcb_ret;
- xcb_randr_set_screen_config_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.timestamp = timestamp;
- xcb_out.config_timestamp = config_timestamp;
- xcb_out.sizeID = sizeID;
- xcb_out.rotation = rotation;
- xcb_out.rate = rate;
- 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_randr_set_screen_config_reply_t * xcb_randr_set_screen_config_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_set_screen_config_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_set_screen_config_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_set_screen_config_reply_t *
-xcb_randr_set_screen_config_reply (xcb_connection_t *c /**< */,
- xcb_randr_set_screen_config_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_set_screen_config_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_select_input_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint16_t enable
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_select_input_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint16_t enable /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SELECT_INPUT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_select_input_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.enable = enable;
- 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_randr_select_input
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint16_t enable
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_select_input (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint16_t enable /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SELECT_INPUT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_select_input_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.enable = enable;
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_info_cookie_t
-xcb_randr_get_screen_info (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_SCREEN_INFO,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_screen_info_cookie_t xcb_ret;
- xcb_randr_get_screen_info_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_randr_get_screen_info_cookie_t xcb_randr_get_screen_info_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_info_cookie_t
-xcb_randr_get_screen_info_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_SCREEN_INFO,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_screen_info_cookie_t xcb_ret;
- xcb_randr_get_screen_info_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_randr_screen_size_t * xcb_randr_get_screen_info_sizes
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns xcb_randr_screen_size_t *
- **
- *****************************************************************************/
-
-xcb_randr_screen_size_t *
-xcb_randr_get_screen_info_sizes (const xcb_randr_get_screen_info_reply_t *R /**< */)
-{
- return (xcb_randr_screen_size_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_info_sizes_length
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_info_sizes_length (const xcb_randr_get_screen_info_reply_t *R /**< */)
-{
- return R->nSizes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_screen_size_iterator_t xcb_randr_get_screen_info_sizes_iterator
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns xcb_randr_screen_size_iterator_t
- **
- *****************************************************************************/
-
-xcb_randr_screen_size_iterator_t
-xcb_randr_get_screen_info_sizes_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */)
-{
- xcb_randr_screen_size_iterator_t i;
- i.data = (xcb_randr_screen_size_t *) (R + 1);
- i.rem = R->nSizes;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_info_rates_length
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_info_rates_length (const xcb_randr_get_screen_info_reply_t *R /**< */)
-{
- return (R->nInfo - R->nSizes);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_refresh_rates_iterator_t xcb_randr_get_screen_info_rates_iterator
- **
- ** @param const xcb_randr_get_screen_info_reply_t *R
- ** @returns xcb_randr_refresh_rates_iterator_t
- **
- *****************************************************************************/
-
-xcb_randr_refresh_rates_iterator_t
-xcb_randr_get_screen_info_rates_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */)
-{
- xcb_randr_refresh_rates_iterator_t i;
- xcb_generic_iterator_t prev = xcb_randr_screen_size_end(xcb_randr_get_screen_info_sizes_iterator(R));
- i.data = (xcb_randr_refresh_rates_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_refresh_rates_t, prev.index));
- i.rem = (R->nInfo - R->nSizes);
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_info_reply_t * xcb_randr_get_screen_info_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_screen_info_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_screen_info_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_info_reply_t *
-xcb_randr_get_screen_info_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_screen_info_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_get_screen_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_size_range_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_size_range_cookie_t
-xcb_randr_get_screen_size_range (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_screen_size_range_cookie_t xcb_ret;
- xcb_randr_get_screen_size_range_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_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_size_range_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_size_range_cookie_t
-xcb_randr_get_screen_size_range_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_screen_size_range_cookie_t xcb_ret;
- xcb_randr_get_screen_size_range_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_randr_get_screen_size_range_reply_t * xcb_randr_get_screen_size_range_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_screen_size_range_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_screen_size_range_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_size_range_reply_t *
-xcb_randr_get_screen_size_range_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_screen_size_range_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_get_screen_size_range_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_screen_size_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint32_t mm_width
- ** @param uint32_t mm_height
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_screen_size_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint32_t mm_width /**< */,
- uint32_t mm_height /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_SCREEN_SIZE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_set_screen_size_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.width = width;
- xcb_out.height = height;
- xcb_out.mm_width = mm_width;
- xcb_out.mm_height = mm_height;
-
- 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_randr_set_screen_size
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint32_t mm_width
- ** @param uint32_t mm_height
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_screen_size (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint32_t mm_width /**< */,
- uint32_t mm_height /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_SCREEN_SIZE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_set_screen_size_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.width = width;
- xcb_out.height = height;
- xcb_out.mm_width = mm_width;
- xcb_out.mm_height = mm_height;
-
- 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_randr_mode_info_next
- **
- ** @param xcb_randr_mode_info_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_randr_mode_info_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_mode_info_end
- **
- ** @param xcb_randr_mode_info_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_mode_info_end (xcb_randr_mode_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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_resources_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_cookie_t
-xcb_randr_get_screen_resources (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_screen_resources_cookie_t xcb_ret;
- xcb_randr_get_screen_resources_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_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_resources_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_cookie_t
-xcb_randr_get_screen_resources_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_screen_resources_cookie_t xcb_ret;
- xcb_randr_get_screen_resources_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_randr_crtc_t * xcb_randr_get_screen_resources_crtcs
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_randr_crtc_t *
- **
- *****************************************************************************/
-
-xcb_randr_crtc_t *
-xcb_randr_get_screen_resources_crtcs (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- return (xcb_randr_crtc_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_crtcs_length
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_crtcs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- return R->num_crtcs;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_crtcs_end
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_crtcs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_output_t * xcb_randr_get_screen_resources_outputs
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_screen_resources_outputs (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_crtcs_end(R);
- return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_outputs_length
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_outputs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- return R->num_outputs;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_outputs_end
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_outputs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_screen_resources_crtcs_end(R);
- i.data = ((xcb_randr_output_t *) child.data) + (R->num_outputs);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_modes
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_randr_mode_info_t *
- **
- *****************************************************************************/
-
-xcb_randr_mode_info_t *
-xcb_randr_get_screen_resources_modes (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_outputs_end(R);
- return (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_modes_length
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_modes_length (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- return R->num_modes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_modes_iterator
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_randr_mode_info_iterator_t
- **
- *****************************************************************************/
-
-xcb_randr_mode_info_iterator_t
-xcb_randr_get_screen_resources_modes_iterator (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- xcb_randr_mode_info_iterator_t i;
- xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_outputs_end(R);
- i.data = (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index));
- i.rem = R->num_modes;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_randr_get_screen_resources_names
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_randr_get_screen_resources_names (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R));
- return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_names_length
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_names_length (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- return R->names_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_names_end
- **
- ** @param const xcb_randr_get_screen_resources_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_names_end (const xcb_randr_get_screen_resources_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R));
- i.data = ((uint8_t *) child.data) + (R->names_len);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_resources_reply_t * xcb_randr_get_screen_resources_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_screen_resources_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_screen_resources_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_reply_t *
-xcb_randr_get_screen_resources_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_screen_resources_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_timestamp_t config_timestamp
- ** @returns xcb_randr_get_output_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_info_cookie_t
-xcb_randr_get_output_info (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_timestamp_t config_timestamp /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_OUTPUT_INFO,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_output_info_cookie_t xcb_ret;
- xcb_randr_get_output_info_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.config_timestamp = config_timestamp;
-
- 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_randr_get_output_info_cookie_t xcb_randr_get_output_info_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_timestamp_t config_timestamp
- ** @returns xcb_randr_get_output_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_info_cookie_t
-xcb_randr_get_output_info_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_timestamp_t config_timestamp /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_OUTPUT_INFO,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_output_info_cookie_t xcb_ret;
- xcb_randr_get_output_info_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.config_timestamp = config_timestamp;
-
- 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_randr_crtc_t * xcb_randr_get_output_info_crtcs
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_randr_crtc_t *
- **
- *****************************************************************************/
-
-xcb_randr_crtc_t *
-xcb_randr_get_output_info_crtcs (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- return (xcb_randr_crtc_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_info_crtcs_length
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_info_crtcs_length (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- return R->num_crtcs;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_info_crtcs_end
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_info_crtcs_end (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_t * xcb_randr_get_output_info_modes
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_randr_mode_t *
- **
- *****************************************************************************/
-
-xcb_randr_mode_t *
-xcb_randr_get_output_info_modes (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_output_info_crtcs_end(R);
- return (xcb_randr_mode_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_info_modes_length
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_info_modes_length (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- return R->num_modes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_info_modes_end
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_info_modes_end (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_output_info_crtcs_end(R);
- i.data = ((xcb_randr_mode_t *) child.data) + (R->num_modes);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_output_t * xcb_randr_get_output_info_clones
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_output_info_clones (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_output_info_modes_end(R);
- return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_info_clones_length
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_info_clones_length (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- return R->num_clones;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_info_clones_end
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_info_clones_end (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_output_info_modes_end(R);
- i.data = ((xcb_randr_output_t *) child.data) + (R->num_clones);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_randr_get_output_info_name
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_randr_get_output_info_name (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_output_info_clones_end(R);
- return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_info_name_length
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_info_name_length (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- return R->name_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_info_name_end
- **
- ** @param const xcb_randr_get_output_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_info_name_end (const xcb_randr_get_output_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_output_info_clones_end(R);
- i.data = ((uint8_t *) child.data) + (R->name_len);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_info_reply_t * xcb_randr_get_output_info_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_output_info_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_output_info_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_output_info_reply_t *
-xcb_randr_get_output_info_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_output_info_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @returns xcb_randr_list_output_properties_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_list_output_properties_cookie_t
-xcb_randr_list_output_properties (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_list_output_properties_cookie_t xcb_ret;
- xcb_randr_list_output_properties_request_t xcb_out;
-
- xcb_out.output = output;
-
- 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_randr_list_output_properties_cookie_t xcb_randr_list_output_properties_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @returns xcb_randr_list_output_properties_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_list_output_properties_cookie_t
-xcb_randr_list_output_properties_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_list_output_properties_cookie_t xcb_ret;
- xcb_randr_list_output_properties_request_t xcb_out;
-
- xcb_out.output = output;
-
- 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_randr_list_output_properties_atoms
- **
- ** @param const xcb_randr_list_output_properties_reply_t *R
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_randr_list_output_properties_atoms (const xcb_randr_list_output_properties_reply_t *R /**< */)
-{
- return (xcb_atom_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_list_output_properties_atoms_length
- **
- ** @param const xcb_randr_list_output_properties_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_list_output_properties_atoms_length (const xcb_randr_list_output_properties_reply_t *R /**< */)
-{
- return R->num_atoms;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_list_output_properties_atoms_end
- **
- ** @param const xcb_randr_list_output_properties_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_list_output_properties_atoms_end (const xcb_randr_list_output_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_randr_list_output_properties_reply_t * xcb_randr_list_output_properties_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_list_output_properties_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_list_output_properties_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_list_output_properties_reply_t *
-xcb_randr_list_output_properties_reply (xcb_connection_t *c /**< */,
- xcb_randr_list_output_properties_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @returns xcb_randr_query_output_property_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_query_output_property_cookie_t
-xcb_randr_query_output_property (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_query_output_property_cookie_t xcb_ret;
- xcb_randr_query_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- 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_randr_query_output_property_cookie_t xcb_randr_query_output_property_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @returns xcb_randr_query_output_property_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_query_output_property_cookie_t
-xcb_randr_query_output_property_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_query_output_property_cookie_t xcb_ret;
- xcb_randr_query_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** int32_t * xcb_randr_query_output_property_valid_values
- **
- ** @param const xcb_randr_query_output_property_reply_t *R
- ** @returns int32_t *
- **
- *****************************************************************************/
-
-int32_t *
-xcb_randr_query_output_property_valid_values (const xcb_randr_query_output_property_reply_t *R /**< */)
-{
- return (int32_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_query_output_property_valid_values_length
- **
- ** @param const xcb_randr_query_output_property_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_query_output_property_valid_values_length (const xcb_randr_query_output_property_reply_t *R /**< */)
-{
- return R->length;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_query_output_property_valid_values_end
- **
- ** @param const xcb_randr_query_output_property_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_query_output_property_valid_values_end (const xcb_randr_query_output_property_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((int32_t *) (R + 1)) + (R->length);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_query_output_property_reply_t * xcb_randr_query_output_property_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_query_output_property_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_query_output_property_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_query_output_property_reply_t *
-xcb_randr_query_output_property_reply (xcb_connection_t *c /**< */,
- xcb_randr_query_output_property_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_configure_output_property_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param uint8_t pending
- ** @param uint8_t range
- ** @param uint32_t values_len
- ** @param const int32_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_configure_output_property_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- uint8_t pending /**< */,
- uint8_t range /**< */,
- uint32_t values_len /**< */,
- const int32_t *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_configure_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.property = property;
- xcb_out.pending = pending;
- xcb_out.range = range;
- 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;
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_configure_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param uint8_t pending
- ** @param uint8_t range
- ** @param uint32_t values_len
- ** @param const int32_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_configure_output_property (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- uint8_t pending /**< */,
- uint8_t range /**< */,
- uint32_t values_len /**< */,
- const int32_t *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_configure_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.property = property;
- xcb_out.pending = pending;
- xcb_out.range = range;
- 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;
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_change_output_property_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param xcb_atom_t type
- ** @param uint8_t format
- ** @param uint8_t mode
- ** @param uint32_t num_units
- ** @param const void *data
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_change_output_property_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- xcb_atom_t type /**< */,
- uint8_t format /**< */,
- uint8_t mode /**< */,
- uint32_t num_units /**< */,
- const void *data /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_change_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.property = property;
- xcb_out.type = type;
- xcb_out.format = format;
- xcb_out.mode = mode;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.num_units = num_units;
-
- 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;
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_change_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param xcb_atom_t type
- ** @param uint8_t format
- ** @param uint8_t mode
- ** @param uint32_t num_units
- ** @param const void *data
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_change_output_property (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- xcb_atom_t type /**< */,
- uint8_t format /**< */,
- uint8_t mode /**< */,
- uint32_t num_units /**< */,
- const void *data /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_change_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.property = property;
- xcb_out.type = type;
- xcb_out.format = format;
- xcb_out.mode = mode;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.num_units = num_units;
-
- 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;
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_delete_output_property_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_delete_output_property_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_delete_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- 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_randr_delete_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_delete_output_property (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_delete_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- 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;
-}
-
-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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param xcb_atom_t type
- ** @param uint32_t long_offset
- ** @param uint32_t long_length
- ** @param uint8_t _delete
- ** @param uint8_t pending
- ** @returns xcb_randr_get_output_property_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_property_cookie_t
-xcb_randr_get_output_property (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- xcb_atom_t type /**< */,
- uint32_t long_offset /**< */,
- uint32_t long_length /**< */,
- uint8_t _delete /**< */,
- uint8_t pending /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_output_property_cookie_t xcb_ret;
- xcb_randr_get_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.property = property;
- xcb_out.type = type;
- xcb_out.long_offset = long_offset;
- xcb_out.long_length = long_length;
- xcb_out._delete = _delete;
- xcb_out.pending = pending;
- 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_randr_get_output_property_cookie_t xcb_randr_get_output_property_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_atom_t property
- ** @param xcb_atom_t type
- ** @param uint32_t long_offset
- ** @param uint32_t long_length
- ** @param uint8_t _delete
- ** @param uint8_t pending
- ** @returns xcb_randr_get_output_property_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_property_cookie_t
-xcb_randr_get_output_property_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_atom_t property /**< */,
- xcb_atom_t type /**< */,
- uint32_t long_offset /**< */,
- uint32_t long_length /**< */,
- uint8_t _delete /**< */,
- uint8_t pending /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_output_property_cookie_t xcb_ret;
- xcb_randr_get_output_property_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.property = property;
- xcb_out.type = type;
- xcb_out.long_offset = long_offset;
- xcb_out.long_length = long_length;
- xcb_out._delete = _delete;
- xcb_out.pending = pending;
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_randr_get_output_property_data
- **
- ** @param const xcb_randr_get_output_property_reply_t *R
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_randr_get_output_property_data (const xcb_randr_get_output_property_reply_t *R /**< */)
-{
- return (uint8_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_output_property_data_length
- **
- ** @param const xcb_randr_get_output_property_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_output_property_data_length (const xcb_randr_get_output_property_reply_t *R /**< */)
-{
- return (R->num_items * (R->format / 8));
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_output_property_data_end
- **
- ** @param const xcb_randr_get_output_property_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_output_property_data_end (const xcb_randr_get_output_property_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((uint8_t *) (R + 1)) + ((R->num_items * (R->format / 8)));
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_output_property_reply_t * xcb_randr_get_output_property_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_output_property_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_output_property_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_output_property_reply_t *
-xcb_randr_get_output_property_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_output_property_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_randr_mode_info_t mode_info
- ** @param uint32_t name_len
- ** @param const char *name
- ** @returns xcb_randr_create_mode_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_create_mode_cookie_t
-xcb_randr_create_mode (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_randr_mode_info_t mode_info /**< */,
- uint32_t name_len /**< */,
- const char *name /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_CREATE_MODE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[6];
- xcb_randr_create_mode_cookie_t xcb_ret;
- xcb_randr_create_mode_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.mode_info = mode_info;
-
- 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_randr_create_mode_cookie_t xcb_randr_create_mode_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_randr_mode_info_t mode_info
- ** @param uint32_t name_len
- ** @param const char *name
- ** @returns xcb_randr_create_mode_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_create_mode_cookie_t
-xcb_randr_create_mode_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_randr_mode_info_t mode_info /**< */,
- uint32_t name_len /**< */,
- const char *name /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_CREATE_MODE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[6];
- xcb_randr_create_mode_cookie_t xcb_ret;
- xcb_randr_create_mode_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.mode_info = mode_info;
-
- 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_randr_create_mode_reply_t * xcb_randr_create_mode_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_create_mode_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_create_mode_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_create_mode_reply_t *
-xcb_randr_create_mode_reply (xcb_connection_t *c /**< */,
- xcb_randr_create_mode_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_create_mode_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_destroy_mode_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_destroy_mode_checked (xcb_connection_t *c /**< */,
- xcb_randr_mode_t mode /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_DESTROY_MODE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_destroy_mode_request_t xcb_out;
-
- xcb_out.mode = mode;
-
- 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_randr_destroy_mode
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_destroy_mode (xcb_connection_t *c /**< */,
- xcb_randr_mode_t mode /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_DESTROY_MODE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_destroy_mode_request_t xcb_out;
-
- xcb_out.mode = mode;
-
- 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_randr_add_output_mode_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_add_output_mode_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_randr_mode_t mode /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_add_output_mode_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.mode = mode;
-
- 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_randr_add_output_mode
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_add_output_mode (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_randr_mode_t mode /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_add_output_mode_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.mode = mode;
-
- 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_randr_delete_output_mode_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_delete_output_mode_checked (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_randr_mode_t mode /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_delete_output_mode_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.mode = mode;
-
- 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_randr_delete_output_mode
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_output_t output
- ** @param xcb_randr_mode_t mode
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_delete_output_mode (xcb_connection_t *c /**< */,
- xcb_randr_output_t output /**< */,
- xcb_randr_mode_t mode /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_delete_output_mode_request_t xcb_out;
-
- xcb_out.output = output;
- xcb_out.mode = mode;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t config_timestamp
- ** @returns xcb_randr_get_crtc_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_info_cookie_t
-xcb_randr_get_crtc_info (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t config_timestamp /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_CRTC_INFO,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_crtc_info_cookie_t xcb_ret;
- xcb_randr_get_crtc_info_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.config_timestamp = config_timestamp;
-
- 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_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t config_timestamp
- ** @returns xcb_randr_get_crtc_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_info_cookie_t
-xcb_randr_get_crtc_info_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t config_timestamp /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_CRTC_INFO,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_crtc_info_cookie_t xcb_ret;
- xcb_randr_get_crtc_info_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.config_timestamp = config_timestamp;
-
- 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_randr_output_t * xcb_randr_get_crtc_info_outputs
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_crtc_info_outputs (const xcb_randr_get_crtc_info_reply_t *R /**< */)
-{
- return (xcb_randr_output_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_info_outputs_length
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_info_outputs_length (const xcb_randr_get_crtc_info_reply_t *R /**< */)
-{
- return R->num_outputs;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_info_outputs_end
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_info_outputs_end (const xcb_randr_get_crtc_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((xcb_randr_output_t *) (R + 1)) + (R->num_outputs);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_output_t * xcb_randr_get_crtc_info_possible
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_crtc_info_possible (const xcb_randr_get_crtc_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_crtc_info_outputs_end(R);
- return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_info_possible_length
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_info_possible_length (const xcb_randr_get_crtc_info_reply_t *R /**< */)
-{
- return R->num_possible_outputs;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_info_possible_end
- **
- ** @param const xcb_randr_get_crtc_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_info_possible_end (const xcb_randr_get_crtc_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_crtc_info_outputs_end(R);
- i.data = ((xcb_randr_output_t *) child.data) + (R->num_possible_outputs);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_info_reply_t * xcb_randr_get_crtc_info_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_crtc_info_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_crtc_info_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_info_reply_t *
-xcb_randr_get_crtc_info_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_crtc_info_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t timestamp
- ** @param xcb_timestamp_t config_timestamp
- ** @param int16_t x
- ** @param int16_t y
- ** @param xcb_randr_mode_t mode
- ** @param uint16_t rotation
- ** @param uint32_t outputs_len
- ** @param const xcb_randr_output_t *outputs
- ** @returns xcb_randr_set_crtc_config_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_crtc_config_cookie_t
-xcb_randr_set_crtc_config (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t timestamp /**< */,
- xcb_timestamp_t config_timestamp /**< */,
- int16_t x /**< */,
- int16_t y /**< */,
- xcb_randr_mode_t mode /**< */,
- uint16_t rotation /**< */,
- uint32_t outputs_len /**< */,
- const xcb_randr_output_t *outputs /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_CRTC_CONFIG,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[6];
- xcb_randr_set_crtc_config_cookie_t xcb_ret;
- xcb_randr_set_crtc_config_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.timestamp = timestamp;
- xcb_out.config_timestamp = config_timestamp;
- xcb_out.x = x;
- xcb_out.y = y;
- xcb_out.mode = mode;
- xcb_out.rotation = rotation;
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t timestamp
- ** @param xcb_timestamp_t config_timestamp
- ** @param int16_t x
- ** @param int16_t y
- ** @param xcb_randr_mode_t mode
- ** @param uint16_t rotation
- ** @param uint32_t outputs_len
- ** @param const xcb_randr_output_t *outputs
- ** @returns xcb_randr_set_crtc_config_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_crtc_config_cookie_t
-xcb_randr_set_crtc_config_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t timestamp /**< */,
- xcb_timestamp_t config_timestamp /**< */,
- int16_t x /**< */,
- int16_t y /**< */,
- xcb_randr_mode_t mode /**< */,
- uint16_t rotation /**< */,
- uint32_t outputs_len /**< */,
- const xcb_randr_output_t *outputs /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_CRTC_CONFIG,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[6];
- xcb_randr_set_crtc_config_cookie_t xcb_ret;
- xcb_randr_set_crtc_config_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.timestamp = timestamp;
- xcb_out.config_timestamp = config_timestamp;
- xcb_out.x = x;
- xcb_out.y = y;
- xcb_out.mode = mode;
- xcb_out.rotation = rotation;
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_set_crtc_config_reply_t * xcb_randr_set_crtc_config_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_set_crtc_config_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_set_crtc_config_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_set_crtc_config_reply_t *
-xcb_randr_set_crtc_config_reply (xcb_connection_t *c /**< */,
- xcb_randr_set_crtc_config_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_set_crtc_config_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_gamma_size_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_size_cookie_t
-xcb_randr_get_crtc_gamma_size (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret;
- xcb_randr_get_crtc_gamma_size_request_t xcb_out;
-
- xcb_out.crtc = crtc;
-
- 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_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_gamma_size_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_size_cookie_t
-xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret;
- xcb_randr_get_crtc_gamma_size_request_t xcb_out;
-
- xcb_out.crtc = crtc;
-
- 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_randr_get_crtc_gamma_size_reply_t * xcb_randr_get_crtc_gamma_size_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_crtc_gamma_size_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_crtc_gamma_size_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_size_reply_t *
-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 /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_gamma_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_cookie_t
-xcb_randr_get_crtc_gamma (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_CRTC_GAMMA,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_crtc_gamma_cookie_t xcb_ret;
- xcb_randr_get_crtc_gamma_request_t xcb_out;
-
- xcb_out.crtc = crtc;
-
- 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_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_gamma_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_cookie_t
-xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_CRTC_GAMMA,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_crtc_gamma_cookie_t xcb_ret;
- xcb_randr_get_crtc_gamma_request_t xcb_out;
-
- xcb_out.crtc = crtc;
-
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_randr_get_crtc_gamma_red
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_randr_get_crtc_gamma_red (const xcb_randr_get_crtc_gamma_reply_t *R /**< */)
-{
- return (uint16_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_gamma_red_length
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_gamma_red_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */)
-{
- return R->size;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_red_end
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_gamma_red_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((uint16_t *) (R + 1)) + (R->size);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_randr_get_crtc_gamma_green
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_randr_get_crtc_gamma_green (const xcb_randr_get_crtc_gamma_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_crtc_gamma_red_end(R);
- return (uint16_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_gamma_green_length
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_gamma_green_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */)
-{
- return R->size;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_green_end
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_gamma_green_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_crtc_gamma_red_end(R);
- i.data = ((uint16_t *) child.data) + (R->size);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_randr_get_crtc_gamma_blue
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_randr_get_crtc_gamma_blue (const xcb_randr_get_crtc_gamma_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_crtc_gamma_green_end(R);
- return (uint16_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_gamma_blue_length
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_gamma_blue_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */)
-{
- return R->size;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_blue_end
- **
- ** @param const xcb_randr_get_crtc_gamma_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_gamma_blue_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_crtc_gamma_green_end(R);
- i.data = ((uint16_t *) child.data) + (R->size);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_gamma_reply_t * xcb_randr_get_crtc_gamma_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_crtc_gamma_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_crtc_gamma_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_gamma_reply_t *
-xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_crtc_gamma_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_crtc_gamma_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param uint16_t size
- ** @param const uint16_t *red
- ** @param const uint16_t *green
- ** @param const uint16_t *blue
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- uint16_t size /**< */,
- const uint16_t *red /**< */,
- const uint16_t *green /**< */,
- const uint16_t *blue /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 8,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_CRTC_GAMMA,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[10];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_set_crtc_gamma_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.size = 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;
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_crtc_gamma
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param uint16_t size
- ** @param const uint16_t *red
- ** @param const uint16_t *green
- ** @param const uint16_t *blue
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_crtc_gamma (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- uint16_t size /**< */,
- const uint16_t *red /**< */,
- const uint16_t *green /**< */,
- const uint16_t *blue /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 8,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_CRTC_GAMMA,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[10];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_set_crtc_gamma_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.size = 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;
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_resources_current_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_current_cookie_t
-xcb_randr_get_screen_resources_current (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_screen_resources_current_cookie_t xcb_ret;
- xcb_randr_get_screen_resources_current_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_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_screen_resources_current_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_current_cookie_t
-xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_screen_resources_current_cookie_t xcb_ret;
- xcb_randr_get_screen_resources_current_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_randr_crtc_t * xcb_randr_get_screen_resources_current_crtcs
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_randr_crtc_t *
- **
- *****************************************************************************/
-
-xcb_randr_crtc_t *
-xcb_randr_get_screen_resources_current_crtcs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- return (xcb_randr_crtc_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_current_crtcs_length
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_current_crtcs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- return R->num_crtcs;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_crtcs_end
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_current_crtcs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_output_t * xcb_randr_get_screen_resources_current_outputs
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_randr_output_t *
- **
- *****************************************************************************/
-
-xcb_randr_output_t *
-xcb_randr_get_screen_resources_current_outputs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_crtcs_end(R);
- return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_current_outputs_length
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_current_outputs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- return R->num_outputs;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_outputs_end
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_current_outputs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_screen_resources_current_crtcs_end(R);
- i.data = ((xcb_randr_output_t *) child.data) + (R->num_outputs);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_current_modes
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_randr_mode_info_t *
- **
- *****************************************************************************/
-
-xcb_randr_mode_info_t *
-xcb_randr_get_screen_resources_current_modes (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_outputs_end(R);
- return (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_current_modes_length
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_current_modes_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- return R->num_modes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_current_modes_iterator
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_randr_mode_info_iterator_t
- **
- *****************************************************************************/
-
-xcb_randr_mode_info_iterator_t
-xcb_randr_get_screen_resources_current_modes_iterator (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- xcb_randr_mode_info_iterator_t i;
- xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_outputs_end(R);
- i.data = (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index));
- i.rem = R->num_modes;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_randr_get_screen_resources_current_names
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_randr_get_screen_resources_current_names (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R));
- return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_screen_resources_current_names_length
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_screen_resources_current_names_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- return R->names_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_names_end
- **
- ** @param const xcb_randr_get_screen_resources_current_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_screen_resources_current_names_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R));
- i.data = ((uint8_t *) child.data) + (R->names_len);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_screen_resources_current_reply_t * xcb_randr_get_screen_resources_current_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_screen_resources_current_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_screen_resources_current_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_screen_resources_current_reply_t *
-xcb_randr_get_screen_resources_current_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_screen_resources_current_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_crtc_transform_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_render_transform_t transform
- ** @param uint16_t filter_len
- ** @param const char *filter_name
- ** @param uint32_t filter_params_len
- ** @param const xcb_render_fixed_t *filter_params
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_crtc_transform_checked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_render_transform_t transform /**< */,
- uint16_t filter_len /**< */,
- const char *filter_name /**< */,
- uint32_t filter_params_len /**< */,
- const xcb_render_fixed_t *filter_params /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_set_crtc_transform_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.transform = transform;
- xcb_out.filter_len = filter_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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_crtc_transform
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_render_transform_t transform
- ** @param uint16_t filter_len
- ** @param const char *filter_name
- ** @param uint32_t filter_params_len
- ** @param const xcb_render_fixed_t *filter_params
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_crtc_transform (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_render_transform_t transform /**< */,
- uint16_t filter_len /**< */,
- const char *filter_name /**< */,
- uint32_t filter_params_len /**< */,
- const xcb_render_fixed_t *filter_params /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_set_crtc_transform_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.transform = transform;
- xcb_out.filter_len = filter_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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_transform_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_transform_cookie_t
-xcb_randr_get_crtc_transform (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_crtc_transform_cookie_t xcb_ret;
- xcb_randr_get_crtc_transform_request_t xcb_out;
-
- xcb_out.crtc = crtc;
-
- 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_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_crtc_transform_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_transform_cookie_t
-xcb_randr_get_crtc_transform_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_crtc_transform_cookie_t xcb_ret;
- xcb_randr_get_crtc_transform_request_t xcb_out;
-
- xcb_out.crtc = crtc;
-
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** char * xcb_randr_get_crtc_transform_pending_filter_name
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_randr_get_crtc_transform_pending_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- return (char *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_transform_pending_filter_name_length
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_transform_pending_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- return R->pending_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_filter_name_end
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_transform_pending_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((char *) (R + 1)) + (R->pending_len);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_pending_params
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_render_fixed_t *
- **
- *****************************************************************************/
-
-xcb_render_fixed_t *
-xcb_randr_get_crtc_transform_pending_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_pending_filter_name_end(R);
- return (xcb_render_fixed_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_fixed_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_transform_pending_params_length
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_transform_pending_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- return R->pending_nparams;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_params_end
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_transform_pending_params_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_pending_filter_name_end(R);
- i.data = ((xcb_render_fixed_t *) child.data) + (R->pending_nparams);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** char * xcb_randr_get_crtc_transform_current_filter_name
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_randr_get_crtc_transform_current_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_pending_params_end(R);
- return (char *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_transform_current_filter_name_length
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_transform_current_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- return R->current_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_filter_name_end
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_transform_current_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_pending_params_end(R);
- i.data = ((char *) child.data) + (R->current_len);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_current_params
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_render_fixed_t *
- **
- *****************************************************************************/
-
-xcb_render_fixed_t *
-xcb_randr_get_crtc_transform_current_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_current_filter_name_end(R);
- return (xcb_render_fixed_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_fixed_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_randr_get_crtc_transform_current_params_length
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_randr_get_crtc_transform_current_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- return R->current_nparams;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_params_end
- **
- ** @param const xcb_randr_get_crtc_transform_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_get_crtc_transform_current_params_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_current_filter_name_end(R);
- i.data = ((xcb_render_fixed_t *) child.data) + (R->current_nparams);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_crtc_transform_reply_t * xcb_randr_get_crtc_transform_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_crtc_transform_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_crtc_transform_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_crtc_transform_reply_t *
-xcb_randr_get_crtc_transform_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_crtc_transform_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_get_crtc_transform_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_panning_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_panning_cookie_t
-xcb_randr_get_panning (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_PANNING,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_panning_cookie_t xcb_ret;
- xcb_randr_get_panning_request_t xcb_out;
-
- xcb_out.crtc = crtc;
-
- 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_randr_get_panning_cookie_t xcb_randr_get_panning_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @returns xcb_randr_get_panning_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_panning_cookie_t
-xcb_randr_get_panning_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_PANNING,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_panning_cookie_t xcb_ret;
- xcb_randr_get_panning_request_t xcb_out;
-
- xcb_out.crtc = crtc;
-
- 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_randr_get_panning_reply_t * xcb_randr_get_panning_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_panning_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_panning_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_panning_reply_t *
-xcb_randr_get_panning_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_panning_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_get_panning_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t timestamp
- ** @param uint16_t left
- ** @param uint16_t top
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint16_t track_left
- ** @param uint16_t track_top
- ** @param uint16_t track_width
- ** @param uint16_t track_height
- ** @param int16_t border_left
- ** @param int16_t border_top
- ** @param int16_t border_right
- ** @param int16_t border_bottom
- ** @returns xcb_randr_set_panning_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_panning_cookie_t
-xcb_randr_set_panning (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t timestamp /**< */,
- uint16_t left /**< */,
- uint16_t top /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint16_t track_left /**< */,
- uint16_t track_top /**< */,
- uint16_t track_width /**< */,
- uint16_t track_height /**< */,
- int16_t border_left /**< */,
- int16_t border_top /**< */,
- int16_t border_right /**< */,
- int16_t border_bottom /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_PANNING,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_set_panning_cookie_t xcb_ret;
- xcb_randr_set_panning_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.timestamp = timestamp;
- xcb_out.left = left;
- xcb_out.top = top;
- xcb_out.width = width;
- xcb_out.height = height;
- xcb_out.track_left = track_left;
- xcb_out.track_top = track_top;
- xcb_out.track_width = track_width;
- xcb_out.track_height = track_height;
- xcb_out.border_left = border_left;
- xcb_out.border_top = border_top;
- xcb_out.border_right = border_right;
- xcb_out.border_bottom = border_bottom;
-
- 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_randr_set_panning_cookie_t xcb_randr_set_panning_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_crtc_t crtc
- ** @param xcb_timestamp_t timestamp
- ** @param uint16_t left
- ** @param uint16_t top
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint16_t track_left
- ** @param uint16_t track_top
- ** @param uint16_t track_width
- ** @param uint16_t track_height
- ** @param int16_t border_left
- ** @param int16_t border_top
- ** @param int16_t border_right
- ** @param int16_t border_bottom
- ** @returns xcb_randr_set_panning_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_set_panning_cookie_t
-xcb_randr_set_panning_unchecked (xcb_connection_t *c /**< */,
- xcb_randr_crtc_t crtc /**< */,
- xcb_timestamp_t timestamp /**< */,
- uint16_t left /**< */,
- uint16_t top /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint16_t track_left /**< */,
- uint16_t track_top /**< */,
- uint16_t track_width /**< */,
- uint16_t track_height /**< */,
- int16_t border_left /**< */,
- int16_t border_top /**< */,
- int16_t border_right /**< */,
- int16_t border_bottom /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_PANNING,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_set_panning_cookie_t xcb_ret;
- xcb_randr_set_panning_request_t xcb_out;
-
- xcb_out.crtc = crtc;
- xcb_out.timestamp = timestamp;
- xcb_out.left = left;
- xcb_out.top = top;
- xcb_out.width = width;
- xcb_out.height = height;
- xcb_out.track_left = track_left;
- xcb_out.track_top = track_top;
- xcb_out.track_width = track_width;
- xcb_out.track_height = track_height;
- xcb_out.border_left = border_left;
- xcb_out.border_top = border_top;
- xcb_out.border_right = border_right;
- xcb_out.border_bottom = border_bottom;
-
- 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_randr_set_panning_reply_t * xcb_randr_set_panning_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_set_panning_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_set_panning_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_set_panning_reply_t *
-xcb_randr_set_panning_reply (xcb_connection_t *c /**< */,
- xcb_randr_set_panning_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_set_panning_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_randr_set_output_primary_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_randr_output_t output
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_output_primary_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_randr_output_t output /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_set_output_primary_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.output = output;
-
- 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_randr_set_output_primary
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_randr_output_t output
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_randr_set_output_primary (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_randr_output_t output /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_randr_set_output_primary_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.output = output;
-
- 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_randr_get_output_primary_cookie_t xcb_randr_get_output_primary
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_output_primary_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_primary_cookie_t
-xcb_randr_get_output_primary (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_output_primary_cookie_t xcb_ret;
- xcb_randr_get_output_primary_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_randr_get_output_primary_cookie_t xcb_randr_get_output_primary_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_randr_get_output_primary_cookie_t
- **
- *****************************************************************************/
-
-xcb_randr_get_output_primary_cookie_t
-xcb_randr_get_output_primary_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_randr_id,
- /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_randr_get_output_primary_cookie_t xcb_ret;
- xcb_randr_get_output_primary_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_randr_get_output_primary_reply_t * xcb_randr_get_output_primary_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_randr_get_output_primary_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_randr_get_output_primary_reply_t *
- **
- *****************************************************************************/
-
-xcb_randr_get_output_primary_reply_t *
-xcb_randr_get_output_primary_reply (xcb_connection_t *c /**< */,
- xcb_randr_get_output_primary_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_randr_get_output_primary_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_randr_crtc_change_next
- **
- ** @param xcb_randr_crtc_change_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_crtc_change_next (xcb_randr_crtc_change_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_randr_crtc_change_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_crtc_change_end
- **
- ** @param xcb_randr_crtc_change_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_crtc_change_end (xcb_randr_crtc_change_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_randr_output_change_next
- **
- ** @param xcb_randr_output_change_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_output_change_next (xcb_randr_output_change_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_randr_output_change_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_output_change_end
- **
- ** @param xcb_randr_output_change_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_output_change_end (xcb_randr_output_change_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_randr_output_property_next
- **
- ** @param xcb_randr_output_property_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_output_property_next (xcb_randr_output_property_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_randr_output_property_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_output_property_end
- **
- ** @param xcb_randr_output_property_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_output_property_end (xcb_randr_output_property_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_randr_notify_data_next
- **
- ** @param xcb_randr_notify_data_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_randr_notify_data_next (xcb_randr_notify_data_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_randr_notify_data_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_randr_notify_data_end
- **
- ** @param xcb_randr_notify_data_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_randr_notify_data_end (xcb_randr_notify_data_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;
-}
-
diff --git a/src/3rdparty/xcb/libxcb/render.c b/src/3rdparty/xcb/libxcb/render.c
deleted file mode 100644
index 7e5379cfcf..0000000000
--- a/src/3rdparty/xcb/libxcb/render.c
+++ /dev/null
@@ -1,5295 +0,0 @@
-/*
- * This file generated automatically from render.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 "render.h"
-
-#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
-#include "xproto.h"
-
-xcb_extension_t xcb_render_id = { "RENDER", 0 };
-
-
-/*****************************************************************************
- **
- ** void xcb_render_glyph_next
- **
- ** @param xcb_render_glyph_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_glyph_next (xcb_render_glyph_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_glyph_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_glyph_end
- **
- ** @param xcb_render_glyph_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_glyph_end (xcb_render_glyph_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_render_glyphset_next
- **
- ** @param xcb_render_glyphset_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_glyphset_next (xcb_render_glyphset_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_glyphset_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_glyphset_end
- **
- ** @param xcb_render_glyphset_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_glyphset_end (xcb_render_glyphset_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_render_picture_next
- **
- ** @param xcb_render_picture_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_picture_next (xcb_render_picture_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_picture_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_picture_end
- **
- ** @param xcb_render_picture_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_picture_end (xcb_render_picture_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_render_pictformat_next
- **
- ** @param xcb_render_pictformat_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictformat_next (xcb_render_pictformat_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_pictformat_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_pictformat_end
- **
- ** @param xcb_render_pictformat_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictformat_end (xcb_render_pictformat_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_render_fixed_next
- **
- ** @param xcb_render_fixed_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_fixed_next (xcb_render_fixed_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_fixed_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_fixed_end
- **
- ** @param xcb_render_fixed_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_fixed_end (xcb_render_fixed_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_render_directformat_next
- **
- ** @param xcb_render_directformat_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_directformat_next (xcb_render_directformat_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_directformat_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_directformat_end
- **
- ** @param xcb_render_directformat_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_directformat_end (xcb_render_directformat_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_render_pictforminfo_next
- **
- ** @param xcb_render_pictforminfo_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictforminfo_next (xcb_render_pictforminfo_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_pictforminfo_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_pictforminfo_end
- **
- ** @param xcb_render_pictforminfo_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictforminfo_end (xcb_render_pictforminfo_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_render_pictvisual_next
- **
- ** @param xcb_render_pictvisual_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_pictvisual_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_pictvisual_end
- **
- ** @param xcb_render_pictvisual_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictvisual_end (xcb_render_pictvisual_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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictvisual_t * xcb_render_pictdepth_visuals
- **
- ** @param const xcb_render_pictdepth_t *R
- ** @returns xcb_render_pictvisual_t *
- **
- *****************************************************************************/
-
-xcb_render_pictvisual_t *
-xcb_render_pictdepth_visuals (const xcb_render_pictdepth_t *R /**< */)
-{
- return (xcb_render_pictvisual_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_render_pictdepth_visuals_length
- **
- ** @param const xcb_render_pictdepth_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_pictdepth_visuals_length (const xcb_render_pictdepth_t *R /**< */)
-{
- return R->num_visuals;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictvisual_iterator_t xcb_render_pictdepth_visuals_iterator
- **
- ** @param const xcb_render_pictdepth_t *R
- ** @returns xcb_render_pictvisual_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_pictvisual_iterator_t
-xcb_render_pictdepth_visuals_iterator (const xcb_render_pictdepth_t *R /**< */)
-{
- xcb_render_pictvisual_iterator_t i;
- i.data = (xcb_render_pictvisual_t *) (R + 1);
- i.rem = R->num_visuals;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_render_pictdepth_next
- **
- ** @param xcb_render_pictdepth_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i /**< */)
-{
- xcb_render_pictdepth_t *R = i->data;
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_pictdepth_end
- **
- ** @param xcb_render_pictdepth_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_render_pictdepth_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_render_pictscreen_depths_length
- **
- ** @param const xcb_render_pictscreen_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_pictscreen_depths_length (const xcb_render_pictscreen_t *R /**< */)
-{
- return R->num_depths;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictdepth_iterator_t xcb_render_pictscreen_depths_iterator
- **
- ** @param const xcb_render_pictscreen_t *R
- ** @returns xcb_render_pictdepth_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_pictdepth_iterator_t
-xcb_render_pictscreen_depths_iterator (const xcb_render_pictscreen_t *R /**< */)
-{
- xcb_render_pictdepth_iterator_t i;
- i.data = (xcb_render_pictdepth_t *) (R + 1);
- i.rem = R->num_depths;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_render_pictscreen_next
- **
- ** @param xcb_render_pictscreen_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i /**< */)
-{
- xcb_render_pictscreen_t *R = i->data;
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_pictscreen_end
- **
- ** @param xcb_render_pictscreen_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pictscreen_end (xcb_render_pictscreen_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_render_pictscreen_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_render_indexvalue_next
- **
- ** @param xcb_render_indexvalue_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_indexvalue_next (xcb_render_indexvalue_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_indexvalue_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_indexvalue_end
- **
- ** @param xcb_render_indexvalue_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_indexvalue_end (xcb_render_indexvalue_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_render_color_next
- **
- ** @param xcb_render_color_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_color_next (xcb_render_color_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_color_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_color_end
- **
- ** @param xcb_render_color_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_color_end (xcb_render_color_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_render_pointfix_next
- **
- ** @param xcb_render_pointfix_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_pointfix_next (xcb_render_pointfix_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_pointfix_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_pointfix_end
- **
- ** @param xcb_render_pointfix_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_pointfix_end (xcb_render_pointfix_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_render_linefix_next
- **
- ** @param xcb_render_linefix_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_linefix_next (xcb_render_linefix_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_linefix_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_linefix_end
- **
- ** @param xcb_render_linefix_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_linefix_end (xcb_render_linefix_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_render_triangle_next
- **
- ** @param xcb_render_triangle_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_triangle_next (xcb_render_triangle_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_triangle_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_triangle_end
- **
- ** @param xcb_render_triangle_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_triangle_end (xcb_render_triangle_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_render_trapezoid_next
- **
- ** @param xcb_render_trapezoid_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_trapezoid_next (xcb_render_trapezoid_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_trapezoid_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_trapezoid_end
- **
- ** @param xcb_render_trapezoid_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_trapezoid_end (xcb_render_trapezoid_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_render_glyphinfo_next
- **
- ** @param xcb_render_glyphinfo_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_glyphinfo_next (xcb_render_glyphinfo_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_glyphinfo_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_glyphinfo_end
- **
- ** @param xcb_render_glyphinfo_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_glyphinfo_end (xcb_render_glyphinfo_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_render_query_version_cookie_t xcb_render_query_version
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t client_major_version
- ** @param uint32_t client_minor_version
- ** @returns xcb_render_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_version_cookie_t
-xcb_render_query_version (xcb_connection_t *c /**< */,
- uint32_t client_major_version /**< */,
- uint32_t client_minor_version /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_render_query_version_cookie_t xcb_ret;
- xcb_render_query_version_request_t xcb_out;
-
- xcb_out.client_major_version = client_major_version;
- xcb_out.client_minor_version = client_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_render_query_version_cookie_t xcb_render_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t client_major_version
- ** @param uint32_t client_minor_version
- ** @returns xcb_render_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_version_cookie_t
-xcb_render_query_version_unchecked (xcb_connection_t *c /**< */,
- uint32_t client_major_version /**< */,
- uint32_t client_minor_version /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_render_query_version_cookie_t xcb_ret;
- xcb_render_query_version_request_t xcb_out;
-
- xcb_out.client_major_version = client_major_version;
- xcb_out.client_minor_version = client_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_render_query_version_reply_t * xcb_render_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_render_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_render_query_version_reply_t *
-xcb_render_query_version_reply (xcb_connection_t *c /**< */,
- xcb_render_query_version_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_render_query_pict_formats_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_pict_formats_cookie_t
-xcb_render_query_pict_formats (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_render_query_pict_formats_cookie_t xcb_ret;
- xcb_render_query_pict_formats_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_render_query_pict_formats_cookie_t xcb_render_query_pict_formats_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_render_query_pict_formats_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_pict_formats_cookie_t
-xcb_render_query_pict_formats_unchecked (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_render_query_pict_formats_cookie_t xcb_ret;
- xcb_render_query_pict_formats_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_render_pictforminfo_t * xcb_render_query_pict_formats_formats
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns xcb_render_pictforminfo_t *
- **
- *****************************************************************************/
-
-xcb_render_pictforminfo_t *
-xcb_render_query_pict_formats_formats (const xcb_render_query_pict_formats_reply_t *R /**< */)
-{
- return (xcb_render_pictforminfo_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_pict_formats_formats_length
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_pict_formats_formats_length (const xcb_render_query_pict_formats_reply_t *R /**< */)
-{
- return R->num_formats;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictforminfo_iterator_t xcb_render_query_pict_formats_formats_iterator
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns xcb_render_pictforminfo_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_pictforminfo_iterator_t
-xcb_render_query_pict_formats_formats_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */)
-{
- xcb_render_pictforminfo_iterator_t i;
- i.data = (xcb_render_pictforminfo_t *) (R + 1);
- i.rem = R->num_formats;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_pict_formats_screens_length
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_pict_formats_screens_length (const xcb_render_query_pict_formats_reply_t *R /**< */)
-{
- return R->num_screens;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_pictscreen_iterator_t xcb_render_query_pict_formats_screens_iterator
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns xcb_render_pictscreen_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_pictscreen_iterator_t
-xcb_render_query_pict_formats_screens_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */)
-{
- xcb_render_pictscreen_iterator_t i;
- xcb_generic_iterator_t prev = xcb_render_pictforminfo_end(xcb_render_query_pict_formats_formats_iterator(R));
- i.data = (xcb_render_pictscreen_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_pictscreen_t, prev.index));
- i.rem = R->num_screens;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint32_t * xcb_render_query_pict_formats_subpixels
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns uint32_t *
- **
- *****************************************************************************/
-
-uint32_t *
-xcb_render_query_pict_formats_subpixels (const xcb_render_query_pict_formats_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R));
- return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_pict_formats_subpixels_length
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_pict_formats_subpixels_length (const xcb_render_query_pict_formats_reply_t *R /**< */)
-{
- return R->num_subpixel;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_query_pict_formats_subpixels_end
- **
- ** @param const xcb_render_query_pict_formats_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_query_pict_formats_subpixels_end (const xcb_render_query_pict_formats_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R));
- i.data = ((uint32_t *) child.data) + (R->num_subpixel);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_query_pict_formats_reply_t * xcb_render_query_pict_formats_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_query_pict_formats_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_render_query_pict_formats_reply_t *
- **
- *****************************************************************************/
-
-xcb_render_query_pict_formats_reply_t *
-xcb_render_query_pict_formats_reply (xcb_connection_t *c /**< */,
- xcb_render_query_pict_formats_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_pictformat_t format
- ** @returns xcb_render_query_pict_index_values_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_pict_index_values_cookie_t
-xcb_render_query_pict_index_values (xcb_connection_t *c /**< */,
- xcb_render_pictformat_t format /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_render_query_pict_index_values_cookie_t xcb_ret;
- xcb_render_query_pict_index_values_request_t xcb_out;
-
- xcb_out.format = format;
-
- 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_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_pictformat_t format
- ** @returns xcb_render_query_pict_index_values_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_pict_index_values_cookie_t
-xcb_render_query_pict_index_values_unchecked (xcb_connection_t *c /**< */,
- xcb_render_pictformat_t format /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_render_query_pict_index_values_cookie_t xcb_ret;
- xcb_render_query_pict_index_values_request_t xcb_out;
-
- xcb_out.format = format;
-
- 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_render_indexvalue_t * xcb_render_query_pict_index_values_values
- **
- ** @param const xcb_render_query_pict_index_values_reply_t *R
- ** @returns xcb_render_indexvalue_t *
- **
- *****************************************************************************/
-
-xcb_render_indexvalue_t *
-xcb_render_query_pict_index_values_values (const xcb_render_query_pict_index_values_reply_t *R /**< */)
-{
- return (xcb_render_indexvalue_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_pict_index_values_values_length
- **
- ** @param const xcb_render_query_pict_index_values_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_pict_index_values_values_length (const xcb_render_query_pict_index_values_reply_t *R /**< */)
-{
- return R->num_values;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_indexvalue_iterator_t xcb_render_query_pict_index_values_values_iterator
- **
- ** @param const xcb_render_query_pict_index_values_reply_t *R
- ** @returns xcb_render_indexvalue_iterator_t
- **
- *****************************************************************************/
-
-xcb_render_indexvalue_iterator_t
-xcb_render_query_pict_index_values_values_iterator (const xcb_render_query_pict_index_values_reply_t *R /**< */)
-{
- xcb_render_indexvalue_iterator_t i;
- i.data = (xcb_render_indexvalue_t *) (R + 1);
- i.rem = R->num_values;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_query_pict_index_values_reply_t * xcb_render_query_pict_index_values_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_query_pict_index_values_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_render_query_pict_index_values_reply_t *
- **
- *****************************************************************************/
-
-xcb_render_query_pict_index_values_reply_t *
-xcb_render_query_pict_index_values_reply (xcb_connection_t *c /**< */,
- xcb_render_query_pict_index_values_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_picture_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t pid
- ** @param xcb_drawable_t drawable
- ** @param xcb_render_pictformat_t format
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_picture_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t pid /**< */,
- xcb_drawable_t drawable /**< */,
- xcb_render_pictformat_t format /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_PICTURE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_picture_request_t xcb_out;
-
- xcb_out.pid = pid;
- xcb_out.drawable = drawable;
- xcb_out.format = format;
- xcb_out.value_mask = value_mask;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_picture
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t pid
- ** @param xcb_drawable_t drawable
- ** @param xcb_render_pictformat_t format
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_picture (xcb_connection_t *c /**< */,
- xcb_render_picture_t pid /**< */,
- xcb_drawable_t drawable /**< */,
- xcb_render_pictformat_t format /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_PICTURE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_picture_request_t xcb_out;
-
- xcb_out.pid = pid;
- xcb_out.drawable = drawable;
- xcb_out.format = format;
- xcb_out.value_mask = value_mask;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_change_picture_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_change_picture_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CHANGE_PICTURE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_change_picture_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.value_mask = value_mask;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_change_picture
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_change_picture (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CHANGE_PICTURE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_change_picture_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.value_mask = value_mask;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_set_picture_clip_rectangles_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param int16_t clip_x_origin
- ** @param int16_t clip_y_origin
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- int16_t clip_x_origin /**< */,
- int16_t clip_y_origin /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_set_picture_clip_rectangles_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.clip_x_origin = clip_x_origin;
- xcb_out.clip_y_origin = clip_y_origin;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_set_picture_clip_rectangles
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param int16_t clip_x_origin
- ** @param int16_t clip_y_origin
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_clip_rectangles (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- int16_t clip_x_origin /**< */,
- int16_t clip_y_origin /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_set_picture_clip_rectangles_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.clip_x_origin = clip_x_origin;
- xcb_out.clip_y_origin = clip_y_origin;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_free_picture_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_picture_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_FREE_PICTURE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_free_picture_request_t xcb_out;
-
- xcb_out.picture = picture;
-
- 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_render_free_picture
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_picture (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_FREE_PICTURE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_free_picture_request_t xcb_out;
-
- xcb_out.picture = picture;
-
- 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_render_composite_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t mask
- ** @param xcb_render_picture_t dst
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param int16_t mask_x
- ** @param int16_t mask_y
- ** @param int16_t dst_x
- ** @param int16_t dst_y
- ** @param uint16_t width
- ** @param uint16_t height
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t mask /**< */,
- xcb_render_picture_t dst /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- int16_t mask_x /**< */,
- int16_t mask_y /**< */,
- int16_t dst_x /**< */,
- int16_t dst_y /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_COMPOSITE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_composite_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.mask = mask;
- xcb_out.dst = dst;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
- xcb_out.mask_x = mask_x;
- xcb_out.mask_y = mask_y;
- xcb_out.dst_x = dst_x;
- xcb_out.dst_y = dst_y;
- xcb_out.width = width;
- xcb_out.height = height;
-
- 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_render_composite
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t mask
- ** @param xcb_render_picture_t dst
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param int16_t mask_x
- ** @param int16_t mask_y
- ** @param int16_t dst_x
- ** @param int16_t dst_y
- ** @param uint16_t width
- ** @param uint16_t height
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t mask /**< */,
- xcb_render_picture_t dst /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- int16_t mask_x /**< */,
- int16_t mask_y /**< */,
- int16_t dst_x /**< */,
- int16_t dst_y /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_COMPOSITE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_composite_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.mask = mask;
- xcb_out.dst = dst;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
- xcb_out.mask_x = mask_x;
- xcb_out.mask_y = mask_y;
- xcb_out.dst_x = dst_x;
- xcb_out.dst_y = dst_y;
- xcb_out.width = width;
- xcb_out.height = height;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_trapezoids_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t traps_len
- ** @param const xcb_render_trapezoid_t *traps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_trapezoids_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t traps_len /**< */,
- const xcb_render_trapezoid_t *traps /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_TRAPEZOIDS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_trapezoids_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_trapezoids
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t traps_len
- ** @param const xcb_render_trapezoid_t *traps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_trapezoids (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t traps_len /**< */,
- const xcb_render_trapezoid_t *traps /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_TRAPEZOIDS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_trapezoids_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_triangles_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t triangles_len
- ** @param const xcb_render_triangle_t *triangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_triangles_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t triangles_len /**< */,
- const xcb_render_triangle_t *triangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_TRIANGLES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_triangles_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_triangles
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t triangles_len
- ** @param const xcb_render_triangle_t *triangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_triangles (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t triangles_len /**< */,
- const xcb_render_triangle_t *triangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_TRIANGLES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_triangles_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_tri_strip_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t points_len
- ** @param const xcb_render_pointfix_t *points
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_tri_strip_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t points_len /**< */,
- const xcb_render_pointfix_t *points /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_TRI_STRIP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_tri_strip_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_tri_strip
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t points_len
- ** @param const xcb_render_pointfix_t *points
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_tri_strip (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t points_len /**< */,
- const xcb_render_pointfix_t *points /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_TRI_STRIP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_tri_strip_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_tri_fan_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t points_len
- ** @param const xcb_render_pointfix_t *points
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_tri_fan_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t points_len /**< */,
- const xcb_render_pointfix_t *points /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_TRI_FAN,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_tri_fan_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_tri_fan
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t points_len
- ** @param const xcb_render_pointfix_t *points
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_tri_fan (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t points_len /**< */,
- const xcb_render_pointfix_t *points /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_TRI_FAN,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_tri_fan_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_glyph_set_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t gsid
- ** @param xcb_render_pictformat_t format
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_glyph_set_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t gsid /**< */,
- xcb_render_pictformat_t format /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_GLYPH_SET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_glyph_set_request_t xcb_out;
-
- xcb_out.gsid = gsid;
- xcb_out.format = format;
-
- 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_render_create_glyph_set
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t gsid
- ** @param xcb_render_pictformat_t format
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_glyph_set (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t gsid /**< */,
- xcb_render_pictformat_t format /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_GLYPH_SET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_glyph_set_request_t xcb_out;
-
- xcb_out.gsid = gsid;
- xcb_out.format = format;
-
- 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_render_reference_glyph_set_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t gsid
- ** @param xcb_render_glyphset_t existing
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_reference_glyph_set_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t gsid /**< */,
- xcb_render_glyphset_t existing /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_reference_glyph_set_request_t xcb_out;
-
- xcb_out.gsid = gsid;
- xcb_out.existing = existing;
-
- 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_render_reference_glyph_set
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t gsid
- ** @param xcb_render_glyphset_t existing
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_reference_glyph_set (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t gsid /**< */,
- xcb_render_glyphset_t existing /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_reference_glyph_set_request_t xcb_out;
-
- xcb_out.gsid = gsid;
- xcb_out.existing = existing;
-
- 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_render_free_glyph_set_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_glyph_set_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_FREE_GLYPH_SET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_free_glyph_set_request_t xcb_out;
-
- xcb_out.glyphset = glyphset;
-
- 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_render_free_glyph_set
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_glyph_set (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_FREE_GLYPH_SET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_free_glyph_set_request_t xcb_out;
-
- xcb_out.glyphset = glyphset;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_add_glyphs_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @param uint32_t glyphs_len
- ** @param const uint32_t *glyphids
- ** @param const xcb_render_glyphinfo_t *glyphs
- ** @param uint32_t data_len
- ** @param const uint8_t *data
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_add_glyphs_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- uint32_t glyphs_len /**< */,
- const uint32_t *glyphids /**< */,
- const xcb_render_glyphinfo_t *glyphs /**< */,
- uint32_t data_len /**< */,
- const uint8_t *data /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 8,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_ADD_GLYPHS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[10];
- xcb_void_cookie_t xcb_ret;
- xcb_render_add_glyphs_request_t xcb_out;
-
- xcb_out.glyphset = glyphset;
- xcb_out.glyphs_len = glyphs_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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_add_glyphs
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @param uint32_t glyphs_len
- ** @param const uint32_t *glyphids
- ** @param const xcb_render_glyphinfo_t *glyphs
- ** @param uint32_t data_len
- ** @param const uint8_t *data
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_add_glyphs (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- uint32_t glyphs_len /**< */,
- const uint32_t *glyphids /**< */,
- const xcb_render_glyphinfo_t *glyphs /**< */,
- uint32_t data_len /**< */,
- const uint8_t *data /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 8,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_ADD_GLYPHS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[10];
- xcb_void_cookie_t xcb_ret;
- xcb_render_add_glyphs_request_t xcb_out;
-
- xcb_out.glyphset = glyphset;
- xcb_out.glyphs_len = glyphs_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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_free_glyphs_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @param uint32_t glyphs_len
- ** @param const xcb_render_glyph_t *glyphs
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_glyphs_checked (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- uint32_t glyphs_len /**< */,
- const xcb_render_glyph_t *glyphs /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_FREE_GLYPHS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_free_glyphs_request_t xcb_out;
-
- xcb_out.glyphset = glyphset;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_free_glyphs
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_glyphset_t glyphset
- ** @param uint32_t glyphs_len
- ** @param const xcb_render_glyph_t *glyphs
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_free_glyphs (xcb_connection_t *c /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- uint32_t glyphs_len /**< */,
- const xcb_render_glyph_t *glyphs /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_FREE_GLYPHS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_free_glyphs_request_t xcb_out;
-
- xcb_out.glyphset = glyphset;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite_glyphs_8_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_8_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_composite_glyphs_8_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.glyphset = glyphset;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite_glyphs_8
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_8 (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_composite_glyphs_8_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.glyphset = glyphset;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite_glyphs_16_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_16_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_composite_glyphs_16_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.glyphset = glyphset;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite_glyphs_16
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_16 (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_composite_glyphs_16_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.glyphset = glyphset;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite_glyphs_32_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_32_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_composite_glyphs_32_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.glyphset = glyphset;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_composite_glyphs_32
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t src
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_pictformat_t mask_format
- ** @param xcb_render_glyphset_t glyphset
- ** @param int16_t src_x
- ** @param int16_t src_y
- ** @param uint32_t glyphcmds_len
- ** @param const uint8_t *glyphcmds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_composite_glyphs_32 (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t src /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_pictformat_t mask_format /**< */,
- xcb_render_glyphset_t glyphset /**< */,
- int16_t src_x /**< */,
- int16_t src_y /**< */,
- uint32_t glyphcmds_len /**< */,
- const uint8_t *glyphcmds /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_composite_glyphs_32_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.src = src;
- xcb_out.dst = dst;
- xcb_out.mask_format = mask_format;
- xcb_out.glyphset = glyphset;
- xcb_out.src_x = src_x;
- xcb_out.src_y = src_y;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_fill_rectangles_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_color_t color
- ** @param uint32_t rects_len
- ** @param const xcb_rectangle_t *rects
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_fill_rectangles_checked (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_color_t color /**< */,
- uint32_t rects_len /**< */,
- const xcb_rectangle_t *rects /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_FILL_RECTANGLES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_fill_rectangles_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.dst = dst;
- xcb_out.color = color;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_fill_rectangles
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t op
- ** @param xcb_render_picture_t dst
- ** @param xcb_render_color_t color
- ** @param uint32_t rects_len
- ** @param const xcb_rectangle_t *rects
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_fill_rectangles (xcb_connection_t *c /**< */,
- uint8_t op /**< */,
- xcb_render_picture_t dst /**< */,
- xcb_render_color_t color /**< */,
- uint32_t rects_len /**< */,
- const xcb_rectangle_t *rects /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_FILL_RECTANGLES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_fill_rectangles_request_t xcb_out;
-
- xcb_out.op = op;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.dst = dst;
- xcb_out.color = color;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cid
- ** @param xcb_render_picture_t source
- ** @param uint16_t x
- ** @param uint16_t y
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_cursor_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t cid /**< */,
- xcb_render_picture_t source /**< */,
- uint16_t x /**< */,
- uint16_t y /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_cursor_request_t xcb_out;
-
- xcb_out.cid = cid;
- xcb_out.source = source;
- xcb_out.x = x;
- xcb_out.y = y;
-
- 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_render_create_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cid
- ** @param xcb_render_picture_t source
- ** @param uint16_t x
- ** @param uint16_t y
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_cursor (xcb_connection_t *c /**< */,
- xcb_cursor_t cid /**< */,
- xcb_render_picture_t source /**< */,
- uint16_t x /**< */,
- uint16_t y /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_cursor_request_t xcb_out;
-
- xcb_out.cid = cid;
- xcb_out.source = source;
- xcb_out.x = x;
- xcb_out.y = y;
-
- 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_render_transform_next
- **
- ** @param xcb_render_transform_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_transform_next (xcb_render_transform_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_transform_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_transform_end
- **
- ** @param xcb_render_transform_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_transform_end (xcb_render_transform_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_void_cookie_t xcb_render_set_picture_transform_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_transform_t transform
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_transform_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_transform_t transform /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_set_picture_transform_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.transform = transform;
-
- 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_render_set_picture_transform
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_transform_t transform
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_transform (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_transform_t transform /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_set_picture_transform_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.transform = transform;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_query_filters_cookie_t xcb_render_query_filters
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @returns xcb_render_query_filters_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_filters_cookie_t
-xcb_render_query_filters (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_QUERY_FILTERS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_render_query_filters_cookie_t xcb_ret;
- xcb_render_query_filters_request_t xcb_out;
-
- xcb_out.drawable = drawable;
-
- 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_render_query_filters_cookie_t xcb_render_query_filters_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @returns xcb_render_query_filters_cookie_t
- **
- *****************************************************************************/
-
-xcb_render_query_filters_cookie_t
-xcb_render_query_filters_unchecked (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_QUERY_FILTERS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_render_query_filters_cookie_t xcb_ret;
- xcb_render_query_filters_request_t xcb_out;
-
- xcb_out.drawable = drawable;
-
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_render_query_filters_aliases
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_render_query_filters_aliases (const xcb_render_query_filters_reply_t *R /**< */)
-{
- return (uint16_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_filters_aliases_length
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_filters_aliases_length (const xcb_render_query_filters_reply_t *R /**< */)
-{
- return R->num_aliases;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_query_filters_aliases_end
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_query_filters_aliases_end (const xcb_render_query_filters_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((uint16_t *) (R + 1)) + (R->num_aliases);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_render_query_filters_filters_length
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_render_query_filters_filters_length (const xcb_render_query_filters_reply_t *R /**< */)
-{
- return R->num_filters;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_str_iterator_t xcb_render_query_filters_filters_iterator
- **
- ** @param const xcb_render_query_filters_reply_t *R
- ** @returns xcb_str_iterator_t
- **
- *****************************************************************************/
-
-xcb_str_iterator_t
-xcb_render_query_filters_filters_iterator (const xcb_render_query_filters_reply_t *R /**< */)
-{
- xcb_str_iterator_t i;
- xcb_generic_iterator_t prev = xcb_render_query_filters_aliases_end(R);
- i.data = (xcb_str_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_str_t, prev.index));
- i.rem = R->num_filters;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_render_query_filters_reply_t * xcb_render_query_filters_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_query_filters_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_render_query_filters_reply_t *
- **
- *****************************************************************************/
-
-xcb_render_query_filters_reply_t *
-xcb_render_query_filters_reply (xcb_connection_t *c /**< */,
- xcb_render_query_filters_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_set_picture_filter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param uint16_t filter_len
- ** @param const char *filter
- ** @param uint32_t values_len
- ** @param const xcb_render_fixed_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_filter_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- uint16_t filter_len /**< */,
- const char *filter /**< */,
- uint32_t values_len /**< */,
- const xcb_render_fixed_t *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_SET_PICTURE_FILTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_render_set_picture_filter_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.filter_len = filter_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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_set_picture_filter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param uint16_t filter_len
- ** @param const char *filter
- ** @param uint32_t values_len
- ** @param const xcb_render_fixed_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_set_picture_filter (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- uint16_t filter_len /**< */,
- const char *filter /**< */,
- uint32_t values_len /**< */,
- const xcb_render_fixed_t *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_SET_PICTURE_FILTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_render_set_picture_filter_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.filter_len = filter_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 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;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_render_animcursorelt_next
- **
- ** @param xcb_render_animcursorelt_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_animcursorelt_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_animcursorelt_end
- **
- ** @param xcb_render_animcursorelt_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_animcursorelt_end (xcb_render_animcursorelt_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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_anim_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cid
- ** @param uint32_t cursors_len
- ** @param const xcb_render_animcursorelt_t *cursors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_anim_cursor_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t cid /**< */,
- uint32_t cursors_len /**< */,
- const xcb_render_animcursorelt_t *cursors /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_anim_cursor_request_t xcb_out;
-
- xcb_out.cid = cid;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_anim_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cid
- ** @param uint32_t cursors_len
- ** @param const xcb_render_animcursorelt_t *cursors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_anim_cursor (xcb_connection_t *c /**< */,
- xcb_cursor_t cid /**< */,
- uint32_t cursors_len /**< */,
- const xcb_render_animcursorelt_t *cursors /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_anim_cursor_request_t xcb_out;
-
- xcb_out.cid = cid;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_render_spanfix_next
- **
- ** @param xcb_render_spanfix_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_spanfix_next (xcb_render_spanfix_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_spanfix_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_spanfix_end
- **
- ** @param xcb_render_spanfix_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_spanfix_end (xcb_render_spanfix_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_render_trap_next
- **
- ** @param xcb_render_trap_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_render_trap_next (xcb_render_trap_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_render_trap_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_render_trap_end
- **
- ** @param xcb_render_trap_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_render_trap_end (xcb_render_trap_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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_add_traps_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param int16_t x_off
- ** @param int16_t y_off
- ** @param uint32_t traps_len
- ** @param const xcb_render_trap_t *traps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_add_traps_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- int16_t x_off /**< */,
- int16_t y_off /**< */,
- uint32_t traps_len /**< */,
- const xcb_render_trap_t *traps /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_ADD_TRAPS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_add_traps_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.x_off = x_off;
- xcb_out.y_off = y_off;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_add_traps
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param int16_t x_off
- ** @param int16_t y_off
- ** @param uint32_t traps_len
- ** @param const xcb_render_trap_t *traps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_add_traps (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- int16_t x_off /**< */,
- int16_t y_off /**< */,
- uint32_t traps_len /**< */,
- const xcb_render_trap_t *traps /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_ADD_TRAPS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_render_add_traps_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.x_off = x_off;
- xcb_out.y_off = y_off;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_solid_fill_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_color_t color
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_solid_fill_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_color_t color /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_SOLID_FILL,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_solid_fill_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.color = color;
-
- 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_render_create_solid_fill
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_color_t color
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_solid_fill (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_color_t color /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_SOLID_FILL,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_solid_fill_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.color = color;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_linear_gradient_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t p1
- ** @param xcb_render_pointfix_t p2
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_linear_gradient_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t p1 /**< */,
- xcb_render_pointfix_t p2 /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_linear_gradient_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.p1 = p1;
- xcb_out.p2 = p2;
- xcb_out.num_stops = num_stops;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_linear_gradient
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t p1
- ** @param xcb_render_pointfix_t p2
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_linear_gradient (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t p1 /**< */,
- xcb_render_pointfix_t p2 /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_linear_gradient_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.p1 = p1;
- xcb_out.p2 = p2;
- xcb_out.num_stops = num_stops;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_radial_gradient_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t inner
- ** @param xcb_render_pointfix_t outer
- ** @param xcb_render_fixed_t inner_radius
- ** @param xcb_render_fixed_t outer_radius
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_radial_gradient_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t inner /**< */,
- xcb_render_pointfix_t outer /**< */,
- xcb_render_fixed_t inner_radius /**< */,
- xcb_render_fixed_t outer_radius /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_radial_gradient_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.inner = inner;
- xcb_out.outer = outer;
- xcb_out.inner_radius = inner_radius;
- xcb_out.outer_radius = outer_radius;
- xcb_out.num_stops = num_stops;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_radial_gradient
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t inner
- ** @param xcb_render_pointfix_t outer
- ** @param xcb_render_fixed_t inner_radius
- ** @param xcb_render_fixed_t outer_radius
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_radial_gradient (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t inner /**< */,
- xcb_render_pointfix_t outer /**< */,
- xcb_render_fixed_t inner_radius /**< */,
- xcb_render_fixed_t outer_radius /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_radial_gradient_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.inner = inner;
- xcb_out.outer = outer;
- xcb_out.inner_radius = inner_radius;
- xcb_out.outer_radius = outer_radius;
- xcb_out.num_stops = num_stops;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_conical_gradient_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t center
- ** @param xcb_render_fixed_t angle
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_conical_gradient_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t center /**< */,
- xcb_render_fixed_t angle /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_conical_gradient_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.center = center;
- xcb_out.angle = angle;
- xcb_out.num_stops = num_stops;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_render_create_conical_gradient
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_render_pointfix_t center
- ** @param xcb_render_fixed_t angle
- ** @param uint32_t num_stops
- ** @param const xcb_render_fixed_t *stops
- ** @param const xcb_render_color_t *colors
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_render_create_conical_gradient (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_render_pointfix_t center /**< */,
- xcb_render_fixed_t angle /**< */,
- uint32_t num_stops /**< */,
- const xcb_render_fixed_t *stops /**< */,
- const xcb_render_color_t *colors /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_render_id,
- /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_render_create_conical_gradient_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.center = center;
- xcb_out.angle = angle;
- xcb_out.num_stops = num_stops;
-
- 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_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
deleted file mode 100644
index 98621c4983..0000000000
--- a/src/3rdparty/xcb/libxcb/shape.c
+++ /dev/null
@@ -1,1102 +0,0 @@
-/*
- * This file generated automatically from shape.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 "shape.h"
-
-#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
-#include "xproto.h"
-
-xcb_extension_t xcb_shape_id = { "SHAPE", 0 };
-
-
-/*****************************************************************************
- **
- ** void xcb_shape_op_next
- **
- ** @param xcb_shape_op_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_shape_op_next (xcb_shape_op_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_shape_op_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_shape_op_end
- **
- ** @param xcb_shape_op_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_shape_op_end (xcb_shape_op_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_shape_kind_next
- **
- ** @param xcb_shape_kind_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_shape_kind_next (xcb_shape_kind_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_shape_kind_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_shape_kind_end
- **
- ** @param xcb_shape_kind_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_shape_kind_end (xcb_shape_kind_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_shape_query_version_cookie_t xcb_shape_query_version
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_shape_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_query_version_cookie_t
-xcb_shape_query_version (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shape_query_version_cookie_t xcb_ret;
- xcb_shape_query_version_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_shape_query_version_cookie_t xcb_shape_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_shape_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_query_version_cookie_t
-xcb_shape_query_version_unchecked (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shape_query_version_cookie_t xcb_ret;
- xcb_shape_query_version_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_shape_query_version_reply_t * xcb_shape_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shape_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_shape_query_version_reply_t *
-xcb_shape_query_version_reply (xcb_connection_t *c /**< */,
- xcb_shape_query_version_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_rectangles_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param uint8_t ordering
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_rectangles_checked (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- uint8_t ordering /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_RECTANGLES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_rectangles_request_t xcb_out;
-
- xcb_out.operation = operation;
- xcb_out.destination_kind = destination_kind;
- xcb_out.ordering = ordering;
- xcb_out.pad0 = 0;
- xcb_out.destination_window = destination_window;
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_rectangles
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param uint8_t ordering
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_rectangles (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- uint8_t ordering /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_RECTANGLES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_rectangles_request_t xcb_out;
-
- xcb_out.operation = operation;
- xcb_out.destination_kind = destination_kind;
- xcb_out.ordering = ordering;
- xcb_out.pad0 = 0;
- xcb_out.destination_window = destination_window;
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_mask_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_pixmap_t source_bitmap
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_mask_checked (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_pixmap_t source_bitmap /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_MASK,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_mask_request_t xcb_out;
-
- xcb_out.operation = operation;
- xcb_out.destination_kind = destination_kind;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.destination_window = destination_window;
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
- xcb_out.source_bitmap = source_bitmap;
-
- 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_shape_mask
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_pixmap_t source_bitmap
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_mask (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_pixmap_t source_bitmap /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_MASK,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_mask_request_t xcb_out;
-
- xcb_out.operation = operation;
- xcb_out.destination_kind = destination_kind;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.destination_window = destination_window;
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
- xcb_out.source_bitmap = source_bitmap;
-
- 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_shape_combine_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_shape_kind_t source_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_window_t source_window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_combine_checked (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_shape_kind_t source_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_window_t source_window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_COMBINE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_combine_request_t xcb_out;
-
- xcb_out.operation = operation;
- xcb_out.destination_kind = destination_kind;
- xcb_out.source_kind = source_kind;
- xcb_out.pad0 = 0;
- xcb_out.destination_window = destination_window;
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
- xcb_out.source_window = source_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_shape_combine
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_op_t operation
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_shape_kind_t source_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_window_t source_window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_combine (xcb_connection_t *c /**< */,
- xcb_shape_op_t operation /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_shape_kind_t source_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_window_t source_window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_COMBINE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_combine_request_t xcb_out;
-
- xcb_out.operation = operation;
- xcb_out.destination_kind = destination_kind;
- xcb_out.source_kind = source_kind;
- xcb_out.pad0 = 0;
- xcb_out.destination_window = destination_window;
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
- xcb_out.source_window = source_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_void_cookie_t xcb_shape_offset_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_offset_checked (xcb_connection_t *c /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_OFFSET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_offset_request_t xcb_out;
-
- xcb_out.destination_kind = destination_kind;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.destination_window = destination_window;
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
-
- 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_shape_offset
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_kind_t destination_kind
- ** @param xcb_window_t destination_window
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_offset (xcb_connection_t *c /**< */,
- xcb_shape_kind_t destination_kind /**< */,
- xcb_window_t destination_window /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_OFFSET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_offset_request_t xcb_out;
-
- xcb_out.destination_kind = destination_kind;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.destination_window = destination_window;
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
-
- 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_shape_query_extents_cookie_t xcb_shape_query_extents
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @returns xcb_shape_query_extents_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_query_extents_cookie_t
-xcb_shape_query_extents (xcb_connection_t *c /**< */,
- xcb_window_t destination_window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_QUERY_EXTENTS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shape_query_extents_cookie_t xcb_ret;
- xcb_shape_query_extents_request_t xcb_out;
-
- xcb_out.destination_window = destination_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_shape_query_extents_cookie_t xcb_shape_query_extents_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @returns xcb_shape_query_extents_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_query_extents_cookie_t
-xcb_shape_query_extents_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t destination_window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_QUERY_EXTENTS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shape_query_extents_cookie_t xcb_ret;
- xcb_shape_query_extents_request_t xcb_out;
-
- xcb_out.destination_window = destination_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_shape_query_extents_reply_t * xcb_shape_query_extents_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_query_extents_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shape_query_extents_reply_t *
- **
- *****************************************************************************/
-
-xcb_shape_query_extents_reply_t *
-xcb_shape_query_extents_reply (xcb_connection_t *c /**< */,
- xcb_shape_query_extents_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_shape_query_extents_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shape_select_input_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @param uint8_t enable
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_select_input_checked (xcb_connection_t *c /**< */,
- xcb_window_t destination_window /**< */,
- uint8_t enable /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_SELECT_INPUT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_select_input_request_t xcb_out;
-
- xcb_out.destination_window = destination_window;
- xcb_out.enable = enable;
- 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_shape_select_input
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @param uint8_t enable
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shape_select_input (xcb_connection_t *c /**< */,
- xcb_window_t destination_window /**< */,
- uint8_t enable /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_SELECT_INPUT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shape_select_input_request_t xcb_out;
-
- xcb_out.destination_window = destination_window;
- xcb_out.enable = enable;
- 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_shape_input_selected_cookie_t xcb_shape_input_selected
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @returns xcb_shape_input_selected_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_input_selected_cookie_t
-xcb_shape_input_selected (xcb_connection_t *c /**< */,
- xcb_window_t destination_window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_INPUT_SELECTED,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shape_input_selected_cookie_t xcb_ret;
- xcb_shape_input_selected_request_t xcb_out;
-
- xcb_out.destination_window = destination_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_shape_input_selected_cookie_t xcb_shape_input_selected_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t destination_window
- ** @returns xcb_shape_input_selected_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_input_selected_cookie_t
-xcb_shape_input_selected_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t destination_window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_INPUT_SELECTED,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shape_input_selected_cookie_t xcb_ret;
- xcb_shape_input_selected_request_t xcb_out;
-
- xcb_out.destination_window = destination_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_shape_input_selected_reply_t * xcb_shape_input_selected_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_input_selected_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shape_input_selected_reply_t *
- **
- *****************************************************************************/
-
-xcb_shape_input_selected_reply_t *
-xcb_shape_input_selected_reply (xcb_connection_t *c /**< */,
- xcb_shape_input_selected_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_shape_kind_t source_kind
- ** @returns xcb_shape_get_rectangles_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_get_rectangles_cookie_t
-xcb_shape_get_rectangles (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_shape_kind_t source_kind /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_GET_RECTANGLES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shape_get_rectangles_cookie_t xcb_ret;
- xcb_shape_get_rectangles_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.source_kind = source_kind;
- 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_shape_get_rectangles_cookie_t xcb_shape_get_rectangles_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_shape_kind_t source_kind
- ** @returns xcb_shape_get_rectangles_cookie_t
- **
- *****************************************************************************/
-
-xcb_shape_get_rectangles_cookie_t
-xcb_shape_get_rectangles_unchecked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_shape_kind_t source_kind /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shape_id,
- /* opcode */ XCB_SHAPE_GET_RECTANGLES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shape_get_rectangles_cookie_t xcb_ret;
- xcb_shape_get_rectangles_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.source_kind = source_kind;
- 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_rectangle_t * xcb_shape_get_rectangles_rectangles
- **
- ** @param const xcb_shape_get_rectangles_reply_t *R
- ** @returns xcb_rectangle_t *
- **
- *****************************************************************************/
-
-xcb_rectangle_t *
-xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R /**< */)
-{
- return (xcb_rectangle_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_shape_get_rectangles_rectangles_length
- **
- ** @param const xcb_shape_get_rectangles_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R /**< */)
-{
- return R->rectangles_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_rectangle_iterator_t xcb_shape_get_rectangles_rectangles_iterator
- **
- ** @param const xcb_shape_get_rectangles_reply_t *R
- ** @returns xcb_rectangle_iterator_t
- **
- *****************************************************************************/
-
-xcb_rectangle_iterator_t
-xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R /**< */)
-{
- xcb_rectangle_iterator_t i;
- i.data = (xcb_rectangle_t *) (R + 1);
- i.rem = R->rectangles_len;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_shape_get_rectangles_reply_t * xcb_shape_get_rectangles_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shape_get_rectangles_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shape_get_rectangles_reply_t *
- **
- *****************************************************************************/
-
-xcb_shape_get_rectangles_reply_t *
-xcb_shape_get_rectangles_reply (xcb_connection_t *c /**< */,
- xcb_shape_get_rectangles_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_shape_get_rectangles_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
diff --git a/src/3rdparty/xcb/libxcb/shm.c b/src/3rdparty/xcb/libxcb/shm.c
deleted file mode 100644
index 0a1c238732..0000000000
--- a/src/3rdparty/xcb/libxcb/shm.c
+++ /dev/null
@@ -1,724 +0,0 @@
-/*
- * This file generated automatically from shm.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 "shm.h"
-
-#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
-#include "xproto.h"
-
-xcb_extension_t xcb_shm_id = { "MIT-SHM", 0 };
-
-
-/*****************************************************************************
- **
- ** void xcb_shm_seg_next
- **
- ** @param xcb_shm_seg_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_shm_seg_next (xcb_shm_seg_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_shm_seg_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_shm_seg_end
- **
- ** @param xcb_shm_seg_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_shm_seg_end (xcb_shm_seg_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_shm_query_version_cookie_t xcb_shm_query_version
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_shm_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_shm_query_version_cookie_t
-xcb_shm_query_version (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shm_query_version_cookie_t xcb_ret;
- xcb_shm_query_version_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_shm_query_version_cookie_t xcb_shm_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_shm_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_shm_query_version_cookie_t
-xcb_shm_query_version_unchecked (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shm_query_version_cookie_t xcb_ret;
- xcb_shm_query_version_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_shm_query_version_reply_t * xcb_shm_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shm_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_shm_query_version_reply_t *
-xcb_shm_query_version_reply (xcb_connection_t *c /**< */,
- xcb_shm_query_version_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_shm_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shm_attach_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t shmid
- ** @param uint8_t read_only
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_attach_checked (xcb_connection_t *c /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t shmid /**< */,
- uint8_t read_only /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_ATTACH,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shm_attach_request_t xcb_out;
-
- xcb_out.shmseg = shmseg;
- xcb_out.shmid = shmid;
- xcb_out.read_only = read_only;
- 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_shm_attach
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t shmid
- ** @param uint8_t read_only
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_attach (xcb_connection_t *c /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t shmid /**< */,
- uint8_t read_only /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_ATTACH,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shm_attach_request_t xcb_out;
-
- xcb_out.shmseg = shmseg;
- xcb_out.shmid = shmid;
- xcb_out.read_only = read_only;
- 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_shm_detach_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_seg_t shmseg
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_detach_checked (xcb_connection_t *c /**< */,
- xcb_shm_seg_t shmseg /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_DETACH,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shm_detach_request_t xcb_out;
-
- xcb_out.shmseg = shmseg;
-
- 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_shm_detach
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_seg_t shmseg
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_detach (xcb_connection_t *c /**< */,
- xcb_shm_seg_t shmseg /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_DETACH,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shm_detach_request_t xcb_out;
-
- xcb_out.shmseg = shmseg;
-
- 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_shm_put_image_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @param xcb_gcontext_t gc
- ** @param uint16_t total_width
- ** @param uint16_t total_height
- ** @param uint16_t src_x
- ** @param uint16_t src_y
- ** @param uint16_t src_width
- ** @param uint16_t src_height
- ** @param int16_t dst_x
- ** @param int16_t dst_y
- ** @param uint8_t depth
- ** @param uint8_t format
- ** @param uint8_t send_event
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_put_image_checked (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */,
- xcb_gcontext_t gc /**< */,
- uint16_t total_width /**< */,
- uint16_t total_height /**< */,
- uint16_t src_x /**< */,
- uint16_t src_y /**< */,
- uint16_t src_width /**< */,
- uint16_t src_height /**< */,
- int16_t dst_x /**< */,
- int16_t dst_y /**< */,
- uint8_t depth /**< */,
- uint8_t format /**< */,
- uint8_t send_event /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_PUT_IMAGE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shm_put_image_request_t xcb_out;
-
- xcb_out.drawable = drawable;
- xcb_out.gc = gc;
- xcb_out.total_width = total_width;
- xcb_out.total_height = total_height;
- 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.depth = depth;
- xcb_out.format = format;
- xcb_out.send_event = send_event;
- xcb_out.pad0 = 0;
- xcb_out.shmseg = shmseg;
- xcb_out.offset = offset;
-
- 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_shm_put_image
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @param xcb_gcontext_t gc
- ** @param uint16_t total_width
- ** @param uint16_t total_height
- ** @param uint16_t src_x
- ** @param uint16_t src_y
- ** @param uint16_t src_width
- ** @param uint16_t src_height
- ** @param int16_t dst_x
- ** @param int16_t dst_y
- ** @param uint8_t depth
- ** @param uint8_t format
- ** @param uint8_t send_event
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_put_image (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */,
- xcb_gcontext_t gc /**< */,
- uint16_t total_width /**< */,
- uint16_t total_height /**< */,
- uint16_t src_x /**< */,
- uint16_t src_y /**< */,
- uint16_t src_width /**< */,
- uint16_t src_height /**< */,
- int16_t dst_x /**< */,
- int16_t dst_y /**< */,
- uint8_t depth /**< */,
- uint8_t format /**< */,
- uint8_t send_event /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_PUT_IMAGE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shm_put_image_request_t xcb_out;
-
- xcb_out.drawable = drawable;
- xcb_out.gc = gc;
- xcb_out.total_width = total_width;
- xcb_out.total_height = total_height;
- 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.depth = depth;
- xcb_out.format = format;
- xcb_out.send_event = send_event;
- xcb_out.pad0 = 0;
- xcb_out.shmseg = shmseg;
- xcb_out.offset = offset;
-
- 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_shm_get_image_cookie_t xcb_shm_get_image
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @param int16_t x
- ** @param int16_t y
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint32_t plane_mask
- ** @param uint8_t format
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_shm_get_image_cookie_t
- **
- *****************************************************************************/
-
-xcb_shm_get_image_cookie_t
-xcb_shm_get_image (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */,
- int16_t x /**< */,
- int16_t y /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint32_t plane_mask /**< */,
- uint8_t format /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_GET_IMAGE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shm_get_image_cookie_t xcb_ret;
- xcb_shm_get_image_request_t xcb_out;
-
- xcb_out.drawable = drawable;
- xcb_out.x = x;
- xcb_out.y = y;
- xcb_out.width = width;
- xcb_out.height = height;
- xcb_out.plane_mask = plane_mask;
- xcb_out.format = format;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.shmseg = shmseg;
- xcb_out.offset = offset;
-
- 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_shm_get_image_cookie_t xcb_shm_get_image_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_drawable_t drawable
- ** @param int16_t x
- ** @param int16_t y
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint32_t plane_mask
- ** @param uint8_t format
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_shm_get_image_cookie_t
- **
- *****************************************************************************/
-
-xcb_shm_get_image_cookie_t
-xcb_shm_get_image_unchecked (xcb_connection_t *c /**< */,
- xcb_drawable_t drawable /**< */,
- int16_t x /**< */,
- int16_t y /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint32_t plane_mask /**< */,
- uint8_t format /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_GET_IMAGE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_shm_get_image_cookie_t xcb_ret;
- xcb_shm_get_image_request_t xcb_out;
-
- xcb_out.drawable = drawable;
- xcb_out.x = x;
- xcb_out.y = y;
- xcb_out.width = width;
- xcb_out.height = height;
- xcb_out.plane_mask = plane_mask;
- xcb_out.format = format;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.shmseg = shmseg;
- xcb_out.offset = offset;
-
- 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_shm_get_image_reply_t * xcb_shm_get_image_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_shm_get_image_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_shm_get_image_reply_t *
- **
- *****************************************************************************/
-
-xcb_shm_get_image_reply_t *
-xcb_shm_get_image_reply (xcb_connection_t *c /**< */,
- xcb_shm_get_image_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_shm_get_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_shm_create_pixmap_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_pixmap_t pid
- ** @param xcb_drawable_t drawable
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint8_t depth
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */,
- xcb_pixmap_t pid /**< */,
- xcb_drawable_t drawable /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint8_t depth /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_CREATE_PIXMAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shm_create_pixmap_request_t xcb_out;
-
- xcb_out.pid = pid;
- xcb_out.drawable = drawable;
- xcb_out.width = width;
- xcb_out.height = height;
- xcb_out.depth = depth;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.shmseg = shmseg;
- xcb_out.offset = offset;
-
- 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_shm_create_pixmap
- **
- ** @param xcb_connection_t *c
- ** @param xcb_pixmap_t pid
- ** @param xcb_drawable_t drawable
- ** @param uint16_t width
- ** @param uint16_t height
- ** @param uint8_t depth
- ** @param xcb_shm_seg_t shmseg
- ** @param uint32_t offset
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_shm_create_pixmap (xcb_connection_t *c /**< */,
- xcb_pixmap_t pid /**< */,
- xcb_drawable_t drawable /**< */,
- uint16_t width /**< */,
- uint16_t height /**< */,
- uint8_t depth /**< */,
- xcb_shm_seg_t shmseg /**< */,
- uint32_t offset /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_shm_id,
- /* opcode */ XCB_SHM_CREATE_PIXMAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_shm_create_pixmap_request_t xcb_out;
-
- xcb_out.pid = pid;
- xcb_out.drawable = drawable;
- xcb_out.width = width;
- xcb_out.height = height;
- xcb_out.depth = depth;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.shmseg = shmseg;
- xcb_out.offset = offset;
-
- 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;
-}
-
diff --git a/src/3rdparty/xcb/libxcb/sync.c b/src/3rdparty/xcb/libxcb/sync.c
deleted file mode 100644
index 1f352756d8..0000000000
--- a/src/3rdparty/xcb/libxcb/sync.c
+++ /dev/null
@@ -1,2258 +0,0 @@
-/*
- * This file generated automatically from sync.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 "sync.h"
-
-#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
-#include "xproto.h"
-
-xcb_extension_t xcb_sync_id = { "SYNC", 0 };
-
-
-/*****************************************************************************
- **
- ** void xcb_sync_alarm_next
- **
- ** @param xcb_sync_alarm_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_alarm_next (xcb_sync_alarm_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_sync_alarm_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_sync_alarm_end
- **
- ** @param xcb_sync_alarm_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_alarm_end (xcb_sync_alarm_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_counter_next
- **
- ** @param xcb_sync_counter_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_counter_next (xcb_sync_counter_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_sync_counter_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_sync_counter_end
- **
- ** @param xcb_sync_counter_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_counter_end (xcb_sync_counter_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_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
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_int64_next (xcb_sync_int64_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_sync_int64_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_sync_int64_end
- **
- ** @param xcb_sync_int64_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_int64_end (xcb_sync_int64_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_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;
-}
-
-
-/*****************************************************************************
- **
- ** char * xcb_sync_systemcounter_name
- **
- ** @param const xcb_sync_systemcounter_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_sync_systemcounter_name (const xcb_sync_systemcounter_t *R /**< */)
-{
- return (char *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_sync_systemcounter_name_length
- **
- ** @param const xcb_sync_systemcounter_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_sync_systemcounter_name_length (const xcb_sync_systemcounter_t *R /**< */)
-{
- return R->name_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_sync_systemcounter_name_end
- **
- ** @param const xcb_sync_systemcounter_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_systemcounter_name_end (const xcb_sync_systemcounter_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_sync_systemcounter_next
- **
- ** @param xcb_sync_systemcounter_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_systemcounter_next (xcb_sync_systemcounter_iterator_t *i /**< */)
-{
- xcb_sync_systemcounter_t *R = i->data;
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_sync_systemcounter_end
- **
- ** @param xcb_sync_systemcounter_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_systemcounter_end (xcb_sync_systemcounter_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_sync_systemcounter_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_sync_trigger_next
- **
- ** @param xcb_sync_trigger_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_trigger_next (xcb_sync_trigger_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_sync_trigger_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_sync_trigger_end
- **
- ** @param xcb_sync_trigger_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_trigger_end (xcb_sync_trigger_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_waitcondition_next
- **
- ** @param xcb_sync_waitcondition_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_sync_waitcondition_next (xcb_sync_waitcondition_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_sync_waitcondition_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_sync_waitcondition_end
- **
- ** @param xcb_sync_waitcondition_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_sync_waitcondition_end (xcb_sync_waitcondition_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_sync_initialize_cookie_t xcb_sync_initialize
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t desired_major_version
- ** @param uint8_t desired_minor_version
- ** @returns xcb_sync_initialize_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_initialize_cookie_t
-xcb_sync_initialize (xcb_connection_t *c /**< */,
- uint8_t desired_major_version /**< */,
- uint8_t desired_minor_version /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_INITIALIZE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_initialize_cookie_t xcb_ret;
- xcb_sync_initialize_request_t xcb_out;
-
- xcb_out.desired_major_version = desired_major_version;
- xcb_out.desired_minor_version = desired_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_sync_initialize_cookie_t xcb_sync_initialize_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t desired_major_version
- ** @param uint8_t desired_minor_version
- ** @returns xcb_sync_initialize_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_initialize_cookie_t
-xcb_sync_initialize_unchecked (xcb_connection_t *c /**< */,
- uint8_t desired_major_version /**< */,
- uint8_t desired_minor_version /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_INITIALIZE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_initialize_cookie_t xcb_ret;
- xcb_sync_initialize_request_t xcb_out;
-
- xcb_out.desired_major_version = desired_major_version;
- xcb_out.desired_minor_version = desired_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_sync_initialize_reply_t * xcb_sync_initialize_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_initialize_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_initialize_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_initialize_reply_t *
-xcb_sync_initialize_reply (xcb_connection_t *c /**< */,
- xcb_sync_initialize_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_sync_list_system_counters_cookie_t xcb_sync_list_system_counters
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_sync_list_system_counters_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_list_system_counters_cookie_t
-xcb_sync_list_system_counters (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_LIST_SYSTEM_COUNTERS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_list_system_counters_cookie_t xcb_ret;
- xcb_sync_list_system_counters_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_sync_list_system_counters_cookie_t xcb_sync_list_system_counters_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_sync_list_system_counters_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_list_system_counters_cookie_t
-xcb_sync_list_system_counters_unchecked (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_LIST_SYSTEM_COUNTERS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_list_system_counters_cookie_t xcb_ret;
- xcb_sync_list_system_counters_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;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_sync_list_system_counters_counters_length
- **
- ** @param const xcb_sync_list_system_counters_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_sync_list_system_counters_counters_length (const xcb_sync_list_system_counters_reply_t *R /**< */)
-{
- return R->counters_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_sync_systemcounter_iterator_t xcb_sync_list_system_counters_counters_iterator
- **
- ** @param const xcb_sync_list_system_counters_reply_t *R
- ** @returns xcb_sync_systemcounter_iterator_t
- **
- *****************************************************************************/
-
-xcb_sync_systemcounter_iterator_t
-xcb_sync_list_system_counters_counters_iterator (const xcb_sync_list_system_counters_reply_t *R /**< */)
-{
- xcb_sync_systemcounter_iterator_t i;
- i.data = (xcb_sync_systemcounter_t *) (R + 1);
- i.rem = R->counters_len;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_sync_list_system_counters_reply_t * xcb_sync_list_system_counters_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_list_system_counters_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_list_system_counters_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_list_system_counters_reply_t *
-xcb_sync_list_system_counters_reply (xcb_connection_t *c /**< */,
- xcb_sync_list_system_counters_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_sync_list_system_counters_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_create_counter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t id
- ** @param xcb_sync_int64_t initial_value
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_create_counter_checked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t id /**< */,
- xcb_sync_int64_t initial_value /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_CREATE_COUNTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_create_counter_request_t xcb_out;
-
- xcb_out.id = id;
- xcb_out.initial_value = initial_value;
-
- 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_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t id
- ** @param xcb_sync_int64_t initial_value
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_create_counter (xcb_connection_t *c /**< */,
- xcb_sync_counter_t id /**< */,
- xcb_sync_int64_t initial_value /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_CREATE_COUNTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_create_counter_request_t xcb_out;
-
- xcb_out.id = id;
- xcb_out.initial_value = initial_value;
-
- 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_counter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_destroy_counter_checked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_DESTROY_COUNTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_destroy_counter_request_t xcb_out;
-
- xcb_out.counter = counter;
-
- 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_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_destroy_counter (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_DESTROY_COUNTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_destroy_counter_request_t xcb_out;
-
- xcb_out.counter = counter;
-
- 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_counter_cookie_t xcb_sync_query_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @returns xcb_sync_query_counter_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_query_counter_cookie_t
-xcb_sync_query_counter (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_QUERY_COUNTER,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_query_counter_cookie_t xcb_ret;
- xcb_sync_query_counter_request_t xcb_out;
-
- xcb_out.counter = counter;
-
- 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_counter_cookie_t xcb_sync_query_counter_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @returns xcb_sync_query_counter_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_query_counter_cookie_t
-xcb_sync_query_counter_unchecked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_QUERY_COUNTER,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_query_counter_cookie_t xcb_ret;
- xcb_sync_query_counter_request_t xcb_out;
-
- xcb_out.counter = counter;
-
- 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_counter_reply_t * xcb_sync_query_counter_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_query_counter_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_query_counter_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_query_counter_reply_t *
-xcb_sync_query_counter_reply (xcb_connection_t *c /**< */,
- xcb_sync_query_counter_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_await_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t wait_list_len
- ** @param const xcb_sync_waitcondition_t *wait_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_await_checked (xcb_connection_t *c /**< */,
- uint32_t wait_list_len /**< */,
- const xcb_sync_waitcondition_t *wait_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_AWAIT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_await_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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_await
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t wait_list_len
- ** @param const xcb_sync_waitcondition_t *wait_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_await (xcb_connection_t *c /**< */,
- uint32_t wait_list_len /**< */,
- const xcb_sync_waitcondition_t *wait_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_AWAIT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_await_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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_change_counter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @param xcb_sync_int64_t amount
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_change_counter_checked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */,
- xcb_sync_int64_t amount /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_CHANGE_COUNTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_change_counter_request_t xcb_out;
-
- xcb_out.counter = counter;
- xcb_out.amount = amount;
-
- 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_change_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @param xcb_sync_int64_t amount
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_change_counter (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */,
- xcb_sync_int64_t amount /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_CHANGE_COUNTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_change_counter_request_t xcb_out;
-
- xcb_out.counter = counter;
- xcb_out.amount = amount;
-
- 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_set_counter_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @param xcb_sync_int64_t value
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_set_counter_checked (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */,
- xcb_sync_int64_t value /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_SET_COUNTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_set_counter_request_t xcb_out;
-
- xcb_out.counter = counter;
- xcb_out.value = value;
-
- 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_set_counter
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_counter_t counter
- ** @param xcb_sync_int64_t value
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_set_counter (xcb_connection_t *c /**< */,
- xcb_sync_counter_t counter /**< */,
- xcb_sync_int64_t value /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_SET_COUNTER,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_set_counter_request_t xcb_out;
-
- xcb_out.counter = counter;
- xcb_out.value = value;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_create_alarm_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t id
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_create_alarm_checked (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t id /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_CREATE_ALARM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_create_alarm_request_t xcb_out;
-
- xcb_out.id = id;
- xcb_out.value_mask = value_mask;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_create_alarm
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t id
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_create_alarm (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t id /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_CREATE_ALARM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_create_alarm_request_t xcb_out;
-
- xcb_out.id = id;
- xcb_out.value_mask = value_mask;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_change_alarm_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t id
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_change_alarm_checked (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t id /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_CHANGE_ALARM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_change_alarm_request_t xcb_out;
-
- xcb_out.id = id;
- xcb_out.value_mask = value_mask;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_change_alarm
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t id
- ** @param uint32_t value_mask
- ** @param const uint32_t *value_list
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_change_alarm (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t id /**< */,
- uint32_t value_mask /**< */,
- const uint32_t *value_list /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_CHANGE_ALARM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_change_alarm_request_t xcb_out;
-
- xcb_out.id = id;
- xcb_out.value_mask = value_mask;
-
- 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 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_destroy_alarm_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t alarm
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_destroy_alarm_checked (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t alarm /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_DESTROY_ALARM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_destroy_alarm_request_t xcb_out;
-
- xcb_out.alarm = alarm;
-
- 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_alarm
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t alarm
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_destroy_alarm (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t alarm /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_DESTROY_ALARM,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_destroy_alarm_request_t xcb_out;
-
- xcb_out.alarm = alarm;
-
- 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_alarm_cookie_t xcb_sync_query_alarm
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t alarm
- ** @returns xcb_sync_query_alarm_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_query_alarm_cookie_t
-xcb_sync_query_alarm (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t alarm /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_QUERY_ALARM,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_query_alarm_cookie_t xcb_ret;
- xcb_sync_query_alarm_request_t xcb_out;
-
- xcb_out.alarm = alarm;
-
- 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_alarm_cookie_t xcb_sync_query_alarm_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_alarm_t alarm
- ** @returns xcb_sync_query_alarm_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_query_alarm_cookie_t
-xcb_sync_query_alarm_unchecked (xcb_connection_t *c /**< */,
- xcb_sync_alarm_t alarm /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_QUERY_ALARM,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_query_alarm_cookie_t xcb_ret;
- xcb_sync_query_alarm_request_t xcb_out;
-
- xcb_out.alarm = alarm;
-
- 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_alarm_reply_t * xcb_sync_query_alarm_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_query_alarm_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_query_alarm_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_query_alarm_reply_t *
-xcb_sync_query_alarm_reply (xcb_connection_t *c /**< */,
- xcb_sync_query_alarm_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_sync_query_alarm_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_sync_set_priority_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t id
- ** @param int32_t priority
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_set_priority_checked (xcb_connection_t *c /**< */,
- uint32_t id /**< */,
- int32_t priority /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_SET_PRIORITY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_set_priority_request_t xcb_out;
-
- xcb_out.id = id;
- xcb_out.priority = priority;
-
- 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_set_priority
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t id
- ** @param int32_t priority
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_sync_set_priority (xcb_connection_t *c /**< */,
- uint32_t id /**< */,
- int32_t priority /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_SET_PRIORITY,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_sync_set_priority_request_t xcb_out;
-
- xcb_out.id = id;
- xcb_out.priority = priority;
-
- 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_get_priority_cookie_t xcb_sync_get_priority
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t id
- ** @returns xcb_sync_get_priority_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_get_priority_cookie_t
-xcb_sync_get_priority (xcb_connection_t *c /**< */,
- uint32_t id /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_GET_PRIORITY,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_get_priority_cookie_t xcb_ret;
- xcb_sync_get_priority_request_t xcb_out;
-
- xcb_out.id = id;
-
- 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_get_priority_cookie_t xcb_sync_get_priority_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t id
- ** @returns xcb_sync_get_priority_cookie_t
- **
- *****************************************************************************/
-
-xcb_sync_get_priority_cookie_t
-xcb_sync_get_priority_unchecked (xcb_connection_t *c /**< */,
- uint32_t id /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_sync_id,
- /* opcode */ XCB_SYNC_GET_PRIORITY,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_sync_get_priority_cookie_t xcb_ret;
- xcb_sync_get_priority_request_t xcb_out;
-
- xcb_out.id = id;
-
- 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_get_priority_reply_t * xcb_sync_get_priority_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_sync_get_priority_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_sync_get_priority_reply_t *
- **
- *****************************************************************************/
-
-xcb_sync_get_priority_reply_t *
-xcb_sync_get_priority_reply (xcb_connection_t *c /**< */,
- xcb_sync_get_priority_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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
deleted file mode 100644
index 4c0dc84b64..0000000000
--- a/src/3rdparty/xcb/libxcb/xfixes.c
+++ /dev/null
@@ -1,3274 +0,0 @@
-/*
- * This file generated automatically from xfixes.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 "xfixes.h"
-
-#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
-#include "xproto.h"
-#include "render.h"
-#include "shape.h"
-
-xcb_extension_t xcb_xfixes_id = { "XFIXES", 0 };
-
-
-/*****************************************************************************
- **
- ** xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t client_major_version
- ** @param uint32_t client_minor_version
- ** @returns xcb_xfixes_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_query_version_cookie_t
-xcb_xfixes_query_version (xcb_connection_t *c /**< */,
- uint32_t client_major_version /**< */,
- uint32_t client_minor_version /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_query_version_cookie_t xcb_ret;
- xcb_xfixes_query_version_request_t xcb_out;
-
- xcb_out.client_major_version = client_major_version;
- xcb_out.client_minor_version = client_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_xfixes_query_version_cookie_t xcb_xfixes_query_version_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint32_t client_major_version
- ** @param uint32_t client_minor_version
- ** @returns xcb_xfixes_query_version_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_query_version_cookie_t
-xcb_xfixes_query_version_unchecked (xcb_connection_t *c /**< */,
- uint32_t client_major_version /**< */,
- uint32_t client_minor_version /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_QUERY_VERSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_query_version_cookie_t xcb_ret;
- xcb_xfixes_query_version_request_t xcb_out;
-
- xcb_out.client_major_version = client_major_version;
- xcb_out.client_minor_version = client_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_xfixes_query_version_reply_t * xcb_xfixes_query_version_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_query_version_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_query_version_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_query_version_reply_t *
-xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */,
- xcb_xfixes_query_version_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xfixes_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_change_save_set_checked
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t mode
- ** @param uint8_t target
- ** @param uint8_t map
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */,
- uint8_t mode /**< */,
- uint8_t target /**< */,
- uint8_t map /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_change_save_set_request_t xcb_out;
-
- xcb_out.mode = mode;
- xcb_out.target = target;
- xcb_out.map = map;
- xcb_out.pad0 = 0;
- xcb_out.window = window;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_change_save_set
- **
- ** @param xcb_connection_t *c
- ** @param uint8_t mode
- ** @param uint8_t target
- ** @param uint8_t map
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_save_set (xcb_connection_t *c /**< */,
- uint8_t mode /**< */,
- uint8_t target /**< */,
- uint8_t map /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_change_save_set_request_t xcb_out;
-
- xcb_out.mode = mode;
- xcb_out.target = target;
- xcb_out.map = map;
- xcb_out.pad0 = 0;
- 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_void_cookie_t xcb_xfixes_select_selection_input_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_atom_t selection
- ** @param uint32_t event_mask
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_atom_t selection /**< */,
- uint32_t event_mask /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_select_selection_input_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.selection = selection;
- xcb_out.event_mask = event_mask;
-
- 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_xfixes_select_selection_input
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param xcb_atom_t selection
- ** @param uint32_t event_mask
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- xcb_atom_t selection /**< */,
- uint32_t event_mask /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_select_selection_input_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.selection = selection;
- xcb_out.event_mask = event_mask;
-
- 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_xfixes_select_cursor_input_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint32_t event_mask
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint32_t event_mask /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_select_cursor_input_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.event_mask = event_mask;
-
- 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_xfixes_select_cursor_input
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @param uint32_t event_mask
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */,
- uint32_t event_mask /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_select_cursor_input_request_t xcb_out;
-
- xcb_out.window = window;
- xcb_out.event_mask = event_mask;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_xfixes_get_cursor_image_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_cookie_t
-xcb_xfixes_get_cursor_image (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_get_cursor_image_cookie_t xcb_ret;
- xcb_xfixes_get_cursor_image_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_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_xfixes_get_cursor_image_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_cookie_t
-xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_get_cursor_image_cookie_t xcb_ret;
- xcb_xfixes_get_cursor_image_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;
-}
-
-
-/*****************************************************************************
- **
- ** uint32_t * xcb_xfixes_get_cursor_image_cursor_image
- **
- ** @param const xcb_xfixes_get_cursor_image_reply_t *R
- ** @returns uint32_t *
- **
- *****************************************************************************/
-
-uint32_t *
-xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R /**< */)
-{
- return (uint32_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_get_cursor_image_cursor_image_length
- **
- ** @param const xcb_xfixes_get_cursor_image_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R /**< */)
-{
- return (R->width * R->height);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_cursor_image_end
- **
- ** @param const xcb_xfixes_get_cursor_image_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((uint32_t *) (R + 1)) + ((R->width * R->height));
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_image_reply_t * xcb_xfixes_get_cursor_image_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_get_cursor_image_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_get_cursor_image_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_reply_t *
-xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c /**< */,
- xcb_xfixes_get_cursor_image_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xfixes_get_cursor_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xfixes_region_next
- **
- ** @param xcb_xfixes_region_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xfixes_region_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xfixes_region_end
- **
- ** @param xcb_xfixes_region_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xfixes_region_end (xcb_xfixes_region_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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_create_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_request_t xcb_out;
-
- xcb_out.region = region;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_create_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_request_t xcb_out;
-
- xcb_out.region = region;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_pixmap_t bitmap
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_pixmap_t bitmap /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_from_bitmap_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.bitmap = bitmap;
-
- 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_xfixes_create_region_from_bitmap
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_pixmap_t bitmap
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_pixmap_t bitmap /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_from_bitmap_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.bitmap = bitmap;
-
- 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_xfixes_create_region_from_window_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_window_t window
- ** @param xcb_shape_kind_t kind
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_window_t window /**< */,
- xcb_shape_kind_t kind /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_from_window_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.window = window;
- xcb_out.kind = kind;
- 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_xfixes_create_region_from_window
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_window_t window
- ** @param xcb_shape_kind_t kind
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_window_t window /**< */,
- xcb_shape_kind_t kind /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_from_window_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.window = window;
- xcb_out.kind = kind;
- 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_xfixes_create_region_from_gc_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_gcontext_t gc
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_gcontext_t gc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_from_gc_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.gc = gc;
-
- 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_xfixes_create_region_from_gc
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_gcontext_t gc
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_gcontext_t gc /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_from_gc_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.gc = gc;
-
- 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_xfixes_create_region_from_picture_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_render_picture_t picture
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_render_picture_t picture /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_from_picture_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.picture = picture;
-
- 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_xfixes_create_region_from_picture
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param xcb_render_picture_t picture
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- xcb_render_picture_t picture /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_create_region_from_picture_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.picture = picture;
-
- 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_xfixes_destroy_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_DESTROY_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_destroy_region_request_t xcb_out;
-
- xcb_out.region = region;
-
- 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_xfixes_destroy_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_destroy_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_DESTROY_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_destroy_region_request_t xcb_out;
-
- xcb_out.region = region;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_region_request_t xcb_out;
-
- xcb_out.region = region;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param uint32_t rectangles_len
- ** @param const xcb_rectangle_t *rectangles
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- uint32_t rectangles_len /**< */,
- const xcb_rectangle_t *rectangles /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_region_request_t xcb_out;
-
- xcb_out.region = region;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_copy_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_COPY_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_copy_region_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.destination = destination;
-
- 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_xfixes_copy_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_copy_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_COPY_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_copy_region_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.destination = destination;
-
- 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_xfixes_union_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_UNION_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_union_region_request_t xcb_out;
-
- xcb_out.source1 = source1;
- xcb_out.source2 = source2;
- xcb_out.destination = destination;
-
- 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_xfixes_union_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_union_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_UNION_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_union_region_request_t xcb_out;
-
- xcb_out.source1 = source1;
- xcb_out.source2 = source2;
- xcb_out.destination = destination;
-
- 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_xfixes_intersect_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_INTERSECT_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_intersect_region_request_t xcb_out;
-
- xcb_out.source1 = source1;
- xcb_out.source2 = source2;
- xcb_out.destination = destination;
-
- 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_xfixes_intersect_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_intersect_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_INTERSECT_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_intersect_region_request_t xcb_out;
-
- xcb_out.source1 = source1;
- xcb_out.source2 = source2;
- xcb_out.destination = destination;
-
- 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_xfixes_subtract_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SUBTRACT_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_subtract_region_request_t xcb_out;
-
- xcb_out.source1 = source1;
- xcb_out.source2 = source2;
- xcb_out.destination = destination;
-
- 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_xfixes_subtract_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source1
- ** @param xcb_xfixes_region_t source2
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_subtract_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source1 /**< */,
- xcb_xfixes_region_t source2 /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SUBTRACT_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_subtract_region_request_t xcb_out;
-
- xcb_out.source1 = source1;
- xcb_out.source2 = source2;
- xcb_out.destination = destination;
-
- 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_xfixes_invert_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_rectangle_t bounds
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_rectangle_t bounds /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_INVERT_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_invert_region_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.bounds = bounds;
- xcb_out.destination = destination;
-
- 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_xfixes_invert_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_rectangle_t bounds
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_invert_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_rectangle_t bounds /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_INVERT_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_invert_region_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.bounds = bounds;
- xcb_out.destination = destination;
-
- 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_xfixes_translate_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param int16_t dx
- ** @param int16_t dy
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t dx /**< */,
- int16_t dy /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_TRANSLATE_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_translate_region_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.dx = dx;
- xcb_out.dy = dy;
-
- 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_xfixes_translate_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @param int16_t dx
- ** @param int16_t dy
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_translate_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t dx /**< */,
- int16_t dy /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_TRANSLATE_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_translate_region_request_t xcb_out;
-
- xcb_out.region = region;
- xcb_out.dx = dx;
- xcb_out.dy = dy;
-
- 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_xfixes_region_extents_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_REGION_EXTENTS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_region_extents_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.destination = destination;
-
- 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_xfixes_region_extents
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_region_extents (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_REGION_EXTENTS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_region_extents_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.destination = destination;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_xfixes_fetch_region_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_fetch_region_cookie_t
-xcb_xfixes_fetch_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_FETCH_REGION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_fetch_region_cookie_t xcb_ret;
- xcb_xfixes_fetch_region_request_t xcb_out;
-
- xcb_out.region = region;
-
- 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_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_xfixes_fetch_region_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_fetch_region_cookie_t
-xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t region /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_FETCH_REGION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_fetch_region_cookie_t xcb_ret;
- xcb_xfixes_fetch_region_request_t xcb_out;
-
- xcb_out.region = region;
-
- 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_rectangle_t * xcb_xfixes_fetch_region_rectangles
- **
- ** @param const xcb_xfixes_fetch_region_reply_t *R
- ** @returns xcb_rectangle_t *
- **
- *****************************************************************************/
-
-xcb_rectangle_t *
-xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R /**< */)
-{
- return (xcb_rectangle_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_fetch_region_rectangles_length
- **
- ** @param const xcb_xfixes_fetch_region_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R /**< */)
-{
- return (R->length / 2);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_rectangle_iterator_t xcb_xfixes_fetch_region_rectangles_iterator
- **
- ** @param const xcb_xfixes_fetch_region_reply_t *R
- ** @returns xcb_rectangle_iterator_t
- **
- *****************************************************************************/
-
-xcb_rectangle_iterator_t
-xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_reply_t *R /**< */)
-{
- xcb_rectangle_iterator_t i;
- i.data = (xcb_rectangle_t *) (R + 1);
- i.rem = (R->length / 2);
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xfixes_fetch_region_reply_t * xcb_xfixes_fetch_region_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_fetch_region_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_fetch_region_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_fetch_region_reply_t *
-xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */,
- xcb_xfixes_fetch_region_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xfixes_fetch_region_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_gc_clip_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_gcontext_t gc
- ** @param xcb_xfixes_region_t region
- ** @param int16_t x_origin
- ** @param int16_t y_origin
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */,
- xcb_gcontext_t gc /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t x_origin /**< */,
- int16_t y_origin /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_gc_clip_region_request_t xcb_out;
-
- xcb_out.gc = gc;
- xcb_out.region = region;
- xcb_out.x_origin = x_origin;
- xcb_out.y_origin = y_origin;
-
- 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_xfixes_set_gc_clip_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_gcontext_t gc
- ** @param xcb_xfixes_region_t region
- ** @param int16_t x_origin
- ** @param int16_t y_origin
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */,
- xcb_gcontext_t gc /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t x_origin /**< */,
- int16_t y_origin /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_gc_clip_region_request_t xcb_out;
-
- xcb_out.gc = gc;
- xcb_out.region = region;
- xcb_out.x_origin = x_origin;
- xcb_out.y_origin = y_origin;
-
- 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_xfixes_set_window_shape_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t dest
- ** @param xcb_shape_kind_t dest_kind
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */,
- xcb_window_t dest /**< */,
- xcb_shape_kind_t dest_kind /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_xfixes_region_t region /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_window_shape_region_request_t xcb_out;
-
- xcb_out.dest = dest;
- xcb_out.dest_kind = dest_kind;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
- xcb_out.region = region;
-
- 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_xfixes_set_window_shape_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t dest
- ** @param xcb_shape_kind_t dest_kind
- ** @param int16_t x_offset
- ** @param int16_t y_offset
- ** @param xcb_xfixes_region_t region
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */,
- xcb_window_t dest /**< */,
- xcb_shape_kind_t dest_kind /**< */,
- int16_t x_offset /**< */,
- int16_t y_offset /**< */,
- xcb_xfixes_region_t region /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_window_shape_region_request_t xcb_out;
-
- xcb_out.dest = dest;
- xcb_out.dest_kind = dest_kind;
- memset(xcb_out.pad0, 0, 3);
- xcb_out.x_offset = x_offset;
- xcb_out.y_offset = y_offset;
- xcb_out.region = region;
-
- 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_xfixes_set_picture_clip_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_xfixes_region_t region
- ** @param int16_t x_origin
- ** @param int16_t y_origin
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t x_origin /**< */,
- int16_t y_origin /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_picture_clip_region_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.region = region;
- xcb_out.x_origin = x_origin;
- xcb_out.y_origin = y_origin;
-
- 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_xfixes_set_picture_clip_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_render_picture_t picture
- ** @param xcb_xfixes_region_t region
- ** @param int16_t x_origin
- ** @param int16_t y_origin
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */,
- xcb_render_picture_t picture /**< */,
- xcb_xfixes_region_t region /**< */,
- int16_t x_origin /**< */,
- int16_t y_origin /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_picture_clip_region_request_t xcb_out;
-
- xcb_out.picture = picture;
- xcb_out.region = region;
- xcb_out.x_origin = x_origin;
- xcb_out.y_origin = y_origin;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_cursor_name_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cursor
- ** @param uint16_t nbytes
- ** @param const char *name
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t cursor /**< */,
- uint16_t nbytes /**< */,
- const char *name /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_CURSOR_NAME,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_cursor_name_request_t xcb_out;
-
- xcb_out.cursor = cursor;
- xcb_out.nbytes = nbytes;
- 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 = 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_set_cursor_name
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cursor
- ** @param uint16_t nbytes
- ** @param const char *name
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */,
- xcb_cursor_t cursor /**< */,
- uint16_t nbytes /**< */,
- const char *name /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SET_CURSOR_NAME,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_set_cursor_name_request_t xcb_out;
-
- xcb_out.cursor = cursor;
- xcb_out.nbytes = nbytes;
- 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 = 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cursor
- ** @returns xcb_xfixes_get_cursor_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_name_cookie_t
-xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */,
- xcb_cursor_t cursor /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_GET_CURSOR_NAME,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_get_cursor_name_cookie_t xcb_ret;
- xcb_xfixes_get_cursor_name_request_t xcb_out;
-
- xcb_out.cursor = cursor;
-
- 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_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t cursor
- ** @returns xcb_xfixes_get_cursor_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_name_cookie_t
-xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c /**< */,
- xcb_cursor_t cursor /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_GET_CURSOR_NAME,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_get_cursor_name_cookie_t xcb_ret;
- xcb_xfixes_get_cursor_name_request_t xcb_out;
-
- xcb_out.cursor = cursor;
-
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** char * xcb_xfixes_get_cursor_name_name
- **
- ** @param const xcb_xfixes_get_cursor_name_reply_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R /**< */)
-{
- return (char *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_get_cursor_name_name_length
- **
- ** @param const xcb_xfixes_get_cursor_name_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R /**< */)
-{
- return R->nbytes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xfixes_get_cursor_name_name_end
- **
- ** @param const xcb_xfixes_get_cursor_name_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((char *) (R + 1)) + (R->nbytes);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_name_reply_t * xcb_xfixes_get_cursor_name_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_get_cursor_name_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_get_cursor_name_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_name_reply_t *
-xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**< */,
- xcb_xfixes_get_cursor_name_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_and_name_cookie_t
-xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret;
- xcb_xfixes_get_cursor_image_and_name_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_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name_unchecked
- **
- ** @param xcb_connection_t *c
- ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_and_name_cookie_t
-xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret;
- xcb_xfixes_get_cursor_image_and_name_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;
-}
-
-
-/*****************************************************************************
- **
- ** char * xcb_xfixes_get_cursor_image_and_name_name
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
-{
- return (char *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_get_cursor_image_and_name_name_length
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
-{
- return R->nbytes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_name_end
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((char *) (R + 1)) + (R->nbytes);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint32_t * xcb_xfixes_get_cursor_image_and_name_cursor_image
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns uint32_t *
- **
- *****************************************************************************/
-
-uint32_t *
-xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_xfixes_get_cursor_image_and_name_name_end(R);
- return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xfixes_get_cursor_image_and_name_cursor_image_length
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
-{
- return (R->width * R->height);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_cursor_image_end
- **
- ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_xfixes_get_cursor_image_and_name_name_end(R);
- i.data = ((uint32_t *) child.data) + ((R->width * R->height));
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xfixes_get_cursor_image_and_name_reply_t * xcb_xfixes_get_cursor_image_and_name_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_get_cursor_image_and_name_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xfixes_get_cursor_image_and_name_reply_t *
- **
- *****************************************************************************/
-
-xcb_xfixes_get_cursor_image_and_name_reply_t *
-xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c /**< */,
- xcb_xfixes_get_cursor_image_and_name_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xfixes_get_cursor_image_and_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_change_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t source
- ** @param xcb_cursor_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t source /**< */,
- xcb_cursor_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CHANGE_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_change_cursor_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.destination = destination;
-
- 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_xfixes_change_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t source
- ** @param xcb_cursor_t destination
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_cursor (xcb_connection_t *c /**< */,
- xcb_cursor_t source /**< */,
- xcb_cursor_t destination /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CHANGE_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_change_cursor_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.destination = destination;
-
- 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_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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_change_cursor_by_name_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t src
- ** @param uint16_t nbytes
- ** @param const char *name
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */,
- xcb_cursor_t src /**< */,
- uint16_t nbytes /**< */,
- const char *name /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_change_cursor_by_name_request_t xcb_out;
-
- xcb_out.src = src;
- xcb_out.nbytes = nbytes;
- 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 = 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_change_cursor_by_name
- **
- ** @param xcb_connection_t *c
- ** @param xcb_cursor_t src
- ** @param uint16_t nbytes
- ** @param const char *name
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */,
- xcb_cursor_t src /**< */,
- uint16_t nbytes /**< */,
- const char *name /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_change_cursor_by_name_request_t xcb_out;
-
- xcb_out.src = src;
- xcb_out.nbytes = nbytes;
- 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 = 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;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xfixes_expand_region_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @param uint16_t left
- ** @param uint16_t right
- ** @param uint16_t top
- ** @param uint16_t bottom
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */,
- uint16_t left /**< */,
- uint16_t right /**< */,
- uint16_t top /**< */,
- uint16_t bottom /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_EXPAND_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_expand_region_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.destination = destination;
- xcb_out.left = left;
- xcb_out.right = right;
- xcb_out.top = top;
- xcb_out.bottom = bottom;
-
- 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_xfixes_expand_region
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xfixes_region_t source
- ** @param xcb_xfixes_region_t destination
- ** @param uint16_t left
- ** @param uint16_t right
- ** @param uint16_t top
- ** @param uint16_t bottom
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_expand_region (xcb_connection_t *c /**< */,
- xcb_xfixes_region_t source /**< */,
- xcb_xfixes_region_t destination /**< */,
- uint16_t left /**< */,
- uint16_t right /**< */,
- uint16_t top /**< */,
- uint16_t bottom /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_EXPAND_REGION,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_expand_region_request_t xcb_out;
-
- xcb_out.source = source;
- xcb_out.destination = destination;
- xcb_out.left = left;
- xcb_out.right = right;
- xcb_out.top = top;
- xcb_out.bottom = bottom;
-
- 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_xfixes_hide_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_HIDE_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_hide_cursor_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_void_cookie_t xcb_xfixes_hide_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_hide_cursor (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_HIDE_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_hide_cursor_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_void_cookie_t xcb_xfixes_show_cursor_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SHOW_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_show_cursor_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_void_cookie_t xcb_xfixes_show_cursor
- **
- ** @param xcb_connection_t *c
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xfixes_show_cursor (xcb_connection_t *c /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xfixes_id,
- /* opcode */ XCB_XFIXES_SHOW_CURSOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xfixes_show_cursor_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;
-}
-
diff --git a/src/3rdparty/xcb/libxcb/xinerama.c b/src/3rdparty/xcb/libxcb/xinerama.c
deleted file mode 100644
index e660be267b..0000000000
--- a/src/3rdparty/xcb/libxcb/xinerama.c
+++ /dev/null
@@ -1,703 +0,0 @@
-/*
- * This file generated automatically from xinerama.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 "xinerama.h"
-
-#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
-#include "xproto.h"
-
-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 /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xinerama_screen_info_t);
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- 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_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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */,
- uint8_t minor /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- return (xcb_xinerama_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- return (xcb_xinerama_get_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- return (xcb_xinerama_get_screen_count_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */,
- uint32_t screen /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- return (xcb_xinerama_get_screen_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- 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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xinerama_id,
- /* 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;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- return (xcb_xinerama_screen_info_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- return R->number;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */)
-{
- xcb_xinerama_screen_info_iterator_t i;
- i.data = (xcb_xinerama_screen_info_t *) (R + 1);
- i.rem = R->number;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** 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 /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xinerama_query_screens_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
diff --git a/src/3rdparty/xcb/libxcb/xinput.c b/src/3rdparty/xcb/libxcb/xinput.c
index 0edfde656c..d4e3c250bc 100644
--- a/src/3rdparty/xcb/libxcb/xinput.c
+++ b/src/3rdparty/xcb/libxcb/xinput.c
@@ -10,11 +10,11 @@
#include <string.h>
#include <assert.h>
#include <stddef.h> /* for offsetof() */
-#include "xcbext.h"
-#include "xinput.h"
+#include <xcb/xcbext.h>
+#include <xcb/xinput.h>
#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
-#include "xfixes.h"
+#include <xcb/xfixes.h>
xcb_extension_t xcb_input_id = { "XInputExtension", 0 };
diff --git a/src/3rdparty/xcb/libxcb/xkb.c b/src/3rdparty/xcb/libxcb/xkb.c
deleted file mode 100644
index d55bd76f10..0000000000
--- a/src/3rdparty/xcb/libxcb/xkb.c
+++ /dev/null
@@ -1,15959 +0,0 @@
-/*
- * This file generated automatically from xkb.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 "xkb.h"
-
-#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
-#include "xproto.h"
-
-xcb_extension_t xcb_xkb_id = { "XKEYBOARD", 0 };
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_device_spec_next
- **
- ** @param xcb_xkb_device_spec_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_device_spec_next (xcb_xkb_device_spec_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_device_spec_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_device_spec_end
- **
- ** @param xcb_xkb_device_spec_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_device_spec_end (xcb_xkb_device_spec_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_led_class_spec_next
- **
- ** @param xcb_xkb_led_class_spec_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_led_class_spec_next (xcb_xkb_led_class_spec_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_led_class_spec_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_led_class_spec_end
- **
- ** @param xcb_xkb_led_class_spec_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_led_class_spec_end (xcb_xkb_led_class_spec_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_bell_class_spec_next
- **
- ** @param xcb_xkb_bell_class_spec_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_bell_class_spec_next (xcb_xkb_bell_class_spec_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_bell_class_spec_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_bell_class_spec_end
- **
- ** @param xcb_xkb_bell_class_spec_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_bell_class_spec_end (xcb_xkb_bell_class_spec_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_id_spec_next
- **
- ** @param xcb_xkb_id_spec_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_id_spec_next (xcb_xkb_id_spec_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_id_spec_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_id_spec_end
- **
- ** @param xcb_xkb_id_spec_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_id_spec_end (xcb_xkb_id_spec_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_indicator_map_next
- **
- ** @param xcb_xkb_indicator_map_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_indicator_map_next (xcb_xkb_indicator_map_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_indicator_map_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_indicator_map_end
- **
- ** @param xcb_xkb_indicator_map_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_indicator_map_end (xcb_xkb_indicator_map_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_mod_def_next
- **
- ** @param xcb_xkb_mod_def_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_mod_def_next (xcb_xkb_mod_def_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_mod_def_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_mod_def_end
- **
- ** @param xcb_xkb_mod_def_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_mod_def_end (xcb_xkb_mod_def_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_name_next
- **
- ** @param xcb_xkb_key_name_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_name_next (xcb_xkb_key_name_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_key_name_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_name_end
- **
- ** @param xcb_xkb_key_name_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_name_end (xcb_xkb_key_name_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_alias_next
- **
- ** @param xcb_xkb_key_alias_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_alias_next (xcb_xkb_key_alias_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_key_alias_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_alias_end
- **
- ** @param xcb_xkb_key_alias_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_alias_end (xcb_xkb_key_alias_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-int
-xcb_xkb_counted_string_16_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_counted_string_16_t *_aux = (xcb_xkb_counted_string_16_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_counted_string_16_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* string */
- xcb_block_len += _aux->length * sizeof(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;
- /* alignment_pad */
- xcb_block_len += (((_aux->length + 5) & (~3)) - (_aux->length + 2)) * sizeof(char);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(char);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** char * xcb_xkb_counted_string_16_string
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns char *
- **
- *****************************************************************************/
-
-char *
-xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */)
-{
- return (char *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_counted_string_16_string_length
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R /**< */)
-{
- return R->length;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_counted_string_16_string_end (const xcb_xkb_counted_string_16_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((char *) (R + 1)) + (R->length);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void * xcb_xkb_counted_string_16_alignment_pad
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns void *
- **
- *****************************************************************************/
-
-void *
-xcb_xkb_counted_string_16_alignment_pad (const xcb_xkb_counted_string_16_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_string_end(R);
- return (void *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_counted_string_16_alignment_pad_length
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_counted_string_16_alignment_pad_length (const xcb_xkb_counted_string_16_t *R /**< */)
-{
- return (((R->length + 5) & (~3)) - (R->length + 2));
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_counted_string_16_alignment_pad_end
- **
- ** @param const xcb_xkb_counted_string_16_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_counted_string_16_alignment_pad_end (const xcb_xkb_counted_string_16_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- xcb_generic_iterator_t child = xcb_xkb_counted_string_16_string_end(R);
- i.data = ((char *) child.data) + ((((R->length + 5) & (~3)) - (R->length + 2)));
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_counted_string_16_next
- **
- ** @param xcb_xkb_counted_string_16_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_counted_string_16_next (xcb_xkb_counted_string_16_iterator_t *i /**< */)
-{
- xcb_xkb_counted_string_16_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_counted_string_16_t *)(((char *)R) + xcb_xkb_counted_string_16_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_counted_string_16_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_counted_string_16_end
- **
- ** @param xcb_xkb_counted_string_16_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_counted_string_16_end (xcb_xkb_counted_string_16_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_counted_string_16_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_kt_map_entry_next
- **
- ** @param xcb_xkb_kt_map_entry_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_kt_map_entry_next (xcb_xkb_kt_map_entry_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_kt_map_entry_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_kt_map_entry_end
- **
- ** @param xcb_xkb_kt_map_entry_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_kt_map_entry_end (xcb_xkb_kt_map_entry_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-int
-xcb_xkb_key_type_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_key_type_t *_aux = (xcb_xkb_key_type_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_key_type_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* map */
- xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_map_entry_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_kt_map_entry_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* preserve */
- xcb_block_len += (_aux->hasPreserve * _aux->nMapEntries) * sizeof(xcb_xkb_mod_def_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_map_entry_t * xcb_xkb_key_type_map
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns xcb_xkb_kt_map_entry_t *
- **
- *****************************************************************************/
-
-xcb_xkb_kt_map_entry_t *
-xcb_xkb_key_type_map (const xcb_xkb_key_type_t *R /**< */)
-{
- return (xcb_xkb_kt_map_entry_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_key_type_map_length
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_key_type_map_length (const xcb_xkb_key_type_t *R /**< */)
-{
- return R->nMapEntries;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_map_entry_iterator_t xcb_xkb_key_type_map_iterator
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns xcb_xkb_kt_map_entry_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_kt_map_entry_iterator_t
-xcb_xkb_key_type_map_iterator (const xcb_xkb_key_type_t *R /**< */)
-{
- xcb_xkb_kt_map_entry_iterator_t i;
- i.data = (xcb_xkb_kt_map_entry_t *) (R + 1);
- i.rem = R->nMapEntries;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_t * xcb_xkb_key_type_preserve
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns xcb_xkb_mod_def_t *
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_t *
-xcb_xkb_key_type_preserve (const xcb_xkb_key_type_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_xkb_kt_map_entry_end(xcb_xkb_key_type_map_iterator(R));
- return (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_key_type_preserve_length
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_key_type_preserve_length (const xcb_xkb_key_type_t *R /**< */)
-{
- return (R->hasPreserve * R->nMapEntries);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_iterator_t xcb_xkb_key_type_preserve_iterator
- **
- ** @param const xcb_xkb_key_type_t *R
- ** @returns xcb_xkb_mod_def_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_iterator_t
-xcb_xkb_key_type_preserve_iterator (const xcb_xkb_key_type_t *R /**< */)
-{
- xcb_xkb_mod_def_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_kt_map_entry_end(xcb_xkb_key_type_map_iterator(R));
- i.data = (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index));
- i.rem = (R->hasPreserve * R->nMapEntries);
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_type_next
- **
- ** @param xcb_xkb_key_type_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_type_next (xcb_xkb_key_type_iterator_t *i /**< */)
-{
- xcb_xkb_key_type_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_key_type_t *)(((char *)R) + xcb_xkb_key_type_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_key_type_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_type_end
- **
- ** @param xcb_xkb_key_type_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_type_end (xcb_xkb_key_type_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_key_type_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-int
-xcb_xkb_key_sym_map_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_key_sym_map_t *_aux = (xcb_xkb_key_sym_map_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_key_sym_map_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* syms */
- xcb_block_len += _aux->nSyms * sizeof(xcb_keysym_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_keysym_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_keysym_t * xcb_xkb_key_sym_map_syms
- **
- ** @param const xcb_xkb_key_sym_map_t *R
- ** @returns xcb_keysym_t *
- **
- *****************************************************************************/
-
-xcb_keysym_t *
-xcb_xkb_key_sym_map_syms (const xcb_xkb_key_sym_map_t *R /**< */)
-{
- return (xcb_keysym_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_key_sym_map_syms_length
- **
- ** @param const xcb_xkb_key_sym_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_key_sym_map_syms_length (const xcb_xkb_key_sym_map_t *R /**< */)
-{
- return R->nSyms;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_sym_map_syms_end
- **
- ** @param const xcb_xkb_key_sym_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_sym_map_syms_end (const xcb_xkb_key_sym_map_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((xcb_keysym_t *) (R + 1)) + (R->nSyms);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_sym_map_next
- **
- ** @param xcb_xkb_key_sym_map_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_sym_map_next (xcb_xkb_key_sym_map_iterator_t *i /**< */)
-{
- xcb_xkb_key_sym_map_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_key_sym_map_t *)(((char *)R) + xcb_xkb_key_sym_map_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_key_sym_map_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_sym_map_end
- **
- ** @param xcb_xkb_key_sym_map_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_sym_map_end (xcb_xkb_key_sym_map_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_key_sym_map_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_common_behavior_next
- **
- ** @param xcb_xkb_common_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_common_behavior_next (xcb_xkb_common_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_common_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_common_behavior_end
- **
- ** @param xcb_xkb_common_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_common_behavior_end (xcb_xkb_common_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_default_behavior_next
- **
- ** @param xcb_xkb_default_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_default_behavior_next (xcb_xkb_default_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_default_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_default_behavior_end
- **
- ** @param xcb_xkb_default_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_default_behavior_end (xcb_xkb_default_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_lock_behavior_next
- **
- ** @param xcb_xkb_lock_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_lock_behavior_next (xcb_xkb_lock_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_lock_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_lock_behavior_end
- **
- ** @param xcb_xkb_lock_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_lock_behavior_end (xcb_xkb_lock_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_radio_group_behavior_next
- **
- ** @param xcb_xkb_radio_group_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_radio_group_behavior_next (xcb_xkb_radio_group_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_radio_group_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_radio_group_behavior_end
- **
- ** @param xcb_xkb_radio_group_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_radio_group_behavior_end (xcb_xkb_radio_group_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_overlay_behavior_next
- **
- ** @param xcb_xkb_overlay_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_overlay_behavior_next (xcb_xkb_overlay_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_overlay_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_overlay_behavior_end
- **
- ** @param xcb_xkb_overlay_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_overlay_behavior_end (xcb_xkb_overlay_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_permament_lock_behavior_next
- **
- ** @param xcb_xkb_permament_lock_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_permament_lock_behavior_next (xcb_xkb_permament_lock_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_permament_lock_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_permament_lock_behavior_end
- **
- ** @param xcb_xkb_permament_lock_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_permament_lock_behavior_end (xcb_xkb_permament_lock_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_permament_radio_group_behavior_next
- **
- ** @param xcb_xkb_permament_radio_group_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_permament_radio_group_behavior_next (xcb_xkb_permament_radio_group_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_permament_radio_group_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_permament_radio_group_behavior_end
- **
- ** @param xcb_xkb_permament_radio_group_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_permament_overlay_behavior_next
- **
- ** @param xcb_xkb_permament_overlay_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_permament_overlay_behavior_next (xcb_xkb_permament_overlay_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_permament_overlay_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_permament_overlay_behavior_end
- **
- ** @param xcb_xkb_permament_overlay_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_permament_overlay_behavior_end (xcb_xkb_permament_overlay_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_behavior_next
- **
- ** @param xcb_xkb_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_behavior_next (xcb_xkb_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_behavior_end
- **
- ** @param xcb_xkb_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_behavior_end (xcb_xkb_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_set_behavior_next
- **
- ** @param xcb_xkb_set_behavior_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_set_behavior_next (xcb_xkb_set_behavior_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_set_behavior_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_behavior_end
- **
- ** @param xcb_xkb_set_behavior_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_behavior_end (xcb_xkb_set_behavior_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_set_explicit_next
- **
- ** @param xcb_xkb_set_explicit_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_set_explicit_next (xcb_xkb_set_explicit_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_set_explicit_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_explicit_end
- **
- ** @param xcb_xkb_set_explicit_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_explicit_end (xcb_xkb_set_explicit_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_mod_map_next
- **
- ** @param xcb_xkb_key_mod_map_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_mod_map_next (xcb_xkb_key_mod_map_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_key_mod_map_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_mod_map_end
- **
- ** @param xcb_xkb_key_mod_map_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_mod_map_end (xcb_xkb_key_mod_map_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_v_mod_map_next
- **
- ** @param xcb_xkb_key_v_mod_map_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_v_mod_map_next (xcb_xkb_key_v_mod_map_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_key_v_mod_map_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_v_mod_map_end
- **
- ** @param xcb_xkb_key_v_mod_map_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_v_mod_map_end (xcb_xkb_key_v_mod_map_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_kt_set_map_entry_next
- **
- ** @param xcb_xkb_kt_set_map_entry_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_kt_set_map_entry_next (xcb_xkb_kt_set_map_entry_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_kt_set_map_entry_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_kt_set_map_entry_end
- **
- ** @param xcb_xkb_kt_set_map_entry_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_kt_set_map_entry_end (xcb_xkb_kt_set_map_entry_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-int
-xcb_xkb_set_key_type_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_set_key_type_t *_aux = (xcb_xkb_set_key_type_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_set_key_type_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* entries */
- xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_set_map_entry_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_kt_set_map_entry_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* preserve_entries */
- xcb_block_len += (_aux->preserve * _aux->nMapEntries) * sizeof(xcb_xkb_kt_set_map_entry_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_kt_set_map_entry_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_entries
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns xcb_xkb_kt_set_map_entry_t *
- **
- *****************************************************************************/
-
-xcb_xkb_kt_set_map_entry_t *
-xcb_xkb_set_key_type_entries (const xcb_xkb_set_key_type_t *R /**< */)
-{
- return (xcb_xkb_kt_set_map_entry_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_key_type_entries_length
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_key_type_entries_length (const xcb_xkb_set_key_type_t *R /**< */)
-{
- return R->nMapEntries;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_entries_iterator
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns xcb_xkb_kt_set_map_entry_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_kt_set_map_entry_iterator_t
-xcb_xkb_set_key_type_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */)
-{
- xcb_xkb_kt_set_map_entry_iterator_t i;
- i.data = (xcb_xkb_kt_set_map_entry_t *) (R + 1);
- i.rem = R->nMapEntries;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_preserve_entries
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns xcb_xkb_kt_set_map_entry_t *
- **
- *****************************************************************************/
-
-xcb_xkb_kt_set_map_entry_t *
-xcb_xkb_set_key_type_preserve_entries (const xcb_xkb_set_key_type_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_xkb_kt_set_map_entry_end(xcb_xkb_set_key_type_entries_iterator(R));
- return (xcb_xkb_kt_set_map_entry_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_kt_set_map_entry_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_key_type_preserve_entries_length
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_key_type_preserve_entries_length (const xcb_xkb_set_key_type_t *R /**< */)
-{
- return (R->preserve * R->nMapEntries);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_preserve_entries_iterator
- **
- ** @param const xcb_xkb_set_key_type_t *R
- ** @returns xcb_xkb_kt_set_map_entry_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_kt_set_map_entry_iterator_t
-xcb_xkb_set_key_type_preserve_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */)
-{
- xcb_xkb_kt_set_map_entry_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_kt_set_map_entry_end(xcb_xkb_set_key_type_entries_iterator(R));
- i.data = (xcb_xkb_kt_set_map_entry_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_kt_set_map_entry_t, prev.index));
- i.rem = (R->preserve * R->nMapEntries);
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_set_key_type_next
- **
- ** @param xcb_xkb_set_key_type_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_set_key_type_next (xcb_xkb_set_key_type_iterator_t *i /**< */)
-{
- xcb_xkb_set_key_type_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_set_key_type_t *)(((char *)R) + xcb_xkb_set_key_type_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_set_key_type_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_key_type_end
- **
- ** @param xcb_xkb_set_key_type_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_key_type_end (xcb_xkb_set_key_type_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_set_key_type_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_string8_next
- **
- ** @param xcb_xkb_string8_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_string8_next (xcb_xkb_string8_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_string8_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_string8_end
- **
- ** @param xcb_xkb_string8_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_string8_end (xcb_xkb_string8_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-int
-xcb_xkb_outline_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_outline_t *_aux = (xcb_xkb_outline_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_outline_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* points */
- xcb_block_len += _aux->nPoints * sizeof(xcb_point_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_point_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_point_t * xcb_xkb_outline_points
- **
- ** @param const xcb_xkb_outline_t *R
- ** @returns xcb_point_t *
- **
- *****************************************************************************/
-
-xcb_point_t *
-xcb_xkb_outline_points (const xcb_xkb_outline_t *R /**< */)
-{
- return (xcb_point_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_outline_points_length
- **
- ** @param const xcb_xkb_outline_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_outline_points_length (const xcb_xkb_outline_t *R /**< */)
-{
- return R->nPoints;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_point_iterator_t xcb_xkb_outline_points_iterator
- **
- ** @param const xcb_xkb_outline_t *R
- ** @returns xcb_point_iterator_t
- **
- *****************************************************************************/
-
-xcb_point_iterator_t
-xcb_xkb_outline_points_iterator (const xcb_xkb_outline_t *R /**< */)
-{
- xcb_point_iterator_t i;
- i.data = (xcb_point_t *) (R + 1);
- i.rem = R->nPoints;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_outline_next
- **
- ** @param xcb_xkb_outline_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_outline_next (xcb_xkb_outline_iterator_t *i /**< */)
-{
- xcb_xkb_outline_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_outline_t *)(((char *)R) + xcb_xkb_outline_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_outline_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_outline_end
- **
- ** @param xcb_xkb_outline_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_outline_end (xcb_xkb_outline_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_outline_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-int
-xcb_xkb_shape_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_shape_t *_aux = (xcb_xkb_shape_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int i;
- unsigned int xcb_tmp_len;
-
- xcb_block_len += sizeof(xcb_xkb_shape_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* outlines */
- for(i=0; i<_aux->nOutlines; i++) {
- xcb_tmp_len = xcb_xkb_outline_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_outline_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_shape_outlines_length
- **
- ** @param const xcb_xkb_shape_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_shape_outlines_length (const xcb_xkb_shape_t *R /**< */)
-{
- return R->nOutlines;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_outline_iterator_t xcb_xkb_shape_outlines_iterator
- **
- ** @param const xcb_xkb_shape_t *R
- ** @returns xcb_xkb_outline_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_outline_iterator_t
-xcb_xkb_shape_outlines_iterator (const xcb_xkb_shape_t *R /**< */)
-{
- xcb_xkb_outline_iterator_t i;
- i.data = (xcb_xkb_outline_t *) (R + 1);
- i.rem = R->nOutlines;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_shape_next
- **
- ** @param xcb_xkb_shape_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_shape_next (xcb_xkb_shape_iterator_t *i /**< */)
-{
- xcb_xkb_shape_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_shape_t *)(((char *)R) + xcb_xkb_shape_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_shape_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_shape_end
- **
- ** @param xcb_xkb_shape_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_shape_end (xcb_xkb_shape_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_shape_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_key_next
- **
- ** @param xcb_xkb_key_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_key_next (xcb_xkb_key_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_key_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_key_end
- **
- ** @param xcb_xkb_key_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_key_end (xcb_xkb_key_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_overlay_key_next
- **
- ** @param xcb_xkb_overlay_key_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_overlay_key_next (xcb_xkb_overlay_key_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_overlay_key_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_overlay_key_end
- **
- ** @param xcb_xkb_overlay_key_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_overlay_key_end (xcb_xkb_overlay_key_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-int
-xcb_xkb_overlay_row_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_overlay_row_t *_aux = (xcb_xkb_overlay_row_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_overlay_row_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* keys */
- xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_overlay_key_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_overlay_key_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_overlay_key_t * xcb_xkb_overlay_row_keys
- **
- ** @param const xcb_xkb_overlay_row_t *R
- ** @returns xcb_xkb_overlay_key_t *
- **
- *****************************************************************************/
-
-xcb_xkb_overlay_key_t *
-xcb_xkb_overlay_row_keys (const xcb_xkb_overlay_row_t *R /**< */)
-{
- return (xcb_xkb_overlay_key_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_overlay_row_keys_length
- **
- ** @param const xcb_xkb_overlay_row_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_overlay_row_keys_length (const xcb_xkb_overlay_row_t *R /**< */)
-{
- return R->nKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_overlay_key_iterator_t xcb_xkb_overlay_row_keys_iterator
- **
- ** @param const xcb_xkb_overlay_row_t *R
- ** @returns xcb_xkb_overlay_key_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_overlay_key_iterator_t
-xcb_xkb_overlay_row_keys_iterator (const xcb_xkb_overlay_row_t *R /**< */)
-{
- xcb_xkb_overlay_key_iterator_t i;
- i.data = (xcb_xkb_overlay_key_t *) (R + 1);
- i.rem = R->nKeys;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_overlay_row_next
- **
- ** @param xcb_xkb_overlay_row_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_overlay_row_next (xcb_xkb_overlay_row_iterator_t *i /**< */)
-{
- xcb_xkb_overlay_row_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_overlay_row_t *)(((char *)R) + xcb_xkb_overlay_row_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_overlay_row_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_overlay_row_end
- **
- ** @param xcb_xkb_overlay_row_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_overlay_row_end (xcb_xkb_overlay_row_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_overlay_row_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-int
-xcb_xkb_overlay_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_overlay_t *_aux = (xcb_xkb_overlay_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int i;
- unsigned int xcb_tmp_len;
-
- xcb_block_len += sizeof(xcb_xkb_overlay_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* rows */
- for(i=0; i<_aux->nRows; i++) {
- xcb_tmp_len = xcb_xkb_overlay_row_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_overlay_row_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_overlay_rows_length
- **
- ** @param const xcb_xkb_overlay_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_overlay_rows_length (const xcb_xkb_overlay_t *R /**< */)
-{
- return R->nRows;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_overlay_row_iterator_t xcb_xkb_overlay_rows_iterator
- **
- ** @param const xcb_xkb_overlay_t *R
- ** @returns xcb_xkb_overlay_row_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_overlay_row_iterator_t
-xcb_xkb_overlay_rows_iterator (const xcb_xkb_overlay_t *R /**< */)
-{
- xcb_xkb_overlay_row_iterator_t i;
- i.data = (xcb_xkb_overlay_row_t *) (R + 1);
- i.rem = R->nRows;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_overlay_next
- **
- ** @param xcb_xkb_overlay_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_overlay_next (xcb_xkb_overlay_iterator_t *i /**< */)
-{
- xcb_xkb_overlay_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_overlay_t *)(((char *)R) + xcb_xkb_overlay_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_overlay_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_overlay_end
- **
- ** @param xcb_xkb_overlay_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_overlay_end (xcb_xkb_overlay_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_overlay_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-int
-xcb_xkb_row_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_row_t *_aux = (xcb_xkb_row_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_row_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* keys */
- xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_key_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_t * xcb_xkb_row_keys
- **
- ** @param const xcb_xkb_row_t *R
- ** @returns xcb_xkb_key_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_t *
-xcb_xkb_row_keys (const xcb_xkb_row_t *R /**< */)
-{
- return (xcb_xkb_key_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_row_keys_length
- **
- ** @param const xcb_xkb_row_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_row_keys_length (const xcb_xkb_row_t *R /**< */)
-{
- return R->nKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_iterator_t xcb_xkb_row_keys_iterator
- **
- ** @param const xcb_xkb_row_t *R
- ** @returns xcb_xkb_key_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_iterator_t
-xcb_xkb_row_keys_iterator (const xcb_xkb_row_t *R /**< */)
-{
- xcb_xkb_key_iterator_t i;
- i.data = (xcb_xkb_key_t *) (R + 1);
- i.rem = R->nKeys;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_row_next
- **
- ** @param xcb_xkb_row_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_row_next (xcb_xkb_row_iterator_t *i /**< */)
-{
- xcb_xkb_row_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_row_t *)(((char *)R) + xcb_xkb_row_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_row_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_row_end
- **
- ** @param xcb_xkb_row_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_row_end (xcb_xkb_row_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_row_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-int
-xcb_xkb_listing_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_listing_t *_aux = (xcb_xkb_listing_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_listing_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* string */
- xcb_block_len += _aux->length * sizeof(xcb_xkb_string8_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_string8_t * xcb_xkb_listing_string
- **
- ** @param const xcb_xkb_listing_t *R
- ** @returns xcb_xkb_string8_t *
- **
- *****************************************************************************/
-
-xcb_xkb_string8_t *
-xcb_xkb_listing_string (const xcb_xkb_listing_t *R /**< */)
-{
- return (xcb_xkb_string8_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_listing_string_length
- **
- ** @param const xcb_xkb_listing_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_listing_string_length (const xcb_xkb_listing_t *R /**< */)
-{
- return R->length;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_listing_string_end
- **
- ** @param const xcb_xkb_listing_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_listing_string_end (const xcb_xkb_listing_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->length);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_listing_next
- **
- ** @param xcb_xkb_listing_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_listing_next (xcb_xkb_listing_iterator_t *i /**< */)
-{
- xcb_xkb_listing_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_listing_t *)(((char *)R) + xcb_xkb_listing_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_listing_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_listing_end
- **
- ** @param xcb_xkb_listing_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_listing_end (xcb_xkb_listing_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_listing_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-int
-xcb_xkb_device_led_info_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_device_led_info_t *_aux = (xcb_xkb_device_led_info_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_device_led_info_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* names */
- xcb_block_len += xcb_popcount(_aux->namesPresent) * sizeof(uint32_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* maps */
- xcb_block_len += xcb_popcount(_aux->mapsPresent) * sizeof(xcb_xkb_indicator_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_device_led_info_names
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_device_led_info_names (const xcb_xkb_device_led_info_t *R /**< */)
-{
- return (xcb_atom_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_device_led_info_names_length
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_device_led_info_names_length (const xcb_xkb_device_led_info_t *R /**< */)
-{
- return xcb_popcount(R->namesPresent);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_device_led_info_names_end
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_device_led_info_names_end (const xcb_xkb_device_led_info_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((xcb_atom_t *) (R + 1)) + (xcb_popcount(R->namesPresent));
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_t * xcb_xkb_device_led_info_maps
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns xcb_xkb_indicator_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_t *
-xcb_xkb_device_led_info_maps (const xcb_xkb_device_led_info_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_xkb_device_led_info_names_end(R);
- return (xcb_xkb_indicator_map_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_indicator_map_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_device_led_info_maps_length
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_device_led_info_maps_length (const xcb_xkb_device_led_info_t *R /**< */)
-{
- return xcb_popcount(R->mapsPresent);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_iterator_t xcb_xkb_device_led_info_maps_iterator
- **
- ** @param const xcb_xkb_device_led_info_t *R
- ** @returns xcb_xkb_indicator_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_iterator_t
-xcb_xkb_device_led_info_maps_iterator (const xcb_xkb_device_led_info_t *R /**< */)
-{
- xcb_xkb_indicator_map_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_device_led_info_names_end(R);
- i.data = (xcb_xkb_indicator_map_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_indicator_map_t, prev.index));
- i.rem = xcb_popcount(R->mapsPresent);
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_device_led_info_next
- **
- ** @param xcb_xkb_device_led_info_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_device_led_info_next (xcb_xkb_device_led_info_iterator_t *i /**< */)
-{
- xcb_xkb_device_led_info_t *R = i->data;
- xcb_generic_iterator_t child;
- child.data = (xcb_xkb_device_led_info_t *)(((char *)R) + xcb_xkb_device_led_info_sizeof(R));
- i->index = (char *) child.data - (char *) i->data;
- --i->rem;
- i->data = (xcb_xkb_device_led_info_t *) child.data;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_device_led_info_end
- **
- ** @param xcb_xkb_device_led_info_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_device_led_info_end (xcb_xkb_device_led_info_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- while(i.rem > 0)
- xcb_xkb_device_led_info_next(&i);
- ret.data = i.data;
- ret.rem = i.rem;
- ret.index = i.index;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_no_action_next
- **
- ** @param xcb_xkb_sa_no_action_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_no_action_next (xcb_xkb_sa_no_action_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_no_action_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_no_action_end
- **
- ** @param xcb_xkb_sa_no_action_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_no_action_end (xcb_xkb_sa_no_action_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_set_mods_next
- **
- ** @param xcb_xkb_sa_set_mods_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_set_mods_next (xcb_xkb_sa_set_mods_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_set_mods_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_set_mods_end
- **
- ** @param xcb_xkb_sa_set_mods_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_set_mods_end (xcb_xkb_sa_set_mods_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_latch_mods_next
- **
- ** @param xcb_xkb_sa_latch_mods_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_latch_mods_next (xcb_xkb_sa_latch_mods_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_latch_mods_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_latch_mods_end
- **
- ** @param xcb_xkb_sa_latch_mods_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_latch_mods_end (xcb_xkb_sa_latch_mods_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_mods_next
- **
- ** @param xcb_xkb_sa_lock_mods_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_mods_next (xcb_xkb_sa_lock_mods_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_lock_mods_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_mods_end
- **
- ** @param xcb_xkb_sa_lock_mods_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_mods_end (xcb_xkb_sa_lock_mods_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_set_group_next
- **
- ** @param xcb_xkb_sa_set_group_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_set_group_next (xcb_xkb_sa_set_group_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_set_group_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_set_group_end
- **
- ** @param xcb_xkb_sa_set_group_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_set_group_end (xcb_xkb_sa_set_group_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_latch_group_next
- **
- ** @param xcb_xkb_sa_latch_group_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_latch_group_next (xcb_xkb_sa_latch_group_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_latch_group_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_latch_group_end
- **
- ** @param xcb_xkb_sa_latch_group_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_latch_group_end (xcb_xkb_sa_latch_group_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_group_next
- **
- ** @param xcb_xkb_sa_lock_group_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_group_next (xcb_xkb_sa_lock_group_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_lock_group_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_group_end
- **
- ** @param xcb_xkb_sa_lock_group_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_group_end (xcb_xkb_sa_lock_group_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_move_ptr_next
- **
- ** @param xcb_xkb_sa_move_ptr_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_move_ptr_next (xcb_xkb_sa_move_ptr_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_move_ptr_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_move_ptr_end
- **
- ** @param xcb_xkb_sa_move_ptr_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_move_ptr_end (xcb_xkb_sa_move_ptr_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_ptr_btn_next
- **
- ** @param xcb_xkb_sa_ptr_btn_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_ptr_btn_next (xcb_xkb_sa_ptr_btn_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_ptr_btn_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_ptr_btn_end
- **
- ** @param xcb_xkb_sa_ptr_btn_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_ptr_btn_end (xcb_xkb_sa_ptr_btn_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_ptr_btn_next
- **
- ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_ptr_btn_next (xcb_xkb_sa_lock_ptr_btn_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_lock_ptr_btn_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_ptr_btn_end
- **
- ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_ptr_btn_end (xcb_xkb_sa_lock_ptr_btn_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_set_ptr_dflt_next
- **
- ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_set_ptr_dflt_next (xcb_xkb_sa_set_ptr_dflt_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_set_ptr_dflt_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_set_ptr_dflt_end
- **
- ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_set_ptr_dflt_end (xcb_xkb_sa_set_ptr_dflt_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_iso_lock_next
- **
- ** @param xcb_xkb_sa_iso_lock_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_iso_lock_next (xcb_xkb_sa_iso_lock_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_iso_lock_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_iso_lock_end
- **
- ** @param xcb_xkb_sa_iso_lock_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_iso_lock_end (xcb_xkb_sa_iso_lock_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_terminate_next
- **
- ** @param xcb_xkb_sa_terminate_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_terminate_next (xcb_xkb_sa_terminate_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_terminate_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_terminate_end
- **
- ** @param xcb_xkb_sa_terminate_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_terminate_end (xcb_xkb_sa_terminate_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_switch_screen_next
- **
- ** @param xcb_xkb_sa_switch_screen_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_switch_screen_next (xcb_xkb_sa_switch_screen_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_switch_screen_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_switch_screen_end
- **
- ** @param xcb_xkb_sa_switch_screen_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_switch_screen_end (xcb_xkb_sa_switch_screen_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_set_controls_next
- **
- ** @param xcb_xkb_sa_set_controls_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_set_controls_next (xcb_xkb_sa_set_controls_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_set_controls_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_set_controls_end
- **
- ** @param xcb_xkb_sa_set_controls_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_set_controls_end (xcb_xkb_sa_set_controls_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_controls_next
- **
- ** @param xcb_xkb_sa_lock_controls_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_controls_next (xcb_xkb_sa_lock_controls_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_lock_controls_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_controls_end
- **
- ** @param xcb_xkb_sa_lock_controls_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_controls_end (xcb_xkb_sa_lock_controls_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_action_message_next
- **
- ** @param xcb_xkb_sa_action_message_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_action_message_next (xcb_xkb_sa_action_message_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_action_message_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_action_message_end
- **
- ** @param xcb_xkb_sa_action_message_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_action_message_end (xcb_xkb_sa_action_message_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_redirect_key_next
- **
- ** @param xcb_xkb_sa_redirect_key_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_redirect_key_next (xcb_xkb_sa_redirect_key_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_redirect_key_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_redirect_key_end
- **
- ** @param xcb_xkb_sa_redirect_key_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_redirect_key_end (xcb_xkb_sa_redirect_key_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_device_btn_next
- **
- ** @param xcb_xkb_sa_device_btn_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_device_btn_next (xcb_xkb_sa_device_btn_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_device_btn_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_device_btn_end
- **
- ** @param xcb_xkb_sa_device_btn_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_device_btn_end (xcb_xkb_sa_device_btn_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_lock_device_btn_next
- **
- ** @param xcb_xkb_sa_lock_device_btn_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_lock_device_btn_next (xcb_xkb_sa_lock_device_btn_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_lock_device_btn_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_lock_device_btn_end
- **
- ** @param xcb_xkb_sa_lock_device_btn_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_lock_device_btn_end (xcb_xkb_sa_lock_device_btn_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sa_device_valuator_next
- **
- ** @param xcb_xkb_sa_device_valuator_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sa_device_valuator_next (xcb_xkb_sa_device_valuator_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sa_device_valuator_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sa_device_valuator_end
- **
- ** @param xcb_xkb_sa_device_valuator_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sa_device_valuator_end (xcb_xkb_sa_device_valuator_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_si_action_next
- **
- ** @param xcb_xkb_si_action_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_si_action_next (xcb_xkb_si_action_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_si_action_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_si_action_end
- **
- ** @param xcb_xkb_si_action_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_si_action_end (xcb_xkb_si_action_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_sym_interpret_next
- **
- ** @param xcb_xkb_sym_interpret_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_sym_interpret_next (xcb_xkb_sym_interpret_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_sym_interpret_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_sym_interpret_end
- **
- ** @param xcb_xkb_sym_interpret_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_sym_interpret_end (xcb_xkb_sym_interpret_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** void xcb_xkb_action_next
- **
- ** @param xcb_xkb_action_iterator_t *i
- ** @returns void
- **
- *****************************************************************************/
-
-void
-xcb_xkb_action_next (xcb_xkb_action_iterator_t *i /**< */)
-{
- --i->rem;
- ++i->data;
- i->index += sizeof(xcb_xkb_action_t);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_action_end
- **
- ** @param xcb_xkb_action_iterator_t i
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_action_end (xcb_xkb_action_iterator_t i /**< */)
-{
- xcb_generic_iterator_t ret;
- ret.data = i.data + i.rem;
- ret.index = i.index + ((char *) ret.data - (char *) i.data);
- ret.rem = 0;
- return ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension
- **
- ** @param xcb_connection_t *c
- ** @param uint16_t wantedMajor
- ** @param uint16_t wantedMinor
- ** @returns xcb_xkb_use_extension_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_use_extension_cookie_t
-xcb_xkb_use_extension (xcb_connection_t *c /**< */,
- uint16_t wantedMajor /**< */,
- uint16_t wantedMinor /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_USE_EXTENSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_use_extension_cookie_t xcb_ret;
- xcb_xkb_use_extension_request_t xcb_out;
-
- xcb_out.wantedMajor = wantedMajor;
- xcb_out.wantedMinor = wantedMinor;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint16_t wantedMajor
- ** @param uint16_t wantedMinor
- ** @returns xcb_xkb_use_extension_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_use_extension_cookie_t
-xcb_xkb_use_extension_unchecked (xcb_connection_t *c /**< */,
- uint16_t wantedMajor /**< */,
- uint16_t wantedMinor /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_USE_EXTENSION,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_use_extension_cookie_t xcb_ret;
- xcb_xkb_use_extension_request_t xcb_out;
-
- xcb_out.wantedMajor = wantedMajor;
- xcb_out.wantedMinor = wantedMinor;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_use_extension_reply_t * xcb_xkb_use_extension_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_use_extension_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_use_extension_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_use_extension_reply_t *
-xcb_xkb_use_extension_reply (xcb_connection_t *c /**< */,
- xcb_xkb_use_extension_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_use_extension_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-int
-xcb_xkb_select_events_details_serialize (void **_buffer /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- const xcb_xkb_select_events_details_t *_aux /**< */)
-{
- char *xcb_out = *_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int xcb_pad = 0;
- char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[23];
- unsigned int xcb_parts_idx = 0;
- unsigned int xcb_block_len = 0;
- unsigned int i;
- char *xcb_tmp;
-
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectNewKeyboard */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectNewKeyboard;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.newKeyboardDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->newKeyboardDetails;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_STATE_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectState */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectState;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.stateDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->stateDetails;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectCtrls */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectCtrls;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_select_events_details_t.ctrlDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->ctrlDetails;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectIndicatorState */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectIndicatorState;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_select_events_details_t.indicatorStateDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicatorStateDetails;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectIndicatorMap */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectIndicatorMap;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_select_events_details_t.indicatorMapDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicatorMapDetails;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NAMES_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectNames;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.namesDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->namesDetails;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectCompat */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectCompat;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_select_events_details_t.compatDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatDetails;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_BELL_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectBell */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectBell;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_select_events_details_t.bellDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bellDetails;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACTION_MESSAGE) {
- /* xcb_xkb_select_events_details_t.affectMsgDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectMsgDetails;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_select_events_details_t.msgDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->msgDetails;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectAccessX */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectAccessX;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.accessXDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->accessXDetails;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectExtDev */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectExtDev;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.extdevDetails */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->extdevDetails;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- if (NULL == xcb_out) {
- /* allocate memory */
- xcb_out = malloc(xcb_buffer_len);
- *_buffer = xcb_out;
- }
-
- xcb_tmp = xcb_out;
- for(i=0; i<xcb_parts_idx; i++) {
- if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
- memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
- if (0 != xcb_parts[i].iov_len)
- xcb_tmp += xcb_parts[i].iov_len;
- }
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_select_events_details_unpack (const void *_buffer /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- xcb_xkb_select_events_details_t *_aux /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectNewKeyboard */
- _aux->affectNewKeyboard = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.newKeyboardDetails */
- _aux->newKeyboardDetails = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_STATE_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectState */
- _aux->affectState = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.stateDetails */
- _aux->stateDetails = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectCtrls */
- _aux->affectCtrls = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_select_events_details_t.ctrlDetails */
- _aux->ctrlDetails = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectIndicatorState */
- _aux->affectIndicatorState = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_select_events_details_t.indicatorStateDetails */
- _aux->indicatorStateDetails = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectIndicatorMap */
- _aux->affectIndicatorMap = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_select_events_details_t.indicatorMapDetails */
- _aux->indicatorMapDetails = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NAMES_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectNames */
- _aux->affectNames = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.namesDetails */
- _aux->namesDetails = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectCompat */
- _aux->affectCompat = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_select_events_details_t.compatDetails */
- _aux->compatDetails = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_BELL_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectBell */
- _aux->affectBell = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_select_events_details_t.bellDetails */
- _aux->bellDetails = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACTION_MESSAGE) {
- /* xcb_xkb_select_events_details_t.affectMsgDetails */
- _aux->affectMsgDetails = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_select_events_details_t.msgDetails */
- _aux->msgDetails = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectAccessX */
- _aux->affectAccessX = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.accessXDetails */
- _aux->accessXDetails = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY) {
- /* xcb_xkb_select_events_details_t.affectExtDev */
- _aux->affectExtDev = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_select_events_details_t.extdevDetails */
- _aux->extdevDetails = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_select_events_details_sizeof (const void *_buffer /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */)
-{
- xcb_xkb_select_events_details_t _aux;
- return xcb_xkb_select_events_details_unpack(_buffer, affectWhich, clear, selectAll, &_aux);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_select_events_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t affectWhich
- ** @param uint16_t clear
- ** @param uint16_t selectAll
- ** @param uint16_t affectMap
- ** @param uint16_t map
- ** @param const void *details
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_select_events_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- uint16_t affectMap /**< */,
- uint16_t map /**< */,
- const void *details /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SELECT_EVENTS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_select_events_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.affectWhich = affectWhich;
- xcb_out.clear = clear;
- xcb_out.selectAll = selectAll;
- xcb_out.affectMap = affectMap;
- xcb_out.map = map;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_select_events_details_t details */
- xcb_parts[4].iov_base = (char *) details;
- xcb_parts[4].iov_len =
- xcb_xkb_select_events_details_sizeof (details, affectWhich, clear, selectAll);
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_select_events
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t affectWhich
- ** @param uint16_t clear
- ** @param uint16_t selectAll
- ** @param uint16_t affectMap
- ** @param uint16_t map
- ** @param const void *details
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_select_events (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- uint16_t affectMap /**< */,
- uint16_t map /**< */,
- const void *details /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SELECT_EVENTS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_select_events_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.affectWhich = affectWhich;
- xcb_out.clear = clear;
- xcb_out.selectAll = selectAll;
- xcb_out.affectMap = affectMap;
- xcb_out.map = map;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_select_events_details_t details */
- xcb_parts[4].iov_base = (char *) details;
- xcb_parts[4].iov_len =
- xcb_xkb_select_events_details_sizeof (details, affectWhich, clear, selectAll);
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_select_events_aux_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t affectWhich
- ** @param uint16_t clear
- ** @param uint16_t selectAll
- ** @param uint16_t affectMap
- ** @param uint16_t map
- ** @param const xcb_xkb_select_events_details_t *details
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_select_events_aux_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- uint16_t affectMap /**< */,
- uint16_t map /**< */,
- const xcb_xkb_select_events_details_t *details /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SELECT_EVENTS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_select_events_request_t xcb_out;
- void *xcb_aux0 = 0;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.affectWhich = affectWhich;
- xcb_out.clear = clear;
- xcb_out.selectAll = selectAll;
- xcb_out.affectMap = affectMap;
- xcb_out.map = map;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_select_events_details_t details */
- xcb_parts[4].iov_len =
- xcb_xkb_select_events_details_serialize (&xcb_aux0, affectWhich, clear, selectAll, details);
- xcb_parts[4].iov_base = xcb_aux0;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- free(xcb_aux0);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_select_events_aux
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t affectWhich
- ** @param uint16_t clear
- ** @param uint16_t selectAll
- ** @param uint16_t affectMap
- ** @param uint16_t map
- ** @param const xcb_xkb_select_events_details_t *details
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_select_events_aux (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t affectWhich /**< */,
- uint16_t clear /**< */,
- uint16_t selectAll /**< */,
- uint16_t affectMap /**< */,
- uint16_t map /**< */,
- const xcb_xkb_select_events_details_t *details /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SELECT_EVENTS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_select_events_request_t xcb_out;
- void *xcb_aux0 = 0;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.affectWhich = affectWhich;
- xcb_out.clear = clear;
- xcb_out.selectAll = selectAll;
- xcb_out.affectMap = affectMap;
- xcb_out.map = map;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_select_events_details_t details */
- xcb_parts[4].iov_len =
- xcb_xkb_select_events_details_serialize (&xcb_aux0, affectWhich, clear, selectAll, details);
- xcb_parts[4].iov_base = xcb_aux0;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- free(xcb_aux0);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_bell_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_bell_class_spec_t bellClass
- ** @param xcb_xkb_id_spec_t bellID
- ** @param int8_t percent
- ** @param uint8_t forceSound
- ** @param uint8_t eventOnly
- ** @param int16_t pitch
- ** @param int16_t duration
- ** @param xcb_atom_t name
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_bell_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_bell_class_spec_t bellClass /**< */,
- xcb_xkb_id_spec_t bellID /**< */,
- int8_t percent /**< */,
- uint8_t forceSound /**< */,
- uint8_t eventOnly /**< */,
- int16_t pitch /**< */,
- int16_t duration /**< */,
- xcb_atom_t name /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_BELL,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_bell_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.bellClass = bellClass;
- xcb_out.bellID = bellID;
- xcb_out.percent = percent;
- xcb_out.forceSound = forceSound;
- xcb_out.eventOnly = eventOnly;
- xcb_out.pad0 = 0;
- xcb_out.pitch = pitch;
- xcb_out.duration = duration;
- memset(xcb_out.pad1, 0, 2);
- xcb_out.name = name;
- xcb_out.window = window;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_bell
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_bell_class_spec_t bellClass
- ** @param xcb_xkb_id_spec_t bellID
- ** @param int8_t percent
- ** @param uint8_t forceSound
- ** @param uint8_t eventOnly
- ** @param int16_t pitch
- ** @param int16_t duration
- ** @param xcb_atom_t name
- ** @param xcb_window_t window
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_bell (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_bell_class_spec_t bellClass /**< */,
- xcb_xkb_id_spec_t bellID /**< */,
- int8_t percent /**< */,
- uint8_t forceSound /**< */,
- uint8_t eventOnly /**< */,
- int16_t pitch /**< */,
- int16_t duration /**< */,
- xcb_atom_t name /**< */,
- xcb_window_t window /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_BELL,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_bell_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.bellClass = bellClass;
- xcb_out.bellID = bellID;
- xcb_out.percent = percent;
- xcb_out.forceSound = forceSound;
- xcb_out.eventOnly = eventOnly;
- xcb_out.pad0 = 0;
- xcb_out.pitch = pitch;
- xcb_out.duration = duration;
- memset(xcb_out.pad1, 0, 2);
- xcb_out.name = name;
- xcb_out.window = window;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_state_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_state_cookie_t
-xcb_xkb_get_state (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_STATE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_state_cookie_t xcb_ret;
- xcb_xkb_get_state_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_state_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_state_cookie_t
-xcb_xkb_get_state_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_STATE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_state_cookie_t xcb_ret;
- xcb_xkb_get_state_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_state_reply_t * xcb_xkb_get_state_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_state_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_state_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_state_reply_t *
-xcb_xkb_get_state_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_state_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_latch_lock_state_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t affectModLocks
- ** @param uint8_t modLocks
- ** @param uint8_t lockGroup
- ** @param uint8_t groupLock
- ** @param uint8_t affectModLatches
- ** @param uint8_t latchGroup
- ** @param uint16_t groupLatch
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_latch_lock_state_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t affectModLocks /**< */,
- uint8_t modLocks /**< */,
- uint8_t lockGroup /**< */,
- uint8_t groupLock /**< */,
- uint8_t affectModLatches /**< */,
- uint8_t latchGroup /**< */,
- uint16_t groupLatch /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_LATCH_LOCK_STATE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_latch_lock_state_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.affectModLocks = affectModLocks;
- xcb_out.modLocks = modLocks;
- xcb_out.lockGroup = lockGroup;
- xcb_out.groupLock = groupLock;
- xcb_out.affectModLatches = affectModLatches;
- xcb_out.pad0 = 0;
- xcb_out.latchGroup = latchGroup;
- xcb_out.groupLatch = groupLatch;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_latch_lock_state
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t affectModLocks
- ** @param uint8_t modLocks
- ** @param uint8_t lockGroup
- ** @param uint8_t groupLock
- ** @param uint8_t affectModLatches
- ** @param uint8_t latchGroup
- ** @param uint16_t groupLatch
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_latch_lock_state (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t affectModLocks /**< */,
- uint8_t modLocks /**< */,
- uint8_t lockGroup /**< */,
- uint8_t groupLock /**< */,
- uint8_t affectModLatches /**< */,
- uint8_t latchGroup /**< */,
- uint16_t groupLatch /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_LATCH_LOCK_STATE,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_latch_lock_state_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.affectModLocks = affectModLocks;
- xcb_out.modLocks = modLocks;
- xcb_out.lockGroup = lockGroup;
- xcb_out.groupLock = groupLock;
- xcb_out.affectModLatches = affectModLatches;
- xcb_out.pad0 = 0;
- xcb_out.latchGroup = latchGroup;
- xcb_out.groupLatch = groupLatch;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_controls_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_controls_cookie_t
-xcb_xkb_get_controls (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_CONTROLS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_controls_cookie_t xcb_ret;
- xcb_xkb_get_controls_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_controls_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_controls_cookie_t
-xcb_xkb_get_controls_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_CONTROLS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_controls_cookie_t xcb_ret;
- xcb_xkb_get_controls_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_controls_reply_t * xcb_xkb_get_controls_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_controls_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_controls_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_controls_reply_t *
-xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_controls_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_controls_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_controls_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t affectInternalRealMods
- ** @param uint8_t internalRealMods
- ** @param uint8_t affectIgnoreLockRealMods
- ** @param uint8_t ignoreLockRealMods
- ** @param uint16_t affectInternalVirtualMods
- ** @param uint16_t internalVirtualMods
- ** @param uint16_t affectIgnoreLockVirtualMods
- ** @param uint16_t ignoreLockVirtualMods
- ** @param uint8_t mouseKeysDfltBtn
- ** @param uint8_t groupsWrap
- ** @param uint16_t accessXOptions
- ** @param uint32_t affectEnabledControls
- ** @param uint32_t enabledControls
- ** @param uint32_t changeControls
- ** @param uint16_t repeatDelay
- ** @param uint16_t repeatInterval
- ** @param uint16_t slowKeysDelay
- ** @param uint16_t debounceDelay
- ** @param uint16_t mouseKeysDelay
- ** @param uint16_t mouseKeysInterval
- ** @param uint16_t mouseKeysTimeToMax
- ** @param uint16_t mouseKeysMaxSpeed
- ** @param int16_t mouseKeysCurve
- ** @param uint16_t accessXTimeout
- ** @param uint32_t accessXTimeoutMask
- ** @param uint32_t accessXTimeoutValues
- ** @param uint16_t accessXTimeoutOptionsMask
- ** @param uint16_t accessXTimeoutOptionsValues
- ** @param const uint8_t *perKeyRepeat
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t affectInternalRealMods /**< */,
- uint8_t internalRealMods /**< */,
- uint8_t affectIgnoreLockRealMods /**< */,
- uint8_t ignoreLockRealMods /**< */,
- uint16_t affectInternalVirtualMods /**< */,
- uint16_t internalVirtualMods /**< */,
- uint16_t affectIgnoreLockVirtualMods /**< */,
- uint16_t ignoreLockVirtualMods /**< */,
- uint8_t mouseKeysDfltBtn /**< */,
- uint8_t groupsWrap /**< */,
- uint16_t accessXOptions /**< */,
- uint32_t affectEnabledControls /**< */,
- uint32_t enabledControls /**< */,
- uint32_t changeControls /**< */,
- uint16_t repeatDelay /**< */,
- uint16_t repeatInterval /**< */,
- uint16_t slowKeysDelay /**< */,
- uint16_t debounceDelay /**< */,
- uint16_t mouseKeysDelay /**< */,
- uint16_t mouseKeysInterval /**< */,
- uint16_t mouseKeysTimeToMax /**< */,
- uint16_t mouseKeysMaxSpeed /**< */,
- int16_t mouseKeysCurve /**< */,
- uint16_t accessXTimeout /**< */,
- uint32_t accessXTimeoutMask /**< */,
- uint32_t accessXTimeoutValues /**< */,
- uint16_t accessXTimeoutOptionsMask /**< */,
- uint16_t accessXTimeoutOptionsValues /**< */,
- const uint8_t *perKeyRepeat /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_CONTROLS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_controls_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.affectInternalRealMods = affectInternalRealMods;
- xcb_out.internalRealMods = internalRealMods;
- xcb_out.affectIgnoreLockRealMods = affectIgnoreLockRealMods;
- xcb_out.ignoreLockRealMods = ignoreLockRealMods;
- xcb_out.affectInternalVirtualMods = affectInternalVirtualMods;
- xcb_out.internalVirtualMods = internalVirtualMods;
- xcb_out.affectIgnoreLockVirtualMods = affectIgnoreLockVirtualMods;
- xcb_out.ignoreLockVirtualMods = ignoreLockVirtualMods;
- xcb_out.mouseKeysDfltBtn = mouseKeysDfltBtn;
- xcb_out.groupsWrap = groupsWrap;
- xcb_out.accessXOptions = accessXOptions;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.affectEnabledControls = affectEnabledControls;
- xcb_out.enabledControls = enabledControls;
- xcb_out.changeControls = changeControls;
- xcb_out.repeatDelay = repeatDelay;
- xcb_out.repeatInterval = repeatInterval;
- xcb_out.slowKeysDelay = slowKeysDelay;
- xcb_out.debounceDelay = debounceDelay;
- xcb_out.mouseKeysDelay = mouseKeysDelay;
- xcb_out.mouseKeysInterval = mouseKeysInterval;
- xcb_out.mouseKeysTimeToMax = mouseKeysTimeToMax;
- xcb_out.mouseKeysMaxSpeed = mouseKeysMaxSpeed;
- xcb_out.mouseKeysCurve = mouseKeysCurve;
- xcb_out.accessXTimeout = accessXTimeout;
- xcb_out.accessXTimeoutMask = accessXTimeoutMask;
- xcb_out.accessXTimeoutValues = accessXTimeoutValues;
- xcb_out.accessXTimeoutOptionsMask = accessXTimeoutOptionsMask;
- xcb_out.accessXTimeoutOptionsValues = accessXTimeoutOptionsValues;
- memcpy(xcb_out.perKeyRepeat, perKeyRepeat, 32);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_controls
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t affectInternalRealMods
- ** @param uint8_t internalRealMods
- ** @param uint8_t affectIgnoreLockRealMods
- ** @param uint8_t ignoreLockRealMods
- ** @param uint16_t affectInternalVirtualMods
- ** @param uint16_t internalVirtualMods
- ** @param uint16_t affectIgnoreLockVirtualMods
- ** @param uint16_t ignoreLockVirtualMods
- ** @param uint8_t mouseKeysDfltBtn
- ** @param uint8_t groupsWrap
- ** @param uint16_t accessXOptions
- ** @param uint32_t affectEnabledControls
- ** @param uint32_t enabledControls
- ** @param uint32_t changeControls
- ** @param uint16_t repeatDelay
- ** @param uint16_t repeatInterval
- ** @param uint16_t slowKeysDelay
- ** @param uint16_t debounceDelay
- ** @param uint16_t mouseKeysDelay
- ** @param uint16_t mouseKeysInterval
- ** @param uint16_t mouseKeysTimeToMax
- ** @param uint16_t mouseKeysMaxSpeed
- ** @param int16_t mouseKeysCurve
- ** @param uint16_t accessXTimeout
- ** @param uint32_t accessXTimeoutMask
- ** @param uint32_t accessXTimeoutValues
- ** @param uint16_t accessXTimeoutOptionsMask
- ** @param uint16_t accessXTimeoutOptionsValues
- ** @param const uint8_t *perKeyRepeat
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_controls (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t affectInternalRealMods /**< */,
- uint8_t internalRealMods /**< */,
- uint8_t affectIgnoreLockRealMods /**< */,
- uint8_t ignoreLockRealMods /**< */,
- uint16_t affectInternalVirtualMods /**< */,
- uint16_t internalVirtualMods /**< */,
- uint16_t affectIgnoreLockVirtualMods /**< */,
- uint16_t ignoreLockVirtualMods /**< */,
- uint8_t mouseKeysDfltBtn /**< */,
- uint8_t groupsWrap /**< */,
- uint16_t accessXOptions /**< */,
- uint32_t affectEnabledControls /**< */,
- uint32_t enabledControls /**< */,
- uint32_t changeControls /**< */,
- uint16_t repeatDelay /**< */,
- uint16_t repeatInterval /**< */,
- uint16_t slowKeysDelay /**< */,
- uint16_t debounceDelay /**< */,
- uint16_t mouseKeysDelay /**< */,
- uint16_t mouseKeysInterval /**< */,
- uint16_t mouseKeysTimeToMax /**< */,
- uint16_t mouseKeysMaxSpeed /**< */,
- int16_t mouseKeysCurve /**< */,
- uint16_t accessXTimeout /**< */,
- uint32_t accessXTimeoutMask /**< */,
- uint32_t accessXTimeoutValues /**< */,
- uint16_t accessXTimeoutOptionsMask /**< */,
- uint16_t accessXTimeoutOptionsValues /**< */,
- const uint8_t *perKeyRepeat /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_CONTROLS,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_controls_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.affectInternalRealMods = affectInternalRealMods;
- xcb_out.internalRealMods = internalRealMods;
- xcb_out.affectIgnoreLockRealMods = affectIgnoreLockRealMods;
- xcb_out.ignoreLockRealMods = ignoreLockRealMods;
- xcb_out.affectInternalVirtualMods = affectInternalVirtualMods;
- xcb_out.internalVirtualMods = internalVirtualMods;
- xcb_out.affectIgnoreLockVirtualMods = affectIgnoreLockVirtualMods;
- xcb_out.ignoreLockVirtualMods = ignoreLockVirtualMods;
- xcb_out.mouseKeysDfltBtn = mouseKeysDfltBtn;
- xcb_out.groupsWrap = groupsWrap;
- xcb_out.accessXOptions = accessXOptions;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.affectEnabledControls = affectEnabledControls;
- xcb_out.enabledControls = enabledControls;
- xcb_out.changeControls = changeControls;
- xcb_out.repeatDelay = repeatDelay;
- xcb_out.repeatInterval = repeatInterval;
- xcb_out.slowKeysDelay = slowKeysDelay;
- xcb_out.debounceDelay = debounceDelay;
- xcb_out.mouseKeysDelay = mouseKeysDelay;
- xcb_out.mouseKeysInterval = mouseKeysInterval;
- xcb_out.mouseKeysTimeToMax = mouseKeysTimeToMax;
- xcb_out.mouseKeysMaxSpeed = mouseKeysMaxSpeed;
- xcb_out.mouseKeysCurve = mouseKeysCurve;
- xcb_out.accessXTimeout = accessXTimeout;
- xcb_out.accessXTimeoutMask = accessXTimeoutMask;
- xcb_out.accessXTimeoutValues = accessXTimeoutValues;
- xcb_out.accessXTimeoutOptionsMask = accessXTimeoutOptionsMask;
- xcb_out.accessXTimeoutOptionsValues = accessXTimeoutOptionsValues;
- memcpy(xcb_out.perKeyRepeat, perKeyRepeat, 32);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_types_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_types_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return R->nTypes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_type_iterator_t xcb_xkb_get_map_map_types_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_key_type_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_type_iterator_t
-xcb_xkb_get_map_map_types_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_xkb_key_type_iterator_t i;
- i.data = /* map */ S->types_rtrn;
- i.rem = R->nTypes;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_syms_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_syms_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return R->nKeySyms;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_map_map_syms_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_key_sym_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_sym_map_iterator_t
-xcb_xkb_get_map_map_syms_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_xkb_key_sym_map_iterator_t i;
- i.data = /* map */ S->syms_rtrn;
- i.rem = R->nKeySyms;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_map_map_acts_rtrn_count
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_map_map_acts_rtrn_count (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->acts_rtrn_count;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_acts_rtrn_count_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_acts_rtrn_count_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return R->nKeyActions;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_acts_rtrn_count_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* map */ S->acts_rtrn_count + R->nKeyActions;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_map_map_alignment_pad
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_map_map_alignment_pad (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->alignment_pad;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_alignment_pad_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_alignment_pad_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return (((R->nKeyActions + 3) & (~3)) - R->nKeyActions);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_alignment_pad_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* map */ S->alignment_pad + (((R->nKeyActions + 3) & (~3)) - R->nKeyActions);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_t * xcb_xkb_get_map_map_acts_rtrn_acts
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_action_t *
- **
- *****************************************************************************/
-
-xcb_xkb_action_t *
-xcb_xkb_get_map_map_acts_rtrn_acts (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->acts_rtrn_acts;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_acts_rtrn_acts_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_acts_rtrn_acts_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return R->totalActions;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_iterator_t xcb_xkb_get_map_map_acts_rtrn_acts_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_action_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_action_iterator_t
-xcb_xkb_get_map_map_acts_rtrn_acts_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_xkb_action_iterator_t i;
- i.data = /* map */ S->acts_rtrn_acts;
- i.rem = R->totalActions;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_t * xcb_xkb_get_map_map_behaviors_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_set_behavior_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_t *
-xcb_xkb_get_map_map_behaviors_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->behaviors_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_behaviors_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_behaviors_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return R->totalKeyBehaviors;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_map_map_behaviors_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_set_behavior_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_iterator_t
-xcb_xkb_get_map_map_behaviors_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_xkb_set_behavior_iterator_t i;
- i.data = /* map */ S->behaviors_rtrn;
- i.rem = R->totalKeyBehaviors;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_map_map_vmods_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_map_map_vmods_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->vmods_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_vmods_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_vmods_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return xcb_popcount(R->virtualMods);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_vmods_rtrn_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_vmods_rtrn_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* map */ S->vmods_rtrn + xcb_popcount(R->virtualMods);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_map_map_alignment_pad_2
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_map_map_alignment_pad_2 (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->alignment_pad2;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_alignment_pad_2_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_alignment_pad_2_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return (((xcb_popcount(R->virtualMods) + 3) & (~3)) - xcb_popcount(R->virtualMods));
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_2_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_alignment_pad_2_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* map */ S->alignment_pad2 + (((xcb_popcount(R->virtualMods) + 3) & (~3)) - xcb_popcount(R->virtualMods));
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_t * xcb_xkb_get_map_map_explicit_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_set_explicit_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_t *
-xcb_xkb_get_map_map_explicit_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->explicit_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_explicit_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_explicit_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return R->totalKeyExplicit;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_map_map_explicit_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_set_explicit_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_iterator_t
-xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_xkb_set_explicit_iterator_t i;
- i.data = /* map */ S->explicit_rtrn;
- i.rem = R->totalKeyExplicit;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_xkb_get_map_map_alignment_pad_3
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_xkb_get_map_map_alignment_pad_3 (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->alignment_pad3;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_alignment_pad_3_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_alignment_pad_3_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return (((R->totalKeyExplicit + 1) & (~1)) - R->totalKeyExplicit);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_3_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_alignment_pad_3_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* map */ S->alignment_pad3 + (((R->totalKeyExplicit + 1) & (~1)) - R->totalKeyExplicit);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_t * xcb_xkb_get_map_map_modmap_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_key_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_t *
-xcb_xkb_get_map_map_modmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->modmap_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_modmap_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_modmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return R->totalModMapKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_map_map_modmap_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_key_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_iterator_t
-xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_xkb_key_mod_map_iterator_t i;
- i.data = /* map */ S->modmap_rtrn;
- i.rem = R->totalModMapKeys;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint16_t * xcb_xkb_get_map_map_alignment_pad_4
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns uint16_t *
- **
- *****************************************************************************/
-
-uint16_t *
-xcb_xkb_get_map_map_alignment_pad_4 (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->alignment_pad4;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_alignment_pad_4_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_alignment_pad_4_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return (((R->totalModMapKeys + 1) & (~1)) - R->totalModMapKeys);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_map_map_alignment_pad_4_end
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_map_map_alignment_pad_4_end (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* map */ S->alignment_pad4 + (((R->totalModMapKeys + 1) & (~1)) - R->totalModMapKeys);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_map_map_vmodmap_rtrn
- **
- ** @param const xcb_xkb_get_map_map_t *S
- ** @returns xcb_xkb_key_v_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_t *
-xcb_xkb_get_map_map_vmodmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */)
-{
- return /* map */ S->vmodmap_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_map_map_vmodmap_rtrn_length
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_map_map_vmodmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- return R->totalVModMapKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_map_map_vmodmap_rtrn_iterator
- **
- ** @param const xcb_xkb_get_map_map_t *R
- ** @returns xcb_xkb_key_v_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_iterator_t
-xcb_xkb_get_map_map_vmodmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */,
- const xcb_xkb_get_map_map_t *S /**< */)
-{
- xcb_xkb_key_v_mod_map_iterator_t i;
- i.data = /* map */ S->vmodmap_rtrn;
- i.rem = R->totalVModMapKeys;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-int
-xcb_xkb_get_map_map_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- const xcb_xkb_get_map_map_t *_aux /**< */)
-{
- char *xcb_out = *_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to = 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(present & XCB_XKB_MAP_PART_KEY_TYPES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* types_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn;
- xcb_parts[xcb_parts_idx].iov_len = 0;
- xcb_tmp = (char *) _aux->types_rtrn;
- for(i=0; i<nTypes; i++) {
- xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp);
- xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
- }
- xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* syms_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn;
- xcb_parts[xcb_parts_idx].iov_len = 0;
- xcb_tmp = (char *) _aux->syms_rtrn;
- for(i=0; i<nKeySyms; i++) {
- xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
- xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
- }
- xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* acts_rtrn_count */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count;
- xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad;
- xcb_block_len += (((nKeyActions + 3) & (~3)) - nKeyActions) * sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = (((nKeyActions + 3) & (~3)) - nKeyActions) * sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* acts_rtrn_acts */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts;
- xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
- xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_action_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* behaviors_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn;
- xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
- xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmods_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad2 */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad2;
- xcb_block_len += (((xcb_popcount(virtualMods) + 3) & (~3)) - xcb_popcount(virtualMods)) * sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = (((xcb_popcount(virtualMods) + 3) & (~3)) - xcb_popcount(virtualMods)) * sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* explicit_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn;
- xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
- xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad3 */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad3;
- xcb_block_len += (((totalKeyExplicit + 1) & (~1)) - totalKeyExplicit) * sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = (((totalKeyExplicit + 1) & (~1)) - totalKeyExplicit) * sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* modmap_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn;
- xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
- xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad4 */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad4;
- xcb_block_len += (((totalModMapKeys + 1) & (~1)) - totalModMapKeys) * sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = (((totalModMapKeys + 1) & (~1)) - totalModMapKeys) * sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmodmap_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn;
- xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
- xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- if (NULL == xcb_out) {
- /* allocate memory */
- xcb_out = malloc(xcb_buffer_len);
- *_buffer = xcb_out;
- }
-
- xcb_tmp = xcb_out;
- for(i=0; i<xcb_parts_idx; i++) {
- if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
- memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
- if (0 != xcb_parts[i].iov_len)
- xcb_tmp += xcb_parts[i].iov_len;
- }
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_map_map_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- xcb_xkb_get_map_map_t *_aux /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int i;
- unsigned int xcb_tmp_len;
-
- if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* types_rtrn */
- _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp;
- for(i=0; i<nTypes; i++) {
- xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* syms_rtrn */
- _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp;
- for(i=0; i<nKeySyms; i++) {
- xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* acts_rtrn_count */
- _aux->acts_rtrn_count = (uint8_t *)xcb_tmp;
- xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad */
- _aux->alignment_pad = (uint8_t *)xcb_tmp;
- xcb_block_len += (((nKeyActions + 3) & (~3)) - nKeyActions) * sizeof(xcb_keycode_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* acts_rtrn_acts */
- _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp;
- xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_action_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* behaviors_rtrn */
- _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp;
- xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmods_rtrn */
- _aux->vmods_rtrn = (uint8_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad2 */
- _aux->alignment_pad2 = (uint8_t *)xcb_tmp;
- xcb_block_len += (((xcb_popcount(virtualMods) + 3) & (~3)) - xcb_popcount(virtualMods)) * sizeof(xcb_keycode_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* explicit_rtrn */
- _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp;
- xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad3 */
- _aux->alignment_pad3 = (uint16_t *)xcb_tmp;
- xcb_block_len += (((totalKeyExplicit + 1) & (~1)) - totalKeyExplicit) * sizeof(uint16_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* modmap_rtrn */
- _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp;
- xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad4 */
- _aux->alignment_pad4 = (uint16_t *)xcb_tmp;
- xcb_block_len += (((totalModMapKeys + 1) & (~1)) - totalModMapKeys) * sizeof(uint16_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint16_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmodmap_rtrn */
- _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
- xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_map_map_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */)
-{
- xcb_xkb_get_map_map_t _aux;
- return xcb_xkb_get_map_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t full
- ** @param uint16_t partial
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint16_t virtualMods
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @returns xcb_xkb_get_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_map_cookie_t
-xcb_xkb_get_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t full /**< */,
- uint16_t partial /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_MAP,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_map_cookie_t xcb_ret;
- xcb_xkb_get_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.full = full;
- xcb_out.partial = partial;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKeySym = firstKeySym;
- xcb_out.nKeySyms = nKeySyms;
- xcb_out.firstKeyAction = firstKeyAction;
- xcb_out.nKeyActions = nKeyActions;
- xcb_out.firstKeyBehavior = firstKeyBehavior;
- xcb_out.nKeyBehaviors = nKeyBehaviors;
- xcb_out.virtualMods = virtualMods;
- xcb_out.firstKeyExplicit = firstKeyExplicit;
- xcb_out.nKeyExplicit = nKeyExplicit;
- xcb_out.firstModMapKey = firstModMapKey;
- xcb_out.nModMapKeys = nModMapKeys;
- xcb_out.firstVModMapKey = firstVModMapKey;
- xcb_out.nVModMapKeys = nVModMapKeys;
- memset(xcb_out.pad0, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t full
- ** @param uint16_t partial
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint16_t virtualMods
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @returns xcb_xkb_get_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_map_cookie_t
-xcb_xkb_get_map_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t full /**< */,
- uint16_t partial /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_MAP,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_map_cookie_t xcb_ret;
- xcb_xkb_get_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.full = full;
- xcb_out.partial = partial;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKeySym = firstKeySym;
- xcb_out.nKeySyms = nKeySyms;
- xcb_out.firstKeyAction = firstKeyAction;
- xcb_out.nKeyActions = nKeyActions;
- xcb_out.firstKeyBehavior = firstKeyBehavior;
- xcb_out.nKeyBehaviors = nKeyBehaviors;
- xcb_out.virtualMods = virtualMods;
- xcb_out.firstKeyExplicit = firstKeyExplicit;
- xcb_out.nKeyExplicit = nKeyExplicit;
- xcb_out.firstModMapKey = firstModMapKey;
- xcb_out.nModMapKeys = nModMapKeys;
- xcb_out.firstVModMapKey = firstVModMapKey;
- xcb_out.nVModMapKeys = nVModMapKeys;
- memset(xcb_out.pad0, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_map_map_t * xcb_xkb_get_map_map
- **
- ** @param const xcb_xkb_get_map_reply_t *R
- ** @returns xcb_xkb_get_map_map_t *
- **
- *****************************************************************************/
-
-void *
-xcb_xkb_get_map_map (const xcb_xkb_get_map_reply_t *R /**< */)
-{
- return (void *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_map_reply_t * xcb_xkb_get_map_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_map_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_map_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_map_reply_t *
-xcb_xkb_get_map_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_map_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_types_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_types_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- return R->nTypes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_key_type_iterator_t xcb_xkb_set_map_values_types_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_set_key_type_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_key_type_iterator_t
-xcb_xkb_set_map_values_types_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- xcb_xkb_set_key_type_iterator_t i;
- i.data = /* values */ S->types;
- i.rem = R->nTypes;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_syms_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_syms_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- return R->nKeySyms;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_set_map_values_syms_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_key_sym_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_sym_map_iterator_t
-xcb_xkb_set_map_values_syms_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- xcb_xkb_key_sym_map_iterator_t i;
- i.data = /* values */ S->syms;
- i.rem = R->nKeySyms;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_set_map_values_actions_count
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_set_map_values_actions_count (const xcb_xkb_set_map_values_t *S /**< */)
-{
- return /* values */ S->actionsCount;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_actions_count_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_actions_count_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- return R->nKeyActions;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_map_values_actions_count_end
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_map_values_actions_count_end (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* values */ S->actionsCount + R->nKeyActions;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_t * xcb_xkb_set_map_values_actions
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_action_t *
- **
- *****************************************************************************/
-
-xcb_xkb_action_t *
-xcb_xkb_set_map_values_actions (const xcb_xkb_set_map_values_t *S /**< */)
-{
- return /* values */ S->actions;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_actions_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_actions_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- return R->totalActions;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_iterator_t xcb_xkb_set_map_values_actions_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_action_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_action_iterator_t
-xcb_xkb_set_map_values_actions_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- xcb_xkb_action_iterator_t i;
- i.data = /* values */ S->actions;
- i.rem = R->totalActions;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_t * xcb_xkb_set_map_values_behaviors
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_set_behavior_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_t *
-xcb_xkb_set_map_values_behaviors (const xcb_xkb_set_map_values_t *S /**< */)
-{
- return /* values */ S->behaviors;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_behaviors_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_behaviors_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- return R->totalKeyBehaviors;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_iterator_t xcb_xkb_set_map_values_behaviors_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_set_behavior_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_iterator_t
-xcb_xkb_set_map_values_behaviors_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- xcb_xkb_set_behavior_iterator_t i;
- i.data = /* values */ S->behaviors;
- i.rem = R->totalKeyBehaviors;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_set_map_values_vmods
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_set_map_values_vmods (const xcb_xkb_set_map_values_t *S /**< */)
-{
- return /* values */ S->vmods;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_vmods_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_vmods_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- return xcb_popcount(R->virtualMods);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_map_values_vmods_end
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_map_values_vmods_end (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* values */ S->vmods + xcb_popcount(R->virtualMods);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_t * xcb_xkb_set_map_values_explicit
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_set_explicit_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_t *
-xcb_xkb_set_map_values_explicit (const xcb_xkb_set_map_values_t *S /**< */)
-{
- return /* values */ S->explicit;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_explicit_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_explicit_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- return R->totalKeyExplicit;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_iterator_t xcb_xkb_set_map_values_explicit_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_set_explicit_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_iterator_t
-xcb_xkb_set_map_values_explicit_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- xcb_xkb_set_explicit_iterator_t i;
- i.data = /* values */ S->explicit;
- i.rem = R->totalKeyExplicit;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_t * xcb_xkb_set_map_values_modmap
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_key_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_t *
-xcb_xkb_set_map_values_modmap (const xcb_xkb_set_map_values_t *S /**< */)
-{
- return /* values */ S->modmap;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_modmap_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_modmap_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- return R->totalModMapKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_set_map_values_modmap_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_key_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_iterator_t
-xcb_xkb_set_map_values_modmap_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- xcb_xkb_key_mod_map_iterator_t i;
- i.data = /* values */ S->modmap;
- i.rem = R->totalModMapKeys;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_t * xcb_xkb_set_map_values_vmodmap
- **
- ** @param const xcb_xkb_set_map_values_t *S
- ** @returns xcb_xkb_key_v_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_t *
-xcb_xkb_set_map_values_vmodmap (const xcb_xkb_set_map_values_t *S /**< */)
-{
- return /* values */ S->vmodmap;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_map_values_vmodmap_length
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_map_values_vmodmap_length (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- return R->totalVModMapKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_set_map_values_vmodmap_iterator
- **
- ** @param const xcb_xkb_set_map_values_t *R
- ** @returns xcb_xkb_key_v_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_iterator_t
-xcb_xkb_set_map_values_vmodmap_iterator (const xcb_xkb_set_map_request_t *R /**< */,
- const xcb_xkb_set_map_values_t *S /**< */)
-{
- xcb_xkb_key_v_mod_map_iterator_t i;
- i.data = /* values */ S->vmodmap;
- i.rem = R->totalVModMapKeys;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-int
-xcb_xkb_set_map_values_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- const xcb_xkb_set_map_values_t *_aux /**< */)
-{
- char *xcb_out = *_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int xcb_pad = 0;
- char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[19];
- unsigned int xcb_parts_idx = 0;
- unsigned int xcb_block_len = 0;
- unsigned int i;
- char *xcb_tmp;
-
- if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* types */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types;
- xcb_parts[xcb_parts_idx].iov_len = 0;
- xcb_tmp = (char *) _aux->types;
- for(i=0; i<nTypes; i++) {
- xcb_block_len = xcb_xkb_set_key_type_sizeof(xcb_tmp);
- xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
- }
- xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_set_key_type_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* syms */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms;
- xcb_parts[xcb_parts_idx].iov_len = 0;
- xcb_tmp = (char *) _aux->syms;
- for(i=0; i<nKeySyms; i++) {
- xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
- xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
- }
- xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* actionsCount */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->actionsCount;
- xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* actions */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->actions;
- xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
- xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_action_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* behaviors */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors;
- xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
- xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmods */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* explicit */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit;
- xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
- xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
- }
- if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* modmap */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap;
- xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
- xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmodmap */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap;
- xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
- xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- if (NULL == xcb_out) {
- /* allocate memory */
- xcb_out = malloc(xcb_buffer_len);
- *_buffer = xcb_out;
- }
-
- xcb_tmp = xcb_out;
- for(i=0; i<xcb_parts_idx; i++) {
- if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
- memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
- if (0 != xcb_parts[i].iov_len)
- xcb_tmp += xcb_parts[i].iov_len;
- }
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_set_map_values_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- xcb_xkb_set_map_values_t *_aux /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int i;
- unsigned int xcb_tmp_len;
-
- if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* types */
- _aux->types = (xcb_xkb_set_key_type_t *)xcb_tmp;
- for(i=0; i<nTypes; i++) {
- xcb_tmp_len = xcb_xkb_set_key_type_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_set_key_type_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* syms */
- _aux->syms = (xcb_xkb_key_sym_map_t *)xcb_tmp;
- for(i=0; i<nKeySyms; i++) {
- xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* actionsCount */
- _aux->actionsCount = (uint8_t *)xcb_tmp;
- xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* actions */
- _aux->actions = (xcb_xkb_action_t *)xcb_tmp;
- xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_action_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* behaviors */
- _aux->behaviors = (xcb_xkb_set_behavior_t *)xcb_tmp;
- xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmods */
- _aux->vmods = (uint8_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* explicit */
- _aux->explicit = (xcb_xkb_set_explicit_t *)xcb_tmp;
- xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
- }
- if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* modmap */
- _aux->modmap = (xcb_xkb_key_mod_map_t *)xcb_tmp;
- xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmodmap */
- _aux->vmodmap = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
- xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_set_map_values_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */)
-{
- xcb_xkb_set_map_values_t _aux;
- return xcb_xkb_set_map_values_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_map_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t present
- ** @param uint16_t flags
- ** @param xcb_keycode_t minKeyCode
- ** @param xcb_keycode_t maxKeyCode
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param uint16_t totalSyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param uint16_t totalActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint8_t totalKeyBehaviors
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param uint8_t totalKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param uint8_t totalModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @param uint8_t totalVModMapKeys
- ** @param uint16_t virtualMods
- ** @param const void *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_map_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t present /**< */,
- uint16_t flags /**< */,
- xcb_keycode_t minKeyCode /**< */,
- xcb_keycode_t maxKeyCode /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- uint16_t totalSyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint8_t totalKeyBehaviors /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- uint8_t totalKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- uint8_t totalModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t virtualMods /**< */,
- const void *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_MAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.present = present;
- xcb_out.flags = flags;
- xcb_out.minKeyCode = minKeyCode;
- xcb_out.maxKeyCode = maxKeyCode;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKeySym = firstKeySym;
- xcb_out.nKeySyms = nKeySyms;
- xcb_out.totalSyms = totalSyms;
- xcb_out.firstKeyAction = firstKeyAction;
- xcb_out.nKeyActions = nKeyActions;
- xcb_out.totalActions = totalActions;
- xcb_out.firstKeyBehavior = firstKeyBehavior;
- xcb_out.nKeyBehaviors = nKeyBehaviors;
- xcb_out.totalKeyBehaviors = totalKeyBehaviors;
- xcb_out.firstKeyExplicit = firstKeyExplicit;
- xcb_out.nKeyExplicit = nKeyExplicit;
- xcb_out.totalKeyExplicit = totalKeyExplicit;
- xcb_out.firstModMapKey = firstModMapKey;
- xcb_out.nModMapKeys = nModMapKeys;
- xcb_out.totalModMapKeys = totalModMapKeys;
- xcb_out.firstVModMapKey = firstVModMapKey;
- xcb_out.nVModMapKeys = nVModMapKeys;
- xcb_out.totalVModMapKeys = totalVModMapKeys;
- xcb_out.virtualMods = virtualMods;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_set_map_values_t values */
- xcb_parts[4].iov_base = (char *) values;
- xcb_parts[4].iov_len =
- xcb_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present);
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t present
- ** @param uint16_t flags
- ** @param xcb_keycode_t minKeyCode
- ** @param xcb_keycode_t maxKeyCode
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param uint16_t totalSyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param uint16_t totalActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint8_t totalKeyBehaviors
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param uint8_t totalKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param uint8_t totalModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @param uint8_t totalVModMapKeys
- ** @param uint16_t virtualMods
- ** @param const void *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t present /**< */,
- uint16_t flags /**< */,
- xcb_keycode_t minKeyCode /**< */,
- xcb_keycode_t maxKeyCode /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- uint16_t totalSyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint8_t totalKeyBehaviors /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- uint8_t totalKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- uint8_t totalModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t virtualMods /**< */,
- const void *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_MAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.present = present;
- xcb_out.flags = flags;
- xcb_out.minKeyCode = minKeyCode;
- xcb_out.maxKeyCode = maxKeyCode;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKeySym = firstKeySym;
- xcb_out.nKeySyms = nKeySyms;
- xcb_out.totalSyms = totalSyms;
- xcb_out.firstKeyAction = firstKeyAction;
- xcb_out.nKeyActions = nKeyActions;
- xcb_out.totalActions = totalActions;
- xcb_out.firstKeyBehavior = firstKeyBehavior;
- xcb_out.nKeyBehaviors = nKeyBehaviors;
- xcb_out.totalKeyBehaviors = totalKeyBehaviors;
- xcb_out.firstKeyExplicit = firstKeyExplicit;
- xcb_out.nKeyExplicit = nKeyExplicit;
- xcb_out.totalKeyExplicit = totalKeyExplicit;
- xcb_out.firstModMapKey = firstModMapKey;
- xcb_out.nModMapKeys = nModMapKeys;
- xcb_out.totalModMapKeys = totalModMapKeys;
- xcb_out.firstVModMapKey = firstVModMapKey;
- xcb_out.nVModMapKeys = nVModMapKeys;
- xcb_out.totalVModMapKeys = totalVModMapKeys;
- xcb_out.virtualMods = virtualMods;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_set_map_values_t values */
- xcb_parts[4].iov_base = (char *) values;
- xcb_parts[4].iov_len =
- xcb_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present);
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_map_aux_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t present
- ** @param uint16_t flags
- ** @param xcb_keycode_t minKeyCode
- ** @param xcb_keycode_t maxKeyCode
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param uint16_t totalSyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param uint16_t totalActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint8_t totalKeyBehaviors
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param uint8_t totalKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param uint8_t totalModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @param uint8_t totalVModMapKeys
- ** @param uint16_t virtualMods
- ** @param const xcb_xkb_set_map_values_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_map_aux_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t present /**< */,
- uint16_t flags /**< */,
- xcb_keycode_t minKeyCode /**< */,
- xcb_keycode_t maxKeyCode /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- uint16_t totalSyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint8_t totalKeyBehaviors /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- uint8_t totalKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- uint8_t totalModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t virtualMods /**< */,
- const xcb_xkb_set_map_values_t *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_MAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_map_request_t xcb_out;
- void *xcb_aux0 = 0;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.present = present;
- xcb_out.flags = flags;
- xcb_out.minKeyCode = minKeyCode;
- xcb_out.maxKeyCode = maxKeyCode;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKeySym = firstKeySym;
- xcb_out.nKeySyms = nKeySyms;
- xcb_out.totalSyms = totalSyms;
- xcb_out.firstKeyAction = firstKeyAction;
- xcb_out.nKeyActions = nKeyActions;
- xcb_out.totalActions = totalActions;
- xcb_out.firstKeyBehavior = firstKeyBehavior;
- xcb_out.nKeyBehaviors = nKeyBehaviors;
- xcb_out.totalKeyBehaviors = totalKeyBehaviors;
- xcb_out.firstKeyExplicit = firstKeyExplicit;
- xcb_out.nKeyExplicit = nKeyExplicit;
- xcb_out.totalKeyExplicit = totalKeyExplicit;
- xcb_out.firstModMapKey = firstModMapKey;
- xcb_out.nModMapKeys = nModMapKeys;
- xcb_out.totalModMapKeys = totalModMapKeys;
- xcb_out.firstVModMapKey = firstVModMapKey;
- xcb_out.nVModMapKeys = nVModMapKeys;
- xcb_out.totalVModMapKeys = totalVModMapKeys;
- xcb_out.virtualMods = virtualMods;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_set_map_values_t values */
- xcb_parts[4].iov_len =
- xcb_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, values);
- xcb_parts[4].iov_base = xcb_aux0;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- free(xcb_aux0);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_map_aux
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t present
- ** @param uint16_t flags
- ** @param xcb_keycode_t minKeyCode
- ** @param xcb_keycode_t maxKeyCode
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param xcb_keycode_t firstKeySym
- ** @param uint8_t nKeySyms
- ** @param uint16_t totalSyms
- ** @param xcb_keycode_t firstKeyAction
- ** @param uint8_t nKeyActions
- ** @param uint16_t totalActions
- ** @param xcb_keycode_t firstKeyBehavior
- ** @param uint8_t nKeyBehaviors
- ** @param uint8_t totalKeyBehaviors
- ** @param xcb_keycode_t firstKeyExplicit
- ** @param uint8_t nKeyExplicit
- ** @param uint8_t totalKeyExplicit
- ** @param xcb_keycode_t firstModMapKey
- ** @param uint8_t nModMapKeys
- ** @param uint8_t totalModMapKeys
- ** @param xcb_keycode_t firstVModMapKey
- ** @param uint8_t nVModMapKeys
- ** @param uint8_t totalVModMapKeys
- ** @param uint16_t virtualMods
- ** @param const xcb_xkb_set_map_values_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_map_aux (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t present /**< */,
- uint16_t flags /**< */,
- xcb_keycode_t minKeyCode /**< */,
- xcb_keycode_t maxKeyCode /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- xcb_keycode_t firstKeySym /**< */,
- uint8_t nKeySyms /**< */,
- uint16_t totalSyms /**< */,
- xcb_keycode_t firstKeyAction /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- xcb_keycode_t firstKeyBehavior /**< */,
- uint8_t nKeyBehaviors /**< */,
- uint8_t totalKeyBehaviors /**< */,
- xcb_keycode_t firstKeyExplicit /**< */,
- uint8_t nKeyExplicit /**< */,
- uint8_t totalKeyExplicit /**< */,
- xcb_keycode_t firstModMapKey /**< */,
- uint8_t nModMapKeys /**< */,
- uint8_t totalModMapKeys /**< */,
- xcb_keycode_t firstVModMapKey /**< */,
- uint8_t nVModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t virtualMods /**< */,
- const xcb_xkb_set_map_values_t *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_MAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_map_request_t xcb_out;
- void *xcb_aux0 = 0;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.present = present;
- xcb_out.flags = flags;
- xcb_out.minKeyCode = minKeyCode;
- xcb_out.maxKeyCode = maxKeyCode;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKeySym = firstKeySym;
- xcb_out.nKeySyms = nKeySyms;
- xcb_out.totalSyms = totalSyms;
- xcb_out.firstKeyAction = firstKeyAction;
- xcb_out.nKeyActions = nKeyActions;
- xcb_out.totalActions = totalActions;
- xcb_out.firstKeyBehavior = firstKeyBehavior;
- xcb_out.nKeyBehaviors = nKeyBehaviors;
- xcb_out.totalKeyBehaviors = totalKeyBehaviors;
- xcb_out.firstKeyExplicit = firstKeyExplicit;
- xcb_out.nKeyExplicit = nKeyExplicit;
- xcb_out.totalKeyExplicit = totalKeyExplicit;
- xcb_out.firstModMapKey = firstModMapKey;
- xcb_out.nModMapKeys = nModMapKeys;
- xcb_out.totalModMapKeys = totalModMapKeys;
- xcb_out.firstVModMapKey = firstVModMapKey;
- xcb_out.nVModMapKeys = nVModMapKeys;
- xcb_out.totalVModMapKeys = totalVModMapKeys;
- xcb_out.virtualMods = virtualMods;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_set_map_values_t values */
- xcb_parts[4].iov_len =
- xcb_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, values);
- xcb_parts[4].iov_base = xcb_aux0;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- free(xcb_aux0);
- return xcb_ret;
-}
-
-int
-xcb_xkb_get_compat_map_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_get_compat_map_reply_t *_aux = (xcb_xkb_get_compat_map_reply_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_get_compat_map_reply_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* si_rtrn */
- xcb_block_len += _aux->nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* group_rtrn */
- xcb_block_len += xcb_popcount(_aux->groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t groups
- ** @param uint8_t getAllSI
- ** @param uint16_t firstSI
- ** @param uint16_t nSI
- ** @returns xcb_xkb_get_compat_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_compat_map_cookie_t
-xcb_xkb_get_compat_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t groups /**< */,
- uint8_t getAllSI /**< */,
- uint16_t firstSI /**< */,
- uint16_t nSI /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_COMPAT_MAP,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_compat_map_cookie_t xcb_ret;
- xcb_xkb_get_compat_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.groups = groups;
- xcb_out.getAllSI = getAllSI;
- xcb_out.firstSI = firstSI;
- xcb_out.nSI = nSI;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t groups
- ** @param uint8_t getAllSI
- ** @param uint16_t firstSI
- ** @param uint16_t nSI
- ** @returns xcb_xkb_get_compat_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_compat_map_cookie_t
-xcb_xkb_get_compat_map_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t groups /**< */,
- uint8_t getAllSI /**< */,
- uint16_t firstSI /**< */,
- uint16_t nSI /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_COMPAT_MAP,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_compat_map_cookie_t xcb_ret;
- xcb_xkb_get_compat_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.groups = groups;
- xcb_out.getAllSI = getAllSI;
- xcb_out.firstSI = firstSI;
- xcb_out.nSI = nSI;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_sym_interpret_t * xcb_xkb_get_compat_map_si_rtrn
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_xkb_sym_interpret_t *
- **
- *****************************************************************************/
-
-xcb_xkb_sym_interpret_t *
-xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */)
-{
- return (xcb_xkb_sym_interpret_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_compat_map_si_rtrn_length
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_compat_map_si_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */)
-{
- return R->nSIRtrn;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_compat_map_si_rtrn_iterator
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_xkb_sym_interpret_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_sym_interpret_iterator_t
-xcb_xkb_get_compat_map_si_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R /**< */)
-{
- xcb_xkb_sym_interpret_iterator_t i;
- i.data = (xcb_xkb_sym_interpret_t *) (R + 1);
- i.rem = R->nSIRtrn;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_t * xcb_xkb_get_compat_map_group_rtrn
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_xkb_mod_def_t *
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_t *
-xcb_xkb_get_compat_map_group_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_xkb_sym_interpret_end(xcb_xkb_get_compat_map_si_rtrn_iterator(R));
- return (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_compat_map_group_rtrn_length
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_compat_map_group_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */)
-{
- return xcb_popcount(R->groupsRtrn);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_compat_map_group_rtrn_iterator
- **
- ** @param const xcb_xkb_get_compat_map_reply_t *R
- ** @returns xcb_xkb_mod_def_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_iterator_t
-xcb_xkb_get_compat_map_group_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R /**< */)
-{
- xcb_xkb_mod_def_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_sym_interpret_end(xcb_xkb_get_compat_map_si_rtrn_iterator(R));
- i.data = (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index));
- i.rem = xcb_popcount(R->groupsRtrn);
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_compat_map_reply_t * xcb_xkb_get_compat_map_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_compat_map_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_compat_map_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_compat_map_reply_t *
-xcb_xkb_get_compat_map_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_compat_map_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_compat_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-int
-xcb_xkb_set_compat_map_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_set_compat_map_request_t *_aux = (xcb_xkb_set_compat_map_request_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_set_compat_map_request_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* si */
- xcb_block_len += _aux->nSI * sizeof(xcb_xkb_sym_interpret_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* groupMaps */
- xcb_block_len += xcb_popcount(_aux->groups) * sizeof(xcb_xkb_mod_def_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_compat_map_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t recomputeActions
- ** @param uint8_t truncateSI
- ** @param uint8_t groups
- ** @param uint16_t firstSI
- ** @param uint16_t nSI
- ** @param const xcb_xkb_sym_interpret_t *si
- ** @param const xcb_xkb_mod_def_t *groupMaps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_compat_map_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t recomputeActions /**< */,
- uint8_t truncateSI /**< */,
- uint8_t groups /**< */,
- uint16_t firstSI /**< */,
- uint16_t nSI /**< */,
- const xcb_xkb_sym_interpret_t *si /**< */,
- const xcb_xkb_mod_def_t *groupMaps /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_COMPAT_MAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_compat_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.pad0 = 0;
- xcb_out.recomputeActions = recomputeActions;
- xcb_out.truncateSI = truncateSI;
- xcb_out.groups = groups;
- xcb_out.firstSI = firstSI;
- xcb_out.nSI = nSI;
- memset(xcb_out.pad1, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_sym_interpret_t si */
- xcb_parts[4].iov_base = (char *) si;
- xcb_parts[4].iov_len = nSI * sizeof(xcb_xkb_sym_interpret_t);
- xcb_parts[5].iov_base = 0;
- xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
- /* xcb_xkb_mod_def_t groupMaps */
- xcb_parts[6].iov_base = (char *) groupMaps;
- xcb_parts[6].iov_len = xcb_popcount(groups) * sizeof(xcb_xkb_mod_def_t);
- xcb_parts[7].iov_base = 0;
- xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_compat_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t recomputeActions
- ** @param uint8_t truncateSI
- ** @param uint8_t groups
- ** @param uint16_t firstSI
- ** @param uint16_t nSI
- ** @param const xcb_xkb_sym_interpret_t *si
- ** @param const xcb_xkb_mod_def_t *groupMaps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_compat_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t recomputeActions /**< */,
- uint8_t truncateSI /**< */,
- uint8_t groups /**< */,
- uint16_t firstSI /**< */,
- uint16_t nSI /**< */,
- const xcb_xkb_sym_interpret_t *si /**< */,
- const xcb_xkb_mod_def_t *groupMaps /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_COMPAT_MAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_compat_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.pad0 = 0;
- xcb_out.recomputeActions = recomputeActions;
- xcb_out.truncateSI = truncateSI;
- xcb_out.groups = groups;
- xcb_out.firstSI = firstSI;
- xcb_out.nSI = nSI;
- memset(xcb_out.pad1, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_sym_interpret_t si */
- xcb_parts[4].iov_base = (char *) si;
- xcb_parts[4].iov_len = nSI * sizeof(xcb_xkb_sym_interpret_t);
- xcb_parts[5].iov_base = 0;
- xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
- /* xcb_xkb_mod_def_t groupMaps */
- xcb_parts[6].iov_base = (char *) groupMaps;
- xcb_parts[6].iov_len = xcb_popcount(groups) * sizeof(xcb_xkb_mod_def_t);
- xcb_parts[7].iov_base = 0;
- xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_indicator_state_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_state_cookie_t
-xcb_xkb_get_indicator_state (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_INDICATOR_STATE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_indicator_state_cookie_t xcb_ret;
- xcb_xkb_get_indicator_state_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @returns xcb_xkb_get_indicator_state_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_state_cookie_t
-xcb_xkb_get_indicator_state_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_INDICATOR_STATE,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_indicator_state_cookie_t xcb_ret;
- xcb_xkb_get_indicator_state_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_state_reply_t * xcb_xkb_get_indicator_state_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_indicator_state_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_indicator_state_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_state_reply_t *
-xcb_xkb_get_indicator_state_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_indicator_state_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_indicator_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-int
-xcb_xkb_get_indicator_map_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_get_indicator_map_reply_t *_aux = (xcb_xkb_get_indicator_map_reply_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_get_indicator_map_reply_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* maps */
- xcb_block_len += xcb_popcount(_aux->which) * sizeof(xcb_xkb_indicator_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @returns xcb_xkb_get_indicator_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_map_cookie_t
-xcb_xkb_get_indicator_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_INDICATOR_MAP,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_indicator_map_cookie_t xcb_ret;
- xcb_xkb_get_indicator_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.which = which;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @returns xcb_xkb_get_indicator_map_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_map_cookie_t
-xcb_xkb_get_indicator_map_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_INDICATOR_MAP,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_indicator_map_cookie_t xcb_ret;
- xcb_xkb_get_indicator_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.which = which;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_t * xcb_xkb_get_indicator_map_maps
- **
- ** @param const xcb_xkb_get_indicator_map_reply_t *R
- ** @returns xcb_xkb_indicator_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_t *
-xcb_xkb_get_indicator_map_maps (const xcb_xkb_get_indicator_map_reply_t *R /**< */)
-{
- return (xcb_xkb_indicator_map_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_indicator_map_maps_length
- **
- ** @param const xcb_xkb_get_indicator_map_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_indicator_map_maps_length (const xcb_xkb_get_indicator_map_reply_t *R /**< */)
-{
- return xcb_popcount(R->which);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_indicator_map_maps_iterator
- **
- ** @param const xcb_xkb_get_indicator_map_reply_t *R
- ** @returns xcb_xkb_indicator_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_iterator_t
-xcb_xkb_get_indicator_map_maps_iterator (const xcb_xkb_get_indicator_map_reply_t *R /**< */)
-{
- xcb_xkb_indicator_map_iterator_t i;
- i.data = (xcb_xkb_indicator_map_t *) (R + 1);
- i.rem = xcb_popcount(R->which);
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_indicator_map_reply_t * xcb_xkb_get_indicator_map_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_indicator_map_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_indicator_map_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_indicator_map_reply_t *
-xcb_xkb_get_indicator_map_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_indicator_map_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_indicator_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-int
-xcb_xkb_set_indicator_map_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_set_indicator_map_request_t *_aux = (xcb_xkb_set_indicator_map_request_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_set_indicator_map_request_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* maps */
- xcb_block_len += xcb_popcount(_aux->which) * sizeof(xcb_xkb_indicator_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_indicator_map_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @param const xcb_xkb_indicator_map_t *maps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_indicator_map_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */,
- const xcb_xkb_indicator_map_t *maps /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_INDICATOR_MAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_indicator_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.which = which;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_indicator_map_t maps */
- xcb_parts[4].iov_base = (char *) maps;
- xcb_parts[4].iov_len = xcb_popcount(which) * sizeof(xcb_xkb_indicator_map_t);
- xcb_parts[5].iov_base = 0;
- xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_indicator_map
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @param const xcb_xkb_indicator_map_t *maps
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_indicator_map (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */,
- const xcb_xkb_indicator_map_t *maps /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_INDICATOR_MAP,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[6];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_indicator_map_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.which = which;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_indicator_map_t maps */
- xcb_parts[4].iov_base = (char *) maps;
- xcb_parts[4].iov_len = xcb_popcount(which) * sizeof(xcb_xkb_indicator_map_t);
- xcb_parts[5].iov_base = 0;
- xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @param xcb_atom_t indicator
- ** @returns xcb_xkb_get_named_indicator_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_named_indicator_cookie_t
-xcb_xkb_get_named_indicator (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */,
- xcb_atom_t indicator /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_NAMED_INDICATOR,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_named_indicator_cookie_t xcb_ret;
- xcb_xkb_get_named_indicator_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.ledClass = ledClass;
- xcb_out.ledID = ledID;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.indicator = indicator;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @param xcb_atom_t indicator
- ** @returns xcb_xkb_get_named_indicator_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_named_indicator_cookie_t
-xcb_xkb_get_named_indicator_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */,
- xcb_atom_t indicator /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_NAMED_INDICATOR,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_named_indicator_cookie_t xcb_ret;
- xcb_xkb_get_named_indicator_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.ledClass = ledClass;
- xcb_out.ledID = ledID;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.indicator = indicator;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_named_indicator_reply_t * xcb_xkb_get_named_indicator_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_named_indicator_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_named_indicator_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_named_indicator_reply_t *
-xcb_xkb_get_named_indicator_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_named_indicator_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_named_indicator_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_named_indicator_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @param xcb_atom_t indicator
- ** @param uint8_t setState
- ** @param uint8_t on
- ** @param uint8_t setMap
- ** @param uint8_t createMap
- ** @param uint8_t map_flags
- ** @param uint8_t map_whichGroups
- ** @param uint8_t map_groups
- ** @param uint8_t map_whichMods
- ** @param uint8_t map_realMods
- ** @param uint16_t map_vmods
- ** @param uint32_t map_ctrls
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_named_indicator_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */,
- xcb_atom_t indicator /**< */,
- uint8_t setState /**< */,
- uint8_t on /**< */,
- uint8_t setMap /**< */,
- uint8_t createMap /**< */,
- uint8_t map_flags /**< */,
- uint8_t map_whichGroups /**< */,
- uint8_t map_groups /**< */,
- uint8_t map_whichMods /**< */,
- uint8_t map_realMods /**< */,
- uint16_t map_vmods /**< */,
- uint32_t map_ctrls /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_NAMED_INDICATOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_named_indicator_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.ledClass = ledClass;
- xcb_out.ledID = ledID;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.indicator = indicator;
- xcb_out.setState = setState;
- xcb_out.on = on;
- xcb_out.setMap = setMap;
- xcb_out.createMap = createMap;
- xcb_out.pad1 = 0;
- xcb_out.map_flags = map_flags;
- xcb_out.map_whichGroups = map_whichGroups;
- xcb_out.map_groups = map_groups;
- xcb_out.map_whichMods = map_whichMods;
- xcb_out.map_realMods = map_realMods;
- xcb_out.map_vmods = map_vmods;
- xcb_out.map_ctrls = map_ctrls;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_named_indicator
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @param xcb_atom_t indicator
- ** @param uint8_t setState
- ** @param uint8_t on
- ** @param uint8_t setMap
- ** @param uint8_t createMap
- ** @param uint8_t map_flags
- ** @param uint8_t map_whichGroups
- ** @param uint8_t map_groups
- ** @param uint8_t map_whichMods
- ** @param uint8_t map_realMods
- ** @param uint16_t map_vmods
- ** @param uint32_t map_ctrls
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_named_indicator (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */,
- xcb_atom_t indicator /**< */,
- uint8_t setState /**< */,
- uint8_t on /**< */,
- uint8_t setMap /**< */,
- uint8_t createMap /**< */,
- uint8_t map_flags /**< */,
- uint8_t map_whichGroups /**< */,
- uint8_t map_groups /**< */,
- uint8_t map_whichMods /**< */,
- uint8_t map_realMods /**< */,
- uint16_t map_vmods /**< */,
- uint32_t map_ctrls /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_NAMED_INDICATOR,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[4];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_named_indicator_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.ledClass = ledClass;
- xcb_out.ledID = ledID;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.indicator = indicator;
- xcb_out.setState = setState;
- xcb_out.on = on;
- xcb_out.setMap = setMap;
- xcb_out.createMap = createMap;
- xcb_out.pad1 = 0;
- xcb_out.map_flags = map_flags;
- xcb_out.map_whichGroups = map_whichGroups;
- xcb_out.map_groups = map_groups;
- xcb_out.map_whichMods = map_whichMods;
- xcb_out.map_realMods = map_realMods;
- xcb_out.map_vmods = map_vmods;
- xcb_out.map_ctrls = map_ctrls;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_type_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_type_names (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->typeNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_type_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_type_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return R->nTypes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_type_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_type_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* valueList */ S->typeNames + R->nTypes;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_names_value_list_n_levels_per_type
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_names_value_list_n_levels_per_type (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->nLevelsPerType;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_n_levels_per_type_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_n_levels_per_type_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return R->nTypes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_n_levels_per_type_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* valueList */ S->nLevelsPerType + R->nTypes;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_names_value_list_alignment_pad
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_names_value_list_alignment_pad (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->alignment_pad;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_alignment_pad_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_alignment_pad_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return (((R->nTypes + 3) & (~3)) - R->nTypes);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_alignment_pad_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_alignment_pad_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* valueList */ S->alignment_pad + (((R->nTypes + 3) & (~3)) - R->nTypes);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_kt_level_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_kt_level_names (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->ktLevelNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_kt_level_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_kt_level_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_kt_level_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_kt_level_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* valueList */ S->ktLevelNames + xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_indicator_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_indicator_names (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->indicatorNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_indicator_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_indicator_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return xcb_popcount(R->indicators);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_indicator_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_indicator_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* valueList */ S->indicatorNames + xcb_popcount(R->indicators);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_virtual_mod_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_virtual_mod_names (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->virtualModNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_virtual_mod_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_virtual_mod_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return xcb_popcount(R->virtualMods);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_virtual_mod_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_virtual_mod_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* valueList */ S->virtualModNames + xcb_popcount(R->virtualMods);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_groups
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_groups (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->groups;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_groups_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_groups_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return xcb_popcount(R->groupNames);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_groups_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_groups_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* valueList */ S->groups + xcb_popcount(R->groupNames);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_t * xcb_xkb_get_names_value_list_key_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_xkb_key_name_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_t *
-xcb_xkb_get_names_value_list_key_names (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->keyNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_key_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_key_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return R->nKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_iterator_t xcb_xkb_get_names_value_list_key_names_iterator
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_xkb_key_name_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_iterator_t
-xcb_xkb_get_names_value_list_key_names_iterator (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_xkb_key_name_iterator_t i;
- i.data = /* valueList */ S->keyNames;
- i.rem = R->nKeys;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_t * xcb_xkb_get_names_value_list_key_aliases
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_xkb_key_alias_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_t *
-xcb_xkb_get_names_value_list_key_aliases (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->keyAliases;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_key_aliases_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_key_aliases_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return R->nKeyAliases;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_names_value_list_key_aliases_iterator
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_xkb_key_alias_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_iterator_t
-xcb_xkb_get_names_value_list_key_aliases_iterator (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_xkb_key_alias_iterator_t i;
- i.data = /* valueList */ S->keyAliases;
- i.rem = R->nKeyAliases;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_names_value_list_radio_group_names
- **
- ** @param const xcb_xkb_get_names_value_list_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_names_value_list_radio_group_names (const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return /* valueList */ S->radioGroupNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_names_value_list_radio_group_names_length
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_names_value_list_radio_group_names_length (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- return R->nRadioGroups;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_radio_group_names_end
- **
- ** @param const xcb_xkb_get_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_radio_group_names_end (const xcb_xkb_get_names_reply_t *R /**< */,
- const xcb_xkb_get_names_value_list_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* valueList */ S->radioGroupNames + R->nRadioGroups;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-int
-xcb_xkb_get_names_value_list_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- const xcb_xkb_get_names_value_list_t *_aux /**< */)
-{
- char *xcb_out = *_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to = 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(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
- /* xcb_xkb_get_names_value_list_t.keycodesName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
- /* xcb_xkb_get_names_value_list_t.geometryName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
- /* xcb_xkb_get_names_value_list_t.symbolsName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
- /* xcb_xkb_get_names_value_list_t.physSymbolsName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_TYPES) {
- /* xcb_xkb_get_names_value_list_t.typesName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
- /* xcb_xkb_get_names_value_list_t.compatName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* typeNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
- xcb_block_len += nTypes * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* nLevelsPerType */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
- xcb_block_len += nTypes * sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->alignment_pad;
- xcb_block_len += (((nTypes + 3) & (~3)) - nTypes) * sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = (((nTypes + 3) & (~3)) - nTypes) * sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* ktLevelNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
- xcb_block_len += 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);
- }
- if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* indicatorNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
- xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* virtualModNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* groups */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
- xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
- xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
- xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyAliases */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
- xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
- xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* radioGroupNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
- xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- if (NULL == xcb_out) {
- /* allocate memory */
- xcb_out = malloc(xcb_buffer_len);
- *_buffer = xcb_out;
- }
-
- xcb_tmp = xcb_out;
- for(i=0; i<xcb_parts_idx; i++) {
- if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
- memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
- if (0 != xcb_parts[i].iov_len)
- xcb_tmp += xcb_parts[i].iov_len;
- }
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_names_value_list_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- xcb_xkb_get_names_value_list_t *_aux /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
- /* xcb_xkb_get_names_value_list_t.keycodesName */
- _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
- /* xcb_xkb_get_names_value_list_t.geometryName */
- _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
- /* xcb_xkb_get_names_value_list_t.symbolsName */
- _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
- /* xcb_xkb_get_names_value_list_t.physSymbolsName */
- _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_TYPES) {
- /* xcb_xkb_get_names_value_list_t.typesName */
- _aux->typesName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
- /* xcb_xkb_get_names_value_list_t.compatName */
- _aux->compatName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* typeNames */
- _aux->typeNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += nTypes * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* nLevelsPerType */
- _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
- xcb_block_len += nTypes * sizeof(uint8_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* alignment_pad */
- _aux->alignment_pad = (uint8_t *)xcb_tmp;
- xcb_block_len += (((nTypes + 3) & (~3)) - nTypes) * sizeof(uint8_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* ktLevelNames */
- _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* indicatorNames */
- _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* virtualModNames */
- _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* groups */
- _aux->groups = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyNames */
- _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
- xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyAliases */
- _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
- xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* radioGroupNames */
- _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_names_value_list_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */)
-{
- xcb_xkb_get_names_value_list_t _aux;
- return xcb_xkb_get_names_value_list_unpack(_buffer, nTypes, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @returns xcb_xkb_get_names_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_names_cookie_t
-xcb_xkb_get_names (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_NAMES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_names_cookie_t xcb_ret;
- xcb_xkb_get_names_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.which = which;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t which
- ** @returns xcb_xkb_get_names_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_names_cookie_t
-xcb_xkb_get_names_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t which /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_NAMES,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_names_cookie_t xcb_ret;
- xcb_xkb_get_names_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.which = which;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_names_value_list_t * xcb_xkb_get_names_value_list
- **
- ** @param const xcb_xkb_get_names_reply_t *R
- ** @returns xcb_xkb_get_names_value_list_t *
- **
- *****************************************************************************/
-
-void *
-xcb_xkb_get_names_value_list (const xcb_xkb_get_names_reply_t *R /**< */)
-{
- return (void *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_names_reply_t * xcb_xkb_get_names_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_names_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_names_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_names_reply_t *
-xcb_xkb_get_names_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_names_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_names_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_type_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_type_names (const xcb_xkb_set_names_values_t *S /**< */)
-{
- return /* values */ S->typeNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_type_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_type_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- return R->nTypes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_type_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_type_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* values */ S->typeNames + R->nTypes;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_set_names_values_n_levels_per_type
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_set_names_values_n_levels_per_type (const xcb_xkb_set_names_values_t *S /**< */)
-{
- return /* values */ S->nLevelsPerType;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_n_levels_per_type_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_n_levels_per_type_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- return R->nKTLevels;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_n_levels_per_type_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_n_levels_per_type_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* values */ S->nLevelsPerType + R->nKTLevels;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_kt_level_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_kt_level_names (const xcb_xkb_set_names_values_t *S /**< */)
-{
- return /* values */ S->ktLevelNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_kt_level_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_kt_level_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- return xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_kt_level_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_kt_level_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* values */ S->ktLevelNames + xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_indicator_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_indicator_names (const xcb_xkb_set_names_values_t *S /**< */)
-{
- return /* values */ S->indicatorNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_indicator_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_indicator_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- return xcb_popcount(R->indicators);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_indicator_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_indicator_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* values */ S->indicatorNames + xcb_popcount(R->indicators);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_virtual_mod_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_virtual_mod_names (const xcb_xkb_set_names_values_t *S /**< */)
-{
- return /* values */ S->virtualModNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_virtual_mod_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_virtual_mod_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- return xcb_popcount(R->virtualMods);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_virtual_mod_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_virtual_mod_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* values */ S->virtualModNames + xcb_popcount(R->virtualMods);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_groups
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_groups (const xcb_xkb_set_names_values_t *S /**< */)
-{
- return /* values */ S->groups;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_groups_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_groups_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- return xcb_popcount(R->groupNames);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_groups_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_groups_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* values */ S->groups + xcb_popcount(R->groupNames);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_t * xcb_xkb_set_names_values_key_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_xkb_key_name_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_t *
-xcb_xkb_set_names_values_key_names (const xcb_xkb_set_names_values_t *S /**< */)
-{
- return /* values */ S->keyNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_key_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_key_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- return R->nKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_iterator_t xcb_xkb_set_names_values_key_names_iterator
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_xkb_key_name_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_iterator_t
-xcb_xkb_set_names_values_key_names_iterator (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- xcb_xkb_key_name_iterator_t i;
- i.data = /* values */ S->keyNames;
- i.rem = R->nKeys;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_t * xcb_xkb_set_names_values_key_aliases
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_xkb_key_alias_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_t *
-xcb_xkb_set_names_values_key_aliases (const xcb_xkb_set_names_values_t *S /**< */)
-{
- return /* values */ S->keyAliases;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_key_aliases_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_key_aliases_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- return R->nKeyAliases;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_iterator_t xcb_xkb_set_names_values_key_aliases_iterator
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_xkb_key_alias_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_iterator_t
-xcb_xkb_set_names_values_key_aliases_iterator (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- xcb_xkb_key_alias_iterator_t i;
- i.data = /* values */ S->keyAliases;
- i.rem = R->nKeyAliases;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_set_names_values_radio_group_names
- **
- ** @param const xcb_xkb_set_names_values_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_set_names_values_radio_group_names (const xcb_xkb_set_names_values_t *S /**< */)
-{
- return /* values */ S->radioGroupNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_set_names_values_radio_group_names_length
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_set_names_values_radio_group_names_length (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- return R->nRadioGroups;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_set_names_values_radio_group_names_end
- **
- ** @param const xcb_xkb_set_names_values_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_set_names_values_radio_group_names_end (const xcb_xkb_set_names_request_t *R /**< */,
- const xcb_xkb_set_names_values_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* values */ S->radioGroupNames + R->nRadioGroups;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-int
-xcb_xkb_set_names_values_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- const xcb_xkb_set_names_values_t *_aux /**< */)
-{
- char *xcb_out = *_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int xcb_pad = 0;
- char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[25];
- unsigned int xcb_parts_idx = 0;
- unsigned int xcb_block_len = 0;
- unsigned int i;
- char *xcb_tmp;
-
- if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
- /* xcb_xkb_set_names_values_t.keycodesName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
- /* xcb_xkb_set_names_values_t.geometryName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
- /* xcb_xkb_set_names_values_t.symbolsName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
- /* xcb_xkb_set_names_values_t.physSymbolsName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_TYPES) {
- /* xcb_xkb_set_names_values_t.typesName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
- /* xcb_xkb_set_names_values_t.compatName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* typeNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
- xcb_block_len += nTypes * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* nLevelsPerType */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
- xcb_block_len += nKTLevels * sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* ktLevelNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
- xcb_block_len += 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);
- }
- if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* indicatorNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
- xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* virtualModNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* groups */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
- xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
- xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
- xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyAliases */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
- xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
- xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* radioGroupNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
- xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- if (NULL == xcb_out) {
- /* allocate memory */
- xcb_out = malloc(xcb_buffer_len);
- *_buffer = xcb_out;
- }
-
- xcb_tmp = xcb_out;
- for(i=0; i<xcb_parts_idx; i++) {
- if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
- memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
- if (0 != xcb_parts[i].iov_len)
- xcb_tmp += xcb_parts[i].iov_len;
- }
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_set_names_values_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- xcb_xkb_set_names_values_t *_aux /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
- /* xcb_xkb_set_names_values_t.keycodesName */
- _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
- /* xcb_xkb_set_names_values_t.geometryName */
- _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
- /* xcb_xkb_set_names_values_t.symbolsName */
- _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
- /* xcb_xkb_set_names_values_t.physSymbolsName */
- _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_TYPES) {
- /* xcb_xkb_set_names_values_t.typesName */
- _aux->typesName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
- /* xcb_xkb_set_names_values_t.compatName */
- _aux->compatName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* typeNames */
- _aux->typeNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += nTypes * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* nLevelsPerType */
- _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
- xcb_block_len += nKTLevels * sizeof(uint8_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* ktLevelNames */
- _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* indicatorNames */
- _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* virtualModNames */
- _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* groups */
- _aux->groups = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyNames */
- _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
- xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyAliases */
- _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
- xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* radioGroupNames */
- _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_set_names_values_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */)
-{
- xcb_xkb_set_names_values_t _aux;
- return xcb_xkb_set_names_values_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_names_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t virtualMods
- ** @param uint32_t which
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param uint8_t firstKTLevelt
- ** @param uint8_t nKTLevels
- ** @param uint32_t indicators
- ** @param uint8_t groupNames
- ** @param uint8_t nRadioGroups
- ** @param xcb_keycode_t firstKey
- ** @param uint8_t nKeys
- ** @param uint8_t nKeyAliases
- ** @param uint16_t totalKTLevelNames
- ** @param const void *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_names_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t virtualMods /**< */,
- uint32_t which /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- uint8_t firstKTLevelt /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint8_t groupNames /**< */,
- uint8_t nRadioGroups /**< */,
- xcb_keycode_t firstKey /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint16_t totalKTLevelNames /**< */,
- const void *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_NAMES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_names_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.virtualMods = virtualMods;
- xcb_out.which = which;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKTLevelt = firstKTLevelt;
- xcb_out.nKTLevels = nKTLevels;
- xcb_out.indicators = indicators;
- xcb_out.groupNames = groupNames;
- xcb_out.nRadioGroups = nRadioGroups;
- xcb_out.firstKey = firstKey;
- xcb_out.nKeys = nKeys;
- xcb_out.nKeyAliases = nKeyAliases;
- xcb_out.pad0 = 0;
- xcb_out.totalKTLevelNames = totalKTLevelNames;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_set_names_values_t values */
- xcb_parts[4].iov_base = (char *) values;
- xcb_parts[4].iov_len =
- xcb_xkb_set_names_values_sizeof (values, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which);
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_names
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t virtualMods
- ** @param uint32_t which
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param uint8_t firstKTLevelt
- ** @param uint8_t nKTLevels
- ** @param uint32_t indicators
- ** @param uint8_t groupNames
- ** @param uint8_t nRadioGroups
- ** @param xcb_keycode_t firstKey
- ** @param uint8_t nKeys
- ** @param uint8_t nKeyAliases
- ** @param uint16_t totalKTLevelNames
- ** @param const void *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_names (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t virtualMods /**< */,
- uint32_t which /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- uint8_t firstKTLevelt /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint8_t groupNames /**< */,
- uint8_t nRadioGroups /**< */,
- xcb_keycode_t firstKey /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint16_t totalKTLevelNames /**< */,
- const void *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_NAMES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_names_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.virtualMods = virtualMods;
- xcb_out.which = which;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKTLevelt = firstKTLevelt;
- xcb_out.nKTLevels = nKTLevels;
- xcb_out.indicators = indicators;
- xcb_out.groupNames = groupNames;
- xcb_out.nRadioGroups = nRadioGroups;
- xcb_out.firstKey = firstKey;
- xcb_out.nKeys = nKeys;
- xcb_out.nKeyAliases = nKeyAliases;
- xcb_out.pad0 = 0;
- xcb_out.totalKTLevelNames = totalKTLevelNames;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_set_names_values_t values */
- xcb_parts[4].iov_base = (char *) values;
- xcb_parts[4].iov_len =
- xcb_xkb_set_names_values_sizeof (values, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which);
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_names_aux_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t virtualMods
- ** @param uint32_t which
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param uint8_t firstKTLevelt
- ** @param uint8_t nKTLevels
- ** @param uint32_t indicators
- ** @param uint8_t groupNames
- ** @param uint8_t nRadioGroups
- ** @param xcb_keycode_t firstKey
- ** @param uint8_t nKeys
- ** @param uint8_t nKeyAliases
- ** @param uint16_t totalKTLevelNames
- ** @param const xcb_xkb_set_names_values_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_names_aux_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t virtualMods /**< */,
- uint32_t which /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- uint8_t firstKTLevelt /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint8_t groupNames /**< */,
- uint8_t nRadioGroups /**< */,
- xcb_keycode_t firstKey /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint16_t totalKTLevelNames /**< */,
- const xcb_xkb_set_names_values_t *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_NAMES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_names_request_t xcb_out;
- void *xcb_aux0 = 0;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.virtualMods = virtualMods;
- xcb_out.which = which;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKTLevelt = firstKTLevelt;
- xcb_out.nKTLevels = nKTLevels;
- xcb_out.indicators = indicators;
- xcb_out.groupNames = groupNames;
- xcb_out.nRadioGroups = nRadioGroups;
- xcb_out.firstKey = firstKey;
- xcb_out.nKeys = nKeys;
- xcb_out.nKeyAliases = nKeyAliases;
- xcb_out.pad0 = 0;
- xcb_out.totalKTLevelNames = totalKTLevelNames;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_set_names_values_t values */
- xcb_parts[4].iov_len =
- xcb_xkb_set_names_values_serialize (&xcb_aux0, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, values);
- xcb_parts[4].iov_base = xcb_aux0;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- free(xcb_aux0);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_names_aux
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t virtualMods
- ** @param uint32_t which
- ** @param uint8_t firstType
- ** @param uint8_t nTypes
- ** @param uint8_t firstKTLevelt
- ** @param uint8_t nKTLevels
- ** @param uint32_t indicators
- ** @param uint8_t groupNames
- ** @param uint8_t nRadioGroups
- ** @param xcb_keycode_t firstKey
- ** @param uint8_t nKeys
- ** @param uint8_t nKeyAliases
- ** @param uint16_t totalKTLevelNames
- ** @param const xcb_xkb_set_names_values_t *values
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_names_aux (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t virtualMods /**< */,
- uint32_t which /**< */,
- uint8_t firstType /**< */,
- uint8_t nTypes /**< */,
- uint8_t firstKTLevelt /**< */,
- uint8_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint8_t groupNames /**< */,
- uint8_t nRadioGroups /**< */,
- xcb_keycode_t firstKey /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint16_t totalKTLevelNames /**< */,
- const xcb_xkb_set_names_values_t *values /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 3,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_NAMES,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[5];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_names_request_t xcb_out;
- void *xcb_aux0 = 0;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.virtualMods = virtualMods;
- xcb_out.which = which;
- xcb_out.firstType = firstType;
- xcb_out.nTypes = nTypes;
- xcb_out.firstKTLevelt = firstKTLevelt;
- xcb_out.nKTLevels = nKTLevels;
- xcb_out.indicators = indicators;
- xcb_out.groupNames = groupNames;
- xcb_out.nRadioGroups = nRadioGroups;
- xcb_out.firstKey = firstKey;
- xcb_out.nKeys = nKeys;
- xcb_out.nKeyAliases = nKeyAliases;
- xcb_out.pad0 = 0;
- xcb_out.totalKTLevelNames = totalKTLevelNames;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_set_names_values_t values */
- xcb_parts[4].iov_len =
- xcb_xkb_set_names_values_serialize (&xcb_aux0, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, values);
- xcb_parts[4].iov_base = xcb_aux0;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- free(xcb_aux0);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t change
- ** @param uint32_t value
- ** @param uint32_t ctrlsToChange
- ** @param uint32_t autoCtrls
- ** @param uint32_t autoCtrlsValues
- ** @returns xcb_xkb_per_client_flags_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_per_client_flags_cookie_t
-xcb_xkb_per_client_flags (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t change /**< */,
- uint32_t value /**< */,
- uint32_t ctrlsToChange /**< */,
- uint32_t autoCtrls /**< */,
- uint32_t autoCtrlsValues /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_PER_CLIENT_FLAGS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_per_client_flags_cookie_t xcb_ret;
- xcb_xkb_per_client_flags_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.change = change;
- xcb_out.value = value;
- xcb_out.ctrlsToChange = ctrlsToChange;
- xcb_out.autoCtrls = autoCtrls;
- xcb_out.autoCtrlsValues = autoCtrlsValues;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint32_t change
- ** @param uint32_t value
- ** @param uint32_t ctrlsToChange
- ** @param uint32_t autoCtrls
- ** @param uint32_t autoCtrlsValues
- ** @returns xcb_xkb_per_client_flags_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_per_client_flags_cookie_t
-xcb_xkb_per_client_flags_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint32_t change /**< */,
- uint32_t value /**< */,
- uint32_t ctrlsToChange /**< */,
- uint32_t autoCtrls /**< */,
- uint32_t autoCtrlsValues /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_PER_CLIENT_FLAGS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_per_client_flags_cookie_t xcb_ret;
- xcb_xkb_per_client_flags_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.change = change;
- xcb_out.value = value;
- xcb_out.ctrlsToChange = ctrlsToChange;
- xcb_out.autoCtrls = autoCtrls;
- xcb_out.autoCtrlsValues = autoCtrlsValues;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_per_client_flags_reply_t * xcb_xkb_per_client_flags_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_per_client_flags_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_per_client_flags_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_per_client_flags_reply_t *
-xcb_xkb_per_client_flags_reply (xcb_connection_t *c /**< */,
- xcb_xkb_per_client_flags_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_per_client_flags_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-int
-xcb_xkb_list_components_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_list_components_reply_t *_aux = (xcb_xkb_list_components_reply_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_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_xkb_list_components_reply_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* keymaps */
- for(i=0; i<_aux->nKeymaps; i++) {
- xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keycodes */
- for(i=0; i<_aux->nKeycodes; i++) {
- xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* types */
- for(i=0; i<_aux->nTypes; i++) {
- xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* compatMaps */
- for(i=0; i<_aux->nCompatMaps; i++) {
- xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* symbols */
- for(i=0; i<_aux->nSymbols; i++) {
- xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* geometries */
- for(i=0; i<_aux->nGeometries; i++) {
- xcb_tmp_len = xcb_xkb_listing_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_listing_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t maxNames
- ** @returns xcb_xkb_list_components_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_list_components_cookie_t
-xcb_xkb_list_components (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t maxNames /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_LIST_COMPONENTS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_list_components_cookie_t xcb_ret;
- xcb_xkb_list_components_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.maxNames = maxNames;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t maxNames
- ** @returns xcb_xkb_list_components_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_list_components_cookie_t
-xcb_xkb_list_components_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t maxNames /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_LIST_COMPONENTS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_list_components_cookie_t xcb_ret;
- xcb_xkb_list_components_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.maxNames = maxNames;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_keymaps_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_keymaps_length (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- return R->nKeymaps;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keymaps_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_keymaps_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- xcb_xkb_listing_iterator_t i;
- i.data = (xcb_xkb_listing_t *) (R + 1);
- i.rem = R->nKeymaps;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_keycodes_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_keycodes_length (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- return R->nKeycodes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keycodes_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_keycodes_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- xcb_xkb_listing_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_keymaps_iterator(R));
- i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
- i.rem = R->nKeycodes;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_types_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_types_length (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- return R->nTypes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_types_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_types_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- xcb_xkb_listing_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_keycodes_iterator(R));
- i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
- i.rem = R->nTypes;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_compat_maps_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_compat_maps_length (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- return R->nCompatMaps;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_compat_maps_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_compat_maps_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- xcb_xkb_listing_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_types_iterator(R));
- i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
- i.rem = R->nCompatMaps;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_symbols_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_symbols_length (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- return R->nSymbols;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_symbols_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_symbols_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- xcb_xkb_listing_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_compat_maps_iterator(R));
- i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
- i.rem = R->nSymbols;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_list_components_geometries_length
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_list_components_geometries_length (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- return R->nGeometries;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_geometries_iterator
- **
- ** @param const xcb_xkb_list_components_reply_t *R
- ** @returns xcb_xkb_listing_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_listing_iterator_t
-xcb_xkb_list_components_geometries_iterator (const xcb_xkb_list_components_reply_t *R /**< */)
-{
- xcb_xkb_listing_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_symbols_iterator(R));
- i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index));
- i.rem = R->nGeometries;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_list_components_reply_t * xcb_xkb_list_components_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_list_components_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_list_components_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_list_components_reply_t *
-xcb_xkb_list_components_reply (xcb_connection_t *c /**< */,
- xcb_xkb_list_components_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_list_components_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.nTypes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_key_type_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_type_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_key_type_iterator_t i;
- i.data = /* replies */ S->types.map.types_rtrn;
- i.rem = /* replies */ S->types.nTypes;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.nKeySyms;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_key_sym_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_sym_map_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_key_sym_map_iterator_t i;
- i.data = /* replies */ S->types.map.syms_rtrn;
- i.rem = /* replies */ S->types.nKeySyms;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.map.acts_rtrn_count;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.nKeyActions;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* replies */ S->types.map.acts_rtrn_count + /* replies */ S->types.nKeyActions;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_action_t *
- **
- *****************************************************************************/
-
-xcb_xkb_action_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.map.acts_rtrn_acts;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.totalActions;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_action_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_action_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_action_iterator_t i;
- i.data = /* replies */ S->types.map.acts_rtrn_acts;
- i.rem = /* replies */ S->types.totalActions;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_set_behavior_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.map.behaviors_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.totalKeyBehaviors;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_set_behavior_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_behavior_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_set_behavior_iterator_t i;
- i.data = /* replies */ S->types.map.behaviors_rtrn;
- i.rem = /* replies */ S->types.totalKeyBehaviors;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.map.vmods_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return xcb_popcount(/* replies */ S->types.virtualMods);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* replies */ S->types.map.vmods_rtrn + xcb_popcount(/* replies */ S->types.virtualMods);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_set_explicit_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.map.explicit_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.totalKeyExplicit;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_set_explicit_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_explicit_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_set_explicit_iterator_t i;
- i.data = /* replies */ S->types.map.explicit_rtrn;
- i.rem = /* replies */ S->types.totalKeyExplicit;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_key_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.map.modmap_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.totalModMapKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_key_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_mod_map_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_key_mod_map_iterator_t i;
- i.data = /* replies */ S->types.map.modmap_rtrn;
- i.rem = /* replies */ S->types.totalModMapKeys;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_key_v_mod_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_t *
-xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.map.vmodmap_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->types.totalVModMapKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R
- ** @returns xcb_xkb_key_v_mod_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_v_mod_map_iterator_t
-xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_key_v_mod_map_iterator_t i;
- i.data = /* replies */ S->types.map.vmodmap_rtrn;
- i.rem = /* replies */ S->types.totalVModMapKeys;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- const xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */)
-{
- char *xcb_out = *_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int xcb_pad = 0;
- char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[19];
- unsigned int xcb_parts_idx = 0;
- unsigned int xcb_block_len = 0;
- unsigned int i;
- char *xcb_tmp;
-
- if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* types_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn;
- xcb_parts[xcb_parts_idx].iov_len = 0;
- xcb_tmp = (char *) _aux->types_rtrn;
- for(i=0; i<nTypes; i++) {
- xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp);
- xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
- }
- xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* syms_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn;
- xcb_parts[xcb_parts_idx].iov_len = 0;
- xcb_tmp = (char *) _aux->syms_rtrn;
- for(i=0; i<nKeySyms; i++) {
- xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
- xcb_parts[xcb_parts_idx].iov_len += xcb_block_len;
- }
- xcb_block_len = xcb_parts[xcb_parts_idx].iov_len;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* acts_rtrn_count */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count;
- xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* acts_rtrn_acts */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts;
- xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
- xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_action_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* behaviors_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn;
- xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
- xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmods_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* explicit_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn;
- xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
- xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
- }
- if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* modmap_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn;
- xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
- xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmodmap_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn;
- xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
- xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- if (NULL == xcb_out) {
- /* allocate memory */
- xcb_out = malloc(xcb_buffer_len);
- *_buffer = xcb_out;
- }
-
- xcb_tmp = xcb_out;
- for(i=0; i<xcb_parts_idx; i++) {
- if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
- memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
- if (0 != xcb_parts[i].iov_len)
- xcb_tmp += xcb_parts[i].iov_len;
- }
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */,
- xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */)
-{
- 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 i;
- unsigned int xcb_tmp_len;
-
- if(present & XCB_XKB_MAP_PART_KEY_TYPES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* types_rtrn */
- _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp;
- for(i=0; i<nTypes; i++) {
- xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_key_type_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_SYMS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* syms_rtrn */
- _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp;
- for(i=0; i<nKeySyms; i++) {
- xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* acts_rtrn_count */
- _aux->acts_rtrn_count = (uint8_t *)xcb_tmp;
- xcb_block_len += nKeyActions * sizeof(xcb_keycode_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* acts_rtrn_acts */
- _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp;
- xcb_block_len += totalActions * sizeof(xcb_xkb_action_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_action_t);
- }
- if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* behaviors_rtrn */
- _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp;
- xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmods_rtrn */
- _aux->vmods_rtrn = (uint8_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_keycode_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- }
- if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* explicit_rtrn */
- _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp;
- xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t);
- }
- if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* modmap_rtrn */
- _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp;
- xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t);
- }
- if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* vmodmap_rtrn */
- _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp;
- xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint8_t nKeySyms /**< */,
- uint8_t nKeyActions /**< */,
- uint16_t totalActions /**< */,
- uint8_t totalKeyBehaviors /**< */,
- uint16_t virtualMods /**< */,
- uint8_t totalKeyExplicit /**< */,
- uint8_t totalModMapKeys /**< */,
- uint8_t totalVModMapKeys /**< */,
- uint16_t present /**< */)
-{
- xcb_xkb_get_kbd_by_name_replies_types_map_t _aux;
- return xcb_xkb_get_kbd_by_name_replies_types_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, virtualMods, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.valueList.typeNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.nTypes;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* replies */ S->key_names.valueList.typeNames + /* replies */ S->key_names.nTypes;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** uint8_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns uint8_t *
- **
- *****************************************************************************/
-
-uint8_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.valueList.nLevelsPerType;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.nKTLevels;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* replies */ S->key_names.valueList.nLevelsPerType + /* replies */ S->key_names.nKTLevels;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.valueList.ktLevelNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* replies */ S->key_names.valueList.ktLevelNames + xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.valueList.indicatorNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return xcb_popcount(/* replies */ S->key_names.indicators);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* replies */ S->key_names.valueList.indicatorNames + xcb_popcount(/* replies */ S->key_names.indicators);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.valueList.virtualModNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return xcb_popcount(/* replies */ S->key_names.virtualMods);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* replies */ S->key_names.valueList.virtualModNames + xcb_popcount(/* replies */ S->key_names.virtualMods);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.valueList.groups;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return xcb_popcount(/* replies */ S->key_names.groupNames);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* replies */ S->key_names.valueList.groups + xcb_popcount(/* replies */ S->key_names.groupNames);
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_key_name_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.valueList.keyNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.nKeys;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_xkb_key_name_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_name_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_key_name_iterator_t i;
- i.data = /* replies */ S->key_names.valueList.keyNames;
- i.rem = /* replies */ S->key_names.nKeys;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_key_alias_t *
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.valueList.keyAliases;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.nKeyAliases;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_xkb_key_alias_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_key_alias_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_key_alias_iterator_t i;
- i.data = /* replies */ S->key_names.valueList.keyAliases;
- i.rem = /* replies */ S->key_names.nKeyAliases;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_atom_t *
- **
- *****************************************************************************/
-
-xcb_atom_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.valueList.radioGroupNames;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->key_names.nRadioGroups;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = /* replies */ S->key_names.valueList.radioGroupNames + /* replies */ S->key_names.nRadioGroups;
- i.rem = 0;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void **_buffer /**< */,
- uint8_t nTypes /**< */,
- uint16_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */)
-{
- char *xcb_out = *_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int xcb_pad = 0;
- char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[25];
- unsigned int xcb_parts_idx = 0;
- unsigned int xcb_block_len = 0;
- unsigned int i;
- char *xcb_tmp;
-
- if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.keycodesName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.geometryName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.symbolsName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.physSymbolsName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_TYPES) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.typesName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.compatName */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* typeNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames;
- xcb_block_len += nTypes * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* nLevelsPerType */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType;
- xcb_block_len += nKTLevels * sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* ktLevelNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames;
- xcb_block_len += 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);
- }
- if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* indicatorNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames;
- xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* virtualModNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* groups */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups;
- xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames;
- xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
- xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyAliases */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases;
- xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
- xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* radioGroupNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames;
- xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- if (NULL == xcb_out) {
- /* allocate memory */
- xcb_out = malloc(xcb_buffer_len);
- *_buffer = xcb_out;
- }
-
- xcb_tmp = xcb_out;
- for(i=0; i<xcb_parts_idx; i++) {
- if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
- memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
- if (0 != xcb_parts[i].iov_len)
- xcb_tmp += xcb_parts[i].iov_len;
- }
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint16_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */,
- xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- if(which & XCB_XKB_NAME_DETAIL_KEYCODES) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.keycodesName */
- _aux->keycodesName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.geometryName */
- _aux->geometryName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.symbolsName */
- _aux->symbolsName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.physSymbolsName */
- _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_TYPES) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.typesName */
- _aux->typesName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_COMPAT) {
- /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.compatName */
- _aux->compatName = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* typeNames */
- _aux->typeNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += nTypes * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* nLevelsPerType */
- _aux->nLevelsPerType = (uint8_t *)xcb_tmp;
- xcb_block_len += nKTLevels * sizeof(uint8_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* ktLevelNames */
- _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* indicatorNames */
- _aux->indicatorNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* virtualModNames */
- _aux->virtualModNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* groups */
- _aux->groups = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyNames */
- _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp;
- xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_name_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* keyAliases */
- _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp;
- xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t);
- }
- if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) {
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* radioGroupNames */
- _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp;
- xcb_block_len += nRadioGroups * sizeof(xcb_atom_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void *_buffer /**< */,
- uint8_t nTypes /**< */,
- uint16_t nKTLevels /**< */,
- uint32_t indicators /**< */,
- uint16_t virtualMods /**< */,
- uint8_t groupNames /**< */,
- uint8_t nKeys /**< */,
- uint8_t nKeyAliases /**< */,
- uint8_t nRadioGroups /**< */,
- uint32_t which /**< */)
-{
- xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t _aux;
- return xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_replies_types_map_t * xcb_xkb_get_kbd_by_name_replies_types_map
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_get_kbd_by_name_replies_types_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_replies_types_map_t *
-xcb_xkb_get_kbd_by_name_replies_types_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */)
-{
- return (xcb_xkb_get_kbd_by_name_replies_types_map_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_sym_interpret_t * xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_sym_interpret_t *
- **
- *****************************************************************************/
-
-xcb_xkb_sym_interpret_t *
-xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->compat_map.si_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->compat_map.nSIRtrn;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_sym_interpret_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_sym_interpret_iterator_t
-xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_sym_interpret_iterator_t i;
- i.data = /* replies */ S->compat_map.si_rtrn;
- i.rem = /* replies */ S->compat_map.nSIRtrn;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_t * xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_mod_def_t *
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_t *
-xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->compat_map.group_rtrn;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return xcb_popcount(/* replies */ S->compat_map.groupsRtrn);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_mod_def_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_mod_def_iterator_t
-xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_mod_def_iterator_t i;
- i.data = /* replies */ S->compat_map.group_rtrn;
- i.rem = xcb_popcount(/* replies */ S->compat_map.groupsRtrn);
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_t * xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *S
- ** @returns xcb_xkb_indicator_map_t *
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_t *
-xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->indicator_maps.maps;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- return /* replies */ S->indicator_maps.nIndicators;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_indicator_map_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_indicator_map_iterator_t
-xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *S /**< */)
-{
- xcb_xkb_indicator_map_iterator_t i;
- i.data = /* replies */ S->indicator_maps.maps;
- i.rem = /* replies */ S->indicator_maps.nIndicators;
- i.index = (char *) i.data - (char *) S;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *
-xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */)
-{
- return (xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_counted_string_16_t * xcb_xkb_get_kbd_by_name_replies_geometry_label_font
- **
- ** @param const xcb_xkb_get_kbd_by_name_replies_t *R
- ** @returns xcb_xkb_counted_string_16_t *
- **
- *****************************************************************************/
-
-xcb_xkb_counted_string_16_t *
-xcb_xkb_get_kbd_by_name_replies_geometry_label_font (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */)
-{
- return (xcb_xkb_counted_string_16_t *) (R + 1);
-}
-
-int
-xcb_xkb_get_kbd_by_name_replies_serialize (void **_buffer /**< */,
- uint16_t reported /**< */,
- const xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */)
-{
- char *xcb_out = *_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int xcb_pad = 0;
- char xcb_pad0[3] = {0, 0, 0};
- struct iovec xcb_parts[96];
- unsigned int xcb_parts_idx = 0;
- unsigned int xcb_block_len = 0;
- unsigned int i;
- char *xcb_tmp;
-
- if((reported & XCB_XKB_GBN_DETAIL_TYPES) ||
- (reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) ||
- (reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS)) {
- /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_type */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_type;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.typeDeviceID */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeDeviceID;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_sequence */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_sequence;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_length */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_length;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.pad0 */
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_block_len += sizeof(uint8_t)*2;
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*2;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMinKeyCode */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeMinKeyCode;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMaxKeyCode */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeMaxKeyCode;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.present */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.present;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstType */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstType;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nTypes */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nTypes;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalTypes */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalTypes;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeySym */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeySym;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalSyms */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalSyms;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeySyms */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeySyms;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyAction */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyAction;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalActions */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalActions;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyActions */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyActions;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyBehavior */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyBehavior;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyBehaviors */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyBehaviors;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyBehaviors */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalKeyBehaviors;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyExplicit */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyExplicit;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyExplicit */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyExplicit;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyExplicit */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalKeyExplicit;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstModMapKey */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstModMapKey;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nModMapKeys */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nModMapKeys;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalModMapKeys */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalModMapKeys;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstVModMapKey */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstVModMapKey;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nVModMapKeys */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nVModMapKeys;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalVModMapKeys */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalVModMapKeys;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.pad1 */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.virtualMods */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.virtualMods;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* map */
- xcb_parts[xcb_parts_idx].iov_base = (char *)0;
- xcb_block_len += xcb_xkb_get_kbd_by_name_replies_types_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.virtualMods, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map);
- xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_types_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.virtualMods, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_types_map_t);
- }
- if(reported & XCB_XKB_GBN_DETAIL_COMPAT_MAP) {
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_type */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatmap_type;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatDeviceID */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatDeviceID;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_sequence */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatmap_sequence;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_length */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatmap_length;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.groupsRtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.groupsRtrn;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad0 */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.firstSIRtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.firstSIRtrn;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nSIRtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.nSIRtrn;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nTotalSI */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.nTotalSI;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad1 */
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_block_len += sizeof(uint8_t)*16;
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*16;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* si_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->compat_map.si_rtrn;
- xcb_block_len += _aux->compat_map.nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
- xcb_parts[xcb_parts_idx].iov_len = _aux->compat_map.nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* group_rtrn */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->compat_map.group_rtrn;
- xcb_block_len += xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
- xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
- }
- if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) {
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_type */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatormap_type;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatorDeviceID */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatorDeviceID;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_sequence */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatormap_sequence;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_length */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatormap_length;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.which */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.which;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.realIndicators */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.realIndicators;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.nIndicators */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.nIndicators;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.pad0 */
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_block_len += sizeof(uint8_t)*15;
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*15;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* maps */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicator_maps.maps;
- xcb_block_len += _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t);
- xcb_parts[xcb_parts_idx].iov_len = _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
- }
- if((reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) ||
- (reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES)) {
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_type */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyname_type;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyDeviceID */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyDeviceID;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_sequence */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyname_sequence;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_length */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyname_length;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.which */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.which;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMinKeyCode */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyMinKeyCode;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMaxKeyCode */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyMaxKeyCode;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nTypes */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nTypes;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.groupNames */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.groupNames;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.virtualMods */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.virtualMods;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.firstKey */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.firstKey;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeys */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKeys;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.indicators */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.indicators;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nRadioGroups */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nRadioGroups;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeyAliases */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKeyAliases;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKTLevels */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKTLevels;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.pad0 */
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_block_len += sizeof(uint8_t)*4;
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*4;
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* valueList */
- xcb_parts[xcb_parts_idx].iov_base = (char *)0;
- xcb_block_len += xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList);
- xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t);
- }
- if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) {
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_type */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometry_type;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryDeviceID */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometryDeviceID;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_sequence */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometry_sequence;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_length */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometry_length;
- xcb_block_len += sizeof(uint32_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.name */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.name;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_atom_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryFound */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometryFound;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.pad0 */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.widthMM */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.widthMM;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.heightMM */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.heightMM;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nProperties */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nProperties;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nColors */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nColors;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nShapes */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nShapes;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nSections */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nSections;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nDoodads */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nDoodads;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nKeyAliases */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nKeyAliases;
- xcb_block_len += sizeof(uint16_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.baseColorNdx */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.baseColorNdx;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.labelColorNdx */
- xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.labelColorNdx;
- xcb_block_len += sizeof(uint8_t);
- xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* labelFont */
- xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.labelFont;
- xcb_block_len += xcb_xkb_counted_string_16_sizeof(_aux->geometry.labelFont);
- xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_counted_string_16_sizeof(_aux->geometry.labelFont);
- xcb_parts_idx++;
- xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_parts[xcb_parts_idx].iov_base = xcb_pad0;
- xcb_parts[xcb_parts_idx].iov_len = xcb_pad;
- xcb_parts_idx++;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- if (NULL == xcb_out) {
- /* allocate memory */
- xcb_out = malloc(xcb_buffer_len);
- *_buffer = xcb_out;
- }
-
- xcb_tmp = xcb_out;
- for(i=0; i<xcb_parts_idx; i++) {
- if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len)
- memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len);
- if (0 != xcb_parts[i].iov_len)
- xcb_tmp += xcb_parts[i].iov_len;
- }
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buffer /**< */,
- uint16_t reported /**< */,
- xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- if((reported & XCB_XKB_GBN_DETAIL_TYPES) ||
- (reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) ||
- (reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS)) {
- /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_type */
- _aux->types.getmap_type = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.typeDeviceID */
- _aux->types.typeDeviceID = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_sequence */
- _aux->types.getmap_sequence = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_length */
- _aux->types.getmap_length = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.pad0 */
- _aux->types.pad0[0] = *(uint8_t *)xcb_tmp;
- _aux->types.pad0[1] = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t) * 2;
- xcb_tmp += sizeof(uint8_t) * 2;
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMinKeyCode */
- _aux->types.typeMinKeyCode = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMaxKeyCode */
- _aux->types.typeMaxKeyCode = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.present */
- _aux->types.present = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstType */
- _aux->types.firstType = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nTypes */
- _aux->types.nTypes = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalTypes */
- _aux->types.totalTypes = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeySym */
- _aux->types.firstKeySym = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalSyms */
- _aux->types.totalSyms = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeySyms */
- _aux->types.nKeySyms = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyAction */
- _aux->types.firstKeyAction = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalActions */
- _aux->types.totalActions = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyActions */
- _aux->types.nKeyActions = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyBehavior */
- _aux->types.firstKeyBehavior = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyBehaviors */
- _aux->types.nKeyBehaviors = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyBehaviors */
- _aux->types.totalKeyBehaviors = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyExplicit */
- _aux->types.firstKeyExplicit = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyExplicit */
- _aux->types.nKeyExplicit = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyExplicit */
- _aux->types.totalKeyExplicit = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstModMapKey */
- _aux->types.firstModMapKey = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nModMapKeys */
- _aux->types.nModMapKeys = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalModMapKeys */
- _aux->types.totalModMapKeys = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.firstVModMapKey */
- _aux->types.firstVModMapKey = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.nVModMapKeys */
- _aux->types.nVModMapKeys = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.totalVModMapKeys */
- _aux->types.totalVModMapKeys = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.pad1 */
- _aux->types.pad1 = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.types.virtualMods */
- _aux->types.virtualMods = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* map */
- xcb_block_len += xcb_xkb_get_kbd_by_name_replies_types_map_unpack(xcb_tmp, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.virtualMods, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_types_map_t);
- }
- if(reported & XCB_XKB_GBN_DETAIL_COMPAT_MAP) {
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_type */
- _aux->compat_map.compatmap_type = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatDeviceID */
- _aux->compat_map.compatDeviceID = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_sequence */
- _aux->compat_map.compatmap_sequence = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatmap_length */
- _aux->compat_map.compatmap_length = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.groupsRtrn */
- _aux->compat_map.groupsRtrn = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad0 */
- _aux->compat_map.pad0 = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.firstSIRtrn */
- _aux->compat_map.firstSIRtrn = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nSIRtrn */
- _aux->compat_map.nSIRtrn = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nTotalSI */
- _aux->compat_map.nTotalSI = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad1 */
- _aux->compat_map.pad1[0] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[1] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[2] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[3] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[4] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[5] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[6] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[7] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[8] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[9] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[10] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[11] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[12] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[13] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[14] = *(uint8_t *)xcb_tmp;
- _aux->compat_map.pad1[15] = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t) * 16;
- xcb_tmp += sizeof(uint8_t) * 16;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* si_rtrn */
- _aux->compat_map.si_rtrn = (xcb_xkb_sym_interpret_t *)xcb_tmp;
- xcb_block_len += _aux->compat_map.nSIRtrn * sizeof(xcb_xkb_sym_interpret_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_sym_interpret_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* group_rtrn */
- _aux->compat_map.group_rtrn = (xcb_xkb_mod_def_t *)xcb_tmp;
- xcb_block_len += xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t);
- }
- if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) {
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_type */
- _aux->indicator_maps.indicatormap_type = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatorDeviceID */
- _aux->indicator_maps.indicatorDeviceID = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_sequence */
- _aux->indicator_maps.indicatormap_sequence = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatormap_length */
- _aux->indicator_maps.indicatormap_length = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.which */
- _aux->indicator_maps.which = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.realIndicators */
- _aux->indicator_maps.realIndicators = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.nIndicators */
- _aux->indicator_maps.nIndicators = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.pad0 */
- _aux->indicator_maps.pad0[0] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[1] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[2] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[3] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[4] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[5] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[6] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[7] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[8] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[9] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[10] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[11] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[12] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[13] = *(uint8_t *)xcb_tmp;
- _aux->indicator_maps.pad0[14] = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t) * 15;
- xcb_tmp += sizeof(uint8_t) * 15;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* maps */
- _aux->indicator_maps.maps = (xcb_xkb_indicator_map_t *)xcb_tmp;
- xcb_block_len += _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t);
- }
- if((reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) ||
- (reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES)) {
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_type */
- _aux->key_names.keyname_type = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyDeviceID */
- _aux->key_names.keyDeviceID = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_sequence */
- _aux->key_names.keyname_sequence = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyname_length */
- _aux->key_names.keyname_length = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.which */
- _aux->key_names.which = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMinKeyCode */
- _aux->key_names.keyMinKeyCode = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMaxKeyCode */
- _aux->key_names.keyMaxKeyCode = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nTypes */
- _aux->key_names.nTypes = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.groupNames */
- _aux->key_names.groupNames = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.virtualMods */
- _aux->key_names.virtualMods = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.firstKey */
- _aux->key_names.firstKey = *(xcb_keycode_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_keycode_t);
- xcb_tmp += sizeof(xcb_keycode_t);
- xcb_align_to = ALIGNOF(xcb_keycode_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeys */
- _aux->key_names.nKeys = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.indicators */
- _aux->key_names.indicators = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nRadioGroups */
- _aux->key_names.nRadioGroups = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeyAliases */
- _aux->key_names.nKeyAliases = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKTLevels */
- _aux->key_names.nKTLevels = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.key_names.pad0 */
- _aux->key_names.pad0[0] = *(uint8_t *)xcb_tmp;
- _aux->key_names.pad0[1] = *(uint8_t *)xcb_tmp;
- _aux->key_names.pad0[2] = *(uint8_t *)xcb_tmp;
- _aux->key_names.pad0[3] = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t) * 4;
- xcb_tmp += sizeof(uint8_t) * 4;
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* valueList */
- xcb_block_len += xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack(xcb_tmp, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t);
- }
- if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) {
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_type */
- _aux->geometry.geometry_type = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryDeviceID */
- _aux->geometry.geometryDeviceID = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_sequence */
- _aux->geometry.geometry_sequence = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometry_length */
- _aux->geometry.geometry_length = *(uint32_t *)xcb_tmp;
- xcb_block_len += sizeof(uint32_t);
- xcb_tmp += sizeof(uint32_t);
- xcb_align_to = ALIGNOF(uint32_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.name */
- _aux->geometry.name = *(xcb_atom_t *)xcb_tmp;
- xcb_block_len += sizeof(xcb_atom_t);
- xcb_tmp += sizeof(xcb_atom_t);
- xcb_align_to = ALIGNOF(xcb_atom_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryFound */
- _aux->geometry.geometryFound = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.pad0 */
- _aux->geometry.pad0 = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.widthMM */
- _aux->geometry.widthMM = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.heightMM */
- _aux->geometry.heightMM = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nProperties */
- _aux->geometry.nProperties = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nColors */
- _aux->geometry.nColors = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nShapes */
- _aux->geometry.nShapes = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nSections */
- _aux->geometry.nSections = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nDoodads */
- _aux->geometry.nDoodads = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nKeyAliases */
- _aux->geometry.nKeyAliases = *(uint16_t *)xcb_tmp;
- xcb_block_len += sizeof(uint16_t);
- xcb_tmp += sizeof(uint16_t);
- xcb_align_to = ALIGNOF(uint16_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.baseColorNdx */
- _aux->geometry.baseColorNdx = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* xcb_xkb_get_kbd_by_name_replies_t.geometry.labelColorNdx */
- _aux->geometry.labelColorNdx = *(uint8_t *)xcb_tmp;
- xcb_block_len += sizeof(uint8_t);
- xcb_tmp += sizeof(uint8_t);
- xcb_align_to = ALIGNOF(uint8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* labelFont */
- _aux->geometry.labelFont = (xcb_xkb_counted_string_16_t *)xcb_tmp;
- xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t);
- }
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-int
-xcb_xkb_get_kbd_by_name_replies_sizeof (const void *_buffer /**< */,
- uint16_t reported /**< */)
-{
- xcb_xkb_get_kbd_by_name_replies_t _aux;
- return xcb_xkb_get_kbd_by_name_replies_unpack(_buffer, reported, &_aux);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t need
- ** @param uint16_t want
- ** @param uint8_t load
- ** @returns xcb_xkb_get_kbd_by_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_cookie_t
-xcb_xkb_get_kbd_by_name (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t need /**< */,
- uint16_t want /**< */,
- uint8_t load /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_KBD_BY_NAME,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_kbd_by_name_cookie_t xcb_ret;
- xcb_xkb_get_kbd_by_name_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.need = need;
- xcb_out.want = want;
- xcb_out.load = load;
- 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_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t need
- ** @param uint16_t want
- ** @param uint8_t load
- ** @returns xcb_xkb_get_kbd_by_name_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_cookie_t
-xcb_xkb_get_kbd_by_name_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t need /**< */,
- uint16_t want /**< */,
- uint8_t load /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_KBD_BY_NAME,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_kbd_by_name_cookie_t xcb_ret;
- xcb_xkb_get_kbd_by_name_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.need = need;
- xcb_out.want = want;
- xcb_out.load = load;
- 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_xkb_get_kbd_by_name_replies_t * xcb_xkb_get_kbd_by_name_replies
- **
- ** @param const xcb_xkb_get_kbd_by_name_reply_t *R
- ** @returns xcb_xkb_get_kbd_by_name_replies_t *
- **
- *****************************************************************************/
-
-void *
-xcb_xkb_get_kbd_by_name_replies (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */)
-{
- return (void *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_kbd_by_name_reply_t * xcb_xkb_get_kbd_by_name_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_kbd_by_name_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_kbd_by_name_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_kbd_by_name_reply_t *
-xcb_xkb_get_kbd_by_name_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_kbd_by_name_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_kbd_by_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-int
-xcb_xkb_get_device_info_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_get_device_info_reply_t *_aux = (xcb_xkb_get_device_info_reply_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int i;
- unsigned int xcb_tmp_len;
-
- xcb_block_len += sizeof(xcb_xkb_get_device_info_reply_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* name */
- xcb_block_len += _aux->nameLen * sizeof(xcb_xkb_string8_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* btnActions */
- xcb_block_len += _aux->nBtnsRtrn * sizeof(xcb_xkb_action_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_action_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* leds */
- for(i=0; i<_aux->nDeviceLedFBs; i++) {
- xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_device_led_info_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t wanted
- ** @param uint8_t allButtons
- ** @param uint8_t firstButton
- ** @param uint8_t nButtons
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @returns xcb_xkb_get_device_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_device_info_cookie_t
-xcb_xkb_get_device_info (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t wanted /**< */,
- uint8_t allButtons /**< */,
- uint8_t firstButton /**< */,
- uint8_t nButtons /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_DEVICE_INFO,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_device_info_cookie_t xcb_ret;
- xcb_xkb_get_device_info_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.wanted = wanted;
- xcb_out.allButtons = allButtons;
- xcb_out.firstButton = firstButton;
- xcb_out.nButtons = nButtons;
- xcb_out.pad0 = 0;
- xcb_out.ledClass = ledClass;
- xcb_out.ledID = ledID;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint16_t wanted
- ** @param uint8_t allButtons
- ** @param uint8_t firstButton
- ** @param uint8_t nButtons
- ** @param xcb_xkb_led_class_spec_t ledClass
- ** @param xcb_xkb_id_spec_t ledID
- ** @returns xcb_xkb_get_device_info_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_get_device_info_cookie_t
-xcb_xkb_get_device_info_unchecked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint16_t wanted /**< */,
- uint8_t allButtons /**< */,
- uint8_t firstButton /**< */,
- uint8_t nButtons /**< */,
- xcb_xkb_led_class_spec_t ledClass /**< */,
- xcb_xkb_id_spec_t ledID /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 2,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_GET_DEVICE_INFO,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[4];
- xcb_xkb_get_device_info_cookie_t xcb_ret;
- xcb_xkb_get_device_info_request_t xcb_out;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.wanted = wanted;
- xcb_out.allButtons = allButtons;
- xcb_out.firstButton = firstButton;
- xcb_out.nButtons = nButtons;
- xcb_out.pad0 = 0;
- xcb_out.ledClass = ledClass;
- xcb_out.ledID = ledID;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_string8_t * xcb_xkb_get_device_info_name
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_xkb_string8_t *
- **
- *****************************************************************************/
-
-xcb_xkb_string8_t *
-xcb_xkb_get_device_info_name (const xcb_xkb_get_device_info_reply_t *R /**< */)
-{
- return (xcb_xkb_string8_t *) (R + 1);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_device_info_name_length
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_device_info_name_length (const xcb_xkb_get_device_info_reply_t *R /**< */)
-{
- return R->nameLen;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_generic_iterator_t xcb_xkb_get_device_info_name_end
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_generic_iterator_t
- **
- *****************************************************************************/
-
-xcb_generic_iterator_t
-xcb_xkb_get_device_info_name_end (const xcb_xkb_get_device_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t i;
- i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->nameLen);
- i.rem = 0;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_t * xcb_xkb_get_device_info_btn_actions
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_xkb_action_t *
- **
- *****************************************************************************/
-
-xcb_xkb_action_t *
-xcb_xkb_get_device_info_btn_actions (const xcb_xkb_get_device_info_reply_t *R /**< */)
-{
- xcb_generic_iterator_t prev = xcb_xkb_get_device_info_name_end(R);
- return (xcb_xkb_action_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_action_t, prev.index) + 0);
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_device_info_btn_actions_length
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_device_info_btn_actions_length (const xcb_xkb_get_device_info_reply_t *R /**< */)
-{
- return R->nBtnsRtrn;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_action_iterator_t xcb_xkb_get_device_info_btn_actions_iterator
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_xkb_action_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_action_iterator_t
-xcb_xkb_get_device_info_btn_actions_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */)
-{
- xcb_xkb_action_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_get_device_info_name_end(R);
- i.data = (xcb_xkb_action_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_action_t, prev.index));
- i.rem = R->nBtnsRtrn;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** int xcb_xkb_get_device_info_leds_length
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns int
- **
- *****************************************************************************/
-
-int
-xcb_xkb_get_device_info_leds_length (const xcb_xkb_get_device_info_reply_t *R /**< */)
-{
- return R->nDeviceLedFBs;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_device_led_info_iterator_t xcb_xkb_get_device_info_leds_iterator
- **
- ** @param const xcb_xkb_get_device_info_reply_t *R
- ** @returns xcb_xkb_device_led_info_iterator_t
- **
- *****************************************************************************/
-
-xcb_xkb_device_led_info_iterator_t
-xcb_xkb_get_device_info_leds_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */)
-{
- xcb_xkb_device_led_info_iterator_t i;
- xcb_generic_iterator_t prev = xcb_xkb_action_end(xcb_xkb_get_device_info_btn_actions_iterator(R));
- i.data = (xcb_xkb_device_led_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_device_led_info_t, prev.index));
- i.rem = R->nDeviceLedFBs;
- i.index = (char *) i.data - (char *) R;
- return i;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_get_device_info_reply_t * xcb_xkb_get_device_info_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_get_device_info_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_get_device_info_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_get_device_info_reply_t *
-xcb_xkb_get_device_info_reply (xcb_connection_t *c /**< */,
- xcb_xkb_get_device_info_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_get_device_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
-int
-xcb_xkb_set_device_info_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_set_device_info_request_t *_aux = (xcb_xkb_set_device_info_request_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
- unsigned int i;
- unsigned int xcb_tmp_len;
-
- xcb_block_len += sizeof(xcb_xkb_set_device_info_request_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* btnActions */
- xcb_block_len += _aux->nBtns * sizeof(xcb_xkb_action_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_action_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
- /* leds */
- for(i=0; i<_aux->nDeviceLedFBs; i++) {
- xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
- xcb_block_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_align_to = ALIGNOF(xcb_xkb_device_led_info_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_device_info_checked
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t firstBtn
- ** @param uint8_t nBtns
- ** @param uint16_t change
- ** @param uint16_t nDeviceLedFBs
- ** @param const xcb_xkb_action_t *btnActions
- ** @param const xcb_xkb_device_led_info_t *leds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_device_info_checked (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t firstBtn /**< */,
- uint8_t nBtns /**< */,
- uint16_t change /**< */,
- uint16_t nDeviceLedFBs /**< */,
- const xcb_xkb_action_t *btnActions /**< */,
- const xcb_xkb_device_led_info_t *leds /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_DEVICE_INFO,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_device_info_request_t xcb_out;
- unsigned int i;
- unsigned int xcb_tmp_len;
- char *xcb_tmp;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.firstBtn = firstBtn;
- xcb_out.nBtns = nBtns;
- xcb_out.change = change;
- xcb_out.nDeviceLedFBs = nDeviceLedFBs;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_action_t btnActions */
- xcb_parts[4].iov_base = (char *) btnActions;
- xcb_parts[4].iov_len = nBtns * sizeof(xcb_xkb_action_t);
- xcb_parts[5].iov_base = 0;
- xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
- /* xcb_xkb_device_led_info_t leds */
- xcb_parts[6].iov_base = (char *) leds;
- xcb_parts[6].iov_len = 0;
- xcb_tmp = (char *)leds;
- for(i=0; i<nDeviceLedFBs; i++) {
- xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
- xcb_parts[6].iov_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_parts[7].iov_base = 0;
- xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_void_cookie_t xcb_xkb_set_device_info
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_device_spec_t deviceSpec
- ** @param uint8_t firstBtn
- ** @param uint8_t nBtns
- ** @param uint16_t change
- ** @param uint16_t nDeviceLedFBs
- ** @param const xcb_xkb_action_t *btnActions
- ** @param const xcb_xkb_device_led_info_t *leds
- ** @returns xcb_void_cookie_t
- **
- *****************************************************************************/
-
-xcb_void_cookie_t
-xcb_xkb_set_device_info (xcb_connection_t *c /**< */,
- xcb_xkb_device_spec_t deviceSpec /**< */,
- uint8_t firstBtn /**< */,
- uint8_t nBtns /**< */,
- uint16_t change /**< */,
- uint16_t nDeviceLedFBs /**< */,
- const xcb_xkb_action_t *btnActions /**< */,
- const xcb_xkb_device_led_info_t *leds /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 6,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_DEVICE_INFO,
- /* isvoid */ 1
- };
-
- struct iovec xcb_parts[8];
- xcb_void_cookie_t xcb_ret;
- xcb_xkb_set_device_info_request_t xcb_out;
- unsigned int i;
- unsigned int xcb_tmp_len;
- char *xcb_tmp;
-
- xcb_out.deviceSpec = deviceSpec;
- xcb_out.firstBtn = firstBtn;
- xcb_out.nBtns = nBtns;
- xcb_out.change = change;
- xcb_out.nDeviceLedFBs = nDeviceLedFBs;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_action_t btnActions */
- xcb_parts[4].iov_base = (char *) btnActions;
- xcb_parts[4].iov_len = nBtns * sizeof(xcb_xkb_action_t);
- xcb_parts[5].iov_base = 0;
- xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
- /* xcb_xkb_device_led_info_t leds */
- xcb_parts[6].iov_base = (char *) leds;
- xcb_parts[6].iov_len = 0;
- xcb_tmp = (char *)leds;
- for(i=0; i<nDeviceLedFBs; i++) {
- xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp);
- xcb_parts[6].iov_len += xcb_tmp_len;
- xcb_tmp += xcb_tmp_len;
- }
- xcb_parts[7].iov_base = 0;
- xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-int
-xcb_xkb_set_debugging_flags_sizeof (const void *_buffer /**< */)
-{
- char *xcb_tmp = (char *)_buffer;
- const xcb_xkb_set_debugging_flags_request_t *_aux = (xcb_xkb_set_debugging_flags_request_t *)_buffer;
- unsigned int xcb_buffer_len = 0;
- unsigned int xcb_block_len = 0;
- unsigned int xcb_pad = 0;
- unsigned int xcb_align_to = 0;
-
-
- xcb_block_len += sizeof(xcb_xkb_set_debugging_flags_request_t);
- xcb_tmp += xcb_block_len;
- xcb_buffer_len += xcb_block_len;
- xcb_block_len = 0;
- /* message */
- xcb_block_len += _aux->msgLength * sizeof(xcb_xkb_string8_t);
- xcb_tmp += xcb_block_len;
- xcb_align_to = ALIGNOF(xcb_xkb_string8_t);
- /* insert padding */
- xcb_pad = -xcb_block_len & (xcb_align_to - 1);
- xcb_buffer_len += xcb_block_len + xcb_pad;
- if (0 != xcb_pad) {
- xcb_tmp += xcb_pad;
- xcb_pad = 0;
- }
- xcb_block_len = 0;
-
- return xcb_buffer_len;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags
- **
- ** @param xcb_connection_t *c
- ** @param uint16_t msgLength
- ** @param uint32_t affectFlags
- ** @param uint32_t flags
- ** @param uint32_t affectCtrls
- ** @param uint32_t ctrls
- ** @param const xcb_xkb_string8_t *message
- ** @returns xcb_xkb_set_debugging_flags_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_debugging_flags_cookie_t
-xcb_xkb_set_debugging_flags (xcb_connection_t *c /**< */,
- uint16_t msgLength /**< */,
- uint32_t affectFlags /**< */,
- uint32_t flags /**< */,
- uint32_t affectCtrls /**< */,
- uint32_t ctrls /**< */,
- const xcb_xkb_string8_t *message /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_DEBUGGING_FLAGS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[6];
- xcb_xkb_set_debugging_flags_cookie_t xcb_ret;
- xcb_xkb_set_debugging_flags_request_t xcb_out;
-
- xcb_out.msgLength = msgLength;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.affectFlags = affectFlags;
- xcb_out.flags = flags;
- xcb_out.affectCtrls = affectCtrls;
- xcb_out.ctrls = ctrls;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_string8_t message */
- xcb_parts[4].iov_base = (char *) message;
- xcb_parts[4].iov_len = msgLength * sizeof(xcb_xkb_string8_t);
- xcb_parts[5].iov_base = 0;
- xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags_unchecked
- **
- ** @param xcb_connection_t *c
- ** @param uint16_t msgLength
- ** @param uint32_t affectFlags
- ** @param uint32_t flags
- ** @param uint32_t affectCtrls
- ** @param uint32_t ctrls
- ** @param const xcb_xkb_string8_t *message
- ** @returns xcb_xkb_set_debugging_flags_cookie_t
- **
- *****************************************************************************/
-
-xcb_xkb_set_debugging_flags_cookie_t
-xcb_xkb_set_debugging_flags_unchecked (xcb_connection_t *c /**< */,
- uint16_t msgLength /**< */,
- uint32_t affectFlags /**< */,
- uint32_t flags /**< */,
- uint32_t affectCtrls /**< */,
- uint32_t ctrls /**< */,
- const xcb_xkb_string8_t *message /**< */)
-{
- static const xcb_protocol_request_t xcb_req = {
- /* count */ 4,
- /* ext */ &xcb_xkb_id,
- /* opcode */ XCB_XKB_SET_DEBUGGING_FLAGS,
- /* isvoid */ 0
- };
-
- struct iovec xcb_parts[6];
- xcb_xkb_set_debugging_flags_cookie_t xcb_ret;
- xcb_xkb_set_debugging_flags_request_t xcb_out;
-
- xcb_out.msgLength = msgLength;
- memset(xcb_out.pad0, 0, 2);
- xcb_out.affectFlags = affectFlags;
- xcb_out.flags = flags;
- xcb_out.affectCtrls = affectCtrls;
- xcb_out.ctrls = ctrls;
-
- xcb_parts[2].iov_base = (char *) &xcb_out;
- xcb_parts[2].iov_len = sizeof(xcb_out);
- xcb_parts[3].iov_base = 0;
- xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
- /* xcb_xkb_string8_t message */
- xcb_parts[4].iov_base = (char *) message;
- xcb_parts[4].iov_len = msgLength * sizeof(xcb_xkb_string8_t);
- xcb_parts[5].iov_base = 0;
- xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
-
- xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
- return xcb_ret;
-}
-
-
-/*****************************************************************************
- **
- ** xcb_xkb_set_debugging_flags_reply_t * xcb_xkb_set_debugging_flags_reply
- **
- ** @param xcb_connection_t *c
- ** @param xcb_xkb_set_debugging_flags_cookie_t cookie
- ** @param xcb_generic_error_t **e
- ** @returns xcb_xkb_set_debugging_flags_reply_t *
- **
- *****************************************************************************/
-
-xcb_xkb_set_debugging_flags_reply_t *
-xcb_xkb_set_debugging_flags_reply (xcb_connection_t *c /**< */,
- xcb_xkb_set_debugging_flags_cookie_t cookie /**< */,
- xcb_generic_error_t **e /**< */)
-{
- return (xcb_xkb_set_debugging_flags_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
-}
-
diff --git a/src/3rdparty/xcb/qt_attribution.json b/src/3rdparty/xcb/qt_attribution.json
index 30b9af3818..a04e1acdc5 100644
--- a/src/3rdparty/xcb/qt_attribution.json
+++ b/src/3rdparty/xcb/qt_attribution.json
@@ -1,24 +1,14 @@
{
- "Id": "xcb",
- "Name": "XCB",
+ "Id": "xcb-xinput",
+ "Name": "XCB-XInput",
"QDocModule": "qtgui",
- "QtUsage": "Optionally used in xcb platform plugin if configured with -qt-xcb.",
-
- "Description": "Selected xcb libraries.",
+ "QtUsage": "Used in XCB platform plugin if xcb-xinput was not present on the system
+ during Qt configuration or -bundled-xcb-xinput switch was used. To force using xcb-xinput from
+ the system, pass -no-bundled-xcb-xinput.",
+ "Description": "XInput 2 extension for XCB (The X protocol C-language Binding) library.",
"Homepage": "https://xcb.freedesktop.org/",
"License": "MIT License",
"LicenseId": "MIT",
"LicenseFile": "LICENSE",
- "Copyright": "Copyright © 2000 Keith Packard
-Copyright © 2006 Jamey Sharp
-Copyright © 2007-2008 Vincent Torri <vtorri@univ-evry.fr>
-Copyright © 2007 Bart Massey
-Copyright © 2008-2009 Julien Danjou <julien@danjou.info>
-Copyright © 2008 Arnaud Fontaine <arnau@debian.org>
-Copyright © 2008 Bart Massey <bart@cs.pdx.edu>
-Copyright © 2008 Ian Osgood <iano@quirkster.com>
-Copyright © 2008 Jamey Sharp <jamey@minilop.net>
-Copyright © 2008 Josh Triplett <josh@freedesktop.org>
-Copyright © 2008 Ulrich Eckhardt <doomster@knuut.de>
-"
+ "Copyright": "Copyright (C) Free Software Foundation, Inc."
}
diff --git a/src/3rdparty/xcb/sysinclude/render.h b/src/3rdparty/xcb/sysinclude/render.h
deleted file mode 100644
index 00107aa169..0000000000
--- a/src/3rdparty/xcb/sysinclude/render.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <xcb/render.h>
diff --git a/src/3rdparty/xcb/sysinclude/xcb.h b/src/3rdparty/xcb/sysinclude/xcb.h
deleted file mode 100644
index e637314c29..0000000000
--- a/src/3rdparty/xcb/sysinclude/xcb.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <xcb/xcb.h>
diff --git a/src/3rdparty/xcb/sysinclude/xcbext.h b/src/3rdparty/xcb/sysinclude/xcbext.h
deleted file mode 100644
index c54f14d772..0000000000
--- a/src/3rdparty/xcb/sysinclude/xcbext.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <xcb/xcbext.h>
diff --git a/src/3rdparty/xcb/sysinclude/xproto.h b/src/3rdparty/xcb/sysinclude/xproto.h
deleted file mode 100644
index 671249a4d7..0000000000
--- a/src/3rdparty/xcb/sysinclude/xproto.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <xcb/xproto.h>
diff --git a/src/3rdparty/xcb/xcb-util-image/xcb_image.c b/src/3rdparty/xcb/xcb-util-image/xcb_image.c
deleted file mode 100644
index e426cbd00c..0000000000
--- a/src/3rdparty/xcb/xcb-util-image/xcb_image.c
+++ /dev/null
@@ -1,1011 +0,0 @@
-/* Copyright © 2007 Bart Massey
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or their
- * institutions shall not be used in advertising or otherwise to promote the
- * sale, use or other dealings in this Software without prior written
- * authorization from the authors.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <xcb/xcb.h>
-#include <xcb/shm.h>
-#include <xcb/xcb_aux.h>
-#include "xcb_bitops.h"
-#include "xcb_image.h"
-#define BUILD
-#include "xcb_pixel.h"
-
-
-static xcb_format_t *
-find_format_by_depth (const xcb_setup_t *setup, uint8_t depth)
-{
- xcb_format_t *fmt = xcb_setup_pixmap_formats(setup);
- xcb_format_t *fmtend = fmt + xcb_setup_pixmap_formats_length(setup);
- for(; fmt != fmtend; ++fmt)
- if(fmt->depth == depth)
- return fmt;
- return 0;
-}
-
-
-static xcb_image_format_t
-effective_format(xcb_image_format_t format, uint8_t bpp)
-{
- if (format == XCB_IMAGE_FORMAT_Z_PIXMAP && bpp != 1)
- return format;
- return XCB_IMAGE_FORMAT_XY_PIXMAP;
-}
-
-
-static int
-format_valid (uint8_t depth, uint8_t bpp, uint8_t unit,
- xcb_image_format_t format, uint8_t xpad)
-{
- xcb_image_format_t ef = effective_format(format, bpp);
- if (depth > bpp)
- return 0;
- switch(ef) {
- case XCB_IMAGE_FORMAT_XY_PIXMAP:
- switch(unit) {
- case 8:
- case 16:
- case 32:
- break;
- default:
- return 0;
- }
- if (xpad < bpp)
- return 0;
- switch (xpad) {
- case 8:
- case 16:
- case 32:
- break;
- default:
- return 0;
- }
- break;
- case XCB_IMAGE_FORMAT_Z_PIXMAP:
- switch (bpp) {
- case 4:
- if (unit != 8)
- return 0;
- break;
- case 8:
- case 16:
- case 24:
- case 32:
- if (unit != bpp)
- return 0;
- break;
- default:
- return 0;
- }
- break;
- default:
- return 0;
- }
- return 1;
-}
-
-
-static int
-image_format_valid (xcb_image_t *image) {
- return format_valid(image->depth,
- image->bpp,
- image->unit,
- image->format,
- image->scanline_pad);
-}
-
-
-void
-xcb_image_annotate (xcb_image_t *image)
-{
- xcb_image_format_t ef = effective_format(image->format, image->bpp);
- switch (ef) {
- case XCB_IMAGE_FORMAT_XY_PIXMAP:
- image->stride = xcb_roundup(image->width, image->scanline_pad) >> 3;
- image->size = image->height * image->stride * image->depth;
- break;
- case XCB_IMAGE_FORMAT_Z_PIXMAP:
- image->stride = xcb_roundup((uint32_t)image->width *
- (uint32_t)image->bpp,
- image->scanline_pad) >> 3;
- image->size = image->height * image->stride;
- break;
- default:
- assert(0);
- }
-}
-
-
-xcb_image_t *
-xcb_image_create_native (xcb_connection_t * c,
- uint16_t width,
- uint16_t height,
- xcb_image_format_t format,
- uint8_t depth,
- void * base,
- uint32_t bytes,
- uint8_t * data)
-{
- const xcb_setup_t * setup = xcb_get_setup(c);
- xcb_format_t * fmt;
- xcb_image_format_t ef = format;
-
- if (ef == XCB_IMAGE_FORMAT_Z_PIXMAP && depth == 1)
- ef = XCB_IMAGE_FORMAT_XY_PIXMAP;
- switch (ef) {
- case XCB_IMAGE_FORMAT_XY_BITMAP:
- if (depth != 1)
- return 0;
- /* fall through */
- case XCB_IMAGE_FORMAT_XY_PIXMAP:
- if (depth > 1) {
- fmt = find_format_by_depth(setup, depth);
- if (!fmt)
- return 0;
- }
- return xcb_image_create(width, height, format,
- setup->bitmap_format_scanline_pad,
- depth, depth, setup->bitmap_format_scanline_unit,
- setup->image_byte_order,
- setup->bitmap_format_bit_order,
- base, bytes, data);
- case XCB_IMAGE_FORMAT_Z_PIXMAP:
- fmt = find_format_by_depth(setup, depth);
- if (!fmt)
- return 0;
- return xcb_image_create(width, height, format,
- fmt->scanline_pad,
- fmt->depth, fmt->bits_per_pixel, 0,
- setup->image_byte_order,
- XCB_IMAGE_ORDER_MSB_FIRST,
- base, bytes, data);
- default:
- assert(0);
- }
- assert(0);
-}
-
-
-xcb_image_t *
-xcb_image_create (uint16_t width,
- uint16_t height,
- xcb_image_format_t format,
- uint8_t xpad,
- uint8_t depth,
- uint8_t bpp,
- uint8_t unit,
- xcb_image_order_t byte_order,
- xcb_image_order_t bit_order,
- void * base,
- uint32_t bytes,
- uint8_t * data)
-{
- xcb_image_t * image;
-
- if (unit == 0) {
- switch (format) {
- case XCB_IMAGE_FORMAT_XY_BITMAP:
- case XCB_IMAGE_FORMAT_XY_PIXMAP:
- unit = 32;
- break;
- case XCB_IMAGE_FORMAT_Z_PIXMAP:
- if (bpp == 1) {
- unit = 32;
- break;
- }
- if (bpp < 8) {
- unit = 8;
- break;
- }
- unit = bpp;
- break;
- }
- }
- if (!format_valid(depth, bpp, unit, format, xpad))
- return 0;
- image = malloc(sizeof(*image));
- if (image == 0)
- return 0;
- image->width = width;
- image->height = height;
- image->format = format;
- image->scanline_pad = xpad;
- image->depth = depth;
- image->bpp = bpp;
- image->unit = unit;
- image->plane_mask = xcb_mask(depth);
- image->byte_order = byte_order;
- image->bit_order = bit_order;
- xcb_image_annotate(image);
-
- /*
- * Ways this function can be called:
- * * with data: we fail if bytes isn't
- * large enough, else leave well enough alone.
- * * with base and !data: if bytes is zero, we
- * default; otherwise we fail if bytes isn't
- * large enough, else fill in data
- * * with !base and !data: we malloc storage
- * for the data, save that address as the base,
- * and fail if malloc does.
- *
- * When successful, we establish the invariant that data
- * points at sufficient storage that may have been
- * supplied, and base is set iff it should be
- * auto-freed when the image is destroyed.
- *
- * Except as a special case when base = 0 && data == 0 &&
- * bytes == ~0 we just return the image structure and let
- * the caller deal with getting the allocation right.
- */
- if (!base && !data && bytes == ~0) {
- image->base = 0;
- image->data = 0;
- return image;
- }
- if (!base && data && bytes == 0)
- bytes = image->size;
- image->base = base;
- image->data = data;
- if (!image->data) {
- if (image->base) {
- image->data = image->base;
- } else {
- bytes = image->size;
- image->base = malloc(bytes);
- image->data = image->base;
- }
- }
- if (!image->data || bytes < image->size) {
- free(image);
- return 0;
- }
- return image;
-}
-
-
-void
-xcb_image_destroy (xcb_image_t *image)
-{
- if (image->base)
- free (image->base);
- free (image);
-}
-
-
-xcb_image_t *
-xcb_image_get (xcb_connection_t * conn,
- xcb_drawable_t draw,
- int16_t x,
- int16_t y,
- uint16_t width,
- uint16_t height,
- uint32_t plane_mask,
- xcb_image_format_t format)
-{
- xcb_get_image_cookie_t image_cookie;
- xcb_get_image_reply_t * imrep;
- xcb_image_t * image = 0;
- uint32_t bytes;
- uint8_t * data;
-
- image_cookie = xcb_get_image(conn, format, draw, x, y,
- width, height, plane_mask);
- imrep = xcb_get_image_reply(conn, image_cookie, 0);
- if (!imrep)
- return 0;
- bytes = xcb_get_image_data_length(imrep);
- data = xcb_get_image_data(imrep);
- switch (format) {
- case XCB_IMAGE_FORMAT_XY_PIXMAP:
- plane_mask &= xcb_mask(imrep->depth);
- if (plane_mask != xcb_mask(imrep->depth)) {
- xcb_image_t * tmp_image =
- xcb_image_create_native(conn, width, height, format,
- imrep->depth, 0, 0, 0);
-
- if (!tmp_image) {
- free(imrep);
- return 0;
- }
-
- int i;
- uint32_t rpm = plane_mask;
- uint8_t * src_plane = image->data;
- uint8_t * dst_plane = tmp_image->data;
- uint32_t size = image->height * image->stride;
-
- if (tmp_image->bit_order == XCB_IMAGE_ORDER_MSB_FIRST)
- rpm = xcb_bit_reverse(plane_mask, imrep->depth);
- for (i = 0; i < imrep->depth; i++) {
- if (rpm & 1) {
- memcpy(dst_plane, src_plane, size);
- src_plane += size;
- } else {
- memset(dst_plane, 0, size);
- }
- dst_plane += size;
- }
- tmp_image->plane_mask = plane_mask;
- image = tmp_image;
- free(imrep);
- break;
- }
- /* fall through */
- case XCB_IMAGE_FORMAT_Z_PIXMAP:
- image = xcb_image_create_native(conn, width, height, format,
- imrep->depth, imrep, bytes, data);
- if (!image) {
- free(imrep);
- return 0;
- }
- break;
- default:
- assert(0);
- }
- assert(bytes == image->size);
- return image;
-}
-
-
-xcb_image_t *
-xcb_image_native (xcb_connection_t * c,
- xcb_image_t * image,
- int convert)
-{
- xcb_image_t * tmp_image = 0;
- const xcb_setup_t * setup = xcb_get_setup(c);
- xcb_format_t * fmt = 0;
- xcb_image_format_t ef = effective_format(image->format, image->bpp);
- uint8_t bpp = 1;
-
- if (image->depth > 1 || ef == XCB_IMAGE_FORMAT_Z_PIXMAP) {
- fmt = find_format_by_depth(setup, image->depth);
- /* XXX For now, we don't do depth conversions, even
- for xy-pixmaps */
- if (!fmt)
- return 0;
- bpp = fmt->bits_per_pixel;
- }
- switch (ef) {
- case XCB_IMAGE_FORMAT_XY_PIXMAP:
- if (setup->bitmap_format_scanline_unit != image->unit ||
- setup->bitmap_format_scanline_pad != image->scanline_pad ||
- setup->image_byte_order != image->byte_order ||
- setup->bitmap_format_bit_order != image->bit_order ||
- bpp != image->bpp) {
- if (!convert)
- return 0;
- tmp_image =
- xcb_image_create(image->width, image->height, image->format,
- setup->bitmap_format_scanline_pad,
- image->depth, bpp,
- setup->bitmap_format_scanline_unit,
- setup->image_byte_order,
- setup->bitmap_format_bit_order,
- 0, 0, 0);
- if (!tmp_image)
- return 0;
- }
- break;
- case XCB_IMAGE_FORMAT_Z_PIXMAP:
- if (fmt->scanline_pad != image->scanline_pad ||
- setup->image_byte_order != image->byte_order ||
- bpp != image->bpp) {
- if (!convert)
- return 0;
- tmp_image =
- xcb_image_create(image->width, image->height, image->format,
- fmt->scanline_pad,
- image->depth, bpp, 0,
- setup->image_byte_order,
- XCB_IMAGE_ORDER_MSB_FIRST,
- 0, 0, 0);
- if (!tmp_image)
- return 0;
- }
- break;
- default:
- assert(0);
- }
- if (tmp_image) {
- if (!xcb_image_convert(image, tmp_image)) {
- xcb_image_destroy(tmp_image);
- return 0;
- }
- image = tmp_image;
- }
- return image;
-}
-
-
-xcb_void_cookie_t
-xcb_image_put (xcb_connection_t * conn,
- xcb_drawable_t draw,
- xcb_gcontext_t gc,
- xcb_image_t * image,
- int16_t x,
- int16_t y,
- uint8_t left_pad)
-{
- return xcb_put_image(conn, image->format, draw, gc,
- image->width, image->height,
- x, y, left_pad,
- image->depth,
- image->size,
- image->data);
-}
-
-
-
-/*
- * Shm stuff
- */
-
-xcb_image_t *
-xcb_image_shm_put (xcb_connection_t * conn,
- xcb_drawable_t draw,
- xcb_gcontext_t gc,
- xcb_image_t * image,
- xcb_shm_segment_info_t shminfo,
- int16_t src_x,
- int16_t src_y,
- int16_t dest_x,
- int16_t dest_y,
- uint16_t src_width,
- uint16_t src_height,
- uint8_t send_event)
-{
- if (!xcb_image_native(conn, image, 0))
- return 0;
- if (!shminfo.shmaddr)
- return 0;
- xcb_shm_put_image(conn, draw, gc,
- image->width, image->height,
- src_x, src_y, src_width, src_height,
- dest_x, dest_y,
- image->depth, image->format,
- send_event,
- shminfo.shmseg,
- image->data - shminfo.shmaddr);
- return image;
-}
-
-
-int
-xcb_image_shm_get (xcb_connection_t * conn,
- xcb_drawable_t draw,
- xcb_image_t * image,
- xcb_shm_segment_info_t shminfo,
- int16_t x,
- int16_t y,
- uint32_t plane_mask)
-{
- xcb_shm_get_image_reply_t * setup;
- xcb_shm_get_image_cookie_t cookie;
- xcb_generic_error_t * err = 0;
-
- if (!shminfo.shmaddr)
- return 0;
- cookie = xcb_shm_get_image(conn, draw,
- x, y,
- image->width, image->height,
- plane_mask,
- image->format,
- shminfo.shmseg,
- image->data - shminfo.shmaddr);
- setup = xcb_shm_get_image_reply(conn, cookie, &err);
- if (err) {
- fprintf(stderr, "ShmGetImageReply error %d\n", (int)err->error_code);
- free(err);
- return 0;
- } else {
- free (setup);
- return 1;
- }
-}
-
-
-static uint32_t
-xy_image_byte (xcb_image_t *image, uint32_t x)
-{
- x >>= 3;
- if (image->byte_order == image->bit_order)
- return x;
- switch (image->unit) {
- default:
- case 8:
- return x;
- case 16:
- return x ^ 1;
- case 32:
- return x ^ 3;
- }
-}
-
-static uint32_t
-xy_image_bit (xcb_image_t *image, uint32_t x)
-{
- x &= 7;
- if (image->bit_order == XCB_IMAGE_ORDER_MSB_FIRST)
- x = 7 - x;
- return x;
-}
-
-/* GetPixel/PutPixel */
-
-/* XXX this is the most hideously done cut-and-paste
- to below. Any bugs fixed there should be fixed here
- and vice versa. */
-void
-xcb_image_put_pixel (xcb_image_t *image,
- uint32_t x,
- uint32_t y,
- uint32_t pixel)
-{
- uint8_t *row;
-
- if (x > image->width || y > image->height)
- return;
- row = image->data + (y * image->stride);
- switch (effective_format(image->format, image->bpp)) {
- case XCB_IMAGE_FORMAT_XY_BITMAP:
- case XCB_IMAGE_FORMAT_XY_PIXMAP:
- /* block */ {
- int p;
- uint32_t plane_mask = image->plane_mask;
- uint8_t * plane = row;
- uint32_t byte = xy_image_byte(image, x);
- uint32_t bit = xy_image_bit(image,x);
- uint8_t mask = 1 << bit;
-
- for (p = image->bpp - 1; p >= 0; p--) {
- if ((plane_mask >> p) & 1) {
- uint8_t * bp = plane + byte;
- uint8_t this_bit = ((pixel >> p) & 1) << bit;
- *bp = (*bp & ~mask) | this_bit;
- }
- plane += image->stride * image->height;
- }
- }
- break;
- case XCB_IMAGE_FORMAT_Z_PIXMAP:
- switch (image->bpp) {
- uint32_t mask;
- case 4:
- mask = 0xf;
- pixel &= 0xf;
- if ((x & 1) ==
- (image->byte_order == XCB_IMAGE_ORDER_MSB_FIRST)) {
- pixel <<= 4;
- mask <<= 4;
- }
- row[x >> 1] = (row[x >> 1] & ~mask) | pixel;
- break;
- case 8:
- row[x] = pixel;
- break;
- case 16:
- switch (image->byte_order) {
- case XCB_IMAGE_ORDER_LSB_FIRST:
- row[x << 1] = pixel;
- row[(x << 1) + 1] = pixel >> 8;
- break;
- case XCB_IMAGE_ORDER_MSB_FIRST:
- row[x << 1] = pixel >> 8;
- row[(x << 1) + 1] = pixel;
- break;
- }
- break;
- case 24:
- switch (image->byte_order) {
- case XCB_IMAGE_ORDER_LSB_FIRST:
- row[x * 3] = pixel;
- row[x * 3 + 1] = pixel >> 8;
- row[x * 3 + 2] = pixel >> 16;
- break;
- case XCB_IMAGE_ORDER_MSB_FIRST:
- row[x * 3] = pixel >> 16;
- row[x * 3 + 1] = pixel >> 8;
- row[x * 3 + 2] = pixel;
- break;
- }
- break;
- case 32:
- switch (image->byte_order) {
- case XCB_IMAGE_ORDER_LSB_FIRST:
- row[x << 2] = pixel;
- row[(x << 2) + 1] = pixel >> 8;
- row[(x << 2) + 2] = pixel >> 16;
- row[(x << 2) + 3] = pixel >> 24;
- break;
- case XCB_IMAGE_ORDER_MSB_FIRST:
- row[x << 2] = pixel >> 24;
- row[(x << 2) + 1] = pixel >> 16;
- row[(x << 2) + 2] = pixel >> 8;
- row[(x << 2) + 3] = pixel;
- break;
- }
- break;
- default:
- assert(0);
- }
- break;
- default:
- assert(0);
- }
-}
-
-
-/* XXX this is the most hideously done cut-and-paste
- from above. Any bugs fixed there should be fixed here
- and vice versa. */
-uint32_t
-xcb_image_get_pixel (xcb_image_t *image,
- uint32_t x,
- uint32_t y)
-{
- uint32_t pixel = 0;
- uint8_t *row;
-
- assert(x < image->width && y < image->height);
- row = image->data + (y * image->stride);
- switch (effective_format(image->format, image->bpp)) {
- case XCB_IMAGE_FORMAT_XY_BITMAP:
- case XCB_IMAGE_FORMAT_XY_PIXMAP:
- /* block */ {
- int p;
- uint32_t plane_mask = image->plane_mask;
- uint8_t * plane = row;
- uint32_t byte = xy_image_byte(image, x);
- uint32_t bit = xy_image_bit(image,x);
-
- for (p = image->bpp - 1; p >= 0; p--) {
- pixel <<= 1;
- if ((plane_mask >> p) & 1) {
- uint8_t * bp = plane + byte;
- pixel |= (*bp >> bit) & 1;
- }
- plane += image->stride * image->height;
- }
- }
- return pixel;
- case XCB_IMAGE_FORMAT_Z_PIXMAP:
- switch (image->bpp) {
- case 4:
- if ((x & 1) == (image->byte_order == XCB_IMAGE_ORDER_MSB_FIRST))
- return row[x >> 1] >> 4;
- return row[x >> 1] & 0xf;
- case 8:
- return row[x];
- case 16:
- switch (image->byte_order) {
- case XCB_IMAGE_ORDER_LSB_FIRST:
- pixel = row[x << 1];
- pixel |= row[(x << 1) + 1] << 8;
- break;
- case XCB_IMAGE_ORDER_MSB_FIRST:
- pixel = row[x << 1] << 8;
- pixel |= row[(x << 1) + 1];
- break;
- }
- break;
- case 24:
- switch (image->byte_order) {
- case XCB_IMAGE_ORDER_LSB_FIRST:
- pixel = row[x * 3];
- pixel |= row[x * 3 + 1] << 8;
- pixel |= row[x * 3 + 2] << 16;
- break;
- case XCB_IMAGE_ORDER_MSB_FIRST:
- pixel = row[x * 3] << 16;
- pixel |= row[x * 3 + 1] << 8;
- pixel |= row[x * 3 + 2];
- break;
- }
- break;
- case 32:
- switch (image->byte_order) {
- case XCB_IMAGE_ORDER_LSB_FIRST:
- pixel = row[x << 2];
- pixel |= row[(x << 2) + 1] << 8;
- pixel |= row[(x << 2) + 2] << 16;
- pixel |= row[(x << 2) + 3] << 24;
- break;
- case XCB_IMAGE_ORDER_MSB_FIRST:
- pixel = row[x << 2] << 24;
- pixel |= row[(x << 2) + 1] << 16;
- pixel |= row[(x << 2) + 2] << 8;
- pixel |= row[(x << 2) + 3];
- break;
- }
- break;
- default:
- assert(0);
- }
- return pixel;
- default:
- assert(0);
- }
-}
-
-
-xcb_image_t *
-xcb_image_create_from_bitmap_data (uint8_t * data,
- uint32_t width,
- uint32_t height)
-{
- return xcb_image_create(width, height, XCB_IMAGE_FORMAT_XY_PIXMAP,
- 8, 1, 1, 8,
- XCB_IMAGE_ORDER_LSB_FIRST,
- XCB_IMAGE_ORDER_LSB_FIRST,
- 0, 0, data);
-}
-
-
-/*
- * (Adapted from libX11.)
- *
- * xcb_create_pixmap_from_bitmap_data: Routine to make a pixmap of
- * given depth from user supplied bitmap data.
- * D is any drawable on the same screen that the pixmap will be used in.
- * Data is a pointer to the bit data, and
- * width & height give the size in bits of the pixmap.
- *
- * The following format is assumed for data:
- *
- * format=XY (will use XYPixmap for depth 1 and XYBitmap for larger)
- * bit_order=LSBFirst
- * padding=8
- * bitmap_unit=8
- */
-xcb_pixmap_t
-xcb_create_pixmap_from_bitmap_data (xcb_connection_t * display,
- xcb_drawable_t d,
- uint8_t * data,
- uint32_t width,
- uint32_t height,
- uint32_t depth,
- uint32_t fg,
- uint32_t bg,
- xcb_gcontext_t * gcp)
-{
- xcb_pixmap_t pix;
- xcb_image_t * image;
- xcb_image_t * final_image;
- xcb_gcontext_t gc;
- uint32_t mask = 0;
- xcb_params_gc_t gcv;
-
- image = xcb_image_create_from_bitmap_data(data, width, height);
- if (!image)
- return 0;
- if (depth > 1)
- image->format = XCB_IMAGE_FORMAT_XY_BITMAP;
- final_image = xcb_image_native(display, image, 1);
- if (!final_image) {
- xcb_image_destroy(image);
- return 0;
- }
- pix = xcb_generate_id(display);
- xcb_create_pixmap(display, depth, pix, d, width, height);
- gc = xcb_generate_id(display);
- XCB_AUX_ADD_PARAM(&mask, &gcv, foreground, fg);
- XCB_AUX_ADD_PARAM(&mask, &gcv, background, bg);
- xcb_aux_create_gc(display, gc, pix, mask, &gcv);
- xcb_image_put(display, pix, gc, final_image, 0, 0, 0);
- if (final_image != image)
- xcb_image_destroy(final_image);
- xcb_image_destroy(image);
- if (gcp)
- *gcp = gc;
- else
- xcb_free_gc(display, gc);
- return pix;
-}
-
-
-/* Thanks to Keith Packard <keithp@keithp.com> for this code */
-static void
-swap_image(uint8_t * src,
- uint32_t src_stride,
- uint8_t * dst,
- uint32_t dst_stride,
- uint32_t height,
- uint32_t byteswap,
- int bitswap,
- int nibbleswap)
-{
- while (height--) {
- uint32_t s;
-
- for (s = 0; s < src_stride; s++) {
- uint8_t b;
- uint32_t d = s ^ byteswap;
-
- if (d > dst_stride)
- continue;
-
- b = src[s];
- if (bitswap)
- b = xcb_bit_reverse(b, 8);
- if (nibbleswap)
- b = (b << 4) | (b >> 4);
- dst[d] = b;
- }
- src += src_stride;
- dst += dst_stride;
- }
-}
-
-/* Which order are bytes in (low two bits), given
- * code which accesses an image one byte at a time
- */
-static uint32_t
-byte_order(xcb_image_t *i)
-{
- uint32_t flip = i->byte_order == XCB_IMAGE_ORDER_MSB_FIRST;
-
- switch (i->bpp) {
- default:
- case 8:
- return 0;
- case 16:
- return flip;
- case 32:
- return flip | (flip << 1);
- }
-}
-
-static uint32_t
-bit_order(xcb_image_t *i)
-{
- uint32_t flip = i->byte_order != i->bit_order;
-
- switch (i->unit) {
- default:
- case 8:
- return 0;
- case 16:
- return flip;
- case 32:
- return flip | (flip << 1);
- }
-}
-
-/* Convert from one byte order to another by flipping the
- * low two bits of the byte index along a scanline
- */
-static uint32_t
-conversion_byte_swap(xcb_image_t *src, xcb_image_t *dst)
-{
- xcb_image_format_t ef = effective_format(src->format, src->bpp);
-
- /* src_ef == dst_ef in all callers of this function */
- if (ef == XCB_IMAGE_FORMAT_XY_PIXMAP) {
- return bit_order(src) ^ bit_order(dst);
- } else {
- /* src_bpp == dst_bpp in all callers of this function */
- return byte_order(src) ^ byte_order(dst);
- }
-}
-
-xcb_image_t *
-xcb_image_convert (xcb_image_t * src,
- xcb_image_t * dst)
-{
- xcb_image_format_t ef = effective_format(src->format, src->bpp);
-
- /* Things will go horribly wrong here if a bad
- image is passed in, so we check some things
- up front just to be nice. */
- assert(image_format_valid(src));
- assert(image_format_valid(dst));
-
- /* images must be the same size
- * (yes, we could copy a sub-set)
- */
- if (src->width != dst->width ||
- src->height != dst->height)
- return 0;
-
- if (ef == effective_format(dst->format, dst->bpp) &&
- src->bpp == dst->bpp)
- {
- if (src->unit == dst->unit &&
- src->scanline_pad == dst->scanline_pad &&
- src->byte_order == dst->byte_order &&
- (ef == XCB_IMAGE_FORMAT_Z_PIXMAP ||
- src->bit_order == dst->bit_order)) {
- memcpy(dst->data, src->data, src->size);
- } else {
- int bitswap = 0;
- int nibbleswap = 0;
- uint32_t byteswap = conversion_byte_swap(src, dst);
- uint32_t height = src->height;;
-
- if (ef == XCB_IMAGE_FORMAT_Z_PIXMAP) {
- if (src->bpp == 4 && src->byte_order != dst->byte_order)
- nibbleswap = 1;
- } else {
- if (src->bit_order != dst->bit_order)
- bitswap = 1;
- height *= src->depth;
- }
- swap_image (src->data, src->stride, dst->data, dst->stride,
- height, byteswap, bitswap, nibbleswap);
- }
- }
- else
- {
- uint32_t x;
- uint32_t y;
- /* General case: Slow pixel copy. Should we optimize
- Z24<->Z32 copies of either endianness? */
- for (y = 0; y < src->height; y++) {
- for (x = 0; x < src->width; x++) {
- uint32_t pixel = xcb_image_get_pixel(src, x, y);
- xcb_image_put_pixel(dst, x, y, pixel);
- }
- }
- }
- return dst;
-}
-
-xcb_image_t *
-xcb_image_subimage(xcb_image_t * image,
- uint32_t x,
- uint32_t y,
- uint32_t width,
- uint32_t height,
- void * base,
- uint32_t bytes,
- uint8_t * data)
-{
- int i, j;
- xcb_image_t * result;
-
- if (x + width > image->width)
- return 0;
- if (y + height > image->height)
- return 0;
- result = xcb_image_create(width, height, image->format,
- image->scanline_pad, image->depth,
- image->bpp, image->unit, image->byte_order,
- image->bit_order,
- base, bytes, data);
- if (!result)
- return 0;
- /* XXX FIXME For now, lose on performance. Sorry. */
- for (j = 0; j < height; j++) {
- for (i = 0; i < width; i++) {
- uint32_t pixel = xcb_image_get_pixel(image, x + i, y + j);
- xcb_image_put_pixel(result, i, j, pixel);
- }
- }
- return result;
-}
diff --git a/src/3rdparty/xcb/xcb-util-keysyms/keysyms.c b/src/3rdparty/xcb/xcb-util-keysyms/keysyms.c
deleted file mode 100644
index 7584cccf39..0000000000
--- a/src/3rdparty/xcb/xcb-util-keysyms/keysyms.c
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * Copyright © 2008 Ian Osgood <iano@quirkster.com>
- * Copyright © 2008 Jamey Sharp <jamey@minilop.net>
- * Copyright © 2008 Josh Triplett <josh@freedesktop.org>
- * Copyright © 2008 Ulrich Eckhardt <doomster@knuut.de>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or
- * their institutions shall not be used in advertising or otherwise to
- * promote the sale, use or other dealings in this Software without
- * prior written authorization from the authors.
- */
-
-#include <stdlib.h>
-
-#include <xcb/xcb.h>
-#define XK_MISCELLANY
-#define XK_XKB_KEYS
-#define XK_LATIN1
-#define XK_LATIN2
-#define XK_LATIN3
-#define XK_LATIN4
-#define XK_CYRILLIC
-#define XK_GREEK
-#define XK_ARMENIAN
-#include <X11/keysymdef.h>
-
-#include "xcb_keysyms.h"
-
-/* Private declaration */
-enum tag_t {
- TAG_COOKIE,
- TAG_VALUE
-};
-
-struct _XCBKeySymbols
-{
- xcb_connection_t *c;
- enum tag_t tag;
- union {
- xcb_get_keyboard_mapping_cookie_t cookie;
- xcb_get_keyboard_mapping_reply_t *reply;
- } u;
-};
-
-static void xcb_convert_case(xcb_keysym_t sym,
- xcb_keysym_t *lower,
- xcb_keysym_t *upper);
-
-static void xcb_key_symbols_get_reply (xcb_key_symbols_t *syms,
- xcb_generic_error_t **e);
-
-/* public implementation */
-
-xcb_key_symbols_t *
-xcb_key_symbols_alloc (xcb_connection_t *c)
-{
- xcb_key_symbols_t *syms;
- xcb_keycode_t min_keycode;
- xcb_keycode_t max_keycode;
-
- if (!c)
- return NULL;
-
- syms = malloc (sizeof (xcb_key_symbols_t));
- if (!syms)
- return NULL;
-
- syms->c = c;
- syms->tag = TAG_COOKIE;
-
- min_keycode = xcb_get_setup (c)->min_keycode;
- max_keycode = xcb_get_setup (c)->max_keycode;
-
- syms->u.cookie = xcb_get_keyboard_mapping(c,
- min_keycode,
- max_keycode - min_keycode + 1);
-
- return syms;
-}
-
-void
-xcb_key_symbols_free (xcb_key_symbols_t *syms)
-{
- if (syms)
- {
- if (syms->tag == TAG_VALUE)
- free (syms->u.reply);
- free (syms);
- syms = NULL;
- }
-}
-
-/* Use of the 'col' parameter:
-
-A list of KeySyms is associated with each KeyCode. The list is intended
-to convey the set of symbols on the corresponding key. If the list
-(ignoring trailing NoSymbol entries) is a single KeySym ``K'', then the
-list is treated as if it were the list ``K NoSymbol K NoSymbol''. If the
-list (ignoring trailing NoSymbol entries) is a pair of KeySyms ``K1
-K2'', then the list is treated as if it were the list ``K1 K2 K1 K2''.
-If the list (ignoring trailing NoSymbol entries) is a triple of KeySyms
-``K1 K2 K3'', then the list is treated as if it were the list ``K1 K2 K3
-NoSymbol''. When an explicit ``void'' element is desired in the list,
-the value VoidSymbol can be used.
-
-The first four elements of the list are split into two groups of
-KeySyms. Group 1 contains the first and second KeySyms; Group 2 contains
-the third and fourth KeySyms. Within each group, if the second element
-of the group is NoSymbol , then the group should be treated as if the
-second element were the same as the first element, except when the first
-element is an alphabetic KeySym ``K'' for which both lowercase and
-uppercase forms are defined. In that case, the group should be treated
-as if the first element were the lowercase form of ``K'' and the second
-element were the uppercase form of ``K.''
-
-The standard rules for obtaining a KeySym from a KeyPress event make use
-of only the Group 1 and Group 2 KeySyms; no interpretation of other
-KeySyms in the list is given. Which group to use is determined by the
-modifier state. Switching between groups is controlled by the KeySym
-named MODE SWITCH, by attaching that KeySym to some KeyCode and
-attaching that KeyCode to any one of the modifiers Mod1 through Mod5.
-This modifier is called the group modifier. For any KeyCode, Group 1 is
-used when the group modifier is off, and Group 2 is used when the group
-modifier is on.
-
-The Lock modifier is interpreted as CapsLock when the KeySym named
-XK_Caps_Lock is attached to some KeyCode and that KeyCode is attached to
-the Lock modifier. The Lock modifier is interpreted as ShiftLock when
-the KeySym named XK_Shift_Lock is attached to some KeyCode and that
-KeyCode is attached to the Lock modifier. If the Lock modifier could be
-interpreted as both CapsLock and ShiftLock, the CapsLock interpretation
-is used.
-
-The operation of keypad keys is controlled by the KeySym named
-XK_Num_Lock, by attaching that KeySym to some KeyCode and attaching that
-KeyCode to any one of the modifiers Mod1 through Mod5 . This modifier is
-called the numlock modifier. The standard KeySyms with the prefix
-``XK_KP_'' in their name are called keypad KeySyms; these are KeySyms
-with numeric value in the hexadecimal range 0xFF80 to 0xFFBD inclusive.
-In addition, vendor-specific KeySyms in the hexadecimal range 0x11000000
-to 0x1100FFFF are also keypad KeySyms.
-
-Within a group, the choice of KeySym is determined by applying the first
-rule that is satisfied from the following list:
-
-* The numlock modifier is on and the second KeySym is a keypad KeySym. In
- this case, if the Shift modifier is on, or if the Lock modifier is on
- and is interpreted as ShiftLock, then the first KeySym is used,
- otherwise the second KeySym is used.
-
-* The Shift and Lock modifiers are both off. In this case, the first
- KeySym is used.
-
-* The Shift modifier is off, and the Lock modifier is on and is
- interpreted as CapsLock. In this case, the first KeySym is used, but
- if that KeySym is lowercase alphabetic, then the corresponding
- uppercase KeySym is used instead.
-
-* The Shift modifier is on, and the Lock modifier is on and is
- interpreted as CapsLock. In this case, the second KeySym is used, but
- if that KeySym is lowercase alphabetic, then the corresponding
- uppercase KeySym is used instead.
-
-* The Shift modifier is on, or the Lock modifier is on and is
- interpreted as ShiftLock, or both. In this case, the second KeySym is
- used.
-
-*/
-
-xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms,
- xcb_keycode_t keycode,
- int col)
-{
- xcb_keysym_t *keysyms;
- xcb_keysym_t keysym_null = { XCB_NO_SYMBOL };
- xcb_keysym_t lsym;
- xcb_keysym_t usym;
- xcb_keycode_t min_keycode;
- xcb_keycode_t max_keycode;
- int per;
-
- if (!syms)
- return keysym_null;
-
- xcb_key_symbols_get_reply (syms, NULL);
-
- keysyms = xcb_get_keyboard_mapping_keysyms (syms->u.reply);
- min_keycode = xcb_get_setup (syms->c)->min_keycode;
- max_keycode = xcb_get_setup (syms->c)->max_keycode;
-
- per = syms->u.reply->keysyms_per_keycode;
- if ((col < 0) || ((col >= per) && (col > 3)) ||
- (keycode < min_keycode) ||
- (keycode > max_keycode))
- return keysym_null;
-
- keysyms = &keysyms[(keycode - min_keycode) * per];
- if (col < 4)
- {
- if (col > 1)
- {
- while ((per > 2) && (keysyms[per - 1] == XCB_NO_SYMBOL))
- per--;
- if (per < 3)
- col -= 2;
- }
- if ((per <= (col|1)) || (keysyms[col|1] == XCB_NO_SYMBOL))
- {
- xcb_convert_case(keysyms[col&~1], &lsym, &usym);
- if (!(col & 1))
- return lsym;
- else if (usym == lsym)
- return keysym_null;
- else
- return usym;
- }
- }
- return keysyms[col];
-}
-
-xcb_keycode_t *
-xcb_key_symbols_get_keycode(xcb_key_symbols_t *syms,
- xcb_keysym_t keysym)
-{
- xcb_keysym_t ks;
- int j, nresult = 0;
- xcb_keycode_t i, min, max, *result = NULL, *result_np = NULL;
-
- if(syms)
- {
- xcb_key_symbols_get_reply (syms, NULL);
- min = xcb_get_setup(syms->c)->min_keycode;
- max = xcb_get_setup(syms->c)->max_keycode;
-
- for(j = 0; j < syms->u.reply->keysyms_per_keycode; j++)
- for(i = min; i && i <= max; i++)
- {
- ks = xcb_key_symbols_get_keysym(syms, i, j);
- if(ks == keysym)
- {
- nresult++;
- result_np = realloc(result,
- sizeof(xcb_keycode_t) * (nresult + 1));
-
- if(result_np == NULL)
- {
- free(result);
- return NULL;
- }
-
- result = result_np;
- result[nresult - 1] = i;
- result[nresult] = XCB_NO_SYMBOL;
- }
- }
- }
-
- return result;
-}
-
-xcb_keysym_t
-xcb_key_press_lookup_keysym (xcb_key_symbols_t *syms,
- xcb_key_press_event_t *event,
- int col)
-{
- return xcb_key_symbols_get_keysym (syms, event->detail, col);
-}
-
-xcb_keysym_t
-xcb_key_release_lookup_keysym (xcb_key_symbols_t *syms,
- xcb_key_release_event_t *event,
- int col)
-{
- return xcb_key_symbols_get_keysym (syms, event->detail, col);
-}
-
-int
-xcb_refresh_keyboard_mapping (xcb_key_symbols_t *syms,
- xcb_mapping_notify_event_t *event)
-{
- if (event->request == XCB_MAPPING_KEYBOARD && syms) {
- if (syms->tag == TAG_VALUE) {
- xcb_keycode_t min_keycode;
- xcb_keycode_t max_keycode;
-
- if (syms->u.reply) {
- free (syms->u.reply);
- syms->u.reply = NULL;
- }
- syms->tag = TAG_COOKIE;
- min_keycode = xcb_get_setup (syms->c)->min_keycode;
- max_keycode = xcb_get_setup (syms->c)->max_keycode;
-
- syms->u.cookie = xcb_get_keyboard_mapping(syms->c,
- min_keycode,
- max_keycode - min_keycode + 1);
-
- }
- return 1;
- }
- return 0;
-}
-
-
-/* Tests for classes of symbols */
-
-int
-xcb_is_keypad_key (xcb_keysym_t keysym)
-{
- return ((keysym >= XK_KP_Space) && (keysym <= XK_KP_Equal));
-}
-
-int
-xcb_is_private_keypad_key (xcb_keysym_t keysym)
-{
- return ((keysym >= 0x11000000) && (keysym <= 0x1100FFFF));
-}
-
-int
-xcb_is_cursor_key (xcb_keysym_t keysym)
-{
- return ((keysym >= XK_Home) && (keysym <= XK_Select));
-}
-
-int
-xcb_is_pf_key (xcb_keysym_t keysym)
-{
- return ((keysym >= XK_KP_F1) && (keysym <= XK_KP_F4));
-}
-
-int
-xcb_is_function_key (xcb_keysym_t keysym)
-{
- return ((keysym >= XK_F1) && (keysym <= XK_F35));
-}
-
-int
-xcb_is_misc_function_key (xcb_keysym_t keysym)
-{
- return ((keysym >= XK_Select) && (keysym <= XK_Break));
-}
-
-int
-xcb_is_modifier_key (xcb_keysym_t keysym)
-{
- return (((keysym >= XK_Shift_L) && (keysym <= XK_Hyper_R)) ||
- ((keysym >= XK_ISO_Lock) && (keysym <= XK_ISO_Level5_Lock)) ||
- (keysym == XK_Mode_switch) ||
- (keysym == XK_Num_Lock));
-}
-
-/* private functions */
-
-void
-xcb_convert_case(xcb_keysym_t sym,
- xcb_keysym_t *lower,
- xcb_keysym_t *upper)
-{
- *lower = sym;
- *upper = sym;
-
- switch(sym >> 8)
- {
- case 0: /* Latin 1 */
- if ((sym >= XK_A) && (sym <= XK_Z))
- *lower += (XK_a - XK_A);
- else if ((sym >= XK_a) && (sym <= XK_z))
- *upper -= (XK_a - XK_A);
- else if ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis))
- *lower += (XK_agrave - XK_Agrave);
- else if ((sym >= XK_agrave) && (sym <= XK_odiaeresis))
- *upper -= (XK_agrave - XK_Agrave);
- else if ((sym >= XK_Ooblique) && (sym <= XK_Thorn))
- *lower += (XK_oslash - XK_Ooblique);
- else if ((sym >= XK_oslash) && (sym <= XK_thorn))
- *upper -= (XK_oslash - XK_Ooblique);
- break;
- case 1: /* Latin 2 */
- /* Assume the KeySym is a legal value (ignore discontinuities) */
- if (sym == XK_Aogonek)
- *lower = XK_aogonek;
- else if (sym >= XK_Lstroke && sym <= XK_Sacute)
- *lower += (XK_lstroke - XK_Lstroke);
- else if (sym >= XK_Scaron && sym <= XK_Zacute)
- *lower += (XK_scaron - XK_Scaron);
- else if (sym >= XK_Zcaron && sym <= XK_Zabovedot)
- *lower += (XK_zcaron - XK_Zcaron);
- else if (sym == XK_aogonek)
- *upper = XK_Aogonek;
- else if (sym >= XK_lstroke && sym <= XK_sacute)
- *upper -= (XK_lstroke - XK_Lstroke);
- else if (sym >= XK_scaron && sym <= XK_zacute)
- *upper -= (XK_scaron - XK_Scaron);
- else if (sym >= XK_zcaron && sym <= XK_zabovedot)
- *upper -= (XK_zcaron - XK_Zcaron);
- else if (sym >= XK_Racute && sym <= XK_Tcedilla)
- *lower += (XK_racute - XK_Racute);
- else if (sym >= XK_racute && sym <= XK_tcedilla)
- *upper -= (XK_racute - XK_Racute);
- break;
- case 2: /* Latin 3 */
- /* Assume the KeySym is a legal value (ignore discontinuities) */
- if (sym >= XK_Hstroke && sym <= XK_Hcircumflex)
- *lower += (XK_hstroke - XK_Hstroke);
- else if (sym >= XK_Gbreve && sym <= XK_Jcircumflex)
- *lower += (XK_gbreve - XK_Gbreve);
- else if (sym >= XK_hstroke && sym <= XK_hcircumflex)
- *upper -= (XK_hstroke - XK_Hstroke);
- else if (sym >= XK_gbreve && sym <= XK_jcircumflex)
- *upper -= (XK_gbreve - XK_Gbreve);
- else if (sym >= XK_Cabovedot && sym <= XK_Scircumflex)
- *lower += (XK_cabovedot - XK_Cabovedot);
- else if (sym >= XK_cabovedot && sym <= XK_scircumflex)
- *upper -= (XK_cabovedot - XK_Cabovedot);
- break;
- case 3: /* Latin 4 */
- /* Assume the KeySym is a legal value (ignore discontinuities) */
- if (sym >= XK_Rcedilla && sym <= XK_Tslash)
- *lower += (XK_rcedilla - XK_Rcedilla);
- else if (sym >= XK_rcedilla && sym <= XK_tslash)
- *upper -= (XK_rcedilla - XK_Rcedilla);
- else if (sym == XK_ENG)
- *lower = XK_eng;
- else if (sym == XK_eng)
- *upper = XK_ENG;
- else if (sym >= XK_Amacron && sym <= XK_Umacron)
- *lower += (XK_amacron - XK_Amacron);
- else if (sym >= XK_amacron && sym <= XK_umacron)
- *upper -= (XK_amacron - XK_Amacron);
- break;
- case 6: /* Cyrillic */
- /* Assume the KeySym is a legal value (ignore discontinuities) */
- if (sym >= XK_Serbian_DJE && sym <= XK_Serbian_DZE)
- *lower -= (XK_Serbian_DJE - XK_Serbian_dje);
- else if (sym >= XK_Serbian_dje && sym <= XK_Serbian_dze)
- *upper += (XK_Serbian_DJE - XK_Serbian_dje);
- else if (sym >= XK_Cyrillic_YU && sym <= XK_Cyrillic_HARDSIGN)
- *lower -= (XK_Cyrillic_YU - XK_Cyrillic_yu);
- else if (sym >= XK_Cyrillic_yu && sym <= XK_Cyrillic_hardsign)
- *upper += (XK_Cyrillic_YU - XK_Cyrillic_yu);
- break;
- case 7: /* Greek */
- /* Assume the KeySym is a legal value (ignore discontinuities) */
- if (sym >= XK_Greek_ALPHAaccent && sym <= XK_Greek_OMEGAaccent)
- *lower += (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent);
- else if (sym >= XK_Greek_alphaaccent && sym <= XK_Greek_omegaaccent &&
- sym != XK_Greek_iotaaccentdieresis &&
- sym != XK_Greek_upsilonaccentdieresis)
- *upper -= (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent);
- else if (sym >= XK_Greek_ALPHA && sym <= XK_Greek_OMEGA)
- *lower += (XK_Greek_alpha - XK_Greek_ALPHA);
- else if (sym >= XK_Greek_alpha && sym <= XK_Greek_omega &&
- sym != XK_Greek_finalsmallsigma)
- *upper -= (XK_Greek_alpha - XK_Greek_ALPHA);
- break;
- case 0x14: /* Armenian */
- if (sym >= XK_Armenian_AYB && sym <= XK_Armenian_fe) {
- *lower = sym | 1;
- *upper = sym & ~1;
- }
- break;
- }
-}
-
-void
-xcb_key_symbols_get_reply (xcb_key_symbols_t *syms,
- xcb_generic_error_t **e)
-{
- if (!syms)
- return;
-
- if (syms->tag == TAG_COOKIE)
- {
- syms->tag = TAG_VALUE;
- syms->u.reply = xcb_get_keyboard_mapping_reply(syms->c,
- syms->u.cookie,
- e);
- }
-}
diff --git a/src/3rdparty/xcb/xcb-util-renderutil/util.c b/src/3rdparty/xcb/xcb-util-renderutil/util.c
deleted file mode 100644
index 7666c433dd..0000000000
--- a/src/3rdparty/xcb/xcb-util-renderutil/util.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/* Copyright © 2000 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "xcb_renderutil.h"
-
-xcb_render_pictvisual_t *
-xcb_render_util_find_visual_format (const xcb_render_query_pict_formats_reply_t *formats,
- const xcb_visualid_t visual)
-{
- xcb_render_pictscreen_iterator_t screens;
- xcb_render_pictdepth_iterator_t depths;
- xcb_render_pictvisual_iterator_t visuals;
- if (!formats)
- return 0;
- for (screens = xcb_render_query_pict_formats_screens_iterator(formats); screens.rem; xcb_render_pictscreen_next(&screens))
- for (depths = xcb_render_pictscreen_depths_iterator(screens.data); depths.rem; xcb_render_pictdepth_next(&depths))
- for (visuals = xcb_render_pictdepth_visuals_iterator(depths.data); visuals.rem; xcb_render_pictvisual_next(&visuals))
- if (visuals.data->visual == visual)
- return visuals.data;
- return 0;
-}
-
-xcb_render_pictforminfo_t *
-xcb_render_util_find_format (const xcb_render_query_pict_formats_reply_t *formats,
- unsigned long mask,
- const xcb_render_pictforminfo_t *ptemplate,
- int count)
-{
- xcb_render_pictforminfo_iterator_t i;
- if (!formats)
- return 0;
- for (i = xcb_render_query_pict_formats_formats_iterator(formats); i.rem; xcb_render_pictforminfo_next(&i))
- {
- if (mask & XCB_PICT_FORMAT_ID)
- if (ptemplate->id != i.data->id)
- continue;
- if (mask & XCB_PICT_FORMAT_TYPE)
- if (ptemplate->type != i.data->type)
- continue;
- if (mask & XCB_PICT_FORMAT_DEPTH)
- if (ptemplate->depth != i.data->depth)
- continue;
- if (mask & XCB_PICT_FORMAT_RED)
- if (ptemplate->direct.red_shift != i.data->direct.red_shift)
- continue;
- if (mask & XCB_PICT_FORMAT_RED_MASK)
- if (ptemplate->direct.red_mask != i.data->direct.red_mask)
- continue;
- if (mask & XCB_PICT_FORMAT_GREEN)
- if (ptemplate->direct.green_shift != i.data->direct.green_shift)
- continue;
- if (mask & XCB_PICT_FORMAT_GREEN_MASK)
- if (ptemplate->direct.green_mask != i.data->direct.green_mask)
- continue;
- if (mask & XCB_PICT_FORMAT_BLUE)
- if (ptemplate->direct.blue_shift != i.data->direct.blue_shift)
- continue;
- if (mask & XCB_PICT_FORMAT_BLUE_MASK)
- if (ptemplate->direct.blue_mask != i.data->direct.blue_mask)
- continue;
- if (mask & XCB_PICT_FORMAT_ALPHA)
- if (ptemplate->direct.alpha_shift != i.data->direct.alpha_shift)
- continue;
- if (mask & XCB_PICT_FORMAT_ALPHA_MASK)
- if (ptemplate->direct.alpha_mask != i.data->direct.alpha_mask)
- continue;
- if (mask & XCB_PICT_FORMAT_COLORMAP)
- if (ptemplate->colormap != i.data->colormap)
- continue;
- if (count-- == 0)
- return i.data;
- }
- return 0;
-}
-
-xcb_render_pictforminfo_t *
-xcb_render_util_find_standard_format (const xcb_render_query_pict_formats_reply_t *formats,
- xcb_pict_standard_t format)
-{
- static const struct {
- xcb_render_pictforminfo_t templ;
- unsigned long mask;
- } standardFormats[] = {
- /* XCB_PICT_STANDARD_ARGB_32 */
- {
- {
- 0, /* id */
- XCB_RENDER_PICT_TYPE_DIRECT, /* type */
- 32, /* depth */
- { 0 }, /* pad */
- { /* direct */
- 16, /* direct.red */
- 0xff, /* direct.red_mask */
- 8, /* direct.green */
- 0xff, /* direct.green_mask */
- 0, /* direct.blue */
- 0xff, /* direct.blue_mask */
- 24, /* direct.alpha */
- 0xff, /* direct.alpha_mask */
- },
- 0, /* colormap */
- },
- XCB_PICT_FORMAT_TYPE |
- XCB_PICT_FORMAT_DEPTH |
- XCB_PICT_FORMAT_RED |
- XCB_PICT_FORMAT_RED_MASK |
- XCB_PICT_FORMAT_GREEN |
- XCB_PICT_FORMAT_GREEN_MASK |
- XCB_PICT_FORMAT_BLUE |
- XCB_PICT_FORMAT_BLUE_MASK |
- XCB_PICT_FORMAT_ALPHA |
- XCB_PICT_FORMAT_ALPHA_MASK,
- },
- /* XCB_PICT_STANDARD_RGB_24 */
- {
- {
- 0, /* id */
- XCB_RENDER_PICT_TYPE_DIRECT, /* type */
- 24, /* depth */
- { 0 }, /* pad */
- { /* direct */
- 16, /* direct.red */
- 0xff, /* direct.red_MASK */
- 8, /* direct.green */
- 0xff, /* direct.green_MASK */
- 0, /* direct.blue */
- 0xff, /* direct.blue_MASK */
- 0, /* direct.alpha */
- 0x00, /* direct.alpha_MASK */
- },
- 0, /* colormap */
- },
- XCB_PICT_FORMAT_TYPE |
- XCB_PICT_FORMAT_DEPTH |
- XCB_PICT_FORMAT_RED |
- XCB_PICT_FORMAT_RED_MASK |
- XCB_PICT_FORMAT_GREEN |
- XCB_PICT_FORMAT_GREEN_MASK |
- XCB_PICT_FORMAT_BLUE |
- XCB_PICT_FORMAT_BLUE_MASK |
- XCB_PICT_FORMAT_ALPHA_MASK,
- },
- /* XCB_PICT_STANDARD_A_8 */
- {
- {
- 0, /* id */
- XCB_RENDER_PICT_TYPE_DIRECT, /* type */
- 8, /* depth */
- { 0 }, /* pad */
- { /* direct */
- 0, /* direct.red */
- 0x00, /* direct.red_MASK */
- 0, /* direct.green */
- 0x00, /* direct.green_MASK */
- 0, /* direct.blue */
- 0x00, /* direct.blue_MASK */
- 0, /* direct.alpha */
- 0xff, /* direct.alpha_MASK */
- },
- 0, /* colormap */
- },
- XCB_PICT_FORMAT_TYPE |
- XCB_PICT_FORMAT_DEPTH |
- XCB_PICT_FORMAT_RED_MASK |
- XCB_PICT_FORMAT_GREEN_MASK |
- XCB_PICT_FORMAT_BLUE_MASK |
- XCB_PICT_FORMAT_ALPHA |
- XCB_PICT_FORMAT_ALPHA_MASK,
- },
- /* XCB_PICT_STANDARD_A_4 */
- {
- {
- 0, /* id */
- XCB_RENDER_PICT_TYPE_DIRECT, /* type */
- 4, /* depth */
- { 0 }, /* pad */
- { /* direct */
- 0, /* direct.red */
- 0x00, /* direct.red_MASK */
- 0, /* direct.green */
- 0x00, /* direct.green_MASK */
- 0, /* direct.blue */
- 0x00, /* direct.blue_MASK */
- 0, /* direct.alpha */
- 0x0f, /* direct.alpha_MASK */
- },
- 0, /* colormap */
- },
- XCB_PICT_FORMAT_TYPE |
- XCB_PICT_FORMAT_DEPTH |
- XCB_PICT_FORMAT_RED_MASK |
- XCB_PICT_FORMAT_GREEN_MASK |
- XCB_PICT_FORMAT_BLUE_MASK |
- XCB_PICT_FORMAT_ALPHA |
- XCB_PICT_FORMAT_ALPHA_MASK,
- },
- /* XCB_PICT_STANDARD_A_1 */
- {
- {
- 0, /* id */
- XCB_RENDER_PICT_TYPE_DIRECT, /* type */
- 1, /* depth */
- { 0 }, /* pad */
- { /* direct */
- 0, /* direct.red */
- 0x00, /* direct.red_MASK */
- 0, /* direct.green */
- 0x00, /* direct.green_MASK */
- 0, /* direct.blue */
- 0x00, /* direct.blue_MASK */
- 0, /* direct.alpha */
- 0x01, /* direct.alpha_MASK */
- },
- 0, /* colormap */
- },
- XCB_PICT_FORMAT_TYPE |
- XCB_PICT_FORMAT_DEPTH |
- XCB_PICT_FORMAT_RED_MASK |
- XCB_PICT_FORMAT_GREEN_MASK |
- XCB_PICT_FORMAT_BLUE_MASK |
- XCB_PICT_FORMAT_ALPHA |
- XCB_PICT_FORMAT_ALPHA_MASK,
- },
- };
-
- if (format < 0 || format >= sizeof(standardFormats) / sizeof(*standardFormats))
- return 0;
-
- return xcb_render_util_find_format (formats,
- standardFormats[format].mask,
- &standardFormats[format].templ,
- 0);
-}
diff --git a/src/3rdparty/xcb/xcb-util-wm/icccm.c b/src/3rdparty/xcb/xcb-util-wm/icccm.c
deleted file mode 100644
index ed623d08d1..0000000000
--- a/src/3rdparty/xcb/xcb-util-wm/icccm.c
+++ /dev/null
@@ -1,845 +0,0 @@
-/*
- * Copyright © 2008 Arnaud Fontaine <arnau@debian.org>
- * Copyright © 2007-2008 Vincent Torri <vtorri@univ-evry.fr>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or
- * their institutions shall not be used in advertising or otherwise to
- * promote the sale, use or other dealings in this Software without
- * prior written authorization from the authors.
- */
-
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-
-#include <xcb/xcb.h>
-
-#include "xcb_icccm.h"
-
-xcb_get_property_cookie_t
-xcb_icccm_get_text_property(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property)
-{
- return xcb_get_property(c, 0, window, property, XCB_GET_PROPERTY_TYPE_ANY, 0, UINT_MAX);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_text_property_unchecked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t property)
-{
- return xcb_get_property_unchecked(c, 0, window, property, XCB_GET_PROPERTY_TYPE_ANY, 0, UINT_MAX);
-}
-
-uint8_t
-xcb_icccm_get_text_property_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_text_property_reply_t *prop,
- xcb_generic_error_t **e)
-{
- xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
-
- if(!reply || reply->type == XCB_NONE) {
- free(reply);
- return 0;
- }
-
- prop->_reply = reply;
- prop->encoding = prop->_reply->type;
- prop->format = prop->_reply->format;
- prop->name_len = xcb_get_property_value_length(prop->_reply);
- prop->name = xcb_get_property_value(prop->_reply);
-
- return 1;
-}
-
-void
-xcb_icccm_get_text_property_reply_wipe(xcb_icccm_get_text_property_reply_t *prop)
-{
- free(prop->_reply);
-}
-
-/* WM_NAME */
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_name_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint8_t format,
- uint32_t name_len, const char *name)
-{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_NAME, encoding, format,
- name_len, name);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_name(xcb_connection_t *c, xcb_window_t window, xcb_atom_t encoding,
- uint8_t format, uint32_t name_len, const char *name)
-{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_NAME, encoding, format, name_len,
- name);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_name(xcb_connection_t *c,
- xcb_window_t window)
-{
- return xcb_icccm_get_text_property(c, window, XCB_ATOM_WM_NAME);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_name_unchecked(xcb_connection_t *c,
- xcb_window_t window)
-{
- return xcb_icccm_get_text_property_unchecked(c, window, XCB_ATOM_WM_NAME);
-}
-
-uint8_t
-xcb_icccm_get_wm_name_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_text_property_reply_t *prop,
- xcb_generic_error_t **e)
-{
- return xcb_icccm_get_text_property_reply(c, cookie, prop, e);
-}
-
-/* WM_ICON_NAME */
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_icon_name_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint8_t format,
- uint32_t name_len, const char *name)
-{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_ICON_NAME, encoding, format,
- name_len, name);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_icon_name(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint8_t format, uint32_t name_len,
- const char *name)
-{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_ICON_NAME, encoding, format,
- name_len, name);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_icon_name(xcb_connection_t *c,
- xcb_window_t window)
-{
- return xcb_icccm_get_text_property(c, window, XCB_ATOM_WM_ICON_NAME);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_icon_name_unchecked(xcb_connection_t *c,
- xcb_window_t window)
-{
- return xcb_icccm_get_text_property_unchecked(c, window, XCB_ATOM_WM_ICON_NAME);
-}
-
-uint8_t
-xcb_icccm_get_wm_icon_name_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_text_property_reply_t *prop,
- xcb_generic_error_t **e)
-{
- return xcb_icccm_get_text_property_reply(c, cookie, prop, e);
-}
-
-/* WM_COLORMAP_WINDOWS */
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_colormap_windows_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_colormap_windows_atom,
- uint32_t list_len,
- const xcb_window_t *list)
-{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
- wm_colormap_windows_atom, XCB_ATOM_WINDOW,
- 32, list_len, list);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_colormap_windows(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_colormap_windows_atom,
- uint32_t list_len,
- const xcb_atom_t *list)
-{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
- wm_colormap_windows_atom, XCB_ATOM_WINDOW, 32,
- list_len, list);
-}
-
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_colormap_windows(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_colormap_windows_atom )
-{
- return xcb_get_property(c, 0, window, wm_colormap_windows_atom,
- XCB_ATOM_WINDOW, 0, UINT_MAX);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_colormap_windows_unchecked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_colormap_windows_atom)
-{
- return xcb_get_property_unchecked(c, 0, window, wm_colormap_windows_atom,
- XCB_ATOM_WINDOW, 0, UINT_MAX);
-}
-
-uint8_t
-xcb_icccm_get_wm_colormap_windows_from_reply(xcb_get_property_reply_t *reply,
- xcb_icccm_get_wm_colormap_windows_reply_t *colormap_windows)
-{
- if(!reply || reply->type != XCB_ATOM_WINDOW || reply->format != 32)
- return 0;
-
- colormap_windows->_reply = reply;
- colormap_windows->windows_len = xcb_get_property_value_length(colormap_windows->_reply) / (reply->format / 8);
- colormap_windows->windows = (xcb_window_t *) xcb_get_property_value(colormap_windows->_reply);
-
- return 1;
-}
-
-uint8_t
-xcb_icccm_get_wm_colormap_windows_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_wm_colormap_windows_reply_t *colormap_windows,
- xcb_generic_error_t **e)
-{
- xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
- uint8_t ret = xcb_icccm_get_wm_colormap_windows_from_reply(reply, colormap_windows);
- if(!ret)
- free(reply);
- return ret;
-}
-
-void
-xcb_icccm_get_wm_colormap_windows_reply_wipe(xcb_icccm_get_wm_colormap_windows_reply_t *colormap_windows)
-{
- free(colormap_windows->_reply);
-}
-
-/* WM_CLIENT_MACHINE */
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_client_machine_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint8_t format,
- uint32_t name_len, const char *name)
-{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_CLIENT_MACHINE, encoding,
- format, name_len, name);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_client_machine(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint8_t format,
- uint32_t name_len, const char *name)
-{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_CLIENT_MACHINE, encoding, format,
- name_len, name);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_client_machine(xcb_connection_t *c,
- xcb_window_t window)
-{
- return xcb_icccm_get_text_property(c, window, XCB_ATOM_WM_CLIENT_MACHINE);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_client_machine_unchecked(xcb_connection_t *c,
- xcb_window_t window)
-{
- return xcb_icccm_get_text_property_unchecked(c, window, XCB_ATOM_WM_CLIENT_MACHINE);
-}
-
-uint8_t
-xcb_icccm_get_wm_client_machine_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_text_property_reply_t *prop,
- xcb_generic_error_t **e)
-{
- return xcb_icccm_get_text_property_reply(c, cookie, prop, e);
-}
-
-/* WM_CLASS */
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_class_checked(xcb_connection_t *c,
- xcb_window_t window,
- uint32_t class_len,
- const char *class)
-{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8,
- class_len, class);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_class(xcb_connection_t *c,
- xcb_window_t window,
- uint32_t class_len,
- const char *class)
-{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8,
- class_len, class);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_class(xcb_connection_t *c, xcb_window_t window)
-{
- return xcb_get_property(c, 0, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 0L, 2048L);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_class_unchecked(xcb_connection_t *c, xcb_window_t window)
-{
- return xcb_get_property_unchecked(c, 0, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 0L, 2048L);
-}
-
-uint8_t
-xcb_icccm_get_wm_class_from_reply(xcb_icccm_get_wm_class_reply_t *prop,
- xcb_get_property_reply_t *reply)
-{
- if(!reply || reply->type != XCB_ATOM_STRING || reply->format != 8)
- return 0;
-
- prop->_reply = reply;
- prop->instance_name = (char *) xcb_get_property_value(prop->_reply);
-
- int len = xcb_get_property_value_length(prop->_reply);
- /* Ensure there's a C end-of-string at the end of the property.
- Truncate the property if necessary (the spec says there's already
- a 0 in the last position, so this only hurts invalid props). */
- if(len < reply->length * 4)
- prop->instance_name[len] = 0;
- else
- prop->instance_name[len-1] = 0;
-
- int name_len = strlen(prop->instance_name);
- if(name_len == len)
- name_len--;
-
- prop->class_name = prop->instance_name + name_len + 1;
-
- return 1;
-}
-
-uint8_t
-xcb_icccm_get_wm_class_reply(xcb_connection_t *c, xcb_get_property_cookie_t cookie,
- xcb_icccm_get_wm_class_reply_t *prop, xcb_generic_error_t **e)
-{
- xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
- uint8_t ret = xcb_icccm_get_wm_class_from_reply(prop, reply);
- /* if reply parsing failed, free the reply to avoid mem leak */
- if(!ret)
- free(reply);
- return ret;
-}
-
-void
-xcb_icccm_get_wm_class_reply_wipe(xcb_icccm_get_wm_class_reply_t *prop)
-{
- free(prop->_reply);
-}
-
-/* WM_TRANSIENT_FOR */
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_transient_for_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_window_t transient_for_window)
-{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_TRANSIENT_FOR,
- XCB_ATOM_WINDOW, 32, 1,
- &transient_for_window);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_transient_for(xcb_connection_t *c, xcb_window_t window,
- xcb_window_t transient_for_window)
-{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32,
- 1, &transient_for_window);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_transient_for(xcb_connection_t *c, xcb_window_t window)
-{
- return xcb_get_property(c, 0, window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 1);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_transient_for_unchecked(xcb_connection_t *c, xcb_window_t window)
-{
- return xcb_get_property_unchecked(c, 0, window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 1);
-}
-
-uint8_t
-xcb_icccm_get_wm_transient_for_from_reply(xcb_window_t *prop,
- xcb_get_property_reply_t *reply)
-{
- if(!reply || reply->type != XCB_ATOM_WINDOW || reply->format != 32 || !reply->length)
- return 0;
-
- *prop = *((xcb_window_t *) xcb_get_property_value(reply));
-
- return 1;
-}
-
-uint8_t
-xcb_icccm_get_wm_transient_for_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_window_t *prop,
- xcb_generic_error_t **e)
-{
- xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
- uint8_t ret = xcb_icccm_get_wm_transient_for_from_reply(prop, reply);
- free(reply);
- return ret;
-}
-
-/* WM_SIZE_HINTS */
-
-void
-xcb_icccm_size_hints_set_position(xcb_size_hints_t *hints, int user_specified,
- int32_t x, int32_t y)
-{
- hints->flags &= ~(XCB_ICCCM_SIZE_HINT_US_POSITION | XCB_ICCCM_SIZE_HINT_P_POSITION);
- if (user_specified)
- hints->flags |= XCB_ICCCM_SIZE_HINT_US_POSITION;
- else
- hints->flags |= XCB_ICCCM_SIZE_HINT_P_POSITION;
- hints->x = x;
- hints->y = y;
-}
-
-void
-xcb_icccm_size_hints_set_size(xcb_size_hints_t *hints, int user_specified,
- int32_t width, int32_t height)
-{
- hints->flags &= ~(XCB_ICCCM_SIZE_HINT_US_SIZE | XCB_ICCCM_SIZE_HINT_P_SIZE);
- if (user_specified)
- hints->flags |= XCB_ICCCM_SIZE_HINT_US_SIZE;
- else
- hints->flags |= XCB_ICCCM_SIZE_HINT_P_SIZE;
- hints->width = width;
- hints->height = height;
-}
-
-void
-xcb_icccm_size_hints_set_min_size(xcb_size_hints_t *hints, int32_t min_width,
- int32_t min_height)
-{
- hints->flags |= XCB_ICCCM_SIZE_HINT_P_MIN_SIZE;
- hints->min_width = min_width;
- hints->min_height = min_height;
-}
-
-void
-xcb_icccm_size_hints_set_max_size(xcb_size_hints_t *hints, int32_t max_width,
- int32_t max_height)
-{
- hints->flags |= XCB_ICCCM_SIZE_HINT_P_MAX_SIZE;
- hints->max_width = max_width;
- hints->max_height = max_height;
-}
-
-void
-xcb_icccm_size_hints_set_resize_inc(xcb_size_hints_t *hints, int32_t width_inc,
- int32_t height_inc)
-{
- hints->flags |= XCB_ICCCM_SIZE_HINT_P_RESIZE_INC;
- hints->width_inc = width_inc;
- hints->height_inc = height_inc;
-}
-
-void
-xcb_icccm_size_hints_set_aspect(xcb_size_hints_t *hints, int32_t min_aspect_num,
- int32_t min_aspect_den, int32_t max_aspect_num,
- int32_t max_aspect_den)
-{
- hints->flags |= XCB_ICCCM_SIZE_HINT_P_ASPECT;
- hints->min_aspect_num = min_aspect_num;
- hints->min_aspect_den = min_aspect_den;
- hints->max_aspect_num = max_aspect_num;
- hints->max_aspect_den = max_aspect_den;
-}
-
-void
-xcb_icccm_size_hints_set_base_size(xcb_size_hints_t *hints, int32_t base_width,
- int32_t base_height)
-{
- hints->flags |= XCB_ICCCM_SIZE_HINT_BASE_SIZE;
- hints->base_width = base_width;
- hints->base_height = base_height;
-}
-
-void
-xcb_icccm_size_hints_set_win_gravity(xcb_size_hints_t *hints, xcb_gravity_t win_gravity)
-{
- hints->flags |= XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY;
- hints->win_gravity = win_gravity;
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_size_hints_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t property, xcb_size_hints_t *hints)
-{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, property,
- XCB_ATOM_WM_SIZE_HINTS, 32, sizeof(*hints) >> 2,
- hints);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_size_hints(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t property, xcb_size_hints_t *hints)
-{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, property,
- XCB_ATOM_WM_SIZE_HINTS, 32, sizeof(*hints) >> 2, hints);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_size_hints(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t property)
-{
- return xcb_get_property(c, 0, window, property, XCB_ATOM_WM_SIZE_HINTS, 0L, XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_size_hints_unchecked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t property)
-{
- return xcb_get_property_unchecked(c, 0, window, property, XCB_ATOM_WM_SIZE_HINTS,
- 0L, XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS);
-}
-
-uint8_t
-xcb_icccm_get_wm_size_hints_from_reply(xcb_size_hints_t *hints, xcb_get_property_reply_t *reply)
-{
- uint32_t flags;
- int length;
-
- if(!reply)
- return 0;
-
- if (!(reply->type == XCB_ATOM_WM_SIZE_HINTS &&
- reply->format == 32))
- return 0;
-
- length = xcb_get_property_value_length(reply) / (reply->format / 8);
-
- if(length > XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS)
- length = XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS;
-
- memcpy(hints, (xcb_size_hints_t *) xcb_get_property_value (reply),
- length * (reply->format / 8));
-
- flags = (XCB_ICCCM_SIZE_HINT_US_POSITION | XCB_ICCCM_SIZE_HINT_US_SIZE |
- XCB_ICCCM_SIZE_HINT_P_POSITION | XCB_ICCCM_SIZE_HINT_P_SIZE |
- XCB_ICCCM_SIZE_HINT_P_MIN_SIZE | XCB_ICCCM_SIZE_HINT_P_MAX_SIZE |
- XCB_ICCCM_SIZE_HINT_P_RESIZE_INC | XCB_ICCCM_SIZE_HINT_P_ASPECT);
-
- /* NumPropSizeElements = 18 (ICCCM version 1) */
- if(length >= 18)
- flags |= (XCB_ICCCM_SIZE_HINT_BASE_SIZE | XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY);
- else
- {
- hints->base_width = 0;
- hints->base_height = 0;
- hints->win_gravity = 0;
- }
- /* get rid of unwanted bits */
- hints->flags &= flags;
-
- return 1;
-}
-
-uint8_t
-xcb_icccm_get_wm_size_hints_reply(xcb_connection_t *c, xcb_get_property_cookie_t cookie,
- xcb_size_hints_t *hints, xcb_generic_error_t **e)
-{
- xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
- uint8_t ret = xcb_icccm_get_wm_size_hints_from_reply(hints, reply);
- free(reply);
- return ret;
-}
-
-/* WM_NORMAL_HINTS */
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_normal_hints_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_size_hints_t *hints)
-{
- return xcb_icccm_set_wm_size_hints_checked(c, window, XCB_ATOM_WM_NORMAL_HINTS, hints);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_normal_hints(xcb_connection_t *c, xcb_window_t window,
- xcb_size_hints_t *hints)
-{
- return xcb_icccm_set_wm_size_hints(c, window, XCB_ATOM_WM_NORMAL_HINTS, hints);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_normal_hints(xcb_connection_t *c, xcb_window_t window)
-{
- return xcb_icccm_get_wm_size_hints(c, window, XCB_ATOM_WM_NORMAL_HINTS);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_normal_hints_unchecked(xcb_connection_t *c, xcb_window_t window)
-{
- return xcb_icccm_get_wm_size_hints_unchecked(c, window, XCB_ATOM_WM_NORMAL_HINTS);
-}
-
-uint8_t
-xcb_icccm_get_wm_normal_hints_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_size_hints_t *hints,
- xcb_generic_error_t **e)
-{
- return xcb_icccm_get_wm_size_hints_reply(c, cookie, hints, e);
-}
-
-/* WM_HINTS */
-
-uint32_t
-xcb_icccm_wm_hints_get_urgency(xcb_icccm_wm_hints_t *hints)
-{
- return (hints->flags & XCB_ICCCM_WM_HINT_X_URGENCY);
-}
-
-void
-xcb_icccm_wm_hints_set_input(xcb_icccm_wm_hints_t *hints, uint8_t input)
-{
- hints->input = input;
- hints->flags |= XCB_ICCCM_WM_HINT_INPUT;
-}
-
-void
-xcb_icccm_wm_hints_set_iconic(xcb_icccm_wm_hints_t *hints)
-{
- hints->initial_state = XCB_ICCCM_WM_STATE_ICONIC;
- hints->flags |= XCB_ICCCM_WM_HINT_STATE;
-}
-
-void
-xcb_icccm_wm_hints_set_normal(xcb_icccm_wm_hints_t *hints)
-{
- hints->initial_state = XCB_ICCCM_WM_STATE_NORMAL;
- hints->flags |= XCB_ICCCM_WM_HINT_STATE;
-}
-
-void
-xcb_icccm_wm_hints_set_withdrawn(xcb_icccm_wm_hints_t *hints)
-{
- hints->initial_state = XCB_ICCCM_WM_STATE_WITHDRAWN;
- hints->flags |= XCB_ICCCM_WM_HINT_STATE;
-}
-
-void
-xcb_icccm_wm_hints_set_none(xcb_icccm_wm_hints_t *hints)
-{
- hints->flags &= ~XCB_ICCCM_WM_HINT_STATE;
-}
-
-void
-xcb_icccm_wm_hints_set_icon_pixmap(xcb_icccm_wm_hints_t *hints, xcb_pixmap_t icon_pixmap)
-{
- hints->icon_pixmap = icon_pixmap;
- hints->flags |= XCB_ICCCM_WM_HINT_ICON_PIXMAP;
-}
-
-void
-xcb_icccm_wm_hints_set_icon_mask(xcb_icccm_wm_hints_t *hints, xcb_pixmap_t icon_mask)
-{
- hints->icon_mask = icon_mask;
- hints->flags |= XCB_ICCCM_WM_HINT_ICON_MASK;
-}
-
-void
-xcb_icccm_wm_hints_set_icon_window(xcb_icccm_wm_hints_t *hints, xcb_window_t icon_window)
-{
- hints->icon_window = icon_window;
- hints->flags |= XCB_ICCCM_WM_HINT_ICON_WINDOW;
-}
-
-void
-xcb_icccm_wm_hints_set_window_group(xcb_icccm_wm_hints_t *hints, xcb_window_t window_group)
-{
- hints->window_group = window_group;
- hints->flags |= XCB_ICCCM_WM_HINT_WINDOW_GROUP;
-}
-
-void
-xcb_icccm_wm_hints_set_urgency(xcb_icccm_wm_hints_t *hints)
-{
- hints->flags |= XCB_ICCCM_WM_HINT_X_URGENCY;
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_hints_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_icccm_wm_hints_t *hints)
-{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_HINTS,
- XCB_ATOM_WM_HINTS, 32, sizeof(*hints) >> 2, hints);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_hints(xcb_connection_t *c, xcb_window_t window,
- xcb_icccm_wm_hints_t *hints)
-{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_HINTS,
- XCB_ATOM_WM_HINTS, 32, sizeof(*hints) >> 2, hints);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_hints(xcb_connection_t *c,
- xcb_window_t window)
-{
- return xcb_get_property(c, 0, window, XCB_ATOM_WM_HINTS, XCB_ATOM_WM_HINTS, 0L,
- XCB_ICCCM_NUM_WM_HINTS_ELEMENTS);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_hints_unchecked(xcb_connection_t *c,
- xcb_window_t window)
-{
- return xcb_get_property_unchecked(c, 0, window, XCB_ATOM_WM_HINTS, XCB_ATOM_WM_HINTS, 0L,
- XCB_ICCCM_NUM_WM_HINTS_ELEMENTS);
-}
-
-uint8_t
-xcb_icccm_get_wm_hints_from_reply(xcb_icccm_wm_hints_t *hints,
- xcb_get_property_reply_t *reply)
-{
- if(!reply || reply->type != XCB_ATOM_WM_HINTS || reply->format != 32)
- return 0;
-
- int length = xcb_get_property_value_length(reply);
- int num_elem = length / (reply->format / 8);
-
- if(num_elem < XCB_ICCCM_NUM_WM_HINTS_ELEMENTS - 1)
- return 0;
-
- if(length > sizeof(xcb_size_hints_t))
- length = sizeof(xcb_size_hints_t);
-
- memcpy(hints, (xcb_size_hints_t *) xcb_get_property_value(reply), length);
-
- if(num_elem < XCB_ICCCM_NUM_WM_HINTS_ELEMENTS)
- hints->window_group = XCB_NONE;
-
- return 1;
-}
-
-uint8_t
-xcb_icccm_get_wm_hints_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_wm_hints_t *hints,
- xcb_generic_error_t **e)
-{
- xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
- int ret = xcb_icccm_get_wm_hints_from_reply(hints, reply);
- free(reply);
- return ret;
-}
-
-/* WM_PROTOCOLS */
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_protocols_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t wm_protocols, uint32_t list_len,
- xcb_atom_t *list)
-{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
- wm_protocols, XCB_ATOM_ATOM, 32, list_len, list);
-}
-
-xcb_void_cookie_t
-xcb_icccm_set_wm_protocols(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t wm_protocols, uint32_t list_len, xcb_atom_t *list)
-{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, wm_protocols,
- XCB_ATOM_ATOM, 32, list_len, list);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_protocols(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t wm_protocol_atom)
-{
- return xcb_get_property(c, 0, window, wm_protocol_atom, XCB_ATOM_ATOM, 0, UINT_MAX);
-}
-
-xcb_get_property_cookie_t
-xcb_icccm_get_wm_protocols_unchecked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t wm_protocol_atom)
-{
- return xcb_get_property_unchecked(c, 0, window, wm_protocol_atom, XCB_ATOM_ATOM, 0,
- UINT_MAX);
-}
-
-uint8_t
-xcb_icccm_get_wm_protocols_from_reply(xcb_get_property_reply_t *reply, xcb_icccm_get_wm_protocols_reply_t *protocols)
-{
- if(!reply || reply->type != XCB_ATOM_ATOM || reply->format != 32)
- return 0;
-
- protocols->_reply = reply;
- protocols->atoms_len = xcb_get_property_value_length(protocols->_reply) / (reply->format / 8);
- protocols->atoms = (xcb_atom_t *) xcb_get_property_value(protocols->_reply);
-
- return 1;
-}
-
-uint8_t
-xcb_icccm_get_wm_protocols_reply(xcb_connection_t *c,
- xcb_get_property_cookie_t cookie,
- xcb_icccm_get_wm_protocols_reply_t *protocols,
- xcb_generic_error_t **e)
-{
- xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e);
- uint8_t ret = xcb_icccm_get_wm_protocols_from_reply(reply, protocols);
- if(!ret)
- free(reply);
- return ret;
-}
-
-void
-xcb_icccm_get_wm_protocols_reply_wipe(xcb_icccm_get_wm_protocols_reply_t *protocols)
-{
- free(protocols->_reply);
-}
diff --git a/src/3rdparty/xcb/xcb-util/atoms.c b/src/3rdparty/xcb/xcb-util/atoms.c
deleted file mode 100644
index 7b3aec6c0e..0000000000
--- a/src/3rdparty/xcb/xcb-util/atoms.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Rely on vasprintf (GNU extension) instead of vsnprintf if
- possible... */
-#ifdef HAVE_VASPRINTF
-#define _GNU_SOURCE
-#include <stdio.h>
-#endif
-
-#include <xcb/xcb.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include "xcb_atom.h"
-
-static char *makename(const char *fmt, ...)
-{
- char *ret;
- int n;
- va_list ap;
-
-#ifndef HAVE_VASPRINTF
- char *np;
- int size = 64;
-
- /* First allocate 'size' bytes, should be enough usually */
- if((ret = malloc(size)) == NULL)
- return NULL;
-
- while(1)
- {
- va_start(ap, fmt);
- n = vsnprintf(ret, size, fmt, ap);
- va_end(ap);
-
- if(n < 0)
- return NULL;
-
- if(n < size)
- return ret;
-
- size = n + 1;
- if((np = realloc(ret, size)) == NULL)
- {
- free(ret);
- return NULL;
- }
-
- ret = np;
- }
-#else
- va_start(ap, fmt);
- n = vasprintf(&ret, fmt, ap);
- va_end(ap);
-
- if(n < 0)
- return NULL;
-
- return ret;
-#endif
-}
-
-char *xcb_atom_name_by_screen(const char *base, uint8_t screen)
-{
- return makename("%s_S%u", base, screen);
-}
-
-char *xcb_atom_name_by_resource(const char *base, uint32_t resource)
-{
- return makename("%s_R%08X", base, resource);
-}
-
-char *xcb_atom_name_unique(const char *base, uint32_t id)
-{
- if(base)
- return makename("%s_U%lu", base, id);
- else
- return makename("U%lu", id);
-}
diff --git a/src/3rdparty/xcb/xcb-util/event.c b/src/3rdparty/xcb/xcb-util/event.c
deleted file mode 100644
index de8899adcd..0000000000
--- a/src/3rdparty/xcb/xcb-util/event.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright © 2008-2009 Julien Danjou <julien@danjou.info>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or
- * their institutions shall not be used in advertising or otherwise to
- * promote the sale, use or other dealings in this Software without
- * prior written authorization from the authors.
- */
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "xcb_event.h"
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#define ssizeof(foo) (ssize_t)sizeof(foo)
-#define countof(foo) (ssizeof(foo) / ssizeof(foo[0]))
-
-static const char *labelError[] =
-{
- "Success",
- "BadRequest",
- "BadValue",
- "BadWindow",
- "BadPixmap",
- "BadAtom",
- "BadCursor",
- "BadFont",
- "BadMatch",
- "BadDrawable",
- "BadAccess",
- "BadAlloc",
- "BadColor",
- "BadGC",
- "BadIDChoice",
- "BadName",
- "BadLength",
- "BadImplementation",
-};
-
-static const char *labelRequest[] =
-{
- "no request",
- "CreateWindow",
- "ChangeWindowAttributes",
- "GetWindowAttributes",
- "DestroyWindow",
- "DestroySubwindows",
- "ChangeSaveSet",
- "ReparentWindow",
- "MapWindow",
- "MapSubwindows",
- "UnmapWindow",
- "UnmapSubwindows",
- "ConfigureWindow",
- "CirculateWindow",
- "GetGeometry",
- "QueryTree",
- "InternAtom",
- "GetAtomName",
- "ChangeProperty",
- "DeleteProperty",
- "GetProperty",
- "ListProperties",
- "SetSelectionOwner",
- "GetSelectionOwner",
- "ConvertSelection",
- "SendEvent",
- "GrabPointer",
- "UngrabPointer",
- "GrabButton",
- "UngrabButton",
- "ChangeActivePointerGrab",
- "GrabKeyboard",
- "UngrabKeyboard",
- "GrabKey",
- "UngrabKey",
- "AllowEvents",
- "GrabServer",
- "UngrabServer",
- "QueryPointer",
- "GetMotionEvents",
- "TranslateCoords",
- "WarpPointer",
- "SetInputFocus",
- "GetInputFocus",
- "QueryKeymap",
- "OpenFont",
- "CloseFont",
- "QueryFont",
- "QueryTextExtents",
- "ListFonts",
- "ListFontsWithInfo",
- "SetFontPath",
- "GetFontPath",
- "CreatePixmap",
- "FreePixmap",
- "CreateGC",
- "ChangeGC",
- "CopyGC",
- "SetDashes",
- "SetClipRectangles",
- "FreeGC",
- "ClearArea",
- "CopyArea",
- "CopyPlane",
- "PolyPoint",
- "PolyLine",
- "PolySegment",
- "PolyRectangle",
- "PolyArc",
- "FillPoly",
- "PolyFillRectangle",
- "PolyFillArc",
- "PutImage",
- "GetImage",
- "PolyText",
- "PolyText",
- "ImageText",
- "ImageText",
- "CreateColormap",
- "FreeColormap",
- "CopyColormapAndFree",
- "InstallColormap",
- "UninstallColormap",
- "ListInstalledColormaps",
- "AllocColor",
- "AllocNamedColor",
- "AllocColorCells",
- "AllocColorPlanes",
- "FreeColors",
- "StoreColors",
- "StoreNamedColor",
- "QueryColors",
- "LookupColor",
- "CreateCursor",
- "CreateGlyphCursor",
- "FreeCursor",
- "RecolorCursor",
- "QueryBestSize",
- "QueryExtension",
- "ListExtensions",
- "ChangeKeyboardMapping",
- "GetKeyboardMapping",
- "ChangeKeyboardControl",
- "GetKeyboardControl",
- "Bell",
- "ChangePointerControl",
- "GetPointerControl",
- "SetScreenSaver",
- "GetScreenSaver",
- "ChangeHosts",
- "ListHosts",
- "SetAccessControl",
- "SetCloseDownMode",
- "KillClient",
- "RotateProperties",
- "ForceScreenSaver",
- "SetPointerMapping",
- "GetPointerMapping",
- "SetModifierMapping",
- "GetModifierMapping",
- "major 120",
- "major 121",
- "major 122",
- "major 123",
- "major 124",
- "major 125",
- "major 126",
- "NoOperation",
-};
-
-static const char *labelEvent[] =
-{
- "error",
- "reply",
- "KeyPress",
- "KeyRelease",
- "ButtonPress",
- "ButtonRelease",
- "MotionNotify",
- "EnterNotify",
- "LeaveNotify",
- "FocusIn",
- "FocusOut",
- "KeymapNotify",
- "Expose",
- "GraphicsExpose",
- "NoExpose",
- "VisibilityNotify",
- "CreateNotify",
- "DestroyNotify",
- "UnmapNotify",
- "MapNotify",
- "MapRequest",
- "ReparentNotify",
- "ConfigureNotify",
- "ConfigureRequest",
- "GravityNotify",
- "ResizeRequest",
- "CirculateNotify",
- "CirculateRequest",
- "PropertyNotify",
- "SelectionClear",
- "SelectionRequest",
- "SelectionNotify",
- "ColormapNotify",
- "ClientMessage",
- "MappingNotify",
-};
-
-const char *
-xcb_event_get_label(uint8_t type)
-{
- if(type < countof(labelEvent))
- return labelEvent[type];
- return NULL;
-}
-
-const char *
-xcb_event_get_error_label(uint8_t type)
-{
- if(type < countof(labelError))
- return labelError[type];
- return NULL;
-}
-
-const char *
-xcb_event_get_request_label(uint8_t type)
-{
- if(type < countof(labelRequest))
- return labelRequest[type];
- return NULL;
-}
diff --git a/src/3rdparty/xcb/xcb-util/xcb_aux.c b/src/3rdparty/xcb/xcb-util/xcb_aux.c
deleted file mode 100644
index c81039885f..0000000000
--- a/src/3rdparty/xcb/xcb-util/xcb_aux.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright © 2008 Bart Massey <bart@cs.pdx.edu>
- * Copyright © 2008 Ian Osgood <iano@quirkster.com>
- * Copyright © 2008 Jamey Sharp <jamey@minilop.net>
- * Copyright © 2008 Josh Triplett <josh@freedesktop.org>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the names of the authors or
- * their institutions shall not be used in advertising or otherwise to
- * promote the sale, use or other dealings in this Software without
- * prior written authorization from the authors.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <xcb/xcb.h>
-#include "xcb_aux.h"
-
-/* Connection related functions */
-
-uint8_t
-xcb_aux_get_depth (xcb_connection_t *c,
- xcb_screen_t *screen)
-{
- xcb_drawable_t drawable;
- xcb_get_geometry_reply_t *geom;
- int depth = 0;
-
- drawable = screen->root;
- geom = xcb_get_geometry_reply (c, xcb_get_geometry(c, drawable), 0);
-
- if (geom) {
- depth = geom->depth;
- free (geom);
- }
-
- return depth;
-}
-
-uint8_t
-xcb_aux_get_depth_of_visual (xcb_screen_t *screen,
- xcb_visualid_t id)
-{
- xcb_depth_iterator_t i;
- xcb_visualtype_iterator_t j;
- for (i = xcb_screen_allowed_depths_iterator(screen);
- i.rem; xcb_depth_next(&i))
- for (j = xcb_depth_visuals_iterator(i.data);
- j.rem; xcb_visualtype_next(&j))
- if (j.data->visual_id == id)
- return i.data->depth;
- return 0;
-}
-
-xcb_screen_t *
-xcb_aux_get_screen (xcb_connection_t *c,
- int screen)
-{
- xcb_screen_iterator_t i = xcb_setup_roots_iterator(xcb_get_setup(c));
- for (; i.rem; --screen, xcb_screen_next(&i))
- if (screen == 0)
- return i.data;
- return 0;
-}
-
-xcb_visualtype_t *
-xcb_aux_get_visualtype (xcb_connection_t *c,
- int scr,
- xcb_visualid_t vid)
-{
- xcb_screen_t *screen;
- xcb_depth_t *depth;
- xcb_visualtype_iterator_t iter;
- int cur;
-
- screen = xcb_aux_get_screen (c, scr);
- if (!screen) return NULL;
-
- depth = xcb_screen_allowed_depths_iterator(screen).data;
- if (!depth) return NULL;
-
- iter = xcb_depth_visuals_iterator(depth);
- for (cur = 0 ; cur < iter.rem ; xcb_visualtype_next(&iter), ++cur)
- if (vid == iter.data->visual_id)
- return iter.data;
-
- return NULL;
-}
-
-xcb_visualtype_t *
-xcb_aux_find_visual_by_id (xcb_screen_t *screen,
- xcb_visualid_t id)
-{
- xcb_depth_iterator_t i;
- xcb_visualtype_iterator_t j;
- for (i = xcb_screen_allowed_depths_iterator(screen);
- i.rem; xcb_depth_next(&i))
- for (j = xcb_depth_visuals_iterator(i.data);
- j.rem; xcb_visualtype_next(&j))
- if (j.data->visual_id == id)
- return j.data;
- return 0;
-}
-
-xcb_visualtype_t *
-xcb_aux_find_visual_by_attrs (xcb_screen_t *screen,
- int8_t class,
- int8_t depth)
-{
- xcb_depth_iterator_t i;
- xcb_visualtype_iterator_t j;
- for (i = xcb_screen_allowed_depths_iterator(screen);
- i.rem; xcb_depth_next(&i)) {
- if (depth != -1 && i.data->depth != depth)
- continue;
- for (j = xcb_depth_visuals_iterator(i.data);
- j.rem; xcb_visualtype_next(&j))
- if (class == -1 || j.data->_class == class)
- return j.data;
- }
- return 0;
-}
-
-void
-xcb_aux_sync (xcb_connection_t *c)
-{
- free(xcb_get_input_focus_reply(c, xcb_get_input_focus(c), NULL));
-}
-
-/* structs instead of value lists */
-/* TODO: generate the struct types and functions from protocol masks and descriptions */
-
-/* This generic implementation of pack_list depends on:
- a) structs packed to uint32_t size
- b) structs consist of just uint32_t/int32_t fields in the same order as bitmask
-*/
-
-static void
-pack_list( uint32_t mask, const uint32_t *src, uint32_t *dest )
-{
- for ( ; mask; mask >>= 1, src++)
- if (mask & 1)
- *dest++ = *src;
-}
-
-xcb_void_cookie_t
-xcb_aux_create_window (xcb_connection_t *c,
- uint8_t depth,
- xcb_window_t wid,
- xcb_window_t parent,
- int16_t x,
- int16_t y,
- uint16_t width,
- uint16_t height,
- uint16_t border_width,
- uint16_t _class,
- xcb_visualid_t visual,
- uint32_t mask,
- const xcb_params_cw_t *params)
-{
- uint32_t value_list[16];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_create_window(c, depth, wid, parent,
- x, y, width, height, border_width,
- _class, visual, mask, value_list);
-}
-
-xcb_void_cookie_t
-xcb_aux_create_window_checked (xcb_connection_t *c,
- uint8_t depth,
- xcb_window_t wid,
- xcb_window_t parent,
- int16_t x,
- int16_t y,
- uint16_t width,
- uint16_t height,
- uint16_t border_width,
- uint16_t _class,
- xcb_visualid_t visual,
- uint32_t mask,
- const xcb_params_cw_t *params)
-{
- uint32_t value_list[16];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_create_window_checked(c, depth, wid, parent,
- x, y, width, height, border_width,
- _class, visual, mask, value_list);
-}
-
-xcb_void_cookie_t
-xcb_aux_change_window_attributes_checked (xcb_connection_t *c,
- xcb_window_t window,
- uint32_t mask,
- const xcb_params_cw_t *params)
-{
- uint32_t value_list[16];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_change_window_attributes_checked( c, window, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_change_window_attributes (xcb_connection_t *c,
- xcb_window_t window,
- uint32_t mask,
- const xcb_params_cw_t *params)
-{
- uint32_t value_list[16];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_change_window_attributes( c, window, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_configure_window (xcb_connection_t *c,
- xcb_window_t window,
- uint16_t mask,
- const xcb_params_configure_window_t *params)
-{
- uint32_t value_list[8];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_configure_window( c, window, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_create_gc (xcb_connection_t *c,
- xcb_gcontext_t gid,
- xcb_drawable_t drawable,
- uint32_t mask,
- const xcb_params_gc_t *params)
-{
- uint32_t value_list[32];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_create_gc( c, gid, drawable, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_create_gc_checked (xcb_connection_t *c,
- xcb_gcontext_t gid,
- xcb_drawable_t drawable,
- uint32_t mask,
- const xcb_params_gc_t *params)
-{
- uint32_t value_list[32];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_create_gc_checked( c, gid, drawable, mask, value_list);
-}
-
-xcb_void_cookie_t
-xcb_aux_change_gc (xcb_connection_t *c,
- xcb_gcontext_t gc,
- uint32_t mask,
- const xcb_params_gc_t *params)
-{
- uint32_t value_list[32];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_change_gc( c, gc, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_change_gc_checked (xcb_connection_t *c,
- xcb_gcontext_t gc,
- uint32_t mask,
- const xcb_params_gc_t *params)
-{
- uint32_t value_list[32];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_change_gc_checked( c, gc, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_change_keyboard_control (xcb_connection_t *c,
- uint32_t mask,
- const xcb_params_keyboard_t *params)
-{
- uint32_t value_list[16];
- pack_list(mask, (const uint32_t *)params, value_list);
- return xcb_change_keyboard_control( c, mask, value_list );
-}
-
-/* Color related functions */
-
-/* Return true if the given color name can be translated locally,
- in which case load the components. Otherwise, a lookup_color request
- will be needed, so return false. */
-int
-xcb_aux_parse_color(char *color_name,
- uint16_t *red, uint16_t *green, uint16_t *blue)
-{
- int n, r, g, b, i;
- if (!color_name || *color_name != '#')
- return 0;
- /*
- * Excitingly weird RGB parsing code from Xlib.
- */
- n = strlen (color_name);
- color_name++;
- n--;
- if (n != 3 && n != 6 && n != 9 && n != 12)
- return 0;
- n /= 3;
- g = b = 0;
- do {
- r = g;
- g = b;
- b = 0;
- for (i = n; --i >= 0; ) {
- char c = *color_name++;
- b <<= 4;
- if (c >= '0' && c <= '9')
- b |= c - '0';
- else if (c >= 'A' && c <= 'F')
- b |= c - ('A' - 10);
- else if (c >= 'a' && c <= 'f')
- b |= c - ('a' - 10);
- else return 0;
- }
- } while (*color_name != '\0');
- n <<= 2;
- n = 16 - n;
- *red = r << n;
- *green = g << n;
- *blue = b << n;
- return 1;
-}
-
-/* Drawing related functions */
-
-/* Adapted from Xlib */
-xcb_void_cookie_t
-xcb_aux_set_line_attributes_checked (xcb_connection_t *dpy,
- xcb_gcontext_t gc,
- uint16_t linewidth,
- int32_t linestyle,
- int32_t capstyle,
- int32_t joinstyle)
-{
- uint32_t mask = 0;
- xcb_params_gc_t gv;
-
- XCB_AUX_ADD_PARAM(&mask, &gv, line_width, linewidth);
- XCB_AUX_ADD_PARAM(&mask, &gv, line_style, linestyle);
- XCB_AUX_ADD_PARAM(&mask, &gv, cap_style, capstyle);
- XCB_AUX_ADD_PARAM(&mask, &gv, join_style, joinstyle);
- return xcb_aux_change_gc_checked(dpy, gc, mask, &gv);
-}
-
-/* Adapted from Xlib */
-/* XXX It would be wiser for apps just to call
- clear_area() directly. */
-xcb_void_cookie_t
-xcb_aux_clear_window(xcb_connection_t * dpy,
- xcb_window_t w)
-{
- return xcb_clear_area(dpy, 0, w, 0, 0, 0, 0);
-}
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 9b672327ef..4c1c3a612b 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -1,3 +1,6 @@
+if(NOT DEFINED QT_DEFAULT_MAJOR_VERSION)
+ set(QT_DEFAULT_MAJOR_VERSION 5)
+endif()
if (NOT TARGET Qt5::qmake)
add_executable(Qt5::qmake IMPORTED)
@@ -177,3 +180,24 @@ if (ANDROID_PLATFORM)
endif()
_qt5_Core_check_file_exists(${_Qt5CTestMacros})
+
+# Create versionless tool targets.
+foreach(__qt_tool qmake moc rcc)
+ if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::${__qt_tool}
+ AND TARGET Qt5::${__qt_tool})
+ add_executable(Qt::${__qt_tool} IMPORTED)
+ get_target_property(__qt_imported_location Qt5::${__qt_tool} IMPORTED_LOCATION)
+ set_target_properties(Qt::${__qt_tool}
+ PROPERTIES IMPORTED_LOCATION \"${__qt_imported_location}\")
+ endif()
+endforeach()
+
+!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
+# Add a versionless target for WinMain.
+if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::WinMain)
+ add_library(Qt::WinMain INTERFACE IMPORTED)
+ set_target_properties(Qt::WinMain PROPERTIES
+ INTERFACE_LINK_LIBRARIES \"Qt5::WinMain\"
+ )
+endif()
+!!ENDIF
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index 02f49a4b1e..f666c67ed9 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -39,7 +39,7 @@
include(CMakeParseArguments)
# macro used to create the names of output files preserving relative dirs
-macro(QT5_MAKE_OUTPUT_FILE infile prefix ext outfile )
+macro(qt5_make_output_file infile prefix ext outfile )
string(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
string(LENGTH ${infile} _infileLength)
set(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
@@ -72,7 +72,7 @@ macro(QT5_MAKE_OUTPUT_FILE infile prefix ext outfile )
endmacro()
-macro(QT5_GET_MOC_FLAGS _moc_flags)
+macro(qt5_get_moc_flags _moc_flags)
set(${_moc_flags})
get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
@@ -104,7 +104,7 @@ endmacro()
# helper macro to set up a moc rule
-function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target moc_depends)
+function(qt5_create_moc_command infile outfile moc_flags moc_options moc_target moc_depends)
# Pass the parameters in a file. Set the working directory to
# be that containing the parameters file and reference it by
# just the file name. This is necessary because the moc tool on
@@ -150,7 +150,7 @@ function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target
endfunction()
-function(QT5_GENERATE_MOC infile outfile )
+function(qt5_generate_moc infile outfile )
# get include dirs and flags
qt5_get_moc_flags(moc_flags)
get_filename_component(abs_infile ${infile} ABSOLUTE)
@@ -164,10 +164,20 @@ function(QT5_GENERATE_MOC infile outfile )
qt5_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}" "")
endfunction()
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_generate_moc)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_generate_moc(${ARGV})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_generate_moc(${ARGV})
+ endif()
+ endfunction()
+endif()
+
# qt5_wrap_cpp(outfiles inputfile ... )
-function(QT5_WRAP_CPP outfiles )
+function(qt5_wrap_cpp outfiles )
# get include dirs
qt5_get_moc_flags(moc_flags)
@@ -191,12 +201,23 @@ function(QT5_WRAP_CPP outfiles )
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
+# This will override the CMake upstream command, because that one is for Qt 3.
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_wrap_cpp outfiles)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_wrap_cpp("${outfiles}" ${ARGN})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_wrap_cpp("${outfiles}" ${ARGN})
+ endif()
+ set("${outfiles}" "${${outfiles}}" PARENT_SCOPE)
+ endfunction()
+endif()
# _qt5_parse_qrc_file(infile _out_depends _rc_depends)
# internal
-function(_QT5_PARSE_QRC_FILE infile _out_depends _rc_depends)
+function(_qt5_parse_qrc_file infile _out_depends _rc_depends)
get_filename_component(rc_path ${infile} PATH)
if(EXISTS "${infile}")
@@ -229,7 +250,7 @@ endfunction()
# qt5_add_binary_resources(target inputfiles ... )
-function(QT5_ADD_BINARY_RESOURCES target )
+function(qt5_add_binary_resources target )
set(options)
set(oneValueArgs DESTINATION)
@@ -248,7 +269,7 @@ function(QT5_ADD_BINARY_RESOURCES target )
foreach(it ${rcc_files})
get_filename_component(infile ${it} ABSOLUTE)
- _QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
+ _qt5_parse_qrc_file(${infile} _out_depends _rc_depends)
set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON)
set(infiles ${infiles} ${infile})
set(out_depends ${out_depends} ${_out_depends})
@@ -262,10 +283,20 @@ function(QT5_ADD_BINARY_RESOURCES target )
add_custom_target(${target} ALL DEPENDS ${rcc_destination})
endfunction()
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_add_binary_resources)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_add_binary_resources(${ARGV})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_add_binary_resources(${ARGV})
+ endif()
+ endfunction()
+endif()
+
# qt5_add_resources(outfiles inputfile ... )
-function(QT5_ADD_RESOURCES outfiles )
+function(qt5_add_resources outfiles )
set(options)
set(oneValueArgs)
@@ -285,7 +316,7 @@ function(QT5_ADD_RESOURCES outfiles )
get_filename_component(infile ${it} ABSOLUTE)
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp)
- _QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
+ _qt5_parse_qrc_file(${infile} _out_depends _rc_depends)
set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON)
add_custom_command(OUTPUT ${outfile}
@@ -300,9 +331,21 @@ function(QT5_ADD_RESOURCES outfiles )
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_add_resources outfiles)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_add_resources("${outfiles}" ${ARGN})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_add_resources("${outfiles}" ${ARGN})
+ endif()
+ set("${outfiles}" "${${outfiles}}" PARENT_SCOPE)
+ endfunction()
+endif()
+
+
# qt5_add_big_resources(outfiles inputfile ... )
-function(QT5_ADD_BIG_RESOURCES outfiles )
+function(qt5_add_big_resources outfiles )
if (CMAKE_VERSION VERSION_LESS 3.9)
message(FATAL_ERROR, "qt5_add_big_resources requires CMake 3.9 or newer")
endif()
@@ -326,7 +369,7 @@ function(QT5_ADD_BIG_RESOURCES outfiles )
set(tmpoutfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}tmp.cpp)
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.o)
- _QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
+ _qt5_parse_qrc_file(${infile} _out_depends _rc_depends)
set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON)
add_custom_command(OUTPUT ${tmpoutfile}
COMMAND ${Qt5Core_RCC_EXECUTABLE} ${rcc_options} --name ${outfilename} --pass 1 --output ${tmpoutfile} ${infile}
@@ -348,60 +391,67 @@ function(QT5_ADD_BIG_RESOURCES outfiles )
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_add_big_resources outfiles)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_add_big_resources(${outfiles} ${ARGN})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_add_big_resources(${outfiles} ${ARGN})
+ endif()
+ set("${outfiles}" "${${outfiles}}" PARENT_SCOPE)
+ endfunction()
+endif()
+
+
set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
-if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
- macro(qt5_use_modules _target _link_type)
- if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
- if(CMAKE_WARN_DEPRECATED)
- set(messageType WARNING)
- endif()
- if(CMAKE_ERROR_DEPRECATED)
- set(messageType FATAL_ERROR)
- endif()
- if(messageType)
- message(${messageType} "The qt5_use_modules macro is obsolete. Use target_link_libraries with IMPORTED targets instead.")
- endif()
- endif()
+macro(qt5_use_modules _target _link_type)
+ if(CMAKE_WARN_DEPRECATED)
+ set(messageType WARNING)
+ endif()
+ if(CMAKE_ERROR_DEPRECATED)
+ set(messageType FATAL_ERROR)
+ endif()
+ if(messageType)
+ message(${messageType} "The qt5_use_modules macro is obsolete. Use target_link_libraries with IMPORTED targets instead.")
+ endif()
- if (NOT TARGET ${_target})
- message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
- endif()
- if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" )
- set(_qt5_modules ${ARGN})
- set(_qt5_link_type ${_link_type})
- else()
- set(_qt5_modules ${_link_type} ${ARGN})
- endif()
+ if (NOT TARGET ${_target})
+ message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
+ endif()
+ if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" )
+ set(_qt5_modules ${ARGN})
+ set(_qt5_link_type ${_link_type})
+ else()
+ set(_qt5_modules ${_link_type} ${ARGN})
+ endif()
- if ("${_qt5_modules}" STREQUAL "")
- message(FATAL_ERROR "qt5_use_modules requires at least one Qt module to use.")
- endif()
+ if ("${_qt5_modules}" STREQUAL "")
+ message(FATAL_ERROR "qt5_use_modules requires at least one Qt module to use.")
+ endif()
- foreach(_module ${_qt5_modules})
+ foreach(_module ${_qt5_modules})
+ if (NOT Qt5${_module}_FOUND)
+ find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
if (NOT Qt5${_module}_FOUND)
- find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
- if (NOT Qt5${_module}_FOUND)
- message(FATAL_ERROR "Cannot use \"${_module}\" module which has not yet been found.")
- endif()
+ message(FATAL_ERROR "Cannot use \"${_module}\" module which has not yet been found.")
endif()
- target_link_libraries(${_target} ${_qt5_link_type} ${Qt5${_module}_LIBRARIES})
- set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS})
- set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_module}_COMPILE_DEFINITIONS})
- set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
- set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
- set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
- if (Qt5_POSITION_INDEPENDENT_CODE
- AND (CMAKE_VERSION VERSION_GREATER_EQUAL 2.8.12
- AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
- OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)))
- set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
- endif()
- endforeach()
- endmacro()
-endif()
+ endif()
+ target_link_libraries(${_target} ${_qt5_link_type} ${Qt5${_module}_LIBRARIES})
+ set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS})
+ set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_module}_COMPILE_DEFINITIONS})
+ set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
+ set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
+ set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
+ if (Qt5_POSITION_INDEPENDENT_CODE
+ AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+ OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
+ set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
+ endif()
+ endforeach()
+endmacro()
-function(QT5_IMPORT_PLUGINS TARGET_NAME)
+function(qt5_import_plugins TARGET_NAME)
set(_doing "")
foreach(_arg ${ARGN})
if(_arg STREQUAL "INCLUDE")
@@ -425,10 +475,19 @@ function(QT5_IMPORT_PLUGINS TARGET_NAME)
elseif(_doing STREQUAL "EXCLUDE_BY_TYPE")
string(REGEX REPLACE "[-/]" "_" _plugin_type "${_arg}")
set_property(TARGET ${TARGET_NAME} PROPERTY "QT_PLUGINS_${_plugin_type}" -)
- set(_doing "")
else()
message(FATAL_ERROR "Unexpected extra argument: \"${_arg}\"")
endif()
endif()
endforeach()
endfunction()
+
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_import_plugins)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_import_plugins(${ARGV})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_import_plugins(${ARGV})
+ endif()
+ endfunction()
+endif()
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 46b01449d4..b7136dc055 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -220,7 +220,7 @@ QUnifiedTimer::QUnifiedTimer() :
QObject(), defaultDriver(this), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL),
currentAnimationIdx(0), insideTick(false), insideRestart(false), consistentTiming(false), slowMode(false),
startTimersPending(false), stopTimerPending(false),
- slowdownFactor(5.0f), profilerCallback(0),
+ slowdownFactor(5.0f), profilerCallback(nullptr),
driverStartTime(0), temporalDrift(0)
{
time.invalidate();
@@ -922,7 +922,7 @@ qint64 QAnimationDriver::elapsed() const
The default animation driver just spins the timer...
*/
QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer)
- : QAnimationDriver(0), m_unified_timer(timer)
+ : QAnimationDriver(nullptr), m_unified_timer(timer)
{
connect(this, SIGNAL(started()), this, SLOT(startTimer()));
connect(this, SIGNAL(stopped()), this, SLOT(stopTimer()));
@@ -1035,7 +1035,7 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
\sa QVariantAnimation, QAnimationGroup
*/
QAbstractAnimation::QAbstractAnimation(QObject *parent)
- : QObject(*new QAbstractAnimationPrivate, 0)
+ : QObject(*new QAbstractAnimationPrivate, nullptr)
{
// Allow auto-add on reparent
setParent(parent);
@@ -1045,7 +1045,7 @@ QAbstractAnimation::QAbstractAnimation(QObject *parent)
\internal
*/
QAbstractAnimation::QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *parent)
- : QObject(dd, 0)
+ : QObject(dd, nullptr)
{
// Allow auto-add on reparent
setParent(parent);
diff --git a/src/corelib/animation/qanimationgroup.cpp b/src/corelib/animation/qanimationgroup.cpp
index ed40817222..729f55d68f 100644
--- a/src/corelib/animation/qanimationgroup.cpp
+++ b/src/corelib/animation/qanimationgroup.cpp
@@ -133,7 +133,7 @@ QAbstractAnimation *QAnimationGroup::animationAt(int index) const
if (index < 0 || index >= d->animations.size()) {
qWarning("QAnimationGroup::animationAt: index is out of bounds");
- return 0;
+ return nullptr;
}
return d->animations.at(index);
@@ -195,8 +195,11 @@ void QAnimationGroup::insertAnimation(int index, QAbstractAnimation *animation)
return;
}
- if (QAnimationGroup *oldGroup = animation->group())
+ if (QAnimationGroup *oldGroup = animation->group()) {
oldGroup->removeAnimation(animation);
+ // ensure we don't insert out of bounds if oldGroup == this
+ index = qMin(index, d->animations.size());
+ }
d->animations.insert(index, animation);
QAbstractAnimationPrivate::get(animation)->group = this;
@@ -240,14 +243,14 @@ QAbstractAnimation *QAnimationGroup::takeAnimation(int index)
Q_D(QAnimationGroup);
if (index < 0 || index >= d->animations.size()) {
qWarning("QAnimationGroup::takeAnimation: no animation at index %d", index);
- return 0;
+ return nullptr;
}
QAbstractAnimation *animation = d->animations.at(index);
- QAbstractAnimationPrivate::get(animation)->group = 0;
+ QAbstractAnimationPrivate::get(animation)->group = nullptr;
// ### removing from list before doing setParent to avoid inifinite recursion
// in ChildRemoved event
d->animations.removeAt(index);
- animation->setParent(0);
+ animation->setParent(nullptr);
d->animationRemoved(index, animation);
return animation;
}
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index 2a3572d441..d014b5c441 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -92,7 +92,7 @@ QT_BEGIN_NAMESPACE
void QPropertyAnimationPrivate::updateMetaProperty()
{
if (!target || propertyName.isEmpty()) {
- propertyType = QVariant::Invalid;
+ propertyType = QMetaType::UnknownType;
propertyIndex = -1;
return;
}
@@ -102,11 +102,11 @@ void QPropertyAnimationPrivate::updateMetaProperty()
propertyType = targetValue->property(propertyName).userType();
propertyIndex = targetValue->metaObject()->indexOfProperty(propertyName);
- if (propertyType != QVariant::Invalid)
+ if (propertyType != QMetaType::UnknownType)
convertValues(propertyType);
if (propertyIndex == -1) {
//there is no Q_PROPERTY on the object
- propertyType = QVariant::Invalid;
+ propertyType = QMetaType::UnknownType;
if (!targetValue->dynamicPropertyNames().contains(propertyName))
qWarning("QPropertyAnimation: you're trying to animate a non-existing property %s of your QObject", propertyName.constData());
} else if (!targetValue->metaObject()->property(propertyIndex).isWritable()) {
@@ -259,7 +259,7 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
QVariantAnimation::updateState(newState, oldState);
- QPropertyAnimation *animToStop = 0;
+ QPropertyAnimation *animToStop = nullptr;
{
static QBasicMutex mutex;
auto locker = qt_unique_lock(mutex);
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp
index 66e346a2fe..98ac04a14f 100644
--- a/src/corelib/animation/qsequentialanimationgroup.cpp
+++ b/src/corelib/animation/qsequentialanimationgroup.cpp
@@ -282,7 +282,7 @@ QPauseAnimation *QSequentialAnimationGroup::insertPause(int index, int msecs)
if (index < 0 || index > d->animations.size()) {
qWarning("QSequentialAnimationGroup::insertPause: index is out of bounds");
- return 0;
+ return nullptr;
}
QPauseAnimation *pause = new QPauseAnimation(msecs);
@@ -430,7 +430,7 @@ void QSequentialAnimationGroupPrivate::setCurrentAnimation(int index, bool inter
if (index == -1) {
Q_ASSERT(animations.isEmpty());
currentAnimationIndex = -1;
- currentAnimation = 0;
+ currentAnimation = nullptr;
return;
}
@@ -503,7 +503,7 @@ void QSequentialAnimationGroupPrivate::_q_uncontrolledAnimationFinished()
*/
void QSequentialAnimationGroupPrivate::animationInsertedAt(int index)
{
- if (currentAnimation == 0)
+ if (currentAnimation == nullptr)
setCurrentAnimation(0); // initialize the current animation
if (currentAnimationIndex == index
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index 216c015732..98b02f0202 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -209,7 +209,7 @@ void QVariantAnimationPrivate::updateInterpolator()
if (type == currentInterval.end.second.userType())
interpolator = getInterpolator(type);
else
- interpolator = 0;
+ interpolator = nullptr;
//we make sure that the interpolator is always set to something
if (!interpolator)
@@ -445,7 +445,7 @@ QVariantAnimation::Interpolator QVariantAnimationPrivate::getInterpolator(int in
{
QInterpolatorVector *interpolators = registeredInterpolators();
const auto locker = qt_scoped_lock(registeredInterpolatorsMutex);
- QVariantAnimation::Interpolator ret = 0;
+ QVariantAnimation::Interpolator ret = nullptr;
if (interpolationType < interpolators->count()) {
ret = interpolators->at(interpolationType);
if (ret) return ret;
@@ -479,7 +479,7 @@ QVariantAnimation::Interpolator QVariantAnimationPrivate::getInterpolator(int in
case QMetaType::QRectF:
return castToInterpolator(_q_interpolateVariant<QRectF>);
default:
- return 0; //this type is not handled
+ return nullptr; //this type is not handled
}
}
diff --git a/src/corelib/codecs/qicucodec.cpp b/src/corelib/codecs/qicucodec.cpp
index 5a778c2638..f9092277b2 100644
--- a/src/corelib/codecs/qicucodec.cpp
+++ b/src/corelib/codecs/qicucodec.cpp
@@ -381,7 +381,7 @@ static QTextCodec *loadQtCodec(const char *name)
return QIsciiCodec::create(name);
#endif
- return 0;
+ return nullptr;
}
/// \threadsafe
@@ -438,7 +438,7 @@ QTextCodec *QIcuCodec::defaultCodecUnlocked()
{
QCoreGlobalData *globalData = QCoreGlobalData::instance();
if (!globalData)
- return 0;
+ return nullptr;
QTextCodec *c = globalData->codecForLocale.loadAcquire();
if (c)
return c;
@@ -523,13 +523,13 @@ QTextCodec *QIcuCodec::codecForNameUnlocked(const char *name)
return c;
if (qt_only)
- return 0;
+ return nullptr;
// check whether there is really a converter for the name available.
UConverter *conv = ucnv_open(standardName, &error);
if (!conv) {
qDebug("codecForName: ucnv_open failed %s %s", standardName, u_errorName(error));
- return 0;
+ return nullptr;
}
//qDebug() << "QIcuCodec: Standard name for " << name << "is" << standardName;
ucnv_close(conv);
@@ -552,7 +552,7 @@ QTextCodec *QIcuCodec::codecForMibUnlocked(int mib)
if (mib == 2107)
return codecForNameUnlocked("TSCII");
- return 0;
+ return nullptr;
}
@@ -567,7 +567,7 @@ QIcuCodec::~QIcuCodec()
UConverter *QIcuCodec::getConverter(QTextCodec::ConverterState *state) const
{
- UConverter *conv = 0;
+ UConverter *conv = nullptr;
if (state) {
if (!state->d) {
// first time
@@ -609,7 +609,7 @@ QString QIcuCodec::convertToUnicode(const char *chars, int length, QTextCodec::C
ucnv_toUnicode(conv,
&uc, ucEnd,
&chars, end,
- 0, false, &error);
+ nullptr, false, &error);
if (!U_SUCCESS(error) && error != U_BUFFER_OVERFLOW_ERROR) {
qDebug("convertToUnicode failed: %s", u_errorName(error));
break;
@@ -646,7 +646,7 @@ QByteArray QIcuCodec::convertFromUnicode(const QChar *unicode, int length, QText
ucnv_fromUnicode(conv,
&ch, chEnd,
&uc, end,
- 0, false, &error);
+ nullptr, false, &error);
if (!U_SUCCESS(error))
qDebug("convertFromUnicode failed: %s", u_errorName(error));
convertedChars = ch - string.data();
diff --git a/src/corelib/codecs/qisciicodec.cpp b/src/corelib/codecs/qisciicodec.cpp
index d9a86d77c7..9689818559 100644
--- a/src/corelib/codecs/qisciicodec.cpp
+++ b/src/corelib/codecs/qisciicodec.cpp
@@ -74,7 +74,7 @@ QTextCodec *QIsciiCodec::create(const char *name)
if (qTextCodecNameMatch(name, codecs[i].name))
return new QIsciiCodec(i);
}
- return 0;
+ return nullptr;
}
QIsciiCodec::~QIsciiCodec()
diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp
index 16a9b8a7c3..4e82620003 100644
--- a/src/corelib/codecs/qsimplecodec.cpp
+++ b/src/corelib/codecs/qsimplecodec.cpp
@@ -51,7 +51,7 @@ static const struct {
quint16 values[128];
} unicodevalues[QSimpleTextCodec::numSimpleCodecs] = {
// from RFC 1489, ftp://ftp.isi.edu/in-notes/rfc1489.txt
- { "KOI8-R", { "csKOI8R", 0 }, 2084,
+ { "KOI8-R", { "csKOI8R", nullptr }, 2084,
{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248,
@@ -72,7 +72,7 @@ static const struct {
// it should be 0x2022 (BULLET).
// from RFC 2319, ftp://ftp.isi.edu/in-notes/rfc2319.txt
- { "KOI8-U", { "KOI8-RU", 0 }, 2088,
+ { "KOI8-U", { "KOI8-RU", nullptr }, 2088,
{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248,
@@ -97,7 +97,7 @@ static const struct {
// $ for A in 8 9 A B C D E F ; do for B in 0 1 2 3 4 5 6 7 8 9 A B C D E F ; do echo 0x${A}${B} 0xFFFD ; done ; done > /tmp/digits ; for a in 8859-* ; do (awk '/^0x[89ABCDEF]/{ print $1, $2 }' < $a ; cat /tmp/digits) | sort | uniq -w4 | cut -c6- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/$a ; done
// then I inserted the files manually.
- { "ISO-8859-2", {"latin2", "iso-ir-101", "csISOLatin2", 0 }, 5,
+ { "ISO-8859-2", {"latin2", "iso-ir-101", "csISOLatin2", nullptr }, 5,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -114,7 +114,7 @@ static const struct {
0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9} },
- { "ISO-8859-3", { "latin3", "iso-ir-109", "csISOLatin3", 0 }, 6,
+ { "ISO-8859-3", { "latin3", "iso-ir-109", "csISOLatin3", nullptr }, 6,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -131,7 +131,7 @@ static const struct {
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
0xFFFD, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7,
0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9} },
- { "ISO-8859-4", { "latin4", "iso-ir-110", "csISOLatin4", 0 }, 7,
+ { "ISO-8859-4", { "latin4", "iso-ir-110", "csISOLatin4", nullptr }, 7,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -148,7 +148,7 @@ static const struct {
0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B,
0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9} },
- { "ISO-8859-5", { "cyrillic", "iso-ir-144", "csISOLatinCyrillic", 0 }, 8,
+ { "ISO-8859-5", { "cyrillic", "iso-ir-144", "csISOLatinCyrillic", nullptr }, 8,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -165,7 +165,7 @@ static const struct {
0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F} },
- { "ISO-8859-6", { "ISO-8859-6-I", "ECMA-114", "ASMO-708", "arabic", "iso-ir-127", "csISOLatinArabic", 0 }, 82,
+ { "ISO-8859-6", { "ISO-8859-6-I", "ECMA-114", "ASMO-708", "arabic", "iso-ir-127", "csISOLatinArabic", nullptr }, 82,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -182,7 +182,7 @@ static const struct {
0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F,
0x0650, 0x0651, 0x0652, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} },
- { "ISO-8859-7", { "ECMA-118", "greek", "iso-ir-126", "csISOLatinGreek", 0 }, 10,
+ { "ISO-8859-7", { "ECMA-118", "greek", "iso-ir-126", "csISOLatinGreek", nullptr }, 10,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -199,7 +199,7 @@ static const struct {
0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0xFFFD} },
- { "ISO-8859-8", { "ISO 8859-8-I", "iso-ir-138", "hebrew", "csISOLatinHebrew", 0 }, 85,
+ { "ISO-8859-8", { "ISO 8859-8-I", "iso-ir-138", "hebrew", "csISOLatinHebrew", nullptr }, 85,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -216,7 +216,7 @@ static const struct {
0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} },
- { "ISO-8859-9", { "iso-ir-148", "latin5", "csISOLatin5", 0 }, 12,
+ { "ISO-8859-9", { "iso-ir-148", "latin5", "csISOLatin5", nullptr }, 12,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -233,7 +233,7 @@ static const struct {
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF} },
- { "ISO-8859-10", { "iso-ir-157", "latin6", "ISO-8859-10:1992", "csISOLatin6", 0 }, 13,
+ { "ISO-8859-10", { "iso-ir-157", "latin6", "ISO-8859-10:1992", "csISOLatin6", nullptr }, 13,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -250,7 +250,7 @@ static const struct {
0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF,
0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169,
0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138} },
- { "ISO-8859-13", { 0 }, 109,
+ { "ISO-8859-13", { nullptr }, 109,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -267,7 +267,7 @@ static const struct {
0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019} },
- { "ISO-8859-14", { "iso-ir-199", "latin8", "iso-celtic", 0 }, 110,
+ { "ISO-8859-14", { "iso-ir-199", "latin8", "iso-celtic", nullptr }, 110,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -284,7 +284,7 @@ static const struct {
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF} },
- { "ISO-8859-16", { "iso-ir-226", "latin10", 0 }, 112,
+ { "ISO-8859-16", { "iso-ir-226", "latin10", nullptr }, 112,
{ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
@@ -305,7 +305,7 @@ static const struct {
// next bits generated again from tables on the Unicode 3.0 CD.
// $ for a in CP* ; do (awk '/^0x[89ABCDEF]/{ print $1, $2 }' < $a) | sort | sed -e 's/#UNDEF.*$/0xFFFD/' | cut -c6- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/$a ; done
- { "IBM850", { "CP850", "csPC850Multilingual", 0 }, 2009,
+ { "IBM850", { "CP850", "csPC850Multilingual", nullptr }, 2009,
{ 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7,
0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9,
@@ -322,7 +322,7 @@ static const struct {
0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0} },
- { "IBM874", { "CP874", 0 }, -874, //### what is the mib?
+ { "IBM874", { "CP874", nullptr }, -874, //### what is the mib?
{ 0x20AC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x2026, 0xFFFD, 0xFFFD,
0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -339,7 +339,7 @@ static const struct {
0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} },
- { "IBM866", { "CP866", "csIBM866", 0 }, 2086,
+ { "IBM866", { "CP866", "csIBM866", nullptr }, 2086,
{ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
@@ -357,7 +357,7 @@ static const struct {
0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E,
0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0} },
- { "windows-1250", { "CP1250", 0 }, 2250,
+ { "windows-1250", { "CP1250", nullptr }, 2250,
{ 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021,
0xFFFD, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -374,7 +374,7 @@ static const struct {
0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9} },
- { "windows-1251", { "CP1251", 0 }, 2251,
+ { "windows-1251", { "CP1251", nullptr }, 2251,
{ 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -391,7 +391,7 @@ static const struct {
0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F} },
- { "windows-1252", { "CP1252", 0 }, 2252,
+ { "windows-1252", { "CP1252", nullptr }, 2252,
{ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0x017D, 0xFFFD,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -408,7 +408,7 @@ static const struct {
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF} },
- { "windows-1253", {"CP1253", 0 }, 2253,
+ { "windows-1253", {"CP1253", nullptr }, 2253,
{ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -425,7 +425,7 @@ static const struct {
0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0xFFFD} },
- { "windows-1254", { "CP1254", 0 }, 2254,
+ { "windows-1254", { "CP1254", nullptr }, 2254,
{ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -442,7 +442,7 @@ static const struct {
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF} },
- { "windows-1255", { "CP1255", 0 }, 2255,
+ { "windows-1255", { "CP1255", nullptr }, 2255,
{ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -459,7 +459,7 @@ static const struct {
0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0xFFFD, 0x200E, 0x200F, 0xFFFD} },
- { "windows-1256", { "CP1256", 0 }, 2256,
+ { "windows-1256", { "CP1256", nullptr }, 2256,
{ 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -476,7 +476,7 @@ static const struct {
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2} },
- { "windows-1257", { "CP1257", 0 }, 2257,
+ { "windows-1257", { "CP1257", nullptr }, 2257,
{ 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021,
0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0x00A8, 0x02C7, 0x00B8,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -493,7 +493,7 @@ static const struct {
0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9} },
- { "windows-1258", { "CP1258", 0 }, 2258,
+ { "windows-1258", { "CP1258", nullptr }, 2258,
{ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0xFFFD, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -511,7 +511,7 @@ static const struct {
0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF} },
- { "macintosh", { "Apple Roman", "MacRoman", 0 }, 2027,
+ { "macintosh", { "Apple Roman", "MacRoman", nullptr }, 2027,
{ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
@@ -532,7 +532,7 @@ static const struct {
// This one is based on the charmap file
// /usr/share/i18n/charmaps/SAMI-WS2.gz, which is manually adapted
// to this format by Boerre Gaup <boerre@subdimension.com>
- { "WINSAMI2", { "WS2", 0 }, -165,
+ { "WINSAMI2", { "WS2", nullptr }, -165,
{ 0x20AC, 0xFFFD, 0x010C, 0x0192, 0x010D, 0x01B7, 0x0292, 0x01EE,
0x01EF, 0x0110, 0x0160, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -555,7 +555,7 @@ static const struct {
// to iso8859-11, so we name it 8859-11 here, but recognise the name tis620 too.
// $ for A in 8 9 A B C D E F ; do for B in 0 1 2 3 4 5 6 7 8 9 A B C D E F ; do echo x${A}${B} 0xFFFD ; done ; done > /tmp/digits ; (cut -c25- < TIS-620 ; cat /tmp/digits) | awk '/^x[89ABCDEF]/{ print $1, $2 }' | sed -e 's/<U/0x/' -e 's/>//' | sort | uniq -w4 | cut -c5- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/tis-620
- { "TIS-620", { "ISO 8859-11", 0 }, 2259, // Thai character set mib enum taken from tis620 (which is byte by byte equivalent)
+ { "TIS-620", { "ISO 8859-11", nullptr }, 2259, // Thai character set mib enum taken from tis620 (which is byte by byte equivalent)
{ 0x20AC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x2026, 0xFFFD, 0xFFFD,
0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
@@ -582,7 +582,7 @@ static const struct {
Alias: r8
Alias: csHPRoman8
*/
- { "hp-roman8", { "roman8", "csHPRoman8", 0 }, 2004,
+ { "hp-roman8", { "roman8", "csHPRoman8", nullptr }, 2004,
{ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
@@ -603,7 +603,7 @@ static const struct {
// if you add more chacater sets at the end, change LAST_MIB above
};
-QSimpleTextCodec::QSimpleTextCodec(int i) : forwardIndex(i), reverseMap(0)
+QSimpleTextCodec::QSimpleTextCodec(int i) : forwardIndex(i), reverseMap(nullptr)
{
}
@@ -640,7 +640,7 @@ static QByteArray *buildReverseMap(int forwardIndex)
QString QSimpleTextCodec::convertToUnicode(const char* chars, int len, ConverterState *) const
{
- if (len <= 0 || chars == 0)
+ if (len <= 0 || chars == nullptr)
return QString();
const unsigned char * c = (const unsigned char *)chars;
@@ -665,7 +665,7 @@ QByteArray QSimpleTextCodec::convertFromUnicode(const QChar *in, int length, Con
QByteArray *rmap = reverseMap.loadAcquire();
if (!rmap){
rmap = buildReverseMap(this->forwardIndex);
- if (!reverseMap.testAndSetRelease(0, rmap)) {
+ if (!reverseMap.testAndSetRelease(nullptr, rmap)) {
delete rmap;
rmap = reverseMap.loadAcquire();
}
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index ae360239c6..eb60ad213c 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -1086,6 +1086,26 @@ Mozilla License) is included. The data is then also used in QNetworkCookieJar::v
"win32_system_libs": {
"label": "Windows System Libraries",
"condition": "config.win32 && libs.advapi32 && libs.gdi32 && libs.kernel32 && libs.netapi32 && libs.ole32 && libs.shell32 && libs.uuid && libs.user32 && libs.winmm && libs.ws2_32"
+ },
+ "cborstreamreader": {
+ "label": "CBOR stream reading",
+ "purpose": "Provides support for reading the CBOR binary format.
+
+Note that this is required for plugin loading. Qt GUI needs QPA plugins for basic operation.",
+ "section": "Utilities",
+ "output": [ "publicFeature" ]
+ },
+ "cborstreamwriter": {
+ "label": "CBOR stream writing",
+ "purpose": "Provides support for writing the CBOR binary format.",
+ "section": "Utilities",
+ "output": [ "publicFeature" ]
+ },
+ "binaryjson": {
+ "label": "Binary JSON (deprecated)",
+ "purpose": "Provides support for the deprecated binary JSON format.",
+ "section": "Utilities",
+ "output": [ "publicFeature" ]
}
},
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 6c101e21ca..3430154d13 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -17,6 +17,7 @@ DEFINES += QT_NO_USING_NAMESPACE QT_NO_FOREACH
msvc:equals(QT_ARCH, i386): QMAKE_LFLAGS += /BASE:0x67000000
CONFIG += simd optimize_full
+CONFIG += metatypes install_metatypes
QMAKE_DOCS = $$PWD/doc/qtcore.qdocconf
diff --git a/src/corelib/doc/snippets/code/doc_src_properties.cpp b/src/corelib/doc/snippets/code/doc_src_properties.cpp
index b72c9d13e1..a67945bbcf 100644
--- a/src/corelib/doc/snippets/code/doc_src_properties.cpp
+++ b/src/corelib/doc/snippets/code/doc_src_properties.cpp
@@ -61,6 +61,7 @@ Q_PROPERTY(type name
[USER bool]
[CONSTANT]
[FINAL])
+ [REQUIRED]
//! [0]
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 eb75a29ca2..a540b88247 100644
--- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
@@ -50,6 +50,7 @@
//! [0]
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+label->setAlignment({ });
//! [0]
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp
index aae2456bf1..36b47e6f6e 100644
--- a/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp
@@ -56,7 +56,7 @@ QApplication::sendEvent(mainWindow, &event);
//! [1]
QPushButton *quitButton = new QPushButton("Quit");
-connect(quitButton, SIGNAL(clicked()), &app, SLOT(quit()), Qt::QueuedConnection);
+connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection);
//! [1]
@@ -79,12 +79,12 @@ Q_COREAPP_STARTUP_FUNCTION(preRoutineMyDebugTool)
//! [4]
-static int *global_ptr = 0;
+static int *global_ptr = nullptr;
static void cleanup_ptr()
{
delete [] global_ptr;
- global_ptr = 0;
+ global_ptr = nullptr;
}
void init_ptr()
@@ -125,9 +125,9 @@ private:
//! [6]
static inline QString tr(const char *sourceText,
- const char *comment = 0);
+ const char *comment = nullptr);
static inline QString trUtf8(const char *sourceText,
- const char *comment = 0);
+ const char *comment = nullptr);
//! [6]
diff --git a/src/corelib/doc/snippets/code/src_corelib_statemachine_qstatemachine.cpp b/src/corelib/doc/snippets/code/src_corelib_statemachine_qstatemachine.cpp
index a606da1a0c..c756116de4 100644
--- a/src/corelib/doc/snippets/code/src_corelib_statemachine_qstatemachine.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_statemachine_qstatemachine.cpp
@@ -56,7 +56,7 @@ QState *s1 = new QState();
s1->assignProperty(&button, "text", "Click me");
QFinalState *s2 = new QFinalState();
-s1->addTransition(&button, SIGNAL(clicked()), s2);
+s1->addTransition(&button, &QPushButton::clicked, s2);
machine.addState(s1);
machine.addState(s2);
diff --git a/src/corelib/doc/snippets/code/src_corelib_thread_qfuturewatcher.cpp b/src/corelib/doc/snippets/code/src_corelib_thread_qfuturewatcher.cpp
index 043974b25b..336c1e9c79 100644
--- a/src/corelib/doc/snippets/code/src_corelib_thread_qfuturewatcher.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_thread_qfuturewatcher.cpp
@@ -52,7 +52,7 @@
// Instantiate the objects and connect to the finished signal.
MyClass myObject;
QFutureWatcher<int> watcher;
-connect(&watcher, SIGNAL(finished()), &myObject, SLOT(handleFinished()));
+connect(&watcher, QFutureWatcher<int>::finished, &myObject, &MyClass::handleFinished);
// Start the computation.
QFuture<int> future = QtConcurrent::run(...);
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 11ab50687d..01f620cf08 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
@@ -429,6 +429,19 @@ QByteArray::fromBase64("PHA+SGVsbG8/PC9wPg==", QByteArray::Base64Encoding); // r
QByteArray::fromBase64("PHA-SGVsbG8_PC9wPg==", QByteArray::Base64UrlEncoding); // returns "<p>Hello?</p>"
//! [44bis]
+//! [44ter]
+void process(const QByteArray &);
+
+if (auto result = QByteArray::fromBase64Encoding(encodedData))
+ process(*result);
+//! [44ter]
+
+//! [44quater]
+auto result = QByteArray::fromBase64Encoding(encodedData);
+if (result.decodingStatus == QByteArray::Base64DecodingStatus::Ok)
+ process(result.decoded);
+//! [44quater]
+
//! [45]
QByteArray text = QByteArray::fromHex("517420697320677265617421");
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp
index e070ada069..d30ad50ffc 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp
@@ -119,22 +119,6 @@ hash.insert("plenty", 2000);
//! [9]
-//! [10]
-QList<int> values = hash.values("plenty");
-for (int i = 0; i < values.size(); ++i)
- cout << values.at(i) << Qt::endl;
-//! [10]
-
-
-//! [11]
-QHash<QString, int>::iterator i = hash.find("plenty");
-while (i != hash.end() && i.key() == "plenty") {
- cout << i.value() << Qt::endl;
- ++i;
-}
-//! [11]
-
-
//! [12]
QHash<QString, int> hash;
...
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp
index 004a810fce..80859d5ba5 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp
@@ -56,10 +56,10 @@ progressBar->setRange(0, 100);
// Construct a 1-second timeline with a frame range of 0 - 100
QTimeLine *timeLine = new QTimeLine(1000, this);
timeLine->setFrameRange(0, 100);
-connect(timeLine, SIGNAL(frameChanged(int)), progressBar, SLOT(setValue(int)));
+connect(timeLine, &QTimeLine::frameChanged, progressBar, &QProgressBar::setValue);
// Clicking the push button will start the progress bar animation
pushButton = new QPushButton(tr("Start animation"), this);
-connect(pushButton, SIGNAL(clicked()), timeLine, SLOT(start()));
+connect(pushButton, &QPushButton::clicked, timeLine, &QTimeLine::start);
...
//! [0]
diff --git a/src/corelib/doc/snippets/qsignalmapper/buttonwidget.cpp b/src/corelib/doc/snippets/qsignalmapper/buttonwidget.cpp
index e91c41b305..879cdbe329 100644
--- a/src/corelib/doc/snippets/qsignalmapper/buttonwidget.cpp
+++ b/src/corelib/doc/snippets/qsignalmapper/buttonwidget.cpp
@@ -48,11 +48,10 @@
**
****************************************************************************/
-#include <QtGui>
-#include <QtWidgets>
-
#include "buttonwidget.h"
+#include <QtWidgets>
+
//! [0]
ButtonWidget::ButtonWidget(const QStringList &texts, QWidget *parent)
: QWidget(parent)
@@ -62,15 +61,15 @@ ButtonWidget::ButtonWidget(const QStringList &texts, QWidget *parent)
QGridLayout *gridLayout = new QGridLayout;
for (int i = 0; i < texts.size(); ++i) {
QPushButton *button = new QPushButton(texts[i]);
- connect(button, SIGNAL(clicked()), signalMapper, SLOT(map()));
+ connect(button, &QPushButton::clicked, signalMapper, &QSignalMapper::map);
//! [0] //! [1]
signalMapper->setMapping(button, texts[i]);
gridLayout->addWidget(button, i / 3, i % 3);
}
- connect(signalMapper, SIGNAL(mapped(QString)),
+ connect(signalMapper, &QSignalMapper::mappedString,
//! [1] //! [2]
- this, SIGNAL(clicked(QString)));
+ this, &ButtonWidget::clicked);
setLayout(gridLayout);
}
@@ -84,7 +83,7 @@ ButtonWidget::ButtonWidget(const QStringList &texts, QWidget *parent)
for (int i = 0; i < texts.size(); ++i) {
QString text = texts[i];
QPushButton *button = new QPushButton(text);
- connect(button, &QPushButton::clicked, [=] { clicked(text); });
+ connect(button, &QPushButton::clicked, [this, text] { clicked(text); });
gridLayout->addWidget(button, i / 3, i % 3);
}
setLayout(gridLayout);
diff --git a/src/corelib/doc/snippets/qsignalmapper/buttonwidget.h b/src/corelib/doc/snippets/qsignalmapper/buttonwidget.h
index f55683c2d5..b9d59f8dd8 100644
--- a/src/corelib/doc/snippets/qsignalmapper/buttonwidget.h
+++ b/src/corelib/doc/snippets/qsignalmapper/buttonwidget.h
@@ -51,7 +51,7 @@
#ifndef BUTTONWIDGET_H
#define BUTTONWIDGET_H
-#include <qwidget.h>
+#include <QWidget>
class QSignalMapper;
class QString;
@@ -63,7 +63,7 @@ class ButtonWidget : public QWidget
Q_OBJECT
public:
- ButtonWidget(const QStringList &texts, QWidget *parent = 0);
+ ButtonWidget(const QStringList &texts, QWidget *parent = nullptr);
signals:
void clicked(const QString &text);
diff --git a/src/corelib/doc/snippets/resource-system/mainwindow.cpp b/src/corelib/doc/snippets/resource-system/mainwindow.cpp
index 86e93aaa62..6dc525304c 100644
--- a/src/corelib/doc/snippets/resource-system/mainwindow.cpp
+++ b/src/corelib/doc/snippets/resource-system/mainwindow.cpp
@@ -68,10 +68,10 @@ MainWindow::MainWindow()
readSettings();
- connect(textEdit->document(), SIGNAL(contentsChanged()),
- this, SLOT(documentWasModified()));
+ connect(textEdit->document(), &QTextEdit::contentsChanged,
+ this, &QAction::documentWasModified);
- setCurrentFile("");
+ setCurrentFile(QString());
setUnifiedTitleAndToolBarOnMac(true);
}
//! [2]
@@ -95,7 +95,7 @@ void MainWindow::newFile()
{
if (maybeSave()) {
textEdit->clear();
- setCurrentFile("");
+ setCurrentFile(QString());
}
}
//! [6]
@@ -162,31 +162,31 @@ void MainWindow::createActions()
newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this);
newAct->setShortcuts(QKeySequence::New);
newAct->setStatusTip(tr("Create a new file"));
- connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
+ connect(newAct, &QAction::triggered, this, &MainWindow::newFile);
//! [19]
openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this);
openAct->setShortcuts(QKeySequence::Open);
openAct->setStatusTip(tr("Open an existing file"));
- connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+ connect(openAct, &QAction::triggered, this, &MainWindow::open);
//! [18] //! [19]
saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this);
saveAct->setShortcuts(QKeySequence::Save);
saveAct->setStatusTip(tr("Save the document to disk"));
- connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
+ connect(saveAct, &QAction::triggered, this, &MainWindow::save);
saveAsAct = new QAction(tr("Save &As..."), this);
saveAsAct->setShortcuts(QKeySequence::SaveAs);
saveAsAct->setStatusTip(tr("Save the document under a new name"));
- connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+ connect(saveAsAct, &QAction::triggered, this, &MainWindow::saveAs);
//! [20]
exitAct = new QAction(tr("E&xit"), this);
exitAct->setShortcuts(QKeySequence::Quit);
//! [20]
exitAct->setStatusTip(tr("Exit the application"));
- connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+ connect(exitAct, &QAction::triggered, this, &MainWindow::close);
//! [21]
cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this);
@@ -194,38 +194,38 @@ void MainWindow::createActions()
cutAct->setShortcuts(QKeySequence::Cut);
cutAct->setStatusTip(tr("Cut the current selection's contents to the "
"clipboard"));
- connect(cutAct, SIGNAL(triggered()), textEdit, SLOT(cut()));
+ connect(cutAct, &QAction::triggered, textEdit, &QTextEdit::cut);
copyAct = new QAction(QIcon(":/images/copy.png"), tr("&Copy"), this);
copyAct->setShortcuts(QKeySequence::Copy);
copyAct->setStatusTip(tr("Copy the current selection's contents to the "
"clipboard"));
- connect(copyAct, SIGNAL(triggered()), textEdit, SLOT(copy()));
+ connect(copyAct, &QAction::triggered, textEdit, &QTextEdit::copy);
pasteAct = new QAction(QIcon(":/images/paste.png"), tr("&Paste"), this);
pasteAct->setShortcuts(QKeySequence::Paste);
pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current "
"selection"));
- connect(pasteAct, SIGNAL(triggered()), textEdit, SLOT(paste()));
+ connect(pasteAct, &QAction::triggered, textEdit, &QTextEdit::paste);
aboutAct = new QAction(tr("&About"), this);
aboutAct->setStatusTip(tr("Show the application's About box"));
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+ connect(aboutAct, &QAction::triggered, this, &MainWindow::about);
//! [22]
aboutQtAct = new QAction(tr("About &Qt"), this);
aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
//! [22]
//! [23]
cutAct->setEnabled(false);
//! [23] //! [24]
copyAct->setEnabled(false);
- connect(textEdit, SIGNAL(copyAvailable(bool)),
- cutAct, SLOT(setEnabled(bool)));
- connect(textEdit, SIGNAL(copyAvailable(bool)),
- copyAct, SLOT(setEnabled(bool)));
+ connect(textEdit, &QTextEdit::copyAvailable,
+ cutAct, &QAction::setEnabled);
+ connect(textEdit, &QTextEdit::copyAvailable,
+ copyAct, &QAction::setEnabled);
}
//! [24]
diff --git a/src/corelib/doc/snippets/statemachine/main.cpp b/src/corelib/doc/snippets/statemachine/main.cpp
index 8cd8b69e12..c399f4f199 100644
--- a/src/corelib/doc/snippets/statemachine/main.cpp
+++ b/src/corelib/doc/snippets/statemachine/main.cpp
@@ -48,13 +48,14 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
int main(int argv, char **args)
{
QApplication app(argv, args);
QLabel *label = new QLabel;
+ QPushButton *button = new QPushButton;
//![0]
QStateMachine machine;
@@ -70,14 +71,14 @@ int main(int argv, char **args)
//![4]
//![5]
- QObject::connect(s3, SIGNAL(entered()), button, SLOT(showMaximized()));
- QObject::connect(s3, SIGNAL(exited()), button, SLOT(showMinimized()));
+ QObject::connect(s3, &QState::entered, button, &QPushButton:showMaximized);
+ QObject::connect(s3, &QState::exited, button, &QPushButton::showMinimized);
//![5]
//![1]
- s1->addTransition(button, SIGNAL(clicked()), s2);
- s2->addTransition(button, SIGNAL(clicked()), s3);
- s3->addTransition(button, SIGNAL(clicked()), s1);
+ s1->addTransition(button, &QPushButton::clicked, s2);
+ s2->addTransition(button, &QPushButton::clicked, s3);
+ s3->addTransition(button, &QPushButton::clicked, s1);
//![1]
//![2]
diff --git a/src/corelib/doc/snippets/statemachine/main2.cpp b/src/corelib/doc/snippets/statemachine/main2.cpp
index 96eb912b14..dedd2d29bf 100644
--- a/src/corelib/doc/snippets/statemachine/main2.cpp
+++ b/src/corelib/doc/snippets/statemachine/main2.cpp
@@ -48,11 +48,11 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
int main(int argv, char **args)
{
- QApplication app(argv, args);
+ QApplication app(argv, args);
QStateMachine machine;
@@ -66,16 +66,17 @@ int main(int argv, char **args)
//![0]
//![2]
- s12->addTransition(quitButton, SIGNAL(clicked()), s12);
+ s12->addTransition(quitButton, &QPushButton::clicked, s12);
//![2]
//![1]
QFinalState *s2 = new QFinalState();
- s1->addTransition(quitButton, SIGNAL(clicked()), s2);
+ s1->addTransition(quitButton, &QPushButton::clicked, s2);
machine.addState(s2);
machine.setInitialState(s1);
- QObject::connect(&machine, SIGNAL(finished()), QApplication::instance(), SLOT(quit()));
+ QObject::connect(&machine, &QStateMachine::finished,
+ QCoreApplication::instance(), &QCoreApplication::quit);
//![1]
QButton *interruptButton = new QPushButton("Interrupt Button");
@@ -90,11 +91,11 @@ int main(int argv, char **args)
mbox->addButton(QMessageBox::Ok);
mbox->setText("Interrupted!");
mbox->setIcon(QMessageBox::Information);
- QObject::connect(s3, SIGNAL(entered()), mbox, SLOT(exec()));
+ QObject::connect(s3, &QState::entered, mbox, &QMessageBox::exec);
s3->addTransition(s1h);
machine.addState(s3);
- s1->addTransition(interruptButton, SIGNAL(clicked()), s3);
+ s1->addTransition(interruptButton, &QPushButton::clicked, s3);
//![3]
return app.exec();
diff --git a/src/corelib/doc/snippets/statemachine/main3.cpp b/src/corelib/doc/snippets/statemachine/main3.cpp
index bc9a0e29c4..b665565aef 100644
--- a/src/corelib/doc/snippets/statemachine/main3.cpp
+++ b/src/corelib/doc/snippets/statemachine/main3.cpp
@@ -62,7 +62,7 @@ int main(int argv, char **args)
//![0]
//![1]
- s1->addTransition(s1, SIGNAL(finished()), s2);
+ s1->addTransition(s1, &QState::finished, s2);
//![1]
return app.exec();
diff --git a/src/corelib/doc/snippets/statemachine/main5.cpp b/src/corelib/doc/snippets/statemachine/main5.cpp
index 38bb2cb475..d701f51e2b 100644
--- a/src/corelib/doc/snippets/statemachine/main5.cpp
+++ b/src/corelib/doc/snippets/statemachine/main5.cpp
@@ -98,7 +98,7 @@ int main(int argv, char **args)
s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100));
- s1->addTransition(button, SIGNAL(clicked()), s2);
+ s1->addTransition(button, &QPushButton::clicked, s2);
//![3]
}
@@ -111,7 +111,7 @@ int main(int argv, char **args)
s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100));
- QSignalTransition *transition = s1->addTransition(button, SIGNAL(clicked()), s2);
+ QSignalTransition *transition = s1->addTransition(button, &QPushButton::clicked, s2);
transition->addAnimation(new QPropertyAnimation(button, "geometry"));
//![4]
@@ -130,9 +130,9 @@ int main(int argv, char **args)
QState *s2 = new QState();
s2->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
- connect(s2, SIGNAL(entered()), messageBox, SLOT(exec()));
+ connect(s2, &QState::entered, messageBox, SLOT(exec()));
- s1->addTransition(button, SIGNAL(clicked()), s2);
+ s1->addTransition(button, &QPushButton::clicked, s2);
//![5]
}
@@ -151,10 +151,10 @@ int main(int argv, char **args)
s2->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
QState *s3 = new QState();
- connect(s3, SIGNAL(entered()), messageBox, SLOT(exec()));
+ connect(s3, &QState::entered, messageBox, SLOT(exec()));
- s1->addTransition(button, SIGNAL(clicked()), s2);
- s2->addTransition(s2, SIGNAL(propertiesAssigned()), s3);
+ s1->addTransition(button, &QPushButton::clicked, s2);
+ s2->addTransition(s2, &QState::propertiesAssigned, s3);
//![6]
}
diff --git a/src/corelib/doc/snippets/timers/analogclock.cpp b/src/corelib/doc/snippets/timers/analogclock.cpp
index 4e1957a450..3edfce3235 100644
--- a/src/corelib/doc/snippets/timers/analogclock.cpp
+++ b/src/corelib/doc/snippets/timers/analogclock.cpp
@@ -61,7 +61,7 @@ AnalogClock::AnalogClock(QWidget *parent)
//! [3] //! [4]
QTimer *timer = new QTimer(this);
//! [4] //! [5]
- connect(timer, SIGNAL(timeout()), this, SLOT(update()));
+ connect(timer, &QTimer::timeout, this, QOverload<>::of(&AnalogClock::update));
//! [5] //! [6]
timer->start(1000);
//! [6]
diff --git a/src/corelib/doc/snippets/timers/timers.cpp b/src/corelib/doc/snippets/timers/timers.cpp
index 5f95899af2..eb0c82c625 100644
--- a/src/corelib/doc/snippets/timers/timers.cpp
+++ b/src/corelib/doc/snippets/timers/timers.cpp
@@ -61,13 +61,13 @@ Foo::Foo()
//! [0]
QTimer *timer = new QTimer(this);
//! [0] //! [1]
- connect(timer, SIGNAL(timeout()), this, SLOT(updateCaption()));
+ connect(timer, &QTimer::timeout, this, &Foo::updateCaption);
//! [1] //! [2]
timer->start(1000);
//! [2]
//! [3]
- QTimer::singleShot(200, this, SLOT(updateCaption()));
+ QTimer::singleShot(200, this, &Foo::updateCaption);
//! [3]
{
@@ -75,7 +75,7 @@ Foo::Foo()
//! [4]
QTimer *timer = new QTimer(this);
//! [4] //! [5]
- connect(timer, SIGNAL(timeout()), this, SLOT(processOneThing()));
+ connect(timer, &QTimer::timeout, this, &Foo::processOneThing);
//! [5] //! [6]
timer->start();
//! [6]
diff --git a/src/corelib/doc/src/animation.qdoc b/src/corelib/doc/src/animation.qdoc
index 0c1b2aed17..9cbe50d4a9 100644
--- a/src/corelib/doc/src/animation.qdoc
+++ b/src/corelib/doc/src/animation.qdoc
@@ -356,11 +356,11 @@
state2->assignProperty(button, "geometry", QRect(250, 250, 100, 30));
QSignalTransition *transition1 = state1->addTransition(button,
- SIGNAL(clicked()), state2);
+ &QPushButton::clicked, state2);
transition1->addAnimation(new QPropertyAnimation(button, "geometry"));
QSignalTransition *transition2 = state2->addTransition(button,
- SIGNAL(clicked()), state1);
+ &QPushButton::clicked, state1);
transition2->addAnimation(new QPropertyAnimation(button, "geometry"));
machine->start();
diff --git a/src/corelib/doc/src/objectmodel/properties.qdoc b/src/corelib/doc/src/objectmodel/properties.qdoc
index 9ef08cce07..680e5598f0 100644
--- a/src/corelib/doc/src/objectmodel/properties.qdoc
+++ b/src/corelib/doc/src/objectmodel/properties.qdoc
@@ -144,6 +144,12 @@
optimizations in some cases, but is not enforced by moc. Care must be taken
never to override a \c FINAL property.
+ \li The presence of the \c REQUIRED attribute indicates that the property
+ should be set by a user of the class. This is not enforced by moc, and is
+ mostly useful for classes exposed to QML. In QML, classes with REQUIRED
+ properties cannot be instantiated unless all REQUIRED properties have
+ been set.
+
\endlist
The \c READ, \c WRITE, and \c RESET functions can be inherited.
diff --git a/src/corelib/doc/src/statemachine.qdoc b/src/corelib/doc/src/statemachine.qdoc
index 43c8497ef2..881a0785c6 100644
--- a/src/corelib/doc/src/statemachine.qdoc
+++ b/src/corelib/doc/src/statemachine.qdoc
@@ -323,12 +323,12 @@
QState *s1 = new QState(&machine);
QPushButton button;
- QSignalTransition *trans = new QSignalTransition(&button, SIGNAL(clicked()));
+ QSignalTransition *trans = new QSignalTransition(&button, &QPushButton::clicked);
s1->addTransition(trans);
QMessageBox msgBox;
msgBox.setText("The button was clicked; carry on.");
- QObject::connect(trans, SIGNAL(triggered()), &msgBox, SLOT(exec()));
+ QObject::connect(trans, QSignalTransition::triggered, &msgBox, &QMessageBox::exec);
machine.setInitialState(s1);
\endcode
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 1ea4e7d287..aa38ef18c0 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -365,7 +365,6 @@
# define Q_COMPILER_ATTRIBUTES
# define Q_COMPILER_AUTO_FUNCTION
# define Q_COMPILER_CLASS_ENUM
-# define Q_COMPILER_CONSTEXPR
# define Q_COMPILER_DECLTYPE
# define Q_COMPILER_DEFAULT_MEMBERS
# define Q_COMPILER_DELETE_MEMBERS
diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index c6f071bc3f..b3daf43c04 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -74,6 +74,9 @@
#else
# define QT_FEATURE_alloca_malloc_h -1
#endif
+#define QT_FEATURE_binaryjson -1
+#define QT_FEATURE_cborstreamreader -1
+#define QT_FEATURE_cborstreamwriter 1
#define QT_CRYPTOGRAPHICHASH_ONLY_SHA1
#define QT_FEATURE_cxx11_random (__has_include(<random>) ? 1 : -1)
#define QT_NO_DATASTREAM
diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h
index bd3c219968..4f46de5eaa 100644
--- a/src/corelib/global/qflags.h
+++ b/src/corelib/global/qflags.h
@@ -93,8 +93,10 @@ class QFlags
"long long will overflow.");
Q_STATIC_ASSERT_X((std::is_enum<Enum>::value), "QFlags is only usable on enumeration types.");
+#if QT_DEPRECATED_SINCE(5,15)
struct Private;
typedef int (Private::*Zero);
+#endif
template <typename E> friend QDataStream &operator>>(QDataStream &, QFlags<E> &);
template <typename E> friend QDataStream &operator<<(QDataStream &, QFlags<E>);
public:
@@ -115,8 +117,11 @@ public:
Q_DECL_CONSTEXPR inline QFlags(const QFlags &other);
Q_DECL_CONSTEXPR inline QFlags &operator=(const QFlags &other);
#endif
+ Q_DECL_CONSTEXPR inline QFlags() noexcept : i(0) {}
Q_DECL_CONSTEXPR inline QFlags(Enum flags) noexcept : i(Int(flags)) {}
- Q_DECL_CONSTEXPR inline QFlags(Zero = nullptr) noexcept : i(0) {}
+#if QT_DEPRECATED_SINCE(5,15)
+ QT_DEPRECATED_X("Use default constructor instead") Q_DECL_CONSTEXPR inline QFlags(Zero) noexcept : i(0) {}
+#endif
Q_DECL_CONSTEXPR inline QFlags(QFlag flag) noexcept : i(flag) {}
Q_DECL_CONSTEXPR inline QFlags(std::initializer_list<Enum> flags) noexcept
diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp
index 0c9bb80cb2..80a851e4e4 100644
--- a/src/corelib/global/qfloat16.cpp
+++ b/src/corelib/global/qfloat16.cpp
@@ -146,6 +146,14 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \since 5.15
+ \fn qfloat16::copySign(qfloat16 sign) const noexcept
+
+ Returns a qfloat16 with the sign of \a sign but the rest of its value taken
+ from this qfloat16. Serves as qfloat16's equivalent of std::copysign().
+*/
+
+/*!
\internal
\since 5.14
Implements qFpClassify() for qfloat16.
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
index 02fd2f03cc..f35eefd922 100644
--- a/src/corelib/global/qfloat16.h
+++ b/src/corelib/global/qfloat16.h
@@ -84,6 +84,9 @@ public:
bool isNaN() const noexcept { return ((b16 >> 8) & 0x7e) == 0x7e; }
bool isFinite() const noexcept { return ((b16 >> 8) & 0x7c) != 0x7c; }
Q_CORE_EXPORT int fpClassify() const noexcept;
+ // Can't specialize std::copysign() for qfloat16
+ qfloat16 copySign(qfloat16 sign) const noexcept
+ { return qfloat16(Wrap((sign.b16 & 0x8000) | (b16 & 0x7fff))); }
// Support for std::numeric_limits<qfloat16>
static constexpr qfloat16 _limit_epsilon() noexcept { return qfloat16(Wrap(0x1400)); }
static constexpr qfloat16 _limit_min() noexcept { return qfloat16(Wrap(0x400)); }
@@ -92,7 +95,9 @@ public:
static constexpr qfloat16 _limit_lowest() noexcept { return qfloat16(Wrap(0xfbff)); }
static constexpr qfloat16 _limit_infinity() noexcept { return qfloat16(Wrap(0x7c00)); }
static constexpr qfloat16 _limit_quiet_NaN() noexcept { return qfloat16(Wrap(0x7e00)); }
- // Signalling NaN is 0x7f00
+#if QT_CONFIG(signaling_nan)
+ static constexpr qfloat16 _limit_signaling_NaN() noexcept { return qfloat16(Wrap(0x7f00)); }
+#endif
inline constexpr bool isNormal() const noexcept
{ return (b16 & 0x7fff) == 0 || ((b16 & 0x7c00) && (b16 & 0x7c00) != 0x7c00); }
private:
@@ -328,6 +333,12 @@ public:
{ return QT_PREPEND_NAMESPACE(qfloat16)::_limit_infinity(); }
static constexpr QT_PREPEND_NAMESPACE(qfloat16) quiet_NaN()
{ return QT_PREPEND_NAMESPACE(qfloat16)::_limit_quiet_NaN(); }
+#if QT_CONFIG(signaling_nan)
+ static constexpr QT_PREPEND_NAMESPACE(qfloat16) signaling_NaN()
+ { return QT_PREPEND_NAMESPACE(qfloat16)::_limit_signaling_NaN(); }
+#else
+ static constexpr bool has_signaling_NaN = false;
+#endif
};
template<> class numeric_limits<const QT_PREPEND_NAMESPACE(qfloat16)>
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index c145c46f78..0f7ba8580e 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -139,10 +139,12 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n);
// in. The idea here is to error or warn if otherwise implicit Qt
// assumptions are not fulfilled on new hardware or compilers
// (if this list becomes too long, consider factoring into a separate file)
-Q_STATIC_ASSERT_X(sizeof(int) == 4, "Qt assumes that int is 32 bits");
Q_STATIC_ASSERT_X(UCHAR_MAX == 255, "Qt assumes that char is 8 bits");
+Q_STATIC_ASSERT_X(sizeof(int) == 4, "Qt assumes that int is 32 bits");
Q_STATIC_ASSERT_X(QT_POINTER_SIZE == sizeof(void *), "QT_POINTER_SIZE defined incorrectly");
Q_STATIC_ASSERT_X(sizeof(float) == 4, "Qt assumes that float is 32 bits");
+Q_STATIC_ASSERT_X(sizeof(char16_t) == 2, "Qt assumes that char16_t is 16 bits");
+Q_STATIC_ASSERT_X(sizeof(char32_t) == 4, "Qt assumes that char32_t is 32 bits");
// While we'd like to check for __STDC_IEC_559__, as per ISO/IEC 9899:2011
// Annex F (C11, normative for C++11), there are a few corner cases regarding
@@ -250,7 +252,7 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
Qt::Alignment type is simply a typedef for
QFlags<Qt::AlignmentFlag>. QLabel::setAlignment() takes a
Qt::Alignment parameter, which means that any combination of
- Qt::AlignmentFlag values, or 0, is legal:
+ Qt::AlignmentFlag values, or \c{{ }}, is legal:
\snippet code/src_corelib_global_qglobal.cpp 0
@@ -318,10 +320,20 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
*/
/*!
+ \fn template <typename Enum> QFlags<Enum>::QFlags()
+ \since 5.15
+
+ Constructs a QFlags object with no flags set.
+*/
+
+/*!
\fn template <typename Enum> QFlags<Enum>::QFlags(Zero)
+ \deprecated
Constructs a QFlags object with no flags set. The parameter must be a
literal 0 value.
+
+ Deprecated, use default constructor instead.
*/
/*!
@@ -690,7 +702,7 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
64-bit integer literals in a platform-independent way. The
Q_CHECK_PTR() macro prints a warning containing the source code's
file name and line number, saying that the program ran out of
- memory, if the pointer is 0. The qPrintable() and qUtf8Printable()
+ memory, if the pointer is \nullptr. The qPrintable() and qUtf8Printable()
macros represent an easy way of printing text.
The QT_POINTER_SIZE macro expands to the size of a pointer in bytes.
@@ -3251,7 +3263,7 @@ QByteArray QSysInfo::bootUniqueId()
\macro void Q_CHECK_PTR(void *pointer)
\relates <QtGlobal>
- If \a pointer is 0, prints a message containing the source
+ If \a pointer is \nullptr, prints a message containing the source
code's file name and line number, saying that the program ran out
of memory and aborts program execution. It throws \c std::bad_alloc instead
if exceptions are enabled.
@@ -4770,9 +4782,11 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
/*!
\macro qMove(x)
\relates <QtGlobal>
+ \obsolete
- It expands to "std::move" if your compiler supports that C++11 function, or to nothing
- otherwise.
+ Use \c std::move instead.
+
+ It expands to "std::move".
qMove takes an rvalue reference to its parameter \a x, and converts it to an xvalue.
*/
@@ -4873,6 +4887,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
/*!
\macro Q_DECL_OVERRIDE
\since 5.0
+ \obsolete
\relates <QtGlobal>
This macro can be used to declare an overriding virtual
@@ -4880,8 +4895,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
an error if the overriding virtual function does not in fact
override anything.
- It expands to "override" if your compiler supports that C++11
- contextual keyword, or to nothing otherwise.
+ It expands to "override".
The macro goes at the end of the function, usually after the
\c{const}, if any:
@@ -4893,6 +4907,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
/*!
\macro Q_DECL_FINAL
\since 5.0
+ \obsolete
\relates <QtGlobal>
This macro can be used to declare an overriding virtual or a class
@@ -4900,10 +4915,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
no longer override this virtual function, or inherit from this
class, respectively.
- It expands to "final" if your compiler supports that C++11
- contextual keyword, or something non-standard if your compiler
- supports something close enough to the C++11 semantics, or to
- nothing otherwise.
+ It expands to "final".
The macro goes at the end of the function, usually after the
\c{const}, if any:
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index fe8e8e8bc8..35c0482768 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1272,8 +1272,10 @@ inline int qIntCast(float f) { return int(f); }
/*
Reentrant versions of basic rand() functions for random number generation
*/
-Q_CORE_EXPORT void qsrand(uint seed);
-Q_CORE_EXPORT int qrand();
+#if QT_DEPRECATED_SINCE(5, 15)
+Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") void qsrand(uint seed);
+Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") int qrand();
+#endif
#define QT_MODULE(x)
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 7d6beaf9c2..835fea0c77 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -124,12 +124,12 @@ public:
QLibrarySettings *ls = qt_library_settings();
if (ls) {
#ifndef QT_BUILD_QMAKE
- if (ls->reloadOnQAppAvailable && QCoreApplication::instance() != 0)
+ if (ls->reloadOnQAppAvailable && QCoreApplication::instance() != nullptr)
ls->load();
#endif
return ls->settings.data();
} else {
- return 0;
+ return nullptr;
}
}
};
@@ -146,7 +146,7 @@ void QLibrarySettings::load()
// If we get any settings here, those won't change when the application shows up.
settings.reset(QLibraryInfoPrivate::findConfiguration());
#ifndef QT_BUILD_QMAKE
- reloadOnQAppAvailable = (settings.data() == 0 && QCoreApplication::instance() == 0);
+ reloadOnQAppAvailable = (settings.data() == nullptr && QCoreApplication::instance() == nullptr);
bool haveDevicePaths;
bool haveEffectivePaths;
bool havePaths;
@@ -169,7 +169,7 @@ void QLibrarySettings::load()
|| children.contains(QLatin1String("Paths"));
#ifndef QT_BUILD_QMAKE
if (!havePaths)
- settings.reset(0);
+ settings.reset(nullptr);
#else
} else {
haveDevicePaths = false;
@@ -212,7 +212,7 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
return new QSettings(qtconfig, QSettings::IniFormat);
}
#endif
- return 0; //no luck
+ return nullptr; //no luck
}
#endif // settings
@@ -792,7 +792,12 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
#ifndef QT_BUILD_QMAKE_BOOTSTRAP
if (!fromConf) {
- const char * volatile path = 0;
+ // "volatile" here is a hack to prevent compilers from doing a
+ // compile-time strlen() on "path". The issue is that Qt installers
+ // will binary-patch the Qt installation paths -- in such scenarios, Qt
+ // will be built with a dummy path, thus the compile-time result of
+ // strlen is meaningless.
+ const char * volatile path = nullptr;
if (loc == PrefixPath) {
path = getPrefix(
#ifdef QT_BUILD_QMAKE
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index c1dd04f03c..89f49324c0 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -1315,7 +1315,7 @@ static QStringList backtraceFramesForLogMessage(int frameCount)
if (function.startsWith(QLatin1String("_Z"))) {
QScopedPointer<char, QScopedPointerPodDeleter> demangled(
- abi::__cxa_demangle(function.toUtf8(), 0, 0, 0));
+ abi::__cxa_demangle(function.toUtf8(), nullptr, nullptr, nullptr));
if (demangled)
function = QString::fromUtf8(qCleanupFuncinfo(demangled.data()));
}
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 810c55709c..17ae73536d 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -523,6 +523,7 @@ public:
AA_DontUseNativeMenuBar = 6,
AA_MacDontSwapCtrlAndMeta = 7,
AA_Use96Dpi = 8,
+ AA_MSWindowsDisableVirtualKeyboard = 9,
#if QT_DEPRECATED_SINCE(5, 14)
AA_X11InitThreads Q_DECL_ENUMERATOR_DEPRECATED = 10,
#endif
@@ -1266,14 +1267,16 @@ public:
enum DateFormat {
TextDate, // default Qt
ISODate, // ISO 8601
- SystemLocaleDate, // deprecated
- LocalDate = SystemLocaleDate, // deprecated
- LocaleDate, // deprecated
- SystemLocaleShortDate,
- SystemLocaleLongDate,
- DefaultLocaleShortDate,
- DefaultLocaleLongDate,
- RFC2822Date, // RFC 2822 (+ 850 and 1036 during parsing)
+#if QT_DEPRECATED_SINCE(5, 15)
+ SystemLocaleDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"),
+ LocalDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale") = 2, // i.e. SystemLocaleDate
+ LocaleDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"),
+ SystemLocaleShortDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"),
+ SystemLocaleLongDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"),
+ DefaultLocaleShortDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"),
+ DefaultLocaleLongDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"),
+#endif
+ RFC2822Date = 8, // RFC 2822 (+ 850 and 1036 during parsing)
ISODateWithMs
};
@@ -1575,9 +1578,12 @@ public:
MatchContains = 1,
MatchStartsWith = 2,
MatchEndsWith = 3,
- MatchRegExp = 4,
+#if QT_DEPRECATED_SINCE(5, 15)
+ MatchRegExp Q_DECL_ENUMERATOR_DEPRECATED_X("MatchRegExp is deprecated. Use MatchRegularExpression instead") = 4,
+#endif
MatchWildcard = 5,
MatchFixedString = 8,
+ MatchRegularExpression = 9,
MatchCaseSensitive = 16,
MatchWrap = 32,
MatchRecursive = 64
@@ -1763,6 +1769,9 @@ public:
PassThrough
};
+ // QTBUG-48701
+ enum ReturnByValueConstant { ReturnByValue }; // ### Qt 7: Remove me
+
#ifndef Q_QDOC
// NOTE: Generally, do not add QT_Q_ENUM if a corresponding Q_Q_FLAG exists.
QT_Q_ENUM(ScrollBarPolicy)
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 31e1bcc0da..708ecb11ab 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -293,6 +293,12 @@
This attribute must be set before QGuiApplication is constructed.
This value was added in 5.13
+ \value AA_MSWindowsDisableVirtualKeyboard When this attribute is set,
+ Windows' native on-screen virtual keyboard will not be shown
+ automatically when a text input widget gains focus on a system
+ without a physical keyboard.
+ This value was added in 5.15
+
The following values are deprecated or obsolete:
\value AA_ImmediateWidgetCreation This attribute is no longer fully
@@ -703,26 +709,38 @@
\value ISODateWithMs \l{ISO 8601} extended format, including milliseconds if applicable.
- \value SystemLocaleShortDate The \l{QLocale::ShortFormat}{short format} used
- by the \l{QLocale::system()}{operating system}.
+ \value SystemLocaleShortDate \e{This enum value is deprecated and
+ shall be removed in Qt 6.} Use QLocale's methods for converting
+ dates and times to and from strings, with the
+ \l{QLocale::ShortFormat}{short format} of
+ \l{QLocale::system()}{the locale used by the operating system}.
- \value SystemLocaleLongDate The \l{QLocale::LongFormat}{long format} used
- by the \l{QLocale::system()}{operating system}.
+ \value SystemLocaleLongDate \e{This enum value is deprecated and
+ shall be removed in Qt 6.} Use QLocale's methods for converting
+ dates and times to and from strings, with the
+ \l{QLocale::LongFormat}{long format} of \l{QLocale::system()}{the
+ locale used by the operating system}.
- \value DefaultLocaleShortDate The \l{QLocale::ShortFormat}{short format} specified
- by the \l{QLocale::setDefault()}{application's locale}.
+ \value DefaultLocaleShortDate \e{This enum value is deprecated and
+ shall be removed in Qt 6.} Use QLocale's methods for converting
+ dates and times to and from strings, with the
+ \l{QLocale::ShortFormat}{short format} of
+ \l{QLocale::setDefault()}{the application's locale}.
- \value DefaultLocaleLongDate The \l{QLocale::LongFormat}{long format} used
- by the \l{QLocale::setDefault()}{application's locale}.
+ \value DefaultLocaleLongDate \e{This enum value is deprecated and
+ shall be removed in Qt 6.} Use QLocale's methods for converting
+ dates and times to and from strings, with the
+ \l{QLocale::LongFormat}{long format} \l{QLocale::setDefault()}{the
+ application's locale}.
- \value SystemLocaleDate \e{This enum value is deprecated.} Use Qt::SystemLocaleShortDate
- instead (or Qt::SystemLocaleLongDate if you want long dates).
+ \value SystemLocaleDate \e{This enum value is deprecated and shall
+ be removed in Qt 6.} It is equivalent to SystemLocaleShortDate.
- \value LocaleDate \e{This enum value is deprecated.} Use Qt::DefaultLocaleShortDate
- instead (or Qt::DefaultLocaleLongDate if you want long dates).
+ \value LocaleDate \e{This enum value is deprecated and shall be
+ removed in Qt 6.} It is equivalent to DefaultLocaleShortDate.
- \value LocalDate \e{This enum value is deprecated.} Use Qt::SystemLocaleShortDate
- instead (or Qt::SystemLocaleLongDate if you want long dates).
+ \value LocalDate \e{This enum value is deprecated and shall be
+ removed in Qt 6.} It is equivalent to SystemLocaleShortDate.
\value RFC2822Date \l{RFC 2822}, \l{RFC 850} and \l{RFC 1036} format:
either \c{[ddd,] dd MMM yyyy [hh:mm[:ss]][ ±tzoff]}
@@ -2849,24 +2867,32 @@
This enum describes the type of matches that can be used when searching
for items in a model.
- \value MatchExactly Performs QVariant-based matching.
- \value MatchFixedString Performs string-based matching.
+ \value MatchExactly Performs QVariant-based matching.
+ \value MatchFixedString Performs string-based matching.
String-based comparisons are case-insensitive unless the
\c MatchCaseSensitive flag is also specified.
- \value MatchContains The search term is contained in the item.
- \value MatchStartsWith The search term matches the start of the item.
- \value MatchEndsWith The search term matches the end of the item.
- \value MatchCaseSensitive The search is case sensitive.
- \value MatchRegExp Performs string-based matching using a regular
- expression as the search term.
- \value MatchWildcard Performs string-based matching using a string with
+ \value MatchContains The search term is contained in the item.
+ \value MatchStartsWith The search term matches the start of the item.
+ \value MatchEndsWith The search term matches the end of the item.
+ \value MatchCaseSensitive The search is case sensitive.
+ \value MatchRegExp Performs string-based matching using a regular
+ expression as the search term. Uses the deprecated QRegExp class.
+ \e{This enum value is deprecated since Qt 5.15.}
+ \value MatchRegularExpression Performs string-based matching using a regular
+ expression as the search term. Uses QRegularExpression.
+ When using this flag, a QRegularExpression object can be passed as
+ parameter and will directly be used to perform the search. The case
+ sensitivity flag will be ignored as the QRegularExpression object is
+ expected to be fully configured.
+ This enum value was added in Qt 5.15.
+ \value MatchWildcard Performs string-based matching using a string with
wildcards as the search term.
- \value MatchWrap Perform a search that wraps around, so that when
+ \value MatchWrap Perform a search that wraps around, so that when
the search reaches the last item in the model, it begins again at
the first item and continues until all items have been examined.
- \value MatchRecursive Searches the entire hierarchy.
+ \value MatchRecursive Searches the entire hierarchy.
- \sa QString::compare(), QRegExp
+ \sa QString::compare(), QRegExp, QRegularExpression
*/
/*!
@@ -3306,3 +3332,15 @@
\value RoundPreferFloor Round up for .75 and above.
\value PassThrough Don't round.
*/
+
+/*!
+ \enum Qt::ReturnByValueConstant
+ \since 5.15
+
+ This is a dummy type, designed to help users transition from certain deprecated APIs to their replacement APIs.
+
+ \sa QCursor::bitmap()
+ \sa QCursor::mask()
+ \sa QLabel::picture()
+ \sa QLabel::pixmap()
+*/
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri
index fe81689932..a33ffe75f2 100644
--- a/src/corelib/io/io.pri
+++ b/src/corelib/io/io.pri
@@ -136,6 +136,7 @@ qtConfig(settings) {
} else: darwin:!nacl {
SOURCES += io/qsettings_mac.cpp
}
+ wasm : SOURCES += io/qsettings_wasm.cpp
}
win32 {
@@ -182,7 +183,9 @@ win32 {
SOURCES += io/qstorageinfo_mac.cpp
qtConfig(processenvironment): \
OBJECTIVE_SOURCES += io/qprocess_darwin.mm
- OBJECTIVE_SOURCES += io/qstandardpaths_mac.mm
+ OBJECTIVE_SOURCES += \
+ io/qstandardpaths_mac.mm \
+ io/qfilesystemengine_mac.mm
osx {
LIBS += -framework DiskArbitration -framework IOKit
} else {
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index 8a1679c5af..070139b608 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -658,7 +658,7 @@ QStringList QAbstractFileEngine::entryList(QDir::Filters filters, const QStringL
QAbstractFileEngine::FileFlags QAbstractFileEngine::fileFlags(FileFlags type) const
{
Q_UNUSED(type);
- return nullptr;
+ return {};
}
/*!
diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp
index 8e980733de..595fcd2724 100644
--- a/src/corelib/io/qbuffer.cpp
+++ b/src/corelib/io/qbuffer.cpp
@@ -227,7 +227,7 @@ QBuffer::~QBuffer()
\snippet buffer/buffer.cpp 4
- If \a byteArray is 0, the buffer creates its own internal
+ If \a byteArray is \nullptr, the buffer creates its own internal
QByteArray to work on. This byte array is initially empty.
\sa buffer(), setData(), open()
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index ce436b06e3..1cf6b1be08 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -181,7 +181,7 @@ QDirIteratorPrivate::QDirIteratorPrivate(const QFileSystemEntry &entry, const QS
#elif QT_CONFIG(regularexpression)
nameRegExps.reserve(nameFilters.size());
for (const auto &filter : nameFilters) {
- QString re = QRegularExpression::anchoredPattern(QRegularExpression::wildcardToRegularExpression(filter));
+ QString re = QRegularExpression::wildcardToRegularExpression(filter);
nameRegExps.append(
QRegularExpression(re, (filters & QDir::CaseSensitive) ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption));
}
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 95f03ef816..0cdc5bd6d3 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -251,7 +251,7 @@ QFile::QFile(QFilePrivate &dd)
Constructs a QFile object.
*/
QFile::QFile()
- : QFileDevice(*new QFilePrivate, 0)
+ : QFileDevice(*new QFilePrivate, nullptr)
{
}
/*!
@@ -265,7 +265,7 @@ QFile::QFile(QObject *parent)
Constructs a new file object to represent the file with the given \a name.
*/
QFile::QFile(const QString &name)
- : QFileDevice(*new QFilePrivate, 0)
+ : QFileDevice(*new QFilePrivate, nullptr)
{
Q_D(QFile);
d->fileName = name;
@@ -552,6 +552,66 @@ QFile::remove(const QString &fileName)
}
/*!
+ \since 5.15
+
+ Moves the file specified by fileName() to the trash. Returns \c true if successful,
+ and sets the fileName() to the path at which the file can be found within the trash;
+ otherwise returns \c false.
+
+ \note On systems where the system API doesn't report the location of the file in the
+ trash, fileName() will be set to the null string once the file has been moved. On
+ systems that don't have a trash can, this function always returns false.
+*/
+bool
+QFile::moveToTrash()
+{
+ Q_D(QFile);
+ if (d->fileName.isEmpty() &&
+ !static_cast<QFSFileEngine *>(d->engine())->isUnnamedFile()) {
+ qWarning("QFile::remove: Empty or null file name");
+ return false;
+ }
+ unsetError();
+ close();
+ if (error() == QFile::NoError) {
+ QFileSystemEntry fileEntry(d->fileName);
+ QFileSystemEntry trashEntry;
+ QSystemError error;
+ if (QFileSystemEngine::moveFileToTrash(fileEntry, trashEntry, error)) {
+ setFileName(trashEntry.filePath());
+ unsetError();
+ return true;
+ }
+ d->setError(QFile::RenameError, error.toString());
+ }
+ return false;
+}
+
+/*!
+ \since 5.15
+ \overload
+
+ Moves the file specified by fileName() to the trash. Returns \c true if successful,
+ and sets \a pathInTrash (if provided) to the path at which the file can be found within
+ the trash; otherwise returns \c false.
+
+ \note On systems where the system API doesn't report the path of the file in the
+ trash, \a pathInTrash will be set to the null string once the file has been moved.
+ On systems that don't have a trash can, this function always returns false.
+*/
+bool
+QFile::moveToTrash(const QString &fileName, QString *pathInTrash)
+{
+ QFile file(fileName);
+ if (file.moveToTrash()) {
+ if (pathInTrash)
+ *pathInTrash = file.fileName();
+ return true;
+ }
+ return false;
+}
+
+/*!
Renames the file currently specified by fileName() to \a newName.
Returns \c true if successful; otherwise returns \c false.
diff --git a/src/corelib/io/qfile.h b/src/corelib/io/qfile.h
index 2099b2852f..917fec4e1a 100644
--- a/src/corelib/io/qfile.h
+++ b/src/corelib/io/qfile.h
@@ -125,6 +125,9 @@ public:
bool remove();
static bool remove(const QString &fileName);
+ bool moveToTrash();
+ static bool moveToTrash(const QString &fileName, QString *pathInTrash = nullptr);
+
bool rename(const QString &newName);
static bool rename(const QString &oldName, const QString &newName);
diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp
index ee619d99cc..b0aba3193c 100644
--- a/src/corelib/io/qfiledevice.cpp
+++ b/src/corelib/io/qfiledevice.cpp
@@ -202,7 +202,7 @@ QFileDevice::QFileDevice(QFileDevicePrivate &dd)
\internal
*/
QFileDevice::QFileDevice()
- : QIODevice(*new QFileDevicePrivate, 0)
+ : QIODevice(*new QFileDevicePrivate, nullptr)
{
}
/*!
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index 89834de29f..64b1557231 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -134,7 +134,7 @@ uint QFileInfoPrivate::getFileFlags(QAbstractFileEngine::FileFlags request) cons
// extra syscall. Bundle detecton on Mac can be slow, expecially on network
// paths, so we separate out that as well.
- QAbstractFileEngine::FileFlags req = nullptr;
+ QAbstractFileEngine::FileFlags req;
uint cachedFlags = 0;
if (request & (QAbstractFileEngine::FlagsMask | QAbstractFileEngine::TypesMask)) {
@@ -1145,6 +1145,27 @@ bool QFileInfo::isShortcut() const
[d]() { return d->getFileFlags(QAbstractFileEngine::LinkType); });
}
+
+/*!
+ \since 5.15
+
+ Returns \c true if the object points to a junction;
+ otherwise returns \c false.
+
+ Junctions only exist on Windows' NTFS file system, and are typically
+ created by the \c{mklink} command. They can be thought of as symlinks for
+ directories, and can only be created for absolute paths on the local
+ volume.
+*/
+bool QFileInfo::isJunction() const
+{
+ Q_D(const QFileInfo);
+ return d->checkAttribute<bool>(
+ QFileSystemMetaData::LegacyLinkType,
+ [d]() { return d->metaData.isJunction(); },
+ [d]() { return d->getFileFlags(QAbstractFileEngine::LinkType); });
+}
+
/*!
Returns \c true if the object points to a directory or to a symbolic
link to a directory, and that directory is the root directory; otherwise
diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h
index 3ac028085a..7c7ff56ae4 100644
--- a/src/corelib/io/qfileinfo.h
+++ b/src/corelib/io/qfileinfo.h
@@ -113,6 +113,7 @@ public:
bool isSymLink() const;
bool isSymbolicLink() const;
bool isShortcut() const;
+ bool isJunction() const;
bool isRoot() const;
bool isBundle() const;
diff --git a/src/corelib/io/qfilesystemengine_mac.mm b/src/corelib/io/qfilesystemengine_mac.mm
new file mode 100644
index 0000000000..258ae2e8e0
--- /dev/null
+++ b/src/corelib/io/qfilesystemengine_mac.mm
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 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 "qplatformdefs.h"
+#include "qfilesystemengine_p.h"
+#include "qfile.h"
+#include "qurl.h"
+
+#include <QtCore/private/qcore_mac_p.h>
+#include <CoreFoundation/CoreFoundation.h>
+
+QT_BEGIN_NAMESPACE
+
+/*
+ This implementation does not enable the "put back" option in Finder
+ for the trashed object. The only way to get this is to use Finder automation,
+ which would query the user for permission to access Finder using a modal,
+ blocking dialog - which we definitely can't have in a console application.
+
+ Using Finder would also play the trash sound, which we don't want either in
+ such a core API; applications that want that can play the sound themselves.
+*/
+//static
+bool QFileSystemEngine::moveFileToTrash(const QFileSystemEntry &source,
+ QFileSystemEntry &newLocation, QSystemError &error)
+{
+#ifdef Q_OS_MACOS // desktop macOS has a trash can
+ QMacAutoReleasePool pool;
+
+ QFileInfo info(source.filePath());
+ NSString *filepath = info.filePath().toNSString();
+ NSURL *fileurl = [NSURL fileURLWithPath:filepath isDirectory:info.isDir()];
+ NSURL *resultingUrl = nil;
+ NSError *nserror = nil;
+ NSFileManager *fm = [NSFileManager defaultManager];
+ if ([fm trashItemAtURL:fileurl resultingItemURL:&resultingUrl error:&nserror] != YES) {
+ error = QSystemError(nserror.code, QSystemError::NativeError);
+ return false;
+ }
+ newLocation = QFileSystemEntry(QUrl::fromNSURL(resultingUrl).path());
+ return true;
+#else // watch, tv, iOS don't have a trash can
+ return false;
+#endif
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h
index ecfdc03743..555483a972 100644
--- a/src/corelib/io/qfilesystemengine_p.h
+++ b/src/corelib/io/qfilesystemengine_p.h
@@ -88,7 +88,7 @@ inline bool qIsFilenameBroken(const QFileSystemEntry &entry)
Q_RETURN_ON_INVALID_FILENAME("Broken filename passed to function", (result)); \
} while (false)
-class QFileSystemEngine
+class Q_AUTOTEST_EXPORT QFileSystemEngine
{
public:
static bool isCaseSensitive()
@@ -155,6 +155,7 @@ public:
static bool createLink(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error);
static bool copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error);
+ static bool moveFileToTrash(const QFileSystemEntry &source, QFileSystemEntry &newLocation, QSystemError &error);
static bool renameFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error);
static bool renameOverwriteFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error);
static bool removeFile(const QFileSystemEntry &entry, QSystemError &error);
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index 38cb6a423d..eaf4e2d9af 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -42,6 +42,8 @@
#include "qplatformdefs.h"
#include "qfilesystemengine_p.h"
#include "qfile.h"
+#include "qstorageinfo.h"
+#include "qtextstream.h"
#include <QtCore/qoperatingsystemversion.h>
#include <QtCore/private/qcore_unix_p.h>
@@ -1076,14 +1078,14 @@ bool QFileSystemEngine::cloneFile(int srcfd, int dstfd, const QFileSystemMetaDat
// sendfile(2) is limited in the kernel to 2G - 4k
const size_t SendfileSize = 0x7ffff000;
- ssize_t n = ::sendfile(dstfd, srcfd, NULL, SendfileSize);
+ ssize_t n = ::sendfile(dstfd, srcfd, nullptr, SendfileSize);
if (n == -1) {
// if we got an error here, give up and try at an upper layer
return false;
}
while (n) {
- n = ::sendfile(dstfd, srcfd, NULL, SendfileSize);
+ n = ::sendfile(dstfd, srcfd, nullptr, SendfileSize);
if (n == -1) {
// uh oh, this is probably a real error (like ENOSPC), but we have
// no way to notify QFile of partial success, so just erase any work
@@ -1197,6 +1199,216 @@ bool QFileSystemEngine::createLink(const QFileSystemEntry &source, const QFileSy
return false;
}
+#ifndef Q_OS_DARWIN
+/*
+ Implementing as per https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html
+*/
+
+// bootstrapped tools don't need this, and we don't want QStorageInfo
+#ifndef QT_BOOTSTRAPPED
+static QString freeDesktopTrashLocation(const QString &sourcePath)
+{
+ auto makeTrashDir = [](const QDir &topDir, const QString &trashDir) -> QString {
+ auto ownerPerms = QFileDevice::ReadOwner
+ | QFileDevice::WriteOwner
+ | QFileDevice::ExeOwner;
+ QString targetDir = topDir.filePath(trashDir);
+ if (topDir.mkdir(trashDir))
+ QFile::setPermissions(targetDir, ownerPerms);
+ if (QFileInfo(targetDir).isDir())
+ return targetDir;
+ return QString();
+ };
+ auto isSticky = [](const QFileInfo &fileInfo) -> bool {
+ struct stat st;
+ if (stat(QFile::encodeName(fileInfo.absoluteFilePath()).constData(), &st) == 0)
+ return st.st_mode & S_ISVTX;
+
+ return false;
+ };
+
+ QString trash;
+ const QLatin1String dotTrash(".Trash");
+ const QStorageInfo sourceStorage(sourcePath);
+ const QStorageInfo homeStorage(QDir::home());
+ // We support trashing of files outside the users home partition
+ if (sourceStorage != homeStorage) {
+ QDir topDir(sourceStorage.rootPath());
+ /*
+ Method 1:
+ "An administrator can create an $topdir/.Trash directory. The permissions on this
+ directories should permit all users who can trash files at all to write in it;
+ and the “sticky bit” in the permissions must be set, if the file system supports
+ it.
+ When trashing a file from a non-home partition/device, an implementation
+ (if it supports trashing in top directories) MUST check for the presence
+ of $topdir/.Trash."
+ */
+ const QString userID = QString::number(::getuid());
+ if (topDir.cd(dotTrash)) {
+ const QFileInfo trashInfo(topDir.path());
+
+ // we MUST check that the sticky bit is set, and that it is not a symlink
+ if (trashInfo.isSymLink()) {
+ // we SHOULD report the failed check to the administrator
+ qCritical("Warning: '%s' is a symlink to '%s'",
+ trashInfo.absoluteFilePath().toLocal8Bit().constData(),
+ trashInfo.symLinkTarget().toLatin1().constData());
+ } else if (!isSticky(trashInfo)) {
+ // we SHOULD report the failed check to the administrator
+ qCritical("Warning: '%s' doesn't have sticky bit set!",
+ trashInfo.absoluteFilePath().toLocal8Bit().constData());
+ } else if (trashInfo.isDir()) {
+ /*
+ "If the directory exists and passes the checks, a subdirectory of the
+ $topdir/.Trash directory is to be used as the user's trash directory
+ for this partition/device. The name of this subdirectory is the numeric
+ identifier of the current user ($topdir/.Trash/$uid).
+ When trashing a file, if this directory does not exist for the current user,
+ the implementation MUST immediately create it, without any warnings or
+ delays for the user."
+ */
+ trash = makeTrashDir(topDir, userID);
+ }
+ }
+ /*
+ Method 2:
+ "If an $topdir/.Trash directory is absent, an $topdir/.Trash-$uid directory is to be
+ used as the user's trash directory for this device/partition. [...] When trashing a
+ file, if an $topdir/.Trash-$uid directory does not exist, the implementation MUST
+ immediately create it, without any warnings or delays for the user."
+ */
+ if (trash.isEmpty()) {
+ topDir = QDir(sourceStorage.rootPath());
+ const QString userTrashDir = dotTrash + QLatin1Char('-') + userID;
+ trash = makeTrashDir(topDir, userTrashDir);
+ }
+ }
+ /*
+ "If both (1) and (2) fail [...], the implementation MUST either trash the
+ file into the user's “home trash” or refuse to trash it."
+
+ We trash the file into the user's home trash.
+ */
+ if (trash.isEmpty()) {
+ QDir topDir = QDir::home();
+ trash = makeTrashDir(topDir, dotTrash);
+ if (!QFileInfo(trash).isDir()) {
+ qWarning("Unable to establish trash directory %s in %s",
+ dotTrash.latin1(), topDir.path().toLocal8Bit().constData());
+ }
+ }
+
+ return trash;
+}
+#endif // QT_BOOTSTRAPPED
+
+//static
+bool QFileSystemEngine::moveFileToTrash(const QFileSystemEntry &source,
+ QFileSystemEntry &newLocation, QSystemError &error)
+{
+#ifdef QT_BOOTSTRAPPED
+ Q_UNUSED(source);
+ Q_UNUSED(newLocation);
+ error = QSystemError(ENOSYS, QSystemError::StandardLibraryError);
+ return false;
+#else
+ const QFileInfo sourceInfo(source.filePath());
+ if (!sourceInfo.exists()) {
+ error = QSystemError(ENOENT, QSystemError::StandardLibraryError);
+ return false;
+ }
+ const QString sourcePath = sourceInfo.absoluteFilePath();
+
+ QDir trashDir(freeDesktopTrashLocation(sourcePath));
+ if (!trashDir.exists())
+ return false;
+ /*
+ "A trash directory contains two subdirectories, named info and files."
+ */
+ const QLatin1String filesDir("files");
+ const QLatin1String infoDir("info");
+ trashDir.mkdir(filesDir);
+ int savedErrno = errno;
+ trashDir.mkdir(infoDir);
+ if (!savedErrno)
+ savedErrno = errno;
+ if (!trashDir.exists(filesDir) || !trashDir.exists(infoDir)) {
+ error = QSystemError(savedErrno, QSystemError::StandardLibraryError);
+ return false;
+ }
+ /*
+ "The $trash/files directory contains the files and directories that were trashed.
+ The names of files in this directory are to be determined by the implementation;
+ the only limitation is that they must be unique within the directory. Even if a
+ file with the same name and location gets trashed many times, each subsequent
+ trashing must not overwrite a previous copy."
+ */
+ const QString trashedName = sourceInfo.isDir()
+ ? QDir(sourcePath).dirName()
+ : sourceInfo.fileName();
+ QString uniqueTrashedName = QLatin1Char('/') + trashedName;
+ QString infoFileName;
+ int counter = 0;
+ QFile infoFile;
+ auto makeUniqueTrashedName = [trashedName, &counter]() -> QString {
+ ++counter;
+ return QString(QLatin1String("/%1-%2"))
+ .arg(trashedName)
+ .arg(counter, 4, 10, QLatin1Char('0'));
+ };
+ do {
+ while (QFile::exists(trashDir.filePath(filesDir) + uniqueTrashedName))
+ uniqueTrashedName = makeUniqueTrashedName();
+ /*
+ "The $trash/info directory contains an "information file" for every file and directory
+ in $trash/files. This file MUST have exactly the same name as the file or directory in
+ $trash/files, plus the extension ".trashinfo"
+ [...]
+ When trashing a file or directory, the implementation MUST create the corresponding
+ file in $trash/info first. Moreover, it MUST try to do this in an atomic fashion,
+ so that if two processes try to trash files with the same filename this will result
+ in two different trash files. On Unix-like systems this is done by generating a
+ filename, and then opening with O_EXCL. If that succeeds the creation was atomic
+ (at least on the same machine), if it fails you need to pick another filename."
+ */
+ infoFileName = trashDir.filePath(infoDir)
+ + uniqueTrashedName + QLatin1String(".trashinfo");
+ infoFile.setFileName(infoFileName);
+ if (!infoFile.open(QIODevice::NewOnly | QIODevice::WriteOnly | QIODevice::Text))
+ uniqueTrashedName = makeUniqueTrashedName();
+ } while (!infoFile.isOpen());
+
+ const QString targetPath = trashDir.filePath(filesDir) + uniqueTrashedName;
+ const QFileSystemEntry target(targetPath);
+
+ /*
+ We might fail to rename if source and target are on different file systems.
+ In that case, we don't try further, i.e. copying and removing the original
+ is usually not what the user would expect to happen.
+ */
+ if (!renameFile(source, target, error)) {
+ infoFile.close();
+ infoFile.remove();
+ return false;
+ }
+
+ QTextStream out(&infoFile);
+#if QT_CONFIG(textcodec)
+ out.setCodec("UTF-8");
+#endif
+ out << "[Trash Info]" << Qt::endl;
+ out << "Path=" << sourcePath << Qt::endl;
+ out << "DeletionDate="
+ << QDateTime::currentDateTime().toString(QLatin1String("yyyy-MM-ddThh:mm:ss")) << Qt::endl;
+ infoFile.close();
+
+ newLocation = QFileSystemEntry(targetPath);
+ return true;
+#endif // QT_BOOTSTRAPPED
+}
+#endif // Q_OS_DARWIN
+
//static
bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)
{
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index ae29190848..36d43e9cb7 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -41,6 +41,7 @@
#include "qoperatingsystemversion.h"
#include "qplatformdefs.h"
#include "qsysinfo.h"
+#include "qscopeguard.h"
#include "private/qabstractfileengine_p.h"
#include "private/qfsfileengine_p.h"
#include <private/qsystemlibrary_p.h>
@@ -59,6 +60,8 @@
#include <objbase.h>
#ifndef Q_OS_WINRT
# include <shlobj.h>
+# include <shobjidl.h>
+# include <shellapi.h>
# include <lm.h>
# include <accctrl.h>
#endif
@@ -422,6 +425,104 @@ static inline bool getFindData(QString path, WIN32_FIND_DATA &findData)
return false;
}
+#if defined(__IFileOperation_INTERFACE_DEFINED__)
+class FileOperationProgressSink : public IFileOperationProgressSink
+{
+public:
+ FileOperationProgressSink()
+ : ref(1)
+ {}
+ virtual ~FileOperationProgressSink() {}
+
+ ULONG STDMETHODCALLTYPE AddRef()
+ {
+ return ++ref;
+ }
+ ULONG STDMETHODCALLTYPE Release()
+ {
+ if (--ref == 0) {
+ delete this;
+ return 0;
+ }
+ return ref;
+ }
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **ppvObject)
+ {
+ if (!ppvObject)
+ return E_POINTER;
+
+ *ppvObject = nullptr;
+
+ if (iid == __uuidof(IUnknown)) {
+ *ppvObject = static_cast<IUnknown*>(this);
+ } else if (iid == __uuidof(IFileOperationProgressSink)) {
+ *ppvObject = static_cast<IFileOperationProgressSink*>(this);
+ }
+
+ if (*ppvObject) {
+ AddRef();
+ return S_OK;
+ }
+
+ return E_NOINTERFACE;
+ }
+
+ HRESULT STDMETHODCALLTYPE StartOperations()
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE FinishOperations(HRESULT)
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE PreRenameItem(DWORD, IShellItem *, LPCWSTR)
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE PostRenameItem(DWORD, IShellItem *, LPCWSTR, HRESULT, IShellItem *)
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE PreMoveItem(DWORD, IShellItem *, IShellItem *, LPCWSTR)
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE PostMoveItem(DWORD, IShellItem *, IShellItem *, LPCWSTR, HRESULT,
+ IShellItem *)
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE PreCopyItem(DWORD, IShellItem *, IShellItem *, LPCWSTR )
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE PostCopyItem(DWORD, IShellItem *, IShellItem *, LPCWSTR, HRESULT,
+ IShellItem *)
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE PreDeleteItem(DWORD dwFlags, IShellItem *)
+ {
+ // stop the operation if the file will be deleted rather than trashed
+ return (dwFlags & TSF_DELETE_RECYCLE_IF_POSSIBLE) ? S_OK : E_FAIL;
+ }
+ HRESULT STDMETHODCALLTYPE PostDeleteItem(DWORD /* dwFlags */, IShellItem * /* psiItem */,
+ HRESULT /* hrDelete */, IShellItem *psiNewlyCreated)
+ {
+ if (psiNewlyCreated) {
+ wchar_t *pszName = nullptr;
+ psiNewlyCreated->GetDisplayName(SIGDN_FILESYSPATH, &pszName);
+ if (pszName) {
+ targetPath = QString::fromWCharArray(pszName);
+ CoTaskMemFree(pszName);
+ }
+ }
+ return S_OK;
+ }
+ HRESULT STDMETHODCALLTYPE PreNewItem(DWORD, IShellItem *, LPCWSTR)
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE PostNewItem(DWORD, IShellItem *, LPCWSTR, LPCWSTR, DWORD, HRESULT,
+ IShellItem *)
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE UpdateProgress(UINT,UINT)
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE ResetTimer()
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE PauseTimer()
+ { return S_OK; }
+ HRESULT STDMETHODCALLTYPE ResumeTimer()
+ { return S_OK; }
+
+ QString targetPath;
+private:
+ ULONG ref;
+};
+#endif
+
bool QFileSystemEngine::uncListSharesOnServer(const QString &server, QStringList *list)
{
DWORD res = ERROR_NOT_SUPPORTED;
@@ -1123,67 +1224,62 @@ static bool isDirPath(const QString &dirPath, bool *existed)
return fileAttrib & FILE_ATTRIBUTE_DIRECTORY;
}
+// NOTE: if \a shouldMkdirFirst is false, we assume the caller did try to mkdir
+// before calling this function.
+static bool createDirectoryWithParents(const QString &nativeName, bool shouldMkdirFirst = true)
+{
+ const auto isUNCRoot = [](const QString &nativeName) {
+ return nativeName.startsWith(QLatin1String("\\\\")) && nativeName.count(QDir::separator()) <= 3;
+ };
+ const auto isDriveName = [](const QString &nativeName) {
+ return nativeName.size() == 2 && nativeName.at(1) == QLatin1Char(':');
+ };
+ const auto isDir = [](const QString &nativeName) {
+ bool exists = false;
+ return isDirPath(nativeName, &exists) && exists;
+ };
+ // Do not try to mkdir a UNC root path or a drive letter.
+ if (isUNCRoot(nativeName) || isDriveName(nativeName))
+ return false;
+
+ if (shouldMkdirFirst) {
+ if (mkDir(nativeName))
+ return true;
+ }
+
+ const int backSlash = nativeName.lastIndexOf(QDir::separator());
+ if (backSlash < 1)
+ return false;
+
+ const QString parentNativeName = nativeName.left(backSlash);
+ if (!createDirectoryWithParents(parentNativeName))
+ return false;
+
+ // try again
+ if (mkDir(nativeName))
+ return true;
+ return isDir(nativeName);
+}
+
//static
bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool createParents)
{
QString dirName = entry.filePath();
Q_CHECK_FILE_NAME(dirName, false);
- if (createParents) {
- dirName = QDir::toNativeSeparators(QDir::cleanPath(dirName));
- // We spefically search for / so \ would break it..
- int oldslash = -1;
- if (dirName.startsWith(QLatin1String("\\\\"))) {
- // Don't try to create the root path of a UNC path;
- // CreateDirectory() will just return ERROR_INVALID_NAME.
- for (int i = 0; i < dirName.size(); ++i) {
- if (dirName.at(i) != QDir::separator()) {
- oldslash = i;
- break;
- }
- }
- if (oldslash != -1)
- oldslash = dirName.indexOf(QDir::separator(), oldslash);
- } else if (dirName.size() > 2
- && dirName.at(1) == QLatin1Char(':')) {
- // Don't try to call mkdir with just a drive letter
- oldslash = 2;
- }
- for (int slash=0; slash != -1; oldslash = slash) {
- slash = dirName.indexOf(QDir::separator(), oldslash+1);
- if (slash == -1) {
- if (oldslash == dirName.length())
- break;
- slash = dirName.length();
- }
- if (slash) {
- DWORD lastError;
- QString chunk = dirName.left(slash);
- if (!mkDir(chunk, &lastError)) {
- if (lastError == ERROR_ALREADY_EXISTS || lastError == ERROR_ACCESS_DENIED) {
- bool existed = false;
- if (isDirPath(chunk, &existed) && existed)
- continue;
-#ifdef Q_OS_WINRT
- static QThreadStorage<QString> dataLocation;
- if (!dataLocation.hasLocalData())
- dataLocation.setLocalData(QDir::toNativeSeparators(QStandardPaths::writableLocation(QStandardPaths::DataLocation)));
- static QThreadStorage<QString> tempLocation;
- if (!tempLocation.hasLocalData())
- tempLocation.setLocalData(QDir::toNativeSeparators(QStandardPaths::writableLocation(QStandardPaths::TempLocation)));
- // We try to create something outside the sandbox, which is forbidden
- // However we could still try to pass into the sandbox
- if (dataLocation.localData().startsWith(chunk) || tempLocation.localData().startsWith(chunk))
- continue;
-#endif
- }
- return false;
- }
- }
- }
+ dirName = QDir::toNativeSeparators(QDir::cleanPath(dirName));
+
+ // try to mkdir this directory
+ DWORD lastError;
+ if (mkDir(dirName, &lastError))
return true;
- }
- return mkDir(entry.filePath());
+ // mkpath should return true, if the directory already exists, mkdir false.
+ if (!createParents)
+ return false;
+ if (lastError == ERROR_ALREADY_EXISTS)
+ return isDirPath(dirName, nullptr);
+
+ return createDirectoryWithParents(dirName, false);
}
//static
@@ -1436,6 +1532,103 @@ bool QFileSystemEngine::removeFile(const QFileSystemEntry &entry, QSystemError &
return ret;
}
+/*
+ If possible, we use the IFileOperation implementation, which allows us to determine
+ the location of the object in the trash.
+ If not (likely on mingw), we fall back to the old API, which won't allow us to know
+ that.
+*/
+//static
+bool QFileSystemEngine::moveFileToTrash(const QFileSystemEntry &source,
+ QFileSystemEntry &newLocation, QSystemError &error)
+{
+#ifndef Q_OS_WINRT
+ // we need the "display name" of the file, so can't use nativeFilePath
+ const QString sourcePath = QDir::toNativeSeparators(source.filePath());
+
+ /*
+ Windows 7 insists on showing confirmation dialogs and ignores the respective
+ flags set on IFileOperation. Fall back to SHFileOperation, even if it doesn't
+ give us the new location of the file.
+ */
+ if (QOperatingSystemVersion::current() > QOperatingSystemVersion::Windows7) {
+# if defined(__IFileOperation_INTERFACE_DEFINED__)
+ CoInitialize(NULL);
+ IFileOperation *pfo = nullptr;
+ IShellItem *deleteItem = nullptr;
+ FileOperationProgressSink *sink = nullptr;
+ HRESULT hres = E_FAIL;
+
+ auto coUninitialize = qScopeGuard([&](){
+ if (sink)
+ sink->Release();
+ if (deleteItem)
+ deleteItem->Release();
+ if (pfo)
+ pfo->Release();
+ CoUninitialize();
+ if (!SUCCEEDED(hres))
+ error = QSystemError(hres, QSystemError::NativeError);
+ });
+
+ hres = CoCreateInstance(CLSID_FileOperation, nullptr, CLSCTX_ALL, IID_PPV_ARGS(&pfo));
+ if (!pfo)
+ return false;
+ pfo->SetOperationFlags(FOF_ALLOWUNDO | FOFX_RECYCLEONDELETE | FOF_NOCONFIRMATION
+ | FOF_SILENT | FOF_NOERRORUI);
+ hres = SHCreateItemFromParsingName(reinterpret_cast<const wchar_t*>(sourcePath.utf16()),
+ nullptr, IID_PPV_ARGS(&deleteItem));
+ if (!deleteItem)
+ return false;
+ sink = new FileOperationProgressSink;
+ hres = pfo->DeleteItem(deleteItem, static_cast<IFileOperationProgressSink*>(sink));
+ if (!SUCCEEDED(hres))
+ return false;
+ hres = pfo->PerformOperations();
+ if (!SUCCEEDED(hres))
+ return false;
+ newLocation = QFileSystemEntry(sink->targetPath);
+
+# endif // no IFileOperation in SDK (mingw, likely) - fall back to SHFileOperation
+ } else {
+ // double null termination needed, so can't use QString::utf16
+ QVarLengthArray<wchar_t, MAX_PATH + 1> winFile(sourcePath.length() + 2);
+ sourcePath.toWCharArray(winFile.data());
+ winFile[sourcePath.length()] = wchar_t{};
+ winFile[sourcePath.length() + 1] = wchar_t{};
+
+ SHFILEOPSTRUCTW operation;
+ operation.hwnd = nullptr;
+ operation.wFunc = FO_DELETE;
+ operation.pFrom = winFile.constData();
+ operation.pTo = nullptr;
+ operation.fFlags = FOF_ALLOWUNDO | FOF_NO_UI;
+ operation.fAnyOperationsAborted = FALSE;
+ operation.hNameMappings = nullptr;
+ operation.lpszProgressTitle = nullptr;
+
+ int result = SHFileOperation(&operation);
+ if (result != 0) {
+ error = QSystemError(result, QSystemError::NativeError);
+ return false;
+ }
+ /*
+ This implementation doesn't let us know where the file ended up, even if
+ we would specify FOF_WANTMAPPINGHANDLE | FOF_RENAMEONCOLLISION, as
+ FOF_RENAMEONCOLLISION has no effect unless files are moved, copied, or renamed.
+ */
+ Q_UNUSED(newLocation);
+ }
+ return true;
+
+#else // Q_OS_WINRT
+ Q_UNUSED(source);
+ Q_UNUSED(newLocation);
+ Q_UNUSED(error);
+ return false;
+#endif
+}
+
//static
bool QFileSystemEngine::setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions, QSystemError &error,
QFileSystemMetaData *data)
diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h
index 81f4b3ba13..3154658e5c 100644
--- a/src/corelib/io/qfilesystemmetadata_p.h
+++ b/src/corelib/io/qfilesystemmetadata_p.h
@@ -76,8 +76,7 @@ class Q_AUTOTEST_EXPORT QFileSystemMetaData
{
public:
QFileSystemMetaData()
- : knownFlagsMask(nullptr),
- size_(-1)
+ : size_(-1)
{
}
@@ -111,8 +110,10 @@ public:
AliasType = 0x0,
#endif
#if defined(Q_OS_WIN)
+ JunctionType = 0x04000000,
WinLnkType = 0x08000000, // Note: Uses the same position for AliasType on Mac
#else
+ JunctionType = 0x0,
WinLnkType = 0x0,
#endif
SequentialType = 0x00800000, // Note: overlaps with QAbstractFileEngine::RootFlag
@@ -184,7 +185,7 @@ public:
void clear()
{
- knownFlagsMask = nullptr;
+ knownFlagsMask = {};
}
void clearFlags(MetaDataFlags flags = AllMetaDataFlags)
@@ -205,8 +206,10 @@ public:
bool wasDeleted() const { return (entryFlags & WasDeletedAttribute); }
#if defined(Q_OS_WIN)
bool isLnkFile() const { return (entryFlags & WinLnkType); }
+ bool isJunction() const { return (entryFlags & JunctionType); }
#else
bool isLnkFile() const { return false; }
+ bool isJunction() const { return false; }
#endif
qint64 size() const { return size_; }
@@ -356,9 +359,15 @@ inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, boo
if (setLinkType) {
knownFlagsMask |= LinkType;
entryFlags &= ~LinkType;
- if ((fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT)
- && (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) {
- entryFlags |= LinkType;
+ if (fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) {
+ if (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK) {
+ entryFlags |= LinkType;
+#if defined(IO_REPARSE_TAG_MOUNT_POINT)
+ } else if ((fileAttribute_ & FILE_ATTRIBUTE_DIRECTORY)
+ && (findData.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT)) {
+ entryFlags |= JunctionType;
+#endif
+ }
}
}
}
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index 54460aff77..86c8963cb6 100644
--- a/src/corelib/io/qfilesystemwatcher.cpp
+++ b/src/corelib/io/qfilesystemwatcher.cpp
@@ -88,7 +88,7 @@ QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine(QObject
}
QFileSystemWatcherPrivate::QFileSystemWatcherPrivate()
- : native(0), poller(0)
+ : native(nullptr), poller(nullptr)
{
}
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index ca1f6cc359..888af998a5 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -242,7 +242,7 @@ QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create(QObject
if (fd == -1) {
fd = inotify_init();
if (fd == -1)
- return 0;
+ return nullptr;
}
return new QInotifyFileSystemWatcherEngine(fd, parent);
}
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index 0d73839f8d..3042eac2f0 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -911,14 +911,7 @@ bool QFSFileEngine::supportsExtension(Extension extension) const
}
/*! \fn bool QFSFileEngine::caseSensitive() const
- Returns \c true for Windows, false for Unix.
-*/
-
-/*! \fn bool QFSFileEngine::copy(const QString &copyName)
-
- For Windows or Apple platforms, copy the file to file \a copyName.
-
- Not implemented for other Unix platforms.
+ Returns \c false for Windows, true for Unix.
*/
/*! \fn QString QFSFileEngine::currentPath(const QString &fileName)
@@ -950,11 +943,34 @@ bool QFSFileEngine::supportsExtension(Extension extension) const
\reimp
*/
-/*! \fn QString QFSFileEngine::homePath()
+/*!
Returns the home path of the current user.
\sa rootPath()
*/
+QString QFSFileEngine::homePath()
+{
+ return QFileSystemEngine::homePath();
+}
+
+/*!
+ Returns the root path.
+
+ \sa homePath()
+*/
+QString QFSFileEngine::rootPath()
+{
+ return QFileSystemEngine::rootPath();
+}
+
+/*!
+ Returns the temporary path (i.e., a path in which it is safe
+ to store temporary files).
+*/
+QString QFSFileEngine::tempPath()
+{
+ return QFileSystemEngine::tempPath();
+}
/*! \fn bool QFSFileEngine::isRelativePath() const
\reimp
@@ -968,9 +984,6 @@ bool QFSFileEngine::supportsExtension(Extension extension) const
true if successful; otherwise returns \c false.
*/
-/*! \fn bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) const
- \reimp
-*/
/*! \fn uint QFSFileEngine::ownerId(QAbstractFileEngine::FileOwner own) const
In Unix, if stat() is successful, the \c uid is returned if
@@ -984,35 +997,87 @@ bool QFSFileEngine::supportsExtension(Extension extension) const
\reimp
*/
-/*! \fn bool QFSFileEngine::remove()
- \reimp
+/*!
+ For Windows or Apple platforms, copy the file to file \a copyName.
+
+ Not implemented for other Unix platforms.
*/
+bool QFSFileEngine::copy(const QString &copyName)
+{
+ Q_D(QFSFileEngine);
+ QSystemError error;
+ bool ret = QFileSystemEngine::copyFile(d->fileEntry, QFileSystemEntry(copyName), error);
+ if (!ret)
+ setError(QFile::CopyError, error.toString());
+ return ret;
+}
-/*! \fn bool QFSFileEngine::rename(const QString &newName)
+/*!
\reimp
*/
+bool QFSFileEngine::remove()
+{
+ Q_D(QFSFileEngine);
+ QSystemError error;
+ bool ret = QFileSystemEngine::removeFile(d->fileEntry, error);
+ d->metaData.clear();
+ if (!ret)
+ setError(QFile::RemoveError, error.toString());
+ return ret;
+}
-
-/*! \fn bool QFSFileEngine::renameOverwrite(const QString &newName)
+/*!
\reimp
*/
-
-/*! \fn bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) const
+bool QFSFileEngine::rename(const QString &newName)
+{
+ Q_D(QFSFileEngine);
+ QSystemError error;
+ bool ret = QFileSystemEngine::renameFile(d->fileEntry, QFileSystemEntry(newName), error);
+ if (!ret)
+ setError(QFile::RenameError, error.toString());
+ return ret;
+}
+/*!
\reimp
*/
+bool QFSFileEngine::renameOverwrite(const QString &newName)
+{
+ Q_D(QFSFileEngine);
+ QSystemError error;
+ bool ret = QFileSystemEngine::renameOverwriteFile(d->fileEntry, QFileSystemEntry(newName), error);
+ if (!ret)
+ setError(QFile::RenameError, error.toString());
+ return ret;
+}
-/*! \fn QString QFSFileEngine::rootPath()
- Returns the root path.
+/*!
+ \reimp
+*/
+bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) const
+{
+ return QFileSystemEngine::createDirectory(QFileSystemEntry(name), createParentDirectories);
+}
- \sa homePath()
+/*!
+ \reimp
*/
+bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) const
+{
+ return QFileSystemEngine::removeDirectory(QFileSystemEntry(name), recurseParentDirectories);
+}
-/*! \fn bool QFSFileEngine::setCurrentPath(const QString &path)
+
+/*!
Sets the current path (e.g., for QDir), to \a path. Returns \c true if the
new path exists; otherwise this function does nothing, and returns \c false.
\sa currentPath()
*/
+bool QFSFileEngine::setCurrentPath(const QString &path)
+{
+ return QFileSystemEngine::setCurrentPath(QFileSystemEntry(path));
+}
/*! \fn bool QFSFileEngine::setPermissions(uint perms)
\reimp
@@ -1022,11 +1087,6 @@ bool QFSFileEngine::supportsExtension(Extension extension) const
\reimp
*/
-/*! \fn QString QFSFileEngine::tempPath()
- Returns the temporary path (i.e., a path in which it is safe
- to store temporary files).
-*/
-
/*! \fn QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions(QAbstractFileEngine::FileFlags type) const
\internal
*/
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index d4983c72af..4610e9306c 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -304,54 +304,6 @@ bool QFSFileEnginePrivate::nativeIsSequential() const
return isSequentialFdFh();
}
-bool QFSFileEngine::remove()
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::removeFile(d->fileEntry, error);
- d->metaData.clear();
- if (!ret) {
- setError(QFile::RemoveError, error.toString());
- }
- return ret;
-}
-
-bool QFSFileEngine::copy(const QString &newName)
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::copyFile(d->fileEntry, QFileSystemEntry(newName), error);
- if (!ret) {
- setError(QFile::CopyError, error.toString());
- }
- return ret;
-}
-
-bool QFSFileEngine::renameOverwrite(const QString &newName)
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::renameOverwriteFile(d->fileEntry, QFileSystemEntry(newName), error);
-
- if (!ret)
- setError(QFile::RenameError, error.toString());
-
- return ret;
-}
-
-bool QFSFileEngine::rename(const QString &newName)
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::renameFile(d->fileEntry, QFileSystemEntry(newName), error);
-
- if (!ret) {
- setError(QFile::RenameError, error.toString());
- }
-
- return ret;
-}
-
bool QFSFileEngine::link(const QString &newName)
{
Q_D(QFSFileEngine);
@@ -368,45 +320,16 @@ qint64 QFSFileEnginePrivate::nativeSize() const
return sizeFdFh();
}
-bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) const
-{
- return QFileSystemEngine::createDirectory(QFileSystemEntry(name), createParentDirectories);
-}
-
-bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) const
-{
- return QFileSystemEngine::removeDirectory(QFileSystemEntry(name), recurseParentDirectories);
-}
-
bool QFSFileEngine::caseSensitive() const
{
return true;
}
-bool QFSFileEngine::setCurrentPath(const QString &path)
-{
- return QFileSystemEngine::setCurrentPath(QFileSystemEntry(path));
-}
-
QString QFSFileEngine::currentPath(const QString &)
{
return QFileSystemEngine::currentPath().filePath();
}
-QString QFSFileEngine::homePath()
-{
- return QFileSystemEngine::homePath();
-}
-
-QString QFSFileEngine::rootPath()
-{
- return QFileSystemEngine::rootPath();
-}
-
-QString QFSFileEngine::tempPath()
-{
- return QFileSystemEngine::tempPath();
-}
QFileInfoList QFSFileEngine::drives()
{
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 19cc3e6402..dd4882a2bc 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -443,66 +443,11 @@ bool QFSFileEnginePrivate::nativeIsSequential() const
#endif
}
-bool QFSFileEngine::remove()
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::removeFile(d->fileEntry, error);
- if (!ret)
- setError(QFile::RemoveError, error.toString());
- return ret;
-}
-
-bool QFSFileEngine::copy(const QString &copyName)
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::copyFile(d->fileEntry, QFileSystemEntry(copyName), error);
- if (!ret)
- setError(QFile::CopyError, error.toString());
- return ret;
-}
-
-bool QFSFileEngine::rename(const QString &newName)
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::renameFile(d->fileEntry, QFileSystemEntry(newName), error);
- if (!ret)
- setError(QFile::RenameError, error.toString());
- return ret;
-}
-
-bool QFSFileEngine::renameOverwrite(const QString &newName)
-{
- Q_D(QFSFileEngine);
- QSystemError error;
- bool ret = QFileSystemEngine::renameOverwriteFile(d->fileEntry, QFileSystemEntry(newName), error);
- if (!ret)
- setError(QFile::RenameError, error.toString());
- return ret;
-}
-
-bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) const
-{
- return QFileSystemEngine::createDirectory(QFileSystemEntry(name), createParentDirectories);
-}
-
-bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) const
-{
- return QFileSystemEngine::removeDirectory(QFileSystemEntry(name), recurseParentDirectories);
-}
-
bool QFSFileEngine::caseSensitive() const
{
return false;
}
-bool QFSFileEngine::setCurrentPath(const QString &path)
-{
- return QFileSystemEngine::setCurrentPath(QFileSystemEntry(path));
-}
-
QString QFSFileEngine::currentPath(const QString &fileName)
{
#if !defined(Q_OS_WINRT)
@@ -530,21 +475,6 @@ QString QFSFileEngine::currentPath(const QString &fileName)
#endif // Q_OS_WINRT
}
-QString QFSFileEngine::homePath()
-{
- return QFileSystemEngine::homePath();
-}
-
-QString QFSFileEngine::rootPath()
-{
- return QFileSystemEngine::rootPath();
-}
-
-QString QFSFileEngine::tempPath()
-{
- return QFileSystemEngine::tempPath();
-}
-
#if !defined(Q_OS_WINRT)
// cf QStorageInfo::isReady
static inline bool isDriveReady(const wchar_t *path)
@@ -661,14 +591,14 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(QAbstractFileEngine::Fil
if (type & Refresh)
d->metaData.clear();
- QAbstractFileEngine::FileFlags ret = 0;
+ QAbstractFileEngine::FileFlags ret;
if (type & FlagsMask)
ret |= LocalDiskFlag;
bool exists;
{
- QFileSystemMetaData::MetaDataFlags queryFlags = 0;
+ QFileSystemMetaData::MetaDataFlags queryFlags;
queryFlags |= QFileSystemMetaData::MetaDataFlags(uint(type))
& QFileSystemMetaData::Permissions;
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 076b2394ba..cc1d110252 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -461,7 +461,7 @@ QIODevice::QIODevice(QIODevicePrivate &dd)
*/
QIODevice::QIODevice()
- : QObject(*new QIODevicePrivate, 0)
+ : QObject(*new QIODevicePrivate, nullptr)
{
#if defined QIODEVICE_DEBUG
QFile *file = qobject_cast<QFile *>(this);
@@ -1829,7 +1829,7 @@ QByteArray QIODevicePrivate::peek(qint64 maxSize)
/*! \fn bool QIODevice::getChar(char *c)
Reads one character from the device and stores it in \a c. If \a c
- is 0, the character is discarded. Returns \c true on success;
+ is \nullptr, the character is discarded. Returns \c true on success;
otherwise returns \c false.
\sa read(), putChar(), ungetChar()
diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp
index d1806aa12b..df0197e8eb 100644
--- a/src/corelib/io/qnoncontiguousbytedevice.cpp
+++ b/src/corelib/io/qnoncontiguousbytedevice.cpp
@@ -127,7 +127,7 @@ QT_BEGIN_NAMESPACE
\internal
*/
-QNonContiguousByteDevice::QNonContiguousByteDevice() : QObject((QObject*)0)
+QNonContiguousByteDevice::QNonContiguousByteDevice() : QObject((QObject*)nullptr)
{
}
@@ -188,7 +188,7 @@ const char* QNonContiguousByteDeviceByteArrayImpl::readPointer(qint64 maximumLen
{
if (atEnd()) {
len = -1;
- return 0;
+ return nullptr;
}
if (maximumLength != -1)
@@ -241,7 +241,7 @@ const char* QNonContiguousByteDeviceRingBufferImpl::readPointer(qint64 maximumLe
{
if (atEnd()) {
len = -1;
- return 0;
+ return nullptr;
}
const char *returnValue = ringBuffer->readPointerAtPosition(currentPosition, len);
@@ -282,7 +282,7 @@ qint64 QNonContiguousByteDeviceRingBufferImpl::size() const
QNonContiguousByteDeviceIoDeviceImpl::QNonContiguousByteDeviceIoDeviceImpl(QIODevice *d)
: QNonContiguousByteDevice(),
- currentReadBuffer(0), currentReadBufferSize(16*1024),
+ currentReadBuffer(nullptr), currentReadBufferSize(16*1024),
currentReadBufferAmount(0), currentReadBufferPosition(0), totalAdvancements(0),
eof(false)
{
@@ -301,10 +301,10 @@ const char* QNonContiguousByteDeviceIoDeviceImpl::readPointer(qint64 maximumLeng
{
if (eof == true) {
len = -1;
- return 0;
+ return nullptr;
}
- if (currentReadBuffer == 0)
+ if (currentReadBuffer == nullptr)
currentReadBuffer = new QByteArray(currentReadBufferSize, '\0'); // lazy alloc
if (maximumLength == -1)
@@ -323,7 +323,7 @@ const char* QNonContiguousByteDeviceIoDeviceImpl::readPointer(qint64 maximumLeng
// size was unknown before, emit a readProgress with the final size
if (size() == -1)
emit readProgress(totalAdvancements, totalAdvancements);
- return 0;
+ return nullptr;
}
currentReadBufferAmount = haveRead;
@@ -349,7 +349,7 @@ bool QNonContiguousByteDeviceIoDeviceImpl::advanceReadPointer(qint64 amount)
if (currentReadBufferPosition > currentReadBufferAmount) {
qint64 i = currentReadBufferPosition - currentReadBufferAmount;
while (i > 0) {
- if (device->getChar(0) == false) {
+ if (device->getChar(nullptr) == false) {
emit readProgress(totalAdvancements - i, size());
return false; // ### FIXME handle eof
}
@@ -377,7 +377,7 @@ bool QNonContiguousByteDeviceIoDeviceImpl::reset()
totalAdvancements = 0; //reset the progress counter
if (currentReadBuffer) {
delete currentReadBuffer;
- currentReadBuffer = 0;
+ currentReadBuffer = nullptr;
}
currentReadBufferAmount = 0;
currentReadBufferPosition = 0;
@@ -405,7 +405,7 @@ qint64 QNonContiguousByteDeviceIoDeviceImpl::pos() const
return device->pos();
}
-QByteDeviceWrappingIoDevice::QByteDeviceWrappingIoDevice(QNonContiguousByteDevice *bd) : QIODevice((QObject*)0)
+QByteDeviceWrappingIoDevice::QByteDeviceWrappingIoDevice(QNonContiguousByteDevice *bd) : QIODevice((QObject*)nullptr)
{
byteDevice = bd;
connect(bd, SIGNAL(readyRead()), SIGNAL(readyRead()));
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 49e0847d44..aedcae2cdc 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -216,7 +216,7 @@ void QProcessEnvironmentPrivate::insert(const QProcessEnvironmentPrivate &other)
environment variables to be removed.
*/
QProcessEnvironment::QProcessEnvironment()
- : d(0)
+ : d(nullptr)
{
}
@@ -436,18 +436,18 @@ void QProcessPrivate::Channel::clear()
case PipeSource:
Q_ASSERT(process);
process->stdinChannel.type = Normal;
- process->stdinChannel.process = 0;
+ process->stdinChannel.process = nullptr;
break;
case PipeSink:
Q_ASSERT(process);
process->stdoutChannel.type = Normal;
- process->stdoutChannel.process = 0;
+ process->stdoutChannel.process = nullptr;
break;
}
type = Normal;
file.clear();
- process = 0;
+ process = nullptr;
}
/*!
@@ -869,8 +869,8 @@ QProcessPrivate::QProcessPrivate()
sequenceNumber = 0;
exitCode = 0;
exitStatus = QProcess::NormalExit;
- startupSocketNotifier = 0;
- deathNotifier = 0;
+ startupSocketNotifier = nullptr;
+ deathNotifier = nullptr;
childStartedPipe[0] = INVALID_Q_PIPE;
childStartedPipe[1] = INVALID_Q_PIPE;
forkfd = -1;
@@ -924,23 +924,23 @@ void QProcessPrivate::cleanup()
if (stdoutChannel.notifier) {
delete stdoutChannel.notifier;
- stdoutChannel.notifier = 0;
+ stdoutChannel.notifier = nullptr;
}
if (stderrChannel.notifier) {
delete stderrChannel.notifier;
- stderrChannel.notifier = 0;
+ stderrChannel.notifier = nullptr;
}
if (stdinChannel.notifier) {
delete stdinChannel.notifier;
- stdinChannel.notifier = 0;
+ stdinChannel.notifier = nullptr;
}
if (startupSocketNotifier) {
delete startupSocketNotifier;
- startupSocketNotifier = 0;
+ startupSocketNotifier = nullptr;
}
if (deathNotifier) {
delete deathNotifier;
- deathNotifier = 0;
+ deathNotifier = nullptr;
}
closeChannel(&stdoutChannel);
closeChannel(&stderrChannel);
@@ -1229,7 +1229,7 @@ void QProcessPrivate::closeWriteChannel()
#endif
if (stdinChannel.notifier) {
delete stdinChannel.notifier;
- stdinChannel.notifier = 0;
+ stdinChannel.notifier = nullptr;
}
#ifdef Q_OS_WIN
// ### Find a better fix, feeding the process little by little
@@ -2617,7 +2617,7 @@ QT_END_INCLUDE_NAMESPACE
QStringList QProcess::systemEnvironment()
{
QStringList tmp;
- char *entry = 0;
+ char *entry = nullptr;
int count = 0;
while ((entry = environ[count++]))
tmp << QString::fromLocal8Bit(entry);
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 0c80daa024..2186f23ab6 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -246,7 +246,7 @@ bool QProcessPrivate::openChannel(Channel &channel)
return false;
// create the socket notifiers
- if (threadData->hasEventDispatcher()) {
+ if (threadData.loadRelaxed()->hasEventDispatcher()) {
if (&channel == &stdinChannel) {
channel.notifier = new QSocketNotifier(channel.pipe[1],
QSocketNotifier::Write, q);
@@ -338,11 +338,11 @@ static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Map &environme
{
*envc = 0;
if (environment.isEmpty())
- return 0;
+ return nullptr;
char **envp = new char *[environment.count() + 2];
- envp[environment.count()] = 0;
- envp[environment.count() + 1] = 0;
+ envp[environment.count()] = nullptr;
+ envp[environment.count() + 1] = nullptr;
auto it = environment.constBegin();
const auto end = environment.constEnd();
@@ -377,7 +377,7 @@ void QProcessPrivate::startProcess()
return;
}
- if (threadData->hasEventDispatcher()) {
+ if (threadData.loadRelaxed()->hasEventDispatcher()) {
startupSocketNotifier = new QSocketNotifier(childStartedPipe[0],
QSocketNotifier::Read, q);
QObject::connect(startupSocketNotifier, SIGNAL(activated(int)),
@@ -390,7 +390,7 @@ void QProcessPrivate::startProcess()
// Create argument list with right number of elements, and set the final
// one to 0.
char **argv = new char *[arguments.count() + 2];
- argv[arguments.count() + 1] = 0;
+ argv[arguments.count() + 1] = nullptr;
// Encode the program name.
QByteArray encodedProgramName = QFile::encodeName(program);
@@ -437,13 +437,13 @@ void QProcessPrivate::startProcess()
// Duplicate the environment.
int envc = 0;
- char **envp = 0;
+ char **envp = nullptr;
if (environment.d.constData()) {
envp = _q_dupEnvironment(environment.d.constData()->vars, &envc);
}
// Encode the working directory if it's non-empty, otherwise just pass 0.
- const char *workingDirPtr = 0;
+ const char *workingDirPtr = nullptr;
QByteArray encodedWorkingDirectory;
if (!workingDirectory.isEmpty()) {
encodedWorkingDirectory = QFile::encodeName(workingDirectory);
@@ -451,8 +451,13 @@ void QProcessPrivate::startProcess()
}
// Start the process manager, and fork off the child process.
+ // ### Qt6: revisit whether the change in behavior due to not using fork()
+ // is acceptable for derived classes.
+ int ffdflags = FFD_CLOEXEC;
+ if (typeid(*q) != typeid(QProcess))
+ ffdflags |= FFD_USE_FORK;
pid_t childPid;
- forkfd = ::forkfd(FFD_CLOEXEC, &childPid);
+ forkfd = ::forkfd(ffdflags , &childPid);
int lastForkErrno = errno;
if (forkfd != FFD_CHILD_PROCESS) {
// Parent process.
@@ -517,7 +522,7 @@ void QProcessPrivate::startProcess()
if (stderrChannel.pipe[0] != -1)
::fcntl(stderrChannel.pipe[0], F_SETFL, ::fcntl(stderrChannel.pipe[0], F_GETFL) | O_NONBLOCK);
- if (threadData->eventDispatcher.loadAcquire()) {
+ if (threadData.loadRelaxed()->eventDispatcher.loadAcquire()) {
deathNotifier = new QSocketNotifier(forkfd, QSocketNotifier::Read, q);
QObject::connect(deathNotifier, SIGNAL(activated(int)),
q, SLOT(_q_processDied()));
@@ -596,7 +601,7 @@ bool QProcessPrivate::processStarted(QString *errorMessage)
if (startupSocketNotifier) {
startupSocketNotifier->setEnabled(false);
startupSocketNotifier->deleteLater();
- startupSocketNotifier = 0;
+ startupSocketNotifier = nullptr;
}
qt_safe_close(childStartedPipe[0]);
childStartedPipe[0] = -1;
@@ -889,7 +894,7 @@ bool QProcessPrivate::waitForDeadChild()
crashed = info.code != CLD_EXITED;
delete deathNotifier;
- deathNotifier = 0;
+ deathNotifier = nullptr;
EINTR_LOOP(ret, forkfd_close(forkfd));
forkfd = -1; // Child is dead, don't try to kill it anymore
@@ -935,7 +940,7 @@ bool QProcessPrivate::startDetached(qint64 *pid)
struct sigaction noaction;
memset(&noaction, 0, sizeof(noaction));
noaction.sa_handler = SIG_IGN;
- ::sigaction(SIGPIPE, &noaction, 0);
+ ::sigaction(SIGPIPE, &noaction, nullptr);
::setsid();
@@ -964,7 +969,7 @@ bool QProcessPrivate::startDetached(qint64 *pid)
char **argv = new char *[arguments.size() + 2];
for (int i = 0; i < arguments.size(); ++i)
argv[i + 1] = ::strdup(QFile::encodeName(arguments.at(i)).constData());
- argv[arguments.size() + 1] = 0;
+ argv[arguments.size() + 1] = nullptr;
// Duplicate the environment.
int envc = 0;
@@ -991,7 +996,7 @@ bool QProcessPrivate::startDetached(qint64 *pid)
struct sigaction noaction;
memset(&noaction, 0, sizeof(noaction));
noaction.sa_handler = SIG_IGN;
- ::sigaction(SIGPIPE, &noaction, 0);
+ ::sigaction(SIGPIPE, &noaction, nullptr);
// '\1' means execv failed
char c = '\1';
@@ -1002,7 +1007,7 @@ bool QProcessPrivate::startDetached(qint64 *pid)
struct sigaction noaction;
memset(&noaction, 0, sizeof(noaction));
noaction.sa_handler = SIG_IGN;
- ::sigaction(SIGPIPE, &noaction, 0);
+ ::sigaction(SIGPIPE, &noaction, nullptr);
// '\2' means internal error
char c = '\2';
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 3ba86063e3..1527cf93ed 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -49,7 +49,6 @@
#include <qelapsedtimer.h>
#include <qfileinfo.h>
#include <qrandom.h>
-#include <qregexp.h>
#include <qwineventnotifier.h>
#include <private/qsystemlibrary_p.h>
#include <private/qthread_p.h>
@@ -398,7 +397,17 @@ static QString qt_create_commandline(const QString &program, const QStringList &
for (int i=0; i<arguments.size(); ++i) {
QString tmp = arguments.at(i);
// Quotes are escaped and their preceding backslashes are doubled.
- tmp.replace(QRegExp(QLatin1String("(\\\\*)\"")), QLatin1String("\\1\\1\\\""));
+ int index = tmp.indexOf(QLatin1Char('"'));
+ while (index >= 0) {
+ // Escape quote
+ tmp.insert(index++, QLatin1Char('\\'));
+ // Double preceding backslashes (ignoring the one we just inserted)
+ for (int i = index - 2 ; i >= 0 && tmp.at(i) == QLatin1Char('\\') ; --i) {
+ tmp.insert(i, QLatin1Char('\\'));
+ index++;
+ }
+ index = tmp.indexOf(QLatin1Char('"'), index + 1);
+ }
if (tmp.isEmpty() || tmp.contains(QLatin1Char(' ')) || tmp.contains(QLatin1Char('\t'))) {
// The argument must not end with a \ since this would be interpreted
// as escaping the quote -- rather put the \ behind the quote: e.g.
@@ -590,7 +599,7 @@ void QProcessPrivate::startProcess()
if (!pid)
return;
- if (threadData->hasEventDispatcher()) {
+ if (threadData.loadRelaxed()->hasEventDispatcher()) {
processFinishedNotifier = new QWinEventNotifier(pid->hProcess, q);
QObject::connect(processFinishedNotifier, SIGNAL(activated(HANDLE)), q, SLOT(_q_processDied()));
processFinishedNotifier->setEnabled(true);
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index a494daa29f..225ee0a769 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Copyright (C) 2019 Intel Corporation.
+** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -60,14 +60,14 @@
#include "private/qtools_p.h"
#include "private/qsystemerror_p.h"
+#ifndef QT_NO_COMPRESS
+# include <zconf.h>
+# include <zlib.h>
+#endif
#if QT_CONFIG(zstd)
# include <zstd.h>
#endif
-#ifdef Q_OS_UNIX
-# include "private/qcore_unix_p.h"
-#endif
-
#if defined(Q_OS_UNIX) && !defined(Q_OS_NACL) && !defined(Q_OS_INTEGRITY)
# define QT_USE_MMAP
# include <sys/mman.h>
@@ -296,6 +296,8 @@ public:
void ensureInitialized() const;
void ensureChildren() const;
+ qint64 uncompressedSize() const Q_DECL_PURE_FUNCTION;
+ qsizetype decompress(char *buffer, qsizetype bufferSize) const;
bool load(const QString &file);
void clear();
@@ -440,6 +442,78 @@ QResourcePrivate::ensureChildren() const
}
}
+qint64 QResourcePrivate::uncompressedSize() const
+{
+ switch (compressionAlgo) {
+ case QResource::NoCompression:
+ return size;
+
+ case QResource::ZlibCompression:
+#ifndef QT_NO_COMPRESS
+ if (size_t(size) >= sizeof(quint32))
+ return qFromBigEndian<quint32>(data);
+#else
+ Q_ASSERT(!"QResource: Qt built without support for Zlib compression");
+ Q_UNREACHABLE();
+#endif
+ break;
+
+ case QResource::ZstdCompression: {
+#if QT_CONFIG(zstd)
+ size_t n = ZSTD_getFrameContentSize(data, size);
+ return ZSTD_isError(n) ? -1 : qint64(n);
+#else
+ // This should not happen because we've refused to load such resource
+ Q_ASSERT(!"QResource: Qt built without support for Zstd compression");
+ Q_UNREACHABLE();
+#endif
+ }
+
+ }
+ return -1;
+}
+
+qsizetype QResourcePrivate::decompress(char *buffer, qsizetype bufferSize) const
+{
+ Q_ASSERT(data);
+
+ switch (compressionAlgo) {
+ case QResource::NoCompression:
+ Q_UNREACHABLE();
+ break;
+
+ case QResource::ZlibCompression: {
+#ifndef QT_NO_COMPRESS
+ uLong len = uLong(bufferSize);
+ int res = ::uncompress(reinterpret_cast<Bytef *>(buffer), &len,
+ data + sizeof(quint32), uLong(size - sizeof(quint32)));
+ if (res != Z_OK) {
+ qWarning("QResource: error decompressing zlib content (%d)", res);
+ return -1;
+ }
+ return len;
+#else
+ Q_UNREACHABLE();
+#endif
+ }
+
+ case QResource::ZstdCompression: {
+#if QT_CONFIG(zstd)
+ size_t usize = ZSTD_decompress(buffer, bufferSize, data, size);
+ if (ZSTD_isError(usize)) {
+ qWarning("QResource: error decompressing zstd content: %s", ZSTD_getErrorName(usize));
+ return -1;
+ }
+ return usize;
+#else
+ Q_UNREACHABLE();
+#endif
+ }
+ }
+
+ return -1;
+}
+
/*!
Constructs a QResource pointing to \a file. \a locale is used to
load a specific localization of a resource data.
@@ -600,9 +674,12 @@ QResource::Compression QResource::compressionAlgorithm() const
}
/*!
- Returns the size of the data backing the resource.
+ Returns the size of the stored data backing the resource.
- \sa data(), isFile()
+ If the resource is compressed, this function returns the size of the
+ compressed data. See uncompressedSize() for the uncompressed size.
+
+ \sa data(), uncompressedSize(), isFile()
*/
qint64 QResource::size() const
@@ -613,12 +690,29 @@ qint64 QResource::size() const
}
/*!
- Returns direct access to a read only segment of data that this resource
- represents. If the resource is compressed the data returned is compressed
- and the appropriate library functions must be used to access the data. If
- the resource is a directory \nullptr is returned.
+ \since 5.15
+
+ Returns the size of the data in this resource. If the data was not
+ compressed, this function returns the same as size(). If it was, then this
+ function extracts the size of the original uncompressed data from the
+ stored stream.
+
+ \sa size(), uncompressedData(), isFile()
+*/
+qint64 QResource::uncompressedSize() const
+{
+ Q_D(const QResource);
+ d->ensureInitialized();
+ return d->uncompressedSize();
+}
+
+/*!
+ Returns direct access to a segment of read-only data, that this resource
+ represents. If the resource is compressed, the data returned is also
+ compressed. The caller must then decompress the data or use
+ uncompressedData(). If the resource is a directory, \c nullptr is returned.
- \sa size(), compressionAlgorithm(), isFile()
+ \sa uncompressedData(), size(), isFile()
*/
const uchar *QResource::data() const
@@ -629,6 +723,42 @@ const uchar *QResource::data() const
}
/*!
+ \since 5.15
+
+ Returns the resource data, decompressing it first, if the data was stored
+ compressed. If the resource is a directory or an error occurs while
+ decompressing, a null QByteArray is returned.
+
+ \note If the data was compressed, this function will decompress every time
+ it is called. The result is not cached between calls.
+
+ \sa uncompressedData(), size(), isCompressed(), isFile()
+*/
+
+QByteArray QResource::uncompressedData() const
+{
+ Q_D(const QResource);
+ qint64 n = uncompressedSize();
+ if (n < 0)
+ return QByteArray();
+ if (n > std::numeric_limits<QByteArray::size_type>::max()) {
+ qWarning("QResource: compressed content does not fit into a QByteArray; use QFile instead");
+ return QByteArray();
+ }
+ if (d->compressionAlgo == NoCompression)
+ return QByteArray::fromRawData(reinterpret_cast<const char *>(d->data), n);
+
+ // decompress
+ QByteArray result(n, Qt::Uninitialized);
+ n = d->decompress(result.data(), n);
+ if (n < 0)
+ result.clear();
+ else
+ result.truncate(n);
+ return result;
+}
+
+/*!
\since 5.8
Returns the date and time when the file was last modified before
@@ -1451,13 +1581,7 @@ bool QResourceFileEngine::link(const QString &)
qint64 QResourceFileEngine::size() const
{
Q_D(const QResourceFileEngine);
- if (!d->resource.isValid())
- return 0;
- if (d->resource.compressionAlgorithm() != QResource::NoCompression) {
- d->uncompress();
- return d->uncompressed.size();
- }
- return d->resource.size();
+ return d->resource.isValid() ? d->resource.uncompressedSize() : 0;
}
qint64 QResourceFileEngine::pos() const
@@ -1494,7 +1618,7 @@ bool QResourceFileEngine::isSequential() const
QAbstractFileEngine::FileFlags QResourceFileEngine::fileFlags(QAbstractFileEngine::FileFlags type) const
{
Q_D(const QResourceFileEngine);
- QAbstractFileEngine::FileFlags ret = 0;
+ QAbstractFileEngine::FileFlags ret;
if(!d->resource.isValid())
return ret;
@@ -1586,7 +1710,7 @@ QAbstractFileEngine::Iterator *QResourceFileEngine::beginEntryList(QDir::Filters
*/
QAbstractFileEngine::Iterator *QResourceFileEngine::endEntryList()
{
- return 0;
+ return nullptr;
}
bool QResourceFileEngine::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output)
@@ -1596,7 +1720,7 @@ bool QResourceFileEngine::extension(Extension extension, const ExtensionOption *
const MapExtensionOption *options = (const MapExtensionOption*)(option);
MapExtensionReturn *returnValue = static_cast<MapExtensionReturn*>(output);
returnValue->address = d->map(options->offset, options->size, options->flags);
- return (returnValue->address != 0);
+ return (returnValue->address != nullptr);
}
if (extension == UnMapExtension) {
const UnMapExtensionOption *options = (const UnMapExtensionOption*)option;
@@ -1615,22 +1739,21 @@ uchar *QResourceFileEnginePrivate::map(qint64 offset, qint64 size, QFile::Memory
Q_Q(QResourceFileEngine);
Q_UNUSED(flags);
- qint64 max = resource.size();
- if (resource.compressionAlgorithm() != QResource::NoCompression) {
- uncompress();
- max = uncompressed.size();
- }
-
+ qint64 max = resource.uncompressedSize();
qint64 end;
if (offset < 0 || size <= 0 || !resource.isValid() ||
add_overflow(offset, size, &end) || end > max) {
q->setError(QFile::UnspecifiedError, QString());
- return 0;
+ return nullptr;
}
const uchar *address = resource.data();
- if (resource.compressionAlgorithm() != QResource::NoCompression)
+ if (resource.compressionAlgorithm() != QResource::NoCompression) {
+ uncompress();
+ if (uncompressed.isNull())
+ return nullptr;
address = reinterpret_cast<const uchar *>(uncompressed.constData());
+ }
return const_cast<uchar *>(address) + offset;
}
@@ -1643,41 +1766,10 @@ bool QResourceFileEnginePrivate::unmap(uchar *ptr)
void QResourceFileEnginePrivate::uncompress() const
{
- if (uncompressed.isEmpty() && resource.size()) {
- quint64 size;
- switch (resource.compressionAlgorithm()) {
- case QResource::NoCompression:
- return; // nothing to do
-
- case QResource::ZlibCompression:
-#ifndef QT_NO_COMPRESS
- uncompressed = qUncompress(resource.data(), resource.size());
-#else
- Q_ASSERT(!"QResourceFileEngine::open: Qt built without support for Zlib compression");
-#endif
- break;
-
- case QResource::ZstdCompression:
-#if QT_CONFIG(zstd)
- size = ZSTD_getFrameContentSize(resource.data(), resource.size());
- if (!ZSTD_isError(size)) {
- if (size >= MaxAllocSize) {
- qWarning("QResourceFileEngine::open: content bigger than memory (size %lld)", size);
- } else {
- uncompressed = QByteArray(size, Qt::Uninitialized);
- size = ZSTD_decompress(const_cast<char *>(uncompressed.data()), size,
- resource.data(), resource.size());
- }
- }
- if (ZSTD_isError(size))
- qWarning("QResourceFileEngine::open: error decoding: %s", ZSTD_getErrorName(size));
-#else
- Q_UNUSED(size);
- Q_ASSERT(!"QResourceFileEngine::open: Qt built without support for Zstd compression");
-#endif
- break;
- }
- }
+ if (resource.compressionAlgorithm() == QResource::NoCompression
+ || !uncompressed.isEmpty() || resource.size() == 0)
+ return; // nothing to do
+ uncompressed = resource.uncompressedData();
}
#endif // !defined(QT_BOOTSTRAPPED)
diff --git a/src/corelib/io/qresource.h b/src/corelib/io/qresource.h
index 5ee8d5d266..52b0d74d29 100644
--- a/src/corelib/io/qresource.h
+++ b/src/corelib/io/qresource.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2019 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -75,6 +76,8 @@ public:
Compression compressionAlgorithm() const;
qint64 size() const;
const uchar *data() const;
+ qint64 uncompressedSize() const;
+ QByteArray uncompressedData() const;
QDateTime lastModified() const;
#if QT_DEPRECATED_SINCE(5, 13)
diff --git a/src/corelib/io/qsavefile.cpp b/src/corelib/io/qsavefile.cpp
index 0a884a7df9..067ccda3df 100644
--- a/src/corelib/io/qsavefile.cpp
+++ b/src/corelib/io/qsavefile.cpp
@@ -116,7 +116,7 @@ QSaveFile::QSaveFile(const QString &name)
Constructs a new file object to represent the file with the given \a name.
*/
QSaveFile::QSaveFile(const QString &name)
- : QFileDevice(*new QSaveFilePrivate, 0)
+ : QFileDevice(*new QSaveFilePrivate, nullptr)
{
Q_D(QSaveFile);
d->fileName = name;
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index fc7122d904..b191397e7e 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -76,10 +76,6 @@
# include <ioLib.h>
#endif
-#ifdef Q_OS_WASM
-#include <emscripten.h>
-#endif
-
#include <algorithm>
#include <stdlib.h>
@@ -210,7 +206,7 @@ QConfFile *QConfFile::fromName(const QString &fileName, bool _userPerms)
ConfFileHash *usedHash = usedHashFunc();
ConfFileCache *unusedCache = unusedCacheFunc();
- QConfFile *confFile = 0;
+ QConfFile *confFile = nullptr;
const auto locker = qt_scoped_lock(settingsGlobalMutex);
if (!(confFile = usedHash->value(absPath))) {
@@ -234,7 +230,7 @@ void QConfFile::clearCache()
// QSettingsPrivate
QSettingsPrivate::QSettingsPrivate(QSettings::Format format)
- : format(format), scope(QSettings::UserScope /* nothing better to put */), iniCodec(0), fallbacks(true),
+ : format(format), scope(QSettings::UserScope /* nothing better to put */), iniCodec(nullptr), fallbacks(true),
pendingChanges(false), status(QSettings::NoError)
{
}
@@ -242,7 +238,7 @@ QSettingsPrivate::QSettingsPrivate(QSettings::Format format)
QSettingsPrivate::QSettingsPrivate(QSettings::Format format, QSettings::Scope scope,
const QString &organization, const QString &application)
: format(format), scope(scope), organizationName(organization), applicationName(application),
- iniCodec(0), fallbacks(true), pendingChanges(false), status(QSettings::NoError)
+ iniCodec(nullptr), fallbacks(true), pendingChanges(false), status(QSettings::NoError)
{
}
@@ -295,7 +291,7 @@ after_loop:
// see also qsettings_win.cpp, qsettings_winrt.cpp and qsettings_mac.cpp
-#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
+#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) && !defined(Q_OS_WASM)
QSettingsPrivate *QSettingsPrivate::create(QSettings::Format format, QSettings::Scope scope,
const QString &organization, const QString &application)
{
@@ -400,12 +396,12 @@ QString QSettingsPrivate::variantToString(const QVariant &v)
{
QString result;
- switch (v.type()) {
- case QVariant::Invalid:
+ switch (v.userType()) {
+ case QMetaType::UnknownType:
result = QLatin1String("@Invalid()");
break;
- case QVariant::ByteArray: {
+ case QMetaType::QByteArray: {
QByteArray a = v.toByteArray();
result = QLatin1String("@ByteArray(")
+ QLatin1String(a.constData(), a.size())
@@ -413,14 +409,14 @@ QString QSettingsPrivate::variantToString(const QVariant &v)
break;
}
- case QVariant::String:
- case QVariant::LongLong:
- case QVariant::ULongLong:
- case QVariant::Int:
- case QVariant::UInt:
- case QVariant::Bool:
- case QVariant::Double:
- case QVariant::KeySequence: {
+ case QMetaType::QString:
+ case QMetaType::LongLong:
+ case QMetaType::ULongLong:
+ case QMetaType::Int:
+ case QMetaType::UInt:
+ case QMetaType::Bool:
+ case QMetaType::Double:
+ case QMetaType::QKeySequence: {
result = v.toString();
if (result.contains(QChar::Null))
result = QLatin1String("@String(") + result + QLatin1Char(')');
@@ -429,17 +425,17 @@ QString QSettingsPrivate::variantToString(const QVariant &v)
break;
}
#ifndef QT_NO_GEOM_VARIANT
- case QVariant::Rect: {
+ case QMetaType::QRect: {
QRect r = qvariant_cast<QRect>(v);
result = QString::asprintf("@Rect(%d %d %d %d)", r.x(), r.y(), r.width(), r.height());
break;
}
- case QVariant::Size: {
+ case QMetaType::QSize: {
QSize s = qvariant_cast<QSize>(v);
result = QString::asprintf("@Size(%d %d)", s.width(), s.height());
break;
}
- case QVariant::Point: {
+ case QMetaType::QPoint: {
QPoint p = qvariant_cast<QPoint>(v);
result = QString::asprintf("@Point(%d %d)", p.x(), p.y());
break;
@@ -450,7 +446,7 @@ QString QSettingsPrivate::variantToString(const QVariant &v)
#ifndef QT_NO_DATASTREAM
QDataStream::Version version;
const char *typeSpec;
- if (v.type() == QVariant::DateTime) {
+ if (v.userType() == QMetaType::QDateTime) {
version = QDataStream::Qt_5_6;
typeSpec = "@DateTime(";
} else {
@@ -928,8 +924,8 @@ QStringList QSettingsPrivate::splitArgs(const QString &s, int idx)
void QConfFileSettingsPrivate::initFormat()
{
extension = (format == QSettings::NativeFormat) ? QLatin1String(".conf") : QLatin1String(".ini");
- readFunc = 0;
- writeFunc = 0;
+ readFunc = nullptr;
+ writeFunc = nullptr;
#if defined(Q_OS_MAC)
caseSensitivity = (format == QSettings::NativeFormat) ? Qt::CaseSensitive : IniCaseSensitivity;
#else
@@ -1185,7 +1181,9 @@ QConfFileSettingsPrivate::QConfFileSettingsPrivate(QSettings::Format format,
confFiles.append(QConfFile::fromName(systemPath.path + orgFile, false));
}
+#ifndef Q_OS_WASM // wasm needs to delay access until after file sync
initAccess();
+#endif
}
QConfFileSettingsPrivate::QConfFileSettingsPrivate(const QString &fileName,
@@ -1548,13 +1546,6 @@ void QConfFileSettingsPrivate::syncConfFile(QConfFile *confFile)
perms |= QFile::ReadGroup | QFile::ReadOther;
QFile(confFile->name).setPermissions(perms);
}
-#ifdef Q_OS_WASM
- EM_ASM(
- // Sync sandbox filesystem to persistent database filesystem. See QTBUG-70002
- FS.syncfs(false, function(err) {
- });
- );
-#endif
} else {
setStatus(QSettings::AccessError);
}
@@ -1897,8 +1888,8 @@ bool QConfFileSettingsPrivate::writeIniFile(QIODevice &device, const ParsedSetti
QVariant(QString("foo")).toList() returns an empty
list, not a list containing "foo".
*/
- if (value.type() == QVariant::StringList
- || (value.type() == QVariant::List && value.toList().size() != 1)) {
+ if (value.userType() == QMetaType::QStringList
+ || (value.userType() == QMetaType::QVariantList && value.toList().size() != 1)) {
iniEscapedStringList(variantListToStringList(value.toList()), block, iniCodec);
} else {
iniEscapedString(variantToString(value), block, iniCodec);
@@ -3347,7 +3338,7 @@ bool QSettings::contains(const QString &key) const
{
Q_D(const QSettings);
QString k = d->actualKey(key);
- return d->get(k, 0);
+ return d->get(k, nullptr);
}
/*!
diff --git a/src/corelib/io/qsettings_p.h b/src/corelib/io/qsettings_p.h
index d18c96a06c..c30f099a72 100644
--- a/src/corelib/io/qsettings_p.h
+++ b/src/corelib/io/qsettings_p.h
@@ -57,6 +57,10 @@
#include "QtCore/qiodevice.h"
#include "QtCore/qstack.h"
#include "QtCore/qstringlist.h"
+
+#include <QtCore/qvariant.h>
+#include "qsettings.h"
+
#ifndef QT_NO_QOBJECT
#include "private/qobject_p.h"
#endif
@@ -253,6 +257,10 @@ protected:
mutable QSettings::Status status;
};
+#ifdef Q_OS_WASM
+class QWasmSettingsPrivate;
+#endif
+
class QConfFileSettingsPrivate : public QSettingsPrivate
{
public:
@@ -281,7 +289,7 @@ public:
private:
void initFormat();
- void initAccess();
+ virtual void initAccess();
void syncConfFile(QConfFile *confFile);
bool writeIniFile(QIODevice &device, const ParsedSettingsMap &map);
#ifdef Q_OS_MAC
@@ -297,6 +305,9 @@ private:
QString extension;
Qt::CaseSensitivity caseSensitivity;
int nextPosition;
+#ifdef Q_OS_WASM
+ friend class QWasmSettingsPrivate;
+#endif
};
QT_END_NAMESPACE
diff --git a/src/corelib/io/qsettings_wasm.cpp b/src/corelib/io/qsettings_wasm.cpp
new file mode 100644
index 0000000000..8d8f4b505c
--- /dev/null
+++ b/src/corelib/io/qsettings_wasm.cpp
@@ -0,0 +1,259 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 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 "qsettings.h"
+#ifndef QT_NO_SETTINGS
+
+#include "qsettings_p.h"
+#ifndef QT_NO_QOBJECT
+#include "qcoreapplication.h"
+#include <QFile>
+#endif // QT_NO_QOBJECT
+#include <QDebug>
+
+#include <QFileInfo>
+#include <QDir>
+#include <emscripten.h>
+
+QT_BEGIN_NAMESPACE
+
+static bool isReadReady = false;
+
+class QWasmSettingsPrivate : public QConfFileSettingsPrivate
+{
+public:
+ QWasmSettingsPrivate(QSettings::Scope scope, const QString &organization,
+ const QString &application);
+ ~QWasmSettingsPrivate();
+
+ bool get(const QString &key, QVariant *value) const override;
+ QStringList children(const QString &prefix, ChildSpec spec) const override;
+ void clear() override;
+ void sync() override;
+ void flush() override;
+ bool isWritable() const override;
+
+ void syncToLocal(const char *data, int size);
+ void loadLocal(const QByteArray &filename);
+ void setReady();
+ void initAccess() override;
+
+private:
+ QString databaseName;
+ QString id;
+};
+
+static void QWasmSettingsPrivate_onLoad(void *userData, void *dataPtr, int size)
+{
+ QWasmSettingsPrivate *wasm = reinterpret_cast<QWasmSettingsPrivate *>(userData);
+
+ QFile file(wasm->fileName());
+ QFileInfo fileInfo(wasm->fileName());
+ QDir dir(fileInfo.path());
+ if (!dir.exists())
+ dir.mkpath(fileInfo.path());
+
+ if (file.open(QFile::WriteOnly)) {
+ file.write(reinterpret_cast<char *>(dataPtr), size);
+ file.close();
+ wasm->setReady();
+ }
+}
+
+static void QWasmSettingsPrivate_onError(void *userData)
+{
+ QWasmSettingsPrivate *wasm = reinterpret_cast<QWasmSettingsPrivate *>(userData);
+ if (wasm)
+ wasm->setStatus(QSettings::AccessError);
+}
+
+static void QWasmSettingsPrivate_onStore(void *userData)
+{
+ QWasmSettingsPrivate *wasm = reinterpret_cast<QWasmSettingsPrivate *>(userData);
+ if (wasm)
+ wasm->setStatus(QSettings::NoError);
+}
+
+static void QWasmSettingsPrivate_onCheck(void *userData, int exists)
+{
+ QWasmSettingsPrivate *wasm = reinterpret_cast<QWasmSettingsPrivate *>(userData);
+ if (wasm) {
+ if (exists)
+ wasm->loadLocal(wasm->fileName().toLocal8Bit());
+ else
+ wasm->setReady();
+ }
+}
+
+QSettingsPrivate *QSettingsPrivate::create(QSettings::Format format,
+ QSettings::Scope scope,
+ const QString &organization,
+ const QString &application)
+{
+ Q_UNUSED(format)
+ if (organization == QLatin1String("Qt"))
+ {
+ QString organizationDomain = QCoreApplication::organizationDomain();
+ QString applicationName = QCoreApplication::applicationName();
+
+ QSettingsPrivate *newSettings;
+ newSettings = new QWasmSettingsPrivate(scope, organizationDomain, applicationName);
+
+ newSettings->beginGroupOrArray(QSettingsGroup(normalizedKey(organization)));
+ if (!application.isEmpty())
+ newSettings->beginGroupOrArray(QSettingsGroup(normalizedKey(application)));
+
+ return newSettings;
+ }
+ return new QWasmSettingsPrivate(scope, organization, application);
+}
+
+QWasmSettingsPrivate::QWasmSettingsPrivate(QSettings::Scope scope, const QString &organization,
+ const QString &application)
+ : QConfFileSettingsPrivate(QSettings::NativeFormat, scope, organization, application)
+{
+ setStatus(QSettings::AccessError); // access error until sandbox gets loaded
+ databaseName = organization;
+ id = application;
+
+ emscripten_idb_async_exists("/home/web_user",
+ fileName().toLocal8Bit(),
+ reinterpret_cast<void*>(this),
+ QWasmSettingsPrivate_onCheck,
+ QWasmSettingsPrivate_onError);
+}
+
+QWasmSettingsPrivate::~QWasmSettingsPrivate()
+{
+}
+
+ void QWasmSettingsPrivate::initAccess()
+{
+ if (isReadReady)
+ QConfFileSettingsPrivate::initAccess();
+}
+
+bool QWasmSettingsPrivate::get(const QString &key, QVariant *value) const
+{
+ if (isReadReady)
+ return QConfFileSettingsPrivate::get(key, value);
+
+ return false;
+}
+
+QStringList QWasmSettingsPrivate::children(const QString &prefix, ChildSpec spec) const
+{
+ return QConfFileSettingsPrivate::children(prefix, spec);
+}
+
+void QWasmSettingsPrivate::clear()
+{
+ QConfFileSettingsPrivate::clear();
+ emscripten_idb_async_delete("/home/web_user",
+ fileName().toLocal8Bit(),
+ reinterpret_cast<void*>(this),
+ QWasmSettingsPrivate_onStore,
+ QWasmSettingsPrivate_onError);
+}
+
+void QWasmSettingsPrivate::sync()
+{
+ QConfFileSettingsPrivate::sync();
+
+ QFile file(fileName());
+ if (file.open(QFile::ReadOnly)) {
+ QByteArray dataPointer = file.readAll();
+
+ emscripten_idb_async_store("/home/web_user",
+ fileName().toLocal8Bit(),
+ reinterpret_cast<void *>(dataPointer.data()),
+ dataPointer.length(),
+ reinterpret_cast<void*>(this),
+ QWasmSettingsPrivate_onStore,
+ QWasmSettingsPrivate_onError);
+ }
+}
+
+void QWasmSettingsPrivate::flush()
+{
+ sync();
+}
+
+bool QWasmSettingsPrivate::isWritable() const
+{
+ return isReadReady && QConfFileSettingsPrivate::isWritable();
+}
+
+void QWasmSettingsPrivate::syncToLocal(const char *data, int size)
+{
+ QFile file(fileName());
+
+ if (file.open(QFile::WriteOnly)) {
+ file.write(data, size + 1);
+ QByteArray data = file.readAll();
+
+ emscripten_idb_async_store("/home/web_user",
+ fileName().toLocal8Bit(),
+ reinterpret_cast<void *>(data.data()),
+ data.length(),
+ reinterpret_cast<void*>(this),
+ QWasmSettingsPrivate_onStore,
+ QWasmSettingsPrivate_onError);
+ setReady();
+ }
+}
+
+void QWasmSettingsPrivate::loadLocal(const QByteArray &filename)
+{
+ emscripten_idb_async_load("/home/web_user",
+ filename.data(),
+ reinterpret_cast<void*>(this),
+ QWasmSettingsPrivate_onLoad,
+ QWasmSettingsPrivate_onError);
+}
+
+void QWasmSettingsPrivate::setReady()
+{
+ isReadReady = true;
+ setStatus(QSettings::NoError);
+ QConfFileSettingsPrivate::initAccess();
+}
+
+QT_END_NAMESPACE
+#endif // QT_NO_SETTINGS
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 878e007fb0..def4a1095f 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -415,7 +415,7 @@
#include "qhash.h"
#include "qdir.h" // for QDir::fromNativeSeparators
#include "qdatastream.h"
-#if QT_CONFIG(topleveldomain)
+#if QT_CONFIG(topleveldomain) // ### Qt6: Remove section
#include "qtldurl_p.h"
#endif
#include "private/qipaddress_p.h"
@@ -823,7 +823,7 @@ recodeFromUser(const QString &input, const ushort *actions, int from, int to)
QString output;
const QChar *begin = input.constData() + from;
const QChar *end = input.constData() + to;
- if (qt_urlRecode(output, begin, end, nullptr, actions))
+ if (qt_urlRecode(output, begin, end, {}, actions))
return output;
return input.mid(from, to - from);
@@ -3149,10 +3149,13 @@ bool QUrl::hasFragment() const
return d->hasFragment();
}
+#if QT_DEPRECATED_SINCE(5, 15)
#if QT_CONFIG(topleveldomain)
/*!
\since 4.8
+ \deprecated
+
Returns the TLD (Top-Level Domain) of the URL, (e.g. .co.uk, .net).
Note that the return value is prefixed with a '.' unless the
URL does not contain a valid TLD, in which case the function returns
@@ -3185,7 +3188,7 @@ QString QUrl::topLevelDomain(ComponentFormattingOptions options) const
return tld;
}
#endif
-
+#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
Returns the result of the merge of this URL with \a relative. This
URL is used as a base to convert \a relative to an absolute URL.
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index 94269e4369..eb7fb8087c 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -233,9 +233,11 @@ public:
void setHost(const QString &host, ParsingMode mode = DecodedMode);
QString host(ComponentFormattingOptions = FullyDecoded) const;
+#if QT_DEPRECATED_SINCE(5, 15)
#if QT_CONFIG(topleveldomain)
- QString topLevelDomain(ComponentFormattingOptions options = FullyDecoded) const;
+ QT_DEPRECATED QString topLevelDomain(ComponentFormattingOptions options = FullyDecoded) const;
#endif
+#endif // QT_DEPRECATED_SINCE(5, 15)
void setPort(int port);
int port(int defaultPort = -1) const;
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
index 5caddf6aea..d88960ba0c 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
@@ -46,6 +46,7 @@
#include <qdebug.h>
#include <qvector.h>
#include <qregexp.h>
+#include <qregularexpression.h>
#include <qstack.h>
#include <qbitarray.h>
#include <qdatetime.h>
@@ -60,7 +61,7 @@ Q_LOGGING_CATEGORY(lcCheckIndex, "qt.core.qabstractitemmodel.checkindex")
QPersistentModelIndexData *QPersistentModelIndexData::create(const QModelIndex &index)
{
Q_ASSERT(index.isValid()); // we will _never_ insert an invalid index in the list
- QPersistentModelIndexData *d = 0;
+ QPersistentModelIndexData *d = nullptr;
QAbstractItemModel *model = const_cast<QAbstractItemModel *>(index.model());
QHash<QModelIndex, QPersistentModelIndexData *> &indexes = model->d_func()->persistent.indexes;
const auto it = indexes.constFind(index);
@@ -138,7 +139,7 @@ void QPersistentModelIndexData::destroy(QPersistentModelIndexData *data)
*/
QPersistentModelIndex::QPersistentModelIndex()
- : d(0)
+ : d(nullptr)
{
}
@@ -160,7 +161,7 @@ QPersistentModelIndex::QPersistentModelIndex(const QPersistentModelIndex &other)
*/
QPersistentModelIndex::QPersistentModelIndex(const QModelIndex &index)
- : d(0)
+ : d(nullptr)
{
if (index.isValid()) {
d = QPersistentModelIndexData::create(index);
@@ -178,7 +179,7 @@ QPersistentModelIndex::~QPersistentModelIndex()
{
if (d && !d->ref.deref()) {
QPersistentModelIndexData::destroy(d);
- d = 0;
+ d = nullptr;
}
}
@@ -259,7 +260,7 @@ QPersistentModelIndex &QPersistentModelIndex::operator=(const QModelIndex &other
d = QPersistentModelIndexData::create(other);
if (d) d->ref.ref();
} else {
- d = 0;
+ d = nullptr;
}
return *this;
}
@@ -346,7 +347,7 @@ void *QPersistentModelIndex::internalPointer() const
{
if (d)
return d->index.internalPointer();
- return 0;
+ return nullptr;
}
/*!
@@ -434,7 +435,7 @@ Qt::ItemFlags QPersistentModelIndex::flags() const
{
if (d)
return d->index.flags();
- return 0;
+ return { };
}
/*!
@@ -444,7 +445,7 @@ const QAbstractItemModel *QPersistentModelIndex::model() const
{
if (d)
return d->index.model();
- return 0;
+ return nullptr;
}
/*!
@@ -486,7 +487,7 @@ QDebug operator<<(QDebug dbg, const QPersistentModelIndex &idx)
class QEmptyItemModel : public QAbstractItemModel
{
public:
- explicit QEmptyItemModel(QObject *parent = 0) : QAbstractItemModel(parent) {}
+ explicit QEmptyItemModel(QObject *parent = nullptr) : QAbstractItemModel(parent) {}
QModelIndex index(int, int, const QModelIndex &) const override { return QModelIndex(); }
QModelIndex parent(const QModelIndex &) const override { return QModelIndex(); }
int rowCount(const QModelIndex &) const override { return 0; }
@@ -554,32 +555,32 @@ const QHash<int,QByteArray> &QAbstractItemModelPrivate::defaultRoleNames()
bool QAbstractItemModelPrivate::isVariantLessThan(const QVariant &left, const QVariant &right,
Qt::CaseSensitivity cs, bool isLocaleAware)
{
- if (left.userType() == QVariant::Invalid)
+ if (left.userType() == QMetaType::UnknownType)
return false;
- if (right.userType() == QVariant::Invalid)
+ if (right.userType() == QMetaType::UnknownType)
return true;
switch (left.userType()) {
- case QVariant::Int:
+ case QMetaType::Int:
return left.toInt() < right.toInt();
- case QVariant::UInt:
+ case QMetaType::UInt:
return left.toUInt() < right.toUInt();
- case QVariant::LongLong:
+ case QMetaType::LongLong:
return left.toLongLong() < right.toLongLong();
- case QVariant::ULongLong:
+ case QMetaType::ULongLong:
return left.toULongLong() < right.toULongLong();
case QMetaType::Float:
return left.toFloat() < right.toFloat();
- case QVariant::Double:
+ case QMetaType::Double:
return left.toDouble() < right.toDouble();
- case QVariant::Char:
+ case QMetaType::QChar:
return left.toChar() < right.toChar();
- case QVariant::Date:
+ case QMetaType::QDate:
return left.toDate() < right.toDate();
- case QVariant::Time:
+ case QMetaType::QTime:
return left.toTime() < right.toTime();
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
return left.toDateTime() < right.toDateTime();
- case QVariant::String:
+ case QMetaType::QString:
default:
if (isLocaleAware)
return left.toString().localeAwareCompare(right.toString()) < 0;
@@ -593,19 +594,19 @@ static uint typeOfVariant(const QVariant &value)
{
//return 0 for integer, 1 for floating point and 2 for other
switch (value.userType()) {
- case QVariant::Bool:
- case QVariant::Int:
- case QVariant::UInt:
- case QVariant::LongLong:
- case QVariant::ULongLong:
- case QVariant::Char:
+ case QMetaType::Bool:
+ case QMetaType::Int:
+ case QMetaType::UInt:
+ case QMetaType::LongLong:
+ case QMetaType::ULongLong:
+ case QMetaType::QChar:
case QMetaType::Short:
case QMetaType::UShort:
case QMetaType::UChar:
case QMetaType::ULong:
case QMetaType::Long:
return 0;
- case QVariant::Double:
+ case QMetaType::Double:
case QMetaType::Float:
return 1;
default:
@@ -1952,10 +1953,10 @@ QStringList QAbstractItemModel::mimeTypes() const
QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const
{
if (indexes.count() <= 0)
- return 0;
+ return nullptr;
QStringList types = mimeTypes();
if (types.isEmpty())
- return 0;
+ return nullptr;
QMimeData *data = new QMimeData();
QString format = types.at(0);
QByteArray encoded;
@@ -2298,7 +2299,7 @@ Qt::ItemFlags QAbstractItemModel::flags(const QModelIndex &index) const
{
Q_D(const QAbstractItemModel);
if (!d->indexValid(index))
- return 0;
+ return { };
return Qt::ItemIsSelectable|Qt::ItemIsEnabled;
}
@@ -2361,6 +2362,7 @@ QModelIndexList QAbstractItemModel::match(const QModelIndex &start, int role,
bool wrap = flags & Qt::MatchWrap;
bool allHits = (hits == -1);
QString text; // only convert to a string if it is needed
+ QRegularExpression rx; // only create it if needed
const int column = start.column();
QModelIndex p = parent(start);
int from = start.row();
@@ -2377,17 +2379,39 @@ QModelIndexList QAbstractItemModel::match(const QModelIndex &start, int role,
if (matchType == Qt::MatchExactly) {
if (value == v)
result.append(idx);
- } else { // QString based matching
- if (text.isEmpty()) // lazy conversion
- text = value.toString();
+ } else { // QString or regular expression based matching
+ if (matchType == Qt::MatchRegularExpression) {
+ if (rx.pattern().isEmpty()) {
+ if (value.userType() == QMetaType::QRegularExpression) {
+ rx = value.toRegularExpression();
+ } else {
+ rx.setPattern(value.toString());
+ if (cs == Qt::CaseInsensitive)
+ rx.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
+ }
+ }
+ } else if (matchType == Qt::MatchWildcard) {
+ if (rx.pattern().isEmpty())
+ rx.setPattern(QRegularExpression::wildcardToRegularExpression(value.toString()));
+ if (cs == Qt::CaseInsensitive)
+ rx.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
+ } else {
+ if (text.isEmpty()) // lazy conversion
+ text = value.toString();
+ }
+
QString t = v.toString();
switch (matchType) {
+#if QT_DEPRECATED_SINCE(5, 15)
case Qt::MatchRegExp:
if (QRegExp(text, cs).exactMatch(t))
result.append(idx);
break;
+#endif
+ case Qt::MatchRegularExpression:
+ Q_FALLTHROUGH();
case Qt::MatchWildcard:
- if (QRegExp(text, cs, QRegExp::Wildcard).exactMatch(t))
+ if (t.contains(rx))
result.append(idx);
break;
case Qt::MatchStartsWith:
diff --git a/src/corelib/itemmodels/qabstractproxymodel.cpp b/src/corelib/itemmodels/qabstractproxymodel.cpp
index c863406afd..87559cd6b2 100644
--- a/src/corelib/itemmodels/qabstractproxymodel.cpp
+++ b/src/corelib/itemmodels/qabstractproxymodel.cpp
@@ -159,7 +159,7 @@ QAbstractItemModel *QAbstractProxyModel::sourceModel() const
{
Q_D(const QAbstractProxyModel);
if (d->model == QAbstractItemModelPrivate::staticEmptyModel())
- return 0;
+ return nullptr;
return d->model;
}
diff --git a/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp b/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp
index 0319d215a1..3afa132483 100644
--- a/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp
+++ b/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp
@@ -497,7 +497,7 @@ void QConcatenateTablesProxyModel::removeSourceModel(QAbstractItemModel *sourceM
{
Q_D(QConcatenateTablesProxyModel);
Q_ASSERT(d->m_models.contains(sourceModel));
- disconnect(sourceModel, 0, this, 0);
+ disconnect(sourceModel, nullptr, this, nullptr);
const int rowsRemoved = sourceModel->rowCount();
const int rowsPrior = d->computeRowsPrior(sourceModel); // location of removed section
diff --git a/src/corelib/itemmodels/qidentityproxymodel.cpp b/src/corelib/itemmodels/qidentityproxymodel.cpp
index 39992eccd3..f5684c6eda 100644
--- a/src/corelib/itemmodels/qidentityproxymodel.cpp
+++ b/src/corelib/itemmodels/qidentityproxymodel.cpp
@@ -313,6 +313,30 @@ bool QIdentityProxyModel::removeRows(int row, int count, const QModelIndex& pare
/*!
\reimp
+ \since 5.15
+ */
+bool QIdentityProxyModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)
+{
+ Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == this : true);
+ Q_ASSERT(destinationParent.isValid() ? destinationParent.model() == this : true);
+ Q_D(QIdentityProxyModel);
+ return d->model->moveRows(mapToSource(sourceParent), sourceRow, count, mapToSource(destinationParent), destinationChild);
+}
+
+/*!
+ \reimp
+ \since 5.15
+ */
+bool QIdentityProxyModel::moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild)
+{
+ Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == this : true);
+ Q_ASSERT(destinationParent.isValid() ? destinationParent.model() == this : true);
+ Q_D(QIdentityProxyModel);
+ return d->model->moveColumns(mapToSource(sourceParent), sourceColumn, count, mapToSource(destinationParent), destinationChild);
+}
+
+/*!
+ \reimp
*/
int QIdentityProxyModel::rowCount(const QModelIndex& parent) const
{
diff --git a/src/corelib/itemmodels/qidentityproxymodel.h b/src/corelib/itemmodels/qidentityproxymodel.h
index 89ac89cdba..4c14e6176a 100644
--- a/src/corelib/itemmodels/qidentityproxymodel.h
+++ b/src/corelib/itemmodels/qidentityproxymodel.h
@@ -77,6 +77,8 @@ public:
bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()) override;
bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
+ bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
+ bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild) override;
protected:
QIdentityProxyModel(QIdentityProxyModelPrivate &dd, QObject* parent);
diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp
index ebcc3b10ca..e4ac5da299 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.cpp
+++ b/src/corelib/itemmodels/qitemselectionmodel.cpp
@@ -656,7 +656,7 @@ void QItemSelectionModelPrivate::initModel(QAbstractItemModel *m)
SLOT(_q_layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)) },
{ SIGNAL(modelReset()),
SLOT(reset()) },
- { 0, 0 }
+ { nullptr, nullptr }
};
if (model == m)
diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h
index 3c3f9fb1ac..5820695592 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.h
+++ b/src/corelib/itemmodels/qitemselectionmodel.h
@@ -171,11 +171,11 @@ public:
QModelIndex currentIndex() const;
Q_INVOKABLE bool isSelected(const QModelIndex &index) const;
- Q_INVOKABLE bool isRowSelected(int row, const QModelIndex &parent) const;
- Q_INVOKABLE bool isColumnSelected(int column, const QModelIndex &parent) const;
+ Q_INVOKABLE bool isRowSelected(int row, const QModelIndex &parent = QModelIndex()) const;
+ Q_INVOKABLE bool isColumnSelected(int column, const QModelIndex &parent = QModelIndex()) const;
- Q_INVOKABLE bool rowIntersectsSelection(int row, const QModelIndex &parent) const;
- Q_INVOKABLE bool columnIntersectsSelection(int column, const QModelIndex &parent) const;
+ Q_INVOKABLE bool rowIntersectsSelection(int row, const QModelIndex &parent = QModelIndex()) const;
+ Q_INVOKABLE bool columnIntersectsSelection(int column, const QModelIndex &parent = QModelIndex()) const;
bool hasSelection() const;
diff --git a/src/corelib/itemmodels/qstringlistmodel.cpp b/src/corelib/itemmodels/qstringlistmodel.cpp
index 4c7616a126..a950783ed8 100644
--- a/src/corelib/itemmodels/qstringlistmodel.cpp
+++ b/src/corelib/itemmodels/qstringlistmodel.cpp
@@ -306,24 +306,23 @@ bool QStringListModel::moveRows(const QModelIndex &sourceParent, int sourceRow,
{
if (sourceRow < 0
|| sourceRow + count - 1 >= rowCount(sourceParent)
- || destinationChild <= 0
+ || destinationChild < 0
|| destinationChild > rowCount(destinationParent)
+ || sourceRow == destinationChild
|| sourceRow == destinationChild - 1
- || count <= 0) {
+ || count <= 0
+ || sourceParent.isValid()
+ || destinationParent.isValid()) {
return false;
}
if (!beginMoveRows(QModelIndex(), sourceRow, sourceRow + count - 1, QModelIndex(), destinationChild))
return false;
- /*
- QList::move assumes that the second argument is the index where the item will end up to
- i.e. the valid range for that argument is from 0 to QList::size()-1
- QAbstractItemModel::moveRows when source and destinations have the same parent assumes that
- the item will end up being in the row BEFORE the one indicated by destinationChild
- i.e. the valid range for that argument is from 1 to QList::size()
- For this reason we remove 1 from destinationChild when using it inside QList
- */
- destinationChild--;
- const int fromRow = destinationChild < sourceRow ? (sourceRow + count - 1) : sourceRow;
+
+ int fromRow = sourceRow;
+ if (destinationChild < sourceRow)
+ fromRow += count - 1;
+ else
+ destinationChild--;
while (count--)
lst.move(fromRow, destinationChild);
endMoveRows();
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index 7215b3f2bd..685a0c595a 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.cpp
+++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
@@ -160,7 +160,7 @@ QAbstractEventDispatcher::~QAbstractEventDispatcher()
/*!
Returns a pointer to the event dispatcher object for the specified
- \a thread. If \a thread is zero, the current thread is used. If no
+ \a thread. If \a thread is \nullptr, the current thread is used. If no
event dispatcher exists for the specified thread, this function
returns \nullptr.
diff --git a/src/corelib/kernel/qbasictimer.cpp b/src/corelib/kernel/qbasictimer.cpp
index ea8f8e2c77..623ecb9b8b 100644
--- a/src/corelib/kernel/qbasictimer.cpp
+++ b/src/corelib/kernel/qbasictimer.cpp
@@ -216,13 +216,11 @@ void QBasicTimer::stop()
{
if (id) {
QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();
- if (eventDispatcher) {
- if (Q_UNLIKELY(!eventDispatcher->unregisterTimer(id))) {
- qWarning("QBasicTimer::stop: Failed. Possibly trying to stop from a different thread");
- return;
- }
- QAbstractEventDispatcherPrivate::releaseTimerId(id);
+ if (eventDispatcher && !eventDispatcher->unregisterTimer(id)) {
+ qWarning("QBasicTimer::stop: Failed. Possibly trying to stop from a different thread");
+ return;
}
+ QAbstractEventDispatcherPrivate::releaseTimerId(id);
}
id = 0;
}
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index e25049f821..34f54d8f94 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -121,7 +121,6 @@
#endif
#ifdef Q_OS_WASM
-#include <emscripten.h>
#include <emscripten/val.h>
#endif
@@ -135,23 +134,6 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_QOBJECT
-class QMutexUnlocker
-{
-public:
- inline explicit QMutexUnlocker(QMutex *m)
- : mtx(m)
- { }
- inline ~QMutexUnlocker() { unlock(); }
- inline void unlock() { if (mtx) mtx->unlock(); mtx = 0; }
-
-private:
- Q_DISABLE_COPY(QMutexUnlocker)
-
- QMutex *mtx;
-};
-#endif
-
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
extern QString qAppFileName();
#endif
@@ -497,13 +479,6 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
QCoreApplicationPrivate::~QCoreApplicationPrivate()
{
-#ifdef Q_OS_WASM
- EM_ASM(
- // unmount persistent directory as IDBFS
- // see also QTBUG-70002
- FS.unmount('/home/web_user');
- );
-#endif
#ifndef QT_NO_QOBJECT
cleanupThreadData();
#endif
@@ -517,25 +492,27 @@ QCoreApplicationPrivate::~QCoreApplicationPrivate()
void QCoreApplicationPrivate::cleanupThreadData()
{
- if (threadData && !threadData_clean) {
+ auto thisThreadData = threadData.loadRelaxed();
+
+ if (thisThreadData && !threadData_clean) {
#if QT_CONFIG(thread)
- void *data = &threadData->tls;
+ void *data = &thisThreadData->tls;
QThreadStorageData::finish((void **)data);
#endif
// need to clear the state of the mainData, just in case a new QCoreApplication comes along.
- const auto locker = qt_scoped_lock(threadData->postEventList.mutex);
- for (int i = 0; i < threadData->postEventList.size(); ++i) {
- const QPostEvent &pe = threadData->postEventList.at(i);
+ const auto locker = qt_scoped_lock(thisThreadData->postEventList.mutex);
+ for (int i = 0; i < thisThreadData->postEventList.size(); ++i) {
+ const QPostEvent &pe = thisThreadData->postEventList.at(i);
if (pe.event) {
--pe.receiver->d_func()->postedEvents;
pe.event->posted = false;
delete pe.event;
}
}
- threadData->postEventList.clear();
- threadData->postEventList.recursion = 0;
- threadData->quitNow = false;
+ thisThreadData->postEventList.clear();
+ thisThreadData->postEventList.recursion = 0;
+ thisThreadData->quitNow = false;
threadData_clean = true;
}
}
@@ -553,10 +530,10 @@ void QCoreApplicationPrivate::eventDispatcherReady()
{
}
-QBasicAtomicPointer<QThread> QCoreApplicationPrivate::theMainThread = Q_BASIC_ATOMIC_INITIALIZER(0);
+QBasicAtomicPointer<QThread> QCoreApplicationPrivate::theMainThread = Q_BASIC_ATOMIC_INITIALIZER(nullptr);
QThread *QCoreApplicationPrivate::mainThread()
{
- Q_ASSERT(theMainThread.loadRelaxed() != 0);
+ Q_ASSERT(theMainThread.loadRelaxed() != nullptr);
return theMainThread.loadRelaxed();
}
@@ -713,7 +690,7 @@ QCoreApplication::QCoreApplication(QCoreApplicationPrivate &p)
#ifdef QT_NO_QOBJECT
: d_ptr(&p)
#else
- : QObject(p, 0)
+ : QObject(p, nullptr)
#endif
{
d_func()->q_ptr = this;
@@ -795,17 +772,8 @@ void QCoreApplicationPrivate::init()
Q_ASSERT_X(!QCoreApplication::self, "QCoreApplication", "there should be only one application object");
QCoreApplication::self = q;
-#ifdef Q_OS_WASM
- EM_ASM(
- // mount and sync persistent filesystem to sandbox
- FS.mount(IDBFS, {}, '/home/web_user');
- FS.syncfs(true, function(err) {
- if (err)
- Module.print(err);
- });
- );
-
#if QT_CONFIG(thread)
+#ifdef Q_OS_WASM
QThreadPrivate::idealThreadCount = emscripten::val::global("navigator")["hardwareConcurrency"].as<int>();
#endif
#endif
@@ -858,7 +826,8 @@ void QCoreApplicationPrivate::init()
#ifndef QT_NO_QOBJECT
// use the event dispatcher created by the app programmer (if any)
Q_ASSERT(!eventDispatcher);
- eventDispatcher = threadData->eventDispatcher.loadRelaxed();
+ auto thisThreadData = threadData.loadRelaxed();
+ eventDispatcher = thisThreadData->eventDispatcher.loadRelaxed();
// otherwise we create one
if (!eventDispatcher)
@@ -866,11 +835,11 @@ void QCoreApplicationPrivate::init()
Q_ASSERT(eventDispatcher);
if (!eventDispatcher->parent()) {
- eventDispatcher->moveToThread(threadData->thread.loadAcquire());
+ eventDispatcher->moveToThread(thisThreadData->thread.loadAcquire());
eventDispatcher->setParent(q);
}
- threadData->eventDispatcher = eventDispatcher;
+ thisThreadData->eventDispatcher = eventDispatcher;
eventDispatcherReady();
#endif
@@ -914,7 +883,7 @@ QCoreApplication::~QCoreApplication()
#endif
#ifndef QT_NO_QOBJECT
- d_func()->threadData->eventDispatcher = nullptr;
+ d_func()->threadData.loadRelaxed()->eventDispatcher = nullptr;
if (QCoreApplicationPrivate::eventDispatcher)
QCoreApplicationPrivate::eventDispatcher->closingDown();
QCoreApplicationPrivate::eventDispatcher = nullptr;
@@ -1170,7 +1139,7 @@ bool QCoreApplication::notify(QObject *receiver, QEvent *event)
static bool doNotify(QObject *receiver, QEvent *event)
{
- if (receiver == 0) { // serious error
+ if (receiver == nullptr) { // serious error
qWarning("QCoreApplication::notify: Unexpected null receiver");
return true;
}
@@ -1185,7 +1154,7 @@ static bool doNotify(QObject *receiver, QEvent *event)
bool QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject *receiver, QEvent *event)
{
// We can't access the application event filters outside of the main thread (race conditions)
- Q_ASSERT(receiver->d_func()->threadData->thread.loadAcquire() == mainThread());
+ Q_ASSERT(receiver->d_func()->threadData.loadRelaxed()->thread.loadAcquire() == mainThread());
if (extraData) {
// application event filters are only called for objects in the GUI thread
@@ -1238,7 +1207,7 @@ bool QCoreApplicationPrivate::notify_helper(QObject *receiver, QEvent * event)
// send to all application event filters (only does anything in the main thread)
if (QCoreApplication::self
- && receiver->d_func()->threadData->thread.loadAcquire() == mainThread()
+ && receiver->d_func()->threadData.loadRelaxed()->thread.loadAcquire() == mainThread()
&& QCoreApplication::self->d_func()->sendThroughApplicationEventFilters(receiver, event)) {
filtered = true;
return filtered;
@@ -1414,12 +1383,12 @@ int QCoreApplication::exec()
void QCoreApplicationPrivate::execCleanup()
{
- threadData->quitNow = false;
+ threadData.loadRelaxed()->quitNow = false;
in_exec = false;
if (!aboutToQuitEmitted)
emit q_func()->aboutToQuit(QCoreApplication::QPrivateSignal());
aboutToQuitEmitted = true;
- QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
}
@@ -1451,7 +1420,7 @@ void QCoreApplication::exit(int returnCode)
{
if (!self)
return;
- QThreadData *data = self->d_func()->threadData;
+ QThreadData *data = self->d_func()->threadData.loadRelaxed();
data->quitNow = true;
for (int i = 0; i < data->eventLoops.size(); ++i) {
QEventLoop *eventLoop = data->eventLoops.at(i);
@@ -1501,6 +1470,38 @@ bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event)
#endif // QT_NO_QOBJECT
+QCoreApplicationPrivate::QPostEventListLocker QCoreApplicationPrivate::lockThreadPostEventList(QObject *object)
+{
+ QPostEventListLocker locker;
+
+ if (!object) {
+ locker.threadData = QThreadData::current();
+ locker.locker = qt_unique_lock(locker.threadData->postEventList.mutex);
+ return locker;
+ }
+
+ auto &threadData = QObjectPrivate::get(object)->threadData;
+
+ // if object has moved to another thread, follow it
+ for (;;) {
+ // synchronizes with the storeRelease in QObject::moveToThread
+ locker.threadData = threadData.loadAcquire();
+ if (!locker.threadData) {
+ // destruction in progress
+ return locker;
+ }
+
+ auto temporaryLocker = qt_unique_lock(locker.threadData->postEventList.mutex);
+ if (locker.threadData == threadData.loadAcquire()) {
+ locker.locker = std::move(temporaryLocker);
+ break;
+ }
+ }
+
+ Q_ASSERT(locker.threadData);
+ return locker;
+}
+
/*!
\since 4.3
@@ -1530,38 +1531,20 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority)
{
Q_TRACE_SCOPE(QCoreApplication_postEvent, receiver, event, event->type());
- if (receiver == 0) {
+ if (receiver == nullptr) {
qWarning("QCoreApplication::postEvent: Unexpected null receiver");
delete event;
return;
}
- QThreadData * volatile * pdata = &receiver->d_func()->threadData;
- QThreadData *data = *pdata;
- if (!data) {
+ auto locker = QCoreApplicationPrivate::lockThreadPostEventList(receiver);
+ if (!locker.threadData) {
// posting during destruction? just delete the event to prevent a leak
delete event;
return;
}
- // lock the post event mutex
- data->postEventList.mutex.lock();
-
- // if object has moved to another thread, follow it
- while (data != *pdata) {
- data->postEventList.mutex.unlock();
-
- data = *pdata;
- if (!data) {
- // posting during destruction? just delete the event to prevent a leak
- delete event;
- return;
- }
-
- data->postEventList.mutex.lock();
- }
-
- QMutexUnlocker locker(&data->postEventList.mutex);
+ QThreadData *data = locker.threadData;
// if this is one of the compressible events, do compression
if (receiver->d_func()->postedEvents
@@ -1652,7 +1635,7 @@ bool QCoreApplication::compressEvent(QEvent *event, QObject *receiver, QPostEven
for (int i = 0; i < postedEvents->size(); ++i) {
const QPostEvent &cur = postedEvents->at(i);
if (cur.receiver != receiver
- || cur.event == 0
+ || cur.event == nullptr
|| cur.event->type() != event->type())
continue;
// found an event for this receiver
@@ -1801,7 +1784,7 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
// null out the event so if sendPostedEvents recurses, it
// will ignore this one, as it's been re-posted.
- const_cast<QPostEvent &>(pe).event = 0;
+ const_cast<QPostEvent &>(pe).event = nullptr;
// re-post the copied event so it isn't lost
data->postEventList.addEvent(pe_copy);
@@ -1821,7 +1804,7 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
// next, update the data structure so that we're ready
// for the next event.
- const_cast<QPostEvent &>(pe).event = 0;
+ const_cast<QPostEvent &>(pe).event = nullptr;
locker.unlock();
const auto relocker = qScopeGuard([&locker] { locker.lock(); });
@@ -1860,8 +1843,8 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
void QCoreApplication::removePostedEvents(QObject *receiver, int eventType)
{
- QThreadData *data = receiver ? receiver->d_func()->threadData : QThreadData::current();
- auto locker = qt_unique_lock(data->postEventList.mutex);
+ auto locker = QCoreApplicationPrivate::lockThreadPostEventList(receiver);
+ QThreadData *data = locker.threadData;
// the QObject destructor calls this function directly. this can
// happen while the event loop is in the middle of posting events,
@@ -1884,7 +1867,7 @@ void QCoreApplication::removePostedEvents(QObject *receiver, int eventType)
--pe.receiver->d_func()->postedEvents;
pe.event->posted = false;
events.append(pe.event);
- const_cast<QPostEvent &>(pe).event = 0;
+ const_cast<QPostEvent &>(pe).event = nullptr;
} else if (!data->postEventList.recursion) {
if (i != j)
qSwap(data->postEventList[i], data->postEventList[j]);
@@ -1946,7 +1929,7 @@ void QCoreApplicationPrivate::removePostedEvent(QEvent * event)
--pe.receiver->d_func()->postedEvents;
pe.event->posted = false;
delete pe.event;
- const_cast<QPostEvent &>(pe).event = 0;
+ const_cast<QPostEvent &>(pe).event = nullptr;
return;
}
}
@@ -2221,7 +2204,7 @@ QString QCoreApplication::translate(const char *context, const char *sourceText,
// Declared in qglobal.h
QString qtTrId(const char *id, int n)
{
- return QCoreApplication::translate(0, id, 0, n);
+ return QCoreApplication::translate(nullptr, id, nullptr, n);
}
bool QCoreApplicationPrivate::isTranslatorInstalled(QTranslator *translator)
@@ -2973,7 +2956,7 @@ QAbstractEventDispatcher *QCoreApplication::eventDispatcher()
{
if (QCoreApplicationPrivate::theMainThread.loadAcquire())
return QCoreApplicationPrivate::theMainThread.loadRelaxed()->eventDispatcher();
- return 0;
+ return nullptr;
}
/*!
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index 3bad42d076..9d2fde619c 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -61,6 +61,7 @@
#endif
#ifndef QT_NO_QOBJECT
#include "private/qobject_p.h"
+#include "private/qlocking_p.h"
#endif
#ifdef Q_OS_MACOS
@@ -140,6 +141,15 @@ public:
static void checkReceiverThread(QObject *receiver);
void cleanupThreadData();
+
+ struct QPostEventListLocker
+ {
+ QThreadData *threadData;
+ std::unique_lock<QMutex> locker;
+
+ void unlock() { locker.unlock(); }
+ };
+ static QPostEventListLocker lockThreadPostEventList(QObject *object);
#endif // QT_NO_QOBJECT
int &argc;
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index 961b96710e..765f129758 100644
--- a/src/corelib/kernel/qcoreapplication_win.cpp
+++ b/src/corelib/kernel/qcoreapplication_win.cpp
@@ -918,7 +918,7 @@ QDebug operator<<(QDebug dbg, const MSG &msg)
#ifndef QT_NO_QOBJECT
void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerId)
{
- QThreadData *data = object->d_func()->threadData;
+ QThreadData *data = object->d_func()->threadData.loadRelaxed();
const auto locker = qt_scoped_lock(data->postEventList.mutex);
if (data->postEventList.size() == 0)
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index 4cfc749386..e3326f00d7 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -295,7 +295,7 @@ QT_BEGIN_NAMESPACE
Contructs an event object of type \a type.
*/
QEvent::QEvent(Type type)
- : d(0), t(type), posted(false), spont(false), m_accept(true)
+ : d(nullptr), t(type), posted(false), spont(false), m_accept(true)
{
Q_TRACE(QEvent_ctor, this, t);
}
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index d9746ef6e2..92f3553247 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -114,9 +114,9 @@ static GSourceFuncs socketNotifierSourceFuncs = {
socketNotifierSourcePrepare,
socketNotifierSourceCheck,
socketNotifierSourceDispatch,
- NULL,
- NULL,
- NULL
+ nullptr,
+ nullptr,
+ nullptr
};
struct GTimerSource
@@ -188,9 +188,9 @@ static GSourceFuncs timerSourceFuncs = {
timerSourcePrepare,
timerSourceCheck,
timerSourceDispatch,
- NULL,
- NULL,
- NULL
+ nullptr,
+ nullptr,
+ nullptr
};
struct GIdleTimerSource
@@ -227,7 +227,7 @@ static gboolean idleTimerSourceCheck(GSource *source)
static gboolean idleTimerSourceDispatch(GSource *source, GSourceFunc, gpointer)
{
GTimerSource *timerSource = reinterpret_cast<GIdleTimerSource *>(source)->timerSource;
- (void) timerSourceDispatch(&timerSource->source, 0, 0);
+ (void) timerSourceDispatch(&timerSource->source, nullptr, nullptr);
return true;
}
@@ -235,9 +235,9 @@ static GSourceFuncs idleTimerSourceFuncs = {
idleTimerSourcePrepare,
idleTimerSourceCheck,
idleTimerSourceDispatch,
- NULL,
- NULL,
- NULL
+ nullptr,
+ nullptr,
+ nullptr
};
struct GPostEventSource
@@ -267,7 +267,7 @@ static gboolean postEventSourcePrepare(GSource *s, gint *timeout)
static gboolean postEventSourceCheck(GSource *source)
{
- return postEventSourcePrepare(source, 0);
+ return postEventSourcePrepare(source, nullptr);
}
static gboolean postEventSourceDispatch(GSource *s, GSourceFunc, gpointer)
@@ -283,9 +283,9 @@ static GSourceFuncs postEventSourceFuncs = {
postEventSourcePrepare,
postEventSourceCheck,
postEventSourceDispatch,
- NULL,
- NULL,
- NULL
+ nullptr,
+ nullptr,
+ nullptr
};
@@ -372,10 +372,10 @@ QEventDispatcherGlib::~QEventDispatcherGlib()
d->timerSource->timerList.~QTimerInfoList();
g_source_destroy(&d->timerSource->source);
g_source_unref(&d->timerSource->source);
- d->timerSource = 0;
+ d->timerSource = nullptr;
g_source_destroy(&d->idleTimerSource->source);
g_source_unref(&d->idleTimerSource->source);
- d->idleTimerSource = 0;
+ d->idleTimerSource = nullptr;
// destroy socket notifier source
for (int i = 0; i < d->socketNotifierSource->pollfds.count(); ++i) {
@@ -386,19 +386,19 @@ QEventDispatcherGlib::~QEventDispatcherGlib()
d->socketNotifierSource->pollfds.~QList<GPollFDWithQSocketNotifier *>();
g_source_destroy(&d->socketNotifierSource->source);
g_source_unref(&d->socketNotifierSource->source);
- d->socketNotifierSource = 0;
+ d->socketNotifierSource = nullptr;
// destroy post event source
g_source_destroy(&d->postEventSource->source);
g_source_unref(&d->postEventSource->source);
- d->postEventSource = 0;
+ d->postEventSource = nullptr;
- Q_ASSERT(d->mainContext != 0);
+ Q_ASSERT(d->mainContext != nullptr);
#if GLIB_CHECK_VERSION (2, 22, 0)
g_main_context_pop_thread_default (d->mainContext);
#endif
g_main_context_unref(d->mainContext);
- d->mainContext = 0;
+ d->mainContext = nullptr;
}
bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index 5bc65b7110..0165ce9075 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -463,13 +463,15 @@ bool QEventDispatcherUNIX::processEvents(QEventLoop::ProcessEventsFlags flags)
// we are awake, broadcast it
emit awake();
- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
+
+ auto threadData = d->threadData.loadRelaxed();
+ QCoreApplicationPrivate::sendPostedEvents(nullptr, 0, threadData);
const bool include_timers = (flags & QEventLoop::X11ExcludeTimers) == 0;
const bool include_notifiers = (flags & QEventLoop::ExcludeSocketNotifiers) == 0;
const bool wait_for_events = flags & QEventLoop::WaitForMoreEvents;
- const bool canWait = (d->threadData->canWaitLocked()
+ const bool canWait = (threadData->canWaitLocked()
&& !d->interrupt.loadRelaxed()
&& wait_for_events);
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 87623f304a..8616631603 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -636,11 +636,11 @@ void QEventDispatcherWin32::registerSocketNotifier(QSocketNotifier *notifier)
int type = notifier->type();
#ifndef QT_NO_DEBUG
if (sockfd < 0) {
- qWarning("QSocketNotifier: Internal error");
+ qWarning("QEventDispatcherWin32::registerSocketNotifier: invalid socket identifier");
return;
}
if (notifier->thread() != thread() || thread() != QThread::currentThread()) {
- qWarning("QSocketNotifier: socket notifiers cannot be enabled from another thread");
+ qWarning("QEventDispatcherWin32: socket notifiers cannot be enabled from another thread");
return;
}
#endif
@@ -697,11 +697,11 @@ void QEventDispatcherWin32::unregisterSocketNotifier(QSocketNotifier *notifier)
#ifndef QT_NO_DEBUG
int sockfd = notifier->socket();
if (sockfd < 0) {
- qWarning("QSocketNotifier: Internal error");
+ qWarning("QEventDispatcherWin32::unregisterSocketNotifier: invalid socket identifier");
return;
}
if (notifier->thread() != thread() || thread() != QThread::currentThread()) {
- qWarning("QSocketNotifier: socket notifiers cannot be disabled from another thread");
+ qWarning("QEventDispatcherWin32: socket notifiers cannot be disabled from another thread");
return;
}
#endif
@@ -783,8 +783,7 @@ bool QEventDispatcherWin32::unregisterTimer(int timerId)
qWarning("QEventDispatcherWin32::unregisterTimer: invalid argument");
return false;
}
- QThread *currentThread = QThread::currentThread();
- if (thread() != currentThread) {
+ if (thread() != QThread::currentThread()) {
qWarning("QEventDispatcherWin32::unregisterTimer: timers cannot be stopped from another thread");
return false;
}
@@ -811,8 +810,7 @@ bool QEventDispatcherWin32::unregisterTimers(QObject *object)
qWarning("QEventDispatcherWin32::unregisterTimers: invalid argument");
return false;
}
- QThread *currentThread = QThread::currentThread();
- if (object->thread() != thread() || thread() != currentThread) {
+ if (object->thread() != thread() || thread() != QThread::currentThread()) {
qWarning("QEventDispatcherWin32::unregisterTimers: timers cannot be stopped from another thread");
return false;
}
@@ -837,10 +835,12 @@ bool QEventDispatcherWin32::unregisterTimers(QObject *object)
QList<QEventDispatcherWin32::TimerInfo>
QEventDispatcherWin32::registeredTimers(QObject *object) const
{
+#ifndef QT_NO_DEBUG
if (!object) {
qWarning("QEventDispatcherWin32:registeredTimers: invalid argument");
return QList<TimerInfo>();
}
+#endif
Q_D(const QEventDispatcherWin32);
QList<TimerInfo> list;
@@ -853,13 +853,13 @@ QEventDispatcherWin32::registeredTimers(QObject *object) const
bool QEventDispatcherWin32::registerEventNotifier(QWinEventNotifier *notifier)
{
- if (!notifier) {
- qWarning("QWinEventNotifier: Internal error");
- return false;
- } else if (notifier->thread() != thread() || thread() != QThread::currentThread()) {
- qWarning("QWinEventNotifier: event notifiers cannot be enabled from another thread");
+ Q_ASSERT(notifier);
+#ifndef QT_NO_DEBUG
+ if (notifier->thread() != thread() || thread() != QThread::currentThread()) {
+ qWarning("QEventDispatcherWin32: event notifiers cannot be enabled from another thread");
return false;
}
+#endif
Q_D(QEventDispatcherWin32);
@@ -877,13 +877,13 @@ bool QEventDispatcherWin32::registerEventNotifier(QWinEventNotifier *notifier)
void QEventDispatcherWin32::unregisterEventNotifier(QWinEventNotifier *notifier)
{
- if (!notifier) {
- qWarning("QWinEventNotifier: Internal error");
- return;
- } else if (notifier->thread() != thread() || thread() != QThread::currentThread()) {
- qWarning("QWinEventNotifier: event notifiers cannot be disabled from another thread");
+ Q_ASSERT(notifier);
+#ifndef QT_NO_DEBUG
+ if (notifier->thread() != thread() || thread() != QThread::currentThread()) {
+ qWarning("QEventDispatcherWin32: event notifiers cannot be disabled from another thread");
return;
}
+#endif
Q_D(QEventDispatcherWin32);
@@ -1048,7 +1048,7 @@ bool QEventDispatcherWin32::event(QEvent *e)
void QEventDispatcherWin32::sendPostedEvents()
{
Q_D(QEventDispatcherWin32);
- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
+ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData.loadRelaxed());
}
HWND QEventDispatcherWin32::internalHwnd()
diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp
index eacd0c4e73..5a5dfb06aa 100644
--- a/src/corelib/kernel/qeventloop.cpp
+++ b/src/corelib/kernel/qeventloop.cpp
@@ -106,7 +106,7 @@ QEventLoop::QEventLoop(QObject *parent)
if (!QCoreApplication::instance() && QCoreApplicationPrivate::threadRequiresCoreApplication()) {
qWarning("QEventLoop: Cannot be used without QApplication");
} else {
- d->threadData->ensureEventDispatcher();
+ d->threadData.loadRelaxed()->ensureEventDispatcher();
}
}
@@ -133,9 +133,10 @@ QEventLoop::~QEventLoop()
bool QEventLoop::processEvents(ProcessEventsFlags flags)
{
Q_D(QEventLoop);
- if (!d->threadData->hasEventDispatcher())
+ auto threadData = d->threadData.loadRelaxed();
+ if (!threadData->hasEventDispatcher())
return false;
- return d->threadData->eventDispatcher.loadRelaxed()->processEvents(flags);
+ return threadData->eventDispatcher.loadRelaxed()->processEvents(flags);
}
/*!
@@ -164,9 +165,11 @@ bool QEventLoop::processEvents(ProcessEventsFlags flags)
int QEventLoop::exec(ProcessEventsFlags flags)
{
Q_D(QEventLoop);
+ auto threadData = d->threadData.loadRelaxed();
+
//we need to protect from race condition with QThread::exit
- QMutexLocker locker(&static_cast<QThreadPrivate *>(QObjectPrivate::get(d->threadData->thread.loadAcquire()))->mutex);
- if (d->threadData->quitNow)
+ QMutexLocker locker(&static_cast<QThreadPrivate *>(QObjectPrivate::get(threadData->thread.loadAcquire()))->mutex);
+ if (threadData->quitNow)
return -1;
if (d->inExec) {
@@ -183,8 +186,11 @@ int QEventLoop::exec(ProcessEventsFlags flags)
{
d->inExec = true;
d->exit.storeRelease(false);
- ++d->threadData->loopLevel;
- d->threadData->eventLoops.push(d->q_func());
+
+ auto threadData = d->threadData.loadRelaxed();
+ ++threadData->loopLevel;
+ threadData->eventLoops.push(d->q_func());
+
locker.unlock();
}
@@ -198,11 +204,12 @@ int QEventLoop::exec(ProcessEventsFlags flags)
"QCoreApplication::notify() and catch all exceptions there.\n");
}
locker.relock();
- QEventLoop *eventLoop = d->threadData->eventLoops.pop();
+ auto threadData = d->threadData.loadRelaxed();
+ QEventLoop *eventLoop = threadData->eventLoops.pop();
Q_ASSERT_X(eventLoop == d->q_func(), "QEventLoop::exec()", "internal error");
Q_UNUSED(eventLoop); // --release warning
d->inExec = false;
- --d->threadData->loopLevel;
+ --threadData->loopLevel;
}
};
LoopReference ref(d, locker);
@@ -217,7 +224,7 @@ int QEventLoop::exec(ProcessEventsFlags flags)
// exception, which returns control to the browser while preserving the C++ stack.
// Event processing then continues as normal. The sleep call below never returns.
// QTBUG-70185
- if (d->threadData->loopLevel > 1)
+ if (threadData->loopLevel > 1)
emscripten_sleep(1);
#endif
@@ -247,7 +254,7 @@ int QEventLoop::exec(ProcessEventsFlags flags)
void QEventLoop::processEvents(ProcessEventsFlags flags, int maxTime)
{
Q_D(QEventLoop);
- if (!d->threadData->hasEventDispatcher())
+ if (!d->threadData.loadRelaxed()->hasEventDispatcher())
return;
QElapsedTimer start;
@@ -276,21 +283,22 @@ void QEventLoop::processEvents(ProcessEventsFlags flags, int maxTime)
void QEventLoop::exit(int returnCode)
{
Q_D(QEventLoop);
- if (!d->threadData->hasEventDispatcher())
+ auto threadData = d->threadData.loadAcquire();
+ if (!threadData->hasEventDispatcher())
return;
d->returnCode.storeRelaxed(returnCode);
d->exit.storeRelease(true);
- d->threadData->eventDispatcher.loadRelaxed()->interrupt();
+ threadData->eventDispatcher.loadRelaxed()->interrupt();
#ifdef Q_OS_WASM
// QEventLoop::exec() never returns in emscripten. We implement approximate behavior here.
// QTBUG-70185
- if (d->threadData->loopLevel == 1) {
+ if (threadData->loopLevel == 1) {
emscripten_force_exit(returnCode);
} else {
d->inExec = false;
- --d->threadData->loopLevel;
+ --threadData->loopLevel;
}
#endif
}
@@ -316,9 +324,10 @@ bool QEventLoop::isRunning() const
void QEventLoop::wakeUp()
{
Q_D(QEventLoop);
- if (!d->threadData->hasEventDispatcher())
+ auto threadData = d->threadData.loadAcquire();
+ if (!threadData->hasEventDispatcher())
return;
- d->threadData->eventDispatcher.loadRelaxed()->wakeUp();
+ threadData->eventDispatcher.loadRelaxed()->wakeUp();
}
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 5cb30a74ac..1661520b78 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -282,14 +282,14 @@ QObject *QMetaObject::newInstance(QGenericArgument val0,
idx = indexOfConstructor(norm.constData());
}
if (idx < 0)
- return 0;
+ return nullptr;
- QObject *returnValue = 0;
+ QObject *returnValue = nullptr;
void *param[] = {&returnValue, val0.data(), val1.data(), val2.data(), val3.data(), val4.data(),
val5.data(), val6.data(), val7.data(), val8.data(), val9.data()};
if (static_metacall(CreateInstance, idx, param) >= 0)
- return 0;
+ return nullptr;
return returnValue;
}
@@ -301,7 +301,7 @@ int QMetaObject::static_metacall(Call cl, int idx, void **argv) const
Q_ASSERT(priv(d.data)->revision >= 6);
if (!d.static_metacall)
return 0;
- d.static_metacall(0, cl, idx, argv);
+ d.static_metacall(nullptr, cl, idx, argv);
return -1;
}
@@ -599,7 +599,7 @@ static bool methodMatch(const QMetaObject *m, int handle,
* \internal
* helper function for indexOf{Method,Slot,Signal}, returns the relative index of the method within
* the baseObject
-* \a MethodType might be MethodSignal or MethodSlot, or 0 to match everything.
+* \a MethodType might be MethodSignal or MethodSlot, or \nullptr to match everything.
*/
template<int MethodType>
static inline int indexOfMethodRelative(const QMetaObject **baseObject,
@@ -691,7 +691,7 @@ static void argumentTypesFromString(const char *str, const char *end,
QByteArray QMetaObjectPrivate::decodeMethodSignature(
const char *signature, QArgumentTypeArray &types)
{
- Q_ASSERT(signature != 0);
+ Q_ASSERT(signature != nullptr);
const char *lparens = strchr(signature, '(');
if (!lparens)
return QByteArray();
@@ -731,7 +731,7 @@ int QMetaObject::indexOfSignal(const char *signal) const
\internal
Same as QMetaObject::indexOfSignal, but the result is the local offset to the base object.
- \a baseObject will be adjusted to the enclosing QMetaObject, or 0 if the signal is not found
+ \a baseObject will be adjusted to the enclosing QMetaObject, or \nullptr if the signal is not found
*/
int QMetaObjectPrivate::indexOfSignalRelative(const QMetaObject **baseObject,
const QByteArray &name, int argc,
@@ -844,7 +844,7 @@ int QMetaObjectPrivate::indexOfConstructor(const QMetaObject *m, const QByteArra
*/
int QMetaObjectPrivate::absoluteSignalCount(const QMetaObject *m)
{
- Q_ASSERT(m != 0);
+ Q_ASSERT(m != nullptr);
int n = priv(m->d.data)->signalCount;
for (m = m->d.superdata; m; m = m->d.superdata)
n += priv(m->d.data)->signalCount;
@@ -881,7 +881,7 @@ QMetaMethod QMetaObjectPrivate::signal(const QMetaObject *m, int signal_index)
QMetaMethod result;
if (signal_index < 0)
return result;
- Q_ASSERT(m != 0);
+ Q_ASSERT(m != nullptr);
int i = signal_index;
i -= signalOffset(m);
if (i < 0 && m->d.superdata)
@@ -1031,7 +1031,7 @@ int QMetaObject::indexOfProperty(const char *name) const
QAbstractDynamicMetaObject *me =
const_cast<QAbstractDynamicMetaObject *>(static_cast<const QAbstractDynamicMetaObject *>(this));
- return me->createProperty(name, 0);
+ return me->createProperty(name, nullptr);
}
return -1;
@@ -1145,7 +1145,7 @@ QMetaProperty QMetaObject::property(int index) const
if (!result.menum.isValid()) {
const char *enum_name = type;
const char *scope_name = objectClassName(this);
- char *scope_buffer = 0;
+ char *scope_buffer = nullptr;
const char *colon = strrchr(enum_name, ':');
// ':' will always appear in pairs
@@ -1159,7 +1159,7 @@ QMetaProperty QMetaObject::property(int index) const
enum_name = colon+1;
}
- const QMetaObject *scope = 0;
+ const QMetaObject *scope = nullptr;
if (qstrcmp(scope_name, "Qt") == 0)
scope = &QObject::staticQtMetaObject;
else
@@ -1542,14 +1542,14 @@ bool QMetaObject::invokeMethodImpl(QObject *object, QtPrivate::QSlotObjectBase *
return false;
}
- QCoreApplication::postEvent(object, new QMetaCallEvent(slot, 0, -1, 1));
+ QCoreApplication::postEvent(object, new QMetaCallEvent(slot, nullptr, -1, 1));
} else if (type == Qt::BlockingQueuedConnection) {
#if QT_CONFIG(thread)
if (currentThread == objectThread)
qWarning("QMetaObject::invokeMethod: Dead lock detected");
QSemaphore semaphore;
- QCoreApplication::postEvent(object, new QMetaCallEvent(slot, 0, -1, argv, &semaphore));
+ QCoreApplication::postEvent(object, new QMetaCallEvent(slot, nullptr, -1, argv, &semaphore));
semaphore.acquire();
#endif // QT_CONFIG(thread)
} else {
@@ -1988,7 +1988,7 @@ QList<QByteArray> QMetaMethod::parameterNames() const
const char *QMetaMethod::typeName() const
{
if (!mobj)
- return 0;
+ return nullptr;
return QMetaMethodPrivate::get(this)->rawReturnTypeName();
}
@@ -2020,7 +2020,7 @@ const char *QMetaMethod::typeName() const
const char *QMetaMethod::tag() const
{
if (!mobj)
- return 0;
+ return nullptr;
return QMetaMethodPrivate::get(this)->tag().constData();
}
@@ -2303,7 +2303,7 @@ bool QMetaMethod::invoke(QObject *object,
return false;
}
- QScopedPointer<QMetaCallEvent> event(new QMetaCallEvent(idx_offset, idx_relative, callFunction, 0, -1, paramCount));
+ QScopedPointer<QMetaCallEvent> event(new QMetaCallEvent(idx_offset, idx_relative, callFunction, nullptr, -1, paramCount));
int *types = event->types();
void **args = event->args();
@@ -2340,7 +2340,7 @@ bool QMetaMethod::invoke(QObject *object,
QSemaphore semaphore;
QCoreApplication::postEvent(object, new QMetaCallEvent(idx_offset, idx_relative, callFunction,
- 0, -1, param, &semaphore));
+ nullptr, -1, param, &semaphore));
semaphore.acquire();
#endif // QT_CONFIG(thread)
}
@@ -2563,7 +2563,7 @@ bool QMetaMethod::invokeOnGadget(void* gadget, QGenericReturnArgument returnValu
const char *QMetaEnum::name() const
{
if (!mobj)
- return 0;
+ return nullptr;
return rawStringData(mobj, mobj->d.data[handle]);
}
@@ -2582,7 +2582,7 @@ const char *QMetaEnum::name() const
const char *QMetaEnum::enumName() const
{
if (!mobj)
- return 0;
+ return nullptr;
const bool rev8p = priv(mobj->d.data)->revision >= 8;
if (rev8p)
return rawStringData(mobj, mobj->d.data[handle + 1]);
@@ -2610,13 +2610,13 @@ int QMetaEnum::keyCount() const
const char *QMetaEnum::key(int index) const
{
if (!mobj)
- return 0;
+ return nullptr;
const int offset = priv(mobj->d.data)->revision >= 8 ? 3 : 2;
int count = mobj->d.data[handle + offset];
int data = mobj->d.data[handle + offset + 1];
if (index >= 0 && index < count)
return rawStringData(mobj, mobj->d.data[data + 2*index]);
- return 0;
+ return nullptr;
}
/*!
@@ -2679,7 +2679,7 @@ bool QMetaEnum::isScoped() const
*/
const char *QMetaEnum::scope() const
{
- return mobj ? objectClassName(mobj) : 0;
+ return mobj ? objectClassName(mobj) : nullptr;
}
/*!
@@ -2695,7 +2695,7 @@ const char *QMetaEnum::scope() const
*/
int QMetaEnum::keyToValue(const char *key, bool *ok) const
{
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
if (!mobj || !key)
return -1;
@@ -2715,7 +2715,7 @@ int QMetaEnum::keyToValue(const char *key, bool *ok) const
const QByteArray className = stringData(mobj, priv(mobj->d.data)->className);
if ((!scope || (className.size() == int(scope) && strncmp(qualified_key, className.constData(), scope) == 0))
&& strcmp(key, rawStringData(mobj, mobj->d.data[data + 2*i])) == 0) {
- if (ok != 0)
+ if (ok != nullptr)
*ok = true;
return mobj->d.data[data + 2*i + 1];
}
@@ -2734,14 +2734,14 @@ int QMetaEnum::keyToValue(const char *key, bool *ok) const
const char* QMetaEnum::valueToKey(int value) const
{
if (!mobj)
- return 0;
+ return nullptr;
const int offset = priv(mobj->d.data)->revision >= 8 ? 3 : 2;
int count = mobj->d.data[handle + offset];
int data = mobj->d.data[handle + offset + 1];
for (int i = 0; i < count; ++i)
if (value == (int)mobj->d.data[data + 2*i + 1])
return rawStringData(mobj, mobj->d.data[data + 2*i]);
- return 0;
+ return nullptr;
}
/*!
@@ -2756,11 +2756,11 @@ const char* QMetaEnum::valueToKey(int value) const
*/
int QMetaEnum::keysToValue(const char *keys, bool *ok) const
{
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
if (!mobj || !keys)
return -1;
- if (ok != 0)
+ if (ok != nullptr)
*ok = true;
const QString keysString = QString::fromLatin1(keys);
const QVector<QStringRef> splitKeys = keysString.splitRef(QLatin1Char('|'));
@@ -2793,7 +2793,7 @@ int QMetaEnum::keysToValue(const char *keys, bool *ok) const
}
}
if (i < 0) {
- if (ok != 0)
+ if (ok != nullptr)
*ok = false;
value |= -1;
}
@@ -2896,7 +2896,7 @@ static QByteArray qualifiedName(const QMetaEnum &e)
\internal
*/
QMetaProperty::QMetaProperty()
- : mobj(0), handle(0), idx(0)
+ : mobj(nullptr), handle(0), idx(0)
{
}
@@ -2909,7 +2909,7 @@ QMetaProperty::QMetaProperty()
const char *QMetaProperty::name() const
{
if (!mobj)
- return 0;
+ return nullptr;
int handle = priv(mobj->d.data)->propertyData + 3*idx;
return rawStringData(mobj, mobj->d.data[handle]);
}
@@ -2922,7 +2922,7 @@ const char *QMetaProperty::name() const
const char *QMetaProperty::typeName() const
{
if (!mobj)
- return 0;
+ return nullptr;
int handle = priv(mobj->d.data)->propertyData + 3*idx;
return rawTypeNameFromTypeInfo(mobj, mobj->d.data[handle + 1]);
}
@@ -2982,7 +2982,7 @@ int QMetaProperty::userType() const
if (type == QMetaType::UnknownType) {
type = registerPropertyType();
if (type == QMetaType::UnknownType)
- return QVariant::Int; // Match behavior of QMetaType::type()
+ return QMetaType::Int; // Match behavior of QMetaType::type()
}
return type;
}
@@ -3100,7 +3100,7 @@ QVariant QMetaProperty::read(const QObject *object) const
if (!object || !mobj)
return QVariant();
- uint t = QVariant::Int;
+ uint t = QMetaType::Int;
if (isEnumType()) {
/*
try to create a QVariant that can be converted to this enum
@@ -3112,7 +3112,7 @@ QVariant QMetaProperty::read(const QObject *object) const
t = enumMetaTypeId;
} else {
int handle = priv(mobj->d.data)->propertyData + 3*idx;
- const char *typeName = 0;
+ const char *typeName = nullptr;
Q_ASSERT(priv(mobj->d.data)->revision >= 7);
uint typeInfo = mobj->d.data[handle + 1];
if (!(typeInfo & IsUnresolvedType))
@@ -3138,11 +3138,11 @@ QVariant QMetaProperty::read(const QObject *object) const
// changed: result stored directly in value
int status = -1;
QVariant value;
- void *argv[] = { 0, &value, &status };
+ void *argv[] = { nullptr, &value, &status };
if (t == QMetaType::QVariant) {
argv[0] = &value;
} else {
- value = QVariant(t, (void*)0);
+ value = QVariant(t, (void*)nullptr);
argv[0] = value.data();
}
if (priv(mobj->d.data)->flags & PropertyAccessInStaticMetaCall && mobj->d.static_metacall) {
@@ -3177,9 +3177,9 @@ bool QMetaProperty::write(QObject *object, const QVariant &value) const
return false;
QVariant v = value;
- uint t = QVariant::Invalid;
+ uint t = QMetaType::UnknownType;
if (isEnumType()) {
- if (v.type() == QVariant::String) {
+ if (v.userType() == QMetaType::QString) {
bool ok;
if (isFlagType())
v = QVariant(menum.keysToValue(value.toByteArray(), &ok));
@@ -3187,16 +3187,16 @@ bool QMetaProperty::write(QObject *object, const QVariant &value) const
v = QVariant(menum.keyToValue(value.toByteArray(), &ok));
if (!ok)
return false;
- } else if (v.type() != QVariant::Int && v.type() != QVariant::UInt) {
+ } else if (v.userType() != QMetaType::Int && v.userType() != QMetaType::UInt) {
int enumMetaTypeId = QMetaType::type(qualifiedName(menum));
if ((enumMetaTypeId == QMetaType::UnknownType) || (v.userType() != enumMetaTypeId) || !v.constData())
return false;
v = QVariant(*reinterpret_cast<const int *>(v.constData()));
}
- v.convert(QVariant::Int);
+ v.convert(QMetaType::Int);
} else {
int handle = priv(mobj->d.data)->propertyData + 3*idx;
- const char *typeName = 0;
+ const char *typeName = nullptr;
Q_ASSERT(priv(mobj->d.data)->revision >= 7);
uint typeInfo = mobj->d.data[handle + 1];
if (!(typeInfo & IsUnresolvedType))
@@ -3213,7 +3213,7 @@ bool QMetaProperty::write(QObject *object, const QVariant &value) const
if (!value.isValid()) {
if (isResettable())
return reset(object);
- v = QVariant(t, 0);
+ v = QVariant(t, nullptr);
} else if (!v.convert(t)) {
return false;
}
@@ -3229,7 +3229,7 @@ bool QMetaProperty::write(QObject *object, const QVariant &value) const
// the flags variable is used by the declarative module to implement
// interception of property writes.
int flags = 0;
- void *argv[] = { 0, &v, &status, &flags };
+ void *argv[] = { nullptr, &v, &status, &flags };
if (t == QMetaType::QVariant)
argv[0] = &v;
else
@@ -3254,7 +3254,7 @@ bool QMetaProperty::reset(QObject *object) const
{
if (!object || !mobj || !isResettable())
return false;
- void *argv[] = { 0 };
+ void *argv[] = { nullptr };
if (priv(mobj->d.data)->flags & PropertyAccessInStaticMetaCall && mobj->d.static_metacall)
mobj->d.static_metacall(object, QMetaObject::ResetProperty, idx, argv);
else
@@ -3573,6 +3573,21 @@ bool QMetaProperty::isFinal() const
}
/*!
+ \since 5.15
+ Returns \c true if the property is required; otherwise returns \c false.
+
+ A property is final if the \c{Q_PROPERTY()}'s \c REQUIRED attribute
+ is set.
+*/
+bool QMetaProperty::isRequired() const
+{
+ if (!mobj)
+ return false;
+ int flags = mobj->d.data[handle + 2];
+ return flags & Required;
+}
+
+/*!
\obsolete
Returns \c true if the property is editable for the given \a object;
@@ -3638,7 +3653,7 @@ bool QMetaProperty::isEditable(const QObject *object) const
const char *QMetaClassInfo::name() const
{
if (!mobj)
- return 0;
+ return nullptr;
return rawStringData(mobj, mobj->d.data[handle]);
}
@@ -3650,7 +3665,7 @@ const char *QMetaClassInfo::name() const
const char* QMetaClassInfo::value() const
{
if (!mobj)
- return 0;
+ return nullptr;
return rawStringData(mobj, mobj->d.data[handle + 1]);
}
diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h
index fcd92afd89..beb85becae 100644
--- a/src/corelib/kernel/qmetaobject.h
+++ b/src/corelib/kernel/qmetaobject.h
@@ -266,6 +266,7 @@ public:
bool isUser(const QObject *obj = nullptr) const;
bool isConstant() const;
bool isFinal() const;
+ bool isRequired() const;
bool isFlagType() const;
bool isEnumType() const;
diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h
index 56e3d6cb44..277109dac4 100644
--- a/src/corelib/kernel/qmetaobject_p.h
+++ b/src/corelib/kernel/qmetaobject_p.h
@@ -85,7 +85,8 @@ enum PropertyFlags {
User = 0x00100000,
ResolveUser = 0x00200000,
Notify = 0x00400000,
- Revisioned = 0x00800000
+ Revisioned = 0x00800000,
+ Required = 0x01000000,
};
enum MethodFlags {
diff --git a/src/corelib/kernel/qmetaobjectbuilder.cpp b/src/corelib/kernel/qmetaobjectbuilder.cpp
index f77c4ce32f..4ecc340787 100644
--- a/src/corelib/kernel/qmetaobjectbuilder.cpp
+++ b/src/corelib/kernel/qmetaobjectbuilder.cpp
@@ -210,7 +210,7 @@ public:
: flags(0)
{
superClass = &QObject::staticMetaObject;
- staticMetacallFunction = 0;
+ staticMetacallFunction = nullptr;
}
bool hasRevisionedProperties() const;
@@ -749,7 +749,7 @@ void QMetaObjectBuilder::addMetaObject
Q_ASSERT(priv(prototype->d.data)->revision >= 2);
const auto *objects = prototype->d.relatedMetaObjects;
if (objects) {
- while (*objects != 0) {
+ while (*objects != nullptr) {
addRelatedMetaObject(*objects);
++objects;
}
@@ -831,7 +831,7 @@ const QMetaObject *QMetaObjectBuilder::relatedMetaObject(int index) const
if (index >= 0 && index < d->relatedMetaObjects.size())
return d->relatedMetaObjects[index];
else
- return 0;
+ return nullptr;
}
/*!
@@ -1196,8 +1196,8 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf,
ALIGN(size, int);
if (buf) {
if (!relocatable) meta->d.superdata = d->superClass;
- meta->d.relatedMetaObjects = 0;
- meta->d.extradata = 0;
+ meta->d.relatedMetaObjects = nullptr;
+ meta->d.extradata = nullptr;
meta->d.static_metacall = d->staticMetacallFunction;
}
@@ -1494,7 +1494,7 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf,
*/
QMetaObject *QMetaObjectBuilder::toMetaObject() const
{
- int size = buildMetaObject(d, 0, 0, false);
+ int size = buildMetaObject(d, nullptr, 0, false);
char *buf = reinterpret_cast<char *>(malloc(size));
memset(buf, 0, size);
buildMetaObject(d, buf, size, false);
@@ -1517,7 +1517,7 @@ QMetaObject *QMetaObjectBuilder::toMetaObject() const
*/
QByteArray QMetaObjectBuilder::toRelocatableData(bool *ok) const
{
- int size = buildMetaObject(d, 0, 0, true);
+ int size = buildMetaObject(d, nullptr, 0, true);
if (size == -1) {
if (ok) *ok = false;
return QByteArray();
@@ -1555,9 +1555,9 @@ void QMetaObjectBuilder::fromRelocatableData(QMetaObject *output,
output->d.superdata = superclass;
output->d.stringdata = reinterpret_cast<const QByteArrayData *>(buf + stringdataOffset);
output->d.data = reinterpret_cast<const uint *>(buf + dataOffset);
- output->d.extradata = 0;
- output->d.relatedMetaObjects = 0;
- output->d.static_metacall = 0;
+ output->d.extradata = nullptr;
+ output->d.relatedMetaObjects = nullptr;
+ output->d.static_metacall = nullptr;
}
/*!
@@ -1720,14 +1720,14 @@ void QMetaObjectBuilder::deserialize
d->enumerators.clear();
d->constructors.clear();
d->relatedMetaObjects.clear();
- d->staticMetacallFunction = 0;
+ d->staticMetacallFunction = nullptr;
// Read the class and super class names.
stream >> d->className;
stream >> name;
if (name.isEmpty()) {
- d->superClass = 0;
- } else if ((cl = resolveClassName(references, name)) != 0) {
+ d->superClass = nullptr;
+ } else if ((cl = resolveClassName(references, name)) != nullptr) {
d->superClass = cl;
} else {
stream.setStatus(QDataStream::ReadCorruptData);
@@ -1877,7 +1877,7 @@ QMetaMethodBuilderPrivate *QMetaMethodBuilder::d_func() const
else if (_mobj && -_index >= 1 && -_index <= int(_mobj->d->constructors.size()))
return &(_mobj->d->constructors[(-_index) - 1]);
else
- return 0;
+ return nullptr;
}
/*!
@@ -2116,7 +2116,7 @@ QMetaPropertyBuilderPrivate *QMetaPropertyBuilder::d_func() const
if (_mobj && _index >= 0 && _index < int(_mobj->d->properties.size()))
return &(_mobj->d->properties[_index]);
else
- return 0;
+ return nullptr;
}
/*!
@@ -2588,7 +2588,7 @@ QMetaEnumBuilderPrivate *QMetaEnumBuilder::d_func() const
if (_mobj && _index >= 0 && _index < int(_mobj->d->enumerators.size()))
return &(_mobj->d->enumerators[_index]);
else
- return 0;
+ return nullptr;
}
/*!
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 356a675517..a2b7fec5cd 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -252,6 +252,7 @@ struct DefinedTypesFilter {
\value QPolygon QPolygon
\value QPolygonF QPolygonF
\value QColor QColor
+ \value QColorSpace QColorSpace
\value QSizeF QSizeF
\value QRectF QRectF
\value QLine QLine
@@ -456,7 +457,7 @@ struct DefinedTypesFilter {
\deprecated
Constructs a value of the given type which is a copy of \a copy.
- The default value for \a copy is 0.
+ The default value for \a copy is \nullptr.
Deprecated, use the static function QMetaType::create(int type,
const void *copy) instead.
@@ -506,6 +507,31 @@ struct DefinedTypesFilter {
Destructs this object.
*/
+/*!
+ \fn template<typename T> QMetaType QMetaType::fromType()
+ \since 5.15
+
+ Returns the QMetaType corresponding to the type in the template parameter.
+*/
+
+/*! \fn bool operator==(const QMetaType &a, const QMetaType &b)
+ \since 5.15
+ \relates QMetaType
+ \overload
+
+ Returns \c true if the QMetaType \a a represents the same type
+ as the QMetaType \a b, otherwise returns \c false.
+*/
+
+/*! \fn bool operator!=(const QMetaType &a, const QMetaType &c)
+ \since 5.15
+ \relates QMetaType
+ \overload
+
+ Returns \c true if the QMetaType \a a represents a difference type
+ than the QMetaType \a b, otherwise returns \c false.
+*/
+
#define QT_ADD_STATIC_METATYPE(MetaTypeName, MetaTypeId, RealName) \
{ #RealName, sizeof(#RealName) - 1, MetaTypeId },
@@ -930,7 +956,7 @@ constexpr MetaTypeOffsets<QtPrivate::Indexes<QMetaType::HighestInternalId + 1>::
pointer if no matching type was found. The returned pointer must not be
deleted.
- \sa type(), isRegistered(), Type
+ \sa type(), isRegistered(), Type, name()
*/
const char *QMetaType::typeName(int typeId)
{
@@ -950,6 +976,20 @@ const char *QMetaType::typeName(int typeId)
#undef QT_METATYPE_TYPEID_TYPENAME_CONVERTER
}
+/*!
+ \since 5.15
+
+ Returns the type name associated with this QMetaType, or a null
+ pointer if no matching type was found. The returned pointer must not be
+ deleted.
+
+ \sa typeName()
+*/
+QByteArray QMetaType::name() const
+{
+ return QMetaType::typeName(m_typeId);
+}
+
/*
Similar to QMetaType::type(), but only looks in the static set of types.
*/
@@ -1113,8 +1153,8 @@ static int registerNormalizedType(const NS(QByteArray) &normalizedTypeName,
QCustomTypeInfo inf;
inf.typeName = normalizedTypeName;
#ifndef QT_NO_DATASTREAM
- inf.loadOp = 0;
- inf.saveOp = 0;
+ inf.loadOp = nullptr;
+ inf.saveOp = nullptr;
#endif
inf.alias = -1;
inf.typedConstructor = typedConstructor;
@@ -1955,7 +1995,7 @@ public:
return Q_LIKELY(qMetaTypeWidgetsHelper)
? qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].metaObject
: nullptr;
- return 0;
+ return nullptr;
}
};
@@ -2214,6 +2254,8 @@ QMetaType QMetaType::typeInfo(const int type)
\since 5.0
Constructs a QMetaType object that contains all information about type \a typeId.
+
+ \note: The default parameter was added in Qt 5.15
*/
QMetaType::QMetaType(const int typeId)
: m_typeId(typeId)
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index d13fdeb642..59ec8de0e9 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -175,6 +175,7 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId();
F(QVector4D, 84, QVector4D) \
F(QQuaternion, 85, QQuaternion) \
F(QPolygonF, 86, QPolygonF) \
+ F(QColorSpace, 87, QColorSpace) \
#define QT_FOR_EACH_STATIC_WIDGETS_CLASS(F)\
@@ -437,7 +438,7 @@ public:
FirstCoreType = Bool,
LastCoreType = QCborMap,
FirstGuiType = QFont,
- LastGuiType = QPolygonF,
+ LastGuiType = QColorSpace,
FirstWidgetsType = QSizePolicy,
LastWidgetsType = QSizePolicy,
HighestInternalId = LastWidgetsType,
@@ -472,12 +473,12 @@ public:
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,
+ QVector3D = 83, QVector4D = 84, QQuaternion = 85, QPolygonF = 86, QColorSpace = 87,
// Widget types
QSizePolicy = 121,
LastCoreType = QCborMap,
- LastGuiType = QPolygonF,
+ LastGuiType = QColorSpace,
User = 1024
};
#endif
@@ -572,7 +573,7 @@ public:
static bool load(QDataStream &stream, int type, void *data);
#endif
- explicit QMetaType(const int type); // ### Qt6: drop const
+ explicit QMetaType(const int type = QMetaType::UnknownType); // ### Qt6: drop const
inline ~QMetaType();
inline bool isValid() const;
@@ -581,12 +582,24 @@ public:
inline int sizeOf() const;
inline TypeFlags flags() const;
inline const QMetaObject *metaObject() const;
+ QT_PREPEND_NAMESPACE(QByteArray) name() const;
inline void *create(const void *copy = nullptr) const;
inline void destroy(void *data) const;
inline void *construct(void *where, const void *copy = nullptr) const;
inline void destruct(void *data) const;
+ template<typename T>
+ static QMetaType fromType()
+ { return QMetaType(qMetaTypeId<T>()); }
+
+ friend bool operator==(const QMetaType &a, const QMetaType &b)
+ { return a.m_typeId == b.m_typeId; }
+
+ friend bool operator!=(const QMetaType &a, const QMetaType &b)
+ { return a.m_typeId != b.m_typeId; }
+
+
public:
template<typename T>
static bool registerComparators()
@@ -1284,9 +1297,12 @@ public:
{ IteratorOwner<typename T::const_iterator>::assign(iterator,
static_cast<const T*>(container)->find(*static_cast<const typename T::key_type*>(p))); }
+ QT_WARNING_PUSH
+ QT_WARNING_DISABLE_DEPRECATED // Hits on the deprecated QHash::iterator::operator--()
template<class T>
static void advanceImpl(void **p, int step)
{ std::advance(*static_cast<typename T::const_iterator*>(*p), step); }
+ QT_WARNING_POP
template<class T>
static void beginImpl(const void *container, void **iterator)
diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp
index 9a98db21d3..c38dab3e3f 100644
--- a/src/corelib/kernel/qmimedata.cpp
+++ b/src/corelib/kernel/qmimedata.cpp
@@ -70,61 +70,65 @@ public:
void setData(const QString &format, const QVariant &data);
QVariant getData(const QString &format) const;
- QVariant retrieveTypedData(const QString &format, QVariant::Type type) const;
+ QVariant retrieveTypedData(const QString &format, QMetaType::Type type) const;
- QVector<QMimeDataStruct> dataList;
+ std::vector<QMimeDataStruct>::iterator find(const QString &format) noexcept {
+ const auto formatEquals = [](const QString &format) {
+ return [&format](const QMimeDataStruct &s) { return s.format == format; };
+ };
+ return std::find_if(dataList.begin(), dataList.end(), formatEquals(format));
+ }
+
+ std::vector<QMimeDataStruct>::const_iterator find(const QString &format) const noexcept {
+ return const_cast<QMimeDataPrivate*>(this)->find(format);
+ }
+
+ std::vector<QMimeDataStruct> dataList;
};
void QMimeDataPrivate::removeData(const QString &format)
{
- for (int i=0; i<dataList.size(); i++) {
- if (dataList.at(i).format == format) {
- dataList.removeAt(i);
- return;
- }
- }
+ const auto it = find(format);
+ if (it != dataList.end())
+ dataList.erase(it);
}
void QMimeDataPrivate::setData(const QString &format, const QVariant &data)
{
- // remove it first if the format is already here.
- removeData(format);
- QMimeDataStruct mimeData;
- mimeData.format = format;
- mimeData.data = data;
- dataList += mimeData;
+ const auto it = find(format);
+ if (it == dataList.end())
+ dataList.push_back({format, data});
+ else
+ it->data = data;
}
QVariant QMimeDataPrivate::getData(const QString &format) const
{
- QVariant data;
- for (int i=0; i<dataList.size(); i++) {
- if (dataList.at(i).format == format) {
- data = dataList.at(i).data;
- break;
- }
- }
- return data;
+ const auto it = find(format);
+ if (it == dataList.cend())
+ return {};
+ else
+ return it->data;
}
-QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Type type) const
+QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QMetaType::Type type) const
{
Q_Q(const QMimeData);
- QVariant data = q->retrieveData(format, type);
+ QVariant data = q->retrieveData(format, QVariant::Type(type));
// Text data requested: fallback to URL data if available
if (format == QLatin1String("text/plain") && !data.isValid()) {
- data = retrieveTypedData(textUriListLiteral(), QVariant::List);
- if (data.type() == QVariant::Url) {
+ data = retrieveTypedData(textUriListLiteral(), QMetaType::QVariantList);
+ if (data.userType() == QMetaType::QUrl) {
data = QVariant(data.toUrl().toDisplayString());
- } else if (data.type() == QVariant::List) {
+ } else if (data.userType() == QMetaType::QVariantList) {
QString text;
int numUrls = 0;
const QList<QVariant> list = data.toList();
for (int i = 0; i < list.size(); ++i) {
- if (list.at(i).type() == QVariant::Url) {
+ if (list.at(i).userType() == QMetaType::QUrl) {
text += list.at(i).toUrl().toDisplayString() + QLatin1Char('\n');
++numUrls;
}
@@ -135,26 +139,26 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
}
}
- if (data.type() == type || !data.isValid())
+ if (data.userType() == type || !data.isValid())
return data;
// provide more conversion possiblities than just what QVariant provides
// URLs can be lists as well...
- if ((type == QVariant::Url && data.type() == QVariant::List)
- || (type == QVariant::List && data.type() == QVariant::Url))
+ if ((type == QMetaType::QUrl && data.userType() == QMetaType::QVariantList)
+ || (type == QMetaType::QVariantList && data.userType() == QMetaType::QUrl))
return data;
// images and pixmaps are interchangeable
- if ((type == QVariant::Pixmap && data.type() == QVariant::Image)
- || (type == QVariant::Image && data.type() == QVariant::Pixmap))
+ if ((type == QMetaType::QPixmap && data.userType() == QMetaType::QImage)
+ || (type == QMetaType::QImage && data.userType() == QMetaType::QPixmap))
return data;
- if (data.type() == QVariant::ByteArray) {
+ if (data.userType() == QMetaType::QByteArray) {
// see if we can convert to the requested type
switch(type) {
#if QT_CONFIG(textcodec)
- case QVariant::String: {
+ case QMetaType::QString: {
const QByteArray ba = data.toByteArray();
QTextCodec *codec = QTextCodec::codecForName("utf-8");
if (format == QLatin1String("text/html"))
@@ -162,17 +166,17 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
return codec->toUnicode(ba);
}
#endif // textcodec
- case QVariant::Color: {
+ case QMetaType::QColor: {
QVariant newData = data;
- newData.convert(QVariant::Color);
+ newData.convert(QMetaType::QColor);
return newData;
}
- case QVariant::List: {
+ case QMetaType::QVariantList: {
if (format != QLatin1String("text/uri-list"))
break;
Q_FALLTHROUGH();
}
- case QVariant::Url: {
+ case QMetaType::QUrl: {
QByteArray ba = data.toByteArray();
// Qt 3.x will send text/uri-list with a trailing
// null-terminator (that is *not* sent for any other
@@ -193,23 +197,23 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
break;
}
- } else if (type == QVariant::ByteArray) {
+ } else if (type == QMetaType::QByteArray) {
// try to convert to bytearray
- switch(data.type()) {
- case QVariant::ByteArray:
- case QVariant::Color:
+ switch (data.userType()) {
+ case QMetaType::QByteArray:
+ case QMetaType::QColor:
return data.toByteArray();
- case QVariant::String:
+ case QMetaType::QString:
return data.toString().toUtf8();
- case QVariant::Url:
+ case QMetaType::QUrl:
return data.toUrl().toEncoded();
- case QVariant::List: {
+ case QMetaType::QVariantList: {
// has to be list of URLs
QByteArray result;
QList<QVariant> list = data.toList();
for (int i = 0; i < list.size(); ++i) {
- if (list.at(i).type() == QVariant::Url) {
+ if (list.at(i).userType() == QMetaType::QUrl) {
result += list.at(i).toUrl().toEncoded();
result += "\r\n";
}
@@ -319,7 +323,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
Constructs a new MIME data object with no data in it.
*/
QMimeData::QMimeData()
- : QObject(*new QMimeDataPrivate, 0)
+ : QObject(*new QMimeDataPrivate, nullptr)
{
}
@@ -340,14 +344,14 @@ QMimeData::~QMimeData()
QList<QUrl> QMimeData::urls() const
{
Q_D(const QMimeData);
- QVariant data = d->retrieveTypedData(textUriListLiteral(), QVariant::List);
+ QVariant data = d->retrieveTypedData(textUriListLiteral(), QMetaType::QVariantList);
QList<QUrl> urls;
- if (data.type() == QVariant::Url)
+ if (data.userType() == QMetaType::QUrl)
urls.append(data.toUrl());
- else if (data.type() == QVariant::List) {
+ else if (data.userType() == QMetaType::QVariantList) {
QList<QVariant> list = data.toList();
for (int i = 0; i < list.size(); ++i) {
- if (list.at(i).type() == QVariant::Url)
+ if (list.at(i).userType() == QMetaType::QUrl)
urls.append(list.at(i).toUrl());
}
}
@@ -400,11 +404,11 @@ bool QMimeData::hasUrls() const
QString QMimeData::text() const
{
Q_D(const QMimeData);
- QVariant utf8Text = d->retrieveTypedData(textPlainUtf8Literal(), QVariant::String);
+ QVariant utf8Text = d->retrieveTypedData(textPlainUtf8Literal(), QMetaType::QString);
if (!utf8Text.isNull())
return utf8Text.toString();
- QVariant data = d->retrieveTypedData(textPlainLiteral(), QVariant::String);
+ QVariant data = d->retrieveTypedData(textPlainLiteral(), QMetaType::QString);
return data.toString();
}
@@ -440,7 +444,7 @@ bool QMimeData::hasText() const
QString QMimeData::html() const
{
Q_D(const QMimeData);
- QVariant data = d->retrieveTypedData(textHtmlLiteral(), QVariant::String);
+ QVariant data = d->retrieveTypedData(textHtmlLiteral(), QMetaType::QString);
return data.toString();
}
@@ -482,7 +486,7 @@ bool QMimeData::hasHtml() const
QVariant QMimeData::imageData() const
{
Q_D(const QMimeData);
- return d->retrieveTypedData(applicationXQtImageLiteral(), QVariant::Image);
+ return d->retrieveTypedData(applicationXQtImageLiteral(), QMetaType::QImage);
}
/*!
@@ -529,7 +533,7 @@ bool QMimeData::hasImage() const
QVariant QMimeData::colorData() const
{
Q_D(const QMimeData);
- return d->retrieveTypedData(applicationXColorLiteral(), QVariant::Color);
+ return d->retrieveTypedData(applicationXColorLiteral(), QMetaType::QColor);
}
/*!
@@ -564,7 +568,7 @@ bool QMimeData::hasColor() const
QByteArray QMimeData::data(const QString &mimeType) const
{
Q_D(const QMimeData);
- QVariant data = d->retrieveTypedData(mimeType, QVariant::ByteArray);
+ QVariant data = d->retrieveTypedData(mimeType, QMetaType::QByteArray);
return data.toByteArray();
}
@@ -635,10 +639,9 @@ QStringList QMimeData::formats() const
{
Q_D(const QMimeData);
QStringList list;
- const int size = d->dataList.size();
- list.reserve(size);
- for (int i = 0; i < size; ++i)
- list += d->dataList.at(i).format;
+ list.reserve(static_cast<int>(d->dataList.size()));
+ for (auto &e : d->dataList)
+ list += e.format;
return list;
}
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index e2e133ac28..a51b794604 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -109,7 +109,7 @@ static int *queuedConnectionTypes(const QList<QByteArray> &typeNames)
"(Make sure '%s' is registered using qRegisterMetaType().)",
typeName.constData(), typeName.constData());
delete [] types;
- return 0;
+ return nullptr;
}
}
types[typeNames.count()] = 0;
@@ -133,7 +133,7 @@ static int *queuedConnectionTypes(const QArgumentType *argumentTypes, int argc)
qWarning("QObject::connect: Cannot queue arguments of type '%s'\n"
"(Make sure '%s' is registered using qRegisterMetaType().)",
type.name().constData(), type.name().constData());
- return 0;
+ return nullptr;
}
}
types[argc] = 0;
@@ -160,13 +160,13 @@ extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *)
{}
#endif
-void (*QAbstractDeclarativeData::destroyed)(QAbstractDeclarativeData *, QObject *) = 0;
-void (*QAbstractDeclarativeData::destroyed_qml1)(QAbstractDeclarativeData *, QObject *) = 0;
-void (*QAbstractDeclarativeData::parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *) = 0;
-void (*QAbstractDeclarativeData::signalEmitted)(QAbstractDeclarativeData *, QObject *, int, void **) = 0;
-int (*QAbstractDeclarativeData::receivers)(QAbstractDeclarativeData *, const QObject *, int) = 0;
-bool (*QAbstractDeclarativeData::isSignalConnected)(QAbstractDeclarativeData *, const QObject *, int) = 0;
-void (*QAbstractDeclarativeData::setWidgetParent)(QObject *, QObject *) = 0;
+void (*QAbstractDeclarativeData::destroyed)(QAbstractDeclarativeData *, QObject *) = nullptr;
+void (*QAbstractDeclarativeData::destroyed_qml1)(QAbstractDeclarativeData *, QObject *) = nullptr;
+void (*QAbstractDeclarativeData::parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *) = nullptr;
+void (*QAbstractDeclarativeData::signalEmitted)(QAbstractDeclarativeData *, QObject *, int, void **) = nullptr;
+int (*QAbstractDeclarativeData::receivers)(QAbstractDeclarativeData *, const QObject *, int) = nullptr;
+bool (*QAbstractDeclarativeData::isSignalConnected)(QAbstractDeclarativeData *, const QObject *, int) = nullptr;
+void (*QAbstractDeclarativeData::setWidgetParent)(QObject *, QObject *) = nullptr;
/*!
\fn QObjectData::QObjectData()
@@ -182,7 +182,7 @@ QMetaObject *QObjectData::dynamicMetaObject() const
}
QObjectPrivate::QObjectPrivate(int version)
- : threadData(0), currentChildBeingDeleted(0)
+ : threadData(nullptr), currentChildBeingDeleted(nullptr)
{
#ifdef QT_BUILD_INTERNAL
// Don't check the version parameter in internal builds.
@@ -195,8 +195,8 @@ QObjectPrivate::QObjectPrivate(int version)
#endif
// QObjectData initialization
- q_ptr = 0;
- parent = 0; // no parent yet. It is set by setParent()
+ q_ptr = nullptr;
+ parent = nullptr; // no parent yet. It is set by setParent()
isWidget = false; // assume not a widget object
blockSig = false; // not blocking signals
wasDeleted = false; // double-delete catcher
@@ -204,19 +204,20 @@ QObjectPrivate::QObjectPrivate(int version)
sendChildEvents = true; // if we should send ChildAdded and ChildRemoved events to parent
receiveChildEvents = true;
postedEvents = 0;
- extraData = 0;
- metaObject = 0;
+ extraData = nullptr;
+ metaObject = nullptr;
isWindow = false;
deleteLaterCalled = false;
}
QObjectPrivate::~QObjectPrivate()
{
+ auto thisThreadData = threadData.loadRelaxed();
if (extraData && !extraData->runningTimers.isEmpty()) {
- if (Q_LIKELY(threadData->thread.loadAcquire() == QThread::currentThread())) {
+ if (Q_LIKELY(thisThreadData->thread.loadAcquire() == QThread::currentThread())) {
// unregister pending timers
- if (threadData->hasEventDispatcher())
- threadData->eventDispatcher.loadRelaxed()->unregisterTimers(q_ptr);
+ if (thisThreadData->hasEventDispatcher())
+ thisThreadData->eventDispatcher.loadRelaxed()->unregisterTimers(q_ptr);
// release the timer ids back to the pool
for (int i = 0; i < extraData->runningTimers.size(); ++i)
@@ -229,7 +230,7 @@ QObjectPrivate::~QObjectPrivate()
if (postedEvents)
QCoreApplication::removePostedEvents(q_ptr, 0);
- threadData->deref();
+ thisThreadData->deref();
if (metaObject) metaObject->objectDestroyed(q_ptr);
@@ -906,30 +907,8 @@ static bool check_parent_thread(QObject *parent,
*/
QObject::QObject(QObject *parent)
- : d_ptr(new QObjectPrivate)
+ : QObject(*new QObjectPrivate, parent)
{
- Q_ASSERT_X(this != parent, Q_FUNC_INFO, "Cannot parent a QObject to itself");
-
- Q_D(QObject);
- d_ptr->q_ptr = this;
- d->threadData = (parent && !parent->thread()) ? parent->d_func()->threadData : QThreadData::current();
- d->threadData->ref();
- if (parent) {
- QT_TRY {
- if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
- parent = 0;
- setParent(parent);
- } QT_CATCH(...) {
- d->threadData->deref();
- QT_RETHROW;
- }
- }
-#if QT_VERSION < 0x60000
- qt_addObject(this);
-#endif
- if (Q_UNLIKELY(qtHookData[QHooks::AddQObject]))
- reinterpret_cast<QHooks::AddQObjectCallback>(qtHookData[QHooks::AddQObject])(this);
- Q_TRACE(QObject_ctor, this);
}
/*!
@@ -942,12 +921,13 @@ QObject::QObject(QObjectPrivate &dd, QObject *parent)
Q_D(QObject);
d_ptr->q_ptr = this;
- d->threadData = (parent && !parent->thread()) ? parent->d_func()->threadData : QThreadData::current();
- d->threadData->ref();
+ auto threadData = (parent && !parent->thread()) ? parent->d_func()->threadData.loadRelaxed() : QThreadData::current();
+ threadData->ref();
+ d->threadData.storeRelaxed(threadData);
if (parent) {
QT_TRY {
- if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
- parent = 0;
+ if (!check_parent_thread(parent, parent ? parent->d_func()->threadData.loadRelaxed() : nullptr, threadData))
+ parent = nullptr;
if (d->isWidget) {
if (parent) {
d->parent = parent;
@@ -958,7 +938,7 @@ QObject::QObject(QObjectPrivate &dd, QObject *parent)
setParent(parent);
}
} QT_CATCH(...) {
- d->threadData->deref();
+ threadData->deref();
QT_RETHROW;
}
}
@@ -1115,7 +1095,7 @@ QObject::~QObject()
Q_TRACE(QObject_dtor, this);
if (d->parent) // remove it from parent object
- d->setParent_helper(0);
+ d->setParent_helper(nullptr);
}
QObjectPrivate::Connection::~Connection()
@@ -1342,7 +1322,7 @@ bool QObject::event(QEvent *e)
case QEvent::ThreadChange: {
Q_D(QObject);
- QThreadData *threadData = d->threadData;
+ QThreadData *threadData = d->threadData.loadRelaxed();
QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher.loadRelaxed();
if (eventDispatcher) {
QList<QAbstractEventDispatcher::TimerInfo> timers = eventDispatcher->registeredTimers(this);
@@ -1509,7 +1489,7 @@ bool QObject::blockSignals(bool block) noexcept
*/
QThread *QObject::thread() const
{
- return d_func()->threadData->thread.loadAcquire();
+ return d_func()->threadData.loadRelaxed()->thread.loadAcquire();
}
/*!
@@ -1556,12 +1536,12 @@ void QObject::moveToThread(QThread *targetThread)
{
Q_D(QObject);
- if (d->threadData->thread.loadAcquire() == targetThread) {
+ if (d->threadData.loadRelaxed()->thread.loadAcquire() == targetThread) {
// object is already in this thread
return;
}
- if (d->parent != 0) {
+ if (d->parent != nullptr) {
qWarning("QObject::moveToThread: Cannot move objects with a parent");
return;
}
@@ -1572,13 +1552,14 @@ void QObject::moveToThread(QThread *targetThread)
QThreadData *currentData = QThreadData::current();
QThreadData *targetData = targetThread ? QThreadData::get2(targetThread) : nullptr;
- if (d->threadData->thread.loadAcquire() == 0 && currentData == targetData) {
+ QThreadData *thisThreadData = d->threadData.loadRelaxed();
+ if (!thisThreadData->thread.loadAcquire() && currentData == targetData) {
// one exception to the rule: we allow moving objects with no thread affinity to the current thread
currentData = d->threadData;
- } else if (d->threadData != currentData) {
+ } else if (thisThreadData != currentData) {
qWarning("QObject::moveToThread: Current thread (%p) is not the object's thread (%p).\n"
"Cannot move to target thread (%p)\n",
- currentData->thread.loadRelaxed(), d->threadData->thread.loadRelaxed(), targetData ? targetData->thread.loadRelaxed() : nullptr);
+ currentData->thread.loadRelaxed(), thisThreadData->thread.loadRelaxed(), targetData ? targetData->thread.loadRelaxed() : nullptr);
#ifdef Q_OS_MAC
qWarning("You might be loading two sets of Qt binaries into the same process. "
@@ -1637,7 +1618,7 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData
if (pe.receiver == q) {
// move this post event to the targetList
targetData->postEventList.addEvent(pe);
- const_cast<QPostEvent &>(pe).event = 0;
+ const_cast<QPostEvent &>(pe).event = nullptr;
++eventsMoved;
}
}
@@ -1675,8 +1656,10 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData
// set new thread data
targetData->ref();
- threadData->deref();
- threadData = targetData;
+ threadData.loadRelaxed()->deref();
+
+ // synchronizes with loadAcquire e.g. in QCoreApplication::postEvent
+ threadData.storeRelease(targetData);
for (int i = 0; i < children.size(); ++i) {
QObject *child = children.at(i);
@@ -1688,7 +1671,7 @@ void QObjectPrivate::_q_reregisterTimers(void *pointer)
{
Q_Q(QObject);
QList<QAbstractEventDispatcher::TimerInfo> *timerList = reinterpret_cast<QList<QAbstractEventDispatcher::TimerInfo> *>(pointer);
- QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher.loadRelaxed();
+ QAbstractEventDispatcher *eventDispatcher = threadData.loadRelaxed()->eventDispatcher.loadRelaxed();
for (int i = 0; i < timerList->size(); ++i) {
const QAbstractEventDispatcher::TimerInfo &ti = timerList->at(i);
eventDispatcher->registerTimer(ti.timerId, ti.interval, ti.timerType, q);
@@ -1746,7 +1729,9 @@ int QObject::startTimer(int interval, Qt::TimerType timerType)
qWarning("QObject::startTimer: Timers cannot have negative intervals");
return 0;
}
- if (Q_UNLIKELY(!d->threadData->hasEventDispatcher())) {
+
+ auto thisThreadData = d->threadData.loadRelaxed();
+ if (Q_UNLIKELY(!thisThreadData->hasEventDispatcher())) {
qWarning("QObject::startTimer: Timers can only be used with threads started with QThread");
return 0;
}
@@ -1754,7 +1739,7 @@ int QObject::startTimer(int interval, Qt::TimerType timerType)
qWarning("QObject::startTimer: Timers cannot be started from another thread");
return 0;
}
- int timerId = d->threadData->eventDispatcher.loadRelaxed()->registerTimer(interval, timerType, this);
+ int timerId = thisThreadData->eventDispatcher.loadRelaxed()->registerTimer(interval, timerType, this);
if (!d->extraData)
d->extraData = new QObjectPrivate::ExtraData;
d->extraData->runningTimers.append(timerId);
@@ -1828,8 +1813,9 @@ void QObject::killTimer(int id)
return;
}
- if (d->threadData->hasEventDispatcher())
- d->threadData->eventDispatcher.loadRelaxed()->unregisterTimer(id);
+ auto thisThreadData = d->threadData.loadRelaxed();
+ if (thisThreadData->hasEventDispatcher())
+ thisThreadData->eventDispatcher.loadRelaxed()->unregisterTimer(id);
d->extraData->runningTimers.remove(at);
QAbstractEventDispatcherPrivate::releaseTimerId(id);
@@ -2079,7 +2065,7 @@ void qt_qFindChildren_helper(const QObject *parent, const QRegularExpression &re
QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo, Qt::FindChildOptions options)
{
if (!parent)
- return 0;
+ return nullptr;
const QObjectList &children = parent->children();
QObject *obj;
int i;
@@ -2095,7 +2081,7 @@ QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const
return obj;
}
}
- return 0;
+ return nullptr;
}
/*!
@@ -2123,7 +2109,7 @@ void QObjectPrivate::deleteChildren()
delete currentChildBeingDeleted;
}
children.clear();
- currentChildBeingDeleted = 0;
+ currentChildBeingDeleted = nullptr;
isDeletingChildren = false;
}
@@ -2157,7 +2143,9 @@ void QObjectPrivate::setParent_helper(QObject *o)
// cleared our entry in parentD->children.
} else {
const int index = parentD->children.indexOf(q);
- if (parentD->isDeletingChildren) {
+ if (index < 0) {
+ // we're probably recursing into setParent() from a ChildRemoved event, don't do anything
+ } else if (parentD->isDeletingChildren) {
parentD->children[index] = 0;
} else {
parentD->children.removeAt(index);
@@ -2173,7 +2161,7 @@ void QObjectPrivate::setParent_helper(QObject *o)
// object hierarchies are constrained to a single thread
if (threadData != parent->d_func()->threadData) {
qWarning("QObject::setParent: Cannot set parent, new parent is in a different thread");
- parent = 0;
+ parent = nullptr;
return;
}
parent->d_func()->children.append(q);
@@ -2244,7 +2232,7 @@ void QObject::installEventFilter(QObject *obj)
d->extraData = new QObjectPrivate::ExtraData;
// clean up unused items in the list
- d->extraData->eventFilters.removeAll((QObject*)0);
+ d->extraData->eventFilters.removeAll((QObject*)nullptr);
d->extraData->eventFilters.removeAll(obj);
d->extraData->eventFilters.prepend(obj);
}
@@ -2268,7 +2256,7 @@ void QObject::removeEventFilter(QObject *obj)
if (d->extraData) {
for (int i = 0; i < d->extraData->eventFilters.count(); ++i) {
if (d->extraData->eventFilters.at(i) == obj)
- d->extraData->eventFilters[i] = 0;
+ d->extraData->eventFilters[i] = nullptr;
}
}
}
@@ -2391,7 +2379,7 @@ void QObject::deleteLater()
const char *qFlagLocation(const char *method)
{
QThreadData *currentThreadData = QThreadData::current(false);
- if (currentThreadData != 0)
+ if (currentThreadData != nullptr)
currentThreadData->flaggedSignatures.store(method);
return method;
}
@@ -2410,7 +2398,7 @@ static const char * extract_location(const char *member)
if (*location != '\0')
return location;
}
- return 0;
+ return nullptr;
}
static bool check_signal_macro(const QObject *sender, const char *signal,
@@ -2449,7 +2437,7 @@ static void err_method_notfound(const QObject *object,
case QSIGNAL_CODE: type = "signal"; break;
}
const char *loc = extract_location(method);
- if (strchr(method,')') == 0) // common typing mistake
+ if (strchr(method,')') == nullptr) // common typing mistake
qWarning("QObject::%s: Parentheses expected, %s %s::%s%s%s",
func, type, object->metaObject()->className(), method+1,
loc ? " in ": "", loc ? loc : "");
@@ -2509,7 +2497,7 @@ QObject *QObject::sender() const
return cd->currentSender->sender;
}
- return 0;
+ return nullptr;
}
/*!
@@ -2688,7 +2676,7 @@ void QMetaObjectPrivate::memberIndexes(const QObject *obj,
return;
const QMetaObject *m = obj->metaObject();
// Check that member is member of obj class
- while (m != 0 && m != member.mobj)
+ while (m != nullptr && m != member.mobj)
m = m->d.superdata;
if (!m)
return;
@@ -2805,12 +2793,12 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign
(signal && *signal) ? signal+1 : "(nullptr)",
receiver ? receiver->metaObject()->className() : "(nullptr)",
(method && *method) ? method+1 : "(nullptr)");
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
QByteArray tmp_signal_name;
if (!check_signal_macro(sender, signal, "connect", "bind"))
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
const QMetaObject *smeta = sender->metaObject();
const char *signal_arg = signal;
++signal; //skip code
@@ -2833,7 +2821,7 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign
if (signal_index < 0) {
err_method_notfound(sender, signal_arg, "connect");
err_info_about_objects("connect", sender, receiver);
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
signal_index = QMetaObjectPrivate::originalClone(smeta, signal_index);
signal_index += QMetaObjectPrivate::signalOffset(smeta);
@@ -2842,7 +2830,7 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign
int membcode = extract_code(method);
if (!check_method_code(membcode, receiver, method, "connect"))
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
const char *method_arg = method;
++method; // skip code
@@ -2885,7 +2873,7 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign
if (method_index_relative < 0) {
err_method_notfound(receiver, method_arg, "connect");
err_info_about_objects("connect", sender, receiver);
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
if (!QMetaObjectPrivate::checkConnectArgs(signalTypes.size(), signalTypes.constData(),
@@ -2894,13 +2882,13 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign
"\n %s::%s --> %s::%s",
sender->metaObject()->className(), signal,
receiver->metaObject()->className(), method);
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
- int *types = 0;
+ int *types = nullptr;
if ((type == Qt::QueuedConnection)
&& !(types = queuedConnectionTypes(signalTypes.constData(), signalTypes.size()))) {
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
#ifndef QT_NO_DEBUG
@@ -2946,7 +2934,7 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho
signal.methodSignature().constData(),
receiver ? receiver->metaObject()->className() : "(nullptr)",
method.methodSignature().constData() );
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
int signal_index;
@@ -2962,12 +2950,12 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho
if (signal_index == -1) {
qWarning("QObject::connect: Can't find signal %s on instance of class %s",
signal.methodSignature().constData(), smeta->className());
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
if (method_index == -1) {
qWarning("QObject::connect: Can't find method %s on instance of class %s",
method.methodSignature().constData(), rmeta->className());
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
if (!QMetaObject::checkConnectArgs(signal.methodSignature().constData(), method.methodSignature().constData())) {
@@ -2975,19 +2963,19 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho
"\n %s::%s --> %s::%s",
smeta->className(), signal.methodSignature().constData(),
rmeta->className(), method.methodSignature().constData());
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
- int *types = 0;
+ int *types = nullptr;
if ((type == Qt::QueuedConnection)
&& !(types = queuedConnectionTypes(signal.parameterTypes())))
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
#ifndef QT_NO_DEBUG
check_and_warn_compat(smeta, signal, rmeta, method);
#endif
QMetaObject::Connection handle = QMetaObject::Connection(QMetaObjectPrivate::connect(
- sender, signal_index, signal.enclosingMetaObject(), receiver, method_index, 0, type, types));
+ sender, signal_index, signal.enclosingMetaObject(), receiver, method_index, nullptr, type, types));
return handle;
}
@@ -3142,7 +3130,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
}
if (!method) {
- res |= QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, -1, 0);
+ res |= QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, -1, nullptr);
} else {
const QMetaObject *rmeta = receiver->metaObject();
do {
@@ -3153,7 +3141,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
rmeta = rmeta->superClass();
if (method_index < 0)
break;
- res |= QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, method_index, 0);
+ res |= QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, method_index, nullptr);
method_found = true;
} while ((rmeta = rmeta->superClass()));
}
@@ -3254,7 +3242,7 @@ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,
return false;
}
- if (!QMetaObjectPrivate::disconnect(sender, signal_index, signal.mobj, receiver, method_index, 0))
+ if (!QMetaObjectPrivate::disconnect(sender, signal_index, signal.mobj, receiver, method_index, nullptr))
return false;
if (!signal.isValid()) {
@@ -3393,7 +3381,7 @@ QMetaObject::Connection QMetaObject::connect(const QObject *sender, int signal_i
signal_index = methodIndexToSignalIndex(&smeta, signal_index);
return Connection(QMetaObjectPrivate::connect(sender, signal_index, smeta,
receiver, method_index,
- 0, //FIXME, we could speed this connection up by computing the relative index
+ nullptr, //FIXME, we could speed this connection up by computing the relative index
type, types));
}
@@ -3469,7 +3457,7 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index,
const QMetaObject *smeta = sender->metaObject();
signal_index = methodIndexToSignalIndex(&smeta, signal_index);
return QMetaObjectPrivate::disconnect(sender, signal_index, smeta,
- receiver, method_index, 0);
+ receiver, method_index, nullptr);
}
/*!
@@ -3485,7 +3473,7 @@ bool QMetaObject::disconnectOne(const QObject *sender, int signal_index,
const QMetaObject *smeta = sender->metaObject();
signal_index = methodIndexToSignalIndex(&smeta, signal_index);
return QMetaObjectPrivate::disconnect(sender, signal_index, smeta,
- receiver, method_index, 0,
+ receiver, method_index, nullptr,
QMetaObjectPrivate::DisconnectOne);
}
@@ -3694,7 +3682,7 @@ static void queued_activate(QObject *sender, int signal, QObjectPrivate::Connect
argumentTypes = queuedConnectionTypes(m.parameterTypes());
if (!argumentTypes) // cannot queue arguments
argumentTypes = &DIRECT_CONNECTION_ONLY;
- if (!c->argumentTypes.testAndSetOrdered(0, argumentTypes)) {
+ if (!c->argumentTypes.testAndSetOrdered(nullptr, argumentTypes)) {
if (argumentTypes != &DIRECT_CONNECTION_ONLY)
delete [] argumentTypes;
argumentTypes = c->argumentTypes.loadRelaxed();
@@ -3794,7 +3782,7 @@ void doActivate(QObject *sender, int signal_index, void **argv)
list = &signalVector->at(-1);
Qt::HANDLE currentThreadId = QThread::currentThreadId();
- bool inSenderThread = currentThreadId == QObjectPrivate::get(sender)->threadData->threadId.loadRelaxed();
+ bool inSenderThread = currentThreadId == QObjectPrivate::get(sender)->threadData.loadRelaxed()->threadId.loadRelaxed();
// We need to check against the highest connection id to ensure that signals added
// during the signal emission are not emitted in this emission.
@@ -4305,10 +4293,10 @@ QObjectUserData* QObject::userData(uint id) const
{
Q_D(const QObject);
if (!d->extraData)
- return 0;
+ return nullptr;
if ((int)id < d->extraData->userData.size())
return d->extraData->userData.at(id);
- return 0;
+ return nullptr;
}
#endif // QT_NO_USERDATA
@@ -4964,7 +4952,7 @@ QMetaObject::Connection QObject::connectImpl(const QObject *sender, void **signa
if (!senderMetaObject) {
qWarning("QObject::connect: signal not found in %s", sender->metaObject()->className());
slotObj->destroyIfLastRef();
- return QMetaObject::Connection(0);
+ return QMetaObject::Connection(nullptr);
}
signal_index += QMetaObjectPrivate::signalOffset(senderMetaObject);
return QObjectPrivate::connectImpl(sender, signal_index, receiver, slot, slotObj, type, types, senderMetaObject);
@@ -5190,7 +5178,7 @@ QMetaObject::Connection QObjectPrivate::connect(const QObject *sender, int signa
const QMetaObject *senderMetaObject = sender->metaObject();
signal_index = methodIndexToSignalIndex(&senderMetaObject, signal_index);
- return QObjectPrivate::connectImpl(sender, signal_index, sender, /*slot*/0, slotObj, type, /*types*/0, senderMetaObject);
+ return QObjectPrivate::connectImpl(sender, signal_index, sender, /*slot*/nullptr, slotObj, type, /*types*/nullptr, senderMetaObject);
}
/*!
@@ -5247,7 +5235,7 @@ QMetaObject::Connection& QMetaObject::Connection::operator=(const QMetaObject::C
Creates a Connection instance.
*/
-QMetaObject::Connection::Connection() : d_ptr(0) {}
+QMetaObject::Connection::Connection() : d_ptr(nullptr) {}
/*!
Destructor for QMetaObject::Connection.
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index feafcaf323..838a9aa8c5 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -374,7 +374,12 @@ public:
}
public:
ExtraData *extraData; // extra data set by the user
- QThreadData *threadData; // id of the thread that owns the object
+ // This atomic requires acquire/release semantics in a few places,
+ // e.g. QObject::moveToThread must synchronize with QCoreApplication::postEvent,
+ // because postEvent is thread-safe.
+ // However, most of the code paths involving QObject are only reentrant and
+ // not thread-safe, so synchronization should not be necessary there.
+ QAtomicPointer<QThreadData> threadData; // id of the thread that owns the object
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>;
QAtomicPointer<ConnectionData> connections;
diff --git a/src/corelib/kernel/qobjectcleanuphandler.cpp b/src/corelib/kernel/qobjectcleanuphandler.cpp
index b6c62af4b3..8bf0e1fcab 100644
--- a/src/corelib/kernel/qobjectcleanuphandler.cpp
+++ b/src/corelib/kernel/qobjectcleanuphandler.cpp
@@ -94,7 +94,7 @@ QObjectCleanupHandler::~QObjectCleanupHandler()
QObject *QObjectCleanupHandler::add(QObject* object)
{
if (!object)
- return 0;
+ return nullptr;
connect(object, SIGNAL(destroyed(QObject*)), this, SLOT(objectDestroyed(QObject*)));
cleanupObjects.insert(0, object);
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index 39f3002394..2d65e0bbe4 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -441,7 +441,7 @@ bool QSharedMemory::attach(AccessMode mode)
bool QSharedMemory::isAttached() const
{
Q_D(const QSharedMemory);
- return (0 != d->memory);
+ return (nullptr != d->memory);
}
/*!
diff --git a/src/corelib/kernel/qsharedmemory_systemv.cpp b/src/corelib/kernel/qsharedmemory_systemv.cpp
index fea4a65b5c..0ba5f65641 100644
--- a/src/corelib/kernel/qsharedmemory_systemv.cpp
+++ b/src/corelib/kernel/qsharedmemory_systemv.cpp
@@ -182,9 +182,9 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)
}
// grab the memory
- memory = shmat(id, 0, (mode == QSharedMemory::ReadOnly ? SHM_RDONLY : 0));
+ memory = shmat(id, nullptr, (mode == QSharedMemory::ReadOnly ? SHM_RDONLY : 0));
if ((void*) - 1 == memory) {
- memory = 0;
+ memory = nullptr;
setErrorString(QLatin1String("QSharedMemory::attach (shmat)"));
return false;
}
@@ -216,7 +216,7 @@ bool QSharedMemoryPrivate::detach()
}
return false;
}
- memory = 0;
+ memory = nullptr;
size = 0;
// Get the number of current attachments
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index f6d7e78441..bc0f3b03ca 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -68,7 +68,7 @@ QSharedMemoryPrivate::QSharedMemoryPrivate() :
#ifndef QT_NO_QOBJECT
QObjectPrivate(),
#endif
- memory(0), size(0), error(QSharedMemory::NoError),
+ memory(nullptr), size(0), error(QSharedMemory::NoError),
#ifndef QT_NO_SYSTEMSEMAPHORE
systemSemaphore(QString()), lockedByMe(false),
#endif
diff --git a/src/corelib/kernel/qsignalmapper.cpp b/src/corelib/kernel/qsignalmapper.cpp
index 24b174972f..dc0dfe8f40 100644
--- a/src/corelib/kernel/qsignalmapper.cpp
+++ b/src/corelib/kernel/qsignalmapper.cpp
@@ -53,11 +53,36 @@ public:
Q_Q(QSignalMapper);
q->removeMappings(q->sender());
}
+
+ template <class Signal, class Container>
+ void emitMappedValue(QObject *sender, Signal signal, const Container &mappedValues)
+ {
+ Q_Q(QSignalMapper);
+
+ auto it = mappedValues.find(sender);
+ if (it != mappedValues.end()) {
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+ Q_EMIT q->mapped(*it);
+QT_WARNING_POP
+#endif
+ Q_EMIT (q->*signal)(*it);
+ }
+ }
+
+ void emitMappedValues(QObject *sender)
+ {
+ emitMappedValue(sender, &QSignalMapper::mappedInt, intHash);
+ emitMappedValue(sender, &QSignalMapper::mappedString, stringHash);
+ emitMappedValue(sender, &QSignalMapper::mappedWidget, widgetHash);
+ emitMappedValue(sender, &QSignalMapper::mappedObject, objectHash);
+ }
+
QHash<QObject *, int> intHash;
QHash<QObject *, QString> stringHash;
QHash<QObject *, QWidget*> widgetHash;
QHash<QObject *, QObject*> objectHash;
-
};
/*!
@@ -74,11 +99,12 @@ public:
use lambdas for passing custom parameters to slots. This is less
costly and will simplify the code.
- The class supports the mapping of particular strings or integers
- with particular objects using setMapping(). The objects' signals
- can then be connected to the map() slot which will emit the
- mapped() signal with the string or integer associated with the
- original signalling object. Mappings can be removed later using
+ The class supports the mapping of particular strings, integers,
+ objects and widgets with particular objects using setMapping().
+ The objects' signals can then be connected to the map() slot which
+ will emit a signal (it could be mappedInt(), mappedString(),
+ mappedWidget() and mappedObject()) with a value associated with
+ the original signalling object. Mappings can be removed later using
removeMappings().
Example: Suppose we want to create a custom widget that contains
@@ -106,8 +132,8 @@ public:
created. We connect each button's \c clicked() signal to the
signal mapper's map() slot, and create a mapping in the signal
mapper from each button to the button's text. Finally we connect
- the signal mapper's mapped() signal to the custom widget's \c
- clicked() signal. When the user clicks a button, the custom
+ the signal mapper's mappedString() signal to the custom widget's
+ \c clicked() signal. When the user clicks a button, the custom
widget will emit a single \c clicked() signal whose argument is
the text of the button the user clicked.
@@ -137,7 +163,7 @@ QSignalMapper::~QSignalMapper()
/*!
Adds a mapping so that when map() is signalled from the given \a
- sender, the signal mapped(\a id) is emitted.
+ sender, the signal mappedInt(\a id) is emitted.
There may be at most one integer ID for each sender.
@@ -152,7 +178,7 @@ void QSignalMapper::setMapping(QObject *sender, int id)
/*!
Adds a mapping so that when map() is signalled from the \a sender,
- the signal mapped(\a text ) is emitted.
+ the signal mappedString(\a text ) is emitted.
There may be at most one text for each sender.
*/
@@ -165,7 +191,7 @@ void QSignalMapper::setMapping(QObject *sender, const QString &text)
/*!
Adds a mapping so that when map() is signalled from the \a sender,
- the signal mapped(\a widget ) is emitted.
+ the signal mappedWidget(\a widget ) is emitted.
There may be at most one widget for each sender.
*/
@@ -178,7 +204,7 @@ void QSignalMapper::setMapping(QObject *sender, QWidget *widget)
/*!
Adds a mapping so that when map() is signalled from the \a sender,
- the signal mapped(\a object ) is emitted.
+ the signal mappedObject(\a object ) is emitted.
There may be at most one object for each sender.
*/
@@ -259,20 +285,14 @@ void QSignalMapper::map() { map(sender()); }
*/
void QSignalMapper::map(QObject *sender)
{
- Q_D(QSignalMapper);
- if (d->intHash.contains(sender))
- emit mapped(d->intHash.value(sender));
- if (d->stringHash.contains(sender))
- emit mapped(d->stringHash.value(sender));
- if (d->widgetHash.contains(sender))
- emit mapped(d->widgetHash.value(sender));
- if (d->objectHash.contains(sender))
- emit mapped(d->objectHash.value(sender));
+ d_func()->emitMappedValues(sender);
}
-
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\fn void QSignalMapper::mapped(int i)
+ \obsolete
+ \overload
This signal is emitted when map() is signalled from an object that
has an integer mapping set. The object's mapped integer is passed
@@ -283,6 +303,8 @@ void QSignalMapper::map(QObject *sender)
/*!
\fn void QSignalMapper::mapped(const QString &text)
+ \obsolete
+ \overload
This signal is emitted when map() is signalled from an object that
has a string mapping set. The object's mapped string is passed in
@@ -293,6 +315,8 @@ void QSignalMapper::map(QObject *sender)
/*!
\fn void QSignalMapper::mapped(QWidget *widget)
+ \obsolete
+ \overload
This signal is emitted when map() is signalled from an object that
has a widget mapping set. The object's mapped widget is passed in
@@ -303,6 +327,53 @@ void QSignalMapper::map(QObject *sender)
/*!
\fn void QSignalMapper::mapped(QObject *object)
+ \obsolete
+ \overload
+
+ This signal is emitted when map() is signalled from an object that
+ has an object mapping set. The object provided by the map is passed in
+ \a object.
+
+ \sa setMapping()
+*/
+#endif
+
+/*!
+ \fn void QSignalMapper::mappedInt(int i)
+ \since 5.15
+
+ This signal is emitted when map() is signalled from an object that
+ has an integer mapping set. The object's mapped integer is passed
+ in \a i.
+
+ \sa setMapping()
+*/
+
+/*!
+ \fn void QSignalMapper::mappedString(const QString &text)
+ \since 5.15
+
+ This signal is emitted when map() is signalled from an object that
+ has a string mapping set. The object's mapped string is passed in
+ \a text.
+
+ \sa setMapping()
+*/
+
+/*!
+ \fn void QSignalMapper::mappedWidget(QWidget *widget)
+ \since 5.15
+
+ This signal is emitted when map() is signalled from an object that
+ has a widget mapping set. The object's mapped widget is passed in
+ \a widget.
+
+ \sa setMapping()
+*/
+
+/*!
+ \fn void QSignalMapper::mappedObject(QObject *object)
+ \since 5.15
This signal is emitted when map() is signalled from an object that
has an object mapping set. The object provided by the map is passed in
diff --git a/src/corelib/kernel/qsignalmapper.h b/src/corelib/kernel/qsignalmapper.h
index 0da1e8f87d..592986e6a5 100644
--- a/src/corelib/kernel/qsignalmapper.h
+++ b/src/corelib/kernel/qsignalmapper.h
@@ -66,10 +66,20 @@ public:
QObject *mapping(QObject *object) const;
Q_SIGNALS:
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X_5_15("Use QSignalMapper::mappedInt(int) instead")
void mapped(int);
+ QT_DEPRECATED_VERSION_X_5_15("Use QSignalMapper::mappedString(const QString&) instead")
void mapped(const QString &);
+ QT_DEPRECATED_VERSION_X_5_15("Use QSignalMapper::mappedWidget(QWidget *) instead")
void mapped(QWidget *);
+ QT_DEPRECATED_VERSION_X_5_15("Use QSignalMapper::mappedObject(QObject *) instead")
void mapped(QObject *);
+#endif
+ void mappedInt(int);
+ void mappedString(const QString &);
+ void mappedWidget(QWidget *);
+ void mappedObject(QObject *);
public Q_SLOTS:
void map();
diff --git a/src/corelib/kernel/qsocketnotifier.cpp b/src/corelib/kernel/qsocketnotifier.cpp
index 2a246b1204..78269ee605 100644
--- a/src/corelib/kernel/qsocketnotifier.cpp
+++ b/src/corelib/kernel/qsocketnotifier.cpp
@@ -147,12 +147,14 @@ QSocketNotifier::QSocketNotifier(qintptr socket, Type type, QObject *parent)
d->sntype = type;
d->snenabled = true;
+ auto thisThreadData = d->threadData.loadRelaxed();
+
if (socket < 0)
qWarning("QSocketNotifier: Invalid socket specified");
- else if (!d->threadData->hasEventDispatcher())
+ else if (!thisThreadData->hasEventDispatcher())
qWarning("QSocketNotifier: Can only be used with threads started with QThread");
else
- d->threadData->eventDispatcher.loadRelaxed()->registerSocketNotifier(this);
+ thisThreadData->eventDispatcher.loadRelaxed()->registerSocketNotifier(this);
}
/*!
@@ -234,16 +236,19 @@ void QSocketNotifier::setEnabled(bool enable)
return;
d->snenabled = enable;
- if (!d->threadData->hasEventDispatcher()) // perhaps application/thread is shutting down
+
+ auto thisThreadData = d->threadData.loadRelaxed();
+
+ if (!thisThreadData->hasEventDispatcher()) // perhaps application/thread is shutting down
return;
if (Q_UNLIKELY(thread() != QThread::currentThread())) {
qWarning("QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread");
return;
}
if (d->snenabled)
- d->threadData->eventDispatcher.loadRelaxed()->registerSocketNotifier(this);
+ thisThreadData->eventDispatcher.loadRelaxed()->registerSocketNotifier(this);
else
- d->threadData->eventDispatcher.loadRelaxed()->unregisterSocketNotifier(this);
+ thisThreadData->eventDispatcher.loadRelaxed()->unregisterSocketNotifier(this);
}
diff --git a/src/corelib/kernel/qtestsupport_core.cpp b/src/corelib/kernel/qtestsupport_core.cpp
index 7bd81ed498..8498f7f025 100644
--- a/src/corelib/kernel/qtestsupport_core.cpp
+++ b/src/corelib/kernel/qtestsupport_core.cpp
@@ -55,7 +55,7 @@ Q_CORE_EXPORT void QTestPrivate::qSleep(int ms)
Sleep(uint(ms));
#else
struct timespec ts = { time_t(ms / 1000), (ms % 1000) * 1000 * 1000 };
- nanosleep(&ts, NULL);
+ nanosleep(&ts, nullptr);
#endif
}
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 4d8778ecf5..25ce0c032f 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -277,7 +277,7 @@ protected:
};
QSingleShotTimer::QSingleShotTimer(int msec, Qt::TimerType timerType, const QObject *r, const char *member)
- : QObject(QAbstractEventDispatcher::instance()), hasValidReceiver(true), slotObj(0)
+ : QObject(QAbstractEventDispatcher::instance()), hasValidReceiver(true), slotObj(nullptr)
{
timerId = startTimer(msec, timerType);
connect(this, SIGNAL(timeout()), r, member);
@@ -290,7 +290,7 @@ QSingleShotTimer::QSingleShotTimer(int msec, Qt::TimerType timerType, const QObj
if (r && thread() != r->thread()) {
// Avoid leaking the QSingleShotTimer instance in case the application exits before the timer fires
connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, &QObject::deleteLater);
- setParent(0);
+ setParent(nullptr);
moveToThread(r->thread());
}
}
@@ -316,7 +316,7 @@ void QSingleShotTimer::timerEvent(QTimerEvent *)
if (Q_LIKELY(!receiver.isNull() || !hasValidReceiver)) {
// We allocate only the return type - we previously checked the function had
// no arguments.
- void *args[1] = { 0 };
+ void *args[1] = { nullptr };
slotObj->call(const_cast<QObject*>(receiver.data()), args);
}
} else {
diff --git a/src/corelib/kernel/qtimerinfo_unix.cpp b/src/corelib/kernel/qtimerinfo_unix.cpp
index 39010c19cb..b425ca3dcb 100644
--- a/src/corelib/kernel/qtimerinfo_unix.cpp
+++ b/src/corelib/kernel/qtimerinfo_unix.cpp
@@ -83,7 +83,7 @@ QTimerInfoList::QTimerInfoList()
}
#endif
- firstTimerInfo = 0;
+ firstTimerInfo = nullptr;
}
timespec QTimerInfoList::updateCurrentTime()
@@ -389,7 +389,7 @@ bool QTimerInfoList::timerWait(timespec &tm)
repairTimersIfNeeded();
// Find first waiting timer not already active
- QTimerInfo *t = 0;
+ QTimerInfo *t = nullptr;
for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
if (!(*it)->activateRef) {
t = *it;
@@ -450,7 +450,7 @@ void QTimerInfoList::registerTimer(int timerId, int interval, Qt::TimerType time
t->interval = interval;
t->timerType = timerType;
t->obj = object;
- t->activateRef = 0;
+ t->activateRef = nullptr;
timespec expected = updateCurrentTime() + interval;
@@ -514,9 +514,9 @@ bool QTimerInfoList::unregisterTimer(int timerId)
// found it
removeAt(i);
if (t == firstTimerInfo)
- firstTimerInfo = 0;
+ firstTimerInfo = nullptr;
if (t->activateRef)
- *(t->activateRef) = 0;
+ *(t->activateRef) = nullptr;
delete t;
return true;
}
@@ -535,9 +535,9 @@ bool QTimerInfoList::unregisterTimers(QObject *object)
// object found
removeAt(i);
if (t == firstTimerInfo)
- firstTimerInfo = 0;
+ firstTimerInfo = nullptr;
if (t->activateRef)
- *(t->activateRef) = 0;
+ *(t->activateRef) = nullptr;
delete t;
// move back one so that we don't skip the new current item
--i;
@@ -571,7 +571,7 @@ int QTimerInfoList::activateTimers()
return 0; // nothing to do
int n_act = 0, maxCount = 0;
- firstTimerInfo = 0;
+ firstTimerInfo = nullptr;
timespec currentTime = updateCurrentTime();
// qDebug() << "Thread" << QThread::currentThreadId() << "woken up at" << currentTime;
@@ -643,11 +643,11 @@ int QTimerInfoList::activateTimers()
QCoreApplication::sendEvent(currentTimerInfo->obj, &e);
if (currentTimerInfo)
- currentTimerInfo->activateRef = 0;
+ currentTimerInfo->activateRef = nullptr;
}
}
- firstTimerInfo = 0;
+ firstTimerInfo = nullptr;
// qDebug() << "Thread" << QThread::currentThreadId() << "activated" << n_act << "timers";
return n_act;
}
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index ddb96ecad6..2205366696 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -283,14 +283,14 @@ class QTranslatorPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QTranslator)
public:
- enum { Contexts = 0x2f, Hashes = 0x42, Messages = 0x69, NumerusRules = 0x88, Dependencies = 0x96 };
+ enum { Contexts = 0x2f, Hashes = 0x42, Messages = 0x69, NumerusRules = 0x88, Dependencies = 0x96, Language = 0xa7 };
QTranslatorPrivate() :
#if defined(QT_USE_MMAP)
used_mmap(0),
#endif
- unmapPointer(0), unmapLength(0), resource(0),
- messageArray(0), offsetArray(0), contextArray(0), numerusRulesArray(0),
+ unmapPointer(nullptr), unmapLength(0), resource(nullptr),
+ messageArray(nullptr), offsetArray(nullptr), contextArray(nullptr), numerusRulesArray(nullptr),
messageLength(0), offsetLength(0), contextLength(0), numerusRulesLength(0) {}
#if defined(QT_USE_MMAP)
@@ -316,6 +316,9 @@ public:
uint contextLength;
uint numerusRulesLength;
+ QString language;
+ QString filePath;
+
bool do_load(const QString &filename, const QString &directory);
bool do_load(const uchar *data, qsizetype len, const QString &directory);
QString do_translate(const char *context, const char *sourceText, const char *comment,
@@ -539,7 +542,7 @@ bool QTranslatorPrivate::do_load(const QString &realname, const QString &directo
ok = true;
} else {
delete resource;
- resource = 0;
+ resource = nullptr;
}
}
@@ -597,8 +600,10 @@ bool QTranslatorPrivate::do_load(const QString &realname, const QString &directo
}
}
- if (ok && d->do_load(reinterpret_cast<const uchar *>(d->unmapPointer), d->unmapLength, directory))
+ if (ok && d->do_load(reinterpret_cast<const uchar *>(d->unmapPointer), d->unmapLength, directory)) {
+ d->filePath = realname;
return true;
+ }
#if defined(QT_USE_MMAP)
if (used_mmap) {
@@ -610,8 +615,8 @@ bool QTranslatorPrivate::do_load(const QString &realname, const QString &directo
delete [] unmapPointer;
delete d->resource;
- d->resource = 0;
- d->unmapPointer = 0;
+ d->resource = nullptr;
+ d->unmapPointer = nullptr;
d->unmapLength = 0;
return false;
@@ -829,7 +834,9 @@ bool QTranslatorPrivate::do_load(const uchar *data, qsizetype len, const QString
break;
}
- if (tag == QTranslatorPrivate::Contexts) {
+ if (tag == QTranslatorPrivate::Language) {
+ language = QString::fromUtf8((const char*)data, blockLen);
+ } else if (tag == QTranslatorPrivate::Contexts) {
contextArray = data;
contextLength = blockLen;
} else if (tag == QTranslatorPrivate::Hashes) {
@@ -874,10 +881,10 @@ bool QTranslatorPrivate::do_load(const uchar *data, qsizetype len, const QString
}
if (!ok) {
- messageArray = 0;
- contextArray = 0;
- offsetArray = 0;
- numerusRulesArray = 0;
+ messageArray = nullptr;
+ contextArray = nullptr;
+ offsetArray = nullptr;
+ numerusRulesArray = nullptr;
messageLength = 0;
contextLength = 0;
offsetLength = 0;
@@ -890,7 +897,7 @@ bool QTranslatorPrivate::do_load(const uchar *data, qsizetype len, const QString
static QString getMessage(const uchar *m, const uchar *end, const char *context,
const char *sourceText, const char *comment, uint numerus)
{
- const uchar *tn = 0;
+ const uchar *tn = nullptr;
uint tn_length = 0;
const uint sourceTextLen = uint(strlen(sourceText));
const uint contextLen = uint(strlen(context));
@@ -957,11 +964,11 @@ end:
QString QTranslatorPrivate::do_translate(const char *context, const char *sourceText,
const char *comment, int n) const
{
- if (context == 0)
+ if (context == nullptr)
context = "";
- if (sourceText == 0)
+ if (sourceText == nullptr)
sourceText = "";
- if (comment == 0)
+ if (comment == nullptr)
comment = "";
uint numerus = 0;
@@ -1076,13 +1083,13 @@ void QTranslatorPrivate::clear()
}
delete resource;
- resource = 0;
- unmapPointer = 0;
+ resource = nullptr;
+ unmapPointer = nullptr;
unmapLength = 0;
- messageArray = 0;
- contextArray = 0;
- offsetArray = 0;
- numerusRulesArray = 0;
+ messageArray = nullptr;
+ contextArray = nullptr;
+ offsetArray = nullptr;
+ numerusRulesArray = nullptr;
messageLength = 0;
contextLength = 0;
offsetLength = 0;
@@ -1091,6 +1098,9 @@ void QTranslatorPrivate::clear()
qDeleteAll(subTranslators);
subTranslators.clear();
+ language.clear();
+ filePath.clear();
+
if (QCoreApplicationPrivate::isTranslatorInstalled(q))
QCoreApplication::postEvent(QCoreApplication::instance(),
new QEvent(QEvent::LanguageChange));
@@ -1132,6 +1142,32 @@ bool QTranslator::isEmpty() const
&& d->subTranslators.isEmpty();
}
+/*!
+ \since 5.15
+
+ Returns the target language as stored in the translation file.
+ */
+QString QTranslator::language() const
+{
+ Q_D(const QTranslator);
+ return d->language;
+}
+
+/*!
+ \since 5.15
+
+ Returns the path of the loaded translation file.
+
+ The file path is empty if no translation was loaded yet,
+ the loading failed, or if the translation was not loaded
+ from a file.
+ */
+QString QTranslator::filePath() const
+{
+ Q_D(const QTranslator);
+ return d->filePath;
+}
+
QT_END_NAMESPACE
#include "moc_qtranslator.cpp"
diff --git a/src/corelib/kernel/qtranslator.h b/src/corelib/kernel/qtranslator.h
index e7c39191e7..61a39c4089 100644
--- a/src/corelib/kernel/qtranslator.h
+++ b/src/corelib/kernel/qtranslator.h
@@ -63,6 +63,9 @@ public:
virtual bool isEmpty() const;
+ QString language() const;
+ QString filePath() const;
+
bool load(const QString & filename,
const QString & directory = QString(),
const QString & search_delimiters = QString(),
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index a1e1c71d12..3be9a02248 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2018 Intel Corporation.
** Copyright (C) 2015 Olivier Goffart <ogoffart@woboq.com>
** Contact: https://www.qt.io/licensing/
@@ -168,7 +168,7 @@ static qlonglong qMetaTypeNumber(const QVariant::Private *d)
return qlonglong(d->data.l);
case QMetaType::Float:
return qRound64(d->data.f);
- case QVariant::Double:
+ case QMetaType::Double:
return qRound64(d->data.d);
#ifndef QT_BOOTSTRAPPED
case QMetaType::QJsonValue:
@@ -184,9 +184,9 @@ static qlonglong qMetaTypeNumber(const QVariant::Private *d)
static qulonglong qMetaTypeUNumber(const QVariant::Private *d)
{
switch (d->type) {
- case QVariant::UInt:
+ case QMetaType::UInt:
return d->data.u;
- case QVariant::ULongLong:
+ case QMetaType::ULongLong:
return d->data.ull;
case QMetaType::UChar:
return d->data.uc;
@@ -204,13 +204,13 @@ static qlonglong qConvertToNumber(const QVariant::Private *d, bool *ok)
*ok = true;
switch (uint(d->type)) {
- case QVariant::String:
+ case QMetaType::QString:
return v_cast<QString>(d)->toLongLong(ok);
- case QVariant::Char:
+ case QMetaType::QChar:
return v_cast<QChar>(d)->unicode();
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
return v_cast<QByteArray>(d)->toLongLong(ok);
- case QVariant::Bool:
+ case QMetaType::Bool:
return qlonglong(d->data.b);
#ifndef QT_BOOTSTRAPPED
case QMetaType::QCborValue:
@@ -222,8 +222,8 @@ static qlonglong qConvertToNumber(const QVariant::Private *d, bool *ok)
break;
Q_FALLTHROUGH();
#endif
- case QVariant::Double:
- case QVariant::Int:
+ case QMetaType::Double:
+ case QMetaType::Int:
case QMetaType::Char:
case QMetaType::SChar:
case QMetaType::Short:
@@ -231,8 +231,8 @@ static qlonglong qConvertToNumber(const QVariant::Private *d, bool *ok)
case QMetaType::Float:
case QMetaType::LongLong:
return qMetaTypeNumber(d);
- case QVariant::ULongLong:
- case QVariant::UInt:
+ case QMetaType::ULongLong:
+ case QMetaType::UInt:
case QMetaType::UChar:
case QMetaType::UShort:
case QMetaType::ULong:
@@ -262,12 +262,12 @@ static qreal qConvertToRealNumber(const QVariant::Private *d, bool *ok)
{
*ok = true;
switch (uint(d->type)) {
- case QVariant::Double:
+ case QMetaType::Double:
return qreal(d->data.d);
case QMetaType::Float:
return qreal(d->data.f);
- case QVariant::ULongLong:
- case QVariant::UInt:
+ case QMetaType::ULongLong:
+ case QMetaType::UInt:
case QMetaType::UChar:
case QMetaType::UShort:
case QMetaType::ULong:
@@ -289,13 +289,13 @@ static qulonglong qConvertToUnsignedNumber(const QVariant::Private *d, bool *ok)
*ok = true;
switch (uint(d->type)) {
- case QVariant::String:
+ case QMetaType::QString:
return v_cast<QString>(d)->toULongLong(ok);
- case QVariant::Char:
+ case QMetaType::QChar:
return v_cast<QChar>(d)->unicode();
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
return v_cast<QByteArray>(d)->toULongLong(ok);
- case QVariant::Bool:
+ case QMetaType::Bool:
return qulonglong(d->data.b);
#ifndef QT_BOOTSTRAPPED
case QMetaType::QCborValue:
@@ -309,8 +309,8 @@ static qulonglong qConvertToUnsignedNumber(const QVariant::Private *d, bool *ok)
break;
Q_FALLTHROUGH();
#endif
- case QVariant::Double:
- case QVariant::Int:
+ case QMetaType::Double:
+ case QMetaType::Int:
case QMetaType::Char:
case QMetaType::SChar:
case QMetaType::Short:
@@ -318,8 +318,8 @@ static qulonglong qConvertToUnsignedNumber(const QVariant::Private *d, bool *ok)
case QMetaType::Float:
case QMetaType::LongLong:
return qulonglong(qMetaTypeNumber(d));
- case QVariant::ULongLong:
- case QVariant::UInt:
+ case QMetaType::ULongLong:
+ case QMetaType::UInt:
case QMetaType::UChar:
case QMetaType::UShort:
case QMetaType::ULong:
@@ -406,9 +406,9 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
switch (uint(t)) {
#ifndef QT_BOOTSTRAPPED
- case QVariant::Url:
+ case QMetaType::QUrl:
switch (d->type) {
- case QVariant::String:
+ case QMetaType::QString:
*static_cast<QUrl *>(result) = QUrl(*v_cast<QString>(d));
break;
case QMetaType::QCborValue:
@@ -423,18 +423,18 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
#endif // QT_BOOTSTRAPPED
#if QT_CONFIG(itemmodel)
- case QVariant::ModelIndex:
+ case QMetaType::QModelIndex:
switch (d->type) {
- case QVariant::PersistentModelIndex:
+ case QMetaType::QPersistentModelIndex:
*static_cast<QModelIndex *>(result) = QModelIndex(*v_cast<QPersistentModelIndex>(d));
break;
default:
return false;
}
break;
- case QVariant::PersistentModelIndex:
+ case QMetaType::QPersistentModelIndex:
switch (d->type) {
- case QVariant::ModelIndex:
+ case QMetaType::QModelIndex:
*static_cast<QPersistentModelIndex *>(result) = QPersistentModelIndex(*v_cast<QModelIndex>(d));
break;
default:
@@ -442,10 +442,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
}
break;
#endif // QT_CONFIG(itemmodel)
- case QVariant::String: {
+ case QMetaType::QString: {
QString *str = static_cast<QString *>(result);
switch (d->type) {
- case QVariant::Char:
+ case QMetaType::QChar:
*str = *v_cast<QChar>(d);
break;
case QMetaType::Char:
@@ -455,12 +455,12 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
case QMetaType::Short:
case QMetaType::Long:
- case QVariant::Int:
- case QVariant::LongLong:
+ case QMetaType::Int:
+ case QMetaType::LongLong:
*str = QString::number(qMetaTypeNumber(d));
break;
- case QVariant::UInt:
- case QVariant::ULongLong:
+ case QMetaType::UInt:
+ case QMetaType::ULongLong:
case QMetaType::UShort:
case QMetaType::ULong:
*str = QString::number(qMetaTypeUNumber(d));
@@ -468,32 +468,32 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QMetaType::Float:
*str = QString::number(d->data.f, 'g', QLocale::FloatingPointShortest);
break;
- case QVariant::Double:
+ case QMetaType::Double:
*str = QString::number(d->data.d, 'g', QLocale::FloatingPointShortest);
break;
#if QT_CONFIG(datestring)
- case QVariant::Date:
+ case QMetaType::QDate:
*str = v_cast<QDate>(d)->toString(Qt::ISODate);
break;
- case QVariant::Time:
+ case QMetaType::QTime:
*str = v_cast<QTime>(d)->toString(Qt::ISODateWithMs);
break;
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
*str = v_cast<QDateTime>(d)->toString(Qt::ISODateWithMs);
break;
#endif
- case QVariant::Bool:
+ case QMetaType::Bool:
*str = d->data.b ? QStringLiteral("true") : QStringLiteral("false");
break;
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
*str = QString::fromUtf8(v_cast<QByteArray>(d)->constData());
break;
- case QVariant::StringList:
+ case QMetaType::QStringList:
if (v_cast<QStringList>(d)->count() == 1)
*str = v_cast<QStringList>(d)->at(0);
break;
#ifndef QT_BOOTSTRAPPED
- case QVariant::Url:
+ case QMetaType::QUrl:
*str = v_cast<QUrl>(d)->toString();
break;
case QMetaType::QJsonValue:
@@ -508,7 +508,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*str = v_cast<QCborValue>(d)->toVariant().toString();
break;
#endif
- case QVariant::Uuid:
+ case QMetaType::QUuid:
*str = v_cast<QUuid>(d)->toString();
break;
case QMetaType::Nullptr:
@@ -528,11 +528,11 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
}
break;
}
- case QVariant::Char: {
+ case QMetaType::QChar: {
QChar *c = static_cast<QChar *>(result);
switch (d->type) {
- case QVariant::Int:
- case QVariant::LongLong:
+ case QMetaType::Int:
+ case QMetaType::LongLong:
case QMetaType::Char:
case QMetaType::SChar:
case QMetaType::Short:
@@ -540,8 +540,8 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QMetaType::Float:
*c = QChar(ushort(qMetaTypeNumber(d)));
break;
- case QVariant::UInt:
- case QVariant::ULongLong:
+ case QMetaType::UInt:
+ case QMetaType::ULongLong:
case QMetaType::UChar:
case QMetaType::UShort:
case QMetaType::ULong:
@@ -553,10 +553,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
}
#ifndef QT_NO_GEOM_VARIANT
- case QVariant::Size: {
+ case QMetaType::QSize: {
QSize *s = static_cast<QSize *>(result);
switch (d->type) {
- case QVariant::SizeF:
+ case QMetaType::QSizeF:
*s = v_cast<QSizeF>(d)->toSize();
break;
default:
@@ -565,10 +565,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
}
- case QVariant::SizeF: {
+ case QMetaType::QSizeF: {
QSizeF *s = static_cast<QSizeF *>(result);
switch (d->type) {
- case QVariant::Size:
+ case QMetaType::QSize:
*s = QSizeF(*(v_cast<QSize>(d)));
break;
default:
@@ -577,10 +577,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
}
- case QVariant::Line: {
+ case QMetaType::QLine: {
QLine *s = static_cast<QLine *>(result);
switch (d->type) {
- case QVariant::LineF:
+ case QMetaType::QLineF:
*s = v_cast<QLineF>(d)->toLine();
break;
default:
@@ -589,10 +589,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
}
- case QVariant::LineF: {
+ case QMetaType::QLineF: {
QLineF *s = static_cast<QLineF *>(result);
switch (d->type) {
- case QVariant::Line:
+ case QMetaType::QLine:
*s = QLineF(*(v_cast<QLine>(d)));
break;
default:
@@ -601,27 +601,27 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
}
#endif
- case QVariant::StringList:
- if (d->type == QVariant::List) {
+ case QMetaType::QStringList:
+ if (d->type == QMetaType::QVariantList) {
QStringList *slst = static_cast<QStringList *>(result);
const QVariantList *list = v_cast<QVariantList >(d);
const int size = list->size();
slst->reserve(size);
for (int i = 0; i < size; ++i)
slst->append(list->at(i).toString());
- } else if (d->type == QVariant::String) {
+ } else if (d->type == QMetaType::QString) {
QStringList *slst = static_cast<QStringList *>(result);
*slst = QStringList(*v_cast<QString>(d));
} else {
return false;
}
break;
- case QVariant::Date: {
+ case QMetaType::QDate: {
QDate *dt = static_cast<QDate *>(result);
- if (d->type == QVariant::DateTime)
+ if (d->type == QMetaType::QDateTime)
*dt = v_cast<QDateTime>(d)->date();
#if QT_CONFIG(datestring)
- else if (d->type == QVariant::String)
+ else if (d->type == QMetaType::QString)
*dt = QDate::fromString(*v_cast<QString>(d), Qt::ISODate);
#endif
else
@@ -629,14 +629,14 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
return dt->isValid();
}
- case QVariant::Time: {
+ case QMetaType::QTime: {
QTime *t = static_cast<QTime *>(result);
switch (d->type) {
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
*t = v_cast<QDateTime>(d)->time();
break;
#if QT_CONFIG(datestring)
- case QVariant::String:
+ case QMetaType::QString:
*t = QTime::fromString(*v_cast<QString>(d), Qt::ISODate);
break;
#endif
@@ -645,11 +645,11 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
}
return t->isValid();
}
- case QVariant::DateTime: {
+ case QMetaType::QDateTime: {
QDateTime *dt = static_cast<QDateTime *>(result);
switch (d->type) {
#if QT_CONFIG(datestring)
- case QVariant::String:
+ case QMetaType::QString:
*dt = QDateTime::fromString(*v_cast<QString>(d), Qt::ISODate);
break;
# ifndef QT_BOOTSTRAPPED
@@ -661,21 +661,21 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
# endif
#endif
- case QVariant::Date:
- *dt = QDateTime(*v_cast<QDate>(d));
+ case QMetaType::QDate:
+ *dt = v_cast<QDate>(d)->startOfDay();
break;
default:
return false;
}
return dt->isValid();
}
- case QVariant::ByteArray: {
+ case QMetaType::QByteArray: {
QByteArray *ba = static_cast<QByteArray *>(result);
switch (d->type) {
- case QVariant::String:
+ case QMetaType::QString:
*ba = v_cast<QString>(d)->toUtf8();
break;
- case QVariant::Double:
+ case QMetaType::Double:
*ba = QByteArray::number(d->data.d, 'g', QLocale::FloatingPointShortest);
break;
case QMetaType::Float:
@@ -686,22 +686,22 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QMetaType::UChar:
*ba = QByteArray(1, d->data.c);
break;
- case QVariant::Int:
- case QVariant::LongLong:
+ case QMetaType::Int:
+ case QMetaType::LongLong:
case QMetaType::Short:
case QMetaType::Long:
*ba = QByteArray::number(qMetaTypeNumber(d));
break;
- case QVariant::UInt:
- case QVariant::ULongLong:
+ case QMetaType::UInt:
+ case QMetaType::ULongLong:
case QMetaType::UShort:
case QMetaType::ULong:
*ba = QByteArray::number(qMetaTypeUNumber(d));
break;
- case QVariant::Bool:
+ case QMetaType::Bool:
*ba = QByteArray(d->data.b ? "true" : "false");
break;
- case QVariant::Uuid:
+ case QMetaType::QUuid:
*ba = v_cast<QUuid>(d)->toByteArray();
break;
case QMetaType::Nullptr:
@@ -741,16 +741,16 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QMetaType::ULong:
*static_cast<ulong *>(result) = ulong(qConvertToUnsignedNumber(d, ok));
return *ok;
- case QVariant::Int:
+ case QMetaType::Int:
*static_cast<int *>(result) = int(qConvertToNumber(d, ok));
return *ok;
- case QVariant::UInt:
+ case QMetaType::UInt:
*static_cast<uint *>(result) = uint(qConvertToUnsignedNumber(d, ok));
return *ok;
- case QVariant::LongLong:
+ case QMetaType::LongLong:
*static_cast<qlonglong *>(result) = qConvertToNumber(d, ok);
return *ok;
- case QVariant::ULongLong: {
+ case QMetaType::ULongLong: {
*static_cast<qulonglong *>(result) = qConvertToUnsignedNumber(d, ok);
return *ok;
}
@@ -763,21 +763,21 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*static_cast<uchar *>(result) = qConvertToUnsignedNumber(d, ok);
return *ok;
}
- case QVariant::Bool: {
+ case QMetaType::Bool: {
bool *b = static_cast<bool *>(result);
switch(d->type) {
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
*b = qt_convertToBool<QByteArray, const char*>(d);
break;
- case QVariant::String:
+ case QMetaType::QString:
*b = qt_convertToBool<QString, QLatin1String>(d);
break;
- case QVariant::Char:
+ case QMetaType::QChar:
*b = !v_cast<QChar>(d)->isNull();
break;
- case QVariant::Double:
- case QVariant::Int:
- case QVariant::LongLong:
+ case QMetaType::Double:
+ case QMetaType::Int:
+ case QMetaType::LongLong:
case QMetaType::Char:
case QMetaType::SChar:
case QMetaType::Short:
@@ -785,8 +785,8 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QMetaType::Float:
*b = qMetaTypeNumber(d) != Q_INT64_C(0);
break;
- case QVariant::UInt:
- case QVariant::ULongLong:
+ case QMetaType::UInt:
+ case QMetaType::ULongLong:
case QMetaType::UChar:
case QMetaType::UShort:
case QMetaType::ULong:
@@ -810,31 +810,31 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
}
break;
}
- case QVariant::Double: {
+ case QMetaType::Double: {
double *f = static_cast<double *>(result);
switch (d->type) {
- case QVariant::String:
+ case QMetaType::QString:
*f = v_cast<QString>(d)->toDouble(ok);
break;
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
*f = v_cast<QByteArray>(d)->toDouble(ok);
break;
- case QVariant::Bool:
+ case QMetaType::Bool:
*f = double(d->data.b);
break;
case QMetaType::Float:
*f = double(d->data.f);
break;
- case QVariant::LongLong:
- case QVariant::Int:
+ case QMetaType::LongLong:
+ case QMetaType::Int:
case QMetaType::Char:
case QMetaType::SChar:
case QMetaType::Short:
case QMetaType::Long:
*f = double(qMetaTypeNumber(d));
break;
- case QVariant::UInt:
- case QVariant::ULongLong:
+ case QMetaType::UInt:
+ case QMetaType::ULongLong:
case QMetaType::UChar:
case QMetaType::UShort:
case QMetaType::ULong:
@@ -861,28 +861,28 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QMetaType::Float: {
float *f = static_cast<float *>(result);
switch (d->type) {
- case QVariant::String:
+ case QMetaType::QString:
*f = v_cast<QString>(d)->toFloat(ok);
break;
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
*f = v_cast<QByteArray>(d)->toFloat(ok);
break;
- case QVariant::Bool:
+ case QMetaType::Bool:
*f = float(d->data.b);
break;
- case QVariant::Double:
+ case QMetaType::Double:
*f = float(d->data.d);
break;
- case QVariant::LongLong:
- case QVariant::Int:
+ case QMetaType::LongLong:
+ case QMetaType::Int:
case QMetaType::Char:
case QMetaType::SChar:
case QMetaType::Short:
case QMetaType::Long:
*f = float(qMetaTypeNumber(d));
break;
- case QVariant::UInt:
- case QVariant::ULongLong:
+ case QMetaType::UInt:
+ case QMetaType::ULongLong:
case QMetaType::UChar:
case QMetaType::UShort:
case QMetaType::ULong:
@@ -906,8 +906,8 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
}
break;
}
- case QVariant::List:
- if (d->type == QVariant::StringList) {
+ case QMetaType::QVariantList:
+ if (d->type == QMetaType::QStringList) {
QVariantList *lst = static_cast<QVariantList *>(result);
const QStringList *slist = v_cast<QStringList>(d);
const int size = slist->size();
@@ -935,16 +935,16 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
return false;
}
break;
- case QVariant::Map:
+ case QMetaType::QVariantMap:
if (qstrcmp(QMetaType::typeName(d->type), "QMap<QString, QVariant>") == 0) {
*static_cast<QVariantMap *>(result) =
*static_cast<QMap<QString, QVariant> *>(d->data.shared->ptr);
- } else if (d->type == QVariant::Hash) {
+ } else if (d->type == QMetaType::QVariantHash) {
QVariantMap *map = static_cast<QVariantMap *>(result);
const QVariantHash *hash = v_cast<QVariantHash>(d);
const auto end = hash->end();
for (auto it = hash->begin(); it != end; ++it)
- map->insertMulti(it.key(), it.value());
+ static_cast<QMultiMap<QString, QVariant> *>(map)->insert(it.key(), it.value());
#ifndef QT_BOOTSTRAPPED
} else if (d->type == QMetaType::QCborValue) {
if (!v_cast<QCborValue>(d)->isMap())
@@ -963,16 +963,16 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
return false;
}
break;
- case QVariant::Hash:
+ case QMetaType::QVariantHash:
if (qstrcmp(QMetaType::typeName(d->type), "QHash<QString, QVariant>") == 0) {
*static_cast<QVariantHash *>(result) =
*static_cast<QHash<QString, QVariant> *>(d->data.shared->ptr);
- } else if (d->type == QVariant::Map) {
+ } else if (d->type == QMetaType::QVariantMap) {
QVariantHash *hash = static_cast<QVariantHash *>(result);
const QVariantMap *map = v_cast<QVariantMap>(d);
const auto end = map->end();
for (auto it = map->begin(); it != end; ++it)
- hash->insertMulti(it.key(), it.value());
+ static_cast<QMultiHash<QString, QVariant> *>(hash)->insert(it.key(), it.value());
#ifndef QT_BOOTSTRAPPED
} else if (d->type == QMetaType::QCborValue) {
if (!v_cast<QCborValue>(d)->isMap())
@@ -992,26 +992,26 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
}
break;
#ifndef QT_NO_GEOM_VARIANT
- case QVariant::Rect:
- if (d->type == QVariant::RectF)
+ case QMetaType::QRect:
+ if (d->type == QMetaType::QRectF)
*static_cast<QRect *>(result) = (v_cast<QRectF>(d))->toRect();
else
return false;
break;
- case QVariant::RectF:
- if (d->type == QVariant::Rect)
+ case QMetaType::QRectF:
+ if (d->type == QMetaType::QRect)
*static_cast<QRectF *>(result) = *v_cast<QRect>(d);
else
return false;
break;
- case QVariant::PointF:
- if (d->type == QVariant::Point)
+ case QMetaType::QPointF:
+ if (d->type == QMetaType::QPoint)
*static_cast<QPointF *>(result) = *v_cast<QPoint>(d);
else
return false;
break;
- case QVariant::Point:
- if (d->type == QVariant::PointF)
+ case QMetaType::QPoint:
+ if (d->type == QMetaType::QPointF)
*static_cast<QPoint *>(result) = (v_cast<QPointF>(d))->toPoint();
else
return false;
@@ -1022,12 +1022,12 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
return *ok;
}
#endif
- case QVariant::Uuid:
+ case QMetaType::QUuid:
switch (d->type) {
- case QVariant::String:
+ case QMetaType::QString:
*static_cast<QUuid *>(result) = QUuid(*v_cast<QString>(d));
break;
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
*static_cast<QUuid *>(result) = QUuid(*v_cast<QByteArray>(d));
break;
#ifndef QT_BOOTSTRAPPED
@@ -1067,7 +1067,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QMetaType::Nullptr:
*static_cast<QJsonValue *>(result) = QJsonValue(QJsonValue::Null);
break;
- case QVariant::Bool:
+ case QMetaType::Bool:
*static_cast<QJsonValue *>(result) = QJsonValue(d->data.b);
break;
case QMetaType::Int:
@@ -1086,19 +1086,19 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*static_cast<QJsonValue *>(result) = QJsonValue(qConvertToRealNumber(d, ok));
Q_ASSERT(ok);
break;
- case QVariant::String:
+ case QMetaType::QString:
*static_cast<QJsonValue *>(result) = QJsonValue(*v_cast<QString>(d));
break;
- case QVariant::StringList:
+ case QMetaType::QStringList:
*static_cast<QJsonValue *>(result) = QJsonValue(QJsonArray::fromStringList(*v_cast<QStringList>(d)));
break;
- case QVariant::List:
+ case QMetaType::QVariantList:
*static_cast<QJsonValue *>(result) = QJsonValue(QJsonArray::fromVariantList(*v_cast<QVariantList>(d)));
break;
- case QVariant::Map:
+ case QMetaType::QVariantMap:
*static_cast<QJsonValue *>(result) = QJsonValue(QJsonObject::fromVariantMap(*v_cast<QVariantMap>(d)));
break;
- case QVariant::Hash:
+ case QMetaType::QVariantHash:
*static_cast<QJsonValue *>(result) = QJsonValue(QJsonObject::fromVariantHash(*v_cast<QVariantHash>(d)));
break;
case QMetaType::QJsonObject:
@@ -1128,10 +1128,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
case QMetaType::QJsonArray:
switch (d->type) {
- case QVariant::StringList:
+ case QMetaType::QStringList:
*static_cast<QJsonArray *>(result) = QJsonArray::fromStringList(*v_cast<QStringList>(d));
break;
- case QVariant::List:
+ case QMetaType::QVariantList:
*static_cast<QJsonArray *>(result) = QJsonArray::fromVariantList(*v_cast<QVariantList>(d));
break;
case QMetaType::QJsonValue:
@@ -1158,10 +1158,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
case QMetaType::QJsonObject:
switch (d->type) {
- case QVariant::Map:
+ case QMetaType::QVariantMap:
*static_cast<QJsonObject *>(result) = QJsonObject::fromVariantMap(*v_cast<QVariantMap>(d));
break;
- case QVariant::Hash:
+ case QMetaType::QVariantHash:
*static_cast<QJsonObject *>(result) = QJsonObject::fromVariantHash(*v_cast<QVariantHash>(d));
break;
case QMetaType::QJsonValue:
@@ -1197,7 +1197,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
case QMetaType::Nullptr:
*static_cast<QCborValue *>(result) = QCborValue(QCborValue::Null);
break;
- case QVariant::Bool:
+ case QMetaType::Bool:
*static_cast<QCborValue *>(result) = QCborValue(d->data.b);
break;
case QMetaType::Int:
@@ -1219,39 +1219,39 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*static_cast<QCborValue *>(result) = QCborValue(qConvertToRealNumber(d, ok));
Q_ASSERT(ok);
break;
- case QVariant::String:
+ case QMetaType::QString:
*static_cast<QCborValue *>(result) = *v_cast<QString>(d);
break;
- case QVariant::StringList:
+ case QMetaType::QStringList:
*static_cast<QCborValue *>(result) = QCborArray::fromStringList(*v_cast<QStringList>(d));
break;
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
*static_cast<QCborValue *>(result) = *v_cast<QByteArray>(d);
break;
- case QVariant::Date:
- *static_cast<QCborValue *>(result) = QCborValue(QDateTime(*v_cast<QDate>(d)));
+ case QMetaType::QDate:
+ *static_cast<QCborValue *>(result) = QCborValue(v_cast<QDate>(d)->startOfDay());
break;
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
*static_cast<QCborValue *>(result) = QCborValue(*v_cast<QDateTime>(d));
break;
- case QVariant::Url:
+ case QMetaType::QUrl:
*static_cast<QCborValue *>(result) = QCborValue(*v_cast<QUrl>(d));
break;
#if QT_CONFIG(regularexpression)
- case QVariant::RegularExpression:
+ case QMetaType::QRegularExpression:
*static_cast<QCborValue *>(result) = QCborValue(*v_cast<QRegularExpression>(d));
break;
#endif
- case QVariant::Uuid:
+ case QMetaType::QUuid:
*static_cast<QCborValue *>(result) = QCborValue(*v_cast<QUuid>(d));
break;
- case QVariant::List:
+ case QMetaType::QVariantList:
*static_cast<QCborValue *>(result) = QCborArray::fromVariantList(*v_cast<QVariantList>(d));
break;
- case QVariant::Map:
+ case QMetaType::QVariantMap:
*static_cast<QCborValue *>(result) = QCborMap::fromVariantMap(*v_cast<QVariantMap>(d));
break;
- case QVariant::Hash:
+ case QMetaType::QVariantHash:
*static_cast<QCborValue *>(result) = QCborMap::fromVariantHash(*v_cast<QVariantHash>(d));
break;
case QMetaType::QJsonValue:
@@ -1287,10 +1287,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
case QMetaType::QCborArray:
switch (d->type) {
- case QVariant::StringList:
+ case QMetaType::QStringList:
*static_cast<QCborArray *>(result) = QCborArray::fromStringList(*v_cast<QStringList>(d));
break;
- case QVariant::List:
+ case QMetaType::QVariantList:
*static_cast<QCborArray *>(result) = QCborArray::fromVariantList(*v_cast<QVariantList>(d));
break;
case QMetaType::QCborValue:
@@ -1317,10 +1317,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
case QMetaType::QCborMap:
switch (d->type) {
- case QVariant::Map:
+ case QMetaType::QVariantMap:
*static_cast<QCborMap *>(result) = QCborMap::fromVariantMap(*v_cast<QVariantMap>(d));
break;
- case QVariant::Hash:
+ case QMetaType::QVariantHash:
*static_cast<QCborMap *>(result) = QCborMap::fromVariantHash(*v_cast<QVariantHash>(d));
break;
case QMetaType::QCborValue:
@@ -1349,10 +1349,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
default:
#ifndef QT_NO_QOBJECT
- if (d->type == QVariant::String || d->type == QVariant::ByteArray) {
+ if (d->type == QMetaType::QString || d->type == QMetaType::QByteArray) {
QMetaEnum en = metaEnumFromType(t);
if (en.isValid()) {
- QByteArray keys = (d->type == QVariant::String) ? v_cast<QString>(d)->toUtf8() : *v_cast<QByteArray>(d);
+ QByteArray keys = (d->type == QMetaType::QString) ? v_cast<QString>(d)->toUtf8() : *v_cast<QByteArray>(d);
int value = en.keysToValue(keys.constData(), ok);
if (*ok) {
switch (QMetaType::sizeOf(t)) {
@@ -1457,7 +1457,7 @@ static void customConstruct(QVariant::Private *d, const void *copy)
const uint size = type.sizeOf();
if (!size) {
qWarning("Trying to construct an instance of an invalid type, type id: %i", d->type);
- d->type = QVariant::Invalid;
+ d->type = QMetaType::UnknownType;
return;
}
@@ -1544,7 +1544,7 @@ static void customStreamDebug(QDebug dbg, const QVariant &variant) {
#ifndef QT_BOOTSTRAPPED
QMetaType::TypeFlags flags = QMetaType::typeFlags(variant.userType());
if (flags & QMetaType::PointerToQObject)
- dbg.nospace() << variant.value<QObject*>();
+ dbg.nospace() << qvariant_cast<QObject*>(variant);
#else
Q_UNUSED(dbg);
Q_UNUSED(variant);
@@ -2254,10 +2254,10 @@ QVariant::QVariant(const QRegularExpression &re)
: d(RegularExpression)
{ v_construct<QRegularExpression>(&d, re); }
#endif // QT_CONFIG(regularexpression)
-#ifndef QT_BOOTSTRAPPED
QVariant::QVariant(const QUuid &uuid)
: d(Uuid)
{ v_construct<QUuid>(&d, uuid); }
+#ifndef QT_BOOTSTRAPPED
QVariant::QVariant(const QJsonValue &jsonValue)
: d(QMetaType::QJsonValue)
{ v_construct<QJsonValue>(&d, jsonValue); }
@@ -2438,43 +2438,43 @@ QVariant::Type QVariant::nameToType(const char *name)
enum { MapFromThreeCount = 36 };
static const ushort mapIdFromQt3ToCurrent[MapFromThreeCount] =
{
- QVariant::Invalid,
- QVariant::Map,
- QVariant::List,
- QVariant::String,
- QVariant::StringList,
- QVariant::Font,
- QVariant::Pixmap,
- QVariant::Brush,
- QVariant::Rect,
- QVariant::Size,
- QVariant::Color,
- QVariant::Palette,
+ QMetaType::UnknownType,
+ QMetaType::QVariantMap,
+ QMetaType::QVariantList,
+ QMetaType::QString,
+ QMetaType::QStringList,
+ QMetaType::QFont,
+ QMetaType::QPixmap,
+ QMetaType::QBrush,
+ QMetaType::QRect,
+ QMetaType::QSize,
+ QMetaType::QColor,
+ QMetaType::QPalette,
0, // ColorGroup
- QVariant::Icon,
- QVariant::Point,
- QVariant::Image,
- QVariant::Int,
- QVariant::UInt,
- QVariant::Bool,
- QVariant::Double,
+ QMetaType::QIcon,
+ QMetaType::QPoint,
+ QMetaType::QImage,
+ QMetaType::Int,
+ QMetaType::UInt,
+ QMetaType::Bool,
+ QMetaType::Double,
0, // Buggy ByteArray, QByteArray never had id == 20
- QVariant::Polygon,
- QVariant::Region,
- QVariant::Bitmap,
- QVariant::Cursor,
- QVariant::SizePolicy,
- QVariant::Date,
- QVariant::Time,
- QVariant::DateTime,
- QVariant::ByteArray,
- QVariant::BitArray,
- QVariant::KeySequence,
- QVariant::Pen,
- QVariant::LongLong,
- QVariant::ULongLong,
+ QMetaType::QPolygon,
+ QMetaType::QRegion,
+ QMetaType::QBitmap,
+ QMetaType::QCursor,
+ QMetaType::QSizePolicy,
+ QMetaType::QDate,
+ QMetaType::QTime,
+ QMetaType::QDateTime,
+ QMetaType::QByteArray,
+ QMetaType::QBitArray,
+ QMetaType::QKeySequence,
+ QMetaType::QPen,
+ QMetaType::LongLong,
+ QMetaType::ULongLong,
#if QT_CONFIG(easingcurve)
- QVariant::EasingCurve
+ QMetaType::QEasingCurve
#endif
};
@@ -2523,7 +2523,7 @@ void QVariant::load(QDataStream &s)
return;
}
}
- create(typeId, 0);
+ create(typeId, nullptr);
d.is_null = is_null;
if (!isValid()) {
@@ -2551,7 +2551,7 @@ void QVariant::load(QDataStream &s)
*/
void QVariant::save(QDataStream &s) const
{
- quint32 typeId = type();
+ quint32 typeId = d.type >= QMetaType::User ? QMetaType::User : userType();
bool fakeUserType = false;
if (s.version() < QDataStream::Qt_4_0) {
int i;
@@ -3011,7 +3011,6 @@ QPersistentModelIndex QVariant::toPersistentModelIndex() const
}
#endif // QT_CONFIG(itemmodel)
-#ifndef QT_BOOTSTRAPPED
/*!
\since 5.0
@@ -3026,6 +3025,7 @@ QUuid QVariant::toUuid() const
return qVariantToHelper<QUuid>(d, handlerManager);
}
+#ifndef QT_BOOTSTRAPPED
/*!
\since 5.0
@@ -3294,80 +3294,80 @@ QVariantList QVariant::toList() const
}
-static const quint32 qCanConvertMatrix[QVariant::LastCoreType + 1] =
+static const quint32 qCanConvertMatrix[QMetaType::LastCoreType + 1] =
{
/*Invalid*/ 0,
-/*Bool*/ 1 << QVariant::Double | 1 << QVariant::Int | 1 << QVariant::UInt
- | 1 << QVariant::LongLong | 1 << QVariant::ULongLong | 1 << QVariant::ByteArray
- | 1 << QVariant::String | 1 << QVariant::Char,
+/*Bool*/ 1 << QMetaType::Double | 1 << QMetaType::Int | 1 << QMetaType::UInt
+ | 1 << QMetaType::LongLong | 1 << QMetaType::ULongLong | 1 << QMetaType::QByteArray
+ | 1 << QMetaType::QString | 1 << QMetaType::QChar,
-/*Int*/ 1 << QVariant::UInt | 1 << QVariant::String | 1 << QVariant::Double
- | 1 << QVariant::Bool | 1 << QVariant::LongLong | 1 << QVariant::ULongLong
- | 1 << QVariant::Char | 1 << QVariant::ByteArray | 1 << QVariant::Int,
+/*Int*/ 1 << QMetaType::UInt | 1 << QMetaType::QString | 1 << QMetaType::Double
+ | 1 << QMetaType::Bool | 1 << QMetaType::LongLong | 1 << QMetaType::ULongLong
+ | 1 << QMetaType::QChar | 1 << QMetaType::QByteArray | 1 << QMetaType::Int,
-/*UInt*/ 1 << QVariant::Int | 1 << QVariant::String | 1 << QVariant::Double
- | 1 << QVariant::Bool | 1 << QVariant::LongLong | 1 << QVariant::ULongLong
- | 1 << QVariant::Char | 1 << QVariant::ByteArray,
+/*UInt*/ 1 << QMetaType::Int | 1 << QMetaType::QString | 1 << QMetaType::Double
+ | 1 << QMetaType::Bool | 1 << QMetaType::LongLong | 1 << QMetaType::ULongLong
+ | 1 << QMetaType::QChar | 1 << QMetaType::QByteArray,
-/*LLong*/ 1 << QVariant::Int | 1 << QVariant::String | 1 << QVariant::Double
- | 1 << QVariant::Bool | 1 << QVariant::UInt | 1 << QVariant::ULongLong
- | 1 << QVariant::Char | 1 << QVariant::ByteArray,
+/*LLong*/ 1 << QMetaType::Int | 1 << QMetaType::QString | 1 << QMetaType::Double
+ | 1 << QMetaType::Bool | 1 << QMetaType::UInt | 1 << QMetaType::ULongLong
+ | 1 << QMetaType::QChar | 1 << QMetaType::QByteArray,
-/*ULlong*/ 1 << QVariant::Int | 1 << QVariant::String | 1 << QVariant::Double
- | 1 << QVariant::Bool | 1 << QVariant::UInt | 1 << QVariant::LongLong
- | 1 << QVariant::Char | 1 << QVariant::ByteArray,
+/*ULlong*/ 1 << QMetaType::Int | 1 << QMetaType::QString | 1 << QMetaType::Double
+ | 1 << QMetaType::Bool | 1 << QMetaType::UInt | 1 << QMetaType::LongLong
+ | 1 << QMetaType::QChar | 1 << QMetaType::QByteArray,
-/*double*/ 1 << QVariant::Int | 1 << QVariant::String | 1 << QVariant::ULongLong
- | 1 << QVariant::Bool | 1 << QVariant::UInt | 1 << QVariant::LongLong
- | 1 << QVariant::ByteArray,
+/*double*/ 1 << QMetaType::Int | 1 << QMetaType::QString | 1 << QMetaType::ULongLong
+ | 1 << QMetaType::Bool | 1 << QMetaType::UInt | 1 << QMetaType::LongLong
+ | 1 << QMetaType::QByteArray,
-/*QChar*/ 1 << QVariant::Int | 1 << QVariant::UInt | 1 << QVariant::LongLong
- | 1 << QVariant::ULongLong,
+/*QChar*/ 1 << QMetaType::Int | 1 << QMetaType::UInt | 1 << QMetaType::LongLong
+ | 1 << QMetaType::ULongLong,
/*QMap*/ 0,
-/*QList*/ 1 << QVariant::StringList,
+/*QList*/ 1 << QMetaType::QStringList,
-/*QString*/ 1 << QVariant::StringList | 1 << QVariant::ByteArray | 1 << QVariant::Int
- | 1 << QVariant::UInt | 1 << QVariant::Bool | 1 << QVariant::Double
- | 1 << QVariant::Date | 1 << QVariant::Time | 1 << QVariant::DateTime
- | 1 << QVariant::LongLong | 1 << QVariant::ULongLong | 1 << QVariant::Char
- | 1 << QVariant::Url | 1 << QVariant::Uuid,
+/*QString*/ 1 << QMetaType::QStringList | 1 << QMetaType::QByteArray | 1 << QMetaType::Int
+ | 1 << QMetaType::UInt | 1 << QMetaType::Bool | 1 << QMetaType::Double
+ | 1 << QMetaType::QDate | 1 << QMetaType::QTime | 1 << QMetaType::QDateTime
+ | 1 << QMetaType::LongLong | 1 << QMetaType::ULongLong | 1 << QMetaType::QChar
+ | 1 << QMetaType::QUrl | 1 << QMetaType::QUuid,
-/*QStringList*/ 1 << QVariant::List | 1 << QVariant::String,
+/*QStringList*/ 1 << QMetaType::QVariantList | 1 << QMetaType::QString,
-/*QByteArray*/ 1 << QVariant::String | 1 << QVariant::Int | 1 << QVariant::UInt | 1 << QVariant::Bool
- | 1 << QVariant::Double | 1 << QVariant::LongLong | 1 << QVariant::ULongLong
- | 1 << QVariant::Uuid,
+/*QByteArray*/ 1 << QMetaType::QString | 1 << QMetaType::Int | 1 << QMetaType::UInt | 1 << QMetaType::Bool
+ | 1 << QMetaType::Double | 1 << QMetaType::LongLong | 1 << QMetaType::ULongLong
+ | 1 << QMetaType::QUuid,
/*QBitArray*/ 0,
-/*QDate*/ 1 << QVariant::String | 1 << QVariant::DateTime,
+/*QDate*/ 1 << QMetaType::QString | 1 << QMetaType::QDateTime,
-/*QTime*/ 1 << QVariant::String | 1 << QVariant::DateTime,
+/*QTime*/ 1 << QMetaType::QString | 1 << QMetaType::QDateTime,
-/*QDateTime*/ 1 << QVariant::String | 1 << QVariant::Date,
+/*QDateTime*/ 1 << QMetaType::QString | 1 << QMetaType::QDate,
-/*QUrl*/ 1 << QVariant::String,
+/*QUrl*/ 1 << QMetaType::QString,
/*QLocale*/ 0,
-/*QRect*/ 1 << QVariant::RectF,
+/*QRect*/ 1 << QMetaType::QRectF,
-/*QRectF*/ 1 << QVariant::Rect,
+/*QRectF*/ 1 << QMetaType::QRect,
-/*QSize*/ 1 << QVariant::SizeF,
+/*QSize*/ 1 << QMetaType::QSizeF,
-/*QSizeF*/ 1 << QVariant::Size,
+/*QSizeF*/ 1 << QMetaType::QSize,
-/*QLine*/ 1 << QVariant::LineF,
+/*QLine*/ 1 << QMetaType::QLineF,
-/*QLineF*/ 1 << QVariant::Line,
+/*QLineF*/ 1 << QMetaType::QLine,
-/*QPoint*/ 1 << QVariant::PointF,
+/*QPoint*/ 1 << QMetaType::QPointF,
-/*QPointF*/ 1 << QVariant::Point,
+/*QPointF*/ 1 << QMetaType::QPoint,
/*QRegExp*/ 0,
@@ -3375,7 +3375,7 @@ static const quint32 qCanConvertMatrix[QVariant::LastCoreType + 1] =
/*QEasingCurve*/ 0,
-/*QUuid*/ 1 << QVariant::String | 1 << QVariant::ByteArray,
+/*QUuid*/ 1 << QMetaType::QString | 1 << QMetaType::QByteArray,
};
static const size_t qCanConvertMatrixMaximumTargetType = 8 * sizeof(*qCanConvertMatrix);
@@ -3829,6 +3829,7 @@ bool QVariant::convert(const int type, void *ptr) const
/*!
\fn bool QVariant::operator<(const QVariant &v) const
+ \obsolete
Compares this QVariant with \a v and returns \c true if this is less than \a v.
@@ -3838,10 +3839,15 @@ bool QVariant::convert(const int type, void *ptr) const
\warning To make this function work with a custom type registered with
qRegisterMetaType(), its comparison operator must be registered using
QMetaType::registerComparators().
+
+ This operator is deprecated as it cannot establish a total order required
+ for most use of this operator, which is the reason you cannot use QVariant
+ as the key of a QMap.
*/
/*!
\fn bool QVariant::operator<=(const QVariant &v) const
+ \obsolete
Compares this QVariant with \a v and returns \c true if this is less or equal than \a v.
@@ -3851,10 +3857,13 @@ bool QVariant::convert(const int type, void *ptr) const
\warning To make this function work with a custom type registered with
qRegisterMetaType(), its comparison operator must be registered using
QMetaType::registerComparators().
+
+ This operator is deprecated as it cannot establish a total order.
*/
/*!
\fn bool QVariant::operator>(const QVariant &v) const
+ \obsolete
Compares this QVariant with \a v and returns \c true if this is larger than \a v.
@@ -3864,10 +3873,13 @@ bool QVariant::convert(const int type, void *ptr) const
\warning To make this function work with a custom type registered with
qRegisterMetaType(), its comparison operator must be registered using
QMetaType::registerComparators().
+
+ This operator is deprecated as it cannot establish a total order.
*/
/*!
\fn bool QVariant::operator>=(const QVariant &v) const
+ \obsolete
Compares this QVariant with \a v and returns \c true if this is larger or equal than \a v.
@@ -3877,6 +3889,8 @@ bool QVariant::convert(const int type, void *ptr) const
\warning To make this function work with a custom type registered with
qRegisterMetaType(), its comparison operator must be registered using
QMetaType::registerComparators().
+
+ This operator is deprecated as it cannot establish a total order.
*/
static bool qIsNumericType(uint tp)
@@ -3901,7 +3915,7 @@ static bool qIsNumericType(uint tp)
static bool qIsFloatingPoint(uint tp)
{
- return tp == QVariant::Double || tp == QMetaType::Float;
+ return tp == QMetaType::Double || tp == QMetaType::Float;
}
static int normalizeLowerRanks(uint tp)
@@ -3913,13 +3927,13 @@ static int normalizeLowerRanks(uint tp)
Q_UINT64_C(1) << QMetaType::UChar |
Q_UINT64_C(1) << QMetaType::Short |
Q_UINT64_C(1) << QMetaType::UShort;
- return numericTypeBits & (Q_UINT64_C(1) << tp) ? QVariant::Int : tp;
+ return numericTypeBits & (Q_UINT64_C(1) << tp) ? uint(QMetaType::Int) : tp;
}
static int normalizeLong(uint tp)
{
- const uint IntType = sizeof(long) == sizeof(int) ? QVariant::Int : QVariant::LongLong;
- const uint UIntType = sizeof(ulong) == sizeof(uint) ? QVariant::UInt : QVariant::ULongLong;
+ const uint IntType = sizeof(long) == sizeof(int) ? QMetaType::Int : QMetaType::LongLong;
+ const uint UIntType = sizeof(ulong) == sizeof(uint) ? QMetaType::UInt : QMetaType::ULongLong;
return tp == QMetaType::Long ? IntType :
tp == QMetaType::ULong ? UIntType : tp;
}
@@ -3961,13 +3975,13 @@ static int numericTypePromotion(uint t1, uint t2)
// if any of the two is ULongLong, then it wins (highest rank, unsigned)
// otherwise, if one of the two is LongLong, then the other is either LongLong too or lower-ranked
// otherwise, if one of the two is UInt, then the other is either UInt too or Int
- if (t1 == QVariant::ULongLong || t2 == QVariant::ULongLong)
- return QVariant::ULongLong;
- if (t1 == QVariant::LongLong || t2 == QVariant::LongLong)
- return QVariant::LongLong;
- if (t1 == QVariant::UInt || t2 == QVariant::UInt)
- return QVariant::UInt;
- return QVariant::Int;
+ if (t1 == QMetaType::ULongLong || t2 == QMetaType::ULongLong)
+ return QMetaType::ULongLong;
+ if (t1 == QMetaType::LongLong || t2 == QMetaType::LongLong)
+ return QMetaType::LongLong;
+ if (t1 == QMetaType::UInt || t2 == QMetaType::UInt)
+ return QMetaType::UInt;
+ return QMetaType::Int;
}
static int integralCompare(uint promotedType, const QVariant::Private *d1, const QVariant::Private *d2)
@@ -3980,13 +3994,13 @@ static int integralCompare(uint promotedType, const QVariant::Private *d1, const
qlonglong l2 = qConvertToNumber(d2, &ok);
Q_ASSERT(ok);
- if (promotedType == QVariant::Int)
+ if (promotedType == QMetaType::Int)
return int(l1) < int(l2) ? -1 : int(l1) == int(l2) ? 0 : 1;
- if (promotedType == QVariant::UInt)
+ if (promotedType == QMetaType::UInt)
return uint(l1) < uint(l2) ? -1 : uint(l1) == uint(l2) ? 0 : 1;
- if (promotedType == QVariant::LongLong)
+ if (promotedType == QMetaType::LongLong)
return l1 < l2 ? -1 : l1 == l2 ? 0 : 1;
- if (promotedType == QVariant::ULongLong)
+ if (promotedType == QMetaType::ULongLong)
return qulonglong(l1) < qulonglong(l2) ? -1 : qulonglong(l1) == qulonglong(l2) ? 0 : 1;
Q_UNREACHABLE();
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index c95882d48f..24657818c5 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -256,12 +256,12 @@ class Q_CORE_EXPORT QVariant
#if QT_CONFIG(regularexpression)
QVariant(const QRegularExpression &re);
#endif // QT_CONFIG(regularexpression)
-#ifndef QT_BOOTSTRAPPED
- QVariant(const QUrl &url);
#if QT_CONFIG(easingcurve)
QVariant(const QEasingCurve &easing);
#endif
QVariant(const QUuid &uuid);
+#ifndef QT_BOOTSTRAPPED
+ QVariant(const QUrl &url);
QVariant(const QJsonValue &jsonValue);
QVariant(const QJsonObject &jsonObject);
QVariant(const QJsonArray &jsonArray);
@@ -332,12 +332,12 @@ class Q_CORE_EXPORT QVariant
#if QT_CONFIG(regularexpression)
QRegularExpression toRegularExpression() const;
#endif // QT_CONFIG(regularexpression)
-#ifndef QT_BOOTSTRAPPED
- QUrl toUrl() const;
#if QT_CONFIG(easingcurve)
QEasingCurve toEasingCurve() const;
#endif
QUuid toUuid() const;
+#ifndef QT_BOOTSTRAPPED
+ QUrl toUrl() const;
QJsonValue toJsonValue() const;
QJsonObject toJsonObject() const;
QJsonArray toJsonArray() const;
@@ -463,14 +463,16 @@ class Q_CORE_EXPORT QVariant
{ return cmp(v); }
inline bool operator!=(const QVariant &v) const
{ return !cmp(v); }
- inline bool operator<(const QVariant &v) const
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED inline bool operator<(const QVariant &v) const
{ return compare(v) < 0; }
- inline bool operator<=(const QVariant &v) const
+ QT_DEPRECATED inline bool operator<=(const QVariant &v) const
{ return compare(v) <= 0; }
- inline bool operator>(const QVariant &v) const
+ QT_DEPRECATED inline bool operator>(const QVariant &v) const
{ return compare(v) > 0; }
- inline bool operator>=(const QVariant &v) const
+ QT_DEPRECATED inline bool operator>=(const QVariant &v) const
{ return compare(v) >= 0; }
+#endif
protected:
friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &);
@@ -777,7 +779,7 @@ namespace QtPrivate {
return QSequentialIterable(QtMetaTypePrivate::QSequentialIterableImpl(reinterpret_cast<const QByteArrayList*>(v.constData())));
}
#endif
- return QSequentialIterable(v.value<QtMetaTypePrivate::QSequentialIterableImpl>());
+ return QSequentialIterable(qvariant_cast<QtMetaTypePrivate::QSequentialIterableImpl>(v));
}
};
template<>
@@ -792,7 +794,7 @@ namespace QtPrivate {
if (typeId == qMetaTypeId<QVariantHash>()) {
return QAssociativeIterable(QtMetaTypePrivate::QAssociativeIterableImpl(reinterpret_cast<const QVariantHash*>(v.constData())));
}
- return QAssociativeIterable(v.value<QtMetaTypePrivate::QAssociativeIterableImpl>());
+ return QAssociativeIterable(qvariant_cast<QtMetaTypePrivate::QAssociativeIterableImpl>(v));
}
};
template<>
@@ -824,7 +826,7 @@ namespace QtPrivate {
QVariantHash l;
l.reserve(iter.size());
for (QAssociativeIterable::const_iterator it = iter.begin(), end = iter.end(); it != end; ++it)
- l.insertMulti(it.key().toString(), it.value());
+ static_cast<QMultiHash<QString, QVariant> &>(l).insert(it.key().toString(), it.value());
return l;
}
return QVariantValueHelper<QVariantHash>::invoke(v);
@@ -840,7 +842,7 @@ namespace QtPrivate {
QAssociativeIterable iter = QVariantValueHelperInterface<QAssociativeIterable>::invoke(v);
QVariantMap l;
for (QAssociativeIterable::const_iterator it = iter.begin(), end = iter.end(); it != end; ++it)
- l.insertMulti(it.key().toString(), it.value());
+ static_cast<QMultiMap<QString, QVariant> &>(l).insert(it.key().toString(), it.value());
return l;
}
return QVariantValueHelper<QVariantMap>::invoke(v);
@@ -855,7 +857,6 @@ namespace QtPrivate {
if (QMetaType::hasRegisteredConverterFunction(typeId, qMetaTypeId<QtMetaTypePrivate::QPairVariantInterfaceImpl>()) && !(typeId == qMetaTypeId<QPair<QVariant, QVariant> >())) {
QtMetaTypePrivate::QPairVariantInterfaceImpl pi = v.value<QtMetaTypePrivate::QPairVariantInterfaceImpl>();
-
const QtMetaTypePrivate::VariantData d1 = pi.first();
QVariant v1(d1.metaTypeId, d1.data, d1.flags);
if (d1.metaTypeId == qMetaTypeId<QVariant>())
diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h
index b8b63b5e6f..94781a9957 100644
--- a/src/corelib/kernel/qvariant_p.h
+++ b/src/corelib/kernel/qvariant_p.h
@@ -362,7 +362,7 @@ class QVariantConstructor
FilteredConstructor(const QVariantConstructor &tc)
{
// ignore types that lives outside of the current library
- tc.m_x->type = QVariant::Invalid;
+ tc.m_x->type = QMetaType::UnknownType;
}
};
public:
@@ -430,7 +430,7 @@ public:
{}
~QVariantDestructor()
{
- m_d->type = QVariant::Invalid;
+ m_d->type = QMetaType::UnknownType;
m_d->is_null = true;
m_d->is_shared = false;
}
diff --git a/src/corelib/kernel/qwineventnotifier.cpp b/src/corelib/kernel/qwineventnotifier.cpp
index d2ae9668fe..db5d44b276 100644
--- a/src/corelib/kernel/qwineventnotifier.cpp
+++ b/src/corelib/kernel/qwineventnotifier.cpp
@@ -124,7 +124,7 @@ QWinEventNotifier::QWinEventNotifier(HANDLE hEvent, QObject *parent)
: QObject(*new QWinEventNotifierPrivate(hEvent, false), parent)
{
Q_D(QWinEventNotifier);
- QAbstractEventDispatcher *eventDispatcher = d->threadData->eventDispatcher.loadRelaxed();
+ QAbstractEventDispatcher *eventDispatcher = d->threadData.loadRelaxed()->eventDispatcher.loadRelaxed();
if (Q_UNLIKELY(!eventDispatcher)) {
qWarning("QWinEventNotifier: Can only be used with threads started with QThread");
return;
@@ -197,7 +197,7 @@ void QWinEventNotifier::setEnabled(bool enable)
return;
d->enabled = enable;
- QAbstractEventDispatcher *eventDispatcher = d->threadData->eventDispatcher.loadRelaxed();
+ QAbstractEventDispatcher *eventDispatcher = d->threadData.loadRelaxed()->eventDispatcher.loadRelaxed();
if (!eventDispatcher) { // perhaps application is shutting down
if (!enable && d->waitHandle != nullptr)
d->unregisterWaitObject();
@@ -256,7 +256,7 @@ void QWinEventNotifierPrivate::unregisterWaitObject()
static void CALLBACK wfsoCallback(void *context, BOOLEAN /*ignore*/)
{
QWinEventNotifierPrivate *nd = reinterpret_cast<QWinEventNotifierPrivate *>(context);
- QAbstractEventDispatcher *eventDispatcher = nd->threadData->eventDispatcher.loadRelaxed();
+ QAbstractEventDispatcher *eventDispatcher = nd->threadData.loadRelaxed()->eventDispatcher.loadRelaxed();
// Happens when Q(Core)Application is destroyed before QWinEventNotifier.
// https://bugreports.qt.io/browse/QTBUG-70214
diff --git a/src/corelib/mimetypes/mime/generate.bat b/src/corelib/mimetypes/mime/generate.bat
new file mode 100644
index 0000000000..f63fc63693
--- /dev/null
+++ b/src/corelib/mimetypes/mime/generate.bat
@@ -0,0 +1,73 @@
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::
+:: Copyright (C) 2019 Intel Corporation.
+:: Contact: https://www.qt.io/licensing/
+::
+:: This file is part of the tools applications of the Qt Toolkit.
+::
+:: $QT_BEGIN_LICENSE:GPL-EXCEPT$
+:: 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 General Public License Usage
+:: Alternatively, this file may be used under the terms of the GNU
+:: General Public License version 3 as published by the Free Software
+:: Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+:: 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-3.0.html.
+::
+:: $QT_END_LICENSE$
+::
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+@echo off
+setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
+set me=%~dp0
+
+:: Check if certain tools are in PATH
+for %%C in (gzip.exe zstd.exe perl.exe) do set %%C=%%~$PATH:C
+
+:: If perl is in PATH, just let it do everything
+if not "%perl.exe%" == "" goto PuntToPerl
+
+set COMPRESS=
+set MACRO=MIME_DATABASE_IS_UNCOMPRESSED
+if not "%gzip.exe%" == "" (
+ set COMPRESS=gzip -9
+ set MACRO=MIME_DATABASE_IS_GZIP
+)
+
+:: Check if zstd support was enabled
+if /i "%~1" == "--zstd" (
+ shift
+ if not "%zstd.exe%" == "" (
+ set COMPRESS=zstd -19
+ set MACRO=MIME_DATABASE_IS_ZSTD
+ )
+)
+
+if not "%COMPRESS%" == "" goto CompressedCommon
+
+:: No Compression and no Perl
+:: Just hex-dump with Powershell
+powershell -ExecutionPolicy Bypass %me%hexdump.ps1 %1 %1
+exit /b %errorlevel%
+
+:CompressedCommon
+:: Compress to a temporary file, then hex-dump using Powershell
+echo #define %MACRO%
+set tempfile=generate%RANDOM%.tmp
+%COMPRESS% < %1 > %tempfile%
+powershell -ExecutionPolicy Bypass %me%hexdump.ps1 %tempfile% %1
+del %tempfile%
+exit /b %errorlevel%
+
+:PuntToPerl
+perl %me%generate.pl %*
+exit /b %errorlevel%
diff --git a/src/corelib/mimetypes/mime/generate.pl b/src/corelib/mimetypes/mime/generate.pl
new file mode 100644
index 0000000000..0f87d61f8e
--- /dev/null
+++ b/src/corelib/mimetypes/mime/generate.pl
@@ -0,0 +1,113 @@
+#!/usr/bin/perl
+#############################################################################
+##
+## Copyright (C) 2019 Intel Corporation.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is the build configuration utility of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## 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 General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## 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-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+use strict;
+use warnings;
+use Config;
+local $/; # Enable "slurp" mode
+
+sub checkCommand($) {
+ use File::Spec::Functions;
+ my $cmd = $_[0] . $Config{_exe};
+ for my $path (path()) {
+ return 1 if -x catfile($path, $cmd);
+ }
+ return 0;
+}
+
+my $data;
+my $compress;
+my $macro;
+my $zlib = eval 'use Compress::Zlib; use IO::Compress::Gzip; return 1;';
+my $fname = shift @ARGV;
+
+if ($zlib) {
+ # Prefer internal zlib support (useful on Windows where gzip.exe isn't
+ # always presnet)
+ $macro = "MIME_DATABASE_IS_GZIP";
+} elsif (checkCommand("gzip")) {
+ # No builtin support for compression (old Perl?)
+ $compress = "gzip -c9";
+ $macro = "MIME_DATABASE_IS_GZIP";
+}
+
+# Check if Qt is being built with zstd support
+if ($fname eq "--zstd") {
+ $fname = shift @ARGV;
+ if (checkCommand("zstd")) {
+ $compress = "zstd -cq19 --single-thread";
+ $macro = "MIME_DATABASE_IS_ZSTD";
+ }
+}
+
+# Check if xml (from xmlstarlet) is in $PATH
+my $cmd;
+if (checkCommand("xml")) {
+ # Minify the data before compressing
+ $cmd = "xml sel -D -B -t -c / $fname";
+ $cmd .= "| $compress" if $compress;
+} elsif ($compress) {
+ $cmd = "$compress < $fname"
+}
+if ($cmd) {
+ # Run the command and read everything
+ open CMD, "$cmd |";
+ $data = <CMD>;
+ close CMD;
+ die("Failed to run $cmd") if ($? >> 8);
+} else {
+ # No command, just read the file
+ open F, "<$fname";
+ $data = <F>;
+ close F;
+}
+
+# Do we need to compress with zlib?
+if (!$compress && $zlib) {
+ $data = eval q{
+ use Compress::Zlib;
+ use IO::Compress::Gzip qw(gzip);
+ my $compressed;
+ gzip \$data => \$compressed,
+ Minimal => 1,
+ Level => Z_BEST_COMPRESSION;
+ return $compressed;
+ };
+}
+
+# Now print as hex
+printf "#define %s\n", $macro if $macro;
+printf "static const unsigned char mimetype_database[] = {";
+my $i = 0;
+map {
+ printf "\n " if $i++ % 12 == 0;
+ printf "0x%02x, ", ord $_
+} split //, $data;
+printf "\n};\n";
+printf "static constexpr size_t MimeTypeDatabaseOriginalSize = %d;\n",
+ (stat $fname)[7];
diff --git a/src/corelib/mimetypes/mime/hexdump.ps1 b/src/corelib/mimetypes/mime/hexdump.ps1
new file mode 100644
index 0000000000..25ce8138fa
--- /dev/null
+++ b/src/corelib/mimetypes/mime/hexdump.ps1
@@ -0,0 +1,43 @@
+#############################################################################
+##
+## Copyright (C) 2019 Intel Corporation.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is the build configuration utility of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## 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 General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## 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-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+param([String]$path, [String]$orig)
+
+"static const unsigned char mimetype_database[] = {"
+ForEach ($byte in Get-Content -Encoding byte -ReadCount 16 -path $path) {
+# if (($byte -eq 0).count -ne 16) {
+ $hex = $byte | Foreach-Object {
+ " 0x" + ("{0:x}" -f $_).PadLeft( 2, "0" ) + ","
+ }
+ " $hex"
+# }
+}
+"};"
+
+$file = Get-Childitem -file $orig
+"static constexpr size_t MimeTypeDatabaseOriginalSize = " + $file.length + ";"
diff --git a/src/corelib/mimetypes/mimetypes.pri b/src/corelib/mimetypes/mimetypes.pri
index 62bbe348e4..8cbe7b69ae 100644
--- a/src/corelib/mimetypes/mimetypes.pri
+++ b/src/corelib/mimetypes/mimetypes.pri
@@ -21,5 +21,32 @@ qtConfig(mimetype) {
mimetypes/qmimeglobpattern.cpp \
mimetypes/qmimeprovider.cpp
- qtConfig(mimetype-database): RESOURCES += mimetypes/mimetypes.qrc
+ MIME_DATABASE = mimetypes/mime/packages/freedesktop.org.xml
+ OTHER_FILES += $$MIME_DATABASE
+
+ qtConfig(mimetype-database) {
+ outpath = .rcc
+ debug_and_release {
+ CONFIG(debug, debug|release): outpath = .rcc/debug
+ else: outpath = .rcc/release
+ }
+
+ mimedb.depends = $$PWD/mime/generate.pl
+ equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)|isEmpty(QMAKE_SH) {
+ mimedb.commands = cmd /c $$shell_path($$PWD/mime/generate.bat)
+ mimedb.depends += $$PWD/mime/generate.bat $$PWD/mime/hexdump.ps1
+ } else {
+ mimedb.commands = perl $${mimedb.depends}
+ }
+
+ qtConfig(zstd): mimedb.commands += --zstd
+ mimedb.commands += ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+
+ mimedb.output = $$outpath/qmimeprovider_database.cpp
+ mimedb.input = MIME_DATABASE
+ mimedb.variable_out = INCLUDED_SOURCES
+ QMAKE_EXTRA_COMPILERS += mimedb
+ INCLUDEPATH += $$outpath
+ unset(outpath)
+ }
}
diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
index 24a7a35ea5..10b2190966 100644
--- a/src/corelib/mimetypes/qmimedatabase.cpp
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
@@ -102,13 +102,18 @@ void QMimeDatabasePrivate::loadProviders()
const auto fdoIterator = std::find_if(mimeDirs.constBegin(), mimeDirs.constEnd(), [](const QString &mimeDir) -> bool {
return QFileInfo::exists(mimeDir + QStringLiteral("/packages/freedesktop.org.xml")); }
);
- if (fdoIterator == mimeDirs.constEnd())
- mimeDirs.prepend(QLatin1String(":/qt-project.org/qmime"));
//qDebug() << "mime dirs:" << mimeDirs;
Providers currentProviders;
std::swap(m_providers, currentProviders);
- m_providers.reserve(mimeDirs.size());
+
+ if (QMimeXMLProvider::InternalDatabaseAvailable && fdoIterator == mimeDirs.constEnd()) {
+ m_providers.reserve(mimeDirs.size() + 1);
+ m_providers.push_back(Providers::value_type(new QMimeXMLProvider(this, QMimeXMLProvider::InternalDatabase)));
+ } else {
+ m_providers.reserve(mimeDirs.size());
+ }
+
for (const QString &mimeDir : qAsConst(mimeDirs)) {
const QString cacheFile = mimeDir + QStringLiteral("/mime.cache");
QFileInfo fileInfo(cacheFile);
@@ -487,7 +492,7 @@ QMimeDatabase::QMimeDatabase() :
*/
QMimeDatabase::~QMimeDatabase()
{
- d = 0;
+ d = nullptr;
}
/*!
diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp
index a3a6b9615c..4aee772366 100644
--- a/src/corelib/mimetypes/qmimeprovider.cpp
+++ b/src/corelib/mimetypes/qmimeprovider.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
+** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2018 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
+** Copyright (C) 2019 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -45,6 +46,7 @@
#include "qmimemagicrulematcher_p.h"
#include <QXmlStreamReader>
+#include <QBuffer>
#include <QDir>
#include <QFile>
#include <QByteArrayMatcher>
@@ -52,12 +54,33 @@
#include <QDateTime>
#include <QtEndian>
-static void initResources()
-{
#if QT_CONFIG(mimetype_database)
- Q_INIT_RESOURCE(mimetypes);
+# if defined(Q_CC_MSVC)
+# pragma section(".qtmimedatabase", read, shared)
+__declspec(allocate(".qtmimedatabase")) __declspec(align(4096))
+# elif defined(Q_OS_DARWIN)
+__attribute__((section("__TEXT,.qtmimedatabase"), aligned(4096)))
+# elif (defined(Q_OF_ELF) || defined(Q_OS_WIN)) && defined(Q_CC_GNU)
+__attribute__((section(".qtmimedatabase"), aligned(4096)))
+# endif
+
+# include "qmimeprovider_database.cpp"
+
+# ifdef MIME_DATABASE_IS_ZSTD
+# if !QT_CONFIG(zstd)
+# error "MIME database is zstd but no support compiled in!"
+# endif
+# include <zstd.h>
+# endif
+# ifdef MIME_DATABASE_IS_GZIP
+# ifdef QT_NO_COMPRESS
+# error "MIME database is zlib but no support compiled in!"
+# endif
+# define ZLIB_CONST
+# include <zconf.h>
+# include <zlib.h>
+# endif
#endif
-}
QT_BEGIN_NAMESPACE
@@ -130,7 +153,7 @@ bool QMimeBinaryProvider::CacheFile::reload()
if (file.isOpen()) {
file.close();
}
- data = 0;
+ data = nullptr;
return load();
}
@@ -306,7 +329,7 @@ bool QMimeBinaryProvider::matchMagicRule(QMimeBinaryProvider::CacheFile *cacheFi
const int valueLength = cacheFile->getUint32(off + 12);
const int valueOffset = cacheFile->getUint32(off + 16);
const int maskOffset = cacheFile->getUint32(off + 20);
- const char *mask = maskOffset ? cacheFile->getCharStar(maskOffset) : NULL;
+ const char *mask = maskOffset ? cacheFile->getCharStar(maskOffset) : nullptr;
if (!QMimeMagicRule::matchSubstring(dataPtr, dataSize, rangeStart, rangeLength, valueLength, cacheFile->getCharStar(valueOffset), mask))
continue;
@@ -597,10 +620,55 @@ void QMimeBinaryProvider::loadGenericIcon(QMimeTypePrivate &data)
////
+#if QT_CONFIG(mimetype_database)
+static QString internalMimeFileName()
+{
+ return QStringLiteral("<internal MIME data>");
+}
+
+QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db, InternalDatabaseEnum)
+ : QMimeProviderBase(db, internalMimeFileName())
+{
+ Q_STATIC_ASSERT_X(sizeof(mimetype_database), "Bundled MIME database is empty");
+ Q_STATIC_ASSERT_X(sizeof(mimetype_database) <= MimeTypeDatabaseOriginalSize,
+ "Compressed MIME database is larger than the original size");
+ Q_STATIC_ASSERT_X(MimeTypeDatabaseOriginalSize <= 16*1024*1024,
+ "Bundled MIME database is too big");
+ const char *data = reinterpret_cast<const char *>(mimetype_database);
+ qsizetype size = MimeTypeDatabaseOriginalSize;
+
+#ifdef MIME_DATABASE_IS_ZSTD
+ // uncompress with libzstd
+ std::unique_ptr<char []> uncompressed(new char[size]);
+ size = ZSTD_decompress(uncompressed.get(), size, mimetype_database, sizeof(mimetype_database));
+ Q_ASSERT(!ZSTD_isError(size));
+ data = uncompressed.get();
+#elif defined(MIME_DATABASE_IS_GZIP)
+ std::unique_ptr<char []> uncompressed(new char[size]);
+ z_stream zs = {};
+ zs.next_in = mimetype_database;
+ zs.avail_in = sizeof(mimetype_database);
+ zs.next_out = reinterpret_cast<Bytef *>(uncompressed.get());
+ zs.avail_out = size;
+
+ int res = inflateInit2(&zs, MAX_WBITS | 32);
+ Q_ASSERT(res == Z_OK);
+ res = inflate(&zs, Z_FINISH);
+ Q_ASSERT(res == Z_STREAM_END);
+ res = inflateEnd(&zs);
+ Q_ASSERT(res == Z_OK);
+
+ data = uncompressed.get();
+ size = zs.total_out;
+#endif
+
+ load(data, size);
+}
+#endif
+
QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db, const QString &directory)
: QMimeProviderBase(db, directory)
{
- initResources();
ensureLoaded();
}
@@ -692,6 +760,19 @@ bool QMimeXMLProvider::load(const QString &fileName, QString *errorMessage)
return parser.parse(&file, fileName, errorMessage);
}
+#if QT_CONFIG(mimetype_database)
+void QMimeXMLProvider::load(const char *data, qsizetype len)
+{
+ QBuffer buffer;
+ buffer.setData(QByteArray::fromRawData(data, len));
+ buffer.open(QIODevice::ReadOnly);
+ QString errorMessage;
+ QMimeTypeParser parser(*this);
+ if (!parser.parse(&buffer, internalMimeFileName(), &errorMessage))
+ qWarning("QMimeDatabase: Error loading internal MIME data\n%s", qPrintable(errorMessage));
+}
+#endif
+
void QMimeXMLProvider::addGlobPattern(const QMimeGlobPattern &glob)
{
m_mimeTypeGlobs.addGlob(glob);
diff --git a/src/corelib/mimetypes/qmimeprovider_p.h b/src/corelib/mimetypes/qmimeprovider_p.h
index b6268210c0..0629df8a95 100644
--- a/src/corelib/mimetypes/qmimeprovider_p.h
+++ b/src/corelib/mimetypes/qmimeprovider_p.h
@@ -132,6 +132,16 @@ private:
class QMimeXMLProvider : public QMimeProviderBase
{
public:
+ enum InternalDatabaseEnum { InternalDatabase };
+#if QT_CONFIG(mimetype_database)
+ enum : bool { InternalDatabaseAvailable = true };
+ QMimeXMLProvider(QMimeDatabasePrivate *db, InternalDatabaseEnum);
+#else
+ enum : bool { InternalDatabaseAvailable = false };
+ QMimeXMLProvider(QMimeDatabasePrivate *db, InternalDatabaseEnum)
+ : QMimeProviderBase(db, QString())
+ { Q_UNREACHABLE() };
+#endif
QMimeXMLProvider(QMimeDatabasePrivate *db, const QString &directory);
~QMimeXMLProvider();
@@ -156,6 +166,7 @@ public:
private:
void load(const QString &fileName);
+ void load(const char *data, qsizetype len);
typedef QHash<QString, QMimeType> NameMimeTypeMap;
NameMimeTypeMap m_nameMimeTypeMap;
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index 18f10c9b43..14de8db1c6 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -212,7 +212,7 @@ void QFactoryLoader::update()
QStringList(QLatin1String("libplugins_%1_*.so").arg(d->suffix)),
#endif
QDir::Files);
- QLibraryPrivate *library = 0;
+ QLibraryPrivate *library = nullptr;
for (int j = 0; j < plugins.count(); ++j) {
QString fileName = QDir::cleanPath(path + QLatin1Char('/') + plugins.at(j));
@@ -383,7 +383,7 @@ QObject *QFactoryLoader::instance(int index) const
{
Q_D(const QFactoryLoader);
if (index < 0)
- return 0;
+ return nullptr;
#if QT_CONFIG(library)
QMutexLocker lock(&d->mutex);
@@ -399,7 +399,7 @@ QObject *QFactoryLoader::instance(int index) const
return obj;
}
}
- return 0;
+ return nullptr;
}
index -= d->libraryList.size();
lock.unlock();
@@ -416,7 +416,7 @@ QObject *QFactoryLoader::instance(int index) const
--index;
}
- return 0;
+ return nullptr;
}
QMultiMap<int, QString> QFactoryLoader::keyMap() const
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index eeaa3c18ec..b3a95d4f26 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -256,7 +256,7 @@ static bool findPatternUnloaded(const QString &library, QLibraryPrivate *lib)
qsizetype fdlen = qMin(file.size(), MaxMemoryMapSize);
const char *filedata = reinterpret_cast<char *>(file.map(0, fdlen));
- if (filedata == 0) {
+ if (filedata == nullptr) {
// Try reading the data into memory instead (up to 64 MB).
data = file.read(64 * 1024 * 1024);
filedata = data.constData();
@@ -387,12 +387,12 @@ private:
};
static QBasicMutex qt_library_mutex;
-static QLibraryStore *qt_library_data = 0;
+static QLibraryStore *qt_library_data = nullptr;
static bool qt_library_data_once;
QLibraryStore::~QLibraryStore()
{
- qt_library_data = 0;
+ qt_library_data = nullptr;
}
inline void QLibraryStore::cleanup()
@@ -459,7 +459,7 @@ inline QLibraryPrivate *QLibraryStore::findOrCreate(const QString &fileName, con
QLibraryStore *data = instance();
// check if this library is already loaded
- QLibraryPrivate *lib = 0;
+ QLibraryPrivate *lib = nullptr;
if (Q_LIKELY(data)) {
lib = data->libraryMap.value(fileName);
if (lib)
@@ -498,7 +498,7 @@ inline void QLibraryStore::releaseLibrary(QLibraryPrivate *lib)
}
QLibraryPrivate::QLibraryPrivate(const QString &canonicalFileName, const QString &version, QLibrary::LoadHints loadHints)
- : pHnd(0), fileName(canonicalFileName), fullVersion(version), instance(0),
+ : pHnd(nullptr), fileName(canonicalFileName), fullVersion(version), instance(nullptr),
libraryRefCount(0), libraryUnloadCount(0), pluginState(MightBeAPlugin)
{
loadHintsInt.storeRelaxed(loadHints);
@@ -528,7 +528,7 @@ void QLibraryPrivate::mergeLoadHints(QLibrary::LoadHints lh)
QFunctionPointer QLibraryPrivate::resolve(const char *symbol)
{
if (!pHnd)
- return 0;
+ return nullptr;
return resolve_sys(symbol);
}
@@ -584,12 +584,12 @@ bool QLibraryPrivate::unload(UnloadFlag flag)
//when the library is unloaded, we release the reference on it so that 'this'
//can get deleted
libraryRefCount.deref();
- pHnd = 0;
- instance = 0;
+ pHnd = nullptr;
+ instance = nullptr;
}
}
- return (pHnd == 0);
+ return (pHnd == nullptr);
}
void QLibraryPrivate::release()
@@ -847,7 +847,7 @@ bool QLibrary::isLoaded() const
Constructs a library with the given \a parent.
*/
QLibrary::QLibrary(QObject *parent)
- :QObject(parent), d(0), did_load(false)
+ :QObject(parent), d(nullptr), did_load(false)
{
}
@@ -862,7 +862,7 @@ QLibrary::QLibrary(QObject *parent)
".dylib" on \macos and iOS, and ".dll" on Windows. (See \l{fileName}.)
*/
QLibrary::QLibrary(const QString& fileName, QObject *parent)
- :QObject(parent), d(0), did_load(false)
+ :QObject(parent), d(nullptr), did_load(false)
{
setFileName(fileName);
}
@@ -879,7 +879,7 @@ QLibrary::QLibrary(const QString& fileName, QObject *parent)
".dylib" on \macos and iOS, and ".dll" on Windows. (See \l{fileName}.)
*/
QLibrary::QLibrary(const QString& fileName, int verNum, QObject *parent)
- :QObject(parent), d(0), did_load(false)
+ :QObject(parent), d(nullptr), did_load(false)
{
setFileNameAndVersion(fileName, verNum);
}
@@ -895,7 +895,7 @@ QLibrary::QLibrary(const QString& fileName, int verNum, QObject *parent)
".dylib" on \macos and iOS, and ".dll" on Windows. (See \l{fileName}.)
*/
QLibrary::QLibrary(const QString& fileName, const QString &version, QObject *parent)
- :QObject(parent), d(0), did_load(false)
+ :QObject(parent), d(nullptr), did_load(false)
{
setFileNameAndVersion(fileName, version);
}
@@ -942,7 +942,7 @@ void QLibrary::setFileName(const QString &fileName)
if (d) {
lh = d->loadHints();
d->release();
- d = 0;
+ d = nullptr;
did_load = false;
}
d = QLibraryPrivate::findOrCreate(fileName, QString(), lh);
@@ -970,7 +970,7 @@ void QLibrary::setFileNameAndVersion(const QString &fileName, int verNum)
if (d) {
lh = d->loadHints();
d->release();
- d = 0;
+ d = nullptr;
did_load = false;
}
d = QLibraryPrivate::findOrCreate(fileName, verNum >= 0 ? QString::number(verNum) : QString(), lh);
@@ -991,7 +991,7 @@ void QLibrary::setFileNameAndVersion(const QString &fileName, const QString &ver
if (d) {
lh = d->loadHints();
d->release();
- d = 0;
+ d = nullptr;
did_load = false;
}
d = QLibraryPrivate::findOrCreate(fileName, version, lh);
@@ -1020,7 +1020,7 @@ void QLibrary::setFileNameAndVersion(const QString &fileName, const QString &ver
QFunctionPointer QLibrary::resolve(const char *symbol)
{
if (!isLoaded() && !load())
- return 0;
+ return nullptr;
return d->resolve(symbol);
}
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h
index db5afac98e..a58547a2c3 100644
--- a/src/corelib/plugin/qlibrary_p.h
+++ b/src/corelib/plugin/qlibrary_p.h
@@ -96,7 +96,7 @@ public:
void setLoadHints(QLibrary::LoadHints lh);
static QLibraryPrivate *findOrCreate(const QString &fileName, const QString &version = QString(),
- QLibrary::LoadHints loadHints = nullptr);
+ QLibrary::LoadHints loadHints = { });
static QStringList suffixes_sys(const QString &fullVersion);
static QStringList prefixes_sys();
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
index 135b82cd37..4a092abb3e 100644
--- a/src/corelib/plugin/qlibrary_unix.cpp
+++ b/src/corelib/plugin/qlibrary_unix.cpp
@@ -279,7 +279,7 @@ bool QLibraryPrivate::load_sys()
qualifiedFileName = attempt;
errorString.clear();
}
- return (pHnd != 0);
+ return (pHnd != nullptr);
}
bool QLibraryPrivate::unload_sys()
diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp
index dac8502dae..f34578ea81 100644
--- a/src/corelib/plugin/qpluginloader.cpp
+++ b/src/corelib/plugin/qpluginloader.cpp
@@ -136,7 +136,7 @@ QT_BEGIN_NAMESPACE
Constructs a plugin loader with the given \a parent.
*/
QPluginLoader::QPluginLoader(QObject *parent)
- : QObject(parent), d(0), did_load(false)
+ : QObject(parent), d(nullptr), did_load(false)
{
}
@@ -152,7 +152,7 @@ QPluginLoader::QPluginLoader(QObject *parent)
\sa setFileName()
*/
QPluginLoader::QPluginLoader(const QString &fileName, QObject *parent)
- : QObject(parent), d(0), did_load(false)
+ : QObject(parent), d(nullptr), did_load(false)
{
setFileName(fileName);
setLoadHints(QLibrary::PreventUnloadHint);
@@ -195,7 +195,7 @@ QPluginLoader::~QPluginLoader()
QObject *QPluginLoader::instance()
{
if (!isLoaded() && !load())
- return 0;
+ return nullptr;
if (!d->inst && d->instance)
d->inst = d->instance();
return d->inst.data();
@@ -363,7 +363,7 @@ void QPluginLoader::setFileName(const QString &fileName)
if (d) {
lh = d->loadHints();
d->release();
- d = 0;
+ d = nullptr;
did_load = false;
}
diff --git a/src/corelib/serialization/qbinaryjson.cpp b/src/corelib/serialization/qbinaryjson.cpp
new file mode 100644
index 0000000000..3d359f0998
--- /dev/null
+++ b/src/corelib/serialization/qbinaryjson.cpp
@@ -0,0 +1,415 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 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 "qbinaryjson_p.h"
+
+#include <qjsonobject.h>
+#include <qjsonarray.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QBinaryJsonPrivate {
+
+static Q_CONSTEXPR Base emptyArray = {
+ { qle_uint(sizeof(Base)) },
+ { 0 },
+ { qle_uint(0) }
+};
+
+static Q_CONSTEXPR Base emptyObject = {
+ { qle_uint(sizeof(Base)) },
+ { qToLittleEndian(1U) },
+ { qle_uint(0) }
+};
+
+void MutableData::compact()
+{
+ Q_STATIC_ASSERT(sizeof(Value) == sizeof(offset));
+
+ Base *base = header->root();
+ int reserve = 0;
+ if (base->is_object) {
+ auto *o = static_cast<Object *>(base);
+ for (uint i = 0; i < o->length; ++i)
+ reserve += o->entryAt(i)->usedStorage(o);
+ } else {
+ auto *a = static_cast<Array *>(base);
+ for (uint i = 0; i < a->length; ++i)
+ reserve += a->at(i)->usedStorage(a);
+ }
+
+ uint size = sizeof(Base) + reserve + base->length * sizeof(offset);
+ uint alloc = sizeof(Header) + size;
+ auto *h = reinterpret_cast<Header *>(malloc(alloc));
+ Q_CHECK_PTR(h);
+ h->tag = QJsonDocument::BinaryFormatTag;
+ h->version = 1;
+ Base *b = h->root();
+ b->size = size;
+ b->is_object = header->root()->is_object;
+ b->length = base->length;
+ b->tableOffset = reserve + sizeof(Array);
+
+ uint offset = sizeof(Base);
+ if (b->is_object) {
+ const auto *o = static_cast<const Object *>(base);
+ auto *no = static_cast<Object *>(b);
+
+ for (uint i = 0; i < o->length; ++i) {
+ no->table()[i] = offset;
+
+ const Entry *e = o->entryAt(i);
+ Entry *ne = no->entryAt(i);
+ uint s = e->size();
+ memcpy(ne, e, s);
+ offset += s;
+ uint dataSize = e->value.usedStorage(o);
+ if (dataSize) {
+ memcpy(reinterpret_cast<char *>(no) + offset, e->value.data(o), dataSize);
+ ne->value.value = offset;
+ offset += dataSize;
+ }
+ }
+ } else {
+ const auto *a = static_cast<const Array *>(base);
+ auto *na = static_cast<Array *>(b);
+
+ for (uint i = 0; i < a->length; ++i) {
+ const Value *v = a->at(i);
+ Value *nv = na->at(i);
+ *nv = *v;
+ uint dataSize = v->usedStorage(a);
+ if (dataSize) {
+ memcpy(reinterpret_cast<char *>(na) + offset, v->data(a), dataSize);
+ nv->value = offset;
+ offset += dataSize;
+ }
+ }
+ }
+ Q_ASSERT(offset == uint(b->tableOffset));
+
+ free(header);
+ header = h;
+ this->alloc = alloc;
+ compactionCounter = 0;
+}
+
+bool ConstData::isValid() const
+{
+ if (header->tag != QJsonDocument::BinaryFormatTag || header->version != 1U)
+ return false;
+
+ const Base *root = header->root();
+ const uint maxSize = alloc - sizeof(Header);
+ return root->is_object
+ ? static_cast<const Object *>(root)->isValid(maxSize)
+ : static_cast<const Array *>(root)->isValid(maxSize);
+}
+
+QJsonDocument ConstData::toJsonDocument() const
+{
+ const Base *root = header->root();
+ return root->is_object
+ ? QJsonDocument(static_cast<const Object *>(root)->toJsonObject())
+ : QJsonDocument(static_cast<const Array *>(root)->toJsonArray());
+}
+
+uint Base::reserveSpace(uint dataSize, uint posInTable, uint numItems, bool replace)
+{
+ Q_ASSERT(posInTable <= length);
+ if (size + dataSize >= Value::MaxSize) {
+ qWarning("QJson: Document too large to store in data structure %d %d %d",
+ uint(size), dataSize, Value::MaxSize);
+ return 0;
+ }
+
+ offset off = tableOffset;
+ // move table to new position
+ if (replace) {
+ memmove(reinterpret_cast<char *>(table()) + dataSize, table(), length * sizeof(offset));
+ } else {
+ memmove(reinterpret_cast<char *>(table() + posInTable + numItems) + dataSize,
+ table() + posInTable, (length - posInTable) * sizeof(offset));
+ memmove(reinterpret_cast<char *>(table()) + dataSize, table(), posInTable * sizeof(offset));
+ }
+ tableOffset += dataSize;
+ for (uint i = 0; i < numItems; ++i)
+ table()[posInTable + i] = off;
+ size += dataSize;
+ if (!replace) {
+ length += numItems;
+ size += numItems * sizeof(offset);
+ }
+ return off;
+}
+
+uint Object::indexOf(QStringView key, bool *exists) const
+{
+ uint min = 0;
+ uint n = length;
+ while (n > 0) {
+ uint half = n >> 1;
+ uint middle = min + half;
+ if (*entryAt(middle) >= key) {
+ n = half;
+ } else {
+ min = middle + 1;
+ n -= half + 1;
+ }
+ }
+ if (min < length && *entryAt(min) == key) {
+ *exists = true;
+ return min;
+ }
+ *exists = false;
+ return min;
+}
+
+QJsonObject Object::toJsonObject() const
+{
+ QJsonObject object;
+ for (uint i = 0; i < length; ++i) {
+ const Entry *e = entryAt(i);
+ object.insert(e->key(), e->value.toJsonValue(this));
+ }
+ return object;
+}
+
+bool Object::isValid(uint maxSize) const
+{
+ if (size > maxSize || tableOffset + length * sizeof(offset) > size)
+ return false;
+
+ QString lastKey;
+ for (uint i = 0; i < length; ++i) {
+ if (table()[i] + sizeof(Entry) >= tableOffset)
+ return false;
+ const Entry *e = entryAt(i);
+ if (!e->isValid(tableOffset - table()[i]))
+ return false;
+ const QString key = e->key();
+ if (key < lastKey)
+ return false;
+ if (!e->value.isValid(this))
+ return false;
+ lastKey = key;
+ }
+ return true;
+}
+
+QJsonArray Array::toJsonArray() const
+{
+ QJsonArray array;
+ const offset *values = table();
+ for (uint i = 0; i < length; ++i)
+ array.append(reinterpret_cast<const Value *>(values + i)->toJsonValue(this));
+ return array;
+}
+
+bool Array::isValid(uint maxSize) const
+{
+ if (size > maxSize || tableOffset + length * sizeof(offset) > size)
+ return false;
+
+ const offset *values = table();
+ for (uint i = 0; i < length; ++i) {
+ if (!reinterpret_cast<const Value *>(values + i)->isValid(this))
+ return false;
+ }
+ return true;
+}
+
+uint Value::usedStorage(const Base *b) const
+{
+ uint s = 0;
+ switch (type) {
+ case QJsonValue::Double:
+ if (!latinOrIntValue)
+ s = sizeof(double);
+ break;
+ case QJsonValue::String: {
+ const char *d = data(b);
+ s = latinOrIntValue
+ ? (sizeof(ushort)
+ + qFromLittleEndian(*reinterpret_cast<const ushort *>(d)))
+ : (sizeof(int)
+ + sizeof(ushort) * qFromLittleEndian(*reinterpret_cast<const int *>(d)));
+ break;
+ }
+ case QJsonValue::Array:
+ case QJsonValue::Object:
+ s = base(b)->size;
+ break;
+ case QJsonValue::Null:
+ case QJsonValue::Bool:
+ default:
+ break;
+ }
+ return alignedSize(s);
+}
+
+QJsonValue Value::toJsonValue(const Base *b) const
+{
+ switch (type) {
+ case QJsonValue::Null:
+ return QJsonValue(QJsonValue::Null);
+ case QJsonValue::Bool:
+ return QJsonValue(toBoolean());
+ case QJsonValue::Double:
+ return QJsonValue(toDouble(b));
+ case QJsonValue::String:
+ return QJsonValue(toString(b));
+ case QJsonValue::Array:
+ return static_cast<const Array *>(base(b))->toJsonArray();
+ case QJsonValue::Object:
+ return static_cast<const Object *>(base(b))->toJsonObject();
+ case QJsonValue::Undefined:
+ return QJsonValue(QJsonValue::Undefined);
+ }
+ Q_UNREACHABLE();
+ return QJsonValue(QJsonValue::Undefined);
+}
+
+inline bool isValidValueOffset(uint offset, uint tableOffset)
+{
+ return offset >= sizeof(Base)
+ && offset + sizeof(uint) <= tableOffset;
+}
+
+bool Value::isValid(const Base *b) const
+{
+ switch (type) {
+ case QJsonValue::Null:
+ case QJsonValue::Bool:
+ return true;
+ case QJsonValue::Double:
+ return latinOrIntValue || isValidValueOffset(value, b->tableOffset);
+ case QJsonValue::String:
+ if (!isValidValueOffset(value, b->tableOffset))
+ return false;
+ if (latinOrIntValue)
+ return asLatin1String(b).isValid(b->tableOffset - value);
+ return asString(b).isValid(b->tableOffset - value);
+ case QJsonValue::Array:
+ return isValidValueOffset(value, b->tableOffset)
+ && static_cast<const Array *>(base(b))->isValid(b->tableOffset - value);
+ case QJsonValue::Object:
+ return isValidValueOffset(value, b->tableOffset)
+ && static_cast<const Object *>(base(b))->isValid(b->tableOffset - value);
+ default:
+ return false;
+ }
+}
+
+uint Value::requiredStorage(const QBinaryJsonValue &v, bool *compressed)
+{
+ *compressed = false;
+ switch (v.type()) {
+ case QJsonValue::Double:
+ if (QBinaryJsonPrivate::compressedNumber(v.toDouble()) != INT_MAX) {
+ *compressed = true;
+ return 0;
+ }
+ return sizeof(double);
+ case QJsonValue::String: {
+ QString s = v.toString();
+ *compressed = QBinaryJsonPrivate::useCompressed(s);
+ return QBinaryJsonPrivate::qStringSize(s, *compressed);
+ }
+ case QJsonValue::Array:
+ case QJsonValue::Object:
+ return v.base ? uint(v.base->size) : sizeof(QBinaryJsonPrivate::Base);
+ case QJsonValue::Undefined:
+ case QJsonValue::Null:
+ case QJsonValue::Bool:
+ break;
+ }
+ return 0;
+}
+
+uint Value::valueToStore(const QBinaryJsonValue &v, uint offset)
+{
+ switch (v.type()) {
+ case QJsonValue::Undefined:
+ case QJsonValue::Null:
+ break;
+ case QJsonValue::Bool:
+ return v.toBool();
+ case QJsonValue::Double: {
+ int c = QBinaryJsonPrivate::compressedNumber(v.toDouble());
+ if (c != INT_MAX)
+ return c;
+ }
+ Q_FALLTHROUGH();
+ case QJsonValue::String:
+ case QJsonValue::Array:
+ case QJsonValue::Object:
+ return offset;
+ }
+ return 0;
+}
+
+void Value::copyData(const QBinaryJsonValue &v, char *dest, bool compressed)
+{
+ switch (v.type()) {
+ case QJsonValue::Double:
+ if (!compressed)
+ qToLittleEndian(v.toDouble(), dest);
+ break;
+ case QJsonValue::String: {
+ const QString str = v.toString();
+ QBinaryJsonPrivate::copyString(dest, str, compressed);
+ break;
+ }
+ case QJsonValue::Array:
+ case QJsonValue::Object: {
+ const QBinaryJsonPrivate::Base *b = v.base;
+ if (!b)
+ b = (v.type() == QJsonValue::Array ? &emptyArray : &emptyObject);
+ memcpy(dest, b, b->size);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+} // namespace QBinaryJsonPrivate
+
+QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qbinaryjson_p.h b/src/corelib/serialization/qbinaryjson_p.h
new file mode 100644
index 0000000000..132c36f227
--- /dev/null
+++ b/src/corelib/serialization/qbinaryjson_p.h
@@ -0,0 +1,617 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 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 QBINARYJSON_P_H
+#define QBINARYJSON_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 <private/qbinaryjsonvalue_p.h>
+#include <private/qendian_p.h>
+
+#include <qjsondocument.h>
+
+#include <limits>
+
+QT_REQUIRE_CONFIG(binaryjson);
+
+QT_BEGIN_NAMESPACE
+
+// in qstring.cpp
+void qt_to_latin1_unchecked(uchar *dst, const ushort *uc, qsizetype len);
+void qt_from_latin1(ushort *dst, const char *str, size_t size) noexcept;
+
+/*
+ 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.
+
+ In most cases the binary structure is not as space efficient as a utf8 encoded text representation, but
+ much faster to access.
+
+ The size requirements are:
+
+ String:
+ Latin1 data: 2 bytes header + string.length()
+ Full Unicode: 4 bytes header + 2*(string.length())
+
+ Values: 4 bytes + size of data (size can be 0 for some data)
+ bool: 0 bytes
+ double: 8 bytes (0 if integer with less than 27bits)
+ string: see above
+ array: size of array
+ object: size of object
+ Array: 12 bytes + 4*length + size of Value data
+ Object: 12 bytes + 8*length + size of Key Strings + size of Value data
+
+ For an example such as
+
+ { // object: 12 + 5*8 = 52
+ "firstName": "John", // key 12, value 8 = 20
+ "lastName" : "Smith", // key 12, value 8 = 20
+ "age" : 25, // key 8, value 0 = 8
+ "address" : // key 12, object below = 140
+ { // object: 12 + 4*8
+ "streetAddress": "21 2nd Street", // key 16, value 16
+ "city" : "New York", // key 8, value 12
+ "state" : "NY", // key 8, value 4
+ "postalCode" : "10021" // key 12, value 8
+ }, // object total: 128
+ "phoneNumber": // key: 16, value array below = 172
+ [ // array: 12 + 2*4 + values below: 156
+ { // object 12 + 2*8
+ "type" : "home", // key 8, value 8
+ "number": "212 555-1234" // key 8, value 16
+ }, // object total: 68
+ { // object 12 + 2*8
+ "type" : "fax", // key 8, value 8
+ "number": "646 555-4567" // key 8, value 16
+ } // object total: 68
+ ] // array total: 156
+ } // great total: 412 bytes
+
+ The uncompressed text file used roughly 500 bytes, so in this case we end up using about
+ the same space as the text representation.
+
+ Other measurements have shown a slightly bigger binary size than a compact text
+ representation where all possible whitespace was stripped out.
+*/
+namespace QBinaryJsonPrivate {
+
+class Array;
+class Object;
+class Value;
+class Entry;
+
+template<typename T>
+using q_littleendian = QLEInteger<T>;
+
+using qle_short = q_littleendian<short>;
+using qle_ushort = q_littleendian<unsigned short>;
+using qle_int = q_littleendian<int>;
+using qle_uint = q_littleendian<unsigned int>;
+
+template<int pos, int width>
+using qle_bitfield = QLEIntegerBitfield<uint, pos, width>;
+
+template<int pos, int width>
+using qle_signedbitfield = QLEIntegerBitfield<int, pos, width>;
+
+using offset = qle_uint;
+
+// round the size up to the next 4 byte boundary
+inline uint alignedSize(uint size) { return (size + 3) & ~3; }
+
+const int MaxLatin1Length = 0x7fff;
+
+static inline bool useCompressed(QStringView s)
+{
+ if (s.length() > MaxLatin1Length)
+ return false;
+ return QtPrivate::isLatin1(s);
+}
+
+static inline bool useCompressed(QLatin1String s)
+{
+ return s.size() <= MaxLatin1Length;
+}
+
+static inline uint qStringSize(const QString &string, bool compress)
+{
+ uint l = 2 + string.size();
+ if (!compress)
+ l *= 2;
+ return alignedSize(l);
+}
+
+// returns INT_MAX if it can't compress it into 28 bits
+static inline int compressedNumber(double d)
+{
+ // this relies on details of how ieee floats are represented
+ const int exponent_off = 52;
+ const quint64 fraction_mask = 0x000fffffffffffffULL;
+ const quint64 exponent_mask = 0x7ff0000000000000ULL;
+
+ quint64 val;
+ memcpy (&val, &d, sizeof(double));
+ int exp = (int)((val & exponent_mask) >> exponent_off) - 1023;
+ if (exp < 0 || exp > 25)
+ return std::numeric_limits<int>::max();
+
+ quint64 non_int = val & (fraction_mask >> exp);
+ if (non_int)
+ return std::numeric_limits<int>::max();
+
+ bool neg = (val >> 63) != 0;
+ val &= fraction_mask;
+ val |= ((quint64)1 << 52);
+ int res = (int)(val >> (52 - exp));
+ return neg ? -res : res;
+}
+
+class Latin1String;
+
+class String
+{
+public:
+ explicit String(const char *data) : d(reinterpret_cast<const Data *>(data)) {}
+
+ struct Data {
+ qle_uint length;
+ qle_ushort utf16[1];
+ };
+ const Data *d;
+
+ uint byteSize() const { return sizeof(uint) + sizeof(ushort) * d->length; }
+ bool isValid(uint maxSize) const
+ {
+ // Check byteSize() <= maxSize, avoiding integer overflow
+ return maxSize >= sizeof(uint)
+ && uint(d->length) <= (maxSize - sizeof(uint)) / sizeof(ushort);
+ }
+
+ static void copy(char *dest, QStringView str)
+ {
+ Data *data = reinterpret_cast<Data *>(dest);
+ data->length = str.length();
+ qToLittleEndian<quint16>(str.utf16(), str.length(), data->utf16);
+ fillTrailingZeros(data);
+ }
+
+ static void fillTrailingZeros(Data *data)
+ {
+ if (data->length & 1)
+ data->utf16[data->length] = 0;
+ }
+
+ bool operator ==(QStringView str) const
+ {
+ int slen = str.length();
+ int l = d->length;
+ if (slen != l)
+ return false;
+ const auto *s = reinterpret_cast<const ushort *>(str.utf16());
+ const qle_ushort *a = d->utf16;
+ const ushort *b = s;
+ while (l-- && *a == *b)
+ a++,b++;
+ return (l == -1);
+ }
+
+ bool operator ==(const String &str) const
+ {
+ if (d->length != str.d->length)
+ return false;
+ return !memcmp(d->utf16, str.d->utf16, d->length * sizeof(ushort));
+ }
+
+ QString toString() const
+ {
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
+ return QString(reinterpret_cast<const QChar *>(d->utf16), d->length);
+#else
+ const uint l = d->length;
+ QString str(l, Qt::Uninitialized);
+ QChar *ch = str.data();
+ for (uint i = 0; i < l; ++i)
+ ch[i] = QChar(d->utf16[i]);
+ return str;
+#endif
+ }
+};
+
+class Latin1String
+{
+public:
+ explicit Latin1String(const char *data) : d(reinterpret_cast<const Data *>(data)) {}
+
+ struct Data {
+ qle_ushort length;
+ char latin1[1];
+ };
+ const Data *d;
+
+ uint byteSize() const { return sizeof(ushort) + sizeof(char) * (d->length); }
+ bool isValid(uint maxSize) const { return byteSize() <= maxSize; }
+
+ static void copy(char *dest, QStringView src)
+ {
+ Data *data = reinterpret_cast<Data *>(dest);
+ data->length = src.length();
+ auto *l = reinterpret_cast<uchar *>(data->latin1);
+ const auto *uc = reinterpret_cast<const ushort *>(src.utf16());
+ qt_to_latin1_unchecked(l, uc, data->length);
+
+ for (uint len = data->length; quintptr(l + len) & 0x3; ++len)
+ l[len] = 0;
+ }
+
+ QLatin1String toQLatin1String() const noexcept { return QLatin1String(d->latin1, d->length); }
+ QString toString() const { return QString::fromLatin1(d->latin1, d->length); }
+};
+
+static inline void copyString(char *dest, QStringView str, bool compress)
+{
+ if (compress)
+ Latin1String::copy(dest, str);
+ else
+ String::copy(dest, str);
+}
+
+/*
+ Base is the base class for both Object and Array. Both classes work more or less the same way.
+ The class starts with a header (defined by the struct below), then followed by data (the data for
+ values in the Array case and Entry's (see below) for objects.
+
+ After the data a table follows (tableOffset points to it) containing Value objects for Arrays, and
+ offsets from the beginning of the object to Entry's in the case of Object.
+
+ Entry's in the Object's table are lexicographically sorted by key in the table(). This allows the usage
+ of a binary search over the keys in an Object.
+ */
+class Base
+{
+public:
+ qle_uint size;
+ union {
+ uint _dummy;
+ qle_bitfield<0, 1> is_object;
+ qle_bitfield<1, 31> length;
+ };
+ offset tableOffset;
+ // content follows here
+
+ bool isObject() const { return !!is_object; }
+ bool isArray() const { return !isObject(); }
+
+ offset *table()
+ {
+ return reinterpret_cast<offset *>(reinterpret_cast<char *>(this) + tableOffset);
+ }
+
+ const offset *table() const
+ {
+ return reinterpret_cast<const offset *>(reinterpret_cast<const char *>(this) + tableOffset);
+ }
+
+ uint reserveSpace(uint dataSize, uint posInTable, uint numItems, bool replace);
+};
+
+class Object : public Base
+{
+public:
+ const Entry *entryAt(uint i) const
+ {
+ return reinterpret_cast<const Entry *>(reinterpret_cast<const char *>(this) + table()[i]);
+ }
+
+ Entry *entryAt(uint i)
+ {
+ return reinterpret_cast<Entry *>(reinterpret_cast<char *>(this) + table()[i]);
+ }
+
+ uint indexOf(QStringView key, bool *exists) const;
+ QJsonObject toJsonObject() const;
+ bool isValid(uint maxSize) const;
+};
+
+class Array : public Base
+{
+public:
+ const Value *at(uint i) const { return reinterpret_cast<const Value *>(table() + i); }
+ Value *at(uint i) { return reinterpret_cast<Value *>(table() + i); }
+
+ QJsonArray toJsonArray() const;
+ bool isValid(uint maxSize) const;
+};
+
+class Value
+{
+public:
+ enum {
+ MaxSize = (1 << 27) - 1
+ };
+ union {
+ uint _dummy;
+ qle_bitfield<0, 3> type;
+ qle_bitfield<3, 1> latinOrIntValue;
+ qle_bitfield<4, 1> latinKey;
+ qle_bitfield<5, 27> value;
+ qle_signedbitfield<5, 27> int_value;
+ };
+
+ inline const char *data(const Base *b) const
+ {
+ return reinterpret_cast<const char *>(b) + value;
+ }
+
+ uint usedStorage(const Base *b) const;
+
+ bool toBoolean() const
+ {
+ Q_ASSERT(type == QJsonValue::Bool);
+ return value != 0;
+ }
+
+ double toDouble(const Base *b) const
+ {
+ Q_ASSERT(type == QJsonValue::Double);
+ if (latinOrIntValue)
+ return int_value;
+
+ auto i = qFromLittleEndian<quint64>(reinterpret_cast<const uchar *>(b) + value);
+ double d;
+ memcpy(&d, &i, sizeof(double));
+ return d;
+ }
+
+ QString toString(const Base *b) const
+ {
+ return latinOrIntValue
+ ? asLatin1String(b).toString()
+ : asString(b).toString();
+ }
+
+ String asString(const Base *b) const
+ {
+ Q_ASSERT(type == QJsonValue::String && !latinOrIntValue);
+ return String(data(b));
+ }
+
+ Latin1String asLatin1String(const Base *b) const
+ {
+ Q_ASSERT(type == QJsonValue::String && latinOrIntValue);
+ return Latin1String(data(b));
+ }
+
+ const Base *base(const Base *b) const
+ {
+ Q_ASSERT(type == QJsonValue::Array || type == QJsonValue::Object);
+ return reinterpret_cast<const Base *>(data(b));
+ }
+
+ QJsonValue toJsonValue(const Base *b) const;
+ bool isValid(const Base *b) const;
+
+ static uint requiredStorage(const QBinaryJsonValue &v, bool *compressed);
+ static uint valueToStore(const QBinaryJsonValue &v, uint offset);
+ static void copyData(const QBinaryJsonValue &v, char *dest, bool compressed);
+};
+
+class Entry {
+public:
+ Value value;
+ // key
+ // value data follows key
+
+ uint size() const
+ {
+ uint s = sizeof(Entry);
+ if (value.latinKey)
+ s += shallowLatin1Key().byteSize();
+ else
+ s += shallowKey().byteSize();
+ return alignedSize(s);
+ }
+
+ uint usedStorage(Base *b) const
+ {
+ return size() + value.usedStorage(b);
+ }
+
+ String shallowKey() const
+ {
+ Q_ASSERT(!value.latinKey);
+ return String(reinterpret_cast<const char *>(this) + sizeof(Entry));
+ }
+
+ Latin1String shallowLatin1Key() const
+ {
+ Q_ASSERT(value.latinKey);
+ return Latin1String(reinterpret_cast<const char *>(this) + sizeof(Entry));
+ }
+
+ QString key() const
+ {
+ return value.latinKey
+ ? shallowLatin1Key().toString()
+ : shallowKey().toString();
+ }
+
+ bool isValid(uint maxSize) const
+ {
+ if (maxSize < sizeof(Entry))
+ return false;
+ maxSize -= sizeof(Entry);
+ return value.latinKey
+ ? shallowLatin1Key().isValid(maxSize)
+ : shallowKey().isValid(maxSize);
+ }
+
+ bool operator ==(QStringView key) const
+ {
+ return value.latinKey
+ ? (shallowLatin1Key().toQLatin1String() == key)
+ : (shallowKey() == key);
+ }
+
+ bool operator >=(QStringView key) const
+ {
+ return value.latinKey
+ ? (shallowLatin1Key().toQLatin1String() >= key)
+ : (shallowKey().toString() >= key);
+ }
+};
+
+class Header {
+public:
+ qle_uint tag; // 'qbjs'
+ qle_uint version; // 1
+ Base *root() { return reinterpret_cast<Base *>(this + 1); }
+ const Base *root() const { return reinterpret_cast<const Base *>(this + 1); }
+};
+
+class ConstData
+{
+ Q_DISABLE_COPY_MOVE(ConstData)
+public:
+ const uint alloc;
+ union {
+ const char *rawData;
+ const Header *header;
+ };
+
+ ConstData(const char *raw, uint a) : alloc(a), rawData(raw) {}
+ bool isValid() const;
+ QJsonDocument toJsonDocument() const;
+};
+
+class MutableData
+{
+ Q_DISABLE_COPY_MOVE(MutableData)
+public:
+ QAtomicInt ref;
+ uint alloc;
+ union {
+ char *rawData;
+ Header *header;
+ };
+ uint compactionCounter : 31;
+
+ MutableData(char *raw, uint a)
+ : alloc(a), rawData(raw), compactionCounter(0)
+ {
+ }
+
+ MutableData(uint reserved, QJsonValue::Type valueType)
+ : rawData(nullptr), compactionCounter(0)
+ {
+ Q_ASSERT(valueType == QJsonValue::Array || valueType == QJsonValue::Object);
+
+ alloc = sizeof(Header) + sizeof(Base) + reserved + sizeof(offset);
+ header = reinterpret_cast<Header *>(malloc(alloc));
+ Q_CHECK_PTR(header);
+ header->tag = QJsonDocument::BinaryFormatTag;
+ header->version = 1;
+ Base *b = header->root();
+ b->size = sizeof(Base);
+ b->is_object = (valueType == QJsonValue::Object);
+ b->tableOffset = sizeof(Base);
+ b->length = 0;
+ }
+
+ ~MutableData()
+ {
+ free(rawData);
+ }
+
+ MutableData *clone(const Base *b, uint reserve = 0)
+ {
+ uint size = sizeof(Header) + b->size;
+ if (b == header->root() && ref.loadRelaxed() == 1 && alloc >= size + reserve)
+ return this;
+
+ if (reserve) {
+ if (reserve < 128)
+ reserve = 128;
+ size = qMax(size + reserve, qMin(size *2, uint(Value::MaxSize)));
+ if (size > Value::MaxSize) {
+ qWarning("QJson: Document too large to store in data structure");
+ return nullptr;
+ }
+ }
+ char *raw = reinterpret_cast<char *>(malloc(size));
+ Q_CHECK_PTR(raw);
+ memcpy(raw + sizeof(Header), b, b->size);
+ auto *h = reinterpret_cast<Header *>(raw);
+ h->tag = QJsonDocument::BinaryFormatTag;
+ h->version = 1;
+ auto *d = new MutableData(raw, size);
+ d->compactionCounter = (b == header->root()) ? compactionCounter : 0;
+ return d;
+ }
+
+ char *takeRawData(uint *size)
+ {
+ *size = alloc;
+ char *result = rawData;
+ rawData = nullptr;
+ alloc = 0;
+ return result;
+ }
+
+ void compact();
+};
+
+} // namespace QBinaryJsonPrivate
+
+Q_DECLARE_TYPEINFO(QBinaryJsonPrivate::Value, Q_PRIMITIVE_TYPE);
+
+QT_END_NAMESPACE
+
+#endif // QBINARYJSON_P_H
diff --git a/src/corelib/serialization/qbinaryjsonarray.cpp b/src/corelib/serialization/qbinaryjsonarray.cpp
new file mode 100644
index 0000000000..68937fe17d
--- /dev/null
+++ b/src/corelib/serialization/qbinaryjsonarray.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 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 "qbinaryjsonarray_p.h"
+#include "qbinaryjson_p.h"
+
+#include <qjsonarray.h>
+
+QT_BEGIN_NAMESPACE
+
+QBinaryJsonArray::~QBinaryJsonArray()
+{
+ if (d && !d->ref.deref())
+ delete d;
+}
+
+QBinaryJsonArray QBinaryJsonArray::fromJsonArray(const QJsonArray &array)
+{
+ QBinaryJsonArray binary;
+ for (const QJsonValue &value : array)
+ binary.append(QBinaryJsonValue::fromJsonValue(value));
+ if (binary.d) // We want to compact it as it is a root item now
+ binary.d->compactionCounter++;
+ binary.compact();
+ return binary;
+}
+
+void QBinaryJsonArray::append(const QBinaryJsonValue &value)
+{
+ const uint i = a ? a->length : 0;
+
+ bool compressed;
+ uint valueSize = QBinaryJsonPrivate::Value::requiredStorage(value, &compressed);
+
+ if (!detach(valueSize + sizeof(QBinaryJsonPrivate::Value)))
+ return;
+
+ if (!a->length)
+ a->tableOffset = sizeof(QBinaryJsonPrivate::Array);
+
+ uint valueOffset = a->reserveSpace(valueSize, i, 1, false);
+ if (!valueOffset)
+ return;
+
+ QBinaryJsonPrivate::Value *v = a->at(i);
+ v->type = (value.t == QJsonValue::Undefined ? QJsonValue::Null : value.t);
+ v->latinOrIntValue = compressed;
+ v->latinKey = false;
+ v->value = QBinaryJsonPrivate::Value::valueToStore(value, valueOffset);
+ if (valueSize) {
+ QBinaryJsonPrivate::Value::copyData(value, reinterpret_cast<char *>(a) + valueOffset,
+ compressed);
+ }
+}
+
+char *QBinaryJsonArray::takeRawData(uint *size)
+{
+ if (d)
+ return d->takeRawData(size);
+ *size = 0;
+ return nullptr;
+}
+
+bool QBinaryJsonArray::detach(uint reserve)
+{
+ if (!d) {
+ if (reserve >= QBinaryJsonPrivate::Value::MaxSize) {
+ qWarning("QBinaryJson: Document too large to store in data structure");
+ return false;
+ }
+ d = new QBinaryJsonPrivate::MutableData(reserve, QJsonValue::Array);
+ a = static_cast<QBinaryJsonPrivate::Array *>(d->header->root());
+ d->ref.ref();
+ return true;
+ }
+ if (reserve == 0 && d->ref.loadRelaxed() == 1)
+ return true;
+
+ QBinaryJsonPrivate::MutableData *x = d->clone(a, reserve);
+ if (!x)
+ return false;
+ x->ref.ref();
+ if (!d->ref.deref())
+ delete d;
+ d = x;
+ a = static_cast<QBinaryJsonPrivate::Array *>(d->header->root());
+ return true;
+}
+
+void QBinaryJsonArray::compact()
+{
+ if (!d || !d->compactionCounter)
+ return;
+
+ detach();
+ d->compact();
+ a = static_cast<QBinaryJsonPrivate::Array *>(d->header->root());
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/corelib/serialization/qbinaryjsonarray_p.h b/src/corelib/serialization/qbinaryjsonarray_p.h
new file mode 100644
index 0000000000..2bb8fed387
--- /dev/null
+++ b/src/corelib/serialization/qbinaryjsonarray_p.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 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 QBINARYJSONARRAY_P_H
+#define QBINARYJSONARRAY_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 "qbinaryjsonvalue_p.h"
+
+QT_REQUIRE_CONFIG(binaryjson);
+
+QT_BEGIN_NAMESPACE
+
+class QBinaryJsonArray
+{
+ Q_DISABLE_COPY(QBinaryJsonArray)
+public:
+ QBinaryJsonArray() = default;
+ ~QBinaryJsonArray();
+
+ QBinaryJsonArray(QBinaryJsonArray &&other) noexcept
+ : d(other.d),
+ a(other.a)
+ {
+ other.d = nullptr;
+ other.a = nullptr;
+ }
+
+ QBinaryJsonArray &operator =(QBinaryJsonArray &&other) noexcept
+ {
+ qSwap(d, other.d);
+ qSwap(a, other.a);
+ return *this;
+ }
+
+ static QBinaryJsonArray fromJsonArray(const QJsonArray &array);
+ char *takeRawData(uint *size);
+
+private:
+ friend class QBinaryJsonValue;
+
+ void append(const QBinaryJsonValue &value);
+ void compact();
+ bool detach(uint reserve = 0);
+
+ QBinaryJsonPrivate::MutableData *d = nullptr;
+ QBinaryJsonPrivate::Array *a = nullptr;
+};
+
+QT_END_NAMESPACE
+
+#endif // QBINARYJSONARRAY_P_H
diff --git a/src/corelib/serialization/qbinaryjsonobject.cpp b/src/corelib/serialization/qbinaryjsonobject.cpp
new file mode 100644
index 0000000000..3186ab6087
--- /dev/null
+++ b/src/corelib/serialization/qbinaryjsonobject.cpp
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 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 "qbinaryjsonobject_p.h"
+#include "qbinaryjson_p.h"
+
+#include <qjsonobject.h>
+
+QT_BEGIN_NAMESPACE
+
+QBinaryJsonObject::~QBinaryJsonObject()
+{
+ if (d && !d->ref.deref())
+ delete d;
+}
+
+QBinaryJsonObject QBinaryJsonObject::fromJsonObject(const QJsonObject &object)
+{
+ QBinaryJsonObject binary;
+ for (auto it = object.begin(), end = object.end(); it != end; ++it)
+ binary.insert(it.key(), QBinaryJsonValue::fromJsonValue(it.value()));
+ if (binary.d) // We want to compact it as it is a root item now
+ binary.d->compactionCounter++;
+ binary.compact();
+ return binary;
+}
+
+void QBinaryJsonObject::insert(const QString &key, const QBinaryJsonValue &value)
+{
+ bool latinOrIntValue;
+ uint valueSize = QBinaryJsonPrivate::Value::requiredStorage(value, &latinOrIntValue);
+
+ bool latinKey = QBinaryJsonPrivate::useCompressed(key);
+ uint valueOffset = sizeof(QBinaryJsonPrivate::Entry)
+ + QBinaryJsonPrivate::qStringSize(key, latinKey);
+ uint requiredSize = valueOffset + valueSize;
+
+ if (!detach(requiredSize + sizeof(QBinaryJsonPrivate::offset))) // offset for the new index entry
+ return;
+
+ if (!o->length)
+ o->tableOffset = sizeof(QBinaryJsonPrivate::Object);
+
+ bool keyExists = false;
+ uint pos = o->indexOf(key, &keyExists);
+ if (keyExists)
+ ++d->compactionCounter;
+
+ uint off = o->reserveSpace(requiredSize, pos, 1, keyExists);
+ if (!off)
+ return;
+
+ QBinaryJsonPrivate::Entry *e = o->entryAt(pos);
+ e->value.type = value.t;
+ e->value.latinKey = latinKey;
+ e->value.latinOrIntValue = latinOrIntValue;
+ e->value.value = QBinaryJsonPrivate::Value::valueToStore(
+ value, reinterpret_cast<char *>(e) - reinterpret_cast<char *>(o) + valueOffset);
+ QBinaryJsonPrivate::copyString(reinterpret_cast<char *>(e + 1), key, latinKey);
+ if (valueSize) {
+ QBinaryJsonPrivate::Value::copyData(value, reinterpret_cast<char *>(e) + valueOffset,
+ latinOrIntValue);
+ }
+
+ if (d->compactionCounter > 32U && d->compactionCounter >= unsigned(o->length) / 2U)
+ compact();
+}
+
+char *QBinaryJsonObject::takeRawData(uint *size) const
+{
+ if (d)
+ return d->takeRawData(size);
+ *size = 0;
+ return nullptr;
+}
+
+bool QBinaryJsonObject::detach(uint reserve)
+{
+ if (!d) {
+ if (reserve >= QBinaryJsonPrivate::Value::MaxSize) {
+ qWarning("QBinaryJson: Document too large to store in data structure");
+ return false;
+ }
+ d = new QBinaryJsonPrivate::MutableData(reserve, QJsonValue::Object);
+ o = static_cast<QBinaryJsonPrivate::Object *>(d->header->root());
+ d->ref.ref();
+ return true;
+ }
+ if (reserve == 0 && d->ref.loadRelaxed() == 1)
+ return true;
+
+ QBinaryJsonPrivate::MutableData *x = d->clone(o, reserve);
+ if (!x)
+ return false;
+ x->ref.ref();
+ if (!d->ref.deref())
+ delete d;
+ d = x;
+ o = static_cast<QBinaryJsonPrivate::Object *>(d->header->root());
+ return true;
+}
+
+void QBinaryJsonObject::compact()
+{
+ if (!d || !d->compactionCounter)
+ return;
+
+ detach();
+ d->compact();
+ o = static_cast<QBinaryJsonPrivate::Object *>(d->header->root());
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qbinaryjsonobject_p.h b/src/corelib/serialization/qbinaryjsonobject_p.h
new file mode 100644
index 0000000000..c0991ac339
--- /dev/null
+++ b/src/corelib/serialization/qbinaryjsonobject_p.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 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 QBINARYJSONOBJECT_H
+#define QBINARYJSONOBJECT_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 "qbinaryjsonvalue_p.h"
+
+QT_REQUIRE_CONFIG(binaryjson);
+
+QT_BEGIN_NAMESPACE
+
+class QBinaryJsonObject
+{
+ Q_DISABLE_COPY(QBinaryJsonObject)
+public:
+ QBinaryJsonObject() = default;
+ ~QBinaryJsonObject();
+
+ QBinaryJsonObject(QBinaryJsonObject &&other) noexcept
+ : d(other.d), o(other.o)
+ {
+ other.d = nullptr;
+ other.o = nullptr;
+ }
+
+ QBinaryJsonObject &operator =(QBinaryJsonObject &&other) noexcept
+ {
+ qSwap(d, other.d);
+ qSwap(o, other.o);
+ return *this;
+ }
+
+ static QBinaryJsonObject fromJsonObject(const QJsonObject &object);
+ char *takeRawData(uint *size) const;
+
+private:
+ friend class QBinaryJsonValue;
+
+ void insert(const QString &key, const QBinaryJsonValue &value);
+ bool detach(uint reserve = 0);
+ void compact();
+
+ QBinaryJsonPrivate::MutableData *d = nullptr;
+ QBinaryJsonPrivate::Object *o = nullptr;
+};
+
+QT_END_NAMESPACE
+
+#endif // QBINARYJSONOBJECT_P_H
diff --git a/src/corelib/serialization/qbinaryjsonvalue.cpp b/src/corelib/serialization/qbinaryjsonvalue.cpp
new file mode 100644
index 0000000000..5e3a01ad38
--- /dev/null
+++ b/src/corelib/serialization/qbinaryjsonvalue.cpp
@@ -0,0 +1,155 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 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 "qbinaryjsonobject_p.h"
+#include "qbinaryjsonvalue_p.h"
+#include "qbinaryjsonarray_p.h"
+#include "qbinaryjson_p.h"
+
+#include <qjsonarray.h>
+#include <qjsonobject.h>
+
+QT_BEGIN_NAMESPACE
+
+QBinaryJsonValue::QBinaryJsonValue(QBinaryJsonPrivate::MutableData *data,
+ QBinaryJsonPrivate::Base *parent,
+ const QBinaryJsonPrivate::Value &v)
+ : t(QJsonValue::Type(uint(v.type)))
+{
+ switch (t) {
+ case QJsonValue::Undefined:
+ case QJsonValue::Null:
+ dbl = 0;
+ break;
+ case QJsonValue::Bool:
+ b = v.toBoolean();
+ break;
+ case QJsonValue::Double:
+ dbl = v.toDouble(parent);
+ break;
+ case QJsonValue::String: {
+ QString s = v.toString(parent);
+ stringData = s.data_ptr();
+ stringData->ref.ref();
+ break;
+ }
+ case QJsonValue::Array:
+ case QJsonValue::Object:
+ d = data;
+ base = v.base(parent);
+ break;
+ }
+ if (d)
+ d->ref.ref();
+}
+
+QBinaryJsonValue::QBinaryJsonValue(QString string)
+ : stringData(*reinterpret_cast<QStringData **>(&string)), t(QJsonValue::String)
+{
+ stringData->ref.ref();
+}
+
+QBinaryJsonValue::QBinaryJsonValue(const QBinaryJsonArray &a)
+ : base(a.a), d(a.d), t(QJsonValue::Array)
+{
+ if (d)
+ d->ref.ref();
+}
+
+QBinaryJsonValue::QBinaryJsonValue(const QBinaryJsonObject &o)
+ : base(o.o), d(o.d), t(QJsonValue::Object)
+{
+ if (d)
+ d->ref.ref();
+}
+
+QBinaryJsonValue::~QBinaryJsonValue()
+{
+ if (t == QJsonValue::String && stringData && !stringData->ref.deref())
+ free(stringData);
+
+ if (d && !d->ref.deref())
+ delete d;
+}
+
+QBinaryJsonValue QBinaryJsonValue::fromJsonValue(const QJsonValue &json)
+{
+ switch (json.type()) {
+ case QJsonValue::Bool:
+ return QBinaryJsonValue(json.toBool());
+ case QJsonValue::Double:
+ return QBinaryJsonValue(json.toDouble());
+ case QJsonValue::String:
+ return QBinaryJsonValue(json.toString());
+ case QJsonValue::Array:
+ return QBinaryJsonArray::fromJsonArray(json.toArray());
+ case QJsonValue::Object:
+ return QBinaryJsonObject::fromJsonObject(json.toObject());
+ case QJsonValue::Null:
+ return QBinaryJsonValue(QJsonValue::Null);
+ case QJsonValue::Undefined:
+ return QBinaryJsonValue(QJsonValue::Undefined);
+ }
+ Q_UNREACHABLE();
+ return QBinaryJsonValue(QJsonValue::Null);
+}
+
+QString QBinaryJsonValue::toString() const
+{
+ if (t != QJsonValue::String)
+ return QString();
+ stringData->ref.ref(); // the constructor below doesn't add a ref.
+ QStringDataPtr holder = { stringData };
+ return QString(holder);
+}
+
+void QBinaryJsonValue::detach()
+{
+ if (!d)
+ return;
+
+ QBinaryJsonPrivate::MutableData *x = d->clone(base);
+ x->ref.ref();
+ if (!d->ref.deref())
+ delete d;
+ d = x;
+ base = static_cast<QBinaryJsonPrivate::Object *>(d->header->root());
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qbinaryjsonvalue_p.h b/src/corelib/serialization/qbinaryjsonvalue_p.h
new file mode 100644
index 0000000000..498fc62ecd
--- /dev/null
+++ b/src/corelib/serialization/qbinaryjsonvalue_p.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 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 QBINARYJSONVALUE_P_H
+#define QBINARYJSONVALUE_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 <QtCore/qglobal.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qjsonvalue.h>
+
+QT_REQUIRE_CONFIG(binaryjson);
+
+QT_BEGIN_NAMESPACE
+
+class QBinaryJsonArray;
+class QBinaryJsonObject;
+
+namespace QBinaryJsonPrivate {
+class ConstData;
+class MutableData;
+class Base;
+class Value;
+class Object;
+class Array;
+}
+
+class Q_CORE_EXPORT QBinaryJsonValue
+{
+ Q_DISABLE_COPY(QBinaryJsonValue)
+public:
+ explicit QBinaryJsonValue(QJsonValue::Type type) : ui(0), t(type) {}
+ explicit QBinaryJsonValue(bool b) : b(b), t(QJsonValue::Bool) {}
+ explicit QBinaryJsonValue(double n) : dbl(n), t(QJsonValue::Double) {}
+ explicit QBinaryJsonValue(QString s);
+ QBinaryJsonValue(const QBinaryJsonArray &a);
+ QBinaryJsonValue(const QBinaryJsonObject &o);
+
+ ~QBinaryJsonValue();
+
+ QBinaryJsonValue(QBinaryJsonValue &&other) noexcept
+ : ui(other.ui),
+ d(other.d),
+ t(other.t)
+ {
+ other.ui = 0;
+ other.d = nullptr;
+ other.t = QJsonValue::Null;
+ }
+
+ QBinaryJsonValue &operator =(QBinaryJsonValue &&other) noexcept
+ {
+ qSwap(ui, other.ui);
+ qSwap(d, other.d);
+ qSwap(t, other.t);
+ return *this;
+ }
+
+ static QBinaryJsonValue fromJsonValue(const QJsonValue &json);
+ QJsonValue::Type type() const { return t; }
+ bool toBool() const { return (t == QJsonValue::Bool) && b; }
+ double toDouble() const { return (t == QJsonValue::Double) ? dbl : 0; }
+ QString toString() const;
+
+private:
+ friend class QBinaryJsonPrivate::Value;
+ friend class QBinaryJsonArray;
+ friend class QBinaryJsonObject;
+
+ QBinaryJsonValue(QBinaryJsonPrivate::MutableData *d, QBinaryJsonPrivate::Base *parent,
+ const QBinaryJsonPrivate::Value &v);
+
+ void detach();
+
+ union {
+ quint64 ui;
+ bool b;
+ double dbl;
+ QStringData *stringData;
+ const QBinaryJsonPrivate::Base *base;
+ };
+ QBinaryJsonPrivate::MutableData *d = nullptr; // needed for Objects and Arrays
+ QJsonValue::Type t = QJsonValue::Null;
+};
+
+QT_END_NAMESPACE
+
+#endif // QBINARYJSONVALUE_P_H
diff --git a/src/corelib/serialization/qcborcommon.cpp b/src/corelib/serialization/qcborcommon.cpp
new file mode 100644
index 0000000000..37fb198744
--- /dev/null
+++ b/src/corelib/serialization/qcborcommon.cpp
@@ -0,0 +1,328 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Copyright (C) 2019 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$
+**
+****************************************************************************/
+
+#define CBOR_NO_ENCODER_API
+#define CBOR_NO_PARSER_API
+#include "qcborcommon_p.h"
+
+#include <QtCore/qdatastream.h>
+
+QT_BEGIN_NAMESPACE
+
+#include <cborerrorstrings.c>
+
+/*!
+ \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()
+ */
+
+#if !defined(QT_NO_DATASTREAM)
+QDataStream &operator<<(QDataStream &ds, QCborSimpleType st)
+{
+ return ds << quint8(st);
+}
+
+QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st)
+{
+ quint8 v;
+ ds >> v;
+ st = QCborSimpleType(v);
+ return ds;
+}
+#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.
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 0
+
+ \sa QCborKnownTags, QCborStreamWriter::append(QCborTag),
+ QCborStreamReader::isTag(), QCborStreamReader::toTag(),
+ QCborValue::isTag(), QCborValue::tag()
+ */
+
+/*!
+ \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()
+ */
+
+/*!
+ \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-8 (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 string from TinyCBOR
+ CborError err = CborError(int(c));
+ return QString::fromLatin1(cbor_error_string(err));
+}
+
+QT_END_NAMESPACE
+
+#ifndef QT_BOOTSTRAPPED
+#include "moc_qcborcommon.cpp"
+#endif
diff --git a/src/corelib/serialization/qcborcommon.h b/src/corelib/serialization/qcborcommon.h
index 3dfe50cd09..bec46399ce 100644
--- a/src/corelib/serialization/qcborcommon.h
+++ b/src/corelib/serialization/qcborcommon.h
@@ -148,6 +148,8 @@ inline uint qHash(QCborTag tag, uint seed = 0)
return qHash(quint64(tag), seed);
}
+enum class QCborNegativeInteger : quint64 {};
+
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QCborTag)
diff --git a/src/corelib/serialization/qcborcommon_p.h b/src/corelib/serialization/qcborcommon_p.h
new file mode 100644
index 0000000000..9b7f4b7099
--- /dev/null
+++ b/src/corelib/serialization/qcborcommon_p.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Intel Corporation.
+** Copyright (C) 2019 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 QCBORCOMMON_P_H
+#define QCBORCOMMON_P_H
+
+#include "qcborcommon.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
+
+#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")
+
+#define CBOR_NO_VALIDATION_API 1
+#define CBOR_NO_PRETTY_API 1
+#define CBOR_API static inline
+#define CBOR_PRIVATE_API static inline
+#define CBOR_INLINE_API static inline
+
+#include <cbor.h>
+
+QT_WARNING_POP
+
+Q_DECLARE_TYPEINFO(CborValue, Q_PRIMITIVE_TYPE);
+
+QT_END_NAMESPACE
+
+#endif // QCBORCOMMON_P_H
diff --git a/src/corelib/serialization/qcborstream.h b/src/corelib/serialization/qcborstream.h
index 7a451e63ac..f2b88820cd 100644
--- a/src/corelib/serialization/qcborstream.h
+++ b/src/corelib/serialization/qcborstream.h
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@@ -40,228 +41,17 @@
#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>
+#include <QtCore/qglobal.h>
-// See qcborcommon.h for why we check
-#if defined(QT_X11_DEFINES_FOUND)
-# undef True
-# undef False
+#if QT_CONFIG(cborstreamreader)
+#include <QtCore/qcborstreamreader.h>
#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)); }
+#if QT_CONFIG(cborstreamwriter)
+#include <QtCore/qcborstreamwriter.h>
#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 UIntFP = typename QIntegerForSizeof<FP>::Unsigned;
- UIntFP u = UIntFP(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_BEGIN_NAMESPACE
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/qcborstream.cpp b/src/corelib/serialization/qcborstreamreader.cpp
index c598eee213..c983436606 100644
--- a/src/corelib/serialization/qcborstream.cpp
+++ b/src/corelib/serialization/qcborstreamreader.cpp
@@ -37,84 +37,46 @@
**
****************************************************************************/
-#include "qcborstream.h"
+#include "qcborstreamreader.h"
+
+#define CBOR_NO_ENCODER_API
+#include <private/qcborcommon_p.h>
#include <private/qnumeric_p.h>
#include <private/qutfcodec_p.h>
-#include <qbuffer.h>
#include <qdebug.h>
#include <qstack.h>
-#include <qdatastream.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_ENCODER_NO_CHECK_USER
-
-#define CBOR_NO_VALIDATION_API 1
-#define CBOR_NO_PRETTY_API 1
-#define CBOR_API static inline
-#define CBOR_PRIVATE_API static inline
-#define CBOR_INLINE_API static inline
-
-#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"
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_MSVC(4334) // '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
+
+#include <cborparser.c>
+
+QT_WARNING_POP
-// 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_get_half_float_as_float(const CborValue *, float *)
-{
- Q_UNREACHABLE();
- return CborErrorInternalError;
-}
-static CborError cbor_encode_float_as_half_float(CborEncoder *, float)
+static CborError Q_DECL_UNUSED cbor_value_get_half_float_as_float(const CborValue *, float *)
{
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);
@@ -130,1195 +92,6 @@ 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_DATASTREAM)
-QDataStream &operator<<(QDataStream &ds, QCborSimpleType st)
-{
- return ds << quint8(st);
-}
-
-QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st)
-{
- quint8 v;
- ds >> v;
- st = QCborSimpleType(v);
- return ds;
-}
-#endif
-
-#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.
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 0
-
- \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-8 (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).
- */
-
-// Convert from CborError to QCborError.
-//
-// Centralized in a function in case we need to make more adjustments in the
-// future.
-static QCborError fromCborError(CborError err)
-{
- return { QCborError::Code(int(err)) };
-}
-
-// Convert to CborError from QCborError.
-//
-// Centralized in a function in case we need to make more adjustments in the
-// future.
-static CborError toCborError(QCborError c)
-{
- return CborError(int(c.c));
-}
-
-/*!
- \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 string from TinyCBOR
- CborError err = toCborError(*this);
- 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
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 1
-
- \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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 2
-
- 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.
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 3
-
- 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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 4
-
- \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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 5
-
- \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:
- \snippet code/src_corelib_serialization_qcborstream.cpp 6
-
- 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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 7
-
- 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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 8
-
- \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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 9
-
- \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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 10
-
- \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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 11
-
- \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.
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 12
-
- \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 \c qfloat16 if there's no loss of precision and append it, or
- instead append the \tt float.
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 13
-
- \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.
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 14
-
- \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.
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 15
-
- 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(), 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):
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 16
-
- \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.
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 17
-
- \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):
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 18
-
- \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):
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 19
-
- \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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 20
-
- \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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 21
-
- \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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 22
-
- \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:
-
- \snippet code/src_corelib_serialization_qcborstream.cpp 23
-
- \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
@@ -1868,7 +641,7 @@ public:
if (err != CborErrorUnexpectedEOF)
corrupt = true;
- lastError = fromCborError(err);
+ lastError = QCborError { QCborError::Code(int(err)) };
}
void updateBufferAfterString(qsizetype offset, qsizetype size)
@@ -2757,5 +1530,4 @@ QCborStreamReader::readStringChunk(char *ptr, qsizetype maxlen)
QT_END_NAMESPACE
-#include "moc_qcborcommon.cpp"
-#include "moc_qcborstream.cpp"
+#include "moc_qcborstreamreader.cpp"
diff --git a/src/corelib/serialization/qcborstreamreader.h b/src/corelib/serialization/qcborstreamreader.h
new file mode 100644
index 0000000000..6d5feccfcf
--- /dev/null
+++ b/src/corelib/serialization/qcborstreamreader.h
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** 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 QCBORSTREAMREADER_H
+#define QCBORSTREAMREADER_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>
+
+QT_REQUIRE_CONFIG(cborstreamreader);
+
+// See qcborcommon.h for why we check
+#if defined(QT_X11_DEFINES_FOUND)
+# undef True
+# undef False
+#endif
+
+QT_BEGIN_NAMESPACE
+
+class QIODevice;
+
+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 UIntFP = typename QIntegerForSizeof<FP>::Unsigned;
+ UIntFP u = UIntFP(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 // QCBORSTREAMREADER_H
diff --git a/src/corelib/serialization/qcborstreamwriter.cpp b/src/corelib/serialization/qcborstreamwriter.cpp
new file mode 100644
index 0000000000..9d78785416
--- /dev/null
+++ b/src/corelib/serialization/qcborstreamwriter.cpp
@@ -0,0 +1,868 @@
+/****************************************************************************
+**
+** 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 "qcborstreamwriter.h"
+
+#define CBOR_NO_PARSER_API
+#include <private/qcborcommon_p.h>
+
+#include <private/qnumeric_p.h>
+#include <qbuffer.h>
+#include <qdebug.h>
+#include <qstack.h>
+
+QT_BEGIN_NAMESPACE
+
+static CborError qt_cbor_encoder_write_callback(void *token, const void *data, size_t len, CborEncoderAppendType);
+#define CBOR_ENCODER_WRITER_CONTROL 1
+#define CBOR_ENCODER_WRITE_FUNCTION qt_cbor_encoder_write_callback
+#define CBOR_ENCODER_NO_CHECK_USER
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_MSVC(4334) // '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
+
+#include <cborencoder.c>
+
+QT_WARNING_POP
+
+// silence compilers that complain about this being a static function declared
+// but never defined
+static CborError Q_DECL_UNUSED cbor_encoder_close_container_checked(CborEncoder*, const CborEncoder*)
+{
+ Q_UNREACHABLE();
+ return CborErrorInternalError;
+}
+
+static CborError Q_DECL_UNUSED cbor_encode_float_as_half_float(CborEncoder *, float)
+{
+ Q_UNREACHABLE();
+ return CborErrorInternalError;
+}
+
+Q_DECLARE_TYPEINFO(CborEncoder, Q_PRIMITIVE_TYPE);
+
+/*!
+ \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
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 1
+
+ \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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 2
+
+ 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.
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 3
+
+ 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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 4
+
+ \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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 5
+
+ \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:
+ \snippet code/src_corelib_serialization_qcborstream.cpp 6
+
+ 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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 7
+
+ 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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 8
+
+ \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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 9
+
+ \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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 10
+
+ \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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 11
+
+ \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.
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 12
+
+ \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));
+}
+
+#ifndef QT_BOOTSTRAPPED
+/*!
+ \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 \c qfloat16 if there's no loss of precision and append it, or
+ instead append the \tt float.
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 13
+
+ \sa QCborStreamReader::isFloat16(), QCborStreamReader::toFloat16()
+ */
+void QCborStreamWriter::append(qfloat16 f)
+{
+ d->executeAppend(cbor_encode_half_float, static_cast<const void *>(&f));
+}
+#endif // QT_BOOTSTRAPPED
+
+/*!
+ \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.
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 14
+
+ \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.
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 15
+
+ 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(), 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):
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 16
+
+ \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.
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 17
+
+ \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):
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 18
+
+ \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):
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 19
+
+ \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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 20
+
+ \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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 21
+
+ \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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 22
+
+ \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:
+
+ \snippet code/src_corelib_serialization_qcborstream.cpp 23
+
+ \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();
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qcborstreamwriter.h b/src/corelib/serialization/qcborstreamwriter.h
new file mode 100644
index 0000000000..f8c94ceb93
--- /dev/null
+++ b/src/corelib/serialization/qcborstreamwriter.h
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** 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 QCBORSTREAMWRITER_H
+#define QCBORSTREAMWRITER_H
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qcborcommon.h>
+#include <QtCore/qscopedpointer.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qstringview.h>
+#ifndef QT_BOOTSTRAPPED
+#include <QtCore/qfloat16.h>
+#endif
+
+QT_REQUIRE_CONFIG(cborstreamwriter);
+
+// See qcborcommon.h for why we check
+#if defined(QT_X11_DEFINES_FOUND)
+# undef True
+# undef False
+#endif
+
+QT_BEGIN_NAMESPACE
+
+class QIODevice;
+
+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); }
+#ifndef QT_BOOTSTRAPPED
+ void append(qfloat16 f);
+#endif
+ 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;
+};
+
+QT_END_NAMESPACE
+
+#if defined(QT_X11_DEFINES_FOUND)
+# define True 1
+# define False 0
+#endif
+
+#endif // QCBORSTREAMWRITER_H
diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp
index 4052bfa22e..db2840704c 100644
--- a/src/corelib/serialization/qcborvalue.cpp
+++ b/src/corelib/serialization/qcborvalue.cpp
@@ -42,7 +42,14 @@
#include "qdatastream.h"
#include "qcborarray.h"
#include "qcbormap.h"
-#include "qcborstream.h"
+
+#if QT_CONFIG(cborstreamreader)
+#include "qcborstreamreader.h"
+#endif
+
+#if QT_CONFIG(cborstreamwriter)
+#include "qcborstreamwriter.h"
+#endif
#include <qendian.h>
#include <qlocale.h>
@@ -795,6 +802,7 @@ static QCborValue::Type convertToExtendedType(QCborContainerPrivate *d)
break;
}
+#ifndef QT_BOOTSTRAPPED
case qint64(QCborKnownTags::Url):
if (e.type == QCborValue::String) {
if (b) {
@@ -808,13 +816,16 @@ static QCborValue::Type convertToExtendedType(QCborContainerPrivate *d)
return QCborValue::Url;
}
break;
+#endif // QT_BOOTSTRAPPED
+#if QT_CONFIG(regularexpression)
case quint64(QCborKnownTags::RegularExpression):
if (e.type == QCborValue::String) {
// no normalization is necessary
return QCborValue::RegularExpression;
}
break;
+#endif // QT_CONFIG(regularexpression)
case qint64(QCborKnownTags::Uuid):
if (e.type == QCborValue::ByteArray) {
@@ -833,15 +844,20 @@ static QCborValue::Type convertToExtendedType(QCborContainerPrivate *d)
return QCborValue::Tag;
}
+#if QT_CONFIG(cborstreamreader)
// in qcborstream.cpp
extern void qt_cbor_stream_set_error(QCborStreamReaderPrivate *d, QCborError error);
+#endif
+#if QT_CONFIG(cborstreamwriter)
static void writeDoubleToCbor(QCborStreamWriter &writer, double d, QCborValue::EncodingOptions opt)
{
if (qt_is_nan(d)) {
- if (opt & QCborValue::UseFloat16) {
+ if (opt & QCborValue::UseFloat) {
+#ifndef QT_BOOTSTRAPPED
if ((opt & QCborValue::UseFloat16) == QCborValue::UseFloat16)
return writer.append(std::numeric_limits<qfloat16>::quiet_NaN());
+#endif
return writer.append(std::numeric_limits<float>::quiet_NaN());
}
return writer.append(qt_qnan());
@@ -858,15 +874,17 @@ static void writeDoubleToCbor(QCborStreamWriter &writer, double d, QCborValue::E
}
}
- if (opt & QCborValue::UseFloat16) {
+ if (opt & QCborValue::UseFloat) {
float f = float(d);
if (f == d) {
// no data loss, we could use float
+#ifndef QT_BOOTSTRAPPED
if ((opt & QCborValue::UseFloat16) == QCborValue::UseFloat16) {
qfloat16 f16 = f;
if (f16 == f)
return writer.append(f16);
}
+#endif
return writer.append(f);
}
@@ -874,6 +892,7 @@ static void writeDoubleToCbor(QCborStreamWriter &writer, double d, QCborValue::E
writer.append(d);
}
+#endif // QT_CONFIG(cborstreamwriter)
static inline int typeOrder(Element e1, Element e2)
{
@@ -1296,6 +1315,7 @@ int QCborMap::compare(const QCborMap &other) const noexcept
return compareContainer(d.data(), other.d.data());
}
+#if QT_CONFIG(cborstreamwriter)
static void encodeToCbor(QCborStreamWriter &writer, const QCborContainerPrivate *d, qsizetype idx,
QCborValue::EncodingOptions opt)
{
@@ -1383,7 +1403,9 @@ static void encodeToCbor(QCborStreamWriter &writer, const QCborContainerPrivate
qWarning("QCborValue: found unknown type 0x%x", e.type);
}
}
+#endif // QT_CONFIG(cborstreamwriter)
+#if QT_CONFIG(cborstreamreader)
static inline double integerOutOfRange(const QCborStreamReader &reader)
{
Q_ASSERT(reader.isInteger());
@@ -1640,6 +1662,7 @@ void QCborContainerPrivate::decodeFromCbor(QCborStreamReader &reader)
if (reader.lastError() == QCborError::NoError)
reader.leaveContainer();
}
+#endif // QT_CONFIG(cborstreamreader)
/*!
Creates a QCborValue with byte array value \a ba. The value can later be
@@ -1774,6 +1797,7 @@ QCborValue::QCborValue(const QDateTime &dt)
container->elements[1].type = String;
}
+#ifndef QT_BOOTSTRAPPED
/*!
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().
@@ -1790,6 +1814,7 @@ QCborValue::QCborValue(const QUrl &url)
t = Url;
container->elements[1].type = String;
}
+#endif
#if QT_CONFIG(regularexpression)
/*!
@@ -1943,6 +1968,7 @@ QDateTime QCborValue::toDateTime(const QDateTime &defaultValue) const
return QDateTime::fromString(byteData->asLatin1(), Qt::ISODateWithMs);
}
+#ifndef QT_BOOTSTRAPPED
/*!
Returns the URL value stored in this QCborValue, if it is of the URL
extended type. Otherwise, it returns \a defaultValue.
@@ -1963,6 +1989,7 @@ QUrl QCborValue::toUrl(const QUrl &defaultValue) const
return QUrl::fromEncoded(byteData->asByteArrayView());
}
+#endif
#if QT_CONFIG(regularexpression)
/*!
@@ -2335,6 +2362,7 @@ QCborValueRef QCborValue::operator[](qint64 key)
return { container, index };
}
+#if QT_CONFIG(cborstreamreader)
/*!
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
@@ -2449,7 +2477,9 @@ QCborValue QCborValue::fromCbor(const QByteArray &ba, QCborParserError *error)
overload of this function that accepts a QByteArray, also passing \a error,
if provided.
*/
+#endif // QT_CONFIG(cborstreamreader)
+#if QT_CONFIG(cborstreamwriter)
/*!
Encodes this QCborValue object to its CBOR representation, using the
options specified in \a opt, and return the byte array containing that
@@ -2572,6 +2602,7 @@ void QCborValueRef::toCbor(QCborStreamWriter &writer, QCborValue::EncodingOption
{
concrete().toCbor(writer, opt);
}
+#endif // QT_CONFIG(cborstreamwriter)
void QCborValueRef::assign(QCborValueRef that, const QCborValue &other)
{
@@ -2891,8 +2922,10 @@ uint qHash(const QCborValue &value, uint seed)
return qHash(value.toDouble(), seed);
case QCborValue::DateTime:
return qHash(value.toDateTime(), seed);
+#ifndef QT_BOOTSTRAPPED
case QCborValue::Url:
return qHash(value.toUrl(), seed);
+#endif
#if QT_CONFIG(regularexpression)
case QCborValue::RegularExpression:
return qHash(value.toRegularExpression(), seed);
@@ -2945,8 +2978,10 @@ static QDebug debugContents(QDebug &dbg, const QCborValue &v)
}
case QCborValue::DateTime:
return dbg << v.toDateTime();
+#ifndef QT_BOOTSTRAPPED
case QCborValue::Url:
return dbg << v.toUrl();
+#endif
#if QT_CONFIG(regularexpression)
case QCborValue::RegularExpression:
return dbg << v.toRegularExpression();
@@ -2968,6 +3003,112 @@ QDebug operator<<(QDebug dbg, const QCborValue &v)
dbg.nospace() << "QCborValue(";
return debugContents(dbg, v) << ')';
}
+
+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;
+}
+
+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) << ')';
+}
+
+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;
+}
+
+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 << ')';
+}
+
+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
#ifndef QT_NO_DATASTREAM
@@ -2995,4 +3136,6 @@ QT_END_NAMESPACE
#include "qcborarray.cpp"
#include "qcbormap.cpp"
+#ifndef QT_NO_QOBJECT
#include "moc_qcborvalue.cpp"
+#endif
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h
index dcbe7efc26..f7064ac6e1 100644
--- a/src/corelib/serialization/qcborvalue.h
+++ b/src/corelib/serialization/qcborvalue.h
@@ -71,6 +71,8 @@ class QCborStreamReader;
class QCborStreamWriter;
class QDataStream;
+namespace QJsonPrivate { class Value; }
+
struct QCborParserError
{
qint64 offset = 0;
@@ -88,7 +90,9 @@ public:
enum EncodingOption {
SortKeysInMaps = 0x01,
UseFloat = 0x02,
+#ifndef QT_BOOTSTRAPPED
UseFloat16 = UseFloat | 0x04,
+#endif
UseIntegers = 0x08,
NoTransformation = 0
@@ -161,7 +165,9 @@ public:
{}
explicit QCborValue(const QDateTime &dt);
+#ifndef QT_BOOTSTRAPPED
explicit QCborValue(const QUrl &url);
+#endif
#if QT_CONFIG(regularexpression)
explicit QCborValue(const QRegularExpression &rx);
#endif
@@ -283,20 +289,26 @@ public:
static QCborValue fromJsonValue(const QJsonValue &v);
QJsonValue toJsonValue() const;
+#if QT_CONFIG(cborstreamreader)
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); }
+#endif // QT_CONFIG(cborstreamreader)
+#if QT_CONFIG(cborstreamwriter)
QByteArray toCbor(EncodingOptions opt = NoTransformation);
void toCbor(QCborStreamWriter &writer, EncodingOptions opt = NoTransformation);
+#endif
QString toDiagnosticNotation(DiagnosticNotationOptions opts = Compact) const;
private:
friend class QCborValueRef;
friend class QCborContainerPrivate;
+ friend class QJsonPrivate::Value;
+
qint64 n = 0;
QCborContainerPrivate *container = nullptr;
Type t = Undefined;
@@ -387,8 +399,10 @@ public:
{ return concrete().toString(defaultValue); }
QDateTime toDateTime(const QDateTime &defaultValue = {}) const
{ return concrete().toDateTime(defaultValue); }
+#ifndef QT_BOOTSTRAPPED
QUrl toUrl(const QUrl &defaultValue = {}) const
{ return concrete().toUrl(defaultValue); }
+#endif
#if QT_CONFIG(regularexpression)
QRegularExpression toRegularExpression(const QRegularExpression &defaultValue = {}) const
{ return concrete().toRegularExpression(defaultValue); }
@@ -431,9 +445,11 @@ public:
QVariant toVariant() const { return concrete().toVariant(); }
QJsonValue toJsonValue() const;
+#if QT_CONFIG(cborstreamwriter)
QByteArray toCbor(QCborValue::EncodingOptions opt = QCborValue::NoTransformation)
{ return concrete().toCbor(opt); }
void toCbor(QCborStreamWriter &writer, QCborValue::EncodingOptions opt = QCborValue::NoTransformation);
+#endif
QString toDiagnosticNotation(QCborValue::DiagnosticNotationOptions opt = QCborValue::Compact)
{ return concrete().toDiagnosticNotation(opt); }
diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp
index b3330d6cea..5082a8cb0d 100644
--- a/src/corelib/serialization/qdatastream.cpp
+++ b/src/corelib/serialization/qdatastream.cpp
@@ -566,6 +566,7 @@ void QDataStream::setByteOrder(ByteOrder bo)
\value Qt_5_12 Version 18 (Qt 5.12)
\value Qt_5_13 Version 19 (Qt 5.13)
\value Qt_5_14 Same as Qt_5_13
+ \value Qt_5_15 Same as Qt_5_13
\omitvalue Qt_DefaultCompiledVersion
\sa setVersion(), version()
diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h
index cfcd89333b..4d827772c8 100644
--- a/src/corelib/serialization/qdatastream.h
+++ b/src/corelib/serialization/qdatastream.h
@@ -301,7 +301,10 @@ QDataStream &readAssociativeContainer(QDataStream &s, Container &c)
c.clear();
break;
}
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
c.insertMulti(k, t);
+QT_WARNING_POP
}
return s;
@@ -321,14 +324,31 @@ template <typename Container>
QDataStream &writeAssociativeContainer(QDataStream &s, const Container &c)
{
s << quint32(c.size());
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_DEPRECATED_SINCE(5, 15)
// Deserialization should occur in the reverse order.
// Otherwise, value() will return the least recently inserted
// value instead of the most recently inserted one.
auto it = c.constEnd();
auto begin = c.constBegin();
while (it != begin) {
+ QT_WARNING_PUSH
+ QT_WARNING_DISABLE_DEPRECATED
--it;
+ QT_WARNING_POP
s << it.key() << it.value();
+#else
+ auto it = c.constBegin();
+ auto end = c.constEnd();
+ while (it != end) {
+ const auto rangeStart = it++;
+ while (it != end && rangeStart.key() == it.key())
+ ++it;
+ const qint64 last = std::distance(rangeStart, it) - 1;
+ for (qint64 i = last; i >= 0; --i) {
+ auto next = std::next(rangeStart, i);
+ s << next.key() << next.value();
+ }
+#endif
}
return s;
diff --git a/src/corelib/serialization/qjson.cpp b/src/corelib/serialization/qjson.cpp
deleted file mode 100644
index 76f1eae1ce..0000000000
--- a/src/corelib/serialization/qjson.cpp
+++ /dev/null
@@ -1,451 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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 "qjson_p.h"
-#include <qalgorithms.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace QJsonPrivate
-{
-
-static Q_CONSTEXPR Base emptyArray = { { qle_uint(sizeof(Base)) }, { 0 }, { qle_uint(0) } };
-static Q_CONSTEXPR Base emptyObject = { { qle_uint(sizeof(Base)) }, { qToLittleEndian(1u) }, { qle_uint(0) } };
-
-void Data::compact()
-{
- Q_ASSERT(sizeof(Value) == sizeof(offset));
-
- if (!compactionCounter)
- return;
-
- Base *base = header->root();
- int reserve = 0;
- if (base->is_object) {
- Object *o = static_cast<Object *>(base);
- for (int i = 0; i < (int)o->length; ++i)
- reserve += o->entryAt(i)->usedStorage(o);
- } else {
- Array *a = static_cast<Array *>(base);
- for (int i = 0; i < (int)a->length; ++i)
- reserve += (*a)[i].usedStorage(a);
- }
-
- int size = sizeof(Base) + reserve + base->length*sizeof(offset);
- int alloc = sizeof(Header) + size;
- Header *h = (Header *) malloc(alloc);
- Q_CHECK_PTR(h);
- h->tag = QJsonDocument::BinaryFormatTag;
- h->version = 1;
- Base *b = h->root();
- b->size = size;
- b->is_object = header->root()->is_object;
- b->length = base->length;
- b->tableOffset = reserve + sizeof(Array);
-
- int offset = sizeof(Base);
- if (b->is_object) {
- Object *o = static_cast<Object *>(base);
- Object *no = static_cast<Object *>(b);
-
- for (int i = 0; i < (int)o->length; ++i) {
- no->table()[i] = offset;
-
- const Entry *e = o->entryAt(i);
- Entry *ne = no->entryAt(i);
- int s = e->size();
- memcpy(ne, e, s);
- offset += s;
- int dataSize = e->value.usedStorage(o);
- if (dataSize) {
- memcpy((char *)no + offset, e->value.data(o), dataSize);
- ne->value.value = offset;
- offset += dataSize;
- }
- }
- } else {
- Array *a = static_cast<Array *>(base);
- Array *na = static_cast<Array *>(b);
-
- for (int i = 0; i < (int)a->length; ++i) {
- const Value &v = (*a)[i];
- Value &nv = (*na)[i];
- nv = v;
- int dataSize = v.usedStorage(a);
- if (dataSize) {
- memcpy((char *)na + offset, v.data(a), dataSize);
- nv.value = offset;
- offset += dataSize;
- }
- }
- }
- Q_ASSERT(offset == (int)b->tableOffset);
-
- free(header);
- header = h;
- this->alloc = alloc;
- compactionCounter = 0;
-}
-
-bool Data::valid() const
-{
- if (header->tag != QJsonDocument::BinaryFormatTag || header->version != 1u)
- return false;
-
- bool res = false;
- Base *root = header->root();
- int maxSize = alloc - sizeof(Header);
- if (root->is_object)
- res = static_cast<Object *>(root)->isValid(maxSize);
- else
- res = static_cast<Array *>(root)->isValid(maxSize);
-
- return res;
-}
-
-
-int Base::reserveSpace(uint dataSize, int posInTable, uint numItems, bool replace)
-{
- Q_ASSERT(posInTable >= 0 && posInTable <= (int)length);
- if (size + dataSize >= Value::MaxSize) {
- qWarning("QJson: Document too large to store in data structure %d %d %d", (uint)size, dataSize, Value::MaxSize);
- return 0;
- }
-
- offset off = tableOffset;
- // move table to new position
- if (replace) {
- memmove((char *)(table()) + dataSize, table(), length*sizeof(offset));
- } else {
- memmove((char *)(table() + posInTable + numItems) + dataSize, table() + posInTable, (length - posInTable)*sizeof(offset));
- memmove((char *)(table()) + dataSize, table(), posInTable*sizeof(offset));
- }
- tableOffset += dataSize;
- for (int i = 0; i < (int)numItems; ++i)
- table()[posInTable + i] = off;
- size += dataSize;
- if (!replace) {
- length += numItems;
- size += numItems * sizeof(offset);
- }
- return off;
-}
-
-void Base::removeItems(int pos, int numItems)
-{
- Q_ASSERT(pos >= 0 && pos <= (int)length);
- if (pos + numItems < (int)length)
- memmove(table() + pos, table() + pos + numItems, (length - pos - numItems)*sizeof(offset));
- length -= numItems;
-}
-
-int Object::indexOf(QStringView key, bool *exists) const
-{
- int min = 0;
- int n = length;
- while (n > 0) {
- int half = n >> 1;
- int middle = min + half;
- if (*entryAt(middle) >= key) {
- n = half;
- } else {
- min = middle + 1;
- n -= half + 1;
- }
- }
- if (min < (int)length && *entryAt(min) == key) {
- *exists = true;
- return min;
- }
- *exists = false;
- return min;
-}
-
-int Object::indexOf(QLatin1String key, bool *exists) const
-{
- int min = 0;
- int n = length;
- while (n > 0) {
- int half = n >> 1;
- int middle = min + half;
- if (*entryAt(middle) >= key) {
- n = half;
- } else {
- min = middle + 1;
- n -= half + 1;
- }
- }
- if (min < (int)length && *entryAt(min) == key) {
- *exists = true;
- return min;
- }
- *exists = false;
- return min;
-}
-
-bool Object::isValid(int maxSize) const
-{
- if (size > (uint)maxSize || tableOffset + length*sizeof(offset) > size)
- return false;
-
- QString lastKey;
- for (uint i = 0; i < length; ++i) {
- offset entryOffset = table()[i];
- if (entryOffset + sizeof(Entry) >= tableOffset)
- return false;
- Entry *e = entryAt(i);
- if (!e->isValid(tableOffset - table()[i]))
- return false;
- QString key = e->key();
- if (key < lastKey)
- return false;
- if (!e->value.isValid(this))
- return false;
- lastKey = key;
- }
- return true;
-}
-
-
-
-bool Array::isValid(int maxSize) const
-{
- if (size > (uint)maxSize || tableOffset + length*sizeof(offset) > size)
- return false;
-
- for (uint i = 0; i < length; ++i) {
- if (!at(i).isValid(this))
- return false;
- }
- return true;
-}
-
-
-bool Entry::operator ==(QStringView key) const
-{
- if (value.latinKey)
- return (shallowLatin1Key() == key);
- else
- return (shallowKey() == key);
-}
-
-bool Entry::operator==(QLatin1String key) const
-{
- if (value.latinKey)
- return shallowLatin1Key() == key;
- else
- return shallowKey() == QString(key); // ### conversion to QString
-}
-
-bool Entry::operator ==(const Entry &other) const
-{
- if (value.latinKey) {
- if (other.value.latinKey)
- return shallowLatin1Key() == other.shallowLatin1Key();
- return shallowLatin1Key() == other.shallowKey();
- } else if (other.value.latinKey) {
- return shallowKey() == other.shallowLatin1Key();
- }
- return shallowKey() == other.shallowKey();
-}
-
-bool Entry::operator >=(const Entry &other) const
-{
- if (value.latinKey) {
- if (other.value.latinKey)
- return shallowLatin1Key() >= other.shallowLatin1Key();
- return shallowLatin1Key() >= other.shallowKey();
- } else if (other.value.latinKey) {
- return shallowKey() >= other.shallowLatin1Key();
- }
- return shallowKey() >= other.shallowKey();
-}
-
-
-int Value::usedStorage(const Base *b) const
-{
- int s = 0;
- switch (type) {
- case QJsonValue::Double:
- if (latinOrIntValue)
- break;
- s = sizeof(double);
- break;
- case QJsonValue::String: {
- char *d = data(b);
- if (latinOrIntValue)
- s = sizeof(ushort) + qFromLittleEndian(*(ushort *)d);
- else
- s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d);
- break;
- }
- case QJsonValue::Array:
- case QJsonValue::Object:
- s = base(b)->size;
- break;
- case QJsonValue::Null:
- case QJsonValue::Bool:
- default:
- break;
- }
- return alignedSize(s);
-}
-
-inline bool isValidValueOffset(uint offset, uint tableOffset)
-{
- return offset >= sizeof(Base)
- && offset + sizeof(uint) <= tableOffset;
-}
-
-bool Value::isValid(const Base *b) const
-{
- switch (type) {
- case QJsonValue::Null:
- case QJsonValue::Bool:
- return true;
- case QJsonValue::Double:
- return latinOrIntValue || isValidValueOffset(value, b->tableOffset);
- case QJsonValue::String:
- if (!isValidValueOffset(value, b->tableOffset))
- return false;
- if (latinOrIntValue)
- return asLatin1String(b).isValid(b->tableOffset - value);
- return asString(b).isValid(b->tableOffset - value);
- case QJsonValue::Array:
- return isValidValueOffset(value, b->tableOffset)
- && static_cast<Array *>(base(b))->isValid(b->tableOffset - value);
- case QJsonValue::Object:
- return isValidValueOffset(value, b->tableOffset)
- && static_cast<Object *>(base(b))->isValid(b->tableOffset - value);
- default:
- return false;
- }
-}
-
-/*!
- \internal
- */
-int Value::requiredStorage(QJsonValue &v, bool *compressed)
-{
- *compressed = false;
- switch (v.t) {
- case QJsonValue::Double:
- if (QJsonPrivate::compressedNumber(v.dbl) != INT_MAX) {
- *compressed = true;
- return 0;
- }
- return sizeof(double);
- case QJsonValue::String: {
- QString s = v.toString();
- *compressed = QJsonPrivate::useCompressed(s);
- return QJsonPrivate::qStringSize(s, *compressed);
- }
- case QJsonValue::Array:
- case QJsonValue::Object:
- if (v.d && v.d->compactionCounter) {
- v.detach();
- v.d->compact();
- v.base = static_cast<QJsonPrivate::Base *>(v.d->header->root());
- }
- return v.base ? uint(v.base->size) : sizeof(QJsonPrivate::Base);
- case QJsonValue::Undefined:
- case QJsonValue::Null:
- case QJsonValue::Bool:
- break;
- }
- return 0;
-}
-
-/*!
- \internal
- */
-uint Value::valueToStore(const QJsonValue &v, uint offset)
-{
- switch (v.t) {
- case QJsonValue::Undefined:
- case QJsonValue::Null:
- break;
- case QJsonValue::Bool:
- return v.b;
- case QJsonValue::Double: {
- int c = QJsonPrivate::compressedNumber(v.dbl);
- if (c != INT_MAX)
- return c;
- }
- Q_FALLTHROUGH();
- case QJsonValue::String:
- case QJsonValue::Array:
- case QJsonValue::Object:
- return offset;
- }
- return 0;
-}
-
-/*!
- \internal
- */
-void Value::copyData(const QJsonValue &v, char *dest, bool compressed)
-{
- switch (v.t) {
- case QJsonValue::Double:
- if (!compressed) {
- qToLittleEndian(v.ui, dest);
- }
- break;
- case QJsonValue::String: {
- QString str = v.toString();
- QJsonPrivate::copyString(dest, str, compressed);
- break;
- }
- case QJsonValue::Array:
- case QJsonValue::Object: {
- const QJsonPrivate::Base *b = v.base;
- if (!b)
- b = (v.t == QJsonValue::Array ? &emptyArray : &emptyObject);
- memcpy(dest, b, b->size);
- break;
- }
- default:
- break;
- }
-}
-
-} // namespace QJsonPrivate
-
-QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qjson_p.h b/src/corelib/serialization/qjson_p.h
index 7978bed7da..d2bbf928d0 100644
--- a/src/corelib/serialization/qjson_p.h
+++ b/src/corelib/serialization/qjson_p.h
@@ -52,743 +52,170 @@
// We mean it.
//
-#include <qjsonobject.h>
#include <qjsonvalue.h>
-#include <qjsondocument.h>
-#include <qjsonarray.h>
-#include <qatomic.h>
-#include <qstring.h>
-#include <qendian.h>
-#include <qnumeric.h>
-
-#include "private/qendian_p.h"
-#include "private/qsimd_p.h"
-
-#include <limits.h>
-#include <limits>
-#include <type_traits>
+#include <qcborvalue.h>
+#include <private/qcborvalue_p.h>
QT_BEGIN_NAMESPACE
-// in qstring.cpp
-void qt_to_latin1_unchecked(uchar *dst, const ushort *uc, qsizetype len);
-void qt_from_latin1(ushort *dst, const char *str, size_t size) noexcept;
-
-/*
- 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.
-
- In most cases the binary structure is not as space efficient as a utf8 encoded text representation, but
- much faster to access.
-
- The size requirements are:
-
- String:
- Latin1 data: 2 bytes header + string.length()
- Full Unicode: 4 bytes header + 2*(string.length())
-
- Values: 4 bytes + size of data (size can be 0 for some data)
- bool: 0 bytes
- double: 8 bytes (0 if integer with less than 27bits)
- string: see above
- array: size of array
- object: size of object
- Array: 12 bytes + 4*length + size of Value data
- Object: 12 bytes + 8*length + size of Key Strings + size of Value data
-
- For an example such as
-
- { // object: 12 + 5*8 = 52
- "firstName": "John", // key 12, value 8 = 20
- "lastName" : "Smith", // key 12, value 8 = 20
- "age" : 25, // key 8, value 0 = 8
- "address" : // key 12, object below = 140
- { // object: 12 + 4*8
- "streetAddress": "21 2nd Street", // key 16, value 16
- "city" : "New York", // key 8, value 12
- "state" : "NY", // key 8, value 4
- "postalCode" : "10021" // key 12, value 8
- }, // object total: 128
- "phoneNumber": // key: 16, value array below = 172
- [ // array: 12 + 2*4 + values below: 156
- { // object 12 + 2*8
- "type" : "home", // key 8, value 8
- "number": "212 555-1234" // key 8, value 16
- }, // object total: 68
- { // object 12 + 2*8
- "type" : "fax", // key 8, value 8
- "number": "646 555-4567" // key 8, value 16
- } // object total: 68
- ] // array total: 156
- } // great total: 412 bytes
-
- The uncompressed text file used roughly 500 bytes, so in this case we end up using about
- the same space as the text representation.
-
- Other measurements have shown a slightly bigger binary size than a compact text
- representation where all possible whitespace was stripped out.
-*/
-#define Q_DECLARE_JSONPRIVATE_TYPEINFO(Class, Flags) } Q_DECLARE_TYPEINFO(QJsonPrivate::Class, Flags); namespace QJsonPrivate {
namespace QJsonPrivate {
-class Array;
-class Object;
-class Value;
-class Entry;
-
-template<typename T>
-using q_littleendian = QLEInteger<T>;
-
-typedef q_littleendian<short> qle_short;
-typedef q_littleendian<unsigned short> qle_ushort;
-typedef q_littleendian<int> qle_int;
-typedef q_littleendian<unsigned int> qle_uint;
-
-template<int pos, int width>
-using qle_bitfield = QLEIntegerBitfield<uint, pos, width>;
-
-template<int pos, int width>
-using qle_signedbitfield = QLEIntegerBitfield<int, pos, width>;
-
-typedef qle_uint offset;
-
-// round the size up to the next 4 byte boundary
-inline int alignedSize(int size) { return (size + 3) & ~3; }
-
-const int MaxLatin1Length = 0x7fff;
-
-static inline bool useCompressed(QStringView s)
-{
- if (s.length() > MaxLatin1Length)
- return false;
- return QtPrivate::isLatin1(s);
-}
-
-static inline bool useCompressed(QLatin1String s)
-{
- return s.size() <= MaxLatin1Length;
-}
-
-template <typename T>
-static inline int qStringSize(T string, bool compress)
-{
- int l = 2 + string.size();
- if (!compress)
- l *= 2;
- return alignedSize(l);
-}
-
-// returns INT_MAX if it can't compress it into 28 bits
-static inline int compressedNumber(double d)
-{
- // this relies on details of how ieee floats are represented
- const int exponent_off = 52;
- const quint64 fraction_mask = 0x000fffffffffffffull;
- const quint64 exponent_mask = 0x7ff0000000000000ull;
-
- quint64 val;
- memcpy (&val, &d, sizeof(double));
- int exp = (int)((val & exponent_mask) >> exponent_off) - 1023;
- if (exp < 0 || exp > 25)
- return INT_MAX;
-
- quint64 non_int = val & (fraction_mask >> exp);
- if (non_int)
- return INT_MAX;
-
- bool neg = (val >> 63) != 0;
- val &= fraction_mask;
- val |= ((quint64)1 << 52);
- int res = (int)(val >> (52 - exp));
- return neg ? -res : res;
-}
-
-class Latin1String;
-
-class String
-{
-public:
- explicit String(const char *data) { d = (Data *)data; }
-
- struct Data {
- qle_uint length;
- qle_ushort utf16[1];
- };
-
- Data *d;
-
- int byteSize() const { return sizeof(uint) + sizeof(ushort) * d->length; }
- bool isValid(int maxSize) const {
- // Check byteSize() <= maxSize, avoiding integer overflow
- maxSize -= sizeof(uint);
- return maxSize >= 0 && uint(d->length) <= maxSize / sizeof(ushort);
- }
-
- inline String &operator=(QStringView str)
- {
- d->length = str.length();
- qToLittleEndian<quint16>(str.utf16(), str.length(), d->utf16);
- fillTrailingZeros();
- return *this;
- }
-
- inline String &operator=(QLatin1String str)
- {
- d->length = str.size();
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- for (int i = 0; i < str.size(); ++i)
- d->utf16[i] = str[i].unicode();
-#else
- qt_from_latin1((ushort *)d->utf16, str.data(), str.size());
-#endif
- fillTrailingZeros();
- return *this;
- }
-
- void fillTrailingZeros()
- {
- if (d->length & 1)
- d->utf16[d->length] = 0;
- }
-
- inline bool operator ==(QStringView str) const {
- int slen = str.length();
- int l = d->length;
- if (slen != l)
- return false;
- const ushort *s = (const ushort *)str.utf16();
- const qle_ushort *a = d->utf16;
- const ushort *b = s;
- while (l-- && *a == *b)
- a++,b++;
- return (l == -1);
- }
- inline bool operator !=(QStringView str) const {
- return !operator ==(str);
- }
- inline bool operator >=(QStringView str) const {
- // ###
- return toString() >= str;
- }
-
- inline bool operator<(const Latin1String &str) const;
- inline bool operator>=(const Latin1String &str) const { return !operator <(str); }
- inline bool operator ==(const Latin1String &str) const;
-
- inline bool operator ==(const String &str) const {
- if (d->length != str.d->length)
- return false;
- return !memcmp(d->utf16, str.d->utf16, d->length*sizeof(ushort));
- }
- inline bool operator<(const String &other) const;
- inline bool operator >=(const String &other) const { return !(*this < other); }
-
- inline QString toString() const {
-#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- return QString((QChar *)d->utf16, d->length);
-#else
- int l = d->length;
- QString str(l, Qt::Uninitialized);
- QChar *ch = str.data();
- for (int i = 0; i < l; ++i)
- ch[i] = QChar(d->utf16[i]);
- return str;
-#endif
- }
-
-};
-
-class Latin1String
+template<typename Element, typename ElementsIterator>
+struct ObjectIterator
{
-public:
- explicit Latin1String(const char *data) { d = (Data *)data; }
-
- struct Data {
- qle_ushort length;
- char latin1[1];
- };
- Data *d;
-
- int byteSize() const { return sizeof(ushort) + sizeof(char)*(d->length); }
- bool isValid(int maxSize) const {
- return byteSize() <= maxSize;
- }
-
- inline Latin1String &operator=(QStringView str)
- {
- int len = d->length = str.length();
- uchar *l = (uchar *)d->latin1;
- const ushort *uc = (const ushort *)str.utf16();
- qt_to_latin1_unchecked(l, uc, len);
+ using pointer = Element *;
- fillTrailingZeros();
- return *this;
- }
+ struct value_type;
+ struct reference {
+ reference(Element &ref) : m_key(&ref) {}
- inline Latin1String &operator=(QLatin1String str)
- {
- int len = d->length = str.size();
- uchar *l = (uchar *)d->latin1;
- memcpy(l, str.data(), len);
+ reference() = delete;
+ ~reference() = default;
- fillTrailingZeros();
- return *this;
- }
-
- void fillTrailingZeros()
- {
- uchar *l = (uchar *)d->latin1;
- for (int len = d->length; (quintptr)(l + len) & 0x3; ++len)
- l[len] = 0;
- }
-
- QLatin1String toQLatin1String() const noexcept {
- return QLatin1String(d->latin1, d->length);
- }
+ reference(const reference &other) = default;
+ reference(reference &&other) = default;
- inline bool operator<(const String &str) const
- {
- const qle_ushort *uc = (qle_ushort *) str.d->utf16;
- if (!uc || *uc == 0)
- return false;
-
- const uchar *c = (uchar *)d->latin1;
- const uchar *e = c + qMin((int)d->length, (int)str.d->length);
-
- while (c < e) {
- if (*c != *uc)
- break;
- ++c;
- ++uc;
+ reference &operator=(const value_type &value);
+ reference &operator=(const reference &other)
+ {
+ if (m_key != other.m_key) {
+ key() = other.key();
+ value() = other.value();
+ }
+ return *this;
}
- return (c == e ? (int)d->length < (int)str.d->length : *c < *uc);
-
- }
- inline bool operator ==(const String &str) const {
- return (str == *this);
- }
- inline bool operator >=(const String &str) const {
- return !(*this < str);
- }
-
- inline QString toString() const {
- return QString::fromLatin1(d->latin1, d->length);
- }
-};
-
-#define DEF_OP(op) \
- inline bool operator op(Latin1String lhs, Latin1String rhs) noexcept \
- { \
- return lhs.toQLatin1String() op rhs.toQLatin1String(); \
- } \
- inline bool operator op(QLatin1String lhs, Latin1String rhs) noexcept \
- { \
- return lhs op rhs.toQLatin1String(); \
- } \
- inline bool operator op(Latin1String lhs, QLatin1String rhs) noexcept \
- { \
- return lhs.toQLatin1String() op rhs; \
- } \
- inline bool operator op(QStringView lhs, Latin1String rhs) noexcept \
- { \
- return lhs op rhs.toQLatin1String(); \
- } \
- inline bool operator op(Latin1String lhs, QStringView rhs) noexcept \
- { \
- return lhs.toQLatin1String() op rhs; \
- } \
- /*end*/
-DEF_OP(==)
-DEF_OP(!=)
-DEF_OP(< )
-DEF_OP(> )
-DEF_OP(<=)
-DEF_OP(>=)
-#undef DEF_OP
-
-inline bool String::operator ==(const Latin1String &str) const
-{
- if ((int)d->length != (int)str.d->length)
- return false;
- const qle_ushort *uc = d->utf16;
- const qle_ushort *e = uc + d->length;
- const uchar *c = (uchar *)str.d->latin1;
-
- while (uc < e) {
- if (*uc != *c)
- return false;
- ++uc;
- ++c;
- }
- return true;
-}
-
-inline bool String::operator <(const String &other) const
-{
- int alen = d->length;
- int blen = other.d->length;
- int l = qMin(alen, blen);
- qle_ushort *a = d->utf16;
- qle_ushort *b = other.d->utf16;
-
- while (l-- && *a == *b)
- a++,b++;
- if (l==-1)
- return (alen < blen);
- return (ushort)*a < (ushort)*b;
-}
-
-inline bool String::operator<(const Latin1String &str) const
-{
- const uchar *c = (uchar *) str.d->latin1;
- if (!c || *c == 0)
- return false;
-
- const qle_ushort *uc = d->utf16;
- const qle_ushort *e = uc + qMin((int)d->length, (int)str.d->length);
-
- while (uc < e) {
- if (*uc != *c)
- break;
- ++uc;
- ++c;
- }
- return (uc == e ? (int)d->length < (int)str.d->length : (ushort)*uc < *c);
-
-}
-template <typename T>
-static inline void copyString(char *dest, T str, bool compress)
-{
- if (compress) {
- Latin1String string(dest);
- string = str;
- } else {
- String string(dest);
- string = str;
- }
-}
+ reference &operator=(reference &&other)
+ {
+ key() = other.key();
+ value() = other.value();
+ return *this;
+ }
+ Element &key() { return *m_key; }
+ Element &value() { return *(m_key + 1); }
-/*
- Base is the base class for both Object and Array. Both classes work more or less the same way.
- The class starts with a header (defined by the struct below), then followed by data (the data for
- values in the Array case and Entry's (see below) for objects.
+ const Element &key() const { return *m_key; }
+ const Element &value() const { return *(m_key + 1); }
- After the data a table follows (tableOffset points to it) containing Value objects for Arrays, and
- offsets from the beginning of the object to Entry's in the case of Object.
- Entry's in the Object's table are lexicographically sorted by key in the table(). This allows the usage
- of a binary search over the keys in an Object.
- */
-class Base
-{
-public:
- qle_uint size;
- union {
- uint _dummy;
- qle_bitfield<0, 1> is_object;
- qle_bitfield<1, 31> length;
+ private:
+ Element *m_key;
};
- offset tableOffset;
- // content follows here
- inline bool isObject() const { return !!is_object; }
- inline bool isArray() const { return !isObject(); }
+ struct value_type {
+ value_type(reference ref) : m_key(ref.key()), m_value(ref.value()) {}
- inline offset *table() const { return (offset *) (((char *) this) + tableOffset); }
-
- int reserveSpace(uint dataSize, int posInTable, uint numItems, bool replace);
- void removeItems(int pos, int numItems);
-};
-
-class Object : public Base
-{
-public:
- Entry *entryAt(int i) const {
- return reinterpret_cast<Entry *>(((char *)this) + table()[i]);
- }
- int indexOf(QStringView key, bool *exists) const;
- int indexOf(QLatin1String key, bool *exists) const;
+ Element key() const { return m_key; }
+ Element value() const { return m_value; }
+ private:
+ Element m_key;
+ Element m_value;
+ };
- bool isValid(int maxSize) const;
-};
+ using difference_type = typename QVector<Element>::difference_type;
+ using iterator_category = std::random_access_iterator_tag;
+ ObjectIterator() = default;
+ ObjectIterator(ElementsIterator it) : it(it) {}
+ ElementsIterator elementsIterator() { return it; }
-class Array : public Base
-{
-public:
- inline Value at(int i) const;
- inline Value &operator [](int i);
+ ObjectIterator operator++(int) { ObjectIterator ret(it); it += 2; return ret; }
+ ObjectIterator &operator++() { it += 2; return *this; }
+ ObjectIterator &operator+=(difference_type n) { it += 2 * n; return *this; }
- bool isValid(int maxSize) const;
-};
+ ObjectIterator operator--(int) { ObjectIterator ret(it); it -= 2; return ret; }
+ ObjectIterator &operator--() { it -= 2; return *this; }
+ ObjectIterator &operator-=(difference_type n) { it -= 2 * n; return *this; }
+ reference operator*() const { return *it; }
+ reference operator[](int n) const { return it[n * 2]; }
-class Value
-{
-public:
- enum {
- MaxSize = (1<<27) - 1
- };
- union {
- uint _dummy;
- qle_bitfield<0, 3> type;
- qle_bitfield<3, 1> latinOrIntValue;
- qle_bitfield<4, 1> latinKey;
- qle_bitfield<5, 27> value;
- qle_signedbitfield<5, 27> int_value;
- };
+ bool operator<(ObjectIterator other) const { return it < other.it; }
+ bool operator>(ObjectIterator other) const { return it > other.it; }
+ bool operator<=(ObjectIterator other) const { return it <= other.it; }
+ bool operator>=(ObjectIterator other) const { return it >= other.it; }
- inline char *data(const Base *b) const { return ((char *)b) + value; }
- int usedStorage(const Base *b) const;
-
- bool toBoolean() const;
- double toDouble(const Base *b) const;
- QString toString(const Base *b) const;
- String asString(const Base *b) const;
- Latin1String asLatin1String(const Base *b) const;
- Base *base(const Base *b) const;
-
- bool isValid(const Base *b) const;
-
- static int requiredStorage(QJsonValue &v, bool *compressed);
- static uint valueToStore(const QJsonValue &v, uint offset);
- static void copyData(const QJsonValue &v, char *dest, bool compressed);
+private:
+ ElementsIterator it;
};
-Q_DECLARE_JSONPRIVATE_TYPEINFO(Value, Q_PRIMITIVE_TYPE)
-inline Value Array::at(int i) const
+template<typename Element, typename ElementsIterator>
+inline ObjectIterator<Element, ElementsIterator> operator+(
+ ObjectIterator<Element, ElementsIterator> a,
+ typename ObjectIterator<Element, ElementsIterator>::difference_type n)
{
- return *(Value *) (table() + i);
+ return {a.elementsIterator() + 2 * n};
}
-
-inline Value &Array::operator [](int i)
+template<typename Element, typename ElementsIterator>
+inline ObjectIterator<Element, ElementsIterator> operator+(
+ int n, ObjectIterator<Element, ElementsIterator> a)
{
- return *(Value *) (table() + i);
+ return {a.elementsIterator() + 2 * n};
}
-
-
-
-class Entry {
-public:
- Value value;
- // key
- // value data follows key
-
- uint size() const {
- int s = sizeof(Entry);
- if (value.latinKey)
- s += shallowLatin1Key().byteSize();
- else
- s += shallowKey().byteSize();
- return alignedSize(s);
- }
-
- int usedStorage(Base *b) const {
- return size() + value.usedStorage(b);
- }
-
- String shallowKey() const
- {
- Q_ASSERT(!value.latinKey);
- return String((const char *)this + sizeof(Entry));
- }
- Latin1String shallowLatin1Key() const
- {
- Q_ASSERT(value.latinKey);
- return Latin1String((const char *)this + sizeof(Entry));
- }
- QString key() const
- {
- if (value.latinKey) {
- return shallowLatin1Key().toString();
- }
- return shallowKey().toString();
- }
-
- bool isValid(int maxSize) const {
- if (maxSize < (int)sizeof(Entry))
- return false;
- maxSize -= sizeof(Entry);
- if (value.latinKey)
- return shallowLatin1Key().isValid(maxSize);
- return shallowKey().isValid(maxSize);
- }
-
- bool operator ==(QStringView key) const;
- inline bool operator !=(QStringView key) const { return !operator ==(key); }
- inline bool operator >=(QStringView key) const;
-
- bool operator==(QLatin1String key) const;
- inline bool operator!=(QLatin1String key) const { return !operator ==(key); }
- inline bool operator>=(QLatin1String key) const;
-
- bool operator ==(const Entry &other) const;
- bool operator >=(const Entry &other) const;
-};
-
-inline bool Entry::operator >=(QStringView key) const
+template<typename Element, typename ElementsIterator>
+inline ObjectIterator<Element, ElementsIterator> operator-(
+ ObjectIterator<Element, ElementsIterator> a,
+ typename ObjectIterator<Element, ElementsIterator>::difference_type n)
{
- if (value.latinKey)
- return (shallowLatin1Key() >= key);
- else
- return (shallowKey() >= key);
+ return {a.elementsIterator() - 2 * n};
}
-
-inline bool Entry::operator >=(QLatin1String key) const
+template<typename Element, typename ElementsIterator>
+inline int operator-(
+ ObjectIterator<Element, ElementsIterator> a,
+ ObjectIterator<Element, ElementsIterator> b)
{
- if (value.latinKey)
- return shallowLatin1Key() >= key;
- else
- return shallowKey() >= QString(key); // ### conversion to QString
+ return (a.elementsIterator() - b.elementsIterator()) / 2;
}
-
-inline bool operator <(QStringView key, const Entry &e)
-{ return e >= key; }
-
-inline bool operator<(QLatin1String key, const Entry &e)
-{ return e >= key; }
-
-
-class Header {
-public:
- qle_uint tag; // 'qbjs'
- qle_uint version; // 1
- Base *root() { return (Base *)(this + 1); }
-};
-
-
-inline bool Value::toBoolean() const
+template<typename Element, typename ElementsIterator>
+inline bool operator!=(
+ ObjectIterator<Element, ElementsIterator> a,
+ ObjectIterator<Element, ElementsIterator> b)
{
- Q_ASSERT(type == QJsonValue::Bool);
- return value != 0;
+ return a.elementsIterator() != b.elementsIterator();
}
-
-inline double Value::toDouble(const Base *b) const
+template<typename Element, typename ElementsIterator>
+inline bool operator==(
+ ObjectIterator<Element, ElementsIterator> a,
+ ObjectIterator<Element, ElementsIterator> b)
{
- Q_ASSERT(type == QJsonValue::Double);
- if (latinOrIntValue)
- return int_value;
-
- quint64 i = qFromLittleEndian<quint64>((const uchar *)b + value);
- double d;
- memcpy(&d, &i, sizeof(double));
- return d;
+ return a.elementsIterator() == b.elementsIterator();
}
-inline String Value::asString(const Base *b) const
-{
- Q_ASSERT(type == QJsonValue::String && !latinOrIntValue);
- return String(data(b));
-}
+using KeyIterator = ObjectIterator<QtCbor::Element, QVector<QtCbor::Element>::iterator>;
+using ConstKeyIterator = ObjectIterator<const QtCbor::Element, QVector<QtCbor::Element>::const_iterator>;
-inline Latin1String Value::asLatin1String(const Base *b) const
+template<>
+inline KeyIterator::reference &KeyIterator::reference::operator=(const KeyIterator::value_type &value)
{
- Q_ASSERT(type == QJsonValue::String && latinOrIntValue);
- return Latin1String(data(b));
+ *m_key = value.key();
+ *(m_key + 1) = value.value();
+ return *this;
}
-inline QString Value::toString(const Base *b) const
+inline void swap(KeyIterator::reference a, KeyIterator::reference b)
{
- if (latinOrIntValue)
- return asLatin1String(b).toString();
- else
- return asString(b).toString();
+ KeyIterator::value_type t = a;
+ a = b;
+ b = t;
}
-inline Base *Value::base(const Base *b) const
+class Value
{
- Q_ASSERT(type == QJsonValue::Array || type == QJsonValue::Object);
- return reinterpret_cast<Base *>(data(b));
-}
-
-class Data {
public:
- enum Validation {
- Unchecked,
- Validated,
- Invalid
- };
-
- QAtomicInt ref;
- int alloc;
- union {
- char *rawData;
- Header *header;
- };
- uint compactionCounter : 31;
- uint ownsData : 1;
+ static QCborContainerPrivate *container(const QCborValue &v) { return v.container; }
- inline Data(char *raw, int a)
- : alloc(a), rawData(raw), compactionCounter(0), ownsData(true)
+ static QJsonValue fromTrustedCbor(const QCborValue &v)
{
+ QJsonValue result;
+ result.d = v.container;
+ result.n = v.n;
+ result.t = v.t;
+ return result;
}
- inline Data(int reserved, QJsonValue::Type valueType)
- : rawData(nullptr), compactionCounter(0), ownsData(true)
- {
- Q_ASSERT(valueType == QJsonValue::Array || valueType == QJsonValue::Object);
-
- alloc = sizeof(Header) + sizeof(Base) + reserved + sizeof(offset);
- header = (Header *)malloc(alloc);
- Q_CHECK_PTR(header);
- header->tag = QJsonDocument::BinaryFormatTag;
- header->version = 1;
- Base *b = header->root();
- b->size = sizeof(Base);
- b->is_object = (valueType == QJsonValue::Object);
- b->tableOffset = sizeof(Base);
- b->length = 0;
- }
- inline ~Data()
- { if (ownsData) free(rawData); }
-
- uint offsetOf(const void *ptr) const { return (uint)(((char *)ptr - rawData)); }
-
- QJsonObject toObject(Object *o) const
- {
- return QJsonObject(const_cast<Data *>(this), o);
- }
-
- QJsonArray toArray(Array *a) const
- {
- return QJsonArray(const_cast<Data *>(this), a);
- }
-
- Data *clone(Base *b, int reserve = 0)
- {
- int size = sizeof(Header) + b->size;
- if (b == header->root() && ref.loadRelaxed() == 1 && alloc >= size + reserve)
- return this;
-
- if (reserve) {
- if (reserve < 128)
- reserve = 128;
- size = qMax(size + reserve, qMin(size *2, (int)Value::MaxSize));
- if (size > Value::MaxSize) {
- qWarning("QJson: Document too large to store in data structure");
- return nullptr;
- }
- }
- char *raw = (char *)malloc(size);
- Q_CHECK_PTR(raw);
- memcpy(raw + sizeof(Header), b, b->size);
- Header *h = (Header *)raw;
- h->tag = QJsonDocument::BinaryFormatTag;
- h->version = 1;
- Data *d = new Data(raw, size);
- d->compactionCounter = (b == header->root()) ? compactionCounter : 0;
- return d;
- }
-
- void compact();
- bool valid() const;
-
-private:
- Q_DISABLE_COPY_MOVE(Data)
};
-}
+} // namespace QJsonPrivate
QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qjsonarray.cpp b/src/corelib/serialization/qjsonarray.cpp
index 9636ac5856..08702771a8 100644
--- a/src/corelib/serialization/qjsonarray.cpp
+++ b/src/corelib/serialization/qjsonarray.cpp
@@ -40,12 +40,16 @@
#include <qjsonobject.h>
#include <qjsonvalue.h>
#include <qjsonarray.h>
+#include <qjsondocument.h>
#include <qstringlist.h>
+#include <qcborarray.h>
#include <qvariant.h>
#include <qdebug.h>
+#include <private/qcborvalue_p.h>
+#include <private/qjson_p.h>
+
#include "qjsonwriter_p.h"
-#include "qjson_p.h"
QT_BEGIN_NAMESPACE
@@ -131,10 +135,7 @@ QT_BEGIN_NAMESPACE
/*!
Creates an empty array.
*/
-QJsonArray::QJsonArray()
- : d(nullptr), a(nullptr)
-{
-}
+QJsonArray::QJsonArray() = default;
/*!
\fn QJsonArray::QJsonArray(std::initializer_list<QJsonValue> args)
@@ -151,12 +152,10 @@ QJsonArray::QJsonArray()
/*!
\internal
*/
-QJsonArray::QJsonArray(QJsonPrivate::Data *data, QJsonPrivate::Array *array)
- : d(data), a(array)
+QJsonArray::QJsonArray(QCborContainerPrivate *array)
+ : a(array)
{
- Q_ASSERT(data);
Q_ASSERT(array);
- d->ref.ref();
}
/*!
@@ -168,17 +167,19 @@ QJsonArray::QJsonArray(QJsonPrivate::Data *data, QJsonPrivate::Array *array)
*/
void QJsonArray::initialize()
{
- d = nullptr;
a = nullptr;
}
/*!
Deletes the array.
*/
-QJsonArray::~QJsonArray()
+QJsonArray::~QJsonArray() = default;
+
+QJsonArray::QJsonArray(std::initializer_list<QJsonValue> args)
{
- if (d && !d->ref.deref())
- delete d;
+ initialize();
+ for (const auto & arg : args)
+ append(arg);
}
/*!
@@ -189,10 +190,13 @@ QJsonArray::~QJsonArray()
*/
QJsonArray::QJsonArray(const QJsonArray &other)
{
- d = other.d;
a = other.a;
- if (d)
- d->ref.ref();
+}
+
+QJsonArray::QJsonArray(QJsonArray &&other) noexcept
+ : a(other.a)
+{
+ other.a = nullptr;
}
/*!
@@ -200,15 +204,7 @@ QJsonArray::QJsonArray(const QJsonArray &other)
*/
QJsonArray &QJsonArray::operator =(const QJsonArray &other)
{
- if (d != other.d) {
- if (d && !d->ref.deref())
- delete d;
- d = other.d;
- if (d)
- d->ref.ref();
- }
a = other.a;
-
return *this;
}
@@ -282,48 +278,7 @@ QJsonArray QJsonArray::fromStringList(const QStringList &list)
*/
QJsonArray QJsonArray::fromVariantList(const QVariantList &list)
{
- QJsonArray array;
- if (list.isEmpty())
- return array;
-
- array.detach2(1024);
-
- QVector<QJsonPrivate::Value> values;
- values.resize(list.size());
- QJsonPrivate::Value *valueData = values.data();
- uint currentOffset = sizeof(QJsonPrivate::Base);
-
- for (int i = 0; i < list.size(); ++i) {
- QJsonValue val = QJsonValue::fromVariant(list.at(i));
-
- bool latinOrIntValue;
- int valueSize = QJsonPrivate::Value::requiredStorage(val, &latinOrIntValue);
-
- if (!array.detach2(valueSize))
- return QJsonArray();
-
- QJsonPrivate::Value *v = valueData + i;
- v->type = (val.t == QJsonValue::Undefined ? QJsonValue::Null : val.t);
- v->latinOrIntValue = latinOrIntValue;
- v->latinKey = false;
- v->value = QJsonPrivate::Value::valueToStore(val, currentOffset);
- if (valueSize)
- QJsonPrivate::Value::copyData(val, (char *)array.a + currentOffset, latinOrIntValue);
-
- currentOffset += valueSize;
- array.a->size = currentOffset;
- }
-
- // write table
- array.a->tableOffset = currentOffset;
- if (!array.detach2(sizeof(QJsonPrivate::offset)*values.size()))
- return QJsonArray();
- memcpy(static_cast<void *>(array.a->table()),
- static_cast<const void *>(values.constData()), values.size()*sizeof(uint));
- array.a->length = values.size();
- array.a->size = currentOffset + sizeof(QJsonPrivate::offset)*values.size();
-
- return array;
+ return QCborArray::fromVariantList(list).toJsonArray();
}
/*!
@@ -333,14 +288,7 @@ QJsonArray QJsonArray::fromVariantList(const QVariantList &list)
*/
QVariantList QJsonArray::toVariantList() const
{
- QVariantList list;
-
- if (a) {
- list.reserve(a->length);
- for (int i = 0; i < (int)a->length; ++i)
- list.append(QJsonValue(d, a, a->at(i)).toVariant());
- }
- return list;
+ return QCborArray::fromJsonArray(*this).toVariantList();
}
@@ -349,10 +297,7 @@ QVariantList QJsonArray::toVariantList() const
*/
int QJsonArray::size() const
{
- if (!d)
- return 0;
-
- return (int)a->length;
+ return a ? a->elements.size() : 0;
}
/*!
@@ -370,10 +315,7 @@ int QJsonArray::size() const
*/
bool QJsonArray::isEmpty() const
{
- if (!d)
- return true;
-
- return !a->length;
+ return a == nullptr || a->elements.isEmpty();
}
/*!
@@ -384,10 +326,10 @@ bool QJsonArray::isEmpty() const
*/
QJsonValue QJsonArray::at(int i) const
{
- if (!a || i < 0 || i >= (int)a->length)
+ if (!a || i < 0 || i >= a->elements.size())
return QJsonValue(QJsonValue::Undefined);
- return QJsonValue(d, a, a->at(i));
+ return QJsonPrivate::Value::fromTrustedCbor(a->valueAt(i));
}
/*!
@@ -411,7 +353,7 @@ QJsonValue QJsonArray::first() const
*/
QJsonValue QJsonArray::last() const
{
- return at(a ? (a->length - 1) : 0);
+ return at(a ? (a->elements.size() - 1) : 0);
}
/*!
@@ -433,7 +375,7 @@ void QJsonArray::prepend(const QJsonValue &value)
*/
void QJsonArray::append(const QJsonValue &value)
{
- insert(a ? (int)a->length : 0, value);
+ insert(a ? a->elements.size() : 0, value);
}
/*!
@@ -444,14 +386,10 @@ void QJsonArray::append(const QJsonValue &value)
*/
void QJsonArray::removeAt(int i)
{
- if (!a || i < 0 || i >= (int)a->length)
+ if (!a || i < 0 || i >= a->elements.length())
return;
-
detach2();
- a->removeItems(i, 1);
- ++d->compactionCounter;
- if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(a->length) / 2u)
- compact();
+ a->removeAt(i);
}
/*! \fn void QJsonArray::removeFirst()
@@ -484,11 +422,12 @@ void QJsonArray::removeAt(int i)
*/
QJsonValue QJsonArray::takeAt(int i)
{
- if (!a || i < 0 || i >= (int)a->length)
+ if (!a || i < 0 || i >= a->elements.length())
return QJsonValue(QJsonValue::Undefined);
- QJsonValue v(d, a, a->at(i));
- removeAt(i); // detaches
+ detach2();
+ const QJsonValue v = QJsonPrivate::Value::fromTrustedCbor(a->extractAt(i));
+ a->removeAt(i);
return v;
}
@@ -501,29 +440,14 @@ QJsonValue QJsonArray::takeAt(int i)
*/
void QJsonArray::insert(int i, const QJsonValue &value)
{
- Q_ASSERT (i >= 0 && i <= (a ? (int)a->length : 0));
- QJsonValue val = value;
-
- bool compressed;
- int valueSize = QJsonPrivate::Value::requiredStorage(val, &compressed);
-
- if (!detach2(valueSize + sizeof(QJsonPrivate::Value)))
- return;
-
- if (!a->length)
- a->tableOffset = sizeof(QJsonPrivate::Array);
-
- int valueOffset = a->reserveSpace(valueSize, i, 1, false);
- if (!valueOffset)
- return;
-
- QJsonPrivate::Value &v = (*a)[i];
- v.type = (val.t == QJsonValue::Undefined ? QJsonValue::Null : val.t);
- v.latinOrIntValue = compressed;
- v.latinKey = false;
- v.value = QJsonPrivate::Value::valueToStore(val, valueOffset);
- if (valueSize)
- QJsonPrivate::Value::copyData(val, (char *)a + valueOffset, compressed);
+ if (a)
+ detach2(a->elements.length() + 1);
+ else
+ a = new QCborContainerPrivate;
+
+ Q_ASSERT (i >= 0 && i <= a->elements.length());
+ a->insertAt(i, value.type() == QJsonValue::Undefined ? QCborValue(nullptr)
+ : QCborValue::fromJsonValue(value));
}
/*!
@@ -552,33 +476,9 @@ void QJsonArray::insert(int i, const QJsonValue &value)
*/
void QJsonArray::replace(int i, const QJsonValue &value)
{
- Q_ASSERT (a && i >= 0 && i < (int)(a->length));
- QJsonValue val = value;
-
- bool compressed;
- int valueSize = QJsonPrivate::Value::requiredStorage(val, &compressed);
-
- if (!detach2(valueSize))
- return;
-
- if (!a->length)
- a->tableOffset = sizeof(QJsonPrivate::Array);
-
- int valueOffset = a->reserveSpace(valueSize, i, 1, true);
- if (!valueOffset)
- return;
-
- QJsonPrivate::Value &v = (*a)[i];
- v.type = (val.t == QJsonValue::Undefined ? QJsonValue::Null : val.t);
- v.latinOrIntValue = compressed;
- v.latinKey = false;
- v.value = QJsonPrivate::Value::valueToStore(val, valueOffset);
- if (valueSize)
- QJsonPrivate::Value::copyData(val, (char *)a + valueOffset, compressed);
-
- ++d->compactionCounter;
- if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(a->length) / 2u)
- compact();
+ Q_ASSERT (a && i >= 0 && i < a->elements.length());
+ detach2();
+ a->replaceAt(i, QCborValue::fromJsonValue(value));
}
/*!
@@ -610,7 +510,7 @@ bool QJsonArray::contains(const QJsonValue &value) const
*/
QJsonValueRef QJsonArray::operator [](int i)
{
- Q_ASSERT(a && i >= 0 && i < (int)a->length);
+ Q_ASSERT(a && i >= 0 && i < a->elements.length());
return QJsonValueRef(this, i);
}
@@ -633,14 +533,14 @@ bool QJsonArray::operator==(const QJsonArray &other) const
return true;
if (!a)
- return !other.a->length;
+ return !other.a->elements.length();
if (!other.a)
- return !a->length;
- if (a->length != other.a->length)
+ return !a->elements.length();
+ if (a->elements.length() != other.a->elements.length())
return false;
- for (int i = 0; i < (int)a->length; ++i) {
- if (QJsonValue(d, a, a->at(i)) != QJsonValue(other.d, other.a, other.a->at(i)))
+ for (int i = 0; i < a->elements.length(); ++i) {
+ if (a->valueAt(i) != other.a->valueAt(i))
return false;
}
return true;
@@ -1216,28 +1116,10 @@ void QJsonArray::detach(uint reserve)
*/
bool QJsonArray::detach2(uint reserve)
{
- if (!d) {
- if (reserve >= QJsonPrivate::Value::MaxSize) {
- qWarning("QJson: Document too large to store in data structure");
- return false;
- }
- d = new QJsonPrivate::Data(reserve, QJsonValue::Array);
- a = static_cast<QJsonPrivate::Array *>(d->header->root());
- d->ref.ref();
- return true;
- }
- if (reserve == 0 && d->ref.loadRelaxed() == 1)
+ if (!a)
return true;
-
- QJsonPrivate::Data *x = d->clone(a, reserve);
- if (!x)
- return false;
- x->ref.ref();
- if (!d->ref.deref())
- delete d;
- d = x;
- a = static_cast<QJsonPrivate::Array *>(d->header->root());
- return true;
+ a = a->detach(a.data(), reserve ? reserve : size());
+ return a;
}
/*!
@@ -1245,12 +1127,7 @@ bool QJsonArray::detach2(uint reserve)
*/
void QJsonArray::compact()
{
- if (!d || !d->compactionCounter)
- return;
-
- detach2();
- d->compact();
- a = static_cast<QJsonPrivate::Array *>(d->header->root());
+ a->compact(a->elements.size());
}
uint qHash(const QJsonArray &array, uint seed)
@@ -1267,7 +1144,7 @@ QDebug operator<<(QDebug dbg, const QJsonArray &a)
return dbg;
}
QByteArray json;
- QJsonPrivate::Writer::arrayToJson(a.a, json, 0, true);
+ QJsonPrivate::Writer::arrayToJson(a.a.data(), json, 0, true);
dbg.nospace() << "QJsonArray("
<< json.constData() // print as utf-8 string without extra quotation marks
<< ")";
diff --git a/src/corelib/serialization/qjsonarray.h b/src/corelib/serialization/qjsonarray.h
index 983a6753b5..22aa996a3e 100644
--- a/src/corelib/serialization/qjsonarray.h
+++ b/src/corelib/serialization/qjsonarray.h
@@ -42,6 +42,7 @@
#include <QtCore/qjsonvalue.h>
#include <QtCore/qiterator.h>
+#include <QtCore/qshareddata.h>
#include <initializer_list>
QT_BEGIN_NAMESPACE
@@ -56,25 +57,14 @@ class Q_CORE_EXPORT QJsonArray
public:
QJsonArray();
- QJsonArray(std::initializer_list<QJsonValue> args)
- {
- initialize();
- for (std::initializer_list<QJsonValue>::const_iterator i = args.begin(); i != args.end(); ++i)
- append(*i);
- }
+ QJsonArray(std::initializer_list<QJsonValue> args);
~QJsonArray();
QJsonArray(const QJsonArray &other);
QJsonArray &operator =(const QJsonArray &other);
- QJsonArray(QJsonArray &&other) noexcept
- : d(other.d),
- a(other.a)
- {
- other.d = nullptr;
- other.a = nullptr;
- }
+ QJsonArray(QJsonArray &&other) noexcept;
QJsonArray &operator =(QJsonArray &&other) noexcept
{
@@ -113,7 +103,6 @@ public:
void swap(QJsonArray &other) noexcept
{
- qSwap(d, other.d);
qSwap(a, other.a);
}
@@ -245,20 +234,21 @@ public:
typedef int difference_type;
private:
- friend class QJsonPrivate::Data;
friend class QJsonValue;
friend class QJsonDocument;
+ friend class QCborArray;
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonArray &);
- QJsonArray(QJsonPrivate::Data *data, QJsonPrivate::Array *array);
+ QJsonArray(QCborContainerPrivate *array);
void initialize();
void compact();
// ### Qt 6: remove me and merge with detach2
void detach(uint reserve = 0);
bool detach2(uint reserve = 0);
- QJsonPrivate::Data *d;
- QJsonPrivate::Array *a;
+ // ### Qt 6: remove
+ void *dead = nullptr;
+ QExplicitlySharedDataPointer<QCborContainerPrivate> a;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonArray)
diff --git a/src/corelib/serialization/qjsoncbor.cpp b/src/corelib/serialization/qjsoncbor.cpp
index d6a0c8c48a..ee4dd90416 100644
--- a/src/corelib/serialization/qjsoncbor.cpp
+++ b/src/corelib/serialization/qjsoncbor.cpp
@@ -42,6 +42,10 @@
#include "qcborarray.h"
#include "qcbormap.h"
+
+#include "qjsonarray.h"
+#include "qjsonobject.h"
+#include "qjsondocument.h"
#include "qjson_p.h"
#include <private/qnumeric_p.h>
@@ -149,7 +153,12 @@ static Q_NEVER_INLINE QString makeString(const QCborContainerPrivate *d, qsizety
case QCborValue::Array:
case QCborValue::Map:
+#if defined(QT_JSON_READONLY) || defined(QT_BOOTSTRAPPED)
+ qFatal("Writing JSON is disabled.");
+ return QString();
+#else
return d->valueAt(idx).toDiagnosticNotation(QCborValue::Compact);
+#endif
case QCborValue::SimpleType:
break;
@@ -181,30 +190,11 @@ static Q_NEVER_INLINE QString makeString(const QCborContainerPrivate *d, qsizety
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;
-}
+QJsonValue qt_convertToJson(QCborContainerPrivate *d, qsizetype idx);
-static QJsonValue convertExtendedTypeToJson(const QCborContainerPrivate *d)
+static QJsonValue convertExtendedTypeToJson(QCborContainerPrivate *d)
{
+#ifndef QT_BUILD_QMAKE
qint64 tag = d->elements.at(0).value;
switch (tag) {
@@ -225,12 +215,36 @@ static QJsonValue convertExtendedTypeToJson(const QCborContainerPrivate *d)
return s;
}
}
+#endif
// for all other tags, ignore it and return the converted tagged item
- return convertToJson(d, 1);
+ return qt_convertToJson(d, 1);
+}
+
+// We need to do this because sub-objects may need conversion.
+static QJsonArray convertToJsonArray(QCborContainerPrivate *d)
+{
+ QJsonArray a;
+ if (d) {
+ for (qsizetype idx = 0; idx < d->elements.size(); ++idx)
+ a.append(qt_convertToJson(d, idx));
+ }
+ return a;
}
-static QJsonValue convertToJson(const QCborContainerPrivate *d, qsizetype idx)
+// We need to do this because the keys need to be sorted and converted to strings
+// and sub-objects may need recursive conversion.
+static QJsonObject convertToJsonObject(QCborContainerPrivate *d)
+{
+ QJsonObject o;
+ if (d) {
+ for (qsizetype idx = 0; idx < d->elements.size(); idx += 2)
+ o.insert(makeString(d, idx), qt_convertToJson(d, idx + 1));
+ }
+ return o;
+}
+
+QJsonValue qt_convertToJson(QCborContainerPrivate *d, qsizetype idx)
{
// encoding the container itself
if (idx == -QCborValue::Array)
@@ -248,7 +262,7 @@ static QJsonValue convertToJson(const QCborContainerPrivate *d, qsizetype idx)
const auto &e = d->elements.at(idx);
switch (e.type) {
case QCborValue::Integer:
- return qint64(e.value);
+ return QJsonPrivate::Value::fromTrustedCbor(e.value);
case QCborValue::ByteArray:
case QCborValue::String:
@@ -264,14 +278,14 @@ static QJsonValue convertToJson(const QCborContainerPrivate *d, qsizetype idx)
case QCborValue::RegularExpression:
case QCborValue::Uuid:
// recurse
- return convertToJson(e.flags & Element::IsContainer ? e.container : nullptr, -e.type);
+ return qt_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);
+ return QJsonValue::Undefined;
case QCborValue::False:
return false;
@@ -283,7 +297,7 @@ static QJsonValue convertToJson(const QCborContainerPrivate *d, qsizetype idx)
return fpToJson(e.fpvalue());
}
- return makeString(d, idx);
+ return QJsonPrivate::Value::fromTrustedCbor(makeString(d, idx));
}
/*!
@@ -348,22 +362,22 @@ static QJsonValue convertToJson(const QCborContainerPrivate *d, qsizetype idx)
QJsonValue QCborValue::toJsonValue() const
{
if (container)
- return convertToJson(container, n < 0 ? -type() : n);
+ return qt_convertToJson(container, n < 0 ? -type() : n);
// simple values
switch (type()) {
- case Integer:
- return n;
-
- case Null:
- return QJsonValue();
-
case False:
return false;
+ case Integer:
+ return QJsonPrivate::Value::fromTrustedCbor(n);
+
case True:
return true;
+ case Null:
+ return QJsonValue();
+
case Double:
return fpToJson(fp_helper());
@@ -372,12 +386,12 @@ QJsonValue QCborValue::toJsonValue() const
case Undefined:
case Invalid:
- return QJsonValue(QJsonValue::Undefined);
+ return QJsonValue::Undefined;
case ByteArray:
case String:
// empty strings
- return QString();
+ return QJsonValue::String;
case Array:
// empty array
@@ -392,16 +406,16 @@ QJsonValue QCborValue::toJsonValue() const
case Url:
case RegularExpression:
case Uuid:
- Q_UNREACHABLE();
+ // Reachable, but invalid in Json
return QJsonValue::Undefined;
}
- return simpleTypeString(type());
+ return QJsonPrivate::Value::fromTrustedCbor(simpleTypeString(type()));
}
QJsonValue QCborValueRef::toJsonValue() const
{
- return convertToJson(d, i);
+ return qt_convertToJson(d, i);
}
/*!
@@ -540,8 +554,10 @@ QVariant QCborValue::toVariant() const
case DateTime:
return toDateTime();
+#ifndef QT_BOOTSTRAPPED
case Url:
return toUrl();
+#endif
#if QT_CONFIG(regularexpression)
case RegularExpression:
@@ -597,12 +613,13 @@ QCborValue QCborValue::fromJsonValue(const QJsonValue &v)
{
switch (v.type()) {
case QJsonValue::Bool:
- return v.b;
+ return v.toBool();
case QJsonValue::Double: {
qint64 i;
- if (convertDoubleTo(v.dbl, &i))
+ const double dbl = v.toDouble();
+ if (convertDoubleTo(dbl, &i))
return i;
- return v.dbl;
+ return dbl;
}
case QJsonValue::String:
return v.toString();
@@ -623,9 +640,9 @@ 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) {
+ if (type == QMetaType::QString) {
d->append(variant.toString());
- } else if (type == QVariant::ByteArray) {
+ } else if (type == QMetaType::QByteArray) {
QByteArray ba = variant.toByteArray();
d->appendByteData(ba.constData(), ba.size(), QCborValue::ByteArray);
} else {
@@ -686,43 +703,45 @@ static void appendVariant(QCborContainerPrivate *d, const QVariant &variant)
QCborValue QCborValue::fromVariant(const QVariant &variant)
{
switch (variant.userType()) {
- case QVariant::Invalid:
+ case QMetaType::UnknownType:
return {};
case QMetaType::Nullptr:
return nullptr;
- case QVariant::Bool:
+ case QMetaType::Bool:
return variant.toBool();
case QMetaType::Short:
case QMetaType::UShort:
- case QVariant::Int:
- case QVariant::LongLong:
- case QVariant::ULongLong:
- case QVariant::UInt:
+ case QMetaType::Int:
+ case QMetaType::LongLong:
+ case QMetaType::ULongLong:
+ case QMetaType::UInt:
return variant.toLongLong();
case QMetaType::Float:
- case QVariant::Double:
+ case QMetaType::Double:
return variant.toDouble();
- case QVariant::String:
+ case QMetaType::QString:
return variant.toString();
- case QVariant::StringList:
+ case QMetaType::QStringList:
return QCborArray::fromStringList(variant.toStringList());
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
return variant.toByteArray();
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
return QCborValue(variant.toDateTime());
- case QVariant::Url:
+#ifndef QT_BOOTSTRAPPED
+ case QMetaType::QUrl:
return QCborValue(variant.toUrl());
- case QVariant::Uuid:
+#endif
+ case QMetaType::QUuid:
return QCborValue(variant.toUuid());
- case QVariant::List:
+ case QMetaType::QVariantList:
return QCborArray::fromVariantList(variant.toList());
- case QVariant::Map:
+ case QMetaType::QVariantMap:
return QCborMap::fromVariantMap(variant.toMap());
- case QVariant::Hash:
+ case QMetaType::QVariantHash:
return QCborMap::fromVariantHash(variant.toHash());
#ifndef QT_BOOTSTRAPPED
#if QT_CONFIG(regularexpression)
- case QVariant::RegularExpression:
+ case QMetaType::QRegularExpression:
return QCborValue(variant.toRegularExpression());
#endif
case QMetaType::QJsonValue:
@@ -738,13 +757,13 @@ QCborValue QCborValue::fromVariant(const QVariant &variant)
return QCborMap::fromJsonObject(doc.object());
}
case QMetaType::QCborValue:
- return variant.value<QCborValue>();
+ return qvariant_cast<QCborValue>(variant);
case QMetaType::QCborArray:
- return variant.value<QCborArray>();
+ return qvariant_cast<QCborArray>(variant);
case QMetaType::QCborMap:
- return variant.value<QCborMap>();
+ return qvariant_cast<QCborMap>(variant);
case QMetaType::QCborSimpleType:
- return variant.value<QCborSimpleType>();
+ return qvariant_cast<QCborSimpleType>(variant);
#endif
default:
break;
@@ -824,15 +843,9 @@ QCborArray QCborArray::fromVariantList(const QVariantList &list)
*/
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;
+ QCborArray result;
+ result.d = array.a;
+ return result;
}
/*!
@@ -944,20 +957,9 @@ QCborMap QCborMap::fromVariantHash(const QVariantHash &hash)
*/
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;
+ QCborMap result;
+ result.d = obj.o;
+ return result;
}
QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qjsondocument.cpp b/src/corelib/serialization/qjsondocument.cpp
index 8c3818caff..0be0fc020d 100644
--- a/src/corelib/serialization/qjsondocument.cpp
+++ b/src/corelib/serialization/qjsondocument.cpp
@@ -44,11 +44,22 @@
#include <qstringlist.h>
#include <qvariant.h>
#include <qdebug.h>
+#include <qcbormap.h>
+#include <qcborarray.h>
+#include "qcborvalue_p.h"
#include "qjsonwriter_p.h"
#include "qjsonparser_p.h"
#include "qjson_p.h"
#include "qdatastream.h"
+#if QT_CONFIG(binaryjson)
+#include "qbinaryjson_p.h"
+#include "qbinaryjsonobject_p.h"
+#include "qbinaryjsonarray_p.h"
+#endif
+
+#include <private/qmemory_p.h>
+
QT_BEGIN_NAMESPACE
/*! \class QJsonDocument
@@ -80,6 +91,33 @@ QT_BEGIN_NAMESPACE
\sa {JSON Support in Qt}, {JSON Save Game Example}
*/
+
+class QJsonDocumentPrivate
+{
+ Q_DISABLE_COPY_MOVE(QJsonDocumentPrivate);
+public:
+ QJsonDocumentPrivate() = default;
+ QJsonDocumentPrivate(QCborValue data) : value(std::move(data)) {}
+ ~QJsonDocumentPrivate()
+ {
+ if (rawData)
+ free(rawData);
+ }
+
+ QCborValue value;
+ char *rawData = nullptr;
+ uint rawDataSize = 0;
+
+ void clearRawData()
+ {
+ if (rawData) {
+ free(rawData);
+ rawData = nullptr;
+ rawDataSize = 0;
+ }
+ }
+};
+
/*!
* Constructs an empty and invalid document.
*/
@@ -109,11 +147,10 @@ QJsonDocument::QJsonDocument(const QJsonArray &array)
/*!
\internal
*/
-QJsonDocument::QJsonDocument(QJsonPrivate::Data *data)
- : d(data)
+QJsonDocument::QJsonDocument(const QCborValue &data)
+ : d(qt_make_unique<QJsonDocumentPrivate>(data))
{
Q_ASSERT(d);
- d->ref.ref();
}
/*!
@@ -121,20 +158,30 @@ QJsonDocument::QJsonDocument(QJsonPrivate::Data *data)
Binary data set with fromRawData is not freed.
*/
-QJsonDocument::~QJsonDocument()
-{
- if (d && !d->ref.deref())
- delete d;
-}
+QJsonDocument::~QJsonDocument() = default;
/*!
* Creates a copy of the \a other document.
*/
QJsonDocument::QJsonDocument(const QJsonDocument &other)
{
- d = other.d;
- if (d)
- d->ref.ref();
+ if (other.d) {
+ if (!d)
+ d = qt_make_unique<QJsonDocumentPrivate>();
+ d->value = other.d->value;
+ } else {
+ d.reset();
+ }
+}
+
+QJsonDocument::QJsonDocument(QJsonDocument &&other) noexcept
+ : d(std::move(other.d))
+{
+}
+
+void QJsonDocument::swap(QJsonDocument &other) noexcept
+{
+ qSwap(d, other.d);
}
/*!
@@ -143,14 +190,17 @@ QJsonDocument::QJsonDocument(const QJsonDocument &other)
*/
QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other)
{
- if (d != other.d) {
- if (d && !d->ref.deref())
- delete d;
- d = other.d;
- if (d)
- d->ref.ref();
+ if (this != &other) {
+ if (other.d) {
+ if (!d)
+ d = qt_make_unique<QJsonDocumentPrivate>();
+ else
+ d->clearRawData();
+ d->value = other.d->value;
+ } else {
+ d.reset();
+ }
}
-
return *this;
}
@@ -187,12 +237,13 @@ QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other)
the application.
*/
+#if QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
/*!
Creates a QJsonDocument that uses the first \a size bytes from
\a data. It assumes \a data contains a binary encoded JSON document.
- The created document does not take ownership of \a data and the caller
- has to guarantee that \a data will not be deleted or modified as long as
- any QJsonDocument, QJsonObject or QJsonArray still references the data.
+ The created document does not take ownership of \a data. The data is
+ copied into a different data structure, and the original data can be
+ deleted or modified afterwards.
\a data has to be aligned to a 4 byte boundary.
@@ -202,7 +253,18 @@ QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other)
Returns a QJsonDocument representing the data.
- \sa rawData(), fromBinaryData(), isNull(), DataValidation
+ \deprecated in Qt 5.15. The binary JSON encoding is only retained for backwards
+ compatibility. It is undocumented and restrictive in the maximum size of JSON
+ documents that can be encoded. Qt JSON types can be converted to Qt CBOR types,
+ which can in turn be serialized into the CBOR binary format and vice versa. The
+ CBOR format is a well-defined and less restrictive binary representation for a
+ superset of JSON.
+
+ \note Before Qt 5.15, the caller had to guarantee that \a data would not be
+ deleted or modified as long as any QJsonDocument, QJsonObject or QJsonArray
+ still referenced the data. From Qt 5.15 on, this is not necessary anymore.
+
+ \sa rawData(), fromBinaryData(), isNull(), DataValidation, QCborValue
*/
QJsonDocument QJsonDocument::fromRawData(const char *data, int size, DataValidation validation)
{
@@ -211,18 +273,15 @@ QJsonDocument QJsonDocument::fromRawData(const char *data, int size, DataValidat
return QJsonDocument();
}
- if (size < (int)(sizeof(QJsonPrivate::Header) + sizeof(QJsonPrivate::Base)))
+ if (size < 0 || uint(size) < sizeof(QBinaryJsonPrivate::Header) + sizeof(QBinaryJsonPrivate::Base))
return QJsonDocument();
- QJsonPrivate::Data *d = new QJsonPrivate::Data((char *)data, size);
- d->ownsData = false;
+ std::unique_ptr<QBinaryJsonPrivate::ConstData> binaryData
+ = qt_make_unique<QBinaryJsonPrivate::ConstData>(data, size);
- if (validation != BypassValidation && !d->valid()) {
- delete d;
- return QJsonDocument();
- }
-
- return QJsonDocument(d);
+ return (validation == BypassValidation || binaryData->isValid())
+ ? binaryData->toJsonDocument()
+ : QJsonDocument();
}
/*!
@@ -230,7 +289,16 @@ QJsonDocument QJsonDocument::fromRawData(const char *data, int size, DataValidat
\a size will contain the size of the returned data.
This method is useful to e.g. stream the JSON document
- in it's binary form to a file.
+ in its binary form to a file.
+
+ \deprecated in Qt 5.15. The binary JSON encoding is only retained for backwards
+ compatibility. It is undocumented and restrictive in the maximum size of JSON
+ documents that can be encoded. Qt JSON types can be converted to Qt CBOR types,
+ which can in turn be serialized into the CBOR binary format and vice versa. The
+ CBOR format is a well-defined and less restrictive binary representation for a
+ superset of JSON.
+
+ \sa QCborValue
*/
const char *QJsonDocument::rawData(int *size) const
{
@@ -238,7 +306,21 @@ const char *QJsonDocument::rawData(int *size) const
*size = 0;
return nullptr;
}
- *size = d->alloc;
+
+ if (!d->rawData) {
+ if (isObject()) {
+ QBinaryJsonObject o = QBinaryJsonObject::fromJsonObject(object());
+ d->rawData = o.takeRawData(&(d->rawDataSize));
+ } else {
+ QBinaryJsonArray a = QBinaryJsonArray::fromJsonArray(array());
+ d->rawData = a.takeRawData(&(d->rawDataSize));
+ }
+ }
+
+ // It would be quite miraculous if not, as we should have hit the 128MB limit then.
+ Q_ASSERT(d->rawDataSize <= uint(std::numeric_limits<int>::max()));
+
+ *size = d->rawDataSize;
return d->rawData;
}
@@ -249,38 +331,67 @@ const char *QJsonDocument::rawData(int *size) const
By default the data is validated. If the \a data is not valid, the method returns
a null document.
- \sa toBinaryData(), fromRawData(), isNull(), DataValidation
+ \deprecated in Qt 5.15. The binary JSON encoding is only retained for backwards
+ compatibility. It is undocumented and restrictive in the maximum size of JSON
+ documents that can be encoded. Qt JSON types can be converted to Qt CBOR types,
+ which can in turn be serialized into the CBOR binary format and vice versa. The
+ CBOR format is a well-defined and less restrictive binary representation for a
+ superset of JSON.
+
+ \sa toBinaryData(), fromRawData(), isNull(), DataValidation, QCborValue
*/
QJsonDocument QJsonDocument::fromBinaryData(const QByteArray &data, DataValidation validation)
{
- if (data.size() < (int)(sizeof(QJsonPrivate::Header) + sizeof(QJsonPrivate::Base)))
+ if (uint(data.size()) < sizeof(QBinaryJsonPrivate::Header) + sizeof(QBinaryJsonPrivate::Base))
return QJsonDocument();
- QJsonPrivate::Header h;
- memcpy(&h, data.constData(), sizeof(QJsonPrivate::Header));
- QJsonPrivate::Base root;
- memcpy(&root, data.constData() + sizeof(QJsonPrivate::Header), sizeof(QJsonPrivate::Base));
+ QBinaryJsonPrivate::Header h;
+ memcpy(&h, data.constData(), sizeof(QBinaryJsonPrivate::Header));
+ QBinaryJsonPrivate::Base root;
+ memcpy(&root, data.constData() + sizeof(QBinaryJsonPrivate::Header),
+ sizeof(QBinaryJsonPrivate::Base));
- // do basic checks here, so we don't try to allocate more memory than we can.
- if (h.tag != QJsonDocument::BinaryFormatTag || h.version != 1u ||
- sizeof(QJsonPrivate::Header) + root.size > (uint)data.size())
+ const uint size = sizeof(QBinaryJsonPrivate::Header) + root.size;
+ if (h.tag != QJsonDocument::BinaryFormatTag || h.version != 1U || size > uint(data.size()))
return QJsonDocument();
- const uint size = sizeof(QJsonPrivate::Header) + root.size;
- char *raw = (char *)malloc(size);
- if (!raw)
- return QJsonDocument();
+ std::unique_ptr<QBinaryJsonPrivate::ConstData> d
+ = qt_make_unique<QBinaryJsonPrivate::ConstData>(data.constData(), size);
- memcpy(raw, data.constData(), size);
- QJsonPrivate::Data *d = new QJsonPrivate::Data(raw, size);
+ return (validation == BypassValidation || d->isValid())
+ ? d->toJsonDocument()
+ : QJsonDocument();
+}
- if (validation != BypassValidation && !d->valid()) {
- delete d;
- return QJsonDocument();
- }
+/*!
+ Returns a binary representation of the document.
+
+ The binary representation is also the native format used internally in Qt,
+ and is very efficient and fast to convert to and from.
+
+ The binary format can be stored on disk and interchanged with other applications
+ or computers. fromBinaryData() can be used to convert it back into a
+ JSON document.
+
+ \deprecated in Qt 5.15. The binary JSON encoding is only retained for backwards
+ compatibility. It is undocumented and restrictive in the maximum size of JSON
+ documents that can be encoded. Qt JSON types can be converted to Qt CBOR types,
+ which can in turn be serialized into the CBOR binary format and vice versa. The
+ CBOR format is a well-defined and less restrictive binary representation for a
+ superset of JSON.
- return QJsonDocument(d);
+ \sa fromBinaryData(), QCborValue
+ */
+QByteArray QJsonDocument::toBinaryData() const
+{
+ int size = 0;
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+ const char *raw = rawData(&size);
+QT_WARNING_POP
+ return QByteArray(raw, size);
}
+#endif // QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
/*!
Creates a QJsonDocument from the QVariant \a variant.
@@ -293,18 +404,20 @@ QJsonDocument QJsonDocument::fromBinaryData(const QByteArray &data, DataValidati
QJsonDocument QJsonDocument::fromVariant(const QVariant &variant)
{
QJsonDocument doc;
- switch (variant.type()) {
- case QVariant::Map:
+
+ switch (variant.userType()) {
+ case QMetaType::QVariantMap:
doc.setObject(QJsonObject::fromVariantMap(variant.toMap()));
break;
- case QVariant::Hash:
+ case QMetaType::QVariantHash:
doc.setObject(QJsonObject::fromVariantHash(variant.toHash()));
break;
- case QVariant::List:
+ case QMetaType::QVariantList:
doc.setArray(QJsonArray::fromVariantList(variant.toList()));
break;
- case QVariant::StringList:
- doc.setArray(QJsonArray::fromStringList(variant.toStringList()));
+ case QMetaType::QStringList:
+ doc.d = qt_make_unique<QJsonDocumentPrivate>();
+ doc.d->value = QCborArray::fromStringList(variant.toStringList());
break;
default:
break;
@@ -325,10 +438,10 @@ QVariant QJsonDocument::toVariant() const
if (!d)
return QVariant();
- if (d->header->root()->isArray())
- return QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root())).toVariantList();
- else
- return QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root())).toVariantMap();
+ QCborContainerPrivate *container = QJsonPrivate::Value::container(d->value);
+ if (d->value.isArray())
+ return QJsonArray(container).toVariantList();
+ return QJsonObject(container).toVariantMap();
}
/*!
@@ -370,10 +483,11 @@ QByteArray QJsonDocument::toJson(JsonFormat format) const
if (!d)
return json;
- if (d->header->root()->isArray())
- QJsonPrivate::Writer::arrayToJson(static_cast<QJsonPrivate::Array *>(d->header->root()), json, 0, (format == Compact));
+ const QCborContainerPrivate *container = QJsonPrivate::Value::container(d->value);
+ if (d->value.isArray())
+ QJsonPrivate::Writer::arrayToJson(container, json, 0, (format == Compact));
else
- QJsonPrivate::Writer::objectToJson(static_cast<QJsonPrivate::Object *>(d->header->root()), json, 0, (format == Compact));
+ QJsonPrivate::Writer::objectToJson(container, json, 0, (format == Compact));
return json;
}
@@ -392,7 +506,13 @@ QByteArray QJsonDocument::toJson(JsonFormat format) const
QJsonDocument QJsonDocument::fromJson(const QByteArray &json, QJsonParseError *error)
{
QJsonPrivate::Parser parser(json.constData(), json.length());
- return parser.parse(error);
+ QJsonDocument result;
+ const QCborValue val = parser.parse(error);
+ if (val.isArray() || val.isMap()) {
+ result.d = qt_make_unique<QJsonDocumentPrivate>();
+ result.d->value = val;
+ }
+ return result;
}
/*!
@@ -407,26 +527,6 @@ bool QJsonDocument::isEmpty() const
}
/*!
- Returns a binary representation of the document.
-
- The binary representation is also the native format used internally in Qt,
- and is very efficient and fast to convert to and from.
-
- The binary format can be stored on disk and interchanged with other applications
- or computers. fromBinaryData() can be used to convert it back into a
- JSON document.
-
- \sa fromBinaryData()
- */
-QByteArray QJsonDocument::toBinaryData() const
-{
- if (!d || !d->rawData)
- return QByteArray();
-
- return QByteArray(d->rawData, d->header->root()->size + sizeof(QJsonPrivate::Header));
-}
-
-/*!
Returns \c true if the document contains an array.
\sa array(), isObject()
@@ -436,8 +536,7 @@ bool QJsonDocument::isArray() const
if (!d)
return false;
- QJsonPrivate::Header *h = (QJsonPrivate::Header *)d->rawData;
- return h->root()->isArray();
+ return d->value.isArray();
}
/*!
@@ -450,8 +549,7 @@ bool QJsonDocument::isObject() const
if (!d)
return false;
- QJsonPrivate::Header *h = (QJsonPrivate::Header *)d->rawData;
- return h->root()->isObject();
+ return d->value.isMap();
}
/*!
@@ -464,10 +562,9 @@ bool QJsonDocument::isObject() const
*/
QJsonObject QJsonDocument::object() const
{
- if (d) {
- QJsonPrivate::Base *b = d->header->root();
- if (b->isObject())
- return QJsonObject(d, static_cast<QJsonPrivate::Object *>(b));
+ if (isObject()) {
+ if (auto container = QJsonPrivate::Value::container(d->value))
+ return QJsonObject(container);
}
return QJsonObject();
}
@@ -482,10 +579,9 @@ QJsonObject QJsonDocument::object() const
*/
QJsonArray QJsonDocument::array() const
{
- if (d) {
- QJsonPrivate::Base *b = d->header->root();
- if (b->isArray())
- return QJsonArray(d, static_cast<QJsonPrivate::Array *>(b));
+ if (isArray()) {
+ if (auto container = QJsonPrivate::Value::container(d->value))
+ return QJsonArray(container);
}
return QJsonArray();
}
@@ -497,24 +593,12 @@ QJsonArray QJsonDocument::array() const
*/
void QJsonDocument::setObject(const QJsonObject &object)
{
- if (d && !d->ref.deref())
- delete d;
-
- d = object.d;
+ if (!d)
+ d = qt_make_unique<QJsonDocumentPrivate>();
+ else
+ d->clearRawData();
- if (!d) {
- d = new QJsonPrivate::Data(0, QJsonValue::Object);
- } else if (d->compactionCounter || object.o != d->header->root()) {
- QJsonObject o(object);
- if (d->compactionCounter)
- o.compact();
- else
- o.detach2();
- d = o.d;
- d->ref.ref();
- return;
- }
- d->ref.ref();
+ d->value = QCborValue::fromJsonValue(object);
}
/*!
@@ -524,24 +608,12 @@ void QJsonDocument::setObject(const QJsonObject &object)
*/
void QJsonDocument::setArray(const QJsonArray &array)
{
- if (d && !d->ref.deref())
- delete d;
-
- d = array.d;
+ if (!d)
+ d = qt_make_unique<QJsonDocumentPrivate>();
+ else
+ d->clearRawData();
- if (!d) {
- d = new QJsonPrivate::Data(0, QJsonValue::Array);
- } else if (d->compactionCounter || array.a != d->header->root()) {
- QJsonArray a(array);
- if (d->compactionCounter)
- a.compact();
- else
- a.detach2();
- d = a.d;
- d->ref.ref();
- return;
- }
- d->ref.ref();
+ d->value = QCborValue::fromJsonValue(array);
}
#if QT_STRINGVIEW_LEVEL < 2
@@ -572,7 +644,7 @@ const QJsonValue QJsonDocument::operator[](QStringView key) const
if (!isObject())
return QJsonValue(QJsonValue::Undefined);
- return object().value(key);
+ return QJsonPrivate::Value::fromTrustedCbor(d->value.toMap().value(key));
}
/*!
@@ -584,7 +656,7 @@ const QJsonValue QJsonDocument::operator[](QLatin1String key) const
if (!isObject())
return QJsonValue(QJsonValue::Undefined);
- return object().value(key);
+ return QJsonPrivate::Value::fromTrustedCbor(d->value.toMap().value(key));
}
/*!
@@ -604,7 +676,7 @@ const QJsonValue QJsonDocument::operator[](int i) const
if (!isArray())
return QJsonValue(QJsonValue::Undefined);
- return array().at(i);
+ return QJsonPrivate::Value::fromTrustedCbor(d->value.toArray().at(i));
}
/*!
@@ -612,21 +684,7 @@ const QJsonValue QJsonDocument::operator[](int i) const
*/
bool QJsonDocument::operator==(const QJsonDocument &other) const
{
- if (d == other.d)
- return true;
-
- if (!d || !other.d)
- return false;
-
- if (d->header->root()->isArray() != other.d->header->root()->isArray())
- return false;
-
- if (d->header->root()->isObject())
- return QJsonObject(d, static_cast<QJsonPrivate::Object *>(d->header->root()))
- == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.d->header->root()));
- else
- return QJsonArray(d, static_cast<QJsonPrivate::Array *>(d->header->root()))
- == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.d->header->root()));
+ return (!d) ? (!other.d) : (d->value == other.d->value);
}
/*!
@@ -658,10 +716,11 @@ QDebug operator<<(QDebug dbg, const QJsonDocument &o)
return dbg;
}
QByteArray json;
- if (o.d->header->root()->isArray())
- QJsonPrivate::Writer::arrayToJson(static_cast<QJsonPrivate::Array *>(o.d->header->root()), json, 0, true);
+ const QCborContainerPrivate *container = QJsonPrivate::Value::container(o.d->value);
+ if (o.d->value.isArray())
+ QJsonPrivate::Writer::arrayToJson(container, json, 0, true);
else
- QJsonPrivate::Writer::objectToJson(static_cast<QJsonPrivate::Object *>(o.d->header->root()), json, 0, true);
+ QJsonPrivate::Writer::objectToJson(container, json, 0, true);
dbg.nospace() << "QJsonDocument("
<< json.constData() // print as utf-8 string without extra quotation marks
<< ')';
diff --git a/src/corelib/serialization/qjsondocument.h b/src/corelib/serialization/qjsondocument.h
index a8e7485f5d..758bbfd9dd 100644
--- a/src/corelib/serialization/qjsondocument.h
+++ b/src/corelib/serialization/qjsondocument.h
@@ -41,14 +41,16 @@
#define QJSONDOCUMENT_H
#include <QtCore/qjsonvalue.h>
+#include <QtCore/qscopedpointer.h>
+
+#include <memory>
QT_BEGIN_NAMESPACE
class QDebug;
+class QCborValue;
-namespace QJsonPrivate {
- class Parser;
-}
+namespace QJsonPrivate { class Parser; }
struct Q_CORE_EXPORT QJsonParseError
{
@@ -76,6 +78,7 @@ struct Q_CORE_EXPORT QJsonParseError
ParseError error;
};
+class QJsonDocumentPrivate;
class Q_CORE_EXPORT QJsonDocument
{
public:
@@ -93,11 +96,7 @@ public:
QJsonDocument(const QJsonDocument &other);
QJsonDocument &operator =(const QJsonDocument &other);
- QJsonDocument(QJsonDocument &&other) noexcept
- : d(other.d)
- {
- other.d = nullptr;
- }
+ QJsonDocument(QJsonDocument &&other) noexcept;
QJsonDocument &operator =(QJsonDocument &&other) noexcept
{
@@ -105,21 +104,26 @@ public:
return *this;
}
- void swap(QJsonDocument &other) noexcept
- {
- qSwap(d, other.d);
- }
+ void swap(QJsonDocument &other) noexcept;
enum DataValidation {
Validate,
BypassValidation
};
+#if QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use CBOR format instead")
static QJsonDocument fromRawData(const char *data, int size, DataValidation validation = Validate);
+
+ QT_DEPRECATED_X("Use CBOR format instead")
const char *rawData(int *size) const;
+ QT_DEPRECATED_X("Use CBOR format instead")
static QJsonDocument fromBinaryData(const QByteArray &data, DataValidation validation = Validate);
+
+ QT_DEPRECATED_X("Use CBOR format instead")
QByteArray toBinaryData() const;
+#endif // QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
static QJsonDocument fromVariant(const QVariant &variant);
QVariant toVariant() const;
@@ -160,13 +164,12 @@ public:
private:
friend class QJsonValue;
- friend class QJsonPrivate::Data;
friend class QJsonPrivate::Parser;
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &);
- QJsonDocument(QJsonPrivate::Data *data);
+ QJsonDocument(const QCborValue &data);
- QJsonPrivate::Data *d;
+ std::unique_ptr<QJsonDocumentPrivate> d;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonDocument)
diff --git a/src/corelib/serialization/qjsonobject.cpp b/src/corelib/serialization/qjsonobject.cpp
index 329bc4d2c9..a6987279d3 100644
--- a/src/corelib/serialization/qjsonobject.cpp
+++ b/src/corelib/serialization/qjsonobject.cpp
@@ -40,11 +40,17 @@
#include <qjsonobject.h>
#include <qjsonvalue.h>
#include <qjsonarray.h>
+#include <qjsondocument.h>
#include <qstringlist.h>
#include <qdebug.h>
#include <qvariant.h>
-#include "qjson_p.h"
+#include <qcbormap.h>
+
+#include <private/qcborvalue_p.h>
#include "qjsonwriter_p.h"
+#include "qjson_p.h"
+
+#include <algorithm>
QT_BEGIN_NAMESPACE
@@ -109,10 +115,7 @@ QT_BEGIN_NAMESPACE
\sa isEmpty()
*/
-QJsonObject::QJsonObject()
- : d(nullptr), o(nullptr)
-{
-}
+QJsonObject::QJsonObject() = default;
/*!
\fn QJsonObject::QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args)
@@ -131,12 +134,10 @@ QJsonObject::QJsonObject()
/*!
\internal
*/
-QJsonObject::QJsonObject(QJsonPrivate::Data *data, QJsonPrivate::Object *object)
- : d(data), o(object)
+QJsonObject::QJsonObject(QCborContainerPrivate *object)
+ : o(object)
{
- Q_ASSERT(d);
Q_ASSERT(o);
- d->ref.ref();
}
/*!
@@ -149,17 +150,19 @@ QJsonObject::QJsonObject(QJsonPrivate::Data *data, QJsonPrivate::Object *object)
void QJsonObject::initialize()
{
- d = nullptr;
o = nullptr;
}
/*!
Destroys the object.
*/
-QJsonObject::~QJsonObject()
+QJsonObject::~QJsonObject() = default;
+
+QJsonObject::QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args)
{
- if (d && !d->ref.deref())
- delete d;
+ initialize();
+ for (const auto &arg : args)
+ insert(arg.first, arg.second);
}
/*!
@@ -170,10 +173,13 @@ QJsonObject::~QJsonObject()
*/
QJsonObject::QJsonObject(const QJsonObject &other)
{
- d = other.d;
o = other.o;
- if (d)
- d->ref.ref();
+}
+
+QJsonObject::QJsonObject(QJsonObject &&other) noexcept
+ : o(other.o)
+{
+ other.o = nullptr;
}
/*!
@@ -181,15 +187,7 @@ QJsonObject::QJsonObject(const QJsonObject &other)
*/
QJsonObject &QJsonObject::operator =(const QJsonObject &other)
{
- if (d != other.d) {
- if (d && !d->ref.deref())
- delete d;
- d = other.d;
- if (d)
- d->ref.ref();
- }
o = other.o;
-
return *this;
}
@@ -225,55 +223,7 @@ QJsonObject &QJsonObject::operator =(const QJsonObject &other)
*/
QJsonObject QJsonObject::fromVariantMap(const QVariantMap &map)
{
- QJsonObject object;
- if (map.isEmpty())
- return object;
-
- object.detach2(1024);
-
- QVector<QJsonPrivate::offset> offsets;
- QJsonPrivate::offset currentOffset;
- currentOffset = sizeof(QJsonPrivate::Base);
-
- // the map is already sorted, so we can simply append one entry after the other and
- // write the offset table at the end
- for (QVariantMap::const_iterator it = map.constBegin(); it != map.constEnd(); ++it) {
- QString key = it.key();
- QJsonValue val = QJsonValue::fromVariant(it.value());
-
- bool latinOrIntValue;
- int valueSize = QJsonPrivate::Value::requiredStorage(val, &latinOrIntValue);
-
- bool latinKey = QJsonPrivate::useCompressed(key);
- int valueOffset = sizeof(QJsonPrivate::Entry) + QJsonPrivate::qStringSize(key, latinKey);
- int requiredSize = valueOffset + valueSize;
-
- if (!object.detach2(requiredSize + sizeof(QJsonPrivate::offset))) // offset for the new index entry
- return QJsonObject();
-
- QJsonPrivate::Entry *e = reinterpret_cast<QJsonPrivate::Entry *>(reinterpret_cast<char *>(object.o) + currentOffset);
- e->value.type = val.t;
- e->value.latinKey = latinKey;
- e->value.latinOrIntValue = latinOrIntValue;
- e->value.value = QJsonPrivate::Value::valueToStore(val, (char *)e - (char *)object.o + valueOffset);
- QJsonPrivate::copyString((char *)(e + 1), key, latinKey);
- if (valueSize)
- QJsonPrivate::Value::copyData(val, (char *)e + valueOffset, latinOrIntValue);
-
- offsets << currentOffset;
- currentOffset += requiredSize;
- object.o->size = currentOffset;
- }
-
- // write table
- object.o->tableOffset = currentOffset;
- if (!object.detach2(sizeof(QJsonPrivate::offset)*offsets.size()))
- return QJsonObject();
- memcpy(object.o->table(), offsets.constData(), offsets.size()*sizeof(uint));
- object.o->length = offsets.size();
- object.o->size = currentOffset + sizeof(QJsonPrivate::offset)*offsets.size();
-
- return object;
+ return QCborMap::fromVariantMap(map).toJsonObject();
}
/*!
@@ -285,14 +235,7 @@ QJsonObject QJsonObject::fromVariantMap(const QVariantMap &map)
*/
QVariantMap QJsonObject::toVariantMap() const
{
- QVariantMap map;
- if (o) {
- for (uint i = 0; i < o->length; ++i) {
- QJsonPrivate::Entry *e = o->entryAt(i);
- map.insert(e->key(), QJsonValue(d, o, e->value).toVariant());
- }
- }
- return map;
+ return QCborMap::fromJsonObject(*this).toVariantMap();
}
/*!
@@ -324,15 +267,7 @@ QJsonObject QJsonObject::fromVariantHash(const QVariantHash &hash)
*/
QVariantHash QJsonObject::toVariantHash() const
{
- QVariantHash hash;
- if (o) {
- hash.reserve(o->length);
- for (uint i = 0; i < o->length; ++i) {
- QJsonPrivate::Entry *e = o->entryAt(i);
- hash.insert(e->key(), QJsonValue(d, o, e->value).toVariant());
- }
- }
- return hash;
+ return QCborMap::fromJsonObject(*this).toVariantHash();
}
/*!
@@ -344,11 +279,9 @@ QStringList QJsonObject::keys() const
{
QStringList keys;
if (o) {
- keys.reserve(o->length);
- for (uint i = 0; i < o->length; ++i) {
- QJsonPrivate::Entry *e = o->entryAt(i);
- keys.append(e->key());
- }
+ keys.reserve(o->elements.length() / 2);
+ for (int i = 0, end = o->elements.length(); i < end; i += 2)
+ keys.append(o->stringAt(i));
}
return keys;
}
@@ -358,10 +291,7 @@ QStringList QJsonObject::keys() const
*/
int QJsonObject::size() const
{
- if (!d)
- return 0;
-
- return o->length;
+ return o ? o->elements.length() / 2 : 0;
}
/*!
@@ -371,10 +301,24 @@ int QJsonObject::size() const
*/
bool QJsonObject::isEmpty() const
{
- if (!d)
- return true;
+ return !o || o->elements.isEmpty();
+}
+
+template<typename String>
+static int indexOf(const QExplicitlySharedDataPointer<QCborContainerPrivate> &o,
+ String key, bool *keyExists)
+{
+ const auto begin = QJsonPrivate::ConstKeyIterator(o->elements.constBegin());
+ const auto end = QJsonPrivate::ConstKeyIterator(o->elements.constEnd());
+
+ const auto it = std::lower_bound(
+ begin, end, key,
+ [&](const QJsonPrivate::ConstKeyIterator::value_type &e, const String &key) {
+ return o->stringCompareElement(e.key(), key) < 0;
+ });
- return !o->length;
+ *keyExists = (it != end) && o->stringEqualsElement((*it).key(), key);
+ return (it - begin) * 2;
}
#if QT_STRINGVIEW_LEVEL < 2
@@ -415,14 +359,14 @@ QJsonValue QJsonObject::value(QLatin1String key) const
template <typename T>
QJsonValue QJsonObject::valueImpl(T key) const
{
- if (!d)
+ if (!o)
return QJsonValue(QJsonValue::Undefined);
bool keyExists;
- int i = o->indexOf(key, &keyExists);
+ int i = indexOf(o, key, &keyExists);
if (!keyExists)
return QJsonValue(QJsonValue::Undefined);
- return QJsonValue(d, o, o->entryAt(i)->value);
+ return QJsonPrivate::Value::fromTrustedCbor(o->valueAt(i + 1));
}
#if QT_STRINGVIEW_LEVEL < 2
@@ -497,13 +441,16 @@ QJsonValueRef QJsonObject::operator [](QLatin1String key)
template <typename T>
QJsonValueRef QJsonObject::atImpl(T key)
{
+ if (!o)
+ o = new QCborContainerPrivate;
+
bool keyExists = false;
- int index = o ? o->indexOf(key, &keyExists) : 0;
+ int index = indexOf(o, key, &keyExists);
if (!keyExists) {
- iterator i = insertAt(index, key, QJsonValue(), false);
- index = i.i;
+ o->insertAt(index, key);
+ o->insertAt(index + 1, QCborValue::fromJsonValue(QJsonValue()));
}
- return QJsonValueRef(this, index);
+ return QJsonValueRef(this, index / 2);
}
#if QT_STRINGVIEW_LEVEL < 2
@@ -550,12 +497,12 @@ QJsonObject::iterator QJsonObject::insert(QLatin1String key, const QJsonValue &v
template <typename T>
QJsonObject::iterator QJsonObject::insertImpl(T key, const QJsonValue &value)
{
- if (value.t == QJsonValue::Undefined) {
+ if (value.type() == QJsonValue::Undefined) {
remove(key);
return end();
}
bool keyExists = false;
- int pos = o ? o->indexOf(key, &keyExists) : 0;
+ int pos = o ? indexOf(o, key, &keyExists) : 0;
return insertAt(pos, key, value, keyExists);
}
@@ -565,40 +512,18 @@ QJsonObject::iterator QJsonObject::insertImpl(T key, const QJsonValue &value)
template <typename T>
QJsonObject::iterator QJsonObject::insertAt(int pos, T key, const QJsonValue &value, bool keyExists)
{
- QJsonValue val = value;
-
- bool latinOrIntValue;
- int valueSize = QJsonPrivate::Value::requiredStorage(val, &latinOrIntValue);
-
- bool latinKey = QJsonPrivate::useCompressed(key);
- int valueOffset = sizeof(QJsonPrivate::Entry) + QJsonPrivate::qStringSize(key, latinKey);
- int requiredSize = valueOffset + valueSize;
-
- if (!detach2(requiredSize + sizeof(QJsonPrivate::offset))) // offset for the new index entry
- return iterator();
-
- if (!o->length)
- o->tableOffset = sizeof(QJsonPrivate::Object);
-
- if (keyExists)
- ++d->compactionCounter;
-
- uint off = o->reserveSpace(requiredSize, pos, 1, keyExists);
- if (!off)
- return end();
-
- QJsonPrivate::Entry *e = o->entryAt(pos);
- e->value.type = val.t;
- e->value.latinKey = latinKey;
- e->value.latinOrIntValue = latinOrIntValue;
- e->value.value = QJsonPrivate::Value::valueToStore(val, (char *)e - (char *)o + valueOffset);
- QJsonPrivate::copyString((char *)(e + 1), key, latinKey);
- if (valueSize)
- QJsonPrivate::Value::copyData(val, (char *)e + valueOffset, latinOrIntValue);
-
- compactIfNeeded();
+ if (o)
+ detach2(o->elements.length() / 2 + (keyExists ? 0 : 1));
+ else
+ o = new QCborContainerPrivate;
- return iterator(this, pos);
+ if (keyExists) {
+ o->replaceAt(pos + 1, QCborValue::fromJsonValue(value));
+ } else {
+ o->insertAt(pos, key);
+ o->insertAt(pos + 1, QCborValue::fromJsonValue(value));
+ }
+ return {this, pos / 2};
}
#if QT_STRINGVIEW_LEVEL < 2
@@ -637,11 +562,11 @@ void QJsonObject::remove(QLatin1String key)
template <typename T>
void QJsonObject::removeImpl(T key)
{
- if (!d)
+ if (!o)
return;
bool keyExists;
- int index = o->indexOf(key, &keyExists);
+ int index = indexOf(o, key, &keyExists);
if (!keyExists)
return;
@@ -692,13 +617,12 @@ QJsonValue QJsonObject::takeImpl(T key)
return QJsonValue(QJsonValue::Undefined);
bool keyExists;
- int index = o->indexOf(key, &keyExists);
+ int index = indexOf(o, key, &keyExists);
if (!keyExists)
return QJsonValue(QJsonValue::Undefined);
- QJsonValue v(d, o, o->entryAt(index)->value);
+ const QJsonValue v = QJsonPrivate::Value::fromTrustedCbor(o->extractAt(index + 1));
removeAt(index);
-
return v;
}
@@ -742,7 +666,7 @@ bool QJsonObject::containsImpl(T key) const
return false;
bool keyExists;
- o->indexOf(key, &keyExists);
+ indexOf(o, key, &keyExists);
return keyExists;
}
@@ -755,16 +679,14 @@ bool QJsonObject::operator==(const QJsonObject &other) const
return true;
if (!o)
- return !other.o->length;
+ return !other.o->elements.length();
if (!other.o)
- return !o->length;
- if (o->length != other.o->length)
+ return !o->elements.length();
+ if (o->elements.length() != other.o->elements.length())
return false;
- for (uint i = 0; i < o->length; ++i) {
- QJsonPrivate::Entry *e = o->entryAt(i);
- QJsonValue v(d, o, e->value);
- if (other.value(e->key()) != v)
+ for (int i = 0, end = o->elements.length(); i < end; ++i) {
+ if (o->valueAt(i) != other.o->valueAt(i))
return false;
}
@@ -788,9 +710,8 @@ bool QJsonObject::operator!=(const QJsonObject &other) const
*/
QJsonObject::iterator QJsonObject::erase(QJsonObject::iterator it)
{
- Q_ASSERT(d && d->ref.loadRelaxed() == 1);
- if (it.o != this || it.i < 0 || it.i >= (int)o->length)
- return iterator(this, o->length);
+ if (it.o != this || it.i < 0 || it.i >= o->elements.length())
+ return {this, o->elements.length()};
int index = it.i;
@@ -839,11 +760,11 @@ template <typename T>
QJsonObject::iterator QJsonObject::findImpl(T key)
{
bool keyExists = false;
- int index = o ? o->indexOf(key, &keyExists) : 0;
+ int index = o ? indexOf(o, key, &keyExists) : 0;
if (!keyExists)
return end();
detach2();
- return iterator(this, index);
+ return {this, index / 2};
}
#if QT_STRINGVIEW_LEVEL < 2
@@ -904,10 +825,10 @@ template <typename T>
QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const
{
bool keyExists = false;
- int index = o ? o->indexOf(key, &keyExists) : 0;
+ int index = o ? indexOf(o, key, &keyExists) : 0;
if (!keyExists)
return end();
- return const_iterator(this, index);
+ return {this, index / 2};
}
/*! \fn int QJsonObject::count() const
@@ -1092,6 +1013,23 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const
Returns a pointer to a modifiable reference to the current item.
*/
+/*! \fn const QJsonValueRef QJsonObject::iterator::operator[](int j)
+
+ Returns a modifiable reference to the item at offset \a j from the
+ item pointed to by this iterator (the item at position \c{*this + j}).
+
+ This function is provided to make QJsonObject iterators behave like C++
+ pointers.
+
+ The return value is of type QJsonValueRef, a helper class for QJsonArray
+ and QJsonObject. When you get an object of type QJsonValueRef, you can
+ use it as if it were a reference to a QJsonValue. If you assign to it,
+ the assignment will apply to the element in the QJsonArray or QJsonObject
+ from which you got the reference.
+
+ \sa operator+()
+*/
+
/*!
\fn bool QJsonObject::iterator::operator==(const iterator &other) const
\fn bool QJsonObject::iterator::operator==(const const_iterator &other) const
@@ -1112,6 +1050,38 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const
\sa operator==()
*/
+/*!
+ \fn bool QJsonObject::iterator::operator<(const iterator& other) const
+ \fn bool QJsonObject::iterator::operator<(const const_iterator& other) const
+
+ Returns \c true if the item pointed to by this iterator is less than
+ the item pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QJsonObject::iterator::operator<=(const iterator& other) const
+ \fn bool QJsonObject::iterator::operator<=(const const_iterator& other) const
+
+ Returns \c true if the item pointed to by this iterator is less than
+ or equal to the item pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QJsonObject::iterator::operator>(const iterator& other) const
+ \fn bool QJsonObject::iterator::operator>(const const_iterator& other) const
+
+ Returns \c true if the item pointed to by this iterator is greater
+ than the item pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QJsonObject::iterator::operator>=(const iterator& other) const
+ \fn bool QJsonObject::iterator::operator>=(const const_iterator& other) const
+
+ Returns \c true if the item pointed to by this iterator is greater
+ than or equal to the item pointed to by the \a other iterator.
+*/
+
/*! \fn QJsonObject::iterator QJsonObject::iterator::operator++()
The prefix ++ operator, \c{++i}, advances the iterator to the
@@ -1185,6 +1155,12 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const
\sa operator+=(), operator-()
*/
+/*! \fn int QJsonObject::iterator::operator-(iterator other) const
+
+ Returns the number of items between the item pointed to by \a
+ other and the item pointed to by this iterator.
+*/
+
/*!
\class QJsonObject::const_iterator
\inmodule QtCore
@@ -1288,6 +1264,18 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const
Returns a pointer to the current item.
*/
+/*! \fn const QJsonValue QJsonObject::const_iterator::operator[](int j)
+
+ Returns the item at offset \a j from the item pointed to by this iterator (the item at
+ position \c{*this + j}).
+
+ This function is provided to make QJsonObject iterators behave like C++
+ pointers.
+
+ \sa operator+()
+*/
+
+
/*! \fn bool QJsonObject::const_iterator::operator==(const const_iterator &other) const
\fn bool QJsonObject::const_iterator::operator==(const iterator &other) const
@@ -1306,6 +1294,34 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const
\sa operator==()
*/
+/*!
+ \fn bool QJsonObject::const_iterator::operator<(const const_iterator& other) const
+
+ Returns \c true if the item pointed to by this iterator is less than
+ the item pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QJsonObject::const_iterator::operator<=(const const_iterator& other) const
+
+ Returns \c true if the item pointed to by this iterator is less than
+ or equal to the item pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QJsonObject::const_iterator::operator>(const const_iterator& other) const
+
+ Returns \c true if the item pointed to by this iterator is greater
+ than the item pointed to by the \a other iterator.
+*/
+
+/*!
+ \fn bool QJsonObject::const_iterator::operator>=(const const_iterator& other) const
+
+ Returns \c true if the item pointed to by this iterator is greater
+ than or equal to the item pointed to by the \a other iterator.
+*/
+
/*! \fn QJsonObject::const_iterator QJsonObject::const_iterator::operator++()
The prefix ++ operator, \c{++i}, advances the iterator to the
@@ -1386,6 +1402,12 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const
\sa operator+=(), operator-()
*/
+/*! \fn int QJsonObject::const_iterator::operator-(const_iterator other) const
+
+ Returns the number of items between the item pointed to by \a
+ other and the item pointed to by this iterator.
+*/
+
/*!
\internal
@@ -1399,28 +1421,10 @@ void QJsonObject::detach(uint reserve)
bool QJsonObject::detach2(uint reserve)
{
- if (!d) {
- if (reserve >= QJsonPrivate::Value::MaxSize) {
- qWarning("QJson: Document too large to store in data structure");
- return false;
- }
- d = new QJsonPrivate::Data(reserve, QJsonValue::Object);
- o = static_cast<QJsonPrivate::Object *>(d->header->root());
- d->ref.ref();
- return true;
- }
- if (reserve == 0 && d->ref.loadRelaxed() == 1)
+ if (!o)
return true;
-
- QJsonPrivate::Data *x = d->clone(o, reserve);
- if (!x)
- return false;
- x->ref.ref();
- if (!d->ref.deref())
- delete d;
- d = x;
- o = static_cast<QJsonPrivate::Object *>(d->header->root());
- return true;
+ o = QCborContainerPrivate::detach(o.data(), reserve ? reserve * 2 : o->elements.length());
+ return o;
}
/*!
@@ -1428,21 +1432,11 @@ bool QJsonObject::detach2(uint reserve)
*/
void QJsonObject::compact()
{
- if (!d || !d->compactionCounter)
+ if (!o)
return;
detach2();
- d->compact();
- o = static_cast<QJsonPrivate::Object *>(d->header->root());
-}
-
-/*!
- \internal
- */
-void QJsonObject::compactIfNeeded()
-{
- if (d->compactionCounter > 32u && d->compactionCounter >= unsigned(o->length) / 2u)
- compact();
+ o->compact(o->elements.length());
}
/*!
@@ -1450,10 +1444,8 @@ void QJsonObject::compactIfNeeded()
*/
QString QJsonObject::keyAt(int i) const
{
- Q_ASSERT(o && i >= 0 && i < (int)o->length);
-
- QJsonPrivate::Entry *e = o->entryAt(i);
- return e->key();
+ Q_ASSERT(o && i >= 0 && i * 2 < o->elements.length());
+ return o->stringAt(i * 2);
}
/*!
@@ -1461,11 +1453,9 @@ QString QJsonObject::keyAt(int i) const
*/
QJsonValue QJsonObject::valueAt(int i) const
{
- if (!o || i < 0 || i >= (int)o->length)
+ if (!o || i < 0 || 2 * i + 1 >= o->elements.length())
return QJsonValue(QJsonValue::Undefined);
-
- QJsonPrivate::Entry *e = o->entryAt(i);
- return QJsonValue(d, o, e->value);
+ return QJsonPrivate::Value::fromTrustedCbor(o->valueAt(2 * i + 1));
}
/*!
@@ -1473,13 +1463,13 @@ QJsonValue QJsonObject::valueAt(int i) const
*/
void QJsonObject::setValueAt(int i, const QJsonValue &val)
{
- Q_ASSERT(o && i >= 0 && i < (int)o->length);
-
- QJsonPrivate::Entry *e = o->entryAt(i);
- if (val.t == QJsonValue::Undefined)
- removeAt(i);
- else
- insertAt(i, e->key(), val, true);
+ Q_ASSERT(o && i >= 0 && 2 * i + 1 < o->elements.length());
+ if (val.isUndefined()) {
+ o->removeAt(2 * i + 1);
+ o->removeAt(2 * i);
+ } else {
+ o->replaceAt(2 * i + 1, QCborValue::fromJsonValue(val));
+ }
}
/*!
@@ -1488,9 +1478,8 @@ void QJsonObject::setValueAt(int i, const QJsonValue &val)
void QJsonObject::removeAt(int index)
{
detach2();
- o->removeItems(index, 1);
- ++d->compactionCounter;
- compactIfNeeded();
+ o->removeAt(index + 1);
+ o->removeAt(index);
}
uint qHash(const QJsonObject &object, uint seed)
@@ -1513,7 +1502,7 @@ QDebug operator<<(QDebug dbg, const QJsonObject &o)
return dbg;
}
QByteArray json;
- QJsonPrivate::Writer::objectToJson(o.o, json, 0, true);
+ QJsonPrivate::Writer::objectToJson(o.o.data(), json, 0, true);
dbg.nospace() << "QJsonObject("
<< json.constData() // print as utf-8 string without extra quotation marks
<< ")";
diff --git a/src/corelib/serialization/qjsonobject.h b/src/corelib/serialization/qjsonobject.h
index 05463f6f36..c31be0353d 100644
--- a/src/corelib/serialization/qjsonobject.h
+++ b/src/corelib/serialization/qjsonobject.h
@@ -43,6 +43,7 @@
#include <QtCore/qjsonvalue.h>
#include <QtCore/qiterator.h>
#include <QtCore/qpair.h>
+#include <QtCore/qshareddata.h>
#include <initializer_list>
QT_BEGIN_NAMESPACE
@@ -53,29 +54,21 @@ typedef QMap<QString, QVariant> QVariantMap;
template <class Key, class T> class QHash;
typedef QHash<QString, QVariant> QVariantHash;
+class QCborContainerPrivate;
+
class Q_CORE_EXPORT QJsonObject
{
public:
QJsonObject();
- QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args)
- {
- initialize();
- for (std::initializer_list<QPair<QString, QJsonValue> >::const_iterator i = args.begin(); i != args.end(); ++i)
- insert(i->first, i->second);
- }
+ QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args);
~QJsonObject();
QJsonObject(const QJsonObject &other);
QJsonObject &operator =(const QJsonObject &other);
- QJsonObject(QJsonObject &&other) noexcept
- : d(other.d), o(other.o)
- {
- other.d = nullptr;
- other.o = nullptr;
- }
+ QJsonObject(QJsonObject &&other) noexcept;
QJsonObject &operator =(QJsonObject &&other) noexcept
{
@@ -85,7 +78,6 @@ public:
void swap(QJsonObject &other) noexcept
{
- qSwap(d, other.d);
qSwap(o, other.o);
}
@@ -154,8 +146,14 @@ public:
#else
inline QJsonValueRefPtr operator->() const { return QJsonValueRefPtr(o, i); }
#endif
+ const QJsonValueRef operator[](int j) { return QJsonValueRef(o, i + j); }
+
inline bool operator==(const iterator &other) const { return i == other.i; }
inline bool operator!=(const iterator &other) const { return i != other.i; }
+ bool operator<(const iterator& other) const { return i < other.i; }
+ bool operator<=(const iterator& other) const { return i <= other.i; }
+ bool operator>(const iterator& other) const { return i > other.i; }
+ bool operator>=(const iterator& other) const { return i >= other.i; }
inline iterator &operator++() { ++i; return *this; }
inline iterator operator++(int) { iterator r = *this; ++i; return r; }
@@ -166,10 +164,15 @@ public:
inline iterator operator-(int j) const { return operator+(-j); }
inline iterator &operator+=(int j) { i += j; return *this; }
inline iterator &operator-=(int j) { i -= j; return *this; }
+ int operator-(iterator j) const { return i - j.i; }
public:
inline bool operator==(const const_iterator &other) const { return i == other.i; }
inline bool operator!=(const const_iterator &other) const { return i != other.i; }
+ bool operator<(const const_iterator& other) const { return i < other.i; }
+ bool operator<=(const const_iterator& other) const { return i <= other.i; }
+ bool operator>(const const_iterator& other) const { return i > other.i; }
+ bool operator>=(const const_iterator& other) const { return i >= other.i; }
};
friend class iterator;
@@ -200,8 +203,14 @@ public:
#else
inline QJsonValuePtr operator->() const { return QJsonValuePtr(o->valueAt(i)); }
#endif
+ const QJsonValue operator[](int j) { return o->valueAt(i + j); }
+
inline bool operator==(const const_iterator &other) const { return i == other.i; }
inline bool operator!=(const const_iterator &other) const { return i != other.i; }
+ bool operator<(const const_iterator& other) const { return i < other.i; }
+ bool operator<=(const const_iterator& other) const { return i <= other.i; }
+ bool operator>(const const_iterator& other) const { return i > other.i; }
+ bool operator>=(const const_iterator& other) const { return i >= other.i; }
inline const_iterator &operator++() { ++i; return *this; }
inline const_iterator operator++(int) { const_iterator r = *this; ++i; return r; }
@@ -212,9 +221,14 @@ public:
inline const_iterator operator-(int j) const { return operator+(-j); }
inline const_iterator &operator+=(int j) { i += j; return *this; }
inline const_iterator &operator-=(int j) { i -= j; return *this; }
+ int operator-(const_iterator j) const { return i - j.i; }
inline bool operator==(const iterator &other) const { return i == other.i; }
inline bool operator!=(const iterator &other) const { return i != other.i; }
+ bool operator<(const iterator& other) const { return i < other.i; }
+ bool operator<=(const iterator& other) const { return i <= other.i; }
+ bool operator>(const iterator& other) const { return i > other.i; }
+ bool operator>=(const iterator& other) const { return i >= other.i; }
};
friend class const_iterator;
@@ -253,20 +267,18 @@ public:
inline bool empty() const { return isEmpty(); }
private:
- friend class QJsonPrivate::Data;
friend class QJsonValue;
friend class QJsonDocument;
friend class QJsonValueRef;
-
+ friend class QCborMap;
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonObject &);
- QJsonObject(QJsonPrivate::Data *data, QJsonPrivate::Object *object);
+ QJsonObject(QCborContainerPrivate *object);
void initialize();
// ### Qt 6: remove me and merge with detach2
void detach(uint reserve = 0);
bool detach2(uint reserve = 0);
void compact();
- void compactIfNeeded();
template <typename T> QJsonValue valueImpl(T key) const;
template <typename T> QJsonValueRef atImpl(T key);
@@ -283,8 +295,9 @@ private:
void removeAt(int i);
template <typename T> iterator insertAt(int i, T key, const QJsonValue &val, bool exists);
- QJsonPrivate::Data *d;
- QJsonPrivate::Object *o;
+ // ### Qt 6: remove
+ void *dead = nullptr;
+ QExplicitlySharedDataPointer<QCborContainerPrivate> o;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonObject)
diff --git a/src/corelib/serialization/qjsonparser.cpp b/src/corelib/serialization/qjsonparser.cpp
index cd36bd5a5b..6d0a92e094 100644
--- a/src/corelib/serialization/qjsonparser.cpp
+++ b/src/corelib/serialization/qjsonparser.cpp
@@ -45,6 +45,8 @@
#include "qjsonparser_p.h"
#include "qjson_p.h"
#include "private/qutfcodec_p.h"
+#include "private/qcborvalue_p.h"
+#include "private/qnumeric_p.h"
//#define PARSER_DEBUG
#ifdef PARSER_DEBUG
@@ -197,9 +199,32 @@ QString QJsonParseError::errorString() const
using namespace QJsonPrivate;
+class StashedContainer
+{
+ Q_DISABLE_COPY_MOVE(StashedContainer)
+public:
+ StashedContainer(QExplicitlySharedDataPointer<QCborContainerPrivate> *container,
+ QCborValue::Type type)
+ : type(type), stashed(std::move(*container)), current(container)
+ {
+ }
+
+ ~StashedContainer()
+ {
+ stashed->append(QCborContainerPrivate::makeValue(type, -1, current->take(),
+ QCborContainerPrivate::MoveContainer));
+ *current = std::move(stashed);
+ }
+
+private:
+ QCborValue::Type type;
+ QExplicitlySharedDataPointer<QCborContainerPrivate> stashed;
+ QExplicitlySharedDataPointer<QCborContainerPrivate> *current;
+};
+
Parser::Parser(const char *json, int length)
- : head(json), json(json), data(nullptr)
- , dataLength(0), current(0), nestingLevel(0)
+ : head(json), json(json)
+ , nestingLevel(0)
, lastError(QJsonParseError::NoError)
{
end = json + length;
@@ -297,34 +322,30 @@ char Parser::nextToken()
/*
JSON-text = object / array
*/
-QJsonDocument Parser::parse(QJsonParseError *error)
+QCborValue Parser::parse(QJsonParseError *error)
{
#ifdef PARSER_DEBUG
indent = 0;
qDebug(">>>>> parser begin");
#endif
- // allocate some space
- dataLength = qMax(end - json, (ptrdiff_t) 256);
- data = (char *)malloc(dataLength);
- Q_CHECK_PTR(data);
-
- // fill in Header data
- QJsonPrivate::Header *h = (QJsonPrivate::Header *)data;
- h->tag = QJsonDocument::BinaryFormatTag;
- h->version = 1u;
-
- current = sizeof(QJsonPrivate::Header);
-
eatBOM();
char token = nextToken();
+ QCborValue data;
+
DEBUG << Qt::hex << (uint)token;
if (token == BeginArray) {
+ container = new QCborContainerPrivate;
if (!parseArray())
goto error;
+ data = QCborContainerPrivate::makeValue(QCborValue::Array, -1, container.take(),
+ QCborContainerPrivate::MoveContainer);
} else if (token == BeginObject) {
+ container = new QCborContainerPrivate;
if (!parseObject())
goto error;
+ data = QCborContainerPrivate::makeValue(QCborValue::Map, -1, container.take(),
+ QCborContainerPrivate::MoveContainer);
} else {
lastError = QJsonParseError::IllegalValue;
goto error;
@@ -342,44 +363,95 @@ QJsonDocument Parser::parse(QJsonParseError *error)
error->offset = 0;
error->error = QJsonParseError::NoError;
}
- QJsonPrivate::Data *d = new QJsonPrivate::Data(data, current);
- return QJsonDocument(d);
+
+ return data;
}
error:
#ifdef PARSER_DEBUG
qDebug(">>>>> parser error");
#endif
+ container.reset();
if (error) {
error->offset = json - head;
error->error = lastError;
}
- free(data);
- return QJsonDocument();
+ return QCborValue();
}
-void Parser::ParsedObject::insert(uint offset) {
- const QJsonPrivate::Entry *newEntry = reinterpret_cast<const QJsonPrivate::Entry *>(parser->data + objectPosition + offset);
- int min = 0;
- int n = offsets.size();
- while (n > 0) {
- int half = n >> 1;
- int middle = min + half;
- if (*entryAt(middle) >= *newEntry) {
- n = half;
- } else {
- min = middle + 1;
- n -= half + 1;
+
+static void sortContainer(QCborContainerPrivate *container)
+{
+ using Forward = QJsonPrivate::KeyIterator;
+ using Reverse = std::reverse_iterator<Forward>;
+ using Value = Forward::value_type;
+
+ auto compare = [container](const Value &a, const Value &b)
+ {
+ const auto &aKey = a.key();
+ const auto &bKey = b.key();
+
+ Q_ASSERT(aKey.flags & QtCbor::Element::HasByteData);
+ Q_ASSERT(bKey.flags & QtCbor::Element::HasByteData);
+
+ const QtCbor::ByteData *aData = container->byteData(aKey);
+ const QtCbor::ByteData *bData = container->byteData(bKey);
+
+ if (!aData)
+ return bData ? -1 : 0;
+ if (!bData)
+ return 1;
+
+ // If StringIsAscii is set, we can use either the UTF-8 or the latin1 comparison
+ // for the string as ASCII is a subset of both. If nothing is set, that means UTF-8.
+
+ // We are currently missing an efficient comparison between UTF-8 and UTF-16 strings.
+ // Therefore, we need to convert the UTF-8 string if we encounter such a case.
+
+ if (aKey.flags & QtCbor::Element::StringIsAscii) {
+ if (bKey.flags & QtCbor::Element::StringIsAscii)
+ return QtPrivate::compareStrings(aData->asLatin1(), bData->asLatin1());
+ if (bKey.flags & QtCbor::Element::StringIsUtf16)
+ return QtPrivate::compareStrings(aData->asLatin1(), bData->asStringView());
+
+ return QCborContainerPrivate::compareUtf8(aData, bData->asLatin1());
}
- }
- if (min < offsets.size() && *entryAt(min) == *newEntry) {
- offsets[min] = offset;
- } else {
- offsets.insert(min, offset);
- }
+
+ if (aKey.flags & QtCbor::Element::StringIsUtf16) {
+ if (bKey.flags & QtCbor::Element::StringIsAscii)
+ return QtPrivate::compareStrings(aData->asStringView(), bData->asLatin1());
+ if (bKey.flags & QtCbor::Element::StringIsUtf16)
+ return QtPrivate::compareStrings(aData->asStringView(), bData->asStringView());
+
+ // Nasty case. a is UTF-16 and b is UTF-8
+ return QtPrivate::compareStrings(aData->asStringView(), bData->toUtf8String());
+ }
+
+ if (bKey.flags & QtCbor::Element::StringIsAscii)
+ return QCborContainerPrivate::compareUtf8(aData, bData->asLatin1());
+
+ // Nasty case. a is UTF-8 and b is UTF-16
+ if (bKey.flags & QtCbor::Element::StringIsUtf16)
+ return QtPrivate::compareStrings(aData->toUtf8String(), bData->asStringView());
+
+ return QCborContainerPrivate::compareUtf8(aData, bData->asLatin1());
+ };
+
+ std::sort(Forward(container->elements.begin()), Forward(container->elements.end()),
+ [&compare](const Value &a, const Value &b) { return compare(a, b) < 0; });
+
+ // We need to retain the _last_ value for any duplicate keys. Therefore the reverse dance here.
+ auto it = std::unique(Reverse(container->elements.end()), Reverse(container->elements.begin()),
+ [&compare](const Value &a, const Value &b) {
+ return compare(a, b) == 0;
+ }).base().elementsIterator();
+
+ // The erase from beginning is expensive but hopefully rare.
+ container->elements.erase(container->elements.begin(), it);
}
+
/*
object = begin-object [ member *( value-separator member ) ]
end-object
@@ -392,19 +464,14 @@ bool Parser::parseObject()
return false;
}
- int objectOffset = reserveSpace(sizeof(QJsonPrivate::Object));
- if (objectOffset < 0)
- return false;
- BEGIN << "parseObject pos=" << objectOffset << current << json;
-
- ParsedObject parsedObject(this, objectOffset);
+ BEGIN << "parseObject" << json;
char token = nextToken();
while (token == Quote) {
- int off = current - objectOffset;
- if (!parseMember(objectOffset))
+ if (!container)
+ container = new QCborContainerPrivate;
+ if (!parseMember())
return false;
- parsedObject.insert(off);
token = nextToken();
if (token != ValueSeparator)
break;
@@ -421,50 +488,23 @@ bool Parser::parseObject()
return false;
}
- DEBUG << "numEntries" << parsedObject.offsets.size();
- int table = objectOffset;
- // finalize the object
- if (parsedObject.offsets.size()) {
- int tableSize = parsedObject.offsets.size()*sizeof(uint);
- table = reserveSpace(tableSize);
- if (table < 0)
- return false;
-
-#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- memcpy(data + table, parsedObject.offsets.constData(), tableSize);
-#else
- offset *o = (offset *)(data + table);
- for (int i = 0; i < parsedObject.offsets.size(); ++i)
- o[i] = parsedObject.offsets[i];
-
-#endif
- }
-
- QJsonPrivate::Object *o = (QJsonPrivate::Object *)(data + objectOffset);
- o->tableOffset = table - objectOffset;
- o->size = current - objectOffset;
- o->is_object = true;
- o->length = parsedObject.offsets.size();
-
- DEBUG << "current=" << current;
END;
--nestingLevel;
+
+ if (container)
+ sortContainer(container.data());
return true;
}
/*
member = string name-separator value
*/
-bool Parser::parseMember(int baseOffset)
+bool Parser::parseMember()
{
- int entryOffset = reserveSpace(sizeof(QJsonPrivate::Entry));
- if (entryOffset < 0)
- return false;
- BEGIN << "parseMember pos=" << entryOffset;
+ BEGIN << "parseMember";
- bool latin1;
- if (!parseString(&latin1))
+ if (!parseString())
return false;
char token = nextToken();
if (token != NameSeparator) {
@@ -475,56 +515,13 @@ bool Parser::parseMember(int baseOffset)
lastError = QJsonParseError::UnterminatedObject;
return false;
}
- QJsonPrivate::Value val;
- if (!parseValue(&val, baseOffset))
+ if (!parseValue())
return false;
- // finalize the entry
- QJsonPrivate::Entry *e = (QJsonPrivate::Entry *)(data + entryOffset);
- e->value = val;
- e->value.latinKey = latin1;
-
END;
return true;
}
-namespace {
- struct ValueArray {
- static const int prealloc = 128;
- ValueArray() : data(stackValues), alloc(prealloc), size(0) {}
- ~ValueArray() { if (data != stackValues) free(data); }
-
- inline bool grow() {
- alloc *= 2;
- if (data == stackValues) {
- QJsonPrivate::Value *newValues = static_cast<QJsonPrivate::Value *>(malloc(alloc*sizeof(QJsonPrivate::Value)));
- if (!newValues)
- return false;
- memcpy(newValues, data, size*sizeof(QJsonPrivate::Value));
- data = newValues;
- } else {
- void *newValues = realloc(data, alloc * sizeof(QJsonPrivate::Value));
- if (!newValues)
- return false;
- data = static_cast<QJsonPrivate::Value *>(newValues);
- }
- return true;
- }
- bool append(const QJsonPrivate::Value &v) {
- if (alloc == size && !grow())
- return false;
- data[size] = v;
- ++size;
- return true;
- }
-
- QJsonPrivate::Value stackValues[prealloc];
- QJsonPrivate::Value *data;
- int alloc;
- int size;
- };
-}
-
/*
array = begin-array [ value *( value-separator value ) ] end-array
*/
@@ -537,12 +534,6 @@ bool Parser::parseArray()
return false;
}
- int arrayOffset = reserveSpace(sizeof(QJsonPrivate::Array));
- if (arrayOffset < 0)
- return false;
-
- ValueArray values;
-
if (!eatSpace()) {
lastError = QJsonParseError::UnterminatedArray;
return false;
@@ -555,13 +546,10 @@ bool Parser::parseArray()
lastError = QJsonParseError::UnterminatedArray;
return false;
}
- QJsonPrivate::Value val;
- if (!parseValue(&val, arrayOffset))
+ if (!container)
+ container = new QCborContainerPrivate;
+ if (!parseValue())
return false;
- if (!values.append(val)) {
- lastError = QJsonParseError::DocumentTooLarge;
- return false;
- }
char token = nextToken();
if (token == EndArray)
break;
@@ -575,27 +563,11 @@ bool Parser::parseArray()
}
}
- DEBUG << "size =" << values.size;
- int table = arrayOffset;
- // finalize the object
- if (values.size) {
- int tableSize = values.size*sizeof(QJsonPrivate::Value);
- table = reserveSpace(tableSize);
- if (table < 0)
- return false;
- memcpy(data + table, values.data, tableSize);
- }
-
- QJsonPrivate::Array *a = (QJsonPrivate::Array *)(data + arrayOffset);
- a->tableOffset = table - arrayOffset;
- a->size = current - arrayOffset;
- a->is_object = false;
- a->length = values.size;
-
- DEBUG << "current=" << current;
+ DEBUG << "size =" << (container ? container->elements.length() : 0);
END;
--nestingLevel;
+
return true;
}
@@ -604,10 +576,9 @@ value = false / null / true / object / array / number / string
*/
-bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
+bool Parser::parseValue()
{
BEGIN << "parse Value" << json;
- val->_dummy = 0;
switch (*json++) {
case 'n':
@@ -618,7 +589,7 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
if (*json++ == 'u' &&
*json++ == 'l' &&
*json++ == 'l') {
- val->type = QJsonValue::Null;
+ container->append(QCborValue(QCborValue::Null));
DEBUG << "value: null";
END;
return true;
@@ -633,8 +604,7 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
if (*json++ == 'r' &&
*json++ == 'u' &&
*json++ == 'e') {
- val->type = QJsonValue::Bool;
- val->value = true;
+ container->append(QCborValue(true));
DEBUG << "value: true";
END;
return true;
@@ -650,8 +620,7 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
*json++ == 'l' &&
*json++ == 's' &&
*json++ == 'e') {
- val->type = QJsonValue::Bool;
- val->value = false;
+ container->append(QCborValue(false));
DEBUG << "value: false";
END;
return true;
@@ -659,44 +628,28 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
lastError = QJsonParseError::IllegalValue;
return false;
case Quote: {
- val->type = QJsonValue::String;
- if (current - baseOffset >= Value::MaxSize) {
- lastError = QJsonParseError::DocumentTooLarge;
+ if (!parseString())
return false;
- }
- val->value = current - baseOffset;
- bool latin1;
- if (!parseString(&latin1))
- return false;
- val->latinOrIntValue = latin1;
DEBUG << "value: string";
END;
return true;
}
- case BeginArray:
- val->type = QJsonValue::Array;
- if (current - baseOffset >= Value::MaxSize) {
- lastError = QJsonParseError::DocumentTooLarge;
- return false;
- }
- val->value = current - baseOffset;
+ case BeginArray: {
+ StashedContainer stashedContainer(&container, QCborValue::Array);
if (!parseArray())
return false;
DEBUG << "value: array";
END;
return true;
- case BeginObject:
- val->type = QJsonValue::Object;
- if (current - baseOffset >= Value::MaxSize) {
- lastError = QJsonParseError::DocumentTooLarge;
- return false;
- }
- val->value = current - baseOffset;
+ }
+ case BeginObject: {
+ StashedContainer stashedContainer(&container, QCborValue::Map);
if (!parseObject())
return false;
DEBUG << "value: object";
END;
return true;
+ }
case ValueSeparator:
// Essentially missing value, but after a colon, not after a comma
// like the other MissingObject errors.
@@ -708,7 +661,7 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
return false;
default:
--json;
- if (!parseNumber(val, baseOffset))
+ if (!parseNumber())
return false;
DEBUG << "value: number";
END;
@@ -735,10 +688,9 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
*/
-bool Parser::parseNumber(QJsonPrivate::Value *val, int baseOffset)
+bool Parser::parseNumber()
{
BEGIN << "parseNumber" << json;
- val->type = QJsonValue::Double;
const char *start = json;
bool isInt = true;
@@ -778,42 +730,32 @@ bool Parser::parseNumber(QJsonPrivate::Value *val, int baseOffset)
return false;
}
- QByteArray number(start, json - start);
+ const QByteArray number = QByteArray::fromRawData(start, json - start);
DEBUG << "numberstring" << number;
if (isInt) {
bool ok;
- int n = number.toInt(&ok);
- if (ok && n < (1<<25) && n > -(1<<25)) {
- val->int_value = n;
- val->latinOrIntValue = true;
+ qlonglong n = number.toLongLong(&ok);
+ if (ok) {
+ container->append(QCborValue(n));
END;
return true;
}
}
bool ok;
- union {
- quint64 ui;
- double d;
- };
- d = number.toDouble(&ok);
+ double d = number.toDouble(&ok);
if (!ok) {
lastError = QJsonParseError::IllegalNumber;
return false;
}
- int pos = reserveSpace(sizeof(double));
- if (pos < 0)
- return false;
- qToLittleEndian(ui, data + pos);
- if (current - baseOffset >= Value::MaxSize) {
- lastError = QJsonParseError::DocumentTooLarge;
- return false;
- }
- val->value = pos - baseOffset;
- val->latinOrIntValue = false;
+ qint64 n;
+ if (convertDoubleTo(d, &n))
+ container->append(QCborValue(n));
+ else
+ container->append(QCborValue(d));
END;
return true;
@@ -902,58 +844,45 @@ static inline bool scanEscapeSequence(const char *&json, const char *end, uint *
static inline bool scanUtf8Char(const char *&json, const char *end, uint *result)
{
- const uchar *&src = reinterpret_cast<const uchar *&>(json);
- const uchar *uend = reinterpret_cast<const uchar *>(end);
- uchar b = *src++;
- int res = QUtf8Functions::fromUtf8<QUtf8BaseTraits>(b, result, src, uend);
- if (res < 0) {
- // decoding error, backtrack the character we read above
- --json;
+ const auto *usrc = reinterpret_cast<const uchar *>(json);
+ const auto *uend = reinterpret_cast<const uchar *>(end);
+ const uchar b = *usrc++;
+ int res = QUtf8Functions::fromUtf8<QUtf8BaseTraits>(b, result, usrc, uend);
+ if (res < 0)
return false;
- }
+ json = reinterpret_cast<const char *>(usrc);
return true;
}
-bool Parser::parseString(bool *latin1)
+bool Parser::parseString()
{
- *latin1 = true;
-
const char *start = json;
- int outStart = current;
- // try to write out a latin1 string
-
- int stringPos = reserveSpace(2);
- if (stringPos < 0)
- return false;
+ // try to parse a utf-8 string without escape sequences, and note whether it's 7bit ASCII.
- BEGIN << "parse string stringPos=" << stringPos << json;
+ BEGIN << "parse string" << json;
+ bool isUtf8 = true;
+ bool isAscii = true;
while (json < end) {
uint ch = 0;
if (*json == '"')
break;
- else if (*json == '\\') {
- if (!scanEscapeSequence(json, end, &ch)) {
- lastError = QJsonParseError::IllegalEscapeSequence;
- return false;
- }
- } else {
- if (!scanUtf8Char(json, end, &ch)) {
- lastError = QJsonParseError::IllegalUTF8String;
- return false;
- }
- }
- // bail out if the string is not pure latin1 or too long to hold as a latin1string (which has only 16 bit for the length)
- if (ch > 0xff || json - start >= 0x8000) {
- *latin1 = false;
+ if (*json == '\\') {
+ isAscii = false;
+ // If we find escape sequences, we store UTF-16 as there are some
+ // escape sequences which are hard to represent in UTF-8.
+ // (plain "\\ud800" for example)
+ isUtf8 = false;
break;
}
- int pos = reserveSpace(1);
- if (pos < 0)
+ if (!scanUtf8Char(json, end, &ch)) {
+ lastError = QJsonParseError::IllegalUTF8String;
return false;
- DEBUG << " " << ch << (char)ch;
- data[pos] = (uchar)ch;
+ }
+ if (ch > 0x7f)
+ isAscii = false;
+ DEBUG << " " << ch << char(ch);
}
++json;
DEBUG << "end of string";
@@ -962,25 +891,20 @@ bool Parser::parseString(bool *latin1)
return false;
}
- // no unicode string, we are done
- if (*latin1) {
- // write string length
- *(QJsonPrivate::qle_ushort *)(data + stringPos) = ushort(current - outStart - sizeof(ushort));
- int pos = reserveSpace((4 - current) & 3);
- if (pos < 0)
- return false;
- while (pos & 3)
- data[pos++] = 0;
+ // no escape sequences, we are done
+ if (isUtf8) {
+ container->appendByteData(start, json - start - 1, QCborValue::String,
+ isAscii ? QtCbor::Element::StringIsAscii
+ : QtCbor::Element::ValueFlags {});
END;
return true;
}
- *latin1 = false;
- DEBUG << "not latin";
+ DEBUG << "has escape sequences";
json = start;
- current = outStart + sizeof(int);
+ QString ucs4;
while (json < end) {
uint ch = 0;
if (*json == '"')
@@ -997,16 +921,10 @@ bool Parser::parseString(bool *latin1)
}
}
if (QChar::requiresSurrogates(ch)) {
- int pos = reserveSpace(4);
- if (pos < 0)
- return false;
- *(QJsonPrivate::qle_ushort *)(data + pos) = QChar::highSurrogate(ch);
- *(QJsonPrivate::qle_ushort *)(data + pos + 2) = QChar::lowSurrogate(ch);
+ ucs4.append(QChar::highSurrogate(ch));
+ ucs4.append(QChar::lowSurrogate(ch));
} else {
- int pos = reserveSpace(2);
- if (pos < 0)
- return false;
- *(QJsonPrivate::qle_ushort *)(data + pos) = (ushort)ch;
+ ucs4.append(QChar(ushort(ch)));
}
}
++json;
@@ -1016,13 +934,8 @@ bool Parser::parseString(bool *latin1)
return false;
}
- // write string length
- *(QJsonPrivate::qle_int *)(data + stringPos) = (current - outStart - sizeof(int))/2;
- int pos = reserveSpace((4 - current) & 3);
- if (pos < 0)
- return false;
- while (pos & 3)
- data[pos++] = 0;
+ container->appendByteData(reinterpret_cast<const char *>(ucs4.utf16()), ucs4.size() * 2,
+ QCborValue::String, QtCbor::Element::StringIsUtf16);
END;
return true;
}
diff --git a/src/corelib/serialization/qjsonparser_p.h b/src/corelib/serialization/qjsonparser_p.h
index 379256847f..14d9705447 100644
--- a/src/corelib/serialization/qjsonparser_p.h
+++ b/src/corelib/serialization/qjsonparser_p.h
@@ -52,8 +52,8 @@
//
#include <QtCore/private/qglobal_p.h>
-#include <qjsondocument.h>
-#include <qvarlengtharray.h>
+#include <QtCore/private/qcborvalue_p.h>
+#include <QtCore/qjsondocument.h>
QT_BEGIN_NAMESPACE
@@ -64,25 +64,7 @@ class Parser
public:
Parser(const char *json, int length);
- QJsonDocument parse(QJsonParseError *error);
-
- class ParsedObject
- {
- public:
- ParsedObject(Parser *p, int pos) : parser(p), objectPosition(pos) {
- offsets.reserve(64);
- }
- void insert(uint offset);
-
- Parser *parser;
- int objectPosition;
- QVector<uint> offsets;
-
- inline QJsonPrivate::Entry *entryAt(int i) const {
- return reinterpret_cast<QJsonPrivate::Entry *>(parser->data + objectPosition + offsets[i]);
- }
- };
-
+ QCborValue parse(QJsonParseError *error);
private:
inline void eatBOM();
@@ -91,34 +73,17 @@ private:
bool parseObject();
bool parseArray();
- bool parseMember(int baseOffset);
- bool parseString(bool *latin1);
- bool parseValue(QJsonPrivate::Value *val, int baseOffset);
- bool parseNumber(QJsonPrivate::Value *val, int baseOffset);
+ bool parseMember();
+ bool parseString();
+ bool parseValue();
+ bool parseNumber();
const char *head;
const char *json;
const char *end;
- char *data;
- int dataLength;
- int current;
int nestingLevel;
QJsonParseError::ParseError lastError;
-
- inline int reserveSpace(int space) {
- if (current + space >= dataLength) {
- dataLength = 2*dataLength + space;
- char *newData = (char *)realloc(data, dataLength);
- if (!newData) {
- lastError = QJsonParseError::DocumentTooLarge;
- return -1;
- }
- data = newData;
- }
- int pos = current;
- current += space;
- return pos;
- }
+ QExplicitlySharedDataPointer<QCborContainerPrivate> container;
};
}
diff --git a/src/corelib/serialization/qjsonvalue.cpp b/src/corelib/serialization/qjsonvalue.cpp
index 5f07a6a03e..caf81c79ef 100644
--- a/src/corelib/serialization/qjsonvalue.cpp
+++ b/src/corelib/serialization/qjsonvalue.cpp
@@ -40,6 +40,7 @@
#include <qjsonobject.h>
#include <qjsonvalue.h>
#include <qjsonarray.h>
+#include <qjsondocument.h>
#include <qurl.h>
#include <quuid.h>
#include <qvariant.h>
@@ -47,10 +48,11 @@
#include <qdebug.h>
#include "qdatastream.h"
-#ifndef QT_BOOTSTRAPPED
-# include <qcborarray.h>
-# include <qcbormap.h>
-#endif
+#include <private/qnumeric_p.h>
+#include <private/qcborvalue_p.h>
+
+#include <qcborarray.h>
+#include <qcbormap.h>
#include "qjson_p.h"
@@ -112,91 +114,80 @@ QT_BEGIN_NAMESPACE
The default is to create a Null value.
*/
QJsonValue::QJsonValue(Type type)
- : ui(0), d(nullptr), t(type)
+ : d(nullptr), t(QCborValue::Undefined)
{
-}
-
-/*!
- \internal
- */
-QJsonValue::QJsonValue(QJsonPrivate::Data *data, QJsonPrivate::Base *base, const QJsonPrivate::Value &v)
- : d(nullptr)
-{
- t = (Type)(uint)v.type;
- switch (t) {
- case Undefined:
+ switch (type) {
case Null:
- dbl = 0;
+ t = QCborValue::Null;
break;
case Bool:
- b = v.toBoolean();
+ t = QCborValue::False;
break;
case Double:
- dbl = v.toDouble(base);
+ t = QCborValue::Double;
break;
- case String: {
- QString s = v.toString(base);
- stringData = s.data_ptr();
- stringData->ref.ref();
+ case String:
+ t = QCborValue::String;
break;
- }
case Array:
+ t = QCborValue::Array;
+ break;
case Object:
- d = data;
- this->base = v.base(base);
+ t = QCborValue::Map;
+ break;
+ case Undefined:
break;
}
- if (d)
- d->ref.ref();
}
/*!
Creates a value of type Bool, with value \a b.
*/
QJsonValue::QJsonValue(bool b)
- : d(nullptr), t(Bool)
+ : t(b ? QCborValue::True : QCborValue::False)
{
- this->b = b;
}
/*!
- Creates a value of type Double, with value \a n.
+ Creates a value of type Double, with value \a v.
*/
-QJsonValue::QJsonValue(double n)
- : d(nullptr), t(Double)
+QJsonValue::QJsonValue(double v)
+ : d(nullptr)
{
- this->dbl = n;
+ if (convertDoubleTo(v, &n)) {
+ t = QCborValue::Integer;
+ } else {
+ memcpy(&n, &v, sizeof(n));
+ t = QCborValue::Double;
+ }
}
/*!
\overload
- Creates a value of type Double, with value \a n.
+ Creates a value of type Double, with value \a v.
*/
-QJsonValue::QJsonValue(int n)
- : d(nullptr), t(Double)
+QJsonValue::QJsonValue(int v)
+ : n(v), t(QCborValue::Integer)
{
- this->dbl = n;
}
/*!
\overload
- Creates a value of type Double, with value \a n.
+ Creates a value of type Double, with value \a v.
NOTE: the integer limits for IEEE 754 double precision data is 2^53 (-9007199254740992 to +9007199254740992).
If you pass in values outside this range expect a loss of precision to occur.
*/
-QJsonValue::QJsonValue(qint64 n)
- : d(nullptr), t(Double)
+QJsonValue::QJsonValue(qint64 v)
+ : n(v), t(QCborValue::Integer)
{
- this->dbl = double(n);
}
/*!
Creates a value of type String, with value \a s.
*/
QJsonValue::QJsonValue(const QString &s)
- : d(nullptr), t(String)
+ : QJsonValue(QJsonPrivate::Value::fromTrustedCbor(s))
{
- stringDataFromQStringHelper(s);
}
/*!
@@ -211,71 +202,50 @@ QJsonValue::QJsonValue(const QString &s)
\since 5.3
*/
+// ### Qt6: remove
void QJsonValue::stringDataFromQStringHelper(const QString &string)
{
- stringData = *(QStringData **)(&string);
- stringData->ref.ref();
+ *this = QJsonValue(string);
}
/*!
Creates a value of type String, with value \a s.
*/
QJsonValue::QJsonValue(QLatin1String s)
- : d(nullptr), t(String)
+ : QJsonValue(QJsonPrivate::Value::fromTrustedCbor(s))
{
- // ### FIXME: Avoid creating the temp QString below
- QString str(s);
- stringDataFromQStringHelper(str);
}
/*!
Creates a value of type Array, with value \a a.
*/
QJsonValue::QJsonValue(const QJsonArray &a)
- : d(a.d), t(Array)
+ : n(-1), d(a.a), t(QCborValue::Array)
{
- base = a.a;
- if (d)
- d->ref.ref();
}
/*!
Creates a value of type Object, with value \a o.
*/
QJsonValue::QJsonValue(const QJsonObject &o)
- : d(o.d), t(Object)
+ : n(-1), d(o.o), t(QCborValue::Map)
{
- base = o.o;
- if (d)
- d->ref.ref();
}
/*!
Destroys the value.
*/
-QJsonValue::~QJsonValue()
-{
- if (t == String && stringData && !stringData->ref.deref())
- free(stringData);
-
- if (d && !d->ref.deref())
- delete d;
-}
+QJsonValue::~QJsonValue() = default;
/*!
Creates a copy of \a other.
*/
QJsonValue::QJsonValue(const QJsonValue &other)
{
+ n = other.n;
t = other.t;
d = other.d;
- ui = other.ui;
- if (d)
- d->ref.ref();
-
- if (t == String && stringData)
- stringData->ref.ref();
}
/*!
@@ -288,6 +258,23 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
return *this;
}
+QJsonValue::QJsonValue(QJsonValue &&other) noexcept :
+ n(other.n),
+ d(other.d),
+ t(other.t)
+{
+ other.n = 0;
+ other.d = nullptr;
+ other.t = QCborValue::Null;
+}
+
+void QJsonValue::swap(QJsonValue &other) noexcept
+{
+ qSwap(n, other.n);
+ qSwap(d, other.d);
+ qSwap(t, other.t);
+}
+
/*!
\fn QJsonValue::QJsonValue(QJsonValue &&other)
\since 5.10
@@ -460,29 +447,29 @@ QJsonValue QJsonValue::fromVariant(const QVariant &variant)
switch (variant.userType()) {
case QMetaType::Nullptr:
return QJsonValue(Null);
- case QVariant::Bool:
+ case QMetaType::Bool:
return QJsonValue(variant.toBool());
- case QVariant::Int:
+ case QMetaType::Int:
case QMetaType::Float:
- case QVariant::Double:
- case QVariant::LongLong:
- case QVariant::ULongLong:
- case QVariant::UInt:
+ case QMetaType::Double:
+ case QMetaType::LongLong:
+ case QMetaType::ULongLong:
+ case QMetaType::UInt:
return QJsonValue(variant.toDouble());
- case QVariant::String:
+ case QMetaType::QString:
return QJsonValue(variant.toString());
- case QVariant::StringList:
+ case QMetaType::QStringList:
return QJsonValue(QJsonArray::fromStringList(variant.toStringList()));
- case QVariant::List:
+ case QMetaType::QVariantList:
return QJsonValue(QJsonArray::fromVariantList(variant.toList()));
- case QVariant::Map:
+ case QMetaType::QVariantMap:
return QJsonValue(QJsonObject::fromVariantMap(variant.toMap()));
- case QVariant::Hash:
+ case QMetaType::QVariantHash:
return QJsonValue(QJsonObject::fromVariantHash(variant.toHash()));
#ifndef QT_BOOTSTRAPPED
- case QVariant::Url:
+ case QMetaType::QUrl:
return QJsonValue(variant.toUrl().toString(QUrl::FullyEncoded));
- case QVariant::Uuid:
+ case QMetaType::QUuid:
return variant.toUuid().toString(QUuid::WithoutBraces);
case QMetaType::QJsonValue:
return variant.toJsonValue();
@@ -495,11 +482,11 @@ QJsonValue QJsonValue::fromVariant(const QVariant &variant)
return doc.isArray() ? QJsonValue(doc.array()) : QJsonValue(doc.object());
}
case QMetaType::QCborValue:
- return variant.value<QCborValue>().toJsonValue();
+ return qvariant_cast<QCborValue>(variant).toJsonValue();
case QMetaType::QCborArray:
- return variant.value<QCborArray>().toJsonArray();
+ return qvariant_cast<QCborArray>(variant).toJsonArray();
case QMetaType::QCborMap:
- return variant.value<QCborMap>().toJsonObject();
+ return qvariant_cast<QCborMap>(variant).toJsonObject();
#endif
default:
break;
@@ -528,23 +515,27 @@ QJsonValue QJsonValue::fromVariant(const QVariant &variant)
QVariant QJsonValue::toVariant() const
{
switch (t) {
- case Bool:
- return b;
- case Double:
- return dbl;
- case String:
+ case QCborValue::True:
+ return true;
+ case QCborValue::False:
+ return false;
+ case QCborValue::Integer:
+ case QCborValue::Double:
+ return toDouble();
+ case QCborValue::String:
return toString();
- case Array:
+ case QCborValue::Array:
return d ?
- QJsonArray(d, static_cast<QJsonPrivate::Array *>(base)).toVariantList() :
+ QJsonArray(d.data()).toVariantList() :
QVariantList();
- case Object:
+ case QCborValue::Map:
return d ?
- QJsonObject(d, static_cast<QJsonPrivate::Object *>(base)).toVariantMap() :
+ QJsonObject(d.data()).toVariantMap() :
QVariantMap();
- case Null:
+ case QCborValue::Null:
return QVariant::fromValue(nullptr);
- case Undefined:
+ case QCborValue::Undefined:
+ default:
break;
}
return QVariant();
@@ -573,7 +564,25 @@ QVariant QJsonValue::toVariant() const
*/
QJsonValue::Type QJsonValue::type() const
{
- return t;
+ switch (t) {
+ case QCborValue::Null:
+ return QJsonValue::Null;
+ case QCborValue::True:
+ case QCborValue::False:
+ return QJsonValue::Bool;
+ case QCborValue::Double:
+ case QCborValue::Integer:
+ return QJsonValue::Double;
+ case QCborValue::String:
+ return QJsonValue::String;
+ case QCborValue::Array:
+ return QJsonValue::Array;
+ case QCborValue::Map:
+ return QJsonValue::Object;
+ case QCborValue::Undefined:
+ default:
+ return QJsonValue::Undefined;
+ }
}
/*!
@@ -583,9 +592,14 @@ QJsonValue::Type QJsonValue::type() const
*/
bool QJsonValue::toBool(bool defaultValue) const
{
- if (t != Bool)
+ switch (t) {
+ case QCborValue::True:
+ return true;
+ case QCborValue::False:
+ return false;
+ default:
return defaultValue;
- return b;
+ }
}
/*!
@@ -597,9 +611,20 @@ bool QJsonValue::toBool(bool defaultValue) const
*/
int QJsonValue::toInt(int defaultValue) const
{
- if (t == Double && int(dbl) == dbl)
- return int(dbl);
- return defaultValue;
+ switch (t) {
+ case QCborValue::Double: {
+ const double dbl = toDouble();
+ int dblInt;
+ convertDoubleTo<int>(dbl, &dblInt);
+ return dbl == dblInt ? dblInt : defaultValue;
+ }
+ case QCborValue::Integer:
+ return (n <= qint64(std::numeric_limits<int>::max())
+ && n >= qint64(std::numeric_limits<int>::min()))
+ ? n : defaultValue;
+ default:
+ return defaultValue;
+ }
}
/*!
@@ -609,9 +634,17 @@ int QJsonValue::toInt(int defaultValue) const
*/
double QJsonValue::toDouble(double defaultValue) const
{
- if (t != Double)
+ switch (t) {
+ case QCborValue::Double: {
+ double d;
+ memcpy(&d, &n, sizeof(d));
+ return d;
+ }
+ case QCborValue::Integer:
+ return n;
+ default:
return defaultValue;
- return dbl;
+ }
}
/*!
@@ -621,11 +654,7 @@ double QJsonValue::toDouble(double defaultValue) const
*/
QString QJsonValue::toString(const QString &defaultValue) const
{
- if (t != String)
- return defaultValue;
- stringData->ref.ref(); // the constructor below doesn't add a ref.
- QStringDataPtr holder = { stringData };
- return QString(holder);
+ return (t == QCborValue::String && d) ? d->stringAt(n) : defaultValue;
}
/*!
@@ -637,11 +666,7 @@ QString QJsonValue::toString(const QString &defaultValue) const
*/
QString QJsonValue::toString() const
{
- if (t != String)
- return QString();
- stringData->ref.ref(); // the constructor below doesn't add a ref.
- QStringDataPtr holder = { stringData };
- return QString(holder);
+ return (t == QCborValue::String && d) ? d->stringAt(n) : QString();
}
/*!
@@ -651,10 +676,10 @@ QString QJsonValue::toString() const
*/
QJsonArray QJsonValue::toArray(const QJsonArray &defaultValue) const
{
- if (!d || t != Array)
+ if (t != QCborValue::Array || n >= 0 || !d)
return defaultValue;
- return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base));
+ return QJsonArray(d.data());
}
/*!
@@ -676,10 +701,10 @@ QJsonArray QJsonValue::toArray() const
*/
QJsonObject QJsonValue::toObject(const QJsonObject &defaultValue) const
{
- if (!d || t != Object)
+ if (t != QCborValue::Map || n >= 0 || !d)
return defaultValue;
- return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base));
+ return QJsonObject(d.data());
}
/*!
@@ -766,33 +791,31 @@ bool QJsonValue::operator==(const QJsonValue &other) const
return false;
switch (t) {
- case Undefined:
- case Null:
+ case QCborValue::Undefined:
+ case QCborValue::Null:
+ case QCborValue::True:
+ case QCborValue::False:
break;
- case Bool:
- return b == other.b;
- case Double:
- return dbl == other.dbl;
- case String:
+ case QCborValue::Double:
+ return toDouble() == other.toDouble();
+ case QCborValue::Integer:
+ return n == other.n;
+ case QCborValue::String:
return toString() == other.toString();
- case Array:
- if (base == other.base)
- return true;
- if (!base)
- return !other.base->length;
- if (!other.base)
- return !base->length;
- return QJsonArray(d, static_cast<QJsonPrivate::Array *>(base))
- == QJsonArray(other.d, static_cast<QJsonPrivate::Array *>(other.base));
- case Object:
- if (base == other.base)
- return true;
- if (!base)
- return !other.base->length;
- if (!other.base)
- return !base->length;
- return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base))
- == QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.base));
+ case QCborValue::Array:
+ if (!d)
+ return !other.d || other.d->elements.length() == 0;
+ if (!other.d)
+ return d->elements.length() == 0;
+ return QJsonArray(d.data()) == QJsonArray(other.d.data());
+ case QCborValue::Map:
+ if (!d)
+ return !other.d || other.d->elements.length() == 0;
+ if (!other.d)
+ return d->elements.length() == 0;
+ return QJsonObject(d.data()) == QJsonObject(other.d.data());
+ default:
+ return false;
}
return true;
}
@@ -810,15 +833,7 @@ bool QJsonValue::operator!=(const QJsonValue &other) const
*/
void QJsonValue::detach()
{
- if (!d)
- return;
-
- QJsonPrivate::Data *x = d->clone(base);
- x->ref.ref();
- if (!d->ref.deref())
- delete d;
- d = x;
- base = static_cast<QJsonPrivate::Object *>(d->header->root());
+ d.detach();
}
@@ -914,7 +929,7 @@ uint qHash(const QJsonValue &value, uint seed)
QDebug operator<<(QDebug dbg, const QJsonValue &o)
{
QDebugStateSaver saver(dbg);
- switch (o.t) {
+ switch (o.type()) {
case QJsonValue::Undefined:
dbg << "QJsonValue(undefined)";
break;
@@ -948,7 +963,7 @@ QDebug operator<<(QDebug dbg, const QJsonValue &o)
#ifndef QT_NO_DATASTREAM
QDataStream &operator<<(QDataStream &stream, const QJsonValue &v)
{
- quint8 type = v.t;
+ quint8 type = v.type();
stream << type;
switch (type) {
case QJsonValue::Undefined:
diff --git a/src/corelib/serialization/qjsonvalue.h b/src/corelib/serialization/qjsonvalue.h
index 8ade18509b..5adcd64176 100644
--- a/src/corelib/serialization/qjsonvalue.h
+++ b/src/corelib/serialization/qjsonvalue.h
@@ -42,22 +42,18 @@
#include <QtCore/qglobal.h>
#include <QtCore/qstring.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qcborvalue.h>
QT_BEGIN_NAMESPACE
-class QDebug;
class QVariant;
class QJsonArray;
class QJsonObject;
+class QCborContainerPrivate;
namespace QJsonPrivate {
- class Data;
- class Base;
- class Object;
- class Header;
- class Array;
- class Value;
- class Entry;
+class Value;
}
class Q_CORE_EXPORT QJsonValue
@@ -77,12 +73,12 @@ public:
QJsonValue(bool b);
QJsonValue(double n);
QJsonValue(int n);
- QJsonValue(qint64 n);
+ QJsonValue(qint64 v);
QJsonValue(const QString &s);
QJsonValue(QLatin1String s);
#ifndef QT_NO_CAST_FROM_ASCII
inline QT_ASCII_CAST_WARN QJsonValue(const char *s)
- : d(nullptr), t(String) { stringDataFromQStringHelper(QString::fromUtf8(s)); }
+ : QJsonValue(QString::fromUtf8(s)) {}
#endif
QJsonValue(const QJsonArray &a);
QJsonValue(const QJsonObject &o);
@@ -92,15 +88,7 @@ public:
QJsonValue(const QJsonValue &other);
QJsonValue &operator =(const QJsonValue &other);
- QJsonValue(QJsonValue &&other) noexcept
- : ui(other.ui),
- d(other.d),
- t(other.t)
- {
- other.ui = 0;
- other.d = nullptr;
- other.t = Null;
- }
+ QJsonValue(QJsonValue &&other) noexcept;
QJsonValue &operator =(QJsonValue &&other) noexcept
{
@@ -108,12 +96,7 @@ public:
return *this;
}
- void swap(QJsonValue &other) noexcept
- {
- qSwap(ui, other.ui);
- qSwap(d, other.d);
- qSwap(t, other.t);
- }
+ void swap(QJsonValue &other) noexcept;
static QJsonValue fromVariant(const QVariant &variant);
QVariant toVariant() const;
@@ -149,7 +132,7 @@ public:
private:
// avoid implicit conversions from char * to bool
- inline QJsonValue(const void *) {}
+ QJsonValue(const void *) = delete;
friend class QJsonPrivate::Value;
friend class QJsonArray;
friend class QJsonObject;
@@ -157,20 +140,19 @@ private:
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonValue &);
friend Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QJsonValue &);
- QJsonValue(QJsonPrivate::Data *d, QJsonPrivate::Base *b, const QJsonPrivate::Value& v);
+ // ### Qt6: Remove this.
void stringDataFromQStringHelper(const QString &string);
void detach();
- union {
- quint64 ui;
- bool b;
- double dbl;
- QStringData *stringData;
- QJsonPrivate::Base *base;
- };
- QJsonPrivate::Data *d; // needed for Objects and Arrays
- Type t;
+ // ### Qt6: change to an actual QCborValue
+ qint64 n = 0;
+ QExplicitlySharedDataPointer<QCborContainerPrivate> d; // needed for Objects, Arrays, Strings
+ QCborValue::Type t;
+
+ // Assert binary compatibility with pre-5.15 QJsonValue
+ Q_STATIC_ASSERT(sizeof(QExplicitlySharedDataPointer<QCborContainerPrivate>) == sizeof(void *));
+ Q_STATIC_ASSERT(sizeof(QCborValue::Type) == sizeof(QJsonValue::Type));
};
class Q_CORE_EXPORT QJsonValueRef
diff --git a/src/corelib/serialization/qjsonwriter.cpp b/src/corelib/serialization/qjsonwriter.cpp
index 012d3bea86..627d1bbd62 100644
--- a/src/corelib/serialization/qjsonwriter.cpp
+++ b/src/corelib/serialization/qjsonwriter.cpp
@@ -44,13 +44,14 @@
#include "qjson_p.h"
#include "private/qutfcodec_p.h"
#include <private/qnumeric_p.h>
+#include <private/qcborvalue_p.h>
QT_BEGIN_NAMESPACE
using namespace QJsonPrivate;
-static void objectContentToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact);
-static void arrayContentToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact);
+static void objectContentToJson(const QCborContainerPrivate *o, QByteArray &json, int indent, bool compact);
+static void arrayContentToJson(const QCborContainerPrivate *a, QByteArray &json, int indent, bool compact);
static inline uchar hexdig(uint u)
{
@@ -126,16 +127,20 @@ static QByteArray escapedString(const QString &s)
return ba;
}
-static void valueToJson(const QJsonPrivate::Base *b, const QJsonPrivate::Value &v, QByteArray &json, int indent, bool compact)
+static void valueToJson(const QCborValue &v, QByteArray &json, int indent, bool compact)
{
- QJsonValue::Type type = (QJsonValue::Type)(uint)v.type;
+ QCborValue::Type type = v.type();
switch (type) {
- case QJsonValue::Bool:
- json += v.toBoolean() ? "true" : "false";
+ case QCborValue::True:
+ json += "true";
break;
- case QJsonValue::Double: {
- const double d = v.toDouble(b);
- if (qIsFinite(d)) { // +2 to format to ensure the expected precision
+ case QCborValue::False:
+ json += "false";
+ break;
+ case QCborValue::Integer:
+ case QCborValue::Double: {
+ const double d = v.toDouble();
+ if (qIsFinite(d)) {
quint64 absInt;
json += QByteArray::number(d, convertDoubleTo(std::abs(d), &absInt) ? 'f' : 'g',
QLocale::FloatingPointShortest);
@@ -144,42 +149,44 @@ static void valueToJson(const QJsonPrivate::Base *b, const QJsonPrivate::Value &
}
break;
}
- case QJsonValue::String:
+ case QCborValue::String:
json += '"';
- json += escapedString(v.toString(b));
+ json += escapedString(v.toString());
json += '"';
break;
- case QJsonValue::Array:
+ case QCborValue::Array:
json += compact ? "[" : "[\n";
- arrayContentToJson(static_cast<QJsonPrivate::Array *>(v.base(b)), json, indent + (compact ? 0 : 1), compact);
+ arrayContentToJson(
+ QJsonPrivate::Value::container(v), json, indent + (compact ? 0 : 1), compact);
json += QByteArray(4*indent, ' ');
json += ']';
break;
- case QJsonValue::Object:
+ case QCborValue::Map:
json += compact ? "{" : "{\n";
- objectContentToJson(static_cast<QJsonPrivate::Object *>(v.base(b)), json, indent + (compact ? 0 : 1), compact);
+ objectContentToJson(
+ QJsonPrivate::Value::container(v), json, indent + (compact ? 0 : 1), compact);
json += QByteArray(4*indent, ' ');
json += '}';
break;
- case QJsonValue::Null:
+ case QCborValue::Null:
default:
json += "null";
}
}
-static void arrayContentToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact)
+static void arrayContentToJson(const QCborContainerPrivate *a, QByteArray &json, int indent, bool compact)
{
- if (!a || !a->length)
+ if (!a || a->elements.empty())
return;
QByteArray indentString(4*indent, ' ');
- uint i = 0;
- while (1) {
+ qsizetype i = 0;
+ while (true) {
json += indentString;
- valueToJson(a, a->at(i), json, indent, compact);
+ valueToJson(a->valueAt(i), json, indent, compact);
- if (++i == a->length) {
+ if (++i == a->elements.size()) {
if (!compact)
json += '\n';
break;
@@ -190,23 +197,23 @@ static void arrayContentToJson(const QJsonPrivate::Array *a, QByteArray &json, i
}
-static void objectContentToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact)
+static void objectContentToJson(const QCborContainerPrivate *o, QByteArray &json, int indent, bool compact)
{
- if (!o || !o->length)
+ if (!o || o->elements.empty())
return;
QByteArray indentString(4*indent, ' ');
- uint i = 0;
- while (1) {
- QJsonPrivate::Entry *e = o->entryAt(i);
+ qsizetype i = 0;
+ while (true) {
+ QCborValue e = o->valueAt(i);
json += indentString;
json += '"';
- json += escapedString(e->key());
+ json += escapedString(o->valueAt(i).toString());
json += compact ? "\":" : "\": ";
- valueToJson(o, e->value, json, indent, compact);
+ valueToJson(o->valueAt(i + 1), json, indent, compact);
- if (++i == o->length) {
+ if ((i += 2) == o->elements.size()) {
if (!compact)
json += '\n';
break;
@@ -216,18 +223,18 @@ static void objectContentToJson(const QJsonPrivate::Object *o, QByteArray &json,
}
}
-void Writer::objectToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact)
+void Writer::objectToJson(const QCborContainerPrivate *o, QByteArray &json, int indent, bool compact)
{
- json.reserve(json.size() + (o ? (int)o->size : 16));
+ json.reserve(json.size() + (o ? (int)o->elements.size() : 16));
json += compact ? "{" : "{\n";
objectContentToJson(o, json, indent + (compact ? 0 : 1), compact);
json += QByteArray(4*indent, ' ');
json += compact ? "}" : "}\n";
}
-void Writer::arrayToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact)
+void Writer::arrayToJson(const QCborContainerPrivate *a, QByteArray &json, int indent, bool compact)
{
- json.reserve(json.size() + (a ? (int)a->size : 16));
+ json.reserve(json.size() + (a ? (int)a->elements.size() : 16));
json += compact ? "[" : "[\n";
arrayContentToJson(a, json, indent + (compact ? 0 : 1), compact);
json += QByteArray(4*indent, ' ');
diff --git a/src/corelib/serialization/qjsonwriter_p.h b/src/corelib/serialization/qjsonwriter_p.h
index 76a8460449..8c263bb7c3 100644
--- a/src/corelib/serialization/qjsonwriter_p.h
+++ b/src/corelib/serialization/qjsonwriter_p.h
@@ -62,8 +62,8 @@ namespace QJsonPrivate
class Writer
{
public:
- static void objectToJson(const QJsonPrivate::Object *o, QByteArray &json, int indent, bool compact = false);
- static void arrayToJson(const QJsonPrivate::Array *a, QByteArray &json, int indent, bool compact = false);
+ static void objectToJson(const QCborContainerPrivate *o, QByteArray &json, int indent, bool compact = false);
+ static void arrayToJson(const QCborContainerPrivate *a, QByteArray &json, int indent, bool compact = false);
};
}
diff --git a/src/corelib/serialization/qtextstream.cpp b/src/corelib/serialization/qtextstream.cpp
index cf59cc54c7..b8137e0abd 100644
--- a/src/corelib/serialization/qtextstream.cpp
+++ b/src/corelib/serialization/qtextstream.cpp
@@ -1681,7 +1681,7 @@ QString QTextStream::readLine(qint64 maxlen)
\since 5.5
Reads one line of text from the stream into \a line.
- If \a line is 0, the read line is not stored.
+ If \a line is \nullptr, the read line is not stored.
The maximum allowed line length is set to \a maxlen. If
the stream contains lines longer than this, then the lines will be
@@ -2689,11 +2689,8 @@ QTextStream &QTextStream::operator<<(const void *ptr)
d->params.numberFlags = oldFlags;
return *this;
}
-#if defined(Q_QDOC) || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+
namespace Qt {
-#else
-namespace QTextStreamFunctions {
-#endif
/*!
\relates QTextStream
@@ -3020,7 +3017,7 @@ QTextStream &ws(QTextStream &stream)
return stream;
}
-} // namespace QTextStreamFunctions
+} // namespace Qt
/*!
\fn QTextStreamManipulator qSetFieldWidth(int width)
@@ -3045,11 +3042,7 @@ QTextStream &ws(QTextStream &stream)
#if QT_CONFIG(textcodec)
-#if defined(Q_QDOC) || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
namespace Qt {
-#else
-namespace QTextStreamFunctions {
-#endif
/*!
\relates QTextStream
@@ -3064,7 +3057,7 @@ QTextStream &bom(QTextStream &stream)
return stream;
}
-} // namespace QTextStreamFunctions
+} // namespace Qt
/*!
Sets the codec for this stream to \a codec. The codec is used for
@@ -3215,6 +3208,45 @@ QLocale QTextStream::locale() const
return d->locale;
}
+#if QT_DEPRECATED_SINCE(5, 15) && !defined(Q_QDOC)
+// Deprecated source compatible migration versions:
+namespace QTextStreamFunctions {
+QTextStream &bin(QTextStream &s) { return Qt::bin(s); }
+QTextStream &oct(QTextStream &s) { return Qt::oct(s); }
+QTextStream &dec(QTextStream &s) { return Qt::dec(s); }
+QTextStream &hex(QTextStream &s) { return Qt::hex(s); }
+
+QTextStream &showbase(QTextStream &s) { return Qt::showbase(s); }
+QTextStream &forcesign(QTextStream &s) { return Qt::forcesign(s); }
+QTextStream &forcepoint(QTextStream &s) { return Qt::forcepoint(s); }
+QTextStream &noshowbase(QTextStream &s) { return Qt::noshowbase(s); }
+QTextStream &noforcesign(QTextStream &s) { return Qt::noforcesign(s); }
+QTextStream &noforcepoint(QTextStream &s) { return Qt::noforcepoint(s); }
+
+QTextStream &uppercasebase(QTextStream &s) { return Qt::uppercasebase(s); }
+QTextStream &uppercasedigits(QTextStream &s) { return Qt::uppercasedigits(s); }
+QTextStream &lowercasebase(QTextStream &s) { return Qt::lowercasebase(s); }
+QTextStream &lowercasedigits(QTextStream &s) { return Qt::lowercasedigits(s); }
+
+QTextStream &fixed(QTextStream &s) { return Qt::fixed(s); }
+QTextStream &scientific(QTextStream &s) { return Qt::scientific(s); }
+
+QTextStream &left(QTextStream &s) { return Qt::left(s); }
+QTextStream &right(QTextStream &s) { return Qt::right(s); }
+QTextStream &center(QTextStream &s) { return Qt::center(s); }
+
+QTextStream &endl(QTextStream &s) { return Qt::endl(s); }
+QTextStream &flush(QTextStream &s) { return Qt::flush(s); }
+QTextStream &reset(QTextStream &s) { return Qt::reset(s); }
+
+QTextStream &ws(QTextStream &s) { return Qt::ws(s); }
+
+#if QT_CONFIG(textcodec)
+QTextStream &bom(QTextStream &s) { return Qt::bom(s); }
+#endif
+} // namespace QTextStreamFunctions
+#endif
+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && !defined(Q_QDOC)
// Binary compatible definitions for Qt<5.14
Q_CORE_EXPORT QTextStream &bin(QTextStream &s) { return Qt::bin(s); }
diff --git a/src/corelib/serialization/qtextstream.h b/src/corelib/serialization/qtextstream.h
index 935ec16536..6f93826d8a 100644
--- a/src/corelib/serialization/qtextstream.h
+++ b/src/corelib/serialization/qtextstream.h
@@ -233,13 +233,7 @@ inline QTextStream &operator<<(QTextStream &s, QTextStreamFunction f)
inline QTextStream &operator<<(QTextStream &s, QTextStreamManipulator m)
{ m.exec(s); return s; }
-#if defined(Q_QDOC) || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
namespace Qt {
-#else
-// This namespace only exists for 'using namespace' declarations.
-namespace QTextStreamFunctions {
-#endif
-
Q_CORE_EXPORT QTextStream &bin(QTextStream &s);
Q_CORE_EXPORT QTextStream &oct(QTextStream &s);
Q_CORE_EXPORT QTextStream &dec(QTextStream &s);
@@ -272,12 +266,36 @@ Q_CORE_EXPORT QTextStream &bom(QTextStream &s);
Q_CORE_EXPORT QTextStream &ws(QTextStream &s);
-} // namespace QTextStreamFunctions
+} // namespace Qt
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && !defined(Q_QDOC)
-namespace Qt {
-using namespace QTextStreamFunctions;
-}
+#if QT_DEPRECATED_SINCE(5, 15) && !defined(Q_QDOC)
+// This namespace only exists for 'using namespace' declarations.
+namespace QTextStreamFunctions {
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::bin") QTextStream &bin(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::oct") QTextStream &oct(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::dec") QTextStream &dec(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::hex") QTextStream &hex(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::showbase") QTextStream &showbase(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::forcesign") QTextStream &forcesign(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::forcepoint") QTextStream &forcepoint(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::noshowbase") QTextStream &noshowbase(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::noforcesign") QTextStream &noforcesign(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::noforcepoint") QTextStream &noforcepoint(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::uppercasebase") QTextStream &uppercasebase(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::uppercasedigits") QTextStream &uppercasedigits(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::lowercasebase") QTextStream &lowercasebase(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::lowercasedigits") QTextStream &lowercasedigits(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::fixed") QTextStream &fixed(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::scientific") QTextStream &scientific(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::left") QTextStream &left(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::right") QTextStream &right(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::center") QTextStream &center(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::endl") QTextStream &endl(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::flush") QTextStream &flush(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::reset") QTextStream &reset(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::bom") QTextStream &bom(QTextStream &s);
+Q_CORE_EXPORT QT_DEPRECATED_X("Use Qt::ws") QTextStream &ws(QTextStream &s);
+} // namespace QTextStreamFunctions
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wheader-hygiene")
@@ -285,7 +303,7 @@ QT_WARNING_DISABLE_CLANG("-Wheader-hygiene")
// conflicting definitions compiler errors.
using namespace QTextStreamFunctions;
QT_WARNING_POP
-#endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && !defined(Q_QDOC)
+#endif // QT_DEPRECATED_SINCE(5, 15) && !defined(Q_QDOC)
inline QTextStreamManipulator qSetFieldWidth(int width)
{
diff --git a/src/corelib/serialization/serialization.pri b/src/corelib/serialization/serialization.pri
index 4f2dc64e4f..ff653ca8f3 100644
--- a/src/corelib/serialization/serialization.pri
+++ b/src/corelib/serialization/serialization.pri
@@ -3,10 +3,11 @@
HEADERS += \
serialization/qcborarray.h \
serialization/qcborcommon.h \
+ serialization/qcborcommon_p.h \
serialization/qcbormap.h \
+ serialization/qcborstream.h \
serialization/qcborvalue.h \
serialization/qcborvalue_p.h \
- serialization/qcborstream.h \
serialization/qdatastream.h \
serialization/qdatastream_p.h \
serialization/qjson_p.h \
@@ -23,11 +24,10 @@ HEADERS += \
serialization/qxmlutils_p.h
SOURCES += \
- serialization/qcborstream.cpp \
+ serialization/qcborcommon.cpp \
serialization/qcbordiagnostic.cpp \
serialization/qcborvalue.cpp \
serialization/qdatastream.cpp \
- serialization/qjson.cpp \
serialization/qjsoncbor.cpp \
serialization/qjsondocument.cpp \
serialization/qjsonobject.cpp \
@@ -39,6 +39,36 @@ SOURCES += \
serialization/qxmlstream.cpp \
serialization/qxmlutils.cpp
+qtConfig(cborstreamreader): {
+ SOURCES += \
+ serialization/qcborstreamreader.cpp
+
+ HEADERS += \
+ serialization/qcborstreamreader.h
+}
+
+qtConfig(cborstreamwriter): {
+ SOURCES += \
+ serialization/qcborstreamwriter.cpp
+
+ HEADERS += \
+ serialization/qcborstreamwriter.h
+}
+
+qtConfig(binaryjson): {
+ HEADERS += \
+ serialization/qbinaryjson_p.h \
+ serialization/qbinaryjsonarray_p.h \
+ serialization/qbinaryjsonobject_p.h \
+ serialization/qbinaryjsonvalue_p.h
+
+ SOURCES += \
+ serialization/qbinaryjson.cpp \
+ serialization/qbinaryjsonarray.cpp \
+ serialization/qbinaryjsonobject.cpp \
+ serialization/qbinaryjsonvalue.cpp \
+}
+
false: SOURCES += \
serialization/qcborarray.cpp \
serialization/qcbormap.cpp
diff --git a/src/corelib/statemachine/qabstractstate.cpp b/src/corelib/statemachine/qabstractstate.cpp
index 0db44bc427..10f54c3e18 100644
--- a/src/corelib/statemachine/qabstractstate.cpp
+++ b/src/corelib/statemachine/qabstractstate.cpp
@@ -84,19 +84,19 @@ QT_BEGIN_NAMESPACE
QAbstractStatePrivate::QAbstractStatePrivate(StateType type)
- : stateType(type), isMachine(false), active(false), parentState(0)
+ : stateType(type), isMachine(false), active(false), parentState(nullptr)
{
}
QStateMachine *QAbstractStatePrivate::machine() const
{
QObject *par = parent;
- while (par != 0) {
+ while (par != nullptr) {
if (QStateMachine *mach = qobject_cast<QStateMachine*>(par))
return mach;
par = par->parent();
}
- return 0;
+ return nullptr;
}
void QAbstractStatePrivate::callOnEntry(QEvent *e)
diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp
index d841fd3c8b..df70b54721 100644
--- a/src/corelib/statemachine/qabstracttransition.cpp
+++ b/src/corelib/statemachine/qabstracttransition.cpp
@@ -144,7 +144,7 @@ QStateMachine *QAbstractTransitionPrivate::machine() const
Q_Q(const QAbstractTransition);
if (QHistoryState *parent = qobject_cast<QHistoryState *>(q->parent()))
return parent->machine();
- return 0;
+ return nullptr;
}
bool QAbstractTransitionPrivate::callEventTest(QEvent *e)
@@ -223,7 +223,7 @@ void QAbstractTransition::setTargetState(QAbstractState* target)
{
Q_D(QAbstractTransition);
if ((d->targetStates.size() == 1 && target == d->targetStates.at(0).data()) ||
- (d->targetStates.isEmpty() && target == 0)) {
+ (d->targetStates.isEmpty() && target == nullptr)) {
return;
}
if (!target)
diff --git a/src/corelib/statemachine/qeventtransition.cpp b/src/corelib/statemachine/qeventtransition.cpp
index a90f147773..5dcbcfff47 100644
--- a/src/corelib/statemachine/qeventtransition.cpp
+++ b/src/corelib/statemachine/qeventtransition.cpp
@@ -100,7 +100,7 @@ QT_BEGIN_NAMESPACE
*/
QEventTransitionPrivate::QEventTransitionPrivate()
{
- object = 0;
+ object = nullptr;
eventType = QEvent::None;
registered = false;
}
diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp
index ccf04d4799..e5b8075b96 100644
--- a/src/corelib/statemachine/qhistorystate.cpp
+++ b/src/corelib/statemachine/qhistorystate.cpp
@@ -147,7 +147,7 @@ protected:
QHistoryStatePrivate::QHistoryStatePrivate()
: QAbstractStatePrivate(HistoryState)
- , defaultTransition(0)
+ , defaultTransition(nullptr)
, historyType(QHistoryState::ShallowHistory)
{
}
diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp
index 59e0c0d788..8e57695fd7 100644
--- a/src/corelib/statemachine/qsignaltransition.cpp
+++ b/src/corelib/statemachine/qsignaltransition.cpp
@@ -107,7 +107,7 @@ QT_BEGIN_NAMESPACE
QSignalTransitionPrivate::QSignalTransitionPrivate()
{
- sender = 0;
+ sender = nullptr;
signalIndex = -1;
}
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp
index 62dd4f0284..f641d25a96 100644
--- a/src/corelib/statemachine/qstate.cpp
+++ b/src/corelib/statemachine/qstate.cpp
@@ -146,7 +146,7 @@ QT_BEGIN_NAMESPACE
QStatePrivate::QStatePrivate()
: QAbstractStatePrivate(StandardState),
- errorState(0), initialState(0), childMode(QState::ExclusiveStates),
+ errorState(nullptr), initialState(nullptr), childMode(QState::ExclusiveStates),
childStatesListNeedsRefresh(true), transitionsListNeedsRefresh(true)
{
}
@@ -293,11 +293,11 @@ QAbstractState *QState::errorState() const
void QState::setErrorState(QAbstractState *state)
{
Q_D(QState);
- if (state != 0 && qobject_cast<QStateMachine*>(state)) {
+ if (state != nullptr && qobject_cast<QStateMachine*>(state)) {
qWarning("QStateMachine::setErrorState: root state cannot be error state");
return;
}
- if (state != 0 && (!state->machine() || ((state->machine() != machine()) && !qobject_cast<QStateMachine*>(this)))) {
+ if (state != nullptr && (!state->machine() || ((state->machine() != machine()) && !qobject_cast<QStateMachine*>(this)))) {
qWarning("QState::setErrorState: error state cannot belong "
"to a different state machine");
return;
@@ -360,15 +360,15 @@ QSignalTransition *QState::addTransition(const QObject *sender, const char *sign
{
if (!sender) {
qWarning("QState::addTransition: sender cannot be null");
- return 0;
+ return nullptr;
}
if (!signal) {
qWarning("QState::addTransition: signal cannot be null");
- return 0;
+ return nullptr;
}
if (!target) {
qWarning("QState::addTransition: cannot add transition to null state");
- return 0;
+ return nullptr;
}
int offset = (*signal == '0'+QSIGNAL_CODE) ? 1 : 0;
const QMetaObject *meta = sender->metaObject();
@@ -376,7 +376,7 @@ QSignalTransition *QState::addTransition(const QObject *sender, const char *sign
if (meta->indexOfSignal(QMetaObject::normalizedSignature(signal+offset)) == -1) {
qWarning("QState::addTransition: no such signal %s::%s",
meta->className(), signal+offset);
- return 0;
+ return nullptr;
}
}
QSignalTransition *trans = new QSignalTransition(sender, signal);
@@ -409,7 +409,7 @@ QAbstractTransition *QState::addTransition(QAbstractState *target)
{
if (!target) {
qWarning("QState::addTransition: cannot add transition to null state");
- return 0;
+ return nullptr;
}
UnconditionalTransition *trans = new UnconditionalTransition(target);
addTransition(trans);
@@ -438,7 +438,7 @@ void QState::removeTransition(QAbstractTransition *transition)
QStateMachinePrivate *mach = QStateMachinePrivate::get(d->machine());
if (mach)
mach->unregisterTransition(transition);
- transition->setParent(0);
+ transition->setParent(nullptr);
}
/*!
@@ -544,7 +544,7 @@ bool QState::event(QEvent *e)
d->childStatesListNeedsRefresh = true;
d->transitionsListNeedsRefresh = true;
if ((e->type() == QEvent::ChildRemoved) && (static_cast<QChildEvent *>(e)->child() == d->initialState))
- d->initialState = 0;
+ d->initialState = nullptr;
}
return QAbstractState::event(e);
}
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 44e4e151cb..a257cbc306 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -197,7 +197,7 @@ struct CalculationCache {
bool transitionDomainIsKnown : 1;
TransitionInfo()
- : transitionDomain(0)
+ : transitionDomain(nullptr)
, effectiveTargetStatesIsKnown(false)
, exitSetIsKnown(false)
, transitionDomainIsKnown(false)
@@ -289,9 +289,9 @@ child of a child, etc.) Otherwise returns 'false'.
*/
static inline bool isDescendant(const QAbstractState *state1, const QAbstractState *state2)
{
- Q_ASSERT(state1 != 0);
+ Q_ASSERT(state1 != nullptr);
- for (QAbstractState *it = state1->parentState(); it != 0; it = it->parentState()) {
+ for (QAbstractState *it = state1->parentState(); it != nullptr; it = it->parentState()) {
if (it == state2)
return true;
}
@@ -311,7 +311,7 @@ static bool containsDecendantOf(const QSet<QAbstractState *> &states, const QAbs
static int descendantDepth(const QAbstractState *state, const QAbstractState *ancestor)
{
int depth = 0;
- for (const QAbstractState *it = state; it != 0; it = it->parentState()) {
+ for (const QAbstractState *it = state; it != nullptr; it = it->parentState()) {
if (it == ancestor)
break;
++depth;
@@ -332,7 +332,7 @@ this returns the empty set.
*/
static QVector<QState*> getProperAncestors(const QAbstractState *state, const QAbstractState *upperBound)
{
- Q_ASSERT(state != 0);
+ Q_ASSERT(state != nullptr);
QVector<QState*> result;
result.reserve(16);
for (QState *it = state->parentState(); it && it != upperBound; it = it->parentState()) {
@@ -405,7 +405,7 @@ QStateMachinePrivate::QStateMachinePrivate()
stopProcessingReason = EventQueueEmpty;
error = QStateMachine::NoError;
globalRestorePolicy = QState::DontRestoreProperties;
- signalEventGenerator = 0;
+ signalEventGenerator = nullptr;
#if QT_CONFIG(animation)
animated = true;
#endif
@@ -437,7 +437,7 @@ static QEvent *cloneEvent(QEvent *e)
Q_ASSERT_X(false, "cloneEvent()", "not implemented");
break;
}
- return 0;
+ return nullptr;
}
const QStateMachinePrivate::Handler qt_kernel_statemachine_handler = {
@@ -474,10 +474,10 @@ bool QStateMachinePrivate::transitionStateEntryLessThan(QAbstractTransition *t1,
} else if (isDescendant(s2, s1)) {
return false;
} else {
- Q_ASSERT(s1->machine() != 0);
+ Q_ASSERT(s1->machine() != nullptr);
QStateMachinePrivate *mach = QStateMachinePrivate::get(s1->machine());
QState *lca = mach->findLCA(QList<QAbstractState*>() << s1 << s2);
- Q_ASSERT(lca != 0);
+ Q_ASSERT(lca != nullptr);
int s1Depth = descendantDepth(s1, lca);
int s2Depth = descendantDepth(s2, lca);
if (s1Depth == s2Depth)
@@ -497,10 +497,10 @@ bool QStateMachinePrivate::stateEntryLessThan(QAbstractState *s1, QAbstractState
} else if (isDescendant(s2, s1)) {
return true;
} else {
- Q_ASSERT(s1->machine() != 0);
+ Q_ASSERT(s1->machine() != nullptr);
QStateMachinePrivate *mach = QStateMachinePrivate::get(s1->machine());
QState *lca = mach->findLCA(QList<QAbstractState*>() << s1 << s2);
- Q_ASSERT(lca != 0);
+ Q_ASSERT(lca != nullptr);
return (indexOfDescendant(lca, s1) < indexOfDescendant(lca, s2));
}
}
@@ -515,10 +515,10 @@ bool QStateMachinePrivate::stateExitLessThan(QAbstractState *s1, QAbstractState
} else if (isDescendant(s2, s1)) {
return false;
} else {
- Q_ASSERT(s1->machine() != 0);
+ Q_ASSERT(s1->machine() != nullptr);
QStateMachinePrivate *mach = QStateMachinePrivate::get(s1->machine());
QState *lca = mach->findLCA(QList<QAbstractState*>() << s1 << s2);
- Q_ASSERT(lca != 0);
+ Q_ASSERT(lca != nullptr);
return (indexOfDescendant(lca, s2) < indexOfDescendant(lca, s1));
}
}
@@ -526,7 +526,7 @@ bool QStateMachinePrivate::stateExitLessThan(QAbstractState *s1, QAbstractState
QState *QStateMachinePrivate::findLCA(const QList<QAbstractState*> &states, bool onlyCompound)
{
if (states.isEmpty())
- return 0;
+ return nullptr;
QVector<QState*> ancestors = getProperAncestors(states.at(0), rootState()->parentState());
for (int i = 0; i < ancestors.size(); ++i) {
QState *anc = ancestors.at(i);
@@ -792,7 +792,7 @@ QSet<QAbstractState*> QStateMachinePrivate::computeExitSet_Unordered(QAbstractTr
lst.prepend(t->sourceState());
domain = findLCCA(lst);
- Q_ASSERT(domain != 0);
+ Q_ASSERT(domain != nullptr);
}
for (QAbstractState* s : qAsConst(configuration)) {
@@ -918,7 +918,7 @@ QAbstractState *QStateMachinePrivate::getTransitionDomain(QAbstractTransition *t
Q_ASSERT(cache);
if (effectiveTargetStates.isEmpty())
- return 0;
+ return nullptr;
QAbstractState *domain = nullptr;
if (cache->transitionDomain(t, &domain))
@@ -1234,28 +1234,28 @@ QState *QStateMachinePrivate::toStandardState(QAbstractState *state)
{
if (state && (QAbstractStatePrivate::get(state)->stateType == QAbstractStatePrivate::StandardState))
return static_cast<QState*>(state);
- return 0;
+ return nullptr;
}
const QState *QStateMachinePrivate::toStandardState(const QAbstractState *state)
{
if (state && (QAbstractStatePrivate::get(state)->stateType == QAbstractStatePrivate::StandardState))
return static_cast<const QState*>(state);
- return 0;
+ return nullptr;
}
QFinalState *QStateMachinePrivate::toFinalState(QAbstractState *state)
{
if (state && (QAbstractStatePrivate::get(state)->stateType == QAbstractStatePrivate::FinalState))
return static_cast<QFinalState*>(state);
- return 0;
+ return nullptr;
}
QHistoryState *QStateMachinePrivate::toHistoryState(QAbstractState *state)
{
if (state && (QAbstractStatePrivate::get(state)->stateType == QAbstractStatePrivate::HistoryState))
return static_cast<QHistoryState*>(state);
- return 0;
+ return nullptr;
}
bool QStateMachinePrivate::isInFinalState(QAbstractState* s) const
@@ -1455,13 +1455,13 @@ QHash<QAbstractState*, QVector<QPropertyAssignment> > QStateMachinePrivate::comp
QAbstractState *QStateMachinePrivate::findErrorState(QAbstractState *context)
{
// Find error state recursively in parent hierarchy if not set explicitly for context state
- QAbstractState *errorState = 0;
- if (context != 0) {
+ QAbstractState *errorState = nullptr;
+ if (context != nullptr) {
QState *s = toStandardState(context);
- if (s != 0)
+ if (s != nullptr)
errorState = s->errorState();
- if (errorState == 0)
+ if (errorState == nullptr)
errorState = findErrorState(context->parentState());
}
@@ -1475,21 +1475,21 @@ void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractSta
error = errorCode;
switch (errorCode) {
case QStateMachine::NoInitialStateError:
- Q_ASSERT(currentContext != 0);
+ Q_ASSERT(currentContext != nullptr);
errorString = QStateMachine::tr("Missing initial state in compound state '%1'")
.arg(currentContext->objectName());
break;
case QStateMachine::NoDefaultStateInHistoryStateError:
- Q_ASSERT(currentContext != 0);
+ Q_ASSERT(currentContext != nullptr);
errorString = QStateMachine::tr("Missing default state in history state '%1'")
.arg(currentContext->objectName());
break;
case QStateMachine::NoCommonAncestorForTransitionError:
- Q_ASSERT(currentContext != 0);
+ Q_ASSERT(currentContext != nullptr);
errorString = QStateMachine::tr("No common ancestor for targets and source of transition from state '%1'")
.arg(currentContext->objectName());
@@ -1513,11 +1513,11 @@ void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractSta
// Avoid infinite loop if the error state itself has an error
if (currentContext == currentErrorState)
- currentErrorState = 0;
+ currentErrorState = nullptr;
Q_ASSERT(currentErrorState != rootState());
- if (currentErrorState != 0) {
+ if (currentErrorState != nullptr) {
#ifdef QSTATEMACHINE_DEBUG
qDebug() << q << ": entering error state" << currentErrorState << "from" << currentContext;
#endif
@@ -1549,7 +1549,7 @@ QStateMachinePrivate::initializeAnimation(QAbstractAnimation *abstractAnimation,
}
} else {
QPropertyAnimation *animation = qobject_cast<QPropertyAnimation *>(abstractAnimation);
- if (animation != 0
+ if (animation != nullptr
&& prop.object == animation->targetObject()
&& prop.propertyName == animation->propertyName()) {
@@ -1568,7 +1568,7 @@ void QStateMachinePrivate::_q_animationFinished()
{
Q_Q(QStateMachine);
QAbstractAnimation *anim = qobject_cast<QAbstractAnimation*>(q->sender());
- Q_ASSERT(anim != 0);
+ Q_ASSERT(anim != nullptr);
QObject::disconnect(anim, SIGNAL(finished()), q, SLOT(_q_animationFinished()));
if (resetAnimationEndValues.contains(anim)) {
qobject_cast<QVariantAnimation*>(anim)->setEndValue(QVariant()); // ### generalize
@@ -1576,7 +1576,7 @@ void QStateMachinePrivate::_q_animationFinished()
}
QAbstractState *state = stateForAnimation.take(anim);
- Q_ASSERT(state != 0);
+ Q_ASSERT(state != nullptr);
#ifndef QT_NO_PROPERTIES
// Set the final property value.
@@ -1638,7 +1638,7 @@ void QStateMachinePrivate::terminateActiveAnimations(QAbstractState *state,
resetAnimationEndValues.remove(anim);
}
QPropertyAssignment assn = propertyForAnimation.take(anim);
- Q_ASSERT(assn.object != 0);
+ Q_ASSERT(assn.object != nullptr);
// If there is no property assignment that sets this property,
// set the property to its target value.
bool found = false;
@@ -1745,7 +1745,7 @@ QAbstractTransition *QStateMachinePrivate::createInitialTransition() const
};
QState *root = rootState();
- Q_ASSERT(root != 0);
+ Q_ASSERT(root != nullptr);
QList<QAbstractState *> targets;
switch (root->childMode()) {
case QState::ExclusiveStates:
@@ -1891,26 +1891,26 @@ void QStateMachinePrivate::_q_process()
enabledTransitions = selectTransitions(e, &calculationCache);
if (enabledTransitions.isEmpty()) {
delete e;
- e = 0;
+ e = nullptr;
}
- while (enabledTransitions.isEmpty() && ((e = dequeueInternalEvent()) != 0)) {
+ while (enabledTransitions.isEmpty() && ((e = dequeueInternalEvent()) != nullptr)) {
#ifdef QSTATEMACHINE_DEBUG
qDebug() << q << ": dequeued internal event" << e << "of type" << e->type();
#endif
enabledTransitions = selectTransitions(e, &calculationCache);
if (enabledTransitions.isEmpty()) {
delete e;
- e = 0;
+ e = nullptr;
}
}
- while (enabledTransitions.isEmpty() && ((e = dequeueExternalEvent()) != 0)) {
+ while (enabledTransitions.isEmpty() && ((e = dequeueExternalEvent()) != nullptr)) {
#ifdef QSTATEMACHINE_DEBUG
qDebug() << q << ": dequeued external event" << e << "of type" << e->type();
#endif
enabledTransitions = selectTransitions(e, &calculationCache);
if (enabledTransitions.isEmpty()) {
delete e;
- e = 0;
+ e = nullptr;
}
}
if (enabledTransitions.isEmpty()) {
@@ -2009,7 +2009,7 @@ QEvent *QStateMachinePrivate::dequeueInternalEvent()
{
QMutexLocker locker(&internalEventMutex);
if (internalEventQueue.isEmpty())
- return 0;
+ return nullptr;
return internalEventQueue.takeFirst();
}
@@ -2017,7 +2017,7 @@ QEvent *QStateMachinePrivate::dequeueExternalEvent()
{
QMutexLocker locker(&externalEventMutex);
if (externalEventQueue.isEmpty())
- return 0;
+ return nullptr;
return externalEventQueue.takeFirst();
}
@@ -2175,15 +2175,15 @@ void QStateMachinePrivate::goToState(QAbstractState *targetState)
return;
Q_ASSERT(state == Running);
- QState *sourceState = 0;
+ QState *sourceState = nullptr;
QSet<QAbstractState*>::const_iterator it;
for (it = configuration.constBegin(); it != configuration.constEnd(); ++it) {
sourceState = toStandardState(*it);
- if (sourceState != 0)
+ if (sourceState != nullptr)
break;
}
- Q_ASSERT(sourceState != 0);
+ Q_ASSERT(sourceState != nullptr);
// Reuse previous GoToStateTransition in case of several calls to
// goToState() in a row.
GoToStateTransition *trans = sourceState->findChild<GoToStateTransition*>();
@@ -2327,7 +2327,7 @@ void QStateMachinePrivate::unregisterSignalTransition(QSignalTransition *transit
Q_ASSERT(connectedSignalIndexes.size() > signalIndex);
Q_ASSERT(connectedSignalIndexes.at(signalIndex) != 0);
if (--connectedSignalIndexes[signalIndex] == 0) {
- Q_ASSERT(signalEventGenerator != 0);
+ Q_ASSERT(signalEventGenerator != nullptr);
static const int generatorMethodOffset = QSignalEventGenerator::staticMetaObject.methodOffset();
QMetaObject::disconnect(sender, signalIndex, signalEventGenerator, generatorMethodOffset);
int sum = 0;
@@ -2454,7 +2454,7 @@ void QStateMachinePrivate::handleTransitionSignal(QObject *sender, int signalInd
Constructs a new state machine with the given \a parent.
*/
QStateMachine::QStateMachine(QObject *parent)
- : QState(*new QStateMachinePrivate, /*parentState=*/0)
+ : QState(*new QStateMachinePrivate, /*parentState=*/nullptr)
{
// Can't pass the parent to the QState constructor, as it expects a QState
// But this works as expected regardless of whether parent is a QState or not
@@ -2472,7 +2472,7 @@ QStateMachine::QStateMachine(QObject *parent)
state machine is invalid, and might work incorrectly.
*/
QStateMachine::QStateMachine(QState::ChildMode childMode, QObject *parent)
- : QState(*new QStateMachinePrivate, /*parentState=*/0)
+ : QState(*new QStateMachinePrivate, /*parentState=*/nullptr)
{
Q_D(QStateMachine);
d->childMode = childMode;
@@ -2495,7 +2495,7 @@ QStateMachine::QStateMachine(QState::ChildMode childMode, QObject *parent)
\internal
*/
QStateMachine::QStateMachine(QStateMachinePrivate &dd, QObject *parent)
- : QState(dd, /*parentState=*/0)
+ : QState(dd, /*parentState=*/nullptr)
{
setParent(parent);
}
@@ -2637,7 +2637,7 @@ void QStateMachine::removeState(QAbstractState *state)
state, QAbstractStatePrivate::get(state)->machine(), this);
return;
}
- state->setParent(0);
+ state->setParent(nullptr);
}
bool QStateMachine::isRunning() const
@@ -2661,7 +2661,7 @@ void QStateMachine::start()
{
Q_D(QStateMachine);
- if ((childMode() == QState::ExclusiveStates) && (initialState() == 0)) {
+ if ((childMode() == QState::ExclusiveStates) && (initialState() == nullptr)) {
qWarning("QStateMachine::start: No initial state set for machine. Refusing to start.");
return;
}
@@ -2897,7 +2897,7 @@ bool QStateMachine::event(QEvent *e)
d->delayedEventsMutex.lock();
int id = d->timerIdToDelayedEventId.take(tid);
QStateMachinePrivate::DelayedEvent ee = d->delayedEvents.take(id);
- if (ee.event != 0) {
+ if (ee.event != nullptr) {
Q_ASSERT(ee.timerId == tid);
killTimer(tid);
d->delayedEventIdFreeList.release(id);
@@ -3103,7 +3103,7 @@ void QSignalEventGenerator::qt_static_metacall(QObject *_o, QMetaObject::Call _c
const QMetaObject QSignalEventGenerator::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_QSignalEventGenerator.data,
- qt_meta_data_QSignalEventGenerator, qt_static_metacall, 0, 0 }
+ qt_meta_data_QSignalEventGenerator, qt_static_metacall, nullptr, nullptr }
};
const QMetaObject *QSignalEventGenerator::metaObject() const
@@ -3113,7 +3113,7 @@ const QMetaObject *QSignalEventGenerator::metaObject() const
void *QSignalEventGenerator::qt_metacast(const char *_clname)
{
- if (!_clname) return 0;
+ if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_QSignalEventGenerator.stringdata))
return static_cast<void*>(const_cast< QSignalEventGenerator*>(this));
return QObject::qt_metacast(_clname);
@@ -3273,6 +3273,26 @@ QStateMachine::WrappedEvent::~WrappedEvent()
\sa QStateMachine::running
*/
+/*!
+ \fn QStateMachine::postDelayedEvent(QEvent *event, std::chrono::milliseconds delay)
+ \since 5.15
+ \overload
+ \threadsafe
+
+ Posts the given \a event for processing by this state machine, with the
+ given \a delay in milliseconds. Returns an identifier associated with the
+ delayed event, or -1 if the event could not be posted.
+
+ This function returns immediately. When the delay has expired, the event
+ will be added to the state machine's event queue for processing. The state
+ machine takes ownership of the event and deletes it once it has been
+ processed.
+
+ You can only post events when the state machine is running.
+
+ \sa cancelDelayedEvent(), postEvent()
+*/
+
QT_END_NAMESPACE
#include "qstatemachine.moc"
diff --git a/src/corelib/statemachine/qstatemachine.h b/src/corelib/statemachine/qstatemachine.h
index 07781d09a4..b3c87a959b 100644
--- a/src/corelib/statemachine/qstatemachine.h
+++ b/src/corelib/statemachine/qstatemachine.h
@@ -48,6 +48,10 @@
#include <QtCore/qset.h>
#include <QtCore/qvariant.h>
+#if __has_include(<chrono>)
+# include <chrono>
+#endif
+
QT_REQUIRE_CONFIG(statemachine);
QT_BEGIN_NAMESPACE
@@ -145,6 +149,13 @@ public:
bool eventFilter(QObject *watched, QEvent *event) override;
#endif
+#if __has_include(<chrono>) || defined(Q_QDOC)
+ int postDelayedEvent(QEvent *event, std::chrono::milliseconds delay)
+ {
+ return postDelayedEvent(event, int(delay.count()));
+ }
+#endif
+
public Q_SLOTS:
void start();
void stop();
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp
index e89caabdb0..27e0d56225 100644
--- a/src/corelib/text/qbytearray.cpp
+++ b/src/corelib/text/qbytearray.cpp
@@ -2,6 +2,7 @@
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -41,6 +42,7 @@
#include "qbytearray.h"
#include "qbytearraymatcher.h"
#include "private/qtools_p.h"
+#include "qhashfunctions.h"
#include "qstring.h"
#include "qlist.h"
#include "qlocale.h"
@@ -1002,10 +1004,20 @@ QByteArray qUncompress(const uchar* data, int nbytes)
four.
\value OmitTrailingEquals Omits adding the padding equal signs at the end of the encoded
data.
-
- QByteArray::fromBase64() ignores the KeepTrailingEquals and
- OmitTrailingEquals options and will not flag errors in case they are
- missing or if there are too many of them.
+ \value IgnoreBase64DecodingErrors When decoding Base64-encoded data, ignores errors
+ in the input; invalid characters are simply skipped.
+ This enum value has been added in Qt 5.15.
+ \value AbortOnBase64DecodingErrors When decoding Base64-encoded data, stops at the first
+ decoding error.
+ This enum value has been added in Qt 5.15.
+
+ QByteArray::fromBase64Encoding() and QByteArray::fromBase64()
+ ignore the KeepTrailingEquals and OmitTrailingEquals options. If
+ the IgnoreBase64DecodingErrors option is specified, they will not
+ flag errors in case trailing equal signs are missing or if there
+ are too many of them. If instead the AbortOnBase64DecodingErrors is
+ specified, then the input must either have no padding or have the
+ correct amount of equal signs.
*/
/*! \fn QByteArray::iterator QByteArray::begin()
@@ -1775,12 +1787,7 @@ void QByteArray::resize(int size)
return;
}
- if (size == 0 && !d->capacityReserved) {
- Data *x = Data::allocate(0);
- if (!d->ref.deref())
- Data::deallocate(d);
- d = x;
- } else if (d->size == 0 && d->ref.isStatic()) {
+ if (d->size == 0 && d->ref.isStatic()) {
//
// Optimize the idiom:
// QByteArray a;
@@ -1795,9 +1802,7 @@ void QByteArray::resize(int size)
x->data()[size] = '\0';
d = x;
} else {
- if (d->ref.isShared() || uint(size) + 1u > d->alloc
- || (!d->capacityReserved && size < d->size
- && uint(size) + 1u < uint(d->alloc >> 1)))
+ if (d->ref.isShared() || uint(size) + 1u > d->alloc)
reallocData(uint(size) + 1u, d->detachFlags() | Data::Grow);
if (d->alloc) {
d->size = size;
@@ -4520,7 +4525,140 @@ QByteArray &QByteArray::setRawData(const char *data, uint size)
return *this;
}
+namespace {
+struct fromBase64_helper_result {
+ qsizetype decodedLength;
+ QByteArray::Base64DecodingStatus status;
+};
+
+fromBase64_helper_result fromBase64_helper(const char *input, qsizetype inputSize,
+ char *output /* may alias input */,
+ QByteArray::Base64Options options)
+{
+ fromBase64_helper_result result{ 0, QByteArray::Base64DecodingStatus::Ok };
+
+ unsigned int buf = 0;
+ int nbits = 0;
+
+ qsizetype offset = 0;
+ for (qsizetype i = 0; i < inputSize; ++i) {
+ int ch = input[i];
+ int d;
+
+ if (ch >= 'A' && ch <= 'Z') {
+ d = ch - 'A';
+ } else if (ch >= 'a' && ch <= 'z') {
+ d = ch - 'a' + 26;
+ } else if (ch >= '0' && ch <= '9') {
+ d = ch - '0' + 52;
+ } else if (ch == '+' && (options & QByteArray::Base64UrlEncoding) == 0) {
+ d = 62;
+ } else if (ch == '-' && (options & QByteArray::Base64UrlEncoding) != 0) {
+ d = 62;
+ } else if (ch == '/' && (options & QByteArray::Base64UrlEncoding) == 0) {
+ d = 63;
+ } else if (ch == '_' && (options & QByteArray::Base64UrlEncoding) != 0) {
+ d = 63;
+ } else {
+ if (options & QByteArray::AbortOnBase64DecodingErrors) {
+ if (ch == '=') {
+ // can have 1 or 2 '=' signs, in both cases padding base64Size to
+ // a multiple of 4. Any other case is illegal.
+ if ((inputSize % 4) != 0) {
+ result.status = QByteArray::Base64DecodingStatus::IllegalInputLength;
+ return result;
+ } else if ((i == inputSize - 1) ||
+ (i == inputSize - 2 && input[++i] == '=')) {
+ d = -1; // ... and exit the loop, normally
+ } else {
+ result.status = QByteArray::Base64DecodingStatus::IllegalPadding;
+ return result;
+ }
+ } else {
+ result.status = QByteArray::Base64DecodingStatus::IllegalCharacter;
+ return result;
+ }
+ } else {
+ d = -1;
+ }
+ }
+
+ if (d != -1) {
+ buf = (buf << 6) | d;
+ nbits += 6;
+ if (nbits >= 8) {
+ nbits -= 8;
+ Q_ASSERT(offset < i);
+ output[offset++] = buf >> nbits;
+ buf &= (1 << nbits) - 1;
+ }
+ }
+ }
+
+ result.decodedLength = offset;
+ return result;
+}
+} // anonymous namespace
+
+/*!
+ \fn QByteArray::FromBase64Result QByteArray::fromBase64Encoding(QByteArray &&base64, Base64Options options)
+ \fn QByteArray::FromBase64Result QByteArray::fromBase64Encoding(const QByteArray &base64, Base64Options options)
+ \since 5.15
+ \overload
+
+ Decodes the Base64 array \a base64, using the options
+ defined by \a options. If \a options contains \c{IgnoreBase64DecodingErrors}
+ (the default), the input is not checked for validity; invalid
+ characters in the input are skipped, enabling the decoding process to
+ continue with subsequent characters. If \a options contains
+ \c{AbortOnBase64DecodingErrors}, then decoding will stop at the first
+ invalid character.
+
+ For example:
+
+ \snippet code/src_corelib_tools_qbytearray.cpp 44ter
+
+ The algorithm used to decode Base64-encoded data is defined in \l{RFC 4648}.
+
+ Returns a QByteArrayFromBase64Result object, containing the decoded
+ data and a flag telling whether decoding was successful. If the
+ \c{AbortOnBase64DecodingErrors} option was passed and the input
+ data was invalid, it is unspecified what the decoded data contains.
+
+ \sa toBase64()
+*/
+QByteArray::FromBase64Result QByteArray::fromBase64Encoding(QByteArray &&base64, Base64Options options)
+{
+ // try to avoid a detach when calling data(), as it would over-allocate
+ // (we need less space when decoding than the one required by the full copy)
+ if (base64.isDetached()) {
+ const auto base64result = fromBase64_helper(base64.data(),
+ base64.size(),
+ base64.data(), // in-place
+ options);
+ base64.truncate(int(base64result.decodedLength));
+ return { std::move(base64), base64result.status };
+ }
+
+ return fromBase64Encoding(base64, options);
+}
+
+
+QByteArray::FromBase64Result QByteArray::fromBase64Encoding(const QByteArray &base64, Base64Options options)
+{
+ const auto base64Size = base64.size();
+ QByteArray result((base64Size * 3) / 4, Qt::Uninitialized);
+ const auto base64result = fromBase64_helper(base64.data(),
+ base64Size,
+ const_cast<char *>(result.constData()),
+ options);
+ result.truncate(int(base64result.decodedLength));
+ return { std::move(result), base64result.status };
+}
+
/*!
+ \overload
+
Returns a decoded copy of the Base64 array \a base64. Input is not checked
for validity; invalid characters in the input are skipped, enabling the
decoding process to continue with subsequent characters.
@@ -4531,21 +4669,28 @@ QByteArray &QByteArray::setRawData(const char *data, uint size)
The algorithm used to decode Base64-encoded data is defined in \l{RFC 4648}.
- \sa toBase64()
+ \note The fromBase64Encoding() function is recommended in new code.
+
+ \sa toBase64(), fromBase64Encoding()
*/
QByteArray QByteArray::fromBase64(const QByteArray &base64)
{
- return fromBase64(base64, Base64Encoding);
+ if (auto result = fromBase64Encoding(base64, Base64Encoding))
+ return std::move(result.decoded);
+ return QByteArray();
}
/*!
\since 5.2
\overload
- Returns a decoded copy of the Base64 array \a base64, using the alphabet
- defined by \a options. Input is not checked for validity; invalid
+ Returns a decoded copy of the Base64 array \a base64, using the options
+ defined by \a options. If \a options contains \c{IgnoreBase64DecodingErrors}
+ (the default), the input is not checked for validity; invalid
characters in the input are skipped, enabling the decoding process to
- continue with subsequent characters.
+ continue with subsequent characters. If \a options contains
+ \c{AbortOnBase64DecodingErrors}, then decoding will stop at the first
+ invalid character.
For example:
@@ -4553,49 +4698,18 @@ QByteArray QByteArray::fromBase64(const QByteArray &base64)
The algorithm used to decode Base64-encoded data is defined in \l{RFC 4648}.
- \sa toBase64()
+ Returns the decoded data, or, if the \c{AbortOnBase64DecodingErrors}
+ option was passed and the input data was invalid, an empty byte array.
+
+ \note The fromBase64Encoding() function is recommended in new code.
+
+ \sa toBase64(), fromBase64Encoding()
*/
QByteArray QByteArray::fromBase64(const QByteArray &base64, Base64Options options)
{
- unsigned int buf = 0;
- int nbits = 0;
- QByteArray tmp((base64.size() * 3) / 4, Qt::Uninitialized);
-
- int offset = 0;
- for (int i = 0; i < base64.size(); ++i) {
- int ch = base64.at(i);
- int d;
-
- if (ch >= 'A' && ch <= 'Z')
- d = ch - 'A';
- else if (ch >= 'a' && ch <= 'z')
- d = ch - 'a' + 26;
- else if (ch >= '0' && ch <= '9')
- d = ch - '0' + 52;
- else if (ch == '+' && (options & Base64UrlEncoding) == 0)
- d = 62;
- else if (ch == '-' && (options & Base64UrlEncoding) != 0)
- d = 62;
- else if (ch == '/' && (options & Base64UrlEncoding) == 0)
- d = 63;
- else if (ch == '_' && (options & Base64UrlEncoding) != 0)
- d = 63;
- else
- d = -1;
-
- if (d != -1) {
- buf = (buf << 6) | d;
- nbits += 6;
- if (nbits >= 8) {
- nbits -= 8;
- tmp[offset++] = buf >> nbits;
- buf &= (1 << nbits) - 1;
- }
- }
- }
-
- tmp.truncate(offset);
- return tmp;
+ if (auto result = fromBase64Encoding(base64, options))
+ return std::move(result.decoded);
+ return QByteArray();
}
/*!
@@ -5015,5 +5129,87 @@ void warn(WarningType w, EmittingClass c)
} // namespace DeprecatedRefClassBehavior
} // namespace QtPrivate
+/*!
+ \class QByteArray::FromBase64Result
+ \inmodule QtCore
+ \ingroup tools
+ \since 5.15
+
+ \brief The QByteArray::FromBase64Result class holds the result of
+ a call to QByteArray::fromBase64Encoding.
+
+ Objects of this class can be used to check whether the conversion
+ was successful, and if so, retrieve the decoded QByteArray. The
+ conversion operators defined for QByteArray::FromBase64Result make
+ its usage straightforward:
+
+ \snippet code/src_corelib_tools_qbytearray.cpp 44ter
+
+ In alternative, it is possible to access the conversion status
+ and the decoded data directly:
+
+ \snippet code/src_corelib_tools_qbytearray.cpp 44quater
+
+ \sa QByteArray::fromBase64
+*/
+
+/*!
+ \variable QByteArray::FromBase64Result::decoded
+
+ Contains the decoded byte array.
+*/
+
+/*!
+ \variable QByteArray::FromBase64Result::decodingStatus
+
+ Contains whether the decoding was successful, expressed as a value
+ of type QByteArray::Base64DecodingStatus.
+*/
+
+/*!
+ \fn QByteArray::FromBase64Result::operator bool() const
+
+ Returns whether the decoding was successful. This is equivalent
+ to checking whether the \c{decodingStatus} member is equal to
+ QByteArray::Base64DecodingStatus::Ok.
+*/
+
+/*!
+ \fn QByteArray &QByteArray::FromBase64Result::operator*() const
+
+ Returns the decoded byte array.
+*/
+
+/*!
+ \fn bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
+ \relates QByteArray::FromBase64Result
+
+ Returns \c true if \a lhs and \a rhs are equal, otherwise returns \c false.
+
+ \a lhs and \a rhs are equal if and only if they contain the same decoding
+ status and, if the status is QByteArray::Base64DecodingStatus::Ok, if and
+ only if they contain the same decoded data.
+*/
+
+/*!
+ \fn bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
+ \relates QByteArray::FromBase64Result
+
+ Returns \c true if \a lhs and \a rhs are different, otherwise returns \c false.
+*/
+
+/*!
+ \relates QByteArray::FromBase64Result
+
+ Returns the hash value for \a key, using
+ \a seed to seed the calculation.
+*/
+uint qHash(const QByteArray::FromBase64Result &key, uint seed) noexcept
+{
+ QtPrivate::QHashCombine hash;
+ seed = hash(seed, key.decoded);
+ seed = hash(seed, static_cast<int>(key.decodingStatus));
+ return seed;
+}
QT_END_NAMESPACE
diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h
index 5d8ccbfb1a..36cf580cd9 100644
--- a/src/corelib/text/qbytearray.h
+++ b/src/corelib/text/qbytearray.h
@@ -164,10 +164,20 @@ public:
Base64UrlEncoding = 1,
KeepTrailingEquals = 0,
- OmitTrailingEquals = 2
+ OmitTrailingEquals = 2,
+
+ IgnoreBase64DecodingErrors = 0,
+ AbortOnBase64DecodingErrors = 4,
};
Q_DECLARE_FLAGS(Base64Options, Base64Option)
+ enum class Base64DecodingStatus {
+ Ok,
+ IllegalInputLength,
+ IllegalCharacter,
+ IllegalPadding,
+ };
+
inline QByteArray() noexcept;
QByteArray(const char *, int size = -1);
QByteArray(int size, char c);
@@ -379,6 +389,10 @@ public:
Q_REQUIRED_RESULT static QByteArray number(qulonglong, int base = 10);
Q_REQUIRED_RESULT static QByteArray number(double, char f = 'g', int prec = 6);
Q_REQUIRED_RESULT static QByteArray fromRawData(const char *, int size);
+
+ class FromBase64Result;
+ Q_REQUIRED_RESULT static FromBase64Result fromBase64Encoding(QByteArray &&base64, Base64Options options = Base64Encoding);
+ Q_REQUIRED_RESULT static FromBase64Result fromBase64Encoding(const QByteArray &base64, Base64Options options = Base64Encoding);
Q_REQUIRED_RESULT static QByteArray fromBase64(const QByteArray &base64, Base64Options options);
Q_REQUIRED_RESULT static QByteArray fromBase64(const QByteArray &base64); // ### Qt6 merge with previous
Q_REQUIRED_RESULT static QByteArray fromHex(const QByteArray &hexEncoded);
@@ -749,6 +763,50 @@ inline QByteArray qUncompress(const QByteArray& data)
Q_DECLARE_SHARED(QByteArray)
+class QByteArray::FromBase64Result
+{
+public:
+ QByteArray decoded;
+ QByteArray::Base64DecodingStatus decodingStatus;
+
+ void swap(QByteArray::FromBase64Result &other) noexcept
+ {
+ qSwap(decoded, other.decoded);
+ qSwap(decodingStatus, other.decodingStatus);
+ }
+
+ explicit operator bool() const noexcept { return decodingStatus == QByteArray::Base64DecodingStatus::Ok; }
+
+#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(Q_QDOC)
+ QByteArray &operator*() & noexcept { return decoded; }
+ const QByteArray &operator*() const & noexcept { return decoded; }
+ QByteArray &&operator*() && noexcept { return std::move(decoded); }
+#else
+ QByteArray &operator*() noexcept { return decoded; }
+ const QByteArray &operator*() const noexcept { return decoded; }
+#endif
+};
+
+Q_DECLARE_SHARED(QByteArray::FromBase64Result)
+
+inline bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
+{
+ if (lhs.decodingStatus != rhs.decodingStatus)
+ return false;
+
+ if (lhs.decodingStatus == QByteArray::Base64DecodingStatus::Ok && lhs.decoded != rhs.decoded)
+ return false;
+
+ return true;
+}
+
+inline bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
+{
+ return !operator==(lhs, rhs);
+}
+
+Q_CORE_EXPORT Q_DECL_PURE_FUNCTION uint qHash(const QByteArray::FromBase64Result &key, uint seed = 0) noexcept;
+
QT_END_NAMESPACE
#endif // QBYTEARRAY_H
diff --git a/src/corelib/text/qchar.cpp b/src/corelib/text/qchar.cpp
index 1f9f51a53a..61b61125b1 100644
--- a/src/corelib/text/qchar.cpp
+++ b/src/corelib/text/qchar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -189,6 +189,9 @@ QT_BEGIN_NAMESPACE
\value Unicode_8_0 Version 8.0 Since Qt 5.6
\value Unicode_9_0 Version 9.0 Since Qt 5.11
\value Unicode_10_0 Version 10.0 Since Qt 5.11
+ \value Unicode_11_0 Version 11.0 Since Qt 5.15
+ \value Unicode_12_0 Version 12.0 Since Qt 5.15
+ \value Unicode_12_1 Version 12.1 Since Qt 5.15
\value Unicode_Unassigned The value is not assigned to any character
in version 8.0 of Unicode.
@@ -288,145 +291,156 @@ QT_BEGIN_NAMESPACE
\value Script_Common For characters that may be used with multiple scripts
and that do not inherit their script from the preceding characters.
- \value Script_Latin
- \value Script_Greek
- \value Script_Cyrillic
- \value Script_Armenian
- \value Script_Hebrew
+ \value Script_Adlam Since Qt 5.11
+ \value Script_Ahom Since Qt 5.6
+ \value Script_AnatolianHieroglyphs Since Qt 5.6
\value Script_Arabic
- \value Script_Syriac
- \value Script_Thaana
- \value Script_Devanagari
+ \value Script_Armenian
+ \value Script_Avestan
+ \value Script_Balinese
+ \value Script_Bamum
+ \value Script_BassaVah Since Qt 5.5
+ \value Script_Batak
\value Script_Bengali
- \value Script_Gurmukhi
- \value Script_Gujarati
- \value Script_Oriya
- \value Script_Tamil
- \value Script_Telugu
- \value Script_Kannada
- \value Script_Malayalam
- \value Script_Sinhala
- \value Script_Thai
- \value Script_Lao
- \value Script_Tibetan
- \value Script_Myanmar
- \value Script_Georgian
- \value Script_Hangul
- \value Script_Ethiopic
- \value Script_Cherokee
- \value Script_CanadianAboriginal
- \value Script_Ogham
- \value Script_Runic
- \value Script_Khmer
- \value Script_Mongolian
- \value Script_Hiragana
- \value Script_Katakana
+ \value Script_Bhaiksuki Since Qt 5.11
\value Script_Bopomofo
- \value Script_Han
- \value Script_Yi
- \value Script_OldItalic
- \value Script_Gothic
- \value Script_Deseret
- \value Script_Tagalog
- \value Script_Hanunoo
- \value Script_Buhid
- \value Script_Tagbanwa
- \value Script_Coptic
- \value Script_Limbu
- \value Script_TaiLe
- \value Script_LinearB
- \value Script_Ugaritic
- \value Script_Shavian
- \value Script_Osmanya
- \value Script_Cypriot
+ \value Script_Brahmi
\value Script_Braille
\value Script_Buginese
- \value Script_NewTaiLue
- \value Script_Glagolitic
- \value Script_Tifinagh
- \value Script_SylotiNagri
- \value Script_OldPersian
- \value Script_Kharoshthi
- \value Script_Balinese
- \value Script_Cuneiform
- \value Script_Phoenician
- \value Script_PhagsPa
- \value Script_Nko
- \value Script_Sundanese
- \value Script_Lepcha
- \value Script_OlChiki
- \value Script_Vai
- \value Script_Saurashtra
- \value Script_KayahLi
- \value Script_Rejang
- \value Script_Lycian
+ \value Script_Buhid
+ \value Script_CanadianAboriginal
\value Script_Carian
- \value Script_Lydian
+ \value Script_CaucasianAlbanian Since Qt 5.5
+ \value Script_Chakma
\value Script_Cham
- \value Script_TaiTham
- \value Script_TaiViet
- \value Script_Avestan
+ \value Script_Cherokee
+ \value Script_Coptic
+ \value Script_Cuneiform
+ \value Script_Cypriot
+ \value Script_Cyrillic
+ \value Script_Deseret
+ \value Script_Devanagari
+ \value Script_Dogra Since Qt 5.15
+ \value Script_Duployan Since Qt 5.5
\value Script_EgyptianHieroglyphs
- \value Script_Samaritan
- \value Script_Lisu
- \value Script_Bamum
- \value Script_Javanese
- \value Script_MeeteiMayek
+ \value Script_Elbasan Since Qt 5.5
+ \value Script_Elymaic Since Qt 5.15
+ \value Script_Ethiopic
+ \value Script_Georgian
+ \value Script_Glagolitic
+ \value Script_Gothic
+ \value Script_Grantha Since Qt 5.5
+ \value Script_Greek
+ \value Script_Gujarati
+ \value Script_GunjalaGondi Since Qt 5.15
+ \value Script_Gurmukhi
+ \value Script_Han
+ \value Script_Hangul
+ \value Script_HanifiRohingya Since Qt 5.15
+ \value Script_Hanunoo
+ \value Script_Hatran Since Qt 5.6
+ \value Script_Hebrew
+ \value Script_Hiragana
\value Script_ImperialAramaic
- \value Script_OldSouthArabian
- \value Script_InscriptionalParthian
\value Script_InscriptionalPahlavi
- \value Script_OldTurkic
+ \value Script_InscriptionalParthian
+ \value Script_Javanese
\value Script_Kaithi
- \value Script_Batak
- \value Script_Brahmi
+ \value Script_Kannada
+ \value Script_Katakana
+ \value Script_KayahLi
+ \value Script_Kharoshthi
+ \value Script_Khmer
+ \value Script_Khojki Since Qt 5.5
+ \value Script_Khudawadi Since Qt 5.5
+ \value Script_Lao
+ \value Script_Latin
+ \value Script_Lepcha
+ \value Script_Limbu
+ \value Script_LinearA Since Qt 5.5
+ \value Script_LinearB
+ \value Script_Lisu
+ \value Script_Lycian
+ \value Script_Lydian
+ \value Script_Mahajani Since Qt 5.5
+ \value Script_Makasar Since Qt 5.15
+ \value Script_Malayalam
\value Script_Mandaic
- \value Script_Chakma
+ \value Script_Manichaean Since Qt 5.5
+ \value Script_Marchen Since Qt 5.11
+ \value Script_MasaramGondi Since Qt 5.11
+ \value Script_Medefaidrin Since Qt 5.15
+ \value Script_MeeteiMayek
+ \value Script_MendeKikakui Since Qt 5.5
\value Script_MeroiticCursive
\value Script_MeroiticHieroglyphs
\value Script_Miao
+ \value Script_Modi Since Qt 5.5
+ \value Script_Mongolian
+ \value Script_Mro Since Qt 5.5
+ \value Script_Multani Since Qt 5.6
+ \value Script_Myanmar
+ \value Script_Nabataean Since Qt 5.5
+ \value Script_Nandinagari Since Qt 5.15
+ \value Script_Newa Since Qt 5.11
+ \value Script_NewTaiLue
+ \value Script_Nko
+ \value Script_Nushu Since Qt 5.11
+ \value Script_NyiakengPuachueHmong Since Qt 5.15
+ \value Script_Ogham
+ \value Script_OlChiki
+ \value Script_OldHungarian Since Qt 5.6
+ \value Script_OldItalic
+ \value Script_OldNorthArabian Since Qt 5.5
+ \value Script_OldPermic Since Qt 5.5
+ \value Script_OldPersian
+ \value Script_OldSogdian Since Qt 5.15
+ \value Script_OldSouthArabian
+ \value Script_OldTurkic
+ \value Script_Oriya
+ \value Script_Osage Since Qt 5.11
+ \value Script_Osmanya
+ \value Script_PahawhHmong Since Qt 5.5
+ \value Script_Palmyrene Since Qt 5.5
+ \value Script_PauCinHau Since Qt 5.5
+ \value Script_PhagsPa
+ \value Script_Phoenician
+ \value Script_PsalterPahlavi Since Qt 5.5
+ \value Script_Rejang
+ \value Script_Runic
+ \value Script_Samaritan
+ \value Script_Saurashtra
\value Script_Sharada
+ \value Script_Shavian
+ \value Script_Siddham Since Qt 5.5
+ \value Script_SignWriting Since Qt 5.6
+ \value Script_Sinhala
+ \value Script_Sogdian Since Qt 5.15
\value Script_SoraSompeng
+ \value Script_Soyombo Since Qt 5.11
+ \value Script_Sundanese
+ \value Script_SylotiNagri
+ \value Script_Syriac
+ \value Script_Tagalog
+ \value Script_Tagbanwa
+ \value Script_TaiLe
+ \value Script_TaiTham
+ \value Script_TaiViet
\value Script_Takri
- \value Script_CaucasianAlbanian
- \value Script_BassaVah
- \value Script_Duployan
- \value Script_Elbasan
- \value Script_Grantha
- \value Script_PahawhHmong
- \value Script_Khojki
- \value Script_LinearA
- \value Script_Mahajani
- \value Script_Manichaean
- \value Script_MendeKikakui
- \value Script_Modi
- \value Script_Mro
- \value Script_OldNorthArabian
- \value Script_Nabataean
- \value Script_Palmyrene
- \value Script_PauCinHau
- \value Script_OldPermic
- \value Script_PsalterPahlavi
- \value Script_Siddham
- \value Script_Khudawadi
- \value Script_Tirhuta
- \value Script_WarangCiti
- \value Script_Ahom This value was introduced in Qt 5.6.
- \value Script_AnatolianHieroglyphs This value was introduced in Qt 5.6.
- \value Script_Hatran This value was introduced in Qt 5.6.
- \value Script_Multani This value was introduced in Qt 5.6.
- \value Script_OldHungarian This value was introduced in Qt 5.6.
- \value Script_SignWriting This value was introduced in Qt 5.6.
- \value Script_Adlam This value was introduced in Qt 5.11.
- \value Script_Bhaiksuki This value was introduced in Qt 5.11.
- \value Script_Marchen This value was introduced in Qt 5.11.
- \value Script_Newa This value was introduced in Qt 5.11.
- \value Script_Osage This value was introduced in Qt 5.11.
- \value Script_Tangut This value was introduced in Qt 5.11.
- \value Script_MasaramGondi This value was introduced in Qt 5.11.
- \value Script_Nushu This value was introduced in Qt 5.11.
- \value Script_Soyombo This value was introduced in Qt 5.11.
- \value Script_ZanabazarSquare This value was introduced in Qt 5.11.
+ \value Script_Tamil
+ \value Script_Tangut Since Qt 5.11
+ \value Script_Telugu
+ \value Script_Thaana
+ \value Script_Thai
+ \value Script_Tibetan
+ \value Script_Tifinagh
+ \value Script_Tirhuta Since Qt 5.5
+ \value Script_Ugaritic
+ \value Script_Vai
+ \value Script_Wancho Since Qt 5.15
+ \value Script_WarangCiti Since Qt 5.5
+ \value Script_Yi
+ \value Script_ZanabazarSquare Since Qt 5.11
\omitvalue ScriptCount
diff --git a/src/corelib/text/qchar.h b/src/corelib/text/qchar.h
index f67a7ea90a..a3d5d7a65e 100644
--- a/src/corelib/text/qchar.h
+++ b/src/corelib/text/qchar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -328,6 +328,19 @@ public:
Script_Soyombo,
Script_ZanabazarSquare,
+ // Unicode 12.1 additions
+ Script_Dogra,
+ Script_GunjalaGondi,
+ Script_HanifiRohingya,
+ Script_Makasar,
+ Script_Medefaidrin,
+ Script_OldSogdian,
+ Script_Sogdian,
+ Script_Elymaic,
+ Script_Nandinagari,
+ Script_NyiakengPuachueHmong,
+ Script_Wancho,
+
ScriptCount
};
@@ -421,7 +434,10 @@ public:
Unicode_7_0,
Unicode_8_0,
Unicode_9_0,
- Unicode_10_0
+ Unicode_10_0,
+ Unicode_11_0,
+ Unicode_12_0,
+ Unicode_12_1
};
// ****** WHEN ADDING FUNCTIONS, CONSIDER ADDING TO QCharRef TOO
diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp
index 11e788c200..6e33e27276 100644
--- a/src/corelib/text/qlocale.cpp
+++ b/src/corelib/text/qlocale.cpp
@@ -79,7 +79,7 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_SYSTEMLOCALE
-static QSystemLocale *_systemLocale = 0;
+static QSystemLocale *_systemLocale = nullptr;
class QSystemLocaleSingleton: public QSystemLocale
{
public:
@@ -699,7 +699,7 @@ QSystemLocale::QSystemLocale(bool)
QSystemLocale::~QSystemLocale()
{
if (_systemLocale == this) {
- _systemLocale = 0;
+ _systemLocale = nullptr;
globalLocaleData.m_language_id = 0;
}
@@ -2053,6 +2053,9 @@ QString QLocale::toString(const QDate &date, QStringView format) const
/*!
Returns a localized string representation of the given \a date according
to the specified \a format.
+
+ \note Some locales may use formats that limit the range of years they can
+ represent.
*/
QString QLocale::toString(const QDate &date, FormatType format) const
@@ -2207,6 +2210,9 @@ QString QLocale::toString(const QDateTime &dateTime, QStringView format, QCalend
Returns a localized string representation of the given \a dateTime according
to the specified \a format.
+
+ \note Some locales may use formats that limit the range of years they can
+ represent.
*/
QString QLocale::toString(const QDateTime &dateTime, FormatType format) const
@@ -2375,14 +2381,19 @@ QTime QLocale::toTime(const QString &string, FormatType format) const
return toTime(string, timeFormat(format));
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\since 5.14
\overload
+ \deprecated
*/
QTime QLocale::toTime(const QString &string, FormatType format, QCalendar cal) const
{
+QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED
return toTime(string, timeFormat(format), cal);
+QT_WARNING_POP
}
+#endif
/*!
\since 4.4
@@ -2447,21 +2458,33 @@ QDateTime QLocale::toDateTime(const QString &string, FormatType format, QCalenda
*/
QTime QLocale::toTime(const QString &string, const QString &format) const
{
- return toTime(string, format, QCalendar());
+ QTime time;
+#if QT_CONFIG(datetimeparser)
+ QDateTimeParser dt(QMetaType::QTime, QDateTimeParser::FromString, QCalendar());
+ dt.setDefaultLocale(*this);
+ if (dt.parseFormat(format))
+ dt.fromString(string, nullptr, &time);
+#else
+ Q_UNUSED(string);
+ Q_UNUSED(format);
+#endif
+ return time;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\since 5.14
\overload
+ \deprecated
*/
QTime QLocale::toTime(const QString &string, const QString &format, QCalendar cal) const
{
QTime time;
#if QT_CONFIG(datetimeparser)
- QDateTimeParser dt(QVariant::Time, QDateTimeParser::FromString, cal);
+ QDateTimeParser dt(QMetaType::QTime, QDateTimeParser::FromString, cal);
dt.setDefaultLocale(*this);
if (dt.parseFormat(format))
- dt.fromString(string, 0, &time);
+ dt.fromString(string, nullptr, &time);
#else
Q_UNUSED(cal);
Q_UNUSED(string);
@@ -2469,6 +2492,7 @@ QTime QLocale::toTime(const QString &string, const QString &format, QCalendar ca
#endif
return time;
}
+#endif
/*!
\since 4.4
@@ -2497,10 +2521,10 @@ QDate QLocale::toDate(const QString &string, const QString &format, QCalendar ca
{
QDate date;
#if QT_CONFIG(datetimeparser)
- QDateTimeParser dt(QVariant::Date, QDateTimeParser::FromString, cal);
+ QDateTimeParser dt(QMetaType::QDate, QDateTimeParser::FromString, cal);
dt.setDefaultLocale(*this);
if (dt.parseFormat(format))
- dt.fromString(string, &date, 0);
+ dt.fromString(string, &date, nullptr);
#else
Q_UNUSED(string);
Q_UNUSED(format);
@@ -2538,7 +2562,7 @@ QDateTime QLocale::toDateTime(const QString &string, const QString &format, QCal
QTime time;
QDate date;
- QDateTimeParser dt(QVariant::DateTime, QDateTimeParser::FromString, cal);
+ QDateTimeParser dt(QMetaType::QDateTime, QDateTimeParser::FromString, cal);
dt.setDefaultLocale(*this);
if (dt.parseFormat(format) && dt.fromString(string, &date, &time))
return QDateTime(date, time);
@@ -3140,7 +3164,7 @@ QList<Qt::DayOfWeek> QLocale::weekdays() const
if (d->m_data == systemData()) {
QVariant res = systemLocale()->query(QSystemLocale::Weekdays, QVariant());
if (!res.isNull())
- return static_cast<QList<Qt::DayOfWeek> >(res.value<QList<Qt::DayOfWeek> >());
+ return static_cast<QList<Qt::DayOfWeek> >(qvariant_cast<QList<Qt::DayOfWeek> >(res));
}
#endif
QList<Qt::DayOfWeek> weekdays;
diff --git a/src/corelib/text/qlocale.h b/src/corelib/text/qlocale.h
index 513e0f097b..0dc9e1bd00 100644
--- a/src/corelib/text/qlocale.h
+++ b/src/corelib/text/qlocale.h
@@ -1037,11 +1037,15 @@ public:
QDateTime toDateTime(const QString &string, const QString &format) const;
// Calendar-aware API
QDate toDate(const QString &string, FormatType format, QCalendar cal) const;
- QTime toTime(const QString &string, FormatType format, QCalendar cal) const;
QDateTime toDateTime(const QString &string, FormatType format, QCalendar cal) const;
QDate toDate(const QString &string, const QString &format, QCalendar cal) const;
- QTime toTime(const QString &string, const QString &format, QCalendar cal) const;
QDateTime toDateTime(const QString &string, const QString &format, QCalendar cal) const;
+# if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Calendar is ignored when parsing times")
+ QTime toTime(const QString &string, FormatType format, QCalendar cal) const;
+ QT_DEPRECATED_X("Calendar is ignored when parsing times")
+ QTime toTime(const QString &string, const QString &format, QCalendar cal) const;
+# endif // 5.15
#endif
// ### Qt 6: We need to return QString from these function since
diff --git a/src/corelib/text/qlocale_tools.cpp b/src/corelib/text/qlocale_tools.cpp
index c246028b4d..0da769d694 100644
--- a/src/corelib/text/qlocale_tools.cpp
+++ b/src/corelib/text/qlocale_tools.cpp
@@ -322,7 +322,7 @@ double qt_asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
conv_flags = double_conversion::StringToDoubleConverter::ALLOW_LEADING_SPACES
| double_conversion::StringToDoubleConverter::ALLOW_TRAILING_SPACES;
}
- double_conversion::StringToDoubleConverter conv(conv_flags, 0.0, qt_qnan(), 0, 0);
+ double_conversion::StringToDoubleConverter conv(conv_flags, 0.0, qt_qnan(), nullptr, nullptr);
d = conv.StringToDouble(num, numLen, &processed);
if (!qIsFinite(d)) {
diff --git a/src/corelib/text/qlocale_tools_p.h b/src/corelib/text/qlocale_tools_p.h
index 594331ae37..e2142bf545 100644
--- a/src/corelib/text/qlocale_tools_p.h
+++ b/src/corelib/text/qlocale_tools_p.h
@@ -54,22 +54,6 @@
#include "qlocale_p.h"
#include "qstring.h"
-#if !defined(QT_QLOCALE_NEEDS_VOLATILE)
-# if defined(Q_CC_GNU)
-# if __GNUC__ == 4
-# define QT_QLOCALE_NEEDS_VOLATILE
-# elif defined(Q_OS_WIN)
-# define QT_QLOCALE_NEEDS_VOLATILE
-# endif
-# endif
-#endif
-
-#if defined(QT_QLOCALE_NEEDS_VOLATILE)
-# define NEEDS_VOLATILE volatile
-#else
-# define NEEDS_VOLATILE
-#endif
-
QT_BEGIN_NAMESPACE
enum StrayCharacterMode {
diff --git a/src/corelib/text/qlocale_unix.cpp b/src/corelib/text/qlocale_unix.cpp
index ff4274d932..207331b8ac 100644
--- a/src/corelib/text/qlocale_unix.cpp
+++ b/src/corelib/text/qlocale_unix.cpp
@@ -234,16 +234,16 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const
case CurrencySymbol:
return lc_monetary.currencySymbol(QLocale::CurrencySymbolFormat(in.toUInt()));
case CurrencyToString: {
- switch (in.type()) {
- case QVariant::Int:
+ switch (in.userType()) {
+ case QMetaType::Int:
return lc_monetary.toCurrencyString(in.toInt());
- case QVariant::UInt:
+ case QMetaType::UInt:
return lc_monetary.toCurrencyString(in.toUInt());
- case QVariant::Double:
+ case QMetaType::Double:
return lc_monetary.toCurrencyString(in.toDouble());
- case QVariant::LongLong:
+ case QMetaType::LongLong:
return lc_monetary.toCurrencyString(in.toLongLong());
- case QVariant::ULongLong:
+ case QMetaType::ULongLong:
return lc_monetary.toCurrencyString(in.toULongLong());
default:
break;
@@ -283,9 +283,9 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const
return d->uiLanguages.isEmpty() ? QVariant() : QVariant(d->uiLanguages);
}
case StringToStandardQuotation:
- return lc_messages.quoteString(in.value<QStringRef>());
+ return lc_messages.quoteString(qvariant_cast<QStringRef>(in));
case StringToAlternateQuotation:
- return lc_messages.quoteString(in.value<QStringRef>(), QLocale::AlternateQuotation);
+ return lc_messages.quoteString(qvariant_cast<QStringRef>(in), QLocale::AlternateQuotation);
case ListToSeparatedString:
return lc_messages.createSeparatedList(in.toStringList());
case LocaleChanged:
diff --git a/src/corelib/text/qregexp.cpp b/src/corelib/text/qregexp.cpp
index ac4d9bbc36..9301a7e573 100644
--- a/src/corelib/text/qregexp.cpp
+++ b/src/corelib/text/qregexp.cpp
@@ -2528,7 +2528,7 @@ void QRegExpEngine::Box::cat(const Box &b)
eng->addCatTransitions(rs, b.ls);
addAnchorsToEngine(b);
if (minl == 0) {
- lanchors.unite(b.lanchors);
+ lanchors.insert(b.lanchors);
if (skipanchors != 0) {
for (int i = 0; i < b.ls.size(); i++) {
int a = eng->anchorConcatenation(lanchors.value(b.ls.at(i), 0), skipanchors);
@@ -2538,7 +2538,7 @@ void QRegExpEngine::Box::cat(const Box &b)
mergeInto(&ls, b.ls);
}
if (b.minl == 0) {
- ranchors.unite(b.ranchors);
+ ranchors.insert(b.ranchors);
if (b.skipanchors != 0) {
for (int i = 0; i < rs.size(); i++) {
int a = eng->anchorConcatenation(ranchors.value(rs.at(i), 0), b.skipanchors);
@@ -2596,9 +2596,9 @@ void QRegExpEngine::Box::cat(const Box &b)
void QRegExpEngine::Box::orx(const Box &b)
{
mergeInto(&ls, b.ls);
- lanchors.unite(b.lanchors);
+ lanchors.insert(b.lanchors);
mergeInto(&rs, b.rs);
- ranchors.unite(b.ranchors);
+ ranchors.insert(b.ranchors);
if (b.minl == 0) {
if (minl == 0)
diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
index 59d21e0a23..d74b759aa9 100644
--- a/src/corelib/text/qregularexpression.cpp
+++ b/src/corelib/text/qregularexpression.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 Giuseppe D'Angelo <dangelog@gmail.com>.
-** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+** Copyright (C) 2020 Giuseppe D'Angelo <dangelog@gmail.com>.
+** Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
@@ -863,7 +863,7 @@ struct QRegularExpressionPrivate : QSharedData
QRegularExpression::MatchType matchType,
QRegularExpression::MatchOptions matchOptions,
CheckSubjectStringOption checkSubjectStringOption = CheckSubjectString,
- const QRegularExpressionMatchPrivate *previous = 0) const;
+ const QRegularExpressionMatchPrivate *previous = nullptr) const;
int captureIndexForName(QStringView name) const;
@@ -944,7 +944,7 @@ QRegularExpression::QRegularExpression(QRegularExpressionPrivate &dd)
*/
QRegularExpressionPrivate::QRegularExpressionPrivate()
: QSharedData(),
- patternOptions(0),
+ patternOptions(),
pattern(),
mutex(),
compiledPattern(nullptr),
@@ -1022,7 +1022,7 @@ void QRegularExpressionPrivate::compilePattern()
options,
&errorCode,
&patternErrorOffset,
- NULL);
+ nullptr);
if (!compiledPattern) {
errorOffset = static_cast<int>(patternErrorOffset);
@@ -1081,7 +1081,7 @@ public:
{
// The default JIT stack size in PCRE is 32K,
// we allocate from 32K up to 512K.
- stack = pcre2_jit_stack_create_16(32 * 1024, 512 * 1024, NULL);
+ stack = pcre2_jit_stack_create_16(32 * 1024, 512 * 1024, nullptr);
}
/*!
\internal
@@ -1105,7 +1105,7 @@ static pcre2_jit_stack_16 *qtPcreCallback(void *)
if (jitStacks()->hasLocalData())
return jitStacks()->localData()->stack;
- return 0;
+ return nullptr;
}
/*!
@@ -1272,9 +1272,9 @@ QRegularExpressionMatchPrivate *QRegularExpressionPrivate::doMatch(const QString
previousMatchWasEmpty = true;
}
- pcre2_match_context_16 *matchContext = pcre2_match_context_create_16(NULL);
- pcre2_jit_stack_assign_16(matchContext, &qtPcreCallback, NULL);
- pcre2_match_data_16 *matchData = pcre2_match_data_create_from_pattern_16(compiledPattern, NULL);
+ pcre2_match_context_16 *matchContext = pcre2_match_context_create_16(nullptr);
+ pcre2_jit_stack_assign_16(matchContext, &qtPcreCallback, nullptr);
+ pcre2_match_data_16 *matchData = pcre2_match_data_create_from_pattern_16(compiledPattern, nullptr);
const unsigned short * const subjectUtf16 = subject.utf16() + subjectStart;
@@ -1829,7 +1829,19 @@ uint qHash(const QRegularExpression &key, uint seed) noexcept
return seed;
}
+#if QT_STRINGVIEW_LEVEL < 2
/*!
+ \overload
+*/
+QString QRegularExpression::escape(const QString &str)
+{
+ return escape(QStringView(str));
+}
+#endif // QT_STRINGVIEW_LEVEL < 2
+
+/*!
+ \since 5.15
+
Escapes all characters of \a str so that they no longer have any special
meaning when used as a regular expression pattern string, and returns
the escaped string. For instance:
@@ -1847,7 +1859,7 @@ uint qHash(const QRegularExpression &key, uint seed) noexcept
inside \a str is escaped with the sequence \c{"\\0"} (backslash +
\c{'0'}), instead of \c{"\\\0"} (backslash + \c{NUL}).
*/
-QString QRegularExpression::escape(const QString &str)
+QString QRegularExpression::escape(QStringView str)
{
QString result;
const int count = str.size();
@@ -1882,8 +1894,19 @@ QString QRegularExpression::escape(const QString &str)
return result;
}
+#if QT_STRINGVIEW_LEVEL < 2
/*!
\since 5.12
+ \overload
+*/
+QString QRegularExpression::wildcardToRegularExpression(const QString &pattern)
+{
+ return wildcardToRegularExpression(QStringView(pattern));
+}
+#endif // QT_STRINGVIEW_LEVEL < 2
+
+/*!
+ \since 5.15
Returns a regular expression representation of the given glob \a pattern.
The transformation is targeting file path globbing, which means in particular
@@ -1932,13 +1955,13 @@ QString QRegularExpression::escape(const QString &str)
\sa escape()
*/
-QString QRegularExpression::wildcardToRegularExpression(const QString &pattern)
+QString QRegularExpression::wildcardToRegularExpression(QStringView pattern)
{
const int wclen = pattern.length();
QString rx;
rx.reserve(wclen + wclen / 16);
int i = 0;
- const QChar *wc = pattern.unicode();
+ const QChar *wc = pattern.data();
#ifdef Q_OS_WIN
const QLatin1Char nativePathSeparator('\\');
@@ -2010,16 +2033,31 @@ QString QRegularExpression::wildcardToRegularExpression(const QString &pattern)
return anchoredPattern(rx);
}
+#if QT_STRINGVIEW_LEVEL < 2
/*!
\fn QRegularExpression::anchoredPattern(const QString &expression)
\since 5.12
+ \overload
+*/
+#endif // QT_STRINGVIEW_LEVEL < 2
+
+/*!
+ \since 5.15
+
Returns the \a expression wrapped between the \c{\A} and \c{\z} anchors to
be used for exact matching.
\sa {Porting from QRegExp's Exact Matching}
*/
+QString QRegularExpression::anchoredPattern(QStringView expression)
+{
+ return QString()
+ + QLatin1String("\\A(?:")
+ + expression
+ + QLatin1String(")\\z");
+}
/*!
\since 5.1
diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h
index f799a38ae4..4fa258b080 100644
--- a/src/corelib/text/qregularexpression.h
+++ b/src/corelib/text/qregularexpression.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com>.
-** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+** Copyright (C) 2020 Giuseppe D'Angelo <dangelog@gmail.com>.
+** Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -42,9 +42,8 @@
#define QREGULAREXPRESSION_H
#include <QtCore/qglobal.h>
-
#include <QtCore/qstring.h>
-#include <QtCore/qstringlist.h>
+#include <QtCore/qstringview.h>
#include <QtCore/qshareddata.h>
#include <QtCore/qvariant.h>
@@ -52,7 +51,8 @@ QT_REQUIRE_CONFIG(regularexpression);
QT_BEGIN_NAMESPACE
-class QStringView;
+class QStringList;
+class QLatin1String;
class QRegularExpressionMatch;
class QRegularExpressionMatchIterator;
@@ -137,14 +137,18 @@ public:
void optimize() const;
+#if QT_STRINGVIEW_LEVEL < 2
static QString escape(const QString &str);
static QString wildcardToRegularExpression(const QString &str);
static inline QString anchoredPattern(const QString &expression)
{
- return QLatin1String("\\A(?:")
- + expression
- + QLatin1String(")\\z");
+ return anchoredPattern(QStringView(expression));
}
+#endif
+
+ static QString escape(QStringView str);
+ static QString wildcardToRegularExpression(QStringView str);
+ static QString anchoredPattern(QStringView expression);
bool operator==(const QRegularExpression &re) const;
inline bool operator!=(const QRegularExpression &re) const { return !operator==(re); }
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index fa8b5cf3f8..720c3e98c7 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -591,6 +591,20 @@ bool QtPrivate::isLatin1(QStringView s) noexcept
return true;
}
+bool QtPrivate::isValidUtf16(QStringView s) noexcept
+{
+ Q_CONSTEXPR uint InvalidCodePoint = UINT_MAX;
+
+ QStringIterator i(s);
+ while (i.hasNext()) {
+ uint c = i.next(InvalidCodePoint);
+ if (c == InvalidCodePoint)
+ return false;
+ }
+
+ return true;
+}
+
// conversion between Latin 1 and UTF-16
void qt_from_latin1(ushort *dst, const char *str, size_t size) noexcept
{
@@ -9054,6 +9068,21 @@ bool QString::isRightToLeft() const
return QtPrivate::isRightToLeft(QStringView(*this));
}
+/*!
+ \fn bool QString::isValidUtf16() const noexcept
+ \since 5.15
+
+ Returns \c true if the string contains valid UTF-16 encoded data,
+ or \c false otherwise.
+
+ Note that this function does not perform any special validation of the
+ data; it merely checks if it can be successfully decoded from UTF-16.
+ The data is assumed to be in host byte order; the presence of a BOM
+ is meaningless.
+
+ \sa QStringView::isValidUtf16()
+*/
+
/*! \fn QChar *QString::data()
Returns a pointer to the data stored in the QString. The pointer
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h
index 1669d7c94a..1f4e856660 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -919,6 +919,8 @@ public:
bool isSimpleText() const;
bool isRightToLeft() const;
+ Q_REQUIRED_RESULT bool isValidUtf16() const noexcept
+ { return QStringView(*this).isValidUtf16(); }
QString(int size, Qt::Initialization);
Q_DECL_CONSTEXPR inline QString(QStringDataPtr dd) : d(dd.ptr) {}
diff --git a/src/corelib/text/qstringalgorithms.h b/src/corelib/text/qstringalgorithms.h
index d54e376aa9..0b7774b4f3 100644
--- a/src/corelib/text/qstringalgorithms.h
+++ b/src/corelib/text/qstringalgorithms.h
@@ -99,6 +99,7 @@ Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool isAscii(QLatin1String
Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool isAscii(QStringView s) noexcept;
Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline bool isLatin1(QLatin1String s) noexcept;
Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool isLatin1(QStringView s) noexcept;
+Q_REQUIRED_RESULT Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool isValidUtf16(QStringView s) noexcept;
} // namespace QtPRivate
diff --git a/src/corelib/text/qstringlist.cpp b/src/corelib/text/qstringlist.cpp
index 4bbe424ed2..4b9dcee169 100644
--- a/src/corelib/text/qstringlist.cpp
+++ b/src/corelib/text/qstringlist.cpp
@@ -43,9 +43,9 @@
#if QT_CONFIG(regularexpression)
# include <qregularexpression.h>
#endif
+#include <private/qduplicatetracker_p.h>
#include <algorithm>
-
QT_BEGIN_NAMESPACE
/*! \typedef QStringListIterator
@@ -885,15 +885,13 @@ int QtPrivate::QStringList_removeDuplicates(QStringList *that)
{
int n = that->size();
int j = 0;
- QSet<QString> seen;
+
+ QDuplicateTracker<QString> seen;
seen.reserve(n);
- int setSize = 0;
for (int i = 0; i < n; ++i) {
const QString &s = that->at(i);
- seen.insert(s);
- if (setSize == seen.size()) // unchanged size => was already seen
+ if (seen.hasSeen(s))
continue;
- ++setSize;
if (j != i)
that->swapItemsAt(i, j);
++j;
diff --git a/src/corelib/text/qstringview.cpp b/src/corelib/text/qstringview.cpp
index 75de827583..c4ddb06ea4 100644
--- a/src/corelib/text/qstringview.cpp
+++ b/src/corelib/text/qstringview.cpp
@@ -865,6 +865,21 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn bool QStringView::isValidUtf16() const
+ \since 5.15
+
+ Returns \c true if the string contains valid UTF-16 encoded data,
+ or \c false otherwise.
+
+ Note that this function does not perform any special validation of the
+ data; it merely checks if it can be successfully decoded from UTF-16.
+ The data is assumed to be in host byte order; the presence of a BOM
+ is meaningless.
+
+ \sa QString::isValidUtf16()
+*/
+
+/*!
\fn QStringView::toWCharArray(wchar_t *array) const
\since 5.14
diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h
index 4ab4d2570f..06391ffef4 100644
--- a/src/corelib/text/qstringview.h
+++ b/src/corelib/text/qstringview.h
@@ -294,6 +294,8 @@ public:
Q_REQUIRED_RESULT bool isRightToLeft() const noexcept
{ return QtPrivate::isRightToLeft(*this); }
+ Q_REQUIRED_RESULT bool isValidUtf16() const noexcept
+ { return QtPrivate::isValidUtf16(*this); }
Q_REQUIRED_RESULT inline int toWCharArray(wchar_t *array) const; // defined in qstring.h
diff --git a/src/corelib/text/qt_attribution.json b/src/corelib/text/qt_attribution.json
index a488f1341e..c6ac1d1d95 100644
--- a/src/corelib/text/qt_attribution.json
+++ b/src/corelib/text/qt_attribution.json
@@ -11,7 +11,7 @@
define the Unicode character properties and internal mappings.",
"Homepage": "https://www.unicode.org/ucd/",
"Version": "Don't use the Unicode standard version; UCD has its own 'Revision' numbers",
- "Version": "20",
+ "Version": "24",
"License": "Unicode License Agreement - Data Files and Software (2016)",
"LicenseId": "Unicode-DFS-2016",
"LicenseFile": "UNICODE_LICENSE.txt",
diff --git a/src/corelib/text/qtextboundaryfinder.cpp b/src/corelib/text/qtextboundaryfinder.cpp
index 67dd15377b..ebdba6b2c5 100644
--- a/src/corelib/text/qtextboundaryfinder.cpp
+++ b/src/corelib/text/qtextboundaryfinder.cpp
@@ -71,7 +71,7 @@ static void init(QTextBoundaryFinder::BoundaryType type, const QChar *chars, int
}
}
- QUnicodeTools::CharAttributeOptions options = 0;
+ QUnicodeTools::CharAttributeOptions options;
switch (type) {
case QTextBoundaryFinder::Grapheme: options |= QUnicodeTools::GraphemeBreaks; break;
case QTextBoundaryFinder::Word: options |= QUnicodeTools::WordBreaks; break;
@@ -161,10 +161,10 @@ static void init(QTextBoundaryFinder::BoundaryType type, const QChar *chars, int
*/
QTextBoundaryFinder::QTextBoundaryFinder()
: t(Grapheme)
- , chars(0)
+ , chars(nullptr)
, length(0)
, freePrivate(true)
- , d(0)
+ , d(nullptr)
{
}
@@ -178,7 +178,7 @@ QTextBoundaryFinder::QTextBoundaryFinder(const QTextBoundaryFinder &other)
, length(other.length)
, pos(other.pos)
, freePrivate(true)
- , d(0)
+ , d(nullptr)
{
if (other.d) {
Q_ASSERT(length > 0);
@@ -199,7 +199,7 @@ QTextBoundaryFinder &QTextBoundaryFinder::operator=(const QTextBoundaryFinder &o
if (other.d) {
Q_ASSERT(other.length > 0);
uint newCapacity = (other.length + 1) * sizeof(QCharAttributes);
- QTextBoundaryFinderPrivate *newD = (QTextBoundaryFinderPrivate *) realloc(freePrivate ? d : 0, newCapacity);
+ QTextBoundaryFinderPrivate *newD = (QTextBoundaryFinderPrivate *) realloc(freePrivate ? d : nullptr, newCapacity);
Q_CHECK_PTR(newD);
freePrivate = true;
d = newD;
@@ -216,7 +216,7 @@ QTextBoundaryFinder &QTextBoundaryFinder::operator=(const QTextBoundaryFinder &o
} else {
if (freePrivate)
free(d);
- d = 0;
+ d = nullptr;
}
return *this;
@@ -242,7 +242,7 @@ QTextBoundaryFinder::QTextBoundaryFinder(BoundaryType type, const QString &strin
, length(string.length())
, pos(0)
, freePrivate(true)
- , d(0)
+ , d(nullptr)
{
if (length > 0) {
d = (QTextBoundaryFinderPrivate *) malloc((length + 1) * sizeof(QCharAttributes));
@@ -271,7 +271,7 @@ QTextBoundaryFinder::QTextBoundaryFinder(BoundaryType type, const QChar *chars,
, length(length)
, pos(0)
, freePrivate(true)
- , d(0)
+ , d(nullptr)
{
if (!chars) {
length = 0;
diff --git a/src/corelib/text/qunicodetables.cpp b/src/corelib/text/qunicodetables.cpp
index 805a5a6e34..96e53967da 100644
--- a/src/corelib/text/qunicodetables.cpp
+++ b/src/corelib/text/qunicodetables.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -37,7 +37,7 @@
**
****************************************************************************/
-/* This file is autogenerated from the Unicode 10.0 database. Do not edit */
+/* This file is autogenerated from the Unicode 12.1 database. Do not edit */
#include "qunicodetables_p.h"
@@ -77,18 +77,18 @@ static const unsigned short uc_property_trie[] = {
11920, 11952, 11984, 12016, 12048, 12080, 12112, 12144,
12176, 12208, 12240, 12272, 12304, 12336, 9936, 9936,
12368, 12400, 12432, 12464, 12496, 12528, 12560, 12592,
- 12624, 12656, 12688, 12720, 12752, 9936, 12784, 12816,
- 12848, 12880, 12912, 12944, 12976, 13008, 13040, 13072,
- 13104, 13104, 13104, 13104, 13136, 13104, 13104, 13168,
- 13200, 13232, 13264, 13296, 13328, 13360, 13392, 13424,
-
- 13456, 13488, 13520, 13552, 13584, 13616, 13648, 13680,
- 13712, 13744, 13776, 13808, 13840, 13872, 13904, 13936,
- 13968, 14000, 14032, 14064, 14096, 14128, 14160, 14192,
- 14224, 14256, 14288, 14320, 14352, 14384, 14416, 14448,
- 14480, 14512, 14544, 14576, 14608, 14640, 14672, 14704,
- 14480, 14480, 14480, 14480, 14736, 14768, 14800, 14832,
- 14864, 14896, 14928, 14960, 14992, 15024, 15056, 15088,
+ 12624, 12656, 12688, 12720, 12752, 12784, 12816, 12848,
+ 12880, 12912, 12944, 12976, 13008, 13040, 13072, 13104,
+ 13136, 13136, 13136, 13136, 13168, 13136, 13136, 13200,
+ 13232, 13264, 13296, 13328, 13360, 13392, 13424, 13456,
+
+ 13488, 13520, 13552, 13584, 13616, 13648, 13680, 13712,
+ 13744, 13776, 13808, 13840, 13872, 13904, 13936, 13968,
+ 14000, 14032, 14064, 14096, 14128, 14160, 14192, 14224,
+ 14256, 14288, 14320, 14352, 14384, 14416, 14448, 14480,
+ 14512, 14544, 14576, 14608, 14640, 14672, 14704, 14736,
+ 14512, 14512, 14512, 14512, 14768, 14800, 14832, 14864,
+ 14896, 14928, 14512, 14960, 14992, 15024, 15056, 15088,
15120, 15152, 15184, 15216, 15248, 15280, 15312, 15344,
15376, 15376, 15376, 15376, 15376, 15376, 15376, 15376,
15408, 15408, 15408, 15408, 15440, 15472, 15504, 15536,
@@ -225,75 +225,58 @@ static const unsigned short uc_property_trie[] = {
17904, 17904, 17904, 17904, 17936, 17968, 18000, 18032,
18064, 18064, 18064, 18064, 18064, 18064, 18064, 18064,
18096, 18128, 18160, 18192, 18224, 18256, 18256, 18288,
- 18320, 18352, 18384, 18416, 18448, 18480, 9936, 18512,
- 18544, 18576, 18608, 18640, 18672, 18704, 18736, 18768,
- 18800, 18832, 18864, 18896, 18928, 18960, 18992, 19024,
- 19056, 19088, 19120, 19152, 19184, 19216, 19248, 19280,
- 19312, 19344, 19376, 19408, 19440, 19472, 19504, 19536,
- 19568, 19600, 19632, 19664, 19696, 19728, 19760, 19568,
- 19600, 19632, 19664, 19696, 19728, 19760, 19568, 19600,
- 19632, 19664, 19696, 19728, 19760, 19568, 19600, 19632,
- 19664, 19696, 19728, 19760, 19568, 19600, 19632, 19664,
-
- 19696, 19728, 19760, 19568, 19600, 19632, 19664, 19696,
- 19728, 19760, 19568, 19600, 19632, 19664, 19696, 19728,
- 19760, 19568, 19600, 19632, 19664, 19696, 19728, 19760,
- 19568, 19600, 19632, 19664, 19696, 19728, 19760, 19568,
- 19600, 19632, 19664, 19696, 19728, 19760, 19568, 19600,
- 19632, 19664, 19696, 19728, 19760, 19568, 19600, 19632,
- 19664, 19696, 19728, 19760, 19568, 19600, 19632, 19664,
- 19696, 19728, 19760, 19568, 19600, 19632, 19664, 19696,
- 19728, 19760, 19568, 19600, 19632, 19664, 19696, 19728,
- 19760, 19568, 19600, 19632, 19664, 19696, 19728, 19760,
- 19568, 19600, 19632, 19664, 19696, 19728, 19760, 19568,
- 19600, 19632, 19664, 19696, 19728, 19760, 19568, 19600,
- 19632, 19664, 19696, 19728, 19760, 19568, 19600, 19632,
- 19664, 19696, 19728, 19760, 19568, 19600, 19632, 19664,
- 19696, 19728, 19760, 19568, 19600, 19632, 19664, 19696,
- 19728, 19760, 19568, 19600, 19632, 19664, 19696, 19728,
-
- 19760, 19568, 19600, 19632, 19664, 19696, 19728, 19760,
- 19568, 19600, 19632, 19664, 19696, 19728, 19760, 19568,
- 19600, 19632, 19664, 19696, 19728, 19760, 19568, 19600,
- 19632, 19664, 19696, 19728, 19760, 19568, 19600, 19632,
- 19664, 19696, 19728, 19760, 19568, 19600, 19632, 19664,
- 19696, 19728, 19760, 19568, 19600, 19632, 19664, 19696,
- 19728, 19760, 19568, 19600, 19632, 19664, 19696, 19728,
- 19760, 19568, 19600, 19632, 19664, 19696, 19728, 19760,
- 19568, 19600, 19632, 19664, 19696, 19728, 19760, 19568,
- 19600, 19632, 19664, 19696, 19728, 19760, 19568, 19600,
- 19632, 19664, 19696, 19728, 19760, 19568, 19600, 19632,
- 19664, 19696, 19728, 19760, 19568, 19600, 19632, 19664,
- 19696, 19728, 19760, 19568, 19600, 19632, 19664, 19696,
- 19728, 19760, 19568, 19600, 19632, 19664, 19696, 19728,
- 19760, 19568, 19600, 19632, 19664, 19696, 19728, 19760,
- 19568, 19600, 19632, 19664, 19696, 19728, 19760, 19568,
-
- 19600, 19632, 19664, 19696, 19728, 19760, 19568, 19600,
- 19632, 19664, 19696, 19728, 19760, 19568, 19600, 19632,
- 19664, 19696, 19728, 19760, 19568, 19600, 19632, 19664,
- 19696, 19728, 19760, 19568, 19600, 19632, 19664, 19696,
- 19728, 19760, 19568, 19600, 19632, 19664, 19696, 19728,
- 19760, 19568, 19600, 19632, 19664, 19696, 19728, 19760,
- 19568, 19600, 19632, 19664, 19696, 19728, 19760, 19568,
- 19600, 19632, 19664, 19696, 19728, 19792, 19824, 19856,
- 19888, 19888, 19888, 19888, 19888, 19888, 19888, 19888,
- 19888, 19888, 19888, 19888, 19888, 19888, 19888, 19888,
- 19888, 19888, 19888, 19888, 19888, 19888, 19888, 19888,
- 19888, 19888, 19888, 19888, 19888, 19888, 19888, 19888,
- 19888, 19888, 19888, 19888, 19888, 19888, 19888, 19888,
- 19888, 19888, 19888, 19888, 19888, 19888, 19888, 19888,
- 19888, 19888, 19888, 19888, 19888, 19888, 19888, 19888,
- 19888, 19888, 19888, 19888, 19888, 19888, 19888, 19888,
-
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
+ 18320, 18352, 18384, 18416, 18448, 18480, 18512, 18544,
+ 18576, 18608, 18640, 18672, 18704, 18736, 18768, 18800,
+ 18832, 18864, 18896, 18928, 18960, 18992, 19024, 19056,
+ 19088, 19120, 19152, 19184, 19216, 19248, 19280, 19312,
+ 19344, 19376, 19408, 19440, 19472, 19504, 19536, 19568,
+ 19600, 19632, 19664, 19696, 19728, 19760, 19792, 19600,
+ 19632, 19664, 19696, 19728, 19760, 19792, 19600, 19632,
+ 19664, 19696, 19728, 19760, 19792, 19600, 19632, 19664,
+ 19696, 19728, 19760, 19792, 19600, 19632, 19664, 19696,
+
+ 19728, 19760, 19792, 19600, 19632, 19664, 19696, 19728,
+ 19760, 19792, 19600, 19632, 19664, 19696, 19728, 19760,
+ 19792, 19600, 19632, 19664, 19696, 19728, 19760, 19792,
+ 19600, 19632, 19664, 19696, 19728, 19760, 19792, 19600,
+ 19632, 19664, 19696, 19728, 19760, 19792, 19600, 19632,
+ 19664, 19696, 19728, 19760, 19792, 19600, 19632, 19664,
+ 19696, 19728, 19760, 19792, 19600, 19632, 19664, 19696,
+ 19728, 19760, 19792, 19600, 19632, 19664, 19696, 19728,
+ 19760, 19792, 19600, 19632, 19664, 19696, 19728, 19760,
+ 19792, 19600, 19632, 19664, 19696, 19728, 19760, 19792,
+ 19600, 19632, 19664, 19696, 19728, 19760, 19792, 19600,
+ 19632, 19664, 19696, 19728, 19760, 19792, 19600, 19632,
+ 19664, 19696, 19728, 19760, 19792, 19600, 19632, 19664,
+ 19696, 19728, 19760, 19792, 19600, 19632, 19664, 19696,
+ 19728, 19760, 19792, 19600, 19632, 19664, 19696, 19728,
+ 19760, 19792, 19600, 19632, 19664, 19696, 19728, 19760,
+
+ 19792, 19600, 19632, 19664, 19696, 19728, 19760, 19792,
+ 19600, 19632, 19664, 19696, 19728, 19760, 19792, 19600,
+ 19632, 19664, 19696, 19728, 19760, 19792, 19600, 19632,
+ 19664, 19696, 19728, 19760, 19792, 19600, 19632, 19664,
+ 19696, 19728, 19760, 19792, 19600, 19632, 19664, 19696,
+ 19728, 19760, 19792, 19600, 19632, 19664, 19696, 19728,
+ 19760, 19792, 19600, 19632, 19664, 19696, 19728, 19760,
+ 19792, 19600, 19632, 19664, 19696, 19728, 19760, 19792,
+ 19600, 19632, 19664, 19696, 19728, 19760, 19792, 19600,
+ 19632, 19664, 19696, 19728, 19760, 19792, 19600, 19632,
+ 19664, 19696, 19728, 19760, 19792, 19600, 19632, 19664,
+ 19696, 19728, 19760, 19792, 19600, 19632, 19664, 19696,
+ 19728, 19760, 19792, 19600, 19632, 19664, 19696, 19728,
+ 19760, 19792, 19600, 19632, 19664, 19696, 19728, 19760,
+ 19792, 19600, 19632, 19664, 19696, 19728, 19760, 19792,
+ 19600, 19632, 19664, 19696, 19728, 19760, 19792, 19600,
+
+ 19632, 19664, 19696, 19728, 19760, 19792, 19600, 19632,
+ 19664, 19696, 19728, 19760, 19792, 19600, 19632, 19664,
+ 19696, 19728, 19760, 19792, 19600, 19632, 19664, 19696,
+ 19728, 19760, 19792, 19600, 19632, 19664, 19696, 19728,
+ 19760, 19792, 19600, 19632, 19664, 19696, 19728, 19760,
+ 19792, 19600, 19632, 19664, 19696, 19728, 19760, 19792,
+ 19600, 19632, 19664, 19696, 19728, 19760, 19792, 19600,
+ 19632, 19664, 19696, 19728, 19760, 19824, 19856, 19888,
19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
@@ -303,568 +286,585 @@ static const unsigned short uc_property_trie[] = {
19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
- 19920, 19920, 19920, 19920, 19920, 19920, 19920, 19920,
19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
- 19984, 20016, 20048, 20080, 20112, 20112, 20144, 20176,
- 20208, 20240, 20272, 20304, 20304, 20336, 20368, 20304,
- 20304, 20304, 20304, 20304, 20304, 20304, 20304, 20304,
- 20304, 20400, 20432, 20304, 20464, 20304, 20496, 20528,
- 20560, 20592, 20624, 20656, 20304, 20304, 20304, 20688,
- 20720, 20752, 20784, 20816, 20848, 20880, 20912, 20944,
-
- 20976, 21008, 21040, 9936, 21072, 21072, 21072, 21104,
- 21136, 21168, 21200, 21232, 21264, 21296, 21328, 21360,
- 9936, 9936, 9936, 9936, 21392, 21424, 21456, 21488,
- 21520, 21552, 21584, 21616, 21648, 21680, 21712, 9936,
- 21744, 21776, 21808, 21840, 21872, 21904, 21936, 21968,
- 22000, 22032, 22064, 22096, 9936, 9936, 9936, 9936,
- 22128, 22128, 22128, 22128, 22128, 22128, 22128, 22128,
- 22128, 22160, 22192, 22224, 9936, 9936, 9936, 9936,
- 22256, 22288, 22320, 22352, 22384, 22416, 8432, 22448,
- 22480, 22512, 8432, 8432, 22544, 22576, 22608, 22640,
- 22672, 22704, 22736, 22768, 22800, 8432, 22832, 22864,
- 22896, 22928, 22960, 22992, 23024, 23056, 8432, 8432,
- 23088, 23088, 23120, 8432, 23152, 23184, 23216, 23248,
- 8432, 8432, 8432, 8432, 8432, 8432, 8432, 8432,
- 8432, 8432, 8432, 23280, 8432, 8432, 8432, 8432,
- 8432, 8432, 8432, 8432, 8432, 8432, 8432, 8432,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19952, 19952, 19952, 19952, 19952, 19952, 19952, 19952,
+ 19984, 19984, 19984, 19984, 19984, 19984, 19984, 19984,
+ 20016, 20048, 20080, 20112, 20144, 20144, 20176, 20208,
+ 20240, 20272, 20304, 20336, 20336, 20368, 20400, 20336,
+ 20336, 20336, 20336, 20336, 20336, 20336, 20336, 20336,
+ 20336, 20432, 20464, 20336, 20496, 20336, 20528, 20560,
+ 20592, 20624, 20656, 20688, 20336, 20336, 20336, 20720,
+ 20752, 20784, 20816, 20848, 20880, 20912, 20944, 20976,
+
+ 21008, 21040, 21072, 9936, 21104, 21104, 21104, 21136,
+ 21168, 21200, 21232, 21264, 21296, 21328, 21360, 21392,
+ 9936, 9936, 9936, 9936, 21424, 21456, 21488, 21520,
+ 21552, 21584, 21616, 21648, 21680, 21712, 21744, 9936,
+ 21776, 21808, 21840, 21872, 21904, 21936, 21968, 22000,
+ 22032, 22064, 22096, 22128, 9936, 9936, 9936, 9936,
+ 22160, 22160, 22160, 22160, 22160, 22160, 22160, 22160,
+ 22160, 22192, 22224, 22256, 9936, 9936, 9936, 9936,
+ 22288, 22320, 22352, 22384, 22416, 22448, 8432, 22480,
+ 22512, 22544, 8432, 8432, 22576, 22608, 22640, 22672,
+ 22704, 22736, 22768, 22800, 22832, 8432, 22864, 22896,
+ 22928, 22960, 22992, 23024, 23056, 23088, 8432, 8432,
+ 23120, 23120, 23152, 8432, 23184, 23216, 23248, 23280,
+ 23312, 23344, 8432, 8432, 8432, 8432, 8432, 8432,
+ 8432, 8432, 8432, 23376, 8432, 8432, 8432, 8432,
+ 23408, 23440, 23472, 8432, 8432, 8432, 8432, 23504,
// [0x11000..0x110000)
- 23312, 23568, 23824, 24080, 24336, 24592, 24848, 25104,
- 25360, 25616, 25872, 25616, 26128, 26384, 25616, 25616,
- 26640, 26640, 26640, 26896, 27152, 27408, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 27664, 27664, 27920, 28176, 28432, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 28688, 28944, 29200, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 29456, 29456, 29712, 29968, 25616, 25616, 25616, 30224,
- 30480, 30480, 30480, 30480, 30480, 30480, 30480, 30480,
- 30480, 30480, 30480, 30480, 30480, 30480, 30480, 30480,
- 30480, 30480, 30480, 30480, 30480, 30480, 30480, 30736,
- 30480, 30480, 30992, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 31248, 31504, 31760, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 32016, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 32272, 32528, 32784, 33040, 33296, 33552, 33808, 34064,
- 34320, 34320, 34576, 25616, 25616, 25616, 25616, 25616,
- 34832, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 35088, 35344, 35600, 35600, 35600, 35600, 35856, 35600,
- 36112, 36368, 36624, 36880, 37136, 37392, 37648, 37904,
- 38160, 38416, 38672, 38672, 38672, 38672, 38672, 38928,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
-
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39184, 39184,
- 39184, 39184, 39184, 39184, 39184, 39184, 39440, 39696,
- 39696, 39696, 39696, 39696, 39696, 39696, 39696, 39696,
- 39696, 39696, 39696, 39696, 39696, 39696, 39696, 39952,
- 40208, 40464, 40464, 40464, 40464, 40464, 40464, 40464,
- 40464, 40464, 40464, 40464, 40464, 40464, 40464, 40464,
- 40464, 40464, 40464, 40464, 40464, 40464, 40720, 40976,
- 40976, 40976, 40976, 40976, 40976, 40976, 40976, 40976,
- 40976, 40976, 40976, 40976, 40976, 40976, 40976, 40976,
- 40976, 40976, 40976, 40976, 40976, 40976, 40976, 40976,
- 40976, 40976, 40976, 41232, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 41488, 41488, 41744, 38672, 38672, 38672, 38672, 38928,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
-
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672,
- 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38928,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 42256, 42512, 42768, 42768, 42768, 42768, 42768, 42768,
- 42768, 42768, 42768, 42768, 42768, 42768, 42768, 42768,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
-
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 25616,
- 25616, 25616, 25616, 25616, 25616, 25616, 25616, 42000,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
-
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43280,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
-
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43024,
- 43024, 43024, 43024, 43024, 43024, 43024, 43024, 43280,
+ 23536, 23792, 24048, 24304, 24560, 24816, 25072, 25328,
+ 25584, 25840, 26096, 26352, 26608, 26864, 27120, 27376,
+ 27632, 27632, 27632, 27888, 28144, 28400, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 28656, 28656, 28912, 29168, 29424, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 29680, 29936, 30192, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 30448, 30448, 30704, 30960, 26352, 26352, 31216, 31472,
+ 31728, 31728, 31728, 31728, 31728, 31728, 31728, 31728,
+ 31728, 31728, 31728, 31728, 31728, 31728, 31728, 31728,
+ 31728, 31728, 31728, 31728, 31728, 31728, 31728, 31984,
+ 31728, 31728, 32240, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 32496, 32752, 33008, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 33264, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 33520, 33776, 34032, 34288, 34544, 34800, 35056, 35312,
+ 35568, 35568, 35824, 26352, 26352, 26352, 26352, 26352,
+ 36080, 36336, 36592, 26352, 26352, 26352, 26352, 26352,
+ 36848, 37104, 37360, 37360, 37616, 37872, 38128, 37360,
+ 38384, 38640, 38896, 39152, 39408, 39664, 39920, 40176,
+ 40432, 40688, 40944, 41200, 41200, 41200, 41200, 41456,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41712, 41712,
+ 41712, 41712, 41712, 41712, 41712, 41712, 41968, 42224,
+ 42224, 42224, 42224, 42224, 42224, 42224, 42224, 42224,
+ 42224, 42224, 42224, 42224, 42224, 42224, 42224, 42480,
+ 42736, 42992, 42992, 42992, 42992, 42992, 42992, 42992,
+ 42992, 42992, 42992, 42992, 42992, 42992, 42992, 42992,
+ 42992, 42992, 42992, 42992, 42992, 42992, 43248, 43504,
+ 43504, 43504, 43504, 43504, 43504, 43504, 43504, 43504,
+ 43504, 43504, 43504, 43504, 43504, 43504, 43504, 43504,
+ 43504, 43504, 43504, 43504, 43504, 43504, 43504, 43504,
+ 43504, 43504, 43504, 43760, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 44016, 44016, 44272, 41200, 41200, 41200, 41200, 41456,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41200,
+ 41200, 41200, 41200, 41200, 41200, 41200, 41200, 41456,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 44784, 45040, 45296, 45296, 45296, 45296, 45296, 45296,
+ 45296, 45296, 45296, 45296, 45296, 45296, 45296, 45296,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 26352,
+ 26352, 26352, 26352, 26352, 26352, 26352, 26352, 44528,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45808,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45552,
+ 45552, 45552, 45552, 45552, 45552, 45552, 45552, 45808,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -967,975 +967,980 @@ static const unsigned short uc_property_trie[] = {
78, 146, 147, 78, 78, 148, 78, 78,
78, 78, 78, 78, 78, 149, 78, 78,
- 150, 78, 78, 150, 78, 78, 78, 151,
- 150, 152, 153, 153, 154, 78, 78, 78,
- 78, 78, 155, 78, 100, 78, 78, 78,
- 78, 78, 78, 78, 78, 156, 157, 78,
+ 150, 78, 151, 150, 78, 78, 78, 152,
+ 150, 153, 154, 154, 155, 78, 78, 78,
+ 78, 78, 156, 78, 100, 78, 78, 78,
+ 78, 78, 78, 78, 78, 157, 158, 78,
78, 78, 78, 78, 78, 78, 78, 78,
- 78, 158, 158, 158, 158, 158, 114, 114,
- 159, 159, 159, 159, 159, 159, 159, 159,
- 159, 160, 160, 161, 161, 161, 161, 161,
-
- 162, 162, 163, 163, 163, 163, 160, 160,
- 164, 160, 160, 160, 164, 160, 160, 160,
- 161, 161, 163, 163, 163, 163, 163, 163,
- 52, 52, 52, 52, 52, 52, 163, 165,
-
- 159, 159, 159, 159, 159, 42, 42, 42,
- 42, 42, 166, 166, 167, 168, 169, 170,
- 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170,
-
- 171, 171, 171, 171, 171, 172, 171, 171,
- 171, 171, 171, 171, 171, 172, 172, 171,
- 172, 171, 172, 171, 171, 173, 174, 174,
- 174, 174, 173, 175, 174, 174, 174, 174,
-
- 174, 176, 176, 177, 177, 177, 177, 178,
- 178, 174, 174, 174, 174, 177, 177, 174,
- 177, 177, 174, 174, 179, 179, 179, 179,
- 180, 174, 174, 174, 174, 172, 172, 172,
-
- 181, 181, 171, 181, 181, 182, 183, 184,
- 184, 184, 183, 183, 183, 184, 184, 185,
- 186, 186, 186, 187, 187, 187, 187, 186,
- 188, 189, 189, 190, 191, 192, 192, 193,
-
- 194, 194, 195, 196, 196, 196, 196, 196,
- 196, 196, 196, 196, 196, 196, 196, 196,
- 197, 198, 197, 198, 199, 200, 197, 198,
- 201, 201, 202, 203, 203, 203, 204, 205,
-
- 201, 201, 201, 201, 206, 207, 208, 209,
- 210, 210, 210, 201, 211, 201, 212, 212,
- 213, 214, 214, 214, 214, 214, 214, 214,
- 214, 214, 214, 214, 214, 214, 214, 214,
-
- 214, 214, 201, 214, 214, 214, 214, 214,
- 214, 214, 215, 215, 216, 217, 217, 217,
- 218, 219, 219, 219, 219, 219, 219, 219,
- 219, 219, 219, 219, 219, 219, 219, 219,
-
- 219, 219, 220, 219, 219, 219, 219, 219,
- 219, 219, 221, 221, 222, 223, 223, 224,
- 225, 226, 227, 228, 228, 229, 230, 231,
- 232, 233, 234, 235, 234, 235, 234, 235,
-
- 234, 235, 236, 237, 236, 237, 236, 237,
- 236, 237, 236, 237, 236, 237, 236, 237,
- 238, 239, 240, 241, 242, 243, 244, 245,
- 246, 247, 245, 246, 248, 249, 249, 249,
-
- 250, 251, 252, 251, 252, 252, 252, 251,
- 252, 252, 252, 252, 251, 250, 251, 252,
- 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 254, 253, 253, 253, 253, 253, 253,
-
- 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 253, 253, 253, 253, 253, 253,
- 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 256, 255, 255, 255, 255, 255, 255,
-
- 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255,
- 257, 258, 259, 258, 259, 259, 259, 258,
- 259, 259, 259, 259, 258, 257, 258, 259,
-
- 260, 261, 260, 261, 260, 261, 260, 261,
- 260, 261, 260, 261, 260, 261, 260, 261,
- 260, 261, 260, 261, 260, 261, 262, 263,
- 260, 261, 260, 261, 260, 261, 260, 261,
-
- 260, 261, 264, 265, 265, 172, 172, 266,
- 267, 267, 268, 269, 270, 271, 270, 271,
- 260, 261, 260, 261, 260, 261, 260, 261,
- 260, 261, 260, 261, 260, 261, 260, 261,
-
- 260, 261, 260, 261, 260, 261, 260, 261,
- 260, 261, 260, 261, 260, 261, 260, 261,
- 260, 261, 260, 261, 260, 261, 260, 261,
- 260, 261, 260, 261, 260, 261, 260, 261,
-
- 272, 262, 263, 260, 261, 268, 269, 260,
- 261, 268, 269, 260, 261, 268, 269, 273,
- 262, 263, 262, 263, 260, 261, 262, 263,
- 260, 261, 262, 263, 262, 263, 262, 263,
-
- 260, 261, 262, 263, 262, 263, 262, 263,
- 260, 261, 262, 263, 274, 275, 262, 263,
- 262, 263, 262, 263, 262, 263, 276, 277,
- 262, 263, 278, 279, 278, 279, 278, 279,
-
- 268, 269, 268, 269, 268, 269, 268, 269,
- 268, 269, 268, 269, 268, 269, 268, 269,
- 278, 279, 278, 279, 280, 281, 280, 281,
- 280, 281, 280, 281, 280, 281, 280, 281,
-
- 280, 281, 280, 281, 282, 283, 284, 285,
- 286, 287, 286, 287, 286, 287, 286, 287,
- 201, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288,
-
- 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 201,
- 201, 289, 290, 290, 290, 291, 290, 290,
-
- 201, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292,
-
- 292, 292, 292, 292, 292, 292, 292, 293,
- 201, 294, 295, 201, 201, 296, 296, 297,
- 298, 299, 300, 300, 300, 300, 299, 300,
- 300, 300, 301, 299, 300, 300, 300, 300,
-
- 300, 300, 302, 299, 299, 299, 299, 299,
- 300, 300, 299, 300, 300, 301, 303, 300,
- 304, 305, 306, 307, 308, 309, 310, 311,
- 312, 313, 314, 315, 316, 317, 318, 319,
-
- 320, 321, 322, 320, 300, 302, 323, 324,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 325, 325, 325, 325, 325,
-
- 325, 325, 325, 325, 325, 325, 325, 325,
- 325, 325, 325, 298, 298, 298, 298, 298,
- 325, 325, 325, 326, 327, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
-
- 328, 328, 328, 328, 329, 330, 331, 331,
- 332, 333, 333, 334, 19, 335, 336, 336,
- 337, 337, 337, 337, 337, 337, 338, 338,
- 339, 340, 341, 342, 343, 344, 345, 346,
-
- 347, 348, 349, 349, 349, 349, 350, 351,
- 352, 351, 352, 352, 352, 352, 352, 351,
- 351, 351, 351, 352, 352, 352, 352, 352,
- 352, 352, 352, 353, 353, 353, 353, 353,
-
- 354, 352, 352, 352, 352, 352, 352, 352,
- 351, 352, 352, 355, 356, 357, 358, 359,
- 360, 361, 362, 363, 363, 364, 365, 337,
- 337, 366, 366, 366, 367, 366, 366, 368,
-
- 369, 370, 371, 372, 373, 374, 375, 376,
- 377, 378, 379, 380, 381, 382, 383, 383,
- 384, 351, 351, 351, 348, 385, 385, 385,
- 386, 352, 352, 352, 352, 352, 352, 352,
-
- 352, 352, 352, 352, 352, 352, 352, 352,
- 351, 351, 351, 351, 351, 351, 351, 351,
- 351, 351, 351, 351, 351, 351, 351, 351,
- 351, 351, 352, 352, 352, 352, 352, 352,
-
- 352, 352, 352, 352, 352, 352, 352, 352,
- 352, 352, 352, 352, 352, 352, 352, 352,
- 352, 352, 352, 352, 352, 352, 352, 352,
- 387, 387, 352, 352, 352, 352, 352, 387,
-
- 349, 352, 350, 351, 351, 351, 351, 351,
- 351, 351, 351, 351, 352, 351, 352, 388,
- 352, 352, 351, 349, 389, 351, 390, 390,
- 390, 390, 390, 390, 390, 391, 392, 390,
-
- 390, 390, 390, 393, 390, 394, 394, 390,
- 390, 392, 393, 390, 390, 393, 395, 395,
- 396, 397, 398, 399, 400, 401, 402, 403,
- 404, 405, 387, 387, 387, 406, 406, 407,
-
- 408, 408, 408, 409, 409, 409, 409, 409,
- 409, 409, 409, 409, 409, 409, 344, 410,
- 411, 412, 413, 413, 413, 411, 411, 411,
- 411, 411, 413, 413, 413, 413, 411, 413,
-
- 413, 413, 413, 413, 413, 413, 413, 413,
- 411, 413, 411, 413, 411, 414, 414, 415,
- 416, 417, 416, 416, 417, 416, 416, 417,
- 417, 417, 416, 417, 417, 416, 417, 416,
-
- 416, 416, 417, 416, 417, 416, 417, 416,
- 417, 416, 416, 344, 344, 415, 414, 414,
- 418, 418, 418, 418, 418, 418, 418, 418,
- 418, 419, 419, 419, 418, 418, 418, 418,
-
- 418, 418, 418, 418, 418, 418, 418, 418,
- 418, 418, 418, 419, 419, 418, 353, 353,
- 353, 420, 353, 420, 420, 353, 353, 353,
- 420, 420, 353, 353, 353, 353, 353, 353,
-
- 421, 421, 421, 421, 421, 421, 421, 421,
- 421, 421, 421, 421, 421, 421, 421, 421,
- 421, 421, 421, 421, 421, 421, 421, 421,
- 421, 421, 421, 421, 421, 421, 421, 421,
-
- 421, 421, 421, 421, 421, 421, 422, 422,
+ 78, 159, 159, 159, 159, 159, 114, 114,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 161, 161, 162, 162, 162, 162, 162,
+
+ 163, 163, 164, 164, 164, 164, 161, 161,
+ 165, 161, 161, 161, 165, 161, 161, 161,
+ 162, 162, 164, 164, 164, 164, 164, 164,
+ 52, 52, 52, 52, 52, 52, 164, 166,
+
+ 160, 160, 160, 160, 160, 42, 42, 42,
+ 42, 42, 167, 167, 168, 169, 170, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171,
+
+ 172, 172, 172, 172, 172, 173, 172, 172,
+ 172, 172, 172, 172, 172, 173, 173, 172,
+ 173, 172, 173, 172, 172, 174, 175, 175,
+ 175, 175, 174, 176, 175, 175, 175, 175,
+
+ 175, 177, 177, 178, 178, 178, 178, 179,
+ 179, 175, 175, 175, 175, 178, 178, 175,
+ 178, 178, 175, 175, 180, 180, 180, 180,
+ 181, 175, 175, 175, 175, 173, 173, 173,
+
+ 182, 182, 172, 182, 182, 183, 184, 185,
+ 185, 185, 184, 184, 184, 185, 185, 186,
+ 187, 187, 187, 188, 188, 188, 188, 187,
+ 189, 190, 190, 191, 192, 193, 193, 194,
+
+ 195, 195, 196, 197, 197, 197, 197, 197,
+ 197, 197, 197, 197, 197, 197, 197, 197,
+ 198, 199, 198, 199, 200, 201, 198, 199,
+ 202, 202, 203, 204, 204, 204, 205, 206,
+
+ 202, 202, 202, 202, 207, 208, 209, 210,
+ 211, 211, 211, 202, 212, 202, 213, 213,
+ 214, 215, 215, 215, 215, 215, 215, 215,
+ 215, 215, 215, 215, 215, 215, 215, 215,
+
+ 215, 215, 202, 215, 215, 215, 215, 215,
+ 215, 215, 216, 216, 217, 218, 218, 218,
+ 219, 220, 220, 220, 220, 220, 220, 220,
+ 220, 220, 220, 220, 220, 220, 220, 220,
+
+ 220, 220, 221, 220, 220, 220, 220, 220,
+ 220, 220, 222, 222, 223, 224, 224, 225,
+ 226, 227, 228, 229, 229, 230, 231, 232,
+ 233, 234, 235, 236, 235, 236, 235, 236,
+
+ 235, 236, 237, 238, 237, 238, 237, 238,
+ 237, 238, 237, 238, 237, 238, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 246, 247, 249, 250, 250, 250,
+
+ 251, 252, 253, 252, 253, 253, 253, 252,
+ 253, 253, 253, 253, 252, 251, 252, 253,
+ 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 255, 254, 254, 254, 254, 254, 254,
+
+ 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254,
+ 256, 256, 256, 256, 256, 256, 256, 256,
+ 256, 257, 256, 256, 256, 256, 256, 256,
+
+ 256, 256, 256, 256, 256, 256, 256, 256,
+ 256, 256, 256, 256, 256, 256, 256, 256,
+ 258, 259, 260, 259, 260, 260, 260, 259,
+ 260, 260, 260, 260, 259, 258, 259, 260,
+
+ 261, 262, 261, 262, 261, 262, 261, 262,
+ 261, 262, 261, 262, 261, 262, 261, 262,
+ 261, 262, 261, 262, 261, 262, 263, 264,
+ 261, 262, 261, 262, 261, 262, 261, 262,
+
+ 261, 262, 265, 266, 266, 173, 173, 267,
+ 268, 268, 269, 270, 271, 272, 271, 272,
+ 261, 262, 261, 262, 261, 262, 261, 262,
+ 261, 262, 261, 262, 261, 262, 261, 262,
+
+ 261, 262, 261, 262, 261, 262, 261, 262,
+ 261, 262, 261, 262, 261, 262, 261, 262,
+ 261, 262, 261, 262, 261, 262, 261, 262,
+ 261, 262, 261, 262, 261, 262, 261, 262,
+
+ 273, 263, 264, 261, 262, 269, 270, 261,
+ 262, 269, 270, 261, 262, 269, 270, 274,
+ 263, 264, 263, 264, 261, 262, 263, 264,
+ 261, 262, 263, 264, 263, 264, 263, 264,
+
+ 261, 262, 263, 264, 263, 264, 263, 264,
+ 261, 262, 263, 264, 275, 276, 263, 264,
+ 263, 264, 263, 264, 263, 264, 277, 278,
+ 263, 264, 279, 280, 279, 280, 279, 280,
+
+ 269, 270, 269, 270, 269, 270, 269, 270,
+ 269, 270, 269, 270, 269, 270, 269, 270,
+ 279, 280, 279, 280, 281, 282, 281, 282,
+ 281, 282, 281, 282, 281, 282, 281, 282,
+
+ 281, 282, 281, 282, 283, 284, 285, 286,
+ 287, 288, 287, 288, 287, 288, 287, 288,
+ 202, 289, 289, 289, 289, 289, 289, 289,
+ 289, 289, 289, 289, 289, 289, 289, 289,
+
+ 289, 289, 289, 289, 289, 289, 289, 289,
+ 289, 289, 289, 289, 289, 289, 289, 289,
+ 289, 289, 289, 289, 289, 289, 289, 202,
+ 202, 290, 291, 292, 292, 293, 292, 291,
+
+ 294, 295, 295, 295, 295, 295, 295, 295,
+ 295, 295, 295, 295, 295, 295, 295, 295,
+ 295, 295, 295, 295, 295, 295, 295, 295,
+ 295, 295, 295, 295, 295, 295, 295, 295,
+
+ 295, 295, 295, 295, 295, 295, 295, 296,
+ 294, 297, 298, 202, 202, 299, 299, 300,
+ 301, 302, 303, 303, 303, 303, 302, 303,
+ 303, 303, 304, 302, 303, 303, 303, 303,
+
+ 303, 303, 305, 302, 302, 302, 302, 302,
+ 303, 303, 302, 303, 303, 304, 306, 303,
+ 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322,
+
+ 323, 324, 325, 323, 303, 305, 326, 327,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 328, 328, 328, 328, 328, 328, 328, 328,
+ 328, 328, 328, 328, 328, 328, 328, 328,
+
+ 328, 328, 328, 328, 328, 328, 328, 328,
+ 328, 328, 328, 301, 301, 301, 301, 329,
+ 328, 328, 328, 330, 331, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 332, 332, 332, 332, 333, 334, 335, 335,
+ 336, 337, 337, 338, 19, 339, 340, 340,
+ 341, 341, 341, 341, 341, 341, 342, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350,
+
+ 351, 352, 353, 353, 353, 353, 354, 355,
+ 356, 355, 356, 356, 356, 356, 356, 355,
+ 355, 355, 355, 356, 356, 356, 356, 356,
+ 356, 356, 356, 357, 357, 357, 357, 357,
+
+ 358, 356, 356, 356, 356, 356, 356, 356,
+ 355, 356, 356, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 367, 368, 369, 341,
+ 341, 370, 370, 370, 371, 370, 370, 372,
+
+ 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 387,
+ 388, 355, 355, 355, 352, 389, 389, 389,
+ 390, 356, 356, 356, 356, 356, 356, 356,
+
+ 356, 356, 356, 356, 356, 356, 356, 356,
+ 355, 355, 355, 355, 355, 355, 355, 355,
+ 355, 355, 355, 355, 355, 355, 355, 355,
+ 355, 355, 356, 356, 356, 356, 356, 356,
+
+ 356, 356, 356, 356, 356, 356, 356, 356,
+ 356, 356, 356, 356, 356, 356, 356, 356,
+ 356, 356, 356, 356, 356, 356, 356, 356,
+ 391, 391, 356, 356, 356, 356, 356, 391,
+
+ 353, 356, 354, 355, 355, 355, 355, 355,
+ 355, 355, 355, 355, 356, 355, 356, 392,
+ 356, 356, 355, 353, 393, 355, 394, 394,
+ 394, 394, 394, 394, 394, 395, 396, 394,
+
+ 394, 394, 394, 397, 394, 398, 398, 394,
+ 394, 396, 397, 394, 394, 397, 399, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 391, 391, 391, 410, 410, 411,
+
+ 412, 412, 412, 413, 413, 413, 413, 413,
+ 413, 413, 413, 413, 413, 413, 348, 414,
+ 415, 416, 417, 417, 417, 415, 415, 415,
+ 415, 415, 417, 417, 417, 417, 415, 417,
+
+ 417, 417, 417, 417, 417, 417, 417, 417,
+ 415, 417, 415, 417, 415, 418, 418, 419,
+ 420, 421, 420, 420, 421, 420, 420, 421,
+ 421, 421, 420, 421, 421, 420, 421, 420,
+
+ 420, 420, 421, 420, 421, 420, 421, 420,
+ 421, 420, 420, 348, 348, 419, 418, 418,
422, 422, 422, 422, 422, 422, 422, 422,
- 422, 423, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
-
- 424, 425, 426, 427, 428, 429, 430, 431,
- 432, 433, 434, 434, 434, 434, 434, 434,
- 434, 434, 434, 434, 434, 434, 434, 434,
- 434, 434, 434, 434, 434, 434, 434, 434,
-
- 434, 434, 434, 434, 434, 434, 434, 434,
- 434, 434, 434, 435, 435, 435, 435, 435,
- 435, 435, 436, 435, 437, 437, 438, 439,
- 440, 441, 442, 298, 298, 298, 298, 298,
-
- 443, 443, 443, 443, 443, 443, 443, 443,
- 443, 443, 443, 443, 443, 443, 443, 443,
- 443, 443, 443, 443, 443, 443, 444, 444,
- 444, 444, 445, 444, 444, 444, 444, 444,
-
- 444, 444, 444, 444, 445, 444, 444, 444,
- 445, 444, 444, 444, 444, 444, 298, 298,
- 446, 446, 446, 446, 446, 446, 446, 446,
- 446, 446, 446, 446, 446, 446, 446, 298,
-
- 447, 448, 448, 448, 448, 448, 447, 447,
- 448, 447, 448, 448, 448, 448, 448, 448,
- 448, 448, 448, 448, 447, 448, 449, 449,
- 449, 450, 450, 450, 298, 298, 451, 298,
-
- 452, 453, 452, 452, 452, 452, 453, 454,
- 452, 454, 454, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
-
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
-
- 455, 456, 455, 455, 455, 455, 455, 455,
- 455, 455, 457, 457, 457, 458, 459, 456,
- 456, 459, 459, 460, 460, 344, 461, 461,
- 461, 462, 461, 461, 461, 461, 344, 344,
-
- 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 463, 463, 463, 463,
- 463, 463, 463, 463, 463, 463, 463, 463,
-
- 463, 463, 464, 465, 466, 466, 467, 466,
- 466, 467, 466, 466, 466, 467, 467, 467,
- 468, 469, 470, 466, 466, 466, 467, 466,
- 466, 467, 467, 466, 466, 466, 466, 471,
-
- 472, 473, 473, 474, 475, 476, 476, 476,
- 476, 476, 476, 476, 476, 476, 476, 476,
- 476, 476, 476, 476, 476, 476, 476, 476,
- 476, 476, 476, 476, 476, 476, 476, 476,
-
- 476, 476, 476, 476, 476, 476, 476, 476,
- 476, 477, 476, 476, 476, 476, 476, 476,
- 476, 477, 476, 476, 477, 476, 476, 476,
- 476, 476, 478, 479, 480, 476, 474, 474,
-
- 474, 473, 473, 473, 473, 473, 473, 473,
- 473, 474, 474, 474, 474, 481, 482, 479,
- 476, 172, 174, 483, 483, 472, 478, 478,
+ 422, 423, 423, 423, 422, 422, 422, 422,
+
+ 422, 422, 422, 422, 422, 422, 422, 422,
+ 422, 422, 422, 423, 423, 422, 357, 357,
+ 357, 424, 357, 424, 424, 357, 357, 357,
+ 424, 424, 357, 357, 357, 357, 357, 357,
+
+ 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425,
+
+ 425, 425, 425, 425, 425, 425, 426, 426,
+ 426, 426, 426, 426, 426, 426, 426, 426,
+ 426, 427, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+
+ 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 438, 438, 438, 438, 438,
+ 438, 438, 438, 438, 438, 438, 438, 438,
+ 438, 438, 438, 438, 438, 438, 438, 438,
+
+ 438, 438, 438, 438, 438, 438, 438, 438,
+ 438, 438, 438, 439, 439, 439, 439, 439,
+ 439, 439, 440, 439, 441, 441, 442, 443,
+ 444, 445, 446, 301, 301, 447, 448, 448,
+
+ 449, 449, 449, 449, 449, 449, 449, 449,
+ 449, 449, 449, 449, 449, 449, 449, 449,
+ 449, 449, 449, 449, 449, 449, 450, 450,
+ 450, 450, 451, 450, 450, 450, 450, 450,
+
+ 450, 450, 450, 450, 451, 450, 450, 450,
+ 451, 450, 450, 450, 450, 450, 301, 301,
+ 452, 452, 452, 452, 452, 452, 452, 453,
+ 452, 453, 452, 452, 452, 453, 453, 301,
+
+ 454, 455, 455, 455, 455, 455, 454, 454,
+ 455, 454, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 454, 455, 456, 456,
+ 456, 457, 457, 457, 301, 301, 458, 301,
+
+ 459, 460, 459, 459, 459, 459, 460, 461,
+ 459, 461, 461, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 462, 463, 462, 462, 462, 462, 462, 462,
+ 462, 462, 464, 464, 464, 465, 466, 463,
+ 463, 466, 466, 467, 467, 348, 468, 468,
+ 468, 469, 468, 468, 468, 468, 348, 348,
+
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 470, 471, 471, 471, 471,
+ 471, 471, 471, 471, 471, 471, 471, 471,
+
+ 471, 471, 472, 473, 474, 474, 475, 474,
+ 474, 475, 474, 474, 474, 475, 475, 475,
+ 476, 477, 478, 474, 474, 474, 475, 474,
+ 474, 475, 475, 474, 474, 474, 474, 479,
+
+ 480, 481, 481, 482, 483, 484, 484, 484,
+ 484, 484, 484, 484, 484, 484, 484, 484,
+ 484, 484, 484, 484, 484, 484, 484, 484,
484, 484, 484, 484, 484, 484, 484, 484,
- 476, 476, 473, 473, 485, 485, 486, 487,
- 488, 489, 490, 491, 492, 493, 494, 495,
- 496, 497, 498, 499, 499, 499, 499, 499,
- 500, 501, 501, 502, 502, 503, 502, 502,
-
- 504, 505, 506, 506, 201, 507, 507, 507,
- 507, 507, 507, 507, 507, 201, 201, 507,
- 507, 201, 201, 507, 507, 507, 507, 507,
- 507, 507, 507, 507, 507, 507, 507, 507,
-
- 507, 507, 507, 507, 507, 507, 507, 507,
- 507, 201, 507, 507, 507, 507, 507, 507,
- 507, 201, 507, 201, 201, 201, 507, 507,
- 507, 507, 201, 201, 508, 509, 510, 506,
-
- 506, 505, 505, 505, 505, 201, 201, 506,
- 506, 201, 201, 511, 511, 512, 513, 201,
- 201, 201, 201, 201, 201, 201, 201, 510,
- 201, 201, 201, 201, 514, 514, 201, 514,
-
- 507, 507, 505, 505, 201, 201, 515, 516,
- 517, 518, 519, 520, 521, 522, 523, 524,
- 507, 507, 525, 525, 526, 526, 526, 526,
- 526, 527, 528, 529, 530, 531, 201, 201,
-
- 201, 532, 533, 534, 201, 535, 535, 535,
- 535, 535, 535, 201, 201, 201, 201, 535,
- 535, 201, 201, 535, 535, 535, 535, 535,
- 535, 535, 535, 535, 535, 535, 535, 535,
-
- 535, 535, 535, 535, 535, 535, 535, 535,
- 535, 201, 535, 535, 535, 535, 535, 535,
- 535, 201, 535, 536, 201, 535, 536, 201,
- 535, 535, 201, 201, 537, 201, 538, 538,
-
- 538, 533, 533, 201, 201, 201, 201, 533,
- 533, 201, 201, 533, 533, 539, 201, 201,
- 201, 540, 201, 201, 201, 201, 201, 201,
- 201, 536, 536, 536, 535, 201, 536, 201,
-
- 201, 201, 201, 201, 201, 201, 541, 542,
- 543, 544, 545, 546, 547, 548, 549, 550,
- 533, 533, 535, 535, 535, 540, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 551, 551, 552, 201, 553, 553, 553,
- 553, 553, 553, 553, 554, 553, 201, 553,
- 553, 553, 201, 553, 553, 553, 553, 553,
- 553, 553, 553, 553, 553, 553, 553, 553,
-
- 553, 553, 553, 553, 553, 553, 553, 553,
- 553, 201, 553, 553, 553, 553, 553, 553,
- 553, 201, 553, 553, 201, 553, 553, 553,
- 553, 553, 201, 201, 555, 553, 552, 552,
-
- 552, 551, 551, 551, 551, 551, 201, 551,
- 551, 552, 201, 552, 552, 556, 201, 201,
- 553, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 553, 554, 557, 557, 201, 201, 558, 559,
- 560, 561, 562, 563, 564, 565, 566, 567,
- 568, 569, 201, 201, 201, 201, 201, 201,
- 201, 570, 571, 571, 571, 571, 571, 571,
-
- 201, 572, 573, 573, 201, 574, 574, 574,
- 574, 574, 574, 574, 574, 201, 201, 574,
- 574, 201, 201, 574, 574, 574, 574, 574,
- 574, 574, 574, 574, 574, 574, 574, 574,
-
- 574, 574, 574, 574, 574, 574, 574, 574,
- 574, 201, 574, 574, 574, 574, 574, 574,
- 574, 201, 574, 574, 201, 575, 574, 574,
- 574, 574, 201, 201, 576, 574, 577, 572,
-
- 573, 572, 572, 572, 578, 201, 201, 573,
- 579, 201, 201, 579, 579, 580, 201, 201,
- 201, 201, 201, 201, 201, 201, 581, 577,
- 201, 201, 201, 201, 582, 582, 201, 574,
-
- 574, 574, 578, 578, 201, 201, 583, 584,
- 585, 586, 587, 588, 589, 590, 591, 592,
- 593, 575, 594, 594, 594, 594, 594, 594,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 201, 595, 596, 201, 596, 596, 596,
- 596, 596, 596, 201, 201, 201, 596, 596,
- 596, 201, 596, 596, 597, 596, 201, 201,
- 201, 596, 596, 201, 596, 201, 596, 596,
-
- 201, 201, 201, 596, 596, 201, 201, 201,
- 596, 596, 596, 201, 201, 201, 596, 596,
- 596, 596, 596, 596, 596, 596, 598, 596,
- 596, 596, 201, 201, 201, 201, 599, 600,
-
- 595, 600, 600, 201, 201, 201, 600, 600,
- 600, 201, 601, 601, 601, 602, 201, 201,
- 603, 201, 201, 201, 201, 201, 201, 599,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 201, 201, 201, 201, 201, 604, 605,
- 606, 607, 608, 609, 610, 611, 612, 613,
- 614, 614, 614, 615, 615, 615, 615, 615,
- 615, 616, 615, 201, 201, 201, 201, 201,
-
- 617, 618, 618, 618, 201, 619, 619, 619,
- 619, 619, 619, 619, 619, 201, 619, 619,
- 619, 201, 619, 619, 619, 619, 619, 619,
- 619, 619, 619, 619, 619, 619, 619, 619,
-
- 619, 619, 619, 619, 619, 619, 619, 619,
- 619, 201, 619, 619, 619, 619, 619, 619,
- 619, 619, 619, 619, 620, 619, 619, 619,
- 619, 619, 201, 201, 201, 621, 622, 622,
-
- 622, 618, 618, 618, 618, 201, 622, 622,
- 623, 201, 622, 622, 622, 624, 201, 201,
- 201, 201, 201, 201, 201, 625, 626, 201,
- 621, 621, 627, 201, 201, 201, 201, 201,
-
- 619, 619, 628, 628, 201, 201, 629, 630,
- 631, 632, 633, 634, 635, 636, 637, 638,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 639, 639, 639, 639, 639, 639, 639, 640,
-
- 641, 642, 643, 643, 201, 644, 644, 644,
- 644, 644, 644, 644, 644, 201, 644, 644,
- 644, 201, 644, 644, 644, 644, 644, 644,
- 644, 644, 644, 644, 644, 644, 644, 644,
-
- 644, 644, 644, 644, 644, 644, 644, 644,
- 644, 201, 644, 644, 644, 644, 644, 644,
- 644, 644, 644, 644, 201, 644, 644, 644,
- 644, 644, 201, 201, 645, 646, 643, 647,
-
- 648, 643, 649, 643, 643, 201, 647, 648,
- 648, 201, 648, 648, 650, 651, 201, 201,
- 201, 201, 201, 201, 201, 649, 649, 201,
- 201, 201, 201, 201, 201, 201, 644, 201,
-
- 644, 644, 652, 652, 201, 201, 653, 654,
- 655, 656, 657, 658, 659, 660, 661, 662,
- 201, 663, 663, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 664, 665, 666, 666, 201, 667, 667, 667,
- 667, 667, 667, 667, 667, 201, 667, 667,
- 667, 201, 667, 667, 667, 667, 667, 667,
- 667, 667, 667, 667, 667, 667, 667, 667,
-
- 667, 667, 667, 667, 667, 667, 667, 667,
- 667, 668, 667, 667, 667, 667, 667, 667,
- 667, 667, 667, 667, 667, 667, 667, 667,
- 667, 667, 668, 669, 669, 670, 671, 666,
-
- 666, 672, 672, 672, 673, 201, 666, 666,
- 666, 201, 674, 674, 674, 675, 676, 677,
- 201, 201, 201, 201, 678, 678, 678, 671,
- 679, 679, 679, 679, 679, 679, 679, 680,
-
- 667, 667, 673, 673, 201, 201, 681, 682,
- 683, 684, 685, 686, 687, 688, 689, 690,
- 691, 691, 691, 691, 691, 691, 679, 679,
- 679, 692, 670, 670, 670, 670, 670, 670,
-
- 201, 201, 693, 693, 201, 694, 694, 694,
- 694, 694, 694, 694, 694, 694, 694, 694,
- 694, 694, 694, 694, 694, 694, 694, 201,
- 201, 201, 694, 694, 694, 694, 694, 694,
-
- 694, 694, 694, 694, 694, 694, 694, 694,
- 694, 694, 694, 694, 694, 694, 694, 694,
- 694, 694, 201, 694, 694, 694, 694, 694,
- 694, 694, 694, 694, 201, 694, 201, 201,
-
- 694, 694, 694, 694, 694, 694, 694, 201,
- 201, 201, 695, 201, 201, 201, 201, 696,
- 693, 693, 697, 697, 697, 201, 697, 201,
- 693, 693, 698, 693, 698, 698, 698, 696,
-
- 201, 201, 201, 201, 201, 201, 699, 700,
- 701, 702, 703, 704, 705, 706, 707, 708,
- 201, 201, 693, 693, 709, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 710, 710, 710, 710, 710, 710, 710,
- 710, 710, 710, 710, 710, 710, 710, 710,
- 710, 710, 710, 710, 710, 710, 710, 710,
- 710, 710, 710, 710, 710, 710, 710, 710,
-
- 710, 710, 710, 710, 710, 710, 710, 710,
- 710, 710, 710, 710, 710, 710, 710, 710,
- 710, 711, 710, 712, 711, 711, 711, 711,
- 713, 713, 714, 201, 201, 201, 201, 12,
-
- 710, 710, 710, 710, 710, 710, 715, 711,
- 716, 716, 716, 716, 711, 711, 711, 717,
- 718, 719, 720, 721, 722, 723, 724, 725,
- 726, 727, 728, 728, 201, 201, 201, 201,
-
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 729, 729, 201, 729, 201, 201, 729,
- 729, 201, 729, 201, 201, 729, 201, 201,
- 201, 201, 201, 201, 729, 729, 729, 729,
- 201, 729, 729, 729, 729, 729, 729, 729,
-
- 201, 729, 729, 729, 201, 729, 201, 729,
- 201, 201, 729, 729, 201, 729, 729, 729,
- 729, 730, 729, 731, 730, 730, 730, 730,
- 732, 732, 201, 730, 730, 729, 201, 201,
-
- 729, 729, 729, 729, 729, 201, 733, 201,
- 734, 734, 734, 734, 730, 730, 201, 201,
- 735, 736, 737, 738, 739, 740, 741, 742,
- 743, 744, 201, 201, 745, 745, 746, 746,
-
- 747, 748, 748, 748, 749, 750, 749, 749,
- 751, 749, 749, 752, 753, 754, 754, 754,
- 754, 754, 751, 755, 754, 755, 755, 755,
- 756, 756, 755, 755, 755, 755, 755, 755,
-
- 757, 758, 759, 760, 761, 762, 763, 764,
- 765, 766, 767, 767, 767, 767, 767, 767,
- 767, 767, 767, 767, 768, 756, 755, 756,
- 755, 769, 770, 771, 770, 771, 772, 772,
-
- 747, 747, 747, 773, 747, 747, 747, 747,
- 201, 747, 747, 747, 747, 773, 747, 747,
- 747, 747, 773, 747, 747, 747, 747, 773,
- 747, 747, 747, 747, 773, 747, 747, 747,
-
- 747, 747, 747, 747, 747, 747, 747, 747,
- 747, 773, 774, 775, 775, 201, 201, 201,
- 201, 776, 777, 778, 779, 778, 778, 780,
- 778, 780, 777, 777, 777, 777, 781, 782,
-
- 777, 778, 783, 783, 784, 752, 783, 783,
- 747, 747, 747, 747, 785, 786, 786, 786,
- 781, 781, 781, 778, 781, 781, 787, 781,
- 201, 781, 781, 781, 781, 778, 781, 781,
-
- 781, 781, 778, 781, 781, 781, 781, 778,
- 781, 781, 781, 781, 778, 781, 787, 787,
- 787, 781, 781, 781, 781, 781, 781, 781,
- 787, 778, 787, 787, 787, 201, 788, 788,
-
- 789, 789, 789, 789, 789, 789, 790, 789,
- 789, 789, 789, 789, 789, 201, 791, 789,
- 792, 792, 793, 794, 795, 796, 796, 796,
- 796, 797, 797, 201, 201, 201, 201, 201,
-
- 798, 798, 798, 798, 798, 798, 798, 798,
- 798, 798, 798, 798, 798, 798, 798, 798,
- 798, 798, 798, 798, 798, 798, 798, 798,
- 798, 798, 798, 798, 798, 798, 798, 798,
-
- 798, 798, 799, 798, 798, 798, 800, 798,
- 799, 798, 798, 801, 802, 803, 804, 803,
- 803, 805, 803, 806, 806, 806, 803, 807,
- 802, 808, 809, 810, 810, 806, 806, 799,
-
- 811, 812, 813, 814, 815, 816, 817, 818,
- 819, 820, 821, 821, 822, 822, 822, 822,
- 798, 798, 798, 798, 798, 798, 805, 805,
- 803, 803, 799, 799, 799, 799, 806, 806,
-
- 806, 799, 801, 801, 801, 799, 799, 801,
- 801, 801, 801, 801, 801, 801, 799, 799,
- 799, 806, 806, 806, 806, 799, 799, 799,
- 799, 799, 799, 799, 799, 799, 799, 799,
-
- 799, 799, 806, 801, 810, 806, 806, 801,
- 801, 801, 801, 801, 801, 823, 799, 801,
- 824, 825, 826, 827, 828, 829, 830, 831,
- 832, 833, 834, 834, 834, 835, 836, 836,
-
- 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837,
- 837, 837, 837, 837, 837, 837, 837, 837,
-
- 837, 837, 837, 837, 837, 837, 201, 838,
- 201, 201, 201, 201, 201, 838, 201, 201,
- 839, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 839, 839, 839, 839, 839,
-
- 839, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 839, 839, 839, 839, 839,
- 839, 839, 839, 839, 839, 839, 839, 840,
- 840, 841, 841, 842, 843, 844, 844, 844,
-
- 845, 845, 845, 845, 845, 845, 845, 845,
- 845, 845, 845, 845, 845, 845, 845, 845,
- 845, 845, 845, 845, 845, 845, 845, 845,
- 845, 845, 845, 845, 845, 845, 845, 845,
-
- 845, 845, 845, 845, 845, 845, 845, 845,
- 845, 845, 845, 845, 845, 845, 845, 845,
- 845, 845, 845, 845, 845, 845, 845, 845,
- 845, 845, 846, 846, 846, 846, 846, 845,
-
- 847, 848, 848, 848, 848, 848, 848, 848,
- 848, 848, 848, 848, 848, 848, 848, 848,
- 848, 848, 848, 848, 848, 848, 847, 847,
- 847, 847, 847, 847, 847, 847, 847, 847,
-
- 847, 847, 847, 847, 847, 847, 847, 847,
- 847, 847, 847, 847, 847, 847, 847, 847,
- 847, 847, 847, 847, 847, 847, 847, 847,
- 847, 847, 847, 847, 847, 847, 847, 847,
-
- 847, 847, 847, 849, 849, 849, 849, 849,
- 850, 850, 850, 850, 850, 850, 850, 850,
- 850, 850, 850, 850, 850, 850, 850, 850,
- 850, 850, 850, 850, 850, 850, 850, 850,
-
- 850, 850, 850, 851, 851, 851, 851, 851,
- 851, 851, 851, 851, 851, 851, 851, 851,
- 851, 851, 851, 851, 851, 851, 851, 851,
- 851, 851, 851, 851, 851, 851, 851, 851,
+ 484, 484, 484, 484, 484, 484, 484, 484,
+ 484, 485, 484, 484, 484, 484, 484, 484,
+ 484, 485, 484, 484, 485, 484, 484, 484,
+ 484, 484, 486, 487, 488, 484, 482, 482,
+
+ 482, 481, 481, 481, 481, 481, 481, 481,
+ 481, 482, 482, 482, 482, 489, 490, 487,
+ 484, 173, 175, 173, 173, 480, 486, 486,
+ 491, 491, 491, 491, 491, 491, 491, 491,
+
+ 484, 484, 481, 481, 492, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 506, 506, 506, 506,
+ 507, 508, 508, 509, 509, 510, 509, 509,
+
+ 511, 512, 513, 513, 202, 514, 514, 514,
+ 514, 514, 514, 514, 514, 202, 202, 514,
+ 514, 202, 202, 514, 514, 514, 514, 514,
+ 514, 514, 514, 514, 514, 514, 514, 514,
+
+ 514, 514, 514, 514, 514, 514, 514, 514,
+ 514, 202, 514, 514, 514, 514, 514, 514,
+ 514, 202, 514, 202, 202, 202, 514, 514,
+ 514, 514, 202, 202, 515, 516, 517, 513,
+
+ 513, 512, 512, 512, 512, 202, 202, 513,
+ 513, 202, 202, 518, 518, 519, 520, 202,
+ 202, 202, 202, 202, 202, 202, 202, 517,
+ 202, 202, 202, 202, 521, 521, 202, 521,
+
+ 514, 514, 512, 512, 202, 202, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531,
+ 514, 514, 532, 532, 533, 533, 533, 533,
+ 533, 534, 535, 536, 537, 538, 539, 202,
+
+ 202, 540, 541, 542, 202, 543, 543, 543,
+ 543, 543, 543, 202, 202, 202, 202, 543,
+ 543, 202, 202, 543, 543, 543, 543, 543,
+ 543, 543, 543, 543, 543, 543, 543, 543,
+
+ 543, 543, 543, 543, 543, 543, 543, 543,
+ 543, 202, 543, 543, 543, 543, 543, 543,
+ 543, 202, 543, 544, 202, 543, 544, 202,
+ 543, 543, 202, 202, 545, 202, 546, 546,
+
+ 546, 541, 541, 202, 202, 202, 202, 541,
+ 541, 202, 202, 541, 541, 547, 202, 202,
+ 202, 548, 202, 202, 202, 202, 202, 202,
+ 202, 544, 544, 544, 543, 202, 544, 202,
+
+ 202, 202, 202, 202, 202, 202, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558,
+ 541, 541, 543, 543, 543, 548, 559, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 560, 560, 561, 202, 562, 562, 562,
+ 562, 562, 562, 562, 563, 562, 202, 562,
+ 562, 562, 202, 562, 562, 562, 562, 562,
+ 562, 562, 562, 562, 562, 562, 562, 562,
+
+ 562, 562, 562, 562, 562, 562, 562, 562,
+ 562, 202, 562, 562, 562, 562, 562, 562,
+ 562, 202, 562, 562, 202, 562, 562, 562,
+ 562, 562, 202, 202, 564, 562, 561, 561,
+
+ 561, 560, 560, 560, 560, 560, 202, 560,
+ 560, 561, 202, 561, 561, 565, 202, 202,
+ 562, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 562, 563, 566, 566, 202, 202, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 202, 202, 202, 202, 202, 202,
+ 202, 579, 580, 580, 580, 580, 580, 580,
+
+ 202, 581, 582, 582, 202, 583, 583, 583,
+ 583, 583, 583, 583, 583, 202, 202, 583,
+ 583, 202, 202, 583, 583, 583, 583, 583,
+ 583, 583, 583, 583, 583, 583, 583, 583,
+
+ 583, 583, 583, 583, 583, 583, 583, 583,
+ 583, 202, 583, 583, 583, 583, 583, 583,
+ 583, 202, 583, 583, 202, 584, 583, 583,
+ 583, 583, 202, 202, 585, 583, 586, 581,
+
+ 582, 581, 581, 581, 587, 202, 202, 582,
+ 588, 202, 202, 588, 588, 589, 202, 202,
+ 202, 202, 202, 202, 202, 202, 590, 586,
+ 202, 202, 202, 202, 591, 591, 202, 583,
+
+ 583, 583, 587, 587, 202, 202, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 584, 603, 603, 603, 603, 603, 603,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 604, 605, 202, 605, 605, 605,
+ 605, 605, 605, 202, 202, 202, 605, 605,
+ 605, 202, 605, 605, 606, 605, 202, 202,
+ 202, 605, 605, 202, 605, 202, 605, 605,
+
+ 202, 202, 202, 605, 605, 202, 202, 202,
+ 605, 605, 605, 202, 202, 202, 605, 605,
+ 605, 605, 605, 605, 605, 605, 607, 605,
+ 605, 605, 202, 202, 202, 202, 608, 609,
+
+ 604, 609, 609, 202, 202, 202, 609, 609,
+ 609, 202, 610, 610, 610, 611, 202, 202,
+ 612, 202, 202, 202, 202, 202, 202, 608,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 623, 623, 624, 624, 624, 624, 624,
+ 624, 625, 624, 202, 202, 202, 202, 202,
+
+ 626, 627, 627, 627, 628, 629, 629, 629,
+ 629, 629, 629, 629, 629, 202, 629, 629,
+ 629, 202, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 202, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 630, 629, 629, 629,
+ 629, 629, 202, 202, 202, 631, 632, 632,
+
+ 632, 627, 627, 627, 627, 202, 632, 632,
+ 633, 202, 632, 632, 632, 634, 202, 202,
+ 202, 202, 202, 202, 202, 635, 636, 202,
+ 631, 631, 637, 202, 202, 202, 202, 202,
+
+ 629, 629, 638, 638, 202, 202, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648,
+ 202, 202, 202, 202, 202, 202, 202, 649,
+ 650, 650, 650, 650, 650, 650, 650, 651,
+
+ 652, 653, 654, 654, 655, 656, 656, 656,
+ 656, 656, 656, 656, 656, 202, 656, 656,
+ 656, 202, 656, 656, 656, 656, 656, 656,
+ 656, 656, 656, 656, 656, 656, 656, 656,
+
+ 656, 656, 656, 656, 656, 656, 656, 656,
+ 656, 202, 656, 656, 656, 656, 656, 656,
+ 656, 656, 656, 656, 202, 656, 656, 656,
+ 656, 656, 202, 202, 657, 658, 654, 659,
+
+ 660, 654, 661, 654, 654, 202, 659, 660,
+ 660, 202, 660, 660, 662, 663, 202, 202,
+ 202, 202, 202, 202, 202, 661, 661, 202,
+ 202, 202, 202, 202, 202, 202, 656, 202,
+
+ 656, 656, 664, 664, 202, 202, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674,
+ 202, 675, 675, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 676, 677, 678, 678, 202, 679, 679, 679,
+ 679, 679, 679, 679, 679, 202, 679, 679,
+ 679, 202, 679, 679, 679, 679, 679, 679,
+ 679, 679, 679, 679, 679, 679, 679, 679,
+
+ 679, 679, 679, 679, 679, 679, 679, 679,
+ 679, 680, 679, 679, 679, 679, 679, 679,
+ 679, 679, 679, 679, 679, 679, 679, 679,
+ 679, 679, 680, 681, 681, 682, 683, 678,
+
+ 678, 684, 684, 684, 685, 202, 678, 678,
+ 678, 202, 686, 686, 686, 687, 688, 689,
+ 202, 202, 202, 202, 690, 690, 690, 683,
+ 691, 691, 691, 691, 691, 691, 691, 692,
+
+ 679, 679, 685, 685, 202, 202, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 703, 703, 703, 703, 703, 691, 691,
+ 691, 704, 682, 682, 682, 682, 682, 682,
+
+ 202, 202, 705, 705, 202, 706, 706, 706,
+ 706, 706, 706, 706, 706, 706, 706, 706,
+ 706, 706, 706, 706, 706, 706, 706, 202,
+ 202, 202, 706, 706, 706, 706, 706, 706,
+
+ 706, 706, 706, 706, 706, 706, 706, 706,
+ 706, 706, 706, 706, 706, 706, 706, 706,
+ 706, 706, 202, 706, 706, 706, 706, 706,
+ 706, 706, 706, 706, 202, 706, 202, 202,
+
+ 706, 706, 706, 706, 706, 706, 706, 202,
+ 202, 202, 707, 202, 202, 202, 202, 708,
+ 705, 705, 709, 709, 709, 202, 709, 202,
+ 705, 705, 710, 705, 710, 710, 710, 708,
+
+ 202, 202, 202, 202, 202, 202, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720,
+ 202, 202, 705, 705, 721, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 722, 722, 722, 722, 722, 722, 722,
+ 722, 722, 722, 722, 722, 722, 722, 722,
+ 722, 722, 722, 722, 722, 722, 722, 722,
+ 722, 722, 722, 722, 722, 722, 722, 722,
+
+ 722, 722, 722, 722, 722, 722, 722, 722,
+ 722, 722, 722, 722, 722, 722, 722, 722,
+ 722, 723, 722, 724, 723, 723, 723, 723,
+ 725, 725, 726, 202, 202, 202, 202, 12,
+
+ 722, 722, 722, 722, 722, 722, 727, 723,
+ 728, 728, 728, 728, 723, 723, 723, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 740, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 741, 741, 202, 741, 202, 742, 741,
+ 741, 742, 741, 202, 742, 741, 742, 742,
+ 742, 742, 742, 742, 741, 741, 741, 741,
+ 742, 741, 741, 741, 741, 741, 741, 741,
+
+ 742, 741, 741, 741, 202, 741, 202, 741,
+ 742, 742, 741, 741, 742, 741, 741, 741,
+ 741, 743, 741, 744, 743, 743, 743, 743,
+ 745, 745, 746, 743, 743, 741, 202, 202,
+
+ 741, 741, 741, 741, 741, 202, 747, 202,
+ 748, 748, 748, 748, 743, 743, 202, 202,
+ 749, 750, 751, 752, 753, 754, 755, 756,
+ 757, 758, 202, 202, 759, 759, 760, 760,
+
+ 761, 762, 762, 762, 763, 764, 763, 763,
+ 765, 763, 763, 766, 767, 768, 768, 768,
+ 768, 768, 765, 769, 768, 769, 769, 769,
+ 770, 770, 769, 769, 769, 769, 769, 769,
+
+ 771, 772, 773, 774, 775, 776, 777, 778,
+ 779, 780, 781, 781, 781, 781, 781, 781,
+ 781, 781, 781, 781, 782, 770, 769, 770,
+ 769, 783, 784, 785, 784, 785, 786, 786,
+
+ 761, 761, 761, 787, 761, 761, 761, 761,
+ 202, 761, 761, 761, 761, 787, 761, 761,
+ 761, 761, 787, 761, 761, 761, 761, 787,
+ 761, 761, 761, 761, 787, 761, 761, 761,
+
+ 761, 761, 761, 761, 761, 761, 761, 761,
+ 761, 787, 788, 789, 789, 202, 202, 202,
+ 202, 790, 791, 792, 793, 792, 792, 794,
+ 792, 794, 791, 791, 791, 791, 795, 796,
+
+ 791, 792, 797, 797, 798, 766, 797, 797,
+ 761, 761, 761, 761, 799, 800, 800, 800,
+ 795, 795, 795, 792, 795, 795, 801, 795,
+ 202, 795, 795, 795, 795, 792, 795, 795,
+
+ 795, 795, 792, 795, 795, 795, 795, 792,
+ 795, 795, 795, 795, 792, 795, 801, 801,
+ 801, 795, 795, 795, 795, 795, 795, 795,
+ 801, 792, 801, 801, 801, 202, 802, 802,
+
+ 803, 803, 803, 803, 803, 803, 804, 803,
+ 803, 803, 803, 803, 803, 202, 805, 803,
+ 806, 806, 807, 808, 809, 810, 810, 810,
+ 810, 811, 811, 202, 202, 202, 202, 202,
+
+ 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812,
+
+ 812, 812, 813, 812, 812, 812, 814, 812,
+ 813, 812, 812, 815, 816, 817, 818, 817,
+ 817, 819, 817, 820, 820, 820, 817, 821,
+ 816, 822, 823, 824, 824, 820, 820, 813,
+
+ 825, 826, 827, 828, 829, 830, 831, 832,
+ 833, 834, 835, 835, 836, 836, 836, 836,
+ 812, 812, 812, 812, 812, 812, 819, 819,
+ 817, 817, 813, 813, 813, 813, 820, 820,
+
+ 820, 813, 815, 815, 815, 813, 813, 815,
+ 815, 815, 815, 815, 815, 815, 813, 813,
+ 813, 820, 820, 820, 820, 813, 813, 813,
+ 813, 813, 813, 813, 813, 813, 813, 813,
+
+ 813, 813, 820, 815, 824, 820, 820, 815,
+ 815, 815, 815, 815, 815, 837, 813, 815,
+ 838, 839, 840, 841, 842, 843, 844, 845,
+ 846, 847, 848, 848, 848, 849, 850, 850,
851, 851, 851, 851, 851, 851, 851, 851,
851, 851, 851, 851, 851, 851, 851, 851,
851, 851, 851, 851, 851, 851, 851, 851,
- 851, 851, 852, 852, 852, 852, 852, 852,
-
- 853, 853, 853, 853, 853, 853, 853, 854,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
-
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
-
- 853, 853, 853, 853, 853, 853, 853, 854,
- 853, 201, 853, 853, 853, 853, 201, 201,
- 853, 853, 853, 853, 853, 853, 853, 201,
- 853, 201, 853, 853, 853, 853, 201, 201,
-
- 853, 853, 853, 853, 853, 853, 853, 854,
- 853, 201, 853, 853, 853, 853, 201, 201,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
+ 851, 851, 851, 851, 851, 851, 851, 851,
+ 851, 851, 851, 851, 851, 851, 202, 852,
+ 202, 202, 202, 202, 202, 852, 202, 202,
853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 854,
- 853, 201, 853, 853, 853, 853, 201, 201,
- 853, 853, 853, 853, 853, 853, 853, 201,
-
- 853, 201, 853, 853, 853, 853, 201, 201,
- 853, 853, 853, 853, 853, 853, 853, 854,
- 853, 853, 853, 853, 853, 853, 853, 201,
853, 853, 853, 853, 853, 853, 853, 853,
853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 854,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
-
853, 853, 853, 853, 853, 853, 853, 853,
853, 853, 853, 853, 853, 853, 853, 854,
- 853, 201, 853, 853, 853, 853, 201, 201,
- 853, 853, 853, 853, 853, 853, 853, 854,
-
- 853, 853, 853, 853, 853, 853, 853, 854,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 853, 853, 853, 853, 853,
- 853, 853, 853, 201, 201, 855, 855, 856,
-
- 857, 858, 859, 860, 860, 860, 860, 859,
- 859, 861, 862, 863, 864, 865, 866, 867,
- 868, 869, 870, 870, 870, 870, 870, 870,
- 870, 870, 870, 870, 870, 201, 201, 201,
-
- 854, 854, 854, 854, 854, 854, 854, 854,
- 854, 854, 854, 854, 854, 854, 854, 854,
- 871, 871, 871, 871, 871, 871, 871, 871,
- 871, 871, 201, 201, 201, 201, 201, 201,
-
- 872, 873, 874, 875, 876, 877, 878, 879,
- 880, 881, 882, 883, 884, 885, 886, 887,
- 888, 889, 890, 891, 892, 893, 894, 895,
- 896, 897, 898, 899, 900, 901, 902, 903,
-
- 904, 905, 906, 907, 908, 909, 910, 911,
- 912, 913, 914, 915, 916, 917, 918, 919,
- 920, 921, 922, 923, 924, 925, 926, 927,
- 928, 929, 930, 931, 932, 933, 934, 935,
-
- 936, 937, 938, 939, 940, 941, 942, 943,
- 944, 945, 946, 947, 948, 949, 950, 951,
- 952, 952, 952, 952, 952, 953, 201, 201,
- 954, 954, 954, 954, 954, 954, 201, 201,
-
- 955, 956, 956, 956, 956, 956, 956, 956,
- 956, 956, 956, 956, 956, 956, 956, 956,
- 956, 956, 956, 956, 956, 956, 956, 956,
- 956, 956, 956, 956, 956, 956, 956, 956,
-
- 956, 956, 956, 956, 956, 956, 956, 956,
- 956, 956, 956, 956, 956, 956, 956, 956,
- 956, 956, 956, 956, 956, 956, 956, 956,
- 956, 956, 956, 956, 956, 956, 956, 956,
-
- 956, 956, 956, 956, 956, 956, 956, 956,
- 956, 956, 956, 956, 956, 957, 958, 956,
- 956, 956, 956, 956, 956, 956, 956, 959,
- 959, 959, 959, 959, 959, 959, 959, 959,
-
- 960, 961, 961, 961, 961, 961, 961, 961,
- 961, 961, 961, 961, 961, 961, 961, 961,
- 961, 961, 961, 961, 961, 961, 961, 961,
- 961, 961, 961, 962, 963, 201, 201, 201,
-
- 964, 964, 964, 964, 964, 964, 964, 964,
- 964, 964, 964, 964, 964, 964, 964, 964,
- 964, 964, 964, 964, 964, 964, 964, 964,
- 964, 964, 964, 964, 964, 964, 964, 964,
-
- 964, 964, 964, 964, 964, 964, 964, 964,
- 964, 964, 964, 965, 965, 965, 966, 966,
- 966, 967, 967, 967, 967, 967, 967, 967,
- 967, 201, 201, 201, 201, 201, 201, 201,
-
- 968, 968, 968, 968, 968, 968, 968, 968,
- 968, 968, 968, 968, 968, 201, 968, 968,
- 968, 968, 969, 969, 970, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 971, 971, 971, 971, 971, 971, 971, 971,
- 971, 971, 971, 971, 971, 971, 971, 971,
- 971, 971, 972, 972, 973, 974, 974, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
+ 854, 855, 855, 856, 857, 858, 858, 858,
+
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 860, 860, 860, 860, 860, 859,
+
+ 861, 862, 862, 862, 862, 862, 862, 862,
+ 862, 862, 862, 862, 862, 862, 862, 862,
+ 862, 862, 862, 862, 862, 862, 861, 861,
+ 861, 861, 861, 861, 861, 861, 861, 861,
+
+ 861, 861, 861, 861, 861, 861, 861, 861,
+ 861, 861, 861, 861, 861, 861, 861, 861,
+ 861, 861, 861, 861, 861, 861, 861, 861,
+ 861, 861, 861, 861, 861, 861, 861, 861,
+
+ 861, 861, 861, 863, 863, 863, 863, 863,
+ 864, 864, 864, 864, 864, 864, 864, 864,
+ 864, 864, 864, 864, 864, 864, 864, 864,
+ 864, 864, 864, 864, 864, 864, 864, 864,
+
+ 864, 864, 864, 865, 865, 865, 865, 865,
+ 865, 865, 865, 865, 865, 865, 865, 865,
+ 865, 865, 865, 865, 865, 865, 865, 865,
+ 865, 865, 865, 865, 865, 865, 865, 865,
+
+ 865, 865, 865, 865, 865, 865, 865, 865,
+ 865, 865, 865, 865, 865, 865, 865, 865,
+ 865, 865, 865, 865, 865, 865, 865, 865,
+ 865, 865, 866, 866, 866, 866, 866, 866,
+
+ 867, 867, 867, 867, 867, 867, 867, 868,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+
+ 867, 867, 867, 867, 867, 867, 867, 868,
+ 867, 202, 867, 867, 867, 867, 202, 202,
+ 867, 867, 867, 867, 867, 867, 867, 202,
+ 867, 202, 867, 867, 867, 867, 202, 202,
+
+ 867, 867, 867, 867, 867, 867, 867, 868,
+ 867, 202, 867, 867, 867, 867, 202, 202,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 868,
+ 867, 202, 867, 867, 867, 867, 202, 202,
+ 867, 867, 867, 867, 867, 867, 867, 202,
+
+ 867, 202, 867, 867, 867, 867, 202, 202,
+ 867, 867, 867, 867, 867, 867, 867, 868,
+ 867, 867, 867, 867, 867, 867, 867, 202,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 868,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 868,
+ 867, 202, 867, 867, 867, 867, 202, 202,
+ 867, 867, 867, 867, 867, 867, 867, 868,
+
+ 867, 867, 867, 867, 867, 867, 867, 868,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 867, 867, 867, 867, 867,
+ 867, 867, 867, 202, 202, 869, 869, 870,
+
+ 871, 872, 873, 874, 874, 874, 874, 873,
+ 873, 875, 876, 877, 878, 879, 880, 881,
+ 882, 883, 884, 884, 884, 884, 884, 884,
+ 884, 884, 884, 884, 884, 202, 202, 202,
+
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 885, 885, 885, 885, 885, 885, 885, 885,
+ 885, 885, 202, 202, 202, 202, 202, 202,
+
+ 886, 887, 888, 889, 890, 891, 892, 893,
+ 894, 895, 896, 897, 898, 899, 900, 901,
+ 902, 903, 904, 905, 906, 907, 908, 909,
+ 910, 911, 912, 913, 914, 915, 916, 917,
+
+ 918, 919, 920, 921, 922, 923, 924, 925,
+ 926, 927, 928, 929, 930, 931, 932, 933,
+ 934, 935, 936, 937, 938, 939, 940, 941,
+ 942, 943, 944, 945, 946, 947, 948, 949,
+
+ 950, 951, 952, 953, 954, 955, 956, 957,
+ 958, 959, 960, 961, 962, 963, 964, 965,
+ 966, 966, 966, 966, 966, 967, 202, 202,
+ 968, 968, 968, 968, 968, 968, 202, 202,
+
+ 969, 970, 970, 970, 970, 970, 970, 970,
+ 970, 970, 970, 970, 970, 970, 970, 970,
+ 970, 970, 970, 970, 970, 970, 970, 970,
+ 970, 970, 970, 970, 970, 970, 970, 970,
+
+ 970, 970, 970, 970, 970, 970, 970, 970,
+ 970, 970, 970, 970, 970, 970, 970, 970,
+ 970, 970, 970, 970, 970, 970, 970, 970,
+ 970, 970, 970, 970, 970, 970, 970, 970,
+
+ 970, 970, 970, 970, 970, 970, 970, 970,
+ 970, 970, 970, 970, 970, 971, 972, 970,
+ 970, 970, 970, 970, 970, 970, 970, 973,
+ 973, 973, 973, 973, 973, 973, 973, 973,
+
+ 974, 975, 975, 975, 975, 975, 975, 975,
975, 975, 975, 975, 975, 975, 975, 975,
975, 975, 975, 975, 975, 975, 975, 975,
- 975, 975, 976, 976, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 977, 977, 977, 977, 977, 977, 977, 977,
- 977, 977, 977, 977, 977, 201, 977, 977,
- 977, 201, 978, 978, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 979, 979, 979, 979, 979, 979, 979, 979,
- 979, 979, 979, 979, 979, 979, 979, 979,
- 979, 979, 979, 979, 979, 979, 979, 979,
- 979, 979, 979, 979, 979, 979, 979, 979,
-
- 979, 979, 979, 979, 979, 979, 979, 979,
- 979, 979, 979, 979, 979, 979, 979, 979,
- 979, 979, 979, 979, 980, 980, 981, 980,
- 980, 980, 980, 980, 980, 980, 981, 981,
-
- 981, 981, 981, 981, 981, 981, 980, 981,
- 981, 980, 980, 980, 980, 980, 980, 980,
- 980, 980, 982, 980, 983, 983, 984, 985,
- 983, 986, 983, 987, 979, 988, 201, 201,
-
- 989, 990, 991, 992, 993, 994, 995, 996,
- 997, 998, 201, 201, 201, 201, 201, 201,
- 999, 999, 999, 999, 999, 999, 999, 999,
- 999, 999, 201, 201, 201, 201, 201, 201,
-
- 1000, 1000, 1001, 1002, 1003, 1004, 1005, 1006,
- 1007, 1008, 1009, 1010, 1010, 1010, 1011, 201,
- 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019,
- 1020, 1021, 201, 201, 201, 201, 201, 201,
-
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
-
- 1022, 1022, 1022, 1023, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
-
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1024, 1024, 1024, 1024, 1024, 1010, 1010, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
-
- 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022,
- 1022, 1025, 1026, 201, 201, 201, 201, 201,
- 959, 959, 959, 959, 959, 959, 959, 959,
- 959, 959, 959, 959, 959, 959, 959, 959,
-
- 959, 959, 959, 959, 959, 959, 959, 959,
- 959, 959, 959, 959, 959, 959, 959, 959,
- 959, 959, 959, 959, 959, 959, 959, 959,
- 959, 959, 959, 959, 959, 959, 959, 959,
-
- 959, 959, 959, 959, 959, 959, 959, 959,
- 959, 959, 959, 959, 959, 959, 959, 959,
- 959, 959, 959, 959, 959, 959, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
- 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
- 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027,
- 1027, 1027, 1027, 1027, 1027, 1028, 1028, 201,
-
- 1029, 1029, 1029, 1030, 1030, 1030, 1030, 1029,
- 1029, 1030, 1030, 1030, 201, 201, 201, 201,
- 1030, 1030, 1029, 1030, 1030, 1030, 1030, 1030,
- 1030, 1031, 1032, 1033, 201, 201, 201, 201,
-
- 1034, 201, 201, 201, 1035, 1035, 1036, 1037,
- 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045,
- 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
- 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
-
- 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046,
- 1046, 1046, 1046, 1046, 1046, 1046, 201, 201,
- 1046, 1046, 1046, 1046, 1046, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
- 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
- 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
- 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
-
- 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
- 1047, 1047, 1048, 1048, 201, 201, 201, 201,
- 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
- 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
-
- 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
- 1047, 1047, 201, 201, 201, 201, 201, 201,
- 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056,
- 1057, 1058, 1059, 201, 201, 201, 1060, 1060,
-
- 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
+ 975, 975, 975, 976, 977, 202, 202, 202,
+
+ 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 978, 978, 978, 978, 978,
+
+ 978, 978, 978, 978, 978, 978, 978, 978,
+ 978, 978, 978, 979, 979, 979, 980, 980,
+ 980, 981, 981, 981, 981, 981, 981, 981,
+ 981, 202, 202, 202, 202, 202, 202, 202,
+
+ 982, 982, 982, 982, 982, 982, 982, 982,
+ 982, 982, 982, 982, 982, 202, 982, 982,
+ 982, 982, 983, 983, 984, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 985, 985, 985, 985, 985, 985, 985, 985,
+ 985, 985, 985, 985, 985, 985, 985, 985,
+ 985, 985, 986, 986, 987, 988, 988, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 989, 989, 989, 989, 989, 989, 989, 989,
+ 989, 989, 989, 989, 989, 989, 989, 989,
+ 989, 989, 990, 990, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 991, 991, 991, 991, 991, 991, 991, 991,
+ 991, 991, 991, 991, 991, 202, 991, 991,
+ 991, 202, 992, 992, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 993, 993, 993, 993, 993, 993, 993, 993,
+ 993, 993, 993, 993, 993, 993, 993, 993,
+ 993, 993, 993, 993, 993, 993, 993, 993,
+ 993, 993, 993, 993, 993, 993, 993, 993,
+
+ 993, 993, 993, 993, 993, 993, 993, 993,
+ 993, 993, 993, 993, 993, 993, 993, 993,
+ 993, 993, 993, 993, 994, 994, 995, 994,
+ 994, 994, 994, 994, 994, 994, 995, 995,
+
+ 995, 995, 995, 995, 995, 995, 994, 995,
+ 995, 994, 994, 994, 994, 994, 994, 994,
+ 994, 994, 996, 994, 997, 997, 998, 999,
+ 997, 1000, 997, 1001, 993, 1002, 202, 202,
+
+ 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010,
+ 1011, 1012, 202, 202, 202, 202, 202, 202,
+ 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013,
+ 1013, 1013, 202, 202, 202, 202, 202, 202,
+
+ 1014, 1014, 1015, 1016, 1017, 1018, 1019, 1020,
+ 1021, 1022, 1023, 1024, 1024, 1024, 1025, 202,
+ 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033,
+ 1034, 1035, 202, 202, 202, 202, 202, 202,
+
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+
+ 1036, 1036, 1036, 1037, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1038, 202, 202, 202, 202, 202, 202, 202,
+
+ 1039, 1039, 1039, 1039, 1039, 1024, 1024, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+
+ 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036,
+ 1036, 1040, 1041, 202, 202, 202, 202, 202,
+ 973, 973, 973, 973, 973, 973, 973, 973,
+ 973, 973, 973, 973, 973, 973, 973, 973,
+
+ 973, 973, 973, 973, 973, 973, 973, 973,
+ 973, 973, 973, 973, 973, 973, 973, 973,
+ 973, 973, 973, 973, 973, 973, 973, 973,
+ 973, 973, 973, 973, 973, 973, 973, 973,
+
+ 973, 973, 973, 973, 973, 973, 973, 973,
+ 973, 973, 973, 973, 973, 973, 973, 973,
+ 973, 973, 973, 973, 973, 973, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
+ 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
+ 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
+ 1042, 1042, 1042, 1042, 1042, 1043, 1043, 202,
+
+ 1044, 1044, 1044, 1045, 1045, 1045, 1045, 1044,
+ 1044, 1045, 1045, 1045, 202, 202, 202, 202,
+ 1045, 1045, 1044, 1045, 1045, 1045, 1045, 1045,
+ 1045, 1046, 1047, 1048, 202, 202, 202, 202,
+
+ 1049, 202, 202, 202, 1050, 1050, 1051, 1052,
+ 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060,
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
+
1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061,
+ 1061, 1061, 1061, 1061, 1061, 1061, 202, 202,
+ 1061, 1061, 1061, 1061, 1061, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,
1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,
- 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1063,
- 1064, 1065, 1065, 1066, 201, 201, 1067, 1067,
-
- 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068,
- 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068,
- 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068,
- 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068,
-
- 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068,
- 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068,
- 1068, 1068, 1068, 1068, 1068, 1069, 1070, 1069,
- 1070, 1070, 1070, 1070, 1070, 1070, 1070, 201,
-
- 1071, 1072, 1070, 1072, 1072, 1070, 1070, 1070,
- 1070, 1070, 1070, 1070, 1070, 1069, 1069, 1069,
- 1069, 1069, 1069, 1070, 1070, 1073, 1073, 1073,
- 1073, 1073, 1073, 1073, 1073, 201, 201, 1074,
-
- 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082,
- 1083, 1084, 201, 201, 201, 201, 201, 201,
- 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082,
- 1083, 1084, 201, 201, 201, 201, 201, 201,
-
- 1085, 1085, 1085, 1085, 1085, 1085, 1085, 1086,
- 1087, 1087, 1087, 1087, 1085, 1085, 201, 201,
- 1088, 1088, 1088, 1088, 1088, 1089, 1089, 1089,
- 1089, 1089, 1089, 1088, 1088, 1089, 1090, 201,
-
- 1091, 1091, 1091, 1091, 1092, 1093, 1094, 1093,
- 1094, 1093, 1094, 1093, 1094, 1093, 1094, 1093,
- 1093, 1093, 1094, 1093, 1093, 1093, 1093, 1093,
- 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093,
-
- 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093,
- 1093, 1093, 1093, 1093, 1093, 1093, 1093, 1093,
- 1093, 1093, 1093, 1093, 1095, 1096, 1091, 1091,
- 1091, 1091, 1091, 1097, 1091, 1097, 1092, 1092,
-
- 1097, 1097, 1091, 1097, 1098, 1093, 1093, 1093,
- 1093, 1093, 1093, 1093, 201, 201, 201, 201,
- 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106,
- 1107, 1108, 1109, 1109, 1110, 1111, 1109, 1109,
-
- 1111, 1112, 1112, 1112, 1112, 1112, 1112, 1112,
- 1112, 1112, 1112, 1113, 1114, 1113, 1113, 1113,
- 1113, 1113, 1113, 1113, 1112, 1112, 1112, 1112,
- 1112, 1112, 1112, 1112, 1112, 201, 201, 201,
-
- 1115, 1115, 1116, 1117, 1117, 1117, 1117, 1117,
- 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117,
- 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117,
- 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117,
-
- 1117, 1116, 1115, 1115, 1115, 1115, 1116, 1116,
- 1115, 1115, 1118, 1119, 1120, 1120, 1117, 1117,
- 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128,
- 1129, 1130, 1131, 1131, 1131, 1131, 1131, 1131,
+ 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,
+ 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,
- 1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
+ 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,
+ 1062, 1062, 1063, 1063, 202, 202, 202, 202,
+ 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,
+ 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,
+
+ 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062,
+ 1062, 1062, 202, 202, 202, 202, 202, 202,
+ 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071,
+ 1072, 1073, 1074, 202, 202, 202, 1075, 1075,
+
+ 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076,
+ 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076,
+ 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076,
+ 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076,
+
+ 1077, 1077, 1077, 1077, 1077, 1077, 1077, 1077,
+ 1077, 1077, 1077, 1077, 1077, 1077, 1077, 1077,
+ 1077, 1077, 1077, 1077, 1077, 1077, 1077, 1078,
+ 1079, 1080, 1080, 1081, 202, 202, 1082, 1082,
+
+ 1083, 1083, 1083, 1083, 1083, 1083, 1083, 1083,
+ 1083, 1083, 1083, 1083, 1083, 1083, 1083, 1083,
+ 1083, 1083, 1083, 1083, 1083, 1083, 1083, 1083,
+ 1083, 1083, 1083, 1083, 1083, 1083, 1083, 1083,
+
+ 1083, 1083, 1083, 1083, 1083, 1083, 1083, 1083,
+ 1083, 1083, 1083, 1083, 1083, 1083, 1083, 1083,
+ 1083, 1083, 1083, 1083, 1083, 1084, 1085, 1084,
+ 1085, 1085, 1085, 1085, 1085, 1085, 1085, 202,
+
+ 1086, 1087, 1085, 1087, 1087, 1085, 1085, 1085,
+ 1085, 1085, 1085, 1085, 1085, 1084, 1084, 1084,
+ 1084, 1084, 1084, 1085, 1085, 1088, 1088, 1088,
+ 1088, 1088, 1088, 1088, 1088, 202, 202, 1089,
+
+ 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097,
+ 1098, 1099, 202, 202, 202, 202, 202, 202,
+ 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097,
+ 1098, 1099, 202, 202, 202, 202, 202, 202,
+
+ 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1101,
+ 1102, 1102, 1102, 1102, 1100, 1100, 202, 202,
+ 1103, 1103, 1103, 1103, 1103, 1104, 1104, 1104,
+ 1104, 1104, 1104, 1103, 1103, 1104, 1105, 202,
+
+ 1106, 1106, 1106, 1106, 1107, 1108, 1109, 1108,
+ 1109, 1108, 1109, 1108, 1109, 1108, 1109, 1108,
+ 1108, 1108, 1109, 1108, 1108, 1108, 1108, 1108,
+ 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108,
+
+ 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108,
+ 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108,
+ 1108, 1108, 1108, 1108, 1110, 1111, 1106, 1106,
+ 1106, 1106, 1106, 1112, 1106, 1112, 1107, 1107,
+
+ 1112, 1112, 1106, 1112, 1113, 1108, 1108, 1108,
+ 1108, 1108, 1108, 1108, 202, 202, 202, 202,
+ 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121,
+ 1122, 1123, 1124, 1124, 1125, 1126, 1124, 1124,
+
+ 1126, 1127, 1127, 1127, 1127, 1127, 1127, 1127,
+ 1127, 1127, 1127, 1128, 1129, 1128, 1128, 1128,
+ 1128, 1128, 1128, 1128, 1127, 1127, 1127, 1127,
+ 1127, 1127, 1127, 1127, 1127, 202, 202, 202,
+
+ 1130, 1130, 1131, 1132, 1132, 1132, 1132, 1132,
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132,
- 1132, 1132, 1132, 1132, 1132, 1132, 1133, 1134,
- 1135, 1135, 1134, 1134, 1134, 1135, 1134, 1135,
- 1135, 1135, 1136, 1136, 201, 201, 201, 201,
- 201, 201, 201, 201, 1137, 1137, 1137, 1137,
-
- 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138,
- 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138,
- 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138,
- 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138,
-
- 1138, 1138, 1138, 1138, 1139, 1139, 1139, 1139,
- 1139, 1139, 1139, 1139, 1140, 1140, 1140, 1140,
- 1140, 1140, 1140, 1140, 1139, 1139, 1140, 1141,
- 201, 201, 201, 1142, 1142, 1143, 1143, 1143,
-
- 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151,
- 1152, 1153, 201, 201, 201, 1138, 1138, 1138,
- 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161,
- 1162, 1163, 1164, 1164, 1164, 1164, 1164, 1164,
-
- 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164,
- 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164,
- 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164,
- 1165, 1165, 1165, 1165, 1165, 1165, 1166, 1166,
-
- 1167, 1168, 1169, 1170, 1170, 1171, 1172, 1173,
- 1174, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1175, 1175, 1175, 1175, 1175, 1175, 1175, 1175,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 1176, 1176, 1176, 1177, 1178, 1179, 1179, 1179,
- 1179, 1179, 1176, 1176, 1179, 1179, 1179, 1179,
-
- 1176, 1180, 1178, 1178, 1178, 1178, 1178, 1178,
- 1178, 1181, 1181, 1181, 1181, 1179, 1181, 1181,
- 1181, 1181, 1180, 1182, 1183, 1184, 1184, 1185,
- 1088, 1088, 201, 201, 201, 201, 201, 201,
+ 1132, 1131, 1130, 1130, 1130, 1130, 1131, 1131,
+ 1130, 1130, 1133, 1134, 1135, 1135, 1132, 1132,
+ 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143,
+ 1144, 1145, 1146, 1146, 1146, 1146, 1146, 1146,
+
+ 1147, 1147, 1147, 1147, 1147, 1147, 1147, 1147,
+ 1147, 1147, 1147, 1147, 1147, 1147, 1147, 1147,
+ 1147, 1147, 1147, 1147, 1147, 1147, 1147, 1147,
+ 1147, 1147, 1147, 1147, 1147, 1147, 1147, 1147,
+
+ 1147, 1147, 1147, 1147, 1147, 1147, 1148, 1149,
+ 1150, 1150, 1149, 1149, 1149, 1150, 1149, 1150,
+ 1150, 1150, 1151, 1151, 202, 202, 202, 202,
+ 202, 202, 202, 202, 1152, 1152, 1152, 1152,
+
+ 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153,
+ 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153,
+ 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153,
+ 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153,
+
+ 1153, 1153, 1153, 1153, 1154, 1154, 1154, 1154,
+ 1154, 1154, 1154, 1154, 1155, 1155, 1155, 1155,
+ 1155, 1155, 1155, 1155, 1154, 1154, 1155, 1156,
+ 202, 202, 202, 1157, 1157, 1158, 1158, 1158,
+
+ 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166,
+ 1167, 1168, 202, 202, 202, 1153, 1153, 1153,
+ 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176,
+ 1177, 1178, 1179, 1179, 1179, 1179, 1179, 1179,
+
+ 1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
+ 1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
+ 1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179,
+ 1180, 1180, 1180, 1180, 1180, 1180, 1181, 1181,
+
+ 1182, 1183, 1184, 1185, 1185, 1186, 1187, 1188,
+ 1189, 202, 202, 202, 202, 202, 202, 202,
+ 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
+ 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
+
+ 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
+ 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
+ 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
+ 1190, 1190, 1190, 202, 202, 1190, 1190, 1190,
+
+ 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 1192, 1192, 1192, 1193, 1194, 1195, 1195, 1195,
+ 1195, 1195, 1192, 1192, 1195, 1195, 1195, 1195,
+
+ 1192, 1196, 1194, 1194, 1194, 1194, 1194, 1194,
+ 1194, 1197, 1197, 1197, 1197, 1195, 1197, 1197,
+ 1197, 1197, 1197, 1198, 1199, 1198, 1198, 1200,
+ 1103, 1103, 1201, 202, 202, 202, 202, 202,
114, 114, 114, 114, 114, 114, 114, 114,
114, 114, 114, 114, 114, 114, 114, 114,
114, 114, 114, 114, 114, 114, 114, 114,
114, 114, 114, 114, 114, 114, 114, 114,
- 114, 114, 114, 114, 114, 114, 1186, 1186,
- 1186, 1186, 1186, 1187, 1188, 1188, 1188, 1189,
- 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188,
- 1188, 1188, 1188, 1189, 1188, 1188, 1188, 1188,
+ 114, 114, 114, 114, 114, 114, 1202, 1202,
+ 1202, 1202, 1202, 1203, 1204, 1204, 1204, 1205,
+ 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204,
+ 1204, 1204, 1204, 1205, 1204, 1204, 1204, 1204,
- 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188,
- 1188, 1188, 1188, 1188, 1188, 1188, 1189, 1188,
- 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188,
- 1188, 1188, 1188, 1188, 1188, 1190, 1190, 1190,
+ 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204,
+ 1204, 1204, 1204, 1204, 1204, 1204, 1205, 1204,
+ 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204,
+ 1204, 1204, 1204, 1204, 1204, 1206, 1206, 1206,
- 1190, 1190, 1188, 1188, 1188, 1188, 1190, 1190,
- 1190, 1190, 1190, 114, 115, 115, 115, 115,
+ 1206, 1206, 1204, 1204, 1204, 1204, 1206, 1206,
+ 1206, 1206, 1206, 114, 115, 115, 115, 115,
115, 115, 115, 115, 115, 115, 115, 115,
- 1191, 1192, 115, 115, 115, 1193, 115, 115,
+ 1207, 1208, 115, 115, 115, 1209, 115, 115,
115, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 1210, 115,
115, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 115, 1194, 1194, 1194, 1194, 1194,
+ 115, 115, 115, 1211, 1211, 1211, 1211, 1211,
- 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194,
- 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194,
- 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194,
- 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1195,
+ 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
+ 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
+ 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
+ 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1212,
- 190, 190, 189, 190, 1196, 1196, 1196, 1196,
- 1196, 1196, 1197, 1198, 1198, 1199, 1200, 1201,
- 1202, 1198, 1198, 1198, 1198, 1198, 1198, 1198,
- 1198, 1198, 1198, 1198, 1198, 1198, 1198, 1198,
+ 191, 191, 190, 191, 1213, 1213, 1213, 1213,
+ 1213, 1213, 1214, 1215, 1215, 1216, 1217, 1218,
+ 1219, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
+ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215,
- 1198, 1198, 1198, 1198, 1198, 1198, 1198, 1088,
- 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088,
- 1088, 1088, 1088, 1088, 1088, 1088, 1203, 1204,
- 1204, 1205, 201, 1206, 1207, 1179, 1196, 1197,
+ 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1103,
+ 1103, 1103, 1103, 1103, 1103, 1103, 1103, 1103,
+ 1103, 1103, 1103, 1103, 1103, 1103, 1220, 1221,
+ 1221, 1222, 202, 1223, 1224, 1195, 1213, 1214,
70, 71, 70, 71, 70, 71, 70, 71,
70, 71, 70, 71, 70, 71, 70, 71,
@@ -1944,258 +1949,258 @@ static const unsigned short uc_property_trie[] = {
70, 71, 70, 71, 70, 71, 70, 71,
70, 71, 70, 71, 70, 71, 70, 71,
- 70, 71, 70, 71, 70, 71, 1208, 1209,
- 1210, 1211, 1212, 1213, 1214, 1214, 1215, 1214,
+ 70, 71, 70, 71, 70, 71, 1225, 1226,
+ 1227, 1228, 1229, 1230, 1231, 1231, 1232, 1231,
70, 71, 70, 71, 70, 71, 70, 71,
70, 71, 70, 71, 70, 71, 70, 71,
70, 71, 70, 71, 70, 71, 70, 71,
- 70, 71, 1216, 1217, 1216, 1217, 1216, 1217,
-
- 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
- 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
- 1218, 1218, 1218, 1218, 1218, 1218, 201, 201,
- 1219, 1219, 1219, 1219, 1219, 1219, 201, 201,
-
- 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
- 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
- 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
- 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
-
- 1218, 1218, 1218, 1218, 1218, 1218, 201, 201,
- 1219, 1219, 1219, 1219, 1219, 1219, 201, 201,
- 1220, 1218, 1221, 1218, 1222, 1218, 1223, 1218,
- 201, 1219, 201, 1219, 201, 1219, 201, 1219,
-
- 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218,
- 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
- 1224, 1225, 1226, 1227, 1226, 1227, 1228, 1229,
- 1230, 1231, 1232, 1233, 1234, 1235, 201, 201,
-
- 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243,
- 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251,
- 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259,
- 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267,
-
- 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275,
- 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283,
- 1218, 1218, 1284, 1285, 1286, 201, 1287, 1288,
- 1219, 1219, 1289, 1290, 1291, 206, 1292, 206,
-
- 206, 1293, 1294, 1295, 1296, 201, 1297, 1298,
- 1299, 1300, 1299, 1300, 1301, 1293, 1293, 1293,
- 1218, 1218, 1302, 1303, 201, 201, 1304, 1305,
- 1219, 1219, 1306, 1307, 201, 1293, 1293, 1293,
-
- 1218, 1218, 1308, 1309, 1310, 1311, 1312, 1313,
- 1219, 1219, 1314, 1315, 1316, 1293, 1317, 1317,
- 201, 201, 1318, 1319, 1320, 201, 1321, 1322,
- 1323, 1324, 1325, 1326, 1327, 1328, 206, 201,
-
- 1329, 1329, 1330, 1330, 1330, 1330, 1330, 1331,
- 1330, 1330, 1330, 1332, 1333, 1334, 1335, 1336,
- 1337, 1338, 1337, 1339, 1340, 1341, 14, 1342,
- 1343, 1344, 1345, 1346, 1346, 1347, 1345, 1346,
-
- 14, 14, 14, 14, 1348, 1349, 1349, 1350,
- 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358,
- 13, 13, 13, 1359, 1359, 1360, 1361, 1361,
- 14, 1362, 1363, 14, 1364, 1365, 1342, 43,
-
- 43, 14, 14, 14, 1366, 16, 1367, 1368,
- 1369, 1369, 1370, 1370, 1370, 1370, 1371, 1371,
- 1371, 1371, 1372, 1373, 1374, 1375, 1376, 1377,
- 1376, 1376, 1376, 1376, 1375, 1376, 1376, 1378,
-
- 1379, 1380, 1380, 1380, 1381, 1382, 1383, 1384,
- 1385, 1386, 1387, 1387, 1387, 1387, 1387, 1387,
- 1388, 1389, 201, 201, 1390, 1391, 1392, 1393,
- 1394, 1395, 1396, 1396, 1397, 1398, 1399, 159,
-
- 1388, 63, 58, 59, 1390, 1391, 1392, 1393,
- 1394, 1395, 1396, 1396, 1397, 1398, 1399, 201,
- 1194, 1194, 1194, 1194, 1194, 1400, 1400, 1400,
- 1400, 1400, 1400, 1400, 1400, 201, 201, 201,
+ 70, 71, 1233, 1234, 1233, 1234, 1233, 1234,
+
+ 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235,
+ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+ 1235, 1235, 1235, 1235, 1235, 1235, 202, 202,
+ 1236, 1236, 1236, 1236, 1236, 1236, 202, 202,
+
+ 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235,
+ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+ 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235,
+ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+
+ 1235, 1235, 1235, 1235, 1235, 1235, 202, 202,
+ 1236, 1236, 1236, 1236, 1236, 1236, 202, 202,
+ 1237, 1235, 1238, 1235, 1239, 1235, 1240, 1235,
+ 202, 1236, 202, 1236, 202, 1236, 202, 1236,
+
+ 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235,
+ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1236,
+ 1241, 1242, 1243, 1244, 1243, 1244, 1245, 1246,
+ 1247, 1248, 1249, 1250, 1251, 1252, 202, 202,
+
+ 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260,
+ 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268,
+ 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276,
+ 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284,
+
+ 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292,
+ 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300,
+ 1235, 1235, 1301, 1302, 1303, 202, 1304, 1305,
+ 1236, 1236, 1306, 1307, 1308, 207, 1309, 207,
+
+ 207, 1310, 1311, 1312, 1313, 202, 1314, 1315,
+ 1316, 1317, 1316, 1317, 1318, 1310, 1310, 1310,
+ 1235, 1235, 1319, 1320, 202, 202, 1321, 1322,
+ 1236, 1236, 1323, 1324, 202, 1310, 1310, 1310,
+
+ 1235, 1235, 1325, 1326, 1327, 1328, 1329, 1330,
+ 1236, 1236, 1331, 1332, 1333, 1310, 1334, 1334,
+ 202, 202, 1335, 1336, 1337, 202, 1338, 1339,
+ 1340, 1341, 1342, 1343, 1344, 1345, 207, 202,
+
+ 1346, 1346, 1347, 1347, 1347, 1347, 1347, 1348,
+ 1347, 1347, 1347, 1349, 1350, 1351, 1352, 1353,
+ 1354, 1355, 1354, 1356, 1357, 1358, 14, 1359,
+ 1360, 1361, 1362, 1363, 1363, 1364, 1362, 1363,
+
+ 14, 14, 14, 14, 1365, 1366, 1366, 1367,
+ 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375,
+ 13, 13, 13, 1376, 1376, 1377, 1378, 1378,
+ 14, 1379, 1380, 14, 1381, 1382, 1359, 43,
+
+ 43, 14, 14, 14, 1383, 16, 1384, 1385,
+ 1386, 1386, 1387, 1387, 1387, 1387, 1388, 1388,
+ 1388, 1388, 1389, 1390, 1391, 1392, 1393, 1394,
+ 1393, 1393, 1393, 1393, 1392, 1393, 1393, 1395,
+
+ 1396, 1397, 1397, 1397, 1398, 1399, 1400, 1401,
+ 1402, 1403, 1404, 1404, 1404, 1404, 1404, 1404,
+ 1405, 1406, 202, 202, 1407, 1408, 1409, 1410,
+ 1411, 1412, 1413, 1413, 1414, 1415, 1416, 160,
+
+ 1405, 63, 58, 59, 1407, 1408, 1409, 1410,
+ 1411, 1412, 1413, 1413, 1414, 1415, 1416, 202,
+ 1211, 1211, 1211, 1211, 1211, 1417, 1417, 1417,
+ 1417, 1417, 1417, 1417, 1417, 202, 202, 202,
12, 12, 12, 12, 12, 12, 12, 50,
- 1401, 12, 12, 1402, 1403, 1404, 1404, 1404,
- 1405, 1405, 1406, 1406, 1406, 1406, 1407, 1408,
- 1408, 1409, 1410, 1411, 1412, 1412, 1413, 1414,
-
- 1415, 1415, 1415, 1415, 1415, 1415, 1415, 1415,
- 1415, 1415, 1415, 1415, 1415, 1415, 1415, 1415,
- 172, 172, 179, 179, 172, 172, 172, 172,
- 179, 179, 179, 172, 172, 1416, 1416, 1416,
-
- 1416, 172, 1417, 1417, 1418, 1419, 1419, 196,
- 1420, 196, 1419, 1421, 1197, 1197, 1197, 1197,
- 1198, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1422, 1422, 1423, 1424, 51, 1422, 1422, 1423,
- 51, 1424, 1425, 1423, 1423, 1423, 1425, 1425,
- 1423, 1423, 1423, 1425, 51, 1423, 1426, 51,
- 36, 1423, 1423, 1423, 1423, 1423, 51, 51,
-
- 1422, 1422, 1422, 51, 1423, 51, 1427, 51,
- 1423, 51, 1428, 1429, 1423, 1423, 1430, 1425,
- 1423, 1423, 1431, 1423, 1425, 1432, 1432, 1432,
- 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1438,
-
- 1439, 1372, 1372, 1372, 1372, 1438, 1437, 1437,
- 1437, 1437, 1440, 1372, 1441, 1442, 1443, 1444,
- 1445, 1445, 1445, 65, 65, 65, 65, 65,
+ 1418, 12, 12, 1419, 1420, 1421, 1421, 1421,
+ 1422, 1422, 1423, 1423, 1423, 1423, 1424, 1425,
+ 1425, 1426, 1427, 1428, 1429, 1429, 1430, 1431,
+
+ 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432,
+ 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432,
+ 173, 173, 180, 180, 173, 173, 173, 173,
+ 180, 180, 180, 173, 173, 1433, 1433, 1433,
+
+ 1433, 173, 1434, 1434, 1435, 1436, 1436, 197,
+ 1437, 197, 1436, 1438, 1214, 1214, 1214, 1214,
+ 1215, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 1439, 1439, 1440, 1441, 51, 1439, 1439, 1440,
+ 51, 1441, 1442, 1440, 1440, 1440, 1442, 1442,
+ 1440, 1440, 1440, 1442, 51, 1440, 1443, 51,
+ 36, 1440, 1440, 1440, 1440, 1440, 51, 51,
+
+ 1439, 1439, 1439, 51, 1440, 51, 1444, 51,
+ 1440, 51, 1445, 1446, 1440, 1440, 1447, 1442,
+ 1440, 1440, 1448, 1440, 1442, 1449, 1449, 1449,
+ 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1455,
+
+ 1456, 1389, 1389, 1389, 1389, 1455, 1454, 1454,
+ 1454, 1454, 1457, 1389, 1458, 1459, 1460, 1461,
+ 1462, 1462, 1462, 65, 65, 65, 65, 65,
65, 65, 65, 65, 65, 65, 65, 65,
- 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446,
- 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446,
- 1447, 1447, 1447, 1447, 1447, 1447, 1447, 1447,
- 1447, 1447, 1447, 1447, 1447, 1447, 1447, 1447,
+ 1463, 1463, 1463, 1463, 1463, 1463, 1463, 1463,
+ 1463, 1463, 1463, 1463, 1463, 1463, 1463, 1463,
+ 1464, 1464, 1464, 1464, 1464, 1464, 1464, 1464,
+ 1464, 1464, 1464, 1464, 1464, 1464, 1464, 1464,
- 1448, 1448, 1448, 111, 123, 1449, 1449, 1449,
- 1449, 1445, 1450, 1450, 201, 201, 201, 201,
+ 1465, 1465, 1465, 111, 123, 1466, 1466, 1466,
+ 1466, 1462, 1467, 1467, 202, 202, 202, 202,
36, 36, 36, 36, 36, 51, 51, 51,
- 51, 51, 1451, 1451, 51, 51, 51, 51,
+ 51, 51, 1468, 1468, 51, 51, 51, 51,
36, 51, 51, 36, 51, 51, 36, 51,
- 51, 51, 51, 51, 51, 51, 1451, 51,
+ 51, 51, 51, 51, 51, 51, 1468, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 1452, 1451, 1451,
+ 51, 51, 51, 51, 51, 1469, 1468, 1468,
51, 51, 36, 51, 36, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 1434, 1434, 1434, 1434, 1434,
- 1434, 1434, 1434, 1434, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
-
- 36, 36, 36, 36, 1451, 36, 36, 36,
- 1453, 1454, 1453, 1455, 1456, 1455, 36, 36,
- 36, 36, 18, 57, 36, 1457, 36, 36,
+ 51, 51, 51, 1451, 1451, 1451, 1451, 1451,
+ 1451, 1451, 1451, 1451, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+
+ 36, 36, 36, 36, 1468, 36, 36, 36,
+ 1470, 1471, 1470, 1472, 1473, 1472, 36, 36,
+ 36, 36, 18, 57, 36, 1474, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 1475,
+
+ 1476, 1477, 1478, 36, 1479, 36, 1468, 36,
+ 36, 36, 36, 36, 1414, 1414, 36, 1414,
+ 1414, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 1480, 1481, 36, 36,
+
+ 36, 1468, 36, 1482, 1468, 1483, 36, 1468,
+ 36, 1468, 36, 36, 1484, 36, 36, 36,
+ 36, 36, 1480, 1481, 1480, 1481, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 1451, 36, 1451, 36,
- 36, 36, 36, 36, 1397, 1397, 36, 1397,
- 1397, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 1458, 1459, 36, 36,
-
- 36, 1451, 36, 1460, 1451, 36, 36, 1451,
- 36, 1451, 36, 36, 36, 36, 36, 36,
- 36, 36, 1458, 1459, 1458, 1459, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36,
+ 1468, 36, 1468, 36, 1480, 1481, 1480, 1481,
+ 1480, 1481, 1480, 1481, 36, 1468, 1485, 1486,
+ 1485, 1486, 1480, 1481, 1485, 1486, 1480, 1481,
+ 1485, 1486, 1480, 1481, 1480, 1481, 1480, 1481,
- 1451, 36, 1451, 36, 1458, 1459, 1458, 1459,
- 1458, 1459, 1458, 1459, 36, 1451, 1461, 1462,
- 1461, 1462, 1458, 1459, 1461, 1462, 1458, 1459,
- 1461, 1462, 1458, 1459, 1458, 1459, 1458, 1459,
+ 1485, 1486, 1480, 1481, 1485, 1486, 1480, 1481,
+ 1485, 1486, 1480, 1481, 36, 36, 36, 1480,
+ 1481, 1480, 1481, 36, 36, 36, 36, 36,
+ 1487, 36, 36, 36, 36, 36, 36, 36,
- 1461, 1462, 1458, 1459, 1461, 1462, 1458, 1459,
- 1461, 1462, 1458, 1459, 36, 36, 36, 1458,
- 1459, 1458, 1459, 36, 36, 36, 36, 36,
- 1463, 36, 36, 36, 36, 36, 36, 36,
-
- 36, 36, 1458, 1459, 36, 36, 1464, 36,
- 1465, 1466, 36, 1466, 1451, 1451, 1451, 1451,
- 1458, 1459, 1458, 1459, 1458, 1459, 1458, 1459,
- 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 1480, 1481, 36, 36, 1488, 36,
+ 1489, 1490, 36, 1490, 1468, 1468, 1468, 1468,
+ 1480, 1481, 1480, 1481, 1480, 1481, 1480, 1481,
+ 1491, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36,
- 36, 1458, 1459, 1458, 1459, 1467, 36, 36,
- 1458, 1459, 36, 36, 36, 36, 1458, 1459,
- 1458, 1459, 1458, 1459, 1458, 1459, 1458, 1459,
+ 36, 1480, 1481, 1480, 1481, 1492, 36, 36,
+ 1480, 1481, 36, 36, 36, 36, 1480, 1481,
+ 1480, 1481, 1480, 1481, 1480, 1481, 1480, 1481,
- 1461, 1462, 1461, 1462, 1458, 1459, 1458, 1459,
- 1458, 1459, 1461, 1462, 1461, 1462, 36, 1468,
- 1458, 1459, 1469, 1469, 1469, 1372, 1470, 1470,
- 1372, 1372, 1471, 1471, 1471, 1472, 1472, 1372,
+ 1485, 1486, 1485, 1486, 1480, 1481, 1480, 1481,
+ 1480, 1481, 1485, 1486, 1485, 1486, 36, 1493,
+ 1480, 1481, 1494, 1494, 1494, 1389, 1495, 1495,
+ 1389, 1389, 1496, 1496, 1496, 1497, 1497, 1389,
- 51, 1434, 51, 51, 51, 51, 51, 51,
- 16, 1367, 16, 1367, 51, 51, 51, 51,
+ 51, 1451, 51, 51, 51, 51, 51, 51,
+ 16, 1384, 16, 1384, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 1473, 1473, 51, 51, 51, 51,
+ 51, 51, 1498, 1498, 51, 51, 51, 51,
36, 36, 51, 51, 51, 51, 51, 51,
- 51, 1474, 1475, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 51, 1476, 1476,
- 1476, 1476, 1476, 1476, 1476, 1476, 1476, 1476,
-
- 1476, 1476, 1476, 1476, 1476, 1476, 1476, 1476,
- 1476, 1476, 1476, 1476, 1476, 1476, 1476, 1476,
- 1476, 1476, 1476, 1476, 1476, 1476, 1476, 1476,
- 1476, 1476, 1476, 1476, 1476, 1476, 1476, 1476,
-
- 1476, 1476, 1476, 1476, 1476, 1476, 1476, 1476,
- 1476, 1476, 1476, 1476, 1476, 1476, 1476, 1476,
- 1476, 1476, 1476, 1476, 1476, 1476, 1476, 1476,
- 1476, 1476, 1476, 1434, 1372, 1434, 1434, 1434,
-
- 1434, 1434, 1434, 1434, 1434, 1434, 1434, 1434,
- 1434, 1434, 1434, 1434, 1434, 1434, 1434, 1434,
- 1434, 1434, 1434, 1434, 1434, 1477, 1434, 1434,
- 1434, 1434, 1434, 1372, 1372, 1372, 1372, 1372,
-
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1440, 1440, 1440, 1440,
- 1440, 1440, 1440, 1440, 1440, 1440, 1440, 1440,
-
- 1440, 1440, 1440, 1440, 1440, 1440, 1440, 1440,
- 1440, 1440, 1440, 1440, 1440, 1440, 1440, 1478,
- 1478, 1441, 1441, 1441, 1441, 1441, 1441, 1441,
- 1441, 1441, 1441, 1441, 1479, 1479, 1479, 1479,
-
- 1479, 1479, 1442, 1442, 1442, 1442, 1442, 1442,
- 1480, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1482, 1482, 1482, 1482, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1484, 1484, 1484, 1484, 1485,
+ 51, 1499, 1500, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 1501, 1501,
+ 1501, 1501, 1501, 1501, 1501, 1501, 1501, 1501,
+
+ 1501, 1501, 1501, 1501, 1501, 1501, 1501, 1501,
+ 1501, 1501, 1501, 1501, 1501, 1501, 1501, 1501,
+ 1501, 1501, 1501, 1501, 1501, 1501, 1501, 1501,
+ 1501, 1501, 1501, 1501, 1501, 1501, 1501, 1501,
+
+ 1501, 1501, 1501, 1501, 1501, 1501, 1501, 1501,
+ 1501, 1501, 1501, 1501, 1501, 1501, 1501, 1501,
+ 1501, 1501, 1501, 1501, 1501, 1501, 1501, 1501,
+ 1501, 1501, 1501, 1451, 1389, 1451, 1451, 1451,
+
+ 1451, 1451, 1451, 1451, 1451, 1451, 1451, 1451,
+ 1451, 1451, 1451, 1451, 1451, 1451, 1451, 1451,
+ 1451, 1451, 1451, 1451, 1451, 1502, 1451, 1451,
+ 1451, 1451, 1451, 1389, 1389, 1389, 1389, 1389,
+
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1457, 1457, 1457, 1457,
+ 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457,
+
+ 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457,
+ 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1503,
+ 1503, 1458, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1504, 1504, 1504, 1504,
+
+ 1504, 1504, 1459, 1459, 1459, 1459, 1459, 1459,
+ 1505, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1507, 1507, 1507, 1507, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1509, 1509, 1509, 1509, 1510,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 1434, 1434, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+ 51, 51, 51, 51, 51, 1451, 1451, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+ 51, 51, 51, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
- 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493,
- 1494, 65, 65, 65, 65, 65, 65, 65,
- 65, 65, 65, 65, 1486, 1487, 1488, 1489,
- 1490, 1491, 1492, 1493, 1494, 65, 65, 65,
+ 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518,
+ 1519, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 1511, 1512, 1513, 1514,
+ 1515, 1516, 1517, 1518, 1519, 65, 65, 65,
65, 65, 65, 65, 65, 65, 65, 65,
- 63, 58, 59, 1390, 1391, 1392, 1393, 1394,
- 1395, 1495, 1495, 1495, 1495, 1495, 1495, 1495,
- 1495, 1495, 1495, 1495, 1496, 1496, 1496, 1496,
+ 63, 58, 59, 1407, 1408, 1409, 1410, 1411,
+ 1412, 1520, 1520, 1520, 1520, 1520, 1520, 1520,
+ 1520, 1520, 1520, 1520, 1521, 1521, 1521, 1521,
- 1496, 1496, 1496, 1496, 1496, 1496, 1496, 1496,
- 1496, 1496, 1496, 1496, 1496, 1496, 1496, 1496,
- 1496, 1496, 1496, 1496, 1496, 1496, 1497, 1497,
- 1497, 1497, 1497, 1497, 1497, 1497, 1497, 1497,
+ 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
+ 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
+ 1521, 1521, 1521, 1521, 1521, 1521, 1522, 1522,
+ 1522, 1522, 1522, 1522, 1522, 1522, 1522, 1522,
- 1497, 1497, 1497, 1497, 1497, 1497, 1497, 1497,
- 1497, 1497, 1497, 1497, 1497, 1497, 1497, 1497,
- 1498, 1498, 1498, 1498, 1498, 1498, 1498, 1498,
- 1498, 1498, 1498, 1498, 1498, 1498, 1498, 1498,
+ 1522, 1522, 1522, 1522, 1522, 1522, 1522, 1522,
+ 1522, 1522, 1522, 1522, 1522, 1522, 1522, 1522,
+ 1523, 1523, 1523, 1523, 1523, 1523, 1523, 1523,
+ 1523, 1523, 1523, 1523, 1523, 1523, 1523, 1523,
- 1498, 1498, 1498, 1498, 1498, 1498, 1498, 1498,
- 1498, 1498, 1499, 1500, 1500, 1500, 1500, 1500,
- 1500, 1500, 1500, 1500, 1500, 1501, 1502, 1503,
- 1504, 1505, 1506, 1507, 1508, 1509, 1500, 1510,
+ 1523, 1523, 1523, 1523, 1523, 1523, 1523, 1523,
+ 1523, 1523, 1524, 1525, 1525, 1525, 1525, 1525,
+ 1525, 1525, 1525, 1525, 1525, 1526, 1527, 1528,
+ 1529, 1530, 1531, 1532, 1533, 1534, 1525, 1535,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 51, 1440, 1440,
- 1440, 1440, 1440, 1440, 1440, 1440, 1440, 1440,
+ 51, 51, 51, 51, 51, 51, 1457, 1457,
+ 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
@@ -2209,2454 +2214,1713 @@ static const unsigned short uc_property_trie[] = {
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 1434, 1434, 1434, 1434, 1434, 1434, 1434, 1434,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
+ 1451, 1451, 1451, 1451, 1451, 1451, 1451, 1451,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
- 1473, 1473, 1473, 1473, 51, 51, 51, 51,
+ 1498, 1498, 1498, 1498, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 1511, 1511, 1440, 1440,
- 1512, 1434, 1473, 1473, 1473, 1513, 1473, 1473,
+ 51, 51, 51, 51, 1536, 1536, 1457, 1457,
+ 1537, 1451, 1498, 1498, 1498, 1538, 1498, 1498,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 51, 1473, 1473, 1473, 51, 51, 51, 51,
+ 51, 1498, 1498, 1498, 51, 51, 51, 51,
- 1514, 51, 1514, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
+ 1498, 51, 51, 51, 51, 51, 51, 36,
+ 1451, 1451, 1457, 1457, 1457, 1457, 1457, 1457,
+ 1457, 1457, 1457, 1457, 1457, 1457, 1458, 1537,
+
+ 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457,
+ 1457, 1457, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1458, 1539, 1505, 1505,
+
+ 1503, 1503, 1458, 1458, 1458, 1458, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1540, 1458, 1458, 1458,
+ 1458, 1458, 1459, 1539, 1539, 1539, 1539, 1539,
+ 1539, 1539, 1539, 1539, 1539, 1541, 1541, 1541,
+
+ 1542, 1542, 1542, 1542, 1541, 1541, 1541, 1541,
+ 1541, 1505, 1505, 1505, 1505, 1541, 1506, 1541,
+ 1541, 1541, 1505, 1541, 1541, 1505, 1505, 1505,
+ 1541, 1541, 1505, 1505, 1541, 1505, 1505, 1541,
+
+ 1541, 1541, 1506, 1505, 1506, 1506, 1506, 1506,
+ 1505, 1505, 1541, 1505, 1505, 1505, 1505, 1505,
+ 1505, 1541, 1541, 1541, 1541, 1541, 1505, 1541,
+ 1541, 1543, 1541, 1505, 1505, 1541, 1541, 1541,
+
+ 1544, 1498, 1498, 1498, 1498, 1506, 51, 51,
+ 1498, 1498, 1545, 1545, 1538, 1538, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 1473, 51, 51, 51, 51, 51, 51, 36,
- 1434, 1434, 1440, 1440, 1440, 1440, 1440, 1440,
- 1440, 1440, 1440, 1440, 1440, 1440, 1441, 1512,
-
- 1440, 1440, 1440, 1440, 1440, 1440, 1440, 1440,
- 1440, 1440, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1441, 1441, 1441, 1515, 1515, 1441,
- 1441, 1441, 1441, 1441, 1441, 1516, 1480, 1480,
-
- 1478, 1478, 1441, 1441, 1441, 1441, 1441, 1441,
- 1441, 1441, 1441, 1441, 1517, 1441, 1441, 1441,
- 1441, 1441, 1442, 1516, 1516, 1516, 1516, 1516,
- 1516, 1516, 1516, 1516, 1516, 1518, 1518, 1518,
-
- 1519, 1519, 1519, 1519, 1518, 1518, 1518, 1518,
- 1518, 1480, 1480, 1480, 1480, 1518, 1481, 1518,
- 1518, 1518, 1480, 1518, 1518, 1480, 1480, 1480,
- 1518, 1518, 1480, 1480, 1518, 1480, 1480, 1518,
-
- 1518, 1518, 1481, 1480, 1481, 1481, 1481, 1481,
- 1480, 1480, 1518, 1480, 1480, 1480, 1480, 1480,
- 1480, 1518, 1518, 1518, 1518, 1518, 1480, 1518,
- 1518, 1520, 1518, 1480, 1480, 1518, 1518, 1518,
-
- 1521, 1473, 1473, 1473, 1473, 1481, 51, 51,
- 1522, 1473, 1523, 1523, 1513, 1513, 51, 51,
+ 1506, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 1481, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 1506, 51, 1506, 51,
+ 51, 51, 51, 1506, 1506, 1506, 51, 1505,
+ 51, 51, 51, 1546, 1546, 1546, 1546, 1547,
+
+ 1547, 51, 1548, 1548, 1498, 51, 51, 51,
+ 1549, 1550, 1549, 1550, 1549, 1550, 1549, 1550,
+ 1549, 1550, 1549, 1550, 1549, 1550, 1551, 1552,
+ 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560,
+
+ 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558,
+ 1559, 1560, 1551, 1552, 1553, 1554, 1555, 1556,
+ 1557, 1558, 1559, 1560, 51, 1506, 1506, 1506,
51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 1481, 51, 1481, 51,
- 51, 51, 51, 1481, 1481, 1481, 51, 1480,
- 51, 51, 51, 1524, 1524, 1524, 1524, 1525,
-
- 1525, 51, 1526, 1526, 1522, 51, 51, 51,
- 1527, 1528, 1527, 1528, 1527, 1528, 1527, 1528,
- 1527, 1528, 1527, 1528, 1527, 1528, 1529, 1530,
- 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538,
-
- 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536,
- 1537, 1538, 1529, 1530, 1531, 1532, 1533, 1534,
- 1535, 1536, 1537, 1538, 51, 1481, 1481, 1481,
51, 51, 51, 51, 51, 51, 51, 51,
-
- 51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 51, 51, 51,
- 1481, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 51, 51, 1481,
-
- 1539, 1539, 1539, 1540, 1541, 1542, 1543, 1479,
- 1544, 1545, 1479, 1546, 1547, 1548, 1549, 1549,
- 1372, 1372, 1372, 1372, 1372, 1550, 1551, 1372,
- 1372, 1372, 1372, 1372, 1372, 1550, 1551, 1372,
-
- 1372, 1372, 1550, 1551, 1550, 1551, 1527, 1528,
- 1527, 1528, 1527, 1528, 1552, 1553, 1552, 1553,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
-
- 1554, 1554, 1554, 1554, 1554, 1554, 1554, 1554,
- 1554, 1554, 1554, 1554, 1554, 1554, 1554, 1554,
- 1554, 1554, 1554, 1554, 1554, 1554, 1554, 1554,
- 1554, 1554, 1554, 1554, 1554, 1554, 1554, 1554,
-
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
-
- 1372, 1372, 1372, 1527, 1528, 1527, 1528, 1527,
- 1528, 1527, 1528, 1527, 1528, 1555, 1556, 1557,
- 1558, 1527, 1528, 1527, 1528, 1527, 1528, 1527,
- 1528, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
-
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1559, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
-
- 1550, 1551, 1372, 1372, 1550, 1551, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1550,
- 1551, 1550, 1551, 1372, 1550, 1551, 1372, 1372,
- 1527, 1528, 1527, 1528, 1372, 1372, 1372, 1372,
-
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1560, 1372, 1372,
- 1550, 1551, 1372, 1372, 1527, 1528, 1372, 1372,
-
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1439, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
-
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1550, 1551, 1550, 1551, 1372,
- 1372, 1372, 1372, 1372, 1550, 1551, 1372, 1372,
- 1372, 1372, 1372, 1372, 1550, 1551, 1372, 1372,
-
- 1372, 1372, 1372, 1372, 1550, 1551, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372,
- 1372, 1372, 1372, 1372, 1439, 1439, 1439, 1372,
- 1372, 1550, 1551, 1372, 1372, 1550, 1551, 1550,
-
- 1551, 1550, 1551, 1550, 1551, 1372, 1372, 1372,
- 1372, 1372, 1372, 1550, 1551, 1372, 1372, 1372,
- 1372, 1550, 1551, 1550, 1551, 1550, 1551, 1550,
- 1551, 1550, 1551, 1550, 1551, 1372, 1372, 1372,
-
- 1372, 1550, 1551, 1372, 1372, 1372, 1550, 1551,
- 1550, 1551, 1550, 1551, 1550, 1551, 1372, 1550,
- 1551, 1372, 1372, 1550, 1551, 1372, 1372, 1372,
- 1372, 1372, 1372, 1550, 1551, 1550, 1551, 1550,
-
- 1551, 1550, 1551, 1550, 1551, 1550, 1551, 1372,
- 1372, 1372, 1372, 1372, 1372, 1550, 1551, 1550,
- 1551, 1550, 1551, 1550, 1551, 1550, 1551, 1372,
- 1372, 1372, 1372, 1372, 1561, 1372, 1562, 1372,
-
- 1372, 1372, 1372, 1563, 1564, 1563, 1372, 1372,
- 1372, 1372, 1372, 1372, 1550, 1551, 1372, 1372,
- 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1550,
- 1551, 1550, 1551, 1372, 1372, 1372, 1372, 1372,
-
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1441, 1441,
- 1441, 1441, 1441, 1441, 1442, 1442, 1442, 1442,
- 1442, 1442, 1442, 1516, 1516, 1516, 1516, 1516,
-
- 1442, 1442, 1442, 1442, 1516, 1516, 1516, 1516,
- 1516, 1516, 1516, 1516, 1516, 1516, 1516, 1516,
- 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547,
- 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547,
-
- 1547, 1547, 1547, 1547, 1547, 1516, 1516, 1547,
- 1547, 1547, 1547, 1547, 1547, 1483, 1483, 1483,
- 1516, 1516, 1516, 1516, 1516, 1480, 1480, 1480,
- 1480, 1480, 1483, 1483, 1483, 1483, 1483, 1483,
-
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 201, 201, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
-
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 201, 201,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
-
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 201, 201, 201, 1483, 1483, 1483,
-
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 201, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1485, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 1450, 1450, 1450, 1450,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
- 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
- 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
- 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
-
- 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
- 1565, 1565, 1565, 1565, 1565, 1565, 1565, 201,
- 1566, 1566, 1566, 1566, 1566, 1566, 1566, 1566,
- 1566, 1566, 1566, 1566, 1566, 1566, 1566, 1566,
-
- 1566, 1566, 1566, 1566, 1566, 1566, 1566, 1566,
- 1566, 1566, 1566, 1566, 1566, 1566, 1566, 1566,
- 1566, 1566, 1566, 1566, 1566, 1566, 1566, 1566,
- 1566, 1566, 1566, 1566, 1566, 1566, 1566, 201,
-
- 127, 123, 1567, 1568, 1569, 1570, 1571, 127,
- 123, 127, 123, 127, 123, 1572, 1573, 1574,
- 1575, 1214, 1216, 1217, 1576, 127, 123, 1576,
- 1214, 1214, 1214, 1214, 1577, 1577, 1578, 1579,
-
- 1580, 1581, 1580, 1581, 1580, 1581, 1580, 1581,
- 1580, 1581, 1580, 1581, 1580, 1581, 1580, 1581,
- 1580, 1581, 1580, 1581, 1580, 1581, 1580, 1581,
- 1580, 1581, 1580, 1581, 1580, 1581, 1580, 1581,
-
- 1580, 1581, 1580, 1581, 1582, 1583, 1583, 1583,
- 1583, 1583, 1583, 1584, 1585, 1584, 1585, 1586,
- 1586, 1586, 1587, 1588, 201, 201, 201, 201,
- 201, 1589, 1590, 1590, 1590, 1591, 1589, 1590,
-
- 1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592,
+ 1506, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 1506,
+
+ 1561, 1561, 1561, 1562, 1563, 1564, 1565, 1504,
+ 1566, 1567, 1504, 1568, 1569, 1570, 1571, 1571,
+ 1389, 1389, 1389, 1389, 1389, 1572, 1573, 1389,
+ 1389, 1389, 1389, 1389, 1574, 1572, 1573, 1389,
+
+ 1389, 1389, 1572, 1573, 1572, 1573, 1549, 1550,
+ 1549, 1550, 1549, 1550, 1575, 1576, 1575, 1576,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+
+ 1577, 1577, 1577, 1577, 1577, 1577, 1577, 1577,
+ 1577, 1577, 1577, 1577, 1577, 1577, 1577, 1577,
+ 1577, 1577, 1577, 1577, 1577, 1577, 1577, 1577,
+ 1577, 1577, 1577, 1577, 1577, 1577, 1577, 1577,
+
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+
+ 1389, 1389, 1389, 1549, 1550, 1549, 1550, 1549,
+ 1550, 1549, 1550, 1549, 1550, 1578, 1579, 1580,
+ 1581, 1549, 1550, 1549, 1550, 1549, 1550, 1549,
+ 1550, 1389, 1389, 1582, 1389, 1389, 1389, 1389,
+
+ 1583, 1389, 1389, 1584, 1572, 1573, 1389, 1389,
+ 1572, 1573, 1572, 1573, 1572, 1573, 1572, 1573,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1585, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+
+ 1572, 1573, 1389, 1389, 1572, 1573, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1572,
+ 1573, 1572, 1573, 1389, 1572, 1573, 1389, 1389,
+ 1549, 1550, 1549, 1550, 1389, 1389, 1389, 1389,
+
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1572, 1573, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1586, 1389, 1389,
+ 1572, 1573, 1389, 1389, 1549, 1550, 1389, 1389,
+
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1456, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1572, 1573, 1572, 1573, 1389,
+ 1389, 1389, 1389, 1389, 1572, 1573, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1572, 1573, 1389, 1389,
+
+ 1389, 1389, 1389, 1389, 1572, 1573, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1456, 1456, 1456, 1389,
+ 1389, 1572, 1573, 1572, 1573, 1572, 1573, 1572,
+
+ 1573, 1572, 1573, 1572, 1573, 1572, 1573, 1572,
+ 1573, 1572, 1573, 1572, 1573, 1572, 1573, 1572,
+ 1573, 1572, 1573, 1572, 1573, 1572, 1573, 1572,
+ 1573, 1572, 1573, 1572, 1573, 1572, 1573, 1572,
+
+ 1573, 1572, 1573, 1389, 1389, 1389, 1572, 1573,
+ 1572, 1573, 1572, 1573, 1572, 1573, 1389, 1572,
+ 1573, 1572, 1573, 1572, 1573, 1572, 1573, 1572,
+ 1573, 1572, 1573, 1572, 1573, 1572, 1573, 1572,
+
+ 1573, 1572, 1573, 1572, 1573, 1572, 1573, 1572,
+ 1573, 1572, 1573, 1572, 1573, 1572, 1573, 1572,
+ 1573, 1572, 1573, 1572, 1573, 1572, 1573, 1389,
+ 1389, 1389, 1389, 1389, 1587, 1389, 1588, 1389,
+
+ 1389, 1389, 1389, 1589, 1590, 1589, 1389, 1389,
+ 1389, 1389, 1389, 1389, 1572, 1573, 1591, 1389,
+ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1572,
+ 1573, 1572, 1573, 1389, 1389, 1389, 1389, 1389,
+
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1458, 1458,
+ 1458, 1458, 1458, 1458, 1459, 1459, 1459, 1459,
+ 1459, 1459, 1459, 1539, 1539, 1539, 1539, 1539,
+
+ 1459, 1459, 1459, 1459, 1539, 1539, 1539, 1539,
+ 1539, 1539, 1539, 1539, 1539, 1539, 1539, 1539,
+ 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
+ 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
+
+ 1569, 1569, 1569, 1569, 1569, 1539, 1539, 1569,
+ 1569, 1569, 1569, 1569, 1569, 1508, 1508, 1508,
+ 1539, 1539, 1539, 1539, 1539, 1505, 1505, 1505,
+ 1505, 1505, 1508, 1508, 1508, 1508, 1508, 1508,
+
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 202, 202, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 202, 202,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1592, 1592, 1592, 1508, 1508, 1508,
+
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1593, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1510, 1592, 1592, 1592, 1592, 1592,
1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592,
+
1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592,
+ 1592, 1592, 1592, 1592, 1467, 1467, 1467, 1467,
1592, 1592, 1592, 1592, 1592, 1592, 1592, 1592,
-
- 1592, 1592, 1592, 1592, 1592, 1592, 201, 1593,
- 201, 201, 201, 201, 201, 1593, 201, 201,
- 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
- 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
-
- 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
- 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
- 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
- 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
-
- 1594, 1594, 1594, 1594, 1594, 1594, 1595, 1595,
- 201, 201, 201, 201, 201, 201, 201, 1596,
- 1597, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 1598,
-
- 854, 854, 854, 854, 854, 854, 854, 854,
- 854, 854, 854, 854, 854, 854, 854, 854,
- 854, 854, 854, 854, 854, 854, 854, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 854, 854, 854, 854, 854, 854, 854, 201,
- 854, 854, 854, 854, 854, 854, 854, 201,
- 854, 854, 854, 854, 854, 854, 854, 201,
- 854, 854, 854, 854, 854, 854, 854, 201,
-
- 266, 266, 266, 266, 266, 266, 266, 266,
- 266, 266, 266, 266, 266, 266, 266, 266,
- 266, 266, 266, 266, 266, 266, 266, 266,
- 266, 266, 266, 266, 266, 266, 266, 266,
-
- 1599, 1599, 1600, 1601, 1600, 1601, 1599, 1599,
- 1599, 1600, 1601, 1599, 1600, 1601, 1376, 1376,
- 1376, 1376, 1376, 1376, 1376, 1376, 1375, 1602,
- 1603, 1604, 1605, 1606, 1600, 1601, 1606, 1606,
-
- 1607, 1608, 1552, 1553, 1552, 1553, 1552, 1553,
- 1552, 1553, 1604, 1604, 1604, 1604, 1609, 1610,
- 1604, 1611, 1612, 1613, 1613, 1612, 1612, 1612,
- 1612, 1612, 1614, 1614, 1615, 1616, 1616, 1617,
-
- 1618, 1616, 1619, 1620, 1620, 1621, 1621, 1621,
- 1621, 1621, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
- 1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
- 1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
- 1622, 1622, 201, 1622, 1622, 1622, 1622, 1623,
+ 1592, 1592, 1592, 1592, 1592, 1592, 1594, 1593,
+
+ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
+ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
+ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
+ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
+
+ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595,
+ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 202,
+ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
+ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
+
+ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
+ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
+ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
+ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 202,
+
+ 127, 123, 1597, 1598, 1599, 1600, 1601, 127,
+ 123, 127, 123, 127, 123, 1602, 1603, 1604,
+ 1605, 1231, 1233, 1234, 1606, 127, 123, 1606,
+ 1231, 1231, 1231, 1231, 1607, 1607, 1608, 1609,
+
+ 1610, 1611, 1610, 1611, 1610, 1611, 1610, 1611,
+ 1610, 1611, 1610, 1611, 1610, 1611, 1610, 1611,
+ 1610, 1611, 1610, 1611, 1610, 1611, 1610, 1611,
+ 1610, 1611, 1610, 1611, 1610, 1611, 1610, 1611,
+
+ 1610, 1611, 1610, 1611, 1612, 1613, 1613, 1613,
+ 1613, 1613, 1613, 1614, 1615, 1614, 1615, 1616,
+ 1616, 1616, 1617, 1618, 202, 202, 202, 202,
+ 202, 1619, 1620, 1620, 1620, 1621, 1619, 1620,
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
- 1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
- 1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622,
- 1622, 1622, 1622, 1623, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+ 1622, 1622, 1622, 1622, 1622, 1622, 202, 1623,
+ 202, 202, 202, 202, 202, 1623, 202, 202,
+ 1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
+ 1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
- 1623, 1623, 1623, 1623, 1623, 1623, 1623, 1623,
- 1623, 1623, 1623, 1623, 1623, 1623, 1623, 1623,
- 1623, 1623, 1623, 1623, 1623, 1623, 1623, 1623,
- 1623, 1623, 1623, 1623, 1623, 1623, 1623, 1623,
+ 1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
+ 1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
+ 1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
+ 1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
- 1623, 1623, 1623, 1623, 1623, 1623, 1623, 1623,
- 1623, 1623, 1623, 1623, 1623, 1623, 1623, 1623,
- 1623, 1623, 1623, 1623, 1623, 1623, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+ 1624, 1624, 1624, 1624, 1624, 1624, 1625, 1625,
+ 202, 202, 202, 202, 202, 202, 202, 1626,
+ 1627, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 1628,
+
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 868, 868, 868, 868, 868, 868, 868, 202,
+ 868, 868, 868, 868, 868, 868, 868, 202,
+ 868, 868, 868, 868, 868, 868, 868, 202,
+ 868, 868, 868, 868, 868, 868, 868, 202,
+
+ 267, 267, 267, 267, 267, 267, 267, 267,
+ 267, 267, 267, 267, 267, 267, 267, 267,
+ 267, 267, 267, 267, 267, 267, 267, 267,
+ 267, 267, 267, 267, 267, 267, 267, 267,
+
+ 1629, 1629, 1630, 1631, 1630, 1631, 1629, 1629,
+ 1629, 1630, 1631, 1629, 1630, 1631, 1393, 1393,
+ 1393, 1393, 1393, 1393, 1393, 1393, 1392, 1632,
+ 1633, 1634, 1635, 1636, 1630, 1631, 1636, 1636,
+
+ 1637, 1638, 1575, 1576, 1575, 1576, 1575, 1576,
+ 1575, 1576, 1634, 1634, 1634, 1634, 1639, 1640,
+ 1634, 1641, 1642, 1643, 1643, 1642, 1642, 1642,
+ 1642, 1642, 1644, 1644, 1645, 1646, 1646, 1647,
+
+ 1648, 1646, 1649, 1650, 1650, 1651, 1651, 1651,
+ 1651, 1651, 1652, 1653, 1652, 1653, 1652, 1654,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655,
+ 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655,
+ 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655,
+ 1655, 1655, 202, 1655, 1655, 1655, 1655, 1656,
+
+ 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655,
+ 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655,
+ 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655,
+ 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655,
+
+ 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655,
+ 1655, 1655, 1655, 1655, 1655, 1655, 1655, 1655,
+ 1655, 1655, 1655, 1656, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656,
+ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656,
+ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656,
+ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656,
+
+ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656,
+ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656,
+ 1656, 1656, 1656, 1656, 1656, 1656, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 1657, 1657, 1657, 1657, 1657, 1657, 1657, 1657,
+ 1657, 1657, 1657, 1657, 202, 202, 202, 202,
+
+ 1347, 1658, 1659, 1660, 1498, 1661, 1662, 1663,
+ 16, 1384, 16, 1384, 16, 1384, 16, 1384,
+ 16, 1384, 1498, 1498, 16, 1384, 16, 1384,
+ 16, 1384, 16, 1384, 1664, 1362, 1665, 1665,
+
+ 1498, 1663, 1663, 1663, 1663, 1663, 1663, 1663,
+ 1663, 1663, 1666, 1667, 174, 1668, 1669, 1669,
+ 1670, 1671, 1671, 1671, 1671, 1672, 1673, 1498,
+ 1674, 1674, 1674, 1675, 1676, 1677, 1657, 1498,
+
+ 202, 1678, 1679, 1678, 1679, 1678, 1679, 1678,
+ 1679, 1678, 1679, 1679, 1680, 1679, 1680, 1679,
+ 1680, 1679, 1680, 1679, 1680, 1679, 1680, 1679,
+ 1680, 1679, 1680, 1679, 1680, 1679, 1680, 1679,
+
+ 1680, 1679, 1680, 1678, 1679, 1680, 1679, 1680,
+ 1679, 1680, 1679, 1679, 1679, 1679, 1679, 1679,
+ 1680, 1680, 1679, 1680, 1680, 1679, 1680, 1680,
+ 1679, 1680, 1680, 1679, 1680, 1680, 1679, 1679,
+
+ 1679, 1679, 1679, 1678, 1679, 1678, 1679, 1678,
+ 1679, 1679, 1679, 1679, 1679, 1679, 1678, 1679,
+ 1679, 1679, 1679, 1679, 1680, 1681, 1681, 202,
+ 202, 1682, 1682, 1683, 1683, 1684, 1685, 1686,
+
+ 1687, 1688, 1689, 1688, 1689, 1688, 1689, 1688,
+ 1689, 1688, 1689, 1689, 1690, 1689, 1690, 1689,
+ 1690, 1689, 1690, 1689, 1690, 1689, 1690, 1689,
+ 1690, 1689, 1690, 1689, 1690, 1689, 1690, 1689,
+
+ 1690, 1689, 1690, 1688, 1689, 1690, 1689, 1690,
+ 1689, 1690, 1689, 1689, 1689, 1689, 1689, 1689,
+ 1690, 1690, 1689, 1690, 1690, 1689, 1690, 1690,
+ 1689, 1690, 1690, 1689, 1690, 1690, 1689, 1689,
+
+ 1689, 1689, 1689, 1688, 1689, 1688, 1689, 1688,
+ 1689, 1689, 1689, 1689, 1689, 1689, 1688, 1689,
+ 1689, 1689, 1689, 1689, 1690, 1688, 1688, 1690,
+ 1690, 1690, 1690, 1691, 1692, 1693, 1694, 1695,
+
+ 202, 202, 202, 202, 202, 1696, 1696, 1696,
+ 1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
+ 1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
+ 1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
+
+ 1696, 1696, 1696, 1696, 1696, 1696, 1696, 1696,
+ 1696, 1696, 1696, 1696, 1696, 1697, 1698, 1699,
+ 202, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 202,
+ 1701, 1701, 1702, 1702, 1702, 1702, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+
+ 1704, 1704, 1704, 1704, 1704, 1704, 1704, 1704,
+ 1704, 1704, 1704, 1704, 1704, 1704, 1704, 1704,
+ 1704, 1704, 1704, 1704, 1704, 1704, 1704, 1704,
+ 1705, 1705, 1705, 202, 202, 202, 202, 202,
+
+ 1537, 1537, 1537, 1537, 1537, 1537, 1537, 1537,
+ 1537, 1537, 1537, 1537, 1537, 1537, 1537, 1537,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+
+ 1542, 1542, 1542, 1542, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 1706, 1706, 1706, 1706, 1706, 1706, 1706, 1706,
+ 1706, 1706, 1706, 1706, 1706, 1706, 1706, 1706,
+
+ 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707,
+ 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707,
+ 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707,
+ 1707, 1707, 1707, 1707, 1707, 1708, 1708, 202,
+
+ 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702,
+ 1702, 1702, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+
+ 1703, 1703, 1703, 1703, 1709, 1709, 1709, 1709,
+ 1710, 1710, 1710, 1710, 1710, 1710, 1710, 1710,
+ 1711, 1712, 1712, 1712, 1712, 1712, 1712, 1712,
+ 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712,
+
+ 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707,
+ 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707,
+ 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707,
+ 1707, 1707, 1707, 1707, 1708, 1708, 1713, 1701,
+
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1712, 1712, 1712, 1712, 1712, 1712, 1712,
+ 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712,
+
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1711, 1711, 1711, 1711,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1715,
+
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1714,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1711,
+ 1711, 1711, 1711, 1703, 1703, 1703, 1703, 1703,
+
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1711, 1711,
+
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1711,
+
+ 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716,
+ 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716,
+ 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716,
+ 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716,
+
+ 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716,
+ 1716, 1716, 1716, 1716, 1716, 1716, 1716, 1716,
+ 1716, 1716, 1716, 1716, 1716, 1716, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+
+ 1718, 1718, 1718, 1718, 1718, 1718, 1718, 1718,
+ 1718, 1718, 1718, 1718, 1718, 1718, 1718, 1718,
+ 1718, 1718, 1718, 1718, 1718, 1718, 1718, 1718,
+ 1718, 1718, 1718, 1718, 1718, 1718, 1718, 1718,
+
+ 1718, 1718, 1718, 1718, 1718, 1718, 1719, 1719,
+ 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
+ 1719, 1719, 1719, 1719, 1719, 1719, 1719, 1719,
+ 1719, 1719, 1719, 1719, 1720, 1720, 1720, 1720,
+
+ 1720, 1720, 1720, 1720, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1722, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1725, 1725, 1725, 1725, 1725,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 1624, 1624, 1624, 1624, 1624, 1624, 1624, 1624,
- 1624, 1624, 1624, 1624, 201, 201, 201, 201,
-
- 1330, 1625, 1626, 1627, 1473, 1628, 1629, 1630,
- 16, 1367, 16, 1367, 16, 1367, 16, 1367,
- 16, 1367, 1473, 1473, 16, 1367, 16, 1367,
- 16, 1367, 16, 1367, 1631, 1345, 1632, 1632,
-
- 1473, 1630, 1630, 1630, 1630, 1630, 1630, 1630,
- 1630, 1630, 1633, 1634, 173, 1635, 1636, 1636,
- 1637, 1638, 1638, 1638, 1638, 1639, 1640, 1473,
- 1641, 1641, 1641, 1642, 1643, 1644, 1624, 1473,
-
- 201, 1645, 1646, 1645, 1646, 1645, 1646, 1645,
- 1646, 1645, 1646, 1646, 1647, 1646, 1647, 1646,
- 1647, 1646, 1647, 1646, 1647, 1646, 1647, 1646,
- 1647, 1646, 1647, 1646, 1647, 1646, 1647, 1646,
-
- 1647, 1646, 1647, 1645, 1646, 1647, 1646, 1647,
- 1646, 1647, 1646, 1646, 1646, 1646, 1646, 1646,
- 1647, 1647, 1646, 1647, 1647, 1646, 1647, 1647,
- 1646, 1647, 1647, 1646, 1647, 1647, 1646, 1646,
-
- 1646, 1646, 1646, 1645, 1646, 1645, 1646, 1645,
- 1646, 1646, 1646, 1646, 1646, 1646, 1645, 1646,
- 1646, 1646, 1646, 1646, 1647, 1648, 1648, 201,
- 201, 1649, 1649, 1650, 1650, 1651, 1652, 1653,
-
- 1654, 1655, 1656, 1655, 1656, 1655, 1656, 1655,
- 1656, 1655, 1656, 1656, 1657, 1656, 1657, 1656,
- 1657, 1656, 1657, 1656, 1657, 1656, 1657, 1656,
- 1657, 1656, 1657, 1656, 1657, 1656, 1657, 1656,
-
- 1657, 1656, 1657, 1655, 1656, 1657, 1656, 1657,
- 1656, 1657, 1656, 1656, 1656, 1656, 1656, 1656,
- 1657, 1657, 1656, 1657, 1657, 1656, 1657, 1657,
- 1656, 1657, 1657, 1656, 1657, 1657, 1656, 1656,
-
- 1656, 1656, 1656, 1655, 1656, 1655, 1656, 1655,
- 1656, 1656, 1656, 1656, 1656, 1656, 1655, 1656,
- 1656, 1656, 1656, 1656, 1657, 1655, 1655, 1657,
- 1657, 1657, 1657, 1658, 1659, 1660, 1661, 1662,
-
- 201, 201, 201, 201, 201, 1663, 1663, 1663,
- 1663, 1663, 1663, 1663, 1663, 1663, 1663, 1663,
- 1663, 1663, 1663, 1663, 1663, 1663, 1663, 1663,
- 1663, 1663, 1663, 1663, 1663, 1663, 1663, 1663,
-
- 1663, 1663, 1663, 1663, 1663, 1663, 1663, 1663,
- 1663, 1663, 1663, 1663, 1663, 1664, 1665, 201,
- 201, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
-
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
-
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 201,
- 1667, 1667, 1668, 1668, 1668, 1668, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
-
- 1670, 1670, 1670, 1670, 1670, 1670, 1670, 1670,
- 1670, 1670, 1670, 1670, 1670, 1670, 1670, 1670,
- 1670, 1670, 1670, 1670, 1670, 1670, 1670, 1670,
- 1671, 1671, 1671, 201, 201, 201, 201, 201,
-
- 1512, 1512, 1512, 1512, 1512, 1512, 1512, 1512,
- 1512, 1512, 1512, 1512, 1512, 1512, 1512, 1512,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
-
- 1519, 1519, 1519, 1519, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672,
- 1672, 1672, 1672, 1672, 1672, 1672, 1672, 1672,
-
- 1673, 1673, 1673, 1673, 1673, 1673, 1673, 1673,
- 1673, 1673, 1673, 1673, 1673, 1673, 1673, 1673,
- 1673, 1673, 1673, 1673, 1673, 1673, 1673, 1673,
- 1673, 1673, 1673, 1673, 1673, 1674, 1674, 201,
-
- 1668, 1668, 1668, 1668, 1668, 1668, 1668, 1668,
- 1668, 1668, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
-
- 1669, 1669, 1669, 1669, 1675, 1675, 1675, 1675,
- 1676, 1676, 1676, 1676, 1676, 1676, 1676, 1676,
- 1677, 1678, 1678, 1678, 1678, 1678, 1678, 1678,
- 1678, 1678, 1678, 1678, 1678, 1678, 1678, 1678,
-
- 1673, 1673, 1673, 1673, 1673, 1673, 1673, 1673,
- 1673, 1673, 1673, 1673, 1673, 1673, 1673, 1673,
- 1673, 1673, 1673, 1673, 1673, 1673, 1673, 1673,
- 1673, 1673, 1673, 1673, 1674, 1674, 1679, 1667,
-
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1678, 1678, 1678, 1678, 1678, 1678, 1678,
- 1678, 1678, 1678, 1678, 1678, 1678, 1678, 1678,
-
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1677, 1677, 1677, 1677,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
-
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 201,
-
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
-
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
-
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1677,
- 1677, 1677, 1677, 1669, 1669, 1669, 1669, 1669,
-
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
-
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1677, 1677,
-
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1669,
- 1669, 1669, 1669, 1669, 1669, 1669, 1669, 1677,
-
- 1681, 1681, 1681, 1681, 1681, 1681, 1681, 1681,
- 1681, 1681, 1681, 1681, 1681, 1681, 1681, 1681,
- 1681, 1681, 1681, 1681, 1681, 1681, 1681, 1681,
- 1681, 1681, 1681, 1681, 1681, 1681, 1681, 1681,
-
- 1681, 1681, 1681, 1681, 1681, 1681, 1681, 1681,
- 1681, 1681, 1681, 1681, 1681, 1681, 1681, 1681,
- 1681, 1681, 1681, 1681, 1681, 1681, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
-
- 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683,
- 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683,
- 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683,
- 1683, 1683, 1683, 1683, 1683, 1683, 1683, 1683,
-
- 1683, 1683, 1683, 1683, 1683, 1683, 1684, 1684,
- 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
- 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
- 1684, 1684, 1684, 1684, 1685, 1685, 1685, 1685,
-
- 1685, 1685, 1685, 1685, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1687, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690,
- 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690,
- 1690, 1690, 1690, 1690, 1690, 1691, 1690, 1690,
- 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690,
-
- 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690,
- 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690,
- 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690,
- 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690,
-
- 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690,
- 1690, 1690, 1690, 1690, 1690, 201, 201, 201,
- 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692,
- 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692,
-
- 1692, 1692, 1693, 1693, 1692, 1692, 1692, 1692,
- 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692,
- 1692, 1692, 1692, 1692, 1693, 1692, 1692, 1692,
- 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692,
-
- 1692, 1693, 1692, 1692, 1692, 1693, 1692, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694,
- 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694,
-
- 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694,
- 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694,
- 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694,
- 1695, 1695, 1695, 1695, 1695, 1695, 1696, 1697,
-
- 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
- 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
- 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
- 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
-
- 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
- 1698, 1698, 1698, 1698, 1699, 1700, 1701, 1702,
- 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
- 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
-
- 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710,
- 1711, 1712, 1698, 1698, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 280, 281, 280, 281, 280, 281, 280, 281,
- 280, 281, 280, 281, 280, 281, 280, 281,
- 280, 281, 280, 281, 280, 281, 280, 281,
- 280, 281, 280, 281, 280, 281, 280, 281,
-
- 284, 285, 280, 281, 280, 281, 280, 281,
- 280, 281, 280, 281, 280, 281, 1713, 266,
- 1714, 1714, 1714, 1715, 1716, 1716, 1716, 1716,
- 1716, 1716, 1716, 1716, 266, 266, 1715, 1717,
-
- 280, 281, 280, 281, 280, 281, 280, 281,
- 280, 281, 280, 281, 280, 281, 280, 281,
- 280, 281, 280, 281, 280, 281, 280, 281,
- 286, 287, 286, 287, 1718, 1718, 1719, 1716,
-
- 1720, 1720, 1720, 1720, 1720, 1720, 1720, 1720,
- 1720, 1720, 1720, 1720, 1720, 1720, 1720, 1720,
- 1720, 1720, 1720, 1720, 1720, 1720, 1720, 1720,
- 1720, 1720, 1720, 1720, 1720, 1720, 1720, 1720,
-
- 1720, 1720, 1720, 1720, 1720, 1720, 1721, 1721,
- 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
- 1722, 1722, 1723, 1724, 1725, 1725, 1725, 1724,
- 201, 201, 201, 201, 201, 201, 201, 201,
+ 1726, 1726, 1726, 1726, 1726, 1726, 1726, 1726,
+ 1726, 1726, 1726, 1726, 1726, 1726, 1726, 1726,
+ 1726, 1726, 1726, 1726, 1726, 1727, 1726, 1726,
+ 1726, 1726, 1726, 1726, 1726, 1726, 1726, 1726,
1726, 1726, 1726, 1726, 1726, 1726, 1726, 1726,
1726, 1726, 1726, 1726, 1726, 1726, 1726, 1726,
- 1726, 1726, 1726, 1726, 1726, 1726, 1726, 1727,
- 1727, 1727, 1727, 1610, 1610, 1610, 1610, 1610,
-
- 1728, 1728, 1216, 1217, 1216, 1217, 1216, 1217,
- 1216, 1217, 1216, 1217, 1216, 1217, 1216, 1217,
- 1214, 1214, 1216, 1217, 1216, 1217, 1216, 1217,
- 1216, 1217, 1216, 1217, 1216, 1217, 1216, 1217,
-
- 1216, 1217, 1216, 1217, 1216, 1217, 1216, 1217,
- 1216, 1217, 1216, 1217, 1216, 1217, 1216, 1217,
- 1216, 1217, 1216, 1217, 1216, 1217, 1216, 1217,
- 1216, 1217, 1216, 1217, 1216, 1217, 1216, 1217,
-
- 1216, 1217, 1216, 1217, 1216, 1217, 1216, 1217,
- 1216, 1217, 1216, 1217, 1216, 1217, 1216, 1217,
- 1577, 1214, 1214, 1214, 1214, 1214, 1214, 1214,
- 1214, 1216, 1217, 1216, 1217, 1729, 1216, 1217,
-
- 1216, 1217, 1216, 1217, 1216, 1217, 1216, 1217,
- 1610, 1730, 1730, 1216, 1217, 1731, 1732, 1733,
- 1734, 1735, 1736, 1737, 1738, 1738, 1739, 1740,
- 1739, 1740, 1739, 1740, 1739, 1740, 1739, 1740,
-
- 1734, 1735, 1734, 1735, 1734, 1735, 1734, 1735,
- 1734, 1735, 1741, 1742, 1743, 1744, 1745, 201,
- 1746, 1747, 1748, 1749, 1750, 1751, 1750, 1751,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 1752,
- 1753, 1753, 1732, 1754, 1754, 1754, 1754, 1754,
-
- 1755, 1755, 1756, 1755, 1755, 1755, 1757, 1755,
- 1755, 1755, 1755, 1756, 1755, 1755, 1755, 1755,
- 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755,
- 1755, 1755, 1755, 1755, 1755, 1755, 1755, 1755,
-
- 1755, 1755, 1755, 1758, 1758, 1756, 1756, 1758,
- 1759, 1759, 1759, 1759, 201, 201, 201, 201,
- 1676, 1676, 1676, 1676, 1676, 1676, 796, 796,
- 1407, 1760, 201, 201, 201, 201, 201, 201,
-
- 1761, 1761, 1761, 1761, 1761, 1761, 1761, 1761,
- 1761, 1761, 1761, 1761, 1761, 1761, 1761, 1761,
- 1761, 1761, 1761, 1761, 1761, 1761, 1761, 1761,
- 1761, 1761, 1761, 1761, 1761, 1761, 1761, 1761,
-
- 1761, 1761, 1761, 1761, 1761, 1761, 1761, 1761,
- 1761, 1761, 1761, 1761, 1761, 1761, 1761, 1761,
- 1761, 1761, 1762, 1763, 1764, 1764, 1765, 1765,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1766, 1766, 1767, 1767, 1767, 1767, 1767, 1767,
- 1767, 1767, 1767, 1767, 1767, 1767, 1767, 1767,
- 1767, 1767, 1767, 1767, 1767, 1767, 1767, 1767,
- 1767, 1767, 1767, 1767, 1767, 1767, 1767, 1767,
-
- 1767, 1767, 1767, 1767, 1767, 1767, 1767, 1767,
- 1767, 1767, 1767, 1767, 1767, 1767, 1767, 1767,
- 1767, 1767, 1767, 1767, 1766, 1766, 1766, 1766,
- 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
-
- 1766, 1766, 1766, 1766, 1768, 1769, 201, 201,
- 201, 201, 201, 201, 201, 201, 1770, 1770,
- 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778,
- 1779, 1780, 201, 201, 201, 201, 201, 201,
-
- 1781, 1781, 1781, 1781, 1781, 1781, 1781, 1781,
- 1781, 1781, 1781, 1781, 1781, 1781, 1781, 1781,
- 1781, 1781, 501, 501, 501, 501, 501, 501,
- 1782, 1782, 1782, 501, 1783, 1784, 201, 201,
-
- 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792,
- 1793, 1794, 1795, 1795, 1795, 1795, 1795, 1795,
- 1795, 1795, 1795, 1795, 1795, 1795, 1795, 1795,
- 1795, 1795, 1795, 1795, 1795, 1795, 1795, 1795,
-
- 1795, 1795, 1795, 1795, 1795, 1795, 1796, 1796,
- 1796, 1796, 1796, 1797, 1797, 1797, 1798, 1799,
+ 1726, 1726, 1726, 1726, 1726, 1726, 1726, 1726,
+ 1726, 1726, 1726, 1726, 1726, 1726, 1726, 1726,
+
+ 1726, 1726, 1726, 1726, 1726, 1726, 1726, 1726,
+ 1726, 1726, 1726, 1726, 1726, 202, 202, 202,
+ 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728,
+ 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728,
+
+ 1728, 1728, 1729, 1729, 1728, 1728, 1728, 1728,
+ 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728,
+ 1728, 1728, 1728, 1728, 1729, 1728, 1728, 1728,
+ 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728,
+
+ 1728, 1729, 1728, 1728, 1728, 1729, 1728, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 1730, 1730, 1730, 1730, 1730, 1730, 1730, 1730,
+ 1730, 1730, 1730, 1730, 1730, 1730, 1730, 1730,
+
+ 1730, 1730, 1730, 1730, 1730, 1730, 1730, 1730,
+ 1730, 1730, 1730, 1730, 1730, 1730, 1730, 1730,
+ 1730, 1730, 1730, 1730, 1730, 1730, 1730, 1730,
+ 1731, 1731, 1731, 1731, 1731, 1731, 1732, 1733,
+
+ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734,
+ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734,
+ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734,
+ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734,
+
+ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734,
+ 1734, 1734, 1734, 1734, 1735, 1736, 1737, 1738,
+ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734,
+ 1734, 1734, 1734, 1734, 1734, 1734, 1734, 1734,
+
+ 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746,
+ 1747, 1748, 1734, 1734, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 281, 282, 281, 282, 281, 282, 281, 282,
+ 281, 282, 281, 282, 281, 282, 281, 282,
+ 281, 282, 281, 282, 281, 282, 281, 282,
+ 281, 282, 281, 282, 281, 282, 281, 282,
+
+ 285, 286, 281, 282, 281, 282, 281, 282,
+ 281, 282, 281, 282, 281, 282, 1749, 267,
+ 1750, 1750, 1750, 1751, 1752, 1752, 1752, 1752,
+ 1752, 1752, 1752, 1752, 267, 267, 1751, 1753,
+
+ 281, 282, 281, 282, 281, 282, 281, 282,
+ 281, 282, 281, 282, 281, 282, 281, 282,
+ 281, 282, 281, 282, 281, 282, 281, 282,
+ 287, 288, 287, 288, 1754, 1754, 1755, 1752,
+
+ 1756, 1756, 1756, 1756, 1756, 1756, 1756, 1756,
+ 1756, 1756, 1756, 1756, 1756, 1756, 1756, 1756,
+ 1756, 1756, 1756, 1756, 1756, 1756, 1756, 1756,
+ 1756, 1756, 1756, 1756, 1756, 1756, 1756, 1756,
+
+ 1756, 1756, 1756, 1756, 1756, 1756, 1757, 1757,
+ 1757, 1757, 1757, 1757, 1757, 1757, 1757, 1757,
+ 1758, 1758, 1759, 1760, 1761, 1761, 1761, 1760,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 1762, 1762, 1762, 1762, 1762, 1762, 1762, 1762,
+ 1762, 1762, 1762, 1762, 1762, 1762, 1762, 1762,
+ 1762, 1762, 1762, 1762, 1762, 1762, 1762, 1763,
+ 1763, 1763, 1763, 1640, 1640, 1640, 1640, 1640,
+
+ 1764, 1764, 1233, 1234, 1233, 1234, 1233, 1234,
+ 1233, 1234, 1233, 1234, 1233, 1234, 1233, 1234,
+ 1231, 1231, 1233, 1234, 1233, 1234, 1233, 1234,
+ 1233, 1234, 1233, 1234, 1233, 1234, 1233, 1234,
+
+ 1233, 1234, 1233, 1234, 1233, 1234, 1233, 1234,
+ 1233, 1234, 1233, 1234, 1233, 1234, 1233, 1234,
+ 1233, 1234, 1233, 1234, 1233, 1234, 1233, 1234,
+ 1233, 1234, 1233, 1234, 1233, 1234, 1233, 1234,
+
+ 1233, 1234, 1233, 1234, 1233, 1234, 1233, 1234,
+ 1233, 1234, 1233, 1234, 1233, 1234, 1233, 1234,
+ 1607, 1231, 1231, 1231, 1231, 1231, 1231, 1231,
+ 1231, 1233, 1234, 1233, 1234, 1765, 1233, 1234,
+
+ 1233, 1234, 1233, 1234, 1233, 1234, 1233, 1234,
+ 1640, 1766, 1766, 1233, 1234, 1767, 1768, 1769,
+ 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777,
+ 1776, 1777, 1776, 1777, 1776, 1777, 1776, 1777,
+
+ 1770, 1771, 1770, 1771, 1770, 1771, 1770, 1771,
+ 1770, 1771, 1778, 1779, 1780, 1781, 1782, 1783,
+ 1784, 1785, 1786, 1787, 1788, 1789, 1788, 1789,
+ 1790, 1791, 1792, 1793, 1792, 1793, 1792, 1793,
+
+ 202, 202, 1792, 1793, 1794, 1795, 1796, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 1797,
+ 1798, 1798, 1768, 1799, 1799, 1799, 1799, 1799,
+
+ 1800, 1800, 1801, 1800, 1800, 1800, 1802, 1800,
+ 1800, 1800, 1800, 1801, 1800, 1800, 1800, 1800,
1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800,
1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800,
- 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1801,
- 1801, 1801, 1801, 1801, 1801, 1801, 1801, 1801,
- 1801, 1801, 1802, 1803, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 1804,
-
- 846, 846, 846, 846, 846, 846, 846, 846,
- 846, 846, 846, 846, 846, 846, 846, 846,
- 846, 846, 846, 846, 846, 846, 846, 846,
- 846, 846, 846, 846, 846, 201, 201, 201,
-
- 1805, 1805, 1805, 1806, 1807, 1807, 1807, 1807,
- 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807,
- 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807,
- 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807,
-
- 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807,
- 1807, 1807, 1807, 1807, 1807, 1807, 1807, 1807,
- 1807, 1807, 1807, 1808, 1806, 1806, 1805, 1805,
- 1805, 1805, 1806, 1806, 1805, 1806, 1806, 1806,
-
- 1809, 1810, 1810, 1810, 1810, 1810, 1810, 1811,
- 1812, 1812, 1810, 1810, 1810, 1810, 201, 1813,
- 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821,
- 1822, 1823, 201, 201, 201, 201, 1810, 1810,
-
- 1824, 1824, 1824, 1824, 1824, 1825, 1826, 1824,
- 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
- 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834,
- 1835, 1836, 1824, 1824, 1824, 1824, 1824, 201,
-
- 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
- 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
- 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
- 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
-
- 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
- 1837, 1838, 1838, 1838, 1838, 1838, 1838, 1839,
- 1839, 1838, 1838, 1839, 1839, 1838, 1838, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1837, 1837, 1837, 1838, 1837, 1837, 1837, 1837,
- 1837, 1837, 1837, 1837, 1838, 1839, 201, 201,
- 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847,
- 1848, 1849, 201, 201, 1850, 1851, 1851, 1851,
-
- 1852, 1852, 1852, 1852, 1852, 1852, 1852, 1852,
- 1852, 1852, 1852, 1852, 1852, 1852, 1852, 1852,
- 1853, 1852, 1852, 1852, 1852, 1852, 1852, 1854,
- 1854, 1854, 1852, 834, 1825, 1855, 1824, 1824,
-
- 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856,
- 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856,
- 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856,
- 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856,
-
- 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856,
- 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856,
- 1857, 1856, 1857, 1857, 1858, 1856, 1856, 1857,
- 1857, 1856, 1856, 1856, 1856, 1856, 1857, 1857,
-
- 1856, 1857, 1856, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 1856, 1856, 1859, 1860, 1860,
-
- 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861,
- 1861, 1861, 1861, 1862, 1863, 1863, 1862, 1862,
- 1864, 1864, 1861, 1865, 1865, 1862, 1866, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 1867, 1867, 1867, 1867, 1867, 1867, 201,
- 201, 1867, 1867, 1867, 1867, 1867, 1867, 201,
- 201, 1867, 1867, 1867, 1867, 1867, 1867, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1867, 1867, 1867, 1867, 1867, 1867, 1867, 201,
- 1867, 1867, 1867, 1867, 1867, 1867, 1867, 201,
- 1738, 1738, 1738, 1738, 1738, 1738, 1738, 1738,
- 1738, 1738, 1738, 1738, 1738, 1738, 1738, 1738,
-
- 1738, 1738, 1738, 1738, 1738, 1738, 1738, 1738,
- 1738, 1738, 1738, 1738, 1738, 1738, 1738, 1738,
- 1738, 1738, 1738, 1868, 1738, 1738, 1738, 1738,
- 1738, 1738, 1738, 1869, 1870, 1870, 1870, 1870,
-
- 1871, 1871, 1871, 1871, 1738, 1872, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880,
- 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888,
-
- 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896,
- 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904,
- 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912,
- 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920,
-
+ 1800, 1800, 1800, 1803, 1803, 1801, 1801, 1803,
+ 1804, 1804, 1804, 1804, 202, 202, 202, 202,
+ 1710, 1710, 1710, 1710, 1710, 1710, 810, 810,
+ 1424, 1805, 202, 202, 202, 202, 202, 202,
+
+ 1806, 1806, 1806, 1806, 1806, 1806, 1806, 1806,
+ 1806, 1806, 1806, 1806, 1806, 1806, 1806, 1806,
+ 1806, 1806, 1806, 1806, 1806, 1806, 1806, 1806,
+ 1806, 1806, 1806, 1806, 1806, 1806, 1806, 1806,
+
+ 1806, 1806, 1806, 1806, 1806, 1806, 1806, 1806,
+ 1806, 1806, 1806, 1806, 1806, 1806, 1806, 1806,
+ 1806, 1806, 1807, 1808, 1809, 1809, 1810, 1810,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 1811, 1811, 1812, 1812, 1812, 1812, 1812, 1812,
+ 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812,
+ 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812,
+ 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812,
+
+ 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812,
+ 1812, 1812, 1812, 1812, 1812, 1812, 1812, 1812,
+ 1812, 1812, 1812, 1812, 1811, 1811, 1811, 1811,
+ 1811, 1811, 1811, 1811, 1811, 1811, 1811, 1811,
+
+ 1811, 1811, 1811, 1811, 1813, 1814, 202, 202,
+ 202, 202, 202, 202, 202, 202, 1815, 1815,
+ 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823,
+ 1824, 1825, 202, 202, 202, 202, 202, 202,
+
+ 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826,
+ 1826, 1826, 1826, 1826, 1826, 1826, 1826, 1826,
+ 1826, 1826, 508, 508, 508, 508, 508, 508,
+ 1827, 1827, 1827, 508, 1828, 1829, 1830, 1831,
+
+ 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839,
+ 1840, 1841, 1842, 1842, 1842, 1842, 1842, 1842,
+ 1842, 1842, 1842, 1842, 1842, 1842, 1842, 1842,
+ 1842, 1842, 1842, 1842, 1842, 1842, 1842, 1842,
+
+ 1842, 1842, 1842, 1842, 1842, 1842, 1843, 1843,
+ 1843, 1843, 1843, 1844, 1844, 1844, 1845, 1846,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1849, 1850, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 1851,
+
+ 860, 860, 860, 860, 860, 860, 860, 860,
+ 860, 860, 860, 860, 860, 860, 860, 860,
+ 860, 860, 860, 860, 860, 860, 860, 860,
+ 860, 860, 860, 860, 860, 202, 202, 202,
+
+ 1852, 1852, 1852, 1853, 1854, 1854, 1854, 1854,
+ 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854,
+ 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854,
+ 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854,
+
+ 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854,
+ 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854,
+ 1854, 1854, 1854, 1855, 1853, 1853, 1852, 1852,
+ 1852, 1852, 1853, 1853, 1852, 1852, 1853, 1853,
+
+ 1856, 1857, 1857, 1857, 1857, 1857, 1857, 1858,
+ 1859, 1859, 1857, 1857, 1857, 1857, 202, 1860,
+ 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868,
+ 1869, 1870, 202, 202, 202, 202, 1857, 1857,
+
+ 1871, 1871, 1871, 1871, 1871, 1872, 1873, 1871,
+ 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871,
+ 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881,
+ 1882, 1883, 1871, 1871, 1871, 1871, 1871, 202,
+
+ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
+ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
+ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
+ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
+
+ 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884,
+ 1884, 1885, 1885, 1885, 1885, 1885, 1885, 1886,
+ 1886, 1885, 1885, 1886, 1886, 1885, 1885, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 1884, 1884, 1884, 1885, 1884, 1884, 1884, 1884,
+ 1884, 1884, 1884, 1884, 1885, 1886, 202, 202,
+ 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894,
+ 1895, 1896, 202, 202, 1897, 1898, 1898, 1898,
+
+ 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899,
+ 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899,
+ 1900, 1899, 1899, 1899, 1899, 1899, 1899, 1901,
+ 1901, 1901, 1899, 848, 1872, 1902, 1871, 1871,
+
+ 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903,
+ 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903,
+ 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903,
+ 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903,
+
+ 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903,
+ 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903,
+ 1904, 1903, 1904, 1904, 1905, 1903, 1903, 1904,
+ 1904, 1903, 1903, 1903, 1903, 1903, 1904, 1904,
+
+ 1903, 1904, 1903, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 1903, 1903, 1906, 1907, 1907,
+
+ 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908,
+ 1908, 1908, 1908, 1909, 1910, 1910, 1909, 1909,
+ 1911, 1911, 1908, 1912, 1912, 1909, 1913, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 1914, 1914, 1914, 1914, 1914, 1914, 202,
+ 202, 1914, 1914, 1914, 1914, 1914, 1914, 202,
+ 202, 1914, 1914, 1914, 1914, 1914, 1914, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 1914, 1914, 1914, 1914, 1914, 1914, 1914, 202,
+ 1914, 1914, 1914, 1914, 1914, 1914, 1914, 202,
+ 1775, 1775, 1775, 1775, 1775, 1775, 1775, 1775,
+ 1775, 1775, 1775, 1775, 1775, 1775, 1775, 1775,
+
+ 1775, 1775, 1775, 1775, 1775, 1775, 1775, 1775,
+ 1775, 1775, 1775, 1775, 1775, 1775, 1775, 1775,
+ 1775, 1775, 1775, 1915, 1775, 1775, 1775, 1775,
+ 1775, 1775, 1775, 1916, 1917, 1917, 1917, 1917,
+
+ 1918, 1918, 1918, 1918, 1775, 1919, 1920, 1920,
+ 202, 202, 202, 202, 202, 202, 202, 202,
1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928,
1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936,
+
1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944,
1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952,
-
- 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953,
- 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953,
- 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953,
- 1953, 1953, 1953, 1953, 1953, 1953, 1953, 1953,
-
- 1953, 1953, 1953, 1954, 1954, 1955, 1954, 1954,
- 1955, 1954, 1954, 1956, 1954, 1957, 201, 201,
- 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965,
- 1966, 1967, 201, 201, 201, 201, 201, 201,
-
- 1968, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1968, 1969, 1969, 1969,
-
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1968, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
-
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1968, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
-
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1968, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
-
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1968, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
-
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1968, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
-
- 1969, 1969, 1969, 1969, 1968, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
- 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969,
-
- 1969, 1969, 1969, 1969, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 849, 849, 849, 849, 849, 849, 849, 849,
- 849, 849, 849, 849, 849, 849, 849, 849,
-
- 849, 849, 849, 849, 849, 849, 849, 201,
- 201, 201, 201, 852, 852, 852, 852, 852,
- 852, 852, 852, 852, 852, 852, 852, 852,
- 852, 852, 852, 852, 852, 852, 852, 852,
-
- 852, 852, 852, 852, 852, 852, 852, 852,
- 852, 852, 852, 852, 852, 852, 852, 852,
- 852, 852, 852, 852, 852, 852, 852, 852,
- 852, 852, 852, 852, 201, 201, 201, 201,
-
- 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970,
- 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970,
- 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970,
- 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970,
-
- 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
- 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
- 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
- 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971,
-
- 1972, 1972, 1972, 1972, 1972, 1972, 1972, 1972,
- 1972, 1972, 1972, 1972, 1972, 1972, 1972, 1972,
- 1972, 1972, 1972, 1972, 1972, 1972, 1972, 1972,
- 1972, 1972, 1972, 1972, 1972, 1972, 1972, 1972,
-
- 1972, 1972, 1972, 1972, 1972, 1972, 1972, 1972,
- 1972, 1972, 1972, 1972, 1972, 1972, 1683, 1683,
- 1972, 1683, 1972, 1683, 1683, 1972, 1972, 1972,
- 1972, 1972, 1972, 1972, 1972, 1972, 1972, 1683,
-
- 1972, 1683, 1972, 1683, 1683, 1972, 1972, 1683,
- 1683, 1683, 1972, 1972, 1972, 1972, 1973, 1973,
- 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974,
- 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974,
-
- 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974,
- 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974,
- 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974,
- 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974,
-
- 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974,
- 1974, 1974, 1974, 1975, 1975, 1975, 1682, 1682,
- 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976,
- 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976,
-
- 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976,
- 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976,
- 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976,
- 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976,
-
- 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976,
- 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976,
- 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976,
- 1976, 1976, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1977, 1978, 1979, 1980, 1981, 1982, 1982, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 1983, 1984, 1985, 1986, 1987,
- 201, 201, 201, 201, 201, 1988, 1989, 1990,
-
- 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991,
- 1991, 1992, 1990, 1990, 1990, 1990, 1990, 1990,
- 1990, 1990, 1990, 1990, 1990, 1990, 1990, 298,
- 1990, 1990, 1990, 1990, 1990, 298, 1990, 298,
-
- 1990, 1990, 298, 1990, 1990, 298, 1990, 1990,
- 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1991,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
-
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
-
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1994, 1994, 1994, 1994, 1994, 1994,
- 1994, 1994, 1994, 1994, 1994, 1994, 1994, 1994,
-
- 1994, 1994, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
-
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1632, 1345,
-
- 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
-
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 344, 344, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
-
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995,
- 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995,
-
- 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995,
- 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1996, 336, 344, 344,
-
- 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997,
- 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2003, 2004,
- 2005, 2006, 201, 201, 201, 201, 201, 201,
-
- 172, 172, 172, 172, 1198, 1198, 1198, 1089,
- 1089, 1089, 1089, 1089, 1089, 1089, 1719, 1719,
- 2007, 2008, 2008, 2009, 2009, 2010, 2011, 2010,
- 2011, 2010, 2011, 2010, 2011, 2010, 2011, 2010,
-
- 2011, 2010, 2011, 2010, 2011, 1644, 1644, 2012,
- 2013, 2007, 2007, 2007, 2007, 2009, 2009, 2009,
- 2014, 2015, 2016, 201, 2017, 2018, 2019, 2019,
- 2008, 1398, 1399, 1398, 1399, 1398, 1399, 2020,
-
- 2007, 2007, 2021, 2022, 2023, 2024, 2025, 201,
- 2007, 1401, 1359, 2007, 201, 201, 201, 201,
- 1993, 1993, 1993, 2026, 1993, 344, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
-
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993,
- 1993, 1993, 1993, 1993, 1993, 344, 344, 2027,
-
- 201, 2019, 2007, 2020, 1401, 1359, 2007, 2028,
- 1398, 1399, 2007, 2021, 2014, 2022, 2016, 2029,
- 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037,
- 2038, 2039, 2018, 2017, 2040, 2025, 2041, 2019,
-
- 2007, 2042, 2042, 2042, 2042, 2042, 2042, 2042,
- 2042, 2042, 2042, 2042, 2042, 2042, 2042, 2042,
+ 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960,
+ 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968,
+
+ 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976,
+ 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984,
+ 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992,
+ 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+
+ 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001,
+ 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001,
+ 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001,
+ 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001,
+
+ 2001, 2001, 2001, 2002, 2002, 2003, 2002, 2002,
+ 2003, 2002, 2002, 2004, 2002, 2005, 202, 202,
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
+ 2014, 2015, 202, 202, 202, 202, 202, 202,
+
+ 2016, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2016, 2017, 2017, 2017,
+
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2016, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2016, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2016, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2016, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2016, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+
+ 2017, 2017, 2017, 2017, 2016, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+ 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+
+ 2017, 2017, 2017, 2017, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 863, 863, 863, 863, 863, 863, 863, 863,
+ 863, 863, 863, 863, 863, 863, 863, 863,
+
+ 863, 863, 863, 863, 863, 863, 863, 202,
+ 202, 202, 202, 866, 866, 866, 866, 866,
+ 866, 866, 866, 866, 866, 866, 866, 866,
+ 866, 866, 866, 866, 866, 866, 866, 866,
+
+ 866, 866, 866, 866, 866, 866, 866, 866,
+ 866, 866, 866, 866, 866, 866, 866, 866,
+ 866, 866, 866, 866, 866, 866, 866, 866,
+ 866, 866, 866, 866, 202, 202, 202, 202,
+
+ 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,
+ 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,
+ 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,
+ 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,
+
+ 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019,
+ 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019,
+ 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019,
+ 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019,
+
+ 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020,
+ 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020,
+ 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020,
+ 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020,
+
+ 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020,
+ 2020, 2020, 2020, 2020, 2020, 2020, 1718, 1718,
+ 2020, 1718, 2020, 1718, 1718, 2020, 2020, 2020,
+ 2020, 2020, 2020, 2020, 2020, 2020, 2020, 1718,
+
+ 2020, 1718, 2020, 1718, 1718, 2020, 2020, 1718,
+ 1718, 1718, 2020, 2020, 2020, 2020, 2021, 2021,
+ 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022,
+ 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022,
+
+ 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022,
+ 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022,
+ 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022,
+ 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022,
+
+ 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022,
+ 2022, 2022, 2022, 2023, 2023, 2023, 1717, 1717,
+ 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024,
+ 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024,
+
+ 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024,
+ 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024,
+ 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024,
+ 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024,
+
+ 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024,
+ 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024,
+ 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024,
+ 2024, 2024, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 2025, 2026, 2027, 2028, 2029, 2030, 2030, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 2031, 2032, 2033, 2034, 2035,
+ 202, 202, 202, 202, 202, 2036, 2037, 2038,
+
+ 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2039,
+ 2039, 2040, 2038, 2038, 2038, 2038, 2038, 2038,
+ 2038, 2038, 2038, 2038, 2038, 2038, 2038, 301,
+ 2038, 2038, 2038, 2038, 2038, 301, 2038, 301,
+
+ 2038, 2038, 301, 2038, 2038, 301, 2038, 2038,
+ 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2039,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2042, 2042, 2042, 2042, 2042, 2042,
2042, 2042, 2042, 2042, 2042, 2042, 2042, 2042,
- 2042, 2042, 2042, 2043, 2007, 2044, 2045, 2009,
-
- 2045, 2046, 2046, 2046, 2046, 2046, 2046, 2046,
- 2046, 2046, 2046, 2046, 2046, 2046, 2046, 2046,
- 2046, 2046, 2046, 2046, 2046, 2046, 2046, 2046,
- 2046, 2046, 2046, 2043, 2025, 2044, 2025, 2047,
-
- 2048, 2049, 1398, 1399, 2050, 2051, 2052, 2053,
- 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053,
- 2054, 2052, 2052, 2052, 2052, 2052, 2052, 2052,
- 2052, 2052, 2052, 2052, 2052, 2052, 2052, 2052,
-
- 2052, 2052, 2052, 2052, 2052, 2052, 2052, 2052,
- 2052, 2052, 2052, 2052, 2052, 2052, 2052, 2052,
- 2052, 2052, 2052, 2052, 2052, 2052, 2052, 2052,
- 2052, 2052, 2052, 2052, 2052, 2052, 2055, 2055,
-
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 1666,
- 1666, 1666, 1666, 1666, 1666, 1666, 1666, 201,
-
- 201, 201, 1666, 1666, 1666, 1666, 1666, 1666,
- 201, 201, 1666, 1666, 1666, 1666, 1666, 1666,
- 201, 201, 1666, 1666, 1666, 1666, 1666, 1666,
- 201, 201, 1666, 1666, 1666, 201, 201, 201,
-
- 2056, 1401, 2025, 2045, 1640, 1401, 1401, 201,
- 1422, 1397, 1397, 1397, 1397, 1422, 1422, 201,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 2057, 2057, 2057, 2058, 51, 2059, 2059,
-
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 201, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
-
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 201,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 201, 2060, 2060, 201, 2060,
-
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 201, 201,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 201, 201,
-
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
-
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 2060, 2060, 2060, 2060, 2060,
- 2060, 2060, 2060, 201, 201, 201, 201, 201,
-
- 2061, 2062, 2061, 201, 201, 201, 201, 2063,
- 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063,
- 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063,
- 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063,
-
- 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063,
- 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063,
- 2063, 2063, 2063, 2063, 201, 201, 201, 2064,
- 2064, 2064, 2064, 2064, 2064, 2064, 2064, 2064,
-
- 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065,
- 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065,
- 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065,
- 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065,
-
- 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065,
- 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065,
- 2065, 2065, 2065, 2065, 2065, 2066, 2066, 2066,
- 2066, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
-
- 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
- 2067, 2067, 2066, 2068, 2069, 2070, 2070, 201,
- 1516, 1516, 1516, 1516, 1516, 1516, 1516, 1516,
- 1516, 1516, 1516, 1516, 201, 201, 201, 201,
-
- 2069, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444,
- 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444,
-
- 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444,
- 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444,
- 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444,
- 1444, 1444, 1444, 1444, 1444, 1201, 201, 201,
-
- 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071,
- 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071,
- 2071, 2071, 2071, 2071, 2071, 2071, 2071, 2071,
- 2071, 2071, 2071, 2071, 2071, 201, 201, 201,
-
- 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072,
- 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072,
- 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072,
- 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072,
-
- 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072,
- 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072,
- 2072, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1089, 2073, 2073, 2073, 2073, 2073, 2073, 2073,
- 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073,
- 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073,
- 2073, 2073, 2073, 2073, 201, 201, 201, 201,
-
- 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074,
- 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074,
- 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074,
- 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2075,
-
- 2076, 2076, 2076, 2076, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 2077, 2077, 2077,
- 2078, 2078, 2078, 2078, 2078, 2078, 2078, 2078,
- 2078, 2078, 2078, 2078, 2078, 2078, 2078, 2078,
-
- 2078, 2079, 2078, 2078, 2078, 2078, 2078, 2078,
- 2078, 2078, 2079, 201, 201, 201, 201, 201,
- 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080,
- 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080,
-
- 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080,
- 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080,
- 2080, 2080, 2080, 2080, 2080, 2080, 2081, 2081,
- 2081, 2081, 2081, 201, 201, 201, 201, 201,
-
- 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082,
- 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082,
- 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082,
- 2082, 2082, 2082, 2082, 2082, 2082, 201, 2083,
-
- 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084,
- 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084,
- 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084,
- 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084,
-
- 2084, 2084, 2084, 2084, 201, 201, 201, 201,
- 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084,
- 2085, 2086, 2086, 2086, 2086, 2086, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
- 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
- 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
- 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
-
- 2087, 2087, 2087, 2087, 2087, 2087, 2088, 2088,
- 2089, 2089, 2089, 2089, 2089, 2089, 2089, 2089,
- 2089, 2089, 2089, 2089, 2089, 2089, 2089, 2089,
- 2089, 2089, 2089, 2089, 2089, 2089, 2089, 2089,
-
- 2089, 2089, 2089, 2089, 2089, 2089, 2089, 2089,
- 2089, 2089, 2089, 2089, 2089, 2089, 2090, 2090,
- 2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
- 2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
-
- 2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
- 2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
- 2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
- 2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091,
-
- 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092,
- 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092,
- 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092,
- 2092, 2092, 2092, 2092, 2092, 2092, 201, 201,
-
- 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100,
- 2101, 2102, 201, 201, 201, 201, 201, 201,
- 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103,
- 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103,
-
- 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103,
- 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103,
- 2103, 2103, 2103, 2103, 201, 201, 201, 201,
- 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
-
- 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
- 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
- 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104,
- 2104, 2104, 2104, 2104, 201, 201, 201, 201,
-
- 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105,
- 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105,
- 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105,
- 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105,
-
- 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106,
- 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106,
-
- 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106,
- 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106,
- 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106,
- 2106, 2106, 2106, 2106, 2106, 2106, 2106, 2106,
-
- 2106, 2106, 2106, 2106, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 2107,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+
+ 2042, 2042, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 1665, 1362,
+
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 348, 348, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
+ 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
+
+ 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
+ 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2044, 340, 348, 348,
+
+ 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045,
+ 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045,
+ 2046, 2047, 2048, 2049, 2050, 2051, 2051, 2052,
+ 2053, 2054, 202, 202, 202, 202, 202, 202,
+
+ 173, 173, 173, 173, 1215, 1215, 1215, 1104,
+ 1104, 1104, 1104, 1104, 1104, 1104, 1755, 1755,
+ 2055, 2056, 2056, 2057, 2057, 2058, 2059, 2058,
+ 2059, 2058, 2059, 2058, 2059, 2058, 2059, 2058,
+
+ 2059, 2058, 2059, 2058, 2059, 1677, 1677, 2060,
+ 2061, 2055, 2055, 2055, 2055, 2057, 2057, 2057,
+ 2062, 2063, 2064, 202, 2065, 2066, 2067, 2067,
+ 2056, 1415, 1416, 1415, 1416, 1415, 1416, 2068,
+
+ 2055, 2055, 2069, 2070, 2071, 2072, 2073, 202,
+ 2055, 1418, 1376, 2055, 202, 202, 202, 202,
+ 2041, 2041, 2041, 2074, 2041, 348, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041,
+ 2041, 2041, 2041, 2041, 2041, 348, 348, 2075,
+
+ 202, 2067, 2055, 2068, 1418, 1376, 2055, 2076,
+ 1415, 1416, 2055, 2069, 2062, 2070, 2064, 2077,
+ 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085,
+ 2086, 2087, 2066, 2065, 2088, 2073, 2089, 2067,
+
+ 2055, 2090, 2090, 2090, 2090, 2090, 2090, 2090,
+ 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090,
+ 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090,
+ 2090, 2090, 2090, 2091, 2055, 2092, 2093, 2057,
+
+ 2093, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
+ 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
+ 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094,
+ 2094, 2094, 2094, 2091, 2073, 2092, 2073, 2095,
+
+ 2096, 2097, 1415, 1416, 2098, 2099, 2100, 2101,
+ 2101, 2101, 2101, 2101, 2101, 2101, 2101, 2101,
+ 2102, 2100, 2100, 2100, 2100, 2100, 2100, 2100,
+ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100,
+
+ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100,
+ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100,
+ 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100,
+ 2100, 2100, 2100, 2100, 2100, 2100, 2103, 2103,
+
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700,
+ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 202,
+
+ 202, 202, 1700, 1700, 1700, 1700, 1700, 1700,
+ 202, 202, 1700, 1700, 1700, 1700, 1700, 1700,
+ 202, 202, 1700, 1700, 1700, 1700, 1700, 1700,
+ 202, 202, 1700, 1700, 1700, 202, 202, 202,
+
+ 2104, 1418, 2073, 2093, 1673, 1418, 1418, 202,
+ 1439, 1414, 1414, 1414, 1414, 1439, 1439, 202,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 2105, 2105, 2105, 2106, 51, 2107, 2107,
2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
+ 2108, 2108, 2108, 2108, 202, 2108, 2108, 2108,
2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
+
+ 2108, 2108, 2108, 2108, 2108, 2108, 2108, 202,
+ 2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
+ 2108, 2108, 2108, 202, 2108, 2108, 202, 2108,
2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
+ 2108, 2108, 2108, 2108, 2108, 2108, 202, 202,
2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
- 2108, 2108, 2108, 2108, 2108, 2108, 2108, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+ 2108, 2108, 2108, 2108, 2108, 2108, 202, 202,
2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
- 2108, 2108, 2108, 2108, 2108, 2108, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+ 2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
+ 2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2109, 2109, 2109, 2109, 2109, 2109, 298, 298,
- 2109, 298, 2109, 2109, 2109, 2109, 2109, 2109,
- 2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
- 2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
-
- 2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
- 2109, 2109, 2109, 2109, 2109, 2109, 2109, 2109,
- 2109, 2109, 2109, 2109, 2109, 2109, 298, 2109,
- 2109, 298, 298, 298, 2109, 298, 298, 2109,
-
- 2110, 2110, 2110, 2110, 2110, 2110, 2110, 2110,
- 2110, 2110, 2110, 2110, 2110, 2110, 2110, 2110,
- 2110, 2110, 2110, 2110, 2110, 2110, 298, 2111,
+ 2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
+ 2108, 2108, 2108, 2108, 2108, 2108, 2108, 2108,
+ 2108, 2108, 2108, 202, 202, 202, 202, 202,
+
+ 2109, 2110, 2109, 202, 202, 202, 202, 2111,
+ 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111,
+ 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111,
+ 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111,
+
+ 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111,
+ 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111,
+ 2111, 2111, 2111, 2111, 202, 202, 202, 2112,
2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112,
2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113,
2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113,
- 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2114,
+ 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113,
+ 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113,
+
+ 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113,
+ 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113,
+ 2113, 2113, 2113, 2113, 2113, 2114, 2114, 2114,
2114, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
- 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116,
- 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116,
- 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116,
- 2116, 2116, 2116, 2116, 2116, 2116, 2116, 298,
+ 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
+ 2115, 2115, 2114, 2116, 2117, 2118, 2118, 202,
+ 1539, 1539, 1539, 1539, 1539, 1539, 1539, 1539,
+ 1539, 1539, 1539, 1539, 202, 202, 202, 202,
+
+ 2117, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
- 298, 298, 298, 298, 298, 298, 298, 2117,
- 2117, 2117, 2117, 2117, 2117, 2117, 2117, 2117,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461,
+ 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461,
- 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118,
- 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118,
- 2118, 2118, 2118, 298, 2118, 2118, 298, 298,
- 298, 298, 298, 2119, 2119, 2119, 2119, 2119,
+ 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461,
+ 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461,
+ 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461,
+ 1461, 1461, 1461, 1461, 1461, 1218, 202, 202,
+ 2119, 2119, 2119, 2119, 2119, 2119, 2119, 2119,
+ 2119, 2119, 2119, 2119, 2119, 2119, 2119, 2119,
+ 2119, 2119, 2119, 2119, 2119, 2119, 2119, 2119,
+ 2119, 2119, 2119, 2119, 2119, 202, 202, 202,
+
+ 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120,
2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120,
2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120,
- 2120, 2120, 2120, 2120, 2120, 2120, 2121, 2121,
- 2121, 2121, 2122, 2122, 298, 298, 298, 2123,
+ 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120,
+
+ 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120,
+ 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120,
+ 2120, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
- 2124, 2124, 2124, 2124, 2124, 2124, 2124, 2124,
- 2124, 2124, 2124, 2124, 2124, 2124, 2124, 2124,
- 2124, 2124, 2124, 2124, 2124, 2124, 2124, 2124,
- 2124, 2124, 298, 298, 298, 298, 298, 2125,
+ 1104, 2121, 2121, 2121, 2121, 2121, 2121, 2121,
+ 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121,
+ 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121,
+ 2121, 2121, 2121, 2121, 202, 202, 202, 202,
+ 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122,
+ 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122,
+ 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122,
+ 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2123,
+
+ 2124, 2124, 2124, 2124, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 2125, 2125, 2125,
2126, 2126, 2126, 2126, 2126, 2126, 2126, 2126,
2126, 2126, 2126, 2126, 2126, 2126, 2126, 2126,
- 2126, 2126, 2126, 2126, 2126, 2126, 2126, 2126,
- 2126, 2126, 2126, 2126, 2126, 2126, 2126, 2126,
-
- 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127,
- 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127,
- 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127,
- 298, 298, 298, 298, 2128, 2128, 2127, 2127,
+ 2126, 2127, 2126, 2126, 2126, 2126, 2126, 2126,
+ 2126, 2126, 2127, 202, 202, 202, 202, 202,
2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128,
2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128,
- 298, 298, 2128, 2128, 2128, 2128, 2128, 2128,
- 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128,
2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128,
2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128,
- 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128,
- 2128, 2128, 2128, 2128, 2128, 2128, 2128, 2128,
-
- 2129, 2130, 2130, 2130, 298, 2130, 2130, 298,
- 298, 298, 298, 298, 2130, 2131, 2130, 2132,
- 2129, 2129, 2129, 2129, 298, 2129, 2129, 2129,
- 298, 2129, 2129, 2129, 2129, 2129, 2129, 2129,
-
- 2129, 2129, 2129, 2129, 2129, 2129, 2129, 2129,
- 2129, 2129, 2129, 2129, 2129, 2129, 2129, 2129,
- 2129, 2129, 2129, 2129, 298, 298, 298, 298,
- 2132, 2133, 2131, 298, 298, 298, 298, 2134,
-
- 2135, 2136, 2137, 2138, 2139, 2139, 2139, 2139,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 2140, 2140, 2140, 2140, 2140, 2140, 2141, 2141,
- 2142, 298, 298, 298, 298, 298, 298, 298,
-
- 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143,
- 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143,
- 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143,
- 2143, 2143, 2143, 2143, 2143, 2144, 2144, 2145,
-
- 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146,
- 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146,
- 2146, 2146, 2146, 2146, 2146, 2146, 2146, 2146,
- 2146, 2146, 2146, 2146, 2146, 2147, 2147, 2147,
-
- 2148, 2148, 2148, 2148, 2148, 2149, 2150, 2149,
- 2151, 2149, 2149, 2150, 2150, 2152, 2149, 2149,
- 2149, 2149, 2149, 2148, 2148, 2148, 2148, 2152,
- 2148, 2148, 2148, 2148, 2148, 2149, 2148, 2148,
-
- 2148, 2149, 2150, 2150, 2149, 2153, 2154, 298,
- 298, 298, 298, 2155, 2155, 2155, 2155, 2156,
- 2157, 2157, 2157, 2157, 2157, 2157, 2158, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
-
- 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159,
- 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159,
- 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159,
- 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159,
-
- 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159,
- 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159,
- 2159, 2159, 2159, 2159, 2159, 2159, 298, 298,
- 298, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
+ 2128, 2128, 2128, 2128, 2128, 2128, 2129, 2129,
+ 2129, 2129, 2129, 202, 202, 202, 202, 202,
+
+ 2130, 2130, 2130, 2130, 2130, 2130, 2130, 2130,
+ 2130, 2130, 2130, 2130, 2130, 2130, 2130, 2130,
+ 2130, 2130, 2130, 2130, 2130, 2130, 2130, 2130,
+ 2130, 2130, 2130, 2130, 2130, 2130, 202, 2131,
+
+ 2132, 2132, 2132, 2132, 2132, 2132, 2132, 2132,
+ 2132, 2132, 2132, 2132, 2132, 2132, 2132, 2132,
+ 2132, 2132, 2132, 2132, 2132, 2132, 2132, 2132,
+ 2132, 2132, 2132, 2132, 2132, 2132, 2132, 2132,
+
+ 2132, 2132, 2132, 2132, 202, 202, 202, 202,
+ 2132, 2132, 2132, 2132, 2132, 2132, 2132, 2132,
+ 2133, 2134, 2134, 2134, 2134, 2134, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135,
+ 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135,
+ 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135,
+ 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135,
+
+ 2135, 2135, 2135, 2135, 2135, 2135, 2136, 2136,
+ 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137,
+ 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137,
+ 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137,
+
+ 2137, 2137, 2137, 2137, 2137, 2137, 2137, 2137,
+ 2137, 2137, 2137, 2137, 2137, 2137, 2138, 2138,
+ 2139, 2139, 2139, 2139, 2139, 2139, 2139, 2139,
+ 2139, 2139, 2139, 2139, 2139, 2139, 2139, 2139,
+
+ 2139, 2139, 2139, 2139, 2139, 2139, 2139, 2139,
+ 2139, 2139, 2139, 2139, 2139, 2139, 2139, 2139,
+ 2139, 2139, 2139, 2139, 2139, 2139, 2139, 2139,
+ 2139, 2139, 2139, 2139, 2139, 2139, 2139, 2139,
+
+ 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
+ 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
+ 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140,
+ 2140, 2140, 2140, 2140, 2140, 2140, 202, 202,
+
+ 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148,
+ 2149, 2150, 202, 202, 202, 202, 202, 202,
+ 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151,
+ 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151,
+
+ 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151,
+ 2151, 2151, 2151, 2151, 2151, 2151, 2151, 2151,
+ 2151, 2151, 2151, 2151, 202, 202, 202, 202,
+ 2152, 2152, 2152, 2152, 2152, 2152, 2152, 2152,
+
+ 2152, 2152, 2152, 2152, 2152, 2152, 2152, 2152,
+ 2152, 2152, 2152, 2152, 2152, 2152, 2152, 2152,
+ 2152, 2152, 2152, 2152, 2152, 2152, 2152, 2152,
+ 2152, 2152, 2152, 2152, 202, 202, 202, 202,
+
+ 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153,
+ 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153,
+ 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153,
+ 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153,
+
+ 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154,
+ 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154,
+
+ 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154,
+ 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154,
+ 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154,
+ 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154,
+
+ 2154, 2154, 2154, 2154, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 2155,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156,
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156,
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156,
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156,
+
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156,
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156,
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156,
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156,
+ 2156, 2156, 2156, 2156, 2156, 2156, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2157, 2157, 2157, 2157, 2157, 2157, 301, 301,
+ 2157, 301, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2157,
+ 2157, 2157, 2157, 2157, 2157, 2157, 301, 2157,
+ 2157, 301, 301, 301, 2157, 301, 301, 2157,
+
+ 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158,
+ 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158,
+ 2158, 2158, 2158, 2158, 2158, 2158, 301, 2159,
+ 2160, 2160, 2160, 2160, 2160, 2160, 2160, 2160,
2161, 2161, 2161, 2161, 2161, 2161, 2161, 2161,
2161, 2161, 2161, 2161, 2161, 2161, 2161, 2161,
- 2161, 2161, 2161, 2161, 2161, 2161, 298, 298,
- 2162, 2162, 2162, 2162, 2162, 2162, 2162, 2162,
+ 2161, 2161, 2161, 2161, 2161, 2161, 2161, 2162,
+ 2162, 2163, 2163, 2163, 2163, 2163, 2163, 2163,
- 2163, 2163, 2163, 2163, 2163, 2163, 2163, 2163,
- 2163, 2163, 2163, 2163, 2163, 2163, 2163, 2163,
- 2163, 2163, 2163, 298, 298, 298, 298, 298,
2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
+ 2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
+ 2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164,
+ 2164, 2164, 2164, 2164, 2164, 2164, 2164, 301,
- 2165, 2166, 2165, 2166, 2166, 2166, 2165, 2165,
- 2165, 2166, 2165, 2165, 2166, 2165, 2166, 2166,
- 2165, 2166, 298, 298, 298, 298, 298, 298,
- 298, 2167, 2167, 2167, 2167, 298, 298, 298,
-
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 2168, 2168, 2168, 2168, 2169, 2169, 2170,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
+ 301, 301, 301, 301, 301, 301, 301, 2165,
+ 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
- 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
- 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
- 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
- 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
+ 2166, 2166, 2166, 2166, 2166, 2166, 2166, 2166,
+ 2166, 2166, 2166, 2166, 2166, 2166, 2166, 2166,
+ 2166, 2166, 2166, 301, 2166, 2166, 301, 301,
+ 301, 301, 301, 2167, 2167, 2167, 2167, 2167,
- 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171,
- 2171, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
+ 2168, 2168, 2168, 2168, 2168, 2168, 2168, 2168,
+ 2168, 2168, 2168, 2168, 2168, 2168, 2168, 2168,
+ 2168, 2168, 2168, 2168, 2168, 2168, 2169, 2169,
+ 2169, 2169, 2170, 2170, 301, 301, 301, 2171,
2172, 2172, 2172, 2172, 2172, 2172, 2172, 2172,
2172, 2172, 2172, 2172, 2172, 2172, 2172, 2172,
2172, 2172, 2172, 2172, 2172, 2172, 2172, 2172,
- 2172, 2172, 2172, 2172, 2172, 2172, 2172, 2172,
-
- 2172, 2172, 2172, 2172, 2172, 2172, 2172, 2172,
- 2172, 2172, 2172, 2172, 2172, 2172, 2172, 2172,
- 2172, 2172, 2172, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
-
- 2173, 2173, 2173, 2173, 2173, 2173, 2173, 2173,
- 2173, 2173, 2173, 2173, 2173, 2173, 2173, 2173,
- 2173, 2173, 2173, 2173, 2173, 2173, 2173, 2173,
- 2173, 2173, 2173, 2173, 2173, 2173, 2173, 2173,
-
- 2173, 2173, 2173, 2173, 2173, 2173, 2173, 2173,
- 2173, 2173, 2173, 2173, 2173, 2173, 2173, 2173,
- 2173, 2173, 2173, 298, 298, 298, 298, 298,
- 298, 298, 2174, 2174, 2174, 2174, 2174, 2174,
-
- 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182,
- 2183, 2184, 2184, 2184, 2184, 2184, 2184, 2184,
- 2184, 2184, 2184, 2184, 2184, 2184, 2184, 2184,
- 2184, 2184, 2184, 2184, 2184, 2184, 2184, 298,
-
- 2185, 2186, 2185, 2187, 2187, 2187, 2187, 2187,
- 2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
- 2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
- 2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
- 2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
- 2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
- 2187, 2187, 2187, 2187, 2187, 2187, 2187, 2187,
- 2186, 2186, 2186, 2186, 2186, 2186, 2186, 2186,
- 2186, 2186, 2186, 2186, 2186, 2186, 2188, 2189,
- 2189, 2190, 2190, 2190, 2190, 2190, 201, 201,
- 201, 201, 2191, 2192, 2193, 2194, 2195, 2196,
- 2197, 2198, 2199, 2200, 2200, 2200, 2200, 2200,
- 2200, 2200, 2200, 2200, 2200, 2200, 2201, 2202,
- 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 2211,
- 2212, 2212, 2213, 2214, 2214, 2214, 2214, 2214,
- 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
- 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
- 2214, 2214, 2215, 2214, 2215, 2214, 2214, 2214,
+ 2172, 2172, 301, 301, 301, 301, 301, 2173,
+
+ 2174, 2174, 2174, 2174, 2174, 2174, 2174, 2174,
+ 2174, 2174, 2174, 2174, 2174, 2174, 2174, 2174,
+ 2174, 2174, 2174, 2174, 2174, 2174, 2174, 2174,
+ 2174, 2174, 2174, 2174, 2174, 2174, 2174, 2174,
+
+ 2175, 2175, 2175, 2175, 2175, 2175, 2175, 2175,
+ 2175, 2175, 2175, 2175, 2175, 2175, 2175, 2175,
+ 2175, 2175, 2175, 2175, 2175, 2175, 2175, 2175,
+ 301, 301, 301, 301, 2176, 2176, 2175, 2175,
+
+ 2176, 2176, 2176, 2176, 2176, 2176, 2176, 2176,
+ 2176, 2176, 2176, 2176, 2176, 2176, 2176, 2176,
+ 301, 301, 2176, 2176, 2176, 2176, 2176, 2176,
+ 2176, 2176, 2176, 2176, 2176, 2176, 2176, 2176,
+
+ 2176, 2176, 2176, 2176, 2176, 2176, 2176, 2176,
+ 2176, 2176, 2176, 2176, 2176, 2176, 2176, 2176,
+ 2176, 2176, 2176, 2176, 2176, 2176, 2176, 2176,
+ 2176, 2176, 2176, 2176, 2176, 2176, 2176, 2176,
+
+ 2177, 2178, 2178, 2178, 301, 2178, 2178, 301,
+ 301, 301, 301, 301, 2178, 2179, 2178, 2180,
+ 2177, 2177, 2177, 2177, 301, 2177, 2177, 2177,
+ 301, 2177, 2177, 2177, 2177, 2177, 2177, 2177,
+
+ 2177, 2177, 2177, 2177, 2177, 2177, 2177, 2177,
+ 2177, 2177, 2177, 2177, 2177, 2177, 2177, 2177,
+ 2177, 2177, 2177, 2177, 2181, 2181, 301, 301,
+ 2180, 2182, 2179, 301, 301, 301, 301, 2183,
+
+ 2184, 2185, 2186, 2187, 2188, 2188, 2188, 2188,
+ 2189, 301, 301, 301, 301, 301, 301, 301,
+ 2190, 2190, 2190, 2190, 2190, 2190, 2191, 2191,
+ 2192, 301, 301, 301, 301, 301, 301, 301,
+
+ 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193,
+ 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193,
+ 2193, 2193, 2193, 2193, 2193, 2193, 2193, 2193,
+ 2193, 2193, 2193, 2193, 2193, 2194, 2194, 2195,
+
+ 2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
+ 2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
+ 2196, 2196, 2196, 2196, 2196, 2196, 2196, 2196,
+ 2196, 2196, 2196, 2196, 2196, 2197, 2197, 2197,
+
+ 2198, 2198, 2198, 2198, 2198, 2199, 2200, 2199,
+ 2201, 2199, 2199, 2200, 2200, 2202, 2199, 2199,
+ 2199, 2199, 2199, 2198, 2198, 2198, 2198, 2202,
+ 2198, 2198, 2198, 2198, 2198, 2199, 2198, 2198,
+
+ 2198, 2199, 2200, 2200, 2199, 2203, 2204, 301,
+ 301, 301, 301, 2205, 2205, 2205, 2205, 2206,
+ 2207, 2207, 2207, 2207, 2207, 2207, 2208, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 2209, 2209, 2209, 2209, 2209, 2209, 2209, 2209,
+ 2209, 2209, 2209, 2209, 2209, 2209, 2209, 2209,
+ 2209, 2209, 2209, 2209, 2209, 2209, 2209, 2209,
+ 2209, 2209, 2209, 2209, 2209, 2209, 2209, 2209,
+
+ 2209, 2209, 2209, 2209, 2209, 2209, 2209, 2209,
+ 2209, 2209, 2209, 2209, 2209, 2209, 2209, 2209,
+ 2209, 2209, 2209, 2209, 2209, 2209, 301, 301,
+ 301, 2210, 2210, 2210, 2210, 2210, 2210, 2210,
+
+ 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211,
+ 2211, 2211, 2211, 2211, 2211, 2211, 2211, 2211,
+ 2211, 2211, 2211, 2211, 2211, 2211, 301, 301,
+ 2212, 2212, 2212, 2212, 2212, 2212, 2212, 2212,
+
+ 2213, 2213, 2213, 2213, 2213, 2213, 2213, 2213,
+ 2213, 2213, 2213, 2213, 2213, 2213, 2213, 2213,
+ 2213, 2213, 2213, 301, 301, 301, 301, 301,
2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214,
- 2214, 2214, 2214, 2215, 2214, 2214, 2214, 2214,
- 2213, 2213, 2213, 2212, 2212, 2212, 2212, 2213,
- 2213, 2216, 2217, 2218, 2218, 2219, 2220, 2220,
- 2220, 2220, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+
+ 2215, 2216, 2215, 2216, 2216, 2216, 2215, 2215,
+ 2215, 2216, 2215, 2215, 2216, 2215, 2216, 2216,
+ 2215, 2216, 301, 301, 301, 301, 301, 301,
+ 301, 2217, 2217, 2217, 2217, 301, 301, 301,
+
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 2218, 2218, 2218, 2218, 2219, 2219, 2220,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221,
2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221,
2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221,
- 2221, 201, 201, 201, 201, 201, 201, 201,
- 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229,
- 2230, 2231, 201, 201, 201, 201, 201, 201,
-
- 2232, 2232, 2232, 2233, 2233, 2233, 2233, 2233,
- 2233, 2233, 2233, 2233, 2233, 2233, 2233, 2233,
- 2233, 2233, 2233, 2233, 2233, 2233, 2233, 2233,
- 2233, 2233, 2233, 2233, 2233, 2233, 2233, 2233,
- 2233, 2233, 2233, 2233, 2233, 2233, 2233, 2234,
- 2235, 2235, 2235, 2235, 2236, 2235, 2237, 2237,
- 2235, 2235, 2235, 2238, 2238, 201, 2239, 2240,
- 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248,
- 2249, 2250, 2250, 2250, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2251, 2251, 2251, 2251, 2251, 2251, 2251, 2251,
- 2251, 2251, 2251, 2251, 2251, 2251, 2251, 2251,
- 2251, 2251, 2251, 2251, 2251, 2251, 2251, 2251,
+ 2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221,
+
+ 2221, 2221, 2221, 2221, 2221, 2221, 2221, 2221,
+ 2221, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222,
+ 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222,
+ 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222,
+ 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222,
+
+ 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222,
+ 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222,
+ 2222, 2222, 2222, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2223,
+ 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2223,
+ 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2223,
+ 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2223,
+
+ 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2223,
+ 2223, 2223, 2223, 2223, 2223, 2223, 2223, 2223,
+ 2223, 2223, 2223, 301, 301, 301, 301, 301,
+ 301, 301, 2224, 2224, 2224, 2224, 2224, 2224,
+
+ 2225, 2226, 2226, 2226, 2226, 2226, 2226, 2226,
+ 2226, 2226, 2226, 2226, 2226, 2226, 2226, 2226,
+ 2226, 2226, 2226, 2226, 2226, 2226, 2226, 2226,
+ 2226, 2226, 2226, 2226, 2226, 2226, 2226, 2226,
+
+ 2226, 2226, 2227, 2226, 2228, 2228, 2228, 2228,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236,
+ 2237, 2238, 301, 301, 301, 301, 301, 301,
+
+ 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246,
+ 2247, 2248, 2248, 2248, 2248, 2248, 2248, 2248,
+ 2248, 2248, 2248, 2248, 2248, 2248, 2248, 2248,
+ 2248, 2248, 2248, 2248, 2248, 2248, 2248, 301,
+
+ 2249, 2249, 2249, 2249, 2249, 2249, 2249, 2249,
+ 2249, 2249, 2249, 2249, 2249, 2249, 2249, 2249,
+ 2249, 2249, 2249, 2249, 2249, 2249, 2249, 2249,
+ 2249, 2249, 2249, 2249, 2249, 2250, 2250, 2250,
+
+ 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2249,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 2251, 2251, 2251, 2252, 2251, 2251, 2251, 2251,
2251, 2251, 2251, 2251, 2251, 2251, 2251, 2251,
- 2251, 2251, 2251, 2252, 2253, 2254, 2251, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2255, 2255, 2256, 2257, 2257, 2257, 2257, 2257,
- 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257,
- 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257,
- 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257,
- 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257,
- 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257,
- 2257, 2257, 2257, 2256, 2256, 2256, 2255, 2255,
- 2255, 2255, 2255, 2255, 2255, 2255, 2255, 2256,
- 2258, 2257, 2259, 2259, 2257, 2260, 2260, 2261,
- 2262, 2263, 2264, 2265, 2265, 2266, 201, 201,
- 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274,
- 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2281,
- 201, 2282, 2282, 2282, 2282, 2282, 2282, 2282,
- 2282, 2282, 2282, 2282, 2282, 2282, 2282, 2282,
- 2282, 2282, 2282, 2282, 2282, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2283, 2283, 2283, 2283, 2283, 2283, 2283, 2283,
- 2283, 2283, 2283, 2283, 2283, 2283, 2283, 2283,
- 2283, 2283, 201, 2283, 2283, 2283, 2283, 2283,
- 2283, 2283, 2283, 2283, 2283, 2283, 2283, 2283,
- 2283, 2283, 2283, 2283, 2283, 2283, 2283, 2283,
- 2283, 2283, 2283, 2283, 2284, 2284, 2284, 2285,
- 2285, 2285, 2284, 2284, 2285, 2286, 2287, 2285,
- 2288, 2288, 2289, 2288, 2288, 2289, 2290, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2291, 2291, 2291, 2291, 2291, 2291, 2291, 201,
- 2291, 201, 2291, 2291, 2291, 2291, 201, 2291,
- 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291,
- 2291, 2291, 2291, 2291, 2291, 2291, 201, 2291,
- 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291,
- 2291, 2292, 201, 201, 201, 201, 201, 201,
- 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
- 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
- 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
- 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
- 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293,
- 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2294,
- 2295, 2295, 2295, 2294, 2294, 2294, 2294, 2294,
- 2294, 2296, 2297, 201, 201, 201, 201, 201,
+
+ 2251, 2251, 2251, 2251, 2251, 2253, 2254, 2254,
+ 2255, 2255, 2255, 2254, 2255, 2254, 2254, 2254,
+ 2254, 2256, 2256, 2256, 2257, 2258, 2258, 2258,
+ 2258, 2258, 301, 301, 301, 301, 301, 301,
+
+ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
+ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259,
+ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 2260, 2261, 2260, 2262, 2262, 2262, 2262, 2262,
+ 2262, 2262, 2262, 2262, 2262, 2262, 2262, 2262,
+ 2262, 2262, 2262, 2262, 2262, 2262, 2262, 2262,
+ 2262, 2262, 2262, 2262, 2262, 2262, 2262, 2262,
+ 2262, 2262, 2262, 2262, 2262, 2262, 2262, 2262,
+ 2262, 2262, 2262, 2262, 2262, 2262, 2262, 2262,
+ 2262, 2262, 2262, 2262, 2262, 2262, 2262, 2262,
+ 2261, 2261, 2261, 2261, 2261, 2261, 2261, 2261,
+ 2261, 2261, 2261, 2261, 2261, 2261, 2263, 2264,
+ 2264, 2265, 2265, 2265, 2265, 2265, 202, 202,
+ 202, 202, 2266, 2267, 2268, 2269, 2270, 2271,
+ 2272, 2273, 2274, 2275, 2275, 2275, 2275, 2275,
+ 2275, 2275, 2275, 2275, 2275, 2275, 2276, 2277,
+ 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 2286,
+ 2287, 2287, 2288, 2289, 2289, 2289, 2289, 2289,
+ 2289, 2289, 2289, 2289, 2289, 2289, 2289, 2289,
+ 2289, 2289, 2289, 2289, 2289, 2289, 2289, 2289,
+ 2289, 2289, 2290, 2289, 2290, 2289, 2289, 2289,
+ 2289, 2289, 2289, 2289, 2289, 2289, 2289, 2289,
+ 2289, 2289, 2289, 2290, 2289, 2289, 2289, 2289,
+ 2288, 2288, 2288, 2287, 2287, 2287, 2287, 2288,
+ 2288, 2291, 2292, 2293, 2293, 2294, 2295, 2295,
+ 2295, 2295, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 2296, 202, 202,
+ 2297, 2297, 2297, 2297, 2297, 2297, 2297, 2297,
+ 2297, 2297, 2297, 2297, 2297, 2297, 2297, 2297,
+ 2297, 2297, 2297, 2297, 2297, 2297, 2297, 2297,
+ 2297, 202, 202, 202, 202, 202, 202, 202,
2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305,
- 2306, 2307, 201, 201, 201, 201, 201, 201,
-
- 2308, 2309, 2310, 2310, 201, 2311, 2311, 2311,
- 2311, 2311, 2311, 2311, 2311, 201, 201, 2311,
- 2311, 201, 201, 2311, 2311, 2311, 2311, 2311,
- 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311,
- 2311, 2311, 2311, 2311, 2311, 2311, 2311, 2311,
- 2311, 201, 2311, 2311, 2311, 2311, 2311, 2311,
- 2311, 201, 2311, 2311, 201, 2311, 2311, 2311,
- 2311, 2311, 201, 201, 2312, 2311, 2313, 2310,
- 2309, 2310, 2310, 2310, 2310, 201, 201, 2310,
- 2310, 201, 201, 2314, 2314, 2315, 201, 201,
- 2316, 201, 201, 201, 201, 201, 201, 2313,
- 201, 201, 201, 201, 201, 2311, 2311, 2311,
- 2311, 2311, 2310, 2310, 201, 201, 2317, 2317,
- 2317, 2317, 2317, 2317, 2317, 201, 201, 201,
- 2317, 2317, 2317, 2317, 2317, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318,
- 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318,
- 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318,
- 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318,
- 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318,
- 2318, 2318, 2318, 2318, 2318, 2318, 2318, 2318,
- 2318, 2318, 2318, 2318, 2318, 2319, 2319, 2319,
- 2320, 2320, 2320, 2320, 2320, 2320, 2320, 2320,
- 2319, 2319, 2321, 2320, 2320, 2319, 2322, 2318,
- 2318, 2318, 2318, 2323, 2323, 2324, 2324, 2325,
- 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333,
- 2334, 2335, 201, 2324, 201, 2325, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2336, 2336, 2336, 2336, 2336, 2336, 2336, 2336,
- 2336, 2336, 2336, 2336, 2336, 2336, 2336, 2336,
- 2336, 2336, 2336, 2336, 2336, 2336, 2336, 2336,
- 2336, 2336, 2336, 2336, 2336, 2336, 2336, 2336,
- 2336, 2336, 2336, 2336, 2336, 2336, 2336, 2336,
- 2336, 2336, 2336, 2336, 2336, 2336, 2336, 2336,
- 2337, 2338, 2338, 2339, 2339, 2339, 2339, 2339,
- 2339, 2338, 2340, 2341, 2341, 2337, 2341, 2339,
- 2339, 2338, 2342, 2343, 2336, 2336, 2344, 2336,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352,
- 2353, 2354, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2355, 2355, 2355, 2355, 2355, 2355, 2355, 2355,
- 2355, 2355, 2355, 2355, 2355, 2355, 2355, 2355,
- 2355, 2355, 2355, 2355, 2355, 2355, 2355, 2355,
- 2355, 2355, 2355, 2355, 2355, 2355, 2355, 2355,
- 2355, 2355, 2355, 2355, 2355, 2355, 2355, 2355,
- 2355, 2355, 2355, 2355, 2355, 2355, 2355, 2356,
- 2357, 2357, 2358, 2358, 2358, 2358, 201, 201,
- 2357, 2357, 2359, 2359, 2358, 2358, 2357, 2360,
- 2361, 2362, 2363, 2363, 2364, 2364, 2365, 2365,
- 2365, 2363, 2366, 2366, 2366, 2366, 2366, 2366,
- 2366, 2366, 2366, 2366, 2366, 2366, 2366, 2366,
- 2367, 2367, 2367, 2367, 2368, 2368, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2369, 2369, 2369, 2369, 2369, 2369, 2369, 2369,
- 2369, 2369, 2369, 2369, 2369, 2369, 2369, 2369,
- 2369, 2369, 2369, 2369, 2369, 2369, 2369, 2369,
- 2369, 2369, 2369, 2369, 2369, 2369, 2369, 2369,
- 2369, 2369, 2369, 2369, 2369, 2369, 2369, 2369,
- 2369, 2369, 2369, 2369, 2369, 2369, 2369, 2369,
- 2370, 2370, 2370, 2371, 2371, 2371, 2371, 2371,
- 2371, 2371, 2371, 2370, 2370, 2371, 2370, 2372,
- 2371, 2373, 2373, 2374, 2369, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+ 2306, 2307, 202, 202, 202, 202, 202, 202,
+
+ 2308, 2308, 2308, 2309, 2309, 2309, 2309, 2309,
+ 2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
+ 2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
+ 2309, 2309, 2309, 2309, 2309, 2309, 2309, 2309,
+ 2309, 2309, 2309, 2309, 2309, 2309, 2309, 2310,
+ 2311, 2311, 2311, 2311, 2312, 2311, 2313, 2313,
+ 2311, 2311, 2311, 2314, 2314, 202, 2315, 2316,
+ 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324,
+ 2325, 2326, 2326, 2326, 2327, 2328, 2328, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2329, 2329, 2329, 2329, 2329, 2329, 2329, 2329,
+ 2329, 2329, 2329, 2329, 2329, 2329, 2329, 2329,
+ 2329, 2329, 2329, 2329, 2329, 2329, 2329, 2329,
+ 2329, 2329, 2329, 2329, 2329, 2329, 2329, 2329,
+ 2329, 2329, 2329, 2330, 2331, 2332, 2329, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2333, 2333, 2334, 2335, 2335, 2335, 2335, 2335,
+ 2335, 2335, 2335, 2335, 2335, 2335, 2335, 2335,
+ 2335, 2335, 2335, 2335, 2335, 2335, 2335, 2335,
+ 2335, 2335, 2335, 2335, 2335, 2335, 2335, 2335,
+ 2335, 2335, 2335, 2335, 2335, 2335, 2335, 2335,
+ 2335, 2335, 2335, 2335, 2335, 2335, 2335, 2335,
+ 2335, 2335, 2335, 2334, 2334, 2334, 2333, 2333,
+ 2333, 2333, 2333, 2333, 2333, 2333, 2333, 2334,
+ 2336, 2335, 2337, 2337, 2335, 2338, 2338, 2339,
+ 2340, 2341, 2342, 2341, 2341, 2343, 202, 202,
+ 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351,
+ 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2358,
+ 202, 2359, 2359, 2359, 2359, 2359, 2359, 2359,
+ 2359, 2359, 2359, 2359, 2359, 2359, 2359, 2359,
+ 2359, 2359, 2359, 2359, 2359, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2360, 2360, 2360, 2360, 2360, 2360, 2360, 2360,
+ 2360, 2360, 2360, 2360, 2360, 2360, 2360, 2360,
+ 2360, 2360, 202, 2360, 2360, 2360, 2360, 2360,
+ 2360, 2360, 2360, 2360, 2360, 2360, 2360, 2360,
+ 2360, 2360, 2360, 2360, 2360, 2360, 2360, 2360,
+ 2360, 2360, 2360, 2360, 2361, 2361, 2361, 2362,
+ 2362, 2362, 2361, 2361, 2362, 2363, 2364, 2362,
+ 2365, 2365, 2366, 2365, 2365, 2366, 2367, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2368, 2368, 2368, 2368, 2368, 2368, 2368, 202,
+ 2368, 202, 2368, 2368, 2368, 2368, 202, 2368,
+ 2368, 2368, 2368, 2368, 2368, 2368, 2368, 2368,
+ 2368, 2368, 2368, 2368, 2368, 2368, 202, 2368,
+ 2368, 2368, 2368, 2368, 2368, 2368, 2368, 2368,
+ 2368, 2369, 202, 202, 202, 202, 202, 202,
+ 2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
+ 2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
+ 2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
+ 2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
+ 2370, 2370, 2370, 2370, 2370, 2370, 2370, 2370,
+ 2370, 2370, 2370, 2370, 2370, 2370, 2370, 2371,
+ 2372, 2372, 2372, 2371, 2371, 2371, 2371, 2371,
+ 2371, 2373, 2374, 202, 202, 202, 202, 202,
2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382,
- 2383, 2384, 201, 201, 201, 201, 201, 201,
- 2385, 2385, 2385, 2385, 2385, 2385, 2385, 2385,
- 2385, 2385, 2385, 2385, 2385, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2386, 2386, 2386, 2386, 2386, 2386, 2386, 2386,
- 2386, 2386, 2386, 2386, 2386, 2386, 2386, 2386,
- 2386, 2386, 2386, 2386, 2386, 2386, 2386, 2386,
- 2386, 2386, 2386, 2386, 2386, 2386, 2386, 2386,
- 2386, 2386, 2386, 2386, 2386, 2386, 2386, 2386,
- 2386, 2386, 2386, 2387, 2388, 2387, 2388, 2388,
- 2387, 2387, 2387, 2387, 2387, 2387, 2389, 2390,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398,
- 2399, 2400, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401,
- 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401,
- 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401,
- 2401, 2401, 201, 201, 201, 2402, 2402, 2402,
- 2403, 2403, 2402, 2402, 2402, 2402, 2403, 2402,
- 2402, 2402, 2402, 2404, 201, 201, 201, 201,
- 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412,
- 2413, 2414, 2415, 2415, 2416, 2416, 2416, 2417,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418,
- 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418,
- 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418,
- 2418, 2418, 2418, 2418, 2418, 2418, 2418, 2418,
- 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419,
- 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419,
- 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419,
- 2419, 2419, 2419, 2419, 2419, 2419, 2419, 2419,
- 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427,
- 2428, 2429, 2430, 2430, 2430, 2430, 2430, 2430,
- 2430, 2430, 2430, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 2431,
-
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2432, 2433, 2433, 2433, 2433, 2433, 2433, 2434,
- 2434, 2433, 2433, 2432, 2432, 2432, 2432, 2432,
- 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432,
- 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432,
- 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432,
- 2432, 2432, 2432, 2432, 2432, 2432, 2432, 2432,
- 2432, 2432, 2432, 2433, 2435, 2433, 2433, 2433,
- 2433, 2434, 2436, 2433, 2433, 2433, 2433, 2437,
- 2438, 2439, 2440, 2440, 2439, 2437, 2438, 2435,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2441, 2442, 2442, 2442, 2442, 2442, 2442, 2443,
- 2443, 2442, 2442, 2442, 2441, 2441, 2441, 2441,
- 2441, 2441, 2441, 2441, 2441, 2441, 2441, 2441,
- 2441, 2441, 2441, 2441, 2441, 2441, 2441, 2441,
- 2441, 2441, 2441, 2441, 2441, 2441, 2441, 2441,
- 2441, 2441, 2441, 2441, 2441, 2441, 2441, 2441,
- 2441, 2441, 2441, 2441, 201, 201, 2444, 2444,
- 2444, 2444, 2442, 2442, 2442, 2442, 2442, 2442,
- 2442, 2442, 2442, 2442, 2442, 2442, 2442, 2443,
- 2442, 2445, 2446, 2447, 2447, 201, 2448, 2448,
- 2448, 2446, 2446, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449,
+ 2383, 2384, 202, 202, 202, 202, 202, 202,
+
+ 2385, 2386, 2387, 2387, 202, 2388, 2388, 2388,
+ 2388, 2388, 2388, 2388, 2388, 202, 202, 2388,
+ 2388, 202, 202, 2388, 2388, 2388, 2388, 2388,
+ 2388, 2388, 2388, 2388, 2388, 2388, 2388, 2388,
+ 2388, 2388, 2388, 2388, 2388, 2388, 2388, 2388,
+ 2388, 202, 2388, 2388, 2388, 2388, 2388, 2388,
+ 2388, 202, 2388, 2388, 202, 2388, 2388, 2388,
+ 2388, 2388, 202, 2389, 2390, 2388, 2391, 2387,
+ 2386, 2387, 2387, 2387, 2387, 202, 202, 2387,
+ 2387, 202, 202, 2392, 2392, 2393, 202, 202,
+ 2394, 202, 202, 202, 202, 202, 202, 2391,
+ 202, 202, 202, 202, 202, 2388, 2388, 2388,
+ 2388, 2388, 2387, 2387, 202, 202, 2395, 2395,
+ 2395, 2395, 2395, 2395, 2395, 202, 202, 202,
+ 2395, 2395, 2395, 2395, 2395, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396,
+ 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396,
+ 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396,
+ 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396,
+ 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396,
+ 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396,
+ 2396, 2396, 2396, 2396, 2396, 2397, 2397, 2397,
+ 2398, 2398, 2398, 2398, 2398, 2398, 2398, 2398,
+ 2397, 2397, 2399, 2398, 2398, 2397, 2400, 2396,
+ 2396, 2396, 2396, 2401, 2401, 2402, 2402, 2403,
+ 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411,
+ 2412, 2413, 202, 2402, 202, 2403, 2414, 2415,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416,
+ 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416,
+ 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416,
+ 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416,
+ 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416,
+ 2416, 2416, 2416, 2416, 2416, 2416, 2416, 2416,
+ 2417, 2418, 2418, 2419, 2419, 2419, 2419, 2419,
+ 2419, 2418, 2420, 2421, 2421, 2417, 2421, 2419,
+ 2419, 2418, 2422, 2423, 2416, 2416, 2424, 2416,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432,
+ 2433, 2434, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435,
+ 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435,
+ 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435,
+ 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435,
+ 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2435,
+ 2435, 2435, 2435, 2435, 2435, 2435, 2435, 2436,
+ 2437, 2437, 2438, 2438, 2438, 2438, 202, 202,
+ 2437, 2437, 2439, 2439, 2438, 2438, 2437, 2440,
+ 2441, 2442, 2443, 2443, 2444, 2444, 2445, 2445,
+ 2445, 2443, 2446, 2446, 2446, 2446, 2446, 2446,
+ 2446, 2446, 2446, 2446, 2446, 2446, 2446, 2446,
+ 2447, 2447, 2447, 2447, 2448, 2448, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449,
2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449,
2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449,
2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449,
2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449,
2449, 2449, 2449, 2449, 2449, 2449, 2449, 2449,
- 2449, 201, 201, 201, 201, 201, 201, 201,
-
- 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450,
- 2450, 201, 2450, 2450, 2450, 2450, 2450, 2450,
- 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450,
- 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450,
- 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2450,
- 2450, 2450, 2450, 2450, 2450, 2450, 2450, 2451,
- 2452, 2452, 2452, 2452, 2452, 2452, 2452, 201,
- 2452, 2452, 2452, 2452, 2452, 2452, 2451, 2453,
- 2450, 2454, 2454, 2455, 2455, 2455, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2456, 2457, 2458, 2459, 2460, 2461, 2462, 2463,
- 2464, 2465, 2466, 2466, 2466, 2466, 2466, 2466,
+ 2450, 2450, 2450, 2451, 2451, 2451, 2451, 2451,
+ 2451, 2451, 2451, 2450, 2450, 2451, 2450, 2452,
+ 2451, 2453, 2453, 2454, 2449, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2462,
+ 2463, 2464, 202, 202, 202, 202, 202, 202,
+ 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465,
+ 2465, 2465, 2465, 2465, 2465, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466,
- 2466, 2466, 2466, 2466, 2466, 201, 201, 201,
- 2467, 2468, 2469, 2469, 2469, 2469, 2469, 2469,
- 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2469,
- 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2469,
- 2469, 2469, 2469, 2469, 2469, 2469, 2469, 2469,
- 201, 201, 2470, 2470, 2470, 2470, 2470, 2470,
- 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470,
- 2470, 2470, 2470, 2470, 2470, 2470, 2470, 2470,
- 201, 2471, 2470, 2470, 2470, 2470, 2470, 2470,
- 2470, 2471, 2470, 2470, 2471, 2470, 2470, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2472, 2472, 2472, 2472, 2472, 2472, 2472, 201,
- 2472, 2472, 201, 2472, 2472, 2472, 2472, 2472,
- 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472,
- 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472,
- 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472,
- 2472, 2472, 2472, 2472, 2472, 2472, 2472, 2472,
- 2472, 2473, 2473, 2473, 2473, 2473, 2473, 201,
- 201, 201, 2473, 201, 2473, 2473, 201, 2473,
- 2473, 2473, 2474, 2473, 2475, 2475, 2476, 2473,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484,
- 2485, 2486, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
-
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2487,
- 2487, 2487, 2487, 2487, 2487, 2487, 2487, 2488,
- 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488,
- 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488,
- 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488,
- 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488,
- 2488, 2488, 2488, 2488, 2488, 2488, 2488, 2488,
- 2488, 2489, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2490, 2490, 2490, 2490, 2490,
- 2490, 2490, 2490, 2491, 2491, 2491, 2491, 2491,
- 2491, 2491, 2491, 2491, 2491, 2491, 2491, 201,
- 2492, 2492, 2492, 2492, 2493, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
-
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 2489, 2489, 2489, 2489,
- 2489, 2489, 2489, 2489, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
-
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2495, 2495, 2495, 2496, 2496, 2496, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2496, 2494, 2494, 2494, 2495, 2496,
- 2495, 2496, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
-
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2495, 2496, 2496, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
-
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 2494,
- 2494, 2494, 2494, 2494, 2494, 2494, 2494, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
-
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2498, 2499,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
-
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 2497,
- 2497, 2497, 2497, 2497, 2497, 2497, 2497, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
+ 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466,
+ 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466,
+ 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466,
+ 2466, 2466, 2466, 2466, 2466, 2466, 2466, 2466,
+ 2466, 2466, 2466, 2467, 2468, 2467, 2468, 2468,
+ 2467, 2467, 2467, 2467, 2467, 2467, 2469, 2470,
+ 2471, 202, 202, 202, 202, 202, 202, 202,
+ 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479,
+ 2480, 2481, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482,
+ 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482,
+ 2482, 2482, 2482, 2482, 2482, 2482, 2482, 2482,
+ 2482, 2482, 2483, 202, 202, 2484, 2484, 2484,
+ 2485, 2485, 2484, 2484, 2484, 2484, 2485, 2484,
+ 2484, 2484, 2484, 2486, 202, 202, 202, 202,
+ 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494,
+ 2495, 2496, 2497, 2497, 2498, 2498, 2498, 2499,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500,
- 2500, 201, 201, 201, 201, 201, 201, 201,
- 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501,
- 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501,
- 2501, 2501, 2501, 2501, 2501, 2501, 2501, 2501,
- 2501, 2501, 2501, 2501, 2501, 2501, 2501, 201,
- 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509,
- 2510, 2511, 201, 201, 201, 201, 2512, 2512,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513,
- 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513,
- 2513, 2513, 2513, 2513, 2513, 2513, 2513, 2513,
- 2513, 2513, 2513, 2513, 2513, 2513, 201, 201,
- 2514, 2514, 2514, 2514, 2514, 2515, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 2517, 2517, 2517, 2517, 2517, 2517, 2517, 2518,
- 2518, 2519, 2520, 2520, 2521, 2521, 2521, 2521,
- 2522, 2522, 2522, 2522, 2518, 2521, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530,
- 2531, 2532, 201, 2533, 2533, 2533, 2533, 2533,
- 2533, 2533, 201, 2516, 2516, 2516, 2516, 2516,
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 201, 201, 201, 201, 201, 2516, 2516, 2516,
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 2516, 2516, 2516, 2516, 2516, 2516, 2516, 2516,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534,
- 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534,
- 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534,
- 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534,
- 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534,
- 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534,
- 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534,
- 2534, 2534, 2534, 2534, 2534, 2534, 2534, 2534,
- 2534, 2534, 2534, 2534, 2534, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2534, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
+ 2500, 2500, 2500, 2500, 2501, 2501, 2501, 2502,
+ 2502, 2502, 2502, 2502, 2502, 2502, 2502, 2502,
+ 2501, 2503, 2504, 2505, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506,
+ 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506,
+ 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506,
+ 2506, 2506, 2506, 2506, 2506, 2506, 2506, 2506,
+ 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507,
+ 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507,
+ 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507,
+ 2507, 2507, 2507, 2507, 2507, 2507, 2507, 2507,
+ 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515,
+ 2516, 2517, 2518, 2518, 2518, 2518, 2518, 2518,
+ 2518, 2518, 2518, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 2519,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2520, 2520, 2520, 2520, 2520, 2520, 2520, 2520,
+ 202, 202, 2520, 2520, 2520, 2520, 2520, 2520,
+ 2520, 2520, 2520, 2520, 2520, 2520, 2520, 2520,
+ 2520, 2520, 2520, 2520, 2520, 2520, 2520, 2520,
+ 2520, 2520, 2520, 2520, 2520, 2520, 2520, 2520,
+ 2520, 2520, 2520, 2520, 2520, 2520, 2520, 2520,
+ 2520, 2521, 2521, 2521, 2522, 2522, 2522, 2522,
+ 202, 202, 2522, 2522, 2521, 2521, 2521, 2521,
+ 2523, 2520, 2524, 2520, 2521, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2525, 2526, 2526, 2526, 2526, 2526, 2526, 2527,
+ 2527, 2526, 2526, 2525, 2525, 2525, 2525, 2525,
+ 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
+ 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
+ 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
+ 2525, 2525, 2525, 2525, 2525, 2525, 2525, 2525,
+ 2525, 2525, 2525, 2526, 2528, 2526, 2526, 2526,
+ 2526, 2529, 2530, 2526, 2526, 2526, 2526, 2531,
+ 2532, 2533, 2534, 2534, 2533, 2531, 2532, 2528,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2535, 2536, 2536, 2536, 2536, 2536, 2536, 2537,
+ 2537, 2536, 2536, 2536, 2535, 2535, 2535, 2535,
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
2535, 2535, 2535, 2535, 2535, 2535, 2535, 2535,
- 2535, 2535, 2535, 2535, 2535, 2535, 2535, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 2536,
- 2536, 2536, 2536, 2537, 2537, 2537, 2537, 2537,
- 2537, 2537, 2537, 2537, 2537, 2537, 2537, 2537,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2538, 2539, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
-
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 2540, 2540, 2540, 2540, 2540,
- 2540, 2540, 2540, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2541, 2542, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
-
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 2543,
- 2543, 2543, 2543, 2543, 2543, 2543, 2543, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
-
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 2544, 2544, 2544, 2544,
- 2544, 2544, 2544, 2544, 201, 201, 201, 201,
-
- 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
- 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
- 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
+ 2535, 2535, 2535, 2535, 2538, 2538, 2539, 2539,
+ 2539, 2539, 2536, 2536, 2536, 2536, 2536, 2536,
+ 2536, 2536, 2536, 2536, 2536, 2536, 2536, 2537,
+ 2536, 2540, 2541, 2542, 2542, 2543, 2544, 2544,
+ 2544, 2541, 2541, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
@@ -4664,1480 +3928,2548 @@ static const unsigned short uc_property_trie[] = {
2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
- 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
- 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
- 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
- 2545, 2545, 2545, 201, 201, 201, 201, 201,
- 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
- 2545, 2545, 2545, 2545, 2545, 201, 201, 201,
- 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
- 2545, 201, 201, 201, 201, 201, 201, 201,
- 2545, 2545, 2545, 2545, 2545, 2545, 2545, 2545,
- 2545, 2545, 201, 201, 2546, 2547, 2548, 2549,
- 2550, 2550, 2550, 2550, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 201,
- 201, 1444, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2552, 2552,
- 2552, 2552, 2552, 2552, 2552, 2553, 2554, 2555,
- 2555, 2555, 2551, 2551, 2551, 2556, 2553, 2553,
- 2553, 2553, 2553, 2557, 2557, 2557, 2557, 2557,
- 2557, 2557, 2557, 2558, 2558, 2558, 2558, 2558,
- 2558, 2558, 2558, 2551, 2551, 2559, 2559, 2559,
- 2559, 2559, 2558, 2558, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2559, 2559, 2559, 2559, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2552, 2552, 2552, 2552, 2552,
- 2552, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2551, 2551,
- 2551, 2551, 2551, 2551, 2551, 2551, 2560, 2560,
- 2560, 2560, 2560, 2560, 2560, 2560, 2560, 2560,
- 2560, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
- 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
- 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
- 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
- 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
- 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
- 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
- 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067,
- 2067, 2067, 2561, 2561, 2561, 2067, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 1478,
- 1478, 1478, 1478, 1478, 1478, 1478, 1478, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
+ 2545, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2546, 2546, 2546, 2546, 2546, 2546, 2546, 2546,
+ 2546, 202, 2546, 2546, 2546, 2546, 2546, 2546,
+ 2546, 2546, 2546, 2546, 2546, 2546, 2546, 2546,
+ 2546, 2546, 2546, 2546, 2546, 2546, 2546, 2546,
+ 2546, 2546, 2546, 2546, 2546, 2546, 2546, 2546,
+ 2546, 2546, 2546, 2546, 2546, 2546, 2546, 2547,
+ 2548, 2548, 2548, 2548, 2548, 2548, 2548, 202,
+ 2548, 2548, 2548, 2548, 2548, 2548, 2547, 2549,
+ 2546, 2550, 2550, 2551, 2551, 2551, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559,
+ 2560, 2561, 2562, 2562, 2562, 2562, 2562, 2562,
2562, 2562, 2562, 2562, 2562, 2562, 2562, 2562,
- 2562, 2562, 2562, 2562, 2562, 2562, 2562, 2562,
- 2562, 2562, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 201, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2563, 201, 2563, 2563,
- 201, 201, 2563, 201, 201, 2563, 2563, 201,
- 201, 2563, 2563, 2563, 2563, 201, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2564, 2564,
- 2564, 2564, 201, 2564, 201, 2564, 2564, 2564,
- 2564, 2565, 2564, 2564, 201, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
-
- 2564, 2564, 2564, 2564, 2563, 2563, 201, 2563,
- 2563, 2563, 2563, 201, 201, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 201, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 201, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2563, 2563, 201, 2563, 2563, 2563, 2563, 201,
- 2563, 2563, 2563, 2563, 2563, 201, 2563, 201,
- 201, 201, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 201, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
-
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 1436, 1436, 201, 201,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2566, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2567, 2564, 2564, 2564, 2564,
- 2564, 2564, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2566, 2564, 2564, 2564, 2564,
-
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2567, 2564, 2564,
- 2564, 2564, 2564, 2564, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2566, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2567,
- 2564, 2564, 2564, 2564, 2564, 2564, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2566,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2567, 2564, 2564, 2564, 2564, 2564, 2564,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2563, 2563, 2563, 2563, 2563, 2563, 2563,
- 2563, 2566, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2564, 2564, 2564, 2564, 2564,
- 2564, 2564, 2564, 2567, 2564, 2564, 2564, 2564,
- 2564, 2564, 2568, 2569, 201, 201, 2570, 2571,
- 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579,
- 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577,
- 2578, 2579, 2570, 2571, 2572, 2573, 2574, 2575,
- 2576, 2577, 2578, 2579, 2570, 2571, 2572, 2573,
- 2574, 2575, 2576, 2577, 2578, 2579, 2570, 2571,
- 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579,
-
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
-
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2580,
- 2580, 2580, 2580, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2581, 2580, 2580,
- 2580, 2580, 2580, 2580, 2580, 2580, 2580, 2580,
- 2580, 2580, 2580, 2580, 2581, 2580, 2580, 2582,
- 2583, 2582, 2582, 2584, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 2581, 2581, 2581, 2581, 2581,
- 201, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 2581, 2581, 2581, 2581, 2581, 2581, 2581, 2581,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2585, 2585, 2585, 2585, 2585, 2585, 2585, 201,
- 2585, 2585, 2585, 2585, 2585, 2585, 2585, 2585,
- 2585, 2585, 2585, 2585, 2585, 2585, 2585, 2585,
- 2585, 201, 201, 2585, 2585, 2585, 2585, 2585,
- 2585, 2585, 201, 2585, 2585, 201, 2585, 2585,
- 2585, 2585, 2585, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
-
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 2586, 2586, 2586,
- 2586, 2586, 2586, 2586, 2586, 298, 298, 2587,
- 2587, 2587, 2587, 2587, 2587, 2587, 2587, 2587,
- 2588, 2588, 2588, 2588, 2588, 2588, 2588, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
-
- 2589, 2589, 2589, 2589, 2589, 2589, 2589, 2589,
- 2589, 2589, 2589, 2589, 2589, 2589, 2589, 2589,
- 2589, 2589, 2589, 2589, 2589, 2589, 2589, 2589,
- 2589, 2589, 2589, 2589, 2589, 2589, 2589, 2589,
- 2589, 2589, 2590, 2590, 2590, 2590, 2590, 2590,
- 2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
- 2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
- 2590, 2590, 2590, 2590, 2590, 2590, 2590, 2590,
- 2590, 2590, 2590, 2590, 2591, 2591, 2591, 2591,
- 2591, 2591, 2592, 298, 298, 298, 298, 298,
- 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600,
- 2601, 2602, 298, 298, 298, 298, 2603, 2603,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
-
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
- 298, 298, 298, 298, 298, 298, 298, 298,
-
- 2604, 2604, 2604, 2604, 344, 2604, 2604, 2604,
- 2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
- 2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
- 2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
- 344, 2604, 2604, 344, 2604, 344, 344, 2604,
- 344, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
- 2604, 2604, 2604, 344, 2604, 2604, 2604, 2604,
- 344, 2604, 344, 2604, 344, 344, 344, 344,
- 344, 344, 2604, 344, 344, 344, 344, 2604,
- 344, 2604, 344, 2604, 344, 2604, 2604, 2604,
- 344, 2604, 2604, 344, 2604, 344, 344, 2604,
- 344, 2604, 344, 2604, 344, 2604, 344, 2604,
- 344, 2604, 2604, 344, 2604, 344, 344, 2604,
- 2604, 2604, 2604, 344, 2604, 2604, 2604, 2604,
- 2604, 2604, 2604, 344, 2604, 2604, 2604, 2604,
- 344, 2604, 2604, 2604, 2604, 344, 2604, 344,
- 2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
- 2604, 2604, 344, 2604, 2604, 2604, 2604, 2604,
- 2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
- 2604, 2604, 2604, 2604, 344, 344, 344, 344,
- 344, 2604, 2604, 2604, 344, 2604, 2604, 2604,
- 2604, 2604, 344, 2604, 2604, 2604, 2604, 2604,
- 2604, 2604, 2604, 2604, 2604, 2604, 2604, 2604,
- 2604, 2604, 2604, 2604, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
- 2605, 2605, 344, 344, 344, 344, 344, 344,
- 344, 344, 344, 344, 344, 344, 344, 344,
-
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1682, 1682, 1682, 1682,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519,
- 1519, 1519, 1519, 1519, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1682,
- 1682, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1521,
- 1682, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1682, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 2606, 2606, 2607, 2608, 2609, 2610, 2611, 2612,
- 2613, 2614, 2615, 2616, 2616, 1682, 1682, 1682,
- 2617, 2617, 2617, 2617, 2617, 2617, 2617, 2617,
- 2617, 2617, 2617, 2617, 2617, 2617, 2617, 2617,
- 2617, 2617, 2617, 2617, 2617, 2617, 2617, 2617,
- 2617, 2617, 2617, 2617, 2617, 2617, 2617, 1682,
- 2618, 2619, 2618, 2618, 2618, 2618, 2618, 2618,
- 2618, 2618, 2618, 2618, 2618, 2619, 2618, 2619,
- 2618, 2618, 2619, 2618, 2618, 2618, 2619, 2618,
- 2618, 2618, 2617, 2617, 2617, 2617, 2617, 2620,
- 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2622,
- 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2622,
+ 2562, 2562, 2562, 2562, 2562, 202, 202, 202,
+ 2563, 2564, 2565, 2565, 2565, 2565, 2565, 2565,
+ 2565, 2565, 2565, 2565, 2565, 2565, 2565, 2565,
+ 2565, 2565, 2565, 2565, 2565, 2565, 2565, 2565,
+ 2565, 2565, 2565, 2565, 2565, 2565, 2565, 2565,
+ 202, 202, 2566, 2566, 2566, 2566, 2566, 2566,
+ 2566, 2566, 2566, 2566, 2566, 2566, 2566, 2566,
+ 2566, 2566, 2566, 2566, 2566, 2566, 2566, 2566,
+ 202, 2567, 2566, 2566, 2566, 2566, 2566, 2566,
+ 2566, 2567, 2566, 2566, 2567, 2566, 2566, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2568, 2568, 2568, 2568, 2568, 2568, 2568, 202,
+ 2568, 2568, 202, 2568, 2568, 2568, 2568, 2568,
+ 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568,
+ 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568,
+ 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568,
+ 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568,
+ 2568, 2569, 2569, 2569, 2569, 2569, 2569, 202,
+ 202, 202, 2569, 202, 2569, 2569, 202, 2569,
+ 2569, 2569, 2570, 2569, 2571, 2571, 2572, 2569,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2573, 2574, 2575, 2576, 2577, 2578, 2579, 2580,
+ 2581, 2582, 202, 202, 202, 202, 202, 202,
+ 2583, 2583, 2583, 2583, 2583, 2583, 202, 2583,
+ 2583, 202, 2583, 2583, 2583, 2583, 2583, 2583,
+ 2583, 2583, 2583, 2583, 2583, 2583, 2583, 2583,
+ 2583, 2583, 2583, 2583, 2583, 2583, 2583, 2583,
+ 2583, 2583, 2583, 2583, 2583, 2583, 2583, 2583,
+ 2583, 2583, 2584, 2584, 2584, 2584, 2584, 202,
+ 2585, 2585, 202, 2584, 2584, 2585, 2584, 2586,
+ 2583, 202, 202, 202, 202, 202, 202, 202,
+ 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594,
+ 2595, 2596, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
+ 2597, 2597, 2597, 2597, 2597, 2597, 2597, 2597,
+ 2597, 2597, 2597, 2598, 2598, 2599, 2599, 2600,
+ 2600, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2601, 2601, 2601, 2601, 2601, 2601, 2601, 2601,
+ 2601, 2601, 2601, 2601, 2601, 2601, 2601, 2601,
+ 2601, 2601, 2601, 2601, 2601, 2602, 2602, 2602,
+ 2602, 2602, 2602, 2602, 2602, 2603, 2603, 2603,
+ 2603, 2602, 2602, 2602, 2602, 2602, 2602, 2602,
+ 2602, 2602, 2602, 2602, 2602, 2602, 2602, 2602,
+ 2602, 2602, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 2604,
+
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2605,
+ 2605, 2605, 2605, 2605, 2605, 2605, 2605, 2606,
+ 2606, 2606, 2606, 2606, 2606, 2606, 2606, 2606,
+ 2606, 2606, 2606, 2606, 2606, 2606, 2606, 2606,
+ 2606, 2606, 2606, 2606, 2606, 2606, 2606, 2606,
+ 2606, 2606, 2606, 2606, 2606, 2606, 2606, 2606,
+ 2606, 2606, 2606, 2606, 2606, 2606, 2606, 2606,
+ 2606, 2607, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2608, 2608, 2608, 2608, 2608,
+ 2608, 2608, 2608, 2609, 2609, 2609, 2609, 2609,
+ 2609, 2609, 2609, 2609, 2609, 2609, 2609, 202,
+ 2610, 2610, 2610, 2610, 2611, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 2607, 2607, 2607, 2607,
+ 2607, 2607, 2607, 2607, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2613, 2613, 2613, 2614, 2614, 2614, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2614, 2612, 2612, 2612, 2613, 2614,
+ 2613, 2614, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2613, 2614, 2614, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 2612,
+ 2612, 2612, 2612, 2612, 2612, 2612, 2612, 202,
+ 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2616,
+ 2617, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2619, 2620,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618,
+ 2618, 2618, 2618, 2618, 2618, 2618, 2618, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
- 2621, 2621, 2623, 2623, 1682, 1682, 1682, 1682,
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
- 2621, 2622, 2621, 2622, 2622, 2621, 2621, 2622,
2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
- 2621, 2621, 796, 796, 796, 796, 2624, 2624,
- 2617, 2624, 2624, 2624, 2624, 2624, 2624, 2624,
- 2624, 2624, 2624, 2625, 2625, 2625, 2625, 2625,
- 2625, 2625, 2625, 2625, 2625, 2625, 2625, 2625,
- 2625, 2625, 2625, 2625, 2625, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 2626, 2626,
- 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
- 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
- 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626,
-
- 2627, 2628, 2628, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
- 1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
- 1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
- 1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
- 1675, 1675, 2628, 2628, 2628, 2628, 2628, 2628,
- 2628, 2628, 2628, 2629, 1682, 1682, 1682, 1682,
- 1675, 1675, 1675, 1675, 1675, 1675, 1675, 1675,
- 1675, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 2628, 2628, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 2630, 2630, 2630, 2630, 2630, 2630, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 2631, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 2632, 2632, 2632,
- 1482, 1482, 1482, 1482, 1482, 1482, 1521, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 2631, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 2631, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1521, 2632, 2632,
- 1482, 1482, 1482, 1482, 1482, 1523, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 2631, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1483, 1483, 1521, 1521,
- 1482, 1482, 1482, 1482, 2631, 1482, 1482, 1482,
- 2631, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1481, 1481, 1482,
- 1482, 1482, 1482, 1482, 1481, 1482, 1482, 1482,
- 1482, 1482, 1523, 1523, 1523, 1521, 1482, 1523,
- 1482, 1482, 1523, 2633, 2633, 1521, 1521, 2632,
- 2632, 2632, 2632, 2632, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 2631, 1482, 2631, 1482, 1482,
- 1482, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 2632, 2632, 2632, 2634, 2634, 2634, 2634, 2634,
-
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1521,
- 1482, 1521, 1523, 1523, 1482, 1482, 1523, 1523,
- 1523, 1523, 1523, 1523, 1523, 1523, 1523, 1523,
- 1523, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 2635, 2635,
- 2635, 2635, 1482, 1482, 1482, 1482, 1523, 1482,
- 1523, 1523, 1523, 1523, 1523, 1523, 1523, 1523,
- 1523, 1482, 1482, 1482, 1523, 1482, 1482, 1482,
- 1482, 1523, 1523, 1523, 1482, 1523, 1523, 1523,
- 1482, 1482, 1482, 2631, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1481, 1482, 1481, 1482, 1481, 1482, 1482, 1482,
- 1482, 1482, 1523, 1482, 1482, 1482, 1482, 1481,
- 1482, 1481, 1481, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 2631, 2631, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1521, 1482, 1482, 1482, 1482, 1521, 1521, 2632,
-
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1482, 1482, 2631,
- 1482, 1482, 1482, 1482, 2631, 1482, 1482, 1482,
- 1482, 1482, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1483, 1483,
- 2636, 2636, 2636, 2636, 1483, 1483, 1483, 1483,
- 1483, 1483, 1521, 2632, 2632, 2632, 2632, 2632,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 2633, 2633, 1521, 1521,
- 1521, 1521, 2637, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 2633, 1521, 1521, 1521, 1521, 2633, 2633, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 2638, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 2639, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1483, 1483, 1483, 1483,
- 1483, 1483, 1521, 1482, 1482, 1482, 1482, 1482,
-
- 2640, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 2640, 1482, 1482, 1482, 2640, 1482, 2640,
- 1482, 2640, 1482, 2640, 1482, 1482, 1482, 2640,
- 1482, 1482, 1482, 1482, 1482, 1482, 2640, 2640,
- 1482, 1482, 1482, 1482, 2640, 1482, 2640, 2640,
- 1482, 1482, 1482, 1482, 2640, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1521, 1521, 2632, 2632, 1523, 1523, 1523,
- 1482, 1482, 1482, 1523, 1523, 1523, 1523, 1523,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 2641, 2641,
- 2641, 2642, 2642, 2642, 1483, 1483, 1483, 1483,
- 2631, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 2631, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1523, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1482, 1482, 1482, 1482, 1523, 1523, 1523, 1482,
- 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482,
- 1523, 1482, 1482, 1482, 1482, 1482, 1521, 1521,
- 1521, 1521, 1521, 1521, 2633, 1521, 1521, 1521,
- 2632, 2638, 2638, 2630, 2630, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1521, 1521, 1521, 1521, 1521, 1521, 1521, 1521,
- 1521, 1521, 1521, 1521, 1521, 1682, 1682, 1682,
- 1521, 1521, 1521, 1521, 2638, 2638, 2638, 2630,
- 2630, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
- 1481, 1481, 1481, 1481, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1682, 1682, 1682, 1682,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1682, 1682, 1682, 1682, 1682, 1682,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483,
- 1483, 1483, 1483, 1483, 1483, 1483, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485,
- 1485, 1485, 1485, 1485, 1682, 1682, 1682, 1682,
- 2632, 2632, 2632, 2632, 2632, 2632, 2632, 2632,
- 2643, 2637, 2637, 2637, 2637, 2638, 2637, 2644,
- 2638, 2638, 2638, 2638, 2638, 2638, 2637, 2638,
- 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630,
- 2637, 2644, 2644, 2637, 2637, 2637, 2637, 2637,
- 2637, 2637, 2638, 2638, 2638, 2637, 2637, 1682,
- 2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
- 2638, 2638, 2638, 2638, 2630, 1682, 1682, 1682,
- 2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
- 2638, 2638, 2638, 2638, 2638, 2638, 2638, 2630,
- 2630, 2630, 2630, 2630, 2630, 2630, 2630, 2630,
- 2630, 2630, 2630, 2630, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 2632, 2632, 2632, 2632, 2632, 2638, 2638, 2638,
- 2638, 2638, 2638, 2638, 2638, 2638, 2638, 2638,
- 2638, 2638, 2630, 2630, 2630, 2630, 2630, 2630,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 2632, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 2630, 2644, 2644, 2644, 2644, 2644, 2644, 2644,
- 2644, 2644, 2644, 2644, 2644, 2644, 2630, 2630,
- 2630, 2630, 2630, 2630, 2630, 2630, 2630, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 2645, 2645,
-
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
-
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 2646,
- 2646, 2646, 2646, 2646, 2646, 2646, 2646, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
-
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1686, 1686, 1686,
- 1686, 1686, 1686, 1686, 1686, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
-
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 2647, 2647,
- 2647, 2647, 2647, 2647, 2647, 2647, 1682, 1682,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
-
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
-
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1688, 1688, 1688, 1688, 1688, 1688,
- 1688, 1688, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
-
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689,
- 1689, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
-
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 2648, 2648,
- 2648, 2648, 2648, 2648, 2648, 2648, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
- 1682, 1682, 1682, 1682, 1682, 1682, 1682, 1682,
-
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 201, 201,
- 201, 201, 201, 201, 201, 201, 2645, 2645,
-
- 1382, 2557, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 2649, 2649, 2649, 2649, 2649, 2649, 2649, 2649,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
-
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 2650, 2650, 2650, 2650, 2650, 2650, 2650, 2650,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
-
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
- 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
-
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
-
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2651, 2651,
- 2651, 2651, 2651, 2651, 2651, 2651, 2645, 2645
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 2621, 2621, 2621, 2621, 2621, 2621, 2621,
+ 2621, 202, 202, 202, 202, 202, 202, 202,
+ 2622, 2622, 2622, 2622, 2622, 2622, 2622, 2622,
+ 2622, 2622, 2622, 2622, 2622, 2622, 2622, 2622,
+ 2622, 2622, 2622, 2622, 2622, 2622, 2622, 2622,
+ 2622, 2622, 2622, 2622, 2622, 2622, 2622, 202,
+ 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630,
+ 2631, 2632, 202, 202, 202, 202, 2633, 2633,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
+ 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
+ 2634, 2634, 2634, 2634, 2634, 2634, 2634, 2634,
+ 2634, 2634, 2634, 2634, 2634, 2634, 202, 202,
+ 2635, 2635, 2635, 2635, 2635, 2636, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 2638, 2638, 2638, 2638, 2638, 2638, 2638, 2639,
+ 2639, 2640, 2641, 2641, 2642, 2642, 2642, 2642,
+ 2643, 2643, 2643, 2643, 2639, 2642, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651,
+ 2652, 2653, 202, 2654, 2654, 2654, 2654, 2654,
+ 2654, 2654, 202, 2637, 2637, 2637, 2637, 2637,
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 202, 202, 202, 202, 202, 2637, 2637, 2637,
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 2637, 2637, 2637, 2637, 2637, 2637, 2637, 2637,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2655, 2655, 2655, 2655, 2655, 2655, 2655, 2655,
+ 2655, 2655, 2655, 2655, 2655, 2655, 2655, 2655,
+ 2655, 2655, 2655, 2655, 2655, 2655, 2655, 2655,
+ 2655, 2655, 2655, 2655, 2655, 2655, 2655, 2655,
+ 2656, 2656, 2656, 2656, 2656, 2656, 2656, 2656,
+ 2656, 2656, 2656, 2656, 2656, 2656, 2656, 2656,
+ 2656, 2656, 2656, 2656, 2656, 2656, 2656, 2656,
+ 2656, 2656, 2656, 2656, 2656, 2656, 2656, 2656,
+ 2657, 2657, 2657, 2657, 2657, 2657, 2657, 2657,
+ 2657, 2657, 2657, 2657, 2657, 2657, 2657, 2657,
+ 2657, 2657, 2657, 2657, 2657, 2657, 2657, 2658,
+ 2659, 2660, 2660, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661,
+ 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661,
+ 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661,
+ 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661,
+ 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661,
+ 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661,
+ 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661,
+ 2661, 2661, 2661, 2661, 2661, 2661, 2661, 2661,
+ 2661, 2661, 2661, 2661, 2661, 2662, 2662, 2662,
+ 2662, 2662, 2662, 202, 202, 202, 202, 2663,
+ 2661, 2664, 2664, 2664, 2664, 2664, 2664, 2664,
+ 2664, 2664, 2664, 2664, 2664, 2664, 2664, 2664,
+ 2664, 2664, 2664, 2664, 2664, 2664, 2664, 2664,
+ 2664, 2664, 2664, 2664, 2664, 2664, 2664, 2664,
+ 2664, 2664, 2664, 2664, 2664, 2664, 2664, 2664,
+ 2664, 2664, 2664, 2664, 2664, 2664, 2664, 2665,
+ 2665, 2665, 2665, 2665, 2665, 2665, 2665, 2665,
+ 202, 202, 202, 202, 202, 202, 202, 2666,
+ 2666, 2666, 2666, 2667, 2667, 2667, 2667, 2667,
+ 2667, 2667, 2667, 2667, 2667, 2667, 2667, 2667,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2668, 2669, 2670, 2671, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2673, 2673, 2673,
+ 2673, 2673, 2674, 2674, 2674, 2674, 2674, 2674,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 2672, 2672, 2672, 2672, 2672,
+ 2672, 2672, 2672, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2675, 2676, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
+ 2677, 2677, 2677, 2677, 2677, 2677, 2677, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2678, 2678, 2678, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 2679, 2679, 2679, 2679,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 2680, 2680, 2680, 2680,
+ 2680, 2680, 2680, 2680, 202, 202, 202, 202,
+
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 202, 202, 202, 202, 202,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 2681, 2681, 2681, 202, 202, 202,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 202, 202, 202, 202, 202, 202, 202,
+ 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681,
+ 2681, 2681, 202, 202, 2682, 2683, 2684, 2685,
+ 2686, 2686, 2686, 2686, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 202,
+ 202, 1461, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2688, 2688,
+ 2688, 2688, 2688, 2688, 2688, 2689, 2690, 2691,
+ 2691, 2691, 2687, 2687, 2687, 2692, 2689, 2689,
+ 2689, 2689, 2689, 2693, 2693, 2693, 2693, 2693,
+ 2693, 2693, 2693, 2694, 2694, 2694, 2694, 2694,
+ 2694, 2694, 2694, 2687, 2687, 2695, 2695, 2695,
+ 2695, 2695, 2694, 2694, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2695, 2695, 2695, 2695, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2688, 2688, 2688, 2688, 2688,
+ 2688, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2687, 2687,
+ 2687, 2687, 2687, 2687, 2687, 2687, 2696, 2696,
+ 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696,
+ 2696, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
+ 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
+ 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
+ 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
+ 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
+ 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
+ 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
+ 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115,
+ 2115, 2115, 2697, 2697, 2697, 2115, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2698, 2698, 2698, 2698, 2698, 2698, 2698, 2698,
+ 2698, 2698, 2698, 2698, 2698, 2698, 2698, 2698,
+ 2698, 2698, 2698, 2698, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 1503,
+ 1503, 1503, 1503, 1503, 1503, 1503, 1503, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2699, 2699, 2699, 2699, 2699, 2699, 2699, 2699,
+ 2699, 2699, 2699, 2699, 2699, 2699, 2699, 2699,
+ 2699, 2699, 2698, 2698, 2698, 2698, 2698, 2698,
+ 2698, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 202, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2700, 202, 2700, 2700,
+ 202, 202, 2700, 202, 202, 2700, 2700, 202,
+ 202, 2700, 2700, 2700, 2700, 202, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2701, 2701,
+ 2701, 2701, 202, 2701, 202, 2701, 2701, 2701,
+ 2701, 2702, 2701, 2701, 202, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+
+ 2701, 2701, 2701, 2701, 2700, 2700, 202, 2700,
+ 2700, 2700, 2700, 202, 202, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 202, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 202, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2700, 2700, 202, 2700, 2700, 2700, 2700, 202,
+ 2700, 2700, 2700, 2700, 2700, 202, 2700, 202,
+ 202, 202, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 202, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 1453, 1453, 202, 202,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2703, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2704, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2703, 2701, 2701, 2701, 2701,
+
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2704, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2703, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2704,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2703,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2704, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700,
+ 2700, 2703, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2701, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2701, 2704, 2701, 2701, 2701, 2701,
+ 2701, 2701, 2705, 2706, 202, 202, 2707, 2708,
+ 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716,
+ 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2714,
+ 2715, 2716, 2707, 2708, 2709, 2710, 2711, 2712,
+ 2713, 2714, 2715, 2716, 2707, 2708, 2709, 2710,
+ 2711, 2712, 2713, 2714, 2715, 2716, 2707, 2708,
+ 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716,
+
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2717,
+ 2717, 2717, 2717, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2718, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2717, 2717, 2717, 2717,
+ 2717, 2717, 2717, 2717, 2718, 2717, 2717, 2719,
+ 2720, 2719, 2719, 2721, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 2718, 2718, 2718, 2718, 2718,
+ 202, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 2718, 2718, 2718, 2718, 2718, 2718, 2718, 2718,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2722, 2722, 2722, 2722, 2722, 2722, 2722, 202,
+ 2722, 2722, 2722, 2722, 2722, 2722, 2722, 2722,
+ 2722, 2722, 2722, 2722, 2722, 2722, 2722, 2722,
+ 2722, 202, 202, 2722, 2722, 2722, 2722, 2722,
+ 2722, 2722, 202, 2722, 2722, 202, 2722, 2722,
+ 2722, 2722, 2722, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723,
+ 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723,
+ 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723,
+ 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723,
+ 2723, 2723, 2723, 2723, 2723, 2723, 2723, 2723,
+ 2723, 2723, 2723, 2723, 2723, 202, 202, 202,
+ 2724, 2724, 2724, 2724, 2724, 2724, 2724, 2725,
+ 2725, 2725, 2725, 2725, 2725, 2725, 202, 202,
+ 2726, 2727, 2728, 2729, 2730, 2731, 2732, 2733,
+ 2734, 2735, 202, 202, 202, 202, 2723, 2736,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 2737, 2737, 2737, 2737, 2737, 2737, 2737, 2737,
+ 2737, 2737, 2737, 2737, 2737, 2737, 2737, 2737,
+ 2737, 2737, 2737, 2737, 2737, 2737, 2737, 2737,
+ 2737, 2737, 2737, 2737, 2737, 2737, 2737, 2737,
+ 2737, 2737, 2737, 2737, 2737, 2737, 2737, 2737,
+ 2737, 2737, 2737, 2737, 2738, 2738, 2738, 2738,
+ 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2746,
+ 2747, 2748, 202, 202, 202, 202, 202, 2749,
+
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 2750, 2750, 2750,
+ 2750, 2750, 2750, 2750, 2750, 301, 301, 2751,
+ 2751, 2751, 2751, 2751, 2751, 2751, 2751, 2751,
+ 2752, 2752, 2752, 2752, 2752, 2752, 2752, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 2753, 2753, 2753, 2753, 2753, 2753, 2753, 2753,
+ 2753, 2753, 2753, 2753, 2753, 2753, 2753, 2753,
+ 2753, 2753, 2753, 2753, 2753, 2753, 2753, 2753,
+ 2753, 2753, 2753, 2753, 2753, 2753, 2753, 2753,
+ 2753, 2753, 2754, 2754, 2754, 2754, 2754, 2754,
+ 2754, 2754, 2754, 2754, 2754, 2754, 2754, 2754,
+ 2754, 2754, 2754, 2754, 2754, 2754, 2754, 2754,
+ 2754, 2754, 2754, 2754, 2754, 2754, 2754, 2754,
+ 2754, 2754, 2754, 2754, 2755, 2755, 2755, 2755,
+ 2755, 2755, 2756, 2757, 301, 301, 301, 301,
+ 2758, 2759, 2760, 2761, 2762, 2763, 2764, 2765,
+ 2766, 2767, 301, 301, 301, 301, 2768, 2768,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 2769, 2769, 2769, 2769, 2769, 2769, 2769,
+ 2769, 2769, 2769, 2769, 2769, 2769, 2769, 2769,
+ 2769, 2769, 2769, 2769, 2769, 2769, 2769, 2769,
+ 2769, 2769, 2769, 2769, 2769, 2769, 2769, 2769,
+ 2769, 2769, 2769, 2769, 2769, 2769, 2769, 2769,
+ 2769, 2769, 2769, 2769, 2769, 2769, 2769, 2769,
+ 2769, 2769, 2769, 2769, 2769, 2769, 2769, 2769,
+ 2769, 2769, 2769, 2769, 2770, 2769, 2769, 2769,
+ 2771, 2769, 2769, 2769, 2769, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 301, 2772, 2772, 2772, 2772, 2772, 2772, 2772,
+ 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772,
+ 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772,
+ 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772,
+ 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772,
+ 2772, 2772, 2772, 2772, 2772, 2772, 2773, 2772,
+ 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772,
+ 2772, 2772, 2772, 2772, 2772, 2772, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+
+ 2774, 2774, 2774, 2774, 348, 2774, 2774, 2774,
+ 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774,
+ 348, 2774, 2774, 348, 2774, 348, 348, 2774,
+ 348, 2774, 2774, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 348, 2774, 2774, 2774, 2774,
+ 348, 2774, 348, 2774, 348, 348, 348, 348,
+ 348, 348, 2774, 348, 348, 348, 348, 2774,
+ 348, 2774, 348, 2774, 348, 2774, 2774, 2774,
+ 348, 2774, 2774, 348, 2774, 348, 348, 2774,
+ 348, 2774, 348, 2774, 348, 2774, 348, 2774,
+ 348, 2774, 2774, 348, 2774, 348, 348, 2774,
+ 2774, 2774, 2774, 348, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 348, 2774, 2774, 2774, 2774,
+ 348, 2774, 2774, 2774, 2774, 348, 2774, 348,
+ 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 348, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 2774, 348, 348, 348, 348,
+ 348, 2774, 2774, 2774, 348, 2774, 2774, 2774,
+ 2774, 2774, 348, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 2774, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+ 2775, 2775, 348, 348, 348, 348, 348, 348,
+ 348, 348, 348, 348, 348, 348, 348, 348,
+
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1717, 1717, 1717, 1717,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
+ 1542, 1542, 1542, 1542, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1717,
+ 1717, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1544,
+ 1717, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1717, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 2776, 2776, 2777, 2778, 2779, 2780, 2781, 2782,
+ 2783, 2784, 2785, 2786, 2786, 1717, 1717, 1717,
+ 2787, 2787, 2787, 2787, 2787, 2787, 2787, 2787,
+ 2787, 2787, 2787, 2787, 2787, 2787, 2787, 2787,
+ 2787, 2787, 2787, 2787, 2787, 2787, 2787, 2787,
+ 2787, 2787, 2787, 2787, 2787, 2787, 2787, 1592,
+ 2788, 2789, 2788, 2788, 2788, 2788, 2788, 2788,
+ 2788, 2788, 2788, 2788, 2788, 2789, 2788, 2789,
+ 2788, 2788, 2789, 2788, 2788, 2788, 2789, 2788,
+ 2788, 2788, 2787, 2787, 2787, 2787, 2787, 2790,
+ 2791, 2791, 2791, 2791, 2791, 2791, 2791, 2792,
+ 2791, 2791, 2791, 2791, 2791, 2791, 2791, 2792,
+ 2791, 2791, 2791, 2791, 2791, 2791, 2791, 2791,
+ 2791, 2791, 2793, 2793, 2794, 1717, 1717, 1717,
+ 2791, 2791, 2791, 2791, 2791, 2791, 2791, 2791,
+ 2791, 2792, 2791, 2792, 2792, 2791, 2791, 2792,
+ 2791, 2791, 2791, 2791, 2791, 2791, 2791, 2791,
+ 2791, 2791, 810, 810, 810, 810, 2795, 2795,
+ 2787, 2795, 2795, 2795, 2795, 2795, 2795, 2795,
+ 2795, 2795, 2795, 2796, 2796, 2796, 2796, 2796,
+ 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796,
+ 2796, 2796, 2796, 2796, 2796, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 2797, 2797,
+ 2797, 2797, 2797, 2797, 2797, 2797, 2797, 2797,
+ 2797, 2797, 2797, 2797, 2797, 2797, 2797, 2797,
+ 2797, 2797, 2797, 2797, 2797, 2797, 2797, 2797,
+
+ 2798, 2799, 2799, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1709, 1709, 1709, 1709, 1709, 1709, 1709, 1709,
+ 1709, 1709, 1709, 1709, 1709, 1709, 1709, 1709,
+ 1709, 1709, 1709, 1709, 1709, 1709, 1709, 1709,
+ 1709, 1709, 1709, 1709, 1709, 1709, 1709, 1709,
+ 1709, 1709, 2799, 2799, 2799, 2799, 2799, 2799,
+ 2799, 2799, 2799, 2800, 1717, 1717, 1717, 1717,
+ 1709, 1709, 1709, 1709, 1709, 1709, 1709, 1709,
+ 1709, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 2799, 2799, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 2801, 2801, 2801, 2801, 2801, 2801, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 2802, 2802, 2802,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1544, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1544, 2802, 2802,
+ 1507, 1507, 1507, 1507, 1507, 1545, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1508, 1508, 1544, 1544,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1506, 1506, 1507,
+ 1507, 1507, 1507, 1507, 1506, 1507, 1507, 1507,
+ 1507, 1507, 1545, 1545, 1545, 1544, 1507, 1545,
+ 1507, 1507, 1545, 2803, 2803, 1544, 1544, 2802,
+ 2802, 2802, 2802, 2802, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 2802, 2802, 2802, 2804, 2804, 2804, 2804, 2804,
+
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1544,
+ 1507, 1544, 1545, 1545, 1507, 1507, 1545, 1545,
+ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545,
+ 1545, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1545, 1545,
+ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545,
+ 1545, 1545, 1545, 1545, 1545, 1545, 1545, 1545,
+ 1545, 1507, 1507, 1507, 1545, 1507, 1507, 1507,
+ 1507, 1545, 1545, 1545, 1507, 1545, 1545, 1545,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1545,
+ 1507, 1545, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1506, 1507, 1506, 1507, 1506, 1507, 1507, 1507,
+ 1507, 1507, 1545, 1507, 1507, 1507, 1507, 1506,
+ 1507, 1506, 1506, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1544, 1507, 1507, 1507, 1507, 1544, 1544, 2802,
+
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1508, 1508,
+ 2805, 2805, 2805, 2805, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1544, 2802, 2802, 2802, 2802, 2802,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 2803, 2803, 1544, 1544,
+ 1544, 1544, 2806, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 2803, 1544, 1544, 1544, 1544, 2803, 2803, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 2807, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1544, 1507, 1507, 1507, 1507, 1507,
+
+ 2808, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 2808, 1507, 1507, 1507, 2808, 1507, 2808,
+ 1507, 2808, 1507, 2808, 1507, 1507, 1507, 2808,
+ 1507, 1507, 1507, 1507, 1507, 1507, 2808, 2808,
+ 1507, 1507, 1507, 1507, 2808, 1507, 2808, 2808,
+ 1507, 1507, 1507, 1507, 2808, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1544, 1544, 2802, 2802, 1545, 1545, 1545,
+ 1507, 1507, 1507, 1545, 1545, 1545, 1545, 1545,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 2809, 2809,
+ 2809, 2810, 2810, 2810, 1508, 1508, 1508, 1508,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1545, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1507, 1507, 1507, 1507, 1545, 1545, 1545, 1507,
+ 1507, 1507, 1507, 1507, 1507, 1507, 1507, 1507,
+ 1545, 1507, 1507, 1507, 1507, 1507, 1544, 1544,
+ 1544, 1544, 1544, 1544, 2803, 1544, 1544, 1544,
+ 2802, 2807, 2807, 2801, 2801, 2811, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
+ 1544, 1544, 1544, 1544, 1544, 1717, 1717, 1717,
+ 1544, 1544, 1544, 1544, 2807, 2807, 2807, 2801,
+ 2801, 2812, 2811, 1717, 1717, 1717, 1717, 1717,
+
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1506, 1506, 1506, 1506,
+ 1506, 1506, 1506, 1506, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 2812, 2812, 2812,
+ 2812, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 2811, 2811, 2811, 2811, 2811, 2811, 2811, 2811,
+ 2811, 2811, 2811, 2811, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1717, 1717, 1717, 1717,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508,
+ 1508, 1508, 1508, 1508, 1508, 1508, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 1510, 1510, 1510, 1510, 1510, 1510, 1510, 1510,
+ 1510, 1510, 1510, 1510, 1717, 2811, 2811, 2813,
+ 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802,
+ 2814, 2806, 2806, 2806, 2806, 2806, 2806, 2815,
+ 2807, 2807, 2807, 2807, 2807, 2807, 2806, 2807,
+ 2801, 2801, 2801, 2801, 2801, 2801, 2801, 2801,
+ 2806, 2815, 2815, 2806, 2806, 2806, 2806, 2806,
+ 2806, 2806, 2807, 2807, 2806, 2806, 2806, 2811,
+ 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807,
+ 2807, 2807, 2807, 2807, 2801, 2812, 2812, 2812,
+ 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807,
+ 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2801,
+ 2801, 2801, 2801, 2801, 2801, 2801, 2801, 2801,
+ 2801, 2801, 2801, 2801, 2812, 2812, 2812, 2812,
+ 2812, 2811, 1717, 2812, 2812, 2812, 2812, 1717,
+ 1717, 1717, 2812, 2811, 2812, 2812, 2812, 2812,
+ 2802, 2802, 2802, 2802, 2802, 2807, 2807, 2807,
+ 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807,
+ 2807, 2807, 2801, 2801, 2801, 2801, 2801, 2801,
+ 2812, 2812, 2812, 2812, 2812, 2812, 2812, 2812,
+ 2812, 2812, 2812, 1717, 1717, 2811, 2811, 2811,
+ 2811, 2811, 2811, 1717, 1717, 1717, 2811, 2811,
+ 2812, 2812, 2812, 2812, 2812, 2816, 2816, 2812,
+ 2816, 2816, 2811, 2813, 2811, 2811, 2811, 2811,
+ 2802, 2812, 2812, 2811, 2811, 2811, 2811, 2811,
+ 2811, 2811, 2811, 1717, 1717, 2813, 2813, 2813,
+ 2801, 2815, 2815, 2815, 2815, 2815, 2815, 2815,
+ 2815, 2815, 2815, 2815, 2815, 2815, 2801, 2801,
+ 2801, 2801, 2801, 2801, 2801, 2801, 2801, 2812,
+ 2812, 2812, 2812, 2812, 2812, 2812, 2812, 2812,
+ 2812, 2812, 2812, 2812, 2812, 2812, 2812, 2812,
+ 2812, 2812, 2812, 2812, 2812, 2812, 2812, 2812,
+
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1593, 1593, 1593, 1593,
+ 1593, 1593, 1593, 1593, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 2812, 2812, 2812, 2812, 2812, 2812, 2812, 2812,
+ 2812, 2812, 2812, 2812, 2812, 2812, 1717, 1717,
+ 2811, 2811, 2811, 2811, 1717, 1717, 1717, 1717,
+ 2811, 2811, 2811, 1717, 1717, 1717, 1717, 1717,
+ 2811, 2811, 2811, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 2811, 2811, 2811, 2811, 2811, 2811, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 2817, 2817,
+
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 2818,
+ 2818, 2818, 2818, 2818, 2818, 2818, 2818, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1721, 1721, 1721,
+ 1721, 1721, 1721, 1721, 1721, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 2819, 2819,
+ 2819, 2819, 2819, 2819, 2819, 2819, 1717, 1717,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1723, 1723, 1723, 1723, 1723, 1723,
+ 1723, 1723, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1724, 1724, 1724, 1724, 1724, 1724, 1724,
+ 1724, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820,
+ 2820, 2820, 2820, 2820, 2820, 2820, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+ 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717,
+
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 2817, 2817,
+
+ 1399, 2693, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823,
+ 2823, 2823, 2823, 2823, 2823, 2823, 2817, 2817
};
#define GET_PROP_INDEX(ucs4) \
@@ -6157,7 +6489,7 @@ static const Properties uc_properties[] = {
{ 9, 7, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 1, 1, 36, 1, 2 },
{ 9, 7, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 0, 21, 0, 2 },
{ 9, 8, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 0, 21, 0, 2 },
- { 6, 9, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 35, 5, 2 },
+ { 6, 9, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 22, 35, 5, 2 },
{ 25, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 6, 12, 2 },
{ 25, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 12, 3, 13, 2 },
{ 25, 4, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
@@ -6216,19 +6548,19 @@ static const Properties uc_properties[] = {
{ 24, 10, 0, 0, -1, -16, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 3, 13, 2 },
{ 5, 10, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, 32}, {0, 0}, {0, 0}, {0, 32} }, 0, 10, 12, 7, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {1, 410}, {1, 407}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {1, 418}, {1, 415}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, -32}, {0, -32}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, 121}, {0, 121}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 14, 0, 0, 0, -1, 0, 1, 0, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 14, 0, 0, 0, -1, 0, 1, 17, { {1, 413}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 1, 17, { {1, 421}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -232}, {0, -232}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 14, 0, 0, 0, -1, 0, 1, 80, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 492}, {1, 492}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 500}, {1, 500}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, -121}, {0, 0}, {0, 0}, {0, -121} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, -300}, {0, -300}, {0, -268} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 195}, {0, 195}, {0, 0} }, 0, 10, 12, 6, 3 },
@@ -6255,7 +6587,7 @@ static const Properties uc_properties[] = {
{ 16, 0, 0, 0, -1, 0, 1, 80, { {0, 1}, {0, -1}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, -2}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -79}, {0, -79}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 503}, {1, 503}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 511}, {1, 511}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 14, 0, 0, 0, -1, 0, 4, 0, { {0, -97}, {0, 0}, {0, 0}, {0, -97} }, 0, 10, 12, 7, 3 },
{ 14, 0, 0, 0, -1, 0, 4, 0, { {0, -56}, {0, 0}, {0, 0}, {0, -56} }, 0, 10, 12, 7, 3 },
{ 14, 0, 0, 0, -1, 0, 4, 17, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
@@ -6301,12 +6633,13 @@ static const Properties uc_properties[] = {
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {1, 31}, {1, 31}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -218}, {0, -218}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {1, 33}, {1, 33}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {1, 35}, {1, 35}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -69}, {0, -69}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -217}, {0, -217}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -71}, {0, -71}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -219}, {0, -219}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {1, 35}, {1, 35}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {1, 37}, {1, 37}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {1, 39}, {1, 39}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 17, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 17, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 2 },
@@ -6362,12 +6695,12 @@ static const Properties uc_properties[] = {
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, 37}, {0, 0}, {0, 0}, {0, 37} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, 64}, {0, 0}, {0, 0}, {0, 64} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, 63}, {0, 0}, {0, 0}, {0, 63} }, 0, 10, 12, 7, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 495}, {1, 495}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 503}, {1, 503}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 0, { {0, 32}, {0, 0}, {0, 0}, {0, 32} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, 32}, {0, 0}, {0, 0}, {0, 32} }, 0, 10, 12, 7, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, -38}, {0, -38}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, -37}, {0, -37}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 499}, {1, 499}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 507}, {1, 507}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -32}, {0, -32}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -31}, {0, -31}, {0, 1} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, -32}, {0, -32}, {0, 0} }, 0, 10, 12, 6, 4 },
@@ -6440,9 +6773,11 @@ static const Properties uc_properties[] = {
{ 14, 0, 0, 0, -1, 0, 1, 0, { {0, 48}, {0, 0}, {0, 0}, {0, 48} }, 0, 10, 12, 7, 6 },
{ 17, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 6 },
{ 25, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 6 },
+ { 25, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 0, 6 },
{ 25, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 11, 6 },
+ { 15, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 6 },
{ 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, -48}, {0, -48}, {0, 0} }, 0, 10, 12, 6, 6 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 459}, {1, 456}, {0, 0} }, 0, 10, 12, 6, 6 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 467}, {1, 464}, {0, 0} }, 0, 10, 12, 6, 6 },
{ 25, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 15, 8, 12, 2 },
{ 20, 10, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 6 },
{ 29, 10, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 6 },
@@ -6475,6 +6810,7 @@ static const Properties uc_properties[] = {
{ 25, 1, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 6, 0, 7 },
{ 0, 17, 18, 5, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 7 },
{ 18, 1, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 9, 13, 8, 7 },
+ { 18, 1, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 9, 13, 8, 7 },
{ 25, 1, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 7 },
{ 25, 1, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 14, 12, 0, 7 },
{ 10, 5, 0, 0, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 7, 6, 12, 4, 8 },
@@ -6494,7 +6830,7 @@ static const Properties uc_properties[] = {
{ 25, 13, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 6, 0, 2 },
{ 10, 13, 0, 5, -1, 0, 15, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 6, 21, 4, 8 },
{ 13, 13, 0, 0, -1, 0, 0, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 0 },
- { 25, 13, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 6, 0, 8 },
+ { 25, 13, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 6, 12, 8 },
{ 25, 13, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 6, 12, 2 },
{ 18, 13, 0, 2, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 8 },
{ 18, 13, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 8 },
@@ -6592,10 +6928,13 @@ static const Properties uc_properties[] = {
{ 25, 10, 0, 0, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 15, 8, 11, 66 },
{ 25, 10, 0, 0, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 6, 12, 66 },
{ 17, 1, 0, 1, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 66 },
+ { 0, 17, 220, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 66 },
+ { 27, 1, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 9, 0, 66 },
{ 18, 1, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 82 },
{ 0, 17, 230, 5, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 82 },
{ 17, 1, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 82 },
{ 25, 1, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 82 },
+ { 25, 1, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 12, 82 },
{ 18, 1, 0, 3, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 95 },
{ 18, 1, 0, 2, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 95 },
{ 18, 1, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 95 },
@@ -6612,6 +6951,7 @@ static const Properties uc_properties[] = {
{ 18, 13, 0, 2, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 8 },
{ 18, 13, 0, 2, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 8 },
{ 18, 13, 0, 3, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 8 },
+ { 0, 17, 220, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 8 },
{ 0, 17, 230, 5, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 8 },
{ 10, 5, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 7, 6, 12, 4, 2 },
{ 0, 17, 220, 5, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 8 },
@@ -6632,7 +6972,6 @@ static const Properties uc_properties[] = {
{ 0, 17, 7, 5, -1, 0, 1, 204, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 11 },
{ 0, 17, 9, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 11 },
{ 1, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 11 },
- { 0, 17, 230, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 11 },
{ 18, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 11 },
{ 25, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 12, 2 },
{ 3, 0, 0, 0, 0, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 11 },
@@ -6681,6 +7020,7 @@ static const Properties uc_properties[] = {
{ 27, 4, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 9, 0, 12 },
{ 18, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 12 },
{ 25, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 12 },
+ { 0, 17, 230, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 12 },
{ 0, 17, 0, 5, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 13 },
{ 0, 17, 0, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 13 },
{ 1, 0, 0, 0, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 13 },
@@ -6700,6 +7040,7 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 7, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 13 },
{ 3, 0, 0, 0, 8, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 13 },
{ 3, 0, 0, 0, 9, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 13 },
+ { 25, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 13 },
{ 0, 17, 0, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 14 },
{ 1, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 14 },
{ 18, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 14 },
@@ -6768,6 +7109,7 @@ static const Properties uc_properties[] = {
{ 27, 4, 0, 0, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 9, 0, 16 },
{ 0, 17, 0, 5, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 17 },
{ 1, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 17 },
+ { 0, 17, 0, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 17 },
{ 18, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 17 },
{ 18, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 17 },
{ 18, 0, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 17 },
@@ -6788,11 +7130,13 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 7, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 17 },
{ 3, 0, 0, 0, 8, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 17 },
{ 3, 0, 0, 0, 9, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 17 },
+ { 25, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 18, 0, 17 },
{ 5, 10, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 17 },
{ 29, 0, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 17 },
{ 18, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 18 },
{ 0, 17, 0, 5, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 18 },
{ 1, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 18 },
+ { 25, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 18, 0, 18 },
{ 18, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 18 },
{ 0, 17, 7, 5, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 18 },
{ 18, 0, 0, 0, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 18 },
@@ -6879,9 +7223,11 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 9, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 21 },
{ 25, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 21 },
{ 18, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 33, 8, 22 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 33, 8, 22 },
{ 0, 17, 0, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 33, 4, 22 },
{ 18, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 0, 33, 8, 22 },
{ 0, 17, 118, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 33, 4, 22 },
+ { 0, 17, 9, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 33, 4, 22 },
{ 17, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 33, 8, 22 },
{ 0, 17, 122, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 33, 4, 22 },
{ 3, 0, 0, 0, 0, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 22 },
@@ -6988,12 +7334,12 @@ static const Properties uc_properties[] = {
{ 29, 0, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 33, 0, 24 },
{ 14, 0, 0, 0, -1, 0, 1, 0, { {0, 7264}, {0, 0}, {0, 0}, {0, 7264} }, 0, 10, 12, 7, 25 },
{ 14, 0, 0, 0, -1, 0, 13, 0, { {0, 7264}, {0, 0}, {0, 0}, {0, 7264} }, 0, 10, 12, 7, 25 },
- { 18, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 25 },
- { 18, 0, 0, 0, -1, 0, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 25 },
- { 18, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 25 },
+ { 15, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 3008}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 25 },
+ { 15, 0, 0, 0, -1, 0, 6, 0, { {0, 0}, {0, 3008}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 25 },
+ { 15, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 3008}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 25 },
{ 25, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 17, 0, 0, 0, -1, 0, 8, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 25 },
- { 18, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 25 },
+ { 15, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 3008}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 25 },
{ 18, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 9, 10, 25, 8, 26 },
{ 18, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 9, 10, 25, 8, 26 },
{ 18, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 10, 10, 26, 8, 26 },
@@ -7021,7 +7367,6 @@ static const Properties uc_properties[] = {
{ 5, 0, 0, 0, 9, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 27 },
{ 5, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 27 },
{ 29, 10, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 27 },
- { 14, 0, 0, 0, -1, 0, 4, 0, { {1, 39}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
{ 14, 0, 0, 0, -1, 0, 4, 0, { {1, 41}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
{ 14, 0, 0, 0, -1, 0, 4, 0, { {1, 43}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
{ 14, 0, 0, 0, -1, 0, 4, 0, { {1, 45}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
@@ -7101,15 +7446,16 @@ static const Properties uc_properties[] = {
{ 14, 0, 0, 0, -1, 0, 4, 0, { {1, 193}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
{ 14, 0, 0, 0, -1, 0, 4, 0, { {1, 195}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
{ 14, 0, 0, 0, -1, 0, 4, 0, { {1, 197}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
+ { 14, 0, 0, 0, -1, 0, 4, 0, { {1, 199}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
{ 14, 0, 0, 0, -1, 0, 4, 0, { {0, 8}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
{ 14, 0, 0, 0, -1, 0, 17, 0, { {0, 8}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 28 },
{ 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, -8}, {0, -8}, {0, -8} }, 0, 10, 12, 6, 28 },
{ 20, 10, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 29 },
{ 18, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 29 },
- { 25, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 29 },
+ { 29, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 29 },
{ 25, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 12, 29 },
{ 18, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 29 },
- { 6, 9, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 5, 30 },
+ { 6, 9, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 22, 17, 5, 30 },
{ 18, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 30 },
{ 21, 10, 0, 0, -1, 1, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 0, 13, 30 },
{ 22, 10, 0, 0, -1, -1, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 1, 13, 30 },
@@ -7173,6 +7519,7 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 9, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 33 },
{ 18, 0, 0, 2, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 33 },
{ 17, 0, 0, 2, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 33 },
+ { 18, 0, 0, 2, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 33 },
{ 18, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 33 },
{ 0, 17, 228, 5, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 33 },
{ 18, 0, 0, 2, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 33 },
@@ -7245,7 +7592,7 @@ static const Properties uc_properties[] = {
{ 18, 0, 0, 0, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 62 },
{ 18, 0, 0, 0, -1, 0, 9, 17, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 62 },
{ 0, 17, 7, 5, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 62 },
- { 1, 0, 0, 0, -1, 0, 9, 204, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 62 },
+ { 1, 0, 0, 0, -1, 0, 9, 204, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 62 },
{ 1, 0, 0, 0, -1, 0, 9, 17, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 62 },
{ 1, 0, 9, 0, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 62 },
{ 3, 0, 0, 0, 0, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 62 },
@@ -7323,7 +7670,8 @@ static const Properties uc_properties[] = {
{ 15, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, -6243}, {0, -6243}, {0, -6211} }, 0, 10, 12, 6, 5 },
{ 15, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, -6236}, {0, -6236}, {0, -6204} }, 0, 10, 12, 6, 5 },
{ 15, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, -6181}, {0, -6181}, {0, -6180} }, 0, 10, 12, 6, 5 },
- { 15, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {1, 199}, {1, 199}, {1, 711} }, 0, 10, 12, 6, 5 },
+ { 15, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {1, 201}, {1, 201}, {1, 719} }, 0, 10, 12, 6, 5 },
+ { 14, 0, 0, 0, -1, 0, 20, 0, { {0, -3008}, {0, 0}, {0, 0}, {0, -3008} }, 0, 10, 12, 8, 25 },
{ 25, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 67 },
{ 0, 17, 230, 5, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
{ 25, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
@@ -7331,18 +7679,19 @@ static const Properties uc_properties[] = {
{ 0, 17, 220, 5, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
{ 1, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 2 },
{ 18, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 2 },
- { 1, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 2 },
- { 0, 17, 230, 5, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
{ 18, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 2 },
+ { 0, 17, 230, 5, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
{ 1, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 2 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 2 },
{ 15, 0, 0, 0, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 5 },
{ 17, 0, 0, 0, -1, 0, 7, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 17, 0, 0, 0, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 17, 0, 0, 0, -1, 0, 7, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 17, 0, 0, 0, -1, 0, 8, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 5 },
- { 15, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {1, 201}, {1, 201}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {1, 203}, {1, 203}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 3814}, {0, 3814}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {1, 205}, {1, 205}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 17, 0, 0, 0, -1, 0, 8, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 17, 0, 0, 0, -1, 0, 8, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 0, 17, 230, 5, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
@@ -7357,11 +7706,11 @@ static const Properties uc_properties[] = {
{ 0, 17, 220, 5, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
{ 0, 17, 230, 5, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
{ 0, 17, 233, 5, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 506}, {1, 506}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 509}, {1, 509}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 512}, {1, 512}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 515}, {1, 515}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 518}, {1, 518}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 514}, {1, 514}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 517}, {1, 517}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 520}, {1, 520}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 523}, {1, 523}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 526}, {1, 526}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 2, 81, { {0, 0}, {0, -59}, {0, -59}, {0, -58} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 14, 0, 0, 0, -1, 0, 10, 0, { {0, -7615}, {0, 0}, {0, 0}, {0, -7615} }, 0, 10, 12, 7, 3 },
@@ -7369,10 +7718,10 @@ static const Properties uc_properties[] = {
{ 15, 0, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, 8}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {0, 0}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 521}, {1, 521}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 524}, {1, 524}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 528}, {1, 528}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 529}, {1, 529}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 532}, {1, 532}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 536}, {1, 536}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 540}, {1, 540}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, 74}, {0, 74}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 74}, {0, 74}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, 86}, {0, 86}, {0, 0} }, 0, 10, 12, 6, 4 },
@@ -7385,101 +7734,101 @@ static const Properties uc_properties[] = {
{ 15, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 112}, {0, 112}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, 126}, {0, 126}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 126}, {0, 126}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 570}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 573}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 576}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 579}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 582}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 585}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 588}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 591}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 570}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 573}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 576}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 579}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 582}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 585}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 588}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 591}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 594}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 597}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 600}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 603}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 606}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 609}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 612}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 615}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 594}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 597}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 600}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 603}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 606}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 609}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 612}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 615}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 618}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 621}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 624}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 627}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 630}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 633}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 636}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 639}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 618}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 621}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 624}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 627}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 630}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 633}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 636}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 639}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 654}, {1, 651}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 642}, {0, 9}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 660}, {1, 657}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 536}, {1, 536}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 691}, {1, 687}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 578}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 581}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 584}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 587}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 590}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 593}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 596}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 599}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 578}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 581}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 584}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 587}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 590}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 593}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 596}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 599}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 602}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 605}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 608}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 611}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 614}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 617}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 620}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 623}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 602}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 605}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 608}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 611}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 614}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 617}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 620}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 623}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 626}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 629}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 632}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 635}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 638}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 641}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 644}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 647}, {0, 8}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 626}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 629}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 632}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 635}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 638}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 641}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 644}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -8}, {1, 647}, {0, 0}, {0, -8} }, 0, 10, 12, 7, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 662}, {1, 659}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 650}, {0, 9}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 668}, {1, 665}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 544}, {1, 544}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 699}, {1, 695}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, -74}, {0, 0}, {0, 0}, {0, -74} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 85, { {0, -74}, {0, 0}, {0, 0}, {0, -74} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -9}, {1, 642}, {0, 0}, {0, -9} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -9}, {1, 650}, {0, 0}, {0, -9} }, 0, 10, 12, 7, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, -7205}, {0, -7205}, {0, -7173} }, 0, 10, 12, 6, 4 },
{ 28, 10, 0, 0, -1, 0, 1, 81, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 666}, {1, 663}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 645}, {0, 9}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 672}, {1, 669}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 539}, {1, 539}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 699}, {1, 695}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 674}, {1, 671}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 653}, {0, 9}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 680}, {1, 677}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 547}, {1, 547}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 707}, {1, 703}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, -86}, {0, 0}, {0, 0}, {0, -86} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 85, { {0, -86}, {0, 0}, {0, 0}, {0, -86} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -9}, {1, 645}, {0, 0}, {0, -9} }, 0, 10, 12, 7, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 542}, {1, 542}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {1, 495}, {1, 495}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 546}, {1, 546}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 549}, {1, 549}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -9}, {1, 653}, {0, 0}, {0, -9} }, 0, 10, 12, 7, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 550}, {1, 550}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {1, 503}, {1, 503}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 554}, {1, 554}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 557}, {1, 557}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, -100}, {0, 0}, {0, 0}, {0, -100} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 85, { {0, -100}, {0, 0}, {0, 0}, {0, -100} }, 0, 10, 12, 7, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 553}, {1, 553}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {1, 499}, {1, 499}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 557}, {1, 557}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 561}, {1, 561}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {1, 507}, {1, 507}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 565}, {1, 565}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {0, 7}, {0, 7}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 560}, {1, 560}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 563}, {1, 563}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 568}, {1, 568}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 571}, {1, 571}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, -112}, {0, 0}, {0, 0}, {0, -112} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 85, { {0, -112}, {0, 0}, {0, 0}, {0, -112} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, -7}, {0, 0}, {0, 0}, {0, -7} }, 0, 10, 12, 7, 4 },
{ 28, 10, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 678}, {1, 675}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 648}, {0, 9}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 684}, {1, 681}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 567}, {1, 567}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 707}, {1, 703}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 686}, {1, 683}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 656}, {0, 9}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 692}, {1, 689}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 575}, {1, 575}, {0, 0} }, 0, 10, 12, 6, 4 },
+ { 15, 0, 0, 0, -1, 0, 1, 17, { {0, 0}, {1, 715}, {1, 711}, {0, 0} }, 0, 10, 12, 6, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, -128}, {0, 0}, {0, 0}, {0, -128} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 85, { {0, -128}, {0, 0}, {0, 0}, {0, -128} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 17, { {0, -126}, {0, 0}, {0, 0}, {0, -126} }, 0, 10, 12, 7, 4 },
{ 14, 0, 0, 0, -1, 0, 1, 85, { {0, -126}, {0, 0}, {0, 0}, {0, -126} }, 0, 10, 12, 7, 4 },
- { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -9}, {1, 648}, {0, 0}, {0, -9} }, 0, 10, 12, 7, 4 },
+ { 16, 0, 0, 0, -1, 0, 1, 17, { {0, -9}, {1, 656}, {0, 0}, {0, -9} }, 0, 10, 12, 7, 4 },
{ 28, 10, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 18, 0, 4 },
- { 6, 9, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 5, 2 },
- { 6, 9, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 5, 2 },
+ { 6, 9, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 22, 17, 5, 2 },
+ { 6, 9, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 22, 17, 5, 2 },
{ 6, 9, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 4, 5, 2 },
{ 10, 18, 0, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 0, 20, 4, 2 },
{ 10, 18, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
@@ -7527,7 +7876,7 @@ static const Properties uc_properties[] = {
{ 25, 10, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 25, 10, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 2 },
{ 25, 10, 0, 0, -1, 0, 6, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
- { 6, 9, 0, 0, -1, 0, 6, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 5, 2 },
+ { 6, 9, 0, 0, -1, 0, 6, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 22, 17, 5, 2 },
{ 10, 18, 0, 5, -1, 0, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 6, 22, 4, 2 },
{ 10, 18, 0, 5, -1, 0, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 6, 12, 4, 2 },
{ 10, 18, 0, 5, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 6, 12, 4, 2 },
@@ -7577,8 +7926,8 @@ static const Properties uc_properties[] = {
{ 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 2 },
{ 29, 10, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 9, 0, 2 },
{ 14, 0, 0, 0, -1, 0, 1, 85, { {0, -7517}, {0, 0}, {0, 0}, {0, -7517} }, 0, 10, 12, 7, 4 },
- { 14, 0, 0, 0, -1, 0, 1, 85, { {1, 203}, {0, 0}, {0, 0}, {1, 203} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 1, 85, { {1, 205}, {0, 0}, {0, 0}, {1, 205} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 1, 85, { {1, 207}, {0, 0}, {0, 0}, {1, 207} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 1, 85, { {1, 209}, {0, 0}, {0, 0}, {1, 209} }, 0, 10, 12, 7, 3 },
{ 29, 4, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 14, 0, 0, 0, -1, 0, 1, 0, { {0, 28}, {0, 0}, {0, 0}, {0, 28} }, 0, 10, 12, 7, 3 },
{ 18, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 2 },
@@ -7607,15 +7956,23 @@ static const Properties uc_properties[] = {
{ 26, 10, 0, 0, -1, -3, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -3, 1, 17, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 2016, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, 2527, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, 1923, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, 1914, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, 1918, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, 2250, 1, 17, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 1, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -1, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 138, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, 7, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, -7, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 1, 1, 17, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -1, 1, 17, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 1824, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 2104, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 2108, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 2106, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, 1316, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -138, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 15, 0, 2 },
{ 26, 10, 0, 0, -1, 8, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
@@ -7662,17 +8019,14 @@ static const Properties uc_properties[] = {
{ 5, 10, 0, 0, 0, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 7, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 14, 18, 30, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 16, 20, 12, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 16, 20, 12, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 30, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 29, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 14, 18, 30, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 30, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 16, 20, 14, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 14, 18, 30, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 30, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 3, 13, 2 },
{ 29, 10, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 3, 13, 2 },
{ 29, 10, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 6, 0, 2 },
@@ -7701,6 +8055,7 @@ static const Properties uc_properties[] = {
{ 26, 10, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 1, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -1, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, -1316, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 21, 10, 0, 0, -1, 1, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 0, 13, 2 },
{ 22, 10, 0, 0, -1, -1, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 1, 13, 2 },
{ 29, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 54 },
@@ -7708,27 +8063,34 @@ static const Properties uc_properties[] = {
{ 22, 10, 0, 0, -1, 1, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 1, 13, 2 },
{ 21, 10, 0, 0, -1, -1, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 0, 13, 2 },
{ 22, 10, 0, 0, -1, -3, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 1, 13, 2 },
+ { 26, 10, 0, 0, -1, -1914, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, -1918, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, -1923, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -1824, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -2016, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, 0, 6, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -2104, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -2106, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 26, 10, 0, 0, -1, -2108, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 26, 10, 0, 0, -1, -2250, 6, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 29, 10, 0, 0, -1, -2527, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 14, 0, 0, 0, -1, 0, 8, 0, { {0, 48}, {0, 0}, {0, 0}, {0, 48} }, 0, 10, 12, 7, 57 },
{ 15, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, -48}, {0, -48}, {0, 0} }, 0, 10, 12, 6, 57 },
- { 14, 0, 0, 0, -1, 0, 9, 0, { {1, 207}, {0, 0}, {0, 0}, {1, 207} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 9, 0, { {1, 211}, {0, 0}, {0, 0}, {1, 211} }, 0, 10, 12, 7, 3 },
{ 14, 0, 0, 0, -1, 0, 9, 0, { {0, -3814}, {0, 0}, {0, 0}, {0, -3814} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 9, 0, { {1, 209}, {0, 0}, {0, 0}, {1, 209} }, 0, 10, 12, 7, 3 },
- { 15, 0, 0, 0, -1, 0, 9, 0, { {0, 0}, {1, 211}, {1, 211}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 9, 0, { {0, 0}, {1, 213}, {1, 213}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 14, 0, 0, 0, -1, 0, 10, 0, { {1, 215}, {0, 0}, {0, 0}, {1, 215} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 10, 0, { {1, 217}, {0, 0}, {0, 0}, {1, 217} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 9, 0, { {1, 213}, {0, 0}, {0, 0}, {1, 213} }, 0, 10, 12, 7, 3 },
+ { 15, 0, 0, 0, -1, 0, 9, 0, { {0, 0}, {1, 215}, {1, 215}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 9, 0, { {0, 0}, {1, 217}, {1, 217}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 14, 0, 0, 0, -1, 0, 10, 0, { {1, 219}, {0, 0}, {0, 0}, {1, 219} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 11, 0, { {1, 221}, {0, 0}, {0, 0}, {1, 221} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 10, 0, { {1, 221}, {0, 0}, {0, 0}, {1, 221} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 10, 0, { {1, 223}, {0, 0}, {0, 0}, {1, 223} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 11, 0, { {1, 225}, {0, 0}, {0, 0}, {1, 225} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 17, 0, 0, 0, -1, 0, 10, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 14, 0, 0, 0, -1, 0, 11, 0, { {1, 223}, {0, 0}, {0, 0}, {1, 223} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 11, 0, { {1, 225}, {0, 0}, {0, 0}, {1, 225} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 11, 0, { {1, 227}, {0, 0}, {0, 0}, {1, 227} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 11, 0, { {1, 229}, {0, 0}, {0, 0}, {1, 229} }, 0, 10, 12, 7, 3 },
{ 14, 0, 0, 0, -1, 0, 8, 0, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 46 },
{ 15, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 46 },
{ 15, 0, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 46 },
@@ -7771,6 +8133,9 @@ static const Properties uc_properties[] = {
{ 21, 10, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 0, 13, 2 },
{ 25, 10, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 2 },
{ 25, 10, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 2 },
+ { 25, 10, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 2 },
+ { 25, 10, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 25, 10, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 37 },
{ 29, 10, 0, 0, -1, 0, 4, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 37 },
{ 29, 10, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
@@ -7815,6 +8180,7 @@ static const Properties uc_properties[] = {
{ 18, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 14, 8, 36 },
{ 18, 0, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 14, 8, 36 },
{ 18, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 14, 8, 36 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 14, 8, 36 },
{ 18, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 14, 8, 26 },
{ 29, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 5, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
@@ -7830,6 +8196,7 @@ static const Properties uc_properties[] = {
{ 5, 10, 0, 0, -1, 0, 6, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 8, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 26 },
{ 29, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 8, 14, 0, 35 },
+ { 29, 0, 0, 0, -1, 0, 22, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 18, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
{ 13, 0, 0, 0, -1, 0, 0, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 0 },
{ 18, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
@@ -7839,6 +8206,7 @@ static const Properties uc_properties[] = {
{ 18, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
{ 18, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
{ 18, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
{ 18, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 14, 8, 38 },
{ 17, 0, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 5, 8, 38 },
{ 29, 10, 0, 0, -1, 0, 4, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 38 },
@@ -7878,29 +8246,38 @@ static const Properties uc_properties[] = {
{ 28, 10, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 17, 10, 0, 0, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 2 },
{ 28, 10, 0, 0, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 0, 2 },
- { 14, 0, 0, 0, -1, 0, 10, 0, { {1, 227}, {0, 0}, {0, 0}, {1, 227} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 10, 0, { {1, 231}, {0, 0}, {0, 0}, {1, 231} }, 0, 10, 12, 7, 3 },
{ 28, 0, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 0, 2 },
- { 14, 0, 0, 0, -1, 0, 12, 0, { {1, 229}, {0, 0}, {0, 0}, {1, 229} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 12, 0, { {1, 233}, {0, 0}, {0, 0}, {1, 233} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 18, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 3 },
{ 14, 0, 0, 0, -1, 0, 12, 0, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 14, 0, 0, 0, -1, 0, 13, 0, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 48}, {0, 48}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 14, 0, 0, 0, -1, 0, 16, 0, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 14, 0, 0, 0, -1, 0, 13, 0, { {1, 231}, {0, 0}, {0, 0}, {1, 231} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 16, 0, { {1, 233}, {0, 0}, {0, 0}, {1, 233} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 16, 0, { {1, 235}, {0, 0}, {0, 0}, {1, 235} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 13, 0, { {1, 235}, {0, 0}, {0, 0}, {1, 235} }, 0, 10, 12, 7, 3 },
{ 14, 0, 0, 0, -1, 0, 16, 0, { {1, 237}, {0, 0}, {0, 0}, {1, 237} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 18, 0, { {1, 239}, {0, 0}, {0, 0}, {1, 239} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 16, 0, { {1, 239}, {0, 0}, {0, 0}, {1, 239} }, 0, 10, 12, 7, 3 },
{ 14, 0, 0, 0, -1, 0, 16, 0, { {1, 241}, {0, 0}, {0, 0}, {1, 241} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 16, 0, { {1, 243}, {0, 0}, {0, 0}, {1, 243} }, 0, 10, 12, 7, 3 },
- { 14, 0, 0, 0, -1, 0, 17, 0, { {1, 245}, {0, 0}, {0, 0}, {1, 245} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 18, 0, { {1, 243}, {0, 0}, {0, 0}, {1, 243} }, 0, 10, 12, 7, 3 },
+ { 15, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 14, 0, 0, 0, -1, 0, 16, 0, { {1, 245}, {0, 0}, {0, 0}, {1, 245} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 16, 0, { {1, 247}, {0, 0}, {0, 0}, {1, 247} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 17, 0, { {1, 249}, {0, 0}, {0, 0}, {1, 249} }, 0, 10, 12, 7, 3 },
{ 14, 0, 0, 0, -1, 0, 17, 0, { {0, 928}, {0, 0}, {0, 0}, {0, 928} }, 0, 10, 12, 7, 3 },
{ 14, 0, 0, 0, -1, 0, 17, 0, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
{ 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 14, 0, 0, 0, -1, 0, 20, 0, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
+ { 15, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 14, 0, 0, 0, -1, 0, 21, 0, { {0, 1}, {0, 0}, {0, 0}, {0, 1} }, 0, 10, 12, 7, 3 },
+ { 15, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, -1}, {0, -1}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 14, 0, 0, 0, -1, 0, 21, 0, { {0, -48}, {0, 0}, {0, 0}, {0, -48} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 21, 0, { {1, 251}, {0, 0}, {0, 0}, {1, 251} }, 0, 10, 12, 7, 3 },
+ { 14, 0, 0, 0, -1, 0, 21, 0, { {1, 253}, {0, 0}, {0, 0}, {1, 253} }, 0, 10, 12, 7, 3 },
{ 18, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 3 },
{ 17, 0, 0, 0, -1, 0, 13, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 18, 0, 0, 0, -1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 3 },
@@ -7934,6 +8311,8 @@ static const Properties uc_properties[] = {
{ 25, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 11 },
{ 25, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 18, 0, 11 },
{ 18, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 11 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 11 },
+ { 0, 17, 0, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 11 },
{ 3, 0, 0, 0, 0, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 72 },
{ 3, 0, 0, 0, 1, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 72 },
{ 3, 0, 0, 0, 2, 0, 10, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 72 },
@@ -8022,10 +8401,7 @@ static const Properties uc_properties[] = {
{ 17, 0, 0, 0, -1, 0, 16, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 4 },
- { 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 247}, {1, 247}, {1, 247} }, 0, 10, 12, 6, 28 },
- { 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 249}, {1, 249}, {1, 249} }, 0, 10, 12, 6, 28 },
- { 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 251}, {1, 251}, {1, 251} }, 0, 10, 12, 6, 28 },
- { 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 253}, {1, 253}, {1, 253} }, 0, 10, 12, 6, 28 },
+ { 15, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 255}, {1, 255}, {1, 255} }, 0, 10, 12, 6, 28 },
{ 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 257}, {1, 257}, {1, 257} }, 0, 10, 12, 6, 28 },
{ 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 259}, {1, 259}, {1, 259} }, 0, 10, 12, 6, 28 },
@@ -8102,6 +8478,10 @@ static const Properties uc_properties[] = {
{ 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 401}, {1, 401}, {1, 401} }, 0, 10, 12, 6, 28 },
{ 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 403}, {1, 403}, {1, 403} }, 0, 10, 12, 6, 28 },
{ 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 405}, {1, 405}, {1, 405} }, 0, 10, 12, 6, 28 },
+ { 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 407}, {1, 407}, {1, 407} }, 0, 10, 12, 6, 28 },
+ { 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 409}, {1, 409}, {1, 409} }, 0, 10, 12, 6, 28 },
+ { 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 411}, {1, 411}, {1, 411} }, 0, 10, 12, 6, 28 },
+ { 15, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {1, 413}, {1, 413}, {1, 413} }, 0, 10, 12, 6, 28 },
{ 18, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 86 },
{ 1, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 86 },
{ 0, 17, 0, 5, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 86 },
@@ -8119,24 +8499,24 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 9, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 86 },
{ 18, 0, 0, 0, -1, 0, 2, 17, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 12, 10, 23, 8, 26 },
{ 18, 0, 0, 0, -1, 0, 2, 17, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 13, 10, 24, 8, 26 },
- { 11, 0, 0, 0, -1, 0, 2, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 0, 34, 0, 0 },
+ { 11, 0, 0, 0, -1, 0, 2, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 34, 0, 0 },
{ 12, 0, 0, 0, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 0 },
{ 18, 0, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
{ 18, 0, 0, 0, -1, 0, 13, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
{ 18, 0, 0, 0, -1, 0, 6, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
{ 18, 0, 0, 0, -1, 0, 11, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
{ 18, 0, 0, 0, -1, 0, 8, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 419}, {1, 416}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 425}, {1, 422}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 431}, {1, 428}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 438}, {1, 434}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 427}, {1, 424}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 433}, {1, 430}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 439}, {1, 436}, {0, 0} }, 0, 10, 12, 6, 3 },
{ 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 446}, {1, 442}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 453}, {1, 450}, {0, 0} }, 0, 10, 12, 6, 3 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 465}, {1, 462}, {0, 0} }, 0, 10, 12, 6, 6 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 471}, {1, 468}, {0, 0} }, 0, 10, 12, 6, 6 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 477}, {1, 474}, {0, 0} }, 0, 10, 12, 6, 6 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 483}, {1, 480}, {0, 0} }, 0, 10, 12, 6, 6 },
- { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 489}, {1, 486}, {0, 0} }, 0, 10, 12, 6, 6 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 454}, {1, 450}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 461}, {1, 458}, {0, 0} }, 0, 10, 12, 6, 3 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 473}, {1, 470}, {0, 0} }, 0, 10, 12, 6, 6 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 479}, {1, 476}, {0, 0} }, 0, 10, 12, 6, 6 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 485}, {1, 482}, {0, 0} }, 0, 10, 12, 6, 6 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 491}, {1, 488}, {0, 0} }, 0, 10, 12, 6, 6 },
+ { 15, 0, 0, 0, -1, 0, 1, 80, { {0, 0}, {1, 497}, {1, 494}, {0, 0} }, 0, 10, 12, 6, 6 },
{ 18, 1, 0, 0, -1, 0, 4, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 9, 13, 8, 7 },
{ 0, 17, 26, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 7 },
{ 18, 1, 0, 0, -1, 0, 1, 85, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 9, 13, 8, 7 },
@@ -8179,16 +8559,16 @@ static const Properties uc_properties[] = {
{ 10, 18, 0, 5, -1, 0, 1, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 6, 22, 4, 2 },
{ 25, 10, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 13, 14, 0, 2 },
{ 25, 6, 0, 0, -1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 0, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 2, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 3, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 4, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 5, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 6, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 7, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 8, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 3, 2, 0, 0, 9, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
+ { 3, 2, 0, 0, 0, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
+ { 3, 2, 0, 0, 1, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
+ { 3, 2, 0, 0, 2, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
+ { 3, 2, 0, 0, 3, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
+ { 3, 2, 0, 0, 4, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
+ { 3, 2, 0, 0, 5, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
+ { 3, 2, 0, 0, 6, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
+ { 3, 2, 0, 0, 7, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
+ { 3, 2, 0, 0, 8, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
+ { 3, 2, 0, 0, 9, 0, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 14, 9, 2 },
{ 26, 10, 0, 0, -1, 2, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 26, 10, 0, 0, -1, -2, 1, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 14, 0, 0, 0, -1, 0, 1, 80, { {0, 32}, {0, 0}, {0, 0}, {0, 32} }, 0, 10, 14, 7, 3 },
@@ -8282,6 +8662,7 @@ static const Properties uc_properties[] = {
{ 0, 17, 0, 5, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 61 },
{ 0, 17, 220, 5, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 61 },
{ 0, 17, 230, 5, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 61 },
+ { 18, 1, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 61 },
{ 0, 17, 1, 5, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 61 },
{ 0, 17, 9, 5, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 61 },
{ 5, 1, 0, 0, 1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 61 },
@@ -8289,6 +8670,7 @@ static const Properties uc_properties[] = {
{ 5, 1, 0, 0, 3, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 61 },
{ 5, 1, 0, 0, 4, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 61 },
{ 5, 1, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 61 },
+ { 5, 1, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 61 },
{ 25, 1, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 61 },
{ 25, 1, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 12, 61 },
{ 25, 1, 0, 0, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 61 },
@@ -8324,6 +8706,20 @@ static const Properties uc_properties[] = {
{ 14, 1, 0, 0, -1, 0, 17, 0, { {0, 64}, {0, 0}, {0, 0}, {0, 64} }, 0, 10, 12, 7, 130 },
{ 15, 1, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, -64}, {0, -64}, {0, 0} }, 0, 10, 12, 6, 130 },
{ 5, 1, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 130 },
+ { 18, 13, 0, 4, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 144 },
+ { 18, 13, 0, 2, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 144 },
+ { 18, 13, 0, 3, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 144 },
+ { 0, 17, 230, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 144 },
+ { 3, 5, 0, 0, 0, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
+ { 3, 5, 0, 0, 1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
+ { 3, 5, 0, 0, 2, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
+ { 3, 5, 0, 0, 3, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
+ { 3, 5, 0, 0, 4, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
+ { 3, 5, 0, 0, 5, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
+ { 3, 5, 0, 0, 6, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
+ { 3, 5, 0, 0, 7, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
+ { 3, 5, 0, 0, 8, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
+ { 3, 5, 0, 0, 9, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 144 },
{ 5, 5, 0, 0, 1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 8 },
{ 5, 5, 0, 0, 2, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 8 },
{ 5, 5, 0, 0, 3, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 8 },
@@ -8334,6 +8730,17 @@ static const Properties uc_properties[] = {
{ 5, 5, 0, 0, 8, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 8 },
{ 5, 5, 0, 0, 9, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 8 },
{ 5, 5, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 8 },
+ { 18, 1, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 147 },
+ { 5, 1, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 147 },
+ { 18, 13, 0, 2, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 148 },
+ { 18, 13, 0, 3, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 148 },
+ { 18, 13, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 148 },
+ { 0, 17, 220, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 148 },
+ { 0, 17, 230, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 148 },
+ { 5, 13, 0, 2, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 148 },
+ { 5, 13, 0, 3, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 148 },
+ { 25, 13, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 12, 148 },
+ { 18, 1, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 149 },
{ 1, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 94 },
{ 0, 17, 0, 5, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 94 },
{ 18, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 94 },
@@ -8368,8 +8775,9 @@ static const Properties uc_properties[] = {
{ 0, 17, 9, 5, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 92 },
{ 0, 17, 7, 5, -1, 0, 11, 204, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 92 },
{ 25, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 92 },
- { 10, 0, 0, 5, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 7, 6, 12, 4, 92 },
+ { 10, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 7, 6, 12, 4, 92 },
{ 25, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 12, 92 },
+ { 10, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 7, 6, 12, 4, 92 },
{ 18, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 101 },
{ 3, 0, 0, 0, 0, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 101 },
{ 3, 0, 0, 0, 1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 101 },
@@ -8400,6 +8808,8 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 9, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 96 },
{ 25, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 96 },
{ 25, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 12, 96 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 96 },
+ { 1, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 96 },
{ 18, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 111 },
{ 0, 17, 7, 5, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 111 },
{ 25, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 111 },
@@ -8412,9 +8822,8 @@ static const Properties uc_properties[] = {
{ 25, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 12, 100 },
{ 25, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 100 },
{ 25, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 100 },
- { 25, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 100 },
- { 0, 17, 7, 5, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 100 },
{ 0, 17, 0, 5, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 100 },
+ { 0, 17, 7, 5, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 100 },
{ 25, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 12, 100 },
{ 3, 0, 0, 0, 0, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 100 },
{ 3, 0, 0, 0, 1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 100 },
@@ -8461,6 +8870,7 @@ static const Properties uc_properties[] = {
{ 0, 17, 0, 5, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 107 },
{ 1, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 107 },
{ 18, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 107 },
+ { 0, 17, 7, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
{ 0, 17, 7, 5, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 107 },
{ 1, 0, 0, 0, -1, 0, 16, 204, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 107 },
{ 1, 0, 0, 0, -1, 0, 16, 17, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 107 },
@@ -8485,6 +8895,8 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 7, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 135 },
{ 3, 0, 0, 0, 8, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 135 },
{ 3, 0, 0, 0, 9, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 135 },
+ { 0, 17, 230, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 135 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 135 },
{ 18, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 124 },
{ 1, 0, 0, 0, -1, 0, 16, 204, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 124 },
{ 1, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 124 },
@@ -8540,6 +8952,7 @@ static const Properties uc_properties[] = {
{ 1, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 102 },
{ 1, 0, 9, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 102 },
{ 0, 17, 7, 5, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 102 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 102 },
{ 3, 0, 0, 0, 0, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 102 },
{ 3, 0, 0, 0, 1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 102 },
{ 3, 0, 0, 0, 2, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 102 },
@@ -8551,6 +8964,7 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 8, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 102 },
{ 3, 0, 0, 0, 9, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 102 },
{ 18, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 33, 8, 126 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 33, 8, 126 },
{ 0, 17, 0, 5, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 33, 4, 126 },
{ 1, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 33, 4, 126 },
{ 0, 17, 9, 5, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 33, 4, 126 },
@@ -8567,6 +8981,12 @@ static const Properties uc_properties[] = {
{ 5, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 33, 0, 126 },
{ 25, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 12, 126 },
{ 29, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 33, 0, 126 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 142 },
+ { 1, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 142 },
+ { 0, 17, 0, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 142 },
+ { 0, 17, 9, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 142 },
+ { 0, 17, 7, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 142 },
+ { 25, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 142 },
{ 14, 0, 0, 0, -1, 0, 16, 0, { {0, 32}, {0, 0}, {0, 0}, {0, 32} }, 0, 10, 12, 7, 125 },
{ 15, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, -32}, {0, -32}, {0, 0} }, 0, 10, 12, 6, 125 },
{ 3, 0, 0, 0, 0, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 125 },
@@ -8581,10 +9001,16 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 9, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 125 },
{ 5, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 125 },
{ 18, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 125 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 150 },
+ { 1, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 150 },
+ { 0, 17, 0, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 150 },
+ { 0, 17, 9, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 150 },
+ { 25, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 18, 0, 150 },
{ 18, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 141 },
{ 0, 17, 0, 5, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 141 },
- { 1, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 141 },
+ { 0, 0, 0, 5, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 141 },
{ 0, 17, 9, 5, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 141 },
+ { 1, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 141 },
{ 18, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 7, 10, 12, 8, 141 },
{ 25, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 18, 0, 141 },
{ 25, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 141 },
@@ -8593,10 +9019,12 @@ static const Properties uc_properties[] = {
{ 18, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 140 },
{ 0, 17, 0, 5, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 140 },
{ 1, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 140 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 7, 10, 12, 8, 140 },
{ 18, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 7, 10, 12, 8, 140 },
{ 0, 17, 9, 5, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 140 },
{ 25, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 140 },
{ 25, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 12, 140 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 140 },
{ 25, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 18, 0, 140 },
{ 18, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 119 },
{ 18, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 133 },
@@ -8636,6 +9064,28 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 7, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 138 },
{ 3, 0, 0, 0, 8, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 138 },
{ 3, 0, 0, 0, 9, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 138 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 143 },
+ { 1, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 143 },
+ { 0, 17, 0, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 143 },
+ { 0, 17, 9, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 143 },
+ { 3, 0, 0, 0, 0, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 3, 0, 0, 0, 1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 3, 0, 0, 0, 2, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 3, 0, 0, 0, 3, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 3, 0, 0, 0, 4, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 3, 0, 0, 0, 5, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 3, 0, 0, 0, 6, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 3, 0, 0, 0, 7, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 3, 0, 0, 0, 8, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 3, 0, 0, 0, 9, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 143 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 145 },
+ { 0, 17, 0, 5, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 145 },
+ { 1, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 145 },
+ { 25, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 12, 145 },
+ { 5, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 16 },
+ { 29, 10, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 16 },
+ { 27, 4, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 10, 0, 16 },
+ { 25, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 16 },
{ 18, 0, 0, 0, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 63 },
{ 18, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 63 },
{ 18, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 63 },
@@ -8646,6 +9096,9 @@ static const Properties uc_properties[] = {
{ 18, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 81 },
{ 18, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 0, 8, 81 },
{ 18, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 1, 8, 81 },
+ { 10, 0, 0, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 6, 4, 4, 81 },
+ { 10, 0, 0, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 6, 0, 4, 81 },
+ { 10, 0, 0, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 3, 6, 1, 4, 81 },
{ 18, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 127 },
{ 18, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 0, 8, 127 },
{ 18, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 1, 8, 127 },
@@ -8683,16 +9136,31 @@ static const Properties uc_properties[] = {
{ 3, 0, 0, 0, 8, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 108 },
{ 3, 0, 0, 0, 9, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 108 },
{ 5, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 108 },
+ { 14, 0, 0, 0, -1, 0, 20, 0, { {0, 32}, {0, 0}, {0, 0}, {0, 32} }, 0, 10, 12, 7, 146 },
+ { 15, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, -32}, {0, -32}, {0, 0} }, 0, 10, 12, 6, 146 },
+ { 5, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 146 },
+ { 25, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 0, 146 },
+ { 25, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 12, 146 },
+ { 25, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 146 },
{ 18, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 99 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 99 },
+ { 0, 17, 0, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 99 },
{ 1, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 99 },
+ { 1, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 8, 4, 21, 4, 99 },
{ 0, 17, 0, 5, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 99 },
{ 17, 0, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 99 },
{ 17, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 5, 8, 137 },
{ 17, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 5, 8, 139 },
+ { 25, 10, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 5, 0, 2 },
+ { 17, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 5, 8, 2 },
{ 18, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 137 },
+ { 18, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 137 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 137 },
{ 18, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 8, 14, 8, 35 },
{ 18, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 34 },
{ 18, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 34 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 5, 8, 34 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 8, 5, 8, 35 },
{ 18, 0, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 139 },
{ 18, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 105 },
{ 29, 0, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 105 },
@@ -8711,6 +9179,7 @@ static const Properties uc_properties[] = {
{ 0, 17, 230, 5, -1, 0, 5, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 1 },
{ 29, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 0, 17, 230, 5, -1, 0, 8, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 4 },
+ { 5, 0, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 5, 0, 0, 0, -1, 0, 9, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 14, 0, 0, 0, -1, 0, 5, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 2 },
{ 15, 0, 0, 0, -1, 0, 5, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 6, 2 },
@@ -8735,6 +9204,33 @@ static const Properties uc_properties[] = {
{ 25, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 17, 12, 131 },
{ 25, 0, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 131 },
{ 0, 17, 230, 5, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 57 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 151 },
+ { 0, 17, 230, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 151 },
+ { 17, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 151 },
+ { 3, 0, 0, 0, 0, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 3, 0, 0, 0, 1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 3, 0, 0, 0, 2, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 3, 0, 0, 0, 3, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 3, 0, 0, 0, 4, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 3, 0, 0, 0, 5, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 3, 0, 0, 0, 6, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 3, 0, 0, 0, 7, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 3, 0, 0, 0, 8, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 3, 0, 0, 0, 9, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 151 },
+ { 29, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 151 },
+ { 18, 0, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 152 },
+ { 0, 17, 230, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 152 },
+ { 3, 0, 0, 0, 0, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 3, 0, 0, 0, 1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 3, 0, 0, 0, 2, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 3, 0, 0, 0, 3, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 3, 0, 0, 0, 4, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 3, 0, 0, 0, 5, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 3, 0, 0, 0, 6, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 3, 0, 0, 0, 7, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 3, 0, 0, 0, 8, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 3, 0, 0, 0, 9, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 152 },
+ { 27, 4, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 9, 0, 152 },
{ 18, 1, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 113 },
{ 5, 1, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 113 },
{ 0, 17, 220, 5, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 113 },
@@ -8742,6 +9238,7 @@ static const Properties uc_properties[] = {
{ 15, 1, 0, 2, -1, 0, 18, 0, { {0, 0}, {0, -34}, {0, -34}, {0, 0} }, 0, 10, 12, 6, 132 },
{ 0, 17, 230, 5, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 132 },
{ 0, 17, 7, 5, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 21, 4, 132 },
+ { 17, 1, 0, 5, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 132 },
{ 3, 1, 0, 0, 0, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 132 },
{ 3, 1, 0, 0, 1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 132 },
{ 3, 1, 0, 0, 2, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 132 },
@@ -8753,6 +9250,11 @@ static const Properties uc_properties[] = {
{ 3, 1, 0, 0, 8, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 132 },
{ 3, 1, 0, 0, 9, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 16, 11, 9, 132 },
{ 25, 1, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 0, 0, 132 },
+ { 5, 13, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 29, 13, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 10, 0, 2 },
+ { 27, 13, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 10, 0, 2 },
+ { 5, 13, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 29, 13, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 18, 13, 0, 0, -1, 0, 13, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 8, 8 },
{ 26, 10, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 8 },
{ 5, 2, 0, 0, 0, 0, 11, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
@@ -8773,6 +9275,7 @@ static const Properties uc_properties[] = {
{ 29, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 2 },
{ 29, 0, 0, 0, -1, 0, 11, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 10, 12, 7, 2 },
{ 29, 10, 0, 0, -1, 0, 13, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 21, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 29, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 29, 0, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
{ 29, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 6, 7, 28, 0, 2 },
@@ -8780,20 +9283,21 @@ static const Properties uc_properties[] = {
{ 29, 0, 0, 0, -1, 0, 12, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 29, 0, 0, 0, -1, 0, 18, 80, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 16, 20, 14, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 14, 18, 30, 0, 2 },
- { 28, 10, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 15, 19, 31, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 17, 21, 30, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 30, 0, 2 },
+ { 28, 10, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 4, 4, 31, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 14, 18, 30, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 30, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 18, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 16, 20, 14, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 13, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
{ 29, 10, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 3, 13, 2 },
{ 29, 10, 0, 0, -1, 0, 16, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 5, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 14, 18, 30, 0, 2 },
- { 29, 10, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 14, 18, 30, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 21, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 30, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 17, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 30, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 19, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 30, 0, 2 },
+ { 29, 10, 0, 0, -1, 0, 20, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 30, 0, 2 },
{ 13, 18, 0, 0, -1, 0, 2, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 12, 0, 0 },
{ 18, 0, 0, 0, -1, 0, 5, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
{ 18, 0, 0, 0, -1, 0, 12, 0, { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, 0, 0, 14, 8, 37 },
@@ -8862,6 +9366,7 @@ static const unsigned short specialCaseMap[] = {
0x1, 0xa7ad,
0x1, 0x2c6e,
0x1, 0x2c64,
+ 0x1, 0xa7c5,
0x1, 0xa7b1,
0x1, 0xa7b2,
0x1, 0xa7b0,
@@ -8947,6 +9452,7 @@ static const unsigned short specialCaseMap[] = {
0x1, 0xabbf,
0x1, 0xa64a,
0x1, 0xa77d,
+ 0x1, 0xa7c6,
0x1, 0x6b,
0x1, 0xe5,
0x1, 0x26b,
@@ -8969,6 +9475,8 @@ static const unsigned short specialCaseMap[] = {
0x1, 0x29e,
0x1, 0x287,
0x1, 0x29d,
+ 0x1, 0x282,
+ 0x1, 0x1d8e,
0x1, 0x13a0,
0x1, 0x13a1,
0x1, 0x13a2,
@@ -10020,55 +10528,55 @@ static const unsigned short uc_decomposition_trie[] = {
0x15f5, 0x15f7, 0x15f9, 0x15fb, 0x15fd, 0x15ff, 0x1601, 0x1603,
0x1605, 0x1607, 0x1609, 0x160b, 0x160d, 0x160f, 0x1611, 0x1613,
- 0x1615, 0x1617, 0x1619, 0x161b, 0x161d, 0x161f, 0x1621, 0xffff,
+ 0x1615, 0x1617, 0x1619, 0x161b, 0x161d, 0x161f, 0x1621, 0x1623,
- 0x1623, 0x1628, 0x162d, 0x1632, 0x1636, 0x163b, 0x163f, 0x1643,
- 0x1649, 0x164e, 0x1652, 0x1656, 0x165a, 0x165f, 0x1664, 0x1668,
+ 0x1626, 0x162b, 0x1630, 0x1635, 0x1639, 0x163e, 0x1642, 0x1646,
+ 0x164c, 0x1651, 0x1655, 0x1659, 0x165d, 0x1662, 0x1667, 0x166b,
- 0x166c, 0x166f, 0x1673, 0x1678, 0x167d, 0x1680, 0x1686, 0x168d,
- 0x1693, 0x1697, 0x169d, 0x16a3, 0x16a8, 0x16ac, 0x16b0, 0x16b4,
+ 0x166f, 0x1672, 0x1676, 0x167b, 0x1680, 0x1683, 0x1689, 0x1690,
+ 0x1696, 0x169a, 0x16a0, 0x16a6, 0x16ab, 0x16af, 0x16b3, 0x16b7,
- 0x16b9, 0x16bf, 0x16c4, 0x16c8, 0x16cc, 0x16d0, 0x16d3, 0x16d6,
- 0x16d9, 0x16dc, 0x16e0, 0x16e4, 0x16ea, 0x16ee, 0x16f3, 0x16f9,
+ 0x16bc, 0x16c2, 0x16c7, 0x16cb, 0x16cf, 0x16d3, 0x16d6, 0x16d9,
+ 0x16dc, 0x16df, 0x16e3, 0x16e7, 0x16ed, 0x16f1, 0x16f6, 0x16fc,
- 0x16fd, 0x1700, 0x1703, 0x1709, 0x170e, 0x1714, 0x1718, 0x171e,
- 0x1721, 0x1725, 0x1729, 0x172d, 0x1731, 0x1735, 0x173a, 0x173e,
+ 0x1700, 0x1703, 0x1706, 0x170c, 0x1711, 0x1717, 0x171b, 0x1721,
+ 0x1724, 0x1728, 0x172c, 0x1730, 0x1734, 0x1738, 0x173d, 0x1741,
- 0x1741, 0x1745, 0x1749, 0x174d, 0x1752, 0x1756, 0x175a, 0x175e,
- 0x1764, 0x1769, 0x176c, 0x1772, 0x1775, 0x177a, 0x177f, 0x1783,
+ 0x1744, 0x1748, 0x174c, 0x1750, 0x1755, 0x1759, 0x175d, 0x1761,
+ 0x1767, 0x176c, 0x176f, 0x1775, 0x1778, 0x177d, 0x1782, 0x1786,
- 0x1787, 0x178b, 0x1790, 0x1793, 0x1797, 0x179c, 0x179f, 0x17a5,
- 0x17a9, 0x17ac, 0x17af, 0x17b2, 0x17b5, 0x17b8, 0x17bb, 0x17be,
+ 0x178a, 0x178e, 0x1793, 0x1796, 0x179a, 0x179f, 0x17a2, 0x17a8,
+ 0x17ac, 0x17af, 0x17b2, 0x17b5, 0x17b8, 0x17bb, 0x17be, 0x17c1,
- 0x17c1, 0x17c4, 0x17c7, 0x17cb, 0x17cf, 0x17d3, 0x17d7, 0x17db,
- 0x17df, 0x17e3, 0x17e7, 0x17eb, 0x17ef, 0x17f3, 0x17f7, 0x17fb,
+ 0x17c4, 0x17c7, 0x17ca, 0x17ce, 0x17d2, 0x17d6, 0x17da, 0x17de,
+ 0x17e2, 0x17e6, 0x17ea, 0x17ee, 0x17f2, 0x17f6, 0x17fa, 0x17fe,
- 0x17ff, 0x1803, 0x1807, 0x180a, 0x180d, 0x1811, 0x1814, 0x1817,
- 0x181a, 0x181e, 0x1822, 0x1825, 0x1828, 0x182b, 0x182e, 0x1831,
+ 0x1802, 0x1806, 0x180a, 0x180d, 0x1810, 0x1814, 0x1817, 0x181a,
+ 0x181d, 0x1821, 0x1825, 0x1828, 0x182b, 0x182e, 0x1831, 0x1834,
- 0x1836, 0x1839, 0x183c, 0x183f, 0x1842, 0x1845, 0x1848, 0x184b,
- 0x184e, 0x1852, 0x1857, 0x185a, 0x185d, 0x1860, 0x1863, 0x1866,
+ 0x1839, 0x183c, 0x183f, 0x1842, 0x1845, 0x1848, 0x184b, 0x184e,
+ 0x1851, 0x1855, 0x185a, 0x185d, 0x1860, 0x1863, 0x1866, 0x1869,
- 0x1869, 0x186c, 0x1870, 0x1874, 0x1878, 0x187c, 0x187f, 0x1882,
- 0x1885, 0x1888, 0x188b, 0x188e, 0x1891, 0x1894, 0x1897, 0x189a,
+ 0x186c, 0x186f, 0x1873, 0x1877, 0x187b, 0x187f, 0x1882, 0x1885,
+ 0x1888, 0x188b, 0x188e, 0x1891, 0x1894, 0x1897, 0x189a, 0x189d,
- 0x189e, 0x18a2, 0x18a5, 0x18a9, 0x18ad, 0x18b1, 0x18b4, 0x18b8,
- 0x18bc, 0x18c1, 0x18c4, 0x18c8, 0x18cc, 0x18d0, 0x18d4, 0x18da,
+ 0x18a1, 0x18a5, 0x18a8, 0x18ac, 0x18b0, 0x18b4, 0x18b7, 0x18bb,
+ 0x18bf, 0x18c4, 0x18c7, 0x18cb, 0x18cf, 0x18d3, 0x18d7, 0x18dd,
- 0x18e1, 0x18e4, 0x18e7, 0x18ea, 0x18ed, 0x18f0, 0x18f3, 0x18f6,
- 0x18f9, 0x18fc, 0x18ff, 0x1902, 0x1905, 0x1908, 0x190b, 0x190e,
+ 0x18e4, 0x18e7, 0x18ea, 0x18ed, 0x18f0, 0x18f3, 0x18f6, 0x18f9,
+ 0x18fc, 0x18ff, 0x1902, 0x1905, 0x1908, 0x190b, 0x190e, 0x1911,
- 0x1911, 0x1914, 0x1917, 0x191c, 0x191f, 0x1922, 0x1925, 0x192a,
- 0x192e, 0x1931, 0x1934, 0x1937, 0x193a, 0x193d, 0x1940, 0x1943,
+ 0x1914, 0x1917, 0x191a, 0x191f, 0x1922, 0x1925, 0x1928, 0x192d,
+ 0x1931, 0x1934, 0x1937, 0x193a, 0x193d, 0x1940, 0x1943, 0x1946,
- 0x1946, 0x1949, 0x194c, 0x1950, 0x1953, 0x1956, 0x195a, 0x195e,
- 0x1961, 0x1966, 0x196a, 0x196d, 0x1970, 0x1973, 0x1976, 0x197a,
+ 0x1949, 0x194c, 0x194f, 0x1953, 0x1956, 0x1959, 0x195d, 0x1961,
+ 0x1964, 0x1969, 0x196d, 0x1970, 0x1973, 0x1976, 0x1979, 0x197d,
- 0x197e, 0x1981, 0x1984, 0x1987, 0x198a, 0x198d, 0x1990, 0x1993,
- 0x1996, 0x1999, 0x199d, 0x19a1, 0x19a5, 0x19a9, 0x19ad, 0x19b1,
+ 0x1981, 0x1984, 0x1987, 0x198a, 0x198d, 0x1990, 0x1993, 0x1996,
+ 0x1999, 0x199c, 0x19a0, 0x19a4, 0x19a8, 0x19ac, 0x19b0, 0x19b4,
- 0x19b5, 0x19b9, 0x19bd, 0x19c1, 0x19c5, 0x19c9, 0x19cd, 0x19d1,
- 0x19d5, 0x19d9, 0x19dd, 0x19e1, 0x19e5, 0x19e9, 0x19ed, 0x19f1,
+ 0x19b8, 0x19bc, 0x19c0, 0x19c4, 0x19c8, 0x19cc, 0x19d0, 0x19d4,
+ 0x19d8, 0x19dc, 0x19e0, 0x19e4, 0x19e8, 0x19ec, 0x19f0, 0x19f4,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10122,7 +10630,7 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x19f5, 0x19f7, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x19f8, 0x19fa, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10150,7 +10658,7 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x19f9, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x19fc, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10167,7 +10675,7 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x19fb, 0x19fd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x19fe, 0x1a00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10180,7 +10688,7 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0x19ff, 0x1a01, 0x1a03, 0x1a05,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0x1a02, 0x1a04, 0x1a06, 0x1a08,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10202,234 +10710,234 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x1a07, 0x1a09, 0x1a0b, 0x1a0d, 0x1a0f, 0x1a11, 0x1a13, 0x1a15,
- 0x1a17, 0x1a19, 0x1a1b, 0x1a1d, 0x1a1f, 0x1a21, 0x1a23, 0x1a25,
- 0x1a27, 0x1a29, 0x1a2b, 0x1a2d, 0x1a2f, 0x1a31, 0x1a33, 0x1a35,
- 0x1a37, 0x1a39, 0x1a3b, 0x1a3d, 0x1a3f, 0x1a41, 0x1a43, 0x1a45,
- 0x1a47, 0x1a49, 0x1a4b, 0x1a4d, 0x1a4f, 0x1a51, 0x1a53, 0x1a55,
- 0x1a57, 0x1a59, 0x1a5b, 0x1a5d, 0x1a5f, 0x1a61, 0x1a63, 0x1a65,
- 0x1a67, 0x1a69, 0x1a6b, 0x1a6d, 0x1a6f, 0x1a71, 0x1a73, 0x1a75,
- 0x1a77, 0x1a79, 0x1a7b, 0x1a7d, 0x1a7f, 0x1a81, 0x1a83, 0x1a85,
- 0x1a87, 0x1a89, 0x1a8b, 0x1a8d, 0x1a8f, 0x1a91, 0x1a93, 0x1a95,
- 0x1a97, 0x1a99, 0x1a9b, 0x1a9d, 0x1a9f, 0x1aa1, 0x1aa3, 0x1aa5,
- 0x1aa7, 0x1aa9, 0x1aab, 0x1aad, 0x1aaf, 0x1ab1, 0x1ab3, 0x1ab5,
- 0x1ab7, 0x1ab9, 0x1abb, 0x1abd, 0x1abf, 0x1ac1, 0x1ac3, 0x1ac5,
- 0x1ac7, 0x1ac9, 0x1acb, 0x1acd, 0x1acf, 0x1ad1, 0x1ad3, 0x1ad5,
- 0x1ad7, 0x1ad9, 0x1adb, 0x1add, 0x1adf, 0x1ae1, 0x1ae3, 0x1ae5,
- 0x1ae7, 0x1ae9, 0x1aeb, 0x1aed, 0x1aef, 0x1af1, 0x1af3, 0x1af5,
- 0x1af7, 0x1af9, 0x1afb, 0x1afd, 0x1aff, 0x1b01, 0x1b03, 0x1b05,
- 0x1b07, 0x1b09, 0x1b0b, 0x1b0d, 0x1b0f, 0x1b11, 0x1b13, 0x1b15,
- 0x1b17, 0x1b19, 0x1b1b, 0x1b1d, 0x1b1f, 0x1b21, 0x1b23, 0x1b25,
- 0x1b27, 0x1b29, 0x1b2b, 0x1b2d, 0x1b2f, 0x1b31, 0x1b33, 0x1b35,
- 0x1b37, 0x1b39, 0x1b3b, 0x1b3d, 0x1b3f, 0x1b41, 0x1b43, 0x1b45,
- 0x1b47, 0x1b49, 0x1b4b, 0x1b4d, 0x1b4f, 0x1b51, 0x1b53, 0x1b55,
- 0x1b57, 0x1b59, 0x1b5b, 0x1b5d, 0x1b5f, 0x1b61, 0x1b63, 0x1b65,
- 0x1b67, 0x1b69, 0x1b6b, 0x1b6d, 0x1b6f, 0x1b71, 0x1b73, 0x1b75,
- 0x1b77, 0x1b79, 0x1b7b, 0x1b7d, 0x1b7f, 0x1b81, 0x1b83, 0x1b85,
- 0x1b87, 0x1b89, 0x1b8b, 0x1b8d, 0x1b8f, 0x1b91, 0x1b93, 0x1b95,
- 0x1b97, 0x1b99, 0x1b9b, 0x1b9d, 0x1b9f, 0x1ba1, 0x1ba3, 0x1ba5,
- 0x1ba7, 0x1ba9, 0x1bab, 0x1bad, 0x1baf, 0x1bb1, 0x1bb3, 0x1bb5,
- 0x1bb7, 0x1bb9, 0x1bbb, 0x1bbd, 0x1bbf, 0x1bc1, 0x1bc3, 0x1bc5,
- 0x1bc7, 0x1bc9, 0x1bcb, 0x1bcd, 0x1bcf, 0x1bd1, 0x1bd3, 0x1bd5,
- 0x1bd7, 0x1bd9, 0x1bdb, 0x1bdd, 0x1bdf, 0x1be1, 0x1be3, 0x1be5,
- 0x1be7, 0x1be9, 0x1beb, 0x1bed, 0x1bef, 0x1bf1, 0x1bf3, 0x1bf5,
- 0x1bf7, 0x1bf9, 0x1bfb, 0x1bfd, 0x1bff, 0x1c01, 0x1c03, 0x1c05,
+ 0x1a0a, 0x1a0c, 0x1a0e, 0x1a10, 0x1a12, 0x1a14, 0x1a16, 0x1a18,
+ 0x1a1a, 0x1a1c, 0x1a1e, 0x1a20, 0x1a22, 0x1a24, 0x1a26, 0x1a28,
+ 0x1a2a, 0x1a2c, 0x1a2e, 0x1a30, 0x1a32, 0x1a34, 0x1a36, 0x1a38,
+ 0x1a3a, 0x1a3c, 0x1a3e, 0x1a40, 0x1a42, 0x1a44, 0x1a46, 0x1a48,
+ 0x1a4a, 0x1a4c, 0x1a4e, 0x1a50, 0x1a52, 0x1a54, 0x1a56, 0x1a58,
+ 0x1a5a, 0x1a5c, 0x1a5e, 0x1a60, 0x1a62, 0x1a64, 0x1a66, 0x1a68,
+ 0x1a6a, 0x1a6c, 0x1a6e, 0x1a70, 0x1a72, 0x1a74, 0x1a76, 0x1a78,
+ 0x1a7a, 0x1a7c, 0x1a7e, 0x1a80, 0x1a82, 0x1a84, 0x1a86, 0x1a88,
+ 0x1a8a, 0x1a8c, 0x1a8e, 0x1a90, 0x1a92, 0x1a94, 0x1a96, 0x1a98,
+ 0x1a9a, 0x1a9c, 0x1a9e, 0x1aa0, 0x1aa2, 0x1aa4, 0x1aa6, 0x1aa8,
+ 0x1aaa, 0x1aac, 0x1aae, 0x1ab0, 0x1ab2, 0x1ab4, 0x1ab6, 0x1ab8,
+ 0x1aba, 0x1abc, 0x1abe, 0x1ac0, 0x1ac2, 0x1ac4, 0x1ac6, 0x1ac8,
+ 0x1aca, 0x1acc, 0x1ace, 0x1ad0, 0x1ad2, 0x1ad4, 0x1ad6, 0x1ad8,
+ 0x1ada, 0x1adc, 0x1ade, 0x1ae0, 0x1ae2, 0x1ae4, 0x1ae6, 0x1ae8,
+ 0x1aea, 0x1aec, 0x1aee, 0x1af0, 0x1af2, 0x1af4, 0x1af6, 0x1af8,
+ 0x1afa, 0x1afc, 0x1afe, 0x1b00, 0x1b02, 0x1b04, 0x1b06, 0x1b08,
+ 0x1b0a, 0x1b0c, 0x1b0e, 0x1b10, 0x1b12, 0x1b14, 0x1b16, 0x1b18,
+ 0x1b1a, 0x1b1c, 0x1b1e, 0x1b20, 0x1b22, 0x1b24, 0x1b26, 0x1b28,
+ 0x1b2a, 0x1b2c, 0x1b2e, 0x1b30, 0x1b32, 0x1b34, 0x1b36, 0x1b38,
+ 0x1b3a, 0x1b3c, 0x1b3e, 0x1b40, 0x1b42, 0x1b44, 0x1b46, 0x1b48,
+ 0x1b4a, 0x1b4c, 0x1b4e, 0x1b50, 0x1b52, 0x1b54, 0x1b56, 0x1b58,
+ 0x1b5a, 0x1b5c, 0x1b5e, 0x1b60, 0x1b62, 0x1b64, 0x1b66, 0x1b68,
+ 0x1b6a, 0x1b6c, 0x1b6e, 0x1b70, 0x1b72, 0x1b74, 0x1b76, 0x1b78,
+ 0x1b7a, 0x1b7c, 0x1b7e, 0x1b80, 0x1b82, 0x1b84, 0x1b86, 0x1b88,
+ 0x1b8a, 0x1b8c, 0x1b8e, 0x1b90, 0x1b92, 0x1b94, 0x1b96, 0x1b98,
+ 0x1b9a, 0x1b9c, 0x1b9e, 0x1ba0, 0x1ba2, 0x1ba4, 0x1ba6, 0x1ba8,
+ 0x1baa, 0x1bac, 0x1bae, 0x1bb0, 0x1bb2, 0x1bb4, 0x1bb6, 0x1bb8,
+ 0x1bba, 0x1bbc, 0x1bbe, 0x1bc0, 0x1bc2, 0x1bc4, 0x1bc6, 0x1bc8,
+ 0x1bca, 0x1bcc, 0x1bce, 0x1bd0, 0x1bd2, 0x1bd4, 0x1bd6, 0x1bd8,
+ 0x1bda, 0x1bdc, 0x1bde, 0x1be0, 0x1be2, 0x1be4, 0x1be6, 0x1be8,
+ 0x1bea, 0x1bec, 0x1bee, 0x1bf0, 0x1bf2, 0x1bf4, 0x1bf6, 0x1bf8,
+ 0x1bfa, 0x1bfc, 0x1bfe, 0x1c00, 0x1c02, 0x1c04, 0x1c06, 0x1c08,
- 0x1c07, 0x1c09, 0x1c0b, 0x1c0d, 0x1c0f, 0x1c11, 0x1c13, 0x1c15,
- 0x1c17, 0x1c19, 0x1c1b, 0x1c1d, 0x1c1f, 0x1c21, 0xffff, 0xffff,
- 0x1c23, 0xffff, 0x1c25, 0xffff, 0xffff, 0x1c27, 0x1c29, 0x1c2b,
- 0x1c2d, 0x1c2f, 0x1c31, 0x1c33, 0x1c35, 0x1c37, 0x1c39, 0xffff,
- 0x1c3b, 0xffff, 0x1c3d, 0xffff, 0xffff, 0x1c3f, 0x1c41, 0xffff,
- 0xffff, 0xffff, 0x1c43, 0x1c45, 0x1c47, 0x1c49, 0x1c4b, 0x1c4d,
- 0x1c4f, 0x1c51, 0x1c53, 0x1c55, 0x1c57, 0x1c59, 0x1c5b, 0x1c5d,
- 0x1c5f, 0x1c61, 0x1c63, 0x1c65, 0x1c67, 0x1c69, 0x1c6b, 0x1c6d,
- 0x1c6f, 0x1c71, 0x1c73, 0x1c75, 0x1c77, 0x1c79, 0x1c7b, 0x1c7d,
- 0x1c7f, 0x1c81, 0x1c83, 0x1c85, 0x1c87, 0x1c89, 0x1c8b, 0x1c8d,
- 0x1c8f, 0x1c91, 0x1c93, 0x1c95, 0x1c97, 0x1c99, 0x1c9b, 0x1c9d,
- 0x1c9f, 0x1ca1, 0x1ca3, 0x1ca5, 0x1ca7, 0x1ca9, 0x1cab, 0x1cad,
- 0x1caf, 0x1cb1, 0x1cb3, 0x1cb5, 0x1cb7, 0x1cb9, 0x1cbb, 0x1cbd,
- 0x1cbf, 0x1cc1, 0x1cc3, 0x1cc5, 0x1cc7, 0x1cca, 0xffff, 0xffff,
- 0x1ccc, 0x1cce, 0x1cd0, 0x1cd2, 0x1cd4, 0x1cd6, 0x1cd8, 0x1cda,
- 0x1cdc, 0x1cde, 0x1ce0, 0x1ce2, 0x1ce4, 0x1ce6, 0x1ce8, 0x1cea,
- 0x1cec, 0x1cee, 0x1cf0, 0x1cf2, 0x1cf4, 0x1cf6, 0x1cf8, 0x1cfa,
- 0x1cfc, 0x1cfe, 0x1d00, 0x1d02, 0x1d04, 0x1d06, 0x1d08, 0x1d0a,
- 0x1d0c, 0x1d0e, 0x1d10, 0x1d12, 0x1d14, 0x1d16, 0x1d18, 0x1d1a,
- 0x1d1c, 0x1d1e, 0x1d20, 0x1d22, 0x1d24, 0x1d26, 0x1d28, 0x1d2a,
- 0x1d2c, 0x1d2e, 0x1d30, 0x1d32, 0x1d34, 0x1d36, 0x1d38, 0x1d3a,
- 0x1d3c, 0x1d3e, 0x1d40, 0x1d42, 0x1d44, 0x1d46, 0x1d48, 0x1d4a,
- 0x1d4c, 0x1d4e, 0x1d50, 0x1d52, 0x1d54, 0x1d56, 0x1d58, 0x1d5a,
- 0x1d5c, 0x1d5e, 0x1d60, 0x1d62, 0x1d64, 0x1d66, 0x1d68, 0x1d6a,
- 0x1d6c, 0x1d6e, 0x1d70, 0x1d72, 0x1d74, 0x1d76, 0x1d78, 0x1d7a,
- 0x1d7c, 0x1d7e, 0x1d80, 0x1d82, 0x1d84, 0x1d86, 0x1d88, 0x1d8a,
- 0x1d8d, 0x1d90, 0x1d93, 0x1d95, 0x1d97, 0x1d99, 0x1d9c, 0x1d9f,
- 0x1da2, 0x1da4, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x1c0a, 0x1c0c, 0x1c0e, 0x1c10, 0x1c12, 0x1c14, 0x1c16, 0x1c18,
+ 0x1c1a, 0x1c1c, 0x1c1e, 0x1c20, 0x1c22, 0x1c24, 0xffff, 0xffff,
+ 0x1c26, 0xffff, 0x1c28, 0xffff, 0xffff, 0x1c2a, 0x1c2c, 0x1c2e,
+ 0x1c30, 0x1c32, 0x1c34, 0x1c36, 0x1c38, 0x1c3a, 0x1c3c, 0xffff,
+ 0x1c3e, 0xffff, 0x1c40, 0xffff, 0xffff, 0x1c42, 0x1c44, 0xffff,
+ 0xffff, 0xffff, 0x1c46, 0x1c48, 0x1c4a, 0x1c4c, 0x1c4e, 0x1c50,
+ 0x1c52, 0x1c54, 0x1c56, 0x1c58, 0x1c5a, 0x1c5c, 0x1c5e, 0x1c60,
+ 0x1c62, 0x1c64, 0x1c66, 0x1c68, 0x1c6a, 0x1c6c, 0x1c6e, 0x1c70,
+ 0x1c72, 0x1c74, 0x1c76, 0x1c78, 0x1c7a, 0x1c7c, 0x1c7e, 0x1c80,
+ 0x1c82, 0x1c84, 0x1c86, 0x1c88, 0x1c8a, 0x1c8c, 0x1c8e, 0x1c90,
+ 0x1c92, 0x1c94, 0x1c96, 0x1c98, 0x1c9a, 0x1c9c, 0x1c9e, 0x1ca0,
+ 0x1ca2, 0x1ca4, 0x1ca6, 0x1ca8, 0x1caa, 0x1cac, 0x1cae, 0x1cb0,
+ 0x1cb2, 0x1cb4, 0x1cb6, 0x1cb8, 0x1cba, 0x1cbc, 0x1cbe, 0x1cc0,
+ 0x1cc2, 0x1cc4, 0x1cc6, 0x1cc8, 0x1cca, 0x1ccd, 0xffff, 0xffff,
+ 0x1ccf, 0x1cd1, 0x1cd3, 0x1cd5, 0x1cd7, 0x1cd9, 0x1cdb, 0x1cdd,
+ 0x1cdf, 0x1ce1, 0x1ce3, 0x1ce5, 0x1ce7, 0x1ce9, 0x1ceb, 0x1ced,
+ 0x1cef, 0x1cf1, 0x1cf3, 0x1cf5, 0x1cf7, 0x1cf9, 0x1cfb, 0x1cfd,
+ 0x1cff, 0x1d01, 0x1d03, 0x1d05, 0x1d07, 0x1d09, 0x1d0b, 0x1d0d,
+ 0x1d0f, 0x1d11, 0x1d13, 0x1d15, 0x1d17, 0x1d19, 0x1d1b, 0x1d1d,
+ 0x1d1f, 0x1d21, 0x1d23, 0x1d25, 0x1d27, 0x1d29, 0x1d2b, 0x1d2d,
+ 0x1d2f, 0x1d31, 0x1d33, 0x1d35, 0x1d37, 0x1d39, 0x1d3b, 0x1d3d,
+ 0x1d3f, 0x1d41, 0x1d43, 0x1d45, 0x1d47, 0x1d49, 0x1d4b, 0x1d4d,
+ 0x1d4f, 0x1d51, 0x1d53, 0x1d55, 0x1d57, 0x1d59, 0x1d5b, 0x1d5d,
+ 0x1d5f, 0x1d61, 0x1d63, 0x1d65, 0x1d67, 0x1d69, 0x1d6b, 0x1d6d,
+ 0x1d6f, 0x1d71, 0x1d73, 0x1d75, 0x1d77, 0x1d79, 0x1d7b, 0x1d7d,
+ 0x1d7f, 0x1d81, 0x1d83, 0x1d85, 0x1d87, 0x1d89, 0x1d8b, 0x1d8d,
+ 0x1d90, 0x1d93, 0x1d96, 0x1d98, 0x1d9a, 0x1d9c, 0x1d9f, 0x1da2,
+ 0x1da5, 0x1da7, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x1da6, 0x1da9, 0x1dac, 0x1daf, 0x1db3, 0x1db7, 0x1dba, 0xffff,
+ 0x1da9, 0x1dac, 0x1daf, 0x1db2, 0x1db6, 0x1dba, 0x1dbd, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x1dbd, 0x1dc0, 0x1dc3, 0x1dc6, 0x1dc9,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x1dcc, 0xffff, 0x1dcf,
- 0x1dd2, 0x1dd4, 0x1dd6, 0x1dd8, 0x1dda, 0x1ddc, 0x1dde, 0x1de0,
- 0x1de2, 0x1de4, 0x1de6, 0x1de9, 0x1dec, 0x1def, 0x1df2, 0x1df5,
- 0x1df8, 0x1dfb, 0x1dfe, 0x1e01, 0x1e04, 0x1e07, 0x1e0a, 0xffff,
- 0x1e0d, 0x1e10, 0x1e13, 0x1e16, 0x1e19, 0xffff, 0x1e1c, 0xffff,
- 0x1e1f, 0x1e22, 0xffff, 0x1e25, 0x1e28, 0xffff, 0x1e2b, 0x1e2e,
- 0x1e31, 0x1e34, 0x1e37, 0x1e3a, 0x1e3d, 0x1e40, 0x1e43, 0x1e46,
- 0x1e49, 0x1e4b, 0x1e4d, 0x1e4f, 0x1e51, 0x1e53, 0x1e55, 0x1e57,
- 0x1e59, 0x1e5b, 0x1e5d, 0x1e5f, 0x1e61, 0x1e63, 0x1e65, 0x1e67,
- 0x1e69, 0x1e6b, 0x1e6d, 0x1e6f, 0x1e71, 0x1e73, 0x1e75, 0x1e77,
- 0x1e79, 0x1e7b, 0x1e7d, 0x1e7f, 0x1e81, 0x1e83, 0x1e85, 0x1e87,
- 0x1e89, 0x1e8b, 0x1e8d, 0x1e8f, 0x1e91, 0x1e93, 0x1e95, 0x1e97,
- 0x1e99, 0x1e9b, 0x1e9d, 0x1e9f, 0x1ea1, 0x1ea3, 0x1ea5, 0x1ea7,
- 0x1ea9, 0x1eab, 0x1ead, 0x1eaf, 0x1eb1, 0x1eb3, 0x1eb5, 0x1eb7,
- 0x1eb9, 0x1ebb, 0x1ebd, 0x1ebf, 0x1ec1, 0x1ec3, 0x1ec5, 0x1ec7,
- 0x1ec9, 0x1ecb, 0x1ecd, 0x1ecf, 0x1ed1, 0x1ed3, 0x1ed5, 0x1ed7,
- 0x1ed9, 0x1edb, 0x1edd, 0x1edf, 0x1ee1, 0x1ee3, 0x1ee5, 0x1ee7,
- 0x1ee9, 0x1eeb, 0x1eed, 0x1eef, 0x1ef1, 0x1ef3, 0x1ef5, 0x1ef7,
- 0x1ef9, 0x1efb, 0x1efd, 0x1eff, 0x1f01, 0x1f03, 0x1f05, 0x1f07,
- 0x1f09, 0x1f0b, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x1f0d, 0x1f0f, 0x1f11, 0x1f13, 0x1f15,
- 0x1f17, 0x1f19, 0x1f1b, 0x1f1d, 0x1f1f, 0x1f21, 0x1f23, 0x1f25,
- 0x1f27, 0x1f29, 0x1f2b, 0x1f2d, 0x1f2f, 0x1f31, 0x1f33, 0x1f35,
- 0x1f37, 0x1f39, 0x1f3b, 0x1f3e, 0x1f41, 0x1f44, 0x1f47, 0x1f4a,
- 0x1f4d, 0x1f50, 0x1f53, 0x1f56, 0x1f59, 0x1f5c, 0x1f5f, 0x1f62,
- 0x1f65, 0x1f68, 0x1f6b, 0x1f6e, 0x1f71, 0x1f73, 0x1f75, 0x1f77,
-
- 0x1f79, 0x1f7c, 0x1f7f, 0x1f82, 0x1f85, 0x1f88, 0x1f8b, 0x1f8e,
- 0x1f91, 0x1f94, 0x1f97, 0x1f9a, 0x1f9d, 0x1fa0, 0x1fa3, 0x1fa6,
- 0x1fa9, 0x1fac, 0x1faf, 0x1fb2, 0x1fb5, 0x1fb8, 0x1fbb, 0x1fbe,
- 0x1fc1, 0x1fc4, 0x1fc7, 0x1fca, 0x1fcd, 0x1fd0, 0x1fd3, 0x1fd6,
- 0x1fd9, 0x1fdc, 0x1fdf, 0x1fe2, 0x1fe5, 0x1fe8, 0x1feb, 0x1fee,
- 0x1ff1, 0x1ff4, 0x1ff7, 0x1ffa, 0x1ffd, 0x2000, 0x2003, 0x2006,
- 0x2009, 0x200c, 0x200f, 0x2012, 0x2015, 0x2018, 0x201b, 0x201e,
- 0x2021, 0x2024, 0x2027, 0x202a, 0x202d, 0x2030, 0x2033, 0x2036,
- 0x2039, 0x203c, 0x203f, 0x2042, 0x2045, 0x2048, 0x204b, 0x204e,
- 0x2051, 0x2054, 0x2057, 0x205a, 0x205d, 0x2060, 0x2063, 0x2066,
- 0x2069, 0x206c, 0x206f, 0x2072, 0x2075, 0x2078, 0x207b, 0x207e,
- 0x2081, 0x2084, 0x2087, 0x208a, 0x208d, 0x2090, 0x2093, 0x2097,
- 0x209b, 0x209f, 0x20a3, 0x20a7, 0x20ab, 0x20ae, 0x20b1, 0x20b4,
- 0x20b7, 0x20ba, 0x20bd, 0x20c0, 0x20c3, 0x20c6, 0x20c9, 0x20cc,
- 0x20cf, 0x20d2, 0x20d5, 0x20d8, 0x20db, 0x20de, 0x20e1, 0x20e4,
- 0x20e7, 0x20ea, 0x20ed, 0x20f0, 0x20f3, 0x20f6, 0x20f9, 0x20fc,
- 0x20ff, 0x2102, 0x2105, 0x2108, 0x210b, 0x210e, 0x2111, 0x2114,
- 0x2117, 0x211a, 0x211d, 0x2120, 0x2123, 0x2126, 0x2129, 0x212c,
- 0x212f, 0x2132, 0x2135, 0x2138, 0x213b, 0x213e, 0x2141, 0x2144,
- 0x2147, 0x214a, 0x214d, 0x2150, 0x2153, 0x2156, 0x2159, 0x215c,
- 0x215f, 0x2162, 0x2165, 0x2168, 0x216b, 0x216e, 0x2171, 0x2174,
- 0x2177, 0x217a, 0x217d, 0x2180, 0x2183, 0x2186, 0x2189, 0x218c,
- 0x218f, 0x2192, 0x2195, 0x2198, 0x219b, 0x219e, 0x21a1, 0x21a4,
- 0x21a7, 0x21aa, 0x21ad, 0x21b0, 0x21b3, 0x21b6, 0x21b9, 0x21bc,
- 0x21bf, 0x21c2, 0x21c5, 0x21c8, 0x21cb, 0x21ce, 0x21d1, 0x21d4,
- 0x21d7, 0x21da, 0x21dd, 0x21e0, 0x21e3, 0x21e6, 0x21e9, 0x21ec,
- 0x21ef, 0x21f2, 0x21f5, 0x21f8, 0x21fb, 0x21fe, 0x2201, 0x2204,
- 0x2207, 0x220a, 0x220d, 0x2210, 0x2213, 0x2216, 0x2219, 0x221c,
- 0x221f, 0x2222, 0x2225, 0x2228, 0x222b, 0x222e, 0x2231, 0x2234,
- 0x2237, 0x223a, 0x223d, 0x2240, 0x2243, 0x2246, 0x2249, 0x224c,
- 0x224f, 0x2252, 0x2255, 0x2259, 0x225d, 0x2261, 0x2264, 0x2267,
- 0x226a, 0x226d, 0x2270, 0x2273, 0x2276, 0x2279, 0x227c, 0x227f,
-
- 0x2282, 0x2285, 0x2288, 0x228b, 0x228e, 0x2291, 0x2294, 0x2297,
- 0x229a, 0x229d, 0x22a0, 0x22a3, 0x22a6, 0x22a9, 0x22ac, 0x22af,
- 0x22b2, 0x22b5, 0x22b8, 0x22bb, 0x22be, 0x22c1, 0x22c4, 0x22c7,
- 0x22ca, 0x22cd, 0x22d0, 0x22d3, 0x22d6, 0x22d9, 0x22dc, 0x22df,
- 0x22e2, 0x22e5, 0x22e8, 0x22eb, 0x22ee, 0x22f1, 0x22f4, 0x22f7,
- 0x22fa, 0x22fd, 0x2300, 0x2303, 0x2306, 0x2309, 0x230c, 0x230f,
- 0x2312, 0x2315, 0x2318, 0x231b, 0x231e, 0x2321, 0x2324, 0x2327,
- 0x232a, 0x232d, 0x2330, 0x2333, 0x2336, 0x2339, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x233c, 0x2340, 0x2344, 0x2348, 0x234c, 0x2350, 0x2354, 0x2358,
- 0x235c, 0x2360, 0x2364, 0x2368, 0x236c, 0x2370, 0x2374, 0x2378,
- 0x237c, 0x2380, 0x2384, 0x2388, 0x238c, 0x2390, 0x2394, 0x2398,
- 0x239c, 0x23a0, 0x23a4, 0x23a8, 0x23ac, 0x23b0, 0x23b4, 0x23b8,
- 0x23bc, 0x23c0, 0x23c4, 0x23c8, 0x23cc, 0x23d0, 0x23d4, 0x23d8,
- 0x23dc, 0x23e0, 0x23e4, 0x23e8, 0x23ec, 0x23f0, 0x23f4, 0x23f8,
- 0x23fc, 0x2400, 0x2404, 0x2408, 0x240c, 0x2410, 0x2414, 0x2418,
- 0x241c, 0x2420, 0x2424, 0x2428, 0x242c, 0x2430, 0x2434, 0x2438,
- 0xffff, 0xffff, 0x243c, 0x2440, 0x2444, 0x2448, 0x244c, 0x2450,
- 0x2454, 0x2458, 0x245c, 0x2460, 0x2464, 0x2468, 0x246c, 0x2470,
- 0x2474, 0x2478, 0x247c, 0x2480, 0x2484, 0x2488, 0x248c, 0x2490,
- 0x2494, 0x2498, 0x249c, 0x24a0, 0x24a4, 0x24a8, 0x24ac, 0x24b0,
- 0x24b4, 0x24b8, 0x24bc, 0x24c0, 0x24c4, 0x24c8, 0x24cc, 0x24d0,
- 0x24d4, 0x24d8, 0x24dc, 0x24e0, 0x24e4, 0x24e8, 0x24ec, 0x24f0,
- 0x24f4, 0x24f8, 0x24fc, 0x2500, 0x2504, 0x2508, 0x250c, 0x2510,
+ 0xffff, 0xffff, 0xffff, 0x1dc0, 0x1dc3, 0x1dc6, 0x1dc9, 0x1dcc,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x1dcf, 0xffff, 0x1dd2,
+ 0x1dd5, 0x1dd7, 0x1dd9, 0x1ddb, 0x1ddd, 0x1ddf, 0x1de1, 0x1de3,
+ 0x1de5, 0x1de7, 0x1de9, 0x1dec, 0x1def, 0x1df2, 0x1df5, 0x1df8,
+ 0x1dfb, 0x1dfe, 0x1e01, 0x1e04, 0x1e07, 0x1e0a, 0x1e0d, 0xffff,
+ 0x1e10, 0x1e13, 0x1e16, 0x1e19, 0x1e1c, 0xffff, 0x1e1f, 0xffff,
+ 0x1e22, 0x1e25, 0xffff, 0x1e28, 0x1e2b, 0xffff, 0x1e2e, 0x1e31,
+ 0x1e34, 0x1e37, 0x1e3a, 0x1e3d, 0x1e40, 0x1e43, 0x1e46, 0x1e49,
+ 0x1e4c, 0x1e4e, 0x1e50, 0x1e52, 0x1e54, 0x1e56, 0x1e58, 0x1e5a,
+ 0x1e5c, 0x1e5e, 0x1e60, 0x1e62, 0x1e64, 0x1e66, 0x1e68, 0x1e6a,
+ 0x1e6c, 0x1e6e, 0x1e70, 0x1e72, 0x1e74, 0x1e76, 0x1e78, 0x1e7a,
+ 0x1e7c, 0x1e7e, 0x1e80, 0x1e82, 0x1e84, 0x1e86, 0x1e88, 0x1e8a,
+ 0x1e8c, 0x1e8e, 0x1e90, 0x1e92, 0x1e94, 0x1e96, 0x1e98, 0x1e9a,
+ 0x1e9c, 0x1e9e, 0x1ea0, 0x1ea2, 0x1ea4, 0x1ea6, 0x1ea8, 0x1eaa,
+ 0x1eac, 0x1eae, 0x1eb0, 0x1eb2, 0x1eb4, 0x1eb6, 0x1eb8, 0x1eba,
+ 0x1ebc, 0x1ebe, 0x1ec0, 0x1ec2, 0x1ec4, 0x1ec6, 0x1ec8, 0x1eca,
+ 0x1ecc, 0x1ece, 0x1ed0, 0x1ed2, 0x1ed4, 0x1ed6, 0x1ed8, 0x1eda,
+ 0x1edc, 0x1ede, 0x1ee0, 0x1ee2, 0x1ee4, 0x1ee6, 0x1ee8, 0x1eea,
+ 0x1eec, 0x1eee, 0x1ef0, 0x1ef2, 0x1ef4, 0x1ef6, 0x1ef8, 0x1efa,
+ 0x1efc, 0x1efe, 0x1f00, 0x1f02, 0x1f04, 0x1f06, 0x1f08, 0x1f0a,
+ 0x1f0c, 0x1f0e, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x1f10, 0x1f12, 0x1f14, 0x1f16, 0x1f18,
+ 0x1f1a, 0x1f1c, 0x1f1e, 0x1f20, 0x1f22, 0x1f24, 0x1f26, 0x1f28,
+ 0x1f2a, 0x1f2c, 0x1f2e, 0x1f30, 0x1f32, 0x1f34, 0x1f36, 0x1f38,
+ 0x1f3a, 0x1f3c, 0x1f3e, 0x1f41, 0x1f44, 0x1f47, 0x1f4a, 0x1f4d,
+ 0x1f50, 0x1f53, 0x1f56, 0x1f59, 0x1f5c, 0x1f5f, 0x1f62, 0x1f65,
+ 0x1f68, 0x1f6b, 0x1f6e, 0x1f71, 0x1f74, 0x1f76, 0x1f78, 0x1f7a,
+
+ 0x1f7c, 0x1f7f, 0x1f82, 0x1f85, 0x1f88, 0x1f8b, 0x1f8e, 0x1f91,
+ 0x1f94, 0x1f97, 0x1f9a, 0x1f9d, 0x1fa0, 0x1fa3, 0x1fa6, 0x1fa9,
+ 0x1fac, 0x1faf, 0x1fb2, 0x1fb5, 0x1fb8, 0x1fbb, 0x1fbe, 0x1fc1,
+ 0x1fc4, 0x1fc7, 0x1fca, 0x1fcd, 0x1fd0, 0x1fd3, 0x1fd6, 0x1fd9,
+ 0x1fdc, 0x1fdf, 0x1fe2, 0x1fe5, 0x1fe8, 0x1feb, 0x1fee, 0x1ff1,
+ 0x1ff4, 0x1ff7, 0x1ffa, 0x1ffd, 0x2000, 0x2003, 0x2006, 0x2009,
+ 0x200c, 0x200f, 0x2012, 0x2015, 0x2018, 0x201b, 0x201e, 0x2021,
+ 0x2024, 0x2027, 0x202a, 0x202d, 0x2030, 0x2033, 0x2036, 0x2039,
+ 0x203c, 0x203f, 0x2042, 0x2045, 0x2048, 0x204b, 0x204e, 0x2051,
+ 0x2054, 0x2057, 0x205a, 0x205d, 0x2060, 0x2063, 0x2066, 0x2069,
+ 0x206c, 0x206f, 0x2072, 0x2075, 0x2078, 0x207b, 0x207e, 0x2081,
+ 0x2084, 0x2087, 0x208a, 0x208d, 0x2090, 0x2093, 0x2096, 0x209a,
+ 0x209e, 0x20a2, 0x20a6, 0x20aa, 0x20ae, 0x20b1, 0x20b4, 0x20b7,
+ 0x20ba, 0x20bd, 0x20c0, 0x20c3, 0x20c6, 0x20c9, 0x20cc, 0x20cf,
+ 0x20d2, 0x20d5, 0x20d8, 0x20db, 0x20de, 0x20e1, 0x20e4, 0x20e7,
+ 0x20ea, 0x20ed, 0x20f0, 0x20f3, 0x20f6, 0x20f9, 0x20fc, 0x20ff,
+ 0x2102, 0x2105, 0x2108, 0x210b, 0x210e, 0x2111, 0x2114, 0x2117,
+ 0x211a, 0x211d, 0x2120, 0x2123, 0x2126, 0x2129, 0x212c, 0x212f,
+ 0x2132, 0x2135, 0x2138, 0x213b, 0x213e, 0x2141, 0x2144, 0x2147,
+ 0x214a, 0x214d, 0x2150, 0x2153, 0x2156, 0x2159, 0x215c, 0x215f,
+ 0x2162, 0x2165, 0x2168, 0x216b, 0x216e, 0x2171, 0x2174, 0x2177,
+ 0x217a, 0x217d, 0x2180, 0x2183, 0x2186, 0x2189, 0x218c, 0x218f,
+ 0x2192, 0x2195, 0x2198, 0x219b, 0x219e, 0x21a1, 0x21a4, 0x21a7,
+ 0x21aa, 0x21ad, 0x21b0, 0x21b3, 0x21b6, 0x21b9, 0x21bc, 0x21bf,
+ 0x21c2, 0x21c5, 0x21c8, 0x21cb, 0x21ce, 0x21d1, 0x21d4, 0x21d7,
+ 0x21da, 0x21dd, 0x21e0, 0x21e3, 0x21e6, 0x21e9, 0x21ec, 0x21ef,
+ 0x21f2, 0x21f5, 0x21f8, 0x21fb, 0x21fe, 0x2201, 0x2204, 0x2207,
+ 0x220a, 0x220d, 0x2210, 0x2213, 0x2216, 0x2219, 0x221c, 0x221f,
+ 0x2222, 0x2225, 0x2228, 0x222b, 0x222e, 0x2231, 0x2234, 0x2237,
+ 0x223a, 0x223d, 0x2240, 0x2243, 0x2246, 0x2249, 0x224c, 0x224f,
+ 0x2252, 0x2255, 0x2258, 0x225c, 0x2260, 0x2264, 0x2267, 0x226a,
+ 0x226d, 0x2270, 0x2273, 0x2276, 0x2279, 0x227c, 0x227f, 0x2282,
+
+ 0x2285, 0x2288, 0x228b, 0x228e, 0x2291, 0x2294, 0x2297, 0x229a,
+ 0x229d, 0x22a0, 0x22a3, 0x22a6, 0x22a9, 0x22ac, 0x22af, 0x22b2,
+ 0x22b5, 0x22b8, 0x22bb, 0x22be, 0x22c1, 0x22c4, 0x22c7, 0x22ca,
+ 0x22cd, 0x22d0, 0x22d3, 0x22d6, 0x22d9, 0x22dc, 0x22df, 0x22e2,
+ 0x22e5, 0x22e8, 0x22eb, 0x22ee, 0x22f1, 0x22f4, 0x22f7, 0x22fa,
+ 0x22fd, 0x2300, 0x2303, 0x2306, 0x2309, 0x230c, 0x230f, 0x2312,
+ 0x2315, 0x2318, 0x231b, 0x231e, 0x2321, 0x2324, 0x2327, 0x232a,
+ 0x232d, 0x2330, 0x2333, 0x2336, 0x2339, 0x233c, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x233f, 0x2343, 0x2347, 0x234b, 0x234f, 0x2353, 0x2357, 0x235b,
+ 0x235f, 0x2363, 0x2367, 0x236b, 0x236f, 0x2373, 0x2377, 0x237b,
+ 0x237f, 0x2383, 0x2387, 0x238b, 0x238f, 0x2393, 0x2397, 0x239b,
+ 0x239f, 0x23a3, 0x23a7, 0x23ab, 0x23af, 0x23b3, 0x23b7, 0x23bb,
+ 0x23bf, 0x23c3, 0x23c7, 0x23cb, 0x23cf, 0x23d3, 0x23d7, 0x23db,
+ 0x23df, 0x23e3, 0x23e7, 0x23eb, 0x23ef, 0x23f3, 0x23f7, 0x23fb,
+ 0x23ff, 0x2403, 0x2407, 0x240b, 0x240f, 0x2413, 0x2417, 0x241b,
+ 0x241f, 0x2423, 0x2427, 0x242b, 0x242f, 0x2433, 0x2437, 0x243b,
+ 0xffff, 0xffff, 0x243f, 0x2443, 0x2447, 0x244b, 0x244f, 0x2453,
+ 0x2457, 0x245b, 0x245f, 0x2463, 0x2467, 0x246b, 0x246f, 0x2473,
+ 0x2477, 0x247b, 0x247f, 0x2483, 0x2487, 0x248b, 0x248f, 0x2493,
+ 0x2497, 0x249b, 0x249f, 0x24a3, 0x24a7, 0x24ab, 0x24af, 0x24b3,
+ 0x24b7, 0x24bb, 0x24bf, 0x24c3, 0x24c7, 0x24cb, 0x24cf, 0x24d3,
+ 0x24d7, 0x24db, 0x24df, 0x24e3, 0x24e7, 0x24eb, 0x24ef, 0x24f3,
+ 0x24f7, 0x24fb, 0x24ff, 0x2503, 0x2507, 0x250b, 0x250f, 0x2513,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x2514, 0x2518, 0x251c, 0x2521, 0x2526, 0x252b, 0x2530, 0x2535,
- 0x253a, 0x253f, 0x2543, 0x2556, 0x255f, 0xffff, 0xffff, 0xffff,
+ 0x2517, 0x251b, 0x251f, 0x2524, 0x2529, 0x252e, 0x2533, 0x2538,
+ 0x253d, 0x2542, 0x2546, 0x2559, 0x2562, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x2564, 0x2566, 0x2568, 0x256a, 0x256c, 0x256e, 0x2570, 0x2572,
- 0x2574, 0x2576, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x2567, 0x2569, 0x256b, 0x256d, 0x256f, 0x2571, 0x2573, 0x2575,
+ 0x2577, 0x2579, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x2578, 0x257a, 0x257c, 0x257e, 0x2580, 0x2582, 0x2584, 0x2586,
- 0x2588, 0x258a, 0x258c, 0x258e, 0x2590, 0x2592, 0x2594, 0x2596,
- 0x2598, 0x259a, 0x259c, 0x259e, 0x25a0, 0xffff, 0xffff, 0x25a2,
- 0x25a4, 0x25a6, 0x25a8, 0x25aa, 0x25ac, 0x25ae, 0x25b0, 0x25b2,
- 0x25b4, 0x25b6, 0x25b8, 0xffff, 0x25ba, 0x25bc, 0x25be, 0x25c0,
- 0x25c2, 0x25c4, 0x25c6, 0x25c8, 0x25ca, 0x25cc, 0x25ce, 0x25d0,
- 0x25d2, 0x25d4, 0x25d6, 0x25d8, 0x25da, 0x25dc, 0x25de, 0xffff,
- 0x25e0, 0x25e2, 0x25e4, 0x25e6, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x25e8, 0x25eb, 0x25ee, 0xffff, 0x25f1, 0xffff, 0x25f4, 0x25f7,
- 0x25fa, 0x25fd, 0x2600, 0x2603, 0x2606, 0x2609, 0x260c, 0x260f,
- 0x2612, 0x2614, 0x2616, 0x2618, 0x261a, 0x261c, 0x261e, 0x2620,
- 0x2622, 0x2624, 0x2626, 0x2628, 0x262a, 0x262c, 0x262e, 0x2630,
- 0x2632, 0x2634, 0x2636, 0x2638, 0x263a, 0x263c, 0x263e, 0x2640,
- 0x2642, 0x2644, 0x2646, 0x2648, 0x264a, 0x264c, 0x264e, 0x2650,
- 0x2652, 0x2654, 0x2656, 0x2658, 0x265a, 0x265c, 0x265e, 0x2660,
- 0x2662, 0x2664, 0x2666, 0x2668, 0x266a, 0x266c, 0x266e, 0x2670,
- 0x2672, 0x2674, 0x2676, 0x2678, 0x267a, 0x267c, 0x267e, 0x2680,
- 0x2682, 0x2684, 0x2686, 0x2688, 0x268a, 0x268c, 0x268e, 0x2690,
- 0x2692, 0x2694, 0x2696, 0x2698, 0x269a, 0x269c, 0x269e, 0x26a0,
- 0x26a2, 0x26a4, 0x26a6, 0x26a8, 0x26aa, 0x26ac, 0x26ae, 0x26b0,
- 0x26b2, 0x26b4, 0x26b6, 0x26b8, 0x26ba, 0x26bc, 0x26be, 0x26c0,
- 0x26c2, 0x26c4, 0x26c6, 0x26c8, 0x26ca, 0x26cc, 0x26ce, 0x26d0,
- 0x26d2, 0x26d4, 0x26d6, 0x26d8, 0x26da, 0x26dc, 0x26de, 0x26e0,
- 0x26e2, 0x26e4, 0x26e6, 0x26e8, 0x26ea, 0x26ec, 0x26ee, 0x26f0,
- 0x26f2, 0x26f4, 0x26f6, 0x26f8, 0x26fa, 0x26fc, 0x26ff, 0x2702,
- 0x2705, 0x2708, 0x270b, 0x270e, 0x2711, 0xffff, 0xffff, 0xffff,
+ 0x257b, 0x257d, 0x257f, 0x2581, 0x2583, 0x2585, 0x2587, 0x2589,
+ 0x258b, 0x258d, 0x258f, 0x2591, 0x2593, 0x2595, 0x2597, 0x2599,
+ 0x259b, 0x259d, 0x259f, 0x25a1, 0x25a3, 0xffff, 0xffff, 0x25a5,
+ 0x25a7, 0x25a9, 0x25ab, 0x25ad, 0x25af, 0x25b1, 0x25b3, 0x25b5,
+ 0x25b7, 0x25b9, 0x25bb, 0xffff, 0x25bd, 0x25bf, 0x25c1, 0x25c3,
+ 0x25c5, 0x25c7, 0x25c9, 0x25cb, 0x25cd, 0x25cf, 0x25d1, 0x25d3,
+ 0x25d5, 0x25d7, 0x25d9, 0x25db, 0x25dd, 0x25df, 0x25e1, 0xffff,
+ 0x25e3, 0x25e5, 0x25e7, 0x25e9, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x25eb, 0x25ee, 0x25f1, 0xffff, 0x25f4, 0xffff, 0x25f7, 0x25fa,
+ 0x25fd, 0x2600, 0x2603, 0x2606, 0x2609, 0x260c, 0x260f, 0x2612,
+ 0x2615, 0x2617, 0x2619, 0x261b, 0x261d, 0x261f, 0x2621, 0x2623,
+ 0x2625, 0x2627, 0x2629, 0x262b, 0x262d, 0x262f, 0x2631, 0x2633,
+ 0x2635, 0x2637, 0x2639, 0x263b, 0x263d, 0x263f, 0x2641, 0x2643,
+ 0x2645, 0x2647, 0x2649, 0x264b, 0x264d, 0x264f, 0x2651, 0x2653,
+ 0x2655, 0x2657, 0x2659, 0x265b, 0x265d, 0x265f, 0x2661, 0x2663,
+ 0x2665, 0x2667, 0x2669, 0x266b, 0x266d, 0x266f, 0x2671, 0x2673,
+ 0x2675, 0x2677, 0x2679, 0x267b, 0x267d, 0x267f, 0x2681, 0x2683,
+ 0x2685, 0x2687, 0x2689, 0x268b, 0x268d, 0x268f, 0x2691, 0x2693,
+ 0x2695, 0x2697, 0x2699, 0x269b, 0x269d, 0x269f, 0x26a1, 0x26a3,
+ 0x26a5, 0x26a7, 0x26a9, 0x26ab, 0x26ad, 0x26af, 0x26b1, 0x26b3,
+ 0x26b5, 0x26b7, 0x26b9, 0x26bb, 0x26bd, 0x26bf, 0x26c1, 0x26c3,
+ 0x26c5, 0x26c7, 0x26c9, 0x26cb, 0x26cd, 0x26cf, 0x26d1, 0x26d3,
+ 0x26d5, 0x26d7, 0x26d9, 0x26db, 0x26dd, 0x26df, 0x26e1, 0x26e3,
+ 0x26e5, 0x26e7, 0x26e9, 0x26eb, 0x26ed, 0x26ef, 0x26f1, 0x26f3,
+ 0x26f5, 0x26f7, 0x26f9, 0x26fb, 0x26fd, 0x26ff, 0x2702, 0x2705,
+ 0x2708, 0x270b, 0x270e, 0x2711, 0x2714, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x2714, 0x2716, 0x2718, 0x271a, 0x271c, 0x271e, 0x2720,
- 0x2722, 0x2724, 0x2726, 0x2728, 0x272a, 0x272c, 0x272e, 0x2730,
- 0x2732, 0x2734, 0x2736, 0x2738, 0x273a, 0x273c, 0x273e, 0x2740,
- 0x2742, 0x2744, 0x2746, 0x2748, 0x274a, 0x274c, 0x274e, 0x2750,
- 0x2752, 0x2754, 0x2756, 0x2758, 0x275a, 0x275c, 0x275e, 0x2760,
- 0x2762, 0x2764, 0x2766, 0x2768, 0x276a, 0x276c, 0x276e, 0x2770,
- 0x2772, 0x2774, 0x2776, 0x2778, 0x277a, 0x277c, 0x277e, 0x2780,
- 0x2782, 0x2784, 0x2786, 0x2788, 0x278a, 0x278c, 0x278e, 0x2790,
- 0x2792, 0x2794, 0x2796, 0x2798, 0x279a, 0x279c, 0x279e, 0x27a0,
- 0x27a2, 0x27a4, 0x27a6, 0x27a8, 0x27aa, 0x27ac, 0x27ae, 0x27b0,
- 0x27b2, 0x27b4, 0x27b6, 0x27b8, 0x27ba, 0x27bc, 0x27be, 0x27c0,
- 0x27c2, 0x27c4, 0x27c6, 0x27c8, 0x27ca, 0x27cc, 0x27ce, 0x27d0,
- 0x27d2, 0x27d4, 0x27d6, 0x27d8, 0x27da, 0x27dc, 0x27de, 0x27e0,
- 0x27e2, 0x27e4, 0x27e6, 0x27e8, 0x27ea, 0x27ec, 0x27ee, 0x27f0,
- 0x27f2, 0x27f4, 0x27f6, 0x27f8, 0x27fa, 0x27fc, 0x27fe, 0x2800,
- 0x2802, 0x2804, 0x2806, 0x2808, 0x280a, 0x280c, 0x280e, 0x2810,
- 0x2812, 0x2814, 0x2816, 0x2818, 0x281a, 0x281c, 0x281e, 0x2820,
- 0x2822, 0x2824, 0x2826, 0x2828, 0x282a, 0x282c, 0x282e, 0x2830,
- 0x2832, 0x2834, 0x2836, 0x2838, 0x283a, 0x283c, 0x283e, 0x2840,
- 0x2842, 0x2844, 0x2846, 0x2848, 0x284a, 0x284c, 0x284e, 0x2850,
- 0x2852, 0x2854, 0x2856, 0x2858, 0x285a, 0x285c, 0x285e, 0x2860,
- 0x2862, 0x2864, 0x2866, 0x2868, 0x286a, 0x286c, 0x286e, 0x2870,
- 0x2872, 0x2874, 0x2876, 0x2878, 0x287a, 0x287c, 0x287e, 0x2880,
- 0x2882, 0x2884, 0x2886, 0x2888, 0x288a, 0x288c, 0x288e, 0xffff,
- 0xffff, 0xffff, 0x2890, 0x2892, 0x2894, 0x2896, 0x2898, 0x289a,
- 0xffff, 0xffff, 0x289c, 0x289e, 0x28a0, 0x28a2, 0x28a4, 0x28a6,
- 0xffff, 0xffff, 0x28a8, 0x28aa, 0x28ac, 0x28ae, 0x28b0, 0x28b2,
- 0xffff, 0xffff, 0x28b4, 0x28b6, 0x28b8, 0xffff, 0xffff, 0xffff,
- 0x28ba, 0x28bc, 0x28be, 0x28c0, 0x28c2, 0x28c4, 0x28c6, 0xffff,
- 0x28c8, 0x28ca, 0x28cc, 0x28ce, 0x28d0, 0x28d2, 0x28d4, 0xffff,
+ 0xffff, 0x2717, 0x2719, 0x271b, 0x271d, 0x271f, 0x2721, 0x2723,
+ 0x2725, 0x2727, 0x2729, 0x272b, 0x272d, 0x272f, 0x2731, 0x2733,
+ 0x2735, 0x2737, 0x2739, 0x273b, 0x273d, 0x273f, 0x2741, 0x2743,
+ 0x2745, 0x2747, 0x2749, 0x274b, 0x274d, 0x274f, 0x2751, 0x2753,
+ 0x2755, 0x2757, 0x2759, 0x275b, 0x275d, 0x275f, 0x2761, 0x2763,
+ 0x2765, 0x2767, 0x2769, 0x276b, 0x276d, 0x276f, 0x2771, 0x2773,
+ 0x2775, 0x2777, 0x2779, 0x277b, 0x277d, 0x277f, 0x2781, 0x2783,
+ 0x2785, 0x2787, 0x2789, 0x278b, 0x278d, 0x278f, 0x2791, 0x2793,
+ 0x2795, 0x2797, 0x2799, 0x279b, 0x279d, 0x279f, 0x27a1, 0x27a3,
+ 0x27a5, 0x27a7, 0x27a9, 0x27ab, 0x27ad, 0x27af, 0x27b1, 0x27b3,
+ 0x27b5, 0x27b7, 0x27b9, 0x27bb, 0x27bd, 0x27bf, 0x27c1, 0x27c3,
+ 0x27c5, 0x27c7, 0x27c9, 0x27cb, 0x27cd, 0x27cf, 0x27d1, 0x27d3,
+ 0x27d5, 0x27d7, 0x27d9, 0x27db, 0x27dd, 0x27df, 0x27e1, 0x27e3,
+ 0x27e5, 0x27e7, 0x27e9, 0x27eb, 0x27ed, 0x27ef, 0x27f1, 0x27f3,
+ 0x27f5, 0x27f7, 0x27f9, 0x27fb, 0x27fd, 0x27ff, 0x2801, 0x2803,
+ 0x2805, 0x2807, 0x2809, 0x280b, 0x280d, 0x280f, 0x2811, 0x2813,
+ 0x2815, 0x2817, 0x2819, 0x281b, 0x281d, 0x281f, 0x2821, 0x2823,
+ 0x2825, 0x2827, 0x2829, 0x282b, 0x282d, 0x282f, 0x2831, 0x2833,
+ 0x2835, 0x2837, 0x2839, 0x283b, 0x283d, 0x283f, 0x2841, 0x2843,
+ 0x2845, 0x2847, 0x2849, 0x284b, 0x284d, 0x284f, 0x2851, 0x2853,
+ 0x2855, 0x2857, 0x2859, 0x285b, 0x285d, 0x285f, 0x2861, 0x2863,
+ 0x2865, 0x2867, 0x2869, 0x286b, 0x286d, 0x286f, 0x2871, 0x2873,
+ 0x2875, 0x2877, 0x2879, 0x287b, 0x287d, 0x287f, 0x2881, 0x2883,
+ 0x2885, 0x2887, 0x2889, 0x288b, 0x288d, 0x288f, 0x2891, 0xffff,
+ 0xffff, 0xffff, 0x2893, 0x2895, 0x2897, 0x2899, 0x289b, 0x289d,
+ 0xffff, 0xffff, 0x289f, 0x28a1, 0x28a3, 0x28a5, 0x28a7, 0x28a9,
+ 0xffff, 0xffff, 0x28ab, 0x28ad, 0x28af, 0x28b1, 0x28b3, 0x28b5,
+ 0xffff, 0xffff, 0x28b7, 0x28b9, 0x28bb, 0xffff, 0xffff, 0xffff,
+ 0x28bd, 0x28bf, 0x28c1, 0x28c3, 0x28c5, 0x28c7, 0x28c9, 0xffff,
+ 0x28cb, 0x28cd, 0x28cf, 0x28d1, 0x28d3, 0x28d5, 0x28d7, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10452,9 +10960,9 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x28d6, 0xffff, 0x28db, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x28d9, 0xffff, 0x28de, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x28e0, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x28e3, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10471,7 +10979,7 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x28e5, 0x28ea,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x28e8, 0x28ed,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10508,7 +11016,7 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x28ef, 0x28f4, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x28f2, 0x28f7, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10555,7 +11063,7 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x28f9, 0x28fe, 0xffff, 0x2903, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x28fc, 0x2901, 0xffff, 0x2906, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10588,7 +11096,7 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x2908, 0x290d, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x290b, 0x2910, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10609,8 +11117,8 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x2912, 0x2917,
- 0x291c, 0x2921, 0x2926, 0x292b, 0x2930, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x2915, 0x291a,
+ 0x291f, 0x2924, 0x2929, 0x292e, 0x2933, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10621,8 +11129,8 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x2935, 0x293a, 0x293f, 0x2944, 0x2949,
- 0x294e, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0xffff, 0x2938, 0x293d, 0x2942, 0x2947, 0x294c,
+ 0x2951, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10631,162 +11139,162 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x2953, 0x2955, 0x2957, 0x2959, 0x295b, 0x295d, 0x295f, 0x2961,
- 0x2963, 0x2965, 0x2967, 0x2969, 0x296b, 0x296d, 0x296f, 0x2971,
- 0x2973, 0x2975, 0x2977, 0x2979, 0x297b, 0x297d, 0x297f, 0x2981,
- 0x2983, 0x2985, 0x2987, 0x2989, 0x298b, 0x298d, 0x298f, 0x2991,
- 0x2993, 0x2995, 0x2997, 0x2999, 0x299b, 0x299d, 0x299f, 0x29a1,
- 0x29a3, 0x29a5, 0x29a7, 0x29a9, 0x29ab, 0x29ad, 0x29af, 0x29b1,
- 0x29b3, 0x29b5, 0x29b7, 0x29b9, 0x29bb, 0x29bd, 0x29bf, 0x29c1,
- 0x29c3, 0x29c5, 0x29c7, 0x29c9, 0x29cb, 0x29cd, 0x29cf, 0x29d1,
- 0x29d3, 0x29d5, 0x29d7, 0x29d9, 0x29db, 0x29dd, 0x29df, 0x29e1,
- 0x29e3, 0x29e5, 0x29e7, 0x29e9, 0x29eb, 0x29ed, 0x29ef, 0x29f1,
- 0x29f3, 0x29f5, 0x29f7, 0x29f9, 0x29fb, 0xffff, 0x29fd, 0x29ff,
- 0x2a01, 0x2a03, 0x2a05, 0x2a07, 0x2a09, 0x2a0b, 0x2a0d, 0x2a0f,
- 0x2a11, 0x2a13, 0x2a15, 0x2a17, 0x2a19, 0x2a1b, 0x2a1d, 0x2a1f,
- 0x2a21, 0x2a23, 0x2a25, 0x2a27, 0x2a29, 0x2a2b, 0x2a2d, 0x2a2f,
- 0x2a31, 0x2a33, 0x2a35, 0x2a37, 0x2a39, 0x2a3b, 0x2a3d, 0x2a3f,
- 0x2a41, 0x2a43, 0x2a45, 0x2a47, 0x2a49, 0x2a4b, 0x2a4d, 0x2a4f,
- 0x2a51, 0x2a53, 0x2a55, 0x2a57, 0x2a59, 0x2a5b, 0x2a5d, 0x2a5f,
- 0x2a61, 0x2a63, 0x2a65, 0x2a67, 0x2a69, 0x2a6b, 0x2a6d, 0x2a6f,
- 0x2a71, 0x2a73, 0x2a75, 0x2a77, 0x2a79, 0x2a7b, 0x2a7d, 0x2a7f,
- 0x2a81, 0x2a83, 0x2a85, 0x2a87, 0x2a89, 0xffff, 0x2a8b, 0x2a8d,
- 0xffff, 0xffff, 0x2a8f, 0xffff, 0xffff, 0x2a91, 0x2a93, 0xffff,
- 0xffff, 0x2a95, 0x2a97, 0x2a99, 0x2a9b, 0xffff, 0x2a9d, 0x2a9f,
- 0x2aa1, 0x2aa3, 0x2aa5, 0x2aa7, 0x2aa9, 0x2aab, 0x2aad, 0x2aaf,
- 0x2ab1, 0x2ab3, 0xffff, 0x2ab5, 0xffff, 0x2ab7, 0x2ab9, 0x2abb,
- 0x2abd, 0x2abf, 0x2ac1, 0x2ac3, 0xffff, 0x2ac5, 0x2ac7, 0x2ac9,
- 0x2acb, 0x2acd, 0x2acf, 0x2ad1, 0x2ad3, 0x2ad5, 0x2ad7, 0x2ad9,
- 0x2adb, 0x2add, 0x2adf, 0x2ae1, 0x2ae3, 0x2ae5, 0x2ae7, 0x2ae9,
- 0x2aeb, 0x2aed, 0x2aef, 0x2af1, 0x2af3, 0x2af5, 0x2af7, 0x2af9,
- 0x2afb, 0x2afd, 0x2aff, 0x2b01, 0x2b03, 0x2b05, 0x2b07, 0x2b09,
- 0x2b0b, 0x2b0d, 0x2b0f, 0x2b11, 0x2b13, 0x2b15, 0x2b17, 0x2b19,
- 0x2b1b, 0x2b1d, 0x2b1f, 0x2b21, 0x2b23, 0x2b25, 0x2b27, 0x2b29,
- 0x2b2b, 0x2b2d, 0x2b2f, 0x2b31, 0x2b33, 0x2b35, 0x2b37, 0x2b39,
+ 0x2956, 0x2958, 0x295a, 0x295c, 0x295e, 0x2960, 0x2962, 0x2964,
+ 0x2966, 0x2968, 0x296a, 0x296c, 0x296e, 0x2970, 0x2972, 0x2974,
+ 0x2976, 0x2978, 0x297a, 0x297c, 0x297e, 0x2980, 0x2982, 0x2984,
+ 0x2986, 0x2988, 0x298a, 0x298c, 0x298e, 0x2990, 0x2992, 0x2994,
+ 0x2996, 0x2998, 0x299a, 0x299c, 0x299e, 0x29a0, 0x29a2, 0x29a4,
+ 0x29a6, 0x29a8, 0x29aa, 0x29ac, 0x29ae, 0x29b0, 0x29b2, 0x29b4,
+ 0x29b6, 0x29b8, 0x29ba, 0x29bc, 0x29be, 0x29c0, 0x29c2, 0x29c4,
+ 0x29c6, 0x29c8, 0x29ca, 0x29cc, 0x29ce, 0x29d0, 0x29d2, 0x29d4,
+ 0x29d6, 0x29d8, 0x29da, 0x29dc, 0x29de, 0x29e0, 0x29e2, 0x29e4,
+ 0x29e6, 0x29e8, 0x29ea, 0x29ec, 0x29ee, 0x29f0, 0x29f2, 0x29f4,
+ 0x29f6, 0x29f8, 0x29fa, 0x29fc, 0x29fe, 0xffff, 0x2a00, 0x2a02,
+ 0x2a04, 0x2a06, 0x2a08, 0x2a0a, 0x2a0c, 0x2a0e, 0x2a10, 0x2a12,
+ 0x2a14, 0x2a16, 0x2a18, 0x2a1a, 0x2a1c, 0x2a1e, 0x2a20, 0x2a22,
+ 0x2a24, 0x2a26, 0x2a28, 0x2a2a, 0x2a2c, 0x2a2e, 0x2a30, 0x2a32,
+ 0x2a34, 0x2a36, 0x2a38, 0x2a3a, 0x2a3c, 0x2a3e, 0x2a40, 0x2a42,
+ 0x2a44, 0x2a46, 0x2a48, 0x2a4a, 0x2a4c, 0x2a4e, 0x2a50, 0x2a52,
+ 0x2a54, 0x2a56, 0x2a58, 0x2a5a, 0x2a5c, 0x2a5e, 0x2a60, 0x2a62,
+ 0x2a64, 0x2a66, 0x2a68, 0x2a6a, 0x2a6c, 0x2a6e, 0x2a70, 0x2a72,
+ 0x2a74, 0x2a76, 0x2a78, 0x2a7a, 0x2a7c, 0x2a7e, 0x2a80, 0x2a82,
+ 0x2a84, 0x2a86, 0x2a88, 0x2a8a, 0x2a8c, 0xffff, 0x2a8e, 0x2a90,
+ 0xffff, 0xffff, 0x2a92, 0xffff, 0xffff, 0x2a94, 0x2a96, 0xffff,
+ 0xffff, 0x2a98, 0x2a9a, 0x2a9c, 0x2a9e, 0xffff, 0x2aa0, 0x2aa2,
+ 0x2aa4, 0x2aa6, 0x2aa8, 0x2aaa, 0x2aac, 0x2aae, 0x2ab0, 0x2ab2,
+ 0x2ab4, 0x2ab6, 0xffff, 0x2ab8, 0xffff, 0x2aba, 0x2abc, 0x2abe,
+ 0x2ac0, 0x2ac2, 0x2ac4, 0x2ac6, 0xffff, 0x2ac8, 0x2aca, 0x2acc,
+ 0x2ace, 0x2ad0, 0x2ad2, 0x2ad4, 0x2ad6, 0x2ad8, 0x2ada, 0x2adc,
+ 0x2ade, 0x2ae0, 0x2ae2, 0x2ae4, 0x2ae6, 0x2ae8, 0x2aea, 0x2aec,
+ 0x2aee, 0x2af0, 0x2af2, 0x2af4, 0x2af6, 0x2af8, 0x2afa, 0x2afc,
+ 0x2afe, 0x2b00, 0x2b02, 0x2b04, 0x2b06, 0x2b08, 0x2b0a, 0x2b0c,
+ 0x2b0e, 0x2b10, 0x2b12, 0x2b14, 0x2b16, 0x2b18, 0x2b1a, 0x2b1c,
+ 0x2b1e, 0x2b20, 0x2b22, 0x2b24, 0x2b26, 0x2b28, 0x2b2a, 0x2b2c,
+ 0x2b2e, 0x2b30, 0x2b32, 0x2b34, 0x2b36, 0x2b38, 0x2b3a, 0x2b3c,
- 0x2b3b, 0x2b3d, 0x2b3f, 0x2b41, 0x2b43, 0x2b45, 0xffff, 0x2b47,
- 0x2b49, 0x2b4b, 0x2b4d, 0xffff, 0xffff, 0x2b4f, 0x2b51, 0x2b53,
- 0x2b55, 0x2b57, 0x2b59, 0x2b5b, 0x2b5d, 0xffff, 0x2b5f, 0x2b61,
- 0x2b63, 0x2b65, 0x2b67, 0x2b69, 0x2b6b, 0xffff, 0x2b6d, 0x2b6f,
- 0x2b71, 0x2b73, 0x2b75, 0x2b77, 0x2b79, 0x2b7b, 0x2b7d, 0x2b7f,
- 0x2b81, 0x2b83, 0x2b85, 0x2b87, 0x2b89, 0x2b8b, 0x2b8d, 0x2b8f,
- 0x2b91, 0x2b93, 0x2b95, 0x2b97, 0x2b99, 0x2b9b, 0x2b9d, 0x2b9f,
- 0x2ba1, 0x2ba3, 0xffff, 0x2ba5, 0x2ba7, 0x2ba9, 0x2bab, 0xffff,
- 0x2bad, 0x2baf, 0x2bb1, 0x2bb3, 0x2bb5, 0xffff, 0x2bb7, 0xffff,
- 0xffff, 0xffff, 0x2bb9, 0x2bbb, 0x2bbd, 0x2bbf, 0x2bc1, 0x2bc3,
- 0x2bc5, 0xffff, 0x2bc7, 0x2bc9, 0x2bcb, 0x2bcd, 0x2bcf, 0x2bd1,
- 0x2bd3, 0x2bd5, 0x2bd7, 0x2bd9, 0x2bdb, 0x2bdd, 0x2bdf, 0x2be1,
- 0x2be3, 0x2be5, 0x2be7, 0x2be9, 0x2beb, 0x2bed, 0x2bef, 0x2bf1,
- 0x2bf3, 0x2bf5, 0x2bf7, 0x2bf9, 0x2bfb, 0x2bfd, 0x2bff, 0x2c01,
- 0x2c03, 0x2c05, 0x2c07, 0x2c09, 0x2c0b, 0x2c0d, 0x2c0f, 0x2c11,
- 0x2c13, 0x2c15, 0x2c17, 0x2c19, 0x2c1b, 0x2c1d, 0x2c1f, 0x2c21,
- 0x2c23, 0x2c25, 0x2c27, 0x2c29, 0x2c2b, 0x2c2d, 0x2c2f, 0x2c31,
- 0x2c33, 0x2c35, 0x2c37, 0x2c39, 0x2c3b, 0x2c3d, 0x2c3f, 0x2c41,
- 0x2c43, 0x2c45, 0x2c47, 0x2c49, 0x2c4b, 0x2c4d, 0x2c4f, 0x2c51,
- 0x2c53, 0x2c55, 0x2c57, 0x2c59, 0x2c5b, 0x2c5d, 0x2c5f, 0x2c61,
- 0x2c63, 0x2c65, 0x2c67, 0x2c69, 0x2c6b, 0x2c6d, 0x2c6f, 0x2c71,
- 0x2c73, 0x2c75, 0x2c77, 0x2c79, 0x2c7b, 0x2c7d, 0x2c7f, 0x2c81,
- 0x2c83, 0x2c85, 0x2c87, 0x2c89, 0x2c8b, 0x2c8d, 0x2c8f, 0x2c91,
- 0x2c93, 0x2c95, 0x2c97, 0x2c99, 0x2c9b, 0x2c9d, 0x2c9f, 0x2ca1,
- 0x2ca3, 0x2ca5, 0x2ca7, 0x2ca9, 0x2cab, 0x2cad, 0x2caf, 0x2cb1,
- 0x2cb3, 0x2cb5, 0x2cb7, 0x2cb9, 0x2cbb, 0x2cbd, 0x2cbf, 0x2cc1,
- 0x2cc3, 0x2cc5, 0x2cc7, 0x2cc9, 0x2ccb, 0x2ccd, 0x2ccf, 0x2cd1,
- 0x2cd3, 0x2cd5, 0x2cd7, 0x2cd9, 0x2cdb, 0x2cdd, 0x2cdf, 0x2ce1,
- 0x2ce3, 0x2ce5, 0x2ce7, 0x2ce9, 0x2ceb, 0x2ced, 0x2cef, 0x2cf1,
- 0x2cf3, 0x2cf5, 0x2cf7, 0x2cf9, 0x2cfb, 0x2cfd, 0x2cff, 0x2d01,
- 0x2d03, 0x2d05, 0x2d07, 0x2d09, 0x2d0b, 0x2d0d, 0x2d0f, 0x2d11,
- 0x2d13, 0x2d15, 0x2d17, 0x2d19, 0x2d1b, 0x2d1d, 0x2d1f, 0x2d21,
-
- 0x2d23, 0x2d25, 0x2d27, 0x2d29, 0x2d2b, 0x2d2d, 0x2d2f, 0x2d31,
- 0x2d33, 0x2d35, 0x2d37, 0x2d39, 0x2d3b, 0x2d3d, 0x2d3f, 0x2d41,
- 0x2d43, 0x2d45, 0x2d47, 0x2d49, 0x2d4b, 0x2d4d, 0x2d4f, 0x2d51,
- 0x2d53, 0x2d55, 0x2d57, 0x2d59, 0x2d5b, 0x2d5d, 0x2d5f, 0x2d61,
- 0x2d63, 0x2d65, 0x2d67, 0x2d69, 0x2d6b, 0x2d6d, 0x2d6f, 0x2d71,
- 0x2d73, 0x2d75, 0x2d77, 0x2d79, 0x2d7b, 0x2d7d, 0x2d7f, 0x2d81,
- 0x2d83, 0x2d85, 0x2d87, 0x2d89, 0x2d8b, 0x2d8d, 0x2d8f, 0x2d91,
- 0x2d93, 0x2d95, 0x2d97, 0x2d99, 0x2d9b, 0x2d9d, 0x2d9f, 0x2da1,
- 0x2da3, 0x2da5, 0x2da7, 0x2da9, 0x2dab, 0x2dad, 0x2daf, 0x2db1,
- 0x2db3, 0x2db5, 0x2db7, 0x2db9, 0x2dbb, 0x2dbd, 0x2dbf, 0x2dc1,
- 0x2dc3, 0x2dc5, 0x2dc7, 0x2dc9, 0x2dcb, 0x2dcd, 0x2dcf, 0x2dd1,
- 0x2dd3, 0x2dd5, 0x2dd7, 0x2dd9, 0x2ddb, 0x2ddd, 0x2ddf, 0x2de1,
- 0x2de3, 0x2de5, 0x2de7, 0x2de9, 0x2deb, 0x2ded, 0x2def, 0x2df1,
- 0x2df3, 0x2df5, 0x2df7, 0x2df9, 0x2dfb, 0x2dfd, 0x2dff, 0x2e01,
- 0x2e03, 0x2e05, 0x2e07, 0x2e09, 0x2e0b, 0x2e0d, 0x2e0f, 0x2e11,
- 0x2e13, 0x2e15, 0x2e17, 0x2e19, 0x2e1b, 0x2e1d, 0x2e1f, 0x2e21,
- 0x2e23, 0x2e25, 0x2e27, 0x2e29, 0x2e2b, 0x2e2d, 0x2e2f, 0x2e31,
- 0x2e33, 0x2e35, 0x2e37, 0x2e39, 0x2e3b, 0x2e3d, 0x2e3f, 0x2e41,
- 0x2e43, 0x2e45, 0x2e47, 0x2e49, 0x2e4b, 0x2e4d, 0x2e4f, 0x2e51,
- 0x2e53, 0x2e55, 0x2e57, 0x2e59, 0x2e5b, 0x2e5d, 0x2e5f, 0x2e61,
- 0x2e63, 0x2e65, 0x2e67, 0x2e69, 0x2e6b, 0x2e6d, 0xffff, 0xffff,
- 0x2e6f, 0x2e71, 0x2e73, 0x2e75, 0x2e77, 0x2e79, 0x2e7b, 0x2e7d,
- 0x2e7f, 0x2e81, 0x2e83, 0x2e85, 0x2e87, 0x2e89, 0x2e8b, 0x2e8d,
- 0x2e8f, 0x2e91, 0x2e93, 0x2e95, 0x2e97, 0x2e99, 0x2e9b, 0x2e9d,
- 0x2e9f, 0x2ea1, 0x2ea3, 0x2ea5, 0x2ea7, 0x2ea9, 0x2eab, 0x2ead,
- 0x2eaf, 0x2eb1, 0x2eb3, 0x2eb5, 0x2eb7, 0x2eb9, 0x2ebb, 0x2ebd,
- 0x2ebf, 0x2ec1, 0x2ec3, 0x2ec5, 0x2ec7, 0x2ec9, 0x2ecb, 0x2ecd,
- 0x2ecf, 0x2ed1, 0x2ed3, 0x2ed5, 0x2ed7, 0x2ed9, 0x2edb, 0x2edd,
- 0x2edf, 0x2ee1, 0x2ee3, 0x2ee5, 0x2ee7, 0x2ee9, 0x2eeb, 0x2eed,
- 0x2eef, 0x2ef1, 0x2ef3, 0x2ef5, 0x2ef7, 0x2ef9, 0x2efb, 0x2efd,
- 0x2eff, 0x2f01, 0x2f03, 0x2f05, 0x2f07, 0x2f09, 0x2f0b, 0x2f0d,
- 0x2f0f, 0x2f11, 0x2f13, 0x2f15, 0x2f17, 0x2f19, 0x2f1b, 0x2f1d,
-
- 0x2f1f, 0x2f21, 0x2f23, 0x2f25, 0x2f27, 0x2f29, 0x2f2b, 0x2f2d,
- 0x2f2f, 0x2f31, 0x2f33, 0x2f35, 0x2f37, 0x2f39, 0x2f3b, 0x2f3d,
- 0x2f3f, 0x2f41, 0x2f43, 0x2f45, 0x2f47, 0x2f49, 0x2f4b, 0x2f4d,
- 0x2f4f, 0x2f51, 0x2f53, 0x2f55, 0x2f57, 0x2f59, 0x2f5b, 0x2f5d,
- 0x2f5f, 0x2f61, 0x2f63, 0x2f65, 0x2f67, 0x2f69, 0x2f6b, 0x2f6d,
- 0x2f6f, 0x2f71, 0x2f73, 0x2f75, 0x2f77, 0x2f79, 0x2f7b, 0x2f7d,
- 0x2f7f, 0x2f81, 0x2f83, 0x2f85, 0x2f87, 0x2f89, 0x2f8b, 0x2f8d,
- 0x2f8f, 0x2f91, 0x2f93, 0x2f95, 0x2f97, 0x2f99, 0x2f9b, 0x2f9d,
- 0x2f9f, 0x2fa1, 0x2fa3, 0x2fa5, 0x2fa7, 0x2fa9, 0x2fab, 0x2fad,
- 0x2faf, 0x2fb1, 0x2fb3, 0x2fb5, 0x2fb7, 0x2fb9, 0x2fbb, 0x2fbd,
- 0x2fbf, 0x2fc1, 0x2fc3, 0x2fc5, 0x2fc7, 0x2fc9, 0x2fcb, 0x2fcd,
- 0x2fcf, 0x2fd1, 0x2fd3, 0x2fd5, 0x2fd7, 0x2fd9, 0x2fdb, 0x2fdd,
- 0x2fdf, 0x2fe1, 0x2fe3, 0x2fe5, 0x2fe7, 0x2fe9, 0x2feb, 0x2fed,
- 0x2fef, 0x2ff1, 0x2ff3, 0x2ff5, 0x2ff7, 0x2ff9, 0x2ffb, 0x2ffd,
- 0x2fff, 0x3001, 0x3003, 0x3005, 0x3007, 0x3009, 0x300b, 0x300d,
- 0x300f, 0x3011, 0x3013, 0x3015, 0x3017, 0x3019, 0x301b, 0x301d,
- 0x301f, 0x3021, 0x3023, 0x3025, 0x3027, 0x3029, 0x302b, 0x302d,
- 0x302f, 0x3031, 0x3033, 0x3035, 0x3037, 0x3039, 0x303b, 0x303d,
- 0x303f, 0x3041, 0x3043, 0x3045, 0x3047, 0x3049, 0x304b, 0x304d,
- 0x304f, 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305b, 0x305d,
- 0x305f, 0x3061, 0x3063, 0x3065, 0x3067, 0x3069, 0x306b, 0x306d,
- 0x306f, 0x3071, 0x3073, 0x3075, 0x3077, 0x3079, 0x307b, 0x307d,
- 0x307f, 0x3081, 0x3083, 0x3085, 0x3087, 0x3089, 0x308b, 0x308d,
- 0x308f, 0x3091, 0x3093, 0x3095, 0x3097, 0x3099, 0x309b, 0x309d,
- 0x309f, 0x30a1, 0x30a3, 0x30a5, 0x30a7, 0x30a9, 0x30ab, 0x30ad,
- 0x30af, 0x30b1, 0x30b3, 0x30b5, 0xffff, 0xffff, 0x30b7, 0x30b9,
- 0x30bb, 0x30bd, 0x30bf, 0x30c1, 0x30c3, 0x30c5, 0x30c7, 0x30c9,
- 0x30cb, 0x30cd, 0x30cf, 0x30d1, 0x30d3, 0x30d5, 0x30d7, 0x30d9,
- 0x30db, 0x30dd, 0x30df, 0x30e1, 0x30e3, 0x30e5, 0x30e7, 0x30e9,
- 0x30eb, 0x30ed, 0x30ef, 0x30f1, 0x30f3, 0x30f5, 0x30f7, 0x30f9,
- 0x30fb, 0x30fd, 0x30ff, 0x3101, 0x3103, 0x3105, 0x3107, 0x3109,
- 0x310b, 0x310d, 0x310f, 0x3111, 0x3113, 0x3115, 0x3117, 0x3119,
+ 0x2b3e, 0x2b40, 0x2b42, 0x2b44, 0x2b46, 0x2b48, 0xffff, 0x2b4a,
+ 0x2b4c, 0x2b4e, 0x2b50, 0xffff, 0xffff, 0x2b52, 0x2b54, 0x2b56,
+ 0x2b58, 0x2b5a, 0x2b5c, 0x2b5e, 0x2b60, 0xffff, 0x2b62, 0x2b64,
+ 0x2b66, 0x2b68, 0x2b6a, 0x2b6c, 0x2b6e, 0xffff, 0x2b70, 0x2b72,
+ 0x2b74, 0x2b76, 0x2b78, 0x2b7a, 0x2b7c, 0x2b7e, 0x2b80, 0x2b82,
+ 0x2b84, 0x2b86, 0x2b88, 0x2b8a, 0x2b8c, 0x2b8e, 0x2b90, 0x2b92,
+ 0x2b94, 0x2b96, 0x2b98, 0x2b9a, 0x2b9c, 0x2b9e, 0x2ba0, 0x2ba2,
+ 0x2ba4, 0x2ba6, 0xffff, 0x2ba8, 0x2baa, 0x2bac, 0x2bae, 0xffff,
+ 0x2bb0, 0x2bb2, 0x2bb4, 0x2bb6, 0x2bb8, 0xffff, 0x2bba, 0xffff,
+ 0xffff, 0xffff, 0x2bbc, 0x2bbe, 0x2bc0, 0x2bc2, 0x2bc4, 0x2bc6,
+ 0x2bc8, 0xffff, 0x2bca, 0x2bcc, 0x2bce, 0x2bd0, 0x2bd2, 0x2bd4,
+ 0x2bd6, 0x2bd8, 0x2bda, 0x2bdc, 0x2bde, 0x2be0, 0x2be2, 0x2be4,
+ 0x2be6, 0x2be8, 0x2bea, 0x2bec, 0x2bee, 0x2bf0, 0x2bf2, 0x2bf4,
+ 0x2bf6, 0x2bf8, 0x2bfa, 0x2bfc, 0x2bfe, 0x2c00, 0x2c02, 0x2c04,
+ 0x2c06, 0x2c08, 0x2c0a, 0x2c0c, 0x2c0e, 0x2c10, 0x2c12, 0x2c14,
+ 0x2c16, 0x2c18, 0x2c1a, 0x2c1c, 0x2c1e, 0x2c20, 0x2c22, 0x2c24,
+ 0x2c26, 0x2c28, 0x2c2a, 0x2c2c, 0x2c2e, 0x2c30, 0x2c32, 0x2c34,
+ 0x2c36, 0x2c38, 0x2c3a, 0x2c3c, 0x2c3e, 0x2c40, 0x2c42, 0x2c44,
+ 0x2c46, 0x2c48, 0x2c4a, 0x2c4c, 0x2c4e, 0x2c50, 0x2c52, 0x2c54,
+ 0x2c56, 0x2c58, 0x2c5a, 0x2c5c, 0x2c5e, 0x2c60, 0x2c62, 0x2c64,
+ 0x2c66, 0x2c68, 0x2c6a, 0x2c6c, 0x2c6e, 0x2c70, 0x2c72, 0x2c74,
+ 0x2c76, 0x2c78, 0x2c7a, 0x2c7c, 0x2c7e, 0x2c80, 0x2c82, 0x2c84,
+ 0x2c86, 0x2c88, 0x2c8a, 0x2c8c, 0x2c8e, 0x2c90, 0x2c92, 0x2c94,
+ 0x2c96, 0x2c98, 0x2c9a, 0x2c9c, 0x2c9e, 0x2ca0, 0x2ca2, 0x2ca4,
+ 0x2ca6, 0x2ca8, 0x2caa, 0x2cac, 0x2cae, 0x2cb0, 0x2cb2, 0x2cb4,
+ 0x2cb6, 0x2cb8, 0x2cba, 0x2cbc, 0x2cbe, 0x2cc0, 0x2cc2, 0x2cc4,
+ 0x2cc6, 0x2cc8, 0x2cca, 0x2ccc, 0x2cce, 0x2cd0, 0x2cd2, 0x2cd4,
+ 0x2cd6, 0x2cd8, 0x2cda, 0x2cdc, 0x2cde, 0x2ce0, 0x2ce2, 0x2ce4,
+ 0x2ce6, 0x2ce8, 0x2cea, 0x2cec, 0x2cee, 0x2cf0, 0x2cf2, 0x2cf4,
+ 0x2cf6, 0x2cf8, 0x2cfa, 0x2cfc, 0x2cfe, 0x2d00, 0x2d02, 0x2d04,
+ 0x2d06, 0x2d08, 0x2d0a, 0x2d0c, 0x2d0e, 0x2d10, 0x2d12, 0x2d14,
+ 0x2d16, 0x2d18, 0x2d1a, 0x2d1c, 0x2d1e, 0x2d20, 0x2d22, 0x2d24,
+
+ 0x2d26, 0x2d28, 0x2d2a, 0x2d2c, 0x2d2e, 0x2d30, 0x2d32, 0x2d34,
+ 0x2d36, 0x2d38, 0x2d3a, 0x2d3c, 0x2d3e, 0x2d40, 0x2d42, 0x2d44,
+ 0x2d46, 0x2d48, 0x2d4a, 0x2d4c, 0x2d4e, 0x2d50, 0x2d52, 0x2d54,
+ 0x2d56, 0x2d58, 0x2d5a, 0x2d5c, 0x2d5e, 0x2d60, 0x2d62, 0x2d64,
+ 0x2d66, 0x2d68, 0x2d6a, 0x2d6c, 0x2d6e, 0x2d70, 0x2d72, 0x2d74,
+ 0x2d76, 0x2d78, 0x2d7a, 0x2d7c, 0x2d7e, 0x2d80, 0x2d82, 0x2d84,
+ 0x2d86, 0x2d88, 0x2d8a, 0x2d8c, 0x2d8e, 0x2d90, 0x2d92, 0x2d94,
+ 0x2d96, 0x2d98, 0x2d9a, 0x2d9c, 0x2d9e, 0x2da0, 0x2da2, 0x2da4,
+ 0x2da6, 0x2da8, 0x2daa, 0x2dac, 0x2dae, 0x2db0, 0x2db2, 0x2db4,
+ 0x2db6, 0x2db8, 0x2dba, 0x2dbc, 0x2dbe, 0x2dc0, 0x2dc2, 0x2dc4,
+ 0x2dc6, 0x2dc8, 0x2dca, 0x2dcc, 0x2dce, 0x2dd0, 0x2dd2, 0x2dd4,
+ 0x2dd6, 0x2dd8, 0x2dda, 0x2ddc, 0x2dde, 0x2de0, 0x2de2, 0x2de4,
+ 0x2de6, 0x2de8, 0x2dea, 0x2dec, 0x2dee, 0x2df0, 0x2df2, 0x2df4,
+ 0x2df6, 0x2df8, 0x2dfa, 0x2dfc, 0x2dfe, 0x2e00, 0x2e02, 0x2e04,
+ 0x2e06, 0x2e08, 0x2e0a, 0x2e0c, 0x2e0e, 0x2e10, 0x2e12, 0x2e14,
+ 0x2e16, 0x2e18, 0x2e1a, 0x2e1c, 0x2e1e, 0x2e20, 0x2e22, 0x2e24,
+ 0x2e26, 0x2e28, 0x2e2a, 0x2e2c, 0x2e2e, 0x2e30, 0x2e32, 0x2e34,
+ 0x2e36, 0x2e38, 0x2e3a, 0x2e3c, 0x2e3e, 0x2e40, 0x2e42, 0x2e44,
+ 0x2e46, 0x2e48, 0x2e4a, 0x2e4c, 0x2e4e, 0x2e50, 0x2e52, 0x2e54,
+ 0x2e56, 0x2e58, 0x2e5a, 0x2e5c, 0x2e5e, 0x2e60, 0x2e62, 0x2e64,
+ 0x2e66, 0x2e68, 0x2e6a, 0x2e6c, 0x2e6e, 0x2e70, 0xffff, 0xffff,
+ 0x2e72, 0x2e74, 0x2e76, 0x2e78, 0x2e7a, 0x2e7c, 0x2e7e, 0x2e80,
+ 0x2e82, 0x2e84, 0x2e86, 0x2e88, 0x2e8a, 0x2e8c, 0x2e8e, 0x2e90,
+ 0x2e92, 0x2e94, 0x2e96, 0x2e98, 0x2e9a, 0x2e9c, 0x2e9e, 0x2ea0,
+ 0x2ea2, 0x2ea4, 0x2ea6, 0x2ea8, 0x2eaa, 0x2eac, 0x2eae, 0x2eb0,
+ 0x2eb2, 0x2eb4, 0x2eb6, 0x2eb8, 0x2eba, 0x2ebc, 0x2ebe, 0x2ec0,
+ 0x2ec2, 0x2ec4, 0x2ec6, 0x2ec8, 0x2eca, 0x2ecc, 0x2ece, 0x2ed0,
+ 0x2ed2, 0x2ed4, 0x2ed6, 0x2ed8, 0x2eda, 0x2edc, 0x2ede, 0x2ee0,
+ 0x2ee2, 0x2ee4, 0x2ee6, 0x2ee8, 0x2eea, 0x2eec, 0x2eee, 0x2ef0,
+ 0x2ef2, 0x2ef4, 0x2ef6, 0x2ef8, 0x2efa, 0x2efc, 0x2efe, 0x2f00,
+ 0x2f02, 0x2f04, 0x2f06, 0x2f08, 0x2f0a, 0x2f0c, 0x2f0e, 0x2f10,
+ 0x2f12, 0x2f14, 0x2f16, 0x2f18, 0x2f1a, 0x2f1c, 0x2f1e, 0x2f20,
+
+ 0x2f22, 0x2f24, 0x2f26, 0x2f28, 0x2f2a, 0x2f2c, 0x2f2e, 0x2f30,
+ 0x2f32, 0x2f34, 0x2f36, 0x2f38, 0x2f3a, 0x2f3c, 0x2f3e, 0x2f40,
+ 0x2f42, 0x2f44, 0x2f46, 0x2f48, 0x2f4a, 0x2f4c, 0x2f4e, 0x2f50,
+ 0x2f52, 0x2f54, 0x2f56, 0x2f58, 0x2f5a, 0x2f5c, 0x2f5e, 0x2f60,
+ 0x2f62, 0x2f64, 0x2f66, 0x2f68, 0x2f6a, 0x2f6c, 0x2f6e, 0x2f70,
+ 0x2f72, 0x2f74, 0x2f76, 0x2f78, 0x2f7a, 0x2f7c, 0x2f7e, 0x2f80,
+ 0x2f82, 0x2f84, 0x2f86, 0x2f88, 0x2f8a, 0x2f8c, 0x2f8e, 0x2f90,
+ 0x2f92, 0x2f94, 0x2f96, 0x2f98, 0x2f9a, 0x2f9c, 0x2f9e, 0x2fa0,
+ 0x2fa2, 0x2fa4, 0x2fa6, 0x2fa8, 0x2faa, 0x2fac, 0x2fae, 0x2fb0,
+ 0x2fb2, 0x2fb4, 0x2fb6, 0x2fb8, 0x2fba, 0x2fbc, 0x2fbe, 0x2fc0,
+ 0x2fc2, 0x2fc4, 0x2fc6, 0x2fc8, 0x2fca, 0x2fcc, 0x2fce, 0x2fd0,
+ 0x2fd2, 0x2fd4, 0x2fd6, 0x2fd8, 0x2fda, 0x2fdc, 0x2fde, 0x2fe0,
+ 0x2fe2, 0x2fe4, 0x2fe6, 0x2fe8, 0x2fea, 0x2fec, 0x2fee, 0x2ff0,
+ 0x2ff2, 0x2ff4, 0x2ff6, 0x2ff8, 0x2ffa, 0x2ffc, 0x2ffe, 0x3000,
+ 0x3002, 0x3004, 0x3006, 0x3008, 0x300a, 0x300c, 0x300e, 0x3010,
+ 0x3012, 0x3014, 0x3016, 0x3018, 0x301a, 0x301c, 0x301e, 0x3020,
+ 0x3022, 0x3024, 0x3026, 0x3028, 0x302a, 0x302c, 0x302e, 0x3030,
+ 0x3032, 0x3034, 0x3036, 0x3038, 0x303a, 0x303c, 0x303e, 0x3040,
+ 0x3042, 0x3044, 0x3046, 0x3048, 0x304a, 0x304c, 0x304e, 0x3050,
+ 0x3052, 0x3054, 0x3056, 0x3058, 0x305a, 0x305c, 0x305e, 0x3060,
+ 0x3062, 0x3064, 0x3066, 0x3068, 0x306a, 0x306c, 0x306e, 0x3070,
+ 0x3072, 0x3074, 0x3076, 0x3078, 0x307a, 0x307c, 0x307e, 0x3080,
+ 0x3082, 0x3084, 0x3086, 0x3088, 0x308a, 0x308c, 0x308e, 0x3090,
+ 0x3092, 0x3094, 0x3096, 0x3098, 0x309a, 0x309c, 0x309e, 0x30a0,
+ 0x30a2, 0x30a4, 0x30a6, 0x30a8, 0x30aa, 0x30ac, 0x30ae, 0x30b0,
+ 0x30b2, 0x30b4, 0x30b6, 0x30b8, 0xffff, 0xffff, 0x30ba, 0x30bc,
+ 0x30be, 0x30c0, 0x30c2, 0x30c4, 0x30c6, 0x30c8, 0x30ca, 0x30cc,
+ 0x30ce, 0x30d0, 0x30d2, 0x30d4, 0x30d6, 0x30d8, 0x30da, 0x30dc,
+ 0x30de, 0x30e0, 0x30e2, 0x30e4, 0x30e6, 0x30e8, 0x30ea, 0x30ec,
+ 0x30ee, 0x30f0, 0x30f2, 0x30f4, 0x30f6, 0x30f8, 0x30fa, 0x30fc,
+ 0x30fe, 0x3100, 0x3102, 0x3104, 0x3106, 0x3108, 0x310a, 0x310c,
+ 0x310e, 0x3110, 0x3112, 0x3114, 0x3116, 0x3118, 0x311a, 0x311c,
- 0x311b, 0x311d, 0x311f, 0x3121, 0xffff, 0x3123, 0x3125, 0x3127,
- 0x3129, 0x312b, 0x312d, 0x312f, 0x3131, 0x3133, 0x3135, 0x3137,
- 0x3139, 0x313b, 0x313d, 0x313f, 0x3141, 0x3143, 0x3145, 0x3147,
- 0x3149, 0x314b, 0x314d, 0x314f, 0x3151, 0x3153, 0x3155, 0x3157,
- 0xffff, 0x3159, 0x315b, 0xffff, 0x315d, 0xffff, 0xffff, 0x315f,
- 0xffff, 0x3161, 0x3163, 0x3165, 0x3167, 0x3169, 0x316b, 0x316d,
- 0x316f, 0x3171, 0x3173, 0xffff, 0x3175, 0x3177, 0x3179, 0x317b,
- 0xffff, 0x317d, 0xffff, 0x317f, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x3181, 0xffff, 0xffff, 0xffff, 0xffff, 0x3183,
- 0xffff, 0x3185, 0xffff, 0x3187, 0xffff, 0x3189, 0x318b, 0x318d,
- 0xffff, 0x318f, 0x3191, 0xffff, 0x3193, 0xffff, 0xffff, 0x3195,
- 0xffff, 0x3197, 0xffff, 0x3199, 0xffff, 0x319b, 0xffff, 0x319d,
- 0xffff, 0x319f, 0x31a1, 0xffff, 0x31a3, 0xffff, 0xffff, 0x31a5,
- 0x31a7, 0x31a9, 0x31ab, 0xffff, 0x31ad, 0x31af, 0x31b1, 0x31b3,
- 0x31b5, 0x31b7, 0x31b9, 0xffff, 0x31bb, 0x31bd, 0x31bf, 0x31c1,
- 0xffff, 0x31c3, 0x31c5, 0x31c7, 0x31c9, 0xffff, 0x31cb, 0xffff,
- 0x31cd, 0x31cf, 0x31d1, 0x31d3, 0x31d5, 0x31d7, 0x31d9, 0x31db,
- 0x31dd, 0x31df, 0xffff, 0x31e1, 0x31e3, 0x31e5, 0x31e7, 0x31e9,
- 0x31eb, 0x31ed, 0x31ef, 0x31f1, 0x31f3, 0x31f5, 0x31f7, 0x31f9,
- 0x31fb, 0x31fd, 0x31ff, 0x3201, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0x3203, 0x3205, 0x3207, 0xffff, 0x3209, 0x320b, 0x320d,
- 0x320f, 0x3211, 0xffff, 0x3213, 0x3215, 0x3217, 0x3219, 0x321b,
- 0x321d, 0x321f, 0x3221, 0x3223, 0x3225, 0x3227, 0x3229, 0x322b,
- 0x322d, 0x322f, 0x3231, 0x3233, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x311e, 0x3120, 0x3122, 0x3124, 0xffff, 0x3126, 0x3128, 0x312a,
+ 0x312c, 0x312e, 0x3130, 0x3132, 0x3134, 0x3136, 0x3138, 0x313a,
+ 0x313c, 0x313e, 0x3140, 0x3142, 0x3144, 0x3146, 0x3148, 0x314a,
+ 0x314c, 0x314e, 0x3150, 0x3152, 0x3154, 0x3156, 0x3158, 0x315a,
+ 0xffff, 0x315c, 0x315e, 0xffff, 0x3160, 0xffff, 0xffff, 0x3162,
+ 0xffff, 0x3164, 0x3166, 0x3168, 0x316a, 0x316c, 0x316e, 0x3170,
+ 0x3172, 0x3174, 0x3176, 0xffff, 0x3178, 0x317a, 0x317c, 0x317e,
+ 0xffff, 0x3180, 0xffff, 0x3182, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x3184, 0xffff, 0xffff, 0xffff, 0xffff, 0x3186,
+ 0xffff, 0x3188, 0xffff, 0x318a, 0xffff, 0x318c, 0x318e, 0x3190,
+ 0xffff, 0x3192, 0x3194, 0xffff, 0x3196, 0xffff, 0xffff, 0x3198,
+ 0xffff, 0x319a, 0xffff, 0x319c, 0xffff, 0x319e, 0xffff, 0x31a0,
+ 0xffff, 0x31a2, 0x31a4, 0xffff, 0x31a6, 0xffff, 0xffff, 0x31a8,
+ 0x31aa, 0x31ac, 0x31ae, 0xffff, 0x31b0, 0x31b2, 0x31b4, 0x31b6,
+ 0x31b8, 0x31ba, 0x31bc, 0xffff, 0x31be, 0x31c0, 0x31c2, 0x31c4,
+ 0xffff, 0x31c6, 0x31c8, 0x31ca, 0x31cc, 0xffff, 0x31ce, 0xffff,
+ 0x31d0, 0x31d2, 0x31d4, 0x31d6, 0x31d8, 0x31da, 0x31dc, 0x31de,
+ 0x31e0, 0x31e2, 0xffff, 0x31e4, 0x31e6, 0x31e8, 0x31ea, 0x31ec,
+ 0x31ee, 0x31f0, 0x31f2, 0x31f4, 0x31f6, 0x31f8, 0x31fa, 0x31fc,
+ 0x31fe, 0x3200, 0x3202, 0x3204, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0x3206, 0x3208, 0x320a, 0xffff, 0x320c, 0x320e, 0x3210,
+ 0x3212, 0x3214, 0xffff, 0x3216, 0x3218, 0x321a, 0x321c, 0x321e,
+ 0x3220, 0x3222, 0x3224, 0x3226, 0x3228, 0x322a, 0x322c, 0x322e,
+ 0x3230, 0x3232, 0x3234, 0x3236, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10796,25 +11304,25 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x3235, 0x3238, 0x323b, 0x323e, 0x3241, 0x3244, 0x3247, 0x324a,
- 0x324d, 0x3250, 0x3253, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x3256, 0x325a, 0x325e, 0x3262, 0x3266, 0x326a, 0x326e, 0x3272,
- 0x3276, 0x327a, 0x327e, 0x3282, 0x3286, 0x328a, 0x328e, 0x3292,
- 0x3296, 0x329a, 0x329e, 0x32a2, 0x32a6, 0x32aa, 0x32ae, 0x32b2,
- 0x32b6, 0x32ba, 0x32be, 0x32c2, 0x32c4, 0x32c6, 0x32c9, 0xffff,
- 0x32cc, 0x32ce, 0x32d0, 0x32d2, 0x32d4, 0x32d6, 0x32d8, 0x32da,
- 0x32dc, 0x32de, 0x32e0, 0x32e2, 0x32e4, 0x32e6, 0x32e8, 0x32ea,
- 0x32ec, 0x32ee, 0x32f0, 0x32f2, 0x32f4, 0x32f6, 0x32f8, 0x32fa,
- 0x32fc, 0x32fe, 0x3300, 0x3303, 0x3306, 0x3309, 0x330c, 0x3310,
+ 0x3238, 0x323b, 0x323e, 0x3241, 0x3244, 0x3247, 0x324a, 0x324d,
+ 0x3250, 0x3253, 0x3256, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x3259, 0x325d, 0x3261, 0x3265, 0x3269, 0x326d, 0x3271, 0x3275,
+ 0x3279, 0x327d, 0x3281, 0x3285, 0x3289, 0x328d, 0x3291, 0x3295,
+ 0x3299, 0x329d, 0x32a1, 0x32a5, 0x32a9, 0x32ad, 0x32b1, 0x32b5,
+ 0x32b9, 0x32bd, 0x32c1, 0x32c5, 0x32c7, 0x32c9, 0x32cc, 0xffff,
+ 0x32cf, 0x32d1, 0x32d3, 0x32d5, 0x32d7, 0x32d9, 0x32db, 0x32dd,
+ 0x32df, 0x32e1, 0x32e3, 0x32e5, 0x32e7, 0x32e9, 0x32eb, 0x32ed,
+ 0x32ef, 0x32f1, 0x32f3, 0x32f5, 0x32f7, 0x32f9, 0x32fb, 0x32fd,
+ 0x32ff, 0x3301, 0x3303, 0x3306, 0x3309, 0x330c, 0x330f, 0x3313,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0x3313, 0x3316, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0xffff, 0xffff, 0x3316, 0x3319, 0x331c, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x3319, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x331f, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10829,17 +11337,17 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x331c, 0x331f, 0x3322, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x3322, 0x3325, 0x3328, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x3324, 0x3326, 0x3328, 0x332a, 0x332c, 0x332e, 0x3330, 0x3332,
- 0x3334, 0x3336, 0x3338, 0x333a, 0x333c, 0x333e, 0x3340, 0x3342,
- 0x3344, 0x3346, 0x3348, 0x334a, 0x334c, 0x334e, 0x3350, 0x3352,
- 0x3354, 0x3356, 0x3358, 0x335a, 0x335c, 0x335e, 0x3360, 0x3362,
- 0x3364, 0x3366, 0x3368, 0x336a, 0x336c, 0x336e, 0x3370, 0x3372,
- 0x3374, 0x3376, 0x3378, 0x337a, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x337c, 0x3380, 0x3384, 0x3388, 0x338c, 0x3390, 0x3394, 0x3398,
- 0x339c, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x33a0, 0x33a2, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x332a, 0x332c, 0x332e, 0x3330, 0x3332, 0x3334, 0x3336, 0x3338,
+ 0x333a, 0x333c, 0x333e, 0x3340, 0x3342, 0x3344, 0x3346, 0x3348,
+ 0x334a, 0x334c, 0x334e, 0x3350, 0x3352, 0x3354, 0x3356, 0x3358,
+ 0x335a, 0x335c, 0x335e, 0x3360, 0x3362, 0x3364, 0x3366, 0x3368,
+ 0x336a, 0x336c, 0x336e, 0x3370, 0x3372, 0x3374, 0x3376, 0x3378,
+ 0x337a, 0x337c, 0x337e, 0x3380, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x3382, 0x3386, 0x338a, 0x338e, 0x3392, 0x3396, 0x339a, 0x339e,
+ 0x33a2, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
+ 0x33a6, 0x33a8, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -10862,76 +11370,76 @@ static const unsigned short uc_decomposition_trie[] = {
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0x33a4, 0x33a6, 0x33a8, 0x33aa, 0x33ad, 0x33af, 0x33b1, 0x33b3,
- 0x33b5, 0x33b7, 0x33b9, 0x33bb, 0x33bd, 0x33bf, 0x33c2, 0x33c4,
- 0x33c6, 0x33c8, 0x33ca, 0x33cd, 0x33cf, 0x33d1, 0x33d3, 0x33d6,
- 0x33d8, 0x33da, 0x33dc, 0x33de, 0x33e0, 0x33e3, 0x33e5, 0x33e7,
- 0x33e9, 0x33eb, 0x33ed, 0x33ef, 0x33f1, 0x33f3, 0x33f5, 0x33f7,
- 0x33f9, 0x33fb, 0x33fd, 0x33ff, 0x3401, 0x3403, 0x3405, 0x3407,
- 0x3409, 0x340b, 0x340d, 0x340f, 0x3411, 0x3414, 0x3416, 0x3418,
- 0x341a, 0x341d, 0x341f, 0x3421, 0x3423, 0x3425, 0x3427, 0x3429,
- 0x342b, 0x342d, 0x342f, 0x3431, 0x3433, 0x3435, 0x3437, 0x3439,
- 0x343b, 0x343d, 0x343f, 0x3441, 0x3443, 0x3445, 0x3447, 0x3449,
- 0x344b, 0x344d, 0x344f, 0x3451, 0x3453, 0x3455, 0x3457, 0x3459,
- 0x345b, 0x345d, 0x3460, 0x3462, 0x3464, 0x3466, 0x3468, 0x346a,
- 0x346c, 0x346f, 0x3472, 0x3474, 0x3476, 0x3478, 0x347a, 0x347c,
- 0x347e, 0x3480, 0x3482, 0x3484, 0x3486, 0x3489, 0x348b, 0x348d,
- 0x348f, 0x3491, 0x3494, 0x3496, 0x3498, 0x349a, 0x349c, 0x349e,
- 0x34a0, 0x34a2, 0x34a4, 0x34a6, 0x34a9, 0x34ab, 0x34ae, 0x34b0,
- 0x34b2, 0x34b4, 0x34b6, 0x34b8, 0x34ba, 0x34bc, 0x34be, 0x34c0,
- 0x34c2, 0x34c4, 0x34c7, 0x34c9, 0x34cb, 0x34cd, 0x34cf, 0x34d1,
- 0x34d4, 0x34d6, 0x34d9, 0x34dc, 0x34de, 0x34e0, 0x34e2, 0x34e4,
- 0x34e7, 0x34ea, 0x34ec, 0x34ee, 0x34f0, 0x34f2, 0x34f4, 0x34f6,
- 0x34f8, 0x34fa, 0x34fc, 0x34fe, 0x3500, 0x3503, 0x3505, 0x3507,
- 0x3509, 0x350b, 0x350d, 0x350f, 0x3511, 0x3513, 0x3515, 0x3517,
- 0x3519, 0x351b, 0x351d, 0x351f, 0x3521, 0x3523, 0x3525, 0x3527,
- 0x3529, 0x352c, 0x352e, 0x3530, 0x3532, 0x3534, 0x3536, 0x3539,
- 0x353b, 0x353d, 0x353f, 0x3541, 0x3543, 0x3545, 0x3547, 0x3549,
- 0x354b, 0x354d, 0x354f, 0x3552, 0x3554, 0x3556, 0x3558, 0x355a,
- 0x355c, 0x355e, 0x3560, 0x3562, 0x3564, 0x3566, 0x3568, 0x356a,
- 0x356c, 0x356e, 0x3570, 0x3572, 0x3574, 0x3576, 0x3579, 0x357b,
- 0x357d, 0x357f, 0x3581, 0x3583, 0x3586, 0x3588, 0x358a, 0x358c,
- 0x358e, 0x3590, 0x3592, 0x3594, 0x3596, 0x3599, 0x359b, 0x359d,
- 0x359f, 0x35a2, 0x35a4, 0x35a6, 0x35a8, 0x35aa, 0x35ac, 0x35ae,
- 0x35b1, 0x35b4, 0x35b7, 0x35b9, 0x35bc, 0x35be, 0x35c0, 0x35c2,
+ 0x33aa, 0x33ac, 0x33ae, 0x33b0, 0x33b3, 0x33b5, 0x33b7, 0x33b9,
+ 0x33bb, 0x33bd, 0x33bf, 0x33c1, 0x33c3, 0x33c5, 0x33c8, 0x33ca,
+ 0x33cc, 0x33ce, 0x33d0, 0x33d3, 0x33d5, 0x33d7, 0x33d9, 0x33dc,
+ 0x33de, 0x33e0, 0x33e2, 0x33e4, 0x33e6, 0x33e9, 0x33eb, 0x33ed,
+ 0x33ef, 0x33f1, 0x33f3, 0x33f5, 0x33f7, 0x33f9, 0x33fb, 0x33fd,
+ 0x33ff, 0x3401, 0x3403, 0x3405, 0x3407, 0x3409, 0x340b, 0x340d,
+ 0x340f, 0x3411, 0x3413, 0x3415, 0x3417, 0x341a, 0x341c, 0x341e,
+ 0x3420, 0x3423, 0x3425, 0x3427, 0x3429, 0x342b, 0x342d, 0x342f,
+ 0x3431, 0x3433, 0x3435, 0x3437, 0x3439, 0x343b, 0x343d, 0x343f,
+ 0x3441, 0x3443, 0x3445, 0x3447, 0x3449, 0x344b, 0x344d, 0x344f,
+ 0x3451, 0x3453, 0x3455, 0x3457, 0x3459, 0x345b, 0x345d, 0x345f,
+ 0x3461, 0x3463, 0x3466, 0x3468, 0x346a, 0x346c, 0x346e, 0x3470,
+ 0x3472, 0x3475, 0x3478, 0x347a, 0x347c, 0x347e, 0x3480, 0x3482,
+ 0x3484, 0x3486, 0x3488, 0x348a, 0x348c, 0x348f, 0x3491, 0x3493,
+ 0x3495, 0x3497, 0x349a, 0x349c, 0x349e, 0x34a0, 0x34a2, 0x34a4,
+ 0x34a6, 0x34a8, 0x34aa, 0x34ac, 0x34af, 0x34b1, 0x34b4, 0x34b6,
+ 0x34b8, 0x34ba, 0x34bc, 0x34be, 0x34c0, 0x34c2, 0x34c4, 0x34c6,
+ 0x34c8, 0x34ca, 0x34cd, 0x34cf, 0x34d1, 0x34d3, 0x34d5, 0x34d7,
+ 0x34da, 0x34dc, 0x34df, 0x34e2, 0x34e4, 0x34e6, 0x34e8, 0x34ea,
+ 0x34ed, 0x34f0, 0x34f2, 0x34f4, 0x34f6, 0x34f8, 0x34fa, 0x34fc,
+ 0x34fe, 0x3500, 0x3502, 0x3504, 0x3506, 0x3509, 0x350b, 0x350d,
+ 0x350f, 0x3511, 0x3513, 0x3515, 0x3517, 0x3519, 0x351b, 0x351d,
+ 0x351f, 0x3521, 0x3523, 0x3525, 0x3527, 0x3529, 0x352b, 0x352d,
+ 0x352f, 0x3532, 0x3534, 0x3536, 0x3538, 0x353a, 0x353c, 0x353f,
+ 0x3541, 0x3543, 0x3545, 0x3547, 0x3549, 0x354b, 0x354d, 0x354f,
+ 0x3551, 0x3553, 0x3555, 0x3558, 0x355a, 0x355c, 0x355e, 0x3560,
+ 0x3562, 0x3564, 0x3566, 0x3568, 0x356a, 0x356c, 0x356e, 0x3570,
+ 0x3572, 0x3574, 0x3576, 0x3578, 0x357a, 0x357c, 0x357f, 0x3581,
+ 0x3583, 0x3585, 0x3587, 0x3589, 0x358c, 0x358e, 0x3590, 0x3592,
+ 0x3594, 0x3596, 0x3598, 0x359a, 0x359c, 0x359f, 0x35a1, 0x35a3,
+ 0x35a5, 0x35a8, 0x35aa, 0x35ac, 0x35ae, 0x35b0, 0x35b2, 0x35b4,
+ 0x35b7, 0x35ba, 0x35bd, 0x35bf, 0x35c2, 0x35c4, 0x35c6, 0x35c8,
- 0x35c4, 0x35c6, 0x35c8, 0x35ca, 0x35cc, 0x35ce, 0x35d0, 0x35d3,
- 0x35d5, 0x35d7, 0x35d9, 0x35db, 0x35dd, 0x35df, 0x35e2, 0x35e4,
- 0x35e6, 0x35e9, 0x35ec, 0x35ee, 0x35f0, 0x35f2, 0x35f4, 0x35f6,
- 0x35f8, 0x35fa, 0x35fc, 0x35fe, 0x3601, 0x3603, 0x3606, 0x3608,
- 0x360b, 0x360d, 0x360f, 0x3611, 0x3614, 0x3616, 0x3618, 0x361b,
- 0x361e, 0x3620, 0x3622, 0x3624, 0x3626, 0x3628, 0x362a, 0x362c,
- 0x362e, 0x3630, 0x3632, 0x3634, 0x3636, 0x3638, 0x363b, 0x363d,
- 0x3640, 0x3642, 0x3645, 0x3647, 0x364a, 0x364d, 0x3650, 0x3652,
- 0x3654, 0x3656, 0x3659, 0x365c, 0x365f, 0x3662, 0x3664, 0x3666,
- 0x3668, 0x366a, 0x366c, 0x366e, 0x3670, 0x3672, 0x3675, 0x3677,
- 0x3679, 0x367b, 0x367d, 0x3680, 0x3682, 0x3685, 0x3688, 0x368a,
- 0x368c, 0x368e, 0x3690, 0x3692, 0x3694, 0x3697, 0x369a, 0x369d,
- 0x369f, 0x36a1, 0x36a4, 0x36a6, 0x36a8, 0x36aa, 0x36ad, 0x36af,
- 0x36b1, 0x36b3, 0x36b5, 0x36b7, 0x36ba, 0x36bc, 0x36be, 0x36c0,
- 0x36c2, 0x36c4, 0x36c6, 0x36c9, 0x36cc, 0x36ce, 0x36d1, 0x36d3,
- 0x36d6, 0x36d8, 0x36da, 0x36dc, 0x36df, 0x36e2, 0x36e4, 0x36e7,
- 0x36e9, 0x36ec, 0x36ee, 0x36f0, 0x36f2, 0x36f4, 0x36f6, 0x36f8,
- 0x36fb, 0x36fe, 0x3701, 0x3704, 0x3706, 0x3708, 0x370a, 0x370c,
- 0x370e, 0x3710, 0x3712, 0x3714, 0x3716, 0x3718, 0x371a, 0x371c,
- 0x371f, 0x3721, 0x3723, 0x3725, 0x3727, 0x3729, 0x372b, 0x372d,
- 0x372f, 0x3731, 0x3733, 0x3735, 0x3737, 0x373a, 0x373d, 0x3740,
- 0x3742, 0x3744, 0x3746, 0x3748, 0x374b, 0x374d, 0x3750, 0x3752,
- 0x3754, 0x3757, 0x375a, 0x375c, 0x375e, 0x3760, 0x3762, 0x3764,
- 0x3766, 0x3768, 0x376a, 0x376c, 0x376e, 0x3770, 0x3772, 0x3774,
- 0x3776, 0x3778, 0x377a, 0x377c, 0x377e, 0x3780, 0x3783, 0x3785,
- 0x3787, 0x3789, 0x378b, 0x378d, 0x3790, 0x3793, 0x3795, 0x3797,
- 0x3799, 0x379b, 0x379d, 0x379f, 0x37a2, 0x37a4, 0x37a6, 0x37a8,
- 0x37aa, 0x37ad, 0x37b0, 0x37b2, 0x37b4, 0x37b6, 0x37b9, 0x37bb,
- 0x37bd, 0x37c0, 0x37c3, 0x37c5, 0x37c7, 0x37c9, 0x37cc, 0x37ce,
- 0x37d0, 0x37d2, 0x37d4, 0x37d6, 0x37d8, 0x37da, 0x37dd, 0x37df,
- 0x37e1, 0x37e3, 0x37e6, 0x37e8, 0x37ea, 0x37ec, 0x37ee, 0x37f1,
- 0x37f4, 0x37f6, 0x37f8, 0x37fa, 0x37fd, 0x37ff, 0x3802, 0x3804,
+ 0x35ca, 0x35cc, 0x35ce, 0x35d0, 0x35d2, 0x35d4, 0x35d6, 0x35d9,
+ 0x35db, 0x35dd, 0x35df, 0x35e1, 0x35e3, 0x35e5, 0x35e8, 0x35ea,
+ 0x35ec, 0x35ef, 0x35f2, 0x35f4, 0x35f6, 0x35f8, 0x35fa, 0x35fc,
+ 0x35fe, 0x3600, 0x3602, 0x3604, 0x3607, 0x3609, 0x360c, 0x360e,
+ 0x3611, 0x3613, 0x3615, 0x3617, 0x361a, 0x361c, 0x361e, 0x3621,
+ 0x3624, 0x3626, 0x3628, 0x362a, 0x362c, 0x362e, 0x3630, 0x3632,
+ 0x3634, 0x3636, 0x3638, 0x363a, 0x363c, 0x363e, 0x3641, 0x3643,
+ 0x3646, 0x3648, 0x364b, 0x364d, 0x3650, 0x3653, 0x3656, 0x3658,
+ 0x365a, 0x365c, 0x365f, 0x3662, 0x3665, 0x3668, 0x366a, 0x366c,
+ 0x366e, 0x3670, 0x3672, 0x3674, 0x3676, 0x3678, 0x367b, 0x367d,
+ 0x367f, 0x3681, 0x3683, 0x3686, 0x3688, 0x368b, 0x368e, 0x3690,
+ 0x3692, 0x3694, 0x3696, 0x3698, 0x369a, 0x369d, 0x36a0, 0x36a3,
+ 0x36a5, 0x36a7, 0x36aa, 0x36ac, 0x36ae, 0x36b0, 0x36b3, 0x36b5,
+ 0x36b7, 0x36b9, 0x36bb, 0x36bd, 0x36c0, 0x36c2, 0x36c4, 0x36c6,
+ 0x36c8, 0x36ca, 0x36cc, 0x36cf, 0x36d2, 0x36d4, 0x36d7, 0x36d9,
+ 0x36dc, 0x36de, 0x36e0, 0x36e2, 0x36e5, 0x36e8, 0x36ea, 0x36ed,
+ 0x36ef, 0x36f2, 0x36f4, 0x36f6, 0x36f8, 0x36fa, 0x36fc, 0x36fe,
+ 0x3701, 0x3704, 0x3707, 0x370a, 0x370c, 0x370e, 0x3710, 0x3712,
+ 0x3714, 0x3716, 0x3718, 0x371a, 0x371c, 0x371e, 0x3720, 0x3722,
+ 0x3725, 0x3727, 0x3729, 0x372b, 0x372d, 0x372f, 0x3731, 0x3733,
+ 0x3735, 0x3737, 0x3739, 0x373b, 0x373d, 0x3740, 0x3743, 0x3746,
+ 0x3748, 0x374a, 0x374c, 0x374e, 0x3751, 0x3753, 0x3756, 0x3758,
+ 0x375a, 0x375d, 0x3760, 0x3762, 0x3764, 0x3766, 0x3768, 0x376a,
+ 0x376c, 0x376e, 0x3770, 0x3772, 0x3774, 0x3776, 0x3778, 0x377a,
+ 0x377c, 0x377e, 0x3780, 0x3782, 0x3784, 0x3786, 0x3789, 0x378b,
+ 0x378d, 0x378f, 0x3791, 0x3793, 0x3796, 0x3799, 0x379b, 0x379d,
+ 0x379f, 0x37a1, 0x37a3, 0x37a5, 0x37a8, 0x37aa, 0x37ac, 0x37ae,
+ 0x37b0, 0x37b3, 0x37b6, 0x37b8, 0x37ba, 0x37bc, 0x37bf, 0x37c1,
+ 0x37c3, 0x37c6, 0x37c9, 0x37cb, 0x37cd, 0x37cf, 0x37d2, 0x37d4,
+ 0x37d6, 0x37d8, 0x37da, 0x37dc, 0x37de, 0x37e0, 0x37e3, 0x37e5,
+ 0x37e7, 0x37e9, 0x37ec, 0x37ee, 0x37f0, 0x37f2, 0x37f4, 0x37f7,
+ 0x37fa, 0x37fc, 0x37fe, 0x3800, 0x3803, 0x3805, 0x3808, 0x380a,
- 0x3806, 0x3808, 0x380b, 0x380d, 0x380f, 0x3811, 0x3813, 0x3815,
- 0x3817, 0x3819, 0x381c, 0x381e, 0x3820, 0x3822, 0x3824, 0x3826,
- 0x3828, 0x382b, 0x382d, 0x3830, 0x3833, 0x3836, 0x3838, 0x383a,
- 0x383c, 0x383e, 0x3840, 0x3842, 0x3844, 0x3846, 0xffff, 0xffff,
+ 0x380c, 0x380e, 0x3811, 0x3813, 0x3815, 0x3817, 0x3819, 0x381b,
+ 0x381d, 0x381f, 0x3822, 0x3824, 0x3826, 0x3828, 0x382a, 0x382c,
+ 0x382e, 0x3831, 0x3833, 0x3836, 0x3839, 0x383c, 0x383e, 0x3840,
+ 0x3842, 0x3844, 0x3846, 0x3848, 0x384a, 0x384c, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
@@ -11678,1100 +12186,1100 @@ static const unsigned short uc_decomposition_map[] = {
0x30e1, 0x108, 0x30e2, 0x108, 0x30e4, 0x108, 0x30e6, 0x108,
0x30e8, 0x108, 0x30e9, 0x108, 0x30ea, 0x108, 0x30eb, 0x108,
0x30ec, 0x108, 0x30ed, 0x108, 0x30ef, 0x108, 0x30f0, 0x108,
- 0x30f1, 0x108, 0x30f2, 0x40f, 0x30a2, 0x30d1, 0x30fc, 0x30c8,
- 0x40f, 0x30a2, 0x30eb, 0x30d5, 0x30a1, 0x40f, 0x30a2, 0x30f3,
- 0x30da, 0x30a2, 0x30f, 0x30a2, 0x30fc, 0x30eb, 0x40f, 0x30a4,
- 0x30cb, 0x30f3, 0x30b0, 0x30f, 0x30a4, 0x30f3, 0x30c1, 0x30f,
- 0x30a6, 0x30a9, 0x30f3, 0x50f, 0x30a8, 0x30b9, 0x30af, 0x30fc,
- 0x30c9, 0x40f, 0x30a8, 0x30fc, 0x30ab, 0x30fc, 0x30f, 0x30aa,
- 0x30f3, 0x30b9, 0x30f, 0x30aa, 0x30fc, 0x30e0, 0x30f, 0x30ab,
- 0x30a4, 0x30ea, 0x40f, 0x30ab, 0x30e9, 0x30c3, 0x30c8, 0x40f,
- 0x30ab, 0x30ed, 0x30ea, 0x30fc, 0x30f, 0x30ac, 0x30ed, 0x30f3,
- 0x30f, 0x30ac, 0x30f3, 0x30de, 0x20f, 0x30ae, 0x30ac, 0x30f,
- 0x30ae, 0x30cb, 0x30fc, 0x40f, 0x30ad, 0x30e5, 0x30ea, 0x30fc,
- 0x40f, 0x30ae, 0x30eb, 0x30c0, 0x30fc, 0x20f, 0x30ad, 0x30ed,
- 0x50f, 0x30ad, 0x30ed, 0x30b0, 0x30e9, 0x30e0, 0x60f, 0x30ad,
- 0x30ed, 0x30e1, 0x30fc, 0x30c8, 0x30eb, 0x50f, 0x30ad, 0x30ed,
- 0x30ef, 0x30c3, 0x30c8, 0x30f, 0x30b0, 0x30e9, 0x30e0, 0x50f,
- 0x30b0, 0x30e9, 0x30e0, 0x30c8, 0x30f3, 0x50f, 0x30af, 0x30eb,
- 0x30bc, 0x30a4, 0x30ed, 0x40f, 0x30af, 0x30ed, 0x30fc, 0x30cd,
- 0x30f, 0x30b1, 0x30fc, 0x30b9, 0x30f, 0x30b3, 0x30eb, 0x30ca,
- 0x30f, 0x30b3, 0x30fc, 0x30dd, 0x40f, 0x30b5, 0x30a4, 0x30af,
- 0x30eb, 0x50f, 0x30b5, 0x30f3, 0x30c1, 0x30fc, 0x30e0, 0x40f,
- 0x30b7, 0x30ea, 0x30f3, 0x30b0, 0x30f, 0x30bb, 0x30f3, 0x30c1,
- 0x30f, 0x30bb, 0x30f3, 0x30c8, 0x30f, 0x30c0, 0x30fc, 0x30b9,
- 0x20f, 0x30c7, 0x30b7, 0x20f, 0x30c9, 0x30eb, 0x20f, 0x30c8,
- 0x30f3, 0x20f, 0x30ca, 0x30ce, 0x30f, 0x30ce, 0x30c3, 0x30c8,
- 0x30f, 0x30cf, 0x30a4, 0x30c4, 0x50f, 0x30d1, 0x30fc, 0x30bb,
- 0x30f3, 0x30c8, 0x30f, 0x30d1, 0x30fc, 0x30c4, 0x40f, 0x30d0,
- 0x30fc, 0x30ec, 0x30eb, 0x50f, 0x30d4, 0x30a2, 0x30b9, 0x30c8,
- 0x30eb, 0x30f, 0x30d4, 0x30af, 0x30eb, 0x20f, 0x30d4, 0x30b3,
- 0x20f, 0x30d3, 0x30eb, 0x50f, 0x30d5, 0x30a1, 0x30e9, 0x30c3,
- 0x30c9, 0x40f, 0x30d5, 0x30a3, 0x30fc, 0x30c8, 0x50f, 0x30d6,
- 0x30c3, 0x30b7, 0x30a7, 0x30eb, 0x30f, 0x30d5, 0x30e9, 0x30f3,
- 0x50f, 0x30d8, 0x30af, 0x30bf, 0x30fc, 0x30eb, 0x20f, 0x30da,
- 0x30bd, 0x30f, 0x30da, 0x30cb, 0x30d2, 0x30f, 0x30d8, 0x30eb,
- 0x30c4, 0x30f, 0x30da, 0x30f3, 0x30b9, 0x30f, 0x30da, 0x30fc,
- 0x30b8, 0x30f, 0x30d9, 0x30fc, 0x30bf, 0x40f, 0x30dd, 0x30a4,
- 0x30f3, 0x30c8, 0x30f, 0x30dc, 0x30eb, 0x30c8, 0x20f, 0x30db,
- 0x30f3, 0x30f, 0x30dd, 0x30f3, 0x30c9, 0x30f, 0x30db, 0x30fc,
- 0x30eb, 0x30f, 0x30db, 0x30fc, 0x30f3, 0x40f, 0x30de, 0x30a4,
- 0x30af, 0x30ed, 0x30f, 0x30de, 0x30a4, 0x30eb, 0x30f, 0x30de,
- 0x30c3, 0x30cf, 0x30f, 0x30de, 0x30eb, 0x30af, 0x50f, 0x30de,
- 0x30f3, 0x30b7, 0x30e7, 0x30f3, 0x40f, 0x30df, 0x30af, 0x30ed,
- 0x30f3, 0x20f, 0x30df, 0x30ea, 0x50f, 0x30df, 0x30ea, 0x30d0,
- 0x30fc, 0x30eb, 0x20f, 0x30e1, 0x30ac, 0x40f, 0x30e1, 0x30ac,
- 0x30c8, 0x30f3, 0x40f, 0x30e1, 0x30fc, 0x30c8, 0x30eb, 0x30f,
- 0x30e4, 0x30fc, 0x30c9, 0x30f, 0x30e4, 0x30fc, 0x30eb, 0x30f,
- 0x30e6, 0x30a2, 0x30f3, 0x40f, 0x30ea, 0x30c3, 0x30c8, 0x30eb,
- 0x20f, 0x30ea, 0x30e9, 0x30f, 0x30eb, 0x30d4, 0x30fc, 0x40f,
- 0x30eb, 0x30fc, 0x30d6, 0x30eb, 0x20f, 0x30ec, 0x30e0, 0x50f,
- 0x30ec, 0x30f3, 0x30c8, 0x30b2, 0x30f3, 0x30f, 0x30ef, 0x30c3,
- 0x30c8, 0x210, 0x30, 0x70b9, 0x210, 0x31, 0x70b9, 0x210,
- 0x32, 0x70b9, 0x210, 0x33, 0x70b9, 0x210, 0x34, 0x70b9,
- 0x210, 0x35, 0x70b9, 0x210, 0x36, 0x70b9, 0x210, 0x37,
- 0x70b9, 0x210, 0x38, 0x70b9, 0x210, 0x39, 0x70b9, 0x310,
- 0x31, 0x30, 0x70b9, 0x310, 0x31, 0x31, 0x70b9, 0x310,
- 0x31, 0x32, 0x70b9, 0x310, 0x31, 0x33, 0x70b9, 0x310,
- 0x31, 0x34, 0x70b9, 0x310, 0x31, 0x35, 0x70b9, 0x310,
- 0x31, 0x36, 0x70b9, 0x310, 0x31, 0x37, 0x70b9, 0x310,
- 0x31, 0x38, 0x70b9, 0x310, 0x31, 0x39, 0x70b9, 0x310,
- 0x32, 0x30, 0x70b9, 0x310, 0x32, 0x31, 0x70b9, 0x310,
- 0x32, 0x32, 0x70b9, 0x310, 0x32, 0x33, 0x70b9, 0x310,
- 0x32, 0x34, 0x70b9, 0x30f, 0x68, 0x50, 0x61, 0x20f,
- 0x64, 0x61, 0x20f, 0x41, 0x55, 0x30f, 0x62, 0x61,
- 0x72, 0x20f, 0x6f, 0x56, 0x20f, 0x70, 0x63, 0x20f,
- 0x64, 0x6d, 0x30f, 0x64, 0x6d, 0xb2, 0x30f, 0x64,
- 0x6d, 0xb3, 0x20f, 0x49, 0x55, 0x20f, 0x5e73, 0x6210,
- 0x20f, 0x662d, 0x548c, 0x20f, 0x5927, 0x6b63, 0x20f, 0x660e,
- 0x6cbb, 0x40f, 0x682a, 0x5f0f, 0x4f1a, 0x793e, 0x20f, 0x70,
- 0x41, 0x20f, 0x6e, 0x41, 0x20f, 0x3bc, 0x41, 0x20f,
- 0x6d, 0x41, 0x20f, 0x6b, 0x41, 0x20f, 0x4b, 0x42,
- 0x20f, 0x4d, 0x42, 0x20f, 0x47, 0x42, 0x30f, 0x63,
- 0x61, 0x6c, 0x40f, 0x6b, 0x63, 0x61, 0x6c, 0x20f,
- 0x70, 0x46, 0x20f, 0x6e, 0x46, 0x20f, 0x3bc, 0x46,
- 0x20f, 0x3bc, 0x67, 0x20f, 0x6d, 0x67, 0x20f, 0x6b,
- 0x67, 0x20f, 0x48, 0x7a, 0x30f, 0x6b, 0x48, 0x7a,
- 0x30f, 0x4d, 0x48, 0x7a, 0x30f, 0x47, 0x48, 0x7a,
- 0x30f, 0x54, 0x48, 0x7a, 0x20f, 0x3bc, 0x2113, 0x20f,
- 0x6d, 0x2113, 0x20f, 0x64, 0x2113, 0x20f, 0x6b, 0x2113,
- 0x20f, 0x66, 0x6d, 0x20f, 0x6e, 0x6d, 0x20f, 0x3bc,
- 0x6d, 0x20f, 0x6d, 0x6d, 0x20f, 0x63, 0x6d, 0x20f,
- 0x6b, 0x6d, 0x30f, 0x6d, 0x6d, 0xb2, 0x30f, 0x63,
- 0x6d, 0xb2, 0x20f, 0x6d, 0xb2, 0x30f, 0x6b, 0x6d,
- 0xb2, 0x30f, 0x6d, 0x6d, 0xb3, 0x30f, 0x63, 0x6d,
- 0xb3, 0x20f, 0x6d, 0xb3, 0x30f, 0x6b, 0x6d, 0xb3,
- 0x30f, 0x6d, 0x2215, 0x73, 0x40f, 0x6d, 0x2215, 0x73,
- 0xb2, 0x20f, 0x50, 0x61, 0x30f, 0x6b, 0x50, 0x61,
- 0x30f, 0x4d, 0x50, 0x61, 0x30f, 0x47, 0x50, 0x61,
- 0x30f, 0x72, 0x61, 0x64, 0x50f, 0x72, 0x61, 0x64,
- 0x2215, 0x73, 0x60f, 0x72, 0x61, 0x64, 0x2215, 0x73,
- 0xb2, 0x20f, 0x70, 0x73, 0x20f, 0x6e, 0x73, 0x20f,
- 0x3bc, 0x73, 0x20f, 0x6d, 0x73, 0x20f, 0x70, 0x56,
- 0x20f, 0x6e, 0x56, 0x20f, 0x3bc, 0x56, 0x20f, 0x6d,
- 0x56, 0x20f, 0x6b, 0x56, 0x20f, 0x4d, 0x56, 0x20f,
- 0x70, 0x57, 0x20f, 0x6e, 0x57, 0x20f, 0x3bc, 0x57,
- 0x20f, 0x6d, 0x57, 0x20f, 0x6b, 0x57, 0x20f, 0x4d,
- 0x57, 0x20f, 0x6b, 0x3a9, 0x20f, 0x4d, 0x3a9, 0x40f,
- 0x61, 0x2e, 0x6d, 0x2e, 0x20f, 0x42, 0x71, 0x20f,
- 0x63, 0x63, 0x20f, 0x63, 0x64, 0x40f, 0x43, 0x2215,
- 0x6b, 0x67, 0x30f, 0x43, 0x6f, 0x2e, 0x20f, 0x64,
- 0x42, 0x20f, 0x47, 0x79, 0x20f, 0x68, 0x61, 0x20f,
- 0x48, 0x50, 0x20f, 0x69, 0x6e, 0x20f, 0x4b, 0x4b,
- 0x20f, 0x4b, 0x4d, 0x20f, 0x6b, 0x74, 0x20f, 0x6c,
- 0x6d, 0x20f, 0x6c, 0x6e, 0x30f, 0x6c, 0x6f, 0x67,
- 0x20f, 0x6c, 0x78, 0x20f, 0x6d, 0x62, 0x30f, 0x6d,
- 0x69, 0x6c, 0x30f, 0x6d, 0x6f, 0x6c, 0x20f, 0x50,
- 0x48, 0x40f, 0x70, 0x2e, 0x6d, 0x2e, 0x30f, 0x50,
- 0x50, 0x4d, 0x20f, 0x50, 0x52, 0x20f, 0x73, 0x72,
- 0x20f, 0x53, 0x76, 0x20f, 0x57, 0x62, 0x30f, 0x56,
- 0x2215, 0x6d, 0x30f, 0x41, 0x2215, 0x6d, 0x210, 0x31,
- 0x65e5, 0x210, 0x32, 0x65e5, 0x210, 0x33, 0x65e5, 0x210,
- 0x34, 0x65e5, 0x210, 0x35, 0x65e5, 0x210, 0x36, 0x65e5,
- 0x210, 0x37, 0x65e5, 0x210, 0x38, 0x65e5, 0x210, 0x39,
- 0x65e5, 0x310, 0x31, 0x30, 0x65e5, 0x310, 0x31, 0x31,
- 0x65e5, 0x310, 0x31, 0x32, 0x65e5, 0x310, 0x31, 0x33,
- 0x65e5, 0x310, 0x31, 0x34, 0x65e5, 0x310, 0x31, 0x35,
- 0x65e5, 0x310, 0x31, 0x36, 0x65e5, 0x310, 0x31, 0x37,
- 0x65e5, 0x310, 0x31, 0x38, 0x65e5, 0x310, 0x31, 0x39,
- 0x65e5, 0x310, 0x32, 0x30, 0x65e5, 0x310, 0x32, 0x31,
- 0x65e5, 0x310, 0x32, 0x32, 0x65e5, 0x310, 0x32, 0x33,
- 0x65e5, 0x310, 0x32, 0x34, 0x65e5, 0x310, 0x32, 0x35,
- 0x65e5, 0x310, 0x32, 0x36, 0x65e5, 0x310, 0x32, 0x37,
- 0x65e5, 0x310, 0x32, 0x38, 0x65e5, 0x310, 0x32, 0x39,
- 0x65e5, 0x310, 0x33, 0x30, 0x65e5, 0x310, 0x33, 0x31,
- 0x65e5, 0x30f, 0x67, 0x61, 0x6c, 0x109, 0x44a, 0x109,
- 0x44c, 0x109, 0xa76f, 0x109, 0x126, 0x109, 0x153, 0x109,
- 0xa727, 0x109, 0xab37, 0x109, 0x26b, 0x109, 0xab52, 0x101,
- 0x8c48, 0x101, 0x66f4, 0x101, 0x8eca, 0x101, 0x8cc8, 0x101,
- 0x6ed1, 0x101, 0x4e32, 0x101, 0x53e5, 0x101, 0x9f9c, 0x101,
- 0x9f9c, 0x101, 0x5951, 0x101, 0x91d1, 0x101, 0x5587, 0x101,
- 0x5948, 0x101, 0x61f6, 0x101, 0x7669, 0x101, 0x7f85, 0x101,
- 0x863f, 0x101, 0x87ba, 0x101, 0x88f8, 0x101, 0x908f, 0x101,
- 0x6a02, 0x101, 0x6d1b, 0x101, 0x70d9, 0x101, 0x73de, 0x101,
- 0x843d, 0x101, 0x916a, 0x101, 0x99f1, 0x101, 0x4e82, 0x101,
- 0x5375, 0x101, 0x6b04, 0x101, 0x721b, 0x101, 0x862d, 0x101,
- 0x9e1e, 0x101, 0x5d50, 0x101, 0x6feb, 0x101, 0x85cd, 0x101,
- 0x8964, 0x101, 0x62c9, 0x101, 0x81d8, 0x101, 0x881f, 0x101,
- 0x5eca, 0x101, 0x6717, 0x101, 0x6d6a, 0x101, 0x72fc, 0x101,
- 0x90ce, 0x101, 0x4f86, 0x101, 0x51b7, 0x101, 0x52de, 0x101,
- 0x64c4, 0x101, 0x6ad3, 0x101, 0x7210, 0x101, 0x76e7, 0x101,
- 0x8001, 0x101, 0x8606, 0x101, 0x865c, 0x101, 0x8def, 0x101,
- 0x9732, 0x101, 0x9b6f, 0x101, 0x9dfa, 0x101, 0x788c, 0x101,
- 0x797f, 0x101, 0x7da0, 0x101, 0x83c9, 0x101, 0x9304, 0x101,
- 0x9e7f, 0x101, 0x8ad6, 0x101, 0x58df, 0x101, 0x5f04, 0x101,
- 0x7c60, 0x101, 0x807e, 0x101, 0x7262, 0x101, 0x78ca, 0x101,
- 0x8cc2, 0x101, 0x96f7, 0x101, 0x58d8, 0x101, 0x5c62, 0x101,
- 0x6a13, 0x101, 0x6dda, 0x101, 0x6f0f, 0x101, 0x7d2f, 0x101,
- 0x7e37, 0x101, 0x964b, 0x101, 0x52d2, 0x101, 0x808b, 0x101,
- 0x51dc, 0x101, 0x51cc, 0x101, 0x7a1c, 0x101, 0x7dbe, 0x101,
- 0x83f1, 0x101, 0x9675, 0x101, 0x8b80, 0x101, 0x62cf, 0x101,
- 0x6a02, 0x101, 0x8afe, 0x101, 0x4e39, 0x101, 0x5be7, 0x101,
- 0x6012, 0x101, 0x7387, 0x101, 0x7570, 0x101, 0x5317, 0x101,
- 0x78fb, 0x101, 0x4fbf, 0x101, 0x5fa9, 0x101, 0x4e0d, 0x101,
- 0x6ccc, 0x101, 0x6578, 0x101, 0x7d22, 0x101, 0x53c3, 0x101,
- 0x585e, 0x101, 0x7701, 0x101, 0x8449, 0x101, 0x8aaa, 0x101,
- 0x6bba, 0x101, 0x8fb0, 0x101, 0x6c88, 0x101, 0x62fe, 0x101,
- 0x82e5, 0x101, 0x63a0, 0x101, 0x7565, 0x101, 0x4eae, 0x101,
- 0x5169, 0x101, 0x51c9, 0x101, 0x6881, 0x101, 0x7ce7, 0x101,
- 0x826f, 0x101, 0x8ad2, 0x101, 0x91cf, 0x101, 0x52f5, 0x101,
- 0x5442, 0x101, 0x5973, 0x101, 0x5eec, 0x101, 0x65c5, 0x101,
- 0x6ffe, 0x101, 0x792a, 0x101, 0x95ad, 0x101, 0x9a6a, 0x101,
- 0x9e97, 0x101, 0x9ece, 0x101, 0x529b, 0x101, 0x66c6, 0x101,
- 0x6b77, 0x101, 0x8f62, 0x101, 0x5e74, 0x101, 0x6190, 0x101,
- 0x6200, 0x101, 0x649a, 0x101, 0x6f23, 0x101, 0x7149, 0x101,
- 0x7489, 0x101, 0x79ca, 0x101, 0x7df4, 0x101, 0x806f, 0x101,
- 0x8f26, 0x101, 0x84ee, 0x101, 0x9023, 0x101, 0x934a, 0x101,
- 0x5217, 0x101, 0x52a3, 0x101, 0x54bd, 0x101, 0x70c8, 0x101,
- 0x88c2, 0x101, 0x8aaa, 0x101, 0x5ec9, 0x101, 0x5ff5, 0x101,
- 0x637b, 0x101, 0x6bae, 0x101, 0x7c3e, 0x101, 0x7375, 0x101,
- 0x4ee4, 0x101, 0x56f9, 0x101, 0x5be7, 0x101, 0x5dba, 0x101,
- 0x601c, 0x101, 0x73b2, 0x101, 0x7469, 0x101, 0x7f9a, 0x101,
- 0x8046, 0x101, 0x9234, 0x101, 0x96f6, 0x101, 0x9748, 0x101,
- 0x9818, 0x101, 0x4f8b, 0x101, 0x79ae, 0x101, 0x91b4, 0x101,
- 0x96b8, 0x101, 0x60e1, 0x101, 0x4e86, 0x101, 0x50da, 0x101,
- 0x5bee, 0x101, 0x5c3f, 0x101, 0x6599, 0x101, 0x6a02, 0x101,
- 0x71ce, 0x101, 0x7642, 0x101, 0x84fc, 0x101, 0x907c, 0x101,
- 0x9f8d, 0x101, 0x6688, 0x101, 0x962e, 0x101, 0x5289, 0x101,
- 0x677b, 0x101, 0x67f3, 0x101, 0x6d41, 0x101, 0x6e9c, 0x101,
- 0x7409, 0x101, 0x7559, 0x101, 0x786b, 0x101, 0x7d10, 0x101,
- 0x985e, 0x101, 0x516d, 0x101, 0x622e, 0x101, 0x9678, 0x101,
- 0x502b, 0x101, 0x5d19, 0x101, 0x6dea, 0x101, 0x8f2a, 0x101,
- 0x5f8b, 0x101, 0x6144, 0x101, 0x6817, 0x101, 0x7387, 0x101,
- 0x9686, 0x101, 0x5229, 0x101, 0x540f, 0x101, 0x5c65, 0x101,
- 0x6613, 0x101, 0x674e, 0x101, 0x68a8, 0x101, 0x6ce5, 0x101,
- 0x7406, 0x101, 0x75e2, 0x101, 0x7f79, 0x101, 0x88cf, 0x101,
- 0x88e1, 0x101, 0x91cc, 0x101, 0x96e2, 0x101, 0x533f, 0x101,
- 0x6eba, 0x101, 0x541d, 0x101, 0x71d0, 0x101, 0x7498, 0x101,
- 0x85fa, 0x101, 0x96a3, 0x101, 0x9c57, 0x101, 0x9e9f, 0x101,
- 0x6797, 0x101, 0x6dcb, 0x101, 0x81e8, 0x101, 0x7acb, 0x101,
- 0x7b20, 0x101, 0x7c92, 0x101, 0x72c0, 0x101, 0x7099, 0x101,
- 0x8b58, 0x101, 0x4ec0, 0x101, 0x8336, 0x101, 0x523a, 0x101,
- 0x5207, 0x101, 0x5ea6, 0x101, 0x62d3, 0x101, 0x7cd6, 0x101,
- 0x5b85, 0x101, 0x6d1e, 0x101, 0x66b4, 0x101, 0x8f3b, 0x101,
- 0x884c, 0x101, 0x964d, 0x101, 0x898b, 0x101, 0x5ed3, 0x101,
- 0x5140, 0x101, 0x55c0, 0x101, 0x585a, 0x101, 0x6674, 0x101,
- 0x51de, 0x101, 0x732a, 0x101, 0x76ca, 0x101, 0x793c, 0x101,
- 0x795e, 0x101, 0x7965, 0x101, 0x798f, 0x101, 0x9756, 0x101,
- 0x7cbe, 0x101, 0x7fbd, 0x101, 0x8612, 0x101, 0x8af8, 0x101,
- 0x9038, 0x101, 0x90fd, 0x101, 0x98ef, 0x101, 0x98fc, 0x101,
- 0x9928, 0x101, 0x9db4, 0x101, 0x90de, 0x101, 0x96b7, 0x101,
- 0x4fae, 0x101, 0x50e7, 0x101, 0x514d, 0x101, 0x52c9, 0x101,
- 0x52e4, 0x101, 0x5351, 0x101, 0x559d, 0x101, 0x5606, 0x101,
- 0x5668, 0x101, 0x5840, 0x101, 0x58a8, 0x101, 0x5c64, 0x101,
- 0x5c6e, 0x101, 0x6094, 0x101, 0x6168, 0x101, 0x618e, 0x101,
- 0x61f2, 0x101, 0x654f, 0x101, 0x65e2, 0x101, 0x6691, 0x101,
- 0x6885, 0x101, 0x6d77, 0x101, 0x6e1a, 0x101, 0x6f22, 0x101,
- 0x716e, 0x101, 0x722b, 0x101, 0x7422, 0x101, 0x7891, 0x101,
- 0x793e, 0x101, 0x7949, 0x101, 0x7948, 0x101, 0x7950, 0x101,
- 0x7956, 0x101, 0x795d, 0x101, 0x798d, 0x101, 0x798e, 0x101,
- 0x7a40, 0x101, 0x7a81, 0x101, 0x7bc0, 0x101, 0x7df4, 0x101,
- 0x7e09, 0x101, 0x7e41, 0x101, 0x7f72, 0x101, 0x8005, 0x101,
- 0x81ed, 0x101, 0x8279, 0x101, 0x8279, 0x101, 0x8457, 0x101,
- 0x8910, 0x101, 0x8996, 0x101, 0x8b01, 0x101, 0x8b39, 0x101,
- 0x8cd3, 0x101, 0x8d08, 0x101, 0x8fb6, 0x101, 0x9038, 0x101,
- 0x96e3, 0x101, 0x97ff, 0x101, 0x983b, 0x101, 0x6075, 0x201,
- 0xd850, 0xdeee, 0x101, 0x8218, 0x101, 0x4e26, 0x101, 0x51b5,
- 0x101, 0x5168, 0x101, 0x4f80, 0x101, 0x5145, 0x101, 0x5180,
- 0x101, 0x52c7, 0x101, 0x52fa, 0x101, 0x559d, 0x101, 0x5555,
- 0x101, 0x5599, 0x101, 0x55e2, 0x101, 0x585a, 0x101, 0x58b3,
- 0x101, 0x5944, 0x101, 0x5954, 0x101, 0x5a62, 0x101, 0x5b28,
- 0x101, 0x5ed2, 0x101, 0x5ed9, 0x101, 0x5f69, 0x101, 0x5fad,
- 0x101, 0x60d8, 0x101, 0x614e, 0x101, 0x6108, 0x101, 0x618e,
- 0x101, 0x6160, 0x101, 0x61f2, 0x101, 0x6234, 0x101, 0x63c4,
- 0x101, 0x641c, 0x101, 0x6452, 0x101, 0x6556, 0x101, 0x6674,
- 0x101, 0x6717, 0x101, 0x671b, 0x101, 0x6756, 0x101, 0x6b79,
- 0x101, 0x6bba, 0x101, 0x6d41, 0x101, 0x6edb, 0x101, 0x6ecb,
- 0x101, 0x6f22, 0x101, 0x701e, 0x101, 0x716e, 0x101, 0x77a7,
- 0x101, 0x7235, 0x101, 0x72af, 0x101, 0x732a, 0x101, 0x7471,
- 0x101, 0x7506, 0x101, 0x753b, 0x101, 0x761d, 0x101, 0x761f,
- 0x101, 0x76ca, 0x101, 0x76db, 0x101, 0x76f4, 0x101, 0x774a,
- 0x101, 0x7740, 0x101, 0x78cc, 0x101, 0x7ab1, 0x101, 0x7bc0,
- 0x101, 0x7c7b, 0x101, 0x7d5b, 0x101, 0x7df4, 0x101, 0x7f3e,
- 0x101, 0x8005, 0x101, 0x8352, 0x101, 0x83ef, 0x101, 0x8779,
- 0x101, 0x8941, 0x101, 0x8986, 0x101, 0x8996, 0x101, 0x8abf,
- 0x101, 0x8af8, 0x101, 0x8acb, 0x101, 0x8b01, 0x101, 0x8afe,
- 0x101, 0x8aed, 0x101, 0x8b39, 0x101, 0x8b8a, 0x101, 0x8d08,
- 0x101, 0x8f38, 0x101, 0x9072, 0x101, 0x9199, 0x101, 0x9276,
- 0x101, 0x967c, 0x101, 0x96e3, 0x101, 0x9756, 0x101, 0x97db,
- 0x101, 0x97ff, 0x101, 0x980b, 0x101, 0x983b, 0x101, 0x9b12,
- 0x101, 0x9f9c, 0x201, 0xd84a, 0xdc4a, 0x201, 0xd84a, 0xdc44,
- 0x201, 0xd84c, 0xdfd5, 0x101, 0x3b9d, 0x101, 0x4018, 0x101,
- 0x4039, 0x201, 0xd854, 0xde49, 0x201, 0xd857, 0xdcd0, 0x201,
- 0xd85f, 0xded3, 0x101, 0x9f43, 0x101, 0x9f8e, 0x210, 0x66,
- 0x66, 0x210, 0x66, 0x69, 0x210, 0x66, 0x6c, 0x310,
- 0x66, 0x66, 0x69, 0x310, 0x66, 0x66, 0x6c, 0x210,
- 0x17f, 0x74, 0x210, 0x73, 0x74, 0x210, 0x574, 0x576,
- 0x210, 0x574, 0x565, 0x210, 0x574, 0x56b, 0x210, 0x57e,
- 0x576, 0x210, 0x574, 0x56d, 0x201, 0x5d9, 0x5b4, 0x201,
- 0x5f2, 0x5b7, 0x102, 0x5e2, 0x102, 0x5d0, 0x102, 0x5d3,
- 0x102, 0x5d4, 0x102, 0x5db, 0x102, 0x5dc, 0x102, 0x5dd,
- 0x102, 0x5e8, 0x102, 0x5ea, 0x102, 0x2b, 0x201, 0x5e9,
- 0x5c1, 0x201, 0x5e9, 0x5c2, 0x201, 0xfb49, 0x5c1, 0x201,
- 0xfb49, 0x5c2, 0x201, 0x5d0, 0x5b7, 0x201, 0x5d0, 0x5b8,
- 0x201, 0x5d0, 0x5bc, 0x201, 0x5d1, 0x5bc, 0x201, 0x5d2,
- 0x5bc, 0x201, 0x5d3, 0x5bc, 0x201, 0x5d4, 0x5bc, 0x201,
- 0x5d5, 0x5bc, 0x201, 0x5d6, 0x5bc, 0x201, 0x5d8, 0x5bc,
- 0x201, 0x5d9, 0x5bc, 0x201, 0x5da, 0x5bc, 0x201, 0x5db,
- 0x5bc, 0x201, 0x5dc, 0x5bc, 0x201, 0x5de, 0x5bc, 0x201,
- 0x5e0, 0x5bc, 0x201, 0x5e1, 0x5bc, 0x201, 0x5e3, 0x5bc,
- 0x201, 0x5e4, 0x5bc, 0x201, 0x5e6, 0x5bc, 0x201, 0x5e7,
- 0x5bc, 0x201, 0x5e8, 0x5bc, 0x201, 0x5e9, 0x5bc, 0x201,
- 0x5ea, 0x5bc, 0x201, 0x5d5, 0x5b9, 0x201, 0x5d1, 0x5bf,
- 0x201, 0x5db, 0x5bf, 0x201, 0x5e4, 0x5bf, 0x210, 0x5d0,
- 0x5dc, 0x107, 0x671, 0x106, 0x671, 0x107, 0x67b, 0x106,
- 0x67b, 0x104, 0x67b, 0x105, 0x67b, 0x107, 0x67e, 0x106,
- 0x67e, 0x104, 0x67e, 0x105, 0x67e, 0x107, 0x680, 0x106,
- 0x680, 0x104, 0x680, 0x105, 0x680, 0x107, 0x67a, 0x106,
- 0x67a, 0x104, 0x67a, 0x105, 0x67a, 0x107, 0x67f, 0x106,
- 0x67f, 0x104, 0x67f, 0x105, 0x67f, 0x107, 0x679, 0x106,
- 0x679, 0x104, 0x679, 0x105, 0x679, 0x107, 0x6a4, 0x106,
- 0x6a4, 0x104, 0x6a4, 0x105, 0x6a4, 0x107, 0x6a6, 0x106,
- 0x6a6, 0x104, 0x6a6, 0x105, 0x6a6, 0x107, 0x684, 0x106,
- 0x684, 0x104, 0x684, 0x105, 0x684, 0x107, 0x683, 0x106,
- 0x683, 0x104, 0x683, 0x105, 0x683, 0x107, 0x686, 0x106,
- 0x686, 0x104, 0x686, 0x105, 0x686, 0x107, 0x687, 0x106,
- 0x687, 0x104, 0x687, 0x105, 0x687, 0x107, 0x68d, 0x106,
- 0x68d, 0x107, 0x68c, 0x106, 0x68c, 0x107, 0x68e, 0x106,
- 0x68e, 0x107, 0x688, 0x106, 0x688, 0x107, 0x698, 0x106,
- 0x698, 0x107, 0x691, 0x106, 0x691, 0x107, 0x6a9, 0x106,
- 0x6a9, 0x104, 0x6a9, 0x105, 0x6a9, 0x107, 0x6af, 0x106,
- 0x6af, 0x104, 0x6af, 0x105, 0x6af, 0x107, 0x6b3, 0x106,
- 0x6b3, 0x104, 0x6b3, 0x105, 0x6b3, 0x107, 0x6b1, 0x106,
- 0x6b1, 0x104, 0x6b1, 0x105, 0x6b1, 0x107, 0x6ba, 0x106,
- 0x6ba, 0x107, 0x6bb, 0x106, 0x6bb, 0x104, 0x6bb, 0x105,
- 0x6bb, 0x107, 0x6c0, 0x106, 0x6c0, 0x107, 0x6c1, 0x106,
- 0x6c1, 0x104, 0x6c1, 0x105, 0x6c1, 0x107, 0x6be, 0x106,
- 0x6be, 0x104, 0x6be, 0x105, 0x6be, 0x107, 0x6d2, 0x106,
- 0x6d2, 0x107, 0x6d3, 0x106, 0x6d3, 0x107, 0x6ad, 0x106,
- 0x6ad, 0x104, 0x6ad, 0x105, 0x6ad, 0x107, 0x6c7, 0x106,
- 0x6c7, 0x107, 0x6c6, 0x106, 0x6c6, 0x107, 0x6c8, 0x106,
- 0x6c8, 0x107, 0x677, 0x107, 0x6cb, 0x106, 0x6cb, 0x107,
- 0x6c5, 0x106, 0x6c5, 0x107, 0x6c9, 0x106, 0x6c9, 0x107,
- 0x6d0, 0x106, 0x6d0, 0x104, 0x6d0, 0x105, 0x6d0, 0x104,
- 0x649, 0x105, 0x649, 0x207, 0x626, 0x627, 0x206, 0x626,
- 0x627, 0x207, 0x626, 0x6d5, 0x206, 0x626, 0x6d5, 0x207,
- 0x626, 0x648, 0x206, 0x626, 0x648, 0x207, 0x626, 0x6c7,
- 0x206, 0x626, 0x6c7, 0x207, 0x626, 0x6c6, 0x206, 0x626,
- 0x6c6, 0x207, 0x626, 0x6c8, 0x206, 0x626, 0x6c8, 0x207,
- 0x626, 0x6d0, 0x206, 0x626, 0x6d0, 0x204, 0x626, 0x6d0,
- 0x207, 0x626, 0x649, 0x206, 0x626, 0x649, 0x204, 0x626,
- 0x649, 0x107, 0x6cc, 0x106, 0x6cc, 0x104, 0x6cc, 0x105,
- 0x6cc, 0x207, 0x626, 0x62c, 0x207, 0x626, 0x62d, 0x207,
- 0x626, 0x645, 0x207, 0x626, 0x649, 0x207, 0x626, 0x64a,
- 0x207, 0x628, 0x62c, 0x207, 0x628, 0x62d, 0x207, 0x628,
- 0x62e, 0x207, 0x628, 0x645, 0x207, 0x628, 0x649, 0x207,
- 0x628, 0x64a, 0x207, 0x62a, 0x62c, 0x207, 0x62a, 0x62d,
- 0x207, 0x62a, 0x62e, 0x207, 0x62a, 0x645, 0x207, 0x62a,
- 0x649, 0x207, 0x62a, 0x64a, 0x207, 0x62b, 0x62c, 0x207,
- 0x62b, 0x645, 0x207, 0x62b, 0x649, 0x207, 0x62b, 0x64a,
- 0x207, 0x62c, 0x62d, 0x207, 0x62c, 0x645, 0x207, 0x62d,
- 0x62c, 0x207, 0x62d, 0x645, 0x207, 0x62e, 0x62c, 0x207,
- 0x62e, 0x62d, 0x207, 0x62e, 0x645, 0x207, 0x633, 0x62c,
- 0x207, 0x633, 0x62d, 0x207, 0x633, 0x62e, 0x207, 0x633,
- 0x645, 0x207, 0x635, 0x62d, 0x207, 0x635, 0x645, 0x207,
- 0x636, 0x62c, 0x207, 0x636, 0x62d, 0x207, 0x636, 0x62e,
- 0x207, 0x636, 0x645, 0x207, 0x637, 0x62d, 0x207, 0x637,
- 0x645, 0x207, 0x638, 0x645, 0x207, 0x639, 0x62c, 0x207,
- 0x639, 0x645, 0x207, 0x63a, 0x62c, 0x207, 0x63a, 0x645,
- 0x207, 0x641, 0x62c, 0x207, 0x641, 0x62d, 0x207, 0x641,
- 0x62e, 0x207, 0x641, 0x645, 0x207, 0x641, 0x649, 0x207,
- 0x641, 0x64a, 0x207, 0x642, 0x62d, 0x207, 0x642, 0x645,
- 0x207, 0x642, 0x649, 0x207, 0x642, 0x64a, 0x207, 0x643,
- 0x627, 0x207, 0x643, 0x62c, 0x207, 0x643, 0x62d, 0x207,
- 0x643, 0x62e, 0x207, 0x643, 0x644, 0x207, 0x643, 0x645,
- 0x207, 0x643, 0x649, 0x207, 0x643, 0x64a, 0x207, 0x644,
- 0x62c, 0x207, 0x644, 0x62d, 0x207, 0x644, 0x62e, 0x207,
- 0x644, 0x645, 0x207, 0x644, 0x649, 0x207, 0x644, 0x64a,
- 0x207, 0x645, 0x62c, 0x207, 0x645, 0x62d, 0x207, 0x645,
- 0x62e, 0x207, 0x645, 0x645, 0x207, 0x645, 0x649, 0x207,
- 0x645, 0x64a, 0x207, 0x646, 0x62c, 0x207, 0x646, 0x62d,
- 0x207, 0x646, 0x62e, 0x207, 0x646, 0x645, 0x207, 0x646,
- 0x649, 0x207, 0x646, 0x64a, 0x207, 0x647, 0x62c, 0x207,
- 0x647, 0x645, 0x207, 0x647, 0x649, 0x207, 0x647, 0x64a,
- 0x207, 0x64a, 0x62c, 0x207, 0x64a, 0x62d, 0x207, 0x64a,
- 0x62e, 0x207, 0x64a, 0x645, 0x207, 0x64a, 0x649, 0x207,
- 0x64a, 0x64a, 0x207, 0x630, 0x670, 0x207, 0x631, 0x670,
- 0x207, 0x649, 0x670, 0x307, 0x20, 0x64c, 0x651, 0x307,
- 0x20, 0x64d, 0x651, 0x307, 0x20, 0x64e, 0x651, 0x307,
- 0x20, 0x64f, 0x651, 0x307, 0x20, 0x650, 0x651, 0x307,
- 0x20, 0x651, 0x670, 0x206, 0x626, 0x631, 0x206, 0x626,
- 0x632, 0x206, 0x626, 0x645, 0x206, 0x626, 0x646, 0x206,
- 0x626, 0x649, 0x206, 0x626, 0x64a, 0x206, 0x628, 0x631,
- 0x206, 0x628, 0x632, 0x206, 0x628, 0x645, 0x206, 0x628,
- 0x646, 0x206, 0x628, 0x649, 0x206, 0x628, 0x64a, 0x206,
- 0x62a, 0x631, 0x206, 0x62a, 0x632, 0x206, 0x62a, 0x645,
- 0x206, 0x62a, 0x646, 0x206, 0x62a, 0x649, 0x206, 0x62a,
- 0x64a, 0x206, 0x62b, 0x631, 0x206, 0x62b, 0x632, 0x206,
- 0x62b, 0x645, 0x206, 0x62b, 0x646, 0x206, 0x62b, 0x649,
- 0x206, 0x62b, 0x64a, 0x206, 0x641, 0x649, 0x206, 0x641,
- 0x64a, 0x206, 0x642, 0x649, 0x206, 0x642, 0x64a, 0x206,
- 0x643, 0x627, 0x206, 0x643, 0x644, 0x206, 0x643, 0x645,
- 0x206, 0x643, 0x649, 0x206, 0x643, 0x64a, 0x206, 0x644,
- 0x645, 0x206, 0x644, 0x649, 0x206, 0x644, 0x64a, 0x206,
- 0x645, 0x627, 0x206, 0x645, 0x645, 0x206, 0x646, 0x631,
- 0x206, 0x646, 0x632, 0x206, 0x646, 0x645, 0x206, 0x646,
- 0x646, 0x206, 0x646, 0x649, 0x206, 0x646, 0x64a, 0x206,
- 0x649, 0x670, 0x206, 0x64a, 0x631, 0x206, 0x64a, 0x632,
- 0x206, 0x64a, 0x645, 0x206, 0x64a, 0x646, 0x206, 0x64a,
- 0x649, 0x206, 0x64a, 0x64a, 0x204, 0x626, 0x62c, 0x204,
- 0x626, 0x62d, 0x204, 0x626, 0x62e, 0x204, 0x626, 0x645,
- 0x204, 0x626, 0x647, 0x204, 0x628, 0x62c, 0x204, 0x628,
- 0x62d, 0x204, 0x628, 0x62e, 0x204, 0x628, 0x645, 0x204,
- 0x628, 0x647, 0x204, 0x62a, 0x62c, 0x204, 0x62a, 0x62d,
- 0x204, 0x62a, 0x62e, 0x204, 0x62a, 0x645, 0x204, 0x62a,
- 0x647, 0x204, 0x62b, 0x645, 0x204, 0x62c, 0x62d, 0x204,
- 0x62c, 0x645, 0x204, 0x62d, 0x62c, 0x204, 0x62d, 0x645,
- 0x204, 0x62e, 0x62c, 0x204, 0x62e, 0x645, 0x204, 0x633,
- 0x62c, 0x204, 0x633, 0x62d, 0x204, 0x633, 0x62e, 0x204,
- 0x633, 0x645, 0x204, 0x635, 0x62d, 0x204, 0x635, 0x62e,
- 0x204, 0x635, 0x645, 0x204, 0x636, 0x62c, 0x204, 0x636,
- 0x62d, 0x204, 0x636, 0x62e, 0x204, 0x636, 0x645, 0x204,
- 0x637, 0x62d, 0x204, 0x638, 0x645, 0x204, 0x639, 0x62c,
- 0x204, 0x639, 0x645, 0x204, 0x63a, 0x62c, 0x204, 0x63a,
- 0x645, 0x204, 0x641, 0x62c, 0x204, 0x641, 0x62d, 0x204,
- 0x641, 0x62e, 0x204, 0x641, 0x645, 0x204, 0x642, 0x62d,
- 0x204, 0x642, 0x645, 0x204, 0x643, 0x62c, 0x204, 0x643,
- 0x62d, 0x204, 0x643, 0x62e, 0x204, 0x643, 0x644, 0x204,
- 0x643, 0x645, 0x204, 0x644, 0x62c, 0x204, 0x644, 0x62d,
- 0x204, 0x644, 0x62e, 0x204, 0x644, 0x645, 0x204, 0x644,
- 0x647, 0x204, 0x645, 0x62c, 0x204, 0x645, 0x62d, 0x204,
- 0x645, 0x62e, 0x204, 0x645, 0x645, 0x204, 0x646, 0x62c,
- 0x204, 0x646, 0x62d, 0x204, 0x646, 0x62e, 0x204, 0x646,
- 0x645, 0x204, 0x646, 0x647, 0x204, 0x647, 0x62c, 0x204,
- 0x647, 0x645, 0x204, 0x647, 0x670, 0x204, 0x64a, 0x62c,
- 0x204, 0x64a, 0x62d, 0x204, 0x64a, 0x62e, 0x204, 0x64a,
- 0x645, 0x204, 0x64a, 0x647, 0x205, 0x626, 0x645, 0x205,
- 0x626, 0x647, 0x205, 0x628, 0x645, 0x205, 0x628, 0x647,
- 0x205, 0x62a, 0x645, 0x205, 0x62a, 0x647, 0x205, 0x62b,
- 0x645, 0x205, 0x62b, 0x647, 0x205, 0x633, 0x645, 0x205,
- 0x633, 0x647, 0x205, 0x634, 0x645, 0x205, 0x634, 0x647,
- 0x205, 0x643, 0x644, 0x205, 0x643, 0x645, 0x205, 0x644,
- 0x645, 0x205, 0x646, 0x645, 0x205, 0x646, 0x647, 0x205,
- 0x64a, 0x645, 0x205, 0x64a, 0x647, 0x305, 0x640, 0x64e,
- 0x651, 0x305, 0x640, 0x64f, 0x651, 0x305, 0x640, 0x650,
- 0x651, 0x207, 0x637, 0x649, 0x207, 0x637, 0x64a, 0x207,
- 0x639, 0x649, 0x207, 0x639, 0x64a, 0x207, 0x63a, 0x649,
- 0x207, 0x63a, 0x64a, 0x207, 0x633, 0x649, 0x207, 0x633,
- 0x64a, 0x207, 0x634, 0x649, 0x207, 0x634, 0x64a, 0x207,
- 0x62d, 0x649, 0x207, 0x62d, 0x64a, 0x207, 0x62c, 0x649,
- 0x207, 0x62c, 0x64a, 0x207, 0x62e, 0x649, 0x207, 0x62e,
- 0x64a, 0x207, 0x635, 0x649, 0x207, 0x635, 0x64a, 0x207,
- 0x636, 0x649, 0x207, 0x636, 0x64a, 0x207, 0x634, 0x62c,
- 0x207, 0x634, 0x62d, 0x207, 0x634, 0x62e, 0x207, 0x634,
- 0x645, 0x207, 0x634, 0x631, 0x207, 0x633, 0x631, 0x207,
- 0x635, 0x631, 0x207, 0x636, 0x631, 0x206, 0x637, 0x649,
- 0x206, 0x637, 0x64a, 0x206, 0x639, 0x649, 0x206, 0x639,
- 0x64a, 0x206, 0x63a, 0x649, 0x206, 0x63a, 0x64a, 0x206,
- 0x633, 0x649, 0x206, 0x633, 0x64a, 0x206, 0x634, 0x649,
- 0x206, 0x634, 0x64a, 0x206, 0x62d, 0x649, 0x206, 0x62d,
- 0x64a, 0x206, 0x62c, 0x649, 0x206, 0x62c, 0x64a, 0x206,
- 0x62e, 0x649, 0x206, 0x62e, 0x64a, 0x206, 0x635, 0x649,
- 0x206, 0x635, 0x64a, 0x206, 0x636, 0x649, 0x206, 0x636,
- 0x64a, 0x206, 0x634, 0x62c, 0x206, 0x634, 0x62d, 0x206,
- 0x634, 0x62e, 0x206, 0x634, 0x645, 0x206, 0x634, 0x631,
- 0x206, 0x633, 0x631, 0x206, 0x635, 0x631, 0x206, 0x636,
- 0x631, 0x204, 0x634, 0x62c, 0x204, 0x634, 0x62d, 0x204,
- 0x634, 0x62e, 0x204, 0x634, 0x645, 0x204, 0x633, 0x647,
- 0x204, 0x634, 0x647, 0x204, 0x637, 0x645, 0x205, 0x633,
- 0x62c, 0x205, 0x633, 0x62d, 0x205, 0x633, 0x62e, 0x205,
- 0x634, 0x62c, 0x205, 0x634, 0x62d, 0x205, 0x634, 0x62e,
- 0x205, 0x637, 0x645, 0x205, 0x638, 0x645, 0x206, 0x627,
- 0x64b, 0x207, 0x627, 0x64b, 0x304, 0x62a, 0x62c, 0x645,
- 0x306, 0x62a, 0x62d, 0x62c, 0x304, 0x62a, 0x62d, 0x62c,
- 0x304, 0x62a, 0x62d, 0x645, 0x304, 0x62a, 0x62e, 0x645,
- 0x304, 0x62a, 0x645, 0x62c, 0x304, 0x62a, 0x645, 0x62d,
- 0x304, 0x62a, 0x645, 0x62e, 0x306, 0x62c, 0x645, 0x62d,
- 0x304, 0x62c, 0x645, 0x62d, 0x306, 0x62d, 0x645, 0x64a,
- 0x306, 0x62d, 0x645, 0x649, 0x304, 0x633, 0x62d, 0x62c,
- 0x304, 0x633, 0x62c, 0x62d, 0x306, 0x633, 0x62c, 0x649,
- 0x306, 0x633, 0x645, 0x62d, 0x304, 0x633, 0x645, 0x62d,
- 0x304, 0x633, 0x645, 0x62c, 0x306, 0x633, 0x645, 0x645,
- 0x304, 0x633, 0x645, 0x645, 0x306, 0x635, 0x62d, 0x62d,
- 0x304, 0x635, 0x62d, 0x62d, 0x306, 0x635, 0x645, 0x645,
- 0x306, 0x634, 0x62d, 0x645, 0x304, 0x634, 0x62d, 0x645,
- 0x306, 0x634, 0x62c, 0x64a, 0x306, 0x634, 0x645, 0x62e,
- 0x304, 0x634, 0x645, 0x62e, 0x306, 0x634, 0x645, 0x645,
- 0x304, 0x634, 0x645, 0x645, 0x306, 0x636, 0x62d, 0x649,
- 0x306, 0x636, 0x62e, 0x645, 0x304, 0x636, 0x62e, 0x645,
- 0x306, 0x637, 0x645, 0x62d, 0x304, 0x637, 0x645, 0x62d,
- 0x304, 0x637, 0x645, 0x645, 0x306, 0x637, 0x645, 0x64a,
- 0x306, 0x639, 0x62c, 0x645, 0x306, 0x639, 0x645, 0x645,
- 0x304, 0x639, 0x645, 0x645, 0x306, 0x639, 0x645, 0x649,
- 0x306, 0x63a, 0x645, 0x645, 0x306, 0x63a, 0x645, 0x64a,
- 0x306, 0x63a, 0x645, 0x649, 0x306, 0x641, 0x62e, 0x645,
- 0x304, 0x641, 0x62e, 0x645, 0x306, 0x642, 0x645, 0x62d,
- 0x306, 0x642, 0x645, 0x645, 0x306, 0x644, 0x62d, 0x645,
- 0x306, 0x644, 0x62d, 0x64a, 0x306, 0x644, 0x62d, 0x649,
- 0x304, 0x644, 0x62c, 0x62c, 0x306, 0x644, 0x62c, 0x62c,
- 0x306, 0x644, 0x62e, 0x645, 0x304, 0x644, 0x62e, 0x645,
- 0x306, 0x644, 0x645, 0x62d, 0x304, 0x644, 0x645, 0x62d,
- 0x304, 0x645, 0x62d, 0x62c, 0x304, 0x645, 0x62d, 0x645,
- 0x306, 0x645, 0x62d, 0x64a, 0x304, 0x645, 0x62c, 0x62d,
- 0x304, 0x645, 0x62c, 0x645, 0x304, 0x645, 0x62e, 0x62c,
- 0x304, 0x645, 0x62e, 0x645, 0x304, 0x645, 0x62c, 0x62e,
- 0x304, 0x647, 0x645, 0x62c, 0x304, 0x647, 0x645, 0x645,
- 0x304, 0x646, 0x62d, 0x645, 0x306, 0x646, 0x62d, 0x649,
- 0x306, 0x646, 0x62c, 0x645, 0x304, 0x646, 0x62c, 0x645,
- 0x306, 0x646, 0x62c, 0x649, 0x306, 0x646, 0x645, 0x64a,
- 0x306, 0x646, 0x645, 0x649, 0x306, 0x64a, 0x645, 0x645,
- 0x304, 0x64a, 0x645, 0x645, 0x306, 0x628, 0x62e, 0x64a,
- 0x306, 0x62a, 0x62c, 0x64a, 0x306, 0x62a, 0x62c, 0x649,
- 0x306, 0x62a, 0x62e, 0x64a, 0x306, 0x62a, 0x62e, 0x649,
- 0x306, 0x62a, 0x645, 0x64a, 0x306, 0x62a, 0x645, 0x649,
- 0x306, 0x62c, 0x645, 0x64a, 0x306, 0x62c, 0x62d, 0x649,
- 0x306, 0x62c, 0x645, 0x649, 0x306, 0x633, 0x62e, 0x649,
- 0x306, 0x635, 0x62d, 0x64a, 0x306, 0x634, 0x62d, 0x64a,
- 0x306, 0x636, 0x62d, 0x64a, 0x306, 0x644, 0x62c, 0x64a,
- 0x306, 0x644, 0x645, 0x64a, 0x306, 0x64a, 0x62d, 0x64a,
- 0x306, 0x64a, 0x62c, 0x64a, 0x306, 0x64a, 0x645, 0x64a,
- 0x306, 0x645, 0x645, 0x64a, 0x306, 0x642, 0x645, 0x64a,
- 0x306, 0x646, 0x62d, 0x64a, 0x304, 0x642, 0x645, 0x62d,
- 0x304, 0x644, 0x62d, 0x645, 0x306, 0x639, 0x645, 0x64a,
- 0x306, 0x643, 0x645, 0x64a, 0x304, 0x646, 0x62c, 0x62d,
- 0x306, 0x645, 0x62e, 0x64a, 0x304, 0x644, 0x62c, 0x645,
- 0x306, 0x643, 0x645, 0x645, 0x306, 0x644, 0x62c, 0x645,
- 0x306, 0x646, 0x62c, 0x62d, 0x306, 0x62c, 0x62d, 0x64a,
- 0x306, 0x62d, 0x62c, 0x64a, 0x306, 0x645, 0x62c, 0x64a,
- 0x306, 0x641, 0x645, 0x64a, 0x306, 0x628, 0x62d, 0x64a,
- 0x304, 0x643, 0x645, 0x645, 0x304, 0x639, 0x62c, 0x645,
- 0x304, 0x635, 0x645, 0x645, 0x306, 0x633, 0x62e, 0x64a,
- 0x306, 0x646, 0x62c, 0x64a, 0x307, 0x635, 0x644, 0x6d2,
- 0x307, 0x642, 0x644, 0x6d2, 0x407, 0x627, 0x644, 0x644,
- 0x647, 0x407, 0x627, 0x643, 0x628, 0x631, 0x407, 0x645,
- 0x62d, 0x645, 0x62f, 0x407, 0x635, 0x644, 0x639, 0x645,
- 0x407, 0x631, 0x633, 0x648, 0x644, 0x407, 0x639, 0x644,
- 0x64a, 0x647, 0x407, 0x648, 0x633, 0x644, 0x645, 0x307,
- 0x635, 0x644, 0x649, 0x1207, 0x635, 0x644, 0x649, 0x20,
- 0x627, 0x644, 0x644, 0x647, 0x20, 0x639, 0x644, 0x64a,
- 0x647, 0x20, 0x648, 0x633, 0x644, 0x645, 0x807, 0x62c,
- 0x644, 0x20, 0x62c, 0x644, 0x627, 0x644, 0x647, 0x407,
- 0x631, 0x6cc, 0x627, 0x644, 0x10b, 0x2c, 0x10b, 0x3001,
- 0x10b, 0x3002, 0x10b, 0x3a, 0x10b, 0x3b, 0x10b, 0x21,
- 0x10b, 0x3f, 0x10b, 0x3016, 0x10b, 0x3017, 0x10b, 0x2026,
- 0x10b, 0x2025, 0x10b, 0x2014, 0x10b, 0x2013, 0x10b, 0x5f,
- 0x10b, 0x5f, 0x10b, 0x28, 0x10b, 0x29, 0x10b, 0x7b,
- 0x10b, 0x7d, 0x10b, 0x3014, 0x10b, 0x3015, 0x10b, 0x3010,
- 0x10b, 0x3011, 0x10b, 0x300a, 0x10b, 0x300b, 0x10b, 0x3008,
- 0x10b, 0x3009, 0x10b, 0x300c, 0x10b, 0x300d, 0x10b, 0x300e,
- 0x10b, 0x300f, 0x10b, 0x5b, 0x10b, 0x5d, 0x110, 0x203e,
- 0x110, 0x203e, 0x110, 0x203e, 0x110, 0x203e, 0x110, 0x5f,
- 0x110, 0x5f, 0x110, 0x5f, 0x10e, 0x2c, 0x10e, 0x3001,
- 0x10e, 0x2e, 0x10e, 0x3b, 0x10e, 0x3a, 0x10e, 0x3f,
- 0x10e, 0x21, 0x10e, 0x2014, 0x10e, 0x28, 0x10e, 0x29,
- 0x10e, 0x7b, 0x10e, 0x7d, 0x10e, 0x3014, 0x10e, 0x3015,
- 0x10e, 0x23, 0x10e, 0x26, 0x10e, 0x2a, 0x10e, 0x2b,
- 0x10e, 0x2d, 0x10e, 0x3c, 0x10e, 0x3e, 0x10e, 0x3d,
- 0x10e, 0x5c, 0x10e, 0x24, 0x10e, 0x25, 0x10e, 0x40,
- 0x207, 0x20, 0x64b, 0x205, 0x640, 0x64b, 0x207, 0x20,
- 0x64c, 0x207, 0x20, 0x64d, 0x207, 0x20, 0x64e, 0x205,
- 0x640, 0x64e, 0x207, 0x20, 0x64f, 0x205, 0x640, 0x64f,
- 0x207, 0x20, 0x650, 0x205, 0x640, 0x650, 0x207, 0x20,
- 0x651, 0x205, 0x640, 0x651, 0x207, 0x20, 0x652, 0x205,
- 0x640, 0x652, 0x107, 0x621, 0x107, 0x622, 0x106, 0x622,
- 0x107, 0x623, 0x106, 0x623, 0x107, 0x624, 0x106, 0x624,
- 0x107, 0x625, 0x106, 0x625, 0x107, 0x626, 0x106, 0x626,
- 0x104, 0x626, 0x105, 0x626, 0x107, 0x627, 0x106, 0x627,
- 0x107, 0x628, 0x106, 0x628, 0x104, 0x628, 0x105, 0x628,
- 0x107, 0x629, 0x106, 0x629, 0x107, 0x62a, 0x106, 0x62a,
- 0x104, 0x62a, 0x105, 0x62a, 0x107, 0x62b, 0x106, 0x62b,
- 0x104, 0x62b, 0x105, 0x62b, 0x107, 0x62c, 0x106, 0x62c,
- 0x104, 0x62c, 0x105, 0x62c, 0x107, 0x62d, 0x106, 0x62d,
- 0x104, 0x62d, 0x105, 0x62d, 0x107, 0x62e, 0x106, 0x62e,
- 0x104, 0x62e, 0x105, 0x62e, 0x107, 0x62f, 0x106, 0x62f,
- 0x107, 0x630, 0x106, 0x630, 0x107, 0x631, 0x106, 0x631,
- 0x107, 0x632, 0x106, 0x632, 0x107, 0x633, 0x106, 0x633,
- 0x104, 0x633, 0x105, 0x633, 0x107, 0x634, 0x106, 0x634,
- 0x104, 0x634, 0x105, 0x634, 0x107, 0x635, 0x106, 0x635,
- 0x104, 0x635, 0x105, 0x635, 0x107, 0x636, 0x106, 0x636,
- 0x104, 0x636, 0x105, 0x636, 0x107, 0x637, 0x106, 0x637,
- 0x104, 0x637, 0x105, 0x637, 0x107, 0x638, 0x106, 0x638,
- 0x104, 0x638, 0x105, 0x638, 0x107, 0x639, 0x106, 0x639,
- 0x104, 0x639, 0x105, 0x639, 0x107, 0x63a, 0x106, 0x63a,
- 0x104, 0x63a, 0x105, 0x63a, 0x107, 0x641, 0x106, 0x641,
- 0x104, 0x641, 0x105, 0x641, 0x107, 0x642, 0x106, 0x642,
- 0x104, 0x642, 0x105, 0x642, 0x107, 0x643, 0x106, 0x643,
- 0x104, 0x643, 0x105, 0x643, 0x107, 0x644, 0x106, 0x644,
- 0x104, 0x644, 0x105, 0x644, 0x107, 0x645, 0x106, 0x645,
- 0x104, 0x645, 0x105, 0x645, 0x107, 0x646, 0x106, 0x646,
- 0x104, 0x646, 0x105, 0x646, 0x107, 0x647, 0x106, 0x647,
- 0x104, 0x647, 0x105, 0x647, 0x107, 0x648, 0x106, 0x648,
- 0x107, 0x649, 0x106, 0x649, 0x107, 0x64a, 0x106, 0x64a,
- 0x104, 0x64a, 0x105, 0x64a, 0x207, 0x644, 0x622, 0x206,
- 0x644, 0x622, 0x207, 0x644, 0x623, 0x206, 0x644, 0x623,
- 0x207, 0x644, 0x625, 0x206, 0x644, 0x625, 0x207, 0x644,
- 0x627, 0x206, 0x644, 0x627, 0x10c, 0x21, 0x10c, 0x22,
- 0x10c, 0x23, 0x10c, 0x24, 0x10c, 0x25, 0x10c, 0x26,
- 0x10c, 0x27, 0x10c, 0x28, 0x10c, 0x29, 0x10c, 0x2a,
- 0x10c, 0x2b, 0x10c, 0x2c, 0x10c, 0x2d, 0x10c, 0x2e,
- 0x10c, 0x2f, 0x10c, 0x30, 0x10c, 0x31, 0x10c, 0x32,
- 0x10c, 0x33, 0x10c, 0x34, 0x10c, 0x35, 0x10c, 0x36,
- 0x10c, 0x37, 0x10c, 0x38, 0x10c, 0x39, 0x10c, 0x3a,
- 0x10c, 0x3b, 0x10c, 0x3c, 0x10c, 0x3d, 0x10c, 0x3e,
- 0x10c, 0x3f, 0x10c, 0x40, 0x10c, 0x41, 0x10c, 0x42,
- 0x10c, 0x43, 0x10c, 0x44, 0x10c, 0x45, 0x10c, 0x46,
- 0x10c, 0x47, 0x10c, 0x48, 0x10c, 0x49, 0x10c, 0x4a,
- 0x10c, 0x4b, 0x10c, 0x4c, 0x10c, 0x4d, 0x10c, 0x4e,
- 0x10c, 0x4f, 0x10c, 0x50, 0x10c, 0x51, 0x10c, 0x52,
- 0x10c, 0x53, 0x10c, 0x54, 0x10c, 0x55, 0x10c, 0x56,
- 0x10c, 0x57, 0x10c, 0x58, 0x10c, 0x59, 0x10c, 0x5a,
- 0x10c, 0x5b, 0x10c, 0x5c, 0x10c, 0x5d, 0x10c, 0x5e,
- 0x10c, 0x5f, 0x10c, 0x60, 0x10c, 0x61, 0x10c, 0x62,
- 0x10c, 0x63, 0x10c, 0x64, 0x10c, 0x65, 0x10c, 0x66,
- 0x10c, 0x67, 0x10c, 0x68, 0x10c, 0x69, 0x10c, 0x6a,
- 0x10c, 0x6b, 0x10c, 0x6c, 0x10c, 0x6d, 0x10c, 0x6e,
- 0x10c, 0x6f, 0x10c, 0x70, 0x10c, 0x71, 0x10c, 0x72,
- 0x10c, 0x73, 0x10c, 0x74, 0x10c, 0x75, 0x10c, 0x76,
- 0x10c, 0x77, 0x10c, 0x78, 0x10c, 0x79, 0x10c, 0x7a,
- 0x10c, 0x7b, 0x10c, 0x7c, 0x10c, 0x7d, 0x10c, 0x7e,
- 0x10c, 0x2985, 0x10c, 0x2986, 0x10d, 0x3002, 0x10d, 0x300c,
- 0x10d, 0x300d, 0x10d, 0x3001, 0x10d, 0x30fb, 0x10d, 0x30f2,
- 0x10d, 0x30a1, 0x10d, 0x30a3, 0x10d, 0x30a5, 0x10d, 0x30a7,
- 0x10d, 0x30a9, 0x10d, 0x30e3, 0x10d, 0x30e5, 0x10d, 0x30e7,
- 0x10d, 0x30c3, 0x10d, 0x30fc, 0x10d, 0x30a2, 0x10d, 0x30a4,
- 0x10d, 0x30a6, 0x10d, 0x30a8, 0x10d, 0x30aa, 0x10d, 0x30ab,
- 0x10d, 0x30ad, 0x10d, 0x30af, 0x10d, 0x30b1, 0x10d, 0x30b3,
- 0x10d, 0x30b5, 0x10d, 0x30b7, 0x10d, 0x30b9, 0x10d, 0x30bb,
- 0x10d, 0x30bd, 0x10d, 0x30bf, 0x10d, 0x30c1, 0x10d, 0x30c4,
- 0x10d, 0x30c6, 0x10d, 0x30c8, 0x10d, 0x30ca, 0x10d, 0x30cb,
- 0x10d, 0x30cc, 0x10d, 0x30cd, 0x10d, 0x30ce, 0x10d, 0x30cf,
- 0x10d, 0x30d2, 0x10d, 0x30d5, 0x10d, 0x30d8, 0x10d, 0x30db,
- 0x10d, 0x30de, 0x10d, 0x30df, 0x10d, 0x30e0, 0x10d, 0x30e1,
- 0x10d, 0x30e2, 0x10d, 0x30e4, 0x10d, 0x30e6, 0x10d, 0x30e8,
- 0x10d, 0x30e9, 0x10d, 0x30ea, 0x10d, 0x30eb, 0x10d, 0x30ec,
- 0x10d, 0x30ed, 0x10d, 0x30ef, 0x10d, 0x30f3, 0x10d, 0x3099,
- 0x10d, 0x309a, 0x10d, 0x3164, 0x10d, 0x3131, 0x10d, 0x3132,
- 0x10d, 0x3133, 0x10d, 0x3134, 0x10d, 0x3135, 0x10d, 0x3136,
- 0x10d, 0x3137, 0x10d, 0x3138, 0x10d, 0x3139, 0x10d, 0x313a,
- 0x10d, 0x313b, 0x10d, 0x313c, 0x10d, 0x313d, 0x10d, 0x313e,
- 0x10d, 0x313f, 0x10d, 0x3140, 0x10d, 0x3141, 0x10d, 0x3142,
- 0x10d, 0x3143, 0x10d, 0x3144, 0x10d, 0x3145, 0x10d, 0x3146,
- 0x10d, 0x3147, 0x10d, 0x3148, 0x10d, 0x3149, 0x10d, 0x314a,
- 0x10d, 0x314b, 0x10d, 0x314c, 0x10d, 0x314d, 0x10d, 0x314e,
- 0x10d, 0x314f, 0x10d, 0x3150, 0x10d, 0x3151, 0x10d, 0x3152,
- 0x10d, 0x3153, 0x10d, 0x3154, 0x10d, 0x3155, 0x10d, 0x3156,
- 0x10d, 0x3157, 0x10d, 0x3158, 0x10d, 0x3159, 0x10d, 0x315a,
- 0x10d, 0x315b, 0x10d, 0x315c, 0x10d, 0x315d, 0x10d, 0x315e,
- 0x10d, 0x315f, 0x10d, 0x3160, 0x10d, 0x3161, 0x10d, 0x3162,
- 0x10d, 0x3163, 0x10c, 0xa2, 0x10c, 0xa3, 0x10c, 0xac,
- 0x10c, 0xaf, 0x10c, 0xa6, 0x10c, 0xa5, 0x10c, 0x20a9,
- 0x10d, 0x2502, 0x10d, 0x2190, 0x10d, 0x2191, 0x10d, 0x2192,
- 0x10d, 0x2193, 0x10d, 0x25a0, 0x10d, 0x25cb, 0x401, 0xd804,
- 0xdc99, 0xd804, 0xdcba, 0x401, 0xd804, 0xdc9b, 0xd804, 0xdcba,
- 0x401, 0xd804, 0xdca5, 0xd804, 0xdcba, 0x401, 0xd804, 0xdd31,
- 0xd804, 0xdd27, 0x401, 0xd804, 0xdd32, 0xd804, 0xdd27, 0x401,
- 0xd804, 0xdf47, 0xd804, 0xdf3e, 0x401, 0xd804, 0xdf47, 0xd804,
- 0xdf57, 0x401, 0xd805, 0xdcb9, 0xd805, 0xdcba, 0x401, 0xd805,
- 0xdcb9, 0xd805, 0xdcb0, 0x401, 0xd805, 0xdcb9, 0xd805, 0xdcbd,
- 0x401, 0xd805, 0xddb8, 0xd805, 0xddaf, 0x401, 0xd805, 0xddb9,
- 0xd805, 0xddaf, 0x401, 0xd834, 0xdd57, 0xd834, 0xdd65, 0x401,
- 0xd834, 0xdd58, 0xd834, 0xdd65, 0x401, 0xd834, 0xdd5f, 0xd834,
- 0xdd6e, 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd6f, 0x401, 0xd834,
- 0xdd5f, 0xd834, 0xdd70, 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd71,
- 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd72, 0x401, 0xd834, 0xddb9,
- 0xd834, 0xdd65, 0x401, 0xd834, 0xddba, 0xd834, 0xdd65, 0x401,
- 0xd834, 0xddbb, 0xd834, 0xdd6e, 0x401, 0xd834, 0xddbc, 0xd834,
- 0xdd6e, 0x401, 0xd834, 0xddbb, 0xd834, 0xdd6f, 0x401, 0xd834,
- 0xddbc, 0xd834, 0xdd6f, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x69, 0x102,
- 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102, 0x6d, 0x102,
- 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102, 0x71, 0x102,
- 0x72, 0x102, 0x73, 0x102, 0x74, 0x102, 0x75, 0x102,
- 0x76, 0x102, 0x77, 0x102, 0x78, 0x102, 0x79, 0x102,
- 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102, 0x43, 0x102,
- 0x44, 0x102, 0x45, 0x102, 0x46, 0x102, 0x47, 0x102,
- 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102, 0x4b, 0x102,
- 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102, 0x4f, 0x102,
- 0x50, 0x102, 0x51, 0x102, 0x52, 0x102, 0x53, 0x102,
- 0x54, 0x102, 0x55, 0x102, 0x56, 0x102, 0x57, 0x102,
- 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102, 0x61, 0x102,
- 0x62, 0x102, 0x63, 0x102, 0x64, 0x102, 0x65, 0x102,
- 0x66, 0x102, 0x67, 0x102, 0x68, 0x102, 0x69, 0x102,
- 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102, 0x6d, 0x102,
- 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102, 0x71, 0x102,
- 0x72, 0x102, 0x73, 0x102, 0x74, 0x102, 0x75, 0x102,
- 0x76, 0x102, 0x77, 0x102, 0x78, 0x102, 0x79, 0x102,
- 0x7a, 0x102, 0x41, 0x102, 0x43, 0x102, 0x44, 0x102,
- 0x47, 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x53, 0x102,
- 0x54, 0x102, 0x55, 0x102, 0x56, 0x102, 0x57, 0x102,
- 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102, 0x61, 0x102,
- 0x62, 0x102, 0x63, 0x102, 0x64, 0x102, 0x66, 0x102,
- 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102,
- 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x44, 0x102, 0x45, 0x102, 0x46, 0x102, 0x47, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x61, 0x102,
- 0x62, 0x102, 0x63, 0x102, 0x64, 0x102, 0x65, 0x102,
- 0x66, 0x102, 0x67, 0x102, 0x68, 0x102, 0x69, 0x102,
- 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102, 0x6d, 0x102,
- 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102, 0x71, 0x102,
- 0x72, 0x102, 0x73, 0x102, 0x74, 0x102, 0x75, 0x102,
- 0x76, 0x102, 0x77, 0x102, 0x78, 0x102, 0x79, 0x102,
- 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102, 0x44, 0x102,
- 0x45, 0x102, 0x46, 0x102, 0x47, 0x102, 0x49, 0x102,
- 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102,
- 0x4f, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102,
- 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42, 0x102,
- 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102,
- 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a, 0x102,
- 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e, 0x102,
- 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52, 0x102,
- 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56, 0x102,
- 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a, 0x102,
- 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64, 0x102,
- 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68, 0x102,
- 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c, 0x102,
- 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70, 0x102,
- 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74, 0x102,
- 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78, 0x102,
- 0x79, 0x102, 0x7a, 0x102, 0x131, 0x102, 0x237, 0x102,
- 0x391, 0x102, 0x392, 0x102, 0x393, 0x102, 0x394, 0x102,
- 0x395, 0x102, 0x396, 0x102, 0x397, 0x102, 0x398, 0x102,
- 0x399, 0x102, 0x39a, 0x102, 0x39b, 0x102, 0x39c, 0x102,
- 0x39d, 0x102, 0x39e, 0x102, 0x39f, 0x102, 0x3a0, 0x102,
- 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3, 0x102, 0x3a4, 0x102,
- 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7, 0x102, 0x3a8, 0x102,
- 0x3a9, 0x102, 0x2207, 0x102, 0x3b1, 0x102, 0x3b2, 0x102,
- 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5, 0x102, 0x3b6, 0x102,
- 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9, 0x102, 0x3ba, 0x102,
- 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd, 0x102, 0x3be, 0x102,
- 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1, 0x102, 0x3c2, 0x102,
- 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5, 0x102, 0x3c6, 0x102,
- 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9, 0x102, 0x2202, 0x102,
- 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0, 0x102, 0x3d5, 0x102,
- 0x3f1, 0x102, 0x3d6, 0x102, 0x391, 0x102, 0x392, 0x102,
- 0x393, 0x102, 0x394, 0x102, 0x395, 0x102, 0x396, 0x102,
- 0x397, 0x102, 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102,
- 0x39b, 0x102, 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102,
- 0x39f, 0x102, 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102,
- 0x3a3, 0x102, 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102,
- 0x3a7, 0x102, 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102,
- 0x3b1, 0x102, 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102,
- 0x3b5, 0x102, 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102,
- 0x3b9, 0x102, 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102,
- 0x3bd, 0x102, 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102,
- 0x3c1, 0x102, 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102,
- 0x3c5, 0x102, 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102,
- 0x3c9, 0x102, 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102,
- 0x3f0, 0x102, 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102,
- 0x391, 0x102, 0x392, 0x102, 0x393, 0x102, 0x394, 0x102,
- 0x395, 0x102, 0x396, 0x102, 0x397, 0x102, 0x398, 0x102,
- 0x399, 0x102, 0x39a, 0x102, 0x39b, 0x102, 0x39c, 0x102,
- 0x39d, 0x102, 0x39e, 0x102, 0x39f, 0x102, 0x3a0, 0x102,
- 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3, 0x102, 0x3a4, 0x102,
- 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7, 0x102, 0x3a8, 0x102,
- 0x3a9, 0x102, 0x2207, 0x102, 0x3b1, 0x102, 0x3b2, 0x102,
- 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5, 0x102, 0x3b6, 0x102,
- 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9, 0x102, 0x3ba, 0x102,
- 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd, 0x102, 0x3be, 0x102,
- 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1, 0x102, 0x3c2, 0x102,
- 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5, 0x102, 0x3c6, 0x102,
- 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9, 0x102, 0x2202, 0x102,
- 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0, 0x102, 0x3d5, 0x102,
- 0x3f1, 0x102, 0x3d6, 0x102, 0x391, 0x102, 0x392, 0x102,
- 0x393, 0x102, 0x394, 0x102, 0x395, 0x102, 0x396, 0x102,
- 0x397, 0x102, 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102,
- 0x39b, 0x102, 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102,
- 0x39f, 0x102, 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102,
- 0x3a3, 0x102, 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102,
- 0x3a7, 0x102, 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102,
- 0x3b1, 0x102, 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102,
- 0x3b5, 0x102, 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102,
- 0x3b9, 0x102, 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102,
- 0x3bd, 0x102, 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102,
- 0x3c1, 0x102, 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102,
- 0x3c5, 0x102, 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102,
- 0x3c9, 0x102, 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102,
- 0x3f0, 0x102, 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102,
- 0x391, 0x102, 0x392, 0x102, 0x393, 0x102, 0x394, 0x102,
- 0x395, 0x102, 0x396, 0x102, 0x397, 0x102, 0x398, 0x102,
- 0x399, 0x102, 0x39a, 0x102, 0x39b, 0x102, 0x39c, 0x102,
- 0x39d, 0x102, 0x39e, 0x102, 0x39f, 0x102, 0x3a0, 0x102,
- 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3, 0x102, 0x3a4, 0x102,
- 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7, 0x102, 0x3a8, 0x102,
- 0x3a9, 0x102, 0x2207, 0x102, 0x3b1, 0x102, 0x3b2, 0x102,
- 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5, 0x102, 0x3b6, 0x102,
- 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9, 0x102, 0x3ba, 0x102,
- 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd, 0x102, 0x3be, 0x102,
- 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1, 0x102, 0x3c2, 0x102,
- 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5, 0x102, 0x3c6, 0x102,
- 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9, 0x102, 0x2202, 0x102,
- 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0, 0x102, 0x3d5, 0x102,
- 0x3f1, 0x102, 0x3d6, 0x102, 0x3dc, 0x102, 0x3dd, 0x102,
- 0x30, 0x102, 0x31, 0x102, 0x32, 0x102, 0x33, 0x102,
- 0x34, 0x102, 0x35, 0x102, 0x36, 0x102, 0x37, 0x102,
- 0x38, 0x102, 0x39, 0x102, 0x30, 0x102, 0x31, 0x102,
- 0x32, 0x102, 0x33, 0x102, 0x34, 0x102, 0x35, 0x102,
- 0x36, 0x102, 0x37, 0x102, 0x38, 0x102, 0x39, 0x102,
- 0x30, 0x102, 0x31, 0x102, 0x32, 0x102, 0x33, 0x102,
- 0x34, 0x102, 0x35, 0x102, 0x36, 0x102, 0x37, 0x102,
- 0x38, 0x102, 0x39, 0x102, 0x30, 0x102, 0x31, 0x102,
- 0x32, 0x102, 0x33, 0x102, 0x34, 0x102, 0x35, 0x102,
- 0x36, 0x102, 0x37, 0x102, 0x38, 0x102, 0x39, 0x102,
- 0x30, 0x102, 0x31, 0x102, 0x32, 0x102, 0x33, 0x102,
- 0x34, 0x102, 0x35, 0x102, 0x36, 0x102, 0x37, 0x102,
- 0x38, 0x102, 0x39, 0x102, 0x627, 0x102, 0x628, 0x102,
- 0x62c, 0x102, 0x62f, 0x102, 0x648, 0x102, 0x632, 0x102,
- 0x62d, 0x102, 0x637, 0x102, 0x64a, 0x102, 0x643, 0x102,
- 0x644, 0x102, 0x645, 0x102, 0x646, 0x102, 0x633, 0x102,
- 0x639, 0x102, 0x641, 0x102, 0x635, 0x102, 0x642, 0x102,
- 0x631, 0x102, 0x634, 0x102, 0x62a, 0x102, 0x62b, 0x102,
- 0x62e, 0x102, 0x630, 0x102, 0x636, 0x102, 0x638, 0x102,
- 0x63a, 0x102, 0x66e, 0x102, 0x6ba, 0x102, 0x6a1, 0x102,
- 0x66f, 0x102, 0x628, 0x102, 0x62c, 0x102, 0x647, 0x102,
- 0x62d, 0x102, 0x64a, 0x102, 0x643, 0x102, 0x644, 0x102,
- 0x645, 0x102, 0x646, 0x102, 0x633, 0x102, 0x639, 0x102,
- 0x641, 0x102, 0x635, 0x102, 0x642, 0x102, 0x634, 0x102,
- 0x62a, 0x102, 0x62b, 0x102, 0x62e, 0x102, 0x636, 0x102,
- 0x63a, 0x102, 0x62c, 0x102, 0x62d, 0x102, 0x64a, 0x102,
- 0x644, 0x102, 0x646, 0x102, 0x633, 0x102, 0x639, 0x102,
- 0x635, 0x102, 0x642, 0x102, 0x634, 0x102, 0x62e, 0x102,
- 0x636, 0x102, 0x63a, 0x102, 0x6ba, 0x102, 0x66f, 0x102,
- 0x628, 0x102, 0x62c, 0x102, 0x647, 0x102, 0x62d, 0x102,
- 0x637, 0x102, 0x64a, 0x102, 0x643, 0x102, 0x645, 0x102,
- 0x646, 0x102, 0x633, 0x102, 0x639, 0x102, 0x641, 0x102,
- 0x635, 0x102, 0x642, 0x102, 0x634, 0x102, 0x62a, 0x102,
- 0x62b, 0x102, 0x62e, 0x102, 0x636, 0x102, 0x638, 0x102,
- 0x63a, 0x102, 0x66e, 0x102, 0x6a1, 0x102, 0x627, 0x102,
- 0x628, 0x102, 0x62c, 0x102, 0x62f, 0x102, 0x647, 0x102,
- 0x648, 0x102, 0x632, 0x102, 0x62d, 0x102, 0x637, 0x102,
- 0x64a, 0x102, 0x644, 0x102, 0x645, 0x102, 0x646, 0x102,
- 0x633, 0x102, 0x639, 0x102, 0x641, 0x102, 0x635, 0x102,
- 0x642, 0x102, 0x631, 0x102, 0x634, 0x102, 0x62a, 0x102,
- 0x62b, 0x102, 0x62e, 0x102, 0x630, 0x102, 0x636, 0x102,
- 0x638, 0x102, 0x63a, 0x102, 0x628, 0x102, 0x62c, 0x102,
- 0x62f, 0x102, 0x648, 0x102, 0x632, 0x102, 0x62d, 0x102,
- 0x637, 0x102, 0x64a, 0x102, 0x644, 0x102, 0x645, 0x102,
- 0x646, 0x102, 0x633, 0x102, 0x639, 0x102, 0x641, 0x102,
- 0x635, 0x102, 0x642, 0x102, 0x631, 0x102, 0x634, 0x102,
- 0x62a, 0x102, 0x62b, 0x102, 0x62e, 0x102, 0x630, 0x102,
- 0x636, 0x102, 0x638, 0x102, 0x63a, 0x210, 0x30, 0x2e,
- 0x210, 0x30, 0x2c, 0x210, 0x31, 0x2c, 0x210, 0x32,
- 0x2c, 0x210, 0x33, 0x2c, 0x210, 0x34, 0x2c, 0x210,
- 0x35, 0x2c, 0x210, 0x36, 0x2c, 0x210, 0x37, 0x2c,
- 0x210, 0x38, 0x2c, 0x210, 0x39, 0x2c, 0x310, 0x28,
- 0x41, 0x29, 0x310, 0x28, 0x42, 0x29, 0x310, 0x28,
- 0x43, 0x29, 0x310, 0x28, 0x44, 0x29, 0x310, 0x28,
- 0x45, 0x29, 0x310, 0x28, 0x46, 0x29, 0x310, 0x28,
- 0x47, 0x29, 0x310, 0x28, 0x48, 0x29, 0x310, 0x28,
- 0x49, 0x29, 0x310, 0x28, 0x4a, 0x29, 0x310, 0x28,
- 0x4b, 0x29, 0x310, 0x28, 0x4c, 0x29, 0x310, 0x28,
- 0x4d, 0x29, 0x310, 0x28, 0x4e, 0x29, 0x310, 0x28,
- 0x4f, 0x29, 0x310, 0x28, 0x50, 0x29, 0x310, 0x28,
- 0x51, 0x29, 0x310, 0x28, 0x52, 0x29, 0x310, 0x28,
- 0x53, 0x29, 0x310, 0x28, 0x54, 0x29, 0x310, 0x28,
- 0x55, 0x29, 0x310, 0x28, 0x56, 0x29, 0x310, 0x28,
- 0x57, 0x29, 0x310, 0x28, 0x58, 0x29, 0x310, 0x28,
- 0x59, 0x29, 0x310, 0x28, 0x5a, 0x29, 0x310, 0x3014,
- 0x53, 0x3015, 0x108, 0x43, 0x108, 0x52, 0x208, 0x43,
- 0x44, 0x208, 0x57, 0x5a, 0x10f, 0x41, 0x10f, 0x42,
- 0x10f, 0x43, 0x10f, 0x44, 0x10f, 0x45, 0x10f, 0x46,
- 0x10f, 0x47, 0x10f, 0x48, 0x10f, 0x49, 0x10f, 0x4a,
- 0x10f, 0x4b, 0x10f, 0x4c, 0x10f, 0x4d, 0x10f, 0x4e,
- 0x10f, 0x4f, 0x10f, 0x50, 0x10f, 0x51, 0x10f, 0x52,
- 0x10f, 0x53, 0x10f, 0x54, 0x10f, 0x55, 0x10f, 0x56,
- 0x10f, 0x57, 0x10f, 0x58, 0x10f, 0x59, 0x10f, 0x5a,
- 0x20f, 0x48, 0x56, 0x20f, 0x4d, 0x56, 0x20f, 0x53,
- 0x44, 0x20f, 0x53, 0x53, 0x30f, 0x50, 0x50, 0x56,
- 0x20f, 0x57, 0x43, 0x209, 0x4d, 0x43, 0x209, 0x4d,
- 0x44, 0x20f, 0x44, 0x4a, 0x20f, 0x307b, 0x304b, 0x20f,
- 0x30b3, 0x30b3, 0x10f, 0x30b5, 0x10f, 0x624b, 0x10f, 0x5b57,
- 0x10f, 0x53cc, 0x10f, 0x30c7, 0x10f, 0x4e8c, 0x10f, 0x591a,
- 0x10f, 0x89e3, 0x10f, 0x5929, 0x10f, 0x4ea4, 0x10f, 0x6620,
- 0x10f, 0x7121, 0x10f, 0x6599, 0x10f, 0x524d, 0x10f, 0x5f8c,
- 0x10f, 0x518d, 0x10f, 0x65b0, 0x10f, 0x521d, 0x10f, 0x7d42,
- 0x10f, 0x751f, 0x10f, 0x8ca9, 0x10f, 0x58f0, 0x10f, 0x5439,
- 0x10f, 0x6f14, 0x10f, 0x6295, 0x10f, 0x6355, 0x10f, 0x4e00,
- 0x10f, 0x4e09, 0x10f, 0x904a, 0x10f, 0x5de6, 0x10f, 0x4e2d,
- 0x10f, 0x53f3, 0x10f, 0x6307, 0x10f, 0x8d70, 0x10f, 0x6253,
- 0x10f, 0x7981, 0x10f, 0x7a7a, 0x10f, 0x5408, 0x10f, 0x6e80,
- 0x10f, 0x6709, 0x10f, 0x6708, 0x10f, 0x7533, 0x10f, 0x5272,
- 0x10f, 0x55b6, 0x10f, 0x914d, 0x310, 0x3014, 0x672c, 0x3015,
- 0x310, 0x3014, 0x4e09, 0x3015, 0x310, 0x3014, 0x4e8c, 0x3015,
- 0x310, 0x3014, 0x5b89, 0x3015, 0x310, 0x3014, 0x70b9, 0x3015,
- 0x310, 0x3014, 0x6253, 0x3015, 0x310, 0x3014, 0x76d7, 0x3015,
- 0x310, 0x3014, 0x52dd, 0x3015, 0x310, 0x3014, 0x6557, 0x3015,
- 0x108, 0x5f97, 0x108, 0x53ef, 0x101, 0x4e3d, 0x101, 0x4e38,
- 0x101, 0x4e41, 0x201, 0xd840, 0xdd22, 0x101, 0x4f60, 0x101,
- 0x4fae, 0x101, 0x4fbb, 0x101, 0x5002, 0x101, 0x507a, 0x101,
- 0x5099, 0x101, 0x50e7, 0x101, 0x50cf, 0x101, 0x349e, 0x201,
- 0xd841, 0xde3a, 0x101, 0x514d, 0x101, 0x5154, 0x101, 0x5164,
- 0x101, 0x5177, 0x201, 0xd841, 0xdd1c, 0x101, 0x34b9, 0x101,
- 0x5167, 0x101, 0x518d, 0x201, 0xd841, 0xdd4b, 0x101, 0x5197,
- 0x101, 0x51a4, 0x101, 0x4ecc, 0x101, 0x51ac, 0x101, 0x51b5,
- 0x201, 0xd864, 0xdddf, 0x101, 0x51f5, 0x101, 0x5203, 0x101,
- 0x34df, 0x101, 0x523b, 0x101, 0x5246, 0x101, 0x5272, 0x101,
- 0x5277, 0x101, 0x3515, 0x101, 0x52c7, 0x101, 0x52c9, 0x101,
- 0x52e4, 0x101, 0x52fa, 0x101, 0x5305, 0x101, 0x5306, 0x101,
- 0x5317, 0x101, 0x5349, 0x101, 0x5351, 0x101, 0x535a, 0x101,
- 0x5373, 0x101, 0x537d, 0x101, 0x537f, 0x101, 0x537f, 0x101,
- 0x537f, 0x201, 0xd842, 0xde2c, 0x101, 0x7070, 0x101, 0x53ca,
- 0x101, 0x53df, 0x201, 0xd842, 0xdf63, 0x101, 0x53eb, 0x101,
- 0x53f1, 0x101, 0x5406, 0x101, 0x549e, 0x101, 0x5438, 0x101,
- 0x5448, 0x101, 0x5468, 0x101, 0x54a2, 0x101, 0x54f6, 0x101,
- 0x5510, 0x101, 0x5553, 0x101, 0x5563, 0x101, 0x5584, 0x101,
- 0x5584, 0x101, 0x5599, 0x101, 0x55ab, 0x101, 0x55b3, 0x101,
- 0x55c2, 0x101, 0x5716, 0x101, 0x5606, 0x101, 0x5717, 0x101,
- 0x5651, 0x101, 0x5674, 0x101, 0x5207, 0x101, 0x58ee, 0x101,
- 0x57ce, 0x101, 0x57f4, 0x101, 0x580d, 0x101, 0x578b, 0x101,
- 0x5832, 0x101, 0x5831, 0x101, 0x58ac, 0x201, 0xd845, 0xdce4,
- 0x101, 0x58f2, 0x101, 0x58f7, 0x101, 0x5906, 0x101, 0x591a,
- 0x101, 0x5922, 0x101, 0x5962, 0x201, 0xd845, 0xdea8, 0x201,
- 0xd845, 0xdeea, 0x101, 0x59ec, 0x101, 0x5a1b, 0x101, 0x5a27,
- 0x101, 0x59d8, 0x101, 0x5a66, 0x101, 0x36ee, 0x101, 0x36fc,
- 0x101, 0x5b08, 0x101, 0x5b3e, 0x101, 0x5b3e, 0x201, 0xd846,
- 0xddc8, 0x101, 0x5bc3, 0x101, 0x5bd8, 0x101, 0x5be7, 0x101,
- 0x5bf3, 0x201, 0xd846, 0xdf18, 0x101, 0x5bff, 0x101, 0x5c06,
- 0x101, 0x5f53, 0x101, 0x5c22, 0x101, 0x3781, 0x101, 0x5c60,
- 0x101, 0x5c6e, 0x101, 0x5cc0, 0x101, 0x5c8d, 0x201, 0xd847,
- 0xdde4, 0x101, 0x5d43, 0x201, 0xd847, 0xdde6, 0x101, 0x5d6e,
- 0x101, 0x5d6b, 0x101, 0x5d7c, 0x101, 0x5de1, 0x101, 0x5de2,
- 0x101, 0x382f, 0x101, 0x5dfd, 0x101, 0x5e28, 0x101, 0x5e3d,
- 0x101, 0x5e69, 0x101, 0x3862, 0x201, 0xd848, 0xdd83, 0x101,
- 0x387c, 0x101, 0x5eb0, 0x101, 0x5eb3, 0x101, 0x5eb6, 0x101,
- 0x5eca, 0x201, 0xd868, 0xdf92, 0x101, 0x5efe, 0x201, 0xd848,
- 0xdf31, 0x201, 0xd848, 0xdf31, 0x101, 0x8201, 0x101, 0x5f22,
- 0x101, 0x5f22, 0x101, 0x38c7, 0x201, 0xd84c, 0xdeb8, 0x201,
- 0xd858, 0xddda, 0x101, 0x5f62, 0x101, 0x5f6b, 0x101, 0x38e3,
- 0x101, 0x5f9a, 0x101, 0x5fcd, 0x101, 0x5fd7, 0x101, 0x5ff9,
- 0x101, 0x6081, 0x101, 0x393a, 0x101, 0x391c, 0x101, 0x6094,
- 0x201, 0xd849, 0xded4, 0x101, 0x60c7, 0x101, 0x6148, 0x101,
- 0x614c, 0x101, 0x614e, 0x101, 0x614c, 0x101, 0x617a, 0x101,
- 0x618e, 0x101, 0x61b2, 0x101, 0x61a4, 0x101, 0x61af, 0x101,
- 0x61de, 0x101, 0x61f2, 0x101, 0x61f6, 0x101, 0x6210, 0x101,
- 0x621b, 0x101, 0x625d, 0x101, 0x62b1, 0x101, 0x62d4, 0x101,
- 0x6350, 0x201, 0xd84a, 0xdf0c, 0x101, 0x633d, 0x101, 0x62fc,
- 0x101, 0x6368, 0x101, 0x6383, 0x101, 0x63e4, 0x201, 0xd84a,
- 0xdff1, 0x101, 0x6422, 0x101, 0x63c5, 0x101, 0x63a9, 0x101,
- 0x3a2e, 0x101, 0x6469, 0x101, 0x647e, 0x101, 0x649d, 0x101,
- 0x6477, 0x101, 0x3a6c, 0x101, 0x654f, 0x101, 0x656c, 0x201,
- 0xd84c, 0xdc0a, 0x101, 0x65e3, 0x101, 0x66f8, 0x101, 0x6649,
- 0x101, 0x3b19, 0x101, 0x6691, 0x101, 0x3b08, 0x101, 0x3ae4,
- 0x101, 0x5192, 0x101, 0x5195, 0x101, 0x6700, 0x101, 0x669c,
- 0x101, 0x80ad, 0x101, 0x43d9, 0x101, 0x6717, 0x101, 0x671b,
- 0x101, 0x6721, 0x101, 0x675e, 0x101, 0x6753, 0x201, 0xd84c,
- 0xdfc3, 0x101, 0x3b49, 0x101, 0x67fa, 0x101, 0x6785, 0x101,
- 0x6852, 0x101, 0x6885, 0x201, 0xd84d, 0xdc6d, 0x101, 0x688e,
- 0x101, 0x681f, 0x101, 0x6914, 0x101, 0x3b9d, 0x101, 0x6942,
- 0x101, 0x69a3, 0x101, 0x69ea, 0x101, 0x6aa8, 0x201, 0xd84d,
- 0xdea3, 0x101, 0x6adb, 0x101, 0x3c18, 0x101, 0x6b21, 0x201,
- 0xd84e, 0xdca7, 0x101, 0x6b54, 0x101, 0x3c4e, 0x101, 0x6b72,
- 0x101, 0x6b9f, 0x101, 0x6bba, 0x101, 0x6bbb, 0x201, 0xd84e,
- 0xde8d, 0x201, 0xd847, 0xdd0b, 0x201, 0xd84e, 0xdefa, 0x101,
- 0x6c4e, 0x201, 0xd84f, 0xdcbc, 0x101, 0x6cbf, 0x101, 0x6ccd,
- 0x101, 0x6c67, 0x101, 0x6d16, 0x101, 0x6d3e, 0x101, 0x6d77,
- 0x101, 0x6d41, 0x101, 0x6d69, 0x101, 0x6d78, 0x101, 0x6d85,
- 0x201, 0xd84f, 0xdd1e, 0x101, 0x6d34, 0x101, 0x6e2f, 0x101,
- 0x6e6e, 0x101, 0x3d33, 0x101, 0x6ecb, 0x101, 0x6ec7, 0x201,
- 0xd84f, 0xded1, 0x101, 0x6df9, 0x101, 0x6f6e, 0x201, 0xd84f,
- 0xdf5e, 0x201, 0xd84f, 0xdf8e, 0x101, 0x6fc6, 0x101, 0x7039,
- 0x101, 0x701e, 0x101, 0x701b, 0x101, 0x3d96, 0x101, 0x704a,
- 0x101, 0x707d, 0x101, 0x7077, 0x101, 0x70ad, 0x201, 0xd841,
- 0xdd25, 0x101, 0x7145, 0x201, 0xd850, 0xde63, 0x101, 0x719c,
- 0x201, 0xd850, 0xdfab, 0x101, 0x7228, 0x101, 0x7235, 0x101,
- 0x7250, 0x201, 0xd851, 0xde08, 0x101, 0x7280, 0x101, 0x7295,
- 0x201, 0xd851, 0xdf35, 0x201, 0xd852, 0xdc14, 0x101, 0x737a,
- 0x101, 0x738b, 0x101, 0x3eac, 0x101, 0x73a5, 0x101, 0x3eb8,
- 0x101, 0x3eb8, 0x101, 0x7447, 0x101, 0x745c, 0x101, 0x7471,
- 0x101, 0x7485, 0x101, 0x74ca, 0x101, 0x3f1b, 0x101, 0x7524,
- 0x201, 0xd853, 0xdc36, 0x101, 0x753e, 0x201, 0xd853, 0xdc92,
- 0x101, 0x7570, 0x201, 0xd848, 0xdd9f, 0x101, 0x7610, 0x201,
- 0xd853, 0xdfa1, 0x201, 0xd853, 0xdfb8, 0x201, 0xd854, 0xdc44,
- 0x101, 0x3ffc, 0x101, 0x4008, 0x101, 0x76f4, 0x201, 0xd854,
- 0xdcf3, 0x201, 0xd854, 0xdcf2, 0x201, 0xd854, 0xdd19, 0x201,
- 0xd854, 0xdd33, 0x101, 0x771e, 0x101, 0x771f, 0x101, 0x771f,
- 0x101, 0x774a, 0x101, 0x4039, 0x101, 0x778b, 0x101, 0x4046,
- 0x101, 0x4096, 0x201, 0xd855, 0xdc1d, 0x101, 0x784e, 0x101,
- 0x788c, 0x101, 0x78cc, 0x101, 0x40e3, 0x201, 0xd855, 0xde26,
- 0x101, 0x7956, 0x201, 0xd855, 0xde9a, 0x201, 0xd855, 0xdec5,
- 0x101, 0x798f, 0x101, 0x79eb, 0x101, 0x412f, 0x101, 0x7a40,
- 0x101, 0x7a4a, 0x101, 0x7a4f, 0x201, 0xd856, 0xdd7c, 0x201,
- 0xd856, 0xdea7, 0x201, 0xd856, 0xdea7, 0x101, 0x7aee, 0x101,
- 0x4202, 0x201, 0xd856, 0xdfab, 0x101, 0x7bc6, 0x101, 0x7bc9,
- 0x101, 0x4227, 0x201, 0xd857, 0xdc80, 0x101, 0x7cd2, 0x101,
- 0x42a0, 0x101, 0x7ce8, 0x101, 0x7ce3, 0x101, 0x7d00, 0x201,
- 0xd857, 0xdf86, 0x101, 0x7d63, 0x101, 0x4301, 0x101, 0x7dc7,
- 0x101, 0x7e02, 0x101, 0x7e45, 0x101, 0x4334, 0x201, 0xd858,
- 0xde28, 0x201, 0xd858, 0xde47, 0x101, 0x4359, 0x201, 0xd858,
- 0xded9, 0x101, 0x7f7a, 0x201, 0xd858, 0xdf3e, 0x101, 0x7f95,
- 0x101, 0x7ffa, 0x101, 0x8005, 0x201, 0xd859, 0xdcda, 0x201,
- 0xd859, 0xdd23, 0x101, 0x8060, 0x201, 0xd859, 0xdda8, 0x101,
- 0x8070, 0x201, 0xd84c, 0xdf5f, 0x101, 0x43d5, 0x101, 0x80b2,
- 0x101, 0x8103, 0x101, 0x440b, 0x101, 0x813e, 0x101, 0x5ab5,
- 0x201, 0xd859, 0xdfa7, 0x201, 0xd859, 0xdfb5, 0x201, 0xd84c,
- 0xdf93, 0x201, 0xd84c, 0xdf9c, 0x101, 0x8201, 0x101, 0x8204,
- 0x101, 0x8f9e, 0x101, 0x446b, 0x101, 0x8291, 0x101, 0x828b,
- 0x101, 0x829d, 0x101, 0x52b3, 0x101, 0x82b1, 0x101, 0x82b3,
- 0x101, 0x82bd, 0x101, 0x82e6, 0x201, 0xd85a, 0xdf3c, 0x101,
- 0x82e5, 0x101, 0x831d, 0x101, 0x8363, 0x101, 0x83ad, 0x101,
- 0x8323, 0x101, 0x83bd, 0x101, 0x83e7, 0x101, 0x8457, 0x101,
- 0x8353, 0x101, 0x83ca, 0x101, 0x83cc, 0x101, 0x83dc, 0x201,
- 0xd85b, 0xdc36, 0x201, 0xd85b, 0xdd6b, 0x201, 0xd85b, 0xdcd5,
- 0x101, 0x452b, 0x101, 0x84f1, 0x101, 0x84f3, 0x101, 0x8516,
- 0x201, 0xd85c, 0xdfca, 0x101, 0x8564, 0x201, 0xd85b, 0xdf2c,
- 0x101, 0x455d, 0x101, 0x4561, 0x201, 0xd85b, 0xdfb1, 0x201,
- 0xd85c, 0xdcd2, 0x101, 0x456b, 0x101, 0x8650, 0x101, 0x865c,
- 0x101, 0x8667, 0x101, 0x8669, 0x101, 0x86a9, 0x101, 0x8688,
- 0x101, 0x870e, 0x101, 0x86e2, 0x101, 0x8779, 0x101, 0x8728,
- 0x101, 0x876b, 0x101, 0x8786, 0x101, 0x45d7, 0x101, 0x87e1,
- 0x101, 0x8801, 0x101, 0x45f9, 0x101, 0x8860, 0x101, 0x8863,
- 0x201, 0xd85d, 0xde67, 0x101, 0x88d7, 0x101, 0x88de, 0x101,
- 0x4635, 0x101, 0x88fa, 0x101, 0x34bb, 0x201, 0xd85e, 0xdcae,
- 0x201, 0xd85e, 0xdd66, 0x101, 0x46be, 0x101, 0x46c7, 0x101,
- 0x8aa0, 0x101, 0x8aed, 0x101, 0x8b8a, 0x101, 0x8c55, 0x201,
- 0xd85f, 0xdca8, 0x101, 0x8cab, 0x101, 0x8cc1, 0x101, 0x8d1b,
- 0x101, 0x8d77, 0x201, 0xd85f, 0xdf2f, 0x201, 0xd842, 0xdc04,
- 0x101, 0x8dcb, 0x101, 0x8dbc, 0x101, 0x8df0, 0x201, 0xd842,
- 0xdcde, 0x101, 0x8ed4, 0x101, 0x8f38, 0x201, 0xd861, 0xddd2,
- 0x201, 0xd861, 0xdded, 0x101, 0x9094, 0x101, 0x90f1, 0x101,
- 0x9111, 0x201, 0xd861, 0xdf2e, 0x101, 0x911b, 0x101, 0x9238,
- 0x101, 0x92d7, 0x101, 0x92d8, 0x101, 0x927c, 0x101, 0x93f9,
- 0x101, 0x9415, 0x201, 0xd862, 0xdffa, 0x101, 0x958b, 0x101,
- 0x4995, 0x101, 0x95b7, 0x201, 0xd863, 0xdd77, 0x101, 0x49e6,
- 0x101, 0x96c3, 0x101, 0x5db2, 0x101, 0x9723, 0x201, 0xd864,
- 0xdd45, 0x201, 0xd864, 0xde1a, 0x101, 0x4a6e, 0x101, 0x4a76,
- 0x101, 0x97e0, 0x201, 0xd865, 0xdc0a, 0x101, 0x4ab2, 0x201,
- 0xd865, 0xdc96, 0x101, 0x980b, 0x101, 0x980b, 0x101, 0x9829,
- 0x201, 0xd865, 0xddb6, 0x101, 0x98e2, 0x101, 0x4b33, 0x101,
- 0x9929, 0x101, 0x99a7, 0x101, 0x99c2, 0x101, 0x99fe, 0x101,
- 0x4bce, 0x201, 0xd866, 0xdf30, 0x101, 0x9b12, 0x101, 0x9c40,
- 0x101, 0x9cfd, 0x101, 0x4cce, 0x101, 0x4ced, 0x101, 0x9d67,
- 0x201, 0xd868, 0xdcce, 0x101, 0x4cf8, 0x201, 0xd868, 0xdd05,
- 0x201, 0xd868, 0xde0e, 0x201, 0xd868, 0xde91, 0x101, 0x9ebb,
- 0x101, 0x4d56, 0x101, 0x9ef9, 0x101, 0x9efe, 0x101, 0x9f05,
- 0x101, 0x9f0f, 0x101, 0x9f16, 0x101, 0x9f3b, 0x201, 0xd869,
- 0xde00
+ 0x30f1, 0x108, 0x30f2, 0x20f, 0x4ee4, 0x548c, 0x40f, 0x30a2,
+ 0x30d1, 0x30fc, 0x30c8, 0x40f, 0x30a2, 0x30eb, 0x30d5, 0x30a1,
+ 0x40f, 0x30a2, 0x30f3, 0x30da, 0x30a2, 0x30f, 0x30a2, 0x30fc,
+ 0x30eb, 0x40f, 0x30a4, 0x30cb, 0x30f3, 0x30b0, 0x30f, 0x30a4,
+ 0x30f3, 0x30c1, 0x30f, 0x30a6, 0x30a9, 0x30f3, 0x50f, 0x30a8,
+ 0x30b9, 0x30af, 0x30fc, 0x30c9, 0x40f, 0x30a8, 0x30fc, 0x30ab,
+ 0x30fc, 0x30f, 0x30aa, 0x30f3, 0x30b9, 0x30f, 0x30aa, 0x30fc,
+ 0x30e0, 0x30f, 0x30ab, 0x30a4, 0x30ea, 0x40f, 0x30ab, 0x30e9,
+ 0x30c3, 0x30c8, 0x40f, 0x30ab, 0x30ed, 0x30ea, 0x30fc, 0x30f,
+ 0x30ac, 0x30ed, 0x30f3, 0x30f, 0x30ac, 0x30f3, 0x30de, 0x20f,
+ 0x30ae, 0x30ac, 0x30f, 0x30ae, 0x30cb, 0x30fc, 0x40f, 0x30ad,
+ 0x30e5, 0x30ea, 0x30fc, 0x40f, 0x30ae, 0x30eb, 0x30c0, 0x30fc,
+ 0x20f, 0x30ad, 0x30ed, 0x50f, 0x30ad, 0x30ed, 0x30b0, 0x30e9,
+ 0x30e0, 0x60f, 0x30ad, 0x30ed, 0x30e1, 0x30fc, 0x30c8, 0x30eb,
+ 0x50f, 0x30ad, 0x30ed, 0x30ef, 0x30c3, 0x30c8, 0x30f, 0x30b0,
+ 0x30e9, 0x30e0, 0x50f, 0x30b0, 0x30e9, 0x30e0, 0x30c8, 0x30f3,
+ 0x50f, 0x30af, 0x30eb, 0x30bc, 0x30a4, 0x30ed, 0x40f, 0x30af,
+ 0x30ed, 0x30fc, 0x30cd, 0x30f, 0x30b1, 0x30fc, 0x30b9, 0x30f,
+ 0x30b3, 0x30eb, 0x30ca, 0x30f, 0x30b3, 0x30fc, 0x30dd, 0x40f,
+ 0x30b5, 0x30a4, 0x30af, 0x30eb, 0x50f, 0x30b5, 0x30f3, 0x30c1,
+ 0x30fc, 0x30e0, 0x40f, 0x30b7, 0x30ea, 0x30f3, 0x30b0, 0x30f,
+ 0x30bb, 0x30f3, 0x30c1, 0x30f, 0x30bb, 0x30f3, 0x30c8, 0x30f,
+ 0x30c0, 0x30fc, 0x30b9, 0x20f, 0x30c7, 0x30b7, 0x20f, 0x30c9,
+ 0x30eb, 0x20f, 0x30c8, 0x30f3, 0x20f, 0x30ca, 0x30ce, 0x30f,
+ 0x30ce, 0x30c3, 0x30c8, 0x30f, 0x30cf, 0x30a4, 0x30c4, 0x50f,
+ 0x30d1, 0x30fc, 0x30bb, 0x30f3, 0x30c8, 0x30f, 0x30d1, 0x30fc,
+ 0x30c4, 0x40f, 0x30d0, 0x30fc, 0x30ec, 0x30eb, 0x50f, 0x30d4,
+ 0x30a2, 0x30b9, 0x30c8, 0x30eb, 0x30f, 0x30d4, 0x30af, 0x30eb,
+ 0x20f, 0x30d4, 0x30b3, 0x20f, 0x30d3, 0x30eb, 0x50f, 0x30d5,
+ 0x30a1, 0x30e9, 0x30c3, 0x30c9, 0x40f, 0x30d5, 0x30a3, 0x30fc,
+ 0x30c8, 0x50f, 0x30d6, 0x30c3, 0x30b7, 0x30a7, 0x30eb, 0x30f,
+ 0x30d5, 0x30e9, 0x30f3, 0x50f, 0x30d8, 0x30af, 0x30bf, 0x30fc,
+ 0x30eb, 0x20f, 0x30da, 0x30bd, 0x30f, 0x30da, 0x30cb, 0x30d2,
+ 0x30f, 0x30d8, 0x30eb, 0x30c4, 0x30f, 0x30da, 0x30f3, 0x30b9,
+ 0x30f, 0x30da, 0x30fc, 0x30b8, 0x30f, 0x30d9, 0x30fc, 0x30bf,
+ 0x40f, 0x30dd, 0x30a4, 0x30f3, 0x30c8, 0x30f, 0x30dc, 0x30eb,
+ 0x30c8, 0x20f, 0x30db, 0x30f3, 0x30f, 0x30dd, 0x30f3, 0x30c9,
+ 0x30f, 0x30db, 0x30fc, 0x30eb, 0x30f, 0x30db, 0x30fc, 0x30f3,
+ 0x40f, 0x30de, 0x30a4, 0x30af, 0x30ed, 0x30f, 0x30de, 0x30a4,
+ 0x30eb, 0x30f, 0x30de, 0x30c3, 0x30cf, 0x30f, 0x30de, 0x30eb,
+ 0x30af, 0x50f, 0x30de, 0x30f3, 0x30b7, 0x30e7, 0x30f3, 0x40f,
+ 0x30df, 0x30af, 0x30ed, 0x30f3, 0x20f, 0x30df, 0x30ea, 0x50f,
+ 0x30df, 0x30ea, 0x30d0, 0x30fc, 0x30eb, 0x20f, 0x30e1, 0x30ac,
+ 0x40f, 0x30e1, 0x30ac, 0x30c8, 0x30f3, 0x40f, 0x30e1, 0x30fc,
+ 0x30c8, 0x30eb, 0x30f, 0x30e4, 0x30fc, 0x30c9, 0x30f, 0x30e4,
+ 0x30fc, 0x30eb, 0x30f, 0x30e6, 0x30a2, 0x30f3, 0x40f, 0x30ea,
+ 0x30c3, 0x30c8, 0x30eb, 0x20f, 0x30ea, 0x30e9, 0x30f, 0x30eb,
+ 0x30d4, 0x30fc, 0x40f, 0x30eb, 0x30fc, 0x30d6, 0x30eb, 0x20f,
+ 0x30ec, 0x30e0, 0x50f, 0x30ec, 0x30f3, 0x30c8, 0x30b2, 0x30f3,
+ 0x30f, 0x30ef, 0x30c3, 0x30c8, 0x210, 0x30, 0x70b9, 0x210,
+ 0x31, 0x70b9, 0x210, 0x32, 0x70b9, 0x210, 0x33, 0x70b9,
+ 0x210, 0x34, 0x70b9, 0x210, 0x35, 0x70b9, 0x210, 0x36,
+ 0x70b9, 0x210, 0x37, 0x70b9, 0x210, 0x38, 0x70b9, 0x210,
+ 0x39, 0x70b9, 0x310, 0x31, 0x30, 0x70b9, 0x310, 0x31,
+ 0x31, 0x70b9, 0x310, 0x31, 0x32, 0x70b9, 0x310, 0x31,
+ 0x33, 0x70b9, 0x310, 0x31, 0x34, 0x70b9, 0x310, 0x31,
+ 0x35, 0x70b9, 0x310, 0x31, 0x36, 0x70b9, 0x310, 0x31,
+ 0x37, 0x70b9, 0x310, 0x31, 0x38, 0x70b9, 0x310, 0x31,
+ 0x39, 0x70b9, 0x310, 0x32, 0x30, 0x70b9, 0x310, 0x32,
+ 0x31, 0x70b9, 0x310, 0x32, 0x32, 0x70b9, 0x310, 0x32,
+ 0x33, 0x70b9, 0x310, 0x32, 0x34, 0x70b9, 0x30f, 0x68,
+ 0x50, 0x61, 0x20f, 0x64, 0x61, 0x20f, 0x41, 0x55,
+ 0x30f, 0x62, 0x61, 0x72, 0x20f, 0x6f, 0x56, 0x20f,
+ 0x70, 0x63, 0x20f, 0x64, 0x6d, 0x30f, 0x64, 0x6d,
+ 0xb2, 0x30f, 0x64, 0x6d, 0xb3, 0x20f, 0x49, 0x55,
+ 0x20f, 0x5e73, 0x6210, 0x20f, 0x662d, 0x548c, 0x20f, 0x5927,
+ 0x6b63, 0x20f, 0x660e, 0x6cbb, 0x40f, 0x682a, 0x5f0f, 0x4f1a,
+ 0x793e, 0x20f, 0x70, 0x41, 0x20f, 0x6e, 0x41, 0x20f,
+ 0x3bc, 0x41, 0x20f, 0x6d, 0x41, 0x20f, 0x6b, 0x41,
+ 0x20f, 0x4b, 0x42, 0x20f, 0x4d, 0x42, 0x20f, 0x47,
+ 0x42, 0x30f, 0x63, 0x61, 0x6c, 0x40f, 0x6b, 0x63,
+ 0x61, 0x6c, 0x20f, 0x70, 0x46, 0x20f, 0x6e, 0x46,
+ 0x20f, 0x3bc, 0x46, 0x20f, 0x3bc, 0x67, 0x20f, 0x6d,
+ 0x67, 0x20f, 0x6b, 0x67, 0x20f, 0x48, 0x7a, 0x30f,
+ 0x6b, 0x48, 0x7a, 0x30f, 0x4d, 0x48, 0x7a, 0x30f,
+ 0x47, 0x48, 0x7a, 0x30f, 0x54, 0x48, 0x7a, 0x20f,
+ 0x3bc, 0x2113, 0x20f, 0x6d, 0x2113, 0x20f, 0x64, 0x2113,
+ 0x20f, 0x6b, 0x2113, 0x20f, 0x66, 0x6d, 0x20f, 0x6e,
+ 0x6d, 0x20f, 0x3bc, 0x6d, 0x20f, 0x6d, 0x6d, 0x20f,
+ 0x63, 0x6d, 0x20f, 0x6b, 0x6d, 0x30f, 0x6d, 0x6d,
+ 0xb2, 0x30f, 0x63, 0x6d, 0xb2, 0x20f, 0x6d, 0xb2,
+ 0x30f, 0x6b, 0x6d, 0xb2, 0x30f, 0x6d, 0x6d, 0xb3,
+ 0x30f, 0x63, 0x6d, 0xb3, 0x20f, 0x6d, 0xb3, 0x30f,
+ 0x6b, 0x6d, 0xb3, 0x30f, 0x6d, 0x2215, 0x73, 0x40f,
+ 0x6d, 0x2215, 0x73, 0xb2, 0x20f, 0x50, 0x61, 0x30f,
+ 0x6b, 0x50, 0x61, 0x30f, 0x4d, 0x50, 0x61, 0x30f,
+ 0x47, 0x50, 0x61, 0x30f, 0x72, 0x61, 0x64, 0x50f,
+ 0x72, 0x61, 0x64, 0x2215, 0x73, 0x60f, 0x72, 0x61,
+ 0x64, 0x2215, 0x73, 0xb2, 0x20f, 0x70, 0x73, 0x20f,
+ 0x6e, 0x73, 0x20f, 0x3bc, 0x73, 0x20f, 0x6d, 0x73,
+ 0x20f, 0x70, 0x56, 0x20f, 0x6e, 0x56, 0x20f, 0x3bc,
+ 0x56, 0x20f, 0x6d, 0x56, 0x20f, 0x6b, 0x56, 0x20f,
+ 0x4d, 0x56, 0x20f, 0x70, 0x57, 0x20f, 0x6e, 0x57,
+ 0x20f, 0x3bc, 0x57, 0x20f, 0x6d, 0x57, 0x20f, 0x6b,
+ 0x57, 0x20f, 0x4d, 0x57, 0x20f, 0x6b, 0x3a9, 0x20f,
+ 0x4d, 0x3a9, 0x40f, 0x61, 0x2e, 0x6d, 0x2e, 0x20f,
+ 0x42, 0x71, 0x20f, 0x63, 0x63, 0x20f, 0x63, 0x64,
+ 0x40f, 0x43, 0x2215, 0x6b, 0x67, 0x30f, 0x43, 0x6f,
+ 0x2e, 0x20f, 0x64, 0x42, 0x20f, 0x47, 0x79, 0x20f,
+ 0x68, 0x61, 0x20f, 0x48, 0x50, 0x20f, 0x69, 0x6e,
+ 0x20f, 0x4b, 0x4b, 0x20f, 0x4b, 0x4d, 0x20f, 0x6b,
+ 0x74, 0x20f, 0x6c, 0x6d, 0x20f, 0x6c, 0x6e, 0x30f,
+ 0x6c, 0x6f, 0x67, 0x20f, 0x6c, 0x78, 0x20f, 0x6d,
+ 0x62, 0x30f, 0x6d, 0x69, 0x6c, 0x30f, 0x6d, 0x6f,
+ 0x6c, 0x20f, 0x50, 0x48, 0x40f, 0x70, 0x2e, 0x6d,
+ 0x2e, 0x30f, 0x50, 0x50, 0x4d, 0x20f, 0x50, 0x52,
+ 0x20f, 0x73, 0x72, 0x20f, 0x53, 0x76, 0x20f, 0x57,
+ 0x62, 0x30f, 0x56, 0x2215, 0x6d, 0x30f, 0x41, 0x2215,
+ 0x6d, 0x210, 0x31, 0x65e5, 0x210, 0x32, 0x65e5, 0x210,
+ 0x33, 0x65e5, 0x210, 0x34, 0x65e5, 0x210, 0x35, 0x65e5,
+ 0x210, 0x36, 0x65e5, 0x210, 0x37, 0x65e5, 0x210, 0x38,
+ 0x65e5, 0x210, 0x39, 0x65e5, 0x310, 0x31, 0x30, 0x65e5,
+ 0x310, 0x31, 0x31, 0x65e5, 0x310, 0x31, 0x32, 0x65e5,
+ 0x310, 0x31, 0x33, 0x65e5, 0x310, 0x31, 0x34, 0x65e5,
+ 0x310, 0x31, 0x35, 0x65e5, 0x310, 0x31, 0x36, 0x65e5,
+ 0x310, 0x31, 0x37, 0x65e5, 0x310, 0x31, 0x38, 0x65e5,
+ 0x310, 0x31, 0x39, 0x65e5, 0x310, 0x32, 0x30, 0x65e5,
+ 0x310, 0x32, 0x31, 0x65e5, 0x310, 0x32, 0x32, 0x65e5,
+ 0x310, 0x32, 0x33, 0x65e5, 0x310, 0x32, 0x34, 0x65e5,
+ 0x310, 0x32, 0x35, 0x65e5, 0x310, 0x32, 0x36, 0x65e5,
+ 0x310, 0x32, 0x37, 0x65e5, 0x310, 0x32, 0x38, 0x65e5,
+ 0x310, 0x32, 0x39, 0x65e5, 0x310, 0x33, 0x30, 0x65e5,
+ 0x310, 0x33, 0x31, 0x65e5, 0x30f, 0x67, 0x61, 0x6c,
+ 0x109, 0x44a, 0x109, 0x44c, 0x109, 0xa76f, 0x109, 0x126,
+ 0x109, 0x153, 0x109, 0xa727, 0x109, 0xab37, 0x109, 0x26b,
+ 0x109, 0xab52, 0x101, 0x8c48, 0x101, 0x66f4, 0x101, 0x8eca,
+ 0x101, 0x8cc8, 0x101, 0x6ed1, 0x101, 0x4e32, 0x101, 0x53e5,
+ 0x101, 0x9f9c, 0x101, 0x9f9c, 0x101, 0x5951, 0x101, 0x91d1,
+ 0x101, 0x5587, 0x101, 0x5948, 0x101, 0x61f6, 0x101, 0x7669,
+ 0x101, 0x7f85, 0x101, 0x863f, 0x101, 0x87ba, 0x101, 0x88f8,
+ 0x101, 0x908f, 0x101, 0x6a02, 0x101, 0x6d1b, 0x101, 0x70d9,
+ 0x101, 0x73de, 0x101, 0x843d, 0x101, 0x916a, 0x101, 0x99f1,
+ 0x101, 0x4e82, 0x101, 0x5375, 0x101, 0x6b04, 0x101, 0x721b,
+ 0x101, 0x862d, 0x101, 0x9e1e, 0x101, 0x5d50, 0x101, 0x6feb,
+ 0x101, 0x85cd, 0x101, 0x8964, 0x101, 0x62c9, 0x101, 0x81d8,
+ 0x101, 0x881f, 0x101, 0x5eca, 0x101, 0x6717, 0x101, 0x6d6a,
+ 0x101, 0x72fc, 0x101, 0x90ce, 0x101, 0x4f86, 0x101, 0x51b7,
+ 0x101, 0x52de, 0x101, 0x64c4, 0x101, 0x6ad3, 0x101, 0x7210,
+ 0x101, 0x76e7, 0x101, 0x8001, 0x101, 0x8606, 0x101, 0x865c,
+ 0x101, 0x8def, 0x101, 0x9732, 0x101, 0x9b6f, 0x101, 0x9dfa,
+ 0x101, 0x788c, 0x101, 0x797f, 0x101, 0x7da0, 0x101, 0x83c9,
+ 0x101, 0x9304, 0x101, 0x9e7f, 0x101, 0x8ad6, 0x101, 0x58df,
+ 0x101, 0x5f04, 0x101, 0x7c60, 0x101, 0x807e, 0x101, 0x7262,
+ 0x101, 0x78ca, 0x101, 0x8cc2, 0x101, 0x96f7, 0x101, 0x58d8,
+ 0x101, 0x5c62, 0x101, 0x6a13, 0x101, 0x6dda, 0x101, 0x6f0f,
+ 0x101, 0x7d2f, 0x101, 0x7e37, 0x101, 0x964b, 0x101, 0x52d2,
+ 0x101, 0x808b, 0x101, 0x51dc, 0x101, 0x51cc, 0x101, 0x7a1c,
+ 0x101, 0x7dbe, 0x101, 0x83f1, 0x101, 0x9675, 0x101, 0x8b80,
+ 0x101, 0x62cf, 0x101, 0x6a02, 0x101, 0x8afe, 0x101, 0x4e39,
+ 0x101, 0x5be7, 0x101, 0x6012, 0x101, 0x7387, 0x101, 0x7570,
+ 0x101, 0x5317, 0x101, 0x78fb, 0x101, 0x4fbf, 0x101, 0x5fa9,
+ 0x101, 0x4e0d, 0x101, 0x6ccc, 0x101, 0x6578, 0x101, 0x7d22,
+ 0x101, 0x53c3, 0x101, 0x585e, 0x101, 0x7701, 0x101, 0x8449,
+ 0x101, 0x8aaa, 0x101, 0x6bba, 0x101, 0x8fb0, 0x101, 0x6c88,
+ 0x101, 0x62fe, 0x101, 0x82e5, 0x101, 0x63a0, 0x101, 0x7565,
+ 0x101, 0x4eae, 0x101, 0x5169, 0x101, 0x51c9, 0x101, 0x6881,
+ 0x101, 0x7ce7, 0x101, 0x826f, 0x101, 0x8ad2, 0x101, 0x91cf,
+ 0x101, 0x52f5, 0x101, 0x5442, 0x101, 0x5973, 0x101, 0x5eec,
+ 0x101, 0x65c5, 0x101, 0x6ffe, 0x101, 0x792a, 0x101, 0x95ad,
+ 0x101, 0x9a6a, 0x101, 0x9e97, 0x101, 0x9ece, 0x101, 0x529b,
+ 0x101, 0x66c6, 0x101, 0x6b77, 0x101, 0x8f62, 0x101, 0x5e74,
+ 0x101, 0x6190, 0x101, 0x6200, 0x101, 0x649a, 0x101, 0x6f23,
+ 0x101, 0x7149, 0x101, 0x7489, 0x101, 0x79ca, 0x101, 0x7df4,
+ 0x101, 0x806f, 0x101, 0x8f26, 0x101, 0x84ee, 0x101, 0x9023,
+ 0x101, 0x934a, 0x101, 0x5217, 0x101, 0x52a3, 0x101, 0x54bd,
+ 0x101, 0x70c8, 0x101, 0x88c2, 0x101, 0x8aaa, 0x101, 0x5ec9,
+ 0x101, 0x5ff5, 0x101, 0x637b, 0x101, 0x6bae, 0x101, 0x7c3e,
+ 0x101, 0x7375, 0x101, 0x4ee4, 0x101, 0x56f9, 0x101, 0x5be7,
+ 0x101, 0x5dba, 0x101, 0x601c, 0x101, 0x73b2, 0x101, 0x7469,
+ 0x101, 0x7f9a, 0x101, 0x8046, 0x101, 0x9234, 0x101, 0x96f6,
+ 0x101, 0x9748, 0x101, 0x9818, 0x101, 0x4f8b, 0x101, 0x79ae,
+ 0x101, 0x91b4, 0x101, 0x96b8, 0x101, 0x60e1, 0x101, 0x4e86,
+ 0x101, 0x50da, 0x101, 0x5bee, 0x101, 0x5c3f, 0x101, 0x6599,
+ 0x101, 0x6a02, 0x101, 0x71ce, 0x101, 0x7642, 0x101, 0x84fc,
+ 0x101, 0x907c, 0x101, 0x9f8d, 0x101, 0x6688, 0x101, 0x962e,
+ 0x101, 0x5289, 0x101, 0x677b, 0x101, 0x67f3, 0x101, 0x6d41,
+ 0x101, 0x6e9c, 0x101, 0x7409, 0x101, 0x7559, 0x101, 0x786b,
+ 0x101, 0x7d10, 0x101, 0x985e, 0x101, 0x516d, 0x101, 0x622e,
+ 0x101, 0x9678, 0x101, 0x502b, 0x101, 0x5d19, 0x101, 0x6dea,
+ 0x101, 0x8f2a, 0x101, 0x5f8b, 0x101, 0x6144, 0x101, 0x6817,
+ 0x101, 0x7387, 0x101, 0x9686, 0x101, 0x5229, 0x101, 0x540f,
+ 0x101, 0x5c65, 0x101, 0x6613, 0x101, 0x674e, 0x101, 0x68a8,
+ 0x101, 0x6ce5, 0x101, 0x7406, 0x101, 0x75e2, 0x101, 0x7f79,
+ 0x101, 0x88cf, 0x101, 0x88e1, 0x101, 0x91cc, 0x101, 0x96e2,
+ 0x101, 0x533f, 0x101, 0x6eba, 0x101, 0x541d, 0x101, 0x71d0,
+ 0x101, 0x7498, 0x101, 0x85fa, 0x101, 0x96a3, 0x101, 0x9c57,
+ 0x101, 0x9e9f, 0x101, 0x6797, 0x101, 0x6dcb, 0x101, 0x81e8,
+ 0x101, 0x7acb, 0x101, 0x7b20, 0x101, 0x7c92, 0x101, 0x72c0,
+ 0x101, 0x7099, 0x101, 0x8b58, 0x101, 0x4ec0, 0x101, 0x8336,
+ 0x101, 0x523a, 0x101, 0x5207, 0x101, 0x5ea6, 0x101, 0x62d3,
+ 0x101, 0x7cd6, 0x101, 0x5b85, 0x101, 0x6d1e, 0x101, 0x66b4,
+ 0x101, 0x8f3b, 0x101, 0x884c, 0x101, 0x964d, 0x101, 0x898b,
+ 0x101, 0x5ed3, 0x101, 0x5140, 0x101, 0x55c0, 0x101, 0x585a,
+ 0x101, 0x6674, 0x101, 0x51de, 0x101, 0x732a, 0x101, 0x76ca,
+ 0x101, 0x793c, 0x101, 0x795e, 0x101, 0x7965, 0x101, 0x798f,
+ 0x101, 0x9756, 0x101, 0x7cbe, 0x101, 0x7fbd, 0x101, 0x8612,
+ 0x101, 0x8af8, 0x101, 0x9038, 0x101, 0x90fd, 0x101, 0x98ef,
+ 0x101, 0x98fc, 0x101, 0x9928, 0x101, 0x9db4, 0x101, 0x90de,
+ 0x101, 0x96b7, 0x101, 0x4fae, 0x101, 0x50e7, 0x101, 0x514d,
+ 0x101, 0x52c9, 0x101, 0x52e4, 0x101, 0x5351, 0x101, 0x559d,
+ 0x101, 0x5606, 0x101, 0x5668, 0x101, 0x5840, 0x101, 0x58a8,
+ 0x101, 0x5c64, 0x101, 0x5c6e, 0x101, 0x6094, 0x101, 0x6168,
+ 0x101, 0x618e, 0x101, 0x61f2, 0x101, 0x654f, 0x101, 0x65e2,
+ 0x101, 0x6691, 0x101, 0x6885, 0x101, 0x6d77, 0x101, 0x6e1a,
+ 0x101, 0x6f22, 0x101, 0x716e, 0x101, 0x722b, 0x101, 0x7422,
+ 0x101, 0x7891, 0x101, 0x793e, 0x101, 0x7949, 0x101, 0x7948,
+ 0x101, 0x7950, 0x101, 0x7956, 0x101, 0x795d, 0x101, 0x798d,
+ 0x101, 0x798e, 0x101, 0x7a40, 0x101, 0x7a81, 0x101, 0x7bc0,
+ 0x101, 0x7df4, 0x101, 0x7e09, 0x101, 0x7e41, 0x101, 0x7f72,
+ 0x101, 0x8005, 0x101, 0x81ed, 0x101, 0x8279, 0x101, 0x8279,
+ 0x101, 0x8457, 0x101, 0x8910, 0x101, 0x8996, 0x101, 0x8b01,
+ 0x101, 0x8b39, 0x101, 0x8cd3, 0x101, 0x8d08, 0x101, 0x8fb6,
+ 0x101, 0x9038, 0x101, 0x96e3, 0x101, 0x97ff, 0x101, 0x983b,
+ 0x101, 0x6075, 0x201, 0xd850, 0xdeee, 0x101, 0x8218, 0x101,
+ 0x4e26, 0x101, 0x51b5, 0x101, 0x5168, 0x101, 0x4f80, 0x101,
+ 0x5145, 0x101, 0x5180, 0x101, 0x52c7, 0x101, 0x52fa, 0x101,
+ 0x559d, 0x101, 0x5555, 0x101, 0x5599, 0x101, 0x55e2, 0x101,
+ 0x585a, 0x101, 0x58b3, 0x101, 0x5944, 0x101, 0x5954, 0x101,
+ 0x5a62, 0x101, 0x5b28, 0x101, 0x5ed2, 0x101, 0x5ed9, 0x101,
+ 0x5f69, 0x101, 0x5fad, 0x101, 0x60d8, 0x101, 0x614e, 0x101,
+ 0x6108, 0x101, 0x618e, 0x101, 0x6160, 0x101, 0x61f2, 0x101,
+ 0x6234, 0x101, 0x63c4, 0x101, 0x641c, 0x101, 0x6452, 0x101,
+ 0x6556, 0x101, 0x6674, 0x101, 0x6717, 0x101, 0x671b, 0x101,
+ 0x6756, 0x101, 0x6b79, 0x101, 0x6bba, 0x101, 0x6d41, 0x101,
+ 0x6edb, 0x101, 0x6ecb, 0x101, 0x6f22, 0x101, 0x701e, 0x101,
+ 0x716e, 0x101, 0x77a7, 0x101, 0x7235, 0x101, 0x72af, 0x101,
+ 0x732a, 0x101, 0x7471, 0x101, 0x7506, 0x101, 0x753b, 0x101,
+ 0x761d, 0x101, 0x761f, 0x101, 0x76ca, 0x101, 0x76db, 0x101,
+ 0x76f4, 0x101, 0x774a, 0x101, 0x7740, 0x101, 0x78cc, 0x101,
+ 0x7ab1, 0x101, 0x7bc0, 0x101, 0x7c7b, 0x101, 0x7d5b, 0x101,
+ 0x7df4, 0x101, 0x7f3e, 0x101, 0x8005, 0x101, 0x8352, 0x101,
+ 0x83ef, 0x101, 0x8779, 0x101, 0x8941, 0x101, 0x8986, 0x101,
+ 0x8996, 0x101, 0x8abf, 0x101, 0x8af8, 0x101, 0x8acb, 0x101,
+ 0x8b01, 0x101, 0x8afe, 0x101, 0x8aed, 0x101, 0x8b39, 0x101,
+ 0x8b8a, 0x101, 0x8d08, 0x101, 0x8f38, 0x101, 0x9072, 0x101,
+ 0x9199, 0x101, 0x9276, 0x101, 0x967c, 0x101, 0x96e3, 0x101,
+ 0x9756, 0x101, 0x97db, 0x101, 0x97ff, 0x101, 0x980b, 0x101,
+ 0x983b, 0x101, 0x9b12, 0x101, 0x9f9c, 0x201, 0xd84a, 0xdc4a,
+ 0x201, 0xd84a, 0xdc44, 0x201, 0xd84c, 0xdfd5, 0x101, 0x3b9d,
+ 0x101, 0x4018, 0x101, 0x4039, 0x201, 0xd854, 0xde49, 0x201,
+ 0xd857, 0xdcd0, 0x201, 0xd85f, 0xded3, 0x101, 0x9f43, 0x101,
+ 0x9f8e, 0x210, 0x66, 0x66, 0x210, 0x66, 0x69, 0x210,
+ 0x66, 0x6c, 0x310, 0x66, 0x66, 0x69, 0x310, 0x66,
+ 0x66, 0x6c, 0x210, 0x17f, 0x74, 0x210, 0x73, 0x74,
+ 0x210, 0x574, 0x576, 0x210, 0x574, 0x565, 0x210, 0x574,
+ 0x56b, 0x210, 0x57e, 0x576, 0x210, 0x574, 0x56d, 0x201,
+ 0x5d9, 0x5b4, 0x201, 0x5f2, 0x5b7, 0x102, 0x5e2, 0x102,
+ 0x5d0, 0x102, 0x5d3, 0x102, 0x5d4, 0x102, 0x5db, 0x102,
+ 0x5dc, 0x102, 0x5dd, 0x102, 0x5e8, 0x102, 0x5ea, 0x102,
+ 0x2b, 0x201, 0x5e9, 0x5c1, 0x201, 0x5e9, 0x5c2, 0x201,
+ 0xfb49, 0x5c1, 0x201, 0xfb49, 0x5c2, 0x201, 0x5d0, 0x5b7,
+ 0x201, 0x5d0, 0x5b8, 0x201, 0x5d0, 0x5bc, 0x201, 0x5d1,
+ 0x5bc, 0x201, 0x5d2, 0x5bc, 0x201, 0x5d3, 0x5bc, 0x201,
+ 0x5d4, 0x5bc, 0x201, 0x5d5, 0x5bc, 0x201, 0x5d6, 0x5bc,
+ 0x201, 0x5d8, 0x5bc, 0x201, 0x5d9, 0x5bc, 0x201, 0x5da,
+ 0x5bc, 0x201, 0x5db, 0x5bc, 0x201, 0x5dc, 0x5bc, 0x201,
+ 0x5de, 0x5bc, 0x201, 0x5e0, 0x5bc, 0x201, 0x5e1, 0x5bc,
+ 0x201, 0x5e3, 0x5bc, 0x201, 0x5e4, 0x5bc, 0x201, 0x5e6,
+ 0x5bc, 0x201, 0x5e7, 0x5bc, 0x201, 0x5e8, 0x5bc, 0x201,
+ 0x5e9, 0x5bc, 0x201, 0x5ea, 0x5bc, 0x201, 0x5d5, 0x5b9,
+ 0x201, 0x5d1, 0x5bf, 0x201, 0x5db, 0x5bf, 0x201, 0x5e4,
+ 0x5bf, 0x210, 0x5d0, 0x5dc, 0x107, 0x671, 0x106, 0x671,
+ 0x107, 0x67b, 0x106, 0x67b, 0x104, 0x67b, 0x105, 0x67b,
+ 0x107, 0x67e, 0x106, 0x67e, 0x104, 0x67e, 0x105, 0x67e,
+ 0x107, 0x680, 0x106, 0x680, 0x104, 0x680, 0x105, 0x680,
+ 0x107, 0x67a, 0x106, 0x67a, 0x104, 0x67a, 0x105, 0x67a,
+ 0x107, 0x67f, 0x106, 0x67f, 0x104, 0x67f, 0x105, 0x67f,
+ 0x107, 0x679, 0x106, 0x679, 0x104, 0x679, 0x105, 0x679,
+ 0x107, 0x6a4, 0x106, 0x6a4, 0x104, 0x6a4, 0x105, 0x6a4,
+ 0x107, 0x6a6, 0x106, 0x6a6, 0x104, 0x6a6, 0x105, 0x6a6,
+ 0x107, 0x684, 0x106, 0x684, 0x104, 0x684, 0x105, 0x684,
+ 0x107, 0x683, 0x106, 0x683, 0x104, 0x683, 0x105, 0x683,
+ 0x107, 0x686, 0x106, 0x686, 0x104, 0x686, 0x105, 0x686,
+ 0x107, 0x687, 0x106, 0x687, 0x104, 0x687, 0x105, 0x687,
+ 0x107, 0x68d, 0x106, 0x68d, 0x107, 0x68c, 0x106, 0x68c,
+ 0x107, 0x68e, 0x106, 0x68e, 0x107, 0x688, 0x106, 0x688,
+ 0x107, 0x698, 0x106, 0x698, 0x107, 0x691, 0x106, 0x691,
+ 0x107, 0x6a9, 0x106, 0x6a9, 0x104, 0x6a9, 0x105, 0x6a9,
+ 0x107, 0x6af, 0x106, 0x6af, 0x104, 0x6af, 0x105, 0x6af,
+ 0x107, 0x6b3, 0x106, 0x6b3, 0x104, 0x6b3, 0x105, 0x6b3,
+ 0x107, 0x6b1, 0x106, 0x6b1, 0x104, 0x6b1, 0x105, 0x6b1,
+ 0x107, 0x6ba, 0x106, 0x6ba, 0x107, 0x6bb, 0x106, 0x6bb,
+ 0x104, 0x6bb, 0x105, 0x6bb, 0x107, 0x6c0, 0x106, 0x6c0,
+ 0x107, 0x6c1, 0x106, 0x6c1, 0x104, 0x6c1, 0x105, 0x6c1,
+ 0x107, 0x6be, 0x106, 0x6be, 0x104, 0x6be, 0x105, 0x6be,
+ 0x107, 0x6d2, 0x106, 0x6d2, 0x107, 0x6d3, 0x106, 0x6d3,
+ 0x107, 0x6ad, 0x106, 0x6ad, 0x104, 0x6ad, 0x105, 0x6ad,
+ 0x107, 0x6c7, 0x106, 0x6c7, 0x107, 0x6c6, 0x106, 0x6c6,
+ 0x107, 0x6c8, 0x106, 0x6c8, 0x107, 0x677, 0x107, 0x6cb,
+ 0x106, 0x6cb, 0x107, 0x6c5, 0x106, 0x6c5, 0x107, 0x6c9,
+ 0x106, 0x6c9, 0x107, 0x6d0, 0x106, 0x6d0, 0x104, 0x6d0,
+ 0x105, 0x6d0, 0x104, 0x649, 0x105, 0x649, 0x207, 0x626,
+ 0x627, 0x206, 0x626, 0x627, 0x207, 0x626, 0x6d5, 0x206,
+ 0x626, 0x6d5, 0x207, 0x626, 0x648, 0x206, 0x626, 0x648,
+ 0x207, 0x626, 0x6c7, 0x206, 0x626, 0x6c7, 0x207, 0x626,
+ 0x6c6, 0x206, 0x626, 0x6c6, 0x207, 0x626, 0x6c8, 0x206,
+ 0x626, 0x6c8, 0x207, 0x626, 0x6d0, 0x206, 0x626, 0x6d0,
+ 0x204, 0x626, 0x6d0, 0x207, 0x626, 0x649, 0x206, 0x626,
+ 0x649, 0x204, 0x626, 0x649, 0x107, 0x6cc, 0x106, 0x6cc,
+ 0x104, 0x6cc, 0x105, 0x6cc, 0x207, 0x626, 0x62c, 0x207,
+ 0x626, 0x62d, 0x207, 0x626, 0x645, 0x207, 0x626, 0x649,
+ 0x207, 0x626, 0x64a, 0x207, 0x628, 0x62c, 0x207, 0x628,
+ 0x62d, 0x207, 0x628, 0x62e, 0x207, 0x628, 0x645, 0x207,
+ 0x628, 0x649, 0x207, 0x628, 0x64a, 0x207, 0x62a, 0x62c,
+ 0x207, 0x62a, 0x62d, 0x207, 0x62a, 0x62e, 0x207, 0x62a,
+ 0x645, 0x207, 0x62a, 0x649, 0x207, 0x62a, 0x64a, 0x207,
+ 0x62b, 0x62c, 0x207, 0x62b, 0x645, 0x207, 0x62b, 0x649,
+ 0x207, 0x62b, 0x64a, 0x207, 0x62c, 0x62d, 0x207, 0x62c,
+ 0x645, 0x207, 0x62d, 0x62c, 0x207, 0x62d, 0x645, 0x207,
+ 0x62e, 0x62c, 0x207, 0x62e, 0x62d, 0x207, 0x62e, 0x645,
+ 0x207, 0x633, 0x62c, 0x207, 0x633, 0x62d, 0x207, 0x633,
+ 0x62e, 0x207, 0x633, 0x645, 0x207, 0x635, 0x62d, 0x207,
+ 0x635, 0x645, 0x207, 0x636, 0x62c, 0x207, 0x636, 0x62d,
+ 0x207, 0x636, 0x62e, 0x207, 0x636, 0x645, 0x207, 0x637,
+ 0x62d, 0x207, 0x637, 0x645, 0x207, 0x638, 0x645, 0x207,
+ 0x639, 0x62c, 0x207, 0x639, 0x645, 0x207, 0x63a, 0x62c,
+ 0x207, 0x63a, 0x645, 0x207, 0x641, 0x62c, 0x207, 0x641,
+ 0x62d, 0x207, 0x641, 0x62e, 0x207, 0x641, 0x645, 0x207,
+ 0x641, 0x649, 0x207, 0x641, 0x64a, 0x207, 0x642, 0x62d,
+ 0x207, 0x642, 0x645, 0x207, 0x642, 0x649, 0x207, 0x642,
+ 0x64a, 0x207, 0x643, 0x627, 0x207, 0x643, 0x62c, 0x207,
+ 0x643, 0x62d, 0x207, 0x643, 0x62e, 0x207, 0x643, 0x644,
+ 0x207, 0x643, 0x645, 0x207, 0x643, 0x649, 0x207, 0x643,
+ 0x64a, 0x207, 0x644, 0x62c, 0x207, 0x644, 0x62d, 0x207,
+ 0x644, 0x62e, 0x207, 0x644, 0x645, 0x207, 0x644, 0x649,
+ 0x207, 0x644, 0x64a, 0x207, 0x645, 0x62c, 0x207, 0x645,
+ 0x62d, 0x207, 0x645, 0x62e, 0x207, 0x645, 0x645, 0x207,
+ 0x645, 0x649, 0x207, 0x645, 0x64a, 0x207, 0x646, 0x62c,
+ 0x207, 0x646, 0x62d, 0x207, 0x646, 0x62e, 0x207, 0x646,
+ 0x645, 0x207, 0x646, 0x649, 0x207, 0x646, 0x64a, 0x207,
+ 0x647, 0x62c, 0x207, 0x647, 0x645, 0x207, 0x647, 0x649,
+ 0x207, 0x647, 0x64a, 0x207, 0x64a, 0x62c, 0x207, 0x64a,
+ 0x62d, 0x207, 0x64a, 0x62e, 0x207, 0x64a, 0x645, 0x207,
+ 0x64a, 0x649, 0x207, 0x64a, 0x64a, 0x207, 0x630, 0x670,
+ 0x207, 0x631, 0x670, 0x207, 0x649, 0x670, 0x307, 0x20,
+ 0x64c, 0x651, 0x307, 0x20, 0x64d, 0x651, 0x307, 0x20,
+ 0x64e, 0x651, 0x307, 0x20, 0x64f, 0x651, 0x307, 0x20,
+ 0x650, 0x651, 0x307, 0x20, 0x651, 0x670, 0x206, 0x626,
+ 0x631, 0x206, 0x626, 0x632, 0x206, 0x626, 0x645, 0x206,
+ 0x626, 0x646, 0x206, 0x626, 0x649, 0x206, 0x626, 0x64a,
+ 0x206, 0x628, 0x631, 0x206, 0x628, 0x632, 0x206, 0x628,
+ 0x645, 0x206, 0x628, 0x646, 0x206, 0x628, 0x649, 0x206,
+ 0x628, 0x64a, 0x206, 0x62a, 0x631, 0x206, 0x62a, 0x632,
+ 0x206, 0x62a, 0x645, 0x206, 0x62a, 0x646, 0x206, 0x62a,
+ 0x649, 0x206, 0x62a, 0x64a, 0x206, 0x62b, 0x631, 0x206,
+ 0x62b, 0x632, 0x206, 0x62b, 0x645, 0x206, 0x62b, 0x646,
+ 0x206, 0x62b, 0x649, 0x206, 0x62b, 0x64a, 0x206, 0x641,
+ 0x649, 0x206, 0x641, 0x64a, 0x206, 0x642, 0x649, 0x206,
+ 0x642, 0x64a, 0x206, 0x643, 0x627, 0x206, 0x643, 0x644,
+ 0x206, 0x643, 0x645, 0x206, 0x643, 0x649, 0x206, 0x643,
+ 0x64a, 0x206, 0x644, 0x645, 0x206, 0x644, 0x649, 0x206,
+ 0x644, 0x64a, 0x206, 0x645, 0x627, 0x206, 0x645, 0x645,
+ 0x206, 0x646, 0x631, 0x206, 0x646, 0x632, 0x206, 0x646,
+ 0x645, 0x206, 0x646, 0x646, 0x206, 0x646, 0x649, 0x206,
+ 0x646, 0x64a, 0x206, 0x649, 0x670, 0x206, 0x64a, 0x631,
+ 0x206, 0x64a, 0x632, 0x206, 0x64a, 0x645, 0x206, 0x64a,
+ 0x646, 0x206, 0x64a, 0x649, 0x206, 0x64a, 0x64a, 0x204,
+ 0x626, 0x62c, 0x204, 0x626, 0x62d, 0x204, 0x626, 0x62e,
+ 0x204, 0x626, 0x645, 0x204, 0x626, 0x647, 0x204, 0x628,
+ 0x62c, 0x204, 0x628, 0x62d, 0x204, 0x628, 0x62e, 0x204,
+ 0x628, 0x645, 0x204, 0x628, 0x647, 0x204, 0x62a, 0x62c,
+ 0x204, 0x62a, 0x62d, 0x204, 0x62a, 0x62e, 0x204, 0x62a,
+ 0x645, 0x204, 0x62a, 0x647, 0x204, 0x62b, 0x645, 0x204,
+ 0x62c, 0x62d, 0x204, 0x62c, 0x645, 0x204, 0x62d, 0x62c,
+ 0x204, 0x62d, 0x645, 0x204, 0x62e, 0x62c, 0x204, 0x62e,
+ 0x645, 0x204, 0x633, 0x62c, 0x204, 0x633, 0x62d, 0x204,
+ 0x633, 0x62e, 0x204, 0x633, 0x645, 0x204, 0x635, 0x62d,
+ 0x204, 0x635, 0x62e, 0x204, 0x635, 0x645, 0x204, 0x636,
+ 0x62c, 0x204, 0x636, 0x62d, 0x204, 0x636, 0x62e, 0x204,
+ 0x636, 0x645, 0x204, 0x637, 0x62d, 0x204, 0x638, 0x645,
+ 0x204, 0x639, 0x62c, 0x204, 0x639, 0x645, 0x204, 0x63a,
+ 0x62c, 0x204, 0x63a, 0x645, 0x204, 0x641, 0x62c, 0x204,
+ 0x641, 0x62d, 0x204, 0x641, 0x62e, 0x204, 0x641, 0x645,
+ 0x204, 0x642, 0x62d, 0x204, 0x642, 0x645, 0x204, 0x643,
+ 0x62c, 0x204, 0x643, 0x62d, 0x204, 0x643, 0x62e, 0x204,
+ 0x643, 0x644, 0x204, 0x643, 0x645, 0x204, 0x644, 0x62c,
+ 0x204, 0x644, 0x62d, 0x204, 0x644, 0x62e, 0x204, 0x644,
+ 0x645, 0x204, 0x644, 0x647, 0x204, 0x645, 0x62c, 0x204,
+ 0x645, 0x62d, 0x204, 0x645, 0x62e, 0x204, 0x645, 0x645,
+ 0x204, 0x646, 0x62c, 0x204, 0x646, 0x62d, 0x204, 0x646,
+ 0x62e, 0x204, 0x646, 0x645, 0x204, 0x646, 0x647, 0x204,
+ 0x647, 0x62c, 0x204, 0x647, 0x645, 0x204, 0x647, 0x670,
+ 0x204, 0x64a, 0x62c, 0x204, 0x64a, 0x62d, 0x204, 0x64a,
+ 0x62e, 0x204, 0x64a, 0x645, 0x204, 0x64a, 0x647, 0x205,
+ 0x626, 0x645, 0x205, 0x626, 0x647, 0x205, 0x628, 0x645,
+ 0x205, 0x628, 0x647, 0x205, 0x62a, 0x645, 0x205, 0x62a,
+ 0x647, 0x205, 0x62b, 0x645, 0x205, 0x62b, 0x647, 0x205,
+ 0x633, 0x645, 0x205, 0x633, 0x647, 0x205, 0x634, 0x645,
+ 0x205, 0x634, 0x647, 0x205, 0x643, 0x644, 0x205, 0x643,
+ 0x645, 0x205, 0x644, 0x645, 0x205, 0x646, 0x645, 0x205,
+ 0x646, 0x647, 0x205, 0x64a, 0x645, 0x205, 0x64a, 0x647,
+ 0x305, 0x640, 0x64e, 0x651, 0x305, 0x640, 0x64f, 0x651,
+ 0x305, 0x640, 0x650, 0x651, 0x207, 0x637, 0x649, 0x207,
+ 0x637, 0x64a, 0x207, 0x639, 0x649, 0x207, 0x639, 0x64a,
+ 0x207, 0x63a, 0x649, 0x207, 0x63a, 0x64a, 0x207, 0x633,
+ 0x649, 0x207, 0x633, 0x64a, 0x207, 0x634, 0x649, 0x207,
+ 0x634, 0x64a, 0x207, 0x62d, 0x649, 0x207, 0x62d, 0x64a,
+ 0x207, 0x62c, 0x649, 0x207, 0x62c, 0x64a, 0x207, 0x62e,
+ 0x649, 0x207, 0x62e, 0x64a, 0x207, 0x635, 0x649, 0x207,
+ 0x635, 0x64a, 0x207, 0x636, 0x649, 0x207, 0x636, 0x64a,
+ 0x207, 0x634, 0x62c, 0x207, 0x634, 0x62d, 0x207, 0x634,
+ 0x62e, 0x207, 0x634, 0x645, 0x207, 0x634, 0x631, 0x207,
+ 0x633, 0x631, 0x207, 0x635, 0x631, 0x207, 0x636, 0x631,
+ 0x206, 0x637, 0x649, 0x206, 0x637, 0x64a, 0x206, 0x639,
+ 0x649, 0x206, 0x639, 0x64a, 0x206, 0x63a, 0x649, 0x206,
+ 0x63a, 0x64a, 0x206, 0x633, 0x649, 0x206, 0x633, 0x64a,
+ 0x206, 0x634, 0x649, 0x206, 0x634, 0x64a, 0x206, 0x62d,
+ 0x649, 0x206, 0x62d, 0x64a, 0x206, 0x62c, 0x649, 0x206,
+ 0x62c, 0x64a, 0x206, 0x62e, 0x649, 0x206, 0x62e, 0x64a,
+ 0x206, 0x635, 0x649, 0x206, 0x635, 0x64a, 0x206, 0x636,
+ 0x649, 0x206, 0x636, 0x64a, 0x206, 0x634, 0x62c, 0x206,
+ 0x634, 0x62d, 0x206, 0x634, 0x62e, 0x206, 0x634, 0x645,
+ 0x206, 0x634, 0x631, 0x206, 0x633, 0x631, 0x206, 0x635,
+ 0x631, 0x206, 0x636, 0x631, 0x204, 0x634, 0x62c, 0x204,
+ 0x634, 0x62d, 0x204, 0x634, 0x62e, 0x204, 0x634, 0x645,
+ 0x204, 0x633, 0x647, 0x204, 0x634, 0x647, 0x204, 0x637,
+ 0x645, 0x205, 0x633, 0x62c, 0x205, 0x633, 0x62d, 0x205,
+ 0x633, 0x62e, 0x205, 0x634, 0x62c, 0x205, 0x634, 0x62d,
+ 0x205, 0x634, 0x62e, 0x205, 0x637, 0x645, 0x205, 0x638,
+ 0x645, 0x206, 0x627, 0x64b, 0x207, 0x627, 0x64b, 0x304,
+ 0x62a, 0x62c, 0x645, 0x306, 0x62a, 0x62d, 0x62c, 0x304,
+ 0x62a, 0x62d, 0x62c, 0x304, 0x62a, 0x62d, 0x645, 0x304,
+ 0x62a, 0x62e, 0x645, 0x304, 0x62a, 0x645, 0x62c, 0x304,
+ 0x62a, 0x645, 0x62d, 0x304, 0x62a, 0x645, 0x62e, 0x306,
+ 0x62c, 0x645, 0x62d, 0x304, 0x62c, 0x645, 0x62d, 0x306,
+ 0x62d, 0x645, 0x64a, 0x306, 0x62d, 0x645, 0x649, 0x304,
+ 0x633, 0x62d, 0x62c, 0x304, 0x633, 0x62c, 0x62d, 0x306,
+ 0x633, 0x62c, 0x649, 0x306, 0x633, 0x645, 0x62d, 0x304,
+ 0x633, 0x645, 0x62d, 0x304, 0x633, 0x645, 0x62c, 0x306,
+ 0x633, 0x645, 0x645, 0x304, 0x633, 0x645, 0x645, 0x306,
+ 0x635, 0x62d, 0x62d, 0x304, 0x635, 0x62d, 0x62d, 0x306,
+ 0x635, 0x645, 0x645, 0x306, 0x634, 0x62d, 0x645, 0x304,
+ 0x634, 0x62d, 0x645, 0x306, 0x634, 0x62c, 0x64a, 0x306,
+ 0x634, 0x645, 0x62e, 0x304, 0x634, 0x645, 0x62e, 0x306,
+ 0x634, 0x645, 0x645, 0x304, 0x634, 0x645, 0x645, 0x306,
+ 0x636, 0x62d, 0x649, 0x306, 0x636, 0x62e, 0x645, 0x304,
+ 0x636, 0x62e, 0x645, 0x306, 0x637, 0x645, 0x62d, 0x304,
+ 0x637, 0x645, 0x62d, 0x304, 0x637, 0x645, 0x645, 0x306,
+ 0x637, 0x645, 0x64a, 0x306, 0x639, 0x62c, 0x645, 0x306,
+ 0x639, 0x645, 0x645, 0x304, 0x639, 0x645, 0x645, 0x306,
+ 0x639, 0x645, 0x649, 0x306, 0x63a, 0x645, 0x645, 0x306,
+ 0x63a, 0x645, 0x64a, 0x306, 0x63a, 0x645, 0x649, 0x306,
+ 0x641, 0x62e, 0x645, 0x304, 0x641, 0x62e, 0x645, 0x306,
+ 0x642, 0x645, 0x62d, 0x306, 0x642, 0x645, 0x645, 0x306,
+ 0x644, 0x62d, 0x645, 0x306, 0x644, 0x62d, 0x64a, 0x306,
+ 0x644, 0x62d, 0x649, 0x304, 0x644, 0x62c, 0x62c, 0x306,
+ 0x644, 0x62c, 0x62c, 0x306, 0x644, 0x62e, 0x645, 0x304,
+ 0x644, 0x62e, 0x645, 0x306, 0x644, 0x645, 0x62d, 0x304,
+ 0x644, 0x645, 0x62d, 0x304, 0x645, 0x62d, 0x62c, 0x304,
+ 0x645, 0x62d, 0x645, 0x306, 0x645, 0x62d, 0x64a, 0x304,
+ 0x645, 0x62c, 0x62d, 0x304, 0x645, 0x62c, 0x645, 0x304,
+ 0x645, 0x62e, 0x62c, 0x304, 0x645, 0x62e, 0x645, 0x304,
+ 0x645, 0x62c, 0x62e, 0x304, 0x647, 0x645, 0x62c, 0x304,
+ 0x647, 0x645, 0x645, 0x304, 0x646, 0x62d, 0x645, 0x306,
+ 0x646, 0x62d, 0x649, 0x306, 0x646, 0x62c, 0x645, 0x304,
+ 0x646, 0x62c, 0x645, 0x306, 0x646, 0x62c, 0x649, 0x306,
+ 0x646, 0x645, 0x64a, 0x306, 0x646, 0x645, 0x649, 0x306,
+ 0x64a, 0x645, 0x645, 0x304, 0x64a, 0x645, 0x645, 0x306,
+ 0x628, 0x62e, 0x64a, 0x306, 0x62a, 0x62c, 0x64a, 0x306,
+ 0x62a, 0x62c, 0x649, 0x306, 0x62a, 0x62e, 0x64a, 0x306,
+ 0x62a, 0x62e, 0x649, 0x306, 0x62a, 0x645, 0x64a, 0x306,
+ 0x62a, 0x645, 0x649, 0x306, 0x62c, 0x645, 0x64a, 0x306,
+ 0x62c, 0x62d, 0x649, 0x306, 0x62c, 0x645, 0x649, 0x306,
+ 0x633, 0x62e, 0x649, 0x306, 0x635, 0x62d, 0x64a, 0x306,
+ 0x634, 0x62d, 0x64a, 0x306, 0x636, 0x62d, 0x64a, 0x306,
+ 0x644, 0x62c, 0x64a, 0x306, 0x644, 0x645, 0x64a, 0x306,
+ 0x64a, 0x62d, 0x64a, 0x306, 0x64a, 0x62c, 0x64a, 0x306,
+ 0x64a, 0x645, 0x64a, 0x306, 0x645, 0x645, 0x64a, 0x306,
+ 0x642, 0x645, 0x64a, 0x306, 0x646, 0x62d, 0x64a, 0x304,
+ 0x642, 0x645, 0x62d, 0x304, 0x644, 0x62d, 0x645, 0x306,
+ 0x639, 0x645, 0x64a, 0x306, 0x643, 0x645, 0x64a, 0x304,
+ 0x646, 0x62c, 0x62d, 0x306, 0x645, 0x62e, 0x64a, 0x304,
+ 0x644, 0x62c, 0x645, 0x306, 0x643, 0x645, 0x645, 0x306,
+ 0x644, 0x62c, 0x645, 0x306, 0x646, 0x62c, 0x62d, 0x306,
+ 0x62c, 0x62d, 0x64a, 0x306, 0x62d, 0x62c, 0x64a, 0x306,
+ 0x645, 0x62c, 0x64a, 0x306, 0x641, 0x645, 0x64a, 0x306,
+ 0x628, 0x62d, 0x64a, 0x304, 0x643, 0x645, 0x645, 0x304,
+ 0x639, 0x62c, 0x645, 0x304, 0x635, 0x645, 0x645, 0x306,
+ 0x633, 0x62e, 0x64a, 0x306, 0x646, 0x62c, 0x64a, 0x307,
+ 0x635, 0x644, 0x6d2, 0x307, 0x642, 0x644, 0x6d2, 0x407,
+ 0x627, 0x644, 0x644, 0x647, 0x407, 0x627, 0x643, 0x628,
+ 0x631, 0x407, 0x645, 0x62d, 0x645, 0x62f, 0x407, 0x635,
+ 0x644, 0x639, 0x645, 0x407, 0x631, 0x633, 0x648, 0x644,
+ 0x407, 0x639, 0x644, 0x64a, 0x647, 0x407, 0x648, 0x633,
+ 0x644, 0x645, 0x307, 0x635, 0x644, 0x649, 0x1207, 0x635,
+ 0x644, 0x649, 0x20, 0x627, 0x644, 0x644, 0x647, 0x20,
+ 0x639, 0x644, 0x64a, 0x647, 0x20, 0x648, 0x633, 0x644,
+ 0x645, 0x807, 0x62c, 0x644, 0x20, 0x62c, 0x644, 0x627,
+ 0x644, 0x647, 0x407, 0x631, 0x6cc, 0x627, 0x644, 0x10b,
+ 0x2c, 0x10b, 0x3001, 0x10b, 0x3002, 0x10b, 0x3a, 0x10b,
+ 0x3b, 0x10b, 0x21, 0x10b, 0x3f, 0x10b, 0x3016, 0x10b,
+ 0x3017, 0x10b, 0x2026, 0x10b, 0x2025, 0x10b, 0x2014, 0x10b,
+ 0x2013, 0x10b, 0x5f, 0x10b, 0x5f, 0x10b, 0x28, 0x10b,
+ 0x29, 0x10b, 0x7b, 0x10b, 0x7d, 0x10b, 0x3014, 0x10b,
+ 0x3015, 0x10b, 0x3010, 0x10b, 0x3011, 0x10b, 0x300a, 0x10b,
+ 0x300b, 0x10b, 0x3008, 0x10b, 0x3009, 0x10b, 0x300c, 0x10b,
+ 0x300d, 0x10b, 0x300e, 0x10b, 0x300f, 0x10b, 0x5b, 0x10b,
+ 0x5d, 0x110, 0x203e, 0x110, 0x203e, 0x110, 0x203e, 0x110,
+ 0x203e, 0x110, 0x5f, 0x110, 0x5f, 0x110, 0x5f, 0x10e,
+ 0x2c, 0x10e, 0x3001, 0x10e, 0x2e, 0x10e, 0x3b, 0x10e,
+ 0x3a, 0x10e, 0x3f, 0x10e, 0x21, 0x10e, 0x2014, 0x10e,
+ 0x28, 0x10e, 0x29, 0x10e, 0x7b, 0x10e, 0x7d, 0x10e,
+ 0x3014, 0x10e, 0x3015, 0x10e, 0x23, 0x10e, 0x26, 0x10e,
+ 0x2a, 0x10e, 0x2b, 0x10e, 0x2d, 0x10e, 0x3c, 0x10e,
+ 0x3e, 0x10e, 0x3d, 0x10e, 0x5c, 0x10e, 0x24, 0x10e,
+ 0x25, 0x10e, 0x40, 0x207, 0x20, 0x64b, 0x205, 0x640,
+ 0x64b, 0x207, 0x20, 0x64c, 0x207, 0x20, 0x64d, 0x207,
+ 0x20, 0x64e, 0x205, 0x640, 0x64e, 0x207, 0x20, 0x64f,
+ 0x205, 0x640, 0x64f, 0x207, 0x20, 0x650, 0x205, 0x640,
+ 0x650, 0x207, 0x20, 0x651, 0x205, 0x640, 0x651, 0x207,
+ 0x20, 0x652, 0x205, 0x640, 0x652, 0x107, 0x621, 0x107,
+ 0x622, 0x106, 0x622, 0x107, 0x623, 0x106, 0x623, 0x107,
+ 0x624, 0x106, 0x624, 0x107, 0x625, 0x106, 0x625, 0x107,
+ 0x626, 0x106, 0x626, 0x104, 0x626, 0x105, 0x626, 0x107,
+ 0x627, 0x106, 0x627, 0x107, 0x628, 0x106, 0x628, 0x104,
+ 0x628, 0x105, 0x628, 0x107, 0x629, 0x106, 0x629, 0x107,
+ 0x62a, 0x106, 0x62a, 0x104, 0x62a, 0x105, 0x62a, 0x107,
+ 0x62b, 0x106, 0x62b, 0x104, 0x62b, 0x105, 0x62b, 0x107,
+ 0x62c, 0x106, 0x62c, 0x104, 0x62c, 0x105, 0x62c, 0x107,
+ 0x62d, 0x106, 0x62d, 0x104, 0x62d, 0x105, 0x62d, 0x107,
+ 0x62e, 0x106, 0x62e, 0x104, 0x62e, 0x105, 0x62e, 0x107,
+ 0x62f, 0x106, 0x62f, 0x107, 0x630, 0x106, 0x630, 0x107,
+ 0x631, 0x106, 0x631, 0x107, 0x632, 0x106, 0x632, 0x107,
+ 0x633, 0x106, 0x633, 0x104, 0x633, 0x105, 0x633, 0x107,
+ 0x634, 0x106, 0x634, 0x104, 0x634, 0x105, 0x634, 0x107,
+ 0x635, 0x106, 0x635, 0x104, 0x635, 0x105, 0x635, 0x107,
+ 0x636, 0x106, 0x636, 0x104, 0x636, 0x105, 0x636, 0x107,
+ 0x637, 0x106, 0x637, 0x104, 0x637, 0x105, 0x637, 0x107,
+ 0x638, 0x106, 0x638, 0x104, 0x638, 0x105, 0x638, 0x107,
+ 0x639, 0x106, 0x639, 0x104, 0x639, 0x105, 0x639, 0x107,
+ 0x63a, 0x106, 0x63a, 0x104, 0x63a, 0x105, 0x63a, 0x107,
+ 0x641, 0x106, 0x641, 0x104, 0x641, 0x105, 0x641, 0x107,
+ 0x642, 0x106, 0x642, 0x104, 0x642, 0x105, 0x642, 0x107,
+ 0x643, 0x106, 0x643, 0x104, 0x643, 0x105, 0x643, 0x107,
+ 0x644, 0x106, 0x644, 0x104, 0x644, 0x105, 0x644, 0x107,
+ 0x645, 0x106, 0x645, 0x104, 0x645, 0x105, 0x645, 0x107,
+ 0x646, 0x106, 0x646, 0x104, 0x646, 0x105, 0x646, 0x107,
+ 0x647, 0x106, 0x647, 0x104, 0x647, 0x105, 0x647, 0x107,
+ 0x648, 0x106, 0x648, 0x107, 0x649, 0x106, 0x649, 0x107,
+ 0x64a, 0x106, 0x64a, 0x104, 0x64a, 0x105, 0x64a, 0x207,
+ 0x644, 0x622, 0x206, 0x644, 0x622, 0x207, 0x644, 0x623,
+ 0x206, 0x644, 0x623, 0x207, 0x644, 0x625, 0x206, 0x644,
+ 0x625, 0x207, 0x644, 0x627, 0x206, 0x644, 0x627, 0x10c,
+ 0x21, 0x10c, 0x22, 0x10c, 0x23, 0x10c, 0x24, 0x10c,
+ 0x25, 0x10c, 0x26, 0x10c, 0x27, 0x10c, 0x28, 0x10c,
+ 0x29, 0x10c, 0x2a, 0x10c, 0x2b, 0x10c, 0x2c, 0x10c,
+ 0x2d, 0x10c, 0x2e, 0x10c, 0x2f, 0x10c, 0x30, 0x10c,
+ 0x31, 0x10c, 0x32, 0x10c, 0x33, 0x10c, 0x34, 0x10c,
+ 0x35, 0x10c, 0x36, 0x10c, 0x37, 0x10c, 0x38, 0x10c,
+ 0x39, 0x10c, 0x3a, 0x10c, 0x3b, 0x10c, 0x3c, 0x10c,
+ 0x3d, 0x10c, 0x3e, 0x10c, 0x3f, 0x10c, 0x40, 0x10c,
+ 0x41, 0x10c, 0x42, 0x10c, 0x43, 0x10c, 0x44, 0x10c,
+ 0x45, 0x10c, 0x46, 0x10c, 0x47, 0x10c, 0x48, 0x10c,
+ 0x49, 0x10c, 0x4a, 0x10c, 0x4b, 0x10c, 0x4c, 0x10c,
+ 0x4d, 0x10c, 0x4e, 0x10c, 0x4f, 0x10c, 0x50, 0x10c,
+ 0x51, 0x10c, 0x52, 0x10c, 0x53, 0x10c, 0x54, 0x10c,
+ 0x55, 0x10c, 0x56, 0x10c, 0x57, 0x10c, 0x58, 0x10c,
+ 0x59, 0x10c, 0x5a, 0x10c, 0x5b, 0x10c, 0x5c, 0x10c,
+ 0x5d, 0x10c, 0x5e, 0x10c, 0x5f, 0x10c, 0x60, 0x10c,
+ 0x61, 0x10c, 0x62, 0x10c, 0x63, 0x10c, 0x64, 0x10c,
+ 0x65, 0x10c, 0x66, 0x10c, 0x67, 0x10c, 0x68, 0x10c,
+ 0x69, 0x10c, 0x6a, 0x10c, 0x6b, 0x10c, 0x6c, 0x10c,
+ 0x6d, 0x10c, 0x6e, 0x10c, 0x6f, 0x10c, 0x70, 0x10c,
+ 0x71, 0x10c, 0x72, 0x10c, 0x73, 0x10c, 0x74, 0x10c,
+ 0x75, 0x10c, 0x76, 0x10c, 0x77, 0x10c, 0x78, 0x10c,
+ 0x79, 0x10c, 0x7a, 0x10c, 0x7b, 0x10c, 0x7c, 0x10c,
+ 0x7d, 0x10c, 0x7e, 0x10c, 0x2985, 0x10c, 0x2986, 0x10d,
+ 0x3002, 0x10d, 0x300c, 0x10d, 0x300d, 0x10d, 0x3001, 0x10d,
+ 0x30fb, 0x10d, 0x30f2, 0x10d, 0x30a1, 0x10d, 0x30a3, 0x10d,
+ 0x30a5, 0x10d, 0x30a7, 0x10d, 0x30a9, 0x10d, 0x30e3, 0x10d,
+ 0x30e5, 0x10d, 0x30e7, 0x10d, 0x30c3, 0x10d, 0x30fc, 0x10d,
+ 0x30a2, 0x10d, 0x30a4, 0x10d, 0x30a6, 0x10d, 0x30a8, 0x10d,
+ 0x30aa, 0x10d, 0x30ab, 0x10d, 0x30ad, 0x10d, 0x30af, 0x10d,
+ 0x30b1, 0x10d, 0x30b3, 0x10d, 0x30b5, 0x10d, 0x30b7, 0x10d,
+ 0x30b9, 0x10d, 0x30bb, 0x10d, 0x30bd, 0x10d, 0x30bf, 0x10d,
+ 0x30c1, 0x10d, 0x30c4, 0x10d, 0x30c6, 0x10d, 0x30c8, 0x10d,
+ 0x30ca, 0x10d, 0x30cb, 0x10d, 0x30cc, 0x10d, 0x30cd, 0x10d,
+ 0x30ce, 0x10d, 0x30cf, 0x10d, 0x30d2, 0x10d, 0x30d5, 0x10d,
+ 0x30d8, 0x10d, 0x30db, 0x10d, 0x30de, 0x10d, 0x30df, 0x10d,
+ 0x30e0, 0x10d, 0x30e1, 0x10d, 0x30e2, 0x10d, 0x30e4, 0x10d,
+ 0x30e6, 0x10d, 0x30e8, 0x10d, 0x30e9, 0x10d, 0x30ea, 0x10d,
+ 0x30eb, 0x10d, 0x30ec, 0x10d, 0x30ed, 0x10d, 0x30ef, 0x10d,
+ 0x30f3, 0x10d, 0x3099, 0x10d, 0x309a, 0x10d, 0x3164, 0x10d,
+ 0x3131, 0x10d, 0x3132, 0x10d, 0x3133, 0x10d, 0x3134, 0x10d,
+ 0x3135, 0x10d, 0x3136, 0x10d, 0x3137, 0x10d, 0x3138, 0x10d,
+ 0x3139, 0x10d, 0x313a, 0x10d, 0x313b, 0x10d, 0x313c, 0x10d,
+ 0x313d, 0x10d, 0x313e, 0x10d, 0x313f, 0x10d, 0x3140, 0x10d,
+ 0x3141, 0x10d, 0x3142, 0x10d, 0x3143, 0x10d, 0x3144, 0x10d,
+ 0x3145, 0x10d, 0x3146, 0x10d, 0x3147, 0x10d, 0x3148, 0x10d,
+ 0x3149, 0x10d, 0x314a, 0x10d, 0x314b, 0x10d, 0x314c, 0x10d,
+ 0x314d, 0x10d, 0x314e, 0x10d, 0x314f, 0x10d, 0x3150, 0x10d,
+ 0x3151, 0x10d, 0x3152, 0x10d, 0x3153, 0x10d, 0x3154, 0x10d,
+ 0x3155, 0x10d, 0x3156, 0x10d, 0x3157, 0x10d, 0x3158, 0x10d,
+ 0x3159, 0x10d, 0x315a, 0x10d, 0x315b, 0x10d, 0x315c, 0x10d,
+ 0x315d, 0x10d, 0x315e, 0x10d, 0x315f, 0x10d, 0x3160, 0x10d,
+ 0x3161, 0x10d, 0x3162, 0x10d, 0x3163, 0x10c, 0xa2, 0x10c,
+ 0xa3, 0x10c, 0xac, 0x10c, 0xaf, 0x10c, 0xa6, 0x10c,
+ 0xa5, 0x10c, 0x20a9, 0x10d, 0x2502, 0x10d, 0x2190, 0x10d,
+ 0x2191, 0x10d, 0x2192, 0x10d, 0x2193, 0x10d, 0x25a0, 0x10d,
+ 0x25cb, 0x401, 0xd804, 0xdc99, 0xd804, 0xdcba, 0x401, 0xd804,
+ 0xdc9b, 0xd804, 0xdcba, 0x401, 0xd804, 0xdca5, 0xd804, 0xdcba,
+ 0x401, 0xd804, 0xdd31, 0xd804, 0xdd27, 0x401, 0xd804, 0xdd32,
+ 0xd804, 0xdd27, 0x401, 0xd804, 0xdf47, 0xd804, 0xdf3e, 0x401,
+ 0xd804, 0xdf47, 0xd804, 0xdf57, 0x401, 0xd805, 0xdcb9, 0xd805,
+ 0xdcba, 0x401, 0xd805, 0xdcb9, 0xd805, 0xdcb0, 0x401, 0xd805,
+ 0xdcb9, 0xd805, 0xdcbd, 0x401, 0xd805, 0xddb8, 0xd805, 0xddaf,
+ 0x401, 0xd805, 0xddb9, 0xd805, 0xddaf, 0x401, 0xd834, 0xdd57,
+ 0xd834, 0xdd65, 0x401, 0xd834, 0xdd58, 0xd834, 0xdd65, 0x401,
+ 0xd834, 0xdd5f, 0xd834, 0xdd6e, 0x401, 0xd834, 0xdd5f, 0xd834,
+ 0xdd6f, 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd70, 0x401, 0xd834,
+ 0xdd5f, 0xd834, 0xdd71, 0x401, 0xd834, 0xdd5f, 0xd834, 0xdd72,
+ 0x401, 0xd834, 0xddb9, 0xd834, 0xdd65, 0x401, 0xd834, 0xddba,
+ 0xd834, 0xdd65, 0x401, 0xd834, 0xddbb, 0xd834, 0xdd6e, 0x401,
+ 0xd834, 0xddbc, 0xd834, 0xdd6e, 0x401, 0xd834, 0xddbb, 0xd834,
+ 0xdd6f, 0x401, 0xd834, 0xddbc, 0xd834, 0xdd6f, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49,
+ 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b,
+ 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49,
+ 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c,
+ 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70,
+ 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74,
+ 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78,
+ 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42,
+ 0x102, 0x43, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46,
+ 0x102, 0x47, 0x102, 0x48, 0x102, 0x49, 0x102, 0x4a,
+ 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d, 0x102, 0x4e,
+ 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51, 0x102, 0x52,
+ 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56,
+ 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a,
+ 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64,
+ 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68,
+ 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c,
+ 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70,
+ 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74,
+ 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78,
+ 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x43,
+ 0x102, 0x44, 0x102, 0x47, 0x102, 0x4a, 0x102, 0x4b,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x53, 0x102, 0x54, 0x102, 0x55, 0x102, 0x56,
+ 0x102, 0x57, 0x102, 0x58, 0x102, 0x59, 0x102, 0x5a,
+ 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64,
+ 0x102, 0x66, 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a,
+ 0x102, 0x6b, 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49,
+ 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b,
+ 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x44, 0x102, 0x45, 0x102, 0x46,
+ 0x102, 0x47, 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c,
+ 0x102, 0x4d, 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50,
+ 0x102, 0x51, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x61, 0x102, 0x62, 0x102, 0x63, 0x102, 0x64,
+ 0x102, 0x65, 0x102, 0x66, 0x102, 0x67, 0x102, 0x68,
+ 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b, 0x102, 0x6c,
+ 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f, 0x102, 0x70,
+ 0x102, 0x71, 0x102, 0x72, 0x102, 0x73, 0x102, 0x74,
+ 0x102, 0x75, 0x102, 0x76, 0x102, 0x77, 0x102, 0x78,
+ 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41, 0x102, 0x42,
+ 0x102, 0x44, 0x102, 0x45, 0x102, 0x46, 0x102, 0x47,
+ 0x102, 0x49, 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c,
+ 0x102, 0x4d, 0x102, 0x4f, 0x102, 0x53, 0x102, 0x54,
+ 0x102, 0x55, 0x102, 0x56, 0x102, 0x57, 0x102, 0x58,
+ 0x102, 0x59, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b,
+ 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49,
+ 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b,
+ 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49,
+ 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b,
+ 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49,
+ 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b,
+ 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49,
+ 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b,
+ 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49,
+ 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b,
+ 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x41,
+ 0x102, 0x42, 0x102, 0x43, 0x102, 0x44, 0x102, 0x45,
+ 0x102, 0x46, 0x102, 0x47, 0x102, 0x48, 0x102, 0x49,
+ 0x102, 0x4a, 0x102, 0x4b, 0x102, 0x4c, 0x102, 0x4d,
+ 0x102, 0x4e, 0x102, 0x4f, 0x102, 0x50, 0x102, 0x51,
+ 0x102, 0x52, 0x102, 0x53, 0x102, 0x54, 0x102, 0x55,
+ 0x102, 0x56, 0x102, 0x57, 0x102, 0x58, 0x102, 0x59,
+ 0x102, 0x5a, 0x102, 0x61, 0x102, 0x62, 0x102, 0x63,
+ 0x102, 0x64, 0x102, 0x65, 0x102, 0x66, 0x102, 0x67,
+ 0x102, 0x68, 0x102, 0x69, 0x102, 0x6a, 0x102, 0x6b,
+ 0x102, 0x6c, 0x102, 0x6d, 0x102, 0x6e, 0x102, 0x6f,
+ 0x102, 0x70, 0x102, 0x71, 0x102, 0x72, 0x102, 0x73,
+ 0x102, 0x74, 0x102, 0x75, 0x102, 0x76, 0x102, 0x77,
+ 0x102, 0x78, 0x102, 0x79, 0x102, 0x7a, 0x102, 0x131,
+ 0x102, 0x237, 0x102, 0x391, 0x102, 0x392, 0x102, 0x393,
+ 0x102, 0x394, 0x102, 0x395, 0x102, 0x396, 0x102, 0x397,
+ 0x102, 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102, 0x39b,
+ 0x102, 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102, 0x39f,
+ 0x102, 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3,
+ 0x102, 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7,
+ 0x102, 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102, 0x3b1,
+ 0x102, 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5,
+ 0x102, 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9,
+ 0x102, 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd,
+ 0x102, 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1,
+ 0x102, 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5,
+ 0x102, 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9,
+ 0x102, 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0,
+ 0x102, 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102, 0x391,
+ 0x102, 0x392, 0x102, 0x393, 0x102, 0x394, 0x102, 0x395,
+ 0x102, 0x396, 0x102, 0x397, 0x102, 0x398, 0x102, 0x399,
+ 0x102, 0x39a, 0x102, 0x39b, 0x102, 0x39c, 0x102, 0x39d,
+ 0x102, 0x39e, 0x102, 0x39f, 0x102, 0x3a0, 0x102, 0x3a1,
+ 0x102, 0x3f4, 0x102, 0x3a3, 0x102, 0x3a4, 0x102, 0x3a5,
+ 0x102, 0x3a6, 0x102, 0x3a7, 0x102, 0x3a8, 0x102, 0x3a9,
+ 0x102, 0x2207, 0x102, 0x3b1, 0x102, 0x3b2, 0x102, 0x3b3,
+ 0x102, 0x3b4, 0x102, 0x3b5, 0x102, 0x3b6, 0x102, 0x3b7,
+ 0x102, 0x3b8, 0x102, 0x3b9, 0x102, 0x3ba, 0x102, 0x3bb,
+ 0x102, 0x3bc, 0x102, 0x3bd, 0x102, 0x3be, 0x102, 0x3bf,
+ 0x102, 0x3c0, 0x102, 0x3c1, 0x102, 0x3c2, 0x102, 0x3c3,
+ 0x102, 0x3c4, 0x102, 0x3c5, 0x102, 0x3c6, 0x102, 0x3c7,
+ 0x102, 0x3c8, 0x102, 0x3c9, 0x102, 0x2202, 0x102, 0x3f5,
+ 0x102, 0x3d1, 0x102, 0x3f0, 0x102, 0x3d5, 0x102, 0x3f1,
+ 0x102, 0x3d6, 0x102, 0x391, 0x102, 0x392, 0x102, 0x393,
+ 0x102, 0x394, 0x102, 0x395, 0x102, 0x396, 0x102, 0x397,
+ 0x102, 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102, 0x39b,
+ 0x102, 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102, 0x39f,
+ 0x102, 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3,
+ 0x102, 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7,
+ 0x102, 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102, 0x3b1,
+ 0x102, 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5,
+ 0x102, 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9,
+ 0x102, 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd,
+ 0x102, 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1,
+ 0x102, 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5,
+ 0x102, 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9,
+ 0x102, 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0,
+ 0x102, 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102, 0x391,
+ 0x102, 0x392, 0x102, 0x393, 0x102, 0x394, 0x102, 0x395,
+ 0x102, 0x396, 0x102, 0x397, 0x102, 0x398, 0x102, 0x399,
+ 0x102, 0x39a, 0x102, 0x39b, 0x102, 0x39c, 0x102, 0x39d,
+ 0x102, 0x39e, 0x102, 0x39f, 0x102, 0x3a0, 0x102, 0x3a1,
+ 0x102, 0x3f4, 0x102, 0x3a3, 0x102, 0x3a4, 0x102, 0x3a5,
+ 0x102, 0x3a6, 0x102, 0x3a7, 0x102, 0x3a8, 0x102, 0x3a9,
+ 0x102, 0x2207, 0x102, 0x3b1, 0x102, 0x3b2, 0x102, 0x3b3,
+ 0x102, 0x3b4, 0x102, 0x3b5, 0x102, 0x3b6, 0x102, 0x3b7,
+ 0x102, 0x3b8, 0x102, 0x3b9, 0x102, 0x3ba, 0x102, 0x3bb,
+ 0x102, 0x3bc, 0x102, 0x3bd, 0x102, 0x3be, 0x102, 0x3bf,
+ 0x102, 0x3c0, 0x102, 0x3c1, 0x102, 0x3c2, 0x102, 0x3c3,
+ 0x102, 0x3c4, 0x102, 0x3c5, 0x102, 0x3c6, 0x102, 0x3c7,
+ 0x102, 0x3c8, 0x102, 0x3c9, 0x102, 0x2202, 0x102, 0x3f5,
+ 0x102, 0x3d1, 0x102, 0x3f0, 0x102, 0x3d5, 0x102, 0x3f1,
+ 0x102, 0x3d6, 0x102, 0x391, 0x102, 0x392, 0x102, 0x393,
+ 0x102, 0x394, 0x102, 0x395, 0x102, 0x396, 0x102, 0x397,
+ 0x102, 0x398, 0x102, 0x399, 0x102, 0x39a, 0x102, 0x39b,
+ 0x102, 0x39c, 0x102, 0x39d, 0x102, 0x39e, 0x102, 0x39f,
+ 0x102, 0x3a0, 0x102, 0x3a1, 0x102, 0x3f4, 0x102, 0x3a3,
+ 0x102, 0x3a4, 0x102, 0x3a5, 0x102, 0x3a6, 0x102, 0x3a7,
+ 0x102, 0x3a8, 0x102, 0x3a9, 0x102, 0x2207, 0x102, 0x3b1,
+ 0x102, 0x3b2, 0x102, 0x3b3, 0x102, 0x3b4, 0x102, 0x3b5,
+ 0x102, 0x3b6, 0x102, 0x3b7, 0x102, 0x3b8, 0x102, 0x3b9,
+ 0x102, 0x3ba, 0x102, 0x3bb, 0x102, 0x3bc, 0x102, 0x3bd,
+ 0x102, 0x3be, 0x102, 0x3bf, 0x102, 0x3c0, 0x102, 0x3c1,
+ 0x102, 0x3c2, 0x102, 0x3c3, 0x102, 0x3c4, 0x102, 0x3c5,
+ 0x102, 0x3c6, 0x102, 0x3c7, 0x102, 0x3c8, 0x102, 0x3c9,
+ 0x102, 0x2202, 0x102, 0x3f5, 0x102, 0x3d1, 0x102, 0x3f0,
+ 0x102, 0x3d5, 0x102, 0x3f1, 0x102, 0x3d6, 0x102, 0x3dc,
+ 0x102, 0x3dd, 0x102, 0x30, 0x102, 0x31, 0x102, 0x32,
+ 0x102, 0x33, 0x102, 0x34, 0x102, 0x35, 0x102, 0x36,
+ 0x102, 0x37, 0x102, 0x38, 0x102, 0x39, 0x102, 0x30,
+ 0x102, 0x31, 0x102, 0x32, 0x102, 0x33, 0x102, 0x34,
+ 0x102, 0x35, 0x102, 0x36, 0x102, 0x37, 0x102, 0x38,
+ 0x102, 0x39, 0x102, 0x30, 0x102, 0x31, 0x102, 0x32,
+ 0x102, 0x33, 0x102, 0x34, 0x102, 0x35, 0x102, 0x36,
+ 0x102, 0x37, 0x102, 0x38, 0x102, 0x39, 0x102, 0x30,
+ 0x102, 0x31, 0x102, 0x32, 0x102, 0x33, 0x102, 0x34,
+ 0x102, 0x35, 0x102, 0x36, 0x102, 0x37, 0x102, 0x38,
+ 0x102, 0x39, 0x102, 0x30, 0x102, 0x31, 0x102, 0x32,
+ 0x102, 0x33, 0x102, 0x34, 0x102, 0x35, 0x102, 0x36,
+ 0x102, 0x37, 0x102, 0x38, 0x102, 0x39, 0x102, 0x627,
+ 0x102, 0x628, 0x102, 0x62c, 0x102, 0x62f, 0x102, 0x648,
+ 0x102, 0x632, 0x102, 0x62d, 0x102, 0x637, 0x102, 0x64a,
+ 0x102, 0x643, 0x102, 0x644, 0x102, 0x645, 0x102, 0x646,
+ 0x102, 0x633, 0x102, 0x639, 0x102, 0x641, 0x102, 0x635,
+ 0x102, 0x642, 0x102, 0x631, 0x102, 0x634, 0x102, 0x62a,
+ 0x102, 0x62b, 0x102, 0x62e, 0x102, 0x630, 0x102, 0x636,
+ 0x102, 0x638, 0x102, 0x63a, 0x102, 0x66e, 0x102, 0x6ba,
+ 0x102, 0x6a1, 0x102, 0x66f, 0x102, 0x628, 0x102, 0x62c,
+ 0x102, 0x647, 0x102, 0x62d, 0x102, 0x64a, 0x102, 0x643,
+ 0x102, 0x644, 0x102, 0x645, 0x102, 0x646, 0x102, 0x633,
+ 0x102, 0x639, 0x102, 0x641, 0x102, 0x635, 0x102, 0x642,
+ 0x102, 0x634, 0x102, 0x62a, 0x102, 0x62b, 0x102, 0x62e,
+ 0x102, 0x636, 0x102, 0x63a, 0x102, 0x62c, 0x102, 0x62d,
+ 0x102, 0x64a, 0x102, 0x644, 0x102, 0x646, 0x102, 0x633,
+ 0x102, 0x639, 0x102, 0x635, 0x102, 0x642, 0x102, 0x634,
+ 0x102, 0x62e, 0x102, 0x636, 0x102, 0x63a, 0x102, 0x6ba,
+ 0x102, 0x66f, 0x102, 0x628, 0x102, 0x62c, 0x102, 0x647,
+ 0x102, 0x62d, 0x102, 0x637, 0x102, 0x64a, 0x102, 0x643,
+ 0x102, 0x645, 0x102, 0x646, 0x102, 0x633, 0x102, 0x639,
+ 0x102, 0x641, 0x102, 0x635, 0x102, 0x642, 0x102, 0x634,
+ 0x102, 0x62a, 0x102, 0x62b, 0x102, 0x62e, 0x102, 0x636,
+ 0x102, 0x638, 0x102, 0x63a, 0x102, 0x66e, 0x102, 0x6a1,
+ 0x102, 0x627, 0x102, 0x628, 0x102, 0x62c, 0x102, 0x62f,
+ 0x102, 0x647, 0x102, 0x648, 0x102, 0x632, 0x102, 0x62d,
+ 0x102, 0x637, 0x102, 0x64a, 0x102, 0x644, 0x102, 0x645,
+ 0x102, 0x646, 0x102, 0x633, 0x102, 0x639, 0x102, 0x641,
+ 0x102, 0x635, 0x102, 0x642, 0x102, 0x631, 0x102, 0x634,
+ 0x102, 0x62a, 0x102, 0x62b, 0x102, 0x62e, 0x102, 0x630,
+ 0x102, 0x636, 0x102, 0x638, 0x102, 0x63a, 0x102, 0x628,
+ 0x102, 0x62c, 0x102, 0x62f, 0x102, 0x648, 0x102, 0x632,
+ 0x102, 0x62d, 0x102, 0x637, 0x102, 0x64a, 0x102, 0x644,
+ 0x102, 0x645, 0x102, 0x646, 0x102, 0x633, 0x102, 0x639,
+ 0x102, 0x641, 0x102, 0x635, 0x102, 0x642, 0x102, 0x631,
+ 0x102, 0x634, 0x102, 0x62a, 0x102, 0x62b, 0x102, 0x62e,
+ 0x102, 0x630, 0x102, 0x636, 0x102, 0x638, 0x102, 0x63a,
+ 0x210, 0x30, 0x2e, 0x210, 0x30, 0x2c, 0x210, 0x31,
+ 0x2c, 0x210, 0x32, 0x2c, 0x210, 0x33, 0x2c, 0x210,
+ 0x34, 0x2c, 0x210, 0x35, 0x2c, 0x210, 0x36, 0x2c,
+ 0x210, 0x37, 0x2c, 0x210, 0x38, 0x2c, 0x210, 0x39,
+ 0x2c, 0x310, 0x28, 0x41, 0x29, 0x310, 0x28, 0x42,
+ 0x29, 0x310, 0x28, 0x43, 0x29, 0x310, 0x28, 0x44,
+ 0x29, 0x310, 0x28, 0x45, 0x29, 0x310, 0x28, 0x46,
+ 0x29, 0x310, 0x28, 0x47, 0x29, 0x310, 0x28, 0x48,
+ 0x29, 0x310, 0x28, 0x49, 0x29, 0x310, 0x28, 0x4a,
+ 0x29, 0x310, 0x28, 0x4b, 0x29, 0x310, 0x28, 0x4c,
+ 0x29, 0x310, 0x28, 0x4d, 0x29, 0x310, 0x28, 0x4e,
+ 0x29, 0x310, 0x28, 0x4f, 0x29, 0x310, 0x28, 0x50,
+ 0x29, 0x310, 0x28, 0x51, 0x29, 0x310, 0x28, 0x52,
+ 0x29, 0x310, 0x28, 0x53, 0x29, 0x310, 0x28, 0x54,
+ 0x29, 0x310, 0x28, 0x55, 0x29, 0x310, 0x28, 0x56,
+ 0x29, 0x310, 0x28, 0x57, 0x29, 0x310, 0x28, 0x58,
+ 0x29, 0x310, 0x28, 0x59, 0x29, 0x310, 0x28, 0x5a,
+ 0x29, 0x310, 0x3014, 0x53, 0x3015, 0x108, 0x43, 0x108,
+ 0x52, 0x208, 0x43, 0x44, 0x208, 0x57, 0x5a, 0x10f,
+ 0x41, 0x10f, 0x42, 0x10f, 0x43, 0x10f, 0x44, 0x10f,
+ 0x45, 0x10f, 0x46, 0x10f, 0x47, 0x10f, 0x48, 0x10f,
+ 0x49, 0x10f, 0x4a, 0x10f, 0x4b, 0x10f, 0x4c, 0x10f,
+ 0x4d, 0x10f, 0x4e, 0x10f, 0x4f, 0x10f, 0x50, 0x10f,
+ 0x51, 0x10f, 0x52, 0x10f, 0x53, 0x10f, 0x54, 0x10f,
+ 0x55, 0x10f, 0x56, 0x10f, 0x57, 0x10f, 0x58, 0x10f,
+ 0x59, 0x10f, 0x5a, 0x20f, 0x48, 0x56, 0x20f, 0x4d,
+ 0x56, 0x20f, 0x53, 0x44, 0x20f, 0x53, 0x53, 0x30f,
+ 0x50, 0x50, 0x56, 0x20f, 0x57, 0x43, 0x209, 0x4d,
+ 0x43, 0x209, 0x4d, 0x44, 0x209, 0x4d, 0x52, 0x20f,
+ 0x44, 0x4a, 0x20f, 0x307b, 0x304b, 0x20f, 0x30b3, 0x30b3,
+ 0x10f, 0x30b5, 0x10f, 0x624b, 0x10f, 0x5b57, 0x10f, 0x53cc,
+ 0x10f, 0x30c7, 0x10f, 0x4e8c, 0x10f, 0x591a, 0x10f, 0x89e3,
+ 0x10f, 0x5929, 0x10f, 0x4ea4, 0x10f, 0x6620, 0x10f, 0x7121,
+ 0x10f, 0x6599, 0x10f, 0x524d, 0x10f, 0x5f8c, 0x10f, 0x518d,
+ 0x10f, 0x65b0, 0x10f, 0x521d, 0x10f, 0x7d42, 0x10f, 0x751f,
+ 0x10f, 0x8ca9, 0x10f, 0x58f0, 0x10f, 0x5439, 0x10f, 0x6f14,
+ 0x10f, 0x6295, 0x10f, 0x6355, 0x10f, 0x4e00, 0x10f, 0x4e09,
+ 0x10f, 0x904a, 0x10f, 0x5de6, 0x10f, 0x4e2d, 0x10f, 0x53f3,
+ 0x10f, 0x6307, 0x10f, 0x8d70, 0x10f, 0x6253, 0x10f, 0x7981,
+ 0x10f, 0x7a7a, 0x10f, 0x5408, 0x10f, 0x6e80, 0x10f, 0x6709,
+ 0x10f, 0x6708, 0x10f, 0x7533, 0x10f, 0x5272, 0x10f, 0x55b6,
+ 0x10f, 0x914d, 0x310, 0x3014, 0x672c, 0x3015, 0x310, 0x3014,
+ 0x4e09, 0x3015, 0x310, 0x3014, 0x4e8c, 0x3015, 0x310, 0x3014,
+ 0x5b89, 0x3015, 0x310, 0x3014, 0x70b9, 0x3015, 0x310, 0x3014,
+ 0x6253, 0x3015, 0x310, 0x3014, 0x76d7, 0x3015, 0x310, 0x3014,
+ 0x52dd, 0x3015, 0x310, 0x3014, 0x6557, 0x3015, 0x108, 0x5f97,
+ 0x108, 0x53ef, 0x101, 0x4e3d, 0x101, 0x4e38, 0x101, 0x4e41,
+ 0x201, 0xd840, 0xdd22, 0x101, 0x4f60, 0x101, 0x4fae, 0x101,
+ 0x4fbb, 0x101, 0x5002, 0x101, 0x507a, 0x101, 0x5099, 0x101,
+ 0x50e7, 0x101, 0x50cf, 0x101, 0x349e, 0x201, 0xd841, 0xde3a,
+ 0x101, 0x514d, 0x101, 0x5154, 0x101, 0x5164, 0x101, 0x5177,
+ 0x201, 0xd841, 0xdd1c, 0x101, 0x34b9, 0x101, 0x5167, 0x101,
+ 0x518d, 0x201, 0xd841, 0xdd4b, 0x101, 0x5197, 0x101, 0x51a4,
+ 0x101, 0x4ecc, 0x101, 0x51ac, 0x101, 0x51b5, 0x201, 0xd864,
+ 0xdddf, 0x101, 0x51f5, 0x101, 0x5203, 0x101, 0x34df, 0x101,
+ 0x523b, 0x101, 0x5246, 0x101, 0x5272, 0x101, 0x5277, 0x101,
+ 0x3515, 0x101, 0x52c7, 0x101, 0x52c9, 0x101, 0x52e4, 0x101,
+ 0x52fa, 0x101, 0x5305, 0x101, 0x5306, 0x101, 0x5317, 0x101,
+ 0x5349, 0x101, 0x5351, 0x101, 0x535a, 0x101, 0x5373, 0x101,
+ 0x537d, 0x101, 0x537f, 0x101, 0x537f, 0x101, 0x537f, 0x201,
+ 0xd842, 0xde2c, 0x101, 0x7070, 0x101, 0x53ca, 0x101, 0x53df,
+ 0x201, 0xd842, 0xdf63, 0x101, 0x53eb, 0x101, 0x53f1, 0x101,
+ 0x5406, 0x101, 0x549e, 0x101, 0x5438, 0x101, 0x5448, 0x101,
+ 0x5468, 0x101, 0x54a2, 0x101, 0x54f6, 0x101, 0x5510, 0x101,
+ 0x5553, 0x101, 0x5563, 0x101, 0x5584, 0x101, 0x5584, 0x101,
+ 0x5599, 0x101, 0x55ab, 0x101, 0x55b3, 0x101, 0x55c2, 0x101,
+ 0x5716, 0x101, 0x5606, 0x101, 0x5717, 0x101, 0x5651, 0x101,
+ 0x5674, 0x101, 0x5207, 0x101, 0x58ee, 0x101, 0x57ce, 0x101,
+ 0x57f4, 0x101, 0x580d, 0x101, 0x578b, 0x101, 0x5832, 0x101,
+ 0x5831, 0x101, 0x58ac, 0x201, 0xd845, 0xdce4, 0x101, 0x58f2,
+ 0x101, 0x58f7, 0x101, 0x5906, 0x101, 0x591a, 0x101, 0x5922,
+ 0x101, 0x5962, 0x201, 0xd845, 0xdea8, 0x201, 0xd845, 0xdeea,
+ 0x101, 0x59ec, 0x101, 0x5a1b, 0x101, 0x5a27, 0x101, 0x59d8,
+ 0x101, 0x5a66, 0x101, 0x36ee, 0x101, 0x36fc, 0x101, 0x5b08,
+ 0x101, 0x5b3e, 0x101, 0x5b3e, 0x201, 0xd846, 0xddc8, 0x101,
+ 0x5bc3, 0x101, 0x5bd8, 0x101, 0x5be7, 0x101, 0x5bf3, 0x201,
+ 0xd846, 0xdf18, 0x101, 0x5bff, 0x101, 0x5c06, 0x101, 0x5f53,
+ 0x101, 0x5c22, 0x101, 0x3781, 0x101, 0x5c60, 0x101, 0x5c6e,
+ 0x101, 0x5cc0, 0x101, 0x5c8d, 0x201, 0xd847, 0xdde4, 0x101,
+ 0x5d43, 0x201, 0xd847, 0xdde6, 0x101, 0x5d6e, 0x101, 0x5d6b,
+ 0x101, 0x5d7c, 0x101, 0x5de1, 0x101, 0x5de2, 0x101, 0x382f,
+ 0x101, 0x5dfd, 0x101, 0x5e28, 0x101, 0x5e3d, 0x101, 0x5e69,
+ 0x101, 0x3862, 0x201, 0xd848, 0xdd83, 0x101, 0x387c, 0x101,
+ 0x5eb0, 0x101, 0x5eb3, 0x101, 0x5eb6, 0x101, 0x5eca, 0x201,
+ 0xd868, 0xdf92, 0x101, 0x5efe, 0x201, 0xd848, 0xdf31, 0x201,
+ 0xd848, 0xdf31, 0x101, 0x8201, 0x101, 0x5f22, 0x101, 0x5f22,
+ 0x101, 0x38c7, 0x201, 0xd84c, 0xdeb8, 0x201, 0xd858, 0xddda,
+ 0x101, 0x5f62, 0x101, 0x5f6b, 0x101, 0x38e3, 0x101, 0x5f9a,
+ 0x101, 0x5fcd, 0x101, 0x5fd7, 0x101, 0x5ff9, 0x101, 0x6081,
+ 0x101, 0x393a, 0x101, 0x391c, 0x101, 0x6094, 0x201, 0xd849,
+ 0xded4, 0x101, 0x60c7, 0x101, 0x6148, 0x101, 0x614c, 0x101,
+ 0x614e, 0x101, 0x614c, 0x101, 0x617a, 0x101, 0x618e, 0x101,
+ 0x61b2, 0x101, 0x61a4, 0x101, 0x61af, 0x101, 0x61de, 0x101,
+ 0x61f2, 0x101, 0x61f6, 0x101, 0x6210, 0x101, 0x621b, 0x101,
+ 0x625d, 0x101, 0x62b1, 0x101, 0x62d4, 0x101, 0x6350, 0x201,
+ 0xd84a, 0xdf0c, 0x101, 0x633d, 0x101, 0x62fc, 0x101, 0x6368,
+ 0x101, 0x6383, 0x101, 0x63e4, 0x201, 0xd84a, 0xdff1, 0x101,
+ 0x6422, 0x101, 0x63c5, 0x101, 0x63a9, 0x101, 0x3a2e, 0x101,
+ 0x6469, 0x101, 0x647e, 0x101, 0x649d, 0x101, 0x6477, 0x101,
+ 0x3a6c, 0x101, 0x654f, 0x101, 0x656c, 0x201, 0xd84c, 0xdc0a,
+ 0x101, 0x65e3, 0x101, 0x66f8, 0x101, 0x6649, 0x101, 0x3b19,
+ 0x101, 0x6691, 0x101, 0x3b08, 0x101, 0x3ae4, 0x101, 0x5192,
+ 0x101, 0x5195, 0x101, 0x6700, 0x101, 0x669c, 0x101, 0x80ad,
+ 0x101, 0x43d9, 0x101, 0x6717, 0x101, 0x671b, 0x101, 0x6721,
+ 0x101, 0x675e, 0x101, 0x6753, 0x201, 0xd84c, 0xdfc3, 0x101,
+ 0x3b49, 0x101, 0x67fa, 0x101, 0x6785, 0x101, 0x6852, 0x101,
+ 0x6885, 0x201, 0xd84d, 0xdc6d, 0x101, 0x688e, 0x101, 0x681f,
+ 0x101, 0x6914, 0x101, 0x3b9d, 0x101, 0x6942, 0x101, 0x69a3,
+ 0x101, 0x69ea, 0x101, 0x6aa8, 0x201, 0xd84d, 0xdea3, 0x101,
+ 0x6adb, 0x101, 0x3c18, 0x101, 0x6b21, 0x201, 0xd84e, 0xdca7,
+ 0x101, 0x6b54, 0x101, 0x3c4e, 0x101, 0x6b72, 0x101, 0x6b9f,
+ 0x101, 0x6bba, 0x101, 0x6bbb, 0x201, 0xd84e, 0xde8d, 0x201,
+ 0xd847, 0xdd0b, 0x201, 0xd84e, 0xdefa, 0x101, 0x6c4e, 0x201,
+ 0xd84f, 0xdcbc, 0x101, 0x6cbf, 0x101, 0x6ccd, 0x101, 0x6c67,
+ 0x101, 0x6d16, 0x101, 0x6d3e, 0x101, 0x6d77, 0x101, 0x6d41,
+ 0x101, 0x6d69, 0x101, 0x6d78, 0x101, 0x6d85, 0x201, 0xd84f,
+ 0xdd1e, 0x101, 0x6d34, 0x101, 0x6e2f, 0x101, 0x6e6e, 0x101,
+ 0x3d33, 0x101, 0x6ecb, 0x101, 0x6ec7, 0x201, 0xd84f, 0xded1,
+ 0x101, 0x6df9, 0x101, 0x6f6e, 0x201, 0xd84f, 0xdf5e, 0x201,
+ 0xd84f, 0xdf8e, 0x101, 0x6fc6, 0x101, 0x7039, 0x101, 0x701e,
+ 0x101, 0x701b, 0x101, 0x3d96, 0x101, 0x704a, 0x101, 0x707d,
+ 0x101, 0x7077, 0x101, 0x70ad, 0x201, 0xd841, 0xdd25, 0x101,
+ 0x7145, 0x201, 0xd850, 0xde63, 0x101, 0x719c, 0x201, 0xd850,
+ 0xdfab, 0x101, 0x7228, 0x101, 0x7235, 0x101, 0x7250, 0x201,
+ 0xd851, 0xde08, 0x101, 0x7280, 0x101, 0x7295, 0x201, 0xd851,
+ 0xdf35, 0x201, 0xd852, 0xdc14, 0x101, 0x737a, 0x101, 0x738b,
+ 0x101, 0x3eac, 0x101, 0x73a5, 0x101, 0x3eb8, 0x101, 0x3eb8,
+ 0x101, 0x7447, 0x101, 0x745c, 0x101, 0x7471, 0x101, 0x7485,
+ 0x101, 0x74ca, 0x101, 0x3f1b, 0x101, 0x7524, 0x201, 0xd853,
+ 0xdc36, 0x101, 0x753e, 0x201, 0xd853, 0xdc92, 0x101, 0x7570,
+ 0x201, 0xd848, 0xdd9f, 0x101, 0x7610, 0x201, 0xd853, 0xdfa1,
+ 0x201, 0xd853, 0xdfb8, 0x201, 0xd854, 0xdc44, 0x101, 0x3ffc,
+ 0x101, 0x4008, 0x101, 0x76f4, 0x201, 0xd854, 0xdcf3, 0x201,
+ 0xd854, 0xdcf2, 0x201, 0xd854, 0xdd19, 0x201, 0xd854, 0xdd33,
+ 0x101, 0x771e, 0x101, 0x771f, 0x101, 0x771f, 0x101, 0x774a,
+ 0x101, 0x4039, 0x101, 0x778b, 0x101, 0x4046, 0x101, 0x4096,
+ 0x201, 0xd855, 0xdc1d, 0x101, 0x784e, 0x101, 0x788c, 0x101,
+ 0x78cc, 0x101, 0x40e3, 0x201, 0xd855, 0xde26, 0x101, 0x7956,
+ 0x201, 0xd855, 0xde9a, 0x201, 0xd855, 0xdec5, 0x101, 0x798f,
+ 0x101, 0x79eb, 0x101, 0x412f, 0x101, 0x7a40, 0x101, 0x7a4a,
+ 0x101, 0x7a4f, 0x201, 0xd856, 0xdd7c, 0x201, 0xd856, 0xdea7,
+ 0x201, 0xd856, 0xdea7, 0x101, 0x7aee, 0x101, 0x4202, 0x201,
+ 0xd856, 0xdfab, 0x101, 0x7bc6, 0x101, 0x7bc9, 0x101, 0x4227,
+ 0x201, 0xd857, 0xdc80, 0x101, 0x7cd2, 0x101, 0x42a0, 0x101,
+ 0x7ce8, 0x101, 0x7ce3, 0x101, 0x7d00, 0x201, 0xd857, 0xdf86,
+ 0x101, 0x7d63, 0x101, 0x4301, 0x101, 0x7dc7, 0x101, 0x7e02,
+ 0x101, 0x7e45, 0x101, 0x4334, 0x201, 0xd858, 0xde28, 0x201,
+ 0xd858, 0xde47, 0x101, 0x4359, 0x201, 0xd858, 0xded9, 0x101,
+ 0x7f7a, 0x201, 0xd858, 0xdf3e, 0x101, 0x7f95, 0x101, 0x7ffa,
+ 0x101, 0x8005, 0x201, 0xd859, 0xdcda, 0x201, 0xd859, 0xdd23,
+ 0x101, 0x8060, 0x201, 0xd859, 0xdda8, 0x101, 0x8070, 0x201,
+ 0xd84c, 0xdf5f, 0x101, 0x43d5, 0x101, 0x80b2, 0x101, 0x8103,
+ 0x101, 0x440b, 0x101, 0x813e, 0x101, 0x5ab5, 0x201, 0xd859,
+ 0xdfa7, 0x201, 0xd859, 0xdfb5, 0x201, 0xd84c, 0xdf93, 0x201,
+ 0xd84c, 0xdf9c, 0x101, 0x8201, 0x101, 0x8204, 0x101, 0x8f9e,
+ 0x101, 0x446b, 0x101, 0x8291, 0x101, 0x828b, 0x101, 0x829d,
+ 0x101, 0x52b3, 0x101, 0x82b1, 0x101, 0x82b3, 0x101, 0x82bd,
+ 0x101, 0x82e6, 0x201, 0xd85a, 0xdf3c, 0x101, 0x82e5, 0x101,
+ 0x831d, 0x101, 0x8363, 0x101, 0x83ad, 0x101, 0x8323, 0x101,
+ 0x83bd, 0x101, 0x83e7, 0x101, 0x8457, 0x101, 0x8353, 0x101,
+ 0x83ca, 0x101, 0x83cc, 0x101, 0x83dc, 0x201, 0xd85b, 0xdc36,
+ 0x201, 0xd85b, 0xdd6b, 0x201, 0xd85b, 0xdcd5, 0x101, 0x452b,
+ 0x101, 0x84f1, 0x101, 0x84f3, 0x101, 0x8516, 0x201, 0xd85c,
+ 0xdfca, 0x101, 0x8564, 0x201, 0xd85b, 0xdf2c, 0x101, 0x455d,
+ 0x101, 0x4561, 0x201, 0xd85b, 0xdfb1, 0x201, 0xd85c, 0xdcd2,
+ 0x101, 0x456b, 0x101, 0x8650, 0x101, 0x865c, 0x101, 0x8667,
+ 0x101, 0x8669, 0x101, 0x86a9, 0x101, 0x8688, 0x101, 0x870e,
+ 0x101, 0x86e2, 0x101, 0x8779, 0x101, 0x8728, 0x101, 0x876b,
+ 0x101, 0x8786, 0x101, 0x45d7, 0x101, 0x87e1, 0x101, 0x8801,
+ 0x101, 0x45f9, 0x101, 0x8860, 0x101, 0x8863, 0x201, 0xd85d,
+ 0xde67, 0x101, 0x88d7, 0x101, 0x88de, 0x101, 0x4635, 0x101,
+ 0x88fa, 0x101, 0x34bb, 0x201, 0xd85e, 0xdcae, 0x201, 0xd85e,
+ 0xdd66, 0x101, 0x46be, 0x101, 0x46c7, 0x101, 0x8aa0, 0x101,
+ 0x8aed, 0x101, 0x8b8a, 0x101, 0x8c55, 0x201, 0xd85f, 0xdca8,
+ 0x101, 0x8cab, 0x101, 0x8cc1, 0x101, 0x8d1b, 0x101, 0x8d77,
+ 0x201, 0xd85f, 0xdf2f, 0x201, 0xd842, 0xdc04, 0x101, 0x8dcb,
+ 0x101, 0x8dbc, 0x101, 0x8df0, 0x201, 0xd842, 0xdcde, 0x101,
+ 0x8ed4, 0x101, 0x8f38, 0x201, 0xd861, 0xddd2, 0x201, 0xd861,
+ 0xdded, 0x101, 0x9094, 0x101, 0x90f1, 0x101, 0x9111, 0x201,
+ 0xd861, 0xdf2e, 0x101, 0x911b, 0x101, 0x9238, 0x101, 0x92d7,
+ 0x101, 0x92d8, 0x101, 0x927c, 0x101, 0x93f9, 0x101, 0x9415,
+ 0x201, 0xd862, 0xdffa, 0x101, 0x958b, 0x101, 0x4995, 0x101,
+ 0x95b7, 0x201, 0xd863, 0xdd77, 0x101, 0x49e6, 0x101, 0x96c3,
+ 0x101, 0x5db2, 0x101, 0x9723, 0x201, 0xd864, 0xdd45, 0x201,
+ 0xd864, 0xde1a, 0x101, 0x4a6e, 0x101, 0x4a76, 0x101, 0x97e0,
+ 0x201, 0xd865, 0xdc0a, 0x101, 0x4ab2, 0x201, 0xd865, 0xdc96,
+ 0x101, 0x980b, 0x101, 0x980b, 0x101, 0x9829, 0x201, 0xd865,
+ 0xddb6, 0x101, 0x98e2, 0x101, 0x4b33, 0x101, 0x9929, 0x101,
+ 0x99a7, 0x101, 0x99c2, 0x101, 0x99fe, 0x101, 0x4bce, 0x201,
+ 0xd866, 0xdf30, 0x101, 0x9b12, 0x101, 0x9c40, 0x101, 0x9cfd,
+ 0x101, 0x4cce, 0x101, 0x4ced, 0x101, 0x9d67, 0x201, 0xd868,
+ 0xdcce, 0x101, 0x4cf8, 0x201, 0xd868, 0xdd05, 0x201, 0xd868,
+ 0xde0e, 0x201, 0xd868, 0xde91, 0x101, 0x9ebb, 0x101, 0x4d56,
+ 0x101, 0x9ef9, 0x101, 0x9efe, 0x101, 0x9f05, 0x101, 0x9f0f,
+ 0x101, 0x9f16, 0x101, 0x9f3b, 0x201, 0xd869, 0xde00
};
static const unsigned short uc_ligature_trie[] = {
diff --git a/src/corelib/text/qunicodetables_p.h b/src/corelib/text/qunicodetables_p.h
index c453ef53e7..81efc09773 100644
--- a/src/corelib/text/qunicodetables_p.h
+++ b/src/corelib/text/qunicodetables_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -37,7 +37,7 @@
**
****************************************************************************/
-/* This file is autogenerated from the Unicode 10.0 database. Do not edit */
+/* This file is autogenerated from the Unicode 12.1 database. Do not edit */
//
// W A R N I N G
@@ -59,7 +59,7 @@
QT_BEGIN_NAMESPACE
-#define UNICODE_DATA_VERSION QChar::Unicode_10_0
+#define UNICODE_DATA_VERSION QChar::Unicode_12_1
namespace QUnicodeTables {
@@ -122,7 +122,8 @@ enum GraphemeBreakClass {
Graphemebreak_E_Modifier,
Graphemebreak_Glue_After_Zwj,
Graphemebreak_E_Base_GAZ,
- NumGraphemeBreakClasses,
+
+ NumGraphemeBreakClasses
};
enum WordBreakClass {
@@ -148,7 +149,9 @@ enum WordBreakClass {
WordBreak_E_Modifier,
WordBreak_Glue_After_Zwj,
WordBreak_E_Base_GAZ,
- NumWordBreakClasses,
+ WordBreak_WSegSpace,
+
+ NumWordBreakClasses
};
enum SentenceBreakClass {
@@ -166,6 +169,7 @@ enum SentenceBreakClass {
SentenceBreak_SContinue,
SentenceBreak_STerm,
SentenceBreak_Close,
+
NumSentenceBreakClasses
};
@@ -181,6 +185,7 @@ enum LineBreakClass {
LineBreak_EB, LineBreak_EM, LineBreak_ZWJ,
LineBreak_SA, LineBreak_SG, LineBreak_SP,
LineBreak_CR, LineBreak_LF, LineBreak_BK,
+
NumLineBreakClasses
};
diff --git a/src/corelib/text/qunicodetools.cpp b/src/corelib/text/qunicodetools.cpp
index 08e1146c59..0db3dc74c6 100644
--- a/src/corelib/text/qunicodetools.cpp
+++ b/src/corelib/text/qunicodetools.cpp
@@ -164,29 +164,30 @@ enum Action {
};
static const uchar breakTable[QUnicodeTables::NumWordBreakClasses][QUnicodeTables::NumWordBreakClasses] = {
-// Any CR LF Newline Extend ZWJ Format RI Katakana HLetter ALetter SQuote DQuote MidNumLet MidLetter MidNum Numeric ExtNumLet E_Base E_Mod GAZ EBG
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Any
- { Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // CR
- { Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // LF
- { Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Newline
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Extend
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , NoBreak, NoBreak }, // ZWJ
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Format
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // RegionalIndicator
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , NoBreak, Break , Break , Break , Break }, // Katakana
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , NoBreak, NoBreak, LookupW, Lookup , LookupW, LookupW, Break , NoBreak, NoBreak, Break , Break , Break , Break }, // HebrewLetter
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , NoBreak, NoBreak, LookupW, Break , LookupW, LookupW, Break , NoBreak, NoBreak, Break , Break , Break , Break }, // ALetter
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // SingleQuote
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // DoubleQuote
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // MidNumLet
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // MidLetter
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // MidNum
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , NoBreak, NoBreak, Lookup , Break , Lookup , Break , Lookup , NoBreak, NoBreak, Break , Break , Break , Break }, // Numeric
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , NoBreak, NoBreak, Break , Break , Break , Break }, // ExtendNumLet
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , NoBreak, Break , Break }, // E_Base
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // E_Mod
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // GAZ
- { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , NoBreak, Break , Break }, // EBG
+// Any CR LF Newline Extend ZWJ Format RI Katakana HLetter ALetter SQuote DQuote MidNumLet MidLetter MidNum Numeric ExtNumLet E_Base E_Mod GAZ EBG WSeg
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Any
+ { Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // CR
+ { Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // LF
+ { Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Newline
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Extend
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , NoBreak, NoBreak, Break }, // ZWJ
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Format
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // RegionalIndicator
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , NoBreak, Break , Break , Break , Break , Break }, // Katakana
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , NoBreak, NoBreak, LookupW, Lookup , LookupW, LookupW, Break , NoBreak, NoBreak, Break , Break , Break , Break , Break }, // HebrewLetter
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , NoBreak, NoBreak, LookupW, Break , LookupW, LookupW, Break , NoBreak, NoBreak, Break , Break , Break , Break , Break }, // ALetter
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // SingleQuote
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // DoubleQuote
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // MidNumLet
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // MidLetter
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // MidNum
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , NoBreak, NoBreak, Lookup , Break , Lookup , Break , Lookup , NoBreak, NoBreak, Break , Break , Break , Break , Break }, // Numeric
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , NoBreak, NoBreak, Break , Break , Break , Break , Break }, // ExtendNumLet
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , NoBreak, Break , Break , Break }, // E_Base
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // E_Mod
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // GAZ
+ { Break , Break , Break , Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , NoBreak, Break , Break , Break }, // EBG
+ { Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // WSeg
};
} // namespace WB
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h
index 9804e60119..c9c95cf6ce 100644
--- a/src/corelib/thread/qbasicatomic.h
+++ b/src/corelib/thread/qbasicatomic.h
@@ -47,9 +47,9 @@
# include <QtCore/qatomic_bootstrap.h>
// If C++11 atomics are supported, use them!
-// Note that constexpr support is sometimes disabled in QNX builds but its
-// library has <atomic>.
-#elif defined(Q_COMPILER_ATOMICS) && (defined(Q_COMPILER_CONSTEXPR) || defined(Q_OS_QNX))
+// Note that constexpr support is sometimes disabled in QNX or INTEGRITY builds,
+// but their libraries have <atomic>.
+#elif defined(Q_COMPILER_ATOMICS) && (defined(Q_COMPILER_CONSTEXPR) || defined(Q_OS_QNX) || defined(Q_OS_INTEGRITY))
# include <QtCore/qatomic_cxx11.h>
// We only support one fallback: MSVC, because even on version 2015, it lacks full constexpr support
diff --git a/src/corelib/thread/qexception.cpp b/src/corelib/thread/qexception.cpp
index a3e30d5a7a..f9c63085b7 100644
--- a/src/corelib/thread/qexception.cpp
+++ b/src/corelib/thread/qexception.cpp
@@ -199,7 +199,7 @@ void ExceptionStore::setException(const QException &e)
bool ExceptionStore::hasException() const
{
- return (exceptionHolder.exception() != 0);
+ return (exceptionHolder.exception() != nullptr);
}
ExceptionHolder ExceptionStore::exception()
diff --git a/src/corelib/thread/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp
index 6430f38a3b..f1fd40e7b6 100644
--- a/src/corelib/thread/qfutureinterface.cpp
+++ b/src/corelib/thread/qfutureinterface.cpp
@@ -471,7 +471,7 @@ bool QFutureInterfaceBase::derefT() const
QFutureInterfaceBasePrivate::QFutureInterfaceBasePrivate(QFutureInterfaceBase::State initialState)
: refCount(1), m_progressValue(0), m_progressMinimum(0), m_progressMaximum(0),
state(initialState),
- manualProgress(false), m_expectedResultCount(0), runnable(0), m_pool(0)
+ manualProgress(false), m_expectedResultCount(0), runnable(nullptr), m_pool(nullptr)
{
progressTime.invalidate();
}
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index 9e52f286ee..0508932d68 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -70,7 +70,7 @@ class QRecursiveMutexPrivate : public QMutexData
{
public:
QRecursiveMutexPrivate()
- : QMutexData(QMutex::Recursive), owner(0), count(0) {}
+ : QMutexData(QMutex::Recursive), owner(nullptr), count(0) {}
// written to by the thread that first owns 'mutex';
// read during attempts to acquire ownership of 'mutex' from any other thread:
@@ -186,7 +186,7 @@ public:
*/
QMutex::QMutex(RecursionMode mode)
{
- d_ptr.storeRelaxed(mode == Recursive ? new QRecursiveMutexPrivate : 0);
+ d_ptr.storeRelaxed(mode == Recursive ? new QRecursiveMutexPrivate : nullptr);
}
/*!
@@ -487,7 +487,7 @@ QRecursiveMutex::~QRecursiveMutex()
\fn QMutexLocker::QMutexLocker(QMutex *mutex)
Constructs a QMutexLocker and locks \a mutex. The mutex will be
- unlocked when the QMutexLocker is destroyed. If \a mutex is zero,
+ unlocked when the QMutexLocker is destroyed. If \a mutex is \nullptr,
QMutexLocker does nothing.
\sa QMutex::lock()
@@ -799,7 +799,7 @@ inline void QRecursiveMutexPrivate::unlock() noexcept
if (count > 0) {
count--;
} else {
- owner.storeRelaxed(0);
+ owner.storeRelaxed(nullptr);
mutex.QBasicMutex::unlock();
}
}
diff --git a/src/corelib/thread/qmutex_linux.cpp b/src/corelib/thread/qmutex_linux.cpp
index 3270875471..72002838cf 100644
--- a/src/corelib/thread/qmutex_linux.cpp
+++ b/src/corelib/thread/qmutex_linux.cpp
@@ -106,7 +106,7 @@ static inline QMutexData *dummyFutexValue()
}
template <bool IsTimed> static inline
-bool lockInternal_helper(QBasicAtomicPointer<QMutexData> &d_ptr, int timeout = -1, QElapsedTimer *elapsedTimer = 0) noexcept
+bool lockInternal_helper(QBasicAtomicPointer<QMutexData> &d_ptr, int timeout = -1, QElapsedTimer *elapsedTimer = nullptr) noexcept
{
if (!IsTimed)
timeout = -1;
@@ -175,7 +175,7 @@ void QBasicMutex::unlockInternal() noexcept
Q_UNUSED(d);
Q_ASSERT(!isRecursive());
- d_ptr.storeRelease(0);
+ d_ptr.storeRelease(nullptr);
futexWakeOne(d_ptr);
}
diff --git a/src/corelib/thread/qorderedmutexlocker_p.h b/src/corelib/thread/qorderedmutexlocker_p.h
index 570c526225..83edfd5879 100644
--- a/src/corelib/thread/qorderedmutexlocker_p.h
+++ b/src/corelib/thread/qorderedmutexlocker_p.h
@@ -69,7 +69,7 @@ class QOrderedMutexLocker
public:
QOrderedMutexLocker(QBasicMutex *m1, QBasicMutex *m2)
: mtx1((m1 == m2) ? m1 : (std::less<QBasicMutex *>()(m1, m2) ? m1 : m2)),
- mtx2((m1 == m2) ? 0 : (std::less<QBasicMutex *>()(m1, m2) ? m2 : m1)),
+ mtx2((m1 == m2) ? nullptr : (std::less<QBasicMutex *>()(m1, m2) ? m2 : m1)),
locked(false)
{
relock();
diff --git a/src/corelib/thread/qreadwritelock.cpp b/src/corelib/thread/qreadwritelock.cpp
index 14654986a0..8c28507d5a 100644
--- a/src/corelib/thread/qreadwritelock.cpp
+++ b/src/corelib/thread/qreadwritelock.cpp
@@ -227,7 +227,7 @@ bool QReadWriteLock::tryLockForRead(int timeout)
return true;
while (true) {
- if (d == 0) {
+ if (d == nullptr) {
if (!d_ptr.testAndSetAcquire(nullptr, dummyLockedForRead, d))
continue;
return true;
@@ -341,7 +341,7 @@ bool QReadWriteLock::tryLockForWrite(int timeout)
return true;
while (true) {
- if (d == 0) {
+ if (d == nullptr) {
if (!d_ptr.testAndSetAcquire(d, dummyLockedForWrite, d))
continue;
return true;
@@ -477,7 +477,7 @@ bool QReadWriteLockPrivate::lockForRead(int timeout)
if (elapsed > timeout)
return false;
waitingReaders++;
- readerCond.wait(&mutex, timeout - elapsed);
+ readerCond.wait(&mutex, QDeadlineTimer(timeout - elapsed));
} else {
waitingReaders++;
readerCond.wait(&mutex);
@@ -511,7 +511,7 @@ bool QReadWriteLockPrivate::lockForWrite(int timeout)
return false;
}
waitingWriters++;
- writerCond.wait(&mutex, timeout - elapsed);
+ writerCond.wait(&mutex, QDeadlineTimer(timeout - elapsed));
} else {
waitingWriters++;
writerCond.wait(&mutex);
@@ -581,7 +581,7 @@ void QReadWriteLockPrivate::recursiveUnlock()
if (self == currentWriter) {
if (--writerCount > 0)
return;
- currentWriter = 0;
+ currentWriter = nullptr;
} else {
auto it = currentReaders.find(self);
if (it == currentReaders.end()) {
diff --git a/src/corelib/thread/qresultstore.cpp b/src/corelib/thread/qresultstore.cpp
index 1b3bc20eca..0b82b938e1 100644
--- a/src/corelib/thread/qresultstore.cpp
+++ b/src/corelib/thread/qresultstore.cpp
@@ -192,7 +192,7 @@ int ResultStoreBase::addResults(int index, const void *results, int vectorSize,
ResultItem filteredIn(results, vectorSize);
insertResultItem(index, filteredIn);
}
- ResultItem filteredAway(0, totalCount - vectorSize);
+ ResultItem filteredAway(nullptr, totalCount - vectorSize);
return insertResultItem(index + vectorSize, filteredAway);
}
}
diff --git a/src/corelib/thread/qrunnable.cpp b/src/corelib/thread/qrunnable.cpp
index bd0a32b53d..58a764d407 100644
--- a/src/corelib/thread/qrunnable.cpp
+++ b/src/corelib/thread/qrunnable.cpp
@@ -114,4 +114,31 @@ QRunnable::~QRunnable()
\sa autoDelete(), QThreadPool
*/
+class FunctionRunnable : public QRunnable
+{
+ std::function<void()> m_functor;
+public:
+ FunctionRunnable(std::function<void()> functor) : m_functor(std::move(functor))
+ {
+ }
+ void run() override
+ {
+ m_functor();
+ }
+};
+
+/*!
+ \since 5.15
+
+ Creates a QRunnable that calls \a fun in run().
+
+ Auto-deletion is enabled by default.
+
+ \sa run(), autoDelete()
+*/
+QRunnable *QRunnable::create(std::function<void()> fun)
+{
+ return new FunctionRunnable(std::move(fun));
+}
+
QT_END_NAMESPACE
diff --git a/src/corelib/thread/qrunnable.h b/src/corelib/thread/qrunnable.h
index b8e842118c..c13aa3fa8c 100644
--- a/src/corelib/thread/qrunnable.h
+++ b/src/corelib/thread/qrunnable.h
@@ -41,6 +41,7 @@
#define QRUNNABLE_H
#include <QtCore/qglobal.h>
+#include <functional>
QT_BEGIN_NAMESPACE
@@ -59,6 +60,7 @@ public:
QRunnable() : ref(0) { }
virtual ~QRunnable();
+ static QRunnable *create(std::function<void()> fun);
bool autoDelete() const { return ref != -1; }
void setAutoDelete(bool _autoDelete) { ref = _autoDelete ? 0 : -1; }
diff --git a/src/corelib/thread/qsemaphore.h b/src/corelib/thread/qsemaphore.h
index 58c12997ad..b3b9b52052 100644
--- a/src/corelib/thread/qsemaphore.h
+++ b/src/corelib/thread/qsemaphore.h
@@ -80,8 +80,7 @@ public:
explicit QSemaphoreReleaser(QSemaphore *sem, int n = 1) noexcept
: m_sem(sem), m_n(n) {}
QSemaphoreReleaser(QSemaphoreReleaser &&other) noexcept
- : m_sem(other.m_sem), m_n(other.m_n)
- { other.m_sem = nullptr; }
+ : m_sem(other.cancel()), m_n(other.m_n) {}
QSemaphoreReleaser &operator=(QSemaphoreReleaser &&other) noexcept
{ QSemaphoreReleaser moved(std::move(other)); swap(moved); return *this; }
@@ -102,9 +101,7 @@ public:
QSemaphore *cancel() noexcept
{
- QSemaphore *old = m_sem;
- m_sem = nullptr;
- return old;
+ return qExchange(m_sem, nullptr);
}
private:
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 880ae9e046..d18056063f 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -49,6 +49,8 @@
#include "qthread_p.h"
#include "private/qcoreapplication_p.h"
+#include <limits>
+
QT_BEGIN_NAMESPACE
/*
@@ -57,7 +59,7 @@ QT_BEGIN_NAMESPACE
QThreadData::QThreadData(int initialRefCount)
: _ref(initialRefCount), loopLevel(0), scopeLevel(0),
- eventDispatcher(0),
+ eventDispatcher(nullptr),
quitNow(false), canWait(true), isAdopted(false), requiresCoreApplication(true)
{
// fprintf(stderr, "QThreadData %p created\n", this);
@@ -397,7 +399,7 @@ QThreadPrivate::~QThreadPrivate()
QThread *QThread::currentThread()
{
QThreadData *data = QThreadData::current();
- Q_ASSERT(data != 0);
+ Q_ASSERT(data != nullptr);
return data->thread.loadAcquire();
}
@@ -449,7 +451,7 @@ QThread::~QThread()
if (d->running && !d->finished && !d->data->isAdopted)
qFatal("QThread: Destroyed while thread is still running");
- d->data->thread = 0;
+ d->data->thread = nullptr;
}
}
@@ -612,7 +614,7 @@ void QThread::run()
priority.
The \a priority argument can be any value in the \c
- QThread::Priority enum except for \c InheritPriorty.
+ QThread::Priority enum except for \c InheritPriority.
The effect of the \a priority parameter is dependent on the
operating system's scheduling policy. In particular, the \a priority
@@ -624,6 +626,10 @@ void QThread::run()
*/
void QThread::setPriority(Priority priority)
{
+ if (priority == QThread::InheritPriority) {
+ qWarning("QThread::setPriority: Argument cannot be InheritPriority");
+ return;
+ }
Q_D(QThread);
QMutexLocker locker(&d->mutex);
if (!d->running) {
@@ -726,7 +732,8 @@ QThread::Priority QThread::priority() const
*/
/*!
- \fn bool QThread::wait(unsigned long time)
+ \fn bool QThread::wait(QDeadlineTimer deadline)
+ \since 5.15
Blocks the thread until either of these conditions is met:
@@ -735,12 +742,14 @@ QThread::Priority QThread::priority() const
execution (i.e. when it returns from \l{run()}). This function
will return true if the thread has finished. It also returns
true if the thread has not been started yet.
- \li \a time milliseconds has elapsed. If \a time is ULONG_MAX (the
- default), then the wait will never timeout (the thread must
- return from \l{run()}). This function will return false if the
- wait timed out.
+ \li The \a deadline is reached. This function will return false if the
+ deadline is reached.
\endlist
+ A deadline timer set to \c QDeadlineTimer::Forever (the default) will never
+ time out: in this case, the function only returns when the thread returns
+ from \l{run()} or if the thread has not yet started.
+
This provides similar functionality to the POSIX \c
pthread_join() function.
@@ -833,9 +842,9 @@ void QThread::exit(int returnCode)
}
}
-bool QThread::wait(unsigned long time)
+bool QThread::wait(QDeadlineTimer deadline)
{
- Q_UNUSED(time);
+ Q_UNUSED(deadline);
return false;
}
@@ -966,6 +975,17 @@ void QThread::setEventDispatcher(QAbstractEventDispatcher *eventDispatcher)
}
}
+/*!
+ \fn bool QThread::wait(unsigned long time)
+ \overload
+*/
+bool QThread::wait(unsigned long time)
+{
+ if (time == std::numeric_limits<unsigned long>::max())
+ return wait(QDeadlineTimer(QDeadlineTimer::Forever));
+ return wait(QDeadlineTimer(time));
+}
+
#if QT_CONFIG(thread)
/*!
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h
index c7a6dc8f1a..2072e22340 100644
--- a/src/corelib/thread/qthread.h
+++ b/src/corelib/thread/qthread.h
@@ -42,6 +42,7 @@
#define QTHREAD_H
#include <QtCore/qobject.h>
+#include <QtCore/qdeadlinetimer.h>
// For QThread::create. The configure-time test just checks for the availability
// of std::future and std::async; for the C++17 codepath we perform some extra
@@ -57,8 +58,6 @@
# endif
#endif
-#include <limits.h>
-
QT_BEGIN_NAMESPACE
@@ -135,8 +134,9 @@ public Q_SLOTS:
void quit();
public:
- // default argument causes thread to block indefinetely
- bool wait(unsigned long time = ULONG_MAX);
+ bool wait(QDeadlineTimer deadline = QDeadlineTimer(QDeadlineTimer::Forever));
+ // ### Qt6 inline this function
+ bool wait(unsigned long time);
static void sleep(unsigned long);
static void msleep(unsigned long);
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index cb3c0d6bb1..1da68b3130 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -109,7 +109,7 @@ Q_STATIC_ASSERT(sizeof(pthread_t) <= sizeof(Qt::HANDLE));
enum { ThreadPriorityResetFlag = 0x80000000 };
-static thread_local QThreadData *currentThreadData = 0;
+static thread_local QThreadData *currentThreadData = nullptr;
static pthread_once_t current_thread_data_once = PTHREAD_ONCE_INIT;
static pthread_key_t current_thread_data_key;
@@ -144,7 +144,7 @@ static void destroy_current_thread_data(void *p)
#if defined(Q_OS_VXWORKS)
(void *)1);
#else
- 0);
+ nullptr);
#endif
}
@@ -182,8 +182,8 @@ static void set_thread_data(QThreadData *data)
static void clear_thread_data()
{
- currentThreadData = 0;
- pthread_setspecific(current_thread_data_key, 0);
+ currentThreadData = nullptr;
+ pthread_setspecific(current_thread_data_key, nullptr);
}
template <typename T>
@@ -226,7 +226,7 @@ QThreadData *QThreadData::current(bool createIfNecessary)
} QT_CATCH(...) {
clear_thread_data();
data->deref();
- data = 0;
+ data = nullptr;
QT_RETHROW;
}
data->deref();
@@ -294,7 +294,7 @@ static void setCurrentThreadName(const char *name)
void *QThreadPrivate::start(void *arg)
{
#if !defined(Q_OS_ANDROID)
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
+ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, nullptr);
#endif
pthread_cleanup_push(QThreadPrivate::finish, arg);
@@ -336,7 +336,7 @@ void *QThreadPrivate::start(void *arg)
emit thr->started(QThread::QPrivateSignal());
#if !defined(Q_OS_ANDROID)
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
+ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, nullptr);
pthread_testcancel();
#endif
thr->run();
@@ -360,7 +360,7 @@ void *QThreadPrivate::start(void *arg)
// thrown.
pthread_cleanup_pop(1);
- return 0;
+ return nullptr;
}
void QThreadPrivate::finish(void *arg)
@@ -379,13 +379,13 @@ void QThreadPrivate::finish(void *arg)
void *data = &d->data->tls;
locker.unlock();
emit thr->finished(QThread::QPrivateSignal());
- QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
QThreadStorageData::finish((void **)data);
locker.relock();
QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher.loadRelaxed();
if (eventDispatcher) {
- d->data->eventDispatcher = 0;
+ d->data->eventDispatcher = nullptr;
locker.unlock();
eventDispatcher->closingDown();
delete eventDispatcher;
@@ -751,7 +751,7 @@ void QThread::terminate()
#endif
}
-bool QThread::wait(unsigned long time)
+bool QThread::wait(QDeadlineTimer deadline)
{
Q_D(QThread);
QMutexLocker locker(&d->mutex);
@@ -765,7 +765,7 @@ bool QThread::wait(unsigned long time)
return true;
while (d->running) {
- if (!d->thread_done.wait(locker.mutex(), time))
+ if (!d->thread_done.wait(locker.mutex(), deadline))
return false;
}
return true;
@@ -774,14 +774,14 @@ bool QThread::wait(unsigned long time)
void QThread::setTerminationEnabled(bool enabled)
{
QThread *thr = currentThread();
- Q_ASSERT_X(thr != 0, "QThread::setTerminationEnabled()",
+ Q_ASSERT_X(thr != nullptr, "QThread::setTerminationEnabled()",
"Current thread was not started with QThread.");
Q_UNUSED(thr)
#if defined(Q_OS_ANDROID)
Q_UNUSED(enabled);
#else
- pthread_setcancelstate(enabled ? PTHREAD_CANCEL_ENABLE : PTHREAD_CANCEL_DISABLE, NULL);
+ pthread_setcancelstate(enabled ? PTHREAD_CANCEL_ENABLE : PTHREAD_CANCEL_DISABLE, nullptr);
if (enabled)
pthread_testcancel();
#endif
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index a72df2fc40..bc70e3178a 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -610,7 +610,7 @@ void QThread::terminate()
QThreadPrivate::finish(this, false);
}
-bool QThread::wait(unsigned long time)
+bool QThread::wait(QDeadlineTimer deadline)
{
Q_D(QThread);
QMutexLocker locker(&d->mutex);
@@ -627,9 +627,9 @@ bool QThread::wait(unsigned long time)
bool ret = false;
#ifndef Q_OS_WINRT
- switch (WaitForSingleObject(d->handle, time)) {
+ switch (WaitForSingleObject(d->handle, deadline.remainingTime())) {
#else
- switch (WaitForSingleObjectEx(d->handle, time, false)) {
+ switch (WaitForSingleObjectEx(d->handle, deadline.remainingTime(), false)) {
#endif
case WAIT_OBJECT_0:
ret = true;
@@ -715,9 +715,7 @@ void QThreadPrivate::setPriority(QThread::Priority threadPriority)
prio = THREAD_PRIORITY_TIME_CRITICAL;
break;
- case QThread::InheritPriority:
default:
- qWarning("QThread::setPriority: Argument cannot be InheritPriority");
return;
}
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
index 4d2389f699..d1875a69a9 100644
--- a/src/corelib/thread/qthreadpool.cpp
+++ b/src/corelib/thread/qthreadpool.cpp
@@ -136,7 +136,7 @@ void QThreadPoolThread::run()
manager->waitingThreads.enqueue(this);
registerThreadInactive();
// wait for work, exiting after the expiry timeout is reached
- runnableReady.wait(locker.mutex(), manager->expiryTimeout);
+ runnableReady.wait(locker.mutex(), QDeadlineTimer(manager->expiryTimeout));
++manager->activeThreads;
if (manager->waitingThreads.removeOne(this))
expired = true;
@@ -512,6 +512,22 @@ void QThreadPool::start(QRunnable *runnable, int priority)
}
/*!
+ \overload
+ \since 5.15
+
+ Reserves a thread and uses it to run \a fun, unless this thread will
+ make the current thread count exceed maxThreadCount(). In that case,
+ \a fun is added to a run queue instead. The \a priority argument can
+ be used to control the run queue's order of execution.
+*/
+void QThreadPool::start(std::function<void()> fun, int priority)
+{
+ if (!fun)
+ return;
+ start(QRunnable::create(std::move(fun)), priority);
+}
+
+/*!
Attempts to reserve a thread to run \a runnable.
If no threads are available at the time of calling, then this function
@@ -542,6 +558,22 @@ bool QThreadPool::tryStart(QRunnable *runnable)
return d->tryStart(runnable);
}
+/*!
+ \overload
+ \since 5.15
+ Attempts to reserve a thread to run \a fun.
+
+ If no threads are available at the time of calling, then this function
+ does nothing and returns \c false. Otherwise, \a fun is run immediately
+ using one available thread and this function returns \c true.
+*/
+bool QThreadPool::tryStart(std::function<void()> fun)
+{
+ if (!fun)
+ return false;
+ return tryStart(QRunnable::create(std::move(fun)));
+}
+
/*! \property QThreadPool::expiryTimeout
Threads that are unused for \a expiryTimeout milliseconds are considered
diff --git a/src/corelib/thread/qthreadpool.h b/src/corelib/thread/qthreadpool.h
index cd27b7c08a..2eede44eca 100644
--- a/src/corelib/thread/qthreadpool.h
+++ b/src/corelib/thread/qthreadpool.h
@@ -45,6 +45,8 @@
#include <QtCore/qthread.h>
#include <QtCore/qrunnable.h>
+#include <functional>
+
QT_REQUIRE_CONFIG(thread);
QT_BEGIN_NAMESPACE
@@ -70,6 +72,9 @@ public:
void start(QRunnable *runnable, int priority = 0);
bool tryStart(QRunnable *runnable);
+ void start(std::function<void()> fun, int priority = 0);
+ bool tryStart(std::function<void()> fun);
+
int expiryTimeout() const;
void setExpiryTimeout(int expiryTimeout);
diff --git a/src/corelib/thread/qthreadstorage.cpp b/src/corelib/thread/qthreadstorage.cpp
index fdc484d2d2..464559ffa5 100644
--- a/src/corelib/thread/qthreadstorage.cpp
+++ b/src/corelib/thread/qthreadstorage.cpp
@@ -116,7 +116,7 @@ void **QThreadStorageData::get() const
QThreadData *data = QThreadData::current();
if (!data) {
qWarning("QThreadStorage::get: QThreadStorage can only be used with threads started with QThread");
- return 0;
+ return nullptr;
}
QVector<void *> &tls = data->tls;
if (tls.size() <= id)
@@ -128,7 +128,7 @@ void **QThreadStorageData::get() const
*v,
data->thread.loadRelaxed());
- return *v ? v : 0;
+ return *v ? v : nullptr;
}
void **QThreadStorageData::set(void *p)
@@ -136,7 +136,7 @@ void **QThreadStorageData::set(void *p)
QThreadData *data = QThreadData::current();
if (!data) {
qWarning("QThreadStorage::set: QThreadStorage can only be used with threads started with QThread");
- return 0;
+ return nullptr;
}
QVector<void *> &tls = data->tls;
if (tls.size() <= id)
@@ -144,7 +144,7 @@ void **QThreadStorageData::set(void *p)
void *&value = tls[id];
// delete any previous data
- if (value != 0) {
+ if (value != nullptr) {
DEBUG_MSG("QThreadStorageData: Deleting previous storage %d, data %p, for thread %p",
id,
value,
@@ -156,7 +156,7 @@ void **QThreadStorageData::set(void *p)
locker.unlock();
void *q = value;
- value = 0;
+ value = nullptr;
if (destructor)
destructor(q);
@@ -178,7 +178,7 @@ void QThreadStorageData::finish(void **p)
while (!tls->isEmpty()) {
void *&value = tls->last();
void *q = value;
- value = 0;
+ value = nullptr;
int i = tls->size() - 1;
tls->resize(i);
diff --git a/src/corelib/thread/qwaitcondition.h b/src/corelib/thread/qwaitcondition.h
index 11520e4cfe..0a47ac3717 100644
--- a/src/corelib/thread/qwaitcondition.h
+++ b/src/corelib/thread/qwaitcondition.h
@@ -40,15 +40,12 @@
#ifndef QWAITCONDITION_H
#define QWAITCONDITION_H
-#include <QtCore/qglobal.h>
-
-#include <limits.h>
+#include <QtCore/QDeadlineTimer>
QT_BEGIN_NAMESPACE
#if QT_CONFIG(thread)
-class QDeadlineTimer;
class QWaitConditionPrivate;
class QMutex;
class QReadWriteLock;
@@ -59,11 +56,13 @@ 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);
+ bool wait(QMutex *lockedMutex,
+ QDeadlineTimer deadline = QDeadlineTimer(QDeadlineTimer::Forever));
+ bool wait(QMutex *lockedMutex, unsigned long time);
+
+ bool wait(QReadWriteLock *lockedReadWriteLock,
+ QDeadlineTimer deadline = QDeadlineTimer(QDeadlineTimer::Forever));
+ bool wait(QReadWriteLock *lockedReadWriteLock, unsigned long time);
void wakeOne();
void wakeAll();
@@ -80,21 +79,26 @@ private:
#else
class QMutex;
+class QReadWriteLock;
+
class Q_CORE_EXPORT QWaitCondition
{
public:
QWaitCondition() {}
~QWaitCondition() {}
- bool wait(QMutex *mutex, unsigned long time = ULONG_MAX)
- {
- Q_UNUSED(mutex);
- Q_UNUSED(time);
- return true;
- }
+ bool wait(QMutex *, QDeadlineTimer = QDeadlineTimer(QDeadlineTimer::Forever))
+ { return true; }
+ bool wait(QReadWriteLock *, QDeadlineTimer = QDeadlineTimer(QDeadlineTimer::Forever))
+ { return true; }
+ bool wait(QMutex *, unsigned long) { return true; }
+ bool wait(QReadWriteLock *, unsigned long) { return true; }
void wakeOne() {}
void wakeAll() {}
+
+ void notify_one() { wakeOne(); }
+ void notify_all() { wakeAll(); }
};
#endif // QT_CONFIG(thread)
diff --git a/src/corelib/thread/qwaitcondition.qdoc b/src/corelib/thread/qwaitcondition.qdoc
index eebc28f059..014d549477 100644
--- a/src/corelib/thread/qwaitcondition.qdoc
+++ b/src/corelib/thread/qwaitcondition.qdoc
@@ -121,8 +121,18 @@
/*!
\fn bool QWaitCondition::wait(QMutex *lockedMutex, unsigned long time)
+ \overload
+*/
+/*!
+ \fn bool QWaitCondition::wait(QReadWriteLock *lockedReadWriteLock, unsigned long time)
+ \overload
+*/
- Releases the \a lockedMutex and waits on the wait condition. The
+/*!
+ \fn bool QWaitCondition::wait(QMutex *lockedMutex, QDeadlineTimer deadline)
+ \since 5.12
+
+ Releases the \a lockedMutex and waits on the wait condition. The
\a lockedMutex must be initially locked by the calling thread. If \a
lockedMutex is not in a locked state, the behavior is undefined. If
\a lockedMutex is a recursive mutex, this function
@@ -132,10 +142,10 @@
\list
\li Another thread signals it using wakeOne() or wakeAll(). This
function will return true in this case.
- \li \a time milliseconds has elapsed. If \a time is \c ULONG_MAX
- (the default), then the wait will never timeout (the event
- must be signalled). This function will return false if the
- wait timed out.
+ \li the deadline given by \a deadline is reached. If \a deadline is
+ \c QDeadlineTimer::Forever (the default), then the wait will never
+ timeout (the event must be signalled). This function will return
+ false if the wait timed out.
\endlist
The \a lockedMutex will be returned to the same locked state. This
@@ -146,8 +156,8 @@
*/
/*!
- \fn bool QWaitCondition::wait(QReadWriteLock *lockedReadWriteLock, unsigned long time)
- \since 4.4
+ \fn bool QWaitCondition::wait(QReadWriteLock *lockedReadWriteLock, QDeadlineTimer deadline)
+ \since 5.12
Releases the \a lockedReadWriteLock and waits on the wait
condition. The \a lockedReadWriteLock must be initially locked by the
@@ -160,10 +170,10 @@
\list
\li Another thread signals it using wakeOne() or wakeAll(). This
function will return true in this case.
- \li \a time milliseconds has elapsed. If \a time is \c ULONG_MAX
- (the default), then the wait will never timeout (the event
- must be signalled). This function will return false if the
- wait timed out.
+ \li the deadline given by \a deadline is reached. If \a deadline is
+ \c QDeadlineTimer::Forever (the default), then the wait will never
+ timeout (the event must be signalled). This function will return
+ false if the wait timed out.
\endlist
The \a lockedReadWriteLock will be returned to the same locked
diff --git a/src/corelib/thread/qwaitcondition_p.h b/src/corelib/thread/qwaitcondition_p.h
new file mode 100644
index 0000000000..5133e52e92
--- /dev/null
+++ b/src/corelib/thread/qwaitcondition_p.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
+** Contact: http://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 QWAITCONDITION_P_H
+#define QWAITCONDITION_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qmutex.cpp, qmutex_unix.cpp, and qmutex_win.cpp. This header
+// file may change from version to version without notice, or even be
+// removed.
+//
+// We mean it.
+//
+
+#include <QtCore/QWaitCondition>
+#include <QtCore/QMutex>
+#include <QtCore/QDeadlineTimer>
+
+#include <condition_variable>
+#include <mutex>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtPrivate
+{
+
+#if defined(Q_OS_INTEGRITY)
+
+class condition_variable;
+
+class mutex : private QMutex
+{
+ friend class QtPrivate::condition_variable;
+public:
+ // all special member functions are ok!
+ // do not expose the (QMutex::Recursive) ctor
+ // don't use 'using QMutex::lock;' etc as those have the wrong noexcept
+
+ void lock() { return QMutex::lock(); }
+ void unlock() { return QMutex::unlock(); }
+ bool try_lock() { return QMutex::tryLock(); }
+};
+
+class condition_variable : private QWaitCondition
+{
+public:
+ // all special member functions are ok!
+
+ void notify_one() { QWaitCondition::wakeOne(); }
+ void notify_all() { QWaitCondition::wakeAll(); }
+
+ void wait(std::unique_lock<QtPrivate::mutex> &lock) { QWaitCondition::wait(lock.mutex()); }
+ template <class Predicate>
+ void wait(std::unique_lock<QtPrivate::mutex> &lock, Predicate p)
+ {
+ while (!p())
+ wait(lock);
+ }
+
+ template <typename Rep, typename Period>
+ std::cv_status wait_for(std::unique_lock<QtPrivate::mutex> &lock,
+ const std::chrono::duration<Rep, Period> &d)
+ {
+ return QWaitCondition::wait(lock.mutex(), QDeadlineTimer{d})
+ ? std::cv_status::no_timeout
+ : std::cv_status::timeout;
+ }
+ template <typename Rep, typename Period, typename Predicate>
+ bool wait_for(std::unique_lock<QtPrivate::mutex> &lock,
+ const std::chrono::duration<Rep, Period> &d, Predicate p)
+ {
+ const auto timer = QDeadlineTimer{d};
+ while (!p()) {
+ if (!QWaitCondition::wait(lock.mutex(), timer))
+ return p();
+ }
+ return true;
+ }
+
+ template <typename Clock, typename Duration>
+ std::cv_status wait_until(std::unique_lock<QtPrivate::mutex> &lock,
+ const std::chrono::time_point<Clock, Duration> &t)
+ {
+ return QWaitCondition::wait(lock.mutex(), QDeadlineTimer{t})
+ ? std::cv_status::no_timeout
+ : std::cv_status::timeout;
+ }
+
+ template <typename Clock, typename Duration, typename Predicate>
+ bool wait_until(std::unique_lock<QtPrivate::mutex> &lock,
+ const std::chrono::time_point<Clock, Duration> &t, Predicate p)
+ {
+ const auto timer = QDeadlineTimer{t};
+ while (!p()) {
+ if (!QWaitCondition::wait(lock.mutex(), timer))
+ return p();
+ }
+ return true;
+ }
+
+};
+
+#else // Integrity
+
+using mutex = std::mutex;
+using condition_variable = std::condition_variable;
+
+#endif // Integrity
+
+} // namespace QtPrivate
+
+QT_END_NAMESPACE
+
+#endif /* QWAITCONDITION_P_H */
diff --git a/src/corelib/thread/qwaitcondition_unix.cpp b/src/corelib/thread/qwaitcondition_unix.cpp
index dd7475cec5..88b058f410 100644
--- a/src/corelib/thread/qwaitcondition_unix.cpp
+++ b/src/corelib/thread/qwaitcondition_unix.cpp
@@ -173,7 +173,7 @@ public:
QWaitCondition::QWaitCondition()
{
d = new QWaitConditionPrivate;
- report_error(pthread_mutex_init(&d->mutex, NULL), "QWaitCondition", "mutex init");
+ report_error(pthread_mutex_init(&d->mutex, nullptr), "QWaitCondition", "mutex init");
qt_initialize_pthread_cond(&d->cond, "QWaitCondition");
d->waiters = d->wakeups = 0;
}
diff --git a/src/corelib/thread/thread.pri b/src/corelib/thread/thread.pri
index 9fc9af0e65..25cf68a324 100644
--- a/src/corelib/thread/thread.pri
+++ b/src/corelib/thread/thread.pri
@@ -6,6 +6,7 @@ HEADERS += \
thread/qrunnable.h \
thread/qthread.h \
thread/qthreadstorage.h \
+ thread/qwaitcondition_p.h \
thread/qwaitcondition.h
SOURCES += \
diff --git a/src/corelib/time/qcalendar.cpp b/src/corelib/time/qcalendar.cpp
index 9d485f181e..32f0a511a3 100644
--- a/src/corelib/time/qcalendar.cpp
+++ b/src/corelib/time/qcalendar.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -750,6 +750,8 @@ int QCalendar::daysInMonth(int month, int year) const
/*!
Returns the number of days in the given \a year.
+
+ Handling of \c Unspecified as \a year is undefined.
*/
int QCalendar::daysInYear(int year) const
{
@@ -758,10 +760,15 @@ int QCalendar::daysInYear(int year) const
/*!
Returns the number of months in the given \a year.
+
+ If \a year is \c Unspecified, returns the maximum number of months in a
+ year.
+
+ \sa maximumMonthsInYear()
*/
int QCalendar::monthsInYear(int year) const
{
- return d ? d->monthsInYear(year) : 0;
+ return d ? year == Unspecified ? d->maximumMonthsInYear() : d->monthsInYear(year) : 0;
}
/*!
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp
index a5761055ed..773280ad68 100644
--- a/src/corelib/time/qdatetime.cpp
+++ b/src/corelib/time/qdatetime.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@@ -1114,11 +1114,6 @@ static QString toStringTextDate(QDate date, QCalendar cal)
return QString();
}
-static QString toStringTextDate(QDate date)
-{
- return toStringTextDate(date, QCalendar());
-}
-
static QString toStringIsoDate(QDate date)
{
const auto parts = QCalendar().partsFromDate(date);
@@ -1129,11 +1124,13 @@ static QString toStringIsoDate(QDate date)
/*!
\fn QString QDate::toString(Qt::DateFormat format) const
+ \fn QString QDate::toString(Qt::DateFormat format, QCalendar cal) const
\overload
- Returns the date as a string. The \a format parameter determines
- the format of the string.
+ Returns the date as a string. The \a format parameter determines the format
+ of the string. If \a cal is supplied, it determines the calendar used to
+ represent the date; it defaults to Gregorian.
If the \a format is Qt::TextDate, the string is formatted in the default
way. The day and month names will be localized names using the system
@@ -1146,18 +1143,16 @@ static QString toStringIsoDate(QDate date)
year, MM is the month of the year (between 01 and 12), and dd is
the day of the month between 01 and 31.
- If the \a format is Qt::SystemLocaleShortDate or
- Qt::SystemLocaleLongDate, the string format depends on the locale
- settings of the system. Identical to calling
- QLocale::system().toString(date, QLocale::ShortFormat) or
- QLocale::system().toString(date, QLocale::LongFormat).
-
- If the \a format is Qt::DefaultLocaleShortDate or
- Qt::DefaultLocaleLongDate, the string format depends on the
- default application locale. This is the locale set with
- QLocale::setDefault(), or the system locale if no default locale
- has been set. Identical to calling
- \l {QLocale::toString()}{QLocale().toString(date, QLocale::ShortFormat) } or
+ The \a format options Qt::SystemLocaleDate, Qt::SystemLocaleShortDate and
+ Qt::SystemLocaleLongDate shall be removed in Qt 6. Their use should be
+ replaced with
+ \l {QLocale::toString()}{QLocale::system().toString(date, QLocale::ShortFormat)} or
+ \l {QLocale::toString()}{QLocale::system().toString(date, QLocale::LongFormat)}.
+
+ The \a format options Qt::LocaleDate, Qt::DefaultLocaleShortDate and
+ Qt::DefaultLocaleLongDate shall be removed in Qt 6. Their use should be
+ replaced with
+ \l {QLocale::toString()}{QLocale().toString(date, QLocale::ShortFormat)} or
\l {QLocale::toString()}{QLocale().toString(date, QLocale::LongFormat)}.
If the \a format is Qt::RFC2822Date, the string is formatted in
@@ -1167,44 +1162,54 @@ static QString toStringIsoDate(QDate date)
If the date is invalid, an empty string will be returned.
\warning The Qt::ISODate format is only valid for years in the
- range 0 to 9999. This restriction may apply to locale-aware
- formats as well, depending on the locale settings.
+ range 0 to 9999.
\sa fromString(), QLocale::toString()
*/
QString QDate::toString(Qt::DateFormat format) const
{
+ return toString(format, QCalendar());
+}
+
+QString QDate::toString(Qt::DateFormat format, QCalendar cal) const
+{
if (!isValid())
return QString();
switch (format) {
+#if QT_DEPRECATED_SINCE(5, 15)
case Qt::SystemLocaleDate:
case Qt::SystemLocaleShortDate:
- return QLocale::system().toString(*this, QLocale::ShortFormat);
+ return QLocale::system().toString(*this, QLocale::ShortFormat, cal);
case Qt::SystemLocaleLongDate:
- return QLocale::system().toString(*this, QLocale::LongFormat);
+ return QLocale::system().toString(*this, QLocale::LongFormat, cal);
case Qt::LocaleDate:
case Qt::DefaultLocaleShortDate:
- return QLocale().toString(*this, QLocale::ShortFormat);
+ return QLocale().toString(*this, QLocale::ShortFormat, cal);
case Qt::DefaultLocaleLongDate:
- return QLocale().toString(*this, QLocale::LongFormat);
+ return QLocale().toString(*this, QLocale::LongFormat, cal);
+#endif // 5.15
case Qt::RFC2822Date:
- return QLocale::c().toString(*this, u"dd MMM yyyy");
+ return QLocale::c().toString(*this, QStringView(u"dd MMM yyyy"), cal);
default:
case Qt::TextDate:
- return toStringTextDate(*this);
+ return toStringTextDate(*this, cal);
case Qt::ISODate:
case Qt::ISODateWithMs:
+ // No calendar dependence
return toStringIsoDate(*this);
}
}
/*!
\fn QString QDate::toString(const QString &format) const
+ \fn QString QDate::toString(const QString &format, QCalendar cal) const
\fn QString QDate::toString(QStringView format) const
+ \fn QString QDate::toString(QStringView format, QCalendar cal) const
- Returns the date as a string. The \a format parameter determines
- the format of the result string.
+ Returns the date as a string. The \a format parameter determines the format
+ of the result string. If \cal is supplied, it determines the calendar used
+ to represent the date; it defaults to Gregorian.
These expressions may be used:
@@ -1259,41 +1264,7 @@ QString QDate::toString(Qt::DateFormat format) const
*/
QString QDate::toString(QStringView format) const
{
- return QLocale::system().toString(*this, format); // QLocale::c() ### Qt6
-}
-
-#if QT_STRINGVIEW_LEVEL < 2
-QString QDate::toString(const QString &format) const
-{
- return toString(qToStringViewIgnoringNull(format));
-}
-#endif
-
-QString QDate::toString(Qt::DateFormat format, QCalendar cal) const
-{
- if (!isValid())
- return QString();
-
- switch (format) {
- case Qt::SystemLocaleDate:
- case Qt::SystemLocaleShortDate:
- return QLocale::system().toString(*this, QLocale::ShortFormat, cal);
- case Qt::SystemLocaleLongDate:
- return QLocale::system().toString(*this, QLocale::LongFormat, cal);
- case Qt::LocaleDate:
- case Qt::DefaultLocaleShortDate:
- return QLocale().toString(*this, QLocale::ShortFormat, cal);
- case Qt::DefaultLocaleLongDate:
- return QLocale().toString(*this, QLocale::LongFormat, cal);
- case Qt::RFC2822Date:
- return QLocale::c().toString(*this, QStringView(u"dd MMM yyyy"), cal);
- default:
- case Qt::TextDate:
- return toStringTextDate(*this, cal);
- case Qt::ISODate:
- case Qt::ISODateWithMs:
- return toStringIsoDate(*this);
- }
+ return toString(format, QCalendar());
}
QString QDate::toString(QStringView format, QCalendar cal) const
@@ -1302,6 +1273,11 @@ QString QDate::toString(QStringView format, QCalendar cal) const
}
#if QT_STRINGVIEW_LEVEL < 2
+QString QDate::toString(const QString &format) const
+{
+ return toString(qToStringViewIgnoringNull(format), QCalendar());
+}
+
QString QDate::toString(const QString &format, QCalendar cal) const
{
return toString(qToStringViewIgnoringNull(format), cal);
@@ -1648,9 +1624,14 @@ ParsedInt readInt(QStringView text)
\a format given, or an invalid date if the string cannot be
parsed.
- Note for Qt::TextDate: It is recommended that you use the
- English short month names (e.g. "Jan"). Although localized month
- names can also be used, they depend on the user's locale settings.
+ Note for Qt::TextDate: It is recommended that you use the English short
+ month names (e.g. "Jan"). Although localized month names can also be used in
+ Qt 5, they depend on the user's locale settings.
+
+ \note Support for localized dates, including the format options
+ Qt::SystemLocaleDate, Qt::SystemLocaleShortDate, Qt::SystemLocaleLongDate,
+ Qt::LocaleDate, Qt::DefaultLocaleShortDate, and Qt::DefaultLocaleLongDate,
+ shall be removed in Qt 6. Use QLocale::toDate() instead.
\sa toString(), QLocale::toDate()
*/
@@ -1661,6 +1642,7 @@ QDate QDate::fromString(const QString &string, Qt::DateFormat format)
return QDate();
switch (format) {
+#if QT_DEPRECATED_SINCE(5, 15)
case Qt::SystemLocaleDate:
case Qt::SystemLocaleShortDate:
return QLocale::system().toDate(string, QLocale::ShortFormat);
@@ -1671,6 +1653,7 @@ QDate QDate::fromString(const QString &string, Qt::DateFormat format)
return QLocale().toDate(string, QLocale::ShortFormat);
case Qt::DefaultLocaleLongDate:
return QLocale().toDate(string, QLocale::LongFormat);
+#endif // 5.15
case Qt::RFC2822Date:
return rfcDateImpl(string).date;
default:
@@ -1783,10 +1766,10 @@ QDate QDate::fromString(const QString &string, const QString &format, QCalendar
{
QDate date;
#if QT_CONFIG(datetimeparser)
- QDateTimeParser dt(QVariant::Date, QDateTimeParser::FromString, cal);
+ QDateTimeParser dt(QMetaType::QDate, QDateTimeParser::FromString, cal);
// dt.setDefaultLocale(QLocale::c()); ### Qt 6
if (dt.parseFormat(format))
- dt.fromString(string, &date, 0);
+ dt.fromString(string, &date, nullptr);
#else
Q_UNUSED(string);
Q_UNUSED(format);
@@ -2022,18 +2005,15 @@ int QTime::msec() const
date, use the \a format Qt::ISODateWithMs, which corresponds to
HH:mm:ss.zzz.
- If the \a format is Qt::SystemLocaleShortDate or
- Qt::SystemLocaleLongDate, the string format depends on the locale
- settings of the system. Identical to calling
- QLocale::system().toString(time, QLocale::ShortFormat) or
- QLocale::system().toString(time, QLocale::LongFormat).
-
- If the \a format is Qt::DefaultLocaleShortDate or
- Qt::DefaultLocaleLongDate, the string format depends on the
- default application locale. This is the locale set with
- QLocale::setDefault(), or the system locale if no default locale
- has been set. Identical to calling
+ The \a format options Qt::SystemLocaleDate:, Qt::SystemLocaleShortDate and
+ Qt::SystemLocaleLongDate shall be removed in Qt 6. Their use should be
+ replaced with:
+ \l {QLocale::toString()}{QLocale::system().toString(time, QLocale::ShortFormat)} or
+ \l {QLocale::toString()}{QLocale::system().toString(time, QLocale::LongFormat)}.
+ The \a format options Qt::LocaleDate, Qt::DefaultLocaleShortDate and
+ Qt::DefaultLocaleLongDate shall be removed in Qt 6. Their use should be
+ replaced with:
\l {QLocale::toString()}{QLocale().toString(time, QLocale::ShortFormat)} or
\l {QLocale::toString()}{QLocale().toString(time, QLocale::LongFormat)}.
@@ -2052,6 +2032,7 @@ QString QTime::toString(Qt::DateFormat format) const
return QString();
switch (format) {
+#if QT_DEPRECATED_SINCE(5, 15)
case Qt::SystemLocaleDate:
case Qt::SystemLocaleShortDate:
return QLocale::system().toString(*this, QLocale::ShortFormat);
@@ -2062,6 +2043,7 @@ QString QTime::toString(Qt::DateFormat format) const
return QLocale().toString(*this, QLocale::ShortFormat);
case Qt::DefaultLocaleLongDate:
return QLocale().toString(*this, QLocale::LongFormat);
+#endif // 5.15
case Qt::ISODateWithMs:
return QString::asprintf("%02d:%02d:%02d.%03d", hour(), minute(), second(), msec());
case Qt::RFC2822Date:
@@ -2437,6 +2419,12 @@ static QTime fromIsoTimeString(QStringView string, Qt::DateFormat format, bool *
fails for the default locale). This should be considered an
implementation detail.
+
+ \note Support for localized dates, including the format options
+ Qt::SystemLocaleDate, Qt::SystemLocaleShortDate, Qt::SystemLocaleLongDate,
+ Qt::LocaleDate, Qt::DefaultLocaleShortDate, and Qt::DefaultLocaleLongDate,
+ shall be removed in Qt 6. Use QLocale::toTime() instead.
+
\sa toString(), QLocale::toTime()
*/
QTime QTime::fromString(const QString &string, Qt::DateFormat format)
@@ -2445,6 +2433,7 @@ QTime QTime::fromString(const QString &string, Qt::DateFormat format)
return QTime();
switch (format) {
+#if QT_DEPRECATED_SINCE(5, 15)
case Qt::SystemLocaleDate:
case Qt::SystemLocaleShortDate:
return QLocale::system().toTime(string, QLocale::ShortFormat);
@@ -2455,6 +2444,7 @@ QTime QTime::fromString(const QString &string, Qt::DateFormat format)
return QLocale().toTime(string, QLocale::ShortFormat);
case Qt::DefaultLocaleLongDate:
return QLocale().toTime(string, QLocale::LongFormat);
+#endif // 5.15
case Qt::RFC2822Date:
return rfcDateImpl(string).time;
case Qt::ISODate:
@@ -2529,10 +2519,10 @@ QTime QTime::fromString(const QString &string, const QString &format)
{
QTime time;
#if QT_CONFIG(datetimeparser)
- QDateTimeParser dt(QVariant::Time, QDateTimeParser::FromString, QCalendar());
+ QDateTimeParser dt(QMetaType::QTime, QDateTimeParser::FromString, QCalendar());
// dt.setDefaultLocale(QLocale::c()); ### Qt 6
if (dt.parseFormat(format))
- dt.fromString(string, 0, &time);
+ dt.fromString(string, nullptr, &time);
#else
Q_UNUSED(string);
Q_UNUSED(format);
@@ -3299,7 +3289,7 @@ inline QDateTime::Data::Data(Qt::TimeSpec spec)
// the structure is too small, we need to detach
d = new QDateTimePrivate;
d->ref.ref();
- d->m_status = mergeSpec(nullptr, spec);
+ d->m_status = mergeSpec({}, spec);
}
}
@@ -3623,15 +3613,18 @@ QDateTime::QDateTime() noexcept(Data::CanBeSmall)
}
+#if QT_DEPRECATED_SINCE(5, 17) // ### Qt 6: remove
/*!
- Constructs a datetime with the given \a date, a valid
- time(00:00:00.000), and sets the timeSpec() to Qt::LocalTime.
-*/
+ Constructs a datetime with the given \a date, using Qt::LocalTime as the
+ timeSpec() and the time at the start of that date.
+ \sa QDate::startOfDay()
+*/
QDateTime::QDateTime(const QDate &date)
- : d(QDateTimePrivate::create(date, QTime(0, 0), Qt::LocalTime, 0))
+ : QDateTime(date.startOfDay(Qt::LocalTime, 0))
{
}
+#endif
/*!
Constructs a datetime with the given \a date and \a time, using
@@ -4287,10 +4280,13 @@ void QDateTime::setTime_t(uint secsSince1Jan1970UTC)
#if QT_CONFIG(datestring) // depends on, so implies, textdate
/*!
\fn QString QDateTime::toString(Qt::DateFormat format) const
+ \fn QString QDateTime::toString(Qt::DateFormat format, QCalendar cal) const
\overload
- Returns the datetime as a string in the \a format given.
+ Returns the datetime as a string in the \a format given. If \cal is
+ supplied, it determines the calendar used to represent the date; it defaults
+ to Gregorian.
If the \a format is Qt::TextDate, the string is formatted in the default
way. The day and month names will be localized names using the system
@@ -4307,19 +4303,17 @@ void QDateTime::setTime_t(uint secsSince1Jan1970UTC)
date, use the \a format Qt::ISODateWithMs, which corresponds to
yyyy-MM-ddTHH:mm:ss.zzz[Z|[+|-]HH:mm].
- If the \a format is Qt::SystemLocaleShortDate or
- Qt::SystemLocaleLongDate, the string format depends on the locale
- settings of the system. Identical to calling
- QLocale::system().toString(datetime, QLocale::ShortFormat) or
- QLocale::system().toString(datetime, QLocale::LongFormat).
+ The \a format options Qt::SystemLocaleDate, Qt::SystemLocaleShortDate and
+ Qt::SystemLocaleLongDate shall be removed in Qt 6. Their use should be
+ replaced with
+ \l {QLocale::toString()}{QLocale::system().toString(datetime, QLocale::ShortFormat)} or
+ \l {QLocale::toString()}{QLocale::system().toString(datetime, QLocale::LongFormat)}.
- If the \a format is Qt::DefaultLocaleShortDate or
- Qt::DefaultLocaleLongDate, the string format depends on the
- default application locale. This is the locale set with
- QLocale::setDefault(), or the system locale if no default locale
- has been set. Identical to calling QLocale().toString(datetime,
- QLocale::ShortFormat) or QLocale().toString(datetime,
- QLocale::LongFormat).
+ The \a format options Qt::LocaleDate, Qt::DefaultLocaleShortDate and
+ Qt::DefaultLocaleLongDate shall be removed in Qt 6. Their use should be
+ replaced with
+ \l {QLocale::toString()}{QLocale().toString(datetime, QLocale::ShortFormat)} or
+ \l {QLocale::toString()}{QLocale().toString(datetime, QLocale::LongFormat)}.
If the \a format is Qt::RFC2822Date, the string is formatted
following \l{RFC 2822}.
@@ -4327,8 +4321,7 @@ void QDateTime::setTime_t(uint secsSince1Jan1970UTC)
If the datetime is invalid, an empty string will be returned.
\warning The Qt::ISODate format is only valid for years in the
- range 0 to 9999. This restriction may apply to locale-aware
- formats as well, depending on the locale settings.
+ range 0 to 9999.
\sa fromString(), QDate::toString(), QTime::toString(),
QLocale::toString()
@@ -4336,30 +4329,37 @@ void QDateTime::setTime_t(uint secsSince1Jan1970UTC)
QString QDateTime::toString(Qt::DateFormat format) const
{
+ return toString(format, QCalendar());
+}
+
+QString QDateTime::toString(Qt::DateFormat format, QCalendar cal) const
+{
QString buf;
if (!isValid())
return buf;
switch (format) {
+#if QT_DEPRECATED_SINCE(5, 15)
case Qt::SystemLocaleDate:
case Qt::SystemLocaleShortDate:
- return QLocale::system().toString(*this, QLocale::ShortFormat);
+ return QLocale::system().toString(*this, QLocale::ShortFormat, cal);
case Qt::SystemLocaleLongDate:
- return QLocale::system().toString(*this, QLocale::LongFormat);
+ return QLocale::system().toString(*this, QLocale::LongFormat, cal);
case Qt::LocaleDate:
case Qt::DefaultLocaleShortDate:
- return QLocale().toString(*this, QLocale::ShortFormat);
+ return QLocale().toString(*this, QLocale::ShortFormat, cal);
case Qt::DefaultLocaleLongDate:
- return QLocale().toString(*this, QLocale::LongFormat);
+ return QLocale().toString(*this, QLocale::LongFormat, cal);
+#endif // 5.15
case Qt::RFC2822Date: {
- buf = QLocale::c().toString(*this, u"dd MMM yyyy hh:mm:ss ");
+ buf = QLocale::c().toString(*this, u"dd MMM yyyy hh:mm:ss ", cal);
buf += toOffsetString(Qt::TextDate, offsetFromUtc());
return buf;
}
default:
case Qt::TextDate: {
const QPair<QDate, QTime> p = getDateTime(d);
- buf = p.first.toString(Qt::TextDate);
+ buf = toStringTextDate(p.first, cal);
// Insert time between date's day and year:
buf.insert(buf.lastIndexOf(QLatin1Char(' ')),
QLatin1Char(' ') + p.second.toString(Qt::TextDate));
@@ -4381,14 +4381,12 @@ QString QDateTime::toString(Qt::DateFormat format) const
}
case Qt::ISODate:
case Qt::ISODateWithMs: {
+ // No calendar dependence
const QPair<QDate, QTime> p = getDateTime(d);
- const QDate &dt = p.first;
- const QTime &tm = p.second;
- buf = dt.toString(Qt::ISODate);
+ buf = toStringIsoDate(p.first);
if (buf.isEmpty())
return QString(); // failed to convert
- buf += QLatin1Char('T');
- buf += tm.toString(format);
+ buf += QLatin1Char('T') + p.second.toString(format);
switch (getSpec(d)) {
case Qt::UTC:
buf += QLatin1Char('Z');
@@ -4409,11 +4407,15 @@ QString QDateTime::toString(Qt::DateFormat format) const
/*!
\fn QString QDateTime::toString(const QString &format) const
+ \fn QString QDateTime::toString(const QString &format, QCalendar cal) const
\fn QString QDateTime::toString(QStringView format) const
+ \fn QString QDateTime::toString(QStringView format, QCalendar cal) const
Returns the datetime as a string. The \a format parameter determines the
- format of the result string. See QTime::toString() and QDate::toString() for
- the supported specifiers for time and date, respectively.
+ format of the result string. If \cal is supplied, it determines the calendar
+ used to represent the date; it defaults to Gregorian. See QTime::toString()
+ and QDate::toString() for the supported specifiers for time and date,
+ respectively.
Any sequence of characters enclosed in single quotes will be included
verbatim in the output string (stripped of the quotes), even if it contains
@@ -4444,13 +4446,23 @@ QString QDateTime::toString(Qt::DateFormat format) const
*/
QString QDateTime::toString(QStringView format) const
{
- return QLocale::system().toString(*this, format); // QLocale::c() ### Qt6
+ return toString(format, QCalendar());
+}
+
+QString QDateTime::toString(QStringView format, QCalendar cal) const
+{
+ return QLocale::system().toString(*this, format, cal); // QLocale::c() ### Qt6
}
#if QT_STRINGVIEW_LEVEL < 2
QString QDateTime::toString(const QString &format) const
{
- return toString(qToStringViewIgnoringNull(format));
+ return toString(qToStringViewIgnoringNull(format), QCalendar());
+}
+
+QString QDateTime::toString(const QString &format, QCalendar cal) const
+{
+ return toString(qToStringViewIgnoringNull(format), cal);
}
#endif
@@ -5198,9 +5210,14 @@ int QDateTime::utcOffset() const
Returns the QDateTime represented by the \a string, using the
\a format given, or an invalid datetime if this is not possible.
- Note for Qt::TextDate: It is recommended that you use the
- English short month names (e.g. "Jan"). Although localized month
- names can also be used, they depend on the user's locale settings.
+ Note for Qt::TextDate: It is recommended that you use the English short
+ month names (e.g. "Jan"). Although localized month names can also be used in
+ Qt 5, they depend on the user's locale settings.
+
+ \note Support for localized dates, including the format options
+ Qt::SystemLocaleDate, Qt::SystemLocaleShortDate, Qt::SystemLocaleLongDate,
+ Qt::LocaleDate, Qt::DefaultLocaleShortDate, and Qt::DefaultLocaleLongDate,
+ shall be removed in Qt 6. Use QLocale::toDateTime() instead.
\sa toString(), QLocale::toDateTime()
*/
@@ -5210,6 +5227,7 @@ QDateTime QDateTime::fromString(const QString &string, Qt::DateFormat format)
return QDateTime();
switch (format) {
+#if QT_DEPRECATED_SINCE(5, 15)
case Qt::SystemLocaleDate:
case Qt::SystemLocaleShortDate:
return QLocale::system().toDateTime(string, QLocale::ShortFormat);
@@ -5220,6 +5238,7 @@ QDateTime QDateTime::fromString(const QString &string, Qt::DateFormat format)
return QLocale().toDateTime(string, QLocale::ShortFormat);
case Qt::DefaultLocaleLongDate:
return QLocale().toDateTime(string, QLocale::LongFormat);
+#endif // 5.15
case Qt::RFC2822Date: {
const ParsedRfcDateTime rfc = rfcDateImpl(string);
@@ -5470,7 +5489,7 @@ QDateTime QDateTime::fromString(const QString &string, const QString &format, QC
QTime time;
QDate date;
- QDateTimeParser dt(QVariant::DateTime, QDateTimeParser::FromString, cal);
+ QDateTimeParser dt(QMetaType::QDateTime, QDateTimeParser::FromString, cal);
// dt.setDefaultLocale(QLocale::c()); ### Qt 6
if (dt.parseFormat(format) && dt.fromString(string, &date, &time))
return QDateTime(date, time);
diff --git a/src/corelib/time/qdatetime.h b/src/corelib/time/qdatetime.h
index 3eae8ebf64..c1653b5585 100644
--- a/src/corelib/time/qdatetime.h
+++ b/src/corelib/time/qdatetime.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@@ -110,14 +110,15 @@ public:
static QString longDayName(int weekday, MonthNameType type = DateFormat);
#endif // textdate && deprecated
#if QT_CONFIG(datestring)
- QString toString(Qt::DateFormat f = Qt::TextDate) const;
+ QString toString(Qt::DateFormat format = Qt::TextDate) const;
+ QString toString(Qt::DateFormat format, QCalendar cal) const;
+
#if QT_STRINGVIEW_LEVEL < 2
QString toString(const QString &format) const;
QString toString(const QString &format, QCalendar cal) const;
#endif
QString toString(QStringView format) const;
- QString toString(Qt::DateFormat f, QCalendar cal) const;
QString toString(QStringView format, QCalendar cal) const;
#endif
#if QT_DEPRECATED_SINCE(5,0)
@@ -287,7 +288,9 @@ class Q_CORE_EXPORT QDateTime
public:
QDateTime() noexcept(Data::CanBeSmall);
- explicit QDateTime(const QDate &); // ### Qt 6: plain QDate, QTime
+#if QT_DEPRECATED_SINCE(5, 15) // ### Qt 6: remove
+ QT_DEPRECATED_X("Use QDate::startOfDay()") explicit QDateTime(const QDate &);
+#endif
QDateTime(const QDate &, const QTime &, Qt::TimeSpec spec = Qt::LocalTime);
// ### Qt 6: Merge with above with default offsetSeconds = 0
QDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec, int offsetSeconds);
@@ -330,11 +333,14 @@ public:
void setSecsSinceEpoch(qint64 secs);
#if QT_CONFIG(datestring)
- QString toString(Qt::DateFormat f = Qt::TextDate) const;
+ QString toString(Qt::DateFormat format = Qt::TextDate) const;
+ QString toString(Qt::DateFormat format, QCalendar cal) const;
#if QT_STRINGVIEW_LEVEL < 2
QString toString(const QString &format) const;
+ QString toString(const QString &format, QCalendar cal) const;
#endif
QString toString(QStringView format) const;
+ QString toString(QStringView format, QCalendar cal) const;
#endif
Q_REQUIRED_RESULT QDateTime addDays(qint64 days) const;
Q_REQUIRED_RESULT QDateTime addMonths(int months) const;
diff --git a/src/corelib/time/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp
index 24f3969851..790c20004a 100644
--- a/src/corelib/time/qdatetimeparser.cpp
+++ b/src/corelib/time/qdatetimeparser.cpp
@@ -410,7 +410,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
QDTPDEBUGN("parseFormat: %s", newFormat.toLatin1().constData());
QVector<SectionNode> newSectionNodes;
- Sections newDisplay = 0;
+ Sections newDisplay;
QStringList newSeparators;
int i, index = 0;
int add = 0;
@@ -431,7 +431,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
switch (sect) {
case 'H':
case 'h':
- if (parserType != QVariant::Date) {
+ if (parserType != QMetaType::QDate) {
const Section hour = (sect == 'h') ? Hour12Section : Hour24Section;
const SectionNode sn = { hour, i - add, countRepeat(newFormat, i, 2), 0 };
newSectionNodes.append(sn);
@@ -442,7 +442,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
}
break;
case 'm':
- if (parserType != QVariant::Date) {
+ if (parserType != QMetaType::QDate) {
const SectionNode sn = { MinuteSection, i - add, countRepeat(newFormat, i, 2), 0 };
newSectionNodes.append(sn);
appendSeparator(&newSeparators, newFormat, index, i - index, lastQuote);
@@ -452,7 +452,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
}
break;
case 's':
- if (parserType != QVariant::Date) {
+ if (parserType != QMetaType::QDate) {
const SectionNode sn = { SecondSection, i - add, countRepeat(newFormat, i, 2), 0 };
newSectionNodes.append(sn);
appendSeparator(&newSeparators, newFormat, index, i - index, lastQuote);
@@ -463,7 +463,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
break;
case 'z':
- if (parserType != QVariant::Date) {
+ if (parserType != QMetaType::QDate) {
const SectionNode sn = { MSecSection, i - add, countRepeat(newFormat, i, 3) < 3 ? 1 : 3, 0 };
newSectionNodes.append(sn);
appendSeparator(&newSeparators, newFormat, index, i - index, lastQuote);
@@ -474,7 +474,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
break;
case 'A':
case 'a':
- if (parserType != QVariant::Date) {
+ if (parserType != QMetaType::QDate) {
const bool cap = (sect == 'A');
const SectionNode sn = { AmPmSection, i - add, (cap ? 1 : 0), 0 };
newSectionNodes.append(sn);
@@ -488,7 +488,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
}
break;
case 'y':
- if (parserType != QVariant::Time) {
+ if (parserType != QMetaType::QTime) {
const int repeat = countRepeat(newFormat, i, 4);
if (repeat >= 2) {
const SectionNode sn = { repeat == 4 ? YearSection : YearSection2Digits,
@@ -502,7 +502,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
}
break;
case 'M':
- if (parserType != QVariant::Time) {
+ if (parserType != QMetaType::QTime) {
const SectionNode sn = { MonthSection, i - add, countRepeat(newFormat, i, 4), 0 };
newSectionNodes.append(sn);
newSeparators.append(unquote(newFormat.midRef(index, i - index)));
@@ -512,7 +512,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
}
break;
case 'd':
- if (parserType != QVariant::Time) {
+ if (parserType != QMetaType::QTime) {
const int repeat = countRepeat(newFormat, i, 4);
const Section sectionType = (repeat == 4 ? DayOfWeekSectionLong
: (repeat == 3 ? DayOfWeekSectionShort : DaySection));
@@ -525,7 +525,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
}
break;
case 't':
- if (parserType != QVariant::Time) {
+ if (parserType != QMetaType::QTime) {
const SectionNode sn = { TimeZoneSection, i - add, countRepeat(newFormat, i, 4), 0 };
newSectionNodes.append(sn);
appendSeparator(&newSeparators, newFormat, index, i - index, lastQuote);
@@ -1164,7 +1164,7 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
}
pos += separator.size();
sectionNodes[index].pos = pos;
- int *current = 0;
+ int *current = nullptr;
const SectionNode sn = sectionNodes.at(index);
ParsedSection sect;
@@ -1265,7 +1265,7 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
return StateNode();
}
- if (parserType != QVariant::Time) {
+ if (parserType != QMetaType::QTime) {
if (year % 100 != year2digits && (isSet & YearSection2Digits)) {
if (!(isSet & YearSection)) {
year = (year / 100) * 100;
@@ -1335,7 +1335,7 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
}
}
- if (parserType != QVariant::Date) {
+ if (parserType != QMetaType::QDate) {
if (isSet & Hour12Section) {
const bool hasHour = isSet & Hour24Section;
if (ampm == -1) {
@@ -1373,7 +1373,7 @@ QDateTimeParser::scanString(const QDateTime &defaultValue,
// If hour wasn't specified, check the default we're using exists on the
// given date (which might be a spring-forward, skipping an hour).
- if (parserType == QVariant::DateTime && !(isSet & HourSectionMask) && !when.isValid()) {
+ if (parserType == QMetaType::QDateTime && !(isSet & HourSectionMask) && !when.isValid()) {
qint64 msecs = when.toMSecsSinceEpoch();
// Fortunately, that gets a useful answer, even though when is invalid ...
const QDateTime replace =
@@ -1809,7 +1809,7 @@ int QDateTimeParser::SectionNode::maxChange() const
QDateTimeParser::FieldInfo QDateTimeParser::fieldInfo(int index) const
{
- FieldInfo ret = 0;
+ FieldInfo ret;
const SectionNode &sn = sectionNode(index);
switch (sn.type) {
case MSecSection:
diff --git a/src/corelib/time/qdatetimeparser_p.h b/src/corelib/time/qdatetimeparser_p.h
index e9f1455380..5c612ef6a4 100644
--- a/src/corelib/time/qdatetimeparser_p.h
+++ b/src/corelib/time/qdatetimeparser_p.h
@@ -83,8 +83,8 @@ public:
FromString,
DateTimeEdit
};
- QDateTimeParser(QVariant::Type t, Context ctx, const QCalendar &cal = QCalendar())
- : currentSectionIndex(-1), display(nullptr), cachedDay(-1), parserType(t),
+ QDateTimeParser(QMetaType::Type t, Context ctx, const QCalendar &cal = QCalendar())
+ : currentSectionIndex(-1), cachedDay(-1), parserType(t),
fixday(false), spec(Qt::LocalTime), context(ctx), calendar(cal)
{
defaultLocale = QLocale::system();
@@ -295,7 +295,7 @@ protected: // for the benefit of QDateTimeEditPrivate
QStringList separators;
QString displayFormat;
QLocale defaultLocale;
- QVariant::Type parserType;
+ QMetaType::Type parserType;
bool fixday;
Qt::TimeSpec spec; // spec if used by QDateTimeEdit
Context context;
diff --git a/src/corelib/time/qtimezone.cpp b/src/corelib/time/qtimezone.cpp
index 0bba2afc61..87d8ea75f1 100644
--- a/src/corelib/time/qtimezone.cpp
+++ b/src/corelib/time/qtimezone.cpp
@@ -318,27 +318,40 @@ Q_GLOBAL_STATIC(QTimeZoneSingleton, global_tz);
*/
QTimeZone::QTimeZone() noexcept
- : d(0)
+ : d(nullptr)
{
}
/*!
Creates an instance of the requested time zone \a ianaId.
- The ID must be one of the available system IDs otherwise an invalid
- time zone will be returned.
+ The ID must be one of the available system IDs or a valid UTC-with-offset
+ ID, otherwise an invalid time zone will be returned.
\sa availableTimeZoneIds()
*/
QTimeZone::QTimeZone(const QByteArray &ianaId)
{
- // Try and see if it's a valid UTC offset ID, just as quick to try create as look-up
+ // Try and see if it's a CLDR UTC offset ID - just as quick by creating as
+ // by looking up.
d = new QUtcTimeZonePrivate(ianaId);
- // If not a valid UTC offset ID then try create it with the system backend
- // Relies on backend not creating valid tz with invalid name
+ // If not a CLDR UTC offset ID then try creating it with the system backend.
+ // Relies on backend not creating valid TZ with invalid name.
if (!d->isValid())
d = newBackendTimeZone(ianaId);
+ // Can also handle UTC with arbitrary (valid) offset, but only do so as
+ // fall-back, since either of the above may handle it more informatively.
+ if (!d->isValid()) {
+ qint64 offset = QUtcTimeZonePrivate::offsetFromUtcString(ianaId);
+ if (offset != QTimeZonePrivate::invalidSeconds()) {
+ // Should have abs(offset) < 24 * 60 * 60 = 86400.
+ qint32 seconds = qint32(offset);
+ Q_ASSERT(qint64(seconds) == offset);
+ // NB: this canonicalises the name, so it might not match ianaId
+ d = new QUtcTimeZonePrivate(seconds);
+ }
+ }
}
/*!
diff --git a/src/corelib/time/qtimezoneprivate.cpp b/src/corelib/time/qtimezoneprivate.cpp
index cb019fa1a5..facdf6661d 100644
--- a/src/corelib/time/qtimezoneprivate.cpp
+++ b/src/corelib/time/qtimezoneprivate.cpp
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2013 John Layt <jlayt@kde.org>
** Contact: https://www.qt.io/licensing/
**
@@ -764,6 +765,39 @@ QUtcTimeZonePrivate::QUtcTimeZonePrivate(const QByteArray &id)
}
}
+qint64 QUtcTimeZonePrivate::offsetFromUtcString(const QByteArray &id)
+{
+ // Convert reasonable UTC[+-]\d+(:\d+){,2} to offset in seconds.
+ // Assumption: id has already been tried as a CLDR UTC offset ID (notably
+ // including plain "UTC" itself) and a system offset ID; it's neither.
+ if (!id.startsWith("UTC") || id.size() < 5)
+ return invalidSeconds(); // Doesn't match
+ const char signChar = id.at(3);
+ if (signChar != '-' && signChar != '+')
+ return invalidSeconds(); // No sign
+ const int sign = signChar == '-' ? -1 : 1;
+
+ const auto offsets = id.mid(4).split(':');
+ if (offsets.isEmpty() || offsets.size() > 3)
+ return invalidSeconds(); // No numbers, or too many.
+
+ qint32 seconds = 0;
+ int prior = 0; // Number of fields parsed thus far
+ for (const auto &offset : offsets) {
+ bool ok = false;
+ unsigned short field = offset.toUShort(&ok);
+ // Bound hour above at 24, minutes and seconds at 60:
+ if (!ok || field >= (prior ? 60 : 24))
+ return invalidSeconds();
+ seconds = seconds * 60 + field;
+ ++prior;
+ }
+ while (prior++ < 3)
+ seconds *= 60;
+
+ return seconds * sign;
+}
+
// Create offset from UTC
QUtcTimeZonePrivate::QUtcTimeZonePrivate(qint32 offsetSeconds)
{
@@ -877,22 +911,25 @@ QByteArray QUtcTimeZonePrivate::systemTimeZoneId() const
bool QUtcTimeZonePrivate::isTimeZoneIdAvailable(const QByteArray &ianaId) const
{
+ // Only the zone IDs supplied by CLDR and recognized by constructor.
for (int i = 0; i < utcDataTableSize; ++i) {
const QUtcData *data = utcData(i);
- if (utcId(data) == ianaId) {
+ if (utcId(data) == ianaId)
return true;
- }
}
+ // But see offsetFromUtcString(), which lets us accept some "unavailable" IDs.
return false;
}
QList<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds() const
{
+ // Only the zone IDs supplied by CLDR and recognized by constructor.
QList<QByteArray> result;
result.reserve(utcDataTableSize);
for (int i = 0; i < utcDataTableSize; ++i)
result << utcId(utcData(i));
- std::sort(result.begin(), result.end()); // ### or already sorted??
+ // Not guaranteed to be sorted, so sort:
+ std::sort(result.begin(), result.end());
// ### assuming no duplicates
return result;
}
@@ -907,13 +944,16 @@ QList<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds(QLocale::Country cou
QList<QByteArray> QUtcTimeZonePrivate::availableTimeZoneIds(qint32 offsetSeconds) const
{
+ // Only if it's present in CLDR. (May get more than one ID: UTC, UTC+00:00
+ // and UTC-00:00 all have the same offset.)
QList<QByteArray> result;
for (int i = 0; i < utcDataTableSize; ++i) {
const QUtcData *data = utcData(i);
if (data->offsetFromUtc == offsetSeconds)
result << utcId(data);
}
- std::sort(result.begin(), result.end()); // ### or already sorted??
+ // Not guaranteed to be sorted, so sort:
+ std::sort(result.begin(), result.end());
// ### assuming no duplicates
return result;
}
diff --git a/src/corelib/time/qtimezoneprivate_icu.cpp b/src/corelib/time/qtimezoneprivate_icu.cpp
index 5570ce7571..8a92bbb387 100644
--- a/src/corelib/time/qtimezoneprivate_icu.cpp
+++ b/src/corelib/time/qtimezoneprivate_icu.cpp
@@ -273,7 +273,7 @@ static int ucalDaylightOffset(const QByteArray &id)
// Create the system default time zone
QIcuTimeZonePrivate::QIcuTimeZonePrivate()
- : m_ucal(0)
+ : m_ucal(nullptr)
{
// TODO No ICU C API to obtain sysem tz, assume default hasn't been changed
init(ucalDefaultTimeZoneId());
@@ -281,7 +281,7 @@ QIcuTimeZonePrivate::QIcuTimeZonePrivate()
// Create a named time zone
QIcuTimeZonePrivate::QIcuTimeZonePrivate(const QByteArray &ianaId)
- : m_ucal(0)
+ : m_ucal(nullptr)
{
// Need to check validity here as ICu will create a GMT tz if name is invalid
if (availableTimeZoneIds().contains(ianaId))
@@ -289,14 +289,14 @@ QIcuTimeZonePrivate::QIcuTimeZonePrivate(const QByteArray &ianaId)
}
QIcuTimeZonePrivate::QIcuTimeZonePrivate(const QIcuTimeZonePrivate &other)
- : QTimeZonePrivate(other), m_ucal(0)
+ : QTimeZonePrivate(other), m_ucal(nullptr)
{
// Clone the ucal so we don't close the shared object
UErrorCode status = U_ZERO_ERROR;
m_ucal = ucal_clone(other.m_ucal, &status);
if (!U_SUCCESS(status)) {
m_id.clear();
- m_ucal = 0;
+ m_ucal = nullptr;
}
}
@@ -322,7 +322,7 @@ void QIcuTimeZonePrivate::init(const QByteArray &ianaId)
if (!U_SUCCESS(status)) {
m_id.clear();
- m_ucal = 0;
+ m_ucal = nullptr;
}
}
@@ -493,7 +493,7 @@ QList<QByteArray> QIcuTimeZonePrivate::availableTimeZoneIds(int offsetFromUtc) c
// TODO Available directly in C++ api but not C api, from 4.8 onwards new filter method works
#if U_ICU_VERSION_MAJOR_NUM >= 49 || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM == 8)
UErrorCode status = U_ZERO_ERROR;
- UEnumeration *uenum = ucal_openTimeZoneIDEnumeration(UCAL_ZONE_TYPE_ANY, 0,
+ UEnumeration *uenum = ucal_openTimeZoneIDEnumeration(UCAL_ZONE_TYPE_ANY, nullptr,
&offsetFromUtc, &status);
QList<QByteArray> result;
if (U_SUCCESS(status))
diff --git a/src/corelib/time/qtimezoneprivate_p.h b/src/corelib/time/qtimezoneprivate_p.h
index 5f6491ef81..a57f61f381 100644
--- a/src/corelib/time/qtimezoneprivate_p.h
+++ b/src/corelib/time/qtimezoneprivate_p.h
@@ -188,6 +188,9 @@ public:
QUtcTimeZonePrivate(const QUtcTimeZonePrivate &other);
virtual ~QUtcTimeZonePrivate();
+ // Fall-back for UTC[+-]\d+(:\d+){,2} IDs.
+ static qint64 offsetFromUtcString(const QByteArray &id);
+
QUtcTimeZonePrivate *clone() const override;
Data data(qint64 forMSecsSinceEpoch) const override;
diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp
index 3c2695a789..5e55c6897d 100644
--- a/src/corelib/time/qtimezoneprivate_tz.cpp
+++ b/src/corelib/time/qtimezoneprivate_tz.cpp
@@ -512,7 +512,7 @@ PosixZone PosixZone::parse(const char *&pos, const char *end)
if (zoneEnd < end && (zoneEnd[0] == '+' || zoneEnd[0] == '-'))
++zoneEnd;
while (zoneEnd < end) {
- if (strchr(offsetChars, char(*zoneEnd)) == NULL)
+ if (strchr(offsetChars, char(*zoneEnd)) == nullptr)
break;
++zoneEnd;
}
diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp
index 234a44f6b6..3879b48cbb 100644
--- a/src/corelib/tools/qarraydata.cpp
+++ b/src/corelib/tools/qarraydata.cpp
@@ -143,7 +143,7 @@ qCalculateGrowingBlockSize(size_t elementCount, size_t elementSize, size_t heade
}
result.elementCount = (bytes - unsigned(headerSize)) / unsigned(elementSize);
- result.size = bytes;
+ result.size = result.elementCount * elementSize + headerSize;
return result;
}
@@ -265,7 +265,7 @@ void QArrayData::deallocate(QArrayData *data, size_t objectSize,
return;
#endif
- Q_ASSERT_X(data == 0 || !data->ref.isStatic(), "QArrayData::deallocate",
+ Q_ASSERT_X(data == nullptr || !data->ref.isStatic(), "QArrayData::deallocate",
"Static data cannot be deleted");
::free(data);
}
diff --git a/src/corelib/tools/qcontainerfwd.h b/src/corelib/tools/qcontainerfwd.h
index 532b4c95ce..00a8c85b66 100644
--- a/src/corelib/tools/qcontainerfwd.h
+++ b/src/corelib/tools/qcontainerfwd.h
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
template <class Key, class T> class QCache;
template <class Key, class T> class QHash;
-#ifndef QT_NO_LINKED_LIST
+#if !defined(QT_NO_LINKED_LIST) && QT_DEPRECATED_SINCE(5, 15)
template <class T> class QLinkedList;
#endif
template <class T> class QList;
diff --git a/src/corelib/tools/qduplicatetracker_p.h b/src/corelib/tools/qduplicatetracker_p.h
new file mode 100644
index 0000000000..99068c01a3
--- /dev/null
+++ b/src/corelib/tools/qduplicatetracker_p.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
+** Contact: http://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 QDUPLICATETRACKER_P_H
+#define QDUPLICATETRACKER_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 <qglobal.h>
+
+#if QT_HAS_INCLUDE(<memory_resource>) && __cplusplus > 201402L
+# include <unordered_set>
+# include <memory_resource>
+#else
+# include <qset.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+template <typename T, size_t Prealloc = 32>
+class QDuplicateTracker {
+#ifdef __cpp_lib_memory_resource
+ char buffer[Prealloc * sizeof(T)];
+ std::pmr::monotonic_buffer_resource res{buffer, sizeof buffer};
+ std::pmr::unordered_set<T> set{&res};
+#else
+ QSet<T> set;
+ int setSize = 0;
+#endif
+ Q_DISABLE_COPY_MOVE(QDuplicateTracker);
+public:
+ QDuplicateTracker() = default;
+ void reserve(int n) { set.reserve(n); }
+ Q_REQUIRED_RESULT bool hasSeen(const T &s)
+ {
+ bool inserted;
+#ifdef __cpp_lib_memory_resource
+ inserted = set.insert(s).second;
+#else
+ set.insert(s);
+ const int n = set.size();
+ inserted = qExchange(setSize, n) != n;
+#endif
+ return !inserted;
+ }
+};
+
+QT_END_NAMESPACE
+
+#endif /* QDUPLICATETRACKER_P_H */
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index bf2fd2e401..84430ae49a 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -443,12 +443,12 @@ class QEasingCurvePrivate
public:
QEasingCurvePrivate()
: type(QEasingCurve::Linear),
- config(0),
+ config(nullptr),
func(&easeNone)
{ }
QEasingCurvePrivate(const QEasingCurvePrivate &other)
: type(other.type),
- config(other.config ? other.config->copy() : 0),
+ config(other.config ? other.config->copy() : nullptr),
func(other.func)
{ }
~QEasingCurvePrivate() { delete config; }
@@ -590,7 +590,7 @@ struct BezierEase : public QEasingCurveFunction
if (!(x < 1))
return 1;
- SingleCubicBezier *singleCubicBezier = 0;
+ SingleCubicBezier *singleCubicBezier = nullptr;
getBezierSegment(singleCubicBezier, x);
return evaluateSegmentForY(*singleCubicBezier, findTForX(*singleCubicBezier, x));
@@ -1097,7 +1097,7 @@ static QEasingCurve::EasingFunction curveToFunc(QEasingCurve::Type curve)
case QEasingCurve::CosineCurve:
return &easeCosineCurve;
default:
- return 0;
+ return nullptr;
};
}
@@ -1127,7 +1127,7 @@ static QEasingCurveFunction *curveToFunctionObject(QEasingCurve::Type type)
return new QEasingCurveFunction(type, qreal(0.3), qreal(1.0), qreal(1.70158));
}
- return 0;
+ return nullptr;
}
/*!
@@ -1422,7 +1422,7 @@ void QEasingCurvePrivate::setType_helper(QEasingCurve::Type newType)
tcbPoints = std::move(config->_tcbPoints);
delete config;
- config = 0;
+ config = nullptr;
}
if (isConfigFunction(newType) || (amp != -1.0) || (period != -1.0) || (overshoot != -1.0) ||
@@ -1436,11 +1436,11 @@ void QEasingCurvePrivate::setType_helper(QEasingCurve::Type newType)
config->_o = overshoot;
config->_bezierCurves = std::move(bezierCurves);
config->_tcbPoints = std::move(tcbPoints);
- func = 0;
+ func = nullptr;
} else if (newType != QEasingCurve::Custom) {
func = curveToFunc(newType);
}
- Q_ASSERT((func == 0) == (config != 0));
+ Q_ASSERT((func == nullptr) == (config != nullptr));
type = newType;
}
@@ -1487,7 +1487,7 @@ void QEasingCurve::setCustomType(EasingFunction func)
*/
QEasingCurve::EasingFunction QEasingCurve::customType() const
{
- return d_ptr->type == Custom ? d_ptr->func : 0;
+ return d_ptr->type == Custom ? d_ptr->func : nullptr;
}
/*!
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 6ec8019ba3..15f731a603 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -1120,21 +1120,6 @@ uint qHash(long double key, uint seed) noexcept
\snippet code/src_corelib_tools_qhash.cpp 9
- However, you can store multiple values per key by using
- insertMulti() instead of insert() (or using the convenience
- subclass QMultiHash). If you want to retrieve all
- the values for a single key, you can use values(const Key &key),
- which returns a QList<T>:
-
- \snippet code/src_corelib_tools_qhash.cpp 10
-
- The items that share the same key are available from most
- recently to least recently inserted. A more efficient approach is
- to call find() to get the iterator for the first item with a key
- and iterate from there:
-
- \snippet code/src_corelib_tools_qhash.cpp 11
-
If you only need to extract the values from a hash (not the keys),
you can also use \l{foreach}:
@@ -1435,9 +1420,8 @@ uint qHash(long double key, uint seed) noexcept
/*! \fn template <class Key, class T> int QHash<Key, T>::remove(const Key &key)
Removes all the items that have the \a key from the hash.
- Returns the number of items removed which is usually 1 but will
- be 0 if the key isn't in the hash, or greater than 1 if
- insertMulti() has been used with the \a key.
+ Returns the number of items removed which is 1 if the key exists in the hash,
+ and 0 otherwise.
\sa clear(), take(), QMultiHash::remove()
*/
@@ -1507,27 +1491,25 @@ uint qHash(long double key, uint seed) noexcept
/*! \fn template <class Key, class T> QList<Key> QHash<Key, T>::uniqueKeys() const
\since 4.2
+ \obsolete
Returns a list containing all the keys in the map. Keys that occur multiple
times in the map (because items were inserted with insertMulti(), or
unite() was used) occur only once in the returned list.
- \sa keys(), values()
+ \sa QMultiHash::uniqueKeys()
*/
/*! \fn template <class Key, class T> QList<Key> QHash<Key, T>::keys() const
Returns a list containing all the keys in the hash, in an
arbitrary order. Keys that occur multiple times in the hash
- (because items were inserted with insertMulti(), or unite() was
- used) also occur multiple times in the list.
-
- To obtain a list of unique keys, where each key from the map only
- occurs once, use uniqueKeys().
+ (because the method is operating on a QMultiHash) also occur
+ multiple times in the list.
The order is guaranteed to be the same as that used by values().
- \sa uniqueKeys(), values(), key()
+ \sa QMultiMap::uniqueKeys(), values(), key()
*/
/*! \fn template <class Key, class T> QList<Key> QHash<Key, T>::keys(const T &value) const
@@ -1555,7 +1537,7 @@ uint qHash(long double key, uint seed) noexcept
*/
/*! \fn template <class Key, class T> QList<T> QHash<Key, T>::values(const Key &key) const
-
+ \obsolete
\overload
Returns a list of all the values associated with the \a key,
@@ -1592,6 +1574,7 @@ uint qHash(long double key, uint seed) noexcept
*/
/*! \fn template <class Key, class T> int QHash<Key, T>::count(const Key &key) const
+ \obsolete
Returns the number of items associated with the \a key.
@@ -1803,11 +1786,22 @@ uint qHash(long double key, uint seed) noexcept
If there are multiple items with the \a key, the most
recently inserted item's value is replaced with \a value.
+*/
+
+/*! \fn template <class Key, class T> void QHash<Key, T>::insert(const QHash &other)
+ \since 5.15
+
+ Inserts all the items in the \a other hash into this hash.
+
+ If a key is common to both hashes, its value will be replaced with the
+ value stored in \a other.
- \sa insertMulti()
+ \note If \a other contains multiple entries with the same key then the
+ final value of the key is undefined.
*/
/*! \fn template <class Key, class T> QHash<Key, T>::iterator QHash<Key, T>::insertMulti(const Key &key, const T &value)
+ \obsolete
Inserts a new item with the \a key and a value of \a value.
@@ -1816,16 +1810,17 @@ uint qHash(long double key, uint seed) noexcept
different from insert(), which overwrites the value of an
existing item.)
+ This function is obsolete. Use QMultiHash or QMultiMap instead.
+
\sa insert(), values()
*/
/*! \fn template <class Key, class T> QHash &QHash<Key, T>::unite(const QHash &other)
+ \obsolete
Inserts all the items in the \a other hash into this hash. If a
key is common to both hashes, the resulting hash will contain the
key multiple times.
-
- \sa insertMulti()
*/
/*! \fn template <class Key, class T> bool QHash<Key, T>::empty() const
@@ -1966,10 +1961,7 @@ uint qHash(long double key, uint seed) noexcept
\snippet code/src_corelib_tools_qhash.cpp 17
Unlike QMap, which orders its items by key, QHash stores its
- items in an arbitrary order. The only guarantee is that items that
- share the same key (because they were inserted using
- QHash::insertMulti()) will appear consecutively, from the most
- recently to the least recently inserted value.
+ items in an arbitrary order.
Let's see a few examples of things we can do with a
QHash::iterator that we cannot do with a QHash::const_iterator.
@@ -2036,7 +2028,7 @@ uint qHash(long double key, uint seed) noexcept
There is no direct way of changing an item's key through an
iterator, although it can be done by calling QHash::erase()
- followed by QHash::insert() or QHash::insertMulti().
+ followed by QHash::insert().
\sa value()
*/
@@ -2198,7 +2190,7 @@ uint qHash(long double key, uint seed) noexcept
Unlike QMap, which orders its items by key, QHash stores its
items in an arbitrary order. The only guarantee is that items that
share the same key (because they were inserted using
- QHash::insertMulti()) will appear consecutively, from the most
+ a QMultiHash) will appear consecutively, from the most
recently to the least recently inserted value.
Multiple iterators can be used on the same hash. However, be aware
@@ -2531,18 +2523,22 @@ uint qHash(long double key, uint seed) noexcept
It inherits QHash and extends it with a few convenience functions
that make it more suitable than QHash for storing multi-valued
hashes. A multi-valued hash is a hash that allows multiple values
- with the same key; QHash normally doesn't allow that, unless you
- call QHash::insertMulti().
+ with the same key.
Because QMultiHash inherits QHash, all of QHash's functionality also
applies to QMultiHash. For example, you can use isEmpty() to test
whether the hash is empty, and you can traverse a QMultiHash using
- QHash's iterator classes (for example, QHashIterator). But in
- addition, it provides an insert() function that corresponds to
- QHash::insertMulti(), and a replace() function that corresponds to
+ QHash's iterator classes (for example, QHashIterator). But opposed to
+ QHash, it provides an insert() function will allow the insertion of
+ multiple items with the same key. The replace() function corresponds to
QHash::insert(). It also provides convenient operator+() and
operator+=().
+ Unlike QMultiMap, QMultiHash does not provide and ordering of the
+ inserted items. The only guarantee is that items that
+ share the same key will appear consecutively, from the most
+ recently to the least recently inserted value.
+
Example:
\snippet code/src_corelib_tools_qhash.cpp 24
@@ -2633,7 +2629,8 @@ uint qHash(long double key, uint seed) noexcept
\sa replace()
*/
-/*! \fn template <class Key, class T> QMultiHash &QMultiHash<Key, T>::operator+=(const QMultiHash &other)
+/*! \fn template <class Key, class T> QMultiHash &QMultiHash<Key, T>::unite(const QMultiHash &other)
+ \since 5.13
Inserts all the items in the \a other hash into this hash
and returns a reference to this hash.
@@ -2641,6 +2638,32 @@ uint qHash(long double key, uint seed) noexcept
\sa insert()
*/
+/*! \fn template <class Key, class T> QList<Key> QMultiHash<Key, T>::uniqueKeys() const
+ \since 5.13
+
+ Returns a list containing all the keys in the map. Keys that occur multiple
+ times in the map occur only once in the returned list.
+
+ \sa keys(), values()
+*/
+
+/*! \fn template <class Key, class T> QList<T> QMultiHash<Key, T>::values(const Key &key) const
+ \overload
+
+ Returns a list of all the values associated with the \a key,
+ from the most recently inserted to the least recently inserted.
+
+ \sa count(), insert()
+*/
+
+/*! \fn template <class Key, class T> QMultiHash &QMultiHash<Key, T>::operator+=(const QMultiHash &other)
+
+ Inserts all the items in the \a other hash into this hash
+ and returns a reference to this hash.
+
+ \sa unite(), insert()
+*/
+
/*! \fn template <class Key, class T> QMultiHash QMultiHash<Key, T>::operator+(const QMultiHash &other) const
Returns a hash that contains all the items in this hash in
@@ -2670,6 +2693,13 @@ uint qHash(long double key, uint seed) noexcept
\sa QHash::remove()
*/
+/*! \fn template <class Key, class T> int QMultiHash<Key, T>::count(const Key &key) const
+
+ Returns the number of items associated with the \a key.
+
+ \sa contains(), insert()
+*/
+
/*!
\fn template <class Key, class T> int QMultiHash<Key, T>::count(const Key &key, const T &value) const
\since 4.3
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 236e433101..921b781f4a 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -308,12 +308,14 @@ public:
T &operator[](const Key &key);
const T operator[](const Key &key) const;
- QList<Key> uniqueKeys() const;
QList<Key> keys() const;
QList<Key> keys(const T &value) const;
QList<T> values() const;
- QList<T> values(const Key &key) const;
- int count(const Key &key) const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use QMultiHash for hashes storing multiple values with the same key.") QList<Key> uniqueKeys() const;
+ QT_DEPRECATED_X("Use QMultiHash for hashes storing multiple values with the same key.") QList<T> values(const Key &key) const;
+ QT_DEPRECATED_X("Use QMultiHash for hashes storing multiple values with the same key.") int count(const Key &key) const;
+#endif
class const_iterator;
@@ -325,7 +327,11 @@ public:
QHashData::Node *i;
public:
+#if QT_DEPRECATED_SINCE(5, 15)
typedef std::bidirectional_iterator_tag iterator_category;
+#else
+ typedef std::forward_iterator_tag iterator_category;
+#endif
typedef qptrdiff difference_type;
typedef T value_type;
typedef T *pointer;
@@ -350,21 +356,25 @@ public:
i = QHashData::nextNode(i);
return r;
}
- inline iterator &operator--() {
+#if QT_DEPRECATED_SINCE(5, 15)
+ inline QT_DEPRECATED iterator &operator--()
+ {
i = QHashData::previousNode(i);
return *this;
}
- inline iterator operator--(int) {
+ inline QT_DEPRECATED iterator operator--(int)
+ {
iterator r = *this;
i = QHashData::previousNode(i);
return r;
}
- inline iterator operator+(int j) const
+ inline QT_DEPRECATED iterator operator+(int j) const
{ iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
- 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; }
+ inline QT_DEPRECATED iterator operator-(int j) const { return operator+(-j); }
+ inline QT_DEPRECATED iterator &operator+=(int j) { return *this = *this + j; }
+ inline QT_DEPRECATED iterator &operator-=(int j) { return *this = *this - j; }
+ friend inline QT_DEPRECATED iterator operator+(int j, iterator k) { return k + j; }
+#endif
#ifndef QT_STRICT_ITERATORS
public:
@@ -380,11 +390,16 @@ public:
{
friend class iterator;
friend class QHash<Key, T>;
+ friend class QMultiHash<Key, T>;
friend class QSet<Key>;
QHashData::Node *i;
public:
+#if QT_DEPRECATED_SINCE(5, 15)
typedef std::bidirectional_iterator_tag iterator_category;
+#else
+ typedef std::forward_iterator_tag iterator_category;
+#endif
typedef qptrdiff difference_type;
typedef T value_type;
typedef const T *pointer;
@@ -416,21 +431,28 @@ public:
i = QHashData::nextNode(i);
return r;
}
- inline const_iterator &operator--() {
+#if QT_DEPRECATED_SINCE(5, 15)
+ inline QT_DEPRECATED const_iterator &operator--()
+ {
i = QHashData::previousNode(i);
return *this;
}
- inline const_iterator operator--(int) {
+ inline QT_DEPRECATED const_iterator operator--(int)
+ {
const_iterator r = *this;
i = QHashData::previousNode(i);
return r;
}
- inline const_iterator operator+(int j) const
+ inline QT_DEPRECATED const_iterator operator+(int j) const
{ const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
- 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; }
+ inline QT_DEPRECATED const_iterator operator-(int j) const { return operator+(-j); }
+ inline QT_DEPRECATED const_iterator &operator+=(int j) { return *this = *this + j; }
+ inline QT_DEPRECATED const_iterator &operator-=(int j) { return *this = *this - j; }
+ friend inline QT_DEPRECATED const_iterator operator+(int j, const_iterator k)
+ {
+ return k + j;
+ }
+#endif
// ### Qt 5: not sure this is necessary anymore
#ifdef QT_STRICT_ITERATORS
@@ -462,8 +484,14 @@ public:
inline key_iterator &operator++() { ++i; return *this; }
inline key_iterator operator++(int) { return key_iterator(i++);}
- inline key_iterator &operator--() { --i; return *this; }
- inline key_iterator operator--(int) { return key_iterator(i--); }
+#if QT_DEPRECATED_SINCE(5, 15)
+ inline QT_DEPRECATED key_iterator &operator--()
+ {
+ --i;
+ return *this;
+ }
+ inline QT_DEPRECATED key_iterator operator--(int) { return key_iterator(i--); }
+#endif
const_iterator base() const { return i; }
};
@@ -501,8 +529,11 @@ public:
const_iterator find(const Key &key) const;
const_iterator constFind(const Key &key) const;
iterator insert(const Key &key, const T &value);
- iterator insertMulti(const Key &key, const T &value);
- QHash &unite(const QHash &other);
+ void insert(const QHash &hash);
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use QMultiHash for hashes storing multiple values with the same key.") iterator insertMulti(const Key &key, const T &value);
+ QT_DEPRECATED_X("Use QMultiHash for hashes storing multiple values with the same key.") QHash &unite(const QHash &other);
+#endif
// STL compatibility
typedef T mapped_type;
@@ -544,6 +575,7 @@ private:
#endif
}
friend class QSet<Key>;
+ friend class QMultiHash<Key, T>;
};
@@ -582,22 +614,6 @@ QHash<Key, T>::createNode(uint ah, const Key &akey, const T &avalue, Node **anex
}
template <class Key, class T>
-Q_INLINE_TEMPLATE QHash<Key, T> &QHash<Key, T>::unite(const QHash &other)
-{
- if (d == &QHashData::shared_null) {
- *this = other;
- } else {
- QHash copy(other);
- const_iterator it = copy.constEnd();
- while (it != copy.constBegin()) {
- --it;
- insertMulti(it.key(), it.value());
- }
- }
- return *this;
-}
-
-template <class Key, class T>
Q_OUTOFLINE_TEMPLATE void QHash<Key, T>::freeData(QHashData *x)
{
x->free_helper(deleteNode2);
@@ -656,26 +672,6 @@ Q_INLINE_TEMPLATE const T QHash<Key, T>::value(const Key &akey, const T &adefaul
}
template <class Key, class T>
-Q_OUTOFLINE_TEMPLATE QList<Key> QHash<Key, T>::uniqueKeys() const
-{
- QList<Key> res;
- res.reserve(size()); // May be too much, but assume short lifetime
- const_iterator i = begin();
- if (i != end()) {
- for (;;) {
- const Key &aKey = i.key();
- res.append(aKey);
- do {
- if (++i == end())
- goto break_out_of_outer_loop;
- } while (aKey == i.key());
- }
- }
-break_out_of_outer_loop:
- return res;
-}
-
-template <class Key, class T>
Q_OUTOFLINE_TEMPLATE QList<Key> QHash<Key, T>::keys() const
{
QList<Key> res;
@@ -734,32 +730,6 @@ Q_OUTOFLINE_TEMPLATE QList<T> QHash<Key, T>::values() const
}
template <class Key, class T>
-Q_OUTOFLINE_TEMPLATE QList<T> QHash<Key, T>::values(const Key &akey) const
-{
- QList<T> res;
- Node *node = *findNode(akey);
- if (node != e) {
- do {
- res.append(node->value);
- } while ((node = node->next) != e && node->key == akey);
- }
- return res;
-}
-
-template <class Key, class T>
-Q_OUTOFLINE_TEMPLATE int QHash<Key, T>::count(const Key &akey) const
-{
- int cnt = 0;
- Node *node = *findNode(akey);
- if (node != e) {
- do {
- ++cnt;
- } while ((node = node->next) != e && node->key == akey);
- }
- return cnt;
-}
-
-template <class Key, class T>
Q_INLINE_TEMPLATE const T QHash<Key, T>::operator[](const Key &akey) const
{
return value(akey);
@@ -800,15 +770,28 @@ Q_INLINE_TEMPLATE typename QHash<Key, T>::iterator QHash<Key, T>::insert(const K
}
template <class Key, class T>
-Q_INLINE_TEMPLATE typename QHash<Key, T>::iterator QHash<Key, T>::insertMulti(const Key &akey,
- const T &avalue)
+Q_INLINE_TEMPLATE void QHash<Key, T>::insert(const QHash &hash)
{
+ if (d == hash.d)
+ return;
+
detach();
- d->willGrow();
- uint h;
- Node **nextNode = findNode(akey, &h);
- return iterator(createNode(h, akey, avalue, nextNode));
+ QHashData::Node *i = hash.d->firstNode();
+ QHashData::Node *end = reinterpret_cast<QHashData::Node *>(hash.e);
+ while (i != end) {
+ Node *n = concrete(i);
+ Node **node = findNode(n->key, n->h);
+ if (*node == e) {
+ if (d->willGrow())
+ node = findNode(n->key, n->h);
+ createNode(n->h, n->key, n->value, node);
+ } else {
+ if (!std::is_same<T, QHashDummyValue>::value)
+ (*node)->value = n->value;
+ }
+ i = QHashData::nextNode(i);
+ }
}
template <class Key, class T>
@@ -1061,11 +1044,12 @@ public:
inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value)
{ return QHash<Key, T>::insert(key, value); }
- inline typename QHash<Key, T>::iterator insert(const Key &key, const T &value)
- { return QHash<Key, T>::insertMulti(key, value); }
+ typename QHash<Key, T>::iterator insert(const Key &key, const T &value);
+
+ inline QMultiHash &unite(const QMultiHash &other);
inline QMultiHash &operator+=(const QMultiHash &other)
- { this->unite(other); return *this; }
+ { return unite(other); }
inline QMultiHash operator+(const QMultiHash &other) const
{ QMultiHash result = *this; result += other; return result; }
@@ -1074,13 +1058,27 @@ public:
using QHash<Key, T>::count;
using QHash<Key, T>::find;
using QHash<Key, T>::constFind;
+ using QHash<Key, T>::values;
+ using QHash<Key, T>::findNode;
+ using QHash<Key, T>::createNode;
+ using QHash<Key, T>::concrete;
+ using QHash<Key, T>::detach;
+
+ using typename QHash<Key, T>::Node;
+ using typename QHash<Key, T>::iterator;
+ using typename QHash<Key, T>::const_iterator;
bool contains(const Key &key, const T &value) const;
int remove(const Key &key, const T &value);
+ int count(const Key &key) const;
int count(const Key &key, const T &value) const;
+ QList<Key> uniqueKeys() const;
+
+ QList<T> values(const Key &akey) const;
+
typename QHash<Key, T>::iterator find(const Key &key, const T &value) {
typename QHash<Key, T>::iterator i(find(key));
typename QHash<Key, T>::iterator end(this->end());
@@ -1109,6 +1107,50 @@ private:
};
template <class Key, class T>
+Q_INLINE_TEMPLATE typename QHash<Key, T>::iterator QMultiHash<Key, T>::insert(const Key &akey, const T &avalue)
+{
+ detach();
+ this->d->willGrow();
+
+ uint h;
+ Node **nextNode = findNode(akey, &h);
+ return iterator(createNode(h, akey, avalue, nextNode));
+}
+
+template <class Key, class T>
+Q_INLINE_TEMPLATE QMultiHash<Key, T> &QMultiHash<Key, T>::unite(const QMultiHash &other)
+{
+ if (this->d == &QHashData::shared_null) {
+ *this = other;
+ } else {
+#if QT_DEPRECATED_SINCE(5, 15)
+ QMultiHash copy(other);
+ const_iterator it = copy.constEnd();
+ while (it != copy.constBegin()) {
+ it.i = QHashData::previousNode(it.i);
+ insert(it.key(), it.value());
+ }
+#else
+ const QMultiHash copy(other);
+ const_iterator it = copy.cbegin();
+ const const_iterator end = copy.cend();
+ while (it != end) {
+ const auto rangeStart = it++;
+ while (it != end && rangeStart.key() == it.key())
+ ++it;
+ const qint64 last = std::distance(rangeStart, it) - 1;
+ for (qint64 i = last; i >= 0; --i) {
+ auto next = std::next(rangeStart, i);
+ insert(next.key(), next.value());
+ }
+ }
+#endif
+ }
+ return *this;
+}
+
+
+template <class Key, class T>
Q_INLINE_TEMPLATE bool QMultiHash<Key, T>::contains(const Key &key, const T &value) const
{
return constFind(key, value) != QHash<Key, T>::constEnd();
@@ -1145,8 +1187,259 @@ Q_INLINE_TEMPLATE int QMultiHash<Key, T>::count(const Key &key, const T &value)
return n;
}
-Q_DECLARE_ASSOCIATIVE_ITERATOR(Hash)
-Q_DECLARE_MUTABLE_ASSOCIATIVE_ITERATOR(Hash)
+template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE QList<Key> QMultiHash<Key, T>::uniqueKeys() const
+{
+ QList<Key> res;
+ res.reserve(QHash<Key, T>::size()); // May be too much, but assume short lifetime
+ typename QHash<Key, T>::const_iterator i = QHash<Key, T>::begin();
+ if (i != QHash<Key, T>::end()) {
+ for (;;) {
+ const Key &aKey = i.key();
+ res.append(aKey);
+ do {
+ if (++i == QHash<Key, T>::end())
+ goto break_out_of_outer_loop;
+ } while (aKey == i.key());
+ }
+ }
+break_out_of_outer_loop:
+ return res;
+}
+
+#if QT_DEPRECATED_SINCE(5, 15)
+
+template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE typename QHash<Key, T>::iterator QHash<Key, T>::insertMulti(const Key &key, const T &value) {
+ return static_cast<QMultiHash<Key, T> *>(this)->insert(key, value);
+}
+
+template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE QHash<Key, T> &QHash<Key, T>::unite(const QHash &other) {
+ return static_cast<QMultiHash<Key, T> *>(this)->unite(other);
+}
+
+template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE QList<T> QHash<Key, T>::values(const Key &akey) const
+{
+ return static_cast<const QMultiHash<Key, T> *>(this)->values(akey);
+}
+
+template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE int QHash<Key, T>::count(const Key &akey) const
+{
+ return static_cast<const QMultiHash<Key, T> *>(this)->count(akey);
+}
+
+template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE QList<Key> QHash<Key, T>::uniqueKeys() const
+{
+ return static_cast<const QMultiHash<Key, T> *>(this)->uniqueKeys();
+}
+#endif
+
+template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE QList<T> QMultiHash<Key, T>::values(const Key &akey) const
+{
+ QList<T> res;
+ Node *node = *findNode(akey);
+ if (node != this->e) {
+ do {
+ res.append(node->value);
+ } while ((node = node->next) != this->e && node->key == akey);
+ }
+ return res;
+}
+
+template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE int QMultiHash<Key, T>::count(const Key &akey) const
+{
+ int cnt = 0;
+ Node *node = *findNode(akey);
+ if (node != this->e) {
+ do {
+ ++cnt;
+ } while ((node = node->next) != this->e && node->key == akey);
+ }
+ return cnt;
+}
+
+#if !defined(QT_NO_JAVA_STYLE_ITERATORS)
+template <class Key, class T>
+class QHashIterator
+{
+ typedef typename QHash<Key, T>::const_iterator const_iterator;
+ typedef const_iterator Item;
+ QHash<Key, T> c;
+ const_iterator i, n;
+ inline bool item_exists() const { return n != c.constEnd(); }
+
+public:
+ inline QHashIterator(const QHash<Key, T> &container)
+ : c(container), i(c.constBegin()), n(c.constEnd())
+ {
+ }
+ inline QHashIterator &operator=(const QHash<Key, T> &container)
+ {
+ c = container;
+ i = c.constBegin();
+ n = c.constEnd();
+ return *this;
+ }
+ inline void toFront()
+ {
+ i = c.constBegin();
+ n = c.constEnd();
+ }
+ inline void toBack()
+ {
+ i = c.constEnd();
+ n = c.constEnd();
+ }
+ inline bool hasNext() const { return i != c.constEnd(); }
+ inline Item next()
+ {
+ n = i++;
+ return n;
+ }
+ inline Item peekNext() const { return i; }
+ inline const T &value() const
+ {
+ Q_ASSERT(item_exists());
+ return *n;
+ }
+ inline const Key &key() const
+ {
+ Q_ASSERT(item_exists());
+ return n.key();
+ }
+ inline bool findNext(const T &t)
+ {
+ while ((n = i) != c.constEnd())
+ if (*i++ == t)
+ return true;
+ return false;
+ }
+#if QT_DEPRECATED_SINCE(5, 15)
+ inline QT_DEPRECATED bool hasPrevious() const { return i != c.constBegin(); }
+ inline QT_DEPRECATED Item previous()
+ {
+ n = --i;
+ return n;
+ }
+ inline QT_DEPRECATED Item peekPrevious() const
+ {
+ const_iterator p = i;
+ return --p;
+ }
+ inline bool QT_DEPRECATED findPrevious(const T &t)
+ {
+ while (i != c.constBegin())
+ if (*(n = --i) == t)
+ return true;
+ n = c.constEnd();
+ return false;
+ }
+#endif
+};
+
+template<class Key, class T>
+class QMutableHashIterator
+{
+ typedef typename QHash<Key, T>::iterator iterator;
+ typedef typename QHash<Key, T>::const_iterator const_iterator;
+ typedef iterator Item;
+ QHash<Key, T> *c;
+ iterator i, n;
+ inline bool item_exists() const { return const_iterator(n) != c->constEnd(); }
+
+public:
+ inline QMutableHashIterator(QHash<Key, T> &container) : c(&container)
+ {
+ i = c->begin();
+ n = c->end();
+ }
+ inline QMutableHashIterator &operator=(QHash<Key, T> &container)
+ {
+ c = &container;
+ i = c->begin();
+ n = c->end();
+ return *this;
+ }
+ inline void toFront()
+ {
+ i = c->begin();
+ n = c->end();
+ }
+ inline void toBack()
+ {
+ i = c->end();
+ n = c->end();
+ }
+ inline bool hasNext() const { return const_iterator(i) != c->constEnd(); }
+ inline Item next()
+ {
+ n = i++;
+ return n;
+ }
+ inline Item peekNext() const { return i; }
+ inline void remove()
+ {
+ if (const_iterator(n) != c->constEnd()) {
+ i = c->erase(n);
+ n = c->end();
+ }
+ }
+ inline void setValue(const T &t)
+ {
+ if (const_iterator(n) != c->constEnd())
+ *n = t;
+ }
+ inline T &value()
+ {
+ Q_ASSERT(item_exists());
+ return *n;
+ }
+ inline const T &value() const
+ {
+ Q_ASSERT(item_exists());
+ return *n;
+ }
+ inline const Key &key() const
+ {
+ Q_ASSERT(item_exists());
+ return n.key();
+ }
+ inline bool findNext(const T &t)
+ {
+ while (const_iterator(n = i) != c->constEnd())
+ if (*i++ == t)
+ return true;
+ return false;
+ }
+#if QT_DEPRECATED_SINCE(5, 15)
+ inline QT_DEPRECATED bool hasPrevious() const { return const_iterator(i) != c->constBegin(); }
+ inline QT_DEPRECATED Item previous()
+ {
+ n = --i;
+ return n;
+ }
+ inline QT_DEPRECATED Item peekPrevious() const
+ {
+ iterator p = i;
+ return --p;
+ }
+ inline QT_DEPRECATED bool findPrevious(const T &t)
+ {
+ while (const_iterator(i) != c->constBegin())
+ if (*(n = --i) == t)
+ return true;
+ n = c->end();
+ return false;
+ }
+#endif
+};
+#endif // !QT_NO_JAVA_STYLE_ITERATORS
template <class Key, class T>
uint qHash(const QHash<Key, T> &key, uint seed = 0)
diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc
index b4d332b7b1..3531fb202c 100644
--- a/src/corelib/tools/qiterator.qdoc
+++ b/src/corelib/tools/qiterator.qdoc
@@ -203,6 +203,7 @@
/*!
\class QLinkedListIterator
\inmodule QtCore
+ \obsolete
\brief The QLinkedListIterator class provides a Java-style const iterator for QLinkedList.
@@ -416,6 +417,7 @@
/*!
\class QMutableLinkedListIterator
\inmodule QtCore
+ \obsolete
\brief The QMutableLinkedListIterator class provides a Java-style non-const iterator for QLinkedList.
diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp
index 3b1bc8aab1..6a423545da 100644
--- a/src/corelib/tools/qlinkedlist.cpp
+++ b/src/corelib/tools/qlinkedlist.cpp
@@ -45,6 +45,11 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+
const QLinkedListData QLinkedListData::shared_null = {
const_cast<QLinkedListData *>(&QLinkedListData::shared_null),
const_cast<QLinkedListData *>(&QLinkedListData::shared_null),
@@ -53,6 +58,7 @@ const QLinkedListData QLinkedListData::shared_null = {
/*! \class QLinkedList
\inmodule QtCore
+ \obsolete
\brief The QLinkedList class is a template class that provides linked lists.
\ingroup tools
@@ -60,6 +66,8 @@ const QLinkedListData QLinkedListData::shared_null = {
\reentrant
+ \note This class is obsolete, please use std::list instead.
+
QLinkedList\<T\> is one of Qt's generic \l{container classes}. It
stores a list of values and provides iterator-based access as
well as \l{constant time} insertions and removals.
@@ -720,6 +728,7 @@ const QLinkedListData QLinkedListData::shared_null = {
/*! \class QLinkedList::iterator
\inmodule QtCore
+ \obsolete
\brief The QLinkedList::iterator class provides an STL-style non-const iterator for QLinkedList.
QLinkedList features both \l{STL-style iterators} and
@@ -965,6 +974,7 @@ const QLinkedListData QLinkedListData::shared_null = {
/*! \class QLinkedList::const_iterator
\inmodule QtCore
+ \obsolete
\brief The QLinkedList::const_iterator class provides an STL-style const iterator for QLinkedList.
QLinkedList features both \l{STL-style iterators} and
@@ -1221,4 +1231,8 @@ const QLinkedListData QLinkedListData::shared_null = {
\sa fromStdList()
*/
+QT_WARNING_POP
+
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index 8970d39be0..64c6b4d326 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -55,10 +55,22 @@
#include <iterator>
#include <list>
-QT_BEGIN_NAMESPACE
+#if 0
+// This is needed because of QTBUG-80347
+#pragma qt_class(QLinkedList)
+#pragma qt_class(QLinkedListData)
+#pragma qt_class(QLinkedListNode)
+#endif
+
+#if QT_DEPRECATED_SINCE(5, 15)
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
-struct Q_CORE_EXPORT QLinkedListData
+QT_BEGIN_NAMESPACE
+
+struct QT_DEPRECATED_VERSION_5_15 Q_CORE_EXPORT QLinkedListData
{
QLinkedListData *n, *p;
QtPrivate::RefCount ref;
@@ -69,7 +81,7 @@ struct Q_CORE_EXPORT QLinkedListData
};
template <typename T>
-struct QLinkedListNode
+struct QT_DEPRECATED_VERSION_5_15 QLinkedListNode
{
inline QLinkedListNode(const T &arg): t(arg) { }
QLinkedListNode *n, *p;
@@ -77,7 +89,7 @@ struct QLinkedListNode
};
template <class T>
-class QLinkedList
+class QT_DEPRECATED_VERSION_X_5_15("Use std::list instead") QLinkedList
{
typedef QLinkedListNode<T> Node;
union { QLinkedListData *d; QLinkedListNode<T> *e; };
@@ -594,6 +606,10 @@ QT_END_NAMESPACE
Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(QLinkedList)
+QT_WARNING_POP
+
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
#endif // QT_NO_LINKED_LIST
#endif // QLINKEDLIST_H
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 66770f6866..5d5da20752 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -847,9 +847,10 @@ void **QListData::erase(void **xi)
/*! \fn template <class T> void QList<T>::insert(int i, const T &value)
- Inserts \a value at index position \a i in the list. If \a i <= 0,
- the value is prepended to the list. If \a i >= size(), the
- value is appended to the list.
+ Inserts \a value at index position \a i in the list.
+
+ If \a i == 0, the value is prepended to the list. If \a i == size(),
+ the value is appended to the list.
Example:
\snippet code/src_corelib_tools_qlistdata.cpp 8
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 425ffa42a5..ffd470efcd 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -580,8 +580,16 @@ inline T &QList<T>::operator[](int i)
detach(); return reinterpret_cast<Node *>(p.at(i))->t(); }
template <typename T>
inline void QList<T>::removeAt(int i)
-{ if(i >= 0 && i < p.size()) { detach();
- node_destruct(reinterpret_cast<Node *>(p.at(i))); p.remove(i); } }
+{
+#if !QT_DEPRECATED_SINCE(5, 15)
+ Q_ASSERT_X(i >= 0 && i < p.size(), "QList<T>::removeAt", "index out of range");
+#elif !defined(QT_NO_DEBUG)
+ if (i < 0 || i >= p.size())
+ qWarning("QList::removeAt(): Index out of range.");
+#endif
+ detach();
+ node_destruct(reinterpret_cast<Node *>(p.at(i))); p.remove(i);
+}
template <typename T>
inline T QList<T>::takeAt(int i)
{ Q_ASSERT_X(i >= 0 && i < p.size(), "QList<T>::take", "index out of range");
@@ -676,6 +684,12 @@ inline void QList<T>::prepend(const T &t)
template <typename T>
inline void QList<T>::insert(int i, const T &t)
{
+#if !QT_DEPRECATED_SINCE(5, 15)
+ Q_ASSERT_X(i >= 0 && i <= p.size(), "QList<T>::insert", "index out of range");
+#elif !defined(QT_NO_DEBUG)
+ if (i < 0 || i > p.size())
+ qWarning("QList::insert(): Index out of range.");
+#endif
if (d->ref.isShared()) {
Node *n = detach_helper_grow(i, 1);
QT_TRY {
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index a0ec372f9a..9b9c67e42b 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -468,10 +468,9 @@ void QMapDataBase::freeData(QMapDataBase *d)
\snippet code/src_corelib_tools_qmap.cpp 9
However, you can store multiple values per key by using
- insertMulti() instead of insert() (or using the convenience
- subclass QMultiMap). If you want to retrieve all the values for a
- single key, you can use values(const Key &key), which returns a
- QList<T>:
+ using the subclass QMultiMap. If you want
+ to retrieve all the values for a single key, you can use
+ values(const Key &key), which returns a QList<T>:
\snippet code/src_corelib_tools_qmap.cpp 10
@@ -676,9 +675,8 @@ void QMapDataBase::freeData(QMapDataBase *d)
/*! \fn template <class Key, class T> int QMap<Key, T>::remove(const Key &key)
Removes all the items that have the key \a key from the map.
- Returns the number of items removed which is usually 1 but will be
- 0 if the key isn't in the map, or \> 1 if insertMulti() has been
- used with the \a key.
+ Returns the number of items removed which will be 1 if the key
+ exists in the map, and 0 otherwise.
\sa clear(), take(), QMultiMap::remove()
*/
@@ -742,28 +740,26 @@ void QMapDataBase::freeData(QMapDataBase *d)
/*! \fn template <class Key, class T> QList<Key> QMap<Key, T>::uniqueKeys() const
\since 4.2
+ \obsolete
Returns a list containing all the keys in the map in ascending
order. Keys that occur multiple times in the map (because items
were inserted with insertMulti(), or unite() was used) occur only
once in the returned list.
- \sa keys(), values()
+ \sa QMultiMap::uniqueKeys()
*/
/*! \fn template <class Key, class T> QList<Key> QMap<Key, T>::keys() const
Returns a list containing all the keys in the map in ascending
- order. Keys that occur multiple times in the map (because items
- were inserted with insertMulti(), or unite() was used) also
- occur multiple times in the list.
-
- To obtain a list of unique keys, where each key from the map only
- occurs once, use uniqueKeys().
+ order. Keys that occur multiple times in the map (because the
+ method is operating on a QMultiMap) also occur multiple times
+ in the list.
The order is guaranteed to be the same as that used by values().
- \sa uniqueKeys(), values(), key()
+ \sa QMultiMap::uniqueKeys(), values(), key()
*/
/*! \fn template <class Key, class T> QList<Key> QMap<Key, T>::keys(const T &value) const
@@ -806,6 +802,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
*/
/*! \fn template <class Key, class T> QList<T> QMap<Key, T>::values(const Key &key) const
+ \obsolete
\overload
@@ -813,14 +810,15 @@ void QMapDataBase::freeData(QMapDataBase *d)
\a key, from the most recently inserted to the least recently
inserted one.
- \sa count(), insertMulti()
+ \sa QMultiMap::values()
*/
/*! \fn template <class Key, class T> int QMap<Key, T>::count(const Key &key) const
+ \obsolete
Returns the number of items associated with key \a key.
- \sa contains(), insertMulti(), QMultiMap::count()
+ \sa QMultiMap::count()
*/
/*! \fn template <class Key, class T> int QMap<Key, T>::count() const
@@ -1118,7 +1116,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
If there are multiple items with the key \a key, the most
recently inserted item's value is replaced with \a value.
- \sa insertMulti()
+ \sa QMultiMap::insert()
*/
/*! \fn template <class Key, class T> QMap<Key, T>::iterator QMap<Key, T>::insert(const_iterator pos, const Key &key, const T &value)
@@ -1147,10 +1145,25 @@ void QMapDataBase::freeData(QMapDataBase *d)
\b {Note:} Be careful with the hint. Providing an iterator from an older shared instance might
crash but there is also a risk that it will silently corrupt both the map and the \a pos map.
- \sa insertMulti()
+ \sa QMultiMap::insert()
+*/
+
+/*! \fn template <class Key, class T> void QMap<Key, T>::insert(const QMap<Key, T> &map)
+ \since 5.15
+
+ Inserts all the items in \a map into this map.
+
+ If a key is common to both maps, its value will be replaced with
+ the value stored in \a map.
+
+ \note If \a map contains multiple entries with the same key then the
+ final value of the key is undefined.
+
+ \sa QMultiMap::insert()
*/
/*! \fn template <class Key, class T> QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const Key &key, const T &value)
+ \obsolete
Inserts a new item with the key \a key and a value of \a value.
@@ -1159,12 +1172,13 @@ void QMapDataBase::freeData(QMapDataBase *d)
different from insert(), which overwrites the value of an
existing item.)
- \sa insert(), values()
+ \sa QMultiMap::insert()
*/
/*! \fn template <class Key, class T> QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const_iterator pos, const Key &key, const T &value)
\overload
\since 5.1
+ \obsolete
Inserts a new item with the key \a key and value \a value and with hint \a pos
suggesting where to do the insert.
@@ -1178,17 +1192,18 @@ void QMapDataBase::freeData(QMapDataBase *d)
\b {Note:} Be careful with the hint. Providing an iterator from an older shared instance might
crash but there is also a risk that it will silently corrupt both the map and the \a pos map.
- \sa insert()
+ \sa QMultiMap::insert()
*/
/*! \fn template <class Key, class T> QMap<Key, T> &QMap<Key, T>::unite(const QMap<Key, T> &other)
+ \obsolete
Inserts all the items in the \a other map into this map. If a
key is common to both maps, the resulting map will contain the
key multiple times.
- \sa insertMulti()
+ \sa QMultiMap::unite()
*/
/*! \typedef QMap::Iterator
@@ -1271,9 +1286,8 @@ void QMapDataBase::freeData(QMapDataBase *d)
Unlike QHash, which stores its items in an arbitrary order, QMap
stores its items ordered by key. Items that share the same key
- (because they were inserted using QMap::insertMulti(), or due to a
- unite()) will appear consecutively, from the most recently to the
- least recently inserted value.
+ (because the map is a QMultiMap) will appear consecutively,
+ from the most recently to the least recently inserted value.
Let's see a few examples of things we can do with a
QMap::iterator that we cannot do with a QMap::const_iterator.
@@ -1519,9 +1533,8 @@ void QMapDataBase::freeData(QMapDataBase *d)
Unlike QHash, which stores its items in an arbitrary order, QMap
stores its items ordered by key. Items that share the same key
- (because they were inserted using QMap::insertMulti()) will
- appear consecutively, from the most recently to the least
- recently inserted value.
+ (because the map is a QMultiMap) will appear consecutively,
+ from the most recently to the least recently inserted value.
Multiple iterators can be used on the same map. If you add items
to the map, existing iterators will remain valid. If you remove
@@ -1893,20 +1906,20 @@ void QMapDataBase::freeData(QMapDataBase *d)
\reentrant
QMultiMap\<Key, T\> is one of Qt's generic \l{container classes}.
- It inherits QMap and extends it with a few convenience functions
- that make it more suitable than QMap for storing multi-valued
- maps. A multi-valued map is a map that allows multiple values
- with the same key; QMap normally doesn't allow that, unless you
- call QMap::insertMulti().
+ It inherits QMap and extends it with a few functions
+ that make it able to store multi-valued maps. A multi-valued map
+ is a map that allows multiple values with the same key; QMap
+ doesn't allow that.
Because QMultiMap inherits QMap, all of QMap's functionality also
applies to QMultiMap. For example, you can use isEmpty() to test
whether the map is empty, and you can traverse a QMultiMap using
QMap's iterator classes (for example, QMapIterator). But in
- addition, it provides an insert() function that corresponds to
- QMap::insertMulti(), and a replace() function that corresponds to
- QMap::insert(). It also provides convenient operator+() and
- operator+=().
+ addition, it provides an insert() function that inserts but does
+ not overwrite any previous value if the key already exists,
+ and a replace() function that corresponds which does overwite
+ an existing value if they key is already in the map.
+ It also provides convenient operator+() and operator+=().
Example:
\snippet code/src_corelib_tools_qmap.cpp 25
@@ -1986,7 +1999,7 @@ void QMapDataBase::freeData(QMapDataBase *d)
\sa replace()
*/
-/*! \fn template <class Key, class T> typename QMap<Key, T>::iterator QMultiMap<Key, T>::insert(typename QMap<Key, T>::const_iterator pos, const Key &key, const T &value)
+/*! \fn template <class Key, class T> typename QMultiMap<Key, T>::iterator QMultiMap<Key, T>::insert(typename QMultiMap<Key, T>::const_iterator pos, const Key &key, const T &value)
\since 5.1
Inserts a new item with the key \a key and value \a value and with hint \a pos
@@ -2095,4 +2108,31 @@ void QMapDataBase::freeData(QMapDataBase *d)
\sa QMap::constFind()
*/
+/*! \fn template <class Key, class T> QList<T> QMultiMap<Key, T>::values(const Key &key) const
+
+ Returns a list containing all the values associated with key
+ \a key, from the most recently inserted to the least recently
+ inserted one.
+*/
+
+/*! \fn template <class Key, class T> int QMultiMap<Key, T>::count(const Key &key) const
+
+ Returns the number of items associated with key \a key.
+*/
+
+/*! \fn template <class Key, class T> QList<Key> QMultiMap<Key, T>::uniqueKeys() const
+ \since 4.2
+
+ Returns a list containing all the keys in the map in ascending
+ order. Keys that occur multiple times in the map occur only
+ once in the returned list.
+*/
+
+/*! \fn template <class Key, class T> QMultiMap<Key, T> &QMultiMap<Key, T>::unite(const QMultiMap<Key, T> &other)
+
+ Inserts all the items in the \a other map into this map. If a
+ key is common to both maps, the resulting map will contain the
+ key multiple times.
+*/
+
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index 18c681581f..281812b5e6 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -380,12 +380,15 @@ public:
T &operator[](const Key &key);
const T operator[](const Key &key) const;
- QList<Key> uniqueKeys() const;
QList<Key> keys() const;
QList<Key> keys(const T &value) const;
QList<T> values() const;
- QList<T> values(const Key &key) const;
- int count(const Key &key) const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use QMultiMap for maps storing multiple values with the same key.") QList<Key> uniqueKeys() const;
+ QT_DEPRECATED_X("Use QMultiMap for maps storing multiple values with the same key.") QList<T> values(const Key &key) const;
+ QT_DEPRECATED_X("Use QMultiMap for maps storing multiple values with the same key.") int count(const Key &key) const;
+#endif
+
inline const Key &firstKey() const { Q_ASSERT(!isEmpty()); return constBegin().key(); }
inline const Key &lastKey() const { Q_ASSERT(!isEmpty()); return (constEnd() - 1).key(); }
@@ -452,6 +455,7 @@ public:
{ return i != o.i; }
#endif
friend class QMap<Key, T>;
+ friend class QMultiMap<Key, T>;
};
friend class iterator;
@@ -514,6 +518,7 @@ public:
inline bool operator!=(const iterator &o) const { return operator!=(const_iterator(o)); }
#endif
friend class QMap<Key, T>;
+ friend class QMultiMap<Key, T>;
};
friend class const_iterator;
@@ -578,9 +583,12 @@ public:
const_iterator upperBound(const Key &key) const;
iterator insert(const Key &key, const T &value);
iterator insert(const_iterator pos, const Key &key, const T &value);
- iterator insertMulti(const Key &key, const T &value);
- iterator insertMulti(const_iterator pos, const Key &akey, const T &avalue);
- QMap<Key, T> &unite(const QMap<Key, T> &other);
+ void insert(const QMap<Key, T> &map);
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use QMultiMap for maps storing multiple values with the same key.") iterator insertMulti(const Key &key, const T &value);
+ QT_DEPRECATED_X("Use QMultiMap for maps storing multiple values with the same key.") iterator insertMulti(const_iterator pos, const Key &akey, const T &avalue);
+ QT_DEPRECATED_X("Use QMultiMap for maps storing multiple values with the same key.") QMap<Key, T> &unite(const QMap<Key, T> &other);
+#endif
// STL compatibility
typedef Key key_type;
@@ -609,6 +617,8 @@ private:
return true;
#endif
}
+
+ friend class QMultiMap<Key, T>;
};
template <class Key, class T>
@@ -671,23 +681,6 @@ Q_INLINE_TEMPLATE T &QMap<Key, T>::operator[](const Key &akey)
}
template <class Key, class T>
-Q_INLINE_TEMPLATE int QMap<Key, T>::count(const Key &akey) const
-{
- Node *firstNode;
- Node *lastNode;
- d->nodeRange(akey, &firstNode, &lastNode);
-
- const_iterator ci_first(firstNode);
- const const_iterator ci_last(lastNode);
- int cnt = 0;
- while (ci_first != ci_last) {
- ++cnt;
- ++ci_first;
- }
- return cnt;
-}
-
-template <class Key, class T>
Q_INLINE_TEMPLATE bool QMap<Key, T>::contains(const Key &akey) const
{
return d->findNode(akey) != nullptr;
@@ -789,70 +782,44 @@ typename QMap<Key, T>::iterator QMap<Key, T>::insert(const_iterator pos, const K
}
template <class Key, class T>
-Q_INLINE_TEMPLATE typename QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const Key &akey,
- const T &avalue)
+Q_INLINE_TEMPLATE void QMap<Key, T>::insert(const QMap<Key, T> &map)
{
- detach();
- Node* y = d->end();
- Node* x = static_cast<Node *>(d->root());
- bool left = true;
- while (x != nullptr) {
- left = !qMapLessThanKey(x->key, akey);
- y = x;
- x = left ? x->leftNode() : x->rightNode();
- }
- Node *z = d->createNode(akey, avalue, y, left);
- return iterator(z);
-}
+ if (d == map.d)
+ return;
-template <class Key, class T>
-typename QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const_iterator pos, const Key &akey, const T &avalue)
-{
- if (d->ref.isShared())
- return this->insertMulti(akey, avalue);
-
- Q_ASSERT_X(isValidIterator(pos), "QMap::insertMulti", "The specified const_iterator argument 'pos' is invalid");
-
- if (pos == constEnd()) {
- // Hint is that the Node is larger than (or equal to) the largest value.
- Node *n = static_cast<Node *>(pos.i->left);
- if (n) {
- while (n->right)
- n = static_cast<Node *>(n->right);
+ detach();
- if (!qMapLessThanKey(n->key, akey))
- return this->insertMulti(akey, avalue); // ignore hint
- Node *z = d->createNode(akey, avalue, n, false); // insert right most
- return iterator(z);
+ Node *n = d->root();
+ auto it = map.cbegin();
+ const auto e = map.cend();
+ while (it != e) {
+ // Insertion here is based on insert(Key, T)
+ auto parent = d->end();
+ bool left = true;
+ Node *lastNode = nullptr;
+ while (n) {
+ parent = n;
+ if (!qMapLessThanKey(n->key, it.key())) {
+ lastNode = n;
+ n = n->leftNode();
+ left = true;
+ } else {
+ n = n->rightNode();
+ left = false;
+ }
}
- return this->insertMulti(akey, avalue);
- } else {
- // Hint indicates that the node should be less (or equal to) the hint given
- // but larger than the previous value.
- Node *next = const_cast<Node*>(pos.i);
- if (qMapLessThanKey(next->key, akey))
- return this->insertMulti(akey, avalue); // ignore hint
-
- if (pos == constBegin()) {
- // There is no previous value (insert left most)
- Node *z = d->createNode(akey, avalue, begin().i, true);
- return iterator(z);
+ if (lastNode && !qMapLessThanKey(it.key(), lastNode->key)) {
+ lastNode->value = it.value();
+ n = lastNode;
} else {
- Node *prev = const_cast<Node*>(pos.i->previousNode());
- if (!qMapLessThanKey(prev->key, akey))
- return this->insertMulti(akey, avalue); // ignore hint
-
- // Hint is ok - do insert
- if (prev->right == nullptr) {
- Node *z = d->createNode(akey, avalue, prev, false);
- return iterator(z);
- }
- if (next->left == nullptr) {
- Node *z = d->createNode(akey, avalue, next, true);
- return iterator(z);
- }
- Q_ASSERT(false); // We should have prev->right == nullptr or next->left == nullptr.
- return this->insertMulti(akey, avalue);
+ n = d->createNode(it.key(), it.value(), parent, left);
+ }
+ ++it;
+ if (it != e) {
+ // Move back up the tree until we find the next branch or node which is
+ // relevant for the next key.
+ while (n != d->root() && qMapLessThanKey(n->key, it.key()))
+ n = static_cast<Node *>(n->parent());
}
}
}
@@ -880,19 +847,6 @@ Q_INLINE_TEMPLATE typename QMap<Key, T>::iterator QMap<Key, T>::find(const Key &
}
template <class Key, class T>
-Q_INLINE_TEMPLATE QMap<Key, T> &QMap<Key, T>::unite(const QMap<Key, T> &other)
-{
- QMap<Key, T> copy(other);
- const_iterator it = copy.constEnd();
- const const_iterator b = copy.constBegin();
- while (it != b) {
- --it;
- insertMulti(it.key(), it.value());
- }
- return *this;
-}
-
-template <class Key, class T>
QPair<typename QMap<Key, T>::iterator, typename QMap<Key, T>::iterator> QMap<Key, T>::equal_range(const Key &akey)
{
detach();
@@ -1008,26 +962,6 @@ Q_OUTOFLINE_TEMPLATE void QMap<Key, T>::detach_helper()
}
template <class Key, class T>
-Q_OUTOFLINE_TEMPLATE QList<Key> QMap<Key, T>::uniqueKeys() const
-{
- QList<Key> res;
- res.reserve(size()); // May be too much, but assume short lifetime
- const_iterator i = begin();
- if (i != end()) {
- for (;;) {
- const Key &aKey = i.key();
- res.append(aKey);
- do {
- if (++i == end())
- goto break_out_of_outer_loop;
- } while (!qMapLessThanKey(aKey, i.key())); // loop while (key == i.key())
- }
- }
-break_out_of_outer_loop:
- return res;
-}
-
-template <class Key, class T>
Q_OUTOFLINE_TEMPLATE QList<Key> QMap<Key, T>::keys() const
{
QList<Key> res;
@@ -1080,21 +1014,6 @@ Q_OUTOFLINE_TEMPLATE QList<T> QMap<Key, T>::values() const
}
template <class Key, class T>
-Q_OUTOFLINE_TEMPLATE QList<T> QMap<Key, T>::values(const Key &akey) const
-{
- QList<T> res;
- Node *n = d->findNode(akey);
- if (n) {
- const_iterator it(n);
- do {
- res.append(*it);
- ++it;
- } while (it != constEnd() && !qMapLessThanKey<Key>(akey, it.key()));
- }
- return res;
-}
-
-template <class Key, class T>
Q_INLINE_TEMPLATE typename QMap<Key, T>::const_iterator QMap<Key, T>::lowerBound(const Key &akey) const
{
Node *lb = d->root() ? d->root()->lowerBound(akey) : nullptr;
@@ -1190,15 +1109,20 @@ public:
QMultiMap(QMap<Key, T> &&other) noexcept : QMap<Key, T>(std::move(other)) {}
void swap(QMultiMap<Key, T> &other) noexcept { QMap<Key, T>::swap(other); }
+ QList<Key> uniqueKeys() const;
+ QList<T> values(const Key &key) const;
+
+ using typename QMap<Key, T>::iterator;
+ using typename QMap<Key, T>::const_iterator;
+
inline typename QMap<Key, T>::iterator replace(const Key &key, const T &value)
{ return QMap<Key, T>::insert(key, value); }
- inline typename QMap<Key, T>::iterator insert(const Key &key, const T &value)
- { return QMap<Key, T>::insertMulti(key, value); }
- inline typename QMap<Key, T>::iterator insert(typename QMap<Key, T>::const_iterator pos, const Key &key, const T &value)
- { return QMap<Key, T>::insertMulti(pos, key, value); }
+ iterator insert(const Key &key, const T &value);
+ iterator insert(const_iterator pos, const Key &key, const T &value);
+ QMultiMap &unite(const QMultiMap &other);
inline QMultiMap &operator+=(const QMultiMap &other)
- { this->unite(other); return *this; }
+ { return unite(other); }
inline QMultiMap operator+(const QMultiMap &other) const
{ QMultiMap result = *this; result += other; return result; }
@@ -1207,11 +1131,18 @@ public:
using QMap<Key, T>::count;
using QMap<Key, T>::find;
using QMap<Key, T>::constFind;
+ using QMap<Key, T>::values;
+ using QMap<Key, T>::size;
+ using QMap<Key, T>::detach;
+ using QMap<Key, T>::erase;
+ using QMap<Key, T>::isValidIterator;
+ using typename QMap<Key, T>::Node;
bool contains(const Key &key, const T &value) const;
int remove(const Key &key, const T &value);
+ int count(const Key &key) const;
int count(const Key &key, const T &value) const;
typename QMap<Key, T>::iterator find(const Key &key, const T &value) {
@@ -1242,6 +1173,123 @@ private:
};
template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE QList<Key> QMultiMap<Key, T>::uniqueKeys() const
+{
+ QList<Key> res;
+ res.reserve(size()); // May be too much, but assume short lifetime
+ const_iterator i = this->begin();
+ if (i != this->end()) {
+ for (;;) {
+ const Key &aKey = i.key();
+ res.append(aKey);
+ do {
+ if (++i == this->end())
+ goto break_out_of_outer_loop;
+ } while (!qMapLessThanKey(aKey, i.key())); // loop while (key == i.key())
+ }
+ }
+break_out_of_outer_loop:
+ return res;
+}
+
+template <class Key, class T>
+Q_OUTOFLINE_TEMPLATE QList<T> QMultiMap<Key, T>::values(const Key &akey) const
+{
+ QList<T> res;
+ Node *n = this->d->findNode(akey);
+ if (n) {
+ const_iterator it(n);
+ do {
+ res.append(*it);
+ ++it;
+ } while (it != this->constEnd() && !qMapLessThanKey<Key>(akey, it.key()));
+ }
+ return res;
+}
+
+template <class Key, class T>
+Q_INLINE_TEMPLATE typename QMultiMap<Key, T>::iterator QMultiMap<Key, T>::insert(const Key &akey,
+ const T &avalue)
+{
+ detach();
+ Node* y = this->d->end();
+ Node* x = static_cast<Node *>(this->d->root());
+ bool left = true;
+ while (x != nullptr) {
+ left = !qMapLessThanKey(x->key, akey);
+ y = x;
+ x = left ? x->leftNode() : x->rightNode();
+ }
+ Node *z = this->d->createNode(akey, avalue, y, left);
+ return iterator(z);
+}
+
+template <class Key, class T>
+typename QMultiMap<Key, T>::iterator QMultiMap<Key, T>::insert(const_iterator pos, const Key &akey, const T &avalue)
+{
+ if (this->d->ref.isShared())
+ return insert(akey, avalue);
+
+ Q_ASSERT_X(isValidIterator(pos), "QMap::insert", "The specified const_iterator argument 'pos' is invalid");
+
+ if (pos == this->constEnd()) {
+ // Hint is that the Node is larger than (or equal to) the largest value.
+ Node *n = static_cast<Node *>(pos.i->left);
+ if (n) {
+ while (n->right)
+ n = static_cast<Node *>(n->right);
+
+ if (!qMapLessThanKey(n->key, akey))
+ return insert(akey, avalue); // ignore hint
+ Node *z = this->d->createNode(akey, avalue, n, false); // insert right most
+ return iterator(z);
+ }
+ return insert(akey, avalue);
+ } else {
+ // Hint indicates that the node should be less (or equal to) the hint given
+ // but larger than the previous value.
+ Node *next = const_cast<Node*>(pos.i);
+ if (qMapLessThanKey(next->key, akey))
+ return insert(akey, avalue); // ignore hint
+
+ if (pos == this->constBegin()) {
+ // There is no previous value (insert left most)
+ Node *z = this->d->createNode(akey, avalue, this->begin().i, true);
+ return iterator(z);
+ } else {
+ Node *prev = const_cast<Node*>(pos.i->previousNode());
+ if (!qMapLessThanKey(prev->key, akey))
+ return insert(akey, avalue); // ignore hint
+
+ // Hint is ok - do insert
+ if (prev->right == nullptr) {
+ Node *z = this->d->createNode(akey, avalue, prev, false);
+ return iterator(z);
+ }
+ if (next->left == nullptr) {
+ Node *z = this->d->createNode(akey, avalue, next, true);
+ return iterator(z);
+ }
+ Q_ASSERT(false); // We should have prev->right == nullptr or next->left == nullptr.
+ return insert(akey, avalue);
+ }
+ }
+}
+
+template <class Key, class T>
+Q_INLINE_TEMPLATE QMultiMap<Key, T> &QMultiMap<Key, T>::unite(const QMultiMap<Key, T> &other)
+{
+ QMultiMap<Key, T> copy(other);
+ const_iterator it = copy.constEnd();
+ const const_iterator b = copy.constBegin();
+ while (it != b) {
+ --it;
+ insert(it.key(), it.value());
+ }
+ return *this;
+}
+
+template <class Key, class T>
Q_INLINE_TEMPLATE bool QMultiMap<Key, T>::contains(const Key &key, const T &value) const
{
return constFind(key, value) != QMap<Key, T>::constEnd();
@@ -1255,7 +1303,7 @@ Q_INLINE_TEMPLATE int QMultiMap<Key, T>::remove(const Key &key, const T &value)
typename QMap<Key, T>::iterator end(QMap<Key, T>::end());
while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
if (i.value() == value) {
- i = this->erase(i);
+ i = erase(i);
++n;
} else {
++i;
@@ -1265,6 +1313,23 @@ Q_INLINE_TEMPLATE int QMultiMap<Key, T>::remove(const Key &key, const T &value)
}
template <class Key, class T>
+Q_INLINE_TEMPLATE int QMultiMap<Key, T>::count(const Key &akey) const
+{
+ QMultiMap::Node *firstNode;
+ QMultiMap::Node *lastNode;
+ this->d->nodeRange(akey, &firstNode, &lastNode);
+
+ const_iterator ci_first(firstNode);
+ const const_iterator ci_last(lastNode);
+ int cnt = 0;
+ while (ci_first != ci_last) {
+ ++cnt;
+ ++ci_first;
+ }
+ return cnt;
+}
+
+template <class Key, class T>
Q_INLINE_TEMPLATE int QMultiMap<Key, T>::count(const Key &key, const T &value) const
{
int n = 0;
@@ -1278,6 +1343,44 @@ Q_INLINE_TEMPLATE int QMultiMap<Key, T>::count(const Key &key, const T &value) c
return n;
}
+#if QT_DEPRECATED_SINCE(5, 15)
+template<class Key, class T>
+QList<Key> QMap<Key, T>::uniqueKeys() const
+{
+ return static_cast<const QMultiMap<Key, T> *>(this)->uniqueKeys();
+}
+
+template<class Key, class T>
+QList<T> QMap<Key, T>::values(const Key &key) const
+{
+ return static_cast<const QMultiMap<Key, T> *>(this)->values(key);
+}
+
+template<class Key, class T>
+int QMap<Key, T>::count(const Key &key) const
+{
+ return static_cast<const QMultiMap<Key, T> *>(this)->count(key);
+}
+
+template<class Key, class T>
+typename QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const Key &key, const T &value)
+{
+ return static_cast<QMultiMap<Key, T> *>(this)->insert(key, value);
+}
+
+template<class Key, class T>
+typename QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const_iterator pos, const Key &akey, const T &avalue)
+{
+ return static_cast<QMultiMap<Key, T> *>(this)->insert(pos, akey, avalue);
+}
+
+template<class Key, class T>
+QMap<Key, T> &QMap<Key, T>::unite(const QMap<Key, T> &other)
+{
+ return static_cast<QMultiMap<Key, T> *>(this)->unite(other);
+}
+#endif
+
Q_DECLARE_ASSOCIATIVE_ITERATOR(Map)
Q_DECLARE_MUTABLE_ASSOCIATIVE_ITERATOR(Map)
diff --git a/src/corelib/tools/qscopedvaluerollback.h b/src/corelib/tools/qscopedvaluerollback.h
index f904b8dfcb..b8ceff6665 100644
--- a/src/corelib/tools/qscopedvaluerollback.h
+++ b/src/corelib/tools/qscopedvaluerollback.h
@@ -45,7 +45,11 @@
QT_BEGIN_NAMESPACE
template <typename T>
-class QScopedValueRollback
+class
+#if QT_HAS_CPP_ATTRIBUTE(nodiscard) && __cplusplus >= 201703L
+[[nodiscard]]
+#endif
+QScopedValueRollback
{
public:
explicit QScopedValueRollback(T &var)
diff --git a/src/corelib/tools/qscopeguard.h b/src/corelib/tools/qscopeguard.h
index 40d2747b1d..6a5bc6cc61 100644
--- a/src/corelib/tools/qscopeguard.h
+++ b/src/corelib/tools/qscopeguard.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sérgio Martins <sergio.martins@kdab.com>
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -42,13 +43,11 @@
#include <QtCore/qglobal.h>
+#include <type_traits>
+#include <utility>
QT_BEGIN_NAMESPACE
-
-template <typename F> class QScopeGuard;
-template <typename F> QScopeGuard<F> qScopeGuard(F f);
-
template <typename F>
class
#if __has_cpp_attribute(nodiscard)
@@ -59,13 +58,23 @@ Q_REQUIRED_RESULT
QScopeGuard
{
public:
+ explicit QScopeGuard(F &&f) noexcept
+ : m_func(std::move(f))
+ {
+ }
+
+ explicit QScopeGuard(const F &f) noexcept
+ : m_func(f)
+ {
+ }
+
QScopeGuard(QScopeGuard &&other) noexcept
: m_func(std::move(other.m_func))
, m_invoke(qExchange(other.m_invoke, false))
{
}
- ~QScopeGuard()
+ ~QScopeGuard() noexcept
{
if (m_invoke)
m_func();
@@ -77,26 +86,23 @@ public:
}
private:
- explicit QScopeGuard(F &&f) noexcept
- : m_func(std::move(f))
- {
- }
-
Q_DISABLE_COPY(QScopeGuard)
F m_func;
bool m_invoke = true;
- friend QScopeGuard qScopeGuard<F>(F);
};
+#ifdef __cpp_deduction_guides
+template <typename F> QScopeGuard(F(&)()) -> QScopeGuard<F(*)()>;
+#endif
template <typename F>
#if __has_cpp_attribute(nodiscard)
Q_REQUIRED_RESULT
#endif
-QScopeGuard<F> qScopeGuard(F f)
+QScopeGuard<typename std::decay<F>::type> qScopeGuard(F &&f)
{
- return QScopeGuard<F>(std::move(f));
+ return QScopeGuard<typename std::decay<F>::type>(std::forward<F>(f));
}
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qscopeguard.qdoc b/src/corelib/tools/qscopeguard.qdoc
index 6b3c942e84..572934d890 100644
--- a/src/corelib/tools/qscopeguard.qdoc
+++ b/src/corelib/tools/qscopeguard.qdoc
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sérgio Martins <sergio.martins@kdab.com>
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -35,6 +36,30 @@ QT_BEGIN_NAMESPACE
\inmodule QtCore
\brief Provides a scope guard for calling a function at the end of
a scope.
+
+ QScopeGuard<F> is a class of which the sole purpose is to run the function
+ \a f in its destructor. This is useful for guaranteeing
+ your cleanup code is executed, whether the function is exited normally,
+ exited early by a return statement, or exited by an exception.
+
+ \note Exceptions are not supported. The callable shouldn't throw when
+ executed, copied or moved.
+
+ \sa QScopedValueRollback
+*/
+
+/*!
+ \fn template <typename F> QScopeGuard<F>::QScopeGuard(F &&f)
+ \fn template <typename F> QScopeGuard<F>::QScopeGuard(const F &f)
+
+ Create a scope guard that will execute \a f at the end of the scope.
+
+ If \e F is a lambda, its type cannot be written. In that case you need to
+ either rely on class template argument deduction (C++17 feature) and leave
+ the template parameter out completely or use the helper function
+ qScopeGuard() instead of this constructor.
+
+ \since 5.15
*/
/*! \fn template <typename F> void QScopeGuard<F>::dismiss()
@@ -51,23 +76,17 @@ QT_BEGIN_NAMESPACE
of the scope.
\ingroup misc
- QScopeGuard<F> is a class of which the sole purpose is to run the function
- \a f in its destructor. This is useful for guaranteeing
- your cleanup code is executed, whether the function is exited normally,
- exited early by a return statement, or exited by an exception.
+ Create a scope guard that will execute \a f at the end of the scope.
- If \e F is a lambda then you cannot instantiate the template directly,
- therefore the qScopeGuard() helper is provided and QScopeGuard<F> is made a
- private implementation detail.
+ This helper function is provided so that you can easily construct a
+ QScopeGuard without having to name the template parameter for the type of
+ the callable. If \e F is a lambda then you cannot write its type and relying
+ on this helper or class template argument deduction is necessary.
Example usage is as follows:
\snippet code/src_corelib_tools_qscopeguard.cpp 0
- \note Exceptions are not supported. The callable shouldn't throw when
- executed, copied or moved.
-
- \sa QScopedValueRollback
*/
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h
index 2e72832185..879e2176f2 100644
--- a/src/corelib/tools/qset.h
+++ b/src/corelib/tools/qset.h
@@ -108,7 +108,11 @@ public:
friend class QSet<T>;
public:
+#if QT_DEPRECATED_SINCE(5, 15)
typedef std::bidirectional_iterator_tag iterator_category;
+#else
+ typedef std::forward_iterator_tag iterator_category;
+#endif
typedef qptrdiff difference_type;
typedef T value_type;
typedef const T *pointer;
@@ -128,13 +132,15 @@ public:
{ return i != o.i; }
inline iterator &operator++() { ++i; return *this; }
inline iterator operator++(int) { iterator r = *this; ++i; return r; }
- inline iterator &operator--() { --i; return *this; }
- 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; }
+#if QT_DEPRECATED_SINCE(5, 15)
+ inline QT_DEPRECATED iterator &operator--() { --i; return *this; }
+ inline QT_DEPRECATED iterator operator--(int) { iterator r = *this; --i; return r; }
+ inline QT_DEPRECATED iterator operator+(int j) const { return i + j; }
+ inline QT_DEPRECATED iterator operator-(int j) const { return i - j; }
+ friend inline QT_DEPRECATED iterator operator+(int j, iterator k) { return k + j; }
+ inline QT_DEPRECATED iterator &operator+=(int j) { i += j; return *this; }
+ inline QT_DEPRECATED iterator &operator-=(int j) { i -= j; return *this; }
+#endif
};
class const_iterator
@@ -145,7 +151,11 @@ public:
friend class QSet<T>;
public:
+#if QT_DEPRECATED_SINCE(5, 15)
typedef std::bidirectional_iterator_tag iterator_category;
+#else
+ typedef std::forward_iterator_tag iterator_category;
+#endif
typedef qptrdiff difference_type;
typedef T value_type;
typedef const T *pointer;
@@ -163,19 +173,18 @@ public:
inline bool operator!=(const const_iterator &o) const { return i != o.i; }
inline const_iterator &operator++() { ++i; return *this; }
inline const_iterator operator++(int) { const_iterator r = *this; ++i; return r; }
- inline const_iterator &operator--() { --i; return *this; }
- 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; }
+#if QT_DEPRECATED_SINCE(5, 15)
+ inline QT_DEPRECATED const_iterator &operator--() { --i; return *this; }
+ inline QT_DEPRECATED const_iterator operator--(int) { const_iterator r = *this; --i; return r; }
+ inline QT_DEPRECATED const_iterator operator+(int j) const { return i + j; }
+ inline QT_DEPRECATED const_iterator operator-(int j) const { return i - j; }
+ friend inline QT_DEPRECATED const_iterator operator+(int j, const_iterator k) { return k + j; }
+ inline QT_DEPRECATED const_iterator &operator+=(int j) { i += j; return *this; }
+ inline QT_DEPRECATED const_iterator &operator-=(int j) { i -= j; return *this; }
+#endif
};
// STL style
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-
inline iterator begin() { return q_hash.begin(); }
inline const_iterator begin() const noexcept { return q_hash.begin(); }
inline const_iterator cbegin() const noexcept { return q_hash.begin(); }
@@ -185,12 +194,17 @@ public:
inline const_iterator cend() const noexcept { return q_hash.end(); }
inline const_iterator constEnd() const noexcept { return q_hash.constEnd(); }
- reverse_iterator rbegin() { return reverse_iterator(end()); }
- reverse_iterator rend() { return reverse_iterator(begin()); }
- const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); }
- const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); }
- const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); }
- const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); }
+#if QT_DEPRECATED_SINCE(5, 15)
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ reverse_iterator QT_DEPRECATED rbegin() { return reverse_iterator(end()); }
+ reverse_iterator QT_DEPRECATED rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator QT_DEPRECATED rbegin() const noexcept { return const_reverse_iterator(end()); }
+ const_reverse_iterator QT_DEPRECATED rend() const noexcept { return const_reverse_iterator(begin()); }
+ const_reverse_iterator QT_DEPRECATED crbegin() const noexcept { return const_reverse_iterator(end()); }
+ const_reverse_iterator QT_DEPRECATED crend() const noexcept { return const_reverse_iterator(begin()); }
+#endif
iterator erase(iterator i)
{ return erase(m2c(i)); }
@@ -429,17 +443,19 @@ public:
inline bool hasNext() const { return c->constEnd() != i; }
inline const T &next() { n = i++; return *n; }
inline const T &peekNext() const { return *i; }
- inline bool hasPrevious() const { return c->constBegin() != i; }
- inline const T &previous() { n = --i; return *n; }
- inline const T &peekPrevious() const { iterator p = i; return *--p; }
inline void remove()
{ if (c->constEnd() != n) { i = c->erase(n); n = c->end(); } }
inline const T &value() const { Q_ASSERT(item_exists()); return *n; }
inline bool findNext(const T &t)
{ while (c->constEnd() != (n = i)) if (*i++ == t) return true; return false; }
- inline bool findPrevious(const T &t)
+#if QT_DEPRECATED_SINCE(5, 15)
+ inline QT_DEPRECATED bool hasPrevious() const { return c->constBegin() != i; }
+ inline QT_DEPRECATED const T &previous() { n = --i; return *n; }
+ inline QT_DEPRECATED const T &peekPrevious() const { iterator p = i; return *--p; }
+ inline QT_DEPRECATED bool findPrevious(const T &t)
{ while (c->constBegin() != i) if (*(n = --i) == t) return true;
n = c->end(); return false; }
+#endif
};
#endif // QT_NO_JAVA_STYLE_ITERATORS
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index 78854be0de..33a0697e12 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -906,8 +906,6 @@
Calling this function on QSet<T>::constEnd() leads to
undefined results.
-
- \sa operator--()
*/
/*!
@@ -924,6 +922,7 @@
/*!
\fn template <class T> QSet<T>::iterator &QSet<T>::iterator::operator--()
\fn template <class T> QSet<T>::const_iterator &QSet<T>::const_iterator::operator--()
+ \obsolete
The prefix -- operator (\c{--it}) makes the preceding item
current and returns an iterator to the new current item.
@@ -937,6 +936,7 @@
/*!
\fn template <class T> QSet<T>::iterator QSet<T>::iterator::operator--(int)
\fn template <class T> QSet<T>::const_iterator QSet<T>::const_iterator::operator--(int)
+ \obsolete
\overload
@@ -947,6 +947,7 @@
/*!
\fn template <class T> QSet<T>::iterator QSet<T>::iterator::operator+(int j) const
\fn template <class T> QSet<T>::const_iterator QSet<T>::const_iterator::operator+(int j) const
+ \obsolete
Returns an iterator to the item at \a j positions forward from
this iterator. (If \a j is negative, the iterator goes backward.)
@@ -959,6 +960,7 @@
/*!
\fn template <class T> QSet<T>::iterator QSet<T>::iterator::operator-(int j) const
\fn template <class T> QSet<T>::const_iterator QSet<T>::const_iterator::operator-(int j) const
+ \obsolete
Returns an iterator to the item at \a j positions backward from
this iterator. (If \a j is negative, the iterator goes forward.)
@@ -971,6 +973,7 @@
/*!
\fn template <class T> QSet<T>::iterator &QSet<T>::iterator::operator+=(int j)
\fn template <class T> QSet<T>::const_iterator &QSet<T>::const_iterator::operator+=(int j)
+ \obsolete
Advances the iterator by \a j items. (If \a j is negative, the
iterator goes backward.)
@@ -983,6 +986,7 @@
/*!
\fn template <class T> QSet<T>::iterator &QSet<T>::iterator::operator-=(int j)
\fn template <class T> QSet<T>::const_iterator &QSet<T>::const_iterator::operator-=(int j)
+ \obsolete
Makes the iterator go back by \a j items. (If \a j is negative,
the iterator goes forward.)
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index fb9b5996f6..75c380ee8a 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) 2018 Intel Corporation.
+** Copyright (C) 2019 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -188,6 +188,8 @@ static inline quint64 detectProcessorFeatures()
# define PICreg "%%rbx"
#endif
+static bool checkRdrndWorks() noexcept;
+
static int maxBasicCpuidSupported()
{
#if defined(Q_CC_EMSCRIPTEN)
@@ -376,37 +378,8 @@ static quint64 detectProcessorFeatures()
features &= ~AllAVX512;
}
-#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
- /**
- * Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a
- * failing random generation instruction, which always returns
- * 0xffffffff, even when generation was "successful".
- *
- * This code checks if hardware random generator generates four consecutive
- * equal numbers. If it does, then we probably have a failing one and
- * should disable it completely.
- *
- * https://bugreports.qt.io/browse/QTBUG-69423
- */
- if (features & CpuFeatureRDRND) {
- const qsizetype testBufferSize = 4;
- unsigned testBuffer[4] = {};
-
- const qsizetype generated = qRandomCpu(testBuffer, testBufferSize);
-
- if (Q_UNLIKELY(generated == testBufferSize &&
- testBuffer[0] == testBuffer[1] &&
- testBuffer[1] == testBuffer[2] &&
- testBuffer[2] == testBuffer[3])) {
-
- fprintf(stderr, "WARNING: CPU random generator seem to be failing, disable hardware random number generation\n");
- fprintf(stderr, "WARNING: RDRND generated: 0x%x 0x%x 0x%x 0x%x\n",
- testBuffer[0], testBuffer[1], testBuffer[2], testBuffer[3]);
-
- features &= ~CpuFeatureRDRND;
- }
- }
-#endif
+ if (features & CpuFeatureRDRND && !checkRdrndWorks())
+ features &= ~(CpuFeatureRDRND | CpuFeatureRDSEED);
return features;
}
@@ -626,16 +599,45 @@ void qDumpCPUFeatures()
# ifdef Q_PROCESSOR_X86_64
# define _rdrandXX_step _rdrand64_step
+# define _rdseedXX_step _rdseed64_step
# else
# define _rdrandXX_step _rdrand32_step
+# define _rdseedXX_step _rdseed32_step
# endif
-QT_FUNCTION_TARGET(RDRND) qsizetype qRandomCpu(void *buffer, qsizetype count) noexcept
+# if QT_COMPILER_SUPPORTS_HERE(RDSEED)
+static QT_FUNCTION_TARGET(RDSEED) unsigned *qt_random_rdseed(unsigned *ptr, unsigned *end) noexcept
{
- unsigned *ptr = reinterpret_cast<unsigned *>(buffer);
- unsigned *end = ptr + count;
- int retries = 10;
+ // Unlike for the RDRAND code below, the Intel whitepaper describing the
+ // use of the RDSEED instruction indicates we should not retry in a loop.
+ // If the independent bit generator used by RDSEED is out of entropy, it
+ // may take time to replenish.
+ // https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide
+ while (ptr + sizeof(qregisteruint)/sizeof(*ptr) <= end) {
+ if (_rdseedXX_step(reinterpret_cast<qregisteruint *>(ptr)) == 0)
+ goto out;
+ ptr += sizeof(qregisteruint)/sizeof(*ptr);
+ }
+
+ if (sizeof(*ptr) != sizeof(qregisteruint) && ptr != end) {
+ if (_rdseed32_step(ptr) == 0)
+ goto out;
+ ++ptr;
+ }
+
+out:
+ return ptr;
+}
+# else
+static unsigned *qt_random_rdseed(unsigned *ptr, unsigned *)
+{
+ return ptr;
+}
+# endif
+static QT_FUNCTION_TARGET(RDRND) unsigned *qt_random_rdrnd(unsigned *ptr, unsigned *end) noexcept
+{
+ int retries = 10;
while (ptr + sizeof(qregisteruint)/sizeof(*ptr) <= end) {
if (_rdrandXX_step(reinterpret_cast<qregisteruint *>(ptr)))
ptr += sizeof(qregisteruint)/sizeof(*ptr);
@@ -653,9 +655,64 @@ QT_FUNCTION_TARGET(RDRND) qsizetype qRandomCpu(void *buffer, qsizetype count) no
}
out:
- return ptr - reinterpret_cast<unsigned *>(buffer);
+ return ptr;
+}
+
+static QT_FUNCTION_TARGET(RDRND) Q_DECL_COLD_FUNCTION bool checkRdrndWorks() noexcept
+{
+ /*
+ * Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a
+ * failing random generation instruction, which always returns
+ * 0xffffffff, even when generation was "successful".
+ *
+ * This code checks if hardware random generator generates four consecutive
+ * equal numbers. If it does, then we probably have a failing one and
+ * should disable it completely.
+ *
+ * https://bugreports.qt.io/browse/QTBUG-69423
+ */
+ constexpr qsizetype TestBufferSize = 4;
+ unsigned testBuffer[TestBufferSize] = {};
+
+ unsigned *end = qt_random_rdrnd(testBuffer, testBuffer + TestBufferSize);
+ if (end < testBuffer + 3) {
+ // Random generation didn't produce enough data for us to make a
+ // determination whether it's working or not. Assume it isn't, but
+ // don't print a warning.
+ return false;
+ }
+
+ // Check the results for equality
+ if (testBuffer[0] == testBuffer[1]
+ && testBuffer[0] == testBuffer[2]
+ && (end < testBuffer + TestBufferSize || testBuffer[0] == testBuffer[3])) {
+ fprintf(stderr, "WARNING: CPU random generator seem to be failing, "
+ "disabling hardware random number generation\n"
+ "WARNING: RDRND generated:");
+ for (unsigned *ptr = testBuffer; ptr < end; ++ptr)
+ fprintf(stderr, " 0x%x", *ptr);
+ fprintf(stderr, "\n");
+ return false;
+ }
+
+ // We're good
+ return true;
}
-#endif
+QT_FUNCTION_TARGET(RDRND) qsizetype qRandomCpu(void *buffer, qsizetype count) noexcept
+{
+ unsigned *ptr = reinterpret_cast<unsigned *>(buffer);
+ unsigned *end = ptr + count;
+
+ if (qCpuHasFeature(RDSEED))
+ ptr = qt_random_rdseed(ptr, end);
+
+ // fill the buffer with RDRND if RDSEED didn't
+ ptr = qt_random_rdrnd(ptr, end);
+ return ptr - reinterpret_cast<unsigned *>(buffer);
+}
+#elif defined(Q_PROCESSOR_X86) && !defined(Q_OS_NACL) && !defined(Q_PROCESSOR_ARM)
+static bool checkRdrndWorks() noexcept { return false; }
+#endif // Q_PROCESSOR_X86 && RDRND
QT_END_NAMESPACE
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 40c84157cd..e078ab4409 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -12,6 +12,7 @@ HEADERS += \
tools/qcontainerfwd.h \
tools/qcontainertools_impl.h \
tools/qcryptographichash.h \
+ tools/qduplicatetracker_p.h \
tools/qfreelist_p.h \
tools/qhash.h \
tools/qhashfunctions.h \
diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in
index 1d947159e2..a814678f7b 100644
--- a/src/dbus/Qt5DBusConfigExtras.cmake.in
+++ b/src/dbus/Qt5DBusConfigExtras.cmake.in
@@ -31,3 +31,14 @@ endif()
set(Qt5DBus_QDBUSCPP2XML_EXECUTABLE Qt5::qdbuscpp2xml)
set(Qt5DBus_QDBUSXML2CPP_EXECUTABLE Qt5::qdbusxml2cpp)
+
+# Create versionless tool targets.
+foreach(__qt_tool qdbuscpp2xml qdbusxml2cpp)
+ if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::${__qt_tool}
+ AND TARGET Qt5::${__qt_tool})
+ add_executable(Qt::${__qt_tool} IMPORTED)
+ get_target_property(__qt_imported_location Qt5::${__qt_tool} IMPORTED_LOCATION)
+ set_target_properties(Qt::${__qt_tool}
+ PROPERTIES IMPORTED_LOCATION \"${__qt_imported_location}\")
+ endif()
+endforeach()
diff --git a/src/dbus/Qt5DBusMacros.cmake b/src/dbus/Qt5DBusMacros.cmake
index b381ab0934..1cacccdddd 100644
--- a/src/dbus/Qt5DBusMacros.cmake
+++ b/src/dbus/Qt5DBusMacros.cmake
@@ -34,7 +34,7 @@ include(MacroAddFileDependencies)
include(CMakeParseArguments)
-function(QT5_ADD_DBUS_INTERFACE _sources _interface _basename)
+function(qt5_add_dbus_interface _sources _interface _basename)
get_filename_component(_infile ${_interface} ABSOLUTE)
set(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h")
set(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp")
@@ -70,8 +70,19 @@ function(QT5_ADD_DBUS_INTERFACE _sources _interface _basename)
set(${_sources} ${${_sources}} PARENT_SCOPE)
endfunction()
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_add_dbus_interface sources)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_add_dbus_interface("${sources}" ${ARGN})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_add_dbus_interface("${sources}" ${ARGN})
+ endif()
+ set("${sources}" "${${sources}}" PARENT_SCOPE)
+ endfunction()
+endif()
+
-function(QT5_ADD_DBUS_INTERFACES _sources)
+function(qt5_add_dbus_interfaces _sources)
foreach(_current_FILE ${ARGN})
get_filename_component(_infile ${_current_FILE} ABSOLUTE)
get_filename_component(_basename ${_current_FILE} NAME)
@@ -83,8 +94,19 @@ function(QT5_ADD_DBUS_INTERFACES _sources)
set(${_sources} ${${_sources}} PARENT_SCOPE)
endfunction()
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_add_dbus_interfaces sources)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_add_dbus_interfaces("${sources}" ${ARGN})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_add_dbus_interfaces("${sources}" ${ARGN})
+ endif()
+ set("${sources}" "${${sources}}" PARENT_SCOPE)
+ endfunction()
+endif()
+
-function(QT5_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options )
+function(qt5_generate_dbus_interface _header) # _customName OPTIONS -some -options )
set(options)
set(oneValueArgs)
set(multiValueArgs OPTIONS)
@@ -116,8 +138,18 @@ function(QT5_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -optio
)
endfunction()
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_generate_dbus_interface)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_generate_dbus_interface(${ARGV})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_generate_dbus_interface(${ARGV})
+ endif()
+ endfunction()
+endif()
+
-function(QT5_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName)
+function(qt5_add_dbus_adaptor _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName)
get_filename_component(_infile ${_xml_file} ABSOLUTE)
set(_optionalBasename "${ARGV4}")
@@ -152,3 +184,14 @@ function(QT5_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optio
list(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")
set(${_sources} ${${_sources}} PARENT_SCOPE)
endfunction()
+
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_add_dbus_adaptor sources)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_add_dbus_adaptor("${sources}" ${ARGN})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_add_dbus_adaptor("${sources}" ${ARGN})
+ endif()
+ set("${sources}" "${${sources}}" PARENT_SCOPE)
+ endfunction()
+endif()
diff --git a/src/dbus/qdbusabstractadaptor.cpp b/src/dbus/qdbusabstractadaptor.cpp
index 993607a643..bf0e33e26e 100644
--- a/src/dbus/qdbusabstractadaptor.cpp
+++ b/src/dbus/qdbusabstractadaptor.cpp
@@ -72,7 +72,7 @@ int QDBusAdaptorConnector::relaySlotMethodIndex()
QDBusAdaptorConnector *qDBusFindAdaptorConnector(QObject *obj)
{
if (!obj)
- return 0;
+ return nullptr;
const QObjectList &children = obj->children();
QObjectList::ConstIterator it = children.constBegin();
QObjectList::ConstIterator end = children.constEnd();
@@ -83,7 +83,7 @@ QDBusAdaptorConnector *qDBusFindAdaptorConnector(QObject *obj)
return connector;
}
}
- return 0;
+ return nullptr;
}
QDBusAdaptorConnector *qDBusFindAdaptorConnector(QDBusAbstractAdaptor *adaptor)
@@ -411,7 +411,7 @@ void QDBusAdaptorConnector::qt_static_metacall(QObject *_o, QMetaObject::Call _c
const QMetaObject QDBusAdaptorConnector::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_QDBusAdaptorConnector.data,
- qt_meta_data_QDBusAdaptorConnector, qt_static_metacall, 0, 0 }
+ qt_meta_data_QDBusAdaptorConnector, qt_static_metacall, nullptr, nullptr }
};
const QMetaObject *QDBusAdaptorConnector::metaObject() const
@@ -421,7 +421,7 @@ const QMetaObject *QDBusAdaptorConnector::metaObject() const
void *QDBusAdaptorConnector::qt_metacast(const char *_clname)
{
- if (!_clname) return 0;
+ if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_QDBusAdaptorConnector.stringdata))
return static_cast<void*>(const_cast< QDBusAdaptorConnector*>(this));
return QObject::qt_metacast(_clname);
@@ -443,7 +443,7 @@ int QDBusAdaptorConnector::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
// SIGNAL 0
void QDBusAdaptorConnector::relaySignal(QObject * _t1, const QMetaObject * _t2, int _t3, const QVariantList & _t4)
{
- void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)), const_cast<void*>(reinterpret_cast<const void*>(&_t3)), const_cast<void*>(reinterpret_cast<const void*>(&_t4)) };
+ void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)), const_cast<void*>(reinterpret_cast<const void*>(&_t3)), const_cast<void*>(reinterpret_cast<const void*>(&_t4)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index d15496a792..d603264a1e 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -157,9 +157,9 @@ bool QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, void *retu
const int type = mp.userType();
// is this metatype registered?
const char *expectedSignature = "";
- if (int(mp.type()) != QMetaType::QVariant) {
+ if (int(mp.userType()) != QMetaType::QVariant) {
expectedSignature = QDBusMetaType::typeToSignature(type);
- if (expectedSignature == 0) {
+ if (expectedSignature == nullptr) {
qWarning("QDBusAbstractInterface: type %s must be registered with Qt D-Bus before it can be "
"used to read property %s.%s",
mp.typeName(), qPrintable(interface), mp.name());
@@ -190,7 +190,7 @@ bool QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, void *retu
}
QByteArray foundSignature;
- const char *foundType = 0;
+ const char *foundType = nullptr;
QVariant value = qvariant_cast<QDBusVariant>(reply.arguments().at(0)).variant();
if (value.userType() == type || type == QMetaType::QVariant
@@ -597,7 +597,7 @@ bool QDBusAbstractInterface::callWithCallback(const QString &method,
QObject *receiver,
const char *slot)
{
- return callWithCallback(method, args, receiver, slot, 0);
+ return callWithCallback(method, args, receiver, slot, nullptr);
}
/*!
diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp
index 764bc24165..5a0f0f013b 100644
--- a/src/dbus/qdbusargument.cpp
+++ b/src/dbus/qdbusargument.cpp
@@ -74,11 +74,11 @@ QByteArray QDBusArgumentPrivate::createSignature(int id)
marshaller->ba = &signature;
// run it
- void *null = 0;
+ void *null = nullptr;
QVariant v(id, null);
QDBusArgument arg(marshaller);
QDBusMetaType::marshall(arg, v.userType(), v.constData());
- arg.d = 0;
+ arg.d = nullptr;
// delete it
bool ok = marshaller->ok;
@@ -290,7 +290,7 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d)
QDBusArgument::QDBusArgument()
{
if (!qdbus_loadLibDBus()) {
- d = 0;
+ d = nullptr;
return;
}
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index b7cd4c8989..339f8c5dc8 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -321,7 +321,7 @@ inline const QDBusArgument &operator>>(const QDBusArgument &arg, QMap<Key, T> &m
T value;
arg.beginMapEntry();
arg >> key >> value;
- map.insertMulti(key, value);
+ static_cast<QMultiMap<Key, T> &>(map).insert(key, value);
arg.endMapEntry();
}
arg.endMap();
@@ -330,7 +330,7 @@ inline const QDBusArgument &operator>>(const QDBusArgument &arg, QMap<Key, T> &m
inline QDBusArgument &operator<<(QDBusArgument &arg, const QVariantMap &map)
{
- arg.beginMap(QVariant::String, qMetaTypeId<QDBusVariant>());
+ arg.beginMap(QMetaType::QString, qMetaTypeId<QDBusVariant>());
QVariantMap::ConstIterator it = map.constBegin();
QVariantMap::ConstIterator end = map.constEnd();
for ( ; it != end; ++it) {
@@ -370,7 +370,7 @@ inline const QDBusArgument &operator>>(const QDBusArgument &arg, QHash<Key, T> &
T value;
arg.beginMapEntry();
arg >> key >> value;
- map.insertMulti(key, value);
+ static_cast<QMultiHash<Key, T> &>(map).insert(key, value);
arg.endMapEntry();
}
arg.endMap();
@@ -379,7 +379,7 @@ inline const QDBusArgument &operator>>(const QDBusArgument &arg, QHash<Key, T> &
inline QDBusArgument &operator<<(QDBusArgument &arg, const QVariantHash &map)
{
- arg.beginMap(QVariant::String, qMetaTypeId<QDBusVariant>());
+ arg.beginMap(QMetaType::QString, qMetaTypeId<QDBusVariant>());
QVariantHash::ConstIterator it = map.constBegin();
QVariantHash::ConstIterator end = map.constEnd();
for ( ; it != end; ++it) {
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index d6f3230fd2..412b428bdc 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -101,7 +101,7 @@ QDBusConnectionPrivate *QDBusConnectionManager::busConnection(QDBusConnection::B
Q_ASSERT(type == QDBusConnection::SessionBus || type == QDBusConnection::SystemBus);
if (!qdbus_loadLibDBus())
- return 0;
+ return nullptr;
// we'll start in suspended delivery mode if we're in the main thread
// (the event loop will resume delivery)
@@ -124,7 +124,7 @@ QDBusConnectionPrivate *QDBusConnectionManager::connection(const QString &name)
void QDBusConnectionManager::removeConnection(const QString &name)
{
- QDBusConnectionPrivate *d = 0;
+ QDBusConnectionPrivate *d = nullptr;
d = connectionHash.take(name);
if (d && !d->ref.deref())
d->deleteLater();
@@ -251,7 +251,7 @@ void QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::Co
return;
d = new QDBusConnectionPrivate;
- DBusConnection *c = 0;
+ DBusConnection *c = nullptr;
QDBusErrorInternal error;
switch (data->type) {
case ConnectionRequestData::ConnectToStandardBus:
@@ -275,7 +275,7 @@ void QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::Co
// register on the bus
if (!q_dbus_bus_register(c, error)) {
q_dbus_connection_unref(c);
- c = 0;
+ c = nullptr;
}
}
break;
@@ -427,7 +427,7 @@ void QDBusConnectionManager::createServer(const QString &address, void *server)
QDBusConnection::QDBusConnection(const QString &name)
{
if (name.isEmpty() || _q_manager.isDestroyed()) {
- d = 0;
+ d = nullptr;
} else {
const auto locker = qt_scoped_lock(_q_manager()->mutex);
d = _q_manager()->connection(name);
@@ -492,7 +492,7 @@ QDBusConnection &QDBusConnection::operator=(const QDBusConnection &other)
QDBusConnection QDBusConnection::connectToBus(BusType type, const QString &name)
{
if (_q_manager.isDestroyed() || !qdbus_loadLibDBus()) {
- QDBusConnectionPrivate *d = 0;
+ QDBusConnectionPrivate *d = nullptr;
return QDBusConnection(d);
}
return QDBusConnection(_q_manager()->connectToBus(type, name, false));
@@ -506,7 +506,7 @@ QDBusConnection QDBusConnection::connectToBus(const QString &address,
const QString &name)
{
if (_q_manager.isDestroyed() || !qdbus_loadLibDBus()) {
- QDBusConnectionPrivate *d = 0;
+ QDBusConnectionPrivate *d = nullptr;
return QDBusConnection(d);
}
return QDBusConnection(_q_manager()->connectToBus(address, name));
@@ -521,7 +521,7 @@ QDBusConnection QDBusConnection::connectToPeer(const QString &address,
const QString &name)
{
if (_q_manager.isDestroyed() || !qdbus_loadLibDBus()) {
- QDBusConnectionPrivate *d = 0;
+ QDBusConnectionPrivate *d = nullptr;
return QDBusConnection(d);
}
return QDBusConnection(_q_manager()->connectToPeer(address, name));
@@ -616,7 +616,7 @@ bool QDBusConnection::callWithCallback(const QDBusMessage &message, QObject *rec
d->lastError = err;
return false;
}
- return d->sendWithReplyAsync(message, receiver, returnMethod, errorMethod, timeout) != 0;
+ return d->sendWithReplyAsync(message, receiver, returnMethod, errorMethod, timeout) != nullptr;
}
/*!
@@ -639,7 +639,7 @@ bool QDBusConnection::callWithCallback(const QDBusMessage &message, QObject *rec
bool QDBusConnection::callWithCallback(const QDBusMessage &message, QObject *receiver,
const char *returnMethod, int timeout) const
{
- return callWithCallback(message, receiver, returnMethod, 0, timeout);
+ return callWithCallback(message, receiver, returnMethod, nullptr, timeout);
}
/*!
@@ -705,10 +705,10 @@ QDBusMessage QDBusConnection::call(const QDBusMessage &message, QDBus::CallMode
QDBusPendingCall QDBusConnection::asyncCall(const QDBusMessage &message, int timeout) const
{
if (!d || !d->connection) {
- return QDBusPendingCall(0); // null pointer -> disconnected
+ return QDBusPendingCall(nullptr); // null pointer -> disconnected
}
- QDBusPendingCallPrivate *priv = d->sendWithReplyAsync(message, 0, 0, 0, timeout);
+ QDBusPendingCallPrivate *priv = d->sendWithReplyAsync(message, nullptr, nullptr, nullptr, timeout);
return QDBusPendingCall(priv);
}
@@ -1015,7 +1015,7 @@ QObject *QDBusConnection::objectRegisteredAt(const QString &path) const
Q_ASSERT_X(QDBusUtil::isValidObjectPath(path), "QDBusConnection::registeredObject",
"Invalid object path given");
if (!d || !d->connection || !QDBusUtil::isValidObjectPath(path))
- return 0;
+ return nullptr;
auto pathComponents = path.splitRef(QLatin1Char('/'));
if (pathComponents.constLast().isEmpty())
@@ -1040,7 +1040,7 @@ QObject *QDBusConnection::objectRegisteredAt(const QString &path) const
node = it;
++i;
}
- return 0;
+ return nullptr;
}
@@ -1052,7 +1052,7 @@ QObject *QDBusConnection::objectRegisteredAt(const QString &path) const
QDBusConnectionInterface *QDBusConnection::interface() const
{
if (!d || d->mode != QDBusConnectionPrivate::ClientMode)
- return 0;
+ return nullptr;
return d->busService;
}
@@ -1068,7 +1068,7 @@ QDBusConnectionInterface *QDBusConnection::interface() const
*/
void *QDBusConnection::internalPointer() const
{
- return d ? d->connection : 0;
+ return d ? d->connection : nullptr;
}
/*!
@@ -1139,7 +1139,7 @@ QString QDBusConnection::name() const
*/
QDBusConnection::ConnectionCapabilities QDBusConnection::connectionCapabilities() const
{
- return d ? d->capabilities : ConnectionCapabilities(0);
+ return d ? d->capabilities : ConnectionCapabilities();
}
/*!
diff --git a/src/dbus/qdbuscontext.cpp b/src/dbus/qdbuscontext.cpp
index 5b21c4fa74..de0482be70 100644
--- a/src/dbus/qdbuscontext.cpp
+++ b/src/dbus/qdbuscontext.cpp
@@ -64,7 +64,7 @@ QDBusContextPrivate *QDBusContextPrivate::set(QObject *obj, QDBusContextPrivate
return old;
}
- return 0;
+ return nullptr;
}
/*!
@@ -104,7 +104,7 @@ QDBusContextPrivate *QDBusContextPrivate::set(QObject *obj, QDBusContextPrivate
Constructs an empty QDBusContext.
*/
QDBusContext::QDBusContext()
- : d_ptr(0)
+ : d_ptr(nullptr)
{
}
diff --git a/src/dbus/qdbusdemarshaller.cpp b/src/dbus/qdbusdemarshaller.cpp
index 6befb33d61..c9da593ad2 100644
--- a/src/dbus/qdbusdemarshaller.cpp
+++ b/src/dbus/qdbusdemarshaller.cpp
@@ -295,7 +295,7 @@ QVariant QDBusDemarshaller::toVariantInternal()
// qWarning("QDBusDemarshaller: Found unknown D-Bus type %d '%c'",
// q_dbus_message_iter_get_arg_type(&iterator),
// q_dbus_message_iter_get_arg_type(&iterator));
- char *ptr = 0;
+ char *ptr = nullptr;
ptr += q_dbus_message_iter_get_arg_type(&iterator);
q_dbus_message_iter_next(&iterator);
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 4c27a93382..669b330f1d 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -127,7 +127,7 @@ void qdbusDefaultThreadDebug(int action, int condition, QDBusConnectionPrivate *
"condition unknown")
<< "in connection" << conn;
}
-qdbusThreadDebugFunc qdbusThreadDebug = 0;
+qdbusThreadDebugFunc qdbusThreadDebug = nullptr;
#endif
typedef QVarLengthArray<QDBusSpyCallEvent::Hook, 4> QDBusSpyHookList;
@@ -222,7 +222,7 @@ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data)
watcher.write->setEnabled(q_dbus_watch_get_enabled(watch));
d->connect(watcher.write, &QSocketNotifier::activated, d, &QDBusConnectionPrivate::socketWrite);
}
- d->watchers.insertMulti(fd, watcher);
+ d->watchers.insert(fd, watcher);
return true;
}
@@ -400,7 +400,7 @@ static bool findObject(const QDBusConnectionPrivate::ObjectTreeNode *root,
// match
node = it;
else
- node = 0;
+ node = nullptr;
start = end + 1;
}
@@ -413,7 +413,7 @@ static bool findObject(const QDBusConnectionPrivate::ObjectTreeNode *root,
else
// there really is no object here
// we're just looking at an unused space in the QVector
- node = 0;
+ node = nullptr;
}
return node;
}
@@ -440,7 +440,7 @@ static QObject *findChildObject(const QDBusConnectionPrivate::ObjectTreeNode *ro
const QObjectList children = obj->children();
// find a child with the proper name
- QObject *next = 0;
+ QObject *next = nullptr;
QObjectList::ConstIterator it = children.constBegin();
QObjectList::ConstIterator end = children.constEnd();
for ( ; it != end; ++it)
@@ -458,7 +458,7 @@ static QObject *findChildObject(const QDBusConnectionPrivate::ObjectTreeNode *ro
}
// object not found
- return 0;
+ return nullptr;
}
static QDBusConnectionPrivate::ArgMatchRules matchArgsForService(const QString &service, QDBusServiceWatcher::WatchMode mode)
@@ -599,7 +599,7 @@ static void huntAndDestroy(QObject *needle, QDBusConnectionPrivate::ObjectTreeNo
haystack.children.end());
if (needle == haystack.obj) {
- haystack.obj = 0;
+ haystack.obj = nullptr;
haystack.flags = 0;
}
}
@@ -609,7 +609,7 @@ static void huntAndUnregister(const QVector<QStringRef> &pathComponents, int i,
{
if (pathComponents.count() == i) {
// found it
- node->obj = 0;
+ node->obj = nullptr;
node->flags = 0;
if (mode == QDBusConnection::UnregisterTree) {
@@ -660,7 +660,7 @@ static void huntAndEmit(DBusConnection *connection, DBusMessage *msg,
qDBusDebug() << QThread::currentThread() << "emitting signal at" << p;
DBusMessage *msg2 = q_dbus_message_copy(msg);
q_dbus_message_set_path(msg2, p);
- q_dbus_connection_send(connection, msg2, 0);
+ q_dbus_connection_send(connection, msg2, nullptr);
q_dbus_message_unref(msg2);
}
}
@@ -727,12 +727,12 @@ static int findSlot(const QMetaObject *mo, const QByteArray &name, int flags,
++i;
// make sure that the output parameters have signatures too
- if (returnType != QMetaType::UnknownType && returnType != QMetaType::Void && QDBusMetaType::typeToSignature(returnType) == 0)
+ if (returnType != QMetaType::UnknownType && returnType != QMetaType::Void && QDBusMetaType::typeToSignature(returnType) == nullptr)
continue;
bool ok = true;
for (int j = i; ok && j < metaTypes.count(); ++j)
- if (QDBusMetaType::typeToSignature(metaTypes.at(i)) == 0)
+ if (QDBusMetaType::typeToSignature(metaTypes.at(i)) == nullptr)
ok = false;
if (!ok)
continue;
@@ -790,13 +790,13 @@ QDBusCallDeliveryEvent* QDBusConnectionPrivate::prepareReply(QDBusConnectionPriv
--n;
if (msg.arguments().count() < n)
- return 0; // too few arguments
+ return nullptr; // too few arguments
// check that types match
for (int i = 0; i < n; ++i)
if (metaTypes.at(i + 1) != msg.arguments().at(i).userType() &&
msg.arguments().at(i).userType() != qMetaTypeId<QDBusArgument>())
- return 0; // no match
+ return nullptr; // no match
// we can deliver
// prepare for the call
@@ -944,7 +944,7 @@ void QDBusConnectionPrivate::deliverCall(QObject *object, int /*flags*/, const Q
params.append(const_cast<void *>(arg.constData()));
else if (arg.userType() == qMetaTypeId<QDBusArgument>()) {
// convert to what the function expects
- void *null = 0;
+ void *null = nullptr;
auxParameters.append(QVariant(id, null));
const QDBusArgument &in =
@@ -972,7 +972,7 @@ void QDBusConnectionPrivate::deliverCall(QObject *object, int /*flags*/, const Q
// output arguments
const int numMetaTypes = metaTypes.count();
QVariantList outputArgs;
- void *null = 0;
+ void *null = nullptr;
if (metaTypes[0] != QMetaType::Void && metaTypes[0] != QMetaType::UnknownType) {
outputArgs.reserve(numMetaTypes - i + 1);
QVariant arg(metaTypes[0], null);
@@ -1026,8 +1026,8 @@ void QDBusConnectionPrivate::deliverCall(QObject *object, int /*flags*/, const Q
extern bool qDBusInitThreads();
QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
- : QObject(p), ref(1), capabilities(0), mode(InvalidMode), busService(0),
- connection(0),
+ : QObject(p), ref(1), mode(InvalidMode), busService(nullptr),
+ connection(nullptr),
rootNode(QString(QLatin1Char('/'))),
anonymousAuthenticationAllowed(false),
dispatchEnabled(true)
@@ -1087,11 +1087,11 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate()
}
if (connection)
q_dbus_connection_unref(connection);
- connection = 0;
+ connection = nullptr;
} else if (lastMode == ServerMode) {
if (server)
q_dbus_server_unref(server);
- server = 0;
+ server = nullptr;
}
}
@@ -1531,7 +1531,7 @@ void QDBusConnectionPrivate::handleObjectCall(const QDBusMessage &msg)
// user code, if necessary.
ObjectTreeNode result;
int usedLength;
- QThread *objThread = 0;
+ QThread *objThread = nullptr;
QSemaphore sem;
bool semWait;
@@ -1718,7 +1718,7 @@ void QDBusConnectionPrivate::setServer(QDBusServer *object, DBusServer *s, const
qDBusAddWatch,
qDBusRemoveWatch,
qDBusToggleWatch,
- this, 0);
+ this, nullptr);
//qDebug() << "watch_functions_set" << watch_functions_set;
Q_UNUSED(watch_functions_set);
@@ -1726,13 +1726,13 @@ void QDBusConnectionPrivate::setServer(QDBusServer *object, DBusServer *s, const
qDBusAddTimeout,
qDBusRemoveTimeout,
qDBusToggleTimeout,
- this, 0);
+ this, nullptr);
//qDebug() << "time_functions_set" << time_functions_set;
Q_UNUSED(time_functions_set);
- q_dbus_server_set_new_connection_function(server, qDBusNewConnection, this, 0);
+ q_dbus_server_set_new_connection_function(server, qDBusNewConnection, this, nullptr);
- dbus_bool_t data_set = q_dbus_server_set_data(server, server_slot, this, 0);
+ dbus_bool_t data_set = q_dbus_server_set_data(server, server_slot, this, nullptr);
//qDebug() << "data_set" << data_set;
Q_UNUSED(data_set);
}
@@ -1752,16 +1752,16 @@ void QDBusConnectionPrivate::setPeer(DBusConnection *c, const QDBusErrorInternal
qDBusAddWatch,
qDBusRemoveWatch,
qDBusToggleWatch,
- this, 0);
+ this, nullptr);
q_dbus_connection_set_timeout_functions(connection,
qDBusAddTimeout,
qDBusRemoveTimeout,
qDBusToggleTimeout,
- this, 0);
- q_dbus_connection_set_dispatch_status_function(connection, qDBusUpdateDispatchStatus, this, 0);
+ this, nullptr);
+ q_dbus_connection_set_dispatch_status_function(connection, qDBusUpdateDispatchStatus, this, nullptr);
q_dbus_connection_add_filter(connection,
qDBusSignalFilter,
- this, 0);
+ this, nullptr);
watchForDBusDisconnection();
@@ -1770,9 +1770,9 @@ void QDBusConnectionPrivate::setPeer(DBusConnection *c, const QDBusErrorInternal
static QDBusConnection::ConnectionCapabilities connectionCapabilies(DBusConnection *connection)
{
- QDBusConnection::ConnectionCapabilities result = 0;
+ QDBusConnection::ConnectionCapabilities result;
typedef dbus_bool_t (*can_send_type_t)(DBusConnection *, int);
- static can_send_type_t can_send_type = 0;
+ static can_send_type_t can_send_type = nullptr;
#if defined(QT_LINKED_LIBDBUS)
# if DBUS_VERSION-0 >= 0x010400
@@ -1809,11 +1809,11 @@ void QDBusConnectionPrivate::setConnection(DBusConnection *dbc, const QDBusError
q_dbus_connection_set_exit_on_disconnect(connection, false);
q_dbus_connection_set_watch_functions(connection, qDBusAddWatch, qDBusRemoveWatch,
- qDBusToggleWatch, this, 0);
+ qDBusToggleWatch, this, nullptr);
q_dbus_connection_set_timeout_functions(connection, qDBusAddTimeout, qDBusRemoveTimeout,
- qDBusToggleTimeout, this, 0);
- q_dbus_connection_set_dispatch_status_function(connection, qDBusUpdateDispatchStatus, this, 0);
- q_dbus_connection_add_filter(connection, qDBusSignalFilter, this, 0);
+ qDBusToggleTimeout, this, nullptr);
+ q_dbus_connection_set_dispatch_status_function(connection, qDBusUpdateDispatchStatus, this, nullptr);
+ q_dbus_connection_add_filter(connection, qDBusSignalFilter, this, nullptr);
// Initialize the hooks for the NameAcquired and NameLost signals
// we don't use connectSignal here because we don't need the rules to be sent to the bus
@@ -1822,7 +1822,7 @@ void QDBusConnectionPrivate::setConnection(DBusConnection *dbc, const QDBusError
hook.service = QDBusUtil::dbusService();
hook.path.clear(); // no matching
hook.obj = this;
- hook.params << QMetaType::Void << QVariant::String; // both functions take a QString as parameter and return void
+ hook.params << QMetaType::Void << QMetaType::QString; // both functions take a QString as parameter and return void
hook.midx = staticMetaObject.indexOfSlot("registerServiceNoLock(QString)");
Q_ASSERT(hook.midx != -1);
@@ -1836,7 +1836,7 @@ void QDBusConnectionPrivate::setConnection(DBusConnection *dbc, const QDBusError
// we don't use connectSignal here because the rules are added by connectSignal on a per-need basis
hook.params.clear();
hook.params.reserve(4);
- hook.params << QMetaType::Void << QVariant::String << QVariant::String << QVariant::String;
+ hook.params << QMetaType::Void << QMetaType::QString << QMetaType::QString << QMetaType::QString;
hook.midx = staticMetaObject.indexOfSlot("serviceOwnerChangedNoLock(QString,QString,QString)");
Q_ASSERT(hook.midx != -1);
signalHooks.insert(QLatin1String("NameOwnerChanged:" DBUS_INTERFACE_DBUS), hook);
@@ -1904,7 +1904,7 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
if (call->pending) {
q_dbus_pending_call_unref(call->pending);
- call->pending = 0;
+ call->pending = nullptr;
}
// Are there any watchers?
@@ -2046,7 +2046,7 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message,
{
QDBusBlockingCallWatcher watcher(message);
- QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, 0, 0, 0, timeout);
+ QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, nullptr, nullptr, nullptr, timeout);
Q_ASSERT(pcall);
if (pcall->replyMessage.type() == QDBusMessage::InvalidMessage) {
@@ -2161,7 +2161,7 @@ QDBusPendingCallPrivate *QDBusConnectionPrivate::sendWithReplyAsync(const QDBusM
void QDBusConnectionPrivate::sendInternal(QDBusPendingCallPrivate *pcall, void *message, int timeout)
{
QDBusError error;
- DBusPendingCall *pending = 0;
+ DBusPendingCall *pending = nullptr;
DBusMessage *msg = static_cast<DBusMessage *>(message);
bool isNoReply = !pcall;
Q_ASSERT(isNoReply == !!q_dbus_message_get_no_reply(msg));
@@ -2175,7 +2175,7 @@ void QDBusConnectionPrivate::sendInternal(QDBusPendingCallPrivate *pcall, void *
q_dbus_message_unref(msg);
pcall->pending = pending;
- q_dbus_pending_call_set_notify(pending, qDBusResultReceived, pcall, 0);
+ q_dbus_pending_call_set_notify(pending, qDBusResultReceived, pcall, nullptr);
// DBus won't notify us when a peer disconnects or server terminates so we need to track these ourselves
if (mode == QDBusConnectionPrivate::PeerMode || mode == QDBusConnectionPrivate::ClientMode)
@@ -2245,7 +2245,7 @@ bool QDBusConnectionPrivate::addSignalHook(const QString &key, const SignalHook
}
}
- signalHooks.insertMulti(key, hook);
+ signalHooks.insert(key, hook);
connect(hook.obj, &QObject::destroyed, this, &QDBusConnectionPrivate::objectDestroyed,
Qt::ConnectionType(Qt::BlockingQueuedConnection | Qt::UniqueConnection));
@@ -2261,7 +2261,7 @@ bool QDBusConnectionPrivate::addSignalHook(const QString &key, const SignalHook
if (connection) {
if (mode != QDBusConnectionPrivate::PeerMode) {
qDBusDebug() << this << "Adding rule:" << hook.matchRule;
- q_dbus_bus_add_match(connection, hook.matchRule, NULL);
+ q_dbus_bus_add_match(connection, hook.matchRule, nullptr);
// Successfully connected the signal
// Do we need to watch for this name?
@@ -2274,7 +2274,7 @@ bool QDBusConnectionPrivate::addSignalHook(const QString &key, const SignalHook
q_dbus_bus_add_match(connection,
buildMatchRule(QDBusUtil::dbusService(), QString(), QDBusUtil::dbusInterface(),
QDBusUtil::nameOwnerChanged(), rules, QString()),
- NULL);
+ nullptr);
data.owner = getNameOwnerNoCache(hook.service);
qDBusDebug() << this << "Watching service" << hook.service << "for owner changes (current owner:"
<< data.owner << ")";
@@ -2362,7 +2362,7 @@ QDBusConnectionPrivate::removeSignalHookNoLock(SignalHookHash::Iterator it)
if (connection && erase) {
if (mode != QDBusConnectionPrivate::PeerMode) {
qDBusDebug() << this << "Removing rule:" << hook.matchRule;
- q_dbus_bus_remove_match(connection, hook.matchRule, NULL);
+ q_dbus_bus_remove_match(connection, hook.matchRule, nullptr);
// Successfully disconnected the signal
// Were we watching for this name?
@@ -2375,7 +2375,7 @@ QDBusConnectionPrivate::removeSignalHookNoLock(SignalHookHash::Iterator it)
q_dbus_bus_remove_match(connection,
buildMatchRule(QDBusUtil::dbusService(), QString(), QDBusUtil::dbusInterface(),
QDBusUtil::nameOwnerChanged(), rules, QString()),
- NULL);
+ nullptr);
}
}
}
@@ -2575,7 +2575,7 @@ QDBusConnectionPrivate::findMetaObject(const QString &service, const QString &pa
// it doesn't exist yet, we have to create it
QDBusWriteLocker locker(FindMetaObject2Action, this);
- QDBusMetaObject *mo = 0;
+ QDBusMetaObject *mo = nullptr;
if (!interface.isEmpty())
mo = cachedMetaObjects.value(interface, 0);
if (mo)
@@ -2591,7 +2591,7 @@ QDBusConnectionPrivate::findMetaObject(const QString &service, const QString &pa
error = QDBusError(reply);
lastError = error;
if (reply.type() != QDBusMessage::ErrorMessage || error.type() != QDBusError::UnknownMethod)
- return 0; // error
+ return nullptr; // error
}
// release the lock and return
diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp
index 4dd02e8c76..c1b0feea37 100644
--- a/src/dbus/qdbusinterface.cpp
+++ b/src/dbus/qdbusinterface.cpp
@@ -55,63 +55,63 @@ static void copyArgument(void *to, int id, const QVariant &arg)
{
if (id == arg.userType()) {
switch (id) {
- case QVariant::Bool:
+ case QMetaType::Bool:
*reinterpret_cast<bool *>(to) = arg.toBool();
return;
case QMetaType::UChar:
- *reinterpret_cast<uchar *>(to) = arg.value<uchar>();
+ *reinterpret_cast<uchar *>(to) = qvariant_cast<uchar>(arg);
return;
case QMetaType::Short:
- *reinterpret_cast<short *>(to) = arg.value<short>();
+ *reinterpret_cast<short *>(to) = qvariant_cast<short>(arg);
return;
case QMetaType::UShort:
- *reinterpret_cast<ushort *>(to) = arg.value<ushort>();
+ *reinterpret_cast<ushort *>(to) = qvariant_cast<ushort>(arg);
return;
- case QVariant::Int:
+ case QMetaType::Int:
*reinterpret_cast<int *>(to) = arg.toInt();
return;
- case QVariant::UInt:
+ case QMetaType::UInt:
*reinterpret_cast<uint *>(to) = arg.toUInt();
return;
- case QVariant::LongLong:
+ case QMetaType::LongLong:
*reinterpret_cast<qlonglong *>(to) = arg.toLongLong();
return;
- case QVariant::ULongLong:
+ case QMetaType::ULongLong:
*reinterpret_cast<qulonglong *>(to) = arg.toULongLong();
return;
- case QVariant::Double:
+ case QMetaType::Double:
*reinterpret_cast<double *>(to) = arg.toDouble();
return;
- case QVariant::String:
+ case QMetaType::QString:
*reinterpret_cast<QString *>(to) = arg.toString();
return;
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
*reinterpret_cast<QByteArray *>(to) = arg.toByteArray();
return;
- case QVariant::StringList:
+ case QMetaType::QStringList:
*reinterpret_cast<QStringList *>(to) = arg.toStringList();
return;
}
if (id == QDBusMetaTypeId::variant()) {
- *reinterpret_cast<QDBusVariant *>(to) = arg.value<QDBusVariant>();
+ *reinterpret_cast<QDBusVariant *>(to) = qvariant_cast<QDBusVariant>(arg);
return;
} else if (id == QDBusMetaTypeId::objectpath()) {
- *reinterpret_cast<QDBusObjectPath *>(to) = arg.value<QDBusObjectPath>();
+ *reinterpret_cast<QDBusObjectPath *>(to) = qvariant_cast<QDBusObjectPath>(arg);
return;
} else if (id == QDBusMetaTypeId::signature()) {
- *reinterpret_cast<QDBusSignature *>(to) = arg.value<QDBusSignature>();
+ *reinterpret_cast<QDBusSignature *>(to) = qvariant_cast<QDBusSignature>(arg);
return;
}
@@ -136,7 +136,7 @@ static void copyArgument(void *to, int id, const QVariant &arg)
}
// is it the same signature?
- QDBusArgument dbarg = arg.value<QDBusArgument>();
+ QDBusArgument dbarg = qvariant_cast<QDBusArgument>(arg);
if (dbarg.currentSignature() != QLatin1String(userSignature)) {
// not the same signature, another mismatch
//qWarning?
@@ -149,7 +149,7 @@ static void copyArgument(void *to, int id, const QVariant &arg)
QDBusInterfacePrivate::QDBusInterfacePrivate(const QString &serv, const QString &p,
const QString &iface, const QDBusConnection &con)
- : QDBusAbstractInterfacePrivate(serv, p, iface, con, true), metaObject(0)
+ : QDBusAbstractInterfacePrivate(serv, p, iface, con, true), metaObject(nullptr)
{
// QDBusAbstractInterfacePrivate's constructor checked the parameters for us
if (connection.isConnected()) {
@@ -204,7 +204,9 @@ QDBusInterfacePrivate::~QDBusInterfacePrivate()
interface \a interface on object at path \a path on service \a
service, using the given \a connection. If \a interface is an
empty string, the object created will refer to the merging of all
- interfaces found in that object.
+ interfaces found by introspecting that object. Otherwise if
+ \a interface is not empty, the QDBusInterface object will be cached
+ to speedup further creations of the same interface.
\a parent is passed to the base class constructor.
@@ -243,7 +245,7 @@ const QMetaObject *QDBusInterface::metaObject() const
*/
void *QDBusInterface::qt_metacast(const char *_clname)
{
- if (!_clname) return 0;
+ if (!_clname) return nullptr;
if (!strcmp(_clname, "QDBusInterface"))
return static_cast<void*>(const_cast<QDBusInterface*>(this));
if (d_func()->interface.toLatin1() == _clname)
diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp
index edee4fc1e5..74cc470596 100644
--- a/src/dbus/qdbusinternalfilters.cpp
+++ b/src/dbus/qdbusinternalfilters.cpp
@@ -358,7 +358,7 @@ static int writeProperty(QObject *obj, const QByteArray &property_name, QVariant
if (id != QMetaType::QVariant && value.userType() == QDBusMetaTypeId::argument()) {
// we have to demarshall before writing
- void *null = 0;
+ void *null = nullptr;
QVariant other(id, null);
if (!QDBusMetaType::demarshall(qvariant_cast<QDBusArgument>(value), id, other.data())) {
qWarning("QDBusConnection: type `%s' (%d) is not registered with QtDBus. "
diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp
index 8e0b3e4598..c80131f41d 100644
--- a/src/dbus/qdbusmarshaller.cpp
+++ b/src/dbus/qdbusmarshaller.cpp
@@ -190,14 +190,14 @@ inline bool QDBusMarshaller::append(const QDBusVariant &arg)
const QVariant &value = arg.variant();
int id = value.userType();
- if (id == QVariant::Invalid) {
+ if (id == QMetaType::UnknownType) {
qWarning("QDBusMarshaller: cannot add a null QDBusVariant");
error(QLatin1String("Variant containing QVariant::Invalid passed in arguments"));
return false;
}
QByteArray tmpSignature;
- const char *signature = 0;
+ const char *signature = nullptr;
if (id == QDBusMetaTypeId::argument()) {
// take the signature from the QDBusArgument object we're marshalling
tmpSignature =
@@ -243,7 +243,7 @@ inline void QDBusMarshaller::append(const QStringList &arg)
inline QDBusMarshaller *QDBusMarshaller::beginStructure()
{
- return beginCommon(DBUS_TYPE_STRUCT, 0);
+ return beginCommon(DBUS_TYPE_STRUCT, nullptr);
}
inline QDBusMarshaller *QDBusMarshaller::beginArray(int id)
@@ -301,7 +301,7 @@ inline QDBusMarshaller *QDBusMarshaller::beginMap(int kid, int vid)
inline QDBusMarshaller *QDBusMarshaller::beginMapEntry()
{
- return beginCommon(DBUS_TYPE_DICT_ENTRY, 0);
+ return beginCommon(DBUS_TYPE_DICT_ENTRY, nullptr);
}
void QDBusMarshaller::open(QDBusMarshaller &sub, int code, const char *signature)
@@ -384,7 +384,7 @@ void QDBusMarshaller::error(const QString &msg)
bool QDBusMarshaller::appendVariantInternal(const QVariant &arg)
{
int id = arg.userType();
- if (id == QVariant::Invalid) {
+ if (id == QMetaType::UnknownType) {
qWarning("QDBusMarshaller: cannot add an invalid QVariant");
error(QLatin1String("Variant containing QVariant::Invalid passed in arguments"));
return false;
@@ -485,12 +485,12 @@ bool QDBusMarshaller::appendVariantInternal(const QVariant &arg)
case DBUS_TYPE_ARRAY:
// could be many things
// find out what kind of array it is
- switch (arg.type()) {
- case QVariant::StringList:
+ switch (arg.userType()) {
+ case QMetaType::QStringList:
append( arg.toStringList() );
return true;
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
append( arg.toByteArray() );
return true;
@@ -572,7 +572,7 @@ bool QDBusMarshaller::appendCrossMarshalling(QDBusDemarshaller *demarshaller)
QDBusMarshaller mrecursed(capabilities); // create on the stack makes it autoclose
QByteArray subSignature;
- const char *sig = 0;
+ const char *sig = nullptr;
if (code == DBUS_TYPE_VARIANT || code == DBUS_TYPE_ARRAY) {
subSignature = drecursed->currentSignature().toLatin1();
if (!subSignature.isEmpty())
diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp
index 3e8f2eaf3f..10d2f07d4d 100644
--- a/src/dbus/qdbusmessage.cpp
+++ b/src/dbus/qdbusmessage.cpp
@@ -64,11 +64,11 @@ Q_STATIC_ASSERT(QDBusMessage::SignalMessage == DBUS_MESSAGE_TYPE_SIGNAL);
static inline const char *data(const QByteArray &arr)
{
- return arr.isEmpty() ? 0 : arr.constData();
+ return arr.isEmpty() ? nullptr : arr.constData();
}
QDBusMessagePrivate::QDBusMessagePrivate()
- : msg(0), reply(0), localReply(0), ref(1), type(QDBusMessage::InvalidMessage),
+ : msg(nullptr), reply(nullptr), localReply(nullptr), ref(1), type(QDBusMessage::InvalidMessage),
delayedReply(false), localMessage(false),
parametersValidated(false), autoStartService(true),
interactiveAuthorizationAllowed(false)
@@ -113,10 +113,10 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message, QDB
{
if (!qdbus_loadLibDBus()) {
*error = QDBusError(QDBusError::Failed, QLatin1String("Could not open lidbus-1 library"));
- return 0;
+ return nullptr;
}
- DBusMessage *msg = 0;
+ DBusMessage *msg = nullptr;
const QDBusMessagePrivate *d_ptr = message.d_ptr;
switch (d_ptr->type) {
@@ -127,13 +127,13 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message, QDB
// only service and interface can be empty -> path and name must not be empty
if (!d_ptr->parametersValidated) {
if (!QDBusUtil::checkBusName(d_ptr->service, QDBusUtil::EmptyAllowed, error))
- return 0;
+ return nullptr;
if (!QDBusUtil::checkObjectPath(d_ptr->path, QDBusUtil::EmptyNotAllowed, error))
- return 0;
+ return nullptr;
if (!QDBusUtil::checkInterfaceName(d_ptr->interface, QDBusUtil::EmptyAllowed, error))
- return 0;
+ return nullptr;
if (!QDBusUtil::checkMemberName(d_ptr->name, QDBusUtil::EmptyNotAllowed, error, "method"))
- return 0;
+ return nullptr;
}
msg = q_dbus_message_new_method_call(data(d_ptr->service.toUtf8()), d_ptr->path.toUtf8(),
@@ -153,7 +153,7 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message, QDB
// error name can't be empty
if (!d_ptr->parametersValidated
&& !QDBusUtil::checkErrorName(d_ptr->name, QDBusUtil::EmptyNotAllowed, error))
- return 0;
+ return nullptr;
msg = q_dbus_message_new(DBUS_MESSAGE_TYPE_ERROR);
q_dbus_message_set_error_name(msg, d_ptr->name.toUtf8());
@@ -166,13 +166,13 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message, QDB
// only the service name can be empty here
if (!d_ptr->parametersValidated) {
if (!QDBusUtil::checkBusName(d_ptr->service, QDBusUtil::EmptyAllowed, error))
- return 0;
+ return nullptr;
if (!QDBusUtil::checkObjectPath(d_ptr->path, QDBusUtil::EmptyNotAllowed, error))
- return 0;
+ return nullptr;
if (!QDBusUtil::checkInterfaceName(d_ptr->interface, QDBusUtil::EmptyAllowed, error))
- return 0;
+ return nullptr;
if (!QDBusUtil::checkMemberName(d_ptr->name, QDBusUtil::EmptyNotAllowed, error, "method"))
- return 0;
+ return nullptr;
}
msg = q_dbus_message_new_signal(d_ptr->path.toUtf8(), d_ptr->interface.toUtf8(),
@@ -203,7 +203,7 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message, QDB
// not ok;
q_dbus_message_unref(msg);
*error = QDBusError(QDBusError::Failed, QLatin1String("Marshalling failed: ") + marshaller.errorString);
- return 0;
+ return nullptr;
}
/*
@@ -276,7 +276,7 @@ QDBusMessage QDBusMessagePrivate::makeLocal(const QDBusConnectionPrivate &conn,
for ( ; it != end; ++it) {
int id = it->userType();
const char *signature = QDBusMetaType::typeToSignature(id);
- if ((id != QVariant::StringList && id != QVariant::ByteArray &&
+ if ((id != QMetaType::QStringList && id != QMetaType::QByteArray &&
qstrlen(signature) != 1) || id == qMetaTypeId<QDBusVariant>()) {
// yes, we are
// we must marshall and demarshall again so as to create QDBusArgument
diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp
index 806cf7b415..5265568f42 100644
--- a/src/dbus/qdbusmetaobject.cpp
+++ b/src/dbus/qdbusmetaobject.cpp
@@ -138,7 +138,7 @@ static int registerComplexDBusType(const char *typeName)
static void *construct(void *, const void *)
{
qFatal("Cannot construct placeholder type QDBusRawType");
- return 0;
+ return nullptr;
}
};
@@ -147,7 +147,7 @@ static int registerComplexDBusType(const char *typeName)
QDBusRawTypeHandler::construct,
sizeof(void *),
QMetaType::MovableType,
- 0);
+ nullptr);
}
Q_DBUS_EXPORT bool qt_dbus_metaobject_skip_annotations = false;
@@ -158,10 +158,10 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
const char *direction, int id)
{
Type result;
- result.id = QVariant::Invalid;
+ result.id = QMetaType::UnknownType;
int type = QDBusMetaType::signatureToType(signature);
- if (type == QVariant::Invalid && !qt_dbus_metaobject_skip_annotations) {
+ if (type == QMetaType::UnknownType && !qt_dbus_metaobject_skip_annotations) {
// it's not a type normally handled by our meta type system
// it must contain an annotation
QString annotationName = QString::fromLatin1("org.qtproject.QtDBus.QtTypeName");
@@ -189,7 +189,7 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
type = QMetaType::type(typeName);
}
- if (type == QVariant::Invalid || signature != QDBusMetaType::typeToSignature(type)) {
+ if (type == QMetaType::UnknownType || signature != QDBusMetaType::typeToSignature(type)) {
// type is still unknown or doesn't match back to the signature that it
// was expected to, so synthesize a fake type
typeName = "QDBusRawType<0x" + signature.toHex() + ">*";
@@ -197,16 +197,16 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
}
result.name = typeName;
- } else if (type == QVariant::Invalid) {
+ } else if (type == QMetaType::UnknownType) {
// this case is used only by the qdbus command-line tool
// invalid, let's create an impossible type that contains the signature
if (signature == "av") {
result.name = "QVariantList";
- type = QVariant::List;
+ type = QMetaType::QVariantList;
} else if (signature == "a{sv}") {
result.name = "QVariantMap";
- type = QVariant::Map;
+ type = QMetaType::QVariantMap;
} else if (signature == "a{ss}") {
result.name = "QMap<QString,QString>";
type = qMetaTypeId<QMap<QString, QString> >();
@@ -246,7 +246,7 @@ void QDBusMetaObjectGenerator::parseMethods()
const QDBusIntrospection::Argument &arg = m.inputArgs.at(i);
Type type = findType(arg.type.toLatin1(), m.annotations, "In", i);
- if (type.id == QVariant::Invalid) {
+ if (type.id == QMetaType::UnknownType) {
ok = false;
break;
}
@@ -265,7 +265,7 @@ void QDBusMetaObjectGenerator::parseMethods()
const QDBusIntrospection::Argument &arg = m.outputArgs.at(i);
Type type = findType(arg.type.toLatin1(), m.annotations, "Out", i);
- if (type.id == QVariant::Invalid) {
+ if (type.id == QMetaType::UnknownType) {
ok = false;
break;
}
@@ -322,7 +322,7 @@ void QDBusMetaObjectGenerator::parseSignals()
const QDBusIntrospection::Argument &arg = s.outputArgs.at(i);
Type type = findType(arg.type.toLatin1(), s.annotations, "Out", i);
- if (type.id == QVariant::Invalid) {
+ if (type.id == QMetaType::UnknownType) {
ok = false;
break;
}
@@ -358,7 +358,7 @@ void QDBusMetaObjectGenerator::parseProperties()
const QDBusIntrospection::Property &p = *prop_it;
Property mp;
Type type = findType(p.type.toLatin1(), p.annotations);
- if (type.id == QVariant::Invalid)
+ if (type.id == QMetaType::UnknownType)
continue;
QByteArray name = p.name.toLatin1();
@@ -544,9 +544,9 @@ void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj)
// put the metaobject together
obj->d.data = uint_data;
- obj->d.relatedMetaObjects = 0;
- obj->d.static_metacall = 0;
- obj->d.extradata = 0;
+ obj->d.relatedMetaObjects = nullptr;
+ obj->d.static_metacall = nullptr;
+ obj->d.extradata = nullptr;
obj->d.stringdata = reinterpret_cast<const QByteArrayData *>(string_data);
obj->d.superdata = &QDBusAbstractInterface::staticMetaObject;
}
@@ -587,7 +587,7 @@ QDBusMetaObject *QDBusMetaObject::createMetaObject(const QString &interface, con
error = QDBusError();
QDBusIntrospection::Interfaces parsed = QDBusIntrospection::parseInterfaces(xml);
- QDBusMetaObject *we = 0;
+ QDBusMetaObject *we = nullptr;
QDBusIntrospection::Interfaces::ConstIterator it = parsed.constBegin();
QDBusIntrospection::Interfaces::ConstIterator end = parsed.constEnd();
for ( ; it != end; ++it) {
@@ -621,7 +621,7 @@ QDBusMetaObject *QDBusMetaObject::createMetaObject(const QString &interface, con
if (parsed.isEmpty()) {
// object didn't return introspection
we = new QDBusMetaObject;
- QDBusMetaObjectGenerator generator(interface, 0);
+ QDBusMetaObjectGenerator generator(interface, nullptr);
generator.write(we);
we->cached = false;
return we;
@@ -631,10 +631,10 @@ QDBusMetaObject *QDBusMetaObject::createMetaObject(const QString &interface, con
QDBusIntrospection::Interface merged = *it.value().constData();
for (++it; it != end; ++it) {
- merged.annotations.unite(it.value()->annotations);
+ merged.annotations.insert(it.value()->annotations);
merged.methods.unite(it.value()->methods);
merged.signals_.unite(it.value()->signals_);
- merged.properties.unite(it.value()->properties);
+ merged.properties.insert(it.value()->properties);
}
merged.name = QLatin1String("local.Merged");
@@ -651,7 +651,7 @@ QDBusMetaObject *QDBusMetaObject::createMetaObject(const QString &interface, con
error = QDBusError(QDBusError::UnknownInterface,
QLatin1String("Interface '%1' was not found")
.arg(interface));
- return 0;
+ return nullptr;
}
QDBusMetaObject::QDBusMetaObject()
@@ -670,7 +670,7 @@ const int *QDBusMetaObject::inputTypesForMethod(int id) const
int handle = priv(d.data)->methodDBusData + id*intsPerMethod;
return reinterpret_cast<const int*>(d.data + d.data[handle]);
}
- return 0;
+ return nullptr;
}
const int *QDBusMetaObject::outputTypesForMethod(int id) const
@@ -680,7 +680,7 @@ const int *QDBusMetaObject::outputTypesForMethod(int id) const
int handle = priv(d.data)->methodDBusData + id*intsPerMethod;
return reinterpret_cast<const int*>(d.data + d.data[handle + 1]);
}
- return 0;
+ return nullptr;
}
int QDBusMetaObject::propertyMetaType(int id) const
diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp
index 58ce4f8930..bcbb22fba6 100644
--- a/src/dbus/qdbusmetatype.cpp
+++ b/src/dbus/qdbusmetatype.cpp
@@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE
class QDBusCustomTypeInfo
{
public:
- QDBusCustomTypeInfo() : signature(), marshall(0), demarshall(0)
+ QDBusCustomTypeInfo() : signature(), marshall(nullptr), demarshall(nullptr)
{ }
// Suggestion:
@@ -78,7 +78,7 @@ public:
};
template<typename T>
-inline static void registerHelper(T * = 0)
+inline static void registerHelper(T * = nullptr)
{
void (*mf)(QDBusArgument &, const T *) = qDBusMarshallHelper<T>;
void (*df)(const QDBusArgument &, T *) = qDBusDemarshallHelper<T>;
@@ -259,7 +259,7 @@ bool QDBusMetaType::marshall(QDBusArgument &arg, int id, const void *data)
const QDBusCustomTypeInfo &info = (*ct).at(id);
if (!info.marshall) {
- mf = 0; // make gcc happy
+ mf = nullptr; // make gcc happy
return false;
} else
mf = info.marshall;
@@ -288,7 +288,7 @@ bool QDBusMetaType::demarshall(const QDBusArgument &arg, int id, void *data)
const QDBusCustomTypeInfo &info = (*ct).at(id);
if (!info.demarshall) {
- df = 0; // make gcc happy
+ df = nullptr; // make gcc happy
return false;
} else
df = info.demarshall;
@@ -325,7 +325,7 @@ int QDBusMetaType::signatureToType(const char *signature)
switch (signature[0])
{
case DBUS_TYPE_BOOLEAN:
- return QVariant::Bool;
+ return QMetaType::Bool;
case DBUS_TYPE_BYTE:
return QMetaType::UChar;
@@ -337,22 +337,22 @@ int QDBusMetaType::signatureToType(const char *signature)
return QMetaType::UShort;
case DBUS_TYPE_INT32:
- return QVariant::Int;
+ return QMetaType::Int;
case DBUS_TYPE_UINT32:
- return QVariant::UInt;
+ return QMetaType::UInt;
case DBUS_TYPE_INT64:
- return QVariant::LongLong;
+ return QMetaType::LongLong;
case DBUS_TYPE_UINT64:
- return QVariant::ULongLong;
+ return QMetaType::ULongLong;
case DBUS_TYPE_DOUBLE:
- return QVariant::Double;
+ return QMetaType::Double;
case DBUS_TYPE_STRING:
- return QVariant::String;
+ return QMetaType::QString;
case DBUS_TYPE_OBJECT_PATH:
return QDBusMetaTypeId::objectpath();
@@ -369,13 +369,13 @@ int QDBusMetaType::signatureToType(const char *signature)
case DBUS_TYPE_ARRAY: // special case
switch (signature[1]) {
case DBUS_TYPE_BYTE:
- return QVariant::ByteArray;
+ return QMetaType::QByteArray;
case DBUS_TYPE_STRING:
- return QVariant::StringList;
+ return QMetaType::QStringList;
case DBUS_TYPE_VARIANT:
- return QVariant::List;
+ return QMetaType::QVariantList;
case DBUS_TYPE_OBJECT_PATH:
return qMetaTypeId<QList<QDBusObjectPath> >();
@@ -409,7 +409,7 @@ const char *QDBusMetaType::typeToSignature(int type)
case QMetaType::UChar:
return DBUS_TYPE_BYTE_AS_STRING;
- case QVariant::Bool:
+ case QMetaType::Bool:
return DBUS_TYPE_BOOLEAN_AS_STRING;
case QMetaType::Short:
@@ -418,29 +418,29 @@ const char *QDBusMetaType::typeToSignature(int type)
case QMetaType::UShort:
return DBUS_TYPE_UINT16_AS_STRING;
- case QVariant::Int:
+ case QMetaType::Int:
return DBUS_TYPE_INT32_AS_STRING;
- case QVariant::UInt:
+ case QMetaType::UInt:
return DBUS_TYPE_UINT32_AS_STRING;
- case QVariant::LongLong:
+ case QMetaType::LongLong:
return DBUS_TYPE_INT64_AS_STRING;
- case QVariant::ULongLong:
+ case QMetaType::ULongLong:
return DBUS_TYPE_UINT64_AS_STRING;
- case QVariant::Double:
+ case QMetaType::Double:
return DBUS_TYPE_DOUBLE_AS_STRING;
- case QVariant::String:
+ case QMetaType::QString:
return DBUS_TYPE_STRING_AS_STRING;
- case QVariant::StringList:
+ case QMetaType::QStringList:
return DBUS_TYPE_ARRAY_AS_STRING
DBUS_TYPE_STRING_AS_STRING; // as
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
return DBUS_TYPE_ARRAY_AS_STRING
DBUS_TYPE_BYTE_AS_STRING; // ay
}
@@ -460,7 +460,7 @@ const char *QDBusMetaType::typeToSignature(int type)
{
QReadLocker locker(customTypesLock());
if (type >= ct->size())
- return 0; // type not registered with us
+ return nullptr; // type not registered with us
const QDBusCustomTypeInfo &info = (*ct).at(type);
@@ -468,7 +468,7 @@ const char *QDBusMetaType::typeToSignature(int type)
return info.signature;
if (!info.marshall)
- return 0; // type not registered with us
+ return nullptr; // type not registered with us
}
// call to user code to construct the signature type
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp
index eb8f61c783..c321b7524d 100644
--- a/src/dbus/qdbusmisc.cpp
+++ b/src/dbus/qdbusmisc.cpp
@@ -62,7 +62,7 @@ bool qDBusCheckAsyncTag(const char *tag)
return false;
const char *p = strstr(tag, noReplyTag);
- if (p != NULL &&
+ if (p != nullptr &&
(p == tag || *(p-1) == ' ') &&
(p[sizeof noReplyTag - 1] == '\0' || p[sizeof noReplyTag - 1] == ' '))
return true;
@@ -167,7 +167,7 @@ int qDBusParametersForMethod(const QList<QByteArray> &parameterTypes, QVector<in
if (id == 0) {
errorMsg = QLatin1String("Unregistered output type in parameter list: ") + QLatin1String(type);
return -1;
- } else if (QDBusMetaType::typeToSignature(id) == 0)
+ } else if (QDBusMetaType::typeToSignature(id) == nullptr)
return -1;
metaTypes.append( id );
@@ -195,7 +195,7 @@ int qDBusParametersForMethod(const QList<QByteArray> &parameterTypes, QVector<in
if (id == QDBusMetaTypeId::message())
seenMessage = true;
- else if (QDBusMetaType::typeToSignature(id) == 0) {
+ else if (QDBusMetaType::typeToSignature(id) == nullptr) {
errorMsg = QLatin1String("Type not registered with QtDBus in parameter list: ") + QLatin1String(type);
return -1;
}
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index eeb9c266a3..04d8e3f6c7 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -181,7 +181,7 @@ bool QDBusPendingCallPrivate::setReplyCallback(QObject *target, const char *memb
if (metaTypes.at(count) == QDBusMetaTypeId::message())
--count;
- setMetaTypes(count, count ? metaTypes.constData() + 1 : 0);
+ setMetaTypes(count, count ? metaTypes.constData() + 1 : nullptr);
return true;
}
@@ -468,10 +468,10 @@ QDBusPendingCall QDBusPendingCall::fromError(const QDBusError &error)
*/
QDBusPendingCall QDBusPendingCall::fromCompletedCall(const QDBusMessage &msg)
{
- QDBusPendingCallPrivate *d = 0;
+ QDBusPendingCallPrivate *d = nullptr;
if (msg.type() == QDBusMessage::ErrorMessage ||
msg.type() == QDBusMessage::ReplyMessage) {
- d = new QDBusPendingCallPrivate(QDBusMessage(), 0);
+ d = new QDBusPendingCallPrivate(QDBusMessage(), nullptr);
d->replyMessage = msg;
d->ref.storeRelaxed(1);
}
diff --git a/src/dbus/qdbuspendingreply.cpp b/src/dbus/qdbuspendingreply.cpp
index b1b5fb3431..df37d92211 100644
--- a/src/dbus/qdbuspendingreply.cpp
+++ b/src/dbus/qdbuspendingreply.cpp
@@ -246,7 +246,7 @@
*/
QDBusPendingReplyData::QDBusPendingReplyData()
- : QDBusPendingCall(0) // initialize base class empty
+ : QDBusPendingCall(nullptr) // initialize base class empty
{
}
@@ -261,7 +261,7 @@ void QDBusPendingReplyData::assign(const QDBusPendingCall &other)
void QDBusPendingReplyData::assign(const QDBusMessage &message)
{
- d = new QDBusPendingCallPrivate(QDBusMessage(), 0); // drops the reference to the old one
+ d = new QDBusPendingCallPrivate(QDBusMessage(), nullptr); // drops the reference to the old one
d->replyMessage = message;
}
diff --git a/src/dbus/qdbusreply.cpp b/src/dbus/qdbusreply.cpp
index cf1a70508c..cd7193e02f 100644
--- a/src/dbus/qdbusreply.cpp
+++ b/src/dbus/qdbusreply.cpp
@@ -202,7 +202,7 @@ void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data
}
const char *expectedSignature = QDBusMetaType::typeToSignature(data.userType());
- const char *receivedType = 0;
+ const char *receivedType = nullptr;
QByteArray receivedSignature;
if (reply.arguments().count() >= 1) {
diff --git a/src/dbus/qdbusreply.h b/src/dbus/qdbusreply.h
index 869687ac85..8cdc0ae246 100644
--- a/src/dbus/qdbusreply.h
+++ b/src/dbus/qdbusreply.h
@@ -64,6 +64,7 @@ public:
{
*this = reply;
}
+ inline QDBusReply(const QDBusReply &) = default;
inline QDBusReply& operator=(const QDBusMessage &reply)
{
QVariant data(qMetaTypeId<Type>(), nullptr);
diff --git a/src/dbus/qdbusunixfiledescriptor.cpp b/src/dbus/qdbusunixfiledescriptor.cpp
index 73d1db2680..87cabb93f6 100644
--- a/src/dbus/qdbusunixfiledescriptor.cpp
+++ b/src/dbus/qdbusunixfiledescriptor.cpp
@@ -135,7 +135,7 @@ QExplicitlySharedDataPointer<QDBusUnixFileDescriptorPrivate>::~QExplicitlyShared
\sa fileDescriptor(), isValid()
*/
QDBusUnixFileDescriptor::QDBusUnixFileDescriptor()
- : d(0)
+ : d(nullptr)
{
}
@@ -153,7 +153,7 @@ QDBusUnixFileDescriptor::QDBusUnixFileDescriptor()
\sa setFileDescriptor(), fileDescriptor()
*/
QDBusUnixFileDescriptor::QDBusUnixFileDescriptor(int fileDescriptor)
- : d(0)
+ : d(nullptr)
{
if (fileDescriptor != -1)
setFileDescriptor(fileDescriptor);
diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp
index dc94897ac4..b4ee6811ac 100644
--- a/src/dbus/qdbusutil.cpp
+++ b/src/dbus/qdbusutil.cpp
@@ -82,7 +82,7 @@ static bool variantToString(const QVariant &arg, QString &out)
{
int argType = arg.userType();
- if (argType == QVariant::StringList) {
+ if (argType == QMetaType::QStringList) {
out += QLatin1Char('{');
const QStringList list = arg.toStringList();
for (const QString &item : list)
@@ -90,7 +90,7 @@ static bool variantToString(const QVariant &arg, QString &out)
if (!list.isEmpty())
out.chop(2);
out += QLatin1Char('}');
- } else if (argType == QVariant::ByteArray) {
+ } else if (argType == QMetaType::QByteArray) {
out += QLatin1Char('{');
QByteArray list = arg.toByteArray();
for (int i = 0; i < list.count(); ++i) {
@@ -100,7 +100,7 @@ static bool variantToString(const QVariant &arg, QString &out)
if (!list.isEmpty())
out.chop(2);
out += QLatin1Char('}');
- } else if (argType == QVariant::List) {
+ } else if (argType == QMetaType::QVariantList) {
out += QLatin1Char('{');
const QList<QVariant> list = arg.toList();
for (const QVariant &item : list) {
@@ -148,7 +148,7 @@ static bool variantToString(const QVariant &arg, QString &out)
if (!variantToString(v, out))
return false;
out += QLatin1Char(']');
- } else if (arg.canConvert(QVariant::String)) {
+ } else if (arg.canConvert(QMetaType::QString)) {
out += QLatin1Char('\"') + arg.toString() + QLatin1Char('\"');
} else {
out += QLatin1Char('[');
@@ -246,12 +246,12 @@ static const char fixedTypes[] = "ybnqiuxtdh";
static bool isBasicType(int c)
{
- return c != DBUS_TYPE_INVALID && strchr(basicTypes, c) != NULL;
+ return c != DBUS_TYPE_INVALID && strchr(basicTypes, c) != nullptr;
}
static bool isFixedType(int c)
{
- return c != DBUS_TYPE_INVALID && strchr(fixedTypes, c) != NULL;
+ return c != DBUS_TYPE_INVALID && strchr(fixedTypes, c) != nullptr;
}
// Returns a pointer to one-past-end of this type if it's valid;
@@ -260,10 +260,10 @@ static const char *validateSingleType(const char *signature)
{
char c = *signature;
if (c == DBUS_TYPE_INVALID)
- return 0;
+ return nullptr;
// is it one of the one-letter types?
- if (strchr(oneLetterTypes, c) != NULL)
+ if (strchr(oneLetterTypes, c) != nullptr)
return signature + 1;
// is it an array?
@@ -277,9 +277,9 @@ static const char *validateSingleType(const char *signature)
// and a free value
c = *++signature;
if (!isBasicType(c))
- return 0;
+ return nullptr;
signature = validateSingleType(signature + 1);
- return signature && *signature == DBUS_DICT_ENTRY_END_CHAR ? signature + 1 : 0;
+ return signature && *signature == DBUS_DICT_ENTRY_END_CHAR ? signature + 1 : nullptr;
}
return validateSingleType(signature);
@@ -291,14 +291,14 @@ static const char *validateSingleType(const char *signature)
while (true) {
signature = validateSingleType(signature);
if (!signature)
- return 0;
+ return nullptr;
if (*signature == DBUS_STRUCT_END_CHAR)
return signature + 1;
}
}
// invalid/unknown type
- return 0;
+ return nullptr;
}
/*!
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp
index c6b3b90508..7370ce0de3 100644
--- a/src/dbus/qdbusxmlgenerator.cpp
+++ b/src/dbus/qdbusxmlgenerator.cpp
@@ -113,7 +113,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
QLatin1String(signature),
accessAsString(mp.isReadable(), mp.isWritable()));
- if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
+ if (QDBusMetaType::signatureToType(signature) == QMetaType::UnknownType) {
const char *typeName = QMetaType::typeName(typeId);
retval += QLatin1String(">\n <annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"%3\"/>\n </property>\n")
.arg(typeNameToXml(typeName));
@@ -161,7 +161,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
.arg(typeNameToXml(typeName));
// do we need to describe this argument?
- if (QDBusMetaType::signatureToType(typeName) == QVariant::Invalid)
+ if (QDBusMetaType::signatureToType(typeName) == QMetaType::UnknownType)
xml += QLatin1String(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n")
.arg(typeNameToXml(QMetaType::typeName(typeId)));
} else {
@@ -208,7 +208,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
qUtf16Printable(name), signature, isOutput ? "out" : "in");
// do we need to describe this argument?
- if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
+ if (QDBusMetaType::signatureToType(signature) == QMetaType::UnknownType) {
const char *typeName = QMetaType::typeName(types.at(j));
xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.%1%2\" value=\"%3\"/>\n")
.arg(isOutput ? QLatin1String("Out") : QLatin1String("In"))
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index db47a3abc1..a789e65284 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -478,15 +478,15 @@ Q_GLOBAL_STATIC(QAccessiblePluginsHash, qAccessiblePlugins)
Q_GLOBAL_STATIC(QList<QAccessible::InterfaceFactory>, qAccessibleFactories)
Q_GLOBAL_STATIC(QList<QAccessible::ActivationObserver *>, qAccessibleActivationObservers)
-QAccessible::UpdateHandler QAccessible::updateHandler = 0;
-QAccessible::RootObjectHandler QAccessible::rootObjectHandler = 0;
+QAccessible::UpdateHandler QAccessible::updateHandler = nullptr;
+QAccessible::RootObjectHandler QAccessible::rootObjectHandler = nullptr;
static bool cleanupAdded = false;
static QPlatformAccessibility *platformAccessibility()
{
QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration();
- return pfIntegration ? pfIntegration->accessibility() : 0;
+ return pfIntegration ? pfIntegration->accessibility() : nullptr;
}
/*!
@@ -673,7 +673,7 @@ void QAccessible::removeActivationObserver(ActivationObserver *observer)
QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
{
if (!object)
- return 0;
+ return nullptr;
if (Id id = QAccessibleCache::instance()->objectToId.value(object))
return QAccessibleCache::instance()->interfaceForId(id);
@@ -696,7 +696,7 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
// Find a QAccessiblePlugin (factory) for the class name. If there's
// no entry in the cache try to create it using the plugin loader.
if (!qAccessiblePlugins()->contains(cn)) {
- QAccessiblePlugin *factory = 0; // 0 means "no plugin found". This is cached as well.
+ QAccessiblePlugin *factory = nullptr; // 0 means "no plugin found". This is cached as well.
const int index = loader()->indexOf(cn);
if (index != -1)
factory = qobject_cast<QAccessiblePlugin *>(loader()->instance(index));
@@ -724,7 +724,7 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
return appInterface;
}
- return 0;
+ return nullptr;
}
/*!
@@ -1113,7 +1113,7 @@ QAccessibleInterface::relations(QAccessible::Relation /*match = QAccessible::All
*/
QAccessibleInterface *QAccessibleInterface::focusChild() const
{
- return 0;
+ return nullptr;
}
/*!
@@ -1758,12 +1758,12 @@ QAccessibleTextSelectionEvent::~QAccessibleTextSelectionEvent()
*/
QAccessibleInterface *QAccessibleEvent::accessibleInterface() const
{
- if (m_object == 0)
+ if (m_object == nullptr)
return QAccessible::accessibleInterface(m_uniqueId);
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
if (!iface || !iface->isValid())
- return 0;
+ return nullptr;
if (m_child >= 0) {
QAccessibleInterface *child = iface->child(m_child);
@@ -1791,7 +1791,7 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const
*/
QWindow *QAccessibleInterface::window() const
{
- return 0;
+ return nullptr;
}
/*!
@@ -2029,7 +2029,7 @@ QAccessibleTextInterface::~QAccessibleTextInterface()
\fn void QAccessibleTextInterface::selection(int selectionIndex, int *startOffset, int *endOffset) const
Returns a selection. The size of the selection is returned in \a startOffset and \a endOffset.
- If there is no selection both \a startOffset and \a endOffset are 0.
+ If there is no selection both \a startOffset and \a endOffset are \nullptr.
The accessibility APIs support multiple selections. For most widgets though, only one selection
is supported with \a selectionIndex equal to 0.
diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp
index 2ef8502ad5..771cfda574 100644
--- a/src/gui/accessible/qaccessibleobject.cpp
+++ b/src/gui/accessible/qaccessibleobject.cpp
@@ -128,7 +128,7 @@ QAccessibleInterface *QAccessibleObject::childAt(int x, int y) const
if (childIface->isValid() && childIface->rect().contains(x,y))
return childIface;
}
- return 0;
+ return nullptr;
}
/*!
@@ -152,7 +152,7 @@ QWindow *QAccessibleApplication::window() const
{
// an application can have several windows, and AFAIK we don't need
// to notify about changes on the application.
- return 0;
+ return nullptr;
}
// all toplevel windows except popups and the desktop
@@ -190,7 +190,7 @@ int QAccessibleApplication::indexOfChild(const QAccessibleInterface *child) cons
QAccessibleInterface *QAccessibleApplication::parent() const
{
- return 0;
+ return nullptr;
}
QAccessibleInterface *QAccessibleApplication::child(int index) const
@@ -198,7 +198,7 @@ QAccessibleInterface *QAccessibleApplication::child(int index) const
const QObjectList tlo(topLevelObjects());
if (index >= 0 && index < tlo.count())
return QAccessible::queryAccessibleInterface(tlo.at(index));
- return 0;
+ return nullptr;
}
@@ -207,7 +207,7 @@ QAccessibleInterface *QAccessibleApplication::focusChild() const
{
if (QWindow *window = QGuiApplication::focusWindow())
return window->accessibleRoot();
- return 0;
+ return nullptr;
}
/*! \reimp */
diff --git a/src/gui/accessible/qplatformaccessibility.cpp b/src/gui/accessible/qplatformaccessibility.cpp
index 8c806d47b8..4813b83963 100644
--- a/src/gui/accessible/qplatformaccessibility.cpp
+++ b/src/gui/accessible/qplatformaccessibility.cpp
@@ -114,7 +114,7 @@ void QPlatformAccessibility::initialize()
typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator;
const PluginKeyMap keyMap = bridgeloader()->keyMap();
- QAccessibleBridgePlugin *factory = 0;
+ QAccessibleBridgePlugin *factory = nullptr;
int i = -1;
const PluginKeyMapConstIterator cend = keyMap.constEnd();
for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend; ++it) {
diff --git a/src/gui/animation/qguivariantanimation.cpp b/src/gui/animation/qguivariantanimation.cpp
index a5b6d8b95c..8afe77ed46 100644
--- a/src/gui/animation/qguivariantanimation.cpp
+++ b/src/gui/animation/qguivariantanimation.cpp
@@ -75,15 +75,15 @@ static void qUnregisterGuiGetInterpolator()
{
// casts required by Sun CC 5.5
qRegisterAnimationInterpolator<QColor>(
- (QVariant (*)(const QColor &, const QColor &, qreal))0);
+ (QVariant (*)(const QColor &, const QColor &, qreal))nullptr);
qRegisterAnimationInterpolator<QVector2D>(
- (QVariant (*)(const QVector2D &, const QVector2D &, qreal))0);
+ (QVariant (*)(const QVector2D &, const QVector2D &, qreal))nullptr);
qRegisterAnimationInterpolator<QVector3D>(
- (QVariant (*)(const QVector3D &, const QVector3D &, qreal))0);
+ (QVariant (*)(const QVector3D &, const QVector3D &, qreal))nullptr);
qRegisterAnimationInterpolator<QVector4D>(
- (QVariant (*)(const QVector4D &, const QVector4D &, qreal))0);
+ (QVariant (*)(const QVector4D &, const QVector4D &, qreal))nullptr);
qRegisterAnimationInterpolator<QQuaternion>(
- (QVariant (*)(const QQuaternion &, const QQuaternion &, qreal))0);
+ (QVariant (*)(const QQuaternion &, const QQuaternion &, qreal))nullptr);
}
Q_DESTRUCTOR_FUNCTION(qUnregisterGuiGetInterpolator)
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 0202f17b21..4de159d97a 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -41,11 +41,10 @@
"sm": { "type": "boolean", "name": "sessionmanager" },
"tslib": "boolean",
"vulkan": "boolean",
- "xcb": { "type": "enum", "values": [ "no", "yes", "qt", "system" ] },
+ "xcb": "boolean",
+ "bundled-xcb-xinput": "boolean",
"xcb-native-painting": "boolean",
"xcb-xlib": "boolean",
- "xcb-xinput": "boolean",
- "xkb": "boolean",
"xkbcommon": "boolean"
}
},
@@ -574,18 +573,22 @@
]
},
"xcb": {
- "label": "XCB >= 1.9",
+ "label": "XCB >= 1.11",
"test": {
"main": [
"int primaryScreen = 0;",
"(void)xcb_connect(\"\", &primaryScreen);",
- "// This won't compile unless libxcb >= 1.9 which defines XCB_CONN_CLOSED_INVALID_SCREEN.",
- "int xcbScreenError = XCB_CONN_CLOSED_INVALID_SCREEN;"
+ "/* XCB_PACKED define was added in libxcb 1.11 */",
+ "#ifdef XCB_PACKED",
+ " return 0;",
+ "#else",
+ " return -1;",
+ "#endif"
]
},
"headers": "xcb/xcb.h",
"sources": [
- { "type": "pkgConfig", "args": "xcb >= 1.9" },
+ { "type": "pkgConfig", "args": "xcb >= 1.11" },
"-lxcb"
]
},
@@ -692,21 +695,10 @@
"use": "xcb xlib"
},
"xcb_xkb": {
- "label": "XCB XKB >= 1.10",
- "test": {
- "head": [
- "// xkb.h is using a variable called 'explicit', which is a reserved keyword in C++",
- "#define explicit dont_use_cxx_explicit"
- ],
- "tail": "#undef explicit",
- "main": [
- "// This takes more arguments in xcb-xkb < 1.10.",
- "xcb_xkb_get_kbd_by_name_unchecked(NULL, 0, 0, 0, 0);"
- ]
- },
+ "label": "XCB XKB",
"headers": "xcb/xkb.h",
"sources": [
- { "type": "pkgConfig", "args": "xcb-xkb >= 1.10" },
+ { "type": "pkgConfig", "args": "xcb-xkb" },
"-lxcb-xkb"
],
"use": "xcb"
@@ -770,7 +762,7 @@
"xkbcommon_x11": {
"label": "xkbcommon-x11",
"test": {
- "main": "xkb_x11_get_core_keyboard_device_id(nullptr);"
+ "main": "xkb_x11_setup_xkb_extension_flags flag = XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS;"
},
"headers": [ "xkbcommon/xkbcommon-x11.h" ],
"sources": [
@@ -1057,6 +1049,11 @@
"label": "XCB (extensions)",
"type": "compile",
"test": {
+ "head": [
+ "// xkb.h is using a variable called 'explicit', which is a reserved keyword in C++",
+ "#define explicit dont_use_cxx_explicit"
+ ],
+ "tail": "#undef explicit",
"include": [
"xcb/xcb.h",
"xcb/xcb_image.h",
@@ -1069,7 +1066,8 @@
"xcb/xfixes.h",
"xcb/xinerama.h",
"xcb/xcb_icccm.h",
- "xcb/xcb_renderutil.h"
+ "xcb/xcb_renderutil.h",
+ "xcb/xkb.h"
],
"main": [
"int primaryScreen = 0;",
@@ -1083,10 +1081,13 @@
" xcb_render_query_pict_formats_reply(c, formatsCookie, &error);",
"/* RENDERUTIL: xcb_renderutil.h include won't compile unless version >= 0.3.9 */",
- "xcb_render_util_find_standard_format(nullptr, XCB_PICT_STANDARD_ARGB_32);"
+ "xcb_render_util_find_standard_format(nullptr, XCB_PICT_STANDARD_ARGB_32);",
+
+ "/* XKB: This takes more arguments in xcb-xkb < 1.11 */",
+ "xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof(nullptr, 0, 0, 0, 0, 0, 0, 0, 0);"
]
},
- "use": "xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb"
+ "use": "xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xcb"
},
"x11prefix": {
"label": "X11 prefix",
@@ -1315,7 +1316,7 @@
},
"opengles3": {
"label": "OpenGL ES 3.0",
- "condition": "features.opengles2 && !features.angle && tests.opengles3 && !config.wasm",
+ "condition": "features.opengles2 && !features.angle && tests.opengles3",
"output": [
"publicFeature",
{ "type": "define", "name": "QT_OPENGL_ES_3" }
@@ -1515,16 +1516,7 @@
"label": "XCB",
"section": "Platform plugins",
"autoDetect": "!config.darwin",
- "enable": "input.xcb == 'system' || input.xcb == 'qt' || input.xcb == 'yes'",
- "condition": "features.thread && features.xkbcommon && libs.xcb",
- "output": [ "privateFeature" ]
- },
- "system-xcb": {
- "label": "Using system-provided XCB libraries",
- "enable": "input.xcb == 'system'",
- "disable": "input.xcb == 'qt'",
- "autoDetect": "!config.darwin",
- "condition": "features.xcb && tests.xcb_syslibs",
+ "condition": "features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11",
"output": [ "privateFeature" ]
},
"x11-prefix": {
@@ -1563,12 +1555,6 @@
"condition": "features.xcb-native-painting",
"output": [ "privateFeature" ]
},
- "xkb": {
- "label": "XCB XKB",
- "emitIf": "features.xcb",
- "condition": "(!features.system-xcb || libs.xcb_xkb) && libs.xkbcommon_x11",
- "output": [ "privateFeature" ]
- },
"xcb-xlib": {
"label": "XCB Xlib",
"condition": "features.xlib && libs.xcb_xlib",
@@ -1580,10 +1566,12 @@
"condition": "features.sessionmanager && libs.x11sm",
"output": [ "privateFeature" ]
},
- "xcb-xinput": {
- "label": "XCB XInput",
+ "system-xcb-xinput": {
+ "label": "Using system-provided xcb-xinput",
"emitIf": "features.xcb",
- "condition": "!features.system-xcb || libs.xcb_xinput",
+ "disable": "input.bundled-xcb-xinput == 'yes'",
+ "enable": "input.bundled-xcb-xinput == 'no'",
+ "condition": "libs.xcb_xinput",
"output": [ "privateFeature" ]
},
"xkbcommon": {
@@ -1591,6 +1579,11 @@
"condition": "libs.xkbcommon",
"output": [ "privateFeature" ]
},
+ "xkbcommon-x11": {
+ "label": "xkbcommon-x11",
+ "condition": "features.xkbcommon && libs.xkbcommon_x11",
+ "output": [ "privateFeature" ]
+ },
"xlib": {
"label": "XLib",
"autoDetect": "!config.darwin || features.xcb",
@@ -1832,7 +1825,7 @@
{
"type": "error",
"condition": "input.xcb != '' && input.xcb != 'no' && input.xkbcommon == 'no'",
- "message": "XCB plugin requires xkbcommon, but -no-xkbcommon was provided."
+ "message": "XCB plugin requires xkbcommon and xkbcommon-x11, but -no-xkbcommon was provided."
}
],
@@ -1954,7 +1947,8 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla
"entries": [
"xlib",
"xcb-xlib",
- "egl_x11"
+ "egl_x11",
+ "xkbcommon-x11"
]
}
]
@@ -1987,7 +1981,7 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla
"section": "XCB",
"condition": "features.xcb",
"entries": [
- "system-xcb", "xkb", "xcb-xinput", "xcb-native-painting",
+ "system-xcb-xinput", "xcb-native-painting",
{
"section": "GL integrations",
"entries": [
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
index f1f51c0582..138d0dfa1b 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
//! [3]
QSize MyWidget::sizeHint() const
{
- return QSize(80, 25).expandedTo(QApplication::globalStrut());
+ return QSize(80, 25);
}
//! [3]
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp
index 37fae52778..d1ee6bbdea 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp
@@ -93,9 +93,9 @@ painter2->begin(myWidget); // impossible - only one painter at a time
//! [4]
void QPainter::rotate(qreal angle)
{
- QMatrix matrix;
+ QTransform matrix;
matrix.rotate(angle);
- setWorldMatrix(matrix, true);
+ setWorldTransform(matrix, true);
}
//! [4]
diff --git a/src/gui/doc/src/qtgui.qdoc b/src/gui/doc/src/qtgui.qdoc
index 392b6040cb..f8a3ce84aa 100644
--- a/src/gui/doc/src/qtgui.qdoc
+++ b/src/gui/doc/src/qtgui.qdoc
@@ -62,7 +62,7 @@
\include module-use.qdocinc using qt module
\quotefile overview/using-qt-gui.cmake
- See also the \l[QtDoc]{Build with CMake} overview.
+ See also the \l{Build with CMake} overview.
\section2 Building with qmake
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 45c8c05162..350d4c5ee3 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -99,4 +99,4 @@ qtConfig(egl): CMAKE_EGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_EGL)
QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist
TRACEPOINT_PROVIDER = $$PWD/qtgui.tracepoints
-CONFIG += qt_tracepoints
+CONFIG += qt_tracepoints metatypes install_metatypes
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index 455045eb57..a44f7151b1 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -218,7 +218,7 @@ QBitmap::~QBitmap()
*/
QBitmap::operator QVariant() const
{
- return QVariant(QVariant::Bitmap, this);
+ return QVariant(QMetaType::QBitmap, this);
}
static QBitmap makeBitmap(QImage &&image, Qt::ImageConversionFlags flags)
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 7f8e072322..32b6131309 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -414,7 +414,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, qint64 offset,
*p++ = tmp >> 4;
}
if ((((c & 3) + 1) & 2) == 2)
- d->getChar(0); // align on word boundary
+ d->getChar(nullptr); // align on word boundary
x += c;
}
} else { // encoded mode
@@ -494,7 +494,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, qint64 offset,
if (d->read((char *)p, b) != b)
return false;
if ((b & 1) == 1)
- d->getChar(0); // align on word boundary
+ d->getChar(nullptr); // align on word boundary
x += b;
p += b;
}
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 191217cdc4..41fe649fc5 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -132,7 +132,7 @@ static void qt_cleanup_icon_cache()
if Qt::AA_UseHighDpiPixmaps is not set this function
returns 1.0 to keep non-hihdpi aware code working.
*/
-static qreal qt_effective_device_pixel_ratio(QWindow *window = 0)
+static qreal qt_effective_device_pixel_ratio(QWindow *window = nullptr)
{
if (!qApp->testAttribute(Qt::AA_UseHighDpiPixmaps))
return qreal(1.0);
@@ -228,7 +228,7 @@ static QPixmapIconEngineEntry *bestSizeMatch( const QSize &size, QPixmapIconEngi
QPixmapIconEngineEntry *QPixmapIconEngine::tryMatch(const QSize &size, QIcon::Mode mode, QIcon::State state)
{
- QPixmapIconEngineEntry *pe = 0;
+ QPixmapIconEngineEntry *pe = nullptr;
for (int i = 0; i < pixmaps.count(); ++i)
if (pixmaps.at(i).mode == mode && pixmaps.at(i).state == state) {
if (pe)
@@ -674,7 +674,7 @@ QFactoryLoader *qt_iconEngineFactoryLoader()
Constructs a null icon.
*/
QIcon::QIcon() noexcept
- : d(0)
+ : d(nullptr)
{
}
@@ -682,7 +682,7 @@ QIcon::QIcon() noexcept
Constructs an icon from a \a pixmap.
*/
QIcon::QIcon(const QPixmap &pixmap)
- :d(0)
+ :d(nullptr)
{
addPixmap(pixmap);
}
@@ -723,7 +723,7 @@ QIcon::QIcon(const QIcon &other)
complete list of the supported file formats.
*/
QIcon::QIcon(const QString &fileName)
- : d(0)
+ : d(nullptr)
{
addFile(fileName);
}
@@ -782,7 +782,7 @@ QIcon &QIcon::operator=(const QIcon &other)
*/
QIcon::operator QVariant() const
{
- return QVariant(QVariant::Icon, this);
+ return QVariant(QMetaType::QIcon, this);
}
/*! \fn int QIcon::serialNumber() const
@@ -838,7 +838,7 @@ QPixmap QIcon::pixmap(const QSize &size, Mode mode, State state) const
{
if (!d)
return QPixmap();
- return pixmap(0, size, mode, state);
+ return pixmap(nullptr, size, mode, state);
}
/*!
@@ -878,7 +878,7 @@ QSize QIcon::actualSize(const QSize &size, Mode mode, State state) const
{
if (!d)
return QSize();
- return actualSize(0, size, mode, state);
+ return actualSize(nullptr, size, mode, state);
}
/*!
@@ -1008,7 +1008,7 @@ void QIcon::detach()
if (d->engine->isNull()) {
if (!d->ref.deref())
delete d;
- d = 0;
+ d = nullptr;
return;
} else if (d->ref.loadRelaxed() != 1) {
QIconPrivate *x = new QIconPrivate(d->engine->clone());
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index 27c82bc09f..e67b387981 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -714,7 +714,7 @@ QIconLoaderEngineEntry *QIconLoaderEngine::entryForSize(const QThemeIconInfo &in
// Find the minimum distance icon
int minimalSize = INT_MAX;
- QIconLoaderEngineEntry *closestMatch = 0;
+ QIconLoaderEngineEntry *closestMatch = nullptr;
for (int i = 0; i < numEntries; ++i) {
QIconLoaderEngineEntry *entry = info.entries.at(i);
int distance = directorySizeDistance(entry->dir, iconsize, scale);
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 01abad96a0..9a5aefbfed 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
static inline bool isLocked(QImageData *data)
{
- return data != 0 && data->is_locked;
+ return data != nullptr && data->is_locked;
}
#if defined(Q_CC_DEC) && defined(__alpha) && (__DECCXX_VER-0 >= 50190001)
@@ -99,15 +99,15 @@ static int next_qimage_serial_number()
}
QImageData::QImageData()
- : ref(0), width(0), height(0), depth(0), nbytes(0), devicePixelRatio(1.0), data(0),
+ : ref(0), width(0), height(0), depth(0), nbytes(0), devicePixelRatio(1.0), data(nullptr),
format(QImage::Format_ARGB32), bytes_per_line(0),
ser_no(next_qimage_serial_number()),
detach_no(0),
dpmx(qt_defaultDpiX() * 100 / qreal(2.54)),
dpmy(qt_defaultDpiY() * 100 / qreal(2.54)),
offset(0, 0), own_data(true), ro_data(false), has_alpha_clut(false),
- is_cached(false), is_locked(false), cleanupFunction(0), cleanupInfo(0),
- paintEngine(0)
+ is_cached(false), is_locked(false), cleanupFunction(nullptr), cleanupInfo(nullptr),
+ paintEngine(nullptr)
{
}
@@ -170,7 +170,7 @@ QImageData::~QImageData()
delete paintEngine;
if (data && own_data)
free(data);
- data = 0;
+ data = nullptr;
}
#if defined(_M_ARM)
@@ -746,7 +746,7 @@ bool QImageData::checkForAlphaPixels() const
QImage::QImage() noexcept
: QPaintDevice()
{
- d = 0;
+ d = nullptr;
}
/*!
@@ -955,7 +955,7 @@ QImage::QImage(const uchar *data, int width, int height, int bytesPerLine, Forma
QImage::QImage(const QString &fileName, const char *format)
: QPaintDevice()
{
- d = 0;
+ d = nullptr;
load(fileName, format);
}
@@ -981,10 +981,10 @@ extern bool qt_read_xpm_image_or_array(QIODevice *device, const char * const *so
QImage::QImage(const char * const xpm[])
: QPaintDevice()
{
- d = 0;
+ d = nullptr;
if (!xpm)
return;
- if (!qt_read_xpm_image_or_array(0, xpm, *this))
+ if (!qt_read_xpm_image_or_array(nullptr, xpm, *this))
// Issue: Warning because the constructor may be ambigious
qWarning("QImage::QImage(), XPM is not supported");
}
@@ -1003,7 +1003,7 @@ QImage::QImage(const QImage &image)
: QPaintDevice()
{
if (image.paintingActive() || isLocked(image.d)) {
- d = 0;
+ d = nullptr;
image.copy().swap(*this);
} else {
d = image.d;
@@ -1067,7 +1067,7 @@ int QImage::devType() const
*/
QImage::operator QVariant() const
{
- return QVariant(QVariant::Image, this);
+ return QVariant(QMetaType::QImage, this);
}
/*!
@@ -1593,13 +1593,13 @@ void QImage::setColor(int i, QRgb c)
uchar *QImage::scanLine(int i)
{
if (!d)
- return 0;
+ return nullptr;
detach();
// In case detach() ran out of memory
if (!d)
- return 0;
+ return nullptr;
return d->data + i * d->bytes_per_line;
}
@@ -1610,7 +1610,7 @@ uchar *QImage::scanLine(int i)
const uchar *QImage::scanLine(int i) const
{
if (!d)
- return 0;
+ return nullptr;
Q_ASSERT(i >= 0 && i < height());
return d->data + i * d->bytes_per_line;
@@ -1635,7 +1635,7 @@ const uchar *QImage::scanLine(int i) const
const uchar *QImage::constScanLine(int i) const
{
if (!d)
- return 0;
+ return nullptr;
Q_ASSERT(i >= 0 && i < height());
return d->data + i * d->bytes_per_line;
@@ -1655,12 +1655,12 @@ const uchar *QImage::constScanLine(int i) const
uchar *QImage::bits()
{
if (!d)
- return 0;
+ return nullptr;
detach();
// In case detach ran out of memory...
if (!d)
- return 0;
+ return nullptr;
return d->data;
}
@@ -1674,7 +1674,7 @@ uchar *QImage::bits()
*/
const uchar *QImage::bits() const
{
- return d ? d->data : 0;
+ return d ? d->data : nullptr;
}
@@ -1690,7 +1690,7 @@ const uchar *QImage::bits() const
*/
const uchar *QImage::constBits() const
{
- return d ? d->data : 0;
+ return d ? d->data : nullptr;
}
/*!
@@ -1914,10 +1914,10 @@ void QImage::invertPixels(InvertMode mode)
// Inverting premultiplied pixels would produce invalid image data.
if (hasAlphaChannel() && qPixelLayouts[d->format].premultiplied) {
if (depth() > 32) {
- if (!d->convertInPlace(QImage::Format_RGBA64, 0))
+ if (!d->convertInPlace(QImage::Format_RGBA64, { }))
*this = convertToFormat(QImage::Format_RGBA64);
} else {
- if (!d->convertInPlace(QImage::Format_ARGB32, 0))
+ if (!d->convertInPlace(QImage::Format_ARGB32, { }))
*this = convertToFormat(QImage::Format_ARGB32);
}
}
@@ -1984,7 +1984,7 @@ void QImage::invertPixels(InvertMode mode)
}
if (originalFormat != d->format) {
- if (!d->convertInPlace(originalFormat, 0))
+ if (!d->convertInPlace(originalFormat, { }))
*this = convertToFormat(originalFormat);
}
}
@@ -2883,7 +2883,13 @@ QImage QImage::scaledToHeight(int h, Qt::TransformationMode mode) const
}
+#if QT_DEPRECATED_SINCE(5, 15)
+
/*!
+ \obsolete
+
+ Use trueMatrix(const QTransform &matrix, int w, int h) instead.
+
\fn QMatrix QImage::trueMatrix(const QMatrix &matrix, int width, int height)
Returns the actual matrix used for transforming an image with the
@@ -2905,6 +2911,10 @@ QMatrix QImage::trueMatrix(const QMatrix &matrix, int w, int h)
}
/*!
+ \obsolete
+
+ Use transformed(const QTransform &matrix, Qt::TransformationMode mode) instead.
+
Returns a copy of the image that is transformed using the given
transformation \a matrix and transformation \a mode.
@@ -2929,6 +2939,8 @@ QImage QImage::transformed(const QMatrix &matrix, Qt::TransformationMode mode) c
return transformed(QTransform(matrix), mode);
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
/*!
Builds and returns a 1-bpp mask from the alpha buffer in this
image. Returns a null image if the image's format is
@@ -3029,11 +3041,11 @@ QImage QImage::createHeuristicMask(bool clipTight) const
while(!done) {
done = true;
ypn = m.scanLine(0);
- ypc = 0;
+ ypc = nullptr;
for (y = 0; y < h; y++) {
ypp = ypc;
ypc = ypn;
- ypn = (y == h-1) ? 0 : m.scanLine(y+1);
+ ypn = (y == h-1) ? nullptr : m.scanLine(y+1);
const QRgb *p = (const QRgb *)scanLine(y);
for (x = 0; x < w; x++) {
// slowness here - it's possible to do six of these tests
@@ -3055,11 +3067,11 @@ QImage QImage::createHeuristicMask(bool clipTight) const
if (!clipTight) {
ypn = m.scanLine(0);
- ypc = 0;
+ ypc = nullptr;
for (y = 0; y < h; y++) {
ypp = ypc;
ypc = ypn;
- ypn = (y == h-1) ? 0 : m.scanLine(y+1);
+ ypn = (y == h-1) ? nullptr : m.scanLine(y+1);
const QRgb *p = (const QRgb *)scanLine(y);
for (x = 0; x < w; x++) {
if ((*p & 0x00ffffff) != background) {
@@ -3685,8 +3697,8 @@ QImage QImage::fromData(const uchar *data, int size, const char *format)
/*!
Saves the image to the file with the given \a fileName, using the
given image file \a format and \a quality factor. If \a format is
- 0, QImage will attempt to guess the format by looking at \a fileName's
- suffix.
+ \nullptr, QImage will attempt to guess the format by looking at
+ \a fileName's suffix.
The \a quality factor must be in the range 0 to 100 or -1. Specify
0 to obtain small compressed files, 100 for large uncompressed
@@ -4060,7 +4072,7 @@ void QImage::setText(const QString &key, const QString &value)
\obsolete
Returns the text recorded for the given \a key in the given \a
- language, or in a default language if \a language is 0.
+ language, or in a default language if \a language is \nullptr.
Use text() instead.
@@ -4087,7 +4099,7 @@ void QImage::setText(const QString &key, const QString &value)
Sets the image text to the given \a text and associate it with the
given \a key. The text is recorded in the specified \a language,
- or in a default language if \a language is 0.
+ or in a default language if \a language is \nullptr.
Use setText() instead.
@@ -4101,7 +4113,7 @@ void QImage::setText(const QString &key, const QString &value)
\l{http://www.libpng.org/pub/png/spec/1.2/png-1.2-pdg.html#C.Anc-text}
{the PNG specification}. \a s can be any text. \a lang should
specify the language code (see
- \l{http://www.rfc-editor.org/rfc/rfc1766.txt}{RFC 1766}) or 0.
+ \l{http://www.rfc-editor.org/rfc/rfc1766.txt}{RFC 1766}) or \nullptr.
\endomit
*/
@@ -4124,7 +4136,7 @@ void QImage::setText(const QString &key, const QString &value)
QPaintEngine *QImage::paintEngine() const
{
if (!d)
- return 0;
+ return nullptr;
if (!d->paintEngine) {
QPaintDevice *paintDevice = const_cast<QImage *>(this);
@@ -4412,37 +4424,28 @@ bool QImage::isDetached() const
/*!
- \obsolete
Sets the alpha channel of this image to the given \a alphaChannel.
- If \a alphaChannel is an 8 bit grayscale image, the intensity values are
- written into this buffer directly. Otherwise, \a alphaChannel is converted
- to 32 bit and the intensity of the RGB pixel values is used.
+ If \a alphaChannel is an 8 bit alpha image, the alpha values are
+ used directly. Otherwise, \a alphaChannel is converted to 8 bit
+ grayscale and the intensity of the pixel values is used.
- Note that the image will be converted to the Format_ARGB32_Premultiplied
- format if the function succeeds.
+ If the image already has an alpha channel, the existing alpha channel
+ is multiplied with the new one. If the image doesn't have an alpha
+ channel it will be converted to a format that does.
- Use one of the composition modes in QPainter::CompositionMode instead.
+ The operation is similar to painting \a alphaChannel as an alpha image
+ over this image using \c QPainter::CompositionMode_DestinationIn.
- \warning This function is expensive.
-
- \sa alphaChannel(), {QImage#Image Transformations}{Image
- Transformations}, {QImage#Image Formats}{Image Formats}
+ \sa hasAlphaChannel(), alphaChannel(),
+ {QImage#Image Transformations}{Image Transformations},
+ {QImage#Image Formats}{Image Formats}
*/
void QImage::setAlphaChannel(const QImage &alphaChannel)
{
- if (!d)
- return;
-
- int w = d->width;
- int h = d->height;
-
- if (w != alphaChannel.d->width || h != alphaChannel.d->height) {
- qWarning("QImage::setAlphaChannel: "
- "Alpha channel must have same dimensions as the target image");
+ if (!d || alphaChannel.isNull())
return;
- }
if (d->paintEngine && d->paintEngine->isActive()) {
qWarning("QImage::setAlphaChannel: "
@@ -4450,61 +4453,32 @@ void QImage::setAlphaChannel(const QImage &alphaChannel)
return;
}
- if (d->format == QImage::Format_ARGB32_Premultiplied)
+ const Format alphaFormat = qt_alphaVersionForPainting(d->format);
+ if (d->format == alphaFormat)
detach();
else
- *this = convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ convertTo(alphaFormat);
if (isNull())
return;
- // Slight optimization since alphachannels are returned as 8-bit grays.
- if (alphaChannel.format() == QImage::Format_Alpha8 ||( alphaChannel.d->depth == 8 && alphaChannel.isGrayscale())) {
- const uchar *src_data = alphaChannel.d->data;
- uchar *dest_data = d->data;
- for (int y=0; y<h; ++y) {
- const uchar *src = src_data;
- QRgb *dest = (QRgb *)dest_data;
- for (int x=0; x<w; ++x) {
- int alpha = *src;
- int destAlpha = qt_div_255(alpha * qAlpha(*dest));
- *dest = ((destAlpha << 24)
- | (qt_div_255(qRed(*dest) * alpha) << 16)
- | (qt_div_255(qGreen(*dest) * alpha) << 8)
- | (qt_div_255(qBlue(*dest) * alpha)));
- ++dest;
- ++src;
- }
- src_data += alphaChannel.d->bytes_per_line;
- dest_data += d->bytes_per_line;
- }
+ QImage sourceImage;
+ if (alphaChannel.format() == QImage::Format_Alpha8 || (alphaChannel.d->depth == 8 && alphaChannel.isGrayscale()))
+ sourceImage = alphaChannel;
+ else
+ sourceImage = alphaChannel.convertToFormat(QImage::Format_Grayscale8);
+ if (!sourceImage.reinterpretAsFormat(QImage::Format_Alpha8))
+ return;
- } else {
- const QImage sourceImage = alphaChannel.convertToFormat(QImage::Format_RGB32);
- if (sourceImage.isNull())
- return;
- const uchar *src_data = sourceImage.d->data;
- uchar *dest_data = d->data;
- for (int y=0; y<h; ++y) {
- const QRgb *src = (const QRgb *) src_data;
- QRgb *dest = (QRgb *) dest_data;
- for (int x=0; x<w; ++x) {
- int alpha = qGray(*src);
- int destAlpha = qt_div_255(alpha * qAlpha(*dest));
- *dest = ((destAlpha << 24)
- | (qt_div_255(qRed(*dest) * alpha) << 16)
- | (qt_div_255(qGreen(*dest) * alpha) << 8)
- | (qt_div_255(qBlue(*dest) * alpha)));
- ++dest;
- ++src;
- }
- src_data += sourceImage.d->bytes_per_line;
- dest_data += d->bytes_per_line;
- }
- }
+ QPainter painter(this);
+ if (sourceImage.size() != size())
+ painter.setRenderHint(QPainter::SmoothPixmapTransform);
+ painter.setCompositionMode(QPainter::CompositionMode_DestinationIn);
+ painter.drawImage(rect(), sourceImage);
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\obsolete
@@ -4594,6 +4568,7 @@ QImage QImage::alphaChannel() const
return image;
}
+#endif
/*!
Returns \c true if the image has a format that respects the alpha
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 7544ccca05..7b2abfaf85 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -266,7 +266,9 @@ public:
bool hasAlphaChannel() const;
void setAlphaChannel(const QImage &alphaChannel);
- QImage alphaChannel() const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED QImage alphaChannel() const;
+#endif
QImage createAlphaMask(Qt::ImageConversionFlags flags = Qt::AutoColor) const;
#ifndef QT_NO_IMAGE_HEURISTIC_MASK
QImage createHeuristicMask(bool clipTight = true) const;
@@ -280,8 +282,12 @@ public:
Qt::TransformationMode mode = Qt::FastTransformation) const;
QImage scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const;
QImage scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use transformed(const QTransform &matrix, Qt::TransformationMode mode)")
QImage transformed(const QMatrix &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ QT_DEPRECATED_X("trueMatrix(const QTransform &, int w, int h)")
static QMatrix trueMatrix(const QMatrix &, int w, int h);
+#endif // QT_DEPRECATED_SINCE(5, 15)
QImage transformed(const QTransform &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const;
static QTransform trueMatrix(const QTransform &, int w, int h);
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QIMAGE_COMPAT_CPP)
diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp
index 97a5f89e68..27088698ec 100644
--- a/src/gui/image/qimage_conversions.cpp
+++ b/src/gui/image/qimage_conversions.cpp
@@ -198,7 +198,7 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio
store = destLayout->storeFromRGB32;
}
QDitherInfo dither;
- QDitherInfo *ditherPtr = 0;
+ QDitherInfo *ditherPtr = nullptr;
if ((flags & Qt::PreferDither) && (flags & Qt::Dither_Mask) != Qt::ThresholdDither)
ditherPtr = &dither;
@@ -212,8 +212,8 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio
buffer = reinterpret_cast<uint *>(destData) + x;
else
l = qMin(l, BufferSize);
- const uint *ptr = fetch(buffer, srcData, x, l, 0, ditherPtr);
- store(destData, ptr, x, l, 0, ditherPtr);
+ const uint *ptr = fetch(buffer, srcData, x, l, nullptr, ditherPtr);
+ store(destData, ptr, x, l, nullptr, ditherPtr);
x += l;
}
srcData += src->bytes_per_line;
@@ -257,7 +257,8 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
// Cannot be used with indexed formats or between formats with different pixel depths.
Q_ASSERT(dst_format > QImage::Format_Indexed8);
Q_ASSERT(data->format > QImage::Format_Indexed8);
- if (data->depth != qt_depthForFormat(dst_format))
+ const int destDepth = qt_depthForFormat(dst_format);
+ if (data->depth < destDepth)
return false;
const QPixelLayout *srcLayout = &qPixelLayouts[data->format];
@@ -272,9 +273,16 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
uint buf[BufferSize];
uint *buffer = buf;
uchar *srcData = data->data;
+ uchar *destData = data->data;
+
+ QImageData::ImageSizeParameters params = { data->bytes_per_line, data->nbytes };
+ if (data->depth != destDepth) {
+ params = QImageData::calculateImageParameters(data->width, data->height, destDepth);
+ if (!params.isValid())
+ return false;
+ }
- Q_ASSERT(srcLayout->bpp == destLayout->bpp);
- Q_ASSERT(srcLayout->bpp != QPixelLayout::BPP64);
+ Q_ASSERT(destLayout->bpp != QPixelLayout::BPP64);
FetchAndConvertPixelsFunc fetch = srcLayout->fetchToARGB32PM;
ConvertAndStorePixelsFunc store = destLayout->storeFromARGB32PM;
if (!srcLayout->hasAlphaChannel && destLayout->storeFromRGB32) {
@@ -306,7 +314,7 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
store = destLayout->storeFromRGB32;
}
QDitherInfo dither;
- QDitherInfo *ditherPtr = 0;
+ QDitherInfo *ditherPtr = nullptr;
if ((flags & Qt::PreferDither) && (flags & Qt::Dither_Mask) != Qt::ThresholdDither)
ditherPtr = &dither;
@@ -316,15 +324,26 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
while (x < data->width) {
dither.x = x;
int l = data->width - x;
- if (destLayout->bpp == QPixelLayout::BPP32)
+ if (srcLayout->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);
+ store(destData, ptr, x, l, nullptr, ditherPtr);
x += l;
}
srcData += data->bytes_per_line;
+ destData += params.bytesPerLine;
+ }
+ if (params.totalSize != data->nbytes) {
+ Q_ASSERT(params.totalSize < data->nbytes);
+ void *newData = realloc(data->data, params.totalSize);
+ if (newData) {
+ data->data = (uchar *)newData;
+ data->nbytes = params.totalSize;
+ }
+ data->bytes_per_line = params.bytesPerLine;
+ data->depth = destDepth;
}
data->format = dst_format;
return true;
@@ -832,240 +851,6 @@ static bool convert_A2RGB30_PM_to_ARGB_inplace(QImageData *data, Qt::ImageConver
return true;
}
-static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConversionFlags)
-{
- Q_ASSERT(data->format == QImage::Format_Indexed8);
- Q_ASSERT(data->own_data);
-
- const int depth = 32;
- auto params = QImageData::calculateImageParameters(data->width, data->height, depth);
- if (params.bytesPerLine < 0)
- return false;
- uchar *const newData = (uchar *)realloc(data->data, params.totalSize);
- if (!newData)
- return false;
-
- data->data = newData;
-
- // start converting from the end because the end image is bigger than the source
- uchar *src_data = newData + data->nbytes; // end of src
- quint32 *dest_data = (quint32 *) (newData + params.totalSize); // end of dest > end of src
- const int width = data->width;
- const int src_pad = data->bytes_per_line - width;
- const int dest_pad = (params.bytesPerLine >> 2) - width;
- if (data->colortable.size() == 0) {
- data->colortable.resize(256);
- for (int i = 0; i < 256; ++i)
- data->colortable[i] = qRgb(i, i, i);
- } else {
- for (int i = 0; i < data->colortable.size(); ++i)
- data->colortable[i] = qPremultiply(data->colortable.at(i));
-
- // Fill the rest of the table in case src_data > colortable.size()
- const int oldSize = data->colortable.size();
- const QRgb lastColor = data->colortable.at(oldSize - 1);
- data->colortable.insert(oldSize, 256 - oldSize, lastColor);
- }
-
- for (int i = 0; i < data->height; ++i) {
- src_data -= src_pad;
- dest_data -= dest_pad;
- for (int pixI = 0; pixI < width; ++pixI) {
- --src_data;
- --dest_data;
- *dest_data = data->colortable.at(*src_data);
- }
- }
-
- data->colortable = QVector<QRgb>();
- data->format = QImage::Format_ARGB32_Premultiplied;
- data->bytes_per_line = params.bytesPerLine;
- data->depth = depth;
- data->nbytes = params.totalSize;
-
- return true;
-}
-
-static bool convert_indexed8_to_ARGB_inplace(QImageData *data, Qt::ImageConversionFlags)
-{
- Q_ASSERT(data->format == QImage::Format_Indexed8);
- Q_ASSERT(data->own_data);
-
- const int depth = 32;
- auto params = QImageData::calculateImageParameters(data->width, data->height, depth);
- if (params.bytesPerLine < 0)
- return false;
- uchar *const newData = (uchar *)realloc(data->data, params.totalSize);
- if (!newData)
- return false;
-
- data->data = newData;
-
- // start converting from the end because the end image is bigger than the source
- uchar *src_data = newData + data->nbytes;
- quint32 *dest_data = (quint32 *) (newData + params.totalSize);
- const int width = data->width;
- const int src_pad = data->bytes_per_line - width;
- const int dest_pad = (params.bytesPerLine >> 2) - width;
- if (data->colortable.size() == 0) {
- data->colortable.resize(256);
- for (int i = 0; i < 256; ++i)
- data->colortable[i] = qRgb(i, i, i);
- } else {
- // Fill the rest of the table in case src_data > colortable.size()
- const int oldSize = data->colortable.size();
- const QRgb lastColor = data->colortable.at(oldSize - 1);
- data->colortable.insert(oldSize, 256 - oldSize, lastColor);
- }
-
- for (int i = 0; i < data->height; ++i) {
- src_data -= src_pad;
- dest_data -= dest_pad;
- for (int pixI = 0; pixI < width; ++pixI) {
- --src_data;
- --dest_data;
- *dest_data = (quint32) data->colortable.at(*src_data);
- }
- }
-
- data->colortable = QVector<QRgb>();
- data->format = QImage::Format_ARGB32;
- data->bytes_per_line = params.bytesPerLine;
- data->depth = depth;
- data->nbytes = params.totalSize;
-
- return true;
-}
-
-static bool convert_indexed8_to_RGB_inplace(QImageData *data, Qt::ImageConversionFlags flags)
-{
- Q_ASSERT(data->format == QImage::Format_Indexed8);
- Q_ASSERT(data->own_data);
-
- if (data->has_alpha_clut) {
- for (int i = 0; i < data->colortable.size(); ++i)
- data->colortable[i] |= 0xff000000;
- }
-
- if (!convert_indexed8_to_ARGB_inplace(data, flags))
- return false;
-
- data->format = QImage::Format_RGB32;
- return true;
-}
-
-static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConversionFlags)
-{
- Q_ASSERT(data->format == QImage::Format_Indexed8);
- Q_ASSERT(data->own_data);
-
- const int depth = 16;
- auto params = QImageData::calculateImageParameters(data->width, data->height, depth);
- if (params.bytesPerLine < 0)
- return false;
- uchar *const newData = (uchar *)realloc(data->data, params.totalSize);
- if (!newData)
- return false;
-
- data->data = newData;
-
- // start converting from the end because the end image is bigger than the source
- uchar *src_data = newData + data->nbytes;
- quint16 *dest_data = (quint16 *) (newData + params.totalSize);
- const int width = data->width;
- const int src_pad = data->bytes_per_line - width;
- const int dest_pad = (params.bytesPerLine >> 1) - width;
-
- quint16 colorTableRGB16[256];
- const int tableSize = data->colortable.size();
- if (tableSize == 0) {
- for (int i = 0; i < 256; ++i)
- colorTableRGB16[i] = qConvertRgb32To16(qRgb(i, i, i));
- } else {
- // 1) convert the existing colors to RGB16
- for (int i = 0; i < tableSize; ++i)
- colorTableRGB16[i] = qConvertRgb32To16(data->colortable.at(i));
- data->colortable = QVector<QRgb>();
-
- // 2) fill the rest of the table in case src_data > colortable.size()
- const quint16 lastColor = colorTableRGB16[tableSize - 1];
- for (int i = tableSize; i < 256; ++i)
- colorTableRGB16[i] = lastColor;
- }
-
- for (int i = 0; i < data->height; ++i) {
- src_data -= src_pad;
- dest_data -= dest_pad;
- for (int pixI = 0; pixI < width; ++pixI) {
- --src_data;
- --dest_data;
- *dest_data = colorTableRGB16[*src_data];
- }
- }
-
- data->format = QImage::Format_RGB16;
- data->bytes_per_line = params.bytesPerLine;
- data->depth = depth;
- data->nbytes = params.totalSize;
-
- return true;
-}
-
-static bool convert_RGB_to_RGB16_inplace(QImageData *data, Qt::ImageConversionFlags)
-{
- Q_ASSERT(data->format == QImage::Format_RGB32);
- Q_ASSERT(data->own_data);
-
- const int depth = 16;
-
- // cannot overflow, since we're shrinking the buffer
- const qsizetype dst_bytes_per_line = ((data->width * depth + 31) >> 5) << 2;
- const qsizetype src_bytes_per_line = data->bytes_per_line;
- quint32 *src_data = (quint32 *) data->data;
- quint16 *dst_data = (quint16 *) data->data;
-
- for (int i = 0; i < data->height; ++i) {
- for (int j = 0; j < data->width; ++j)
- dst_data[j] = qConvertRgb32To16(src_data[j]);
- src_data = (quint32 *) (((char*)src_data) + src_bytes_per_line);
- dst_data = (quint16 *) (((char*)dst_data) + dst_bytes_per_line);
- }
- data->format = QImage::Format_RGB16;
- data->bytes_per_line = dst_bytes_per_line;
- data->depth = depth;
- data->nbytes = dst_bytes_per_line * data->height;
- uchar *const newData = (uchar *)realloc(data->data, data->nbytes);
- if (newData)
- data->data = newData;
-
- // can't fail, since we're shrinking
- return true;
-}
-
-static void convert_ARGB_PM_to_ARGB(QImageData *dest, const QImageData *src)
-{
- Q_ASSERT(src->format == QImage::Format_ARGB32_Premultiplied || src->format == QImage::Format_RGBA8888_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_ARGB32 || dest->format == QImage::Format_RGBA8888);
- 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 = qUnpremultiply(*src_data);
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
static void convert_RGBA_to_RGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
Q_ASSERT(src->format == QImage::Format_RGBA8888 || src->format == QImage::Format_RGBX8888);
@@ -1732,7 +1517,7 @@ static void convert_X_to_Mono(QImageData *dst, const QImageData *src, Qt::ImageC
static void convert_ARGB_PM_to_Mono(QImageData *dst, const QImageData *src, Qt::ImageConversionFlags flags)
{
QScopedPointer<QImageData> tmp(QImageData::create(QSize(src->width, src->height), QImage::Format_ARGB32));
- convert_ARGB_PM_to_ARGB(tmp.data(), src);
+ convert_generic(tmp.data(), src, Qt::AutoColor);
dither_to_Mono(dst, tmp.data(), flags, false);
}
@@ -2012,7 +1797,7 @@ static void convert_RGB_to_Indexed8(QImageData *dst, const QImageData *src, Qt::
static void convert_ARGB_PM_to_Indexed8(QImageData *dst, const QImageData *src, Qt::ImageConversionFlags flags)
{
QScopedPointer<QImageData> tmp(QImageData::create(QSize(src->width, src->height), QImage::Format_ARGB32));
- convert_ARGB_PM_to_ARGB(tmp.data(), src);
+ convert_generic(tmp.data(), src, Qt::AutoColor);
convert_RGB_to_Indexed8(dst, tmp.data(), flags);
}
@@ -2991,10 +2776,10 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
0,
- convert_indexed8_to_RGB_inplace,
- convert_indexed8_to_ARGB_inplace,
- convert_indexed8_to_ARGB_PM_inplace,
- convert_indexed8_to_RGB16_inplace,
+ 0,
+ 0,
+ 0,
+ 0,
0,
0,
0,
@@ -3018,7 +2803,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
mask_alpha_converter_inplace<QImage::Format_ARGB32>,
mask_alpha_converter_inplace<QImage::Format_ARGB32_Premultiplied>,
- convert_RGB_to_RGB16_inplace,
+ 0,
0,
0,
0,
diff --git a/src/gui/image/qimageiohandler.cpp b/src/gui/image/qimageiohandler.cpp
index a4f927a462..0c9083a16e 100644
--- a/src/gui/image/qimageiohandler.cpp
+++ b/src/gui/image/qimageiohandler.cpp
@@ -288,7 +288,7 @@ public:
QImageIOHandlerPrivate::QImageIOHandlerPrivate(QImageIOHandler *q)
{
- device = 0;
+ device = nullptr;
q_ptr = q;
}
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index dff24b449a..3eb1e01863 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -179,10 +179,10 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
bool ignoresFormatAndExtension)
{
if (!autoDetectImageFormat && format.isEmpty())
- return 0;
+ return nullptr;
QByteArray form = format.toLower();
- QImageIOHandler *handler = 0;
+ QImageIOHandler *handler = nullptr;
QByteArray suffix;
#ifndef QT_NO_IMAGEFORMATPLUGIN
@@ -450,7 +450,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
qDebug("QImageReader::createReadHandler: no handlers found. giving up.");
#endif
// no handler: give up.
- return 0;
+ return nullptr;
}
handler->setDevice(device);
@@ -500,9 +500,9 @@ public:
QImageReaderPrivate::QImageReaderPrivate(QImageReader *qq)
: autoDetectImageFormat(true), ignoresFormatAndExtension(false)
{
- device = 0;
+ device = nullptr;
deleteDevice = false;
- handler = 0;
+ handler = nullptr;
quality = -1;
imageReaderError = QImageReader::UnknownError;
autoTransform = UsePluginDefault;
@@ -571,7 +571,7 @@ bool QImageReaderPrivate::initHandler()
}
// assign a handler
- if (!handler && (handler = createReadHandlerHelper(device, format, autoDetectImageFormat, ignoresFormatAndExtension)) == 0) {
+ if (!handler && (handler = createReadHandlerHelper(device, format, autoDetectImageFormat, ignoresFormatAndExtension)) == nullptr) {
imageReaderError = QImageReader::UnsupportedFormatError;
errorString = QImageReader::tr("Unsupported image format");
return false;
@@ -1089,7 +1089,7 @@ QList<QByteArray> QImageReader::supportedSubTypes() const
return QList<QByteArray>();
if (d->handler->supportsOption(QImageIOHandler::SupportedSubTypes))
- return d->handler->option(QImageIOHandler::SupportedSubTypes).value< QList<QByteArray> >();
+ return qvariant_cast<QList<QByteArray> >(d->handler->option(QImageIOHandler::SupportedSubTypes));
return QList<QByteArray>();
}
@@ -1149,6 +1149,7 @@ bool QImageReader::autoTransform() const
return false;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\since 5.6
@@ -1181,6 +1182,7 @@ float QImageReader::gamma() const
return d->handler->option(QImageIOHandler::Gamma).toFloat();
return 0.0;
}
+#endif
/*!
Returns \c true if an image can be read for the device (i.e., the
diff --git a/src/gui/image/qimagereader.h b/src/gui/image/qimagereader.h
index 4e9a08b6e6..7cd3b81a7d 100644
--- a/src/gui/image/qimagereader.h
+++ b/src/gui/image/qimagereader.h
@@ -117,8 +117,12 @@ public:
void setAutoTransform(bool enabled);
bool autoTransform() const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X_5_15("Use QColorSpace instead")
void setGamma(float gamma);
+ QT_DEPRECATED_VERSION_X_5_15("Use QColorSpace instead")
float gamma() const;
+#endif
QByteArray subType() const;
QList<QByteArray> supportedSubTypes() const;
diff --git a/src/gui/image/qimagereaderwriterhelpers.cpp b/src/gui/image/qimagereaderwriterhelpers.cpp
index a5b7fb6449..dd56d887a7 100644
--- a/src/gui/image/qimagereaderwriterhelpers.cpp
+++ b/src/gui/image/qimagereaderwriterhelpers.cpp
@@ -63,7 +63,7 @@ static void appendImagePluginFormats(QFactoryLoader *loader,
const PluginKeyMap keyMap = loader->keyMap();
const PluginKeyMapConstIterator cend = keyMap.constEnd();
int i = -1;
- QImageIOPlugin *plugin = 0;
+ QImageIOPlugin *plugin = nullptr;
result->reserve(result->size() + keyMap.size());
for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend; ++it) {
if (it.key() != i) {
@@ -71,7 +71,7 @@ static void appendImagePluginFormats(QFactoryLoader *loader,
plugin = qobject_cast<QImageIOPlugin *>(loader->instance(i));
}
const QByteArray key = it.value().toLatin1();
- if (plugin && (plugin->capabilities(0, key) & cap) != 0)
+ if (plugin && (plugin->capabilities(nullptr, key) & cap) != 0)
result->append(key);
}
}
@@ -92,7 +92,7 @@ static void appendImagePluginMimeTypes(QFactoryLoader *loader,
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) {
+ if (plugin && (plugin->capabilities(nullptr, key) & cap) != 0) {
result->append(mimeTypes.at(k).toString().toLatin1());
if (resultKeys)
resultKeys->append(key);
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index ec66588ddf..6e74b23f76 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -139,7 +139,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
{
QByteArray form = format.toLower();
QByteArray suffix;
- QImageIOHandler *handler = 0;
+ QImageIOHandler *handler = nullptr;
#ifndef QT_NO_IMAGEFORMATPLUGIN
typedef QMultiMap<int, QString> PluginKeyMap;
@@ -226,7 +226,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
#endif // QT_NO_IMAGEFORMATPLUGIN
if (!handler)
- return 0;
+ return nullptr;
handler->setDevice(device);
if (!testFormat.isEmpty())
@@ -270,9 +270,9 @@ public:
*/
QImageWriterPrivate::QImageWriterPrivate(QImageWriter *qq)
{
- device = 0;
+ device = nullptr;
deleteDevice = false;
- handler = 0;
+ handler = nullptr;
quality = -1;
compression = -1;
gamma = 0.0;
@@ -304,7 +304,7 @@ bool QImageWriterPrivate::canWriteHelper()
errorString = QImageWriter::tr("Device not writable");
return false;
}
- if (!handler && (handler = createWriteHandlerHelper(device, format)) == 0) {
+ if (!handler && (handler = createWriteHandlerHelper(device, format)) == nullptr) {
imageWriterError = QImageWriter::UnsupportedFormatError;
errorString = QImageWriter::tr("Unsupported image format");
return false;
@@ -403,7 +403,7 @@ void QImageWriter::setDevice(QIODevice *device)
d->device = device;
d->deleteDevice = false;
delete d->handler;
- d->handler = 0;
+ d->handler = nullptr;
}
/*!
@@ -498,6 +498,7 @@ int QImageWriter::compression() const
return d->compression;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
This is an image format specific function that sets the gamma
level of the image to \a gamma. For image formats that do not
@@ -522,6 +523,7 @@ float QImageWriter::gamma() const
{
return d->gamma;
}
+#endif
/*!
\since 5.4
@@ -561,7 +563,7 @@ QList<QByteArray> QImageWriter::supportedSubTypes() const
{
if (!supportsOption(QImageIOHandler::SupportedSubTypes))
return QList<QByteArray>();
- return d->handler->option(QImageIOHandler::SupportedSubTypes).value< QList<QByteArray> >();
+ return qvariant_cast<QList<QByteArray> >(d->handler->option(QImageIOHandler::SupportedSubTypes));
}
/*!
@@ -823,7 +825,7 @@ QString QImageWriter::errorString() const
*/
bool QImageWriter::supportsOption(QImageIOHandler::ImageOption option) const
{
- if (!d->handler && (d->handler = createWriteHandlerHelper(d->device, d->format)) == 0) {
+ if (!d->handler && (d->handler = createWriteHandlerHelper(d->device, d->format)) == nullptr) {
d->imageWriterError = QImageWriter::UnsupportedFormatError;
d->errorString = QImageWriter::tr("Unsupported image format");
return false;
diff --git a/src/gui/image/qimagewriter.h b/src/gui/image/qimagewriter.h
index ef84a59b7c..5c8ed7e211 100644
--- a/src/gui/image/qimagewriter.h
+++ b/src/gui/image/qimagewriter.h
@@ -84,8 +84,12 @@ public:
void setCompression(int compression);
int compression() const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X_5_15("Use QColorSpace instead")
void setGamma(float gamma);
+ QT_DEPRECATED_VERSION_X_5_15("Use QColorSpace instead")
float gamma() const;
+#endif
void setSubType(const QByteArray &type);
QByteArray subType() const;
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index 25fce050a1..79019d0fdf 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -272,7 +272,7 @@ public:
/*! \internal
*/
QMoviePrivate::QMoviePrivate(QMovie *qq)
- : reader(0), speed(100), movieState(QMovie::NotRunning),
+ : reader(nullptr), speed(100), movieState(QMovie::NotRunning),
currentFrameNumber(-1), nextFrameNumber(0), greatestFrameNumber(-1),
nextDelay(0), playCounter(-1),
cacheMode(QMovie::CacheNone), haveReadAll(false), isFirstIteration(true)
diff --git a/src/gui/image/qpaintengine_pic.cpp b/src/gui/image/qpaintengine_pic.cpp
index 6a87a01a87..e89cac452a 100644
--- a/src/gui/image/qpaintengine_pic.cpp
+++ b/src/gui/image/qpaintengine_pic.cpp
@@ -73,14 +73,14 @@ QPicturePaintEngine::QPicturePaintEngine()
: QPaintEngine(*(new QPicturePaintEnginePrivate), AllFeatures)
{
Q_D(QPicturePaintEngine);
- d->pt = 0;
+ d->pt = nullptr;
}
QPicturePaintEngine::QPicturePaintEngine(QPaintEnginePrivate &dptr)
: QPaintEngine(dptr, AllFeatures)
{
Q_D(QPicturePaintEngine);
- d->pt = 0;
+ d->pt = nullptr;
}
QPicturePaintEngine::~QPicturePaintEngine()
@@ -484,7 +484,7 @@ void QPicturePaintEngine::drawTextItem(const QPointF &p , const QTextItem &ti)
#endif
const QTextItemInt &si = static_cast<const QTextItemInt &>(ti);
- if (si.chars == 0)
+ if (si.chars == nullptr)
QPaintEngine::drawTextItem(p, ti); // Draw as path
if (d->pic_d->formatMajor >= 9) {
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index 978a07b9f9..3a32cc7f15 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -458,7 +458,7 @@ public:
QFakeDevice() { dpi_x = qt_defaultDpiX(); dpi_y = qt_defaultDpiY(); }
void setDpiX(int dpi) { dpi_x = dpi; }
void setDpiY(int dpi) { dpi_y = dpi; }
- QPaintEngine *paintEngine() const override { return 0; }
+ QPaintEngine *paintEngine() const override { return nullptr; }
int metric(PaintDeviceMetric m) const override
{
switch(m) {
@@ -709,11 +709,11 @@ bool QPicture::exec(QPainter *painter, QDataStream &s, int nrecords)
QFontMetrics fm(fnt);
QPointF pt(p.x(), p.y() - fm.ascent());
- qt_format_text(fnt, QRectF(pt, size), flags, /*opt*/0,
- str, /*brect=*/0, /*tabstops=*/0, /*...*/0, /*tabarraylen=*/0, painter);
+ qt_format_text(fnt, QRectF(pt, size), flags, /*opt*/nullptr,
+ str, /*brect=*/nullptr, /*tabstops=*/0, /*...*/nullptr, /*tabarraylen=*/0, painter);
} else {
- qt_format_text(font, QRectF(p, QSizeF(1, 1)), Qt::TextSingleLine | Qt::TextDontClip, /*opt*/0,
- str, /*brect=*/0, /*tabstops=*/0, /*...*/0, /*tabarraylen=*/0, painter);
+ qt_format_text(font, QRectF(p, QSizeF(1, 1)), Qt::TextSingleLine | Qt::TextDontClip, /*opt*/nullptr,
+ str, /*brect=*/nullptr, /*tabstops=*/0, /*...*/nullptr, /*tabarraylen=*/0, painter);
}
break;
@@ -1369,11 +1369,11 @@ QPictureIO::QPictureIO(const QString &fileName, const char* format)
void QPictureIO::init()
{
d = new QPictureIOData();
- d->parameters = 0;
+ d->parameters = nullptr;
d->quality = -1; // default quality of the current format
d->gamma=0.0f;
d->iostat = 0;
- d->iodev = 0;
+ d->iodev = nullptr;
}
/*!
@@ -1467,7 +1467,7 @@ static QPictureHandler *get_picture_handler(const char *format)
return list->at(i);
}
}
- return 0; // no such handler
+ return nullptr; // no such handler
}
@@ -1887,7 +1887,7 @@ bool QPictureIO::read()
if (picture_format.isEmpty()) {
if (file.isOpen()) { // unknown format
file.close();
- d->iodev = 0;
+ d->iodev = nullptr;
}
return false;
}
@@ -1913,7 +1913,7 @@ bool QPictureIO::read()
if (file.isOpen()) { // picture was read using file
file.close();
- d->iodev = 0;
+ d->iodev = nullptr;
}
return d->iostat == 0; // picture successfully read?
}
@@ -1957,7 +1957,7 @@ bool QPictureIO::write()
(*h->write_picture)(this);
if (file.isOpen()) { // picture was written using file
file.close();
- d->iodev = 0;
+ d->iodev = nullptr;
}
return d->iostat == 0; // picture successfully written?
}
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index b6e41f16a5..269f236ecd 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -94,7 +94,7 @@ void QPixmap::doInit(int w, int h, int type)
if ((w > 0 && h > 0) || type == QPlatformPixmap::BitmapType)
data = QPlatformPixmap::create(w, h, (QPlatformPixmap::PixelType) type);
else
- data = 0;
+ data = nullptr;
}
/*!
@@ -402,7 +402,7 @@ QPixmap &QPixmap::operator=(const QPixmap &pixmap)
*/
QPixmap::operator QVariant() const
{
- return QVariant(QVariant::Pixmap, this);
+ return QVariant(QMetaType::QPixmap, this);
}
/*!
@@ -438,7 +438,7 @@ QImage QPixmap::toImage() const
}
/*!
- \fn QMatrix QPixmap::trueMatrix(const QTransform &matrix, int width, int height)
+ \fn QTransform QPixmap::trueMatrix(const QTransform &matrix, int width, int height)
Returns the actual matrix used for transforming a pixmap with the
given \a width, \a height and \a matrix.
@@ -458,8 +458,12 @@ QTransform QPixmap::trueMatrix(const QTransform &m, int w, int h)
return QImage::trueMatrix(m, w, h);
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\overload
+ \obsolete
+
+ Use trueMatrix(const QTransform &m, int w, int h) instead.
This convenience function loads the matrix \a m into a
QTransform and calls the overloaded function with the
@@ -469,6 +473,7 @@ QMatrix QPixmap::trueMatrix(const QMatrix &m, int w, int h)
{
return trueMatrix(QTransform(m), w, h).toAffine();
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
@@ -780,7 +785,7 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers
bool QPixmap::loadFromData(const uchar *buf, uint len, const char *format, Qt::ImageConversionFlags flags)
{
- if (len == 0 || buf == 0) {
+ if (len == 0 || buf == nullptr) {
data.reset();
return false;
}
@@ -813,8 +818,8 @@ bool QPixmap::loadFromData(const uchar *buf, uint len, const char *format, Qt::I
0 to obtain small compressed files, 100 for large uncompressed
files, and -1 to use the default settings.
- If \a format is 0, an image format will be chosen from \a fileName's
- suffix.
+ If \a format is \nullptr, an image format will be chosen from
+ \a fileName's suffix.
\sa {QPixmap#Reading and Writing Image Files}{Reading and Writing
Image Files}
@@ -1233,8 +1238,12 @@ QPixmap QPixmap::transformed(const QTransform &transform,
return data->transformed(transform, mode);
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\overload
+ \obsolete
+
+ Use transformed(const QTransform &transform, Qt::TransformationMode mode)() instead.
This convenience function loads the \a matrix into a
QTransform and calls the overloaded function.
@@ -1243,6 +1252,7 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
{
return transformed(QTransform(matrix), mode);
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
@@ -1455,7 +1465,7 @@ int QPixmap::metric(PaintDeviceMetric metric) const
*/
QPaintEngine *QPixmap::paintEngine() const
{
- return data ? data->paintEngine() : 0;
+ return data ? data->paintEngine() : nullptr;
}
/*!
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index 8c1395857e..e47a9fe59e 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -129,8 +129,12 @@ public:
Qt::TransformationMode mode = Qt::FastTransformation) const;
QPixmap scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const;
QPixmap scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use transformed(const QTransform &, Qt::TransformationMode mode)")
QPixmap transformed(const QMatrix &, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ QT_DEPRECATED_X("Use trueMatrix(const QTransform &m, int w, int h)")
static QMatrix trueMatrix(const QMatrix &m, int w, int h);
+#endif // QT_DEPRECATED_SINCE(5, 15)
QPixmap transformed(const QTransform &, Qt::TransformationMode mode = Qt::FastTransformation) const;
static QTransform trueMatrix(const QTransform &m, int w, int h);
@@ -227,7 +231,10 @@ inline bool QPixmap::loadFromData(const QByteArray &buf, const char *format,
#if QT_DEPRECATED_SINCE(5, 0)
inline QPixmap QPixmap::alphaChannel() const
{
+ QT_WARNING_PUSH
+ QT_WARNING_DISABLE_DEPRECATED
return QPixmap::fromImage(toImage().alphaChannel());
+ QT_WARNING_POP
}
inline void QPixmap::setAlphaChannel(const QPixmap &p)
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp
index 649a25250c..aeed1e3b34 100644
--- a/src/gui/image/qpixmap_blitter.cpp
+++ b/src/gui/image/qpixmap_blitter.cpp
@@ -92,8 +92,8 @@ void QBlittablePlatformPixmap::setBlittable(QBlittable *blittable)
void QBlittablePlatformPixmap::resize(int width, int height)
{
- m_blittable.reset(0);
- m_engine.reset(0);
+ m_blittable.reset(nullptr);
+ m_engine.reset(nullptr);
d = QGuiApplication::primaryScreen()->depth();
w = width;
h = height;
@@ -145,8 +145,8 @@ void QBlittablePlatformPixmap::fill(const QColor &color)
// if we could just change the format, e.g. when going from
// RGB32 -> ARGB8888.
if (color.alpha() != 255 && !hasAlphaChannel()) {
- m_blittable.reset(0);
- m_engine.reset(0);
+ m_blittable.reset(nullptr);
+ m_engine.reset(nullptr);
m_alpha = true;
}
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 483d6d79a2..9709df9e0c 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -126,7 +126,7 @@ static inline bool qt_pixmapcache_thread_test()
/*!
Constructs an empty Key object.
*/
-QPixmapCache::Key::Key() : d(0)
+QPixmapCache::Key::Key() : d(nullptr)
{
}
@@ -259,9 +259,9 @@ uint qHash(const QPixmapCache::Key &k)
}
QPMCache::QPMCache()
- : QObject(0),
+ : QObject(nullptr),
QCache<QPixmapCache::Key, QPixmapCacheEntry>(cache_limit_default),
- keyArray(0), theid(0), ps(0), keyArraySize(0), freeKey(0), t(false)
+ keyArray(nullptr), theid(0), ps(0), keyArraySize(0), freeKey(0), t(false)
{
}
QPMCache::~QPMCache()
@@ -325,7 +325,7 @@ QPixmap *QPMCache::object(const QString &key) const
QPixmapCache::Key cacheKey = cacheKeys.value(key);
if (!cacheKey.d || !cacheKey.d->isValid) {
const_cast<QPMCache *>(this)->cacheKeys.remove(key);
- return 0;
+ return nullptr;
}
QPixmap *ptr = QCache<QPixmapCache::Key, QPixmapCacheEntry>::object(cacheKey);
//We didn't find the pixmap in the cache, the key is not valid anymore
@@ -453,7 +453,7 @@ void QPMCache::releaseKey(const QPixmapCache::Key &key)
void QPMCache::clear()
{
free(keyArray);
- keyArray = 0;
+ keyArray = nullptr;
freeKey = 0;
keyArraySize = 0;
//Mark all keys as invalid
@@ -539,7 +539,7 @@ bool QPixmapCache::find(const QString &key, QPixmap *pixmap)
QPixmap *ptr = pm_cache()->object(key);
if (ptr && pixmap)
*pixmap = *ptr;
- return ptr != 0;
+ return ptr != nullptr;
}
/*!
@@ -561,7 +561,7 @@ bool QPixmapCache::find(const Key &key, QPixmap *pixmap)
QPixmap *ptr = pm_cache()->object(key);
if (ptr && pixmap)
*pixmap = *ptr;
- return ptr != 0;
+ return ptr != nullptr;
}
/*!
diff --git a/src/gui/image/qplatformpixmap.cpp b/src/gui/image/qplatformpixmap.cpp
index a2e01147c4..493f55514e 100644
--- a/src/gui/image/qplatformpixmap.cpp
+++ b/src/gui/image/qplatformpixmap.cpp
@@ -266,7 +266,7 @@ QImage QPlatformPixmap::toImage(const QRect &rect) const
QImage* QPlatformPixmap::buffer()
{
- return 0;
+ return nullptr;
}
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 39ca7c1672..8435e5a0fe 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -109,7 +109,7 @@ public:
};
QPngHandlerPrivate(QPngHandler *qq)
- : gamma(0.0), fileGamma(0.0), quality(50), compression(50), colorSpaceState(Undefined), png_ptr(0), info_ptr(0), end_info(0), state(Ready), q(qq)
+ : gamma(0.0), fileGamma(0.0), quality(50), compression(50), colorSpaceState(Undefined), png_ptr(nullptr), info_ptr(nullptr), end_info(nullptr), state(Ready), q(qq)
{ }
float gamma;
@@ -134,18 +134,18 @@ public:
struct AllocatedMemoryPointers {
AllocatedMemoryPointers()
- : row_pointers(0), accRow(0), inRow(0), outRow(0)
+ : row_pointers(nullptr), accRow(nullptr), inRow(nullptr), outRow(nullptr)
{ }
void deallocate()
{
delete [] row_pointers;
- row_pointers = 0;
+ row_pointers = nullptr;
delete [] accRow;
- accRow = 0;
+ accRow = nullptr;
delete [] inRow;
- inRow = 0;
+ inRow = nullptr;
delete [] outRow;
- outRow = 0;
+ outRow = nullptr;
}
png_byte **row_pointers;
@@ -174,7 +174,7 @@ public:
void setGamma(float);
bool writeImage(const QImage& img, int x, int y);
- bool writeImage(const QImage& img, volatile int compression_in, const QString &description, int x, int y);
+ bool writeImage(const QImage& img, int compression_in, const QString &description, int x, int y);
bool writeImage(const QImage& img)
{ return writeImage(img, 0, 0); }
bool writeImage(const QImage& img, int compression, const QString &description)
@@ -245,13 +245,13 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, QSize scal
png_uint_32 height = 0;
int bit_depth = 0;
int color_type = 0;
- png_bytep trans_alpha = 0;
- png_color_16p trans_color_p = 0;
+ png_bytep trans_alpha = nullptr;
+ png_color_16p trans_color_p = nullptr;
int num_trans;
- png_colorp palette = 0;
+ png_colorp palette = nullptr;
int num_palette;
int interlace_method = PNG_INTERLACE_LAST;
- png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_method, 0, 0);
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_method, nullptr, nullptr);
png_set_interlace_handling(png_ptr);
if (color_type == PNG_COLOR_TYPE_GRAY) {
@@ -343,7 +343,7 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, QSize scal
if (bit_depth != 1)
png_set_packing(png_ptr);
png_read_update_info(png_ptr, info_ptr);
- png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, nullptr, nullptr, nullptr);
QImage::Format format = bit_depth == 1 ? QImage::Format_Mono : QImage::Format_Indexed8;
if (image.size() != QSize(width, height) || image.format() != format) {
image = QImage(width, height, format);
@@ -452,7 +452,7 @@ static void read_image_scaled(QImage *outImage, png_structp png_ptr, png_infop i
int bit_depth = 0;
int color_type = 0;
int unit_type = PNG_OFFSET_PIXEL;
- png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, nullptr, nullptr, nullptr);
png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, &unit_type);
uchar *data = outImage->bits();
int bpl = outImage->bytesPerLine();
@@ -478,7 +478,7 @@ static void read_image_scaled(QImage *outImage, png_structp png_ptr, png_infop i
amp.accRow[i] = rval*amp.inRow[i];
// Accumulate the next input rows
for (rval = iysz-rval; rval > 0; rval-=oysz) {
- png_read_row(png_ptr, amp.inRow, NULL);
+ png_read_row(png_ptr, amp.inRow, nullptr);
quint32 fact = qMin(oysz, quint32(rval));
for (quint32 i=0; i < ibw; i++)
amp.accRow[i] += fact*amp.inRow[i];
@@ -558,11 +558,11 @@ void QPngHandlerPrivate::readPngTexts(png_info *info)
bool QPngHandlerPrivate::readPngHeader()
{
state = Error;
- png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
+ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,nullptr,nullptr,nullptr);
if (!png_ptr)
return false;
- png_set_error_fn(png_ptr, 0, 0, qt_png_warning);
+ png_set_error_fn(png_ptr, nullptr, nullptr, qt_png_warning);
#if defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_MAXIMUM_INFLATE_WINDOW)
// Trade off a little bit of memory for better compatibility with existing images
@@ -572,21 +572,21 @@ bool QPngHandlerPrivate::readPngHeader()
info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) {
- png_destroy_read_struct(&png_ptr, 0, 0);
- png_ptr = 0;
+ png_destroy_read_struct(&png_ptr, nullptr, nullptr);
+ png_ptr = nullptr;
return false;
}
end_info = png_create_info_struct(png_ptr);
if (!end_info) {
- png_destroy_read_struct(&png_ptr, &info_ptr, 0);
- png_ptr = 0;
+ png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
+ png_ptr = nullptr;
return false;
}
if (setjmp(png_jmpbuf(png_ptr))) {
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
- png_ptr = 0;
+ png_ptr = nullptr;
return false;
}
@@ -670,7 +670,7 @@ bool QPngHandlerPrivate::readPngImage(QImage *outImage)
if (setjmp(png_jmpbuf(png_ptr))) {
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
- png_ptr = 0;
+ png_ptr = nullptr;
amp.deallocate();
state = Error;
return false;
@@ -689,7 +689,7 @@ bool QPngHandlerPrivate::readPngImage(QImage *outImage)
if (outImage->isNull()) {
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
- png_ptr = 0;
+ png_ptr = nullptr;
amp.deallocate();
state = Error;
return false;
@@ -706,7 +706,7 @@ bool QPngHandlerPrivate::readPngImage(QImage *outImage)
int bit_depth = 0;
int color_type = 0;
int unit_type = PNG_OFFSET_PIXEL;
- png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, nullptr, nullptr, nullptr);
png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, &unit_type);
uchar *data = outImage->bits();
int bpl = outImage->bytesPerLine();
@@ -747,7 +747,7 @@ bool QPngHandlerPrivate::readPngImage(QImage *outImage)
outImage->setText(readTexts.at(i), readTexts.at(i+1));
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
- png_ptr = 0;
+ png_ptr = nullptr;
amp.deallocate();
state = Ready;
@@ -767,7 +767,7 @@ QImage::Format QPngHandlerPrivate::readImageFormat()
int bit_depth = 0, color_type = 0;
png_colorp palette;
int num_palette;
- png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, nullptr, nullptr, nullptr);
if (color_type == PNG_COLOR_TYPE_GRAY) {
// Black & White or grayscale
if (bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1) {
@@ -900,7 +900,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, int off_x, int off_y)
return writeImage(image, -1, QString(), off_x, off_y);
}
-bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_in, const QString &description,
+bool QPNGImageWriter::writeImage(const QImage& image, int compression_in, const QString &description,
int off_x_in, int off_y_in)
{
QPoint offset = image.offset();
@@ -910,7 +910,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i
png_structp png_ptr;
png_infop info_ptr;
- png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,0,0,0);
+ png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,nullptr,nullptr,nullptr);
if (!png_ptr) {
return false;
}
@@ -922,7 +922,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i
info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) {
- png_destroy_write_struct(&png_ptr, 0);
+ png_destroy_write_struct(&png_ptr, nullptr);
return false;
}
@@ -1025,7 +1025,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i
png_set_PLTE(png_ptr, info_ptr, palette, num_palette);
if (num_trans) {
- png_set_tRNS(png_ptr, info_ptr, trans, num_trans, 0);
+ png_set_tRNS(png_ptr, info_ptr, trans, num_trans, nullptr);
}
}
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index cf105b250a..f9424b62bb 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -1175,7 +1175,7 @@ QXpmHandler::QXpmHandler()
bool QXpmHandler::readHeader()
{
state = Error;
- if (!read_xpm_header(device(), 0, index, buffer, &cpp, &ncols, &width, &height))
+ if (!read_xpm_header(device(), nullptr, index, buffer, &cpp, &ncols, &width, &height))
return false;
state = ReadHeader;
return true;
@@ -1191,7 +1191,7 @@ bool QXpmHandler::readImage(QImage *image)
return false;
}
- if (!read_xpm_body(device(), 0, index, buffer, cpp, ncols, width, height, *image)) {
+ if (!read_xpm_body(device(), nullptr, index, buffer, cpp, ncols, width, height, *image)) {
state = Error;
return false;
}
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index 2390c62b9f..fc9424763e 100644
--- a/src/gui/itemmodels/qstandarditemmodel.cpp
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp
@@ -130,7 +130,7 @@ void QStandardItemPrivate::setChild(int row, int column, QStandardItem *item,
}
if (item) {
- if (item->d_func()->parent == 0) {
+ if (item->d_func()->parent == nullptr) {
item->d_func()->setParentAndModel(q, model);
} else {
qWarning("QStandardItem::setChild: Ignoring duplicate insertion of item %p",
@@ -138,10 +138,19 @@ void QStandardItemPrivate::setChild(int row, int column, QStandardItem *item,
return;
}
}
+
+ // setting the model to nullptr invalidates the persistent index which we want to avoid
+ if (!item && oldItem)
+ oldItem->d_func()->setModel(nullptr);
+
+ children.replace(index, item);
+
+ // since now indexFromItem() does no longer return a valid index, the persistent index
+ // will not be invalidated anymore
if (oldItem)
- oldItem->d_func()->setModel(0);
+ oldItem->d_func()->setModel(nullptr);
delete oldItem;
- children.replace(index, item);
+
if (item)
item->d_func()->lastKnownIndex = index;
@@ -412,7 +421,7 @@ void QStandardItemPrivate::setModel(QStandardItemModel *mod)
*/
QStandardItemModelPrivate::QStandardItemModelPrivate()
: root(new QStandardItem),
- itemPrototype(0),
+ itemPrototype(nullptr),
sortRole(Qt::DisplayRole)
{
root->setFlags(Qt::ItemIsDropEnabled);
@@ -510,12 +519,12 @@ bool QStandardItemPrivate::insertRows(int row, int count, const QList<QStandardI
for (int i = 0; i < limit; ++i) {
QStandardItem *item = items.at(i);
if (item) {
- if (item->d_func()->parent == 0) {
+ if (item->d_func()->parent == nullptr) {
item->d_func()->setParentAndModel(q, model);
} else {
qWarning("QStandardItem::insertRows: Ignoring duplicate insertion of item %p",
item);
- item = 0;
+ item = nullptr;
}
}
children.replace(index, item);
@@ -555,12 +564,12 @@ bool QStandardItemPrivate::insertColumns(int column, int count, const QList<QSta
for (int i = 0; i < limit; ++i) {
QStandardItem *item = items.at(i);
if (item) {
- if (item->d_func()->parent == 0) {
+ if (item->d_func()->parent == nullptr) {
item->d_func()->setParentAndModel(q, model);
} else {
qWarning("QStandardItem::insertColumns: Ignoring duplicate insertion of item %p",
item);
- item = 0;
+ item = nullptr;
}
}
int r = i / count;
@@ -583,7 +592,7 @@ void QStandardItemModelPrivate::itemChanged(QStandardItem *item, const QVector<i
{
Q_Q(QStandardItemModel);
Q_ASSERT(item);
- if (item->d_func()->parent == 0) {
+ if (item->d_func()->parent == nullptr) {
// Header item
int idx = columnHeaderItems.indexOf(item);
if (idx != -1) {
@@ -679,7 +688,7 @@ void QStandardItemModelPrivate::rowsRemoved(QStandardItem *parent,
for (int i = row; i < row + count; ++i) {
QStandardItem *oldItem = rowHeaderItems.at(i);
if (oldItem)
- oldItem->d_func()->setModel(0);
+ oldItem->d_func()->setModel(nullptr);
delete oldItem;
}
rowHeaderItems.remove(row, count);
@@ -698,7 +707,7 @@ void QStandardItemModelPrivate::columnsRemoved(QStandardItem *parent,
for (int i = column; i < column + count; ++i) {
QStandardItem *oldItem = columnHeaderItems.at(i);
if (oldItem)
- oldItem->d_func()->setModel(0);
+ oldItem->d_func()->setModel(nullptr);
delete oldItem;
}
columnHeaderItems.remove(column, count);
@@ -870,7 +879,7 @@ QStandardItem::~QStandardItem()
Q_D(QStandardItem);
for (QStandardItem *child : qAsConst(d->children)) {
if (child)
- child->d_func()->setModel(0);
+ child->d_func()->setModel(nullptr);
delete child;
}
d->children.clear();
@@ -890,7 +899,7 @@ QStandardItem *QStandardItem::parent() const
Q_D(const QStandardItem);
if (!d->model || (d->model->d_func()->root.data() != d->parent))
return d->parent;
- return 0;
+ return nullptr;
}
/*!
@@ -917,7 +926,7 @@ void QStandardItem::setData(const QVariant &value, int role)
for (it = d->values.begin(); it != d->values.end(); ++it) {
if ((*it).role == role) {
if (value.isValid()) {
- if ((*it).value.type() == value.type() && (*it).value == value)
+ if ((*it).value.userType() == value.userType() && (*it).value == value)
return;
(*it).value = value;
} else {
@@ -1794,7 +1803,7 @@ void QStandardItem::removeRows(int row, int count)
for (int j = i; j < n+i; ++j) {
QStandardItem *oldItem = d->children.at(j);
if (oldItem)
- oldItem->d_func()->setModel(0);
+ oldItem->d_func()->setModel(nullptr);
delete oldItem;
}
d->children.remove(qMax(i, 0), n);
@@ -1821,7 +1830,7 @@ void QStandardItem::removeColumns(int column, int count)
for (int j=i; j<i+count; ++j) {
QStandardItem *oldItem = d->children.at(j);
if (oldItem)
- oldItem->d_func()->setModel(0);
+ oldItem->d_func()->setModel(nullptr);
delete oldItem;
}
d->children.remove(i, count);
@@ -1874,7 +1883,7 @@ QStandardItem *QStandardItem::child(int row, int column) const
Q_D(const QStandardItem);
int index = d->childIndex(row, column);
if (index == -1)
- return 0;
+ return nullptr;
return d->children.at(index);
}
@@ -1891,12 +1900,12 @@ QStandardItem *QStandardItem::child(int row, int column) const
QStandardItem *QStandardItem::takeChild(int row, int column)
{
Q_D(QStandardItem);
- QStandardItem *item = 0;
+ QStandardItem *item = nullptr;
int index = d->childIndex(row, column);
if (index != -1) {
item = d->children.at(index);
if (item)
- item->d_func()->setParentAndModel(0, 0);
+ item->d_func()->setParentAndModel(nullptr, nullptr);
d->children.replace(index, 0);
}
return item;
@@ -1925,7 +1934,7 @@ QList<QStandardItem*> QStandardItem::takeRow(int row)
for (int column = 0; column < col_count; ++column) {
QStandardItem *ch = d->children.at(index + column);
if (ch)
- ch->d_func()->setParentAndModel(0, 0);
+ ch->d_func()->setParentAndModel(nullptr, nullptr);
items.append(ch);
}
d->children.remove(index, col_count);
@@ -1958,7 +1967,7 @@ QList<QStandardItem*> QStandardItem::takeColumn(int column)
int index = d->childIndex(row, column);
QStandardItem *ch = d->children.at(index);
if (ch)
- ch->d_func()->setParentAndModel(0, 0);
+ ch->d_func()->setParentAndModel(nullptr, nullptr);
d->children.remove(index);
items.prepend(ch);
}
@@ -2291,13 +2300,13 @@ QStandardItem *QStandardItemModel::itemFromIndex(const QModelIndex &index) const
{
Q_D(const QStandardItemModel);
if ((index.row() < 0) || (index.column() < 0) || (index.model() != this))
- return 0;
+ return nullptr;
QStandardItem *parent = static_cast<QStandardItem*>(index.internalPointer());
- if (parent == 0)
- return 0;
+ if (parent == nullptr)
+ return nullptr;
QStandardItem *item = parent->child(index.row(), index.column());
// lazy part
- if (item == 0) {
+ if (item == nullptr) {
item = d->createItem();
parent->d_func()->setChild(index.row(), index.column(), item);
}
@@ -2432,7 +2441,7 @@ void QStandardItemModel::setHorizontalHeaderItem(int column, QStandardItem *item
return;
if (item) {
- if (item->model() == 0) {
+ if (item->model() == nullptr) {
item->d_func()->setModel(this);
} else {
qWarning("QStandardItem::setHorizontalHeaderItem: Ignoring duplicate insertion of item %p",
@@ -2442,7 +2451,7 @@ void QStandardItemModel::setHorizontalHeaderItem(int column, QStandardItem *item
}
if (oldItem)
- oldItem->d_func()->setModel(0);
+ oldItem->d_func()->setModel(nullptr);
delete oldItem;
d->columnHeaderItems.replace(column, item);
@@ -2461,7 +2470,7 @@ QStandardItem *QStandardItemModel::horizontalHeaderItem(int column) const
{
Q_D(const QStandardItemModel);
if ((column < 0) || (column >= columnCount()))
- return 0;
+ return nullptr;
return d->columnHeaderItems.at(column);
}
@@ -2488,7 +2497,7 @@ void QStandardItemModel::setVerticalHeaderItem(int row, QStandardItem *item)
return;
if (item) {
- if (item->model() == 0) {
+ if (item->model() == nullptr) {
item->d_func()->setModel(this);
} else {
qWarning("QStandardItem::setVerticalHeaderItem: Ignoring duplicate insertion of item %p",
@@ -2498,7 +2507,7 @@ void QStandardItemModel::setVerticalHeaderItem(int row, QStandardItem *item)
}
if (oldItem)
- oldItem->d_func()->setModel(0);
+ oldItem->d_func()->setModel(nullptr);
delete oldItem;
d->rowHeaderItems.replace(row, item);
@@ -2517,7 +2526,7 @@ QStandardItem *QStandardItemModel::verticalHeaderItem(int row) const
{
Q_D(const QStandardItemModel);
if ((row < 0) || (row >= rowCount()))
- return 0;
+ return nullptr;
return d->rowHeaderItems.at(row);
}
@@ -2757,10 +2766,10 @@ QStandardItem *QStandardItemModel::takeHorizontalHeaderItem(int column)
{
Q_D(QStandardItemModel);
if ((column < 0) || (column >= columnCount()))
- return 0;
+ return nullptr;
QStandardItem *headerItem = d->columnHeaderItems.at(column);
if (headerItem) {
- headerItem->d_func()->setParentAndModel(0, 0);
+ headerItem->d_func()->setParentAndModel(nullptr, nullptr);
d->columnHeaderItems.replace(column, 0);
}
return headerItem;
@@ -2779,10 +2788,10 @@ QStandardItem *QStandardItemModel::takeVerticalHeaderItem(int row)
{
Q_D(QStandardItemModel);
if ((row < 0) || (row >= rowCount()))
- return 0;
+ return nullptr;
QStandardItem *headerItem = d->rowHeaderItems.at(row);
if (headerItem) {
- headerItem->d_func()->setParentAndModel(0, 0);
+ headerItem->d_func()->setParentAndModel(nullptr, nullptr);
d->rowHeaderItems.replace(row, 0);
}
return headerItem;
@@ -2876,7 +2885,7 @@ QVariant QStandardItemModel::headerData(int section, Qt::Orientation orientation
|| ((orientation == Qt::Vertical) && (section >= rowCount()))) {
return QVariant();
}
- QStandardItem *headerItem = 0;
+ QStandardItem *headerItem = nullptr;
if (orientation == Qt::Horizontal)
headerItem = d->columnHeaderItems.at(section);
else if (orientation == Qt::Vertical)
@@ -2902,7 +2911,7 @@ QModelIndex QStandardItemModel::index(int row, int column, const QModelIndex &pa
{
Q_D(const QStandardItemModel);
QStandardItem *parentItem = d->itemFromIndex(parent);
- if ((parentItem == 0)
+ if ((parentItem == nullptr)
|| (row < 0)
|| (column < 0)
|| (row >= parentItem->rowCount())
@@ -2919,7 +2928,7 @@ bool QStandardItemModel::insertColumns(int column, int count, const QModelIndex
{
Q_D(QStandardItemModel);
QStandardItem *item = parent.isValid() ? itemFromIndex(parent) : d->root.data();
- if (item == 0)
+ if (item == nullptr)
return false;
return item->d_func()->insertColumns(column, count, QList<QStandardItem*>());
}
@@ -2931,7 +2940,7 @@ bool QStandardItemModel::insertRows(int row, int count, const QModelIndex &paren
{
Q_D(QStandardItemModel);
QStandardItem *item = parent.isValid() ? itemFromIndex(parent) : d->root.data();
- if (item == 0)
+ if (item == nullptr)
return false;
return item->d_func()->insertRows(row, count, QList<QStandardItem*>());
}
@@ -2967,7 +2976,7 @@ bool QStandardItemModel::removeColumns(int column, int count, const QModelIndex
{
Q_D(QStandardItemModel);
QStandardItem *item = d->itemFromIndex(parent);
- if ((item == 0) || (count < 1) || (column < 0) || ((column + count) > item->columnCount()))
+ if ((item == nullptr) || (count < 1) || (column < 0) || ((column + count) > item->columnCount()))
return false;
item->removeColumns(column, count);
return true;
@@ -2980,7 +2989,7 @@ bool QStandardItemModel::removeRows(int row, int count, const QModelIndex &paren
{
Q_D(QStandardItemModel);
QStandardItem *item = d->itemFromIndex(parent);
- if ((item == 0) || (count < 1) || (row < 0) || ((row + count) > item->rowCount()))
+ if ((item == nullptr) || (count < 1) || (row < 0) || ((row + count) > item->rowCount()))
return false;
item->removeRows(row, count);
return true;
@@ -3004,7 +3013,7 @@ bool QStandardItemModel::setData(const QModelIndex &index, const QVariant &value
if (!index.isValid())
return false;
QStandardItem *item = itemFromIndex(index);
- if (item == 0)
+ if (item == nullptr)
return false;
item->setData(value, role);
return true;
@@ -3047,17 +3056,17 @@ bool QStandardItemModel::setHeaderData(int section, Qt::Orientation orientation,
|| ((orientation == Qt::Vertical) && (section >= rowCount()))) {
return false;
}
- QStandardItem *headerItem = 0;
+ QStandardItem *headerItem = nullptr;
if (orientation == Qt::Horizontal) {
headerItem = d->columnHeaderItems.at(section);
- if (headerItem == 0) {
+ if (headerItem == nullptr) {
headerItem = d->createItem();
headerItem->d_func()->setModel(this);
d->columnHeaderItems.replace(section, headerItem);
}
} else if (orientation == Qt::Vertical) {
headerItem = d->rowHeaderItems.at(section);
- if (headerItem == 0) {
+ if (headerItem == nullptr) {
headerItem = d->createItem();
headerItem->d_func()->setModel(this);
d->rowHeaderItems.replace(section, headerItem);
@@ -3076,7 +3085,7 @@ bool QStandardItemModel::setHeaderData(int section, Qt::Orientation orientation,
bool QStandardItemModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles)
{
QStandardItem *item = itemFromIndex(index);
- if (item == 0)
+ if (item == nullptr)
return false;
item->d_func()->setItemData(roles);
return true;
@@ -3106,7 +3115,7 @@ QMimeData *QStandardItemModel::mimeData(const QModelIndexList &indexes) const
{
QMimeData *data = QAbstractItemModel::mimeData(indexes);
if(!data)
- return 0;
+ return nullptr;
const QString format = qStandardItemModelDataListMimeType();
if (!mimeTypes().contains(format))
@@ -3124,7 +3133,7 @@ QMimeData *QStandardItemModel::mimeData(const QModelIndexList &indexes) const
stack.push(item);
} else {
qWarning("QStandardItemModel::mimeData: No item associated with invalid index");
- return 0;
+ return nullptr;
}
}
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index 267c079ad9..db22ef2486 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -461,7 +461,7 @@ void QClipboard::setPixmap(const QPixmap &pixmap, Mode mode)
const QMimeData* QClipboard::mimeData(Mode mode) const
{
QPlatformClipboard *clipboard = QGuiApplicationPrivate::platformIntegration()->clipboard();
- if (!clipboard->supportsMode(mode)) return 0;
+ if (!clipboard->supportsMode(mode)) return nullptr;
return clipboard->mimeData(mode);
}
@@ -488,7 +488,7 @@ void QClipboard::setMimeData(QMimeData* src, Mode mode)
{
QPlatformClipboard *clipboard = QGuiApplicationPrivate::platformIntegration()->clipboard();
if (!clipboard->supportsMode(mode)) {
- if (src != 0) {
+ if (src != nullptr) {
qDebug("Data set on unsupported clipboard mode. QMimeData object will be deleted.");
src->deleteLater();
}
@@ -512,7 +512,7 @@ void QClipboard::setMimeData(QMimeData* src, Mode mode)
*/
void QClipboard::clear(Mode mode)
{
- setMimeData(0, mode);
+ setMimeData(nullptr, mode);
}
/*!
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index fd912362bf..1efa28a5af 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -325,7 +325,7 @@ QDataStream &operator<<(QDataStream &s, const QCursor &c)
if (isPixmap)
s << c.pixmap();
else
- s << *c.bitmap() << *c.mask();
+ s << c.bitmap(Qt::ReturnByValue) << c.mask(Qt::ReturnByValue);
s << c.hotSpot();
}
return s;
@@ -386,7 +386,7 @@ QDataStream &operator>>(QDataStream &s, QCursor &c)
*/
QCursor::QCursor(const QPixmap &pixmap, int hotX, int hotY)
- : d(0)
+ : d(nullptr)
{
QImage img = pixmap.toImage().convertToFormat(QImage::Format_Indexed8, Qt::ThresholdDither|Qt::AvoidDither);
QBitmap bm = QBitmap::fromImage(img, Qt::ThresholdDither|Qt::AvoidDither);
@@ -442,7 +442,7 @@ QCursor::QCursor(const QPixmap &pixmap, int hotX, int hotY)
*/
QCursor::QCursor(const QBitmap &bitmap, const QBitmap &mask, int hotX, int hotY)
- : d(0)
+ : d(nullptr)
{
d = QCursorData::setBitmap(bitmap, mask, hotX, hotY, 1.0);
}
@@ -454,7 +454,7 @@ QCursor::QCursor()
{
if (!QCursorData::initialized) {
if (QCoreApplication::startingUp()) {
- d = 0;
+ d = nullptr;
return;
}
QCursorData::initialize();
@@ -472,7 +472,7 @@ QCursor::QCursor()
\sa setShape()
*/
QCursor::QCursor(Qt::CursorShape shape)
- : d(0)
+ : d(nullptr)
{
if (!QCursorData::initialized)
QCursorData::initialize();
@@ -552,7 +552,7 @@ void QCursor::setShape(Qt::CursorShape shape)
{
if (!QCursorData::initialized)
QCursorData::initialize();
- QCursorData *c = uint(shape) <= Qt::LastCursor ? qt_cursorTable[shape] : 0;
+ QCursorData *c = uint(shape) <= Qt::LastCursor ? qt_cursorTable[shape] : nullptr;
if (!c)
c = qt_cursorTable[0];
c->ref.ref();
@@ -565,7 +565,12 @@ void QCursor::setShape(Qt::CursorShape shape)
}
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
+ \deprecated
+
+ New code should use the other overload which returns QBitmap by-value.
+
Returns the cursor bitmap, or \nullptr if it is one of the
standard cursors.
*/
@@ -577,6 +582,10 @@ const QBitmap *QCursor::bitmap() const
}
/*!
+ \deprecated
+
+ New code should use the other overload which returns QBitmap by-value.
+
Returns the cursor bitmap mask, or \nullptr if it is one of the
standard cursors.
*/
@@ -587,6 +596,71 @@ const QBitmap *QCursor::mask() const
QCursorData::initialize();
return d->bmm;
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/*!
+ \since 5.15
+
+ Returns the cursor bitmap, or a null bitmap if it is one of the
+ standard cursors.
+
+ Previously, Qt provided a version of \c bitmap() which returned the bitmap
+ by-pointer. That version is now deprecated. To maintain compatibility
+ with old code, you can explicitly differentiate between the by-pointer
+ function and the by-value function:
+
+ \code
+ const QBitmap *bmpPtr = cursor->bitmap();
+ QBitmap bmpVal = cursor->bitmap(Qt::ReturnByValue);
+ \endcode
+
+ If you disable the deprecated version using the QT_DISABLE_DEPRECATED_BEFORE
+ macro, then you can omit \c Qt::ReturnByValue as shown below:
+
+ \code
+ QBitmap bmpVal = cursor->bitmap();
+ \endcode
+*/
+QBitmap QCursor::bitmap(Qt::ReturnByValueConstant) const
+{
+ if (!QCursorData::initialized)
+ QCursorData::initialize();
+ if (d->bm)
+ return *(d->bm);
+ return QBitmap();
+}
+
+/*!
+ \since 5.15
+
+ Returns the cursor bitmap mask, or a null bitmap if it is one of the
+ standard cursors.
+
+ Previously, Qt provided a version of \c mask() which returned the bitmap
+ by-pointer. That version is now deprecated. To maintain compatibility
+ with old code, you can explicitly differentiate between the by-pointer
+ function and the by-value function:
+
+ \code
+ const QBitmap *bmpPtr = cursor->mask();
+ QBitmap bmpVal = cursor->mask(Qt::ReturnByValue);
+ \endcode
+
+ If you disable the deprecated version using the QT_DISABLE_DEPRECATED_BEFORE
+ macro, then you can omit \c Qt::ReturnByValue as shown below:
+
+ \code
+ QBitmap bmpVal = cursor->mask();
+ \endcode
+*/
+QBitmap QCursor::mask(Qt::ReturnByValueConstant) const
+{
+ if (!QCursorData::initialized)
+ QCursorData::initialize();
+ if (d->bmm)
+ return *(d->bmm);
+ return QBitmap();
+}
/*!
Returns the cursor pixmap. This is only valid if the cursor is a
@@ -657,7 +731,7 @@ QCursor &QCursor::operator=(const QCursor &c)
*/
QCursor::operator QVariant() const
{
- return QVariant(QVariant::Cursor, this);
+ return QVariant(QMetaType::QCursor, this);
}
#ifndef QT_NO_DEBUG_STREAM
@@ -677,7 +751,7 @@ QCursorData *qt_cursorTable[Qt::LastCursor + 1];
bool QCursorData::initialized = false;
QCursorData::QCursorData(Qt::CursorShape s)
- : ref(1), cshape(s), bm(0), bmm(0), hx(0), hy(0)
+ : ref(1), cshape(s), bm(nullptr), bmm(nullptr), hx(0), hy(0)
{
}
@@ -697,7 +771,7 @@ void QCursorData::cleanup()
// In case someone has a static QCursor defined with this shape
if (!qt_cursorTable[shape]->ref.deref())
delete qt_cursorTable[shape];
- qt_cursorTable[shape] = 0;
+ qt_cursorTable[shape] = nullptr;
}
QCursorData::initialized = false;
}
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index 7966e35840..3ae6b98ced 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -97,8 +97,19 @@ public:
Qt::CursorShape shape() const;
void setShape(Qt::CursorShape newShape);
- const QBitmap *bitmap() const;
- const QBitmap *mask() const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value")
+ const QBitmap *bitmap() const; // ### Qt 7: Remove function
+
+ QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value")
+ const QBitmap *mask() const; // ### Qt 7: Remove function
+
+ QBitmap bitmap(Qt::ReturnByValueConstant) const;
+ QBitmap mask(Qt::ReturnByValueConstant) const;
+#else
+ QBitmap bitmap(Qt::ReturnByValueConstant = Qt::ReturnByValue) const; // ### Qt 7: Remove arg
+ QBitmap mask(Qt::ReturnByValueConstant = Qt::ReturnByValue) const; // ### Qt 7: Remove arg
+#endif // QT_DEPRECATED_SINCE(5, 15)
QPixmap pixmap() const;
QPoint hotSpot() const;
diff --git a/src/gui/kernel/qdnd.cpp b/src/gui/kernel/qdnd.cpp
index dd541af3b8..fe766c900e 100644
--- a/src/gui/kernel/qdnd.cpp
+++ b/src/gui/kernel/qdnd.cpp
@@ -48,19 +48,19 @@
QT_BEGIN_NAMESPACE
// the universe's only drag manager
-QDragManager *QDragManager::m_instance = 0;
+QDragManager *QDragManager::m_instance = nullptr;
QDragManager::QDragManager()
- : QObject(qApp), m_currentDropTarget(0),
+ : QObject(qApp), m_currentDropTarget(nullptr),
m_platformDrag(QGuiApplicationPrivate::platformIntegration()->drag()),
- m_object(0)
+ m_object(nullptr)
{
Q_ASSERT(!m_instance);
}
QDragManager::~QDragManager()
{
- m_instance = 0;
+ m_instance = nullptr;
}
QDragManager *QDragManager::self()
@@ -74,7 +74,7 @@ QObject *QDragManager::source() const
{
if (m_object)
return m_object->source();
- return 0;
+ return nullptr;
}
void QDragManager::setCurrentTarget(QObject *target, bool dropped)
@@ -111,7 +111,7 @@ Qt::DropAction QDragManager::drag(QDrag *o)
m_object = o;
- m_object->d_func()->target = 0;
+ m_object->d_func()->target = nullptr;
QGuiApplicationPrivate::instance()->notifyDragStarted(m_object.data());
const Qt::DropAction result = m_platformDrag->drag(m_object);
diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp
index 8e2f7be23e..3712eace15 100644
--- a/src/gui/kernel/qdrag.cpp
+++ b/src/gui/kernel/qdrag.cpp
@@ -112,8 +112,8 @@ QDrag::QDrag(QObject *dragSource)
{
Q_D(QDrag);
d->source = dragSource;
- d->target = 0;
- d->data = 0;
+ d->target = nullptr;
+ d->data = nullptr;
d->hotspot = QPoint(-10, -10);
d->executed_action = Qt::IgnoreAction;
d->supported_actions = Qt::IgnoreAction;
@@ -138,7 +138,7 @@ void QDrag::setMimeData(QMimeData *data)
Q_D(QDrag);
if (d->data == data)
return;
- if (d->data != 0)
+ if (d->data != nullptr)
delete d->data;
d->data = data;
}
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index de60a66517..3c6f35bb6d 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -946,7 +946,7 @@ QWheelEvent::~QWheelEvent()
\li or scrolling has ended and the distance did not change anymore (Qt::ScrollEnd).
\endlist
- \see pixelDelta()
+ \sa pixelDelta()
*/
/*!
@@ -2960,7 +2960,7 @@ QObject* QDropEvent::source() const
{
if (const QDragManager *manager = QDragManager::self())
return manager->source();
- return 0;
+ return nullptr;
}
@@ -3366,7 +3366,7 @@ QWhatsThisClickedEvent::~QWhatsThisClickedEvent()
\a action is the action that is changed, added, or removed. If \a
type is ActionAdded, the action is to be inserted before the
- action \a before. If \a before is 0, the action is appended.
+ action \a before. If \a before is \nullptr, the action is appended.
*/
QActionEvent::QActionEvent(int type, QAction *action, QAction *before)
: QEvent(static_cast<QEvent::Type>(type)), act(action), bef(before)
@@ -4325,8 +4325,8 @@ QTouchEvent::QTouchEvent(QEvent::Type eventType,
Qt::TouchPointStates touchPointStates,
const QList<QTouchEvent::TouchPoint> &touchPoints)
: QInputEvent(eventType, modifiers),
- _window(0),
- _target(0),
+ _window(nullptr),
+ _target(nullptr),
_device(device),
_touchPointStates(touchPointStates),
_touchPoints(touchPoints)
@@ -5018,7 +5018,7 @@ void QTouchEvent::TouchPoint::setFlags(InfoFlags flags)
The \a startPos is the position of a touch or mouse event that started the scrolling.
*/
QScrollPrepareEvent::QScrollPrepareEvent(const QPointF &startPos)
- : QEvent(QEvent::ScrollPrepare), m_target(0), m_startPos(startPos)
+ : QEvent(QEvent::ScrollPrepare), m_target(nullptr), m_startPos(startPos)
{
Q_UNUSED(m_target);
}
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 2b3299f745..1190bd1936 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -141,7 +141,7 @@ Qt::KeyboardModifiers QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
QPointF QGuiApplicationPrivate::lastCursorPosition(qInf(), qInf());
-QWindow *QGuiApplicationPrivate::currentMouseWindow = 0;
+QWindow *QGuiApplicationPrivate::currentMouseWindow = nullptr;
QString QGuiApplicationPrivate::styleOverride;
@@ -161,8 +161,8 @@ QPointer<QWindow> QGuiApplicationPrivate::currentDragWindow;
QVector<QGuiApplicationPrivate::TabletPointData> QGuiApplicationPrivate::tabletDevicePoints;
-QPlatformIntegration *QGuiApplicationPrivate::platform_integration = 0;
-QPlatformTheme *QGuiApplicationPrivate::platform_theme = 0;
+QPlatformIntegration *QGuiApplicationPrivate::platform_integration = nullptr;
+QPlatformTheme *QGuiApplicationPrivate::platform_theme = nullptr;
QList<QObject *> QGuiApplicationPrivate::generic_plugin_list;
@@ -177,13 +177,13 @@ enum ApplicationResourceFlags
static unsigned applicationResourceFlags = 0;
-QIcon *QGuiApplicationPrivate::app_icon = 0;
+QIcon *QGuiApplicationPrivate::app_icon = nullptr;
-QString *QGuiApplicationPrivate::platform_name = 0;
-QString *QGuiApplicationPrivate::displayName = 0;
-QString *QGuiApplicationPrivate::desktopFileName = 0;
+QString *QGuiApplicationPrivate::platform_name = nullptr;
+QString *QGuiApplicationPrivate::displayName = nullptr;
+QString *QGuiApplicationPrivate::desktopFileName = nullptr;
-QPalette *QGuiApplicationPrivate::app_pal = 0; // default application palette
+QPalette *QGuiApplicationPrivate::app_pal = nullptr; // default application palette
ulong QGuiApplicationPrivate::mousePressTime = 0;
Qt::MouseButton QGuiApplicationPrivate::mousePressButton = Qt::NoButton;
@@ -193,30 +193,30 @@ int QGuiApplicationPrivate::mousePressY = 0;
static int mouseDoubleClickDistance = -1;
static int touchDoubleTapDistance = -1;
-QWindow *QGuiApplicationPrivate::currentMousePressWindow = 0;
+QWindow *QGuiApplicationPrivate::currentMousePressWindow = nullptr;
static Qt::LayoutDirection layout_direction = Qt::LayoutDirectionAuto;
static bool force_reverse = false;
-QGuiApplicationPrivate *QGuiApplicationPrivate::self = 0;
-QTouchDevice *QGuiApplicationPrivate::m_fakeTouchDevice = 0;
+QGuiApplicationPrivate *QGuiApplicationPrivate::self = nullptr;
+QTouchDevice *QGuiApplicationPrivate::m_fakeTouchDevice = nullptr;
int QGuiApplicationPrivate::m_fakeMouseSourcePointId = 0;
#ifndef QT_NO_CLIPBOARD
-QClipboard *QGuiApplicationPrivate::qt_clipboard = 0;
+QClipboard *QGuiApplicationPrivate::qt_clipboard = nullptr;
#endif
QList<QScreen *> QGuiApplicationPrivate::screen_list;
QWindowList QGuiApplicationPrivate::window_list;
-QWindow *QGuiApplicationPrivate::focus_window = 0;
+QWindow *QGuiApplicationPrivate::focus_window = nullptr;
static QBasicMutex applicationFontMutex;
-QFont *QGuiApplicationPrivate::app_font = 0;
+QFont *QGuiApplicationPrivate::app_font = nullptr;
QStyleHints *QGuiApplicationPrivate::styleHints = nullptr;
bool QGuiApplicationPrivate::obey_desktop_settings = true;
-QInputDeviceManager *QGuiApplicationPrivate::m_inputDeviceManager = 0;
+QInputDeviceManager *QGuiApplicationPrivate::m_inputDeviceManager = nullptr;
qreal QGuiApplicationPrivate::m_maxDevicePixelRatio = 0.0;
@@ -236,21 +236,6 @@ static bool qt_detectRTLLanguage()
" and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
}
-static void initPalette()
-{
- if (!QGuiApplicationPrivate::app_pal)
- if (const QPalette *themePalette = QGuiApplicationPrivate::platformTheme()->palette())
- QGuiApplicationPrivate::app_pal = new QPalette(*themePalette);
- if (!QGuiApplicationPrivate::app_pal)
- QGuiApplicationPrivate::app_pal = new QPalette(Qt::gray);
-}
-
-static inline void clearPalette()
-{
- delete QGuiApplicationPrivate::app_pal;
- QGuiApplicationPrivate::app_pal = 0;
-}
-
static void initFontUnlocked()
{
if (!QGuiApplicationPrivate::app_font) {
@@ -266,7 +251,7 @@ static void initFontUnlocked()
static inline void clearFontUnlocked()
{
delete QGuiApplicationPrivate::app_font;
- QGuiApplicationPrivate::app_font = 0;
+ QGuiApplicationPrivate::app_font = nullptr;
}
static void initThemeHints()
@@ -607,6 +592,21 @@ static QWindowGeometrySpecification windowGeometrySpecification = Q_WINDOW_GEOME
\list
\li \c {altgr}, detect the key \c {AltGr} found on some keyboards as
Qt::GroupSwitchModifier (since Qt 5.12).
+ \li \c {darkmode=[1|2]} controls how Qt responds to the activation
+ of the \e{Dark Mode for applications} introduced in Windows 10
+ 1903 (since Qt 5.15).
+
+ A value of 1 causes Qt to switch the window borders to black
+ when \e{Dark Mode for applications} is activated and no High
+ Contrast Theme is in use. This is intended for applications
+ that implement their own theming.
+
+ A value of 2 will in addition cause the Windows Vista style to
+ be deactivated and switch to the Windows style using a
+ simplified palette in dark mode. This is currently
+ experimental pending the introduction of new style that
+ properly adapts to dark mode.
+
\li \c {dialogs=[xp|none]}, \c xp uses XP-style native dialogs and
\c none disables them.
@@ -679,19 +679,19 @@ QGuiApplication::~QGuiApplication()
Q_D(QGuiApplication);
d->eventDispatcher->closingDown();
- d->eventDispatcher = 0;
+ d->eventDispatcher = nullptr;
#ifndef QT_NO_CLIPBOARD
delete QGuiApplicationPrivate::qt_clipboard;
- QGuiApplicationPrivate::qt_clipboard = 0;
+ QGuiApplicationPrivate::qt_clipboard = nullptr;
#endif
#ifndef QT_NO_SESSIONMANAGER
delete d->session_manager;
- d->session_manager = 0;
+ d->session_manager = nullptr;
#endif //QT_NO_SESSIONMANAGER
- clearPalette();
+ QGuiApplicationPrivate::clearPalette();
QFontDatabase::removeAllApplicationFonts();
#ifndef QT_NO_CURSOR
@@ -699,15 +699,15 @@ QGuiApplication::~QGuiApplication()
#endif
delete QGuiApplicationPrivate::app_icon;
- QGuiApplicationPrivate::app_icon = 0;
+ QGuiApplicationPrivate::app_icon = nullptr;
delete QGuiApplicationPrivate::platform_name;
- QGuiApplicationPrivate::platform_name = 0;
+ QGuiApplicationPrivate::platform_name = nullptr;
delete QGuiApplicationPrivate::displayName;
- QGuiApplicationPrivate::displayName = 0;
+ QGuiApplicationPrivate::displayName = nullptr;
delete QGuiApplicationPrivate::m_inputDeviceManager;
- QGuiApplicationPrivate::m_inputDeviceManager = 0;
+ QGuiApplicationPrivate::m_inputDeviceManager = nullptr;
delete QGuiApplicationPrivate::desktopFileName;
- QGuiApplicationPrivate::desktopFileName = 0;
+ QGuiApplicationPrivate::desktopFileName = nullptr;
QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
QGuiApplicationPrivate::lastCursorPosition = {qInf(), qInf()};
@@ -725,7 +725,7 @@ QGuiApplication::~QGuiApplication()
QGuiApplicationPrivate::QGuiApplicationPrivate(int &argc, char **argv, int flags)
: QCoreApplicationPrivate(argc, argv, flags),
- inputMethod(0),
+ inputMethod(nullptr),
lastTouchType(QEvent::TouchEnd),
ownGlobalShareContext(false)
{
@@ -818,7 +818,7 @@ QWindow *QGuiApplication::modalWindow()
{
CHECK_QAPP_INSTANCE(nullptr)
if (QGuiApplicationPrivate::self->modalWindowList.isEmpty())
- return 0;
+ return nullptr;
return QGuiApplicationPrivate::self->modalWindowList.first();
}
@@ -865,7 +865,7 @@ void QGuiApplicationPrivate::showModalWindow(QWindow *modal)
self->modalWindowList.removeFirst();
QEvent e(QEvent::Leave);
QGuiApplication::sendEvent(currentMouseWindow, &e);
- currentMouseWindow = 0;
+ currentMouseWindow = nullptr;
self->modalWindowList.prepend(modal);
}
}
@@ -895,12 +895,12 @@ void QGuiApplicationPrivate::hideModalWindow(QWindow *window)
*/
bool QGuiApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWindow) const
{
- QWindow *unused = 0;
+ QWindow *unused = nullptr;
if (!blockingWindow)
blockingWindow = &unused;
if (modalWindowList.isEmpty()) {
- *blockingWindow = 0;
+ *blockingWindow = nullptr;
return false;
}
@@ -910,7 +910,7 @@ bool QGuiApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blocking
// A window is not blocked by another modal window if the two are
// the same, or if the window is a child of the modal window.
if (window == modalWindow || modalWindow->isAncestorOf(window, QWindow::IncludeTransients)) {
- *blockingWindow = 0;
+ *blockingWindow = nullptr;
return false;
}
@@ -951,7 +951,7 @@ bool QGuiApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blocking
break;
}
}
- *blockingWindow = 0;
+ *blockingWindow = nullptr;
return false;
}
@@ -990,7 +990,7 @@ QObject *QGuiApplication::focusObject()
{
if (focusWindow())
return focusWindow()->focusObject();
- return 0;
+ return nullptr;
}
/*!
@@ -1043,7 +1043,7 @@ QWindowList QGuiApplication::topLevelWindows()
QScreen *QGuiApplication::primaryScreen()
{
if (QGuiApplicationPrivate::screen_list.isEmpty())
- return 0;
+ return nullptr;
return QGuiApplicationPrivate::screen_list.at(0);
}
@@ -1061,7 +1061,9 @@ QList<QScreen *> QGuiApplication::screens()
The \a point is in relation to the virtualGeometry() of each set of virtual
siblings. If the point maps to more than one set of virtual siblings the first
- match is returned.
+ match is returned. If you wish to search only the virtual desktop siblings
+ of a known screen (for example siblings of the screen of your application
+ window \c QWidget::windowHandle()->screen()), use QScreen::virtualSiblingAt().
\since 5.10
*/
@@ -1469,7 +1471,7 @@ void QGuiApplicationPrivate::createPlatformIntegration()
}
if (j < argc) {
- argv[j] = 0;
+ argv[j] = nullptr;
argc = j;
}
@@ -1489,7 +1491,7 @@ void QGuiApplicationPrivate::createEventDispatcher()
{
Q_ASSERT(!eventDispatcher);
- if (platform_integration == 0)
+ if (platform_integration == nullptr)
createPlatformIntegration();
// The platform integration should not mess with the event dispatcher
@@ -1500,7 +1502,7 @@ void QGuiApplicationPrivate::createEventDispatcher()
void QGuiApplicationPrivate::eventDispatcherReady()
{
- if (platform_integration == 0)
+ if (platform_integration == nullptr)
createPlatformIntegration();
platform_integration->initialize();
@@ -1597,7 +1599,7 @@ void QGuiApplicationPrivate::init()
}
if (j < argc) {
- argv[j] = 0;
+ argv[j] = nullptr;
argc = j;
}
@@ -1606,10 +1608,10 @@ void QGuiApplicationPrivate::init()
if (!envPlugins.isEmpty())
pluginList += envPlugins.split(',');
- if (platform_integration == 0)
+ if (platform_integration == nullptr)
createPlatformIntegration();
- initPalette();
+ updatePalette();
QFont::initialize();
initThemeHints();
@@ -1712,22 +1714,16 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate()
#ifndef QT_NO_OPENGL
if (ownGlobalShareContext) {
delete qt_gl_global_share_context();
- qt_gl_set_global_share_context(0);
+ qt_gl_set_global_share_context(nullptr);
}
#endif
-#ifdef Q_OS_WASM
- EM_ASM(
- // unmount persistent directory as IDBFS
- // see QTBUG-70002
- FS.unmount('/home/web_user');
- );
-#endif
+
platform_integration->destroy();
delete platform_theme;
- platform_theme = 0;
+ platform_theme = nullptr;
delete platform_integration;
- platform_integration = 0;
+ platform_integration = nullptr;
window_list.clear();
screen_list.clear();
@@ -1788,7 +1784,7 @@ Qt::KeyboardModifiers QGuiApplication::keyboardModifiers()
*/
Qt::KeyboardModifiers QGuiApplication::queryKeyboardModifiers()
{
- CHECK_QAPP_INSTANCE(Qt::KeyboardModifiers(0))
+ CHECK_QAPP_INSTANCE(Qt::KeyboardModifiers{})
QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration();
return pi->queryKeyboardModifiers();
}
@@ -1818,7 +1814,7 @@ Qt::MouseButtons QGuiApplication::mouseButtons()
QPlatformNativeInterface *QGuiApplication::platformNativeInterface()
{
QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration();
- return pi ? pi->nativeInterface() : 0;
+ return pi ? pi->nativeInterface() : nullptr;
}
/*!
@@ -2169,7 +2165,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
window = currentMousePressWindow;
} else if (currentMousePressWindow) {
window = currentMousePressWindow;
- currentMousePressWindow = 0;
+ currentMousePressWindow = nullptr;
}
QPointF delta = globalPoint - globalPoint.toPoint();
localPoint = window->mapFromGlobal(globalPoint.toPoint()) + delta;
@@ -2382,7 +2378,7 @@ void QGuiApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::Le
return;
}
- currentMouseWindow = 0;
+ currentMouseWindow = nullptr;
QEvent event(QEvent::Leave);
QCoreApplication::sendSpontaneousEvent(e->leave.data(), &event);
@@ -2401,7 +2397,7 @@ void QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate
if (platformWindow->isAlertState())
platformWindow->setAlertState(false);
- QObject *previousFocusObject = previous ? previous->focusObject() : 0;
+ QObject *previousFocusObject = previous ? previous->focusObject() : nullptr;
if (previous) {
QFocusEvent focusAboutToChange(QEvent::FocusAboutToChange);
@@ -2470,7 +2466,7 @@ void QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterf
if (QScreen *screen = wse->screen.data())
topLevelWindow->d_func()->setTopLevelScreen(screen, false /* recreate */);
else // Fall back to default behavior, and try to find some appropriate screen
- topLevelWindow->setScreen(0);
+ topLevelWindow->setScreen(nullptr);
}
// we may have changed scaling, so trigger resize event if needed
if (window->handle()) {
@@ -2896,7 +2892,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
break;
}
- Q_ASSERT(w.data() != 0);
+ Q_ASSERT(w.data() != nullptr);
// make the *scene* functions return the same as the *screen* functions
// Note: touchPoint is a reference to the one from activeTouchPoints,
@@ -3272,12 +3268,12 @@ QPlatformDropQtResponse QGuiApplicationPrivate::processDrop(QWindow *w, const QM
*/
QClipboard * QGuiApplication::clipboard()
{
- if (QGuiApplicationPrivate::qt_clipboard == 0) {
+ if (QGuiApplicationPrivate::qt_clipboard == nullptr) {
if (!qApp) {
qWarning("QGuiApplication: Must construct a QGuiApplication before accessing a QClipboard");
- return 0;
+ return nullptr;
}
- QGuiApplicationPrivate::qt_clipboard = new QClipboard(0);
+ QGuiApplicationPrivate::qt_clipboard = new QClipboard(nullptr);
}
return QGuiApplicationPrivate::qt_clipboard;
}
@@ -3293,46 +3289,97 @@ QClipboard * QGuiApplication::clipboard()
*/
/*!
- Returns the default application palette.
+ Returns the current application palette.
+
+ Roles that have not been explicitly set will reflect the system's platform theme.
\sa setPalette()
*/
QPalette QGuiApplication::palette()
{
- initPalette();
+ if (!QGuiApplicationPrivate::app_pal)
+ QGuiApplicationPrivate::updatePalette();
+
return *QGuiApplicationPrivate::app_pal;
}
+void QGuiApplicationPrivate::updatePalette()
+{
+ if (app_pal) {
+ if (setPalette(*app_pal) && qGuiApp)
+ qGuiApp->d_func()->handlePaletteChanged();
+ } else {
+ setPalette(QPalette());
+ }
+}
+
+void QGuiApplicationPrivate::clearPalette()
+{
+ delete app_pal;
+ app_pal = nullptr;
+}
+
/*!
- Changes the default application palette to \a pal.
+ Changes the application palette to \a pal.
+
+ The color roles from this palette are combined with the system's platform
+ theme to form the application's final palette.
\sa palette()
*/
void QGuiApplication::setPalette(const QPalette &pal)
{
- if (!QGuiApplicationPrivate::setPalette(pal))
- return;
-
- QCoreApplication::setAttribute(Qt::AA_SetPalette);
-
- if (qGuiApp)
- qGuiApp->d_func()->sendApplicationPaletteChange();
+ if (QGuiApplicationPrivate::setPalette(pal) && qGuiApp)
+ qGuiApp->d_func()->handlePaletteChanged();
}
bool QGuiApplicationPrivate::setPalette(const QPalette &palette)
{
- if (app_pal && palette.isCopyOf(*app_pal))
+ // Resolve the palette against the theme palette, filling in
+ // any missing roles, while keeping the original resolve mask.
+ QPalette basePalette = qGuiApp ? qGuiApp->d_func()->basePalette() : Qt::gray;
+ basePalette.resolve(0); // The base palette only contributes missing colors roles
+ QPalette resolvedPalette = palette.resolve(basePalette);
+
+ if (app_pal && resolvedPalette == *app_pal && resolvedPalette.resolve() == app_pal->resolve())
return false;
if (!app_pal)
- app_pal = new QPalette(palette);
+ app_pal = new QPalette(resolvedPalette);
else
- *app_pal = palette;
+ *app_pal = resolvedPalette;
+
+ QCoreApplication::setAttribute(Qt::AA_SetPalette, app_pal->resolve() != 0);
return true;
}
+/*
+ Returns the base palette used to fill in missing roles in
+ the current application palette.
+
+ Normally this is the theme palette, but QApplication
+ overrides this for compatibility reasons.
+*/
+QPalette QGuiApplicationPrivate::basePalette() const
+{
+ return platformTheme() ? *platformTheme()->palette() : Qt::gray;
+}
+
+void QGuiApplicationPrivate::handlePaletteChanged(const char *className)
+{
+ if (!className) {
+ Q_ASSERT(app_pal);
+ emit qGuiApp->paletteChanged(*QGuiApplicationPrivate::app_pal);
+ }
+
+ if (is_app_running && !is_app_closing) {
+ QEvent event(QEvent::ApplicationPaletteChange);
+ QGuiApplication::sendEvent(qGuiApp, &event);
+ }
+}
+
void QGuiApplicationPrivate::applyWindowGeometrySpecificationTo(QWindow *window)
{
windowGeometrySpecification.applyTo(window);
@@ -3908,7 +3955,7 @@ Qt::LayoutDirection QGuiApplication::layoutDirection()
QCursor *QGuiApplication::overrideCursor()
{
CHECK_QAPP_INSTANCE(nullptr)
- return qGuiApp->d_func()->cursor_list.isEmpty() ? 0 : &qGuiApp->d_func()->cursor_list.first();
+ return qGuiApp->d_func()->cursor_list.isEmpty() ? nullptr : &qGuiApp->d_func()->cursor_list.first();
}
/*!
@@ -3942,7 +3989,7 @@ static inline void unsetCursor(QWindow *w)
{
if (const QScreen *screen = w->screen())
if (QPlatformCursor *cursor = screen->handle()->cursor())
- cursor->changeCursor(0, w);
+ cursor->changeCursor(nullptr, w);
}
static inline void applyCursor(const QList<QWindow *> &l, const QCursor &c)
@@ -4131,11 +4178,8 @@ QPixmap QGuiApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
void QGuiApplicationPrivate::notifyThemeChanged()
{
- if (!testAttribute(Qt::AA_SetPalette)) {
- clearPalette();
- initPalette();
- sendApplicationPaletteChange();
- }
+ updatePalette();
+
if (!(applicationResourceFlags & ApplicationFontExplicitlySet)) {
const auto locker = qt_scoped_lock(applicationFontMutex);
clearFontUnlocked();
@@ -4144,20 +4188,6 @@ void QGuiApplicationPrivate::notifyThemeChanged()
initThemeHints();
}
-void QGuiApplicationPrivate::sendApplicationPaletteChange(bool toAllWidgets, const char *className)
-{
- Q_UNUSED(toAllWidgets)
-
- if (!className)
- emit qGuiApp->paletteChanged(*QGuiApplicationPrivate::app_pal);
-
- if (!is_app_running || is_app_closing)
- return;
-
- QEvent event(QEvent::ApplicationPaletteChange);
- QGuiApplication::sendEvent(QGuiApplication::instance(), &event);
-}
-
#if QT_CONFIG(draganddrop)
void QGuiApplicationPrivate::notifyDragStarted(const QDrag *drag)
{
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 7454bba0e5..5239b58c97 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -116,7 +116,7 @@ public:
static QAbstractEventDispatcher *qt_qpa_core_dispatcher()
{
if (QCoreApplication::instance())
- return QCoreApplication::instance()->d_func()->threadData->eventDispatcher.loadRelaxed();
+ return QCoreApplication::instance()->d_func()->threadData.loadRelaxed()->eventDispatcher.loadRelaxed();
else
return nullptr;
}
@@ -323,17 +323,22 @@ public:
static void resetCachedDevicePixelRatio();
- static bool setPalette(const QPalette &palette);
-
protected:
virtual void notifyThemeChanged();
- virtual void sendApplicationPaletteChange(bool toAllWidgets = false, const char *className = nullptr);
+
+ static bool setPalette(const QPalette &palette);
+ virtual QPalette basePalette() const;
+ virtual void handlePaletteChanged(const char *className = nullptr);
+
bool tryCloseRemainingWindows(QWindowList processedWindows);
#if QT_CONFIG(draganddrop)
virtual void notifyDragStarted(const QDrag *);
#endif // QT_CONFIG(draganddrop)
private:
+ static void clearPalette();
+ static void updatePalette();
+
friend class QDragManager;
static QGuiApplicationPrivate *self;
diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp
index edca8d9423..c9c45ba815 100644
--- a/src/gui/kernel/qguivariant.cpp
+++ b/src/gui/kernel/qguivariant.cpp
@@ -41,12 +41,12 @@
#include "qbitmap.h"
#include "qbrush.h"
#include "qcolor.h"
+#include "qcolorspace.h"
#include "qcursor.h"
#include "qfont.h"
#include "qimage.h"
#include "qkeysequence.h"
#include "qtransform.h"
-#include "qmatrix.h"
#include "qpalette.h"
#include "qpen.h"
#include "qpixmap.h"
@@ -103,13 +103,13 @@ static void construct(QVariant::Private *x, const void *copy)
{
const int type = x->type;
QVariantConstructor<GuiTypesFilter> constructor(x, copy);
- QMetaTypeSwitcher::switcher<void>(constructor, type, 0);
+ QMetaTypeSwitcher::switcher<void>(constructor, type, nullptr);
}
static void clear(QVariant::Private *d)
{
QVariantDestructor<GuiTypesFilter> destructor(d);
- QMetaTypeSwitcher::switcher<void>(destructor, d->type, 0);
+ QMetaTypeSwitcher::switcher<void>(destructor, d->type, nullptr);
}
// This class is a hack that customizes access to QPolygon and QPolygonF
@@ -129,7 +129,7 @@ public:
static bool isNull(const QVariant::Private *d)
{
QGuiVariantIsNull<GuiTypesFilter> isNull(d);
- return QMetaTypeSwitcher::switcher<bool>(isNull, d->type, 0);
+ return QMetaTypeSwitcher::switcher<bool>(isNull, d->type, nullptr);
}
// This class is a hack that customizes access to QPixmap, QBitmap, QCursor and QIcon
@@ -171,32 +171,32 @@ public:
static bool compare(const QVariant::Private *a, const QVariant::Private *b)
{
QGuiVariantComparator<GuiTypesFilter> comparator(a, b);
- return QMetaTypeSwitcher::switcher<bool>(comparator, a->type, 0);
+ return QMetaTypeSwitcher::switcher<bool>(comparator, a->type, nullptr);
}
static bool convert(const QVariant::Private *d, int t,
void *result, bool *ok)
{
switch (t) {
- case QVariant::ByteArray:
- if (d->type == QVariant::Color) {
+ case QMetaType::QByteArray:
+ if (d->type == QMetaType::QColor) {
const QColor *c = v_cast<QColor>(d);
*static_cast<QByteArray *>(result) = c->name(c->alpha() != 255 ? QColor::HexArgb : QColor::HexRgb).toLatin1();
return true;
}
break;
- case QVariant::String: {
+ case QMetaType::QString: {
QString *str = static_cast<QString *>(result);
switch (d->type) {
#ifndef QT_NO_SHORTCUT
- case QVariant::KeySequence:
+ case QMetaType::QKeySequence:
*str = (*v_cast<QKeySequence>(d)).toString(QKeySequence::NativeText);
return true;
#endif
- case QVariant::Font:
+ case QMetaType::QFont:
*str = v_cast<QFont>(d)->toString();
return true;
- case QVariant::Color: {
+ case QMetaType::QColor: {
const QColor *c = v_cast<QColor>(d);
*str = c->name(c->alpha() != 255 ? QColor::HexArgb : QColor::HexRgb);
return true;
@@ -206,85 +206,85 @@ static bool convert(const QVariant::Private *d, int t,
}
break;
}
- case QVariant::Pixmap:
- if (d->type == QVariant::Image) {
+ case QMetaType::QPixmap:
+ if (d->type == QMetaType::QImage) {
*static_cast<QPixmap *>(result) = QPixmap::fromImage(*v_cast<QImage>(d));
return true;
- } else if (d->type == QVariant::Bitmap) {
+ } else if (d->type == QMetaType::QBitmap) {
*static_cast<QPixmap *>(result) = *v_cast<QBitmap>(d);
return true;
- } else if (d->type == QVariant::Brush) {
+ } else if (d->type == QMetaType::QBrush) {
if (v_cast<QBrush>(d)->style() == Qt::TexturePattern) {
*static_cast<QPixmap *>(result) = v_cast<QBrush>(d)->texture();
return true;
}
}
break;
- case QVariant::Image:
- if (d->type == QVariant::Pixmap) {
+ case QMetaType::QImage:
+ if (d->type == QMetaType::QPixmap) {
*static_cast<QImage *>(result) = v_cast<QPixmap>(d)->toImage();
return true;
- } else if (d->type == QVariant::Bitmap) {
+ } else if (d->type == QMetaType::QBitmap) {
*static_cast<QImage *>(result) = v_cast<QBitmap>(d)->toImage();
return true;
}
break;
- case QVariant::Bitmap:
- if (d->type == QVariant::Pixmap) {
+ case QMetaType::QBitmap:
+ if (d->type == QMetaType::QPixmap) {
*static_cast<QBitmap *>(result) = *v_cast<QPixmap>(d);
return true;
- } else if (d->type == QVariant::Image) {
+ } else if (d->type == QMetaType::QImage) {
*static_cast<QBitmap *>(result) = QBitmap::fromImage(*v_cast<QImage>(d));
return true;
}
break;
#ifndef QT_NO_SHORTCUT
- case QVariant::Int:
- if (d->type == QVariant::KeySequence) {
+ case QMetaType::Int:
+ if (d->type == QMetaType::QKeySequence) {
const QKeySequence &seq = *v_cast<QKeySequence>(d);
*static_cast<int *>(result) = seq.isEmpty() ? 0 : seq[0];
return true;
}
break;
#endif
- case QVariant::Font:
- if (d->type == QVariant::String) {
+ case QMetaType::QFont:
+ if (d->type == QMetaType::QString) {
QFont *f = static_cast<QFont *>(result);
f->fromString(*v_cast<QString>(d));
return true;
}
break;
- case QVariant::Color:
- if (d->type == QVariant::String) {
+ case QMetaType::QColor:
+ if (d->type == QMetaType::QString) {
static_cast<QColor *>(result)->setNamedColor(*v_cast<QString>(d));
return static_cast<QColor *>(result)->isValid();
- } else if (d->type == QVariant::ByteArray) {
+ } else if (d->type == QMetaType::QByteArray) {
static_cast<QColor *>(result)->setNamedColor(QLatin1String(*v_cast<QByteArray>(d)));
return true;
- } else if (d->type == QVariant::Brush) {
+ } else if (d->type == QMetaType::QBrush) {
if (v_cast<QBrush>(d)->style() == Qt::SolidPattern) {
*static_cast<QColor *>(result) = v_cast<QBrush>(d)->color();
return true;
}
}
break;
- case QVariant::Brush:
- if (d->type == QVariant::Color) {
+ case QMetaType::QBrush:
+ if (d->type == QMetaType::QColor) {
*static_cast<QBrush *>(result) = QBrush(*v_cast<QColor>(d));
return true;
- } else if (d->type == QVariant::Pixmap) {
+ } else if (d->type == QMetaType::QPixmap) {
*static_cast<QBrush *>(result) = QBrush(*v_cast<QPixmap>(d));
return true;
}
break;
#ifndef QT_NO_SHORTCUT
- case QVariant::KeySequence: {
+ case QMetaType::QKeySequence: {
QKeySequence *seq = static_cast<QKeySequence *>(result);
switch (d->type) {
- case QVariant::String:
+ case QMetaType::QString:
*seq = QKeySequence(*v_cast<QString>(d));
return true;
- case QVariant::Int:
+ case QMetaType::Int:
*seq = QKeySequence(d->data.i);
return true;
default:
@@ -294,7 +294,7 @@ static bool convert(const QVariant::Private *d, int t,
}
#endif
#ifndef QT_NO_ICON
- case QVariant::Icon: {
+ case QMetaType::QIcon: {
if (ok)
*ok = false;
return false;
@@ -311,7 +311,7 @@ static void streamDebug(QDebug dbg, const QVariant &v)
{
QVariant::Private *d = const_cast<QVariant::Private *>(&v.data_ptr());
QVariantDebugStream<GuiTypesFilter> stream(dbg, d);
- QMetaTypeSwitcher::switcher<void>(stream, d->type, 0);
+ QMetaTypeSwitcher::switcher<void>(stream, d->type, nullptr);
}
#endif
@@ -320,12 +320,12 @@ const QVariant::Handler qt_gui_variant_handler = {
clear,
isNull,
#ifndef QT_NO_DATASTREAM
- 0,
- 0,
+ nullptr,
+ nullptr,
#endif
compare,
convert,
- 0,
+ nullptr,
#if !defined(QT_NO_DEBUG_STREAM)
streamDebug
#else
diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h
index f58944a7d2..3c85481495 100644
--- a/src/gui/kernel/qhighdpiscaling_p.h
+++ b/src/gui/kernel/qhighdpiscaling_p.h
@@ -313,7 +313,7 @@ public:
static inline QPoint mapPositionToNative(const QPoint &pos, const QPlatformScreen *) { return pos; }
static inline QPoint mapPositionToGlobal(const QPoint &pos, const QPoint &windowGlobalPosition, const QWindow *window) { return pos; }
static inline QPoint mapPositionFromGlobal(const QPoint &pos, const QPoint &windowGlobalPosition, const QWindow *window) { return pos; }
- static inline QDpi logicalDpi() { return QDpi(-1,-1); }
+ static inline QDpi logicalDpi(const QScreen *screen) { return QDpi(-1,-1); }
};
namespace QHighDpi {
diff --git a/src/gui/kernel/qinternalmimedata.cpp b/src/gui/kernel/qinternalmimedata.cpp
index 8f4da1afb5..d5cdc743ee 100644
--- a/src/gui/kernel/qinternalmimedata.cpp
+++ b/src/gui/kernel/qinternalmimedata.cpp
@@ -112,22 +112,23 @@ QVariant QInternalMimeData::retrieveData(const QString &mimeType, QVariant::Type
{
QVariant data = retrieveData_sys(mimeType, type);
if (mimeType == QLatin1String("application/x-qt-image")) {
- if (data.isNull() || (data.type() == QVariant::ByteArray && data.toByteArray().isEmpty())) {
+ if (data.isNull() || (data.userType() == QMetaType::QByteArray && data.toByteArray().isEmpty())) {
// try to find an image
QStringList imageFormats = imageReadMimeFormats();
for (int i = 0; i < imageFormats.size(); ++i) {
data = retrieveData_sys(imageFormats.at(i), type);
- if (data.isNull() || (data.type() == QVariant::ByteArray && data.toByteArray().isEmpty()))
+ if (data.isNull() || (data.userType() == QMetaType::QByteArray && data.toByteArray().isEmpty()))
continue;
break;
}
}
+ int typeId = type;
// we wanted some image type, but all we got was a byte array. Convert it to an image.
- if (data.type() == QVariant::ByteArray
- && (type == QVariant::Image || type == QVariant::Pixmap || type == QVariant::Bitmap))
+ if (data.userType() == QMetaType::QByteArray
+ && (typeId == QMetaType::QImage || typeId == QMetaType::QPixmap || typeId == QMetaType::QBitmap))
data = QImage::fromData(data.toByteArray());
- } else if (mimeType == QLatin1String("application/x-color") && data.type() == QVariant::ByteArray) {
+ } else if (mimeType == QLatin1String("application/x-color") && data.userType() == QMetaType::QByteArray) {
QColor c;
QByteArray ba = data.toByteArray();
if (ba.size() == 8) {
@@ -140,7 +141,7 @@ QVariant QInternalMimeData::retrieveData(const QString &mimeType, QVariant::Type
} else {
qWarning("Qt: Invalid color format");
}
- } else if (data.type() != type && data.type() == QVariant::ByteArray) {
+ } else if (data.userType() != int(type) && data.userType() == QMetaType::QByteArray) {
// try to use mime data's internal conversion stuf.
QInternalMimeData *that = const_cast<QInternalMimeData *>(this);
that->setData(mimeType, data.toByteArray());
diff --git a/src/gui/kernel/qkeymapper.cpp b/src/gui/kernel/qkeymapper.cpp
index 4893b1d57b..274574f561 100644
--- a/src/gui/kernel/qkeymapper.cpp
+++ b/src/gui/kernel/qkeymapper.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
Constructs a new key mapper.
*/
QKeyMapper::QKeyMapper()
- : QObject(*new QKeyMapperPrivate, 0)
+ : QObject(*new QKeyMapperPrivate, nullptr)
{
}
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index e1244e1006..3a3dd42cae 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -1404,7 +1404,7 @@ QKeySequence::SequenceMatch QKeySequence::matches(const QKeySequence &seq) const
*/
QKeySequence::operator QVariant() const
{
- return QVariant(QVariant::KeySequence, this);
+ return QVariant(QMetaType::QKeySequence, this);
}
/*! \fn QKeySequence::operator int () const
diff --git a/src/gui/kernel/qoffscreensurface.cpp b/src/gui/kernel/qoffscreensurface.cpp
index 0cc11ca3bb..c74fe0b3a1 100644
--- a/src/gui/kernel/qoffscreensurface.cpp
+++ b/src/gui/kernel/qoffscreensurface.cpp
@@ -99,10 +99,10 @@ public:
QOffscreenSurfacePrivate()
: QObjectPrivate()
, surfaceType(QSurface::OpenGLSurface)
- , platformOffscreenSurface(0)
- , offscreenWindow(0)
+ , platformOffscreenSurface(nullptr)
+ , offscreenWindow(nullptr)
, requestedFormat(QSurfaceFormat::defaultFormat())
- , screen(0)
+ , screen(nullptr)
, size(1, 1)
, nativeHandle(nullptr)
{
@@ -235,11 +235,11 @@ void QOffscreenSurface::destroy()
QGuiApplication::sendEvent(this, &e);
delete d->platformOffscreenSurface;
- d->platformOffscreenSurface = 0;
+ d->platformOffscreenSurface = nullptr;
if (d->offscreenWindow) {
d->offscreenWindow->destroy();
delete d->offscreenWindow;
- d->offscreenWindow = 0;
+ d->offscreenWindow = nullptr;
}
d->nativeHandle = nullptr;
@@ -341,7 +341,7 @@ void QOffscreenSurface::setScreen(QScreen *newScreen)
if (!newScreen)
newScreen = QCoreApplication::instance() ? QGuiApplication::primaryScreen() : nullptr;
if (newScreen != d->screen) {
- const bool wasCreated = d->platformOffscreenSurface != 0 || d->offscreenWindow != 0;
+ const bool wasCreated = d->platformOffscreenSurface != nullptr || d->offscreenWindow != nullptr;
if (wasCreated)
destroy();
if (d->screen)
@@ -385,7 +385,7 @@ void QOffscreenSurface::screenDestroyed(QObject *object)
{
Q_D(QOffscreenSurface);
if (object == static_cast<QObject *>(d->screen))
- setScreen(0);
+ setScreen(nullptr);
}
/*!
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 638eb1d12f..ac5e279a79 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -223,7 +223,7 @@ class QGuiGLThreadContext
{
public:
QGuiGLThreadContext()
- : context(0)
+ : context(nullptr)
{
}
~QGuiGLThreadContext() {
@@ -234,7 +234,7 @@ public:
};
Q_GLOBAL_STATIC(QThreadStorage<QGuiGLThreadContext *>, qwindow_context_storage);
-static QOpenGLContext *global_share_context = 0;
+static QOpenGLContext *global_share_context = nullptr;
#ifndef QT_NO_DEBUG
QHash<QOpenGLContext *, bool> QOpenGLContextPrivate::makeCurrentTracker;
@@ -347,7 +347,7 @@ QOpenGLContext *QOpenGLContextPrivate::setCurrentContext(QOpenGLContext *context
if (!threadContext) {
if (!QThread::currentThread()) {
qWarning("No QTLS available. currentContext won't work");
- return 0;
+ return nullptr;
}
threadContext = new QGuiGLThreadContext;
qwindow_context_storage()->setLocalData(threadContext);
@@ -372,10 +372,10 @@ int QOpenGLContextPrivate::maxTextureSize()
GLint size;
GLint next = 64;
- funcs->glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ funcs->glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
- QOpenGLFunctions_1_0 *gl1funcs = 0;
- QOpenGLFunctions_3_2_Core *gl3funcs = 0;
+ QOpenGLFunctions_1_0 *gl1funcs = nullptr;
+ QOpenGLFunctions_3_2_Core *gl3funcs = nullptr;
if (q->format().profile() == QSurfaceFormat::CoreProfile)
gl3funcs = q->versionFunctions<QOpenGLFunctions_3_2_Core>();
@@ -398,7 +398,7 @@ int QOpenGLContextPrivate::maxTextureSize()
if (next > max_texture_size)
break;
- funcs->glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ funcs->glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
if (gl1funcs)
gl1funcs->glGetTexLevelParameteriv(proxy, 0, GL_TEXTURE_WIDTH, &next);
else
@@ -455,7 +455,7 @@ QPlatformOpenGLContext *QOpenGLContext::shareHandle() const
Q_D(const QOpenGLContext);
if (d->shareContext)
return d->shareContext->handle();
- return 0;
+ return nullptr;
}
/*!
@@ -517,8 +517,8 @@ void QOpenGLContextPrivate::_q_screenDestroyed(QObject *object)
{
Q_Q(QOpenGLContext);
if (object == static_cast<QObject *>(screen)) {
- screen = 0;
- q->setScreen(0);
+ screen = nullptr;
+ q->setScreen(nullptr);
}
}
@@ -615,7 +615,7 @@ bool QOpenGLContext::create()
d->platformGLContext->setContext(this);
d->platformGLContext->initialize();
if (!d->platformGLContext->isSharing())
- d->shareContext = 0;
+ d->shareContext = nullptr;
d->shareGroup = d->shareContext ? d->shareContext->shareGroup() : new QOpenGLContextGroup;
d->shareGroup->d_func()->addContext(this);
return isValid();
@@ -649,15 +649,15 @@ void QOpenGLContext::destroy()
doneCurrent();
if (d->shareGroup)
d->shareGroup->d_func()->removeContext(this);
- d->shareGroup = 0;
+ d->shareGroup = nullptr;
delete d->platformGLContext;
- d->platformGLContext = 0;
+ d->platformGLContext = nullptr;
delete d->functions;
- d->functions = 0;
+ d->functions = nullptr;
for (QAbstractOpenGLFunctions *func : qAsConst(d->externalVersionFunctions)) {
QAbstractOpenGLFunctionsPrivate *func_d = QAbstractOpenGLFunctionsPrivate::get(func);
- func_d->owningContext = 0;
+ func_d->owningContext = nullptr;
func_d->initialized = false;
}
d->externalVersionFunctions.clear();
@@ -665,7 +665,7 @@ void QOpenGLContext::destroy()
d->versionFunctions.clear();
delete d->textureFunctions;
- d->textureFunctions = 0;
+ d->textureFunctions = nullptr;
d->nativeHandle = QVariant();
}
@@ -823,7 +823,7 @@ QAbstractOpenGLFunctions *QOpenGLContext::versionFunctions(const QOpenGLVersionP
#ifndef QT_OPENGL_ES_2
if (isOpenGLES()) {
qWarning("versionFunctions: Not supported on OpenGL ES");
- return 0;
+ return nullptr;
}
#endif // QT_OPENGL_ES_2
@@ -838,16 +838,16 @@ QAbstractOpenGLFunctions *QOpenGLContext::versionFunctions(const QOpenGLVersionP
// Check that context is compatible with requested version
const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());
if (v < vp.version())
- return 0;
+ return nullptr;
// If this context only offers core profile functions then we can't create
// function objects for legacy or compatibility profile requests
if (((vp.hasProfiles() && vp.profile() != QSurfaceFormat::CoreProfile) || vp.isLegacyVersion())
&& f.profile() == QSurfaceFormat::CoreProfile)
- return 0;
+ return nullptr;
// Create object if suitable one not cached
- QAbstractOpenGLFunctions* funcs = 0;
+ QAbstractOpenGLFunctions* funcs = nullptr;
auto it = d->versionFunctions.constFind(vp);
if (it == d->versionFunctions.constEnd()) {
funcs = QOpenGLVersionFunctionsFactory::create(vp);
@@ -941,7 +941,7 @@ GLuint QOpenGLContext::defaultFramebufferObject() const
The latter may happen if the surface is not exposed, or the graphics
hardware is not available due to e.g. the application being suspended.
- If \a surface is 0 this is equivalent to calling doneCurrent().
+ If \a surface is \nullptr this is equivalent to calling doneCurrent().
Avoid calling this function from a different thread than the one the
QOpenGLContext instance lives in. If you wish to use QOpenGLContext from a
@@ -1022,7 +1022,7 @@ bool QOpenGLContext::makeCurrent(QSurface *surface)
|| qstrncmp(rendererString, "Adreno 6xx", 8) == 0 // Same as above but without the '(TM)'
|| qstrcmp(rendererString, "GC800 core") == 0
|| qstrcmp(rendererString, "GC1000 core") == 0
- || strstr(rendererString, "GC2000") != 0
+ || strstr(rendererString, "GC2000") != nullptr
|| qstrcmp(rendererString, "Immersion.16") == 0;
}
needsWorkaroundSet = true;
@@ -1053,9 +1053,9 @@ void QOpenGLContext::doneCurrent()
d->shareGroup->d_func()->deletePendingResources(this);
d->platformGLContext->doneCurrent();
- QOpenGLContextPrivate::setCurrentContext(0);
+ QOpenGLContextPrivate::setCurrentContext(nullptr);
- d->surface = 0;
+ d->surface = nullptr;
}
/*!
@@ -1224,8 +1224,8 @@ void QOpenGLContext::deleteQGLContext()
Q_D(QOpenGLContext);
if (d->qGLContextDeleteFunction && d->qGLContextHandle) {
d->qGLContextDeleteFunction(d->qGLContextHandle);
- d->qGLContextDeleteFunction = 0;
- d->qGLContextHandle = 0;
+ d->qGLContextDeleteFunction = nullptr;
+ d->qGLContextHandle = nullptr;
}
}
@@ -1252,7 +1252,7 @@ void *QOpenGLContext::openGLModuleHandle()
Q_ASSERT(ni);
return ni->nativeResourceForIntegration(QByteArrayLiteral("glhandle"));
#else
- return 0;
+ return nullptr;
#endif
}
@@ -1438,7 +1438,7 @@ QList<QOpenGLContext *> QOpenGLContextGroup::shares() const
QOpenGLContextGroup *QOpenGLContextGroup::currentContextGroup()
{
QOpenGLContext *current = QOpenGLContext::currentContext();
- return current ? current->shareGroup() : 0;
+ return current ? current->shareGroup() : nullptr;
}
void QOpenGLContextGroupPrivate::addContext(QOpenGLContext *ctx)
@@ -1491,7 +1491,7 @@ void QOpenGLContextGroupPrivate::cleanup()
while (it != end) {
(*it)->invalidateResource();
- (*it)->m_group = 0;
+ (*it)->m_group = nullptr;
++it;
}
diff --git a/src/gui/kernel/qopenglwindow.cpp b/src/gui/kernel/qopenglwindow.cpp
index 022a47c919..2ea8f43711 100644
--- a/src/gui/kernel/qopenglwindow.cpp
+++ b/src/gui/kernel/qopenglwindow.cpp
@@ -208,8 +208,8 @@ QOpenGLWindowPrivate::~QOpenGLWindowPrivate()
Q_Q(QOpenGLWindow);
if (q->isValid()) {
q->makeCurrent(); // this works even when the platformwindow is destroyed
- paintDevice.reset(0);
- fbo.reset(0);
+ paintDevice.reset(nullptr);
+ fbo.reset(nullptr);
blitter.destroy();
q->doneCurrent();
}
@@ -692,7 +692,7 @@ QPaintDevice *QOpenGLWindow::redirected(QPoint *) const
Q_D(const QOpenGLWindow);
if (QOpenGLContext::currentContext() == d->context.data())
return d->paintDevice.data();
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qpaintdevicewindow.cpp b/src/gui/kernel/qpaintdevicewindow.cpp
index 4521c2f62c..4f45fc5fde 100644
--- a/src/gui/kernel/qpaintdevicewindow.cpp
+++ b/src/gui/kernel/qpaintdevicewindow.cpp
@@ -219,7 +219,7 @@ QPaintDeviceWindow::QPaintDeviceWindow(QPaintDeviceWindowPrivate &dd, QWindow *p
*/
QPaintEngine *QPaintDeviceWindow::paintEngine() const
{
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 61dccd77ac..397c50f3dc 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -536,7 +536,7 @@ static void qt_palette_from_color(QPalette &pal, const QColor &button)
\sa QApplication::setPalette(), QApplication::palette()
*/
QPalette::QPalette()
- : d(0)
+ : d(nullptr)
{
data.current_group = Active;
data.resolve_mask = 0;
@@ -714,7 +714,7 @@ QPalette &QPalette::operator=(const QPalette &p)
*/
QPalette::operator QVariant() const
{
- return QVariant(QVariant::Palette, this);
+ return QVariant(QMetaType::QPalette, this);
}
/*!
diff --git a/src/gui/kernel/qplatformclipboard.cpp b/src/gui/kernel/qplatformclipboard.cpp
index ab2998b901..34c94dca3b 100644
--- a/src/gui/kernel/qplatformclipboard.cpp
+++ b/src/gui/kernel/qplatformclipboard.cpp
@@ -67,7 +67,7 @@ private:
QClipboardData::QClipboardData()
{
- src = 0;
+ src = nullptr;
}
QClipboardData::~QClipboardData()
diff --git a/src/gui/kernel/qplatformcursor.cpp b/src/gui/kernel/qplatformcursor.cpp
index aabf28a727..5a438a54a2 100644
--- a/src/gui/kernel/qplatformcursor.cpp
+++ b/src/gui/kernel/qplatformcursor.cpp
@@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE
QPlatformCursor::clearOverrideCursor().
*/
-QPlatformCursor::Capabilities QPlatformCursor::m_capabilities = 0;
+QPlatformCursor::Capabilities QPlatformCursor::m_capabilities = { };
/*!
\fn QPlatformCursor::QPlatformCursor()
@@ -128,7 +128,7 @@ void QPlatformCursor::setPos(const QPoint &pos)
qWarning("This plugin does not support QCursor::setPos()"
"; emulating movement within the application.");
}
- QWindowSystemInterface::handleMouseEvent(0, pos, pos, Qt::NoButton, Qt::NoButton, QEvent::MouseMove);
+ QWindowSystemInterface::handleMouseEvent(nullptr, pos, pos, Qt::NoButton, Qt::NoButton, QEvent::MouseMove);
}
/*!
@@ -439,7 +439,7 @@ void QPlatformCursorImage::createSystemCursor(int id)
{
if (!systemCursorTableInit) {
for (int i = 0; i <= Qt::LastCursor; i++)
- systemCursorTable[i] = 0;
+ systemCursorTable[i] = nullptr;
systemCursorTableInit = true;
}
switch (id) {
@@ -486,7 +486,7 @@ void QPlatformCursorImage::createSystemCursor(int id)
case Qt::BlankCursor:
systemCursorTable[Qt::BlankCursor] =
- new QPlatformCursorImage(0, 0, 0, 0, 0, 0);
+ new QPlatformCursorImage(nullptr, nullptr, 0, 0, 0, 0);
break;
// 20x20 cursors
@@ -556,14 +556,14 @@ void QPlatformCursorImage::createSystemCursor(int id)
void QPlatformCursorImage::set(Qt::CursorShape id)
{
- QPlatformCursorImage *cursor = 0;
+ QPlatformCursorImage *cursor = nullptr;
if (unsigned(id) <= unsigned(Qt::LastCursor)) {
if (!systemCursorTable[id])
createSystemCursor(id);
cursor = systemCursorTable[id];
}
- if (cursor == 0) {
+ if (cursor == nullptr) {
if (!systemCursorTable[Qt::ArrowCursor])
createSystemCursor(Qt::ArrowCursor);
cursor = systemCursorTable[Qt::ArrowCursor];
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index 4bee153489..15ac4acf91 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -186,7 +186,7 @@ QVariant QPlatformDialogHelper::defaultStyleHint(QPlatformDialogHelper::StyleHi
class QFontDialogOptionsPrivate : public QSharedData
{
public:
- QFontDialogOptionsPrivate() : options(0) {}
+ QFontDialogOptionsPrivate() = default;
QFontDialogOptions::FontDialogOptions options;
QString windowTitle;
@@ -328,7 +328,7 @@ Q_GLOBAL_STATIC(QColorDialogStaticData, qColorDialogStaticData)
class QColorDialogOptionsPrivate : public QSharedData
{
public:
- QColorDialogOptionsPrivate() : options(0) {}
+ QColorDialogOptionsPrivate() = default;
// Write out settings around destruction of dialogs
~QColorDialogOptionsPrivate() { qColorDialogStaticData()->writeSettings(); }
@@ -465,24 +465,16 @@ void QPlatformColorDialogHelper::setOptions(const QSharedPointer<QColorDialogOpt
class QFileDialogOptionsPrivate : public QSharedData
{
public:
- QFileDialogOptionsPrivate() : options(0),
- viewMode(QFileDialogOptions::Detail),
- fileMode(QFileDialogOptions::AnyFile),
- acceptMode(QFileDialogOptions::AcceptOpen),
- filters(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs),
- useDefaultNameFilters(true)
- {}
-
QFileDialogOptions::FileDialogOptions options;
QString windowTitle;
- QFileDialogOptions::ViewMode viewMode;
- QFileDialogOptions::FileMode fileMode;
- QFileDialogOptions::AcceptMode acceptMode;
+ QFileDialogOptions::ViewMode viewMode = QFileDialogOptions::Detail;
+ QFileDialogOptions::FileMode fileMode = QFileDialogOptions::AnyFile;
+ QFileDialogOptions::AcceptMode acceptMode = QFileDialogOptions::AcceptOpen;
QString labels[QFileDialogOptions::DialogLabelCount];
- QDir::Filters filters;
+ QDir::Filters filters = QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs;
QList<QUrl> sidebarUrls;
- bool useDefaultNameFilters;
+ bool useDefaultNameFilters = true;
QStringList nameFilters;
QStringList mimeTypeFilters;
QString defaultSuffix;
diff --git a/src/gui/kernel/qplatforminputcontextfactory.cpp b/src/gui/kernel/qplatforminputcontextfactory.cpp
index df7b95d8df..749abaf27a 100644
--- a/src/gui/kernel/qplatforminputcontextfactory.cpp
+++ b/src/gui/kernel/qplatforminputcontextfactory.cpp
@@ -85,7 +85,7 @@ QPlatformInputContext *QPlatformInputContextFactory::create(const QString& key)
#else
Q_UNUSED(key);
#endif
- return 0;
+ return nullptr;
}
QPlatformInputContext *QPlatformInputContextFactory::create()
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index b3d3db0751..63f66e6bf7 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
*/
QPlatformFontDatabase *QPlatformIntegration::fontDatabase() const
{
- static QPlatformFontDatabase *db = 0;
+ static QPlatformFontDatabase *db = nullptr;
if (!db) {
db = new QPlatformFontDatabase;
}
@@ -86,7 +86,7 @@ QPlatformFontDatabase *QPlatformIntegration::fontDatabase() const
QPlatformClipboard *QPlatformIntegration::clipboard() const
{
- static QPlatformClipboard *clipboard = 0;
+ static QPlatformClipboard *clipboard = nullptr;
if (!clipboard) {
clipboard = new QPlatformClipboard;
}
@@ -104,7 +104,7 @@ QPlatformClipboard *QPlatformIntegration::clipboard() const
*/
QPlatformDrag *QPlatformIntegration::drag() const
{
- static QSimpleDrag *drag = 0;
+ static QSimpleDrag *drag = nullptr;
if (!drag) {
drag = new QSimpleDrag;
}
@@ -114,12 +114,12 @@ QPlatformDrag *QPlatformIntegration::drag() const
QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const
{
- return 0;
+ return nullptr;
}
QPlatformServices *QPlatformIntegration::services() const
{
- return 0;
+ return nullptr;
}
/*!
@@ -303,7 +303,7 @@ QPlatformOpenGLContext *QPlatformIntegration::createPlatformOpenGLContext(QOpenG
{
Q_UNUSED(context);
qWarning("This plugin does not support createPlatformOpenGLContext!");
- return 0;
+ return nullptr;
}
#endif // QT_NO_OPENGL
@@ -315,7 +315,7 @@ QPlatformSharedGraphicsCache *QPlatformIntegration::createPlatformSharedGraphics
{
qWarning("This plugin does not support createPlatformSharedGraphicsBuffer for cacheId: %s!",
cacheId);
- return 0;
+ return nullptr;
}
/*!
@@ -325,7 +325,7 @@ QPlatformSharedGraphicsCache *QPlatformIntegration::createPlatformSharedGraphics
QPaintEngine *QPlatformIntegration::createImagePaintEngine(QPaintDevice *paintDevice) const
{
Q_UNUSED(paintDevice)
- return 0;
+ return nullptr;
}
/*!
@@ -357,7 +357,7 @@ void QPlatformIntegration::destroy()
*/
QPlatformInputContext *QPlatformIntegration::inputContext() const
{
- return 0;
+ return nullptr;
}
#ifndef QT_NO_ACCESSIBILITY
@@ -370,7 +370,7 @@ QPlatformInputContext *QPlatformIntegration::inputContext() const
*/
QPlatformAccessibility *QPlatformIntegration::accessibility() const
{
- static QPlatformAccessibility *accessibility = 0;
+ static QPlatformAccessibility *accessibility = nullptr;
if (Q_UNLIKELY(!accessibility)) {
accessibility = new QPlatformAccessibility;
}
@@ -484,7 +484,7 @@ class QPlatformTheme *QPlatformIntegration::createPlatformTheme(const QString &n
QPlatformOffscreenSurface *QPlatformIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
{
Q_UNUSED(surface)
- return 0;
+ return nullptr;
}
#ifndef QT_NO_SESSIONMANAGER
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index d9f349555a..01406958e2 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -106,7 +106,8 @@ public:
ApplicationIcon,
SwitchableWidgetComposition,
TopStackedNativeChildWindows,
- OpenGLOnRasterSurface
+ OpenGLOnRasterSurface,
+ MaximizeUsingFullscreenGeometry
};
virtual ~QPlatformIntegration() { }
diff --git a/src/gui/kernel/qplatformintegrationplugin.cpp b/src/gui/kernel/qplatformintegrationplugin.cpp
index 35e4d2797b..b100eacbb5 100644
--- a/src/gui/kernel/qplatformintegrationplugin.cpp
+++ b/src/gui/kernel/qplatformintegrationplugin.cpp
@@ -54,7 +54,7 @@ QPlatformIntegration *QPlatformIntegrationPlugin::create(const QString &key, con
{
Q_UNUSED(key)
Q_UNUSED(paramList);
- return 0;
+ return nullptr;
}
QPlatformIntegration *QPlatformIntegrationPlugin::create(const QString &key, const QStringList &paramList, int &argc, char **argv)
diff --git a/src/gui/kernel/qplatformnativeinterface.cpp b/src/gui/kernel/qplatformnativeinterface.cpp
index b24541d3ec..8c9e73fbc2 100644
--- a/src/gui/kernel/qplatformnativeinterface.cpp
+++ b/src/gui/kernel/qplatformnativeinterface.cpp
@@ -56,35 +56,35 @@ QT_BEGIN_NAMESPACE
void *QPlatformNativeInterface::nativeResourceForIntegration(const QByteArray &resource)
{
Q_UNUSED(resource);
- return 0;
+ return nullptr;
}
void *QPlatformNativeInterface::nativeResourceForScreen(const QByteArray &resource, QScreen *screen)
{
Q_UNUSED(resource);
Q_UNUSED(screen);
- return 0;
+ return nullptr;
}
void *QPlatformNativeInterface::nativeResourceForWindow(const QByteArray &resource, QWindow *window)
{
Q_UNUSED(resource);
Q_UNUSED(window);
- return 0;
+ return nullptr;
}
void *QPlatformNativeInterface::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
{
Q_UNUSED(resource);
Q_UNUSED(context);
- return 0;
+ return nullptr;
}
void * QPlatformNativeInterface::nativeResourceForBackingStore(const QByteArray &resource, QBackingStore *backingStore)
{
Q_UNUSED(resource);
Q_UNUSED(backingStore);
- return 0;
+ return nullptr;
}
#ifndef QT_NO_CURSOR
@@ -99,31 +99,31 @@ void *QPlatformNativeInterface::nativeResourceForCursor(const QByteArray &resour
QPlatformNativeInterface::NativeResourceForIntegrationFunction QPlatformNativeInterface::nativeResourceFunctionForIntegration(const QByteArray &resource)
{
Q_UNUSED(resource);
- return 0;
+ return nullptr;
}
QPlatformNativeInterface::NativeResourceForContextFunction QPlatformNativeInterface::nativeResourceFunctionForContext(const QByteArray &resource)
{
Q_UNUSED(resource);
- return 0;
+ return nullptr;
}
QPlatformNativeInterface::NativeResourceForScreenFunction QPlatformNativeInterface::nativeResourceFunctionForScreen(const QByteArray &resource)
{
Q_UNUSED(resource);
- return 0;
+ return nullptr;
}
QPlatformNativeInterface::NativeResourceForWindowFunction QPlatformNativeInterface::nativeResourceFunctionForWindow(const QByteArray &resource)
{
Q_UNUSED(resource);
- return 0;
+ return nullptr;
}
QPlatformNativeInterface::NativeResourceForBackingStoreFunction QPlatformNativeInterface::nativeResourceFunctionForBackingStore(const QByteArray &resource)
{
Q_UNUSED(resource);
- return 0;
+ return nullptr;
}
QFunctionPointer QPlatformNativeInterface::platformFunction(const QByteArray &function) const
diff --git a/src/gui/kernel/qplatformopenglcontext.cpp b/src/gui/kernel/qplatformopenglcontext.cpp
index 07b5a0dda6..839ec008aa 100644
--- a/src/gui/kernel/qplatformopenglcontext.cpp
+++ b/src/gui/kernel/qplatformopenglcontext.cpp
@@ -81,7 +81,7 @@ QT_BEGIN_NAMESPACE
class QPlatformOpenGLContextPrivate
{
public:
- QPlatformOpenGLContextPrivate() : context(0) {}
+ QPlatformOpenGLContextPrivate() : context(nullptr) {}
QOpenGLContext *context;
};
diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp
index f3213bf5ea..7c1e2158b1 100644
--- a/src/gui/kernel/qplatformscreen.cpp
+++ b/src/gui/kernel/qplatformscreen.cpp
@@ -54,7 +54,7 @@ QPlatformScreen::QPlatformScreen()
: d_ptr(new QPlatformScreenPrivate)
{
Q_D(QPlatformScreen);
- d->screen = 0;
+ d->screen = nullptr;
}
QPlatformScreen::~QPlatformScreen()
@@ -99,7 +99,7 @@ QWindow *QPlatformScreen::topLevelAt(const QPoint & pos) const
return w;
}
- return 0;
+ return nullptr;
}
/*!
@@ -310,7 +310,7 @@ QPlatformScreen * QPlatformScreen::platformScreenForWindow(const QWindow *window
// QTBUG 32681: It can happen during the transition between screens
// when one screen is disconnected that the window doesn't have a screen.
if (!window->screen())
- return 0;
+ return nullptr;
return window->screen()->handle();
}
@@ -395,7 +395,7 @@ QString QPlatformScreen::serialNumber() const
*/
QPlatformCursor *QPlatformScreen::cursor() const
{
- return 0;
+ return nullptr;
}
/*!
@@ -410,15 +410,22 @@ void QPlatformScreen::resizeMaximizedWindows()
const QRect newGeometry = deviceIndependentGeometry();
const QRect newAvailableGeometry = QHighDpi::fromNative(availableGeometry(), QHighDpiScaling::factor(this), newGeometry.topLeft());
+ const bool supportsMaximizeUsingFullscreen = QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MaximizeUsingFullscreenGeometry);
+
for (QWindow *w : windows()) {
// Skip non-platform windows, e.g., offscreen windows.
if (!w->handle())
continue;
- if (w->windowState() & Qt::WindowMaximized || w->geometry() == oldAvailableGeometry)
+ if (supportsMaximizeUsingFullscreen
+ && w->windowState() & Qt::WindowMaximized
+ && w->flags() & Qt::MaximizeUsingFullscreenGeometryHint) {
+ w->setGeometry(newGeometry);
+ } else if (w->windowState() & Qt::WindowMaximized || w->geometry() == oldAvailableGeometry) {
w->setGeometry(newAvailableGeometry);
- else if (w->windowState() & Qt::WindowFullScreen || w->geometry() == oldGeometry)
+ } else if (w->windowState() & Qt::WindowFullScreen || w->geometry() == oldGeometry) {
w->setGeometry(newGeometry);
+ }
}
}
@@ -609,4 +616,18 @@ int QPlatformScreen::preferredMode() const
return 0;
}
+QList<QPlatformScreen *> QPlatformPlaceholderScreen::virtualSiblings() const
+{
+ QList<QPlatformScreen *> siblings;
+
+ if (!m_virtualSibling)
+ return siblings;
+
+ for (QScreen *screen : QGuiApplication::screens()) {
+ if (screen->handle() && screen->handle() != this)
+ siblings << screen->handle();
+ }
+ return siblings;
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformscreen.h b/src/gui/kernel/qplatformscreen.h
index d7378aed51..0be7646032 100644
--- a/src/gui/kernel/qplatformscreen.h
+++ b/src/gui/kernel/qplatformscreen.h
@@ -105,6 +105,8 @@ public:
QPlatformScreen();
virtual ~QPlatformScreen();
+ virtual bool isPlaceholder() const { return false; }
+
virtual QPixmap grabWindow(WId window, int x, int y, int width, int height) const;
virtual QRect geometry() const = 0;
@@ -172,6 +174,27 @@ private:
friend class QScreenPrivate;
};
+// Qt doesn't currently support running with no platform screen
+// QPA plugins can use this class to create a fake screen
+class Q_GUI_EXPORT QPlatformPlaceholderScreen : public QPlatformScreen {
+public:
+ // virtualSibling can be passed in to make the placeholder a sibling with other screens during
+ // the transitioning phase when the real screen is about to be removed, or the first real screen
+ // is about to be added. This is useful because Qt will currently recreate (but now show!)
+ // windows when they are moved from one virtual desktop to another, so if the last monitor is
+ // unplugged, then plugged in again, windows will be hidden unless the placeholder belongs to
+ // the same virtual desktop as the other screens.
+ QPlatformPlaceholderScreen(bool virtualSibling = true) : m_virtualSibling(virtualSibling) {}
+ bool isPlaceholder() const override { return true; }
+ QRect geometry() const override { return QRect(); }
+ QRect availableGeometry() const override { return QRect(); }
+ int depth() const override { return 32; }
+ QImage::Format format() const override { return QImage::Format::Format_RGB32; }
+ QList<QPlatformScreen *> virtualSiblings() const override;
+private:
+ bool m_virtualSibling = true;
+};
+
QT_END_NAMESPACE
#endif // QPLATFORMSCREEN_H
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index f906f808d8..71521c0339 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -354,7 +354,7 @@ const uint QPlatformThemePrivate::numberOfKeyBindings = sizeof(QPlatformThemePri
#endif
QPlatformThemePrivate::QPlatformThemePrivate()
- : systemPalette(0)
+ : systemPalette(nullptr)
{ }
QPlatformThemePrivate::~QPlatformThemePrivate()
@@ -394,7 +394,7 @@ bool QPlatformTheme::usePlatformNativeDialog(DialogType type) const
QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(DialogType type) const
{
Q_UNUSED(type);
- return 0;
+ return nullptr;
}
const QPalette *QPlatformTheme::palette(Palette type) const
@@ -405,13 +405,13 @@ const QPalette *QPlatformTheme::palette(Palette type) const
const_cast<QPlatformTheme *>(this)->d_ptr->initializeSystemPalette();
return d->systemPalette;
}
- return 0;
+ return nullptr;
}
const QFont *QPlatformTheme::font(Font type) const
{
Q_UNUSED(type)
- return 0;
+ return nullptr;
}
QPixmap QPlatformTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) const
@@ -569,17 +569,17 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
QPlatformMenuItem *QPlatformTheme::createPlatformMenuItem() const
{
- return 0;
+ return nullptr;
}
QPlatformMenu *QPlatformTheme::createPlatformMenu() const
{
- return 0;
+ return nullptr;
}
QPlatformMenuBar *QPlatformTheme::createPlatformMenuBar() const
{
- return 0;
+ return nullptr;
}
#ifndef QT_NO_SYSTEMTRAYICON
@@ -589,7 +589,7 @@ QPlatformMenuBar *QPlatformTheme::createPlatformMenuBar() const
*/
QPlatformSystemTrayIcon *QPlatformTheme::createPlatformSystemTrayIcon() const
{
- return 0;
+ return nullptr;
}
#endif
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
index 356c4ea3ea..3185fc4541 100644
--- a/src/gui/kernel/qplatformtheme.h
+++ b/src/gui/kernel/qplatformtheme.h
@@ -309,7 +309,7 @@ public:
virtual QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const;
virtual QIcon fileIcon(const QFileInfo &fileInfo,
- QPlatformTheme::IconOptions iconOptions = nullptr) const;
+ QPlatformTheme::IconOptions iconOptions = { }) const;
virtual QIconEngine *createIconEngine(const QString &iconName) const;
#ifndef QT_NO_SHORTCUT
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index def34f272c..15d7505133 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -482,19 +482,17 @@ bool QPlatformWindow::windowEvent(QEvent *event)
}
/*!
- Reimplement this method to start a system size grip drag
- operation if the system supports it and return true to indicate
- success.
- It is called from the mouse press event handler of the size grip.
+ Reimplement this method to start a system resize operation if
+ the system supports it and return true to indicate success.
+
+ The default implementation is empty and does nothing with \a edges.
- The default implementation is empty and does nothing with \a pos
- and \a corner.
+ \since 5.15
*/
-bool QPlatformWindow::startSystemResize(const QPoint &pos, Qt::Corner corner)
+bool QPlatformWindow::startSystemResize(Qt::Edges edges)
{
- Q_UNUSED(pos)
- Q_UNUSED(corner)
+ Q_UNUSED(edges)
return false;
}
@@ -502,18 +500,13 @@ bool QPlatformWindow::startSystemResize(const QPoint &pos, Qt::Corner corner)
Reimplement this method to start a system move operation if
the system supports it and return true to indicate success.
- The \a pos is a position of MouseButtonPress event or TouchBegin
- event from a sequence of mouse events that triggered the movement.
- It must be specified in window coordinates.
-
- The default implementation is empty and does nothing with \a pos.
+ The default implementation is empty and does nothing.
- \since 5.11
+ \since 5.15
*/
-bool QPlatformWindow::startSystemMove(const QPoint &pos)
+bool QPlatformWindow::startSystemMove()
{
- Q_UNUSED(pos)
return false;
}
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index b6aeb3a86a..7b85090cc0 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -132,8 +132,8 @@ public:
virtual bool windowEvent(QEvent *event);
- virtual bool startSystemResize(const QPoint &pos, Qt::Corner corner);
- virtual bool startSystemMove(const QPoint &pos);
+ virtual bool startSystemResize(Qt::Edges edges);
+ virtual bool startSystemMove();
virtual void setFrameStrutEventsEnabled(bool enabled);
virtual bool frameStrutEventsEnabled() const;
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index ad128a88e9..fd25becbca 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE
*/
QScreen::QScreen(QPlatformScreen *screen)
- : QObject(*new QScreenPrivate(), 0)
+ : QObject(*new QScreenPrivate(), nullptr)
{
Q_D(QScreen);
d->setPlatformScreen(screen);
@@ -702,6 +702,25 @@ void QScreenPrivate::updatePrimaryOrientation()
}
/*!
+ Returns the screen at \a point within the set of \l QScreen::virtualSiblings(),
+ or \c nullptr if outside of any screen.
+
+ The \a point is in relation to the virtualGeometry() of each set of virtual
+ siblings.
+
+ \since 5.15
+*/
+QScreen *QScreen::virtualSiblingAt(const QPoint &point)
+{
+ const auto &siblings = virtualSiblings();
+ for (QScreen *sibling : siblings) {
+ if (sibling->geometry().contains(point))
+ return sibling;
+ }
+ return nullptr;
+}
+
+/*!
Creates and returns a pixmap constructed by grabbing the contents
of the given \a window restricted by QRect(\a x, \a y, \a width,
\a height).
diff --git a/src/gui/kernel/qscreen.h b/src/gui/kernel/qscreen.h
index 14392d3036..88925ab731 100644
--- a/src/gui/kernel/qscreen.h
+++ b/src/gui/kernel/qscreen.h
@@ -125,6 +125,7 @@ public:
QRect availableGeometry() const;
QList<QScreen *> virtualSiblings() const;
+ QScreen *virtualSiblingAt(const QPoint &point);
QSize virtualSize() const;
QRect virtualGeometry() const;
diff --git a/src/gui/kernel/qsessionmanager.cpp b/src/gui/kernel/qsessionmanager.cpp
index e5e9c624b2..8747e02719 100644
--- a/src/gui/kernel/qsessionmanager.cpp
+++ b/src/gui/kernel/qsessionmanager.cpp
@@ -135,7 +135,7 @@ QSessionManagerPrivate::QSessionManagerPrivate(const QString &id,
QSessionManagerPrivate::~QSessionManagerPrivate()
{
delete platformSessionManager;
- platformSessionManager = 0;
+ platformSessionManager = nullptr;
}
QSessionManager::QSessionManager(QGuiApplication *app, QString &id, QString &key)
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index 0395c1db38..a7ea20266b 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -45,6 +45,7 @@
#include "qvector.h"
#include "qcoreapplication.h"
#include <private/qkeymapper_p.h>
+#include <QtCore/qloggingcategory.h>
#include <algorithm>
@@ -52,8 +53,7 @@
QT_BEGIN_NAMESPACE
-// To enable verbose output uncomment below
-//#define DEBUG_QSHORTCUTMAP
+Q_LOGGING_CATEGORY(lcShortcutMap, "qt.gui.shortcutmap")
/* \internal
Entry data for QShortcutMap
@@ -65,11 +65,11 @@ QT_BEGIN_NAMESPACE
struct QShortcutEntry
{
QShortcutEntry()
- : keyseq(0), context(Qt::WindowShortcut), enabled(false), autorepeat(1), id(0), owner(0), contextMatcher(0)
+ : keyseq(0), context(Qt::WindowShortcut), enabled(false), autorepeat(1), id(0), owner(nullptr), contextMatcher(nullptr)
{}
QShortcutEntry(const QKeySequence &k)
- : keyseq(k), context(Qt::WindowShortcut), enabled(false), autorepeat(1), id(0), owner(0), contextMatcher(0)
+ : keyseq(k), context(Qt::WindowShortcut), enabled(false), autorepeat(1), id(0), owner(nullptr), contextMatcher(nullptr)
{}
QShortcutEntry(QObject *o, const QKeySequence &k, Qt::ShortcutContext c, int i, bool a, QShortcutMap::ContextMatcher m)
@@ -165,11 +165,9 @@ int QShortcutMap::addShortcut(QObject *owner, const QKeySequence &key, Qt::Short
QShortcutEntry newEntry(owner, key, context, --(d->currentId), true, matcher);
const auto it = std::upper_bound(d->sequences.begin(), d->sequences.end(), newEntry);
d->sequences.insert(it, newEntry); // Insert sorted
-#if defined(DEBUG_QSHORTCUTMAP)
- qDebug().nospace()
+ qCDebug(lcShortcutMap).nospace()
<< "QShortcutMap::addShortcut(" << owner << ", "
<< key << ", " << context << ") = " << d->currentId;
-#endif
return d->currentId;
}
@@ -186,7 +184,7 @@ int QShortcutMap::removeShortcut(int id, QObject *owner, const QKeySequence &key
{
Q_D(QShortcutMap);
int itemsRemoved = 0;
- bool allOwners = (owner == 0);
+ bool allOwners = (owner == nullptr);
bool allKeys = key.isEmpty();
bool allIds = id == 0;
@@ -212,11 +210,9 @@ int QShortcutMap::removeShortcut(int id, QObject *owner, const QKeySequence &key
return itemsRemoved;
--i;
}
-#if defined(DEBUG_QSHORTCUTMAP)
- qDebug().nospace()
+ qCDebug(lcShortcutMap).nospace()
<< "QShortcutMap::removeShortcut(" << id << ", " << owner << ", "
<< key << ") = " << itemsRemoved;
-#endif
return itemsRemoved;
}
@@ -232,7 +228,7 @@ int QShortcutMap::setShortcutEnabled(bool enable, int id, QObject *owner, const
{
Q_D(QShortcutMap);
int itemsChanged = 0;
- bool allOwners = (owner == 0);
+ bool allOwners = (owner == nullptr);
bool allKeys = key.isEmpty();
bool allIds = id == 0;
@@ -250,11 +246,9 @@ int QShortcutMap::setShortcutEnabled(bool enable, int id, QObject *owner, const
return itemsChanged;
--i;
}
-#if defined(DEBUG_QSHORTCUTMAP)
- qDebug().nospace()
+ qCDebug(lcShortcutMap).nospace()
<< "QShortcutMap::setShortcutEnabled(" << enable << ", " << id << ", "
<< owner << ", " << key << ") = " << itemsChanged;
-#endif
return itemsChanged;
}
@@ -270,7 +264,7 @@ int QShortcutMap::setShortcutAutoRepeat(bool on, int id, QObject *owner, const Q
{
Q_D(QShortcutMap);
int itemsChanged = 0;
- bool allOwners = (owner == 0);
+ bool allOwners = (owner == nullptr);
bool allKeys = key.isEmpty();
bool allIds = id == 0;
@@ -288,11 +282,9 @@ int QShortcutMap::setShortcutAutoRepeat(bool on, int id, QObject *owner, const Q
return itemsChanged;
--i;
}
-#if defined(DEBUG_QSHORTCUTMAP)
- qDebug().nospace()
+ qCDebug(lcShortcutMap).nospace()
<< "QShortcutMap::setShortcutAutoRepeat(" << on << ", " << id << ", "
<< owner << ", " << key << ") = " << itemsChanged;
-#endif
return itemsChanged;
}
@@ -395,9 +387,7 @@ QKeySequence::SequenceMatch QShortcutMap::nextState(QKeyEvent *e)
clearSequence(d->currentSequences);
d->currentState = result;
-#if defined(DEBUG_QSHORTCUTMAP)
- qDebug().nospace() << "QShortcutMap::nextState(" << e << ") = " << result;
-#endif
+ qCDebug(lcShortcutMap).nospace() << "QShortcutMap::nextState(" << e << ") = " << result;
return result;
}
@@ -436,9 +426,7 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifier
return QKeySequence::NoMatch;
createNewSequences(e, d->newEntries, ignoredModifiers);
-#if defined(DEBUG_QSHORTCUTMAP)
- qDebug() << "Possible shortcut key sequences:" << d->newEntries;
-#endif
+ qCDebug(lcShortcutMap) << "Possible shortcut key sequences:" << d->newEntries;
// Should never happen
if (d->newEntries == d->currentSequences) {
@@ -491,15 +479,11 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifier
// previous list. If this match is equal or better than the last match, append to the list
if (oneKSResult > result) {
okEntries.clear();
-#if defined(DEBUG_QSHORTCUTMAP)
- qDebug() << "Found better match (" << d->newEntries << "), clearing key sequence list";
-#endif
+ qCDebug(lcShortcutMap) << "Found better match (" << d->newEntries << "), clearing key sequence list";
}
if (oneKSResult && oneKSResult >= result) {
okEntries << d->newEntries.at(i);
-#if defined(DEBUG_QSHORTCUTMAP)
- qDebug() << "Added ok key sequence" << d->newEntries;
-#endif
+ qCDebug(lcShortcutMap) << "Added ok key sequence" << d->newEntries;
}
}
@@ -515,9 +499,7 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifier
}
if (result != QKeySequence::NoMatch)
d->currentSequences = okEntries;
-#if defined(DEBUG_QSHORTCUTMAP)
- qDebug() << "Returning shortcut match == " << result;
-#endif
+ qCDebug(lcShortcutMap) << "Returning shortcut match == " << result;
return QKeySequence::SequenceMatch(result);
}
@@ -540,19 +522,16 @@ 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="
+ if (lcShortcutMap().isDebugEnabled()) {
+ qCDebug(lcShortcutMap).nospace() << __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));
+ qCDebug(lcShortcutMap).nospace() << ", ";
+ qCDebug(lcShortcutMap).nospace() << QKeySequence(possibleKeys.at(i));
}
- debug << ')';
+ qCDebug(lcShortcutMap).nospace() << ')';
}
-#endif // DEBUG_QSHORTCUTMAP
int pkTotal = possibleKeys.count();
if (!pkTotal)
return;
@@ -659,18 +638,15 @@ void QShortcutMap::dispatchEvent(QKeyEvent *e)
d->prevSequence = curKey;
}
// Find next
- const QShortcutEntry *current = 0, *next = 0;
+ const QShortcutEntry *current = nullptr, *next = nullptr;
int i = 0, enabledShortcuts = 0;
-#if defined(DEBUG_QSHORTCUTMAP)
QVector<const QShortcutEntry*> ambiguousShortcuts;
-#endif
while(i < d->identicals.size()) {
current = d->identicals.at(i);
if (current->enabled || !next){
++enabledShortcuts;
-#if defined(DEBUG_QSHORTCUTMAP)
- ambiguousShortcuts.append(current);
-#endif
+ if (lcShortcutMap().isDebugEnabled())
+ ambiguousShortcuts.append(current);
if (enabledShortcuts > d->ambigCount + 1)
break;
next = current;
@@ -683,19 +659,18 @@ void QShortcutMap::dispatchEvent(QKeyEvent *e)
if (!next || (e->isAutoRepeat() && !next->autorepeat))
return;
// Dispatch next enabled
-#if defined(DEBUG_QSHORTCUTMAP)
- if (ambiguousShortcuts.size() > 1) {
- qDebug() << "The following shortcuts are about to be activated ambiguously:";
- for (const QShortcutEntry *entry : qAsConst(ambiguousShortcuts)) {
- qDebug().nospace() << "- " << entry->keyseq << " (belonging to " << entry->owner << ")";
+ if (lcShortcutMap().isDebugEnabled()) {
+ if (ambiguousShortcuts.size() > 1) {
+ qCDebug(lcShortcutMap) << "The following shortcuts are about to be activated ambiguously:";
+ for (const QShortcutEntry *entry : qAsConst(ambiguousShortcuts))
+ qCDebug(lcShortcutMap).nospace() << "- " << entry->keyseq << " (belonging to " << entry->owner << ")";
}
- }
- qDebug().nospace()
- << "QShortcutMap::dispatchEvent(): Sending QShortcutEvent(\""
- << next->keyseq.toString() << "\", " << next->id << ", "
- << (bool)(enabledShortcuts>1) << ") to object(" << next->owner << ')';
-#endif
+ qCDebug(lcShortcutMap).nospace()
+ << "QShortcutMap::dispatchEvent(): Sending QShortcutEvent(\""
+ << next->keyseq.toString() << "\", " << next->id << ", "
+ << static_cast<bool>(enabledShortcuts>1) << ") to object(" << next->owner << ')';
+ }
QShortcutEvent se(next->keyseq, next->id, enabledShortcuts>1);
QCoreApplication::sendEvent(const_cast<QObject *>(next->owner), &se);
}
diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp
index d3070a3d1a..dec3cc399d 100644
--- a/src/gui/kernel/qsimpledrag.cpp
+++ b/src/gui/kernel/qsimpledrag.cpp
@@ -76,7 +76,7 @@ static QWindow* topLevelAt(const QPoint &pos)
if (w->isVisible() && w->handle() && w->geometry().contains(pos) && !qobject_cast<QShapedPixmapWindow*>(w))
return w;
}
- return 0;
+ return nullptr;
}
/*!
@@ -393,7 +393,7 @@ void QSimpleDrag::startDrag()
static void sendDragLeave(QWindow *window)
{
- QWindowSystemInterface::handleDrag(window, nullptr, QPoint(), Qt::IgnoreAction, 0, 0);
+ QWindowSystemInterface::handleDrag(window, nullptr, QPoint(), Qt::IgnoreAction, { }, { });
}
void QSimpleDrag::cancel()
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 732ede90d0..7b3c70c51b 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -116,7 +116,7 @@ public:
\sa QGuiApplication::styleHints()
*/
QStyleHints::QStyleHints()
- : QObject(*new QStyleHintsPrivate(), 0)
+ : QObject(*new QStyleHintsPrivate(), nullptr)
{
}
diff --git a/src/gui/kernel/qsurface.cpp b/src/gui/kernel/qsurface.cpp
index 709f28d431..85c576b21c 100644
--- a/src/gui/kernel/qsurface.cpp
+++ b/src/gui/kernel/qsurface.cpp
@@ -134,7 +134,7 @@ bool QSurface::supportsOpenGL() const
Creates a surface with the given \a type.
*/
QSurface::QSurface(SurfaceClass type)
- : m_type(type), m_reserved(0)
+ : m_type(type), m_reserved(nullptr)
{
}
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp
index 238886220b..571b820409 100644
--- a/src/gui/kernel/qsurfaceformat.cpp
+++ b/src/gui/kernel/qsurfaceformat.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
class QSurfaceFormatPrivate
{
public:
- explicit QSurfaceFormatPrivate(QSurfaceFormat::FormatOptions _opts = 0)
+ explicit QSurfaceFormatPrivate(QSurfaceFormat::FormatOptions _opts = { })
: ref(1)
, opts(_opts)
, redBufferSize(-1)
diff --git a/src/gui/kernel/qtestsupport_gui.cpp b/src/gui/kernel/qtestsupport_gui.cpp
index 7aad4d8c7d..79da26f2ca 100644
--- a/src/gui/kernel/qtestsupport_gui.cpp
+++ b/src/gui/kernel/qtestsupport_gui.cpp
@@ -37,10 +37,15 @@
**
****************************************************************************/
+#include <private/qguiapplication_p.h>
+
+#include <qpa/qplatformintegration.h>
+
#include "qtestsupport_gui.h"
#include "qwindow.h"
#include <QtCore/qtestsupport_core.h>
+#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
@@ -55,6 +60,14 @@ QT_BEGIN_NAMESPACE
*/
Q_GUI_EXPORT bool QTest::qWaitForWindowActive(QWindow *window, int timeout)
{
+ if (Q_UNLIKELY(!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))) {
+ qWarning() << "qWaitForWindowActive was called on a platform that doesn't support window"
+ << "activation. This means there is an error in the test and it should either"
+ << "check for the WindowActivation platform capability before calling"
+ << "qWaitForWindowActivate, use qWaitForWindowExposed instead, or skip the test."
+ << "Falling back to qWaitForWindowExposed.";
+ return qWaitForWindowExposed(window, timeout);
+ }
return QTest::qWaitFor([&]() { return window->isActive(); }, timeout);
}
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 0a4277c118..c099ec9692 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -156,7 +156,7 @@ QT_BEGIN_NAMESPACE
\sa setScreen()
*/
QWindow::QWindow(QScreen *targetScreen)
- : QObject(*new QWindowPrivate(), 0)
+ : QObject(*new QWindowPrivate(), nullptr)
, QSurface(QSurface::Window)
{
Q_D(QWindow);
@@ -223,7 +223,7 @@ QWindow::~QWindow()
// some cases end up becoming the focus window again. Clear it again
// here as a workaround. See QTBUG-75326.
if (QGuiApplicationPrivate::focus_window == this)
- QGuiApplicationPrivate::focus_window = 0;
+ QGuiApplicationPrivate::focus_window = nullptr;
}
void QWindowPrivate::init(QScreen *targetScreen)
@@ -469,7 +469,7 @@ inline bool QWindowPrivate::windowRecreationRequired(QScreen *newScreen) const
inline void QWindowPrivate::disconnectFromScreen()
{
if (topLevelScreen)
- topLevelScreen = 0;
+ topLevelScreen = nullptr;
}
void QWindowPrivate::connectToScreen(QScreen *screen)
@@ -732,7 +732,7 @@ void QWindow::setParent(QWindow *parent)
if (parent)
parent->create();
- d->platformWindow->setParent(parent ? parent->d_func()->platformWindow : 0);
+ d->platformWindow->setParent(parent ? parent->d_func()->platformWindow : nullptr);
}
QGuiApplicationPrivate::updateBlockedStatus(this);
@@ -744,7 +744,7 @@ void QWindow::setParent(QWindow *parent)
bool QWindow::isTopLevel() const
{
Q_D(const QWindow);
- return d->parentWindow == 0;
+ return d->parentWindow == nullptr;
}
/*!
@@ -1051,6 +1051,71 @@ void QWindow::lower()
}
/*!
+ \brief Start a system-specific resize operation
+ \since 5.15
+
+ Calling this will start an interactive resize operation on the window by platforms
+ that support it. The actual behavior may vary depending on the platform. Usually,
+ it will make the window resize so that its edge follows the mouse cursor.
+
+ On platforms that support it, this method of resizing windows is preferred over
+ \c setGeometry, because it allows a more native look-and-feel of resizing windows, e.g.
+ letting the window manager snap this window against other windows, or special resizing
+ behavior with animations when dragged to the edge of the screen.
+
+ \a edges should either be a single edge, or two adjacent edges (a corner). Other values
+ are not allowed.
+
+ Returns true if the operation was supported by the system.
+*/
+bool QWindow::startSystemResize(Qt::Edges edges)
+{
+ Q_D(QWindow);
+ if (Q_UNLIKELY(!isVisible() || !d->platformWindow || d->maximumSize == d->minimumSize))
+ return false;
+
+ const bool isSingleEdge = edges == Qt::TopEdge || edges == Qt::RightEdge || edges == Qt::BottomEdge || edges == Qt::LeftEdge;
+ const bool isCorner =
+ edges == (Qt::TopEdge | Qt::LeftEdge) ||
+ edges == (Qt::TopEdge | Qt::RightEdge) ||
+ edges == (Qt::BottomEdge | Qt::RightEdge) ||
+ edges == (Qt::BottomEdge | Qt::LeftEdge);
+
+ if (Q_UNLIKELY(!isSingleEdge && !isCorner)) {
+ qWarning() << "Invalid edges" << edges << "passed to QWindow::startSystemResize, ignoring.";
+ return false;
+ }
+
+ return d->platformWindow->startSystemResize(edges);
+}
+
+/*!
+ \brief Start a system-specific move operation
+ \since 5.15
+
+ Calling this will start an interactive move operation on the window by platforms
+ that support it. The actual behavior may vary depending on the platform. Usually,
+ it will make the window follow the mouse cursor until a mouse button is released.
+
+ On platforms that support it, this method of moving windows is preferred over
+ \c setPosition, because it allows a more native look-and-feel of moving windows, e.g.
+ letting the window manager snap this window against other windows, or special tiling
+ or resizing behavior with animations when dragged to the edge of the screen.
+ Furthermore, on some platforms such as Wayland, \c setPosition is not supported, so
+ this is the only way the application can influence its position.
+
+ Returns true if the operation was supported by the system.
+*/
+bool QWindow::startSystemMove()
+{
+ Q_D(QWindow);
+ if (Q_UNLIKELY(!isVisible() || !d->platformWindow))
+ return false;
+
+ return d->platformWindow->startSystemMove();
+}
+
+/*!
\property QWindow::opacity
\brief The opacity of the window in the windowing system.
\since 5.1
@@ -1793,7 +1858,10 @@ void QWindow::setFramePosition(const QPoint &point)
The position is in relation to the virtualGeometry() of its screen.
- \sa position()
+ For interactively moving windows, see startSystemMove(). For interactively
+ resizing windows, see startSystemResize().
+
+ \sa position(), startSystemMove()
*/
void QWindow::setPosition(const QPoint &pt)
{
@@ -1830,6 +1898,8 @@ void QWindow::setPosition(int posx, int posy)
set the size of the window, excluding any window frame, to a QSize
constructed from width \a w and height \a h
+ For interactively resizing windows, see startSystemResize().
+
\sa size(), geometry()
*/
void QWindow::resize(int w, int h)
@@ -2018,7 +2088,7 @@ void QWindow::setScreen(QScreen *newScreen)
Q_D(QWindow);
if (!newScreen)
newScreen = QGuiApplication::primaryScreen();
- d->setTopLevelScreen(newScreen, newScreen != 0);
+ d->setTopLevelScreen(newScreen, newScreen != nullptr);
}
/*!
@@ -2036,7 +2106,7 @@ void QWindow::setScreen(QScreen *newScreen)
*/
QAccessibleInterface *QWindow::accessibleRoot() const
{
- return 0;
+ return nullptr;
}
/*!
@@ -2695,7 +2765,7 @@ QWindow *QWindow::fromWinId(WId id)
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ForeignWindows)) {
qWarning("QWindow::fromWinId(): platform plugin does not support foreign windows.");
- return 0;
+ return nullptr;
}
QWindow *window = new QWindow;
@@ -2769,7 +2839,7 @@ void QWindow::setCursor(const QCursor &cursor)
void QWindow::unsetCursor()
{
Q_D(QWindow);
- d->setCursor(0);
+ d->setCursor(nullptr);
}
/*!
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 5ee1d00f5b..7aae7ffffa 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -292,6 +292,8 @@ public Q_SLOTS:
bool close();
void raise();
void lower();
+ bool startSystemResize(Qt::Edges edges);
+ bool startSystemMove();
void setTitle(const QString &);
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 8457282bed..3e7d592016 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -46,7 +46,9 @@
#include <qpa/qplatformintegration.h>
#include <qdebug.h>
#include "qhighdpiscaling_p.h"
+
#include <QtCore/qscopedvaluerollback.h>
+#include <QtCore/private/qlocking_p.h>
#if QT_CONFIG(draganddrop)
#include <qpa/qplatformdrag.h>
@@ -179,7 +181,7 @@ void QWindowSystemInterfacePrivate::installWindowSystemEventHandler(QWindowSyste
void QWindowSystemInterfacePrivate::removeWindowSystemEventhandler(QWindowSystemEventHandler *handler)
{
if (eventHandler == handler)
- eventHandler = 0;
+ eventHandler = nullptr;
}
QWindowSystemEventHandler::~QWindowSystemEventHandler()
@@ -623,7 +625,7 @@ bool QWindowSystemInterface::isTouchDeviceRegistered(const QTouchDevice *device)
static int g_nextPointId = 1;
// map from device-independent point id (arbitrary) to "Qt point" ids
-QMutex QWindowSystemInterfacePrivate::pointIdMapMutex;
+static QBasicMutex pointIdMapMutex;
typedef QMap<quint64, int> PointIdMap;
Q_GLOBAL_STATIC(PointIdMap, g_pointIdMap)
@@ -641,7 +643,7 @@ Q_GLOBAL_STATIC(PointIdMap, g_pointIdMap)
*/
static int acquireCombinedPointId(quint8 deviceId, int pointId)
{
- QMutexLocker locker(&QWindowSystemInterfacePrivate::pointIdMapMutex);
+ const auto locker = qt_scoped_lock(pointIdMapMutex);
quint64 combinedId64 = (quint64(deviceId) << 32) + pointId;
auto it = g_pointIdMap->constFind(combinedId64);
@@ -702,7 +704,7 @@ QList<QTouchEvent::TouchPoint>
}
if (states == Qt::TouchPointReleased) {
- QMutexLocker locker(&QWindowSystemInterfacePrivate::pointIdMapMutex);
+ const auto locker = qt_scoped_lock(pointIdMapMutex);
// All points on deviceId have been released.
// Remove all points associated with that device from g_pointIdMap.
@@ -723,7 +725,7 @@ QList<QTouchEvent::TouchPoint>
void QWindowSystemInterfacePrivate::clearPointIdMap()
{
- QMutexLocker locker(&QWindowSystemInterfacePrivate::pointIdMapMutex);
+ const auto locker = qt_scoped_lock(pointIdMapMutex);
g_pointIdMap->clear();
g_nextPointId = 1;
}
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index 6e4bce607e..dd6f29b41f 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -529,7 +529,6 @@ public:
static QWaitCondition eventsFlushed;
static QMutex flushEventMutex;
- static QMutex pointIdMapMutex;
static QAtomicInt eventAccepted;
static QList<QTouchEvent::TouchPoint>
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index ad4cdfdbf4..cdaed788e9 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -187,7 +187,10 @@ QMatrix4x4::QMatrix4x4(const float *values, int cols, int rows)
flagBits = General;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
+ \obsolete
+
Constructs a 4x4 matrix from a conventional Qt 2D affine
transformation \a matrix.
@@ -218,6 +221,7 @@ QMatrix4x4::QMatrix4x4(const QMatrix& matrix)
m[3][3] = 1.0f;
flagBits = Translation | Scale | Rotation2D;
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
Constructs a 4x4 matrix from the conventional Qt 2D
@@ -1659,7 +1663,12 @@ void QMatrix4x4::copyDataTo(float *values) const
values[row * 4 + col] = float(m[col][row]);
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
+ \obsolete
+
+ Use toTransform() instead.
+
Returns the conventional Qt 2D affine transformation matrix that
corresponds to this matrix. It is assumed that this matrix
only contains 2D affine transformation elements.
@@ -1672,6 +1681,7 @@ QMatrix QMatrix4x4::toAffine() const
m[1][0], m[1][1],
m[3][0], m[3][1]);
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
Returns the conventional Qt 2D transformation matrix that
@@ -2007,7 +2017,7 @@ void QMatrix4x4::optimize()
*/
QMatrix4x4::operator QVariant() const
{
- return QVariant(QVariant::Matrix4x4, this);
+ return QVariant(QMetaType::QMatrix4x4, this);
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index 1439bfac59..6a726a197c 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -72,7 +72,9 @@ public:
QMatrix4x4(const float *values, int cols, int rows);
QMatrix4x4(const QTransform& transform);
+#if QT_DEPRECATED_SINCE(5, 15)
QMatrix4x4(const QMatrix& matrix);
+#endif // QT_DEPRECATED_SINCE(5, 15)
inline const float& operator()(int row, int column) const;
inline float& operator()(int row, int column);
@@ -156,7 +158,9 @@ public:
void copyDataTo(float *values) const;
- QMatrix toAffine() const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use toTransform()") QMatrix toAffine() const;
+#endif // QT_DEPRECATED_SINCE(5, 15)
QTransform toTransform() const;
QTransform toTransform(float distanceToPlane) const;
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index 899ec12eb3..5f15949c5b 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -983,7 +983,7 @@ QQuaternion QQuaternion::nlerp
*/
QQuaternion::operator QVariant() const
{
- return QVariant(QVariant::Quaternion, this);
+ return QVariant(QMetaType::QQuaternion, this);
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp
index c04f8b1cbf..5f651cf376 100644
--- a/src/gui/math3d/qvector2d.cpp
+++ b/src/gui/math3d/qvector2d.cpp
@@ -531,7 +531,7 @@ QVector4D QVector2D::toVector4D() const
*/
QVector2D::operator QVariant() const
{
- return QVariant(QVariant::Vector2D, this);
+ return QVariant(QMetaType::QVector2D, this);
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp
index 4f72c1da66..08c3de99d2 100644
--- a/src/gui/math3d/qvector3d.cpp
+++ b/src/gui/math3d/qvector3d.cpp
@@ -706,7 +706,7 @@ QVector4D QVector3D::toVector4D() const
*/
QVector3D::operator QVariant() const
{
- return QVariant(QVariant::Vector3D, this);
+ return QVariant(QMetaType::QVector3D, this);
}
/*!
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp
index 3a68bd6cb7..070ea7454e 100644
--- a/src/gui/math3d/qvector4d.cpp
+++ b/src/gui/math3d/qvector4d.cpp
@@ -608,7 +608,7 @@ QVector3D QVector4D::toVector3DAffine() const
*/
QVector4D::operator QVariant() const
{
- return QVariant(QVariant::Vector4D, this);
+ return QVariant(QMetaType::QVector4D, this);
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index 667d16317f..adca536797 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -72,7 +72,7 @@ QOpenGLExtensionMatcher::QOpenGLExtensionMatcher()
return;
}
QOpenGLFunctions *funcs = ctx->functions();
- const char *extensionStr = 0;
+ const char *extensionStr = nullptr;
if (ctx->isOpenGLES() || ctx->format().majorVersion() < 3)
extensionStr = reinterpret_cast<const char *>(funcs->glGetString(GL_EXTENSIONS));
diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp
index 537097c09f..5387cc06e3 100644
--- a/src/gui/opengl/qopenglbuffer.cpp
+++ b/src/gui/opengl/qopenglbuffer.cpp
@@ -143,10 +143,10 @@ public:
QOpenGLBufferPrivate(QOpenGLBuffer::Type t)
: ref(1),
type(t),
- guard(0),
+ guard(nullptr),
usagePattern(QOpenGLBuffer::StaticDraw),
actualUsagePattern(QOpenGLBuffer::StaticDraw),
- funcs(0)
+ funcs(nullptr)
{
}
@@ -323,10 +323,10 @@ void QOpenGLBuffer::destroy()
Q_D(QOpenGLBuffer);
if (d->guard) {
d->guard->free();
- d->guard = 0;
+ d->guard = nullptr;
}
delete d->funcs;
- d->funcs = 0;
+ d->funcs = nullptr;
}
/*!
@@ -545,9 +545,9 @@ void *QOpenGLBuffer::map(QOpenGLBuffer::Access access)
qWarning("QOpenGLBuffer::map(): buffer not created");
#endif
if (!d->guard || !d->guard->id())
- return 0;
+ return nullptr;
if (d->funcs->hasOpenGLExtension(QOpenGLExtensions::MapBufferRange)) {
- QOpenGLBuffer::RangeAccessFlags rangeAccess = 0;
+ QOpenGLBuffer::RangeAccessFlags rangeAccess;
switch (access) {
case QOpenGLBuffer::ReadOnly:
rangeAccess = QOpenGLBuffer::RangeRead;
@@ -586,7 +586,7 @@ void *QOpenGLBuffer::mapRange(int offset, int count, QOpenGLBuffer::RangeAccessF
qWarning("QOpenGLBuffer::mapRange(): buffer not created");
#endif
if (!d->guard || !d->guard->id())
- return 0;
+ return nullptr;
return d->funcs->glMapBufferRange(d->type, offset, count, access);
}
diff --git a/src/gui/opengl/qopenglcustomshaderstage.cpp b/src/gui/opengl/qopenglcustomshaderstage.cpp
index baa44f86b0..a95a0a5767 100644
--- a/src/gui/opengl/qopenglcustomshaderstage.cpp
+++ b/src/gui/opengl/qopenglcustomshaderstage.cpp
@@ -48,7 +48,7 @@ class QOpenGLCustomShaderStagePrivate
{
public:
QOpenGLCustomShaderStagePrivate() :
- m_manager(0) {}
+ m_manager(nullptr) {}
QPointer<QOpenGLEngineShaderManager> m_manager;
QByteArray m_source;
@@ -110,8 +110,8 @@ void QOpenGLCustomShaderStage::removeFromPainter(QPainter* p)
// Just set the stage to null, don't call removeCustomStage().
// This should leave the program in a compiled/linked state
// if the next custom shader stage is this one again.
- d->m_manager->setCustomStage(0);
- d->m_manager = 0;
+ d->m_manager->setCustomStage(nullptr);
+ d->m_manager = nullptr;
}
QByteArray QOpenGLCustomShaderStage::source() const
@@ -125,7 +125,7 @@ QByteArray QOpenGLCustomShaderStage::source() const
void QOpenGLCustomShaderStage::setInactive()
{
Q_D(QOpenGLCustomShaderStage);
- d->m_manager = 0;
+ d->m_manager = nullptr;
}
void QOpenGLCustomShaderStage::setSource(const QByteArray& s)
diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp
index 462a4fdb3b..310006feaf 100644
--- a/src/gui/opengl/qopengldebug.cpp
+++ b/src/gui/opengl/qopengldebug.cpp
@@ -1108,14 +1108,14 @@ public:
\internal
*/
QOpenGLDebugLoggerPrivate::QOpenGLDebugLoggerPrivate()
- : glDebugMessageControl(0),
- glDebugMessageInsert(0),
- glDebugMessageCallback(0),
- glGetDebugMessageLog(0),
- glPushDebugGroup(0),
- glPopDebugGroup(0),
- oldDebugCallbackFunction(0),
- context(0),
+ : glDebugMessageControl(nullptr),
+ glDebugMessageInsert(nullptr),
+ glDebugMessageCallback(nullptr),
+ glGetDebugMessageLog(nullptr),
+ glPushDebugGroup(nullptr),
+ glPopDebugGroup(nullptr),
+ oldDebugCallbackFunction(nullptr),
+ context(nullptr),
maxMessageLength(0),
loggingMode(QOpenGLDebugLogger::AsynchronousLogging),
initialized(false),
@@ -1228,7 +1228,7 @@ void QOpenGLDebugLoggerPrivate::controlDebugMessages(QOpenGLDebugMessage::Source
const GLsizei idCount = ids.count();
// The GL_KHR_debug extension says that if idCount is 0, idPtr must be ignored.
// Unfortunately, some bugged drivers do NOT ignore it, so pass NULL in case.
- const GLuint * const idPtr = idCount ? ids.constData() : 0;
+ const GLuint * const idPtr = idCount ? ids.constData() : nullptr;
for (GLenum source : glSources)
for (GLenum type : glTypes)
@@ -1247,7 +1247,7 @@ void QOpenGLDebugLoggerPrivate::_q_contextAboutToBeDestroyed()
// Save the current context and its surface in case we need to set them back
QOpenGLContext *currentContext = QOpenGLContext::currentContext();
- QSurface *currentSurface = 0;
+ QSurface *currentSurface = nullptr;
QScopedPointer<QOffscreenSurface> offscreenSurface;
@@ -1275,7 +1275,7 @@ void QOpenGLDebugLoggerPrivate::_q_contextAboutToBeDestroyed()
}
QObject::disconnect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed()));
- context = 0;
+ context = nullptr;
initialized = false;
}
@@ -1356,7 +1356,7 @@ bool QOpenGLDebugLogger::initialize()
disconnect(d->context, SIGNAL(aboutToBeDestroyed()), this, SLOT(_q_contextAboutToBeDestroyed()));
d->initialized = false;
- d->context = 0;
+ d->context = nullptr;
if (!context->hasExtension(QByteArrayLiteral("GL_KHR_debug")))
return false;
diff --git a/src/gui/opengl/qopenglengineshadermanager.cpp b/src/gui/opengl/qopenglengineshadermanager.cpp
index 1e5a10c99c..a569975486 100644
--- a/src/gui/opengl/qopenglengineshadermanager.cpp
+++ b/src/gui/opengl/qopenglengineshadermanager.cpp
@@ -72,7 +72,7 @@ public:
void invalidateResource() override
{
delete m_shaders;
- m_shaders = 0;
+ m_shaders = nullptr;
}
void freeResource(QOpenGLContext *) override
@@ -94,7 +94,7 @@ public:
shaders = new QOpenGLMultiGroupSharedResource;
QOpenGLEngineSharedShadersResource *resource =
shaders->value<QOpenGLEngineSharedShadersResource>(context);
- return resource ? resource->shaders() : 0;
+ return resource ? resource->shaders() : nullptr;
}
private:
@@ -116,8 +116,8 @@ const char* QOpenGLEngineSharedShaders::qShaderSnippets[] = {
};
QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context)
- : blitShaderProg(0)
- , simpleShaderProg(0)
+ : blitShaderProg(nullptr)
+ , simpleShaderProg(nullptr)
{
/*
@@ -341,12 +341,12 @@ QOpenGLEngineSharedShaders::~QOpenGLEngineSharedShaders()
if (blitShaderProg) {
delete blitShaderProg;
- blitShaderProg = 0;
+ blitShaderProg = nullptr;
}
if (simpleShaderProg) {
delete simpleShaderProg;
- simpleShaderProg = 0;
+ simpleShaderProg = nullptr;
}
}
@@ -507,8 +507,8 @@ QOpenGLEngineShaderManager::QOpenGLEngineShaderManager(QOpenGLContext* context)
opacityMode(NoOpacity),
maskType(NoMask),
compositionMode(QPainter::CompositionMode_SourceOver),
- customSrcStage(0),
- currentShaderProg(0)
+ customSrcStage(nullptr),
+ currentShaderProg(nullptr)
{
sharedShaders = QOpenGLEngineSharedShaders::shadersForContext(context);
}
@@ -627,7 +627,7 @@ void QOpenGLEngineShaderManager::removeCustomStage()
{
if (customSrcStage)
customSrcStage->setInactive();
- customSrcStage = 0;
+ customSrcStage = nullptr;
shaderProgNeedsChanging = true;
}
@@ -684,7 +684,7 @@ bool QOpenGLEngineShaderManager::useCorrectShaderProg()
if (!shaderProgNeedsChanging)
return false;
- bool useCustomSrc = customSrcStage != 0;
+ bool useCustomSrc = customSrcStage != nullptr;
if (useCustomSrc && srcPixelType != QOpenGLEngineShaderManager::ImageSrc && srcPixelType != Qt::TexturePattern) {
useCustomSrc = false;
qWarning("QOpenGLEngineShaderManager - Ignoring custom shader stage for non image src");
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index bb0dbdc9bd..d7a6d32218 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -551,7 +551,7 @@ void QOpenGLFramebufferObjectPrivate::initTexture(int idx)
pixelType = GL_UNSIGNED_SHORT;
funcs.glTexImage2D(target, 0, color.internalFormat, color.size.width(), color.size.height(), 0,
- GL_RGBA, pixelType, NULL);
+ GL_RGBA, pixelType, nullptr);
if (format.mipmap()) {
int width = color.size.width();
int height = color.size.height();
@@ -561,7 +561,7 @@ void QOpenGLFramebufferObjectPrivate::initTexture(int idx)
height = qMax(1, height >> 1);
++level;
funcs.glTexImage2D(target, level, color.internalFormat, width, height, 0,
- GL_RGBA, pixelType, NULL);
+ GL_RGBA, pixelType, nullptr);
}
}
funcs.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + idx,
@@ -640,8 +640,8 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext
stencil_buffer_guard->free();
}
- depth_buffer_guard = 0;
- stencil_buffer_guard = 0;
+ depth_buffer_guard = nullptr;
+ stencil_buffer_guard = nullptr;
GLuint depth_buffer = 0;
GLuint stencil_buffer = 0;
@@ -1284,7 +1284,7 @@ GLuint QOpenGLFramebufferObject::takeTexture(int colorAttachmentIndex)
id = guard ? guard->id() : 0;
// Do not call free() on texture_guard, just null it out.
// This way the texture will not be deleted when the guard is destroyed.
- guard = 0;
+ guard = nullptr;
}
return id;
}
@@ -1564,7 +1564,7 @@ bool QOpenGLFramebufferObject::bindDefault()
qWarning("QOpenGLFramebufferObject::bindDefault() called without current context.");
#endif
- return ctx != 0;
+ return ctx != nullptr;
}
/*!
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index bc3a4f7c1d..11ca802ee6 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -182,7 +182,7 @@ struct QOpenGLFunctionsPrivateEx : public QOpenGLExtensionsPrivate, public QOpen
Q_GLOBAL_STATIC(QOpenGLMultiGroupSharedResource, qt_gl_functions_resource)
-static QOpenGLFunctionsPrivateEx *qt_gl_functions(QOpenGLContext *context = 0)
+static QOpenGLFunctionsPrivateEx *qt_gl_functions(QOpenGLContext *context = nullptr)
{
if (!context)
context = QOpenGLContext::currentContext();
@@ -200,7 +200,7 @@ static QOpenGLFunctionsPrivateEx *qt_gl_functions(QOpenGLContext *context = 0)
\sa initializeOpenGLFunctions()
*/
QOpenGLFunctions::QOpenGLFunctions()
- : d_ptr(0)
+ : d_ptr(nullptr)
{
}
@@ -218,7 +218,7 @@ QOpenGLFunctions::QOpenGLFunctions()
\sa initializeOpenGLFunctions()
*/
QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext *context)
- : d_ptr(0)
+ : d_ptr(nullptr)
{
if (context && QOpenGLContextGroup::currentContextGroup() == context->shareGroup())
d_ptr = qt_gl_functions(context);
@@ -493,7 +493,7 @@ QOpenGLFunctions::OpenGLFeatures QOpenGLFunctions::openGLFeatures() const
{
QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);
if (!d)
- return 0;
+ return { };
if (d->m_features == -1)
d->m_features = qt_gl_resolve_features();
return QOpenGLFunctions::OpenGLFeatures(d->m_features);
@@ -531,7 +531,7 @@ QOpenGLExtensions::OpenGLExtensions QOpenGLExtensions::openGLExtensions()
{
QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);
if (!d)
- return 0;
+ return { };
if (d->m_extensions == -1)
d->m_extensions = qt_gl_resolve_extensions();
return QOpenGLExtensions::OpenGLExtensions(d->m_extensions);
diff --git a/src/gui/opengl/qopenglfunctions_1_0.cpp b/src/gui/opengl/qopenglfunctions_1_0.cpp
index f017c68fd9..f9d93ce210 100644
--- a/src/gui/opengl/qopenglfunctions_1_0.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_0.cpp
@@ -67,8 +67,8 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_1_0::QOpenGLFunctions_1_0()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_0_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
{
}
@@ -98,7 +98,7 @@ bool QOpenGLFunctions_1_0::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_1_1.cpp b/src/gui/opengl/qopenglfunctions_1_1.cpp
index a819d499f8..b0f7538d48 100644
--- a/src/gui/opengl/qopenglfunctions_1_1.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_1.cpp
@@ -67,10 +67,10 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_1_1::QOpenGLFunctions_1_1()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
{
}
@@ -108,7 +108,7 @@ bool QOpenGLFunctions_1_1::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_1_2.cpp b/src/gui/opengl/qopenglfunctions_1_2.cpp
index 61db2b4e0f..5f137b0237 100644
--- a/src/gui/opengl/qopenglfunctions_1_2.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_2.cpp
@@ -67,12 +67,12 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_1_2::QOpenGLFunctions_1_2()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
{
}
@@ -118,7 +118,7 @@ bool QOpenGLFunctions_1_2::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_1_3.cpp b/src/gui/opengl/qopenglfunctions_1_3.cpp
index acc223ea74..0b5ff2fee5 100644
--- a/src/gui/opengl/qopenglfunctions_1_3.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_3.cpp
@@ -67,14 +67,14 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_1_3::QOpenGLFunctions_1_3()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
{
}
@@ -128,7 +128,7 @@ bool QOpenGLFunctions_1_3::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_1_4.cpp b/src/gui/opengl/qopenglfunctions_1_4.cpp
index 8e2349dc08..9419c1aa85 100644
--- a/src/gui/opengl/qopenglfunctions_1_4.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_4.cpp
@@ -67,16 +67,16 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_1_4::QOpenGLFunctions_1_4()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
{
}
@@ -138,7 +138,7 @@ bool QOpenGLFunctions_1_4::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_1_5.cpp b/src/gui/opengl/qopenglfunctions_1_5.cpp
index cd81cf8b35..3fa7668a36 100644
--- a/src/gui/opengl/qopenglfunctions_1_5.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_5.cpp
@@ -67,17 +67,17 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_1_5::QOpenGLFunctions_1_5()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
{
}
@@ -143,7 +143,7 @@ bool QOpenGLFunctions_1_5::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_2_0.cpp b/src/gui/opengl/qopenglfunctions_2_0.cpp
index 97a8c72fa6..29eb055a1d 100644
--- a/src/gui/opengl/qopenglfunctions_2_0.cpp
+++ b/src/gui/opengl/qopenglfunctions_2_0.cpp
@@ -67,18 +67,18 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_2_0::QOpenGLFunctions_2_0()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
, m_reserved_2_0_Deprecated(nullptr)
{
}
@@ -149,7 +149,7 @@ bool QOpenGLFunctions_2_0::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_2_1.cpp b/src/gui/opengl/qopenglfunctions_2_1.cpp
index 00bdc1bbba..8a7170dd7d 100644
--- a/src/gui/opengl/qopenglfunctions_2_1.cpp
+++ b/src/gui/opengl/qopenglfunctions_2_1.cpp
@@ -67,19 +67,19 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_2_1::QOpenGLFunctions_2_1()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
, m_reserved_2_0_Deprecated(nullptr)
{
}
@@ -154,7 +154,7 @@ bool QOpenGLFunctions_2_1::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_3_0.cpp b/src/gui/opengl/qopenglfunctions_3_0.cpp
index 2c239dba1f..7d0e900659 100644
--- a/src/gui/opengl/qopenglfunctions_3_0.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_0.cpp
@@ -67,20 +67,20 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_3_0::QOpenGLFunctions_3_0()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
, m_reserved_2_0_Deprecated(nullptr)
, m_reserved_3_0_Deprecated(nullptr)
{
@@ -160,7 +160,7 @@ bool QOpenGLFunctions_3_0::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_3_1.cpp b/src/gui/opengl/qopenglfunctions_3_1.cpp
index f62f555c8e..c25b124af8 100644
--- a/src/gui/opengl/qopenglfunctions_3_1.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_1.cpp
@@ -67,16 +67,16 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_3_1::QOpenGLFunctions_3_1()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
{
}
@@ -138,7 +138,7 @@ bool QOpenGLFunctions_3_1::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp
index ba7be2d893..3e4fd96dc2 100644
--- a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp
@@ -67,22 +67,22 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_3_2_Compatibility::QOpenGLFunctions_3_2_Compatibility()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
, m_reserved_2_0_Deprecated(nullptr)
, m_reserved_3_0_Deprecated(nullptr)
{
@@ -170,7 +170,7 @@ bool QOpenGLFunctions_3_2_Compatibility::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_3_2_core.cpp b/src/gui/opengl/qopenglfunctions_3_2_core.cpp
index 4c1e3eb3da..ea89fc9e48 100644
--- a/src/gui/opengl/qopenglfunctions_3_2_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_2_core.cpp
@@ -67,17 +67,17 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_3_2_Core::QOpenGLFunctions_3_2_Core()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
{
}
@@ -143,7 +143,7 @@ bool QOpenGLFunctions_3_2_Core::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp
index c750c6e0cc..a26d7d99b1 100644
--- a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp
@@ -67,25 +67,25 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_3_3_Compatibility::QOpenGLFunctions_3_3_Compatibility()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
, m_reserved_2_0_Deprecated(nullptr)
- , d_3_3_Deprecated(0)
+ , d_3_3_Deprecated(nullptr)
{
}
@@ -179,7 +179,7 @@ bool QOpenGLFunctions_3_3_Compatibility::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_3_3_core.cpp b/src/gui/opengl/qopenglfunctions_3_3_core.cpp
index 5723509e32..277ad1eb14 100644
--- a/src/gui/opengl/qopenglfunctions_3_3_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_3_core.cpp
@@ -67,18 +67,18 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_3_3_Core::QOpenGLFunctions_3_3_Core()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
{
}
@@ -148,7 +148,7 @@ bool QOpenGLFunctions_3_3_Core::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp
index 6ae7643eb5..655f1e6fd4 100644
--- a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp
@@ -67,26 +67,26 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_0_Compatibility::QOpenGLFunctions_4_0_Compatibility()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
, m_reserved_2_0_Deprecated(nullptr)
- , d_3_3_Deprecated(0)
+ , d_3_3_Deprecated(nullptr)
{
}
@@ -184,7 +184,7 @@ bool QOpenGLFunctions_4_0_Compatibility::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_0_core.cpp b/src/gui/opengl/qopenglfunctions_4_0_core.cpp
index cd4fdb8b2b..60453d147c 100644
--- a/src/gui/opengl/qopenglfunctions_4_0_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_0_core.cpp
@@ -67,19 +67,19 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_0_Core::QOpenGLFunctions_4_0_Core()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
{
}
@@ -153,7 +153,7 @@ bool QOpenGLFunctions_4_0_Core::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp
index d104c74bc2..bdea8b5ba9 100644
--- a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp
@@ -67,27 +67,27 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_1_Compatibility::QOpenGLFunctions_4_1_Compatibility()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
, m_reserved_2_0_Deprecated(nullptr)
- , d_3_3_Deprecated(0)
+ , d_3_3_Deprecated(nullptr)
{
}
@@ -189,7 +189,7 @@ bool QOpenGLFunctions_4_1_Compatibility::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_1_core.cpp b/src/gui/opengl/qopenglfunctions_4_1_core.cpp
index 7527aba620..b21742d9c1 100644
--- a/src/gui/opengl/qopenglfunctions_4_1_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_1_core.cpp
@@ -67,20 +67,20 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_1_Core::QOpenGLFunctions_4_1_Core()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
{
}
@@ -158,7 +158,7 @@ bool QOpenGLFunctions_4_1_Core::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp
index a5b1b37495..41ab9ae762 100644
--- a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp
@@ -67,28 +67,28 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_2_Compatibility::QOpenGLFunctions_4_2_Compatibility()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
- , d_4_2_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
+ , d_4_2_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
, m_reserved_2_0_Deprecated(nullptr)
- , d_3_3_Deprecated(0)
+ , d_3_3_Deprecated(nullptr)
{
}
@@ -194,7 +194,7 @@ bool QOpenGLFunctions_4_2_Compatibility::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_2_core.cpp b/src/gui/opengl/qopenglfunctions_4_2_core.cpp
index 1381236926..38dbe1b596 100644
--- a/src/gui/opengl/qopenglfunctions_4_2_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_2_core.cpp
@@ -67,21 +67,21 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_2_Core::QOpenGLFunctions_4_2_Core()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
- , d_4_2_Core(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
+ , d_4_2_Core(nullptr)
{
}
@@ -163,7 +163,7 @@ bool QOpenGLFunctions_4_2_Core::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
index 5c0c711d1c..1b23d08ee2 100644
--- a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
@@ -67,29 +67,29 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_3_Compatibility::QOpenGLFunctions_4_3_Compatibility()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
- , d_4_2_Core(0)
- , d_4_3_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
+ , d_4_2_Core(nullptr)
+ , d_4_3_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
, m_reserved_2_0_Deprecated(nullptr)
- , d_3_3_Deprecated(0)
+ , d_3_3_Deprecated(nullptr)
{
}
@@ -199,7 +199,7 @@ bool QOpenGLFunctions_4_3_Compatibility::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_3_core.cpp b/src/gui/opengl/qopenglfunctions_4_3_core.cpp
index 34460b841e..8a867471b8 100644
--- a/src/gui/opengl/qopenglfunctions_4_3_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_3_core.cpp
@@ -67,22 +67,22 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_3_Core::QOpenGLFunctions_4_3_Core()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
- , d_4_2_Core(0)
- , d_4_3_Core(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
+ , d_4_2_Core(nullptr)
+ , d_4_3_Core(nullptr)
{
}
@@ -168,7 +168,7 @@ bool QOpenGLFunctions_4_3_Core::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp
index 907994a3c4..4fc4b50100 100644
--- a/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp
@@ -67,29 +67,29 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_4_Compatibility::QOpenGLFunctions_4_4_Compatibility()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
- , d_4_2_Core(0)
- , d_4_3_Core(0)
- , d_4_4_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
- , d_3_3_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
+ , d_4_2_Core(nullptr)
+ , d_4_3_Core(nullptr)
+ , d_4_4_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
+ , d_3_3_Deprecated(nullptr)
{
}
@@ -203,7 +203,7 @@ bool QOpenGLFunctions_4_4_Compatibility::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_4_core.cpp b/src/gui/opengl/qopenglfunctions_4_4_core.cpp
index 76c0323f6d..6169c7f455 100644
--- a/src/gui/opengl/qopenglfunctions_4_4_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_4_core.cpp
@@ -67,23 +67,23 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_4_Core::QOpenGLFunctions_4_4_Core()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
- , d_4_2_Core(0)
- , d_4_3_Core(0)
- , d_4_4_Core(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
+ , d_4_2_Core(nullptr)
+ , d_4_3_Core(nullptr)
+ , d_4_4_Core(nullptr)
{
}
@@ -173,7 +173,7 @@ bool QOpenGLFunctions_4_4_Core::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp
index c415bb06ff..02af443498 100644
--- a/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp
@@ -67,31 +67,31 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_5_Compatibility::QOpenGLFunctions_4_5_Compatibility()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
- , d_4_2_Core(0)
- , d_4_3_Core(0)
- , d_4_4_Core(0)
- , d_4_5_Core(0)
- , d_1_0_Deprecated(0)
- , d_1_1_Deprecated(0)
- , d_1_2_Deprecated(0)
- , d_1_3_Deprecated(0)
- , d_1_4_Deprecated(0)
- , d_3_3_Deprecated(0)
- , d_4_5_Deprecated(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
+ , d_4_2_Core(nullptr)
+ , d_4_3_Core(nullptr)
+ , d_4_4_Core(nullptr)
+ , d_4_5_Core(nullptr)
+ , d_1_0_Deprecated(nullptr)
+ , d_1_1_Deprecated(nullptr)
+ , d_1_2_Deprecated(nullptr)
+ , d_1_3_Deprecated(nullptr)
+ , d_1_4_Deprecated(nullptr)
+ , d_3_3_Deprecated(nullptr)
+ , d_4_5_Deprecated(nullptr)
{
}
@@ -213,7 +213,7 @@ bool QOpenGLFunctions_4_5_Compatibility::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglfunctions_4_5_core.cpp b/src/gui/opengl/qopenglfunctions_4_5_core.cpp
index 4dfac3579c..9c0369e5f2 100644
--- a/src/gui/opengl/qopenglfunctions_4_5_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_5_core.cpp
@@ -67,24 +67,24 @@ QT_BEGIN_NAMESPACE
QOpenGLFunctions_4_5_Core::QOpenGLFunctions_4_5_Core()
: QAbstractOpenGLFunctions()
- , d_1_0_Core(0)
- , d_1_1_Core(0)
- , d_1_2_Core(0)
- , d_1_3_Core(0)
- , d_1_4_Core(0)
- , d_1_5_Core(0)
- , d_2_0_Core(0)
- , d_2_1_Core(0)
- , d_3_0_Core(0)
- , d_3_1_Core(0)
- , d_3_2_Core(0)
- , d_3_3_Core(0)
- , d_4_0_Core(0)
- , d_4_1_Core(0)
- , d_4_2_Core(0)
- , d_4_3_Core(0)
- , d_4_4_Core(0)
- , d_4_5_Core(0)
+ , d_1_0_Core(nullptr)
+ , d_1_1_Core(nullptr)
+ , d_1_2_Core(nullptr)
+ , d_1_3_Core(nullptr)
+ , d_1_4_Core(nullptr)
+ , d_1_5_Core(nullptr)
+ , d_2_0_Core(nullptr)
+ , d_2_1_Core(nullptr)
+ , d_3_0_Core(nullptr)
+ , d_3_1_Core(nullptr)
+ , d_3_2_Core(nullptr)
+ , d_3_3_Core(nullptr)
+ , d_4_0_Core(nullptr)
+ , d_4_1_Core(nullptr)
+ , d_4_2_Core(nullptr)
+ , d_4_3_Core(nullptr)
+ , d_4_4_Core(nullptr)
+ , d_4_5_Core(nullptr)
{
}
@@ -178,7 +178,7 @@ bool QOpenGLFunctions_4_5_Core::initializeOpenGLFunctions()
{
// Associate with private implementation, creating if necessary
// Function pointers in the backends are resolved at creation time
- QOpenGLVersionFunctionsBackend* d = 0;
+ QOpenGLVersionFunctionsBackend* d = nullptr;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp
index 3a0c02feb0..3920a10467 100644
--- a/src/gui/opengl/qopenglpaintdevice.cpp
+++ b/src/gui/opengl/qopenglpaintdevice.cpp
@@ -171,7 +171,7 @@ QOpenGLPaintDevicePrivate::QOpenGLPaintDevicePrivate(const QSize &sz)
, dpmy(qt_defaultDpiY() * 100. / 2.54)
, devicePixelRatio(1.0)
, flipped(false)
- , engine(0)
+ , engine(nullptr)
{
}
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 6c796776c0..b53c9a3eab 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -881,7 +881,7 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
Q_ASSERT(cache->ibo == 0);
#else
free(cache->vertices);
- Q_ASSERT(cache->indices == 0);
+ Q_ASSERT(cache->indices == nullptr);
#endif
updateCache = true;
}
@@ -909,7 +909,7 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
#else
cache->vertices = (float *) malloc(floatSizeInBytes);
memcpy(cache->vertices, vertexCoordinateArray.data(), floatSizeInBytes);
- cache->indices = 0;
+ cache->indices = nullptr;
#endif
}
@@ -1360,7 +1360,7 @@ void QOpenGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
return;
QOpenGL2PaintEngineState *s = state();
- if (qt_pen_is_cosmetic(pen, state()->renderHints) && !qt_scaleForTransform(s->transform(), 0)) {
+ if (qt_pen_is_cosmetic(pen, state()->renderHints) && !qt_scaleForTransform(s->transform(), nullptr)) {
// QTriangulatingStroker class is not meant to support cosmetically sheared strokes.
QPaintEngineEx::stroke(path, pen);
return;
@@ -1428,7 +1428,7 @@ void QOpenGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &p
QRectF bounds = path.controlPointRect().adjusted(-extra, -extra, extra, extra);
fillStencilWithVertexArray(stroker.vertices(), stroker.vertexCount() / 2,
- 0, 0, bounds, QOpenGL2PaintEngineExPrivate::TriStripStrokeFillMode);
+ nullptr, 0, bounds, QOpenGL2PaintEngineExPrivate::TriStripStrokeFillMode);
funcs.glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
@@ -1576,7 +1576,7 @@ void QOpenGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, c
case QImage::Format_ARGB32:
case QImage::Format_RGBA64:
d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::NonPremultipliedImageSrc);
- bindOption = 0;
+ bindOption = { };
break;
case QImage::Format_Alpha8:
if (ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::TextureRGFormats)) {
@@ -1773,7 +1773,7 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly
QOpenGLTextureGlyphCache *cache =
(QOpenGLTextureGlyphCache *) fe->glyphCache(cacheKey, glyphFormat, glyphCacheTransform);
- if (!cache || cache->glyphFormat() != glyphFormat || cache->contextGroup() == 0) {
+ if (!cache || cache->glyphFormat() != glyphFormat || cache->contextGroup() == nullptr) {
cache = new QOpenGLTextureGlyphCache(glyphFormat, glyphCacheTransform);
fe->setGlyphCache(cacheKey, cache);
recreateVertexArrays = true;
@@ -1781,7 +1781,7 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly
if (staticTextItem->userDataNeedsUpdate) {
recreateVertexArrays = true;
- } else if (staticTextItem->userData() == 0) {
+ } else if (staticTextItem->userData() == nullptr) {
recreateVertexArrays = true;
} else if (staticTextItem->userData()->type != QStaticTextUserData::OpenGLUserData) {
recreateVertexArrays = true;
@@ -1846,9 +1846,9 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly
QOpenGL2PEXVertexArray *textureCoordinates = &textureCoordinateArray;
if (staticTextItem->useBackendOptimizations) {
- QOpenGLStaticTextUserData *userData = 0;
+ QOpenGLStaticTextUserData *userData = nullptr;
- if (staticTextItem->userData() == 0
+ if (staticTextItem->userData() == nullptr
|| staticTextItem->userData()->type != QStaticTextUserData::OpenGLUserData) {
userData = new QOpenGLStaticTextUserData();
@@ -2274,12 +2274,12 @@ bool QOpenGL2PaintEngineEx::end()
d->funcs.glUseProgram(0);
d->transferMode(BrushDrawingMode);
- ctx->d_func()->active_engine = 0;
+ ctx->d_func()->active_engine = nullptr;
d->resetGLState();
delete d->shaderManager;
- d->shaderManager = 0;
+ d->shaderManager = nullptr;
d->currentBrush = QBrush();
#ifdef QT_OPENGL_CACHE_AS_VBOS
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index 4986ca573d..7e89d9c8d4 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -249,7 +249,7 @@ class QOpenGLShaderPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QOpenGLShader)
public:
QOpenGLShaderPrivate(QOpenGLContext *ctx, QOpenGLShader::ShaderType type)
- : shaderGuard(0)
+ : shaderGuard(nullptr)
, shaderType(type)
, compiled(false)
, glfuncs(new QOpenGLExtraFunctions(ctx))
@@ -374,8 +374,8 @@ bool QOpenGLShaderPrivate::compile(QOpenGLShader *q)
// Get info and source code lengths
GLint infoLogLength = 0;
GLint sourceCodeLength = 0;
- char *logBuffer = 0;
- char *sourceCodeBuffer = 0;
+ char *logBuffer = nullptr;
+ char *sourceCodeBuffer = nullptr;
// Get the compilation info log
glfuncs->glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLogLength);
@@ -425,7 +425,7 @@ void QOpenGLShaderPrivate::deleteShader()
{
if (shaderGuard) {
shaderGuard->free();
- shaderGuard = 0;
+ shaderGuard = nullptr;
}
}
@@ -783,13 +783,13 @@ class QOpenGLShaderProgramPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QOpenGLShaderProgram)
public:
QOpenGLShaderProgramPrivate()
- : programGuard(0)
+ : programGuard(nullptr)
, linked(false)
, inited(false)
, removingShaders(false)
, glfuncs(new QOpenGLExtraFunctions)
#ifndef QT_OPENGL_ES_2
- , tessellationFuncs(0)
+ , tessellationFuncs(nullptr)
#endif
, linkBinaryRecursion(false)
{
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index 6b476622e2..5490ad8025 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
QOpenGLTexturePrivate::QOpenGLTexturePrivate(QOpenGLTexture::Target textureTarget,
QOpenGLTexture *qq)
: q_ptr(qq),
- context(0),
+ context(nullptr),
target(textureTarget),
textureId(0),
format(QOpenGLTexture::NoFormat),
@@ -83,8 +83,8 @@ QOpenGLTexturePrivate::QOpenGLTexturePrivate(QOpenGLTexture::Target textureTarge
textureView(false),
autoGenerateMipMaps(true),
storageAllocated(false),
- texFuncs(0),
- functions(0)
+ texFuncs(nullptr),
+ functions(nullptr)
{
dimensions[0] = dimensions[1] = dimensions[2] = 1;
@@ -209,8 +209,8 @@ void QOpenGLTexturePrivate::destroy()
functions->glDeleteTextures(1, &textureId);
- context = 0;
- functions = 0;
+ context = nullptr;
+ functions = nullptr;
textureId = 0;
format = QOpenGLTexture::NoFormat;
formatClass = QOpenGLTexture::NoFormatClass;
@@ -232,7 +232,7 @@ void QOpenGLTexturePrivate::destroy()
textureView = false;
autoGenerateMipMaps = true;
storageAllocated = false;
- texFuncs = 0;
+ texFuncs = nullptr;
swizzleMask[0] = QOpenGLTexture::RedValue;
swizzleMask[1] = QOpenGLTexture::GreenValue;
@@ -1142,7 +1142,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p
texFuncs->glTextureImage1D(textureId, target, bindingTarget, level, format,
mipLevelSize(level, dimensions[0]),
0,
- pixelFormat, pixelType, 0);
+ pixelFormat, pixelType, nullptr);
} else {
qWarning("1D textures are not supported");
return;
@@ -1157,7 +1157,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p
mipLevelSize(level, dimensions[0]),
layers,
0,
- pixelFormat, pixelType, 0);
+ pixelFormat, pixelType, nullptr);
} else {
qWarning("1D array textures are not supported");
return;
@@ -1171,7 +1171,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p
mipLevelSize(level, dimensions[0]),
mipLevelSize(level, dimensions[1]),
0,
- pixelFormat, pixelType, 0);
+ pixelFormat, pixelType, nullptr);
break;
case QOpenGLTexture::TargetCubeMap: {
@@ -1191,7 +1191,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p
mipLevelSize(level, dimensions[0]),
mipLevelSize(level, dimensions[1]),
0,
- pixelFormat, pixelType, 0);
+ pixelFormat, pixelType, nullptr);
}
}
break;
@@ -1205,7 +1205,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p
mipLevelSize(level, dimensions[1]),
layers,
0,
- pixelFormat, pixelType, 0);
+ pixelFormat, pixelType, nullptr);
} else {
qWarning("Array textures are not supported");
return;
@@ -1221,7 +1221,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p
mipLevelSize(level, dimensions[1]),
6 * layers,
0,
- pixelFormat, pixelType, 0);
+ pixelFormat, pixelType, nullptr);
} else {
qWarning("Cubemap Array textures are not supported");
return;
@@ -1236,7 +1236,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p
mipLevelSize(level, dimensions[1]),
mipLevelSize(level, dimensions[2]),
0,
- pixelFormat, pixelType, 0);
+ pixelFormat, pixelType, nullptr);
} else {
qWarning("3D textures are not supported");
return;
@@ -1925,7 +1925,7 @@ QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target
if (!viewTargetCompatible) {
qWarning("QOpenGLTexture::createTextureView(): Incompatible source and view targets");
- return 0;
+ return nullptr;
}
// Check the formats are compatible
@@ -2058,7 +2058,7 @@ QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target
if (!viewFormatCompatible) {
qWarning("QOpenGLTexture::createTextureView(): Incompatible source and view formats");
- return 0;
+ return nullptr;
}
@@ -3389,7 +3389,7 @@ QOpenGLTexture *QOpenGLTexture::createTextureView(Target target,
Q_D(const QOpenGLTexture);
if (!isStorageAllocated()) {
qWarning("Cannot set create a texture view of a texture that does not have storage allocated.");
- return 0;
+ return nullptr;
}
Q_ASSERT(maximumMipmapLevel >= minimumMipmapLevel);
Q_ASSERT(maximumLayer >= minimumLayer);
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp
index 490dc99749..41027d26e0 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/gui/opengl/qopengltextureglyphcache.cpp
@@ -55,9 +55,9 @@ static int next_qopengltextureglyphcache_serial_number()
QOpenGLTextureGlyphCache::QOpenGLTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color)
: QImageTextureGlyphCache(format, matrix, color)
- , m_textureResource(0)
- , pex(0)
- , m_blitProgram(0)
+ , m_textureResource(nullptr)
+ , pex(nullptr)
+ , m_blitProgram(nullptr)
, m_filterMode(Nearest)
, m_serialNumber(next_qopengltextureglyphcache_serial_number())
, m_buffer(QOpenGLBuffer::VertexBuffer)
@@ -102,7 +102,7 @@ static inline bool isCoreProfile()
void QOpenGLTextureGlyphCache::createTextureData(int width, int height)
{
QOpenGLContext *ctx = const_cast<QOpenGLContext *>(QOpenGLContext::currentContext());
- if (ctx == 0) {
+ if (ctx == nullptr) {
qWarning("QOpenGLTextureGlyphCache::createTextureData: Called with no context");
return;
}
@@ -121,7 +121,7 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height)
if (m_textureResource && !m_textureResource->m_texture) {
delete m_textureResource;
- m_textureResource = 0;
+ m_textureResource = nullptr;
}
if (!m_textureResource)
@@ -276,7 +276,7 @@ static void load_glyph_image_region_to_texture(QOpenGLContext *ctx,
void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
{
QOpenGLContext *ctx = QOpenGLContext::currentContext();
- if (ctx == 0) {
+ if (ctx == nullptr) {
qWarning("QOpenGLTextureGlyphCache::resizeTextureData: Called with no context");
return;
}
@@ -313,7 +313,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
funcs->glGenTextures(1, &tmp_texture);
funcs->glBindTexture(GL_TEXTURE_2D, tmp_texture);
funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, oldWidth, oldHeight, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -326,7 +326,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
funcs->glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
funcs->glBindTexture(GL_TEXTURE_2D, oldTexture);
- if (pex != 0)
+ if (pex != nullptr)
pex->transferMode(BrushDrawingMode);
funcs->glDisable(GL_STENCIL_TEST);
@@ -336,9 +336,9 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
funcs->glViewport(0, 0, oldWidth, oldHeight);
- QOpenGLShaderProgram *blitProgram = 0;
- if (pex == 0) {
- if (m_blitProgram == 0) {
+ QOpenGLShaderProgram *blitProgram = nullptr;
+ if (pex == nullptr) {
+ if (m_blitProgram == nullptr) {
m_blitProgram = new QOpenGLShaderProgram;
const bool isCoreProfile = ctx->format().profile() == QSurfaceFormat::CoreProfile;
@@ -408,7 +408,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
funcs->glBindFramebuffer(GL_FRAMEBUFFER, (GLuint)oldFbo);
- if (pex != 0) {
+ if (pex != nullptr) {
funcs->glViewport(0, 0, pex->width, pex->height);
pex->updateClipScissorTest();
} else {
@@ -424,7 +424,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition)
{
QOpenGLContext *ctx = QOpenGLContext::currentContext();
- if (ctx == 0) {
+ if (ctx == nullptr) {
qWarning("QOpenGLTextureGlyphCache::fillTexture: Called with no context");
return;
}
@@ -447,7 +447,7 @@ int QOpenGLTextureGlyphCache::glyphPadding() const
int QOpenGLTextureGlyphCache::maxTextureWidth() const
{
QOpenGLContext *ctx = const_cast<QOpenGLContext *>(QOpenGLContext::currentContext());
- if (ctx == 0)
+ if (ctx == nullptr)
return QImageTextureGlyphCache::maxTextureWidth();
else
return ctx->d_func()->maxTextureSize();
@@ -456,7 +456,7 @@ int QOpenGLTextureGlyphCache::maxTextureWidth() const
int QOpenGLTextureGlyphCache::maxTextureHeight() const
{
QOpenGLContext *ctx = const_cast<QOpenGLContext *>(QOpenGLContext::currentContext());
- if (ctx == 0)
+ if (ctx == nullptr)
return QImageTextureGlyphCache::maxTextureHeight();
if (ctx->d_func()->workaround_brokenTexSubImage)
@@ -469,10 +469,10 @@ void QOpenGLTextureGlyphCache::clear()
{
if (m_textureResource)
m_textureResource->free();
- m_textureResource = 0;
+ m_textureResource = nullptr;
delete m_blitProgram;
- m_blitProgram = 0;
+ m_blitProgram = nullptr;
m_w = 0;
m_h = 0;
diff --git a/src/gui/opengl/qopengltimerquery.cpp b/src/gui/opengl/qopengltimerquery.cpp
index afd2e7887a..a4e10b42f7 100644
--- a/src/gui/opengl/qopengltimerquery.cpp
+++ b/src/gui/opengl/qopengltimerquery.cpp
@@ -77,8 +77,8 @@ class QOpenGLTimerQueryPrivate : public QObjectPrivate
public:
QOpenGLTimerQueryPrivate()
: QObjectPrivate(),
- context(0),
- ext(0),
+ context(nullptr),
+ ext(nullptr),
timeInterval(0),
timer(0)
{
@@ -168,7 +168,7 @@ void QOpenGLTimerQueryPrivate::destroy()
core->glDeleteQueries(1, &timer);
timer = 0;
- context = 0;
+ context = nullptr;
}
// GL_TIME_ELAPSED_EXT is not defined on OS X 10.6
@@ -310,14 +310,14 @@ QOpenGLTimerQuery::~QOpenGLTimerQuery()
QOpenGLContext* ctx = QOpenGLContext::currentContext();
Q_D(QOpenGLTimerQuery);
- QOpenGLContext *oldContext = 0;
+ QOpenGLContext *oldContext = nullptr;
if (d->context != ctx) {
oldContext = ctx;
if (d->context->makeCurrent(oldContext->surface())) {
ctx = d->context;
} else {
qWarning("QOpenGLTimerQuery::~QOpenGLTimerQuery() failed to make query objects's context current");
- ctx = 0;
+ ctx = nullptr;
}
}
@@ -468,9 +468,9 @@ public:
: QObjectPrivate(),
timers(),
timeSamples(),
- context(0),
- core(0),
- ext(0),
+ context(nullptr),
+ core(nullptr),
+ ext(nullptr),
requestedSampleCount(2),
currentSample(-1),
timerQueryActive(false)
@@ -556,10 +556,10 @@ void QOpenGLTimeMonitorPrivate::destroy()
core->glDeleteQueries(timers.size(), timers.data());
timers.clear();
delete core;
- core = 0;
+ core = nullptr;
delete ext;
- ext = 0;
- context = 0;
+ ext = nullptr;
+ context = nullptr;
}
void QOpenGLTimeMonitorPrivate::recordSample()
@@ -701,14 +701,14 @@ QOpenGLTimeMonitor::~QOpenGLTimeMonitor()
QOpenGLContext* ctx = QOpenGLContext::currentContext();
Q_D(QOpenGLTimeMonitor);
- QOpenGLContext *oldContext = 0;
+ QOpenGLContext *oldContext = nullptr;
if (d->context != ctx) {
oldContext = ctx;
if (d->context->makeCurrent(oldContext->surface())) {
ctx = d->context;
} else {
qWarning("QOpenGLTimeMonitor::~QOpenGLTimeMonitor() failed to make time monitor's context current");
- ctx = 0;
+ ctx = nullptr;
}
}
diff --git a/src/gui/opengl/qopenglversionfunctions.cpp b/src/gui/opengl/qopenglversionfunctions.cpp
index a3d3bb6bd1..5a108335a9 100644
--- a/src/gui/opengl/qopenglversionfunctions.cpp
+++ b/src/gui/opengl/qopenglversionfunctions.cpp
@@ -68,7 +68,7 @@ void CLASS::init() \
}
QOpenGLVersionFunctionsStorage::QOpenGLVersionFunctionsStorage()
- : backends(0)
+ : backends(nullptr)
{
}
diff --git a/src/gui/opengl/qopenglversionfunctionsfactory.cpp b/src/gui/opengl/qopenglversionfunctionsfactory.cpp
index fff5eea29c..ca7daedf34 100644
--- a/src/gui/opengl/qopenglversionfunctionsfactory.cpp
+++ b/src/gui/opengl/qopenglversionfunctionsfactory.cpp
@@ -153,7 +153,7 @@ QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVe
else if (major == 1 && minor == 0)
return new QOpenGLFunctions_1_0;
}
- return 0;
+ return nullptr;
#else
Q_UNUSED(versionProfile);
return new QOpenGLFunctions_ES2;
diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp
index f0837aff96..f15fe06ee8 100644
--- a/src/gui/opengl/qopenglvertexarrayobject.cpp
+++ b/src/gui/opengl/qopenglvertexarrayobject.cpp
@@ -101,7 +101,7 @@ public:
QOpenGLVertexArrayObjectPrivate()
: vao(0)
, vaoFuncsType(NotSupported)
- , context(0)
+ , context(nullptr)
{
}
@@ -167,7 +167,7 @@ bool QOpenGLVertexArrayObjectPrivate::create()
vaoFuncs.helper->glGenVertexArrays(1, &vao);
}
} else {
- vaoFuncs.core_3_0 = 0;
+ vaoFuncs.core_3_0 = nullptr;
vaoFuncsType = NotSupported;
QSurfaceFormat format = ctx->format();
#ifndef QT_OPENGL_ES_2
@@ -200,17 +200,17 @@ void QOpenGLVertexArrayObjectPrivate::destroy()
Q_Q(QOpenGLVertexArrayObject);
QOpenGLContext *ctx = QOpenGLContext::currentContext();
- QOpenGLContext *oldContext = 0;
- QSurface *oldContextSurface = 0;
+ QOpenGLContext *oldContext = nullptr;
+ QSurface *oldContextSurface = nullptr;
QScopedPointer<QOffscreenSurface> offscreenSurface;
if (context && context != ctx) {
oldContext = ctx;
- oldContextSurface = ctx ? ctx->surface() : 0;
+ oldContextSurface = ctx ? ctx->surface() : nullptr;
// Before going through the effort of creating an offscreen surface
// check that we are on the GUI thread because otherwise many platforms
// will not able to create that offscreen surface.
if (QThread::currentThread() != qGuiApp->thread()) {
- ctx = 0;
+ ctx = nullptr;
} else {
// Cannot just make the current surface current again with another context.
// The format may be incompatible and some platforms (iOS) may impose
@@ -223,14 +223,14 @@ void QOpenGLVertexArrayObjectPrivate::destroy()
ctx = context;
} else {
qWarning("QOpenGLVertexArrayObject::destroy() failed to make VAO's context current");
- ctx = 0;
+ ctx = nullptr;
}
}
}
if (context) {
QObject::disconnect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed()));
- context = 0;
+ context = nullptr;
}
if (vao && ctx) {
diff --git a/src/gui/painting/WEBGRADIENTS_LICENSE.txt b/src/gui/painting/WEBGRADIENTS_LICENSE.txt
deleted file mode 100644
index 1a4d527a4d..0000000000
--- a/src/gui/painting/WEBGRADIENTS_LICENSE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-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 c68e8d6e9a..94a88f55dc 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -111,13 +111,8 @@ SOURCES += \
painting/qplatformbackingstore.cpp \
painting/qpathsimplifier.cpp
-webgradients.files = painting/webgradients.binaryjson
-webgradients.prefix = qgradient
-webgradients.base = painting
-
RESOURCES += \
painting/qpdf.qrc \
- webgradients
darwin {
HEADERS += painting/qcoregraphics_p.h
diff --git a/src/gui/painting/qblittable.cpp b/src/gui/painting/qblittable.cpp
index 8e2013c24f..494104251f 100644
--- a/src/gui/painting/qblittable.cpp
+++ b/src/gui/painting/qblittable.cpp
@@ -46,7 +46,7 @@ class QBlittablePrivate
{
public:
QBlittablePrivate(const QSize &size, QBlittable::Capabilities caps)
- : caps(caps), m_size(size), locked(false), cachedImg(0)
+ : caps(caps), m_size(size), locked(false), cachedImg(nullptr)
{}
QBlittable::Capabilities caps;
QSize m_size;
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index abb3268dfa..28cc20bfc5 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -179,7 +180,7 @@ struct QTexturedBrushData : public QBrushData
{
QTexturedBrushData() {
m_has_pixmap_texture = false;
- m_pixmap = 0;
+ m_pixmap = nullptr;
}
~QTexturedBrushData() {
delete m_pixmap;
@@ -189,7 +190,7 @@ struct QTexturedBrushData : public QBrushData
delete m_pixmap;
if (pm.isNull()) {
- m_pixmap = 0;
+ m_pixmap = nullptr;
m_has_pixmap_texture = false;
} else {
m_pixmap = new QPixmap(pm);
@@ -202,7 +203,7 @@ struct QTexturedBrushData : public QBrushData
void setImage(const QImage &image) {
m_image = image;
delete m_pixmap;
- m_pixmap = 0;
+ m_pixmap = nullptr;
m_has_pixmap_texture = false;
}
@@ -360,7 +361,7 @@ public:
{
if (!brush->ref.deref())
delete brush;
- brush = 0;
+ brush = nullptr;
}
};
@@ -671,7 +672,7 @@ QBrush &QBrush::operator=(const QBrush &b)
*/
QBrush::operator QVariant() const
{
- return QVariant(QVariant::Brush, this);
+ return QVariant(QMetaType::QBrush, this);
}
/*!
@@ -831,7 +832,7 @@ const QGradient *QBrush::gradient() const
|| d->style == Qt::ConicalGradientPattern) {
return &static_cast<const QGradientBrushData *>(d.data())->gradient;
}
- return 0;
+ return nullptr;
}
Q_GUI_EXPORT bool qt_isExtendedRadialGradient(const QBrush &brush)
@@ -892,8 +893,12 @@ bool QBrush::isOpaque() const
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\since 4.2
+ \obsolete
+
+ Use setTransform() instead.
Sets \a matrix as an explicit transformation matrix on the
current brush. The brush transformation matrix is merged with
@@ -905,6 +910,7 @@ void QBrush::setMatrix(const QMatrix &matrix)
{
setTransform(QTransform(matrix));
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
\since 4.3
@@ -922,14 +928,19 @@ void QBrush::setTransform(const QTransform &matrix)
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\fn void QBrush::matrix() const
\since 4.2
+ \obsolete
+
+ Use transform() instead.
Returns the current transformation matrix for the brush.
\sa setMatrix()
*/
+#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
\fn bool QBrush::operator!=(const QBrush &brush) const
@@ -968,7 +979,7 @@ bool QBrush::operator==(const QBrush &b) const
// but does not share the same data in memory. Since equality is likely to
// be used to avoid iterating over the data for a texture update, this should
// still be better than doing an accurate comparison.
- const QPixmap *us = 0, *them = 0;
+ const QPixmap *us = nullptr, *them = nullptr;
qint64 cacheKey1, cacheKey2;
if (qHasPixmapTexture(*this)) {
us = (static_cast<QTexturedBrushData *>(d.data()))->m_pixmap;
@@ -1335,7 +1346,7 @@ QDataStream &operator>>(QDataStream &s, QBrush &b)
\internal
*/
QGradient::QGradient()
- : m_type(NoGradient), dummy(0)
+ : m_type(NoGradient), dummy(nullptr)
{
}
@@ -1347,6 +1358,8 @@ QGradient::QGradient()
based on the gradients from https://webgradients.com/.
*/
+#include "webgradients.cpp"
+
/*!
\fn QGradient::QGradient(QGradient::Preset preset)
\since 5.12
@@ -1358,47 +1371,12 @@ QGradient::QGradient()
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(ObjectMode);
- setSpread(PadSpread);
-
- const QJsonValue start = presetData[QLatin1String("start")];
- const QJsonValue end = presetData[QLatin1String("end")];
- m_data.linear.x1 = start[QLatin1String("x")].toDouble();
- m_data.linear.y1 = start[QLatin1String("y")].toDouble();
- m_data.linear.x2 = end[QLatin1String("x")].toDouble();
- m_data.linear.y2 = end[QLatin1String("y")].toDouble();
-
- for (const QJsonValue &stop : presetData[QLatin1String("stops")].toArray()) {
- setColorAt(stop[QLatin1String("position")].toDouble(),
- QColor(QRgb(stop[QLatin1String("color")].toInt())));
- }
-
- cachedPresets.insert(preset, *this);
- }
+ : m_type(LinearGradient)
+ , m_spread(PadSpread)
+ , m_stops(qt_preset_gradient_stops(preset))
+ , m_data(qt_preset_gradient_data[preset - 1])
+ , dummy(qt_preset_gradient_dummy())
+{
}
/*!
@@ -1408,11 +1386,6 @@ QGradient::~QGradient()
{
}
-QT_END_NAMESPACE
-static void initGradientPresets() { Q_INIT_RESOURCE(qmake_webgradients); }
-Q_CONSTRUCTOR_FUNCTION(initGradientPresets);
-QT_BEGIN_NAMESPACE
-
/*!
\enum QGradient::Type
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h
index 6a4ffab1c5..3a01248c57 100644
--- a/src/gui/painting/qbrush.h
+++ b/src/gui/painting/qbrush.h
@@ -89,8 +89,10 @@ public:
inline Qt::BrushStyle style() const;
void setStyle(Qt::BrushStyle);
- inline const QMatrix &matrix() const;
- void setMatrix(const QMatrix &mat);
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use transform()") inline const QMatrix &matrix() const;
+ QT_DEPRECATED_X("Use setTransform()") void setMatrix(const QMatrix &mat);
+#endif // QT_DEPRECATED_SINCE(5, 15)
inline QTransform transform() const;
void setTransform(const QTransform &);
@@ -157,7 +159,10 @@ struct QBrushData
inline Qt::BrushStyle QBrush::style() const { return d->style; }
inline const QColor &QBrush::color() const { return d->color; }
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_DEPRECATED_X("Use transform()")
inline const QMatrix &QBrush::matrix() const { return d->transform.toAffine(); }
+#endif // QT_DEPRECATED_SINCE(5, 15)
inline QTransform QBrush::transform() const { return d->transform; }
inline bool QBrush::isDetached() const { return d->ref.loadRelaxed() == 1; }
@@ -400,16 +405,7 @@ public:
inline bool operator!=(const QGradient &other) const
{ return !operator==(other); }
-private:
- friend class QLinearGradient;
- friend class QRadialGradient;
- friend class QConicalGradient;
- friend class QBrush;
-
- Type m_type;
- Spread m_spread;
- QGradientStops m_stops;
- union {
+ union QGradientData {
struct {
qreal x1, y1, x2, y2;
} linear;
@@ -419,7 +415,18 @@ private:
struct {
qreal cx, cy, angle;
} conical;
- } m_data;
+ };
+
+private:
+ friend class QLinearGradient;
+ friend class QRadialGradient;
+ friend class QConicalGradient;
+ friend class QBrush;
+
+ Type m_type;
+ Spread m_spread;
+ QGradientStops m_stops;
+ QGradientData m_data;
void *dummy; // ### Qt 6: replace with actual content (CoordinateMode, InterpolationMode, ...)
};
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 8780cce223..917706e8cf 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -2980,7 +2980,7 @@ bool QColor::operator!=(const QColor &color) const noexcept
*/
QColor::operator QVariant() const
{
- return QVariant(QVariant::Color, this);
+ return QVariant(QMetaType::QColor, this);
}
/*! \internal
diff --git a/src/gui/painting/qcolorspace.cpp b/src/gui/painting/qcolorspace.cpp
index 9631fdb416..7e7bbec870 100644
--- a/src/gui/painting/qcolorspace.cpp
+++ b/src/gui/painting/qcolorspace.cpp
@@ -422,6 +422,10 @@ QColorSpace::QColorSpace()
*/
QColorSpace::QColorSpace(NamedColorSpace namedColorSpace)
{
+ if (namedColorSpace < QColorSpace::SRgb || namedColorSpace > QColorSpace::ProPhotoRgb) {
+ qWarning() << "QColorSpace attempted constructed from invalid QColorSpace::NamedColorSpace: " << int(namedColorSpace);
+ return;
+ }
static QColorSpacePrivate *predefinedColorspacePrivates[QColorSpace::ProPhotoRgb + 1];
if (!predefinedColorspacePrivates[namedColorSpace]) {
predefinedColorspacePrivates[namedColorSpace] = new QColorSpacePrivate(namedColorSpace);
@@ -545,8 +549,12 @@ float QColorSpace::gamma() const noexcept
*/
void QColorSpace::setTransferFunction(QColorSpace::TransferFunction transferFunction, float gamma)
{
- if (!isValid() || transferFunction == QColorSpace::TransferFunction::Custom)
+ if (transferFunction == TransferFunction::Custom)
return;
+ if (!d_ptr) {
+ d_ptr = new QColorSpacePrivate(Primaries::Custom, transferFunction, gamma);
+ return;
+ }
if (d_ptr->transferFunction == transferFunction && d_ptr->gamma == gamma)
return;
QColorSpacePrivate::getWritable(*this); // detach
@@ -581,8 +589,12 @@ QColorSpace QColorSpace::withTransferFunction(QColorSpace::TransferFunction tran
*/
void QColorSpace::setPrimaries(QColorSpace::Primaries primariesId)
{
- if (!isValid() || primariesId == QColorSpace::Primaries::Custom)
+ if (primariesId == Primaries::Custom)
return;
+ if (!d_ptr) {
+ d_ptr = new QColorSpacePrivate(primariesId, TransferFunction::Custom, 0.0f);
+ return;
+ }
if (d_ptr->primaries == primariesId)
return;
QColorSpacePrivate::getWritable(*this); // detach
@@ -601,11 +613,13 @@ void QColorSpace::setPrimaries(QColorSpace::Primaries primariesId)
void QColorSpace::setPrimaries(const QPointF &whitePoint, const QPointF &redPoint,
const QPointF &greenPoint, const QPointF &bluePoint)
{
- if (!isValid())
- return;
QColorSpacePrimaries primaries(whitePoint, redPoint, greenPoint, bluePoint);
if (!primaries.areValid())
return;
+ if (!d_ptr) {
+ d_ptr = new QColorSpacePrivate(primaries, TransferFunction::Custom, 0.0f);
+ return;
+ }
QColorMatrix toXyz = primaries.toXyzMatrix();
if (QColorVector(primaries.whitePoint) == d_ptr->whitePoint && toXyz == d_ptr->toXyz)
return;
@@ -688,12 +702,14 @@ bool operator==(const QColorSpace &colorSpace1, const QColorSpace &colorSpace2)
const bool valid1 = colorSpace1.isValid();
const bool valid2 = colorSpace2.isValid();
- if (!valid1 && !valid2)
- return colorSpace1.d_ptr->iccProfile == colorSpace2.d_ptr->iccProfile;
- else if (!valid1 || !valid2)
+ if (valid1 != valid2)
return false;
+ if (!valid1 && !valid2) {
+ if (!colorSpace1.d_ptr->iccProfile.isEmpty() || !colorSpace2.d_ptr->iccProfile.isEmpty())
+ return colorSpace1.d_ptr->iccProfile == colorSpace2.d_ptr->iccProfile;
+ }
- // At this point one or both color spaces are unknown but valid, and must be compared in detail instead
+ // At this point one or both color spaces are unknown, and must be compared in detail instead
if (colorSpace1.primaries() != QColorSpace::Primaries::Custom && colorSpace2.primaries() != QColorSpace::Primaries::Custom) {
if (colorSpace1.primaries() != colorSpace2.primaries())
@@ -740,6 +756,15 @@ QColorTransform QColorSpace::transformationToColorSpace(const QColorSpace &color
return d_ptr->transformationToColorSpace(colorspace.d_ptr);
}
+/*!
+ Returns the color space as a QVariant.
+ \since 5.15
+*/
+QColorSpace::operator QVariant() const
+{
+ return QVariant(QMetaType::QColorSpace, this);
+}
+
/*****************************************************************************
QColorSpace stream functions
*****************************************************************************/
diff --git a/src/gui/painting/qcolorspace.h b/src/gui/painting/qcolorspace.h
index e6bc62d58a..08c9944301 100644
--- a/src/gui/painting/qcolorspace.h
+++ b/src/gui/painting/qcolorspace.h
@@ -44,6 +44,7 @@
#include <QtGui/qcolortransform.h>
#include <QtCore/qobjectdefs.h>
#include <QtCore/qshareddata.h>
+#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
@@ -125,6 +126,7 @@ public:
QColorTransform transformationToColorSpace(const QColorSpace &colorspace) const;
+ operator QVariant() const;
private:
Q_DECLARE_PRIVATE(QColorSpace)
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index fa34c5598e..9012119516 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -225,7 +225,7 @@ static StrokeLine strokeLine(int strokeSelection)
break;
default:
Q_ASSERT(false);
- stroke = 0;
+ stroke = nullptr;
}
return stroke;
}
@@ -252,8 +252,8 @@ void QCosmeticStroker::setup()
const QVector<qreal> &penPattern = state->lastPen.dashPattern();
if (penPattern.isEmpty()) {
Q_ASSERT(!pattern && !reversePattern);
- pattern = 0;
- reversePattern = 0;
+ pattern = nullptr;
+ reversePattern = nullptr;
patternLength = 0;
patternSize = 0;
} else {
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index f8d5914f37..2d4045fe29 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -310,7 +310,7 @@ inline void QT_FASTCALL storePixel<QPixelLayout::BPP24>(uchar *dest, int index,
typedef uint (QT_FASTCALL *FetchPixelFunc)(const uchar *src, int index);
static const FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = {
- 0, // BPPNone
+ nullptr, // BPPNone
fetchPixel<QPixelLayout::BPP1MSB>, // BPP1MSB
fetchPixel<QPixelLayout::BPP1LSB>, // BPP1LSB
fetchPixel<QPixelLayout::BPP8>, // BPP8
@@ -1713,10 +1713,10 @@ static uint *QT_FASTCALL destFetchUndefined(uint *buffer, QRasterBuffer *, int,
static DestFetchProc destFetchProc[QImage::NImageFormats] =
{
- 0, // Format_Invalid
+ nullptr, // Format_Invalid
destFetchMono, // Format_Mono,
destFetchMonoLsb, // Format_MonoLSB
- 0, // Format_Indexed8
+ nullptr, // Format_Indexed8
destFetchARGB32P, // Format_RGB32
destFetch, // Format_ARGB32,
destFetchARGB32P, // Format_ARGB32_Premultiplied
@@ -1764,10 +1764,10 @@ static QRgba64 * QT_FASTCALL destFetch64Undefined(QRgba64 *buffer, QRasterBuffer
static DestFetchProc64 destFetchProc64[QImage::NImageFormats] =
{
- 0, // Format_Invalid
- 0, // Format_Mono,
- 0, // Format_MonoLSB
- 0, // Format_Indexed8
+ nullptr, // Format_Invalid
+ nullptr, // Format_Mono,
+ nullptr, // Format_MonoLSB
+ nullptr, // Format_Indexed8
destFetch64, // Format_RGB32
destFetch64, // Format_ARGB32,
destFetch64, // Format_ARGB32_Premultiplied
@@ -1905,13 +1905,13 @@ static void QT_FASTCALL destStore(QRasterBuffer *rasterBuffer, int x, int y, con
static DestStoreProc destStoreProc[QImage::NImageFormats] =
{
- 0, // Format_Invalid
+ nullptr, // Format_Invalid
destStoreMono, // Format_Mono,
destStoreMonoLsb, // Format_MonoLSB
- 0, // Format_Indexed8
- 0, // Format_RGB32
+ nullptr, // Format_Indexed8
+ nullptr, // Format_RGB32
destStore, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied
+ nullptr, // Format_ARGB32_Premultiplied
destStoreRGB16, // Format_RGB16
destStore, // Format_ARGB8565_Premultiplied
destStore, // Format_RGB666
@@ -1955,10 +1955,10 @@ static void QT_FASTCALL destStore64RGBA64(QRasterBuffer *rasterBuffer, int x, in
static DestStoreProc64 destStoreProc64[QImage::NImageFormats] =
{
- 0, // Format_Invalid
- 0, // Format_Mono,
- 0, // Format_MonoLSB
- 0, // Format_Indexed8
+ nullptr, // Format_Invalid
+ nullptr, // Format_Mono,
+ nullptr, // Format_MonoLSB
+ nullptr, // Format_Indexed8
destStore64, // Format_RGB32
destStore64, // Format_ARGB32,
destStore64, // Format_ARGB32_Premultiplied
@@ -1980,9 +1980,9 @@ static DestStoreProc64 destStoreProc64[QImage::NImageFormats] =
destStore64, // Format_A2RGB30_Premultiplied
destStore64, // Format_Alpha8
destStore64, // Format_Grayscale8
- 0, // Format_RGBX64
+ nullptr, // Format_RGBX64
destStore64RGBA64, // Format_RGBA64
- 0, // Format_RGBA64_Premultiplied
+ nullptr, // Format_RGBA64_Premultiplied
destStore64, // Format_Grayscale16
destStore64, // Format_BGR888
};
@@ -3627,9 +3627,9 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64_uint32(QRgba64 *buf
#endif
fetcher(sbuf1, sbuf2, len, data->texture, fx, fy, fdx, fdy);
- layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, 0);
+ layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, nullptr);
if (disty)
- layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, 0);
+ layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, nullptr);
for (int i = 0; i < len; ++i) {
int distx = (fx & 0x0000ffff);
@@ -3662,8 +3662,8 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64_uint32(QRgba64 *buf
fetcher(sbuf1, sbuf2, len, data->texture, fx, fy, fdx, fdy);
- layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, 0);
- layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, 0);
+ layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, nullptr);
+ layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, nullptr);
for (int i = 0; i < len; ++i) {
int distx = (fx & 0x0000ffff);
@@ -3727,8 +3727,8 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64_uint32(QRgba64 *buf
fw += fdw;
}
- layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, 0);
- layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, 0);
+ layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, nullptr);
+ layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, nullptr);
for (int i = 0; i < len; ++i) {
int distx = distxs[i];
@@ -3907,7 +3907,7 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64(QRgba64 *buffer, co
// FetchUntransformed can have more specialized methods added depending on SIMD features.
static SourceFetchProc sourceFetchUntransformed[QImage::NImageFormats] = {
- 0, // Invalid
+ nullptr, // Invalid
fetchUntransformed, // Mono
fetchUntransformed, // MonoLsb
fetchUntransformed, // Indexed8
@@ -4348,9 +4348,9 @@ static inline Operator getOperator(const QSpanData *data, const QSpan *spans, in
switch(data->type) {
case QSpanData::Solid:
solidSource = data->solidColor.isOpaque();
- op.srcFetch = 0;
+ op.srcFetch = nullptr;
#if QT_CONFIG(raster_64bit)
- op.srcFetch64 = 0;
+ op.srcFetch64 = nullptr;
#endif
break;
case QSpanData::LinearGradient:
@@ -4721,7 +4721,7 @@ struct QBlendBase
QBlendBase(QSpanData *d, const Operator &o)
: data(d)
, op(o)
- , dest(0)
+ , dest(nullptr)
{
}
@@ -6401,21 +6401,21 @@ static void qt_rectfill_quint64(QRasterBuffer *rasterBuffer,
DrawHelper qDrawHelper[QImage::NImageFormats] =
{
// Format_Invalid,
- { 0, 0, 0, 0, 0 },
+ { nullptr, nullptr, nullptr, nullptr, nullptr },
// Format_Mono,
{
blend_color_generic,
- 0, 0, 0, 0
+ nullptr, nullptr, nullptr, nullptr
},
// Format_MonoLSB,
{
blend_color_generic,
- 0, 0, 0, 0
+ nullptr, nullptr, nullptr, nullptr
},
// Format_Indexed8,
{
blend_color_generic,
- 0, 0, 0, 0
+ nullptr, nullptr, nullptr, nullptr
},
// Format_RGB32,
{
@@ -6452,7 +6452,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB8565_Premultiplied
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6460,7 +6460,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB666
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6468,7 +6468,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB6666_Premultiplied
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6476,7 +6476,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB555
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint16
@@ -6484,7 +6484,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB8555_Premultiplied
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6492,7 +6492,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB888
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6500,7 +6500,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB444
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint16
@@ -6508,7 +6508,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB4444_Premultiplied
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint16
@@ -6572,7 +6572,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_Alpha8
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_alpha
@@ -6580,7 +6580,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_Grayscale8
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_gray
@@ -6588,7 +6588,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBX64
{
blend_color_generic_rgb64,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint64
@@ -6596,7 +6596,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBA64
{
blend_color_generic_rgb64,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint64
@@ -6604,7 +6604,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBA64_Premultiplied
{
blend_color_generic_rgb64,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint64
@@ -6612,7 +6612,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_Grayscale16
{
blend_color_generic_rgb64,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint16
@@ -6620,7 +6620,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_BGR888
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index 0c0df0fb13..7cd700a84a 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -271,7 +271,7 @@ void QEmulationPaintEngine::fillBGRect(const QRectF &r)
{
qreal pts[] = { r.x(), r.y(), r.x() + r.width(), r.y(),
r.x() + r.width(), r.y() + r.height(), r.x(), r.y() + r.height() };
- QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 4, nullptr, QVectorPath::RectangleHint);
real_engine->fill(vp, state()->bgBrush);
}
diff --git a/src/gui/painting/qimagescale.cpp b/src/gui/painting/qimagescale.cpp
index 0d7205b483..2e2f65b483 100644
--- a/src/gui/painting/qimagescale.cpp
+++ b/src/gui/painting/qimagescale.cpp
@@ -223,7 +223,7 @@ static QImageScaleInfo* QImageScale::qimageFreeScaleInfo(QImageScaleInfo *isi)
delete[] isi->yapoints;
delete isi;
}
- return 0;
+ return nullptr;
}
static QImageScaleInfo* QImageScale::qimageCalcScaleInfo(const QImage &img,
@@ -238,7 +238,7 @@ static QImageScaleInfo* QImageScale::qimageCalcScaleInfo(const QImage &img,
isi = new QImageScaleInfo;
if (!isi)
- return 0;
+ return nullptr;
isi->xup_yup = (qAbs(dw) >= sw) + ((qAbs(dh) >= sh) << 1);
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index b1f01332b6..7ebd2dbd09 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -45,6 +45,7 @@
#include "qregion.h"
#include "qpainterpath.h"
#include "qpainterpath_p.h"
+#include "qtransform.h"
#include "qvariant.h"
#include <qmath.h>
@@ -680,7 +681,7 @@ QRegion QMatrix::map(const QRegion &r) const
}
QPainterPath p = map(qt_regionToPath(r));
- return p.toFillPolygon().toPolygon();
+ return p.toFillPolygon(QTransform()).toPolygon();
}
/*!
@@ -1087,7 +1088,7 @@ QMatrix &QMatrix::operator=(const QMatrix &matrix) noexcept
*/
QMatrix::operator QVariant() const
{
- return QVariant(QVariant::Matrix, this);
+ return QVariant(QMetaType::QMatrix, this);
}
Q_GUI_EXPORT QPainterPath operator *(const QPainterPath &p, const QMatrix &m)
diff --git a/src/gui/painting/qmemrotate.cpp b/src/gui/painting/qmemrotate.cpp
index 9cb787fb2c..685fbbb37a 100644
--- a/src/gui/painting/qmemrotate.cpp
+++ b/src/gui/painting/qmemrotate.cpp
@@ -406,9 +406,9 @@ void qt_memrotate270_64(const uchar *srcPixels, int w, int h, int sbpl, uchar *d
MemRotateFunc qMemRotateFunctions[QPixelLayout::BPPCount][3] =
// 90, 180, 270
{
- { 0, 0, 0 }, // BPPNone,
- { 0, 0, 0 }, // BPP1MSB,
- { 0, 0, 0 }, // BPP1LSB,
+ { nullptr, nullptr, nullptr }, // BPPNone,
+ { nullptr, nullptr, nullptr }, // BPP1MSB,
+ { nullptr, nullptr, nullptr }, // BPP1LSB,
{ qt_memrotate90_8, qt_memrotate180_8, qt_memrotate270_8 }, // BPP8,
{ qt_memrotate90_16, qt_memrotate180_16, qt_memrotate270_16 }, // BPP16,
{ qt_memrotate90_24, qt_memrotate180_24, qt_memrotate270_24 }, // BPP24
diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp
index 2074f98069..67e450986d 100644
--- a/src/gui/painting/qoutlinemapper.cpp
+++ b/src/gui/painting/qoutlinemapper.cpp
@@ -209,7 +209,7 @@ void QOutlineMapper::endOutline()
elements[i] = m_transform.map(elements[i]);
} else {
const QVectorPath vp((qreal *)elements, m_elements.size(),
- m_element_types.size() ? m_element_types.data() : 0);
+ m_element_types.size() ? m_element_types.data() : nullptr);
QPainterPath path = vp.convertToPainterPath();
path = m_transform.map(path);
if (!(m_outline.flags & QT_FT_OUTLINE_EVEN_ODD_FILL))
diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp
index c98ca8a1fb..d73a66b790 100644
--- a/src/gui/painting/qpagesize.cpp
+++ b/src/gui/painting/qpagesize.cpp
@@ -394,7 +394,7 @@ static QString qt_keyForPageSizeId(QPageSize::PageSizeId id)
}
// Return id name for PPD Key
-static QPageSize::PageSizeId qt_idForPpdKey(const QString &ppdKey, QSize *match = 0)
+static QPageSize::PageSizeId qt_idForPpdKey(const QString &ppdKey, QSize *match = nullptr)
{
if (ppdKey.isEmpty())
return QPageSize::Custom;
@@ -415,7 +415,7 @@ static QPageSize::PageSizeId qt_idForPpdKey(const QString &ppdKey, QSize *match
}
// Return id name for Windows ID
-static QPageSize::PageSizeId qt_idForWindowsID(int windowsId, QSize *match = 0)
+static QPageSize::PageSizeId qt_idForWindowsID(int windowsId, QSize *match = nullptr)
{
// If outside known values then is Custom
if (windowsId <= DMPAPER_NONE || windowsId > DMPAPER_LAST)
@@ -770,7 +770,7 @@ QPageSizePrivate::QPageSizePrivate(const QSize &pointSize, const QString &name,
m_units(QPageSize::Point)
{
if (pointSize.isValid()) {
- QPageSize::PageSizeId id = qt_idForPointSize(pointSize, matchPolicy, 0);
+ QPageSize::PageSizeId id = qt_idForPointSize(pointSize, matchPolicy, nullptr);
id == QPageSize::Custom ? init(pointSize, name) : init(id, name);
}
}
@@ -782,7 +782,7 @@ QPageSizePrivate::QPageSizePrivate(const QSizeF &size, QPageSize::Unit units,
m_units(QPageSize::Point)
{
if (size.isValid()) {
- QPageSize::PageSizeId id = qt_idForSize(size, units, matchPolicy, 0);
+ QPageSize::PageSizeId id = qt_idForSize(size, units, matchPolicy, nullptr);
id == QPageSize::Custom ? init(size, units, name) : init(id, name);
}
}
@@ -793,10 +793,10 @@ QPageSizePrivate::QPageSizePrivate(const QString &key, const QSize &pointSize, c
m_units(QPageSize::Point)
{
if (!key.isEmpty() && pointSize.isValid()) {
- QPageSize::PageSizeId id = qt_idForPpdKey(key, 0);
+ QPageSize::PageSizeId id = qt_idForPpdKey(key, nullptr);
// If not a known PPD key, check if size is a standard PPD size
if (id == QPageSize::Custom)
- id = qt_idForPointSize(pointSize, QPageSize::FuzzyMatch, 0);
+ id = qt_idForPointSize(pointSize, QPageSize::FuzzyMatch, nullptr);
id == QPageSize::Custom ? init(pointSize, name) : init(id, name);
m_key = key;
}
@@ -808,10 +808,10 @@ QPageSizePrivate::QPageSizePrivate(int windowsId, const QSize &pointSize, const
m_units(QPageSize::Point)
{
if (windowsId > 0 && pointSize.isValid()) {
- QPageSize::PageSizeId id = qt_idForWindowsID(windowsId, 0);
+ QPageSize::PageSizeId id = qt_idForWindowsID(windowsId, nullptr);
// If not a known Windows ID, check if size is a standard PPD size
if (id == QPageSize::Custom)
- id = qt_idForPointSize(pointSize, QPageSize::FuzzyMatch, 0);
+ id = qt_idForPointSize(pointSize, QPageSize::FuzzyMatch, nullptr);
id == QPageSize::Custom ? init(pointSize, name) : init(id, name);
m_windowsId = windowsId;
}
@@ -1753,7 +1753,7 @@ QString QPageSize::name(PageSizeId pageSizeId)
QPageSize::PageSizeId QPageSize::id(const QSize &pointSize, SizeMatchPolicy matchPolicy)
{
- return qt_idForPointSize(pointSize, matchPolicy, 0);
+ return qt_idForPointSize(pointSize, matchPolicy, nullptr);
}
/*!
@@ -1769,7 +1769,7 @@ QPageSize::PageSizeId QPageSize::id(const QSize &pointSize, SizeMatchPolicy matc
QPageSize::PageSizeId QPageSize::id(const QSizeF &size, Unit units,
SizeMatchPolicy matchPolicy)
{
- return qt_idForSize(size, units, matchPolicy, 0);
+ return qt_idForSize(size, units, matchPolicy, nullptr);
}
/*!
diff --git a/src/gui/painting/qpaintdevice.cpp b/src/gui/painting/qpaintdevice.cpp
index 0ddfba6ee9..4afb89b52e 100644
--- a/src/gui/painting/qpaintdevice.cpp
+++ b/src/gui/painting/qpaintdevice.cpp
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
QPaintDevice::QPaintDevice() noexcept
{
- reserved = 0;
+ reserved = nullptr;
painters = 0;
}
@@ -67,7 +67,7 @@ void QPaintDevice::initPainter(QPainter *) const
*/
QPaintDevice *QPaintDevice::redirected(QPoint *) const
{
- return 0;
+ return nullptr;
}
/*!
@@ -75,7 +75,7 @@ QPaintDevice *QPaintDevice::redirected(QPoint *) const
*/
QPainter *QPaintDevice::sharedPainter() const
{
- return 0;
+ return nullptr;
}
Q_GUI_EXPORT int qt_paint_device_metric(const QPaintDevice *device, QPaintDevice::PaintDeviceMetric metric)
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index bfe1c9cadf..315bf0daf2 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -305,7 +305,7 @@ void QPaintEngine::syncState()
static_cast<QPaintEngineEx *>(this)->sync();
}
-static QPaintEngine *qt_polygon_recursion = 0;
+static QPaintEngine *qt_polygon_recursion = nullptr;
struct QT_Point {
int x;
int y;
@@ -334,7 +334,7 @@ void QPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDra
p[i].y = qRound(points[i].y());
}
drawPolygon((QPoint *)p.data(), pointCount, mode);
- qt_polygon_recursion = 0;
+ qt_polygon_recursion = nullptr;
}
struct QT_PointF {
@@ -363,7 +363,7 @@ void QPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDraw
p[i].y = points[i].y();
}
drawPolygon((QPointF *)p.data(), pointCount, mode);
- qt_polygon_recursion = 0;
+ qt_polygon_recursion = nullptr;
}
/*!
@@ -508,7 +508,7 @@ void QPaintEngine::drawEllipse(const QRectF &rect)
if (hasFeature(PainterPaths)) {
drawPath(path);
} else {
- QPolygonF polygon = path.toFillPolygon();
+ QPolygonF polygon = path.toFillPolygon(QTransform());
drawPolygon(polygon.data(), polygon.size(), ConvexMode);
}
}
@@ -691,7 +691,7 @@ void QPaintEngine::drawImage(const QRectF &r, const QImage &image, const QRectF
*/
QPaintEngine::QPaintEngine(PaintEngineFeatures caps)
- : state(0),
+ : state(nullptr),
gccaps(caps),
active(0),
selfDestruct(false),
@@ -706,7 +706,7 @@ QPaintEngine::QPaintEngine(PaintEngineFeatures caps)
*/
QPaintEngine::QPaintEngine(QPaintEnginePrivate &dptr, PaintEngineFeatures caps)
- : state(0),
+ : state(nullptr),
gccaps(caps),
active(0),
selfDestruct(false),
@@ -728,7 +728,7 @@ QPaintEngine::~QPaintEngine()
*/
QPainter *QPaintEngine::painter() const
{
- return state ? state->painter() : 0;
+ return state ? state->painter() : nullptr;
}
/*!
diff --git a/src/gui/painting/qpaintengine.h b/src/gui/painting/qpaintengine.h
index 9fb67e253e..e90020dbbf 100644
--- a/src/gui/painting/qpaintengine.h
+++ b/src/gui/painting/qpaintengine.h
@@ -273,7 +273,9 @@ public:
QBrush backgroundBrush() const;
Qt::BGMode backgroundMode() const;
QFont font() const;
- QMatrix matrix() const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use transform()") QMatrix matrix() const;
+#endif // QT_DEPRECATED_SINCE(5, 15)
QTransform transform() const;
Qt::ClipOperation clipOperation() const;
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 40c822076b..10920c38fe 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -115,17 +115,17 @@ public:
pts[7] = bottom;
}
inline QRectVectorPath(const QRect &r)
- : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
+ : QVectorPath(pts, 4, nullptr, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
{
set(r);
}
inline QRectVectorPath(const QRectF &r)
- : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
+ : QVectorPath(pts, 4, nullptr, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
{
set(r);
}
inline QRectVectorPath()
- : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
+ : QVectorPath(pts, 4, nullptr, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
{ }
qreal pts[8];
@@ -342,7 +342,7 @@ QRasterPaintEnginePrivate::QRasterPaintEnginePrivate() :
*/
/*!
- \fn Type QRasterPaintEngine::type() const
+ \fn QPaintEngine::Type QRasterPaintEngine::type() const
\reimp
*/
@@ -433,7 +433,7 @@ void QRasterPaintEngine::init()
break;
default:
qWarning("QRasterPaintEngine: unsupported target device %d\n", d->device->devType());
- d->device = 0;
+ d->device = nullptr;
return;
}
@@ -601,7 +601,7 @@ QRasterPaintEngineState::~QRasterPaintEngineState()
QRasterPaintEngineState::QRasterPaintEngineState()
{
- stroker = 0;
+ stroker = nullptr;
fillFlags = 0;
strokeFlags = 0;
@@ -621,7 +621,7 @@ QRasterPaintEngineState::QRasterPaintEngineState()
flags.tx_noshear = true;
flags.fast_images = true;
- clip = 0;
+ clip = nullptr;
flags.has_clip_ownership = false;
dirty = 0;
@@ -643,8 +643,8 @@ QRasterPaintEngineState::QRasterPaintEngineState(QRasterPaintEngineState &s)
, dirty(s.dirty)
, flag_bits(s.flag_bits)
{
- brushData.tempImage = 0;
- penData.tempImage = 0;
+ brushData.tempImage = nullptr;
+ penData.tempImage = nullptr;
flags.has_clip_ownership = false;
}
@@ -759,7 +759,7 @@ void QRasterPaintEngine::updatePen(const QPen &pen)
d->dashStroker->setDashOffset(pen.dashOffset());
s->stroker = d->dashStroker.data();
} else {
- s->stroker = 0;
+ s->stroker = nullptr;
}
ensureRasterState(); // needed because of tx_noshear...
@@ -1207,7 +1207,7 @@ static void qrasterpaintengine_state_setNoClip(QRasterPaintEngineState *s)
{
if (s->flags.has_clip_ownership)
delete s->clip;
- s->clip = 0;
+ s->clip = nullptr;
s->flags.has_clip_ownership = false;
}
@@ -1279,14 +1279,14 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
// intersect with, in which case we simplify the operation to
// a replace...
Qt::ClipOperation isectOp = Qt::IntersectClip;
- if (base == 0)
+ if (base == nullptr)
isectOp = Qt::ReplaceClip;
QClipData *newClip = new QClipData(d->rasterBuffer->height());
newClip->initialize();
ClipData clipData = { base, newClip, isectOp };
ensureOutlineMapper();
- d->rasterize(d->outlineMapper->convertPath(path), qt_span_clip, &clipData, 0);
+ d->rasterize(d->outlineMapper->convertPath(path), qt_span_clip, &clipData, nullptr);
newClip->fixup();
@@ -1334,7 +1334,7 @@ bool QRasterPaintEngine::setClipRectInDeviceCoords(const QRect &r, Qt::ClipOpera
QRect clipRect = qrect_normalized(r) & d->deviceRect;
QRasterPaintEngineState *s = state();
- if (op == Qt::ReplaceClip || s->clip == 0) {
+ if (op == Qt::ReplaceClip || s->clip == nullptr) {
// No current clip, hence we intersect with sysclip and be
// done with it...
@@ -1970,7 +1970,7 @@ void QRasterPaintEngine::fillPolygon(const QPointF *points, int pointCount, Poly
}
// Compose polygon fill..,
- QVectorPath vp((const qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath vp((const qreal *) points, pointCount, nullptr, QVectorPath::polygonFlags(mode));
ensureOutlineMapper();
QT_FT_Outline *outline = d->outlineMapper->convertPath(vp);
@@ -2011,7 +2011,7 @@ void QRasterPaintEngine::drawPolygon(const QPointF *points, int pointCount, Poly
// Do the outline...
if (s->penData.blend) {
- QVectorPath vp((const qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath vp((const qreal *) points, pointCount, nullptr, QVectorPath::polygonFlags(mode));
if (s->flags.fast_pen) {
QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped);
stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding);
@@ -2075,7 +2075,7 @@ void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, Polyg
QVarLengthArray<qreal> fpoints(count);
for (int i=0; i<count; ++i)
fpoints[i] = ((const int *) points)[i];
- QVectorPath vp((qreal *) fpoints.data(), pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath vp((qreal *) fpoints.data(), pointCount, nullptr, QVectorPath::polygonFlags(mode));
if (s->flags.fast_pen) {
QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped);
@@ -2695,14 +2695,14 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
} else if (depth == 8) {
if (s->penData.alphamapBlit) {
s->penData.alphamapBlit(rb, rx, ry, s->penData.solidColor,
- scanline, w, h, bpl, 0, useGammaCorrection);
+ scanline, w, h, bpl, nullptr, useGammaCorrection);
return;
}
} else if (depth == 32) {
// (A)RGB Alpha mask where the alpha component is not used.
if (s->penData.alphaRGBBlit) {
s->penData.alphaRGBBlit(rb, rx, ry, s->penData.solidColor,
- (const uint *) scanline, w, h, bpl / 4, 0, useGammaCorrection);
+ (const uint *) scanline, w, h, bpl / 4, nullptr, useGammaCorrection);
return;
}
}
@@ -2917,10 +2917,10 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
QFontEngine::GlyphFormat glyphFormat = fontEngine->glyphFormat != QFontEngine::Format_None ? fontEngine->glyphFormat : d->glyphCacheFormat;
QImageTextureGlyphCache *cache =
- static_cast<QImageTextureGlyphCache *>(fontEngine->glyphCache(0, glyphFormat, s->matrix, QColor(s->penData.solidColor)));
+ static_cast<QImageTextureGlyphCache *>(fontEngine->glyphCache(nullptr, glyphFormat, s->matrix, QColor(s->penData.solidColor)));
if (!cache) {
cache = new QImageTextureGlyphCache(glyphFormat, s->matrix, QColor(s->penData.solidColor));
- fontEngine->setGlyphCache(0, cache);
+ fontEngine->setGlyphCache(nullptr, cache);
}
cache->populate(fontEngine, numGlyphs, glyphs, positions);
@@ -3672,7 +3672,7 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
int rasterPoolSize = MINIMUM_POOL_SIZE;
uchar rasterPoolOnStack[MINIMUM_POOL_SIZE + 0xf];
uchar *rasterPoolBase = alignAddress(rasterPoolOnStack, 0xf);
- uchar *rasterPoolOnHeap = 0;
+ uchar *rasterPoolOnHeap = nullptr;
qt_ft_grays_raster.raster_reset(*grayRaster.data(), rasterPoolBase, rasterPoolSize);
@@ -3684,13 +3684,13 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
deviceRect.y() + deviceRect.height() };
QT_FT_Raster_Params rasterParams;
- rasterParams.target = 0;
+ rasterParams.target = nullptr;
rasterParams.source = outline;
rasterParams.flags = QT_FT_RASTER_FLAG_CLIP;
- rasterParams.gray_spans = 0;
- rasterParams.black_spans = 0;
- rasterParams.bit_test = 0;
- rasterParams.bit_set = 0;
+ rasterParams.gray_spans = nullptr;
+ rasterParams.black_spans = nullptr;
+ rasterParams.bit_test = nullptr;
+ rasterParams.bit_set = nullptr;
rasterParams.user = data;
rasterParams.clip_box = clip_box;
@@ -3843,10 +3843,10 @@ QImage::Format QRasterBuffer::prepare(QImage *image)
QClipData::QClipData(int height)
{
clipSpanHeight = height;
- m_clipLines = 0;
+ m_clipLines = nullptr;
allocated = 0;
- m_spans = 0;
+ m_spans = nullptr;
xmin = xmax = ymin = ymax = 0;
count = 0;
@@ -3890,7 +3890,7 @@ void QClipData::initialize()
const int currMaxY = currMinY + rects[firstInBand].height();
while (y < currMinY) {
- m_clipLines[y].spans = 0;
+ m_clipLines[y].spans = nullptr;
m_clipLines[y].count = 0;
++y;
}
@@ -3922,7 +3922,7 @@ void QClipData::initialize()
Q_ASSERT(count <= allocated);
while (y < clipSpanHeight) {
- m_clipLines[y].spans = 0;
+ m_clipLines[y].spans = nullptr;
m_clipLines[y].count = 0;
++y;
}
@@ -3936,7 +3936,7 @@ void QClipData::initialize()
if (hasRectClip) {
int y = 0;
while (y < ymin) {
- m_clipLines[y].spans = 0;
+ m_clipLines[y].spans = nullptr;
m_clipLines[y].count = 0;
++y;
}
@@ -3957,19 +3957,19 @@ void QClipData::initialize()
}
while (y < clipSpanHeight) {
- m_clipLines[y].spans = 0;
+ m_clipLines[y].spans = nullptr;
m_clipLines[y].count = 0;
++y;
}
}
} QT_CATCH(...) {
free(m_spans); // have to free m_spans again or someone might think that we were successfully initialized.
- m_spans = 0;
+ m_spans = nullptr;
QT_RETHROW;
}
} QT_CATCH(...) {
free(m_clipLines); // same for clipLines
- m_clipLines = 0;
+ m_clipLines = nullptr;
QT_RETHROW;
}
}
@@ -4044,7 +4044,7 @@ void QClipData::setClipRect(const QRect &rect)
if (m_spans) {
free(m_spans);
- m_spans = 0;
+ m_spans = nullptr;
}
// qDebug() << xmin << xmax << ymin << ymax;
@@ -4074,7 +4074,7 @@ void QClipData::setClipRegion(const QRegion &region)
if (m_spans) {
free(m_spans);
- m_spans = 0;
+ m_spans = nullptr;
}
}
@@ -4532,7 +4532,7 @@ void QSpanData::init(QRasterBuffer *rb, const QRasterPaintEngine *pe)
bilinear = false;
m11 = m22 = m33 = 1.;
m12 = m13 = m21 = m23 = dx = dy = 0.0;
- clip = pe ? pe->d_func()->clip() : 0;
+ clip = pe ? pe->d_func()->clip() : nullptr;
}
Q_GUI_EXPORT extern QImage qt_imageForBrush(int brushStyle, bool invert);
@@ -4668,15 +4668,15 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode
void QSpanData::adjustSpanMethods()
{
- bitmapBlit = 0;
- alphamapBlit = 0;
- alphaRGBBlit = 0;
+ bitmapBlit = nullptr;
+ alphamapBlit = nullptr;
+ alphaRGBBlit = nullptr;
- fillRect = 0;
+ fillRect = nullptr;
switch(type) {
case None:
- unclipped_blend = 0;
+ unclipped_blend = nullptr;
break;
case Solid: {
const DrawHelper &drawHelper = qDrawHelper[rasterBuffer->format];
@@ -4695,17 +4695,17 @@ void QSpanData::adjustSpanMethods()
case Texture:
unclipped_blend = qBlendTexture;
if (!texture.imageData)
- unclipped_blend = 0;
+ unclipped_blend = nullptr;
break;
}
// setup clipping
if (!unclipped_blend) {
- blend = 0;
+ blend = nullptr;
} else if (!clip) {
blend = unclipped_blend;
} else if (clip->hasRectClip) {
- blend = clip->clipRect.isEmpty() ? 0 : qt_span_fill_clipRect;
+ blend = clip->clipRect.isEmpty() ? nullptr : qt_span_fill_clipRect;
} else {
blend = qt_span_fill_clipped;
}
@@ -4748,7 +4748,7 @@ void QSpanData::initTexture(const QImage *image, int alpha, QTextureData::Type _
{
const QImageData *d = const_cast<QImage *>(image)->data_ptr();
if (!d || d->height == 0) {
- texture.imageData = 0;
+ texture.imageData = nullptr;
texture.width = 0;
texture.height = 0;
texture.x1 = 0;
@@ -4757,7 +4757,7 @@ void QSpanData::initTexture(const QImage *image, int alpha, QTextureData::Type _
texture.y2 = 0;
texture.bytesPerLine = 0;
texture.format = QImage::Format_Invalid;
- texture.colorTable = 0;
+ texture.colorTable = nullptr;
texture.hasAlpha = alpha != 256;
} else {
texture.imageData = d->data;
@@ -4779,7 +4779,7 @@ void QSpanData::initTexture(const QImage *image, int alpha, QTextureData::Type _
texture.bytesPerLine = d->bytes_per_line;
texture.format = d->format;
- texture.colorTable = (d->format <= QImage::Format_Indexed8 && !d->colortable.isEmpty()) ? &d->colortable : 0;
+ texture.colorTable = (d->format <= QImage::Format_Indexed8 && !d->colortable.isEmpty()) ? &d->colortable : nullptr;
texture.hasAlpha = image->hasAlphaChannel() || alpha != 256;
}
texture.const_alpha = alpha;
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 8314e8bc8a..5d8f89eadd 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -115,7 +115,7 @@ QVectorPath::CacheEntry *QVectorPath::addCacheData(QPaintEngineEx *engine, void
qvectorpath_cache_cleanup cleanup) const{
Q_ASSERT(!lookupCacheData(engine));
if ((m_hints & IsCachedHint) == 0) {
- m_cache = 0;
+ m_cache = nullptr;
m_hints |= IsCachedHint;
}
CacheEntry *e = new CacheEntry;
@@ -162,8 +162,8 @@ struct StrokeHandler {
QPaintEngineExPrivate::QPaintEngineExPrivate()
: dasher(&stroker),
- strokeHandler(0),
- activeStroker(0),
+ strokeHandler(nullptr),
+ activeStroker(nullptr),
strokerPen(Qt::NoPen)
{
}
@@ -211,7 +211,7 @@ void QPaintEngineExPrivate::replayClipOperations()
right, info.rectf.y(),
right, bottom,
info.rectf.x(), bottom };
- QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 4, nullptr, QVectorPath::RectangleHint);
q->clip(vp, info.operation);
break;
}
@@ -418,7 +418,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
if (style == Qt::SolidLine) {
d->activeStroker = &d->stroker;
} else if (style == Qt::NoPen) {
- d->activeStroker = 0;
+ d->activeStroker = nullptr;
} else {
d->dasher.setDashPattern(pen.dashPattern());
d->dasher.setDashOffset(pen.dashOffset());
@@ -616,7 +616,7 @@ void QPaintEngineEx::clip(const QRect &r, Qt::ClipOperation op)
right, bottom,
qreal(r.x()), bottom,
qreal(r.x()), qreal(r.y()) };
- QVectorPath vp(pts, 5, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 5, nullptr, QVectorPath::RectangleHint);
clip(vp, op);
}
@@ -687,7 +687,7 @@ void QPaintEngineEx::clip(const QRegion &region, Qt::ClipOperation op)
void QPaintEngineEx::clip(const QPainterPath &path, Qt::ClipOperation op)
{
if (path.isEmpty()) {
- QVectorPath vp(0, 0);
+ QVectorPath vp(nullptr, 0);
clip(vp, op);
} else {
clip(qtVectorPathForPath(path), op);
@@ -698,7 +698,7 @@ void QPaintEngineEx::fillRect(const QRectF &r, const QBrush &brush)
{
qreal pts[] = { r.x(), r.y(), r.x() + r.width(), r.y(),
r.x() + r.width(), r.y() + r.height(), r.x(), r.y() + r.height() };
- QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 4, nullptr, QVectorPath::RectangleHint);
fill(vp, brush);
}
@@ -719,7 +719,7 @@ void QPaintEngineEx::drawRects(const QRect *rects, int rectCount)
right, bottom,
qreal(r.x()), bottom,
qreal(r.x()), qreal(r.y()) };
- QVectorPath vp(pts, 5, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 5, nullptr, QVectorPath::RectangleHint);
draw(vp);
}
}
@@ -735,7 +735,7 @@ void QPaintEngineEx::drawRects(const QRectF *rects, int rectCount)
right, bottom,
r.x(), bottom,
r.x(), r.y() };
- QVectorPath vp(pts, 5, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 5, nullptr, QVectorPath::RectangleHint);
draw(vp);
}
}
@@ -871,7 +871,7 @@ void QPaintEngineEx::drawPoints(const QPointF *points, int pointCount)
} else {
for (int i=0; i<pointCount; ++i) {
qreal pts[] = { points[i].x(), points[i].y(), points[i].x() + qreal(1/63.), points[i].y() };
- QVectorPath path(pts, 2, 0);
+ QVectorPath path(pts, 2, nullptr);
stroke(path, pen);
}
}
@@ -903,7 +903,7 @@ void QPaintEngineEx::drawPoints(const QPoint *points, int pointCount)
for (int i=0; i<pointCount; ++i) {
qreal pts[] = { qreal(points[i].x()), qreal(points[i].y()),
qreal(points[i].x() +1/63.), qreal(points[i].y()) };
- QVectorPath path(pts, 2, 0);
+ QVectorPath path(pts, 2, nullptr);
stroke(path, pen);
}
}
@@ -912,7 +912,7 @@ void QPaintEngineEx::drawPoints(const QPoint *points, int pointCount)
void QPaintEngineEx::drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
{
- QVectorPath path((const qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath path((const qreal *) points, pointCount, nullptr, QVectorPath::polygonFlags(mode));
if (mode == PolylineMode)
stroke(path, state()->pen);
@@ -928,7 +928,7 @@ void QPaintEngineEx::drawPolygon(const QPoint *points, int pointCount, PolygonDr
for (int i=0; i<count; ++i)
pts[i] = ((const int *) points)[i];
- QVectorPath path(pts.data(), pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath path(pts.data(), pointCount, nullptr, QVectorPath::polygonFlags(mode));
if (mode == PolylineMode)
stroke(path, state()->pen);
@@ -960,7 +960,7 @@ void QPaintEngineEx::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, con
r.x() + r.width(), r.y() + r.height(),
r.x(), r.y() + r.height() };
- QVectorPath path(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath path(pts, 4, nullptr, QVectorPath::RectangleHint);
fill(path, brush);
}
@@ -1061,7 +1061,7 @@ void QPaintEngineEx::drawStaticTextItem(QStaticTextItem *staticTextItem)
QFontEngine *fontEngine = staticTextItem->fontEngine();
fontEngine->addGlyphsToPath(staticTextItem->glyphs, staticTextItem->glyphPositions,
- staticTextItem->numGlyphs, &path, 0);
+ staticTextItem->numGlyphs, &path, { });
if (!path.isEmpty()) {
QPainterState *s = state();
QPainter::RenderHints oldHints = s->renderHints;
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 75e7dc49fd..390147463d 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -330,7 +330,7 @@ void QPainterPrivate::detachPainterPrivate(QPainter *q)
original = new QPainterPrivate(q);
}
- d_ptrs[refcount - 1] = 0;
+ d_ptrs[refcount - 1] = nullptr;
q->restore();
q->d_ptr.take();
q->d_ptr.reset(original);
@@ -338,7 +338,7 @@ void QPainterPrivate::detachPainterPrivate(QPainter *q)
if (emulationEngine) {
extended = emulationEngine->real_engine;
delete emulationEngine;
- emulationEngine = 0;
+ emulationEngine = nullptr;
}
}
@@ -1484,9 +1484,9 @@ QPainter::QPainter()
*/
QPainter::QPainter(QPaintDevice *pd)
- : d_ptr(0)
+ : d_ptr(nullptr)
{
- Q_ASSERT(pd != 0);
+ Q_ASSERT(pd != nullptr);
if (!QPainterPrivate::attachPainterPrivate(this, pd)) {
d_ptr.reset(new QPainterPrivate(this));
begin(pd);
@@ -1717,9 +1717,9 @@ static inline void qt_cleanup_painter_state(QPainterPrivate *d)
{
qDeleteAll(d->states);
d->states.clear();
- d->state = 0;
- d->engine = 0;
- d->device = 0;
+ d->state = nullptr;
+ d->engine = nullptr;
+ d->device = nullptr;
}
bool QPainter::begin(QPaintDevice *pd)
@@ -1768,13 +1768,13 @@ bool QPainter::begin(QPaintDevice *pd)
d->device = pd;
- d->extended = d->engine->isExtended() ? static_cast<QPaintEngineEx *>(d->engine) : 0;
+ d->extended = d->engine->isExtended() ? static_cast<QPaintEngineEx *>(d->engine) : nullptr;
if (d->emulationEngine)
d->emulationEngine->real_engine = d->extended;
// Setup new state...
Q_ASSERT(!d->state);
- d->state = d->extended ? d->extended->createState(0) : new QPainterState;
+ d->state = d->extended ? d->extended->createState(nullptr) : new QPainterState;
d->state->painter = this;
d->states.push_back(d->state);
@@ -1914,11 +1914,11 @@ bool QPainter::end()
if (d->engine->isActive()) {
ended = d->engine->end();
- d->updateState(0);
+ d->updateState(nullptr);
--d->device->painters;
if (d->device->painters == 0) {
- d->engine->setPaintDevice(0);
+ d->engine->setPaintDevice(nullptr);
d->engine->setActive(false);
}
}
@@ -1934,11 +1934,11 @@ bool QPainter::end()
if (d->emulationEngine) {
delete d->emulationEngine;
- d->emulationEngine = 0;
+ d->emulationEngine = nullptr;
}
if (d->extended) {
- d->extended = 0;
+ d->extended = nullptr;
}
qt_cleanup_painter_state(d);
@@ -2555,19 +2555,19 @@ QRegion QPainter::clipRegion() const
case QPainterClipInfo::PathClip: {
QTransform matrix = (info.matrix * d->invMatrix);
if (lastWasNothing) {
- region = QRegion((info.path * matrix).toFillPolygon().toPolygon(),
+ region = QRegion((info.path * matrix).toFillPolygon(QTransform()).toPolygon(),
info.path.fillRule());
lastWasNothing = false;
continue;
}
if (info.operation == Qt::IntersectClip) {
- region &= QRegion((info.path * matrix).toFillPolygon().toPolygon(),
+ region &= QRegion((info.path * matrix).toFillPolygon(QTransform()).toPolygon(),
info.path.fillRule());
} else if (info.operation == Qt::NoClip) {
lastWasNothing = true;
region = QRegion();
} else {
- region = QRegion((info.path * matrix).toFillPolygon().toPolygon(),
+ region = QRegion((info.path * matrix).toFillPolygon(QTransform()).toPolygon(),
info.path.fillRule());
}
break;
@@ -2760,7 +2760,7 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op)
right, rect.y(),
right, bottom,
rect.x(), bottom };
- QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 4, nullptr, QVectorPath::RectangleHint);
d->state->clipEnabled = true;
d->extended->clip(vp, op);
if (op == Qt::ReplaceClip || op == Qt::NoClip)
@@ -5641,7 +5641,7 @@ void QPainterPrivate::drawGlyphs(const quint32 *glyphArray, QFixedPoint *positio
QFixed width = rightMost - leftMost;
- if (extended != 0 && state->matrix.isAffine()) {
+ if (extended != nullptr && state->matrix.isAffine()) {
QStaticTextItem staticTextItem;
staticTextItem.color = state->pen.color();
staticTextItem.font = state->font;
@@ -5684,7 +5684,7 @@ void QPainterPrivate::drawGlyphs(const quint32 *glyphArray, QFixedPoint *positio
drawTextItemDecoration(q, QPointF(leftMost.toReal(), baseLine.toReal()),
fontEngine,
- 0, // textEngine
+ nullptr, // textEngine
(underline
? QTextCharFormat::SingleUnderline
: QTextCharFormat::NoUnderline),
@@ -5780,7 +5780,7 @@ void QPainter::drawStaticText(const QPointF &topLeftPosition, const QStaticText
// If we don't have an extended paint engine, if the painter is projected,
// or if the font engine does not support the matrix, we go through standard
// code path
- if (d->extended == 0
+ if (d->extended == nullptr
|| !d->state->matrix.isAffine()
|| !fe->supportsTransformation(d->state->matrix)) {
staticText_d->paintText(topLeftPosition, this, pen().color());
@@ -5901,7 +5901,7 @@ void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justif
int numGlyphs = len;
QVarLengthGlyphLayoutArray glyphs(len);
QFontEngine *fontEngine = d->state->font.d->engineForScript(QChar::Script_Common);
- if (!fontEngine->stringToCMap(str.data(), len, &glyphs, &numGlyphs, 0))
+ if (!fontEngine->stringToCMap(str.data(), len, &glyphs, &numGlyphs, { }))
Q_UNREACHABLE();
QTextItemInt gf(glyphs, &d->state->font, str.data(), len, fontEngine);
@@ -5980,7 +5980,7 @@ void QPainter::drawText(const QRect &r, int flags, const QString &str, QRect *br
d->updateState(d->state);
QRectF bounds;
- qt_format_text(d->state->font, r, flags, 0, str, br ? &bounds : 0, 0, 0, 0, this);
+ qt_format_text(d->state->font, r, flags, nullptr, str, br ? &bounds : nullptr, 0, nullptr, 0, this);
if (br)
*br = bounds.toAlignedRect();
}
@@ -6066,7 +6066,7 @@ void QPainter::drawText(const QRectF &r, int flags, const QString &str, QRectF *
if (!d->extended)
d->updateState(d->state);
- qt_format_text(d->state->font, r, flags, 0, str, br, 0, 0, 0, this);
+ qt_format_text(d->state->font, r, flags, nullptr, str, br, 0, nullptr, 0, this);
}
/*!
@@ -6184,7 +6184,7 @@ void QPainter::drawText(const QRectF &r, const QString &text, const QTextOption
if (!d->extended)
d->updateState(d->state);
- qt_format_text(d->state->font, r, 0, &o, text, 0, 0, 0, 0, this);
+ qt_format_text(d->state->font, r, 0, &o, text, nullptr, 0, nullptr, 0, this);
}
/*!
@@ -6403,7 +6403,7 @@ Q_GUI_EXPORT void qt_draw_decoration_for_glyphs(QPainter *painter, const glyph_t
}
QFixed width = rightMost - leftMost;
- QTextItem::RenderFlags flags = 0;
+ QTextItem::RenderFlags flags;
if (font.underline())
flags |= QTextItem::Underline;
@@ -6414,7 +6414,7 @@ Q_GUI_EXPORT void qt_draw_decoration_for_glyphs(QPainter *painter, const glyph_t
drawTextItemDecoration(painter, QPointF(leftMost.toReal(), baseLine.toReal()),
fontEngine,
- 0, // textEngine
+ nullptr, // textEngine
font.underline() ? QTextCharFormat::SingleUnderline
: QTextCharFormat::NoUnderline, flags,
width.toReal(), charFormat);
@@ -6424,7 +6424,7 @@ void QPainter::drawTextItem(const QPointF &p, const QTextItem &ti)
{
Q_D(QPainter);
- d->drawTextItem(p, ti, static_cast<QTextEngine *>(0));
+ d->drawTextItem(p, ti, static_cast<QTextEngine *>(nullptr));
}
void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QTextEngine *textEngine)
@@ -6681,7 +6681,7 @@ QRectF QPainter::boundingRect(const QRectF &r, const QString &text, const QTextO
return QRectF(r.x(),r.y(), 0,0);
QRectF br;
- qt_format_text(d->state->font, r, Qt::TextDontPrint, &o, text, &br, 0, 0, 0, this);
+ qt_format_text(d->state->font, r, Qt::TextDontPrint, &o, text, &br, 0, nullptr, 0, this);
return br;
}
@@ -7212,7 +7212,7 @@ QPainter::RenderHints QPainter::renderHints() const
Q_D(const QPainter);
if (!d->engine)
- return 0;
+ return { };
return d->state->renderHints;
}
@@ -7428,7 +7428,7 @@ void QPainter::setRedirected(const QPaintDevice *device,
QPaintDevice *replacement,
const QPoint &offset)
{
- Q_ASSERT(device != 0);
+ Q_ASSERT(device != nullptr);
Q_UNUSED(device)
Q_UNUSED(replacement)
Q_UNUSED(offset)
@@ -7479,7 +7479,7 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset)
{
Q_UNUSED(device)
Q_UNUSED(offset)
- return 0;
+ return nullptr;
}
#endif
@@ -7489,7 +7489,7 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
QPainter *painter)
{
qt_format_text(fnt, _r,
- tf, 0, str, brect,
+ tf, nullptr, str, brect,
tabstops, ta, tabarraylen,
painter);
}
@@ -7499,7 +7499,7 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
QPainter *painter)
{
- Q_ASSERT( !((tf & ~Qt::TextDontPrint)!=0 && option!=0) ); // we either have an option or flags
+ Q_ASSERT( !((tf & ~Qt::TextDontPrint)!=0 && option!=nullptr) ); // we either have an option or flags
if (option) {
tf |= option->alignment();
@@ -7785,16 +7785,9 @@ QPainterState::QPainterState(const QPainterState *s)
}
QPainterState::QPainterState()
- : brushOrigin(0, 0), bgBrush(Qt::white), clipOperation(Qt::NoClip),
- renderHints(0),
- wx(0), wy(0), ww(0), wh(0), vx(0), vy(0), vw(0), vh(0),
- opacity(1), WxF(false), VxF(false), clipEnabled(true),
- bgMode(Qt::TransparentMode), painter(0),
- layoutDirection(QGuiApplication::layoutDirection()),
- composition_mode(QPainter::CompositionMode_SourceOver),
- emulationSpecifier(0), changeFlags(0)
+ : brushOrigin(0, 0), WxF(false), VxF(false), clipEnabled(true),
+ layoutDirection(QGuiApplication::layoutDirection())
{
- dirtyFlags = 0;
}
QPainterState::~QPainterState()
@@ -7823,9 +7816,9 @@ void QPainterState::init(QPainter *p) {
layoutDirection = QGuiApplication::layoutDirection();
composition_mode = QPainter::CompositionMode_SourceOver;
emulationSpecifier = 0;
- dirtyFlags = 0;
+ dirtyFlags = { };
changeFlags = 0;
- renderHints = 0;
+ renderHints = { };
opacity = 1;
}
@@ -7882,7 +7875,7 @@ void QPainterState::init(QPainter *p) {
/*!
\fn void QPainter::drawImage(const QPointF &point, const QImage &image, const QRectF &source,
- Qt::ImageConversionFlags flags = 0)
+ Qt::ImageConversionFlags flags = Qt::AutoColor)
\overload
@@ -7892,7 +7885,7 @@ void QPainterState::init(QPainter *p) {
/*!
\fn void QPainter::drawImage(const QPoint &point, const QImage &image, const QRect &source,
- Qt::ImageConversionFlags flags = 0)
+ Qt::ImageConversionFlags flags = Qt::AutoColor)
\overload
Draws the rectangular portion \a source of the given \a image with
@@ -8096,6 +8089,8 @@ QFont QPaintEngineState::font() const
\since 4.2
\obsolete
+ Use transform() instead.
+
Returns the matrix in the current paint engine
state.
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h
index 3394da63c7..77c6504d2e 100644
--- a/src/gui/painting/qpainter.h
+++ b/src/gui/painting/qpainter.h
@@ -72,7 +72,6 @@ class QPen;
class QPolygon;
class QTextItem;
class QTextEngine;
-class QMatrix;
class QTransform;
class QStaticText;
class QGlyphRun;
diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h
index 29d4880eb9..dafd6e33be 100644
--- a/src/gui/painting/qpainter_p.h
+++ b/src/gui/painting/qpainter_p.h
@@ -59,7 +59,6 @@
#include "QtGui/qfont.h"
#include "QtGui/qpen.h"
#include "QtGui/qregion.h"
-#include "QtGui/qmatrix.h"
#include "QtGui/qpainter.h"
#include "QtGui/qpainterpath.h"
#include "QtGui/qpaintengine.h"
@@ -154,29 +153,29 @@ public:
QFont deviceFont;
QPen pen;
QBrush brush;
- QBrush bgBrush; // background brush
+ QBrush bgBrush = Qt::white; // background brush
QRegion clipRegion;
QPainterPath clipPath;
- Qt::ClipOperation clipOperation;
+ Qt::ClipOperation clipOperation = Qt::NoClip;
QPainter::RenderHints renderHints;
QVector<QPainterClipInfo> clipInfo; // ### Make me smaller and faster to copy around...
QTransform worldMatrix; // World transformation matrix, not window and viewport
QTransform matrix; // Complete transformation matrix,
QTransform redirectionMatrix;
- int wx, wy, ww, wh; // window rectangle
- int vx, vy, vw, vh; // viewport rectangle
- qreal opacity;
+ int wx = 0, wy = 0, ww = 0, wh = 0; // window rectangle
+ int vx = 0, vy = 0, vw = 0, vh = 0; // viewport rectangle
+ qreal opacity = 1;
uint WxF:1; // World transformation
uint VxF:1; // View transformation
uint clipEnabled:1;
- Qt::BGMode bgMode;
- QPainter *painter;
+ Qt::BGMode bgMode = Qt::TransparentMode;
+ QPainter *painter = nullptr;
Qt::LayoutDirection layoutDirection;
- QPainter::CompositionMode composition_mode;
- uint emulationSpecifier;
- uint changeFlags;
+ QPainter::CompositionMode composition_mode = QPainter::CompositionMode_SourceOver;
+ uint emulationSpecifier = 0;
+ uint changeFlags = 0;
};
struct QPainterDummyState
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 1fb37ece56..ab60afd9cd 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -546,7 +546,7 @@ void QPainterPath::setElementPositionAt(int i, qreal x, qreal y)
Constructs an empty QPainterPath object.
*/
QPainterPath::QPainterPath() noexcept
- : d_ptr(0)
+ : d_ptr(nullptr)
{
}
@@ -602,7 +602,7 @@ void QPainterPath::ensureData_helper()
QPainterPath::Element e = { 0, 0, QPainterPath::MoveToElement };
data->elements << e;
d_ptr.reset(data);
- Q_ASSERT(d_ptr != 0);
+ Q_ASSERT(d_ptr != nullptr);
}
/*!
@@ -1036,7 +1036,7 @@ void QPainterPath::arcMoveTo(const QRectF &rect, qreal angle)
return;
QPointF pt;
- qt_find_ellipse_coords(rect, angle, 0, &pt, 0);
+ qt_find_ellipse_coords(rect, angle, 0, &pt, nullptr);
moveTo(pt);
}
@@ -1253,7 +1253,7 @@ void QPainterPath::addText(const QPointF &point, const QFont &f, const QString &
fe->addOutlineToPath(x, y, glyphs, this,
si.analysis.bidiLevel % 2
? QTextItem::RenderFlags(QTextItem::RightToLeft)
- : QTextItem::RenderFlags(0));
+ : QTextItem::RenderFlags{});
const qreal lw = fe->lineThickness().toReal();
if (f.d->underline) {
@@ -1660,13 +1660,18 @@ QList<QPolygonF> QPainterPath::toSubpathPolygons(const QTransform &matrix) const
return flatCurves;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\overload
+ \obsolete
+
+ Use toSubpathPolygons(const QTransform &matrix) instead.
*/
QList<QPolygonF> QPainterPath::toSubpathPolygons(const QMatrix &matrix) const
{
return toSubpathPolygons(QTransform(matrix));
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
Converts the path into a list of polygons using the
@@ -1787,13 +1792,18 @@ QList<QPolygonF> QPainterPath::toFillPolygons(const QTransform &matrix) const
return polys;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\overload
+ \obsolete
+
+ Use toFillPolygons(const QTransform &matrix) instead.
*/
QList<QPolygonF> QPainterPath::toFillPolygons(const QMatrix &matrix) const
{
return toFillPolygons(QTransform(matrix));
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
//same as qt_polygon_isect_line in qpolygon.cpp
static void qt_painterpath_isect_line(const QPointF &p1,
@@ -2904,14 +2914,18 @@ QPolygonF QPainterPath::toFillPolygon(const QTransform &matrix) const
return polygon;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\overload
+ \obsolete
+
+ Use toFillPolygon(const QTransform &matrix) instead.
*/
QPolygonF QPainterPath::toFillPolygon(const QMatrix &matrix) const
{
return toFillPolygon(QTransform(matrix));
}
-
+#endif // QT_DEPRECATED_SINCE(5, 15)
//derivative of the equation
static inline qreal slopeAt(qreal t, qreal a, qreal b, qreal c, qreal d)
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index ed5be667b7..26b92dc6fa 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -175,9 +175,15 @@ public:
bool isEmpty() const;
Q_REQUIRED_RESULT QPainterPath toReversed() const;
+
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use toSubpathPolygons(const QTransform &)")
QList<QPolygonF> toSubpathPolygons(const QMatrix &matrix = QMatrix()) const;
+ QT_DEPRECATED_X("Use toFillPolygons(const QTransform &")
QList<QPolygonF> toFillPolygons(const QMatrix &matrix = QMatrix()) const;
+ QT_DEPRECATED_X("Use toFillPolygon(const QTransform &)")
QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const;
+#endif // QT_DEPRECATED_SINCE(5, 15)
QList<QPolygonF> toSubpathPolygons(const QTransform &matrix) const;
QList<QPolygonF> toFillPolygons(const QTransform &matrix) const;
QPolygonF toFillPolygon(const QTransform &matrix) const;
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 924d332452..1a1b2d76e2 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -690,12 +690,12 @@ int QKdPointTree::build(int begin, int end, int depth)
if (last > begin)
m_nodes.at(last).left = &m_nodes.at(build(begin, last, depth + 1));
else
- m_nodes.at(last).left = 0;
+ m_nodes.at(last).left = nullptr;
if (last + 1 < end)
m_nodes.at(last).right = &m_nodes.at(build(last + 1, end, depth + 1));
else
- m_nodes.at(last).right = 0;
+ m_nodes.at(last).right = nullptr;
return last;
}
@@ -811,7 +811,7 @@ void QWingedEdge::intersectAndAdd()
if (isect->next) {
isect += isect->next;
} else {
- isect = 0;
+ isect = nullptr;
}
}
@@ -1535,8 +1535,8 @@ QPainterPath QPathClipper::clip(Operation operation)
if (subjectPath == clipPath)
return op == BoolSub ? QPainterPath() : subjectPath;
- bool subjectIsRect = pathToRect(subjectPath, 0);
- bool clipIsRect = pathToRect(clipPath, 0);
+ bool subjectIsRect = pathToRect(subjectPath, nullptr);
+ bool clipIsRect = pathToRect(clipPath, nullptr);
const QRectF clipBounds = clipPath.boundingRect();
const QRectF subjectBounds = subjectPath.boundingRect();
diff --git a/src/gui/painting/qpathsimplifier.cpp b/src/gui/painting/qpathsimplifier.cpp
index 4251840bbc..256a2fefe7 100644
--- a/src/gui/painting/qpathsimplifier.cpp
+++ b/src/gui/painting/qpathsimplifier.cpp
@@ -378,8 +378,8 @@ private:
};
inline PathSimplifier::BoundingVolumeHierarchy::BoundingVolumeHierarchy()
- : root(0)
- , nodeBlock(0)
+ : root(nullptr)
+ , nodeBlock(nullptr)
, blockSize(0)
, firstFree(0)
{
@@ -392,7 +392,7 @@ inline PathSimplifier::BoundingVolumeHierarchy::~BoundingVolumeHierarchy()
inline void PathSimplifier::BoundingVolumeHierarchy::allocate(int nodeCount)
{
- Q_ASSERT(nodeBlock == 0);
+ Q_ASSERT(nodeBlock == nullptr);
Q_ASSERT(firstFree == 0);
nodeBlock = new Node[blockSize = nodeCount];
}
@@ -401,9 +401,9 @@ inline void PathSimplifier::BoundingVolumeHierarchy::free()
{
freeNode(root);
delete[] nodeBlock;
- nodeBlock = 0;
+ nodeBlock = nullptr;
firstFree = blockSize = 0;
- root = 0;
+ root = nullptr;
}
inline PathSimplifier::BVHNode *PathSimplifier::BoundingVolumeHierarchy::newNode()
@@ -427,7 +427,7 @@ inline void PathSimplifier::BoundingVolumeHierarchy::freeNode(Node *n)
}
inline PathSimplifier::ElementAllocator::ElementAllocator()
- : blocks(0)
+ : blocks(nullptr)
{
}
@@ -442,11 +442,11 @@ inline PathSimplifier::ElementAllocator::~ElementAllocator()
inline void PathSimplifier::ElementAllocator::allocate(int count)
{
- Q_ASSERT(blocks == 0);
+ Q_ASSERT(blocks == nullptr);
Q_ASSERT(count > 0);
blocks = (ElementBlock *)malloc(sizeof(ElementBlock) + (count - 1) * sizeof(Element));
blocks->blockSize = count;
- blocks->next = 0;
+ blocks->next = nullptr;
blocks->firstFree = 0;
}
@@ -479,7 +479,7 @@ inline void PathSimplifier::Element::flip()
qSwap(indices[i], indices[degree - i]);
}
pointingUp = !pointingUp;
- Q_ASSERT(next == 0 && previous == 0);
+ Q_ASSERT(next == nullptr && previous == nullptr);
}
PathSimplifier::PathSimplifier(const QVectorPath &path, QDataBuffer<QPoint> &vertices,
@@ -685,9 +685,9 @@ void PathSimplifier::connectElements()
QDataBuffer<Event> events(m_elements.size() * 2);
for (int i = 0; i < m_elements.size(); ++i) {
Element *element = m_elements.at(i);
- element->next = element->previous = 0;
+ element->next = element->previous = nullptr;
element->winding = 0;
- element->edgeNode = 0;
+ element->edgeNode = nullptr;
const QPoint &u = m_points->at(element->indices[0]);
const QPoint &v = m_points->at(element->indices[element->degree]);
if (u != v) {
@@ -730,7 +730,7 @@ void PathSimplifier::connectElements()
Element *element2 = event2->element;
element->edgeNode->data = event2->element;
element2->edgeNode = element->edgeNode;
- element->edgeNode = 0;
+ element->edgeNode = nullptr;
events.pop_back();
events.pop_back();
@@ -783,8 +783,8 @@ void PathSimplifier::connectElements()
Element *upperElement = m_elementAllocator.newElement();
*upperElement = *element;
upperElement->lowerIndex() = element->upperIndex() = pointIndex;
- upperElement->edgeNode = 0;
- element->next = element->previous = 0;
+ upperElement->edgeNode = nullptr;
+ element->next = element->previous = nullptr;
if (upperElement->next)
upperElement->next->previous = upperElement;
else if (upperElement->previous)
@@ -805,7 +805,7 @@ void PathSimplifier::connectElements()
RBNode *left = findElementLeftOf(event->element, bounds);
RBNode *node = m_elementList.newNode();
node->data = event->element;
- Q_ASSERT(event->element->edgeNode == 0);
+ Q_ASSERT(event->element->edgeNode == nullptr);
event->element->edgeNode = node;
m_elementList.attachAfter(left, node);
} else {
@@ -814,7 +814,7 @@ void PathSimplifier::connectElements()
Element *element = event->element;
Q_ASSERT(element->edgeNode);
m_elementList.deleteNode(element->edgeNode);
- Q_ASSERT(element->edgeNode == 0);
+ Q_ASSERT(element->edgeNode == nullptr);
}
events.pop_back();
}
@@ -870,8 +870,8 @@ void PathSimplifier::connectElements()
Q_ASSERT(i + 1 < orderedElements.size());
Element *next = orderedElements.at(i);
Element *previous = orderedElements.at(i + 1);
- Q_ASSERT(next->previous == 0);
- Q_ASSERT(previous->next == 0);
+ Q_ASSERT(next->previous == nullptr);
+ Q_ASSERT(previous->next == nullptr);
next->previous = previous;
previous->next = next;
}
@@ -893,7 +893,7 @@ void PathSimplifier::fillIndices()
m_elements.at(i)->processed = false;
for (int i = 0; i < m_elements.size(); ++i) {
Element *element = m_elements.at(i);
- if (element->processed || element->next == 0)
+ if (element->processed || element->next == nullptr)
continue;
do {
m_indices->add(element->indices[0]);
@@ -1395,13 +1395,13 @@ PathSimplifier::RBNode *PathSimplifier::findElementLeftOf(const Element *element
const QPair<RBNode *, RBNode *> &bounds)
{
if (!m_elementList.root)
- return 0;
+ return nullptr;
RBNode *current = bounds.first;
Q_ASSERT(!current || !elementIsLeftOf(element, current->data));
if (!current)
current = m_elementList.front(m_elementList.root);
Q_ASSERT(current);
- RBNode *result = 0;
+ RBNode *result = nullptr;
while (current != bounds.second && !elementIsLeftOf(element, current->data)) {
result = current;
current = m_elementList.next(current);
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index f560e1f0f0..de9fc13331 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -439,8 +439,8 @@ QByteArray QPdf::generateDashes(const QPen &pen)
static const char* const pattern_for_brush[] = {
- 0, // NoBrush
- 0, // SolidPattern
+ nullptr, // NoBrush
+ nullptr, // SolidPattern
"0 J\n"
"6 w\n"
"[] 0 d\n"
@@ -637,7 +637,7 @@ static void cubicToHook(qfixed c1x, qfixed c1y,
}
QPdf::Stroker::Stroker()
- : stream(0),
+ : stream(nullptr),
first(true),
dashStroker(&basicStroker)
{
@@ -652,7 +652,7 @@ QPdf::Stroker::Stroker()
void QPdf::Stroker::setPen(const QPen &pen, QPainter::RenderHints hints)
{
if (pen.style() == Qt::NoPen) {
- stroker = 0;
+ stroker = nullptr;
return;
}
qreal w = pen.widthF();
@@ -1390,6 +1390,18 @@ void QPdfEngine::setPdfVersion(PdfVersion version)
d->pdfVersion = version;
}
+void QPdfEngine::setDocumentXmpMetadata(const QByteArray &xmpMetadata)
+{
+ Q_D(QPdfEngine);
+ d->xmpDocumentMetadata = xmpMetadata;
+}
+
+QByteArray QPdfEngine::documentXmpMetadata() const
+{
+ Q_D(const QPdfEngine);
+ return d->xmpDocumentMetadata;
+}
+
void QPdfEngine::setPageLayout(const QPageLayout &pageLayout)
{
Q_D(QPdfEngine);
@@ -1469,7 +1481,7 @@ int QPdfEngine::metric(QPaintDevice::PaintDeviceMetric metricType) const
QPdfEnginePrivate::QPdfEnginePrivate()
: clipEnabled(false), allClipped(false), hasPen(true), hasBrush(false), simplePen(false),
pdfVersion(QPdfEngine::Version_1_4),
- outDevice(0), ownsDevice(false),
+ outDevice(nullptr), ownsDevice(false),
embedFonts(true),
grayscale(false),
m_pageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF(10, 10, 10, 10))
@@ -1477,8 +1489,8 @@ QPdfEnginePrivate::QPdfEnginePrivate()
initResources();
resolution = 1200;
currentObject = 1;
- currentPage = 0;
- stroker.stream = 0;
+ currentPage = nullptr;
+ stroker.stream = nullptr;
streampos = 0;
@@ -1520,6 +1532,8 @@ bool QPdfEngine::begin(QPaintDevice *pdev)
d->xrefPositions.clear();
d->pageRoot = 0;
+ d->embeddedfilesRoot = 0;
+ d->namesRoot = 0;
d->catalog = 0;
d->info = 0;
d->graphicsState = 0;
@@ -1547,18 +1561,26 @@ bool QPdfEngine::end()
qDeleteAll(d->fonts);
d->fonts.clear();
delete d->currentPage;
- d->currentPage = 0;
+ d->currentPage = nullptr;
if (d->outDevice && d->ownsDevice) {
d->outDevice->close();
delete d->outDevice;
- d->outDevice = 0;
+ d->outDevice = nullptr;
}
+ d->fileCache.clear();
+
setActive(false);
return true;
}
+void QPdfEngine::addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType)
+{
+ Q_D(QPdfEngine);
+ d->fileCache.push_back({fileName, data, mimeType});
+}
+
QPdfEnginePrivate::~QPdfEnginePrivate()
{
qDeleteAll(fonts);
@@ -1586,13 +1608,19 @@ void QPdfEnginePrivate::writeHeader()
int metaDataObj = -1;
int outputIntentObj = -1;
+ if (pdfVersion == QPdfEngine::Version_A1b || !xmpDocumentMetadata.isEmpty()) {
+ metaDataObj = writeXmpDcumentMetaData();
+ }
if (pdfVersion == QPdfEngine::Version_A1b) {
- metaDataObj = writeXmpMetaData();
outputIntentObj = writeOutputIntent();
}
catalog = addXrefEntry(-1);
pageRoot = requestObject();
+ if (!fileCache.isEmpty()) {
+ namesRoot = requestObject();
+ embeddedfilesRoot = requestObject();
+ }
// catalog
{
@@ -1602,10 +1630,15 @@ void QPdfEnginePrivate::writeHeader()
<< "/Type /Catalog\n"
<< "/Pages " << pageRoot << "0 R\n";
- if (pdfVersion == QPdfEngine::Version_A1b) {
- s << "/OutputIntents [" << outputIntentObj << "0 R]\n";
+ // Embedded files, if any
+ if (!fileCache.isEmpty())
+ s << "/Names " << embeddedfilesRoot << "0 R\n";
+
+ if (pdfVersion == QPdfEngine::Version_A1b || !xmpDocumentMetadata.isEmpty())
s << "/Metadata " << metaDataObj << "0 R\n";
- }
+
+ if (pdfVersion == QPdfEngine::Version_A1b)
+ s << "/OutputIntents [" << outputIntentObj << "0 R]\n";
s << ">>\n"
<< "endobj\n";
@@ -1613,6 +1646,12 @@ void QPdfEnginePrivate::writeHeader()
write(catalog);
}
+ if (!fileCache.isEmpty()) {
+ addXrefEntry(embeddedfilesRoot);
+ xprintf("<</EmbeddedFiles %d 0 R>>\n"
+ "endobj\n", namesRoot);
+ }
+
// graphics state
graphicsState = addXrefEntry(-1);
xprintf("<<\n"
@@ -1664,39 +1703,45 @@ void QPdfEnginePrivate::writeInfo()
"endobj\n");
}
-int QPdfEnginePrivate::writeXmpMetaData()
+int QPdfEnginePrivate::writeXmpDcumentMetaData()
{
const int metaDataObj = addXrefEntry(-1);
+ QByteArray metaDataContent;
+
+ if (xmpDocumentMetadata.isEmpty()) {
+ const QString producer(QString::fromLatin1("Qt " QT_VERSION_STR));
+
+ const QDateTime now = QDateTime::currentDateTime();
+ const QDate date = now.date();
+ const QTime time = now.time();
+ const QString timeStr =
+ QString::asprintf("%d-%02d-%02dT%02d:%02d:%02d",
+ date.year(), date.month(), date.day(),
+ time.hour(), time.minute(), time.second());
+
+ const int offset = now.offsetFromUtc();
+ const int hours = (offset / 60) / 60;
+ const int mins = (offset / 60) % 60;
+ QString tzStr;
+ if (offset < 0)
+ tzStr = QString::asprintf("-%02d:%02d", -hours, -mins);
+ else if (offset > 0)
+ tzStr = QString::asprintf("+%02d:%02d", hours , mins);
+ else
+ tzStr = QLatin1String("Z");
- const QString producer(QString::fromLatin1("Qt " QT_VERSION_STR));
-
- const QDateTime now = QDateTime::currentDateTime();
- const QDate date = now.date();
- const QTime time = now.time();
- const QString timeStr =
- QString::asprintf("%d-%02d-%02dT%02d:%02d:%02d",
- date.year(), date.month(), date.day(),
- time.hour(), time.minute(), time.second());
+ const QString metaDataDate = timeStr + tzStr;
- const int offset = now.offsetFromUtc();
- const int hours = (offset / 60) / 60;
- const int mins = (offset / 60) % 60;
- QString tzStr;
- if (offset < 0)
- tzStr = QString::asprintf("-%02d:%02d", -hours, -mins);
- else if (offset > 0)
- tzStr = QString::asprintf("+%02d:%02d", hours , mins);
+ QFile metaDataFile(QLatin1String(":/qpdf/qpdfa_metadata.xml"));
+ metaDataFile.open(QIODevice::ReadOnly);
+ metaDataContent = QString::fromUtf8(metaDataFile.readAll()).arg(producer.toHtmlEscaped(),
+ title.toHtmlEscaped(),
+ creator.toHtmlEscaped(),
+ metaDataDate).toUtf8();
+ }
else
- tzStr = QLatin1String("Z");
+ metaDataContent = xmpDocumentMetadata;
- const QString metaDataDate = timeStr + tzStr;
-
- QFile metaDataFile(QLatin1String(":/qpdf/qpdfa_metadata.xml"));
- metaDataFile.open(QIODevice::ReadOnly);
- const QByteArray metaDataContent = QString::fromUtf8(metaDataFile.readAll()).arg(producer.toHtmlEscaped(),
- title.toHtmlEscaped(),
- creator.toHtmlEscaped(),
- metaDataDate).toUtf8();
xprintf("<<\n"
"/Type /Metadata /Subtype /XML\n"
"/Length %d\n"
@@ -1774,6 +1819,56 @@ void QPdfEnginePrivate::writePageRoot()
"endobj\n");
}
+void QPdfEnginePrivate::writeAttachmentRoot()
+{
+ if (fileCache.isEmpty())
+ return;
+
+ QVector<int> attachments;
+ const int size = fileCache.size();
+ for (int i = 0; i < size; ++i) {
+ auto attachment = fileCache.at(i);
+ const int attachmentID = addXrefEntry(-1);
+ xprintf("<<\n");
+ if (do_compress)
+ xprintf("/Filter /FlateDecode\n");
+
+ const int lenobj = requestObject();
+ xprintf("/Length %d 0 R\n", lenobj);
+ int len = 0;
+ xprintf(">>\nstream\n");
+ len = writeCompressed(attachment.data);
+ xprintf("\nendstream\n"
+ "endobj\n");
+ addXrefEntry(lenobj);
+ xprintf("%d\n"
+ "endobj\n", len);
+
+ attachments.push_back(addXrefEntry(-1));
+ xprintf("<<\n"
+ "/F (%s)", attachment.fileName.toLatin1().constData());
+
+ xprintf("\n/EF <</F %d 0 R>>\n"
+ "/Type/Filespec\n"
+ , attachmentID);
+ if (!attachment.mimeType.isEmpty())
+ xprintf("/Subtype/%s\n",
+ attachment.mimeType.replace(QLatin1String("/"),
+ QLatin1String("#2F")).toLatin1().constData());
+ xprintf(">>\nendobj\n");
+ }
+
+ // names
+ addXrefEntry(namesRoot);
+ xprintf("<</Names[");
+ for (int i = 0; i < size; ++i) {
+ auto attachment = fileCache.at(i);
+ printString(attachment.fileName);
+ xprintf("%d 0 R\n", attachments.at(i));
+ }
+ xprintf("]>>\n"
+ "endobj\n");
+}
void QPdfEnginePrivate::embedFont(QFontSubset *font)
{
@@ -2031,6 +2126,8 @@ void QPdfEnginePrivate::writeTail()
writePage();
writeFonts();
writePageRoot();
+ writeAttachmentRoot();
+
addXrefEntry(xrefPositions.size(),false);
xprintf("xref\n"
"0 %d\n"
diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h
index 89e549614a..4ff540e67b 100644
--- a/src/gui/painting/qpdf_p.h
+++ b/src/gui/painting/qpdf_p.h
@@ -55,7 +55,6 @@
#ifndef QT_NO_PDF
-#include "QtGui/qmatrix.h"
#include "QtCore/qstring.h"
#include "QtCore/qvector.h"
#include "private/qstroker_p.h"
@@ -187,6 +186,11 @@ public:
void setPdfVersion(PdfVersion version);
+ void setDocumentXmpMetadata(const QByteArray &xmpMetadata);
+ QByteArray documentXmpMetadata() const;
+
+ void addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType);
+
// reimplementations QPaintEngine
bool begin(QPaintDevice *pdev) override;
bool end() override;
@@ -297,9 +301,10 @@ private:
int createShadingFunction(const QGradient *gradient, int from, int to, bool reflect, bool alpha);
void writeInfo();
- int writeXmpMetaData();
+ int writeXmpDcumentMetaData();
int writeOutputIntent();
void writePageRoot();
+ void writeAttachmentRoot();
void writeFonts();
void embedFont(QFontSubset *font);
qreal calcUserUnit() const;
@@ -324,11 +329,22 @@ private:
inline int writeCompressed(const QByteArray &data) { return writeCompressed(data.constData(), data.length()); }
int writeCompressed(QIODevice *dev);
+ struct AttachmentInfo
+ {
+ AttachmentInfo (const QString &fileName, const QByteArray &data, const QString &mimeType)
+ : fileName(fileName), data(data), mimeType(mimeType) {}
+ QString fileName;
+ QByteArray data;
+ QString mimeType;
+ };
+
// various PDF objects
- int pageRoot, catalog, info, graphicsState, patternColorSpace;
+ int pageRoot, embeddedfilesRoot, namesRoot, catalog, info, graphicsState, patternColorSpace;
QVector<uint> pages;
QHash<qint64, uint> imageCache;
QHash<QPair<uint, uint>, uint > alphaCache;
+ QVector<AttachmentInfo> fileCache;
+ QByteArray xmpDocumentMetadata;
};
QT_END_NAMESPACE
diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp
index bf7e2d3dca..4f70fe6ad2 100644
--- a/src/gui/painting/qpdfwriter.cpp
+++ b/src/gui/painting/qpdfwriter.cpp
@@ -55,7 +55,7 @@ public:
: QObjectPrivate()
{
engine = new QPdfEngine();
- output = 0;
+ output = nullptr;
pdfVersion = QPdfWriter::PdfVersion_1_4;
}
~QPdfWriterPrivate()
@@ -266,6 +266,50 @@ int QPdfWriter::resolution() const
return d->engine->resolution();
}
+/*!
+ \since 5.15
+
+ Sets the document metadata. This metadata is not influenced by the setTitle / setCreator methods,
+ so is up to the user to keep it consistent.
+ \a xmpMetadata contains XML formatted metadata to embed into the PDF file.
+
+ \sa documentXmpMetadata()
+*/
+
+void QPdfWriter::setDocumentXmpMetadata(const QByteArray &xmpMetadata)
+{
+ Q_D(const QPdfWriter);
+ d->engine->setDocumentXmpMetadata(xmpMetadata);
+}
+
+/*!
+ \since 5.15
+
+ Gets the document metadata, as it was provided with a call to setDocumentXmpMetadata. It will not
+ return the default metadata.
+
+ \sa setDocumentXmpMetadata()
+*/
+
+QByteArray QPdfWriter::documentXmpMetadata() const
+{
+ Q_D(const QPdfWriter);
+ return d->engine->documentXmpMetadata();
+}
+
+/*!
+ \since 5.15
+
+ Adds \a fileName attachment to the PDF with (optional) \a mimeType
+ \a data contains the raw file data to embed into the PDF file.
+*/
+
+void QPdfWriter::addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType)
+{
+ Q_D(QPdfWriter);
+ d->engine->addFileAttachment(fileName, data, mimeType);
+}
+
// Defined in QPagedPaintDevice but non-virtual, add QPdfWriter specific doc here
#ifdef Q_QDOC
/*!
diff --git a/src/gui/painting/qpdfwriter.h b/src/gui/painting/qpdfwriter.h
index 668081e008..04039a0104 100644
--- a/src/gui/painting/qpdfwriter.h
+++ b/src/gui/painting/qpdfwriter.h
@@ -75,6 +75,11 @@ public:
void setResolution(int resolution);
int resolution() const;
+ void setDocumentXmpMetadata(const QByteArray &xmpMetadata);
+ QByteArray documentXmpMetadata() const;
+
+ void addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType = QString());
+
#ifdef Q_QDOC
bool setPageLayout(const QPageLayout &pageLayout);
bool setPageSize(const QPageSize &pageSize);
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index dc6e3e04d0..01e581d2ed 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -254,7 +254,7 @@ public:
{
if (!pen->ref.deref())
delete pen;
- pen = 0;
+ pen = nullptr;
}
};
@@ -408,7 +408,7 @@ QPen &QPen::operator=(const QPen &p) noexcept
*/
QPen::operator QVariant() const
{
- return QVariant(QVariant::Pen, this);
+ return QVariant(QMetaType::QPen, this);
}
/*!
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index 45e90bd99b..c092a7153f 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -87,10 +87,10 @@ class QPlatformBackingStorePrivate
public:
QPlatformBackingStorePrivate(QWindow *w)
: window(w)
- , backingStore(0)
+ , backingStore(nullptr)
#ifndef QT_NO_OPENGL
, textureId(0)
- , blitter(0)
+ , blitter(nullptr)
#endif
{
}
@@ -427,7 +427,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
origin = QOpenGLTextureBlitter::OriginBottomLeft;
textureId = d_ptr->textureId;
} else {
- TextureFlags flags = 0;
+ TextureFlags flags;
textureId = toTexture(deviceRegion(region, window, offset), &d_ptr->textureSize, &flags);
d_ptr->needsSwizzle = (flags & TextureSwizzle) != 0;
d_ptr->premultiplied = (flags & TexturePremultiplied) != 0;
@@ -534,7 +534,7 @@ GLuint QPlatformBackingStore::toTexture(const QRegion &dirtyRegion, QSize *textu
GLuint pixelType = GL_UNSIGNED_BYTE;
bool needsConversion = false;
- *flags = 0;
+ *flags = { };
switch (image.format()) {
case QImage::Format_ARGB32_Premultiplied:
*flags |= TexturePremultiplied;
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h
index 4f08b0092f..7aa054f1e2 100644
--- a/src/gui/painting/qplatformbackingstore.h
+++ b/src/gui/painting/qplatformbackingstore.h
@@ -100,7 +100,7 @@ public:
bool isLocked() const;
void appendTexture(void *source, GLuint textureId, const QRect &geometry,
- const QRect &clipRect = QRect(), Flags flags = nullptr);
+ const QRect &clipRect = QRect(), Flags flags = { });
void clear();
Q_SIGNALS:
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index 3bf6004fcc..4fe819cae0 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -40,9 +40,9 @@
#include "qpolygon.h"
#include "qrect.h"
#include "qdatastream.h"
-#include "qmatrix.h"
#include "qdebug.h"
#include "qpainterpath.h"
+#include "qtransform.h"
#include "qvariant.h"
#include "qpainterpath_p.h"
#include "qbezier_p.h"
@@ -111,7 +111,7 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP
from a specified index (resizing the polygon if necessary).
QPolygon provides the boundingRect() and translate() functions for
- geometry functions. Use the QMatrix::map() function for more
+ geometry functions. Use the QTransform::map() function for more
general transformations of QPolygons.
The QPolygon class is \l {Implicit Data Sharing}{implicitly
@@ -495,7 +495,7 @@ QDebug operator<<(QDebug dbg, const QPolygon &a)
In addition to the functions provided by QVector, QPolygonF
provides the boundingRect() and translate() functions for geometry
- operations. Use the QMatrix::map() function for more general
+ operations. Use the QTransform::map() function for more general
transformations of QPolygonFs.
QPolygonF also provides the isClosed() function to determine
@@ -716,7 +716,7 @@ QPolygon QPolygonF::toPolygon() const
*/
QPolygon::operator QVariant() const
{
- return QVariant(QVariant::Polygon, this);
+ return QVariant(QMetaType::QPolygon, this);
}
/*****************************************************************************
@@ -899,7 +899,7 @@ QPolygon QPolygon::united(const QPolygon &r) const
QPainterPath subject; subject.addPolygon(*this);
QPainterPath clip; clip.addPolygon(r);
- return subject.united(clip).toFillPolygon().toPolygon();
+ return subject.united(clip).toFillPolygon(QTransform()).toPolygon();
}
/*!
@@ -918,7 +918,7 @@ QPolygon QPolygon::intersected(const QPolygon &r) const
QPainterPath subject; subject.addPolygon(*this);
QPainterPath clip; clip.addPolygon(r);
- return subject.intersected(clip).toFillPolygon().toPolygon();
+ return subject.intersected(clip).toFillPolygon(QTransform()).toPolygon();
}
/*!
@@ -936,7 +936,7 @@ QPolygon QPolygon::subtracted(const QPolygon &r) const
QPainterPath subject; subject.addPolygon(*this);
QPainterPath clip; clip.addPolygon(r);
- return subject.subtracted(clip).toFillPolygon().toPolygon();
+ return subject.subtracted(clip).toFillPolygon(QTransform()).toPolygon();
}
/*!
@@ -975,7 +975,7 @@ QPolygonF QPolygonF::united(const QPolygonF &r) const
QPainterPath subject; subject.addPolygon(*this);
QPainterPath clip; clip.addPolygon(r);
- return subject.united(clip).toFillPolygon();
+ return subject.united(clip).toFillPolygon(QTransform());
}
/*!
@@ -994,7 +994,7 @@ QPolygonF QPolygonF::intersected(const QPolygonF &r) const
QPainterPath subject; subject.addPolygon(*this);
QPainterPath clip; clip.addPolygon(r);
- return subject.intersected(clip).toFillPolygon();
+ return subject.intersected(clip).toFillPolygon(QTransform());
}
/*!
@@ -1011,7 +1011,7 @@ QPolygonF QPolygonF::subtracted(const QPolygonF &r) const
{
QPainterPath subject; subject.addPolygon(*this);
QPainterPath clip; clip.addPolygon(r);
- return subject.subtracted(clip).toFillPolygon();
+ return subject.subtracted(clip).toFillPolygon(QTransform());
}
/*!
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index b4014272f4..cd31d75f83 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -209,7 +209,7 @@ QScanConverter::QScanConverter()
: m_lines(0)
, m_alloc(0)
, m_size(0)
- , m_intersections(0)
+ , m_intersections(nullptr)
, m_active(0)
{
}
@@ -442,7 +442,7 @@ void QScanConverter::end()
free(m_intersections);
m_alloc = 0;
m_size = 0;
- m_intersections = 0;
+ m_intersections = nullptr;
}
if (m_lines.size() > 1024)
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 82f5be2b65..bac042c784 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -46,6 +46,7 @@
#include "qvarlengtharray.h"
#include "qimage.h"
#include "qbitmap.h"
+#include "qtransform.h"
#include <private/qdebug_p.h>
@@ -599,7 +600,7 @@ QRegion& QRegion::operator^=(const QRegion &r)
*/
QRegion::operator QVariant() const
{
- return QVariant(QVariant::Region, this);
+ return QVariant(QMetaType::QRegion, this);
}
/*!
@@ -1128,7 +1129,7 @@ Q_GUI_EXPORT QPainterPath qt_regionToPath(const QRegion &region)
segments.resize(4 * (end - rect));
int lastRowSegmentCount = 0;
- Segment *lastRowSegments = 0;
+ Segment *lastRowSegments = nullptr;
int lastSegment = 0;
int lastY = 0;
@@ -1380,10 +1381,10 @@ void QRegionPrivate::intersect(const QRect &rect)
extents.setRight(qMax(extents.right(), dest->right()));
extents.setBottom(qMax(extents.bottom(), dest->bottom()));
- const QRect *nextToLast = (numRects > 1 ? dest - 2 : 0);
+ const QRect *nextToLast = (numRects > 1 ? dest - 2 : nullptr);
// mergeFromBelow inlined and optimized
- if (canMergeFromBelow(dest - 1, dest, nextToLast, 0)) {
+ if (canMergeFromBelow(dest - 1, dest, nextToLast, nullptr)) {
if (!n || src->y() != dest->y() || src->left() > r.right()) {
QRect *prev = dest - 1;
prev->setBottom(dest->bottom());
@@ -1408,11 +1409,11 @@ void QRegionPrivate::append(const QRect *r)
QRect *myLast = (numRects == 1 ? &extents : rects.data() + (numRects - 1));
if (mergeFromRight(myLast, r)) {
if (numRects > 1) {
- const QRect *nextToTop = (numRects > 2 ? myLast - 2 : 0);
- if (mergeFromBelow(myLast - 1, myLast, nextToTop, 0))
+ const QRect *nextToTop = (numRects > 2 ? myLast - 2 : nullptr);
+ if (mergeFromBelow(myLast - 1, myLast, nextToTop, nullptr))
--numRects;
}
- } else if (mergeFromBelow(myLast, r, (numRects > 1 ? myLast - 1 : 0), 0)) {
+ } else if (mergeFromBelow(myLast, r, (numRects > 1 ? myLast - 1 : nullptr), nullptr)) {
// nothing
} else {
vectorize();
@@ -1451,18 +1452,18 @@ void QRegionPrivate::append(const QRegionPrivate *r)
{
const QRect *rFirst = srcRect;
QRect *myLast = destRect - 1;
- const QRect *nextToLast = (numRects > 1 ? myLast - 1 : 0);
+ const QRect *nextToLast = (numRects > 1 ? myLast - 1 : nullptr);
if (mergeFromRight(myLast, rFirst)) {
++srcRect;
--numAppend;
- const QRect *rNextToFirst = (numAppend > 1 ? rFirst + 2 : 0);
+ const QRect *rNextToFirst = (numAppend > 1 ? rFirst + 2 : nullptr);
if (mergeFromBelow(myLast, rFirst + 1, nextToLast, rNextToFirst)) {
++srcRect;
--numAppend;
}
if (numRects > 1) {
- nextToLast = (numRects > 2 ? myLast - 2 : 0);
- rNextToFirst = (numAppend > 0 ? srcRect : 0);
+ nextToLast = (numRects > 2 ? myLast - 2 : nullptr);
+ rNextToFirst = (numAppend > 0 ? srcRect : nullptr);
if (mergeFromBelow(myLast - 1, myLast, nextToLast, rNextToFirst)) {
--destRect;
--numRects;
@@ -1522,20 +1523,20 @@ void QRegionPrivate::prepend(const QRegionPrivate *r)
// try merging
{
QRect *myFirst = rects.data();
- const QRect *nextToFirst = (numRects > 1 ? myFirst + 1 : 0);
+ const QRect *nextToFirst = (numRects > 1 ? myFirst + 1 : nullptr);
const QRect *rLast = r->rects.constData() + r->numRects - 1;
- const QRect *rNextToLast = (r->numRects > 1 ? rLast - 1 : 0);
+ const QRect *rNextToLast = (r->numRects > 1 ? rLast - 1 : nullptr);
if (mergeFromLeft(myFirst, rLast)) {
--numPrepend;
--rLast;
- rNextToLast = (numPrepend > 1 ? rLast - 1 : 0);
+ rNextToLast = (numPrepend > 1 ? rLast - 1 : nullptr);
if (mergeFromAbove(myFirst, rLast, nextToFirst, rNextToLast)) {
--numPrepend;
--rLast;
}
if (numRects > 1) {
- nextToFirst = (numRects > 2? myFirst + 2 : 0);
- rNextToLast = (numPrepend > 0 ? rLast : 0);
+ nextToFirst = (numRects > 2? myFirst + 2 : nullptr);
+ rNextToLast = (numPrepend > 0 ? rLast : nullptr);
if (mergeFromAbove(myFirst + 1, myFirst, nextToFirst, rNextToLast)) {
--numRects;
++numSkip;
@@ -1585,14 +1586,14 @@ void QRegionPrivate::prepend(const QRect *r)
QRect *myFirst = (numRects == 1 ? &extents : rects.data());
if (mergeFromLeft(myFirst, r)) {
if (numRects > 1) {
- const QRect *nextToFirst = (numRects > 2 ? myFirst + 2 : 0);
- if (mergeFromAbove(myFirst + 1, myFirst, nextToFirst, 0)) {
+ const QRect *nextToFirst = (numRects > 2 ? myFirst + 2 : nullptr);
+ if (mergeFromAbove(myFirst + 1, myFirst, nextToFirst, nullptr)) {
--numRects;
memmove(rects.data(), rects.constData() + 1,
numRects * sizeof(QRect));
}
}
- } else if (mergeFromAbove(myFirst, r, (numRects > 1 ? myFirst + 1 : 0), 0)) {
+ } else if (mergeFromAbove(myFirst, r, (numRects > 1 ? myFirst + 1 : nullptr), nullptr)) {
// nothing
} else {
vectorize();
@@ -2324,14 +2325,14 @@ static void miRegionOp(QRegionPrivate &dest,
top = qMax(r1->top(), ybot + 1);
bot = qMin(r1->bottom(), r2->top() - 1);
- if (nonOverlap1Func != 0 && bot >= top)
+ if (nonOverlap1Func != nullptr && bot >= top)
(*nonOverlap1Func)(dest, r1, r1BandEnd, top, bot);
ytop = r2->top();
} else if (r2->top() < r1->top()) {
top = qMax(r2->top(), ybot + 1);
bot = qMin(r2->bottom(), r1->top() - 1);
- if (nonOverlap2Func != 0 && bot >= top)
+ if (nonOverlap2Func != nullptr && bot >= top)
(*nonOverlap2Func)(dest, r2, r2BandEnd, top, bot);
ytop = r1->top();
} else {
@@ -2374,7 +2375,7 @@ static void miRegionOp(QRegionPrivate &dest,
*/
curBand = dest.numRects;
if (r1 != r1End) {
- if (nonOverlap1Func != 0) {
+ if (nonOverlap1Func != nullptr) {
do {
r1BandEnd = r1;
while (r1BandEnd < r1End && r1BandEnd->top() == r1->top())
@@ -2383,7 +2384,7 @@ static void miRegionOp(QRegionPrivate &dest,
r1 = r1BandEnd;
} while (r1 != r1End);
}
- } else if ((r2 != r2End) && (nonOverlap2Func != 0)) {
+ } else if ((r2 != r2End) && (nonOverlap2Func != nullptr)) {
do {
r2BandEnd = r2;
while (r2BandEnd < r2End && r2BandEnd->top() == r2->top())
@@ -2698,7 +2699,7 @@ static void SubtractRegion(QRegionPrivate *regM, QRegionPrivate *regS,
Q_ASSERT(!regS->contains(*regM));
Q_ASSERT(!EqualRegion(regM, regS));
- miRegionOp(dest, regM, regS, miSubtractO, miSubtractNonO1, 0);
+ miRegionOp(dest, regM, regS, miSubtractO, miSubtractNonO1, nullptr);
/*
* Can't alter dest's extents before we call miRegionOp because
@@ -3235,14 +3236,14 @@ static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
(ScanLineListBlock *)malloc(sizeof(ScanLineListBlock));
Q_CHECK_PTR(tmpSLLBlock);
(*SLLBlock)->next = tmpSLLBlock;
- tmpSLLBlock->next = (ScanLineListBlock *)NULL;
+ tmpSLLBlock->next = (ScanLineListBlock *)nullptr;
*SLLBlock = tmpSLLBlock;
*iSLLBlock = 0;
}
pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]);
pSLL->next = pPrevSLL->next;
- pSLL->edgelist = (EdgeTableEntry *)NULL;
+ pSLL->edgelist = (EdgeTableEntry *)nullptr;
pPrevSLL->next = pSLL;
}
pSLL->scanline = scanline;
@@ -3250,7 +3251,7 @@ static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
/*
* now insert the edge in the right bucket
*/
- prev = 0;
+ prev = nullptr;
start = pSLL->edgelist;
while (start && (start->bres.minor_axis < ETE->bres.minor_axis)) {
prev = start;
@@ -3306,18 +3307,18 @@ static void CreateETandAET(int count, const QPoint *pts,
/*
* initialize the Active Edge Table
*/
- AET->next = 0;
- AET->back = 0;
- AET->nextWETE = 0;
+ AET->next = nullptr;
+ AET->back = nullptr;
+ AET->nextWETE = nullptr;
AET->bres.minor_axis = SMALL_COORDINATE;
/*
* initialize the Edge Table.
*/
- ET->scanlines.next = 0;
+ ET->scanlines.next = nullptr;
ET->ymax = SMALL_COORDINATE;
ET->ymin = LARGE_COORDINATE;
- pSLLBlock->next = 0;
+ pSLLBlock->next = nullptr;
PrevPt = &pts[count - 1];
@@ -3426,7 +3427,7 @@ static void computeWAET(EdgeTableEntry *AET)
int inside = 1;
int isInside = 0;
- AET->nextWETE = 0;
+ AET->nextWETE = nullptr;
pWETE = AET;
AET = AET->next;
while (AET) {
@@ -3442,7 +3443,7 @@ static void computeWAET(EdgeTableEntry *AET)
}
AET = AET->next;
}
- pWETE->nextWETE = 0;
+ pWETE->nextWETE = nullptr;
}
/*
@@ -3672,7 +3673,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
if (!(pETEs = static_cast<EdgeTableEntry *>(malloc(sizeof(EdgeTableEntry) * Count)))) {
delete region;
- return 0;
+ return nullptr;
}
region->vectorize();
@@ -3692,7 +3693,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
#endif
delete AET;
delete region;
- return 0;
+ return nullptr;
}
@@ -3808,7 +3809,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
curPtBlock = tmpPtBlock;
}
free(pETEs);
- return 0; // this function returns 0 in case of an error
+ return nullptr; // this function returns 0 in case of an error
}
FreeStorage(SLLBlock.next);
@@ -3916,7 +3917,7 @@ QRegion::QRegion(const QRect &r, RegionType t)
} else if (t == Ellipse) {
QPainterPath path;
path.addEllipse(r.x(), r.y(), r.width(), r.height());
- QPolygon a = path.toSubpathPolygons().at(0).toPolygon();
+ QPolygon a = path.toSubpathPolygons(QTransform()).at(0).toPolygon();
d->qt_rgn = PolygonRegion(a.constData(), a.size(), EvenOddRule);
}
}
@@ -4185,7 +4186,7 @@ QRegion QRegion::intersected(const QRegion &r) const
QRegion result;
result.detach();
- miRegionOp(*result.d->qt_rgn, d->qt_rgn, r.d->qt_rgn, miIntersectO, 0, 0);
+ miRegionOp(*result.d->qt_rgn, d->qt_rgn, r.d->qt_rgn, miIntersectO, nullptr, nullptr);
/*
* Can't alter dest's extents before we call miRegionOp because
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index 271d3ba6bf..22302f9790 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -185,10 +185,10 @@ QStrokerOps::QStrokerOps()
: m_elements(0)
, m_curveThreshold(qt_real_to_fixed(0.25))
, m_dashThreshold(qt_real_to_fixed(0.25))
- , m_customData(0)
- , m_moveTo(0)
- , m_lineTo(0)
- , m_cubicTo(0)
+ , m_customData(nullptr)
+ , m_moveTo(nullptr)
+ , m_lineTo(nullptr)
+ , m_cubicTo(nullptr)
{
}
@@ -219,7 +219,7 @@ void QStrokerOps::end()
{
if (m_elements.size() > 1)
processCurrentSubpath();
- m_customData = 0;
+ m_customData = nullptr;
}
/*!
diff --git a/src/gui/painting/qt_attribution.json b/src/gui/painting/qt_attribution.json
index 7b16e8c211..e2326a56c1 100644
--- a/src/gui/painting/qt_attribution.json
+++ b/src/gui/painting/qt_attribution.json
@@ -29,20 +29,6 @@
(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"
- },
- {
"Id": "xserverhelper",
"Name": "X Server helper",
"QDocModule": "qtgui",
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 7a3dd04965..91214f27ca 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -127,7 +127,7 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
QFixed subPixelPosition;
if (supportsSubPixelPositions) {
- QFixed x = positions != 0 ? positions[i].x : QFixed();
+ QFixed x = positions != nullptr ? positions[i].x : QFixed();
subPixelPosition = fontEngine->subPixelPositionForX(x);
}
@@ -341,9 +341,10 @@ void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g, QFixed subP
} else if (m_format == QFontEngine::Format_Mono) {
if (mask.depth() > 1) {
// TODO optimize this
- mask = mask.alphaChannel();
+ mask.convertTo(QImage::Format_Alpha8);
+ mask.reinterpretAsFormat(QImage::Format_Grayscale8);
mask.invertPixels();
- mask = mask.convertToFormat(QImage::Format_Mono, Qt::ThresholdDither);
+ mask.convertTo(QImage::Format_Mono, Qt::ThresholdDither);
}
int mw = qMin(mask.width(), c.w);
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index d75b66c50b..9d8bb0c3e2 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -311,8 +311,10 @@ QTransform::QTransform(qreal h11, qreal h12, qreal h21,
{
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\fn QTransform::QTransform(const QMatrix &matrix)
+ \obsolete
Constructs a matrix that is a copy of the given \a matrix.
Note that the \c m13, \c m23, and \c m33 elements are set to 0, 0,
@@ -328,6 +330,7 @@ QTransform::QTransform(const QMatrix &mtx)
#endif
{
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
Returns the adjoint of this matrix.
@@ -2082,7 +2085,9 @@ void QTransform::map(int x, int y, int *tx, int *ty) const
*ty = qRound(fy);
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
+ \obsolete
Returns the QTransform as an affine matrix.
\warning If a perspective transformation has been specified,
@@ -2092,6 +2097,7 @@ const QMatrix &QTransform::toAffine() const
{
return affine;
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
/*!
Returns the transformation type of this matrix.
@@ -2155,7 +2161,7 @@ QTransform::TransformationType QTransform::type() const
*/
QTransform::operator QVariant() const
{
- return QVariant(QVariant::Transform, this);
+ return QVariant(QMetaType::QTransform, this);
}
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index b2a634dd2a..485caa5140 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -73,7 +73,9 @@ public:
qreal h31, qreal h32, qreal h33 = 1.0);
QTransform(qreal h11, qreal h12, qreal h21,
qreal h22, qreal dx, qreal dy);
+#if QT_DEPRECATED_SINCE(5, 15)
explicit QTransform(const QMatrix &mtx);
+#endif // QT_DEPRECATED_SINCE(5, 15)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// ### Qt 6: remove; the compiler-generated ones are fine!
@@ -158,7 +160,9 @@ public:
void map(int x, int y, int *tx, int *ty) const;
void map(qreal x, qreal y, qreal *tx, qreal *ty) const;
+#if QT_DEPRECATED_SINCE(5, 15)
const QMatrix &toAffine() const;
+#endif // QT_DEPRECATED_SINCE(5, 15)
QTransform &operator*=(qreal div);
QTransform &operator/=(qreal div);
diff --git a/src/gui/painting/qtriangulatingstroker.cpp b/src/gui/painting/qtriangulatingstroker.cpp
index b1b07f9699..8e0308f268 100644
--- a/src/gui/painting/qtriangulatingstroker.cpp
+++ b/src/gui/painting/qtriangulatingstroker.cpp
@@ -150,7 +150,7 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, co
m_cos_theta = qFastCos(Q_PI / m_roundness);
const qreal *endPts = pts + (count<<1);
- const qreal *startPts = 0;
+ const qreal *startPts = nullptr;
Qt::PenCapStyle cap = m_cap_style;
@@ -510,7 +510,7 @@ static void qdashprocessor_cubicTo(qreal, qreal, qreal, qreal, qreal, qreal, voi
QDashedStrokeProcessor::QDashedStrokeProcessor()
: m_points(0), m_types(0),
- m_dash_stroker(0), m_inv_scale(1)
+ m_dash_stroker(nullptr), m_inv_scale(1)
{
m_dash_stroker.setMoveToHook(qdashprocessor_moveTo);
m_dash_stroker.setLineToHook(qdashprocessor_lineTo);
diff --git a/src/gui/painting/qtriangulator.cpp b/src/gui/painting/qtriangulator.cpp
index 9be3eeaffd..ec3ab8ff8f 100644
--- a/src/gui/painting/qtriangulator.cpp
+++ b/src/gui/painting/qtriangulator.cpp
@@ -958,7 +958,7 @@ void QTriangulator<T>::ComplexToSimple::initEdges()
} else {
Q_ASSERT(i + 1 < m_parent->m_indices.size());
// {node, from, to, next, previous, winding, mayIntersect, pointingUp, originallyPointingUp}
- Edge edge = {0, int(m_parent->m_indices.at(i)), int(m_parent->m_indices.at(i + 1)), -1, -1, 0, true, false, false};
+ Edge edge = {nullptr, int(m_parent->m_indices.at(i)), int(m_parent->m_indices.at(i + 1)), -1, -1, 0, true, false, false};
m_edges.add(edge);
}
}
@@ -1029,7 +1029,7 @@ template <typename T>
QRBTree<int>::Node *QTriangulator<T>::ComplexToSimple::searchEdgeLeftOf(int edgeIndex) const
{
QRBTree<int>::Node *current = m_edgeList.root;
- QRBTree<int>::Node *result = 0;
+ QRBTree<int>::Node *result = nullptr;
while (current) {
if (edgeIsLeftOfEdge(edgeIndex, current->data)) {
current = current->left;
@@ -1072,7 +1072,7 @@ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator<T>::ComplexToSim
}
current = (d < 0 ? current->left : current->right);
}
- if (current == 0)
+ if (current == nullptr)
return result;
current = result.first->left;
@@ -1273,7 +1273,7 @@ void QTriangulator<T>::ComplexToSimple::fillPriorityQueue()
m_events.reserve(m_edges.size() * 2);
for (int i = 0; i < m_edges.size(); ++i) {
Q_ASSERT(m_edges.at(i).previous == -1 && m_edges.at(i).next == -1);
- Q_ASSERT(m_edges.at(i).node == 0);
+ Q_ASSERT(m_edges.at(i).node == nullptr);
Q_ASSERT(m_edges.at(i).pointingUp == m_edges.at(i).originallyPointingUp);
Q_ASSERT(m_edges.at(i).pointingUp == (m_parent->m_vertices.at(m_edges.at(i).to) < m_parent->m_vertices.at(m_edges.at(i).from)));
// Ignore zero-length edges.
@@ -1296,7 +1296,7 @@ void QTriangulator<T>::ComplexToSimple::calculateIntersections()
fillPriorityQueue();
Q_ASSERT(m_topIntersection.empty());
- Q_ASSERT(m_edgeList.root == 0);
+ Q_ASSERT(m_edgeList.root == nullptr);
// Find all intersection points.
while (!m_events.isEmpty()) {
@@ -1305,7 +1305,7 @@ void QTriangulator<T>::ComplexToSimple::calculateIntersections()
// Find all edges in the edge list that contain the current vertex and mark them to be split later.
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> range = bounds(event.point);
- QRBTree<int>::Node *leftNode = range.first ? m_edgeList.previous(range.first) : 0;
+ QRBTree<int>::Node *leftNode = range.first ? m_edgeList.previous(range.first) : nullptr;
int vertex = (event.type == Event::Upper ? m_edges.at(event.edge).upper() : m_edges.at(event.edge).lower());
QIntersectionPoint eventPoint = QT_PREPEND_NAMESPACE(qIntersectionPoint)(event.point);
@@ -1361,7 +1361,7 @@ int QTriangulator<T>::ComplexToSimple::splitEdge(int splitIndex)
{
const Split &split = m_splits.at(splitIndex);
Edge &lowerEdge = m_edges.at(split.edge);
- Q_ASSERT(lowerEdge.node == 0);
+ Q_ASSERT(lowerEdge.node == nullptr);
Q_ASSERT(lowerEdge.previous == -1 && lowerEdge.next == -1);
if (lowerEdge.from == split.vertex)
@@ -1439,7 +1439,7 @@ void QTriangulator<T>::ComplexToSimple::insertEdgeIntoVectorIfWanted(ShortArray
template <typename T>
void QTriangulator<T>::ComplexToSimple::removeUnwantedEdgesAndConnect()
{
- Q_ASSERT(m_edgeList.root == 0);
+ Q_ASSERT(m_edgeList.root == nullptr);
// Initialize priority queue.
fillPriorityQueue();
@@ -1772,7 +1772,7 @@ void QTriangulator<T>::SimpleToMonotone::setupDataStructures()
{
int i = 0;
Edge e;
- e.node = 0;
+ e.node = nullptr;
e.twin = -1;
while (i + 3 <= m_parent->m_indices.size()) {
@@ -1862,7 +1862,7 @@ template <typename T>
QRBTree<int>::Node *QTriangulator<T>::SimpleToMonotone::searchEdgeLeftOfEdge(int edgeIndex) const
{
QRBTree<int>::Node *current = m_edgeList.root;
- QRBTree<int>::Node *result = 0;
+ QRBTree<int>::Node *result = nullptr;
while (current) {
if (edgeIsLeftOfEdge(edgeIndex, current->data)) {
current = current->left;
@@ -1879,7 +1879,7 @@ template <typename T>
QRBTree<int>::Node *QTriangulator<T>::SimpleToMonotone::searchEdgeLeftOfPoint(int pointIndex) const
{
QRBTree<int>::Node *current = m_edgeList.root;
- QRBTree<int>::Node *result = 0;
+ QRBTree<int>::Node *result = nullptr;
while (current) {
const QPodPoint &p1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
const QPodPoint &p2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
@@ -2038,7 +2038,7 @@ void QTriangulator<T>::SimpleToMonotone::monotoneDecomposition()
j = m_edges.at(i).previous;
Q_ASSERT(j < m_edges.size());
- QRBTree<int>::Node *leftEdgeNode = 0;
+ QRBTree<int>::Node *leftEdgeNode = nullptr;
switch (m_edges.at(i).type) {
case RegularVertex:
@@ -2049,7 +2049,7 @@ void QTriangulator<T>::SimpleToMonotone::monotoneDecomposition()
if (m_edges.at(m_edges.at(i).helper).type == MergeVertex)
diagonals.add(QPair<int, int>(i, m_edges.at(i).helper));
m_edges.at(j).node = m_edges.at(i).node;
- m_edges.at(i).node = 0;
+ m_edges.at(i).node = nullptr;
m_edges.at(j).node->data = j;
m_edges.at(j).helper = i;
} else if (m_edges.at(j).node) {
@@ -2057,7 +2057,7 @@ void QTriangulator<T>::SimpleToMonotone::monotoneDecomposition()
if (m_edges.at(m_edges.at(j).helper).type == MergeVertex)
diagonals.add(QPair<int, int>(i, m_edges.at(j).helper));
m_edges.at(i).node = m_edges.at(j).node;
- m_edges.at(j).node = 0;
+ m_edges.at(j).node = nullptr;
m_edges.at(i).node->data = i;
m_edges.at(i).helper = i;
} else {
diff --git a/src/gui/painting/webgradients.binaryjson b/src/gui/painting/webgradients.binaryjson
deleted file mode 100644
index 75edd487be..0000000000
--- a/src/gui/painting/webgradients.binaryjson
+++ /dev/null
Binary files differ
diff --git a/src/gui/painting/webgradients.cpp b/src/gui/painting/webgradients.cpp
new file mode 100644
index 0000000000..b4d297450b
--- /dev/null
+++ b/src/gui/painting/webgradients.cpp
@@ -0,0 +1,578 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+** 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$
+**
+****************************************************************************/
+
+// This file is auto-generated by gradientgen. DO NOT EDIT!
+
+static QArrayDataPointerRef<QGradientStop> qt_preset_gradient_stops(QGradient::Preset preset)
+{
+ Q_ASSERT(preset < QGradient::NumPresets);
+ switch (preset) {
+ case QGradient::WarmFlame:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 154, 158, 255)), QGradientStop(0.99, QColor(250, 208, 196, 255)), QGradientStop(1, QColor(250, 208, 196, 255)));
+ case QGradient::NightFade:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(161, 140, 209, 255)), QGradientStop(1, QColor(251, 194, 235, 255)));
+ case QGradient::SpringWarmth:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(250, 208, 196, 255)), QGradientStop(0.01, QColor(250, 208, 196, 255)), QGradientStop(1, QColor(255, 209, 255, 255)));
+ case QGradient::JuicyPeach:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 236, 210, 255)), QGradientStop(1, QColor(252, 182, 159, 255)));
+ case QGradient::YoungPassion:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 129, 119, 255)), QGradientStop(0, QColor(255, 134, 122, 255)), QGradientStop(0.21, QColor(255, 140, 127, 255)), QGradientStop(0.52, QColor(249, 145, 133, 255)), QGradientStop(0.78, QColor(207, 85, 108, 255)), QGradientStop(1, QColor(177, 42, 91, 255)));
+ case QGradient::LadyLips:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 154, 158, 255)), QGradientStop(0.99, QColor(254, 207, 239, 255)), QGradientStop(1, QColor(254, 207, 239, 255)));
+ case QGradient::SunnyMorning:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(246, 211, 101, 255)), QGradientStop(1, QColor(253, 160, 133, 255)));
+ case QGradient::RainyAshville:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(251, 194, 235, 255)), QGradientStop(1, QColor(166, 193, 238, 255)));
+ case QGradient::FrozenDreams:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(253, 203, 241, 255)), QGradientStop(0.01, QColor(253, 203, 241, 255)), QGradientStop(1, QColor(230, 222, 233, 255)));
+ case QGradient::WinterNeva:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(161, 196, 253, 255)), QGradientStop(1, QColor(194, 233, 251, 255)));
+ case QGradient::DustyGrass:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(212, 252, 121, 255)), QGradientStop(1, QColor(150, 230, 161, 255)));
+ case QGradient::TemptingAzure:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(132, 250, 176, 255)), QGradientStop(1, QColor(143, 211, 244, 255)));
+ case QGradient::HeavyRain:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(207, 217, 223, 255)), QGradientStop(1, QColor(226, 235, 240, 255)));
+ case QGradient::AmyCrisp:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(166, 192, 254, 255)), QGradientStop(1, QColor(246, 128, 132, 255)));
+ case QGradient::MeanFruit:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(252, 203, 144, 255)), QGradientStop(1, QColor(213, 126, 235, 255)));
+ case QGradient::DeepBlue:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(224, 195, 252, 255)), QGradientStop(1, QColor(142, 197, 252, 255)));
+ case QGradient::RipeMalinka:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(240, 147, 251, 255)), QGradientStop(1, QColor(245, 87, 108, 255)));
+ case QGradient::CloudyKnoxville:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(253, 251, 251, 255)), QGradientStop(1, QColor(235, 237, 238, 255)));
+ case QGradient::MalibuBeach:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(79, 172, 254, 255)), QGradientStop(1, QColor(0, 242, 254, 255)));
+ case QGradient::NewLife:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(67, 233, 123, 255)), QGradientStop(1, QColor(56, 249, 215, 255)));
+ case QGradient::TrueSunset:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(250, 112, 154, 255)), QGradientStop(1, QColor(254, 225, 64, 255)));
+ case QGradient::MorpheusDen:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(48, 207, 208, 255)), QGradientStop(1, QColor(51, 8, 103, 255)));
+ case QGradient::RareWind:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(168, 237, 234, 255)), QGradientStop(1, QColor(254, 214, 227, 255)));
+ case QGradient::NearMoon:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(94, 231, 223, 255)), QGradientStop(1, QColor(180, 144, 202, 255)));
+ case QGradient::WildApple:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(210, 153, 194, 255)), QGradientStop(1, QColor(254, 249, 215, 255)));
+ case QGradient::SaintPetersburg:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(245, 247, 250, 255)), QGradientStop(1, QColor(195, 207, 226, 255)));
+ case QGradient::PlumPlate:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(102, 126, 234, 255)), QGradientStop(1, QColor(118, 75, 162, 255)));
+ case QGradient::EverlastingSky:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(253, 252, 251, 255)), QGradientStop(1, QColor(226, 209, 195, 255)));
+ case QGradient::HappyFisher:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(137, 247, 254, 255)), QGradientStop(1, QColor(102, 166, 255, 255)));
+ case QGradient::Blessing:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(253, 219, 146, 255)), QGradientStop(1, QColor(209, 253, 255, 255)));
+ case QGradient::SharpeyeEagle:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(152, 144, 227, 255)), QGradientStop(1, QColor(177, 244, 207, 255)));
+ case QGradient::LadogaBottom:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(235, 192, 253, 255)), QGradientStop(1, QColor(217, 222, 216, 255)));
+ case QGradient::LemonGate:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(150, 251, 196, 255)), QGradientStop(1, QColor(249, 245, 134, 255)));
+ case QGradient::ItmeoBranding:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(42, 245, 152, 255)), QGradientStop(1, QColor(0, 158, 253, 255)));
+ case QGradient::ZeusMiracle:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(205, 156, 242, 255)), QGradientStop(1, QColor(246, 243, 255, 255)));
+ case QGradient::OldHat:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(228, 175, 203, 255)), QGradientStop(0, QColor(184, 203, 184, 255)), QGradientStop(0, QColor(184, 203, 184, 255)), QGradientStop(0.3, QColor(226, 197, 139, 255)), QGradientStop(0.64, QColor(194, 206, 156, 255)), QGradientStop(1, QColor(126, 219, 220, 255)));
+ case QGradient::StarWine:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(184, 203, 184, 255)), QGradientStop(0, QColor(184, 203, 184, 255)), QGradientStop(0, QColor(180, 101, 218, 255)), QGradientStop(0.33, QColor(207, 108, 201, 255)), QGradientStop(0.66, QColor(238, 96, 156, 255)), QGradientStop(1, QColor(238, 96, 156, 255)));
+ case QGradient::HappyAcid:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(55, 236, 186, 255)), QGradientStop(1, QColor(114, 175, 211, 255)));
+ case QGradient::AwesomePine:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(235, 187, 167, 255)), QGradientStop(1, QColor(207, 199, 248, 255)));
+ case QGradient::NewYork:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 241, 235, 255)), QGradientStop(1, QColor(172, 224, 249, 255)));
+ case QGradient::ShyRainbow:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(238, 162, 162, 255)), QGradientStop(0.19, QColor(187, 193, 191, 255)), QGradientStop(0.42, QColor(87, 198, 225, 255)), QGradientStop(0.79, QColor(180, 159, 218, 255)), QGradientStop(1, QColor(122, 197, 216, 255)));
+ case QGradient::MixedHopes:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(196, 113, 245, 255)), QGradientStop(1, QColor(250, 113, 205, 255)));
+ case QGradient::FlyHigh:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(72, 198, 239, 255)), QGradientStop(1, QColor(111, 134, 214, 255)));
+ case QGradient::StrongBliss:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(247, 140, 160, 255)), QGradientStop(0.19, QColor(249, 116, 143, 255)), QGradientStop(0.6, QColor(253, 134, 140, 255)), QGradientStop(1, QColor(254, 154, 139, 255)));
+ case QGradient::FreshMilk:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(254, 173, 166, 255)), QGradientStop(1, QColor(245, 239, 239, 255)));
+ case QGradient::SnowAgain:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(230, 233, 240, 255)), QGradientStop(1, QColor(238, 241, 245, 255)));
+ case QGradient::FebruaryInk:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(172, 203, 238, 255)), QGradientStop(1, QColor(231, 240, 253, 255)));
+ case QGradient::KindSteel:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(233, 222, 250, 255)), QGradientStop(1, QColor(251, 252, 219, 255)));
+ case QGradient::SoftGrass:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(193, 223, 196, 255)), QGradientStop(1, QColor(222, 236, 221, 255)));
+ case QGradient::GrownEarly:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(11, 163, 96, 255)), QGradientStop(1, QColor(60, 186, 146, 255)));
+ case QGradient::SharpBlues:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(0, 198, 251, 255)), QGradientStop(1, QColor(0, 91, 234, 255)));
+ case QGradient::ShadyWater:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(116, 235, 213, 255)), QGradientStop(1, QColor(159, 172, 230, 255)));
+ case QGradient::DirtyBeauty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(106, 133, 182, 255)), QGradientStop(1, QColor(186, 200, 224, 255)));
+ case QGradient::GreatWhale:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(163, 189, 237, 255)), QGradientStop(1, QColor(105, 145, 199, 255)));
+ case QGradient::TeenNotebook:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(151, 149, 240, 255)), QGradientStop(1, QColor(251, 200, 212, 255)));
+ case QGradient::PoliteRumors:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(167, 166, 203, 255)), QGradientStop(0.52, QColor(137, 137, 186, 255)), QGradientStop(1, QColor(137, 137, 186, 255)));
+ case QGradient::SweetPeriod:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(63, 81, 177, 255)), QGradientStop(0.13, QColor(90, 85, 174, 255)), QGradientStop(0.25, QColor(123, 95, 172, 255)), QGradientStop(0.38, QColor(143, 106, 174, 255)), QGradientStop(0.5, QColor(168, 106, 164, 255)), QGradientStop(0.62, QColor(204, 107, 142, 255)), QGradientStop(0.75, QColor(241, 130, 113, 255)), QGradientStop(0.87, QColor(243, 164, 105, 255)), QGradientStop(1, QColor(247, 201, 120, 255)));
+ case QGradient::WideMatrix:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(252, 197, 228, 255)), QGradientStop(0.15, QColor(253, 163, 75, 255)), QGradientStop(0.35, QColor(255, 120, 130, 255)), QGradientStop(0.52, QColor(200, 105, 158, 255)), QGradientStop(0.71, QColor(112, 70, 170, 255)), QGradientStop(0.87, QColor(12, 29, 184, 255)), QGradientStop(1, QColor(2, 15, 117, 255)));
+ case QGradient::SoftCherish:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(219, 220, 215, 255)), QGradientStop(0.24, QColor(221, 220, 215, 255)), QGradientStop(0.3, QColor(226, 201, 204, 255)), QGradientStop(0.46, QColor(231, 98, 125, 255)), QGradientStop(0.59, QColor(184, 35, 90, 255)), QGradientStop(0.71, QColor(128, 19, 87, 255)), QGradientStop(0.84, QColor(61, 22, 53, 255)), QGradientStop(1, QColor(28, 26, 39, 255)));
+ case QGradient::RedSalvation:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(244, 59, 71, 255)), QGradientStop(1, QColor(69, 58, 148, 255)));
+ case QGradient::BurningSpring:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(79, 181, 118, 255)), QGradientStop(0.3, QColor(68, 196, 137, 255)), QGradientStop(0.46, QColor(40, 169, 174, 255)), QGradientStop(0.59, QColor(40, 162, 183, 255)), QGradientStop(0.71, QColor(76, 119, 136, 255)), QGradientStop(0.86, QColor(108, 79, 99, 255)), QGradientStop(1, QColor(67, 44, 57, 255)));
+ case QGradient::NightParty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(2, 80, 197, 255)), QGradientStop(1, QColor(212, 63, 141, 255)));
+ case QGradient::SkyGlider:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(136, 211, 206, 255)), QGradientStop(1, QColor(110, 69, 226, 255)));
+ case QGradient::HeavenPeach:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(217, 175, 217, 255)), QGradientStop(1, QColor(151, 217, 225, 255)));
+ case QGradient::PurpleDivision:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(112, 40, 228, 255)), QGradientStop(1, QColor(229, 178, 202, 255)));
+ case QGradient::AquaSplash:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(19, 84, 122, 255)), QGradientStop(1, QColor(128, 208, 199, 255)));
+ case QGradient::SpikyNaga:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(80, 82, 133, 255)), QGradientStop(0.12, QColor(88, 94, 146, 255)), QGradientStop(0.25, QColor(101, 104, 159, 255)), QGradientStop(0.37, QColor(116, 116, 176, 255)), QGradientStop(0.5, QColor(126, 126, 187, 255)), QGradientStop(0.62, QColor(131, 137, 199, 255)), QGradientStop(0.75, QColor(151, 149, 212, 255)), QGradientStop(0.87, QColor(162, 161, 220, 255)), QGradientStop(1, QColor(181, 174, 228, 255)));
+ case QGradient::LoveKiss:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 8, 68, 255)), QGradientStop(1, QColor(255, 177, 153, 255)));
+ case QGradient::CleanMirror:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(147, 165, 207, 255)), QGradientStop(1, QColor(228, 239, 233, 255)));
+ case QGradient::PremiumDark:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(67, 67, 67, 255)), QGradientStop(1, QColor(0, 0, 0, 255)));
+ case QGradient::ColdEvening:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(12, 52, 131, 255)), QGradientStop(1, QColor(162, 182, 223, 255)), QGradientStop(1, QColor(107, 140, 206, 255)), QGradientStop(1, QColor(162, 182, 223, 255)));
+ case QGradient::CochitiLake:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(147, 165, 207, 255)), QGradientStop(1, QColor(228, 239, 233, 255)));
+ case QGradient::SummerGames:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(146, 254, 157, 255)), QGradientStop(1, QColor(0, 201, 255, 255)));
+ case QGradient::PassionateBed:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 117, 140, 255)), QGradientStop(1, QColor(255, 126, 179, 255)));
+ case QGradient::MountainRock:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(134, 143, 150, 255)), QGradientStop(1, QColor(89, 97, 100, 255)));
+ case QGradient::DesertHump:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(199, 144, 129, 255)), QGradientStop(1, QColor(223, 165, 121, 255)));
+ case QGradient::JungleDay:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(139, 170, 170, 255)), QGradientStop(1, QColor(174, 139, 156, 255)));
+ case QGradient::PhoenixStart:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(248, 54, 0, 255)), QGradientStop(1, QColor(249, 212, 35, 255)));
+ case QGradient::OctoberSilence:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(183, 33, 255, 255)), QGradientStop(1, QColor(33, 212, 253, 255)));
+ case QGradient::FarawayRiver:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(110, 69, 226, 255)), QGradientStop(1, QColor(136, 211, 206, 255)));
+ case QGradient::AlchemistLab:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(213, 88, 200, 255)), QGradientStop(1, QColor(36, 210, 146, 255)));
+ case QGradient::OverSun:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(171, 236, 214, 255)), QGradientStop(1, QColor(251, 237, 150, 255)));
+ case QGradient::PremiumWhite:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(213, 212, 208, 255)), QGradientStop(0.01, QColor(213, 212, 208, 255)), QGradientStop(0.31, QColor(238, 238, 236, 255)), QGradientStop(0.75, QColor(239, 238, 236, 255)), QGradientStop(1, QColor(233, 233, 231, 255)));
+ case QGradient::MarsParty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(95, 114, 189, 255)), QGradientStop(1, QColor(155, 35, 234, 255)));
+ case QGradient::EternalConstance:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(9, 32, 63, 255)), QGradientStop(1, QColor(83, 120, 149, 255)));
+ case QGradient::JapanBlush:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(221, 214, 243, 255)), QGradientStop(1, QColor(250, 172, 168, 255)), QGradientStop(1, QColor(250, 172, 168, 255)));
+ case QGradient::SmilingRain:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(220, 176, 237, 255)), QGradientStop(1, QColor(153, 201, 156, 255)));
+ case QGradient::CloudyApple:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(243, 231, 233, 255)), QGradientStop(0.99, QColor(227, 238, 255, 255)), QGradientStop(1, QColor(227, 238, 255, 255)));
+ case QGradient::BigMango:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(199, 29, 111, 255)), QGradientStop(1, QColor(208, 150, 147, 255)));
+ case QGradient::HealthyWater:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(150, 222, 218, 255)), QGradientStop(1, QColor(80, 201, 195, 255)));
+ case QGradient::AmourAmour:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(247, 112, 98, 255)), QGradientStop(1, QColor(254, 81, 150, 255)));
+ case QGradient::RiskyConcrete:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(196, 197, 199, 255)), QGradientStop(0.52, QColor(220, 221, 223, 255)), QGradientStop(1, QColor(235, 235, 235, 255)));
+ case QGradient::StrongStick:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(168, 202, 186, 255)), QGradientStop(1, QColor(93, 65, 87, 255)));
+ case QGradient::ViciousStance:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(41, 50, 60, 255)), QGradientStop(1, QColor(72, 85, 99, 255)));
+ case QGradient::PaloAlto:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(22, 160, 133, 255)), QGradientStop(1, QColor(244, 208, 63, 255)));
+ case QGradient::HappyMemories:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 88, 88, 255)), QGradientStop(1, QColor(240, 152, 25, 255)));
+ case QGradient::MidnightBloom:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(43, 88, 118, 255)), QGradientStop(1, QColor(78, 67, 118, 255)));
+ case QGradient::Crystalline:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(0, 205, 172, 255)), QGradientStop(1, QColor(141, 218, 213, 255)));
+ case QGradient::PartyBliss:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(68, 129, 235, 255)), QGradientStop(1, QColor(4, 190, 254, 255)));
+ case QGradient::ConfidentCloud:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(218, 212, 236, 255)), QGradientStop(0.01, QColor(218, 212, 236, 255)), QGradientStop(1, QColor(243, 231, 233, 255)));
+ case QGradient::LeCocktail:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(135, 77, 162, 255)), QGradientStop(1, QColor(196, 58, 48, 255)));
+ case QGradient::RiverCity:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(68, 129, 235, 255)), QGradientStop(1, QColor(4, 190, 254, 255)));
+ case QGradient::FrozenBerry:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(232, 25, 139, 255)), QGradientStop(1, QColor(199, 234, 253, 255)));
+ case QGradient::ChildCare:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(247, 148, 164, 255)), QGradientStop(1, QColor(253, 214, 189, 255)));
+ case QGradient::FlyingLemon:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(100, 179, 244, 255)), QGradientStop(1, QColor(194, 229, 156, 255)));
+ case QGradient::NewRetrowave:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(59, 65, 197, 255)), QGradientStop(0.49, QColor(169, 129, 187, 255)), QGradientStop(1, QColor(255, 200, 169, 255)));
+ case QGradient::HiddenJaguar:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(15, 216, 80, 255)), QGradientStop(1, QColor(249, 240, 71, 255)));
+ case QGradient::AboveTheSky:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(211, 211, 211, 255)), QGradientStop(0.01, QColor(211, 211, 211, 255)), QGradientStop(0.26, QColor(224, 224, 224, 255)), QGradientStop(0.48, QColor(239, 239, 239, 255)), QGradientStop(0.75, QColor(217, 217, 217, 255)), QGradientStop(1, QColor(188, 188, 188, 255)));
+ case QGradient::Nega:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(238, 156, 167, 255)), QGradientStop(1, QColor(255, 221, 225, 255)));
+ case QGradient::DenseWater:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(58, 181, 176, 255)), QGradientStop(0.31, QColor(61, 153, 190, 255)), QGradientStop(1, QColor(86, 49, 122, 255)));
+ case QGradient::Seashore:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(32, 156, 255, 255)), QGradientStop(1, QColor(104, 224, 207, 255)));
+ case QGradient::MarbleWall:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(189, 194, 232, 255)), QGradientStop(0.01, QColor(189, 194, 232, 255)), QGradientStop(1, QColor(230, 222, 233, 255)));
+ case QGradient::CheerfulCaramel:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(230, 185, 128, 255)), QGradientStop(1, QColor(234, 205, 163, 255)));
+ case QGradient::NightSky:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(30, 60, 114, 255)), QGradientStop(0.01, QColor(30, 60, 114, 255)), QGradientStop(1, QColor(42, 82, 152, 255)));
+ case QGradient::MagicLake:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(213, 222, 231, 255)), QGradientStop(0, QColor(255, 175, 189, 255)), QGradientStop(1, QColor(201, 255, 191, 255)));
+ case QGradient::YoungGrass:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(155, 225, 93, 255)), QGradientStop(1, QColor(0, 227, 174, 255)));
+ case QGradient::ColorfulPeach:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(237, 110, 160, 255)), QGradientStop(1, QColor(236, 140, 105, 255)));
+ case QGradient::GentleCare:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 195, 160, 255)), QGradientStop(1, QColor(255, 175, 189, 255)));
+ case QGradient::PlumBath:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(204, 32, 142, 255)), QGradientStop(1, QColor(103, 19, 210, 255)));
+ case QGradient::HappyUnicorn:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(179, 255, 171, 255)), QGradientStop(1, QColor(18, 255, 247, 255)));
+ case QGradient::AfricanField:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(101, 189, 96, 255)), QGradientStop(0.25, QColor(90, 193, 168, 255)), QGradientStop(0.5, QColor(62, 198, 237, 255)), QGradientStop(0.75, QColor(183, 221, 183, 255)), QGradientStop(1, QColor(254, 243, 129, 255)));
+ case QGradient::SolidStone:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(36, 57, 73, 255)), QGradientStop(1, QColor(81, 127, 164, 255)));
+ case QGradient::OrangeJuice:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(252, 96, 118, 255)), QGradientStop(1, QColor(255, 154, 68, 255)));
+ case QGradient::GlassWater:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(223, 233, 243, 255)), QGradientStop(1, QColor(255, 255, 255, 255)));
+ case QGradient::NorthMiracle:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(0, 219, 222, 255)), QGradientStop(1, QColor(252, 0, 255, 255)));
+ case QGradient::FruitBlend:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(249, 212, 35, 255)), QGradientStop(1, QColor(255, 78, 80, 255)));
+ case QGradient::MillenniumPine:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(80, 204, 127, 255)), QGradientStop(1, QColor(245, 209, 0, 255)));
+ case QGradient::HighFlight:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(10, 207, 254, 255)), QGradientStop(1, QColor(73, 90, 255, 255)));
+ case QGradient::MoleHall:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(97, 97, 97, 255)), QGradientStop(1, QColor(155, 197, 195, 255)));
+ case QGradient::SpaceShift:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(61, 51, 147, 255)), QGradientStop(0.37, QColor(43, 118, 185, 255)), QGradientStop(0.65, QColor(44, 172, 209, 255)), QGradientStop(1, QColor(53, 235, 147, 255)));
+ case QGradient::ForestInei:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(223, 137, 181, 255)), QGradientStop(1, QColor(191, 217, 254, 255)));
+ case QGradient::RoyalGarden:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(237, 110, 160, 255)), QGradientStop(1, QColor(236, 140, 105, 255)));
+ case QGradient::RichMetal:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(215, 210, 204, 255)), QGradientStop(1, QColor(48, 67, 82, 255)));
+ case QGradient::JuicyCake:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(225, 79, 173, 255)), QGradientStop(1, QColor(249, 212, 35, 255)));
+ case QGradient::SmartIndigo:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(178, 36, 239, 255)), QGradientStop(1, QColor(117, 121, 255, 255)));
+ case QGradient::SandStrike:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(193, 193, 97, 255)), QGradientStop(0, QColor(193, 193, 97, 255)), QGradientStop(1, QColor(212, 212, 177, 255)));
+ case QGradient::NorseBeauty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(236, 119, 171, 255)), QGradientStop(1, QColor(120, 115, 245, 255)));
+ case QGradient::AquaGuidance:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(0, 122, 223, 255)), QGradientStop(1, QColor(0, 236, 188, 255)));
+ case QGradient::SunVeggie:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(32, 226, 215, 255)), QGradientStop(1, QColor(249, 254, 165, 255)));
+ case QGradient::SeaLord:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(44, 216, 213, 255)), QGradientStop(0.56, QColor(197, 193, 255, 255)), QGradientStop(1, QColor(255, 186, 195, 255)));
+ case QGradient::BlackSea:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(44, 216, 213, 255)), QGradientStop(0.48, QColor(107, 141, 214, 255)), QGradientStop(1, QColor(142, 55, 215, 255)));
+ case QGradient::GrassShampoo:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(223, 255, 205, 255)), QGradientStop(0.48, QColor(144, 249, 196, 255)), QGradientStop(1, QColor(57, 243, 187, 255)));
+ case QGradient::LandingAircraft:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(93, 159, 255, 255)), QGradientStop(0.48, QColor(184, 220, 255, 255)), QGradientStop(1, QColor(107, 187, 255, 255)));
+ case QGradient::WitchDance:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(168, 191, 255, 255)), QGradientStop(1, QColor(136, 77, 128, 255)));
+ case QGradient::SleeplessNight:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(82, 113, 196, 255)), QGradientStop(0.48, QColor(177, 159, 255, 255)), QGradientStop(1, QColor(236, 161, 254, 255)));
+ case QGradient::AngelCare:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 226, 159, 255)), QGradientStop(0.48, QColor(255, 169, 159, 255)), QGradientStop(1, QColor(255, 113, 154, 255)));
+ case QGradient::CrystalRiver:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(34, 225, 255, 255)), QGradientStop(0.48, QColor(29, 143, 225, 255)), QGradientStop(1, QColor(98, 94, 177, 255)));
+ case QGradient::SoftLipstick:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(182, 206, 232, 255)), QGradientStop(1, QColor(245, 120, 220, 255)));
+ case QGradient::SaltMountain:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 254, 255, 255)), QGradientStop(1, QColor(215, 255, 254, 255)));
+ case QGradient::PerfectWhite:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(227, 253, 245, 255)), QGradientStop(1, QColor(255, 230, 250, 255)));
+ case QGradient::FreshOasis:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(125, 226, 252, 255)), QGradientStop(1, QColor(185, 182, 229, 255)));
+ case QGradient::StrictNovember:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(203, 186, 204, 255)), QGradientStop(1, QColor(37, 128, 179, 255)));
+ case QGradient::MorningSalad:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(183, 248, 219, 255)), QGradientStop(1, QColor(80, 167, 194, 255)));
+ case QGradient::DeepRelief:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(112, 133, 182, 255)), QGradientStop(0.5, QColor(135, 167, 217, 255)), QGradientStop(1, QColor(222, 243, 248, 255)));
+ case QGradient::SeaStrike:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(119, 255, 210, 255)), QGradientStop(0.48, QColor(98, 151, 219, 255)), QGradientStop(1, QColor(30, 236, 255, 255)));
+ case QGradient::NightCall:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(172, 50, 228, 255)), QGradientStop(0.48, QColor(121, 24, 242, 255)), QGradientStop(1, QColor(72, 1, 255, 255)));
+ case QGradient::SupremeSky:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(212, 255, 236, 255)), QGradientStop(0.48, QColor(87, 242, 204, 255)), QGradientStop(1, QColor(69, 150, 251, 255)));
+ case QGradient::LightBlue:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(158, 251, 211, 255)), QGradientStop(0.48, QColor(87, 233, 242, 255)), QGradientStop(1, QColor(69, 212, 251, 255)));
+ case QGradient::MindCrawl:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(71, 59, 123, 255)), QGradientStop(0.51, QColor(53, 132, 167, 255)), QGradientStop(1, QColor(48, 210, 190, 255)));
+ case QGradient::LilyMeadow:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(101, 55, 155, 255)), QGradientStop(0.53, QColor(136, 106, 234, 255)), QGradientStop(1, QColor(100, 87, 198, 255)));
+ case QGradient::SugarLollipop:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(164, 69, 178, 255)), QGradientStop(0.52, QColor(212, 24, 114, 255)), QGradientStop(1, QColor(255, 0, 102, 255)));
+ case QGradient::SweetDessert:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(119, 66, 178, 255)), QGradientStop(0.52, QColor(241, 128, 255, 255)), QGradientStop(1, QColor(253, 139, 217, 255)));
+ case QGradient::MagicRay:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 60, 172, 255)), QGradientStop(0.52, QColor(86, 43, 124, 255)), QGradientStop(1, QColor(43, 134, 197, 255)));
+ case QGradient::TeenParty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 5, 124, 255)), QGradientStop(0.5, QColor(141, 11, 147, 255)), QGradientStop(1, QColor(50, 21, 117, 255)));
+ case QGradient::FrozenHeat:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 5, 124, 255)), QGradientStop(0.48, QColor(124, 100, 213, 255)), QGradientStop(1, QColor(76, 195, 255, 255)));
+ case QGradient::GagarinView:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(105, 234, 203, 255)), QGradientStop(0.48, QColor(234, 204, 248, 255)), QGradientStop(1, QColor(102, 84, 241, 255)));
+ case QGradient::FabledSunset:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(35, 21, 87, 255)), QGradientStop(0.29, QColor(68, 16, 122, 255)), QGradientStop(0.67, QColor(255, 19, 97, 255)), QGradientStop(1, QColor(255, 248, 0, 255)));
+ case QGradient::PerfectBlue:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(61, 78, 129, 255)), QGradientStop(0.48, QColor(87, 83, 201, 255)), QGradientStop(1, QColor(110, 127, 243, 255)));
+ case QGradient::NumPresets:
+ Q_UNREACHABLE();
+ }
+ Q_UNREACHABLE();
+ return {};
+}
+
+static Q_CONSTEXPR QGradient::QGradientData qt_preset_gradient_data[] = {
+ { { 0, 1, 1, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 0, 0 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 0, 0.5, 1 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0, 0, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.341506, 1.09151, 0.658494, -0.0915064 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 1.09151, 0.841506, -0.0915064, 0.158494 } },
+ { { 1.09151, 0.841506, -0.0915064, 0.158494 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0, 0, 0, 0 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+};
+
+static void *qt_preset_gradient_dummy()
+{
+ union {void *p; uint i;};
+ p = 0;
+ i |= uint(QGradient::ObjectMode);
+ return p;
+}
diff --git a/src/gui/painting/webgradients.css b/src/gui/painting/webgradients.css
deleted file mode 100644
index 870866bb46..0000000000
--- a/src/gui/painting/webgradients.css
+++ /dev/null
@@ -1,909 +0,0 @@
-/*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/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp
index ca835941d6..f0bf19bd91 100644
--- a/src/gui/rhi/qrhi.cpp
+++ b/src/gui/rhi/qrhi.cpp
@@ -48,8 +48,7 @@
#ifdef Q_OS_WIN
#include "qrhid3d11_p_p.h"
#endif
-//#ifdef Q_OS_DARWIN
-#ifdef Q_OS_MACOS
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
#include "qrhimetal_p_p.h"
#endif
@@ -2161,6 +2160,32 @@ QRhiResource::Type QRhiRenderBuffer::resourceType() const
*/
/*!
+ \class QRhiTexture::NativeTexture
+ \brief Contains information about the underlying native resources of a texture.
+ */
+
+/*!
+ \variable QRhiTexture::NativeTexture::object
+ \brief a pointer to the native object handle.
+
+ With OpenGL, the native handle is a GLuint value, so \c object is then a
+ pointer to a GLuint. With Vulkan, the native handle is a VkImage, so \c
+ object is a pointer to a VkImage. With Direct3D 11 and Metal \c
+ object is a pointer to a ID3D11Texture2D or MTLTexture pointer, respectively.
+
+ \note Pay attention to the fact that \a object is always a pointer
+ to the native texture handle type, even if the native type itself is a
+ pointer.
+ */
+
+/*!
+ \variable QRhiTexture::NativeTexture::layout
+ \brief Specifies the current image layout for APIs like Vulkan.
+
+ For Vulkan, \c layout contains a \c VkImageLayout value.
+ */
+
+/*!
\internal
*/
QRhiTexture::QRhiTexture(QRhiImplementation *rhi, Format format_, const QSize &pixelSize_,
@@ -2190,21 +2215,20 @@ QRhiResource::Type QRhiTexture::resourceType() const
*/
/*!
- \return a pointer to a backend-specific QRhiNativeHandles subclass, such as
- QRhiVulkanTextureNativeHandles. The returned value is null when exposing
- the underlying native resources is not supported by the backend.
+ \return the underlying native resources for this texture. The returned value
+ will be empty if exposing the underlying native resources is not supported by
+ the backend.
- \sa QRhiVulkanTextureNativeHandles, QRhiD3D11TextureNativeHandles,
- QRhiMetalTextureNativeHandles, QRhiGles2TextureNativeHandles
+ \sa buildFrom()
*/
-const QRhiNativeHandles *QRhiTexture::nativeHandles()
+QRhiTexture::NativeTexture QRhiTexture::nativeTexture()
{
- return nullptr;
+ return {};
}
/*!
Similar to build() except that no new native textures are created. Instead,
- the texture from \a src is used.
+ the native texture resources specified by \a src is used.
This allows importing an existing native texture object (which must belong
to the same device or sharing context, depending on the graphics API) from
@@ -2220,12 +2244,10 @@ const QRhiNativeHandles *QRhiTexture::nativeHandles()
does not free the object or any associated memory.
The opposite of this operation, exposing a QRhiTexture-created native
- texture object to a foreign engine, is possible via nativeHandles().
+ texture object to a foreign engine, is possible via nativeTexture().
- \sa QRhiVulkanTextureNativeHandles, QRhiD3D11TextureNativeHandles,
- QRhiMetalTextureNativeHandles, QRhiGles2TextureNativeHandles
- */
-bool QRhiTexture::buildFrom(const QRhiNativeHandles *src)
+*/
+bool QRhiTexture::buildFrom(QRhiTexture::NativeTexture src)
{
Q_UNUSED(src);
return false;
@@ -2253,9 +2275,7 @@ bool QRhiTexture::buildFrom(const QRhiNativeHandles *src)
\value Repeat
\value ClampToEdge
- \value Border
\value Mirror
- \value MirrorOnce
*/
/*!
@@ -2277,11 +2297,10 @@ bool QRhiTexture::buildFrom(const QRhiNativeHandles *src)
*/
QRhiSampler::QRhiSampler(QRhiImplementation *rhi,
Filter magFilter_, Filter minFilter_, Filter mipmapMode_,
- AddressMode u_, AddressMode v_)
+ AddressMode u_, AddressMode v_, AddressMode w_)
: QRhiResource(rhi),
m_magFilter(magFilter_), m_minFilter(minFilter_), m_mipmapMode(mipmapMode_),
- m_addressU(u_), m_addressV(v_),
- m_addressW(QRhiSampler::ClampToEdge),
+ m_addressU(u_), m_addressV(v_), m_addressW(w_),
m_compareOp(QRhiSampler::Never)
{
}
@@ -2322,8 +2341,26 @@ QRhiResource::Type QRhiRenderPassDescriptor::resourceType() const
}
/*!
+ \fn bool QRhiRenderPassDescriptor::isCompatible(const QRhiRenderPassDescriptor *other) const;
+
+ \return true if the \a other QRhiRenderPassDescriptor is compatible with
+ this one, meaning \c this and \a other can be used interchangebly in
+ QRhiGraphicsPipeline::setRenderPassDescriptor().
+
+ The concept of the compatibility of renderpass descriptors is similar to
+ the \l{QRhiShaderResourceBindings::isLayoutCompatible}{layout
+ compatibility} of QRhiShaderResourceBindings instances. They allow better
+ reuse of QRhiGraphicsPipeline instances: for example, a
+ QRhiGraphicsPipeline instance cache is expected to use these functions to
+ look for a matching pipeline, instead of just comparing pointers, thus
+ allowing a different QRhiRenderPassDescriptor and
+ QRhiShaderResourceBindings to be used in combination with the pipeline, as
+ long as they are compatible.
+ */
+
+/*!
\return a pointer to a backend-specific QRhiNativeHandles subclass, such as
- QRhiVulkanRenderPassNativeHandles. The returned value is null when exposing
+ QRhiVulkanRenderPassNativeHandles. The returned value is \nullptr when exposing
the underlying native resources is not supported by the backend.
\sa QRhiVulkanRenderPassNativeHandles
@@ -3901,6 +3938,12 @@ void QRhiImplementation::textureFormatInfo(QRhiTexture::Format format, const QSi
case QRhiTexture::RGBA32F:
bpc = 16;
break;
+ case QRhiTexture::R16F:
+ bpc = 2;
+ break;
+ case QRhiTexture::R32F:
+ bpc = 4;
+ break;
case QRhiTexture::D16:
bpc = 2;
@@ -4049,8 +4092,7 @@ QRhi *QRhi::create(Implementation impl, QRhiInitParams *params, Flags flags, QRh
break;
#endif
case Metal:
-//#ifdef Q_OS_DARWIN
-#ifdef Q_OS_MACOS
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
r->d = new QRhiMetal(static_cast<QRhiMetalInitParams *>(params),
static_cast<QRhiMetalNativeHandles *>(importDevice));
break;
@@ -4890,7 +4932,7 @@ void QRhiCommandBuffer::dispatch(int x, int y, int z)
/*!
\return a pointer to a backend-specific QRhiNativeHandles subclass, such as
- QRhiVulkanCommandBufferNativeHandles. The returned value is null when
+ QRhiVulkanCommandBufferNativeHandles. The returned value is \nullptr when
exposing the underlying native resources is not supported by, or not
applicable to, the backend.
@@ -5016,13 +5058,24 @@ bool QRhi::isYUpInNDC() const
}
/*!
- \return \c true if the underlying graphics API uses depth 0 - 1 in clip
- space.
+ \return \c true if the underlying graphics API uses depth range [0, 1] in
+ clip space.
- In practice this is \c false for OpenGL only.
+ In practice this is \c false for OpenGL only, because OpenGL uses a
+ post-projection depth range of [-1, 1]. (not to be confused with the
+ NDC-to-window mapping controlled by glDepthRange(), which uses a range of
+ [0, 1], unless overridden by the QRhiViewport) In some OpenGL versions
+ glClipControl() could be used to change this, but the OpenGL backend of
+ QRhi does not use that function as it is not available in OpenGL ES or
+ OpenGL versions lower than 4.5.
\note clipSpaceCorrMatrix() includes the corresponding adjustment in its
- returned matrix.
+ returned matrix. Therefore, many users of QRhi do not need to take any
+ further measures apart from pre-multiplying their projection matrices with
+ clipSpaceCorrMatrix(). However, some graphics techniques, such as, some
+ types of shadow mapping, involve working with and outputting depth values
+ in the shaders. These will need to query and take the value of this
+ function into account as appropriate.
*/
bool QRhi::isClipDepthZeroToOne() const
{
@@ -5032,11 +5085,15 @@ bool QRhi::isClipDepthZeroToOne() const
/*!
\return a matrix that can be used to allow applications keep using
OpenGL-targeted vertex data and perspective projection matrices (such as,
- the ones generated by QMatrix4x4::perspective()), regardless of the
- backend. Once \c{this_matrix * mvp} is used instead of just \c mvp, vertex
- data with Y up and viewports with depth range 0 - 1 can be used without
- considering what backend and so graphics API is going to be used at run
- time.
+ the ones generated by QMatrix4x4::perspective()), regardless of the active
+ QRhi backend.
+
+ In a typical renderer, once \c{this_matrix * mvp} is used instead of just
+ \c mvp, vertex data with Y up and viewports with depth range 0 - 1 can be
+ used without considering what backend (and so graphics API) is going to be
+ used at run time. This way branching based on isYUpInNDC() and
+ isClipDepthZeroToOne() can be avoided (although such logic may still become
+ required when implementing certain advanced graphics techniques).
See
\l{https://matthewwellings.com/blog/the-new-vulkan-coordinate-system/}{this
@@ -5278,16 +5335,19 @@ QRhiTexture *QRhi::newTexture(QRhiTexture::Format format,
/*!
\return a new sampler with the specified magnification filter \a magFilter,
- minification filter \a minFilter, mipmapping mode \a mipmapMpde, and S/T
- addressing modes \a u and \a v.
+ minification filter \a minFilter, mipmapping mode \a mipmapMode, and the
+ addressing (wrap) modes \a addressU, \a addressV, and \a addressW.
\sa QRhiResource::release()
*/
-QRhiSampler *QRhi::newSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
+QRhiSampler *QRhi::newSampler(QRhiSampler::Filter magFilter,
+ QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler:: AddressMode u, QRhiSampler::AddressMode v)
+ QRhiSampler::AddressMode addressU,
+ QRhiSampler::AddressMode addressV,
+ QRhiSampler::AddressMode addressW)
{
- return d->createSampler(magFilter, minFilter, mipmapMode, u, v);
+ return d->createSampler(magFilter, minFilter, mipmapMode, addressU, addressV, addressW);
}
/*!
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h
index 588347d111..d17112a241 100644
--- a/src/gui/rhi/qrhi_p.h
+++ b/src/gui/rhi/qrhi_p.h
@@ -728,6 +728,8 @@ public:
RGBA16F,
RGBA32F,
+ R16F,
+ R32F,
D16,
D32F,
@@ -760,6 +762,11 @@ public:
ASTC_12x12
};
+ struct NativeTexture {
+ const void *object;
+ int layout;
+ };
+
QRhiResource::Type resourceType() const override;
Format format() const { return m_format; }
@@ -775,8 +782,8 @@ public:
void setSampleCount(int s) { m_sampleCount = s; }
virtual bool build() = 0;
- virtual const QRhiNativeHandles *nativeHandles();
- virtual bool buildFrom(const QRhiNativeHandles *src);
+ virtual NativeTexture nativeTexture();
+ virtual bool buildFrom(NativeTexture src);
protected:
QRhiTexture(QRhiImplementation *rhi, Format format_, const QSize &pixelSize_,
@@ -801,9 +808,7 @@ public:
enum AddressMode {
Repeat,
ClampToEdge,
- Border,
Mirror,
- MirrorOnce
};
enum CompareOp {
@@ -845,7 +850,7 @@ public:
protected:
QRhiSampler(QRhiImplementation *rhi,
Filter magFilter_, Filter minFilter_, Filter mipmapMode_,
- AddressMode u_, AddressMode v_);
+ AddressMode u_, AddressMode v_, AddressMode w_);
Filter m_magFilter;
Filter m_minFilter;
Filter m_mipmapMode;
@@ -902,6 +907,7 @@ class Q_GUI_EXPORT QRhiRenderPassDescriptor : public QRhiResource
public:
QRhiResource::Type resourceType() const override;
+ virtual bool isCompatible(const QRhiRenderPassDescriptor *other) const = 0;
virtual const QRhiNativeHandles *nativeHandles();
protected:
@@ -1149,6 +1155,12 @@ public:
float lineWidth() const { return m_lineWidth; }
void setLineWidth(float width) { m_lineWidth = width; }
+ int depthBias() const { return m_depthBias; }
+ void setDepthBias(int bias) { m_depthBias = bias; }
+
+ float slopeScaledDepthBias() const { return m_slopeScaledDepthBias; }
+ void setSlopeScaledDepthBias(float bias) { m_slopeScaledDepthBias = bias; }
+
void setShaderStages(std::initializer_list<QRhiShaderStage> list) { m_shaderStages = list; }
template<typename InputIterator>
void setShaderStages(InputIterator first, InputIterator last)
@@ -1187,6 +1199,8 @@ protected:
quint32 m_stencilWriteMask = 0xFF;
int m_sampleCount = 1;
float m_lineWidth = 1.0f;
+ int m_depthBias = 0;
+ float m_slopeScaledDepthBias = 0.0f;
QVarLengthArray<QRhiShaderStage, 4> m_shaderStages;
QRhiVertexInputLayout m_vertexInputLayout;
QRhiShaderResourceBindings *m_shaderResourceBindings = nullptr;
@@ -1468,9 +1482,12 @@ public:
int sampleCount = 1,
QRhiTexture::Flags flags = QRhiTexture::Flags());
- QRhiSampler *newSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
+ QRhiSampler *newSampler(QRhiSampler::Filter magFilter,
+ QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler::AddressMode u, QRhiSampler::AddressMode v);
+ QRhiSampler::AddressMode addressU,
+ QRhiSampler::AddressMode addressV,
+ QRhiSampler::AddressMode addressW = QRhiSampler::Repeat);
QRhiTextureRenderTarget *newTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
QRhiTextureRenderTarget::Flags flags = QRhiTextureRenderTarget::Flags());
diff --git a/src/gui/rhi/qrhi_p_p.h b/src/gui/rhi/qrhi_p_p.h
index baffe28202..4a4c044a29 100644
--- a/src/gui/rhi/qrhi_p_p.h
+++ b/src/gui/rhi/qrhi_p_p.h
@@ -85,9 +85,12 @@ public:
const QSize &pixelSize,
int sampleCount,
QRhiTexture::Flags flags) = 0;
- virtual QRhiSampler *createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
+ virtual QRhiSampler *createSampler(QRhiSampler::Filter magFilter,
+ QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler:: AddressMode u, QRhiSampler::AddressMode v) = 0;
+ QRhiSampler:: AddressMode u,
+ QRhiSampler::AddressMode v,
+ QRhiSampler::AddressMode w) = 0;
virtual QRhiTextureRenderTarget *createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
QRhiTextureRenderTarget::Flags flags) = 0;
diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp
index 5e576e9c6a..75b90b6995 100644
--- a/src/gui/rhi/qrhid3d11.cpp
+++ b/src/gui/rhi/qrhid3d11.cpp
@@ -108,17 +108,6 @@ QT_BEGIN_NAMESPACE
\c{ID3D11Device *} and \c{ID3D11DeviceContext *}.
*/
-/*!
- \class QRhiD3D11TextureNativeHandles
- \internal
- \inmodule QtGui
- \brief Holds the D3D texture object that is backing a QRhiTexture instance.
-
- \note The class uses \c{void *} as the type since including the COM-based
- \c{d3d11.h} headers is not acceptable here. The actual type is
- \c{ID3D11Texture2D *}.
- */
-
// help mingw with its ancient sdk headers
#ifndef DXGI_ADAPTER_FLAG_SOFTWARE
#define DXGI_ADAPTER_FLAG_SOFTWARE 2
@@ -538,9 +527,9 @@ QRhiTexture *QRhiD3D11::createTexture(QRhiTexture::Format format, const QSize &p
QRhiSampler *QRhiD3D11::createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler::AddressMode u, QRhiSampler::AddressMode v)
+ QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w)
{
- return new QD3D11Sampler(this, magFilter, minFilter, mipmapMode, u, v);
+ return new QD3D11Sampler(this, magFilter, minFilter, mipmapMode, u, v, w);
}
QRhiTextureRenderTarget *QRhiD3D11::createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
@@ -641,9 +630,7 @@ void QRhiD3D11::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
}
break;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
{
QD3D11Texture *texD = QRHI_RES(QD3D11Texture, b->u.simage.tex);
@@ -655,9 +642,7 @@ void QRhiD3D11::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
}
break;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
{
QD3D11Buffer *bufD = QRHI_RES(QD3D11Buffer, b->u.sbuf.buf);
@@ -1117,6 +1102,10 @@ static inline DXGI_FORMAT toD3DTextureFormat(QRhiTexture::Format format, QRhiTex
return DXGI_FORMAT_R16G16B16A16_FLOAT;
case QRhiTexture::RGBA32F:
return DXGI_FORMAT_R32G32B32A32_FLOAT;
+ case QRhiTexture::R16F:
+ return DXGI_FORMAT_R16_FLOAT;
+ case QRhiTexture::R32F:
+ return DXGI_FORMAT_R32_FLOAT;
case QRhiTexture::D16:
return DXGI_FORMAT_R16_TYPELESS;
@@ -1139,39 +1128,24 @@ static inline DXGI_FORMAT toD3DTextureFormat(QRhiTexture::Format format, QRhiTex
return srgb ? DXGI_FORMAT_BC7_UNORM_SRGB : DXGI_FORMAT_BC7_UNORM;
case QRhiTexture::ETC2_RGB8:
- Q_FALLTHROUGH();
case QRhiTexture::ETC2_RGB8A1:
- Q_FALLTHROUGH();
case QRhiTexture::ETC2_RGBA8:
qWarning("QRhiD3D11 does not support ETC2 textures");
return DXGI_FORMAT_R8G8B8A8_UNORM;
case QRhiTexture::ASTC_4x4:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_5x4:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_5x5:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_6x5:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_6x6:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_8x5:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_8x6:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_8x8:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_10x5:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_10x6:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_10x8:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_10x10:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_12x10:
- Q_FALLTHROUGH();
case QRhiTexture::ASTC_12x12:
qWarning("QRhiD3D11 does not support ASTC textures");
return DXGI_FORMAT_R8G8B8A8_UNORM;
@@ -1212,7 +1186,6 @@ static inline bool isDepthTextureFormat(QRhiTexture::Format format)
{
switch (format) {
case QRhiTexture::Format::D16:
- Q_FALLTHROUGH();
case QRhiTexture::Format::D32F:
return true;
@@ -1878,9 +1851,7 @@ void QRhiD3D11::updateShaderResourceBindings(QD3D11ShaderResourceBindings *srbD)
}
break;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
{
QD3D11Texture *texD = QRHI_RES(QD3D11Texture, b->u.simage.tex);
@@ -1896,9 +1867,7 @@ void QRhiD3D11::updateShaderResourceBindings(QD3D11ShaderResourceBindings *srbD)
}
break;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
{
QD3D11Buffer *bufD = QRHI_RES(QD3D11Buffer, b->u.sbuf.buf);
@@ -2674,8 +2643,6 @@ bool QD3D11Texture::finishBuild()
return false;
}
- nativeHandlesStruct.texture = tex;
-
generation += 1;
return true;
}
@@ -2741,16 +2708,16 @@ bool QD3D11Texture::build()
return true;
}
-bool QD3D11Texture::buildFrom(const QRhiNativeHandles *src)
+bool QD3D11Texture::buildFrom(QRhiTexture::NativeTexture src)
{
- const QRhiD3D11TextureNativeHandles *h = static_cast<const QRhiD3D11TextureNativeHandles *>(src);
- if (!h || !h->texture)
+ auto *srcTex = static_cast<ID3D11Texture2D * const *>(src.object);
+ if (!srcTex || !*srcTex)
return false;
if (!prepareBuild())
return false;
- tex = static_cast<ID3D11Texture2D *>(h->texture);
+ tex = *srcTex;
if (!finishBuild())
return false;
@@ -2764,9 +2731,9 @@ bool QD3D11Texture::buildFrom(const QRhiNativeHandles *src)
return true;
}
-const QRhiNativeHandles *QD3D11Texture::nativeHandles()
+QRhiTexture::NativeTexture QD3D11Texture::nativeTexture()
{
- return &nativeHandlesStruct;
+ return {&tex, 0};
}
ID3D11UnorderedAccessView *QD3D11Texture::unorderedAccessViewForLevel(int level)
@@ -2801,8 +2768,8 @@ ID3D11UnorderedAccessView *QD3D11Texture::unorderedAccessViewForLevel(int level)
}
QD3D11Sampler::QD3D11Sampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v)
- : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v)
+ AddressMode u, AddressMode v, AddressMode w)
+ : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v, w)
{
}
@@ -2862,12 +2829,8 @@ static inline D3D11_TEXTURE_ADDRESS_MODE toD3DAddressMode(QRhiSampler::AddressMo
return D3D11_TEXTURE_ADDRESS_WRAP;
case QRhiSampler::ClampToEdge:
return D3D11_TEXTURE_ADDRESS_CLAMP;
- case QRhiSampler::Border:
- return D3D11_TEXTURE_ADDRESS_BORDER;
case QRhiSampler::Mirror:
return D3D11_TEXTURE_ADDRESS_MIRROR;
- case QRhiSampler::MirrorOnce:
- return D3D11_TEXTURE_ADDRESS_MIRROR_ONCE;
default:
Q_UNREACHABLE();
return D3D11_TEXTURE_ADDRESS_CLAMP;
@@ -2944,6 +2907,12 @@ void QD3D11RenderPassDescriptor::release()
// nothing to do here
}
+bool QD3D11RenderPassDescriptor::isCompatible(const QRhiRenderPassDescriptor *other) const
+{
+ Q_UNUSED(other);
+ return true;
+}
+
QD3D11ReferenceRenderTarget::QD3D11ReferenceRenderTarget(QRhiImplementation *rhi)
: QRhiRenderTarget(rhi),
d(rhi)
@@ -3367,11 +3336,9 @@ static inline D3D11_BLEND toD3DBlendFactor(QRhiGraphicsPipeline::BlendFactor f)
case QRhiGraphicsPipeline::OneMinusDstAlpha:
return D3D11_BLEND_INV_DEST_ALPHA;
case QRhiGraphicsPipeline::ConstantColor:
- Q_FALLTHROUGH();
case QRhiGraphicsPipeline::ConstantAlpha:
return D3D11_BLEND_BLEND_FACTOR;
case QRhiGraphicsPipeline::OneMinusConstantColor:
- Q_FALLTHROUGH();
case QRhiGraphicsPipeline::OneMinusConstantAlpha:
return D3D11_BLEND_INV_BLEND_FACTOR;
case QRhiGraphicsPipeline::SrcAlphaSaturate:
@@ -3500,6 +3467,9 @@ bool QD3D11GraphicsPipeline::build()
rastDesc.FillMode = D3D11_FILL_SOLID;
rastDesc.CullMode = toD3DCullMode(m_cullMode);
rastDesc.FrontCounterClockwise = m_frontFace == CCW;
+ rastDesc.DepthBias = m_depthBias;
+ rastDesc.SlopeScaledDepthBias = m_slopeScaledDepthBias;
+ rastDesc.DepthClipEnable = true;
rastDesc.ScissorEnable = m_flags.testFlag(UsesScissor);
rastDesc.MultisampleEnable = rhiD->effectiveSampleCount(m_sampleCount).Count > 1;
HRESULT hr = rhiD->dev->CreateRasterizerState(&rastDesc, &rastState);
diff --git a/src/gui/rhi/qrhid3d11_p.h b/src/gui/rhi/qrhid3d11_p.h
index 5df1843b1e..aba0f37ee7 100644
--- a/src/gui/rhi/qrhid3d11_p.h
+++ b/src/gui/rhi/qrhid3d11_p.h
@@ -69,11 +69,6 @@ struct Q_GUI_EXPORT QRhiD3D11NativeHandles : public QRhiNativeHandles
void *context = nullptr;
};
-struct Q_GUI_EXPORT QRhiD3D11TextureNativeHandles : public QRhiNativeHandles
-{
- void *texture = nullptr; // ID3D11Texture2D*
-};
-
QT_END_NAMESPACE
#endif
diff --git a/src/gui/rhi/qrhid3d11_p_p.h b/src/gui/rhi/qrhid3d11_p_p.h
index 26de34ae0a..c3a4021241 100644
--- a/src/gui/rhi/qrhid3d11_p_p.h
+++ b/src/gui/rhi/qrhid3d11_p_p.h
@@ -99,8 +99,8 @@ struct QD3D11Texture : public QRhiTexture
~QD3D11Texture();
void release() override;
bool build() override;
- bool buildFrom(const QRhiNativeHandles *src) override;
- const QRhiNativeHandles *nativeHandles() override;
+ bool buildFrom(NativeTexture src) override;
+ NativeTexture nativeTexture() override;
bool prepareBuild(QSize *adjustedSize = nullptr);
bool finishBuild();
@@ -112,7 +112,6 @@ struct QD3D11Texture : public QRhiTexture
DXGI_FORMAT dxgiFormat;
uint mipLevelCount = 0;
DXGI_SAMPLE_DESC sampleDesc;
- QRhiD3D11TextureNativeHandles nativeHandlesStruct;
ID3D11UnorderedAccessView *perLevelViews[QRhi::MAX_LEVELS];
uint generation = 0;
friend class QRhiD3D11;
@@ -121,7 +120,7 @@ struct QD3D11Texture : public QRhiTexture
struct QD3D11Sampler : public QRhiSampler
{
QD3D11Sampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v);
+ AddressMode u, AddressMode v, AddressMode w);
~QD3D11Sampler();
void release() override;
bool build() override;
@@ -136,6 +135,7 @@ struct QD3D11RenderPassDescriptor : public QRhiRenderPassDescriptor
QD3D11RenderPassDescriptor(QRhiImplementation *rhi);
~QD3D11RenderPassDescriptor();
void release() override;
+ bool isCompatible(const QRhiRenderPassDescriptor *other) const override;
};
struct QD3D11RenderTargetData
@@ -559,9 +559,12 @@ public:
const QSize &pixelSize,
int sampleCount,
QRhiTexture::Flags flags) override;
- QRhiSampler *createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
+ QRhiSampler *createSampler(QRhiSampler::Filter magFilter,
+ QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler:: AddressMode u, QRhiSampler::AddressMode v) override;
+ QRhiSampler:: AddressMode u,
+ QRhiSampler::AddressMode v,
+ QRhiSampler::AddressMode w) override;
QRhiTextureRenderTarget *createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
QRhiTextureRenderTarget::Flags flags) override;
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp
index b394354787..62f808ce81 100644
--- a/src/gui/rhi/qrhigles2.cpp
+++ b/src/gui/rhi/qrhigles2.cpp
@@ -137,13 +137,6 @@ QT_BEGIN_NAMESPACE
\brief Holds the OpenGL context used by the QRhi.
*/
-/*!
- \class QRhiGles2TextureNativeHandles
- \internal
- \inmodule QtGui
- \brief Holds the OpenGL texture object that is backing a QRhiTexture instance.
- */
-
#ifndef GL_BGRA
#define GL_BGRA 0x80E1
#endif
@@ -172,6 +165,14 @@ QT_BEGIN_NAMESPACE
#define GL_RGBA16F 0x881A
#endif
+#ifndef GL_R16F
+#define GL_R16F 0x822D
+#endif
+
+#ifndef GL_R32F
+#define GL_R32F 0x822E
+#endif
+
#ifndef GL_HALF_FLOAT
#define GL_HALF_FLOAT 0x140B
#endif
@@ -268,6 +269,14 @@ QT_BEGIN_NAMESPACE
#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
#endif
+#ifndef GL_SHADER_IMAGE_ACCESS_BARRIER_BIT
+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
+#endif
+
+#ifndef GL_SHADER_STORAGE_BARRIER_BIT
+#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000
+#endif
+
#ifndef GL_VERTEX_PROGRAM_POINT_SIZE
#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
#endif
@@ -688,7 +697,6 @@ bool QRhiGles2::isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture
switch (format) {
case QRhiTexture::D16:
- Q_FALLTHROUGH();
case QRhiTexture::D32F:
return caps.depthTexture;
@@ -702,10 +710,13 @@ bool QRhiGles2::isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture
return caps.r16Format;
case QRhiTexture::RGBA16F:
- Q_FALLTHROUGH();
case QRhiTexture::RGBA32F:
return caps.floatFormats;
+ case QRhiTexture::R16F:
+ case QRhiTexture::R32F:
+ return caps.floatFormats;
+
default:
break;
}
@@ -827,9 +838,9 @@ QRhiTexture *QRhiGles2::createTexture(QRhiTexture::Format format, const QSize &p
QRhiSampler *QRhiGles2::createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler::AddressMode u, QRhiSampler::AddressMode v)
+ QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w)
{
- return new QGles2Sampler(this, magFilter, minFilter, mipmapMode, u, v);
+ return new QGles2Sampler(this, magFilter, minFilter, mipmapMode, u, v, w);
}
QRhiTextureRenderTarget *QRhiGles2::createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
@@ -906,9 +917,7 @@ void QRhiGles2::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
QRhiPassResourceTracker::toPassTrackerTextureStage(b->stage));
break;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
{
QGles2Texture *texD = QRHI_RES(QGles2Texture, b->u.simage.tex);
@@ -924,9 +933,7 @@ void QRhiGles2::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
}
break;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
{
QGles2Buffer *bufD = QRHI_RES(QGles2Buffer, b->u.sbuf.buf);
@@ -1308,6 +1315,21 @@ QRhi::FrameOpResult QRhiGles2::finish()
return QRhi::FrameOpSuccess;
}
+static bool bufferAccessIsWrite(QGles2Buffer::Access access)
+{
+ return access == QGles2Buffer::AccessStorageWrite
+ || access == QGles2Buffer::AccessStorageReadWrite
+ || access == QGles2Buffer::AccessUpdate;
+}
+
+static bool textureAccessIsWrite(QGles2Texture::Access access)
+{
+ return access == QGles2Texture::AccessStorageWrite
+ || access == QGles2Texture::AccessStorageReadWrite
+ || access == QGles2Texture::AccessUpdate
+ || access == QGles2Texture::AccessFramebuffer;
+}
+
void QRhiGles2::trackedBufferBarrier(QGles2CommandBuffer *cbD, QGles2Buffer *bufD, QGles2Buffer::Access access)
{
Q_ASSERT(cbD->recordingPass == QGles2CommandBuffer::NoPass); // this is for resource updates only
@@ -1315,7 +1337,7 @@ void QRhiGles2::trackedBufferBarrier(QGles2CommandBuffer *cbD, QGles2Buffer *buf
if (access == prevAccess)
return;
- if (prevAccess == QGles2Buffer::AccessStorageWrite || prevAccess == QGles2Buffer::AccessStorageReadWrite) {
+ if (bufferAccessIsWrite(prevAccess)) {
// Generating the minimal barrier set is way too complicated to do
// correctly (prevAccess is overwritten so we won't have proper
// tracking across multiple passes) so setting all barrier bits will do
@@ -1336,7 +1358,7 @@ void QRhiGles2::trackedImageBarrier(QGles2CommandBuffer *cbD, QGles2Texture *tex
if (access == prevAccess)
return;
- if (prevAccess == QGles2Texture::AccessStorageWrite || prevAccess == QGles2Texture::AccessStorageReadWrite) {
+ if (textureAccessIsWrite(prevAccess)) {
QGles2CommandBuffer::Command cmd;
cmd.cmd = QGles2CommandBuffer::Command::Barrier;
cmd.args.barrier.barriers = GL_ALL_BARRIER_BITS;
@@ -1661,11 +1683,8 @@ static inline GLenum toGlBlendFactor(QRhiGraphicsPipeline::BlendFactor f)
case QRhiGraphicsPipeline::SrcAlphaSaturate:
return GL_SRC_ALPHA_SATURATE;
case QRhiGraphicsPipeline::Src1Color:
- Q_FALLTHROUGH();
case QRhiGraphicsPipeline::OneMinusSrc1Color:
- Q_FALLTHROUGH();
case QRhiGraphicsPipeline::Src1Alpha:
- Q_FALLTHROUGH();
case QRhiGraphicsPipeline::OneMinusSrc1Alpha:
qWarning("Unsupported blend factor %d", f);
return GL_ZERO;
@@ -1785,11 +1804,6 @@ static inline GLenum toGlWrapMode(QRhiSampler::AddressMode m)
return GL_CLAMP_TO_EDGE;
case QRhiSampler::Mirror:
return GL_MIRRORED_REPEAT;
- case QRhiSampler::MirrorOnce:
- Q_FALLTHROUGH();
- case QRhiSampler::Border:
- qWarning("Unsupported wrap mode %d", m);
- return GL_CLAMP_TO_EDGE;
default:
Q_UNREACHABLE();
return GL_CLAMP_TO_EDGE;
@@ -2282,26 +2296,21 @@ void QRhiGles2::executeCommandBuffer(QRhiCommandBuffer *cb)
// subsequent pass.
for (auto it = tracker.cbeginBuffers(), itEnd = tracker.cendBuffers(); it != itEnd; ++it) {
QGles2Buffer::Access accessBeforePass = QGles2Buffer::Access(it->stateAtPassBegin.access);
- if (accessBeforePass == QGles2Buffer::AccessStorageWrite
- || accessBeforePass == QGles2Buffer::AccessStorageReadWrite)
- {
+ if (bufferAccessIsWrite(accessBeforePass))
barriers |= GL_ALL_BARRIER_BITS;
- }
}
for (auto it = tracker.cbeginTextures(), itEnd = tracker.cendTextures(); it != itEnd; ++it) {
QGles2Texture::Access accessBeforePass = QGles2Texture::Access(it->stateAtPassBegin.access);
- if (accessBeforePass == QGles2Texture::AccessStorageWrite
- || accessBeforePass == QGles2Texture::AccessStorageReadWrite)
- {
+ if (textureAccessIsWrite(accessBeforePass))
barriers |= GL_ALL_BARRIER_BITS;
- }
}
- if (barriers)
+ if (barriers && caps.compute)
f->glMemoryBarrier(barriers);
}
break;
case QGles2CommandBuffer::Command::Barrier:
- f->glMemoryBarrier(cmd.args.barrier.barriers);
+ if (caps.compute)
+ f->glMemoryBarrier(cmd.args.barrier.barriers);
break;
default:
break;
@@ -2377,18 +2386,36 @@ void QRhiGles2::executeBindGraphicsPipeline(QRhiGraphicsPipeline *ps)
f->glDisable(GL_STENCIL_TEST);
}
- if (psD->topology() == QRhiGraphicsPipeline::Lines || psD->topology() == QRhiGraphicsPipeline::LineStrip)
+ if (psD->m_depthBias != 0 || !qFuzzyIsNull(psD->m_slopeScaledDepthBias)) {
+ f->glPolygonOffset(psD->m_slopeScaledDepthBias, psD->m_depthBias);
+ f->glEnable(GL_POLYGON_OFFSET_FILL);
+ } else {
+ f->glDisable(GL_POLYGON_OFFSET_FILL);
+ }
+
+ if (psD->m_topology == QRhiGraphicsPipeline::Lines || psD->m_topology == QRhiGraphicsPipeline::LineStrip)
f->glLineWidth(psD->m_lineWidth);
f->glUseProgram(psD->program);
}
+static inline void qrhi_std140_to_packed(float *dst, int vecSize, int elemCount, const void *src)
+{
+ const float *p = reinterpret_cast<const float *>(src);
+ for (int i = 0; i < elemCount; ++i) {
+ for (int j = 0; j < vecSize; ++j)
+ dst[vecSize * i + j] = *p++;
+ p += 4 - vecSize;
+ }
+}
+
void QRhiGles2::bindShaderResources(QRhiGraphicsPipeline *maybeGraphicsPs, QRhiComputePipeline *maybeComputePs,
QRhiShaderResourceBindings *srb,
const uint *dynOfsPairs, int dynOfsCount)
{
QGles2ShaderResourceBindings *srbD = QRHI_RES(QGles2ShaderResourceBindings, srb);
int texUnit = 0;
+ QVarLengthArray<float, 256> packedFloatArray;
for (int i = 0, ie = srbD->m_bindings.count(); i != ie; ++i) {
const QRhiShaderResourceBinding::Data *b = srbD->m_bindings.at(i).data();
@@ -2416,24 +2443,78 @@ void QRhiGles2::bindShaderResources(QRhiGraphicsPipeline *maybeGraphicsPs, QRhiC
// so this should not cause unaligned reads
const void *src = bufView.constData() + uniform.offset;
+ if (uniform.arrayDim > 0
+ && uniform.type != QShaderDescription::Float
+ && uniform.type != QShaderDescription::Vec2
+ && uniform.type != QShaderDescription::Vec3
+ && uniform.type != QShaderDescription::Vec4)
+ {
+ qWarning("Uniform with buffer binding %d, buffer offset %d, type %d is an array, "
+ "but arrays are only supported for float, vec2, vec3, and vec4. "
+ "Only the first element will be set.",
+ uniform.binding, uniform.offset, uniform.type);
+ }
+
+ // Our input is an std140 layout uniform block. See
+ // "Standard Uniform Block Layout" in section 7.6.2.2 of
+ // the OpenGL spec. This has some peculiar alignment
+ // requirements, which is not what glUniform* wants. Hence
+ // the unpacking/repacking for arrays and certain types.
+
switch (uniform.type) {
case QShaderDescription::Float:
- f->glUniform1f(uniform.glslLocation, *reinterpret_cast<const float *>(src));
+ {
+ const int elemCount = uniform.arrayDim;
+ if (elemCount < 1) {
+ f->glUniform1f(uniform.glslLocation, *reinterpret_cast<const float *>(src));
+ } else {
+ // input is 16 bytes per element as per std140, have to convert to packed
+ packedFloatArray.resize(elemCount);
+ qrhi_std140_to_packed(packedFloatArray.data(), 1, elemCount, src);
+ f->glUniform1fv(uniform.glslLocation, elemCount, packedFloatArray.constData());
+ }
+ }
break;
case QShaderDescription::Vec2:
- f->glUniform2fv(uniform.glslLocation, 1, reinterpret_cast<const float *>(src));
+ {
+ const int elemCount = uniform.arrayDim;
+ if (elemCount < 1) {
+ f->glUniform2fv(uniform.glslLocation, 1, reinterpret_cast<const float *>(src));
+ } else {
+ packedFloatArray.resize(elemCount * 2);
+ qrhi_std140_to_packed(packedFloatArray.data(), 2, elemCount, src);
+ f->glUniform2fv(uniform.glslLocation, elemCount, packedFloatArray.constData());
+ }
+ }
break;
case QShaderDescription::Vec3:
- f->glUniform3fv(uniform.glslLocation, 1, reinterpret_cast<const float *>(src));
+ {
+ const int elemCount = uniform.arrayDim;
+ if (elemCount < 1) {
+ f->glUniform3fv(uniform.glslLocation, 1, reinterpret_cast<const float *>(src));
+ } else {
+ packedFloatArray.resize(elemCount * 3);
+ qrhi_std140_to_packed(packedFloatArray.data(), 3, elemCount, src);
+ f->glUniform3fv(uniform.glslLocation, elemCount, packedFloatArray.constData());
+ }
+ }
break;
case QShaderDescription::Vec4:
- f->glUniform4fv(uniform.glslLocation, 1, reinterpret_cast<const float *>(src));
+ f->glUniform4fv(uniform.glslLocation, qMax(1, uniform.arrayDim), reinterpret_cast<const float *>(src));
break;
case QShaderDescription::Mat2:
f->glUniformMatrix2fv(uniform.glslLocation, 1, GL_FALSE, reinterpret_cast<const float *>(src));
break;
case QShaderDescription::Mat3:
- f->glUniformMatrix3fv(uniform.glslLocation, 1, GL_FALSE, reinterpret_cast<const float *>(src));
+ {
+ // 4 floats per column (or row, if row-major)
+ float mat[9];
+ const float *srcMat = reinterpret_cast<const float *>(src);
+ memcpy(mat, srcMat, 3 * sizeof(float));
+ memcpy(mat + 3, srcMat + 4, 3 * sizeof(float));
+ memcpy(mat + 6, srcMat + 8, 3 * sizeof(float));
+ f->glUniformMatrix3fv(uniform.glslLocation, 1, GL_FALSE, mat);
+ }
break;
case QShaderDescription::Mat4:
f->glUniformMatrix4fv(uniform.glslLocation, 1, GL_FALSE, reinterpret_cast<const float *>(src));
@@ -2474,8 +2555,9 @@ void QRhiGles2::bindShaderResources(QRhiGraphicsPipeline *maybeGraphicsPs, QRhiC
case QShaderDescription::Bool4:
f->glUniform4iv(uniform.glslLocation, 1, reinterpret_cast<const qint32 *>(src));
break;
- // ### more types
default:
+ qWarning("Uniform with buffer binding %d, buffer offset %d has unsupported type %d",
+ uniform.binding, uniform.offset, uniform.type);
break;
}
}
@@ -2519,9 +2601,7 @@ void QRhiGles2::bindShaderResources(QRhiGraphicsPipeline *maybeGraphicsPs, QRhiC
}
break;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
{
QGles2Texture *texD = QRHI_RES(QGles2Texture, b->u.simage.tex);
@@ -2537,9 +2617,7 @@ void QRhiGles2::bindShaderResources(QRhiGraphicsPipeline *maybeGraphicsPs, QRhiC
}
break;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
{
QGles2Buffer *bufD = QRHI_RES(QGles2Buffer, b->u.sbuf.buf);
@@ -2738,6 +2816,8 @@ void QRhiGles2::beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch
cbD->recordingPass = QGles2CommandBuffer::ComputePass;
cbD->resetCachedState();
+
+ cbD->computePassState.reset();
}
void QRhiGles2::endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
@@ -2770,11 +2850,96 @@ void QRhiGles2::setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *p
}
}
+template<typename T>
+inline void qrhigl_accumulateComputeResource(T *writtenResources, QRhiResource *resource,
+ QRhiShaderResourceBinding::Type bindingType,
+ int loadTypeVal, int storeTypeVal, int loadStoreTypeVal)
+{
+ int access = 0;
+ if (bindingType == loadTypeVal) {
+ access = QGles2CommandBuffer::ComputePassState::Read;
+ } else {
+ access = QGles2CommandBuffer::ComputePassState::Write;
+ if (bindingType == loadStoreTypeVal)
+ access |= QGles2CommandBuffer::ComputePassState::Read;
+ }
+ auto it = writtenResources->find(resource);
+ if (it != writtenResources->end())
+ it->first |= access;
+ else if (bindingType == storeTypeVal || bindingType == loadStoreTypeVal)
+ writtenResources->insert(resource, { access, true });
+}
+
void QRhiGles2::dispatch(QRhiCommandBuffer *cb, int x, int y, int z)
{
QGles2CommandBuffer *cbD = QRHI_RES(QGles2CommandBuffer, cb);
Q_ASSERT(cbD->recordingPass == QGles2CommandBuffer::ComputePass);
+ if (cbD->currentComputeSrb) {
+ GLbitfield barriers = 0;
+
+ // The key in the writtenResources map indicates that the resource was
+ // written in a previous dispatch, whereas the value accumulates the
+ // access mask in the current one.
+ for (auto &accessAndIsNewFlag : cbD->computePassState.writtenResources)
+ accessAndIsNewFlag = { 0, false };
+
+ QGles2ShaderResourceBindings *srbD = QRHI_RES(QGles2ShaderResourceBindings, cbD->currentComputeSrb);
+ const int bindingCount = srbD->m_bindings.count();
+ for (int i = 0; i < bindingCount; ++i) {
+ const QRhiShaderResourceBinding::Data *b = srbD->m_bindings.at(i).data();
+ switch (b->type) {
+ case QRhiShaderResourceBinding::ImageLoad:
+ case QRhiShaderResourceBinding::ImageStore:
+ case QRhiShaderResourceBinding::ImageLoadStore:
+ qrhigl_accumulateComputeResource(&cbD->computePassState.writtenResources,
+ b->u.simage.tex,
+ b->type,
+ QRhiShaderResourceBinding::ImageLoad,
+ QRhiShaderResourceBinding::ImageStore,
+ QRhiShaderResourceBinding::ImageLoadStore);
+ break;
+ case QRhiShaderResourceBinding::BufferLoad:
+ case QRhiShaderResourceBinding::BufferStore:
+ case QRhiShaderResourceBinding::BufferLoadStore:
+ qrhigl_accumulateComputeResource(&cbD->computePassState.writtenResources,
+ b->u.sbuf.buf,
+ b->type,
+ QRhiShaderResourceBinding::BufferLoad,
+ QRhiShaderResourceBinding::BufferStore,
+ QRhiShaderResourceBinding::BufferLoadStore);
+ break;
+ default:
+ break;
+ }
+ }
+
+ for (auto it = cbD->computePassState.writtenResources.begin(); it != cbD->computePassState.writtenResources.end(); ) {
+ const int accessInThisDispatch = it->first;
+ const bool isNewInThisDispatch = it->second;
+ if (accessInThisDispatch && !isNewInThisDispatch) {
+ if (it.key()->resourceType() == QRhiResource::Texture)
+ barriers |= GL_SHADER_IMAGE_ACCESS_BARRIER_BIT;
+ else
+ barriers |= GL_SHADER_STORAGE_BARRIER_BIT;
+ }
+ // Anything that was previously written, but is only read now, can be
+ // removed from the written list (because that previous write got a
+ // corresponding barrier now).
+ if (accessInThisDispatch == QGles2CommandBuffer::ComputePassState::Read)
+ it = cbD->computePassState.writtenResources.erase(it);
+ else
+ ++it;
+ }
+
+ if (barriers) {
+ QGles2CommandBuffer::Command cmd;
+ cmd.cmd = QGles2CommandBuffer::Command::Barrier;
+ cmd.args.barrier.barriers = barriers;
+ cbD->commands.append(cmd);
+ }
+ }
+
QGles2CommandBuffer::Command cmd;
cmd.cmd = QGles2CommandBuffer::Command::Dispatch;
cmd.args.dispatch.x = GLuint(x);
@@ -2924,21 +3089,65 @@ bool QRhiGles2::linkProgram(GLuint program)
return true;
}
-void QRhiGles2::gatherUniforms(GLuint program, const QShaderDescription::UniformBlock &ub,
+void QRhiGles2::registerUniformIfActive(const QShaderDescription::BlockVariable &var,
+ const QByteArray &namePrefix,
+ int binding,
+ int baseOffset,
+ GLuint program,
+ QVector<QGles2UniformDescription> *dst)
+{
+ if (var.type == QShaderDescription::Struct) {
+ qWarning("Nested structs are not supported at the moment. '%s' ignored.",
+ qPrintable(var.name));
+ return;
+ }
+ QGles2UniformDescription uniform;
+ uniform.type = var.type;
+ const QByteArray name = namePrefix + var.name.toUtf8();
+ uniform.glslLocation = f->glGetUniformLocation(program, name.constData());
+ if (uniform.glslLocation >= 0) {
+ if (var.arrayDims.count() > 1) {
+ qWarning("Array '%s' has more than one dimension. This is not supported.",
+ qPrintable(var.name));
+ return;
+ }
+ uniform.binding = binding;
+ uniform.offset = uint(baseOffset + var.offset);
+ uniform.size = var.size;
+ uniform.arrayDim = var.arrayDims.isEmpty() ? 0 : var.arrayDims.first();
+ dst->append(uniform);
+ }
+}
+
+void QRhiGles2::gatherUniforms(GLuint program,
+ const QShaderDescription::UniformBlock &ub,
QVector<QGles2UniformDescription> *dst)
{
- const QByteArray prefix = ub.structName.toUtf8() + '.';
+ QByteArray prefix = ub.structName.toUtf8() + '.';
for (const QShaderDescription::BlockVariable &blockMember : ub.members) {
- // ### no array support for now
- QGles2UniformDescription uniform;
- uniform.type = blockMember.type;
- const QByteArray name = prefix + blockMember.name.toUtf8();
- uniform.glslLocation = f->glGetUniformLocation(program, name.constData());
- if (uniform.glslLocation >= 0) {
- uniform.binding = ub.binding;
- uniform.offset = uint(blockMember.offset);
- uniform.size = blockMember.size;
- dst->append(uniform);
+ if (blockMember.type == QShaderDescription::Struct) {
+ prefix += blockMember.name.toUtf8();
+ const int baseOffset = blockMember.offset;
+ if (blockMember.arrayDims.isEmpty()) {
+ for (const QShaderDescription::BlockVariable &structMember : blockMember.structMembers)
+ registerUniformIfActive(structMember, prefix, ub.binding, baseOffset, program, dst);
+ } else {
+ if (blockMember.arrayDims.count() > 1) {
+ qWarning("Array of struct '%s' has more than one dimension. Only the first dimension is used.",
+ qPrintable(blockMember.name));
+ }
+ const int dim = blockMember.arrayDims.first();
+ const int elemSize = blockMember.size / dim;
+ int elemOffset = baseOffset;
+ for (int di = 0; di < dim; ++di) {
+ const QByteArray arrayPrefix = prefix + '[' + QByteArray::number(di) + ']' + '.';
+ for (const QShaderDescription::BlockVariable &structMember : blockMember.structMembers)
+ registerUniformIfActive(structMember, arrayPrefix, ub.binding, elemOffset, program, dst);
+ elemOffset += elemSize;
+ }
+ }
+ } else {
+ registerUniformIfActive(blockMember, prefix, ub.binding, 0, program, dst);
}
}
}
@@ -3219,7 +3428,6 @@ void QGles2Texture::release()
texture = 0;
specified = false;
- nativeHandlesStruct.texture = 0;
QRHI_RES_RHI(QRhiGles2);
if (owns)
@@ -3300,6 +3508,18 @@ bool QGles2Texture::prepareBuild(QSize *adjustedSize)
glformat = GL_RGBA;
gltype = GL_FLOAT;
break;
+ case QRhiTexture::R16F:
+ glintformat = GL_R16F;
+ glsizedintformat = glintformat;
+ glformat = GL_RED;
+ gltype = GL_HALF_FLOAT;
+ break;
+ case QRhiTexture::R32F:
+ glintformat = GL_R32F;
+ glsizedintformat = glintformat;
+ glformat = GL_RED;
+ gltype = GL_FLOAT;
+ break;
case QRhiTexture::D16:
glintformat = GL_DEPTH_COMPONENT16;
glsizedintformat = glintformat;
@@ -3378,23 +3598,22 @@ bool QGles2Texture::build()
QRHI_PROF_F(newTexture(this, true, mipLevelCount, isCube ? 6 : 1, 1));
owns = true;
- nativeHandlesStruct.texture = texture;
generation += 1;
rhiD->registerResource(this);
return true;
}
-bool QGles2Texture::buildFrom(const QRhiNativeHandles *src)
+bool QGles2Texture::buildFrom(QRhiTexture::NativeTexture src)
{
- const QRhiGles2TextureNativeHandles *h = static_cast<const QRhiGles2TextureNativeHandles *>(src);
- if (!h || !h->texture)
+ const uint *textureId = static_cast<const uint *>(src.object);
+ if (!textureId || !*textureId)
return false;
if (!prepareBuild())
return false;
- texture = h->texture;
+ texture = *textureId;
specified = true;
QRHI_RES_RHI(QRhiGles2);
@@ -3402,21 +3621,20 @@ bool QGles2Texture::buildFrom(const QRhiNativeHandles *src)
QRHI_PROF_F(newTexture(this, false, mipLevelCount, m_flags.testFlag(CubeMap) ? 6 : 1, 1));
owns = false;
- nativeHandlesStruct.texture = texture;
generation += 1;
rhiD->registerResource(this);
return true;
}
-const QRhiNativeHandles *QGles2Texture::nativeHandles()
+QRhiTexture::NativeTexture QGles2Texture::nativeTexture()
{
- return &nativeHandlesStruct;
+ return {&texture, 0};
}
QGles2Sampler::QGles2Sampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v)
- : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v)
+ AddressMode u, AddressMode v, AddressMode w)
+ : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v, w)
{
}
@@ -3459,6 +3677,12 @@ void QGles2RenderPassDescriptor::release()
// nothing to do here
}
+bool QGles2RenderPassDescriptor::isCompatible(const QRhiRenderPassDescriptor *other) const
+{
+ Q_UNUSED(other);
+ return true;
+}
+
QGles2ReferenceRenderTarget::QGles2ReferenceRenderTarget(QRhiImplementation *rhi)
: QRhiRenderTarget(rhi),
d(rhi)
diff --git a/src/gui/rhi/qrhigles2_p.h b/src/gui/rhi/qrhigles2_p.h
index 7f7c8b4c40..8d8f0c7396 100644
--- a/src/gui/rhi/qrhigles2_p.h
+++ b/src/gui/rhi/qrhigles2_p.h
@@ -74,11 +74,6 @@ struct Q_GUI_EXPORT QRhiGles2NativeHandles : public QRhiNativeHandles
QOpenGLContext *context = nullptr;
};
-struct Q_GUI_EXPORT QRhiGles2TextureNativeHandles : public QRhiNativeHandles
-{
- uint texture = 0;
-};
-
QT_END_NAMESPACE
#endif
diff --git a/src/gui/rhi/qrhigles2_p_p.h b/src/gui/rhi/qrhigles2_p_p.h
index cc945876e6..00caf40118 100644
--- a/src/gui/rhi/qrhigles2_p_p.h
+++ b/src/gui/rhi/qrhigles2_p_p.h
@@ -132,8 +132,8 @@ struct QGles2Texture : public QRhiTexture
~QGles2Texture();
void release() override;
bool build() override;
- bool buildFrom(const QRhiNativeHandles *src) override;
- const QRhiNativeHandles *nativeHandles() override;
+ bool buildFrom(NativeTexture src) override;
+ NativeTexture nativeTexture() override;
bool prepareBuild(QSize *adjustedSize = nullptr);
@@ -147,7 +147,7 @@ struct QGles2Texture : public QRhiTexture
QGles2SamplerData samplerState;
bool specified = false;
int mipLevelCount = 0;
- QRhiGles2TextureNativeHandles nativeHandlesStruct;
+
enum Access {
AccessNone,
AccessSample,
@@ -170,7 +170,7 @@ struct QGles2Texture : public QRhiTexture
struct QGles2Sampler : public QRhiSampler
{
QGles2Sampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v);
+ AddressMode u, AddressMode v, AddressMode w);
~QGles2Sampler();
void release() override;
bool build() override;
@@ -185,6 +185,7 @@ struct QGles2RenderPassDescriptor : public QRhiRenderPassDescriptor
QGles2RenderPassDescriptor(QRhiImplementation *rhi);
~QGles2RenderPassDescriptor();
void release() override;
+ bool isCompatible(const QRhiRenderPassDescriptor *other) const override;
};
struct QGles2RenderTargetData
@@ -249,6 +250,7 @@ struct QGles2UniformDescription
int binding;
uint offset;
int size;
+ int arrayDim;
};
Q_DECLARE_TYPEINFO(QGles2UniformDescription, Q_MOVABLE_TYPE);
@@ -519,6 +521,17 @@ struct QGles2CommandBuffer : public QRhiCommandBuffer
QRhiShaderResourceBindings *currentComputeSrb;
uint currentSrbGeneration;
+ struct ComputePassState {
+ enum Access {
+ Read = 0x01,
+ Write = 0x02
+ };
+ QHash<QRhiResource *, QPair<int, bool> > writtenResources;
+ void reset() {
+ writtenResources.clear();
+ }
+ } computePassState;
+
QVector<QByteArray> dataRetainPool;
QVector<QImage> imageRetainPool;
@@ -600,9 +613,12 @@ public:
const QSize &pixelSize,
int sampleCount,
QRhiTexture::Flags flags) override;
- QRhiSampler *createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
+ QRhiSampler *createSampler(QRhiSampler::Filter magFilter,
+ QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler:: AddressMode u, QRhiSampler::AddressMode v) override;
+ QRhiSampler:: AddressMode u,
+ QRhiSampler::AddressMode v,
+ QRhiSampler::AddressMode w) override;
QRhiTextureRenderTarget *createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
QRhiTextureRenderTarget::Flags flags) override;
@@ -703,7 +719,14 @@ public:
QByteArray shaderSource(const QRhiShaderStage &shaderStage, int *glslVersion);
bool compileShader(GLuint program, const QRhiShaderStage &shaderStage, int *glslVersion);
bool linkProgram(GLuint program);
- void gatherUniforms(GLuint program, const QShaderDescription::UniformBlock &ub,
+ void registerUniformIfActive(const QShaderDescription::BlockVariable &var,
+ const QByteArray &namePrefix,
+ int binding,
+ int baseOffset,
+ GLuint program,
+ QVector<QGles2UniformDescription> *dst);
+ void gatherUniforms(GLuint program,
+ const QShaderDescription::UniformBlock &ub,
QVector<QGles2UniformDescription> *dst);
void gatherSamplers(GLuint program, const QShaderDescription::InOutVariable &v,
QVector<QGles2SamplerDescription> *dst);
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm
index 83fec31081..9e8f1ac096 100644
--- a/src/gui/rhi/qrhimetal.mm
+++ b/src/gui/rhi/qrhimetal.mm
@@ -41,6 +41,8 @@
#ifdef Q_OS_MACOS
#include <AppKit/AppKit.h>
+#else
+#include <UIKit/UIKit.h>
#endif
#include <Metal/Metal.h>
@@ -112,15 +114,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \class QRhiMetalTextureNativeHandles
- \inmodule QtRhi
- \brief Holds the Metal texture object that is backing a QRhiTexture instance.
-
- \note The class uses \c{void *} as the type since including the Objective C
- headers is not acceptable here. The actual type is \c{id<MTLTexture>}.
- */
-
-/*!
\class QRhiMetalCommandBufferNativeHandles
\inmodule QtRhi
\brief Holds the MTLCommandBuffer and MTLRenderCommandEncoder objects that are backing a QRhiCommandBuffer.
@@ -305,6 +298,8 @@ struct QMetalGraphicsPipelineData
MTLPrimitiveType primitiveType;
MTLWinding winding;
MTLCullMode cullMode;
+ float depthBias;
+ float slopeScaledDepthBias;
QMetalShader vs;
QMetalShader fs;
};
@@ -318,7 +313,13 @@ struct QMetalComputePipelineData
struct QMetalSwapChainData
{
+ // The iOS simulator's headers mark CAMetalLayer as iOS 13.0+ only.
+ // (for real device SDKs it is 8.0+)
+#ifdef TARGET_IPHONE_SIMULATOR
+ API_AVAILABLE(ios(13.0)) CAMetalLayer *layer = nullptr;
+#else
CAMetalLayer *layer = nullptr;
+#endif
id<CAMetalDrawable> curDrawable;
dispatch_semaphore_t sem[QMTL_FRAMES_IN_FLIGHT];
MTLRenderPassDescriptor *rp = nullptr;
@@ -627,9 +628,9 @@ QRhiTexture *QRhiMetal::createTexture(QRhiTexture::Format format, const QSize &p
QRhiSampler *QRhiMetal::createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler::AddressMode u, QRhiSampler::AddressMode v)
+ QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w)
{
- return new QMetalSampler(this, magFilter, minFilter, mipmapMode, u, v);
+ return new QMetalSampler(this, magFilter, minFilter, mipmapMode, u, v, w);
}
QRhiTextureRenderTarget *QRhiMetal::createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
@@ -665,12 +666,17 @@ static inline int mapBinding(int binding,
BindingType type)
{
const QShader::NativeResourceBindingMap *map = nativeResourceBindingMaps[stageIndex];
- if (map) {
- auto it = map->constFind(binding);
- if (it != map->cend())
- return type == BindingType::Sampler ? it->second : it->first;
- }
- return binding;
+ if (!map || map->isEmpty())
+ return binding; // old QShader versions do not have this map, assume 1:1 mapping then
+
+ auto it = map->constFind(binding);
+ if (it != map->cend())
+ return type == BindingType::Sampler ? it->second : it->first; // may be -1, if the resource is inactive
+
+ // Hitting this path is normal too. It is not given that the resource (for
+ // example, a uniform block) is present in the shaders for all the stages
+ // specified by the visibility mask in the QRhiShaderResourceBinding.
+ return -1;
}
void QRhiMetal::enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD,
@@ -680,11 +686,27 @@ void QRhiMetal::enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD
bool offsetOnlyChange,
const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[SUPPORTED_STAGES])
{
- struct {
- QRhiBatchedBindings<id<MTLBuffer> > buffers;
- QRhiBatchedBindings<NSUInteger> bufferOffsets;
- QRhiBatchedBindings<id<MTLTexture> > textures;
- QRhiBatchedBindings<id<MTLSamplerState> > samplers;
+ struct Stage {
+ struct Buffer {
+ int nativeBinding;
+ id<MTLBuffer> mtlbuf;
+ uint offset;
+ };
+ struct Texture {
+ int nativeBinding;
+ id<MTLTexture> mtltex;
+ };
+ struct Sampler {
+ int nativeBinding;
+ id<MTLSamplerState> mtlsampler;
+ };
+ QVarLengthArray<Buffer, 8> buffers;
+ QVarLengthArray<Texture, 8> textures;
+ QVarLengthArray<Sampler, 8> samplers;
+ QRhiBatchedBindings<id<MTLBuffer> > bufferBatches;
+ QRhiBatchedBindings<NSUInteger> bufferOffsetBatches;
+ QRhiBatchedBindings<id<MTLTexture> > textureBatches;
+ QRhiBatchedBindings<id<MTLSamplerState> > samplerBatches;
} res[SUPPORTED_STAGES];
enum { VERTEX = 0, FRAGMENT = 1, COMPUTE = 2 };
@@ -704,16 +726,19 @@ void QRhiMetal::enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD
}
}
if (b->stage.testFlag(QRhiShaderResourceBinding::VertexStage)) {
- res[VERTEX].buffers.feed(mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Buffer), mtlbuf);
- res[VERTEX].bufferOffsets.feed(b->binding, offset);
+ const int nativeBinding = mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Buffer);
+ if (nativeBinding >= 0)
+ res[VERTEX].buffers.append({ nativeBinding, mtlbuf, offset });
}
if (b->stage.testFlag(QRhiShaderResourceBinding::FragmentStage)) {
- res[FRAGMENT].buffers.feed(mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Buffer), mtlbuf);
- res[FRAGMENT].bufferOffsets.feed(b->binding, offset);
+ const int nativeBinding = mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Buffer);
+ if (nativeBinding >= 0)
+ res[FRAGMENT].buffers.append({ nativeBinding, mtlbuf, offset });
}
if (b->stage.testFlag(QRhiShaderResourceBinding::ComputeStage)) {
- res[COMPUTE].buffers.feed(mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Buffer), mtlbuf);
- res[COMPUTE].bufferOffsets.feed(b->binding, offset);
+ const int nativeBinding = mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Buffer);
+ if (nativeBinding >= 0)
+ res[COMPUTE].buffers.append({ nativeBinding, mtlbuf, offset });
}
}
break;
@@ -722,55 +747,75 @@ void QRhiMetal::enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.stex.tex);
QMetalSampler *samplerD = QRHI_RES(QMetalSampler, b->u.stex.sampler);
if (b->stage.testFlag(QRhiShaderResourceBinding::VertexStage)) {
- res[VERTEX].textures.feed(mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Texture), texD->d->tex);
- res[VERTEX].samplers.feed(mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Sampler), samplerD->d->samplerState);
+ const int nativeBindingTexture = mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Texture);
+ const int nativeBindingSampler = mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Sampler);
+ if (nativeBindingTexture >= 0 && nativeBindingSampler >= 0) {
+ res[VERTEX].textures.append({ nativeBindingTexture, texD->d->tex });
+ res[VERTEX].samplers.append({ nativeBindingSampler, samplerD->d->samplerState });
+ }
}
if (b->stage.testFlag(QRhiShaderResourceBinding::FragmentStage)) {
- res[FRAGMENT].textures.feed(mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Texture), texD->d->tex);
- res[FRAGMENT].samplers.feed(mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Sampler), samplerD->d->samplerState);
+ const int nativeBindingTexture = mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Texture);
+ const int nativeBindingSampler = mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Sampler);
+ if (nativeBindingTexture >= 0 && nativeBindingSampler >= 0) {
+ res[FRAGMENT].textures.append({ nativeBindingTexture, texD->d->tex });
+ res[FRAGMENT].samplers.append({ nativeBindingSampler, samplerD->d->samplerState });
+ }
}
if (b->stage.testFlag(QRhiShaderResourceBinding::ComputeStage)) {
- res[COMPUTE].textures.feed(mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Texture), texD->d->tex);
- res[COMPUTE].samplers.feed(mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Sampler), samplerD->d->samplerState);
+ const int nativeBindingTexture = mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Texture);
+ const int nativeBindingSampler = mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Sampler);
+ if (nativeBindingTexture >= 0 && nativeBindingSampler >= 0) {
+ res[COMPUTE].textures.append({ nativeBindingTexture, texD->d->tex });
+ res[COMPUTE].samplers.append({ nativeBindingSampler, samplerD->d->samplerState });
+ }
}
}
break;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
{
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.simage.tex);
id<MTLTexture> t = texD->d->viewForLevel(b->u.simage.level);
- if (b->stage.testFlag(QRhiShaderResourceBinding::VertexStage))
- res[VERTEX].textures.feed(mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Texture), t);
- if (b->stage.testFlag(QRhiShaderResourceBinding::FragmentStage))
- res[FRAGMENT].textures.feed(mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Texture), t);
- if (b->stage.testFlag(QRhiShaderResourceBinding::ComputeStage))
- res[COMPUTE].textures.feed(mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Texture), t);
+ if (b->stage.testFlag(QRhiShaderResourceBinding::VertexStage)) {
+ const int nativeBinding = mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Texture);
+ if (nativeBinding >= 0)
+ res[VERTEX].textures.append({ nativeBinding, t });
+ }
+ if (b->stage.testFlag(QRhiShaderResourceBinding::FragmentStage)) {
+ const int nativeBinding = mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Texture);
+ if (nativeBinding >= 0)
+ res[FRAGMENT].textures.append({ nativeBinding, t });
+ }
+ if (b->stage.testFlag(QRhiShaderResourceBinding::ComputeStage)) {
+ const int nativeBinding = mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Texture);
+ if (nativeBinding >= 0)
+ res[COMPUTE].textures.append({ nativeBinding, t });
+ }
}
break;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
{
QMetalBuffer *bufD = QRHI_RES(QMetalBuffer, b->u.sbuf.buf);
id<MTLBuffer> mtlbuf = bufD->d->buf[0];
uint offset = uint(b->u.sbuf.offset);
if (b->stage.testFlag(QRhiShaderResourceBinding::VertexStage)) {
- res[VERTEX].buffers.feed(mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Buffer), mtlbuf);
- res[VERTEX].bufferOffsets.feed(b->binding, offset);
+ const int nativeBinding = mapBinding(b->binding, VERTEX, nativeResourceBindingMaps, BindingType::Buffer);
+ if (nativeBinding >= 0)
+ res[VERTEX].buffers.append({ nativeBinding, mtlbuf, offset });
}
if (b->stage.testFlag(QRhiShaderResourceBinding::FragmentStage)) {
- res[FRAGMENT].buffers.feed(mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Buffer), mtlbuf);
- res[FRAGMENT].bufferOffsets.feed(b->binding, offset);
+ const int nativeBinding = mapBinding(b->binding, FRAGMENT, nativeResourceBindingMaps, BindingType::Buffer);
+ if (nativeBinding >= 0)
+ res[FRAGMENT].buffers.append({ nativeBinding, mtlbuf, offset });
}
if (b->stage.testFlag(QRhiShaderResourceBinding::ComputeStage)) {
- res[COMPUTE].buffers.feed(mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Buffer), mtlbuf);
- res[COMPUTE].bufferOffsets.feed(b->binding, offset);
+ const int nativeBinding = mapBinding(b->binding, COMPUTE, nativeResourceBindingMaps, BindingType::Buffer);
+ if (nativeBinding >= 0)
+ res[COMPUTE].buffers.append({ nativeBinding, mtlbuf, offset });
}
}
break;
@@ -786,12 +831,26 @@ void QRhiMetal::enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD
if (cbD->recordingPass != QMetalCommandBuffer::ComputePass && stage == COMPUTE)
continue;
- res[stage].buffers.finish();
- res[stage].bufferOffsets.finish();
+ // QRhiBatchedBindings works with the native bindings and expects
+ // sorted input. The pre-sorted QRhiShaderResourceBinding list (based
+ // on the QRhi (SPIR-V) binding) is not helpful in this regard, so we
+ // have to sort here every time.
+
+ std::sort(res[stage].buffers.begin(), res[stage].buffers.end(), [](const Stage::Buffer &a, const Stage::Buffer &b) {
+ return a.nativeBinding < b.nativeBinding;
+ });
+
+ for (const Stage::Buffer &buf : qAsConst(res[stage].buffers)) {
+ res[stage].bufferBatches.feed(buf.nativeBinding, buf.mtlbuf);
+ res[stage].bufferOffsetBatches.feed(buf.nativeBinding, buf.offset);
+ }
- for (int i = 0, ie = res[stage].buffers.batches.count(); i != ie; ++i) {
- const auto &bufferBatch(res[stage].buffers.batches[i]);
- const auto &offsetBatch(res[stage].bufferOffsets.batches[i]);
+ res[stage].bufferBatches.finish();
+ res[stage].bufferOffsetBatches.finish();
+
+ for (int i = 0, ie = res[stage].bufferBatches.batches.count(); i != ie; ++i) {
+ const auto &bufferBatch(res[stage].bufferBatches.batches[i]);
+ const auto &offsetBatch(res[stage].bufferOffsetBatches.batches[i]);
switch (stage) {
case VERTEX:
[cbD->d->currentRenderPassEncoder setVertexBuffers: bufferBatch.resources.constData()
@@ -817,11 +876,25 @@ void QRhiMetal::enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD
if (offsetOnlyChange)
continue;
- res[stage].textures.finish();
- res[stage].samplers.finish();
+ std::sort(res[stage].textures.begin(), res[stage].textures.end(), [](const Stage::Texture &a, const Stage::Texture &b) {
+ return a.nativeBinding < b.nativeBinding;
+ });
+
+ std::sort(res[stage].samplers.begin(), res[stage].samplers.end(), [](const Stage::Sampler &a, const Stage::Sampler &b) {
+ return a.nativeBinding < b.nativeBinding;
+ });
+
+ for (const Stage::Texture &t : qAsConst(res[stage].textures))
+ res[stage].textureBatches.feed(t.nativeBinding, t.mtltex);
+
+ for (const Stage::Sampler &s : qAsConst(res[stage].samplers))
+ res[stage].samplerBatches.feed(s.nativeBinding, s.mtlsampler);
+
+ res[stage].textureBatches.finish();
+ res[stage].samplerBatches.finish();
- for (int i = 0, ie = res[stage].textures.batches.count(); i != ie; ++i) {
- const auto &batch(res[stage].textures.batches[i]);
+ for (int i = 0, ie = res[stage].textureBatches.batches.count(); i != ie; ++i) {
+ const auto &batch(res[stage].textureBatches.batches[i]);
switch (stage) {
case VERTEX:
[cbD->d->currentRenderPassEncoder setVertexTextures: batch.resources.constData()
@@ -840,8 +913,8 @@ void QRhiMetal::enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD
break;
}
}
- for (int i = 0, ie = res[stage].samplers.batches.count(); i != ie; ++i) {
- const auto &batch(res[stage].samplers.batches[i]);
+ for (int i = 0, ie = res[stage].samplerBatches.batches.count(); i != ie; ++i) {
+ const auto &batch(res[stage].samplerBatches.batches[i]);
switch (stage) {
case VERTEX:
[cbD->d->currentRenderPassEncoder setVertexSamplerStates: batch.resources.constData()
@@ -885,6 +958,14 @@ void QRhiMetal::setGraphicsPipeline(QRhiCommandBuffer *cb, QRhiGraphicsPipeline
[cbD->d->currentRenderPassEncoder setFrontFacingWinding: psD->d->winding];
cbD->currentFrontFaceWinding = int(psD->d->winding);
}
+ if (!qFuzzyCompare(psD->d->depthBias, cbD->currentDepthBiasValues.first)
+ || !qFuzzyCompare(psD->d->slopeScaledDepthBias, cbD->currentDepthBiasValues.second))
+ {
+ [cbD->d->currentRenderPassEncoder setDepthBias: psD->d->depthBias
+ slopeScale: psD->d->slopeScaledDepthBias
+ clamp: 0.0f];
+ cbD->currentDepthBiasValues = { psD->d->depthBias, psD->d->slopeScaledDepthBias };
+ }
}
psD->lastActiveFrameSlot = currentFrameSlot;
@@ -953,9 +1034,7 @@ void QRhiMetal::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
}
break;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
{
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.simage.tex);
@@ -968,9 +1047,7 @@ void QRhiMetal::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
}
break;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
{
QMetalBuffer *bufD = QRHI_RES(QMetalBuffer, b->u.sbuf.buf);
@@ -1763,8 +1840,10 @@ void QRhiMetal::executeBufferHostWritesForCurrentFrame(QMetalBuffer *bufD)
if (changeEnd == -1 || u.offset + u.data.size() > changeEnd)
changeEnd = u.offset + u.data.size();
}
+#ifdef Q_OS_MACOS
if (changeBegin >= 0 && bufD->d->managed)
[bufD->d->buf[idx] didModifyRange: NSMakeRange(NSUInteger(changeBegin), NSUInteger(changeEnd - changeBegin))];
+#endif
bufD->d->pendingUpdates[idx].clear();
}
@@ -1798,8 +1877,12 @@ void QRhiMetal::beginPass(QRhiCommandBuffer *cb,
if (color0.needsDrawableForTex || color0.needsDrawableForResolveTex) {
Q_ASSERT(currentSwapChain);
QMetalSwapChain *swapChainD = QRHI_RES(QMetalSwapChain, currentSwapChain);
- if (!swapChainD->d->curDrawable)
- swapChainD->d->curDrawable = [swapChainD->d->layer nextDrawable];
+ if (!swapChainD->d->curDrawable) {
+#ifdef TARGET_IPHONE_SIMULATOR
+ if (@available(ios 13.0, *))
+#endif
+ swapChainD->d->curDrawable = [swapChainD->d->layer nextDrawable];
+ }
if (!swapChainD->d->curDrawable) {
qWarning("No drawable");
return;
@@ -2170,12 +2253,13 @@ bool QMetalRenderBuffer::build()
case DepthStencil:
#ifdef Q_OS_MACOS
desc.storageMode = MTLStorageModePrivate;
+ d->format = rhiD->d->dev.depth24Stencil8PixelFormatSupported
+ ? MTLPixelFormatDepth24Unorm_Stencil8 : MTLPixelFormatDepth32Float_Stencil8;
#else
- desc.storageMode = MTLResourceStorageModeMemoryless;
+ desc.storageMode = MTLStorageModeMemoryless;
transientBacking = true;
+ d->format = MTLPixelFormatDepth32Float_Stencil8;
#endif
- d->format = rhiD->d->dev.depth24Stencil8PixelFormatSupported
- ? MTLPixelFormatDepth24Unorm_Stencil8 : MTLPixelFormatDepth32Float_Stencil8;
desc.pixelFormat = d->format;
break;
case Color:
@@ -2237,7 +2321,6 @@ void QMetalTexture::release()
e.texture.texture = d->owns ? d->tex : nil;
d->tex = nil;
- nativeHandlesStruct.texture = nullptr;
for (int i = 0; i < QMTL_FRAMES_IN_FLIGHT; ++i) {
e.texture.stagingBuffers[i] = d->stagingBuf[i];
@@ -2279,6 +2362,10 @@ static inline MTLPixelFormat toMetalTextureFormat(QRhiTexture::Format format, QR
return MTLPixelFormatRGBA16Float;
case QRhiTexture::RGBA32F:
return MTLPixelFormatRGBA32Float;
+ case QRhiTexture::R16F:
+ return MTLPixelFormatR16Float;
+ case QRhiTexture::R32F:
+ return MTLPixelFormatR32Float;
case QRhiTexture::D16:
#ifdef Q_OS_MACOS
@@ -2449,7 +2536,6 @@ bool QMetalTexture::build()
d->tex.label = [NSString stringWithUTF8String: m_objectName.constData()];
d->owns = true;
- nativeHandlesStruct.texture = d->tex;
QRHI_PROF;
QRHI_PROF_F(newTexture(this, true, mipLevelCount, isCube ? 6 : 1, samples));
@@ -2460,19 +2546,18 @@ bool QMetalTexture::build()
return true;
}
-bool QMetalTexture::buildFrom(const QRhiNativeHandles *src)
+bool QMetalTexture::buildFrom(QRhiTexture::NativeTexture src)
{
- const QRhiMetalTextureNativeHandles *h = static_cast<const QRhiMetalTextureNativeHandles *>(src);
- if (!h || !h->texture)
+ void * const * tex = (void * const *) src.object;
+ if (!tex || !*tex)
return false;
if (!prepareBuild())
return false;
- d->tex = (id<MTLTexture>) h->texture;
+ d->tex = (id<MTLTexture>) *tex;
d->owns = false;
- nativeHandlesStruct.texture = d->tex;
QRHI_PROF;
QRHI_PROF_F(newTexture(this, false, mipLevelCount, m_flags.testFlag(CubeMap) ? 6 : 1, samples));
@@ -2484,9 +2569,9 @@ bool QMetalTexture::buildFrom(const QRhiNativeHandles *src)
return true;
}
-const QRhiNativeHandles *QMetalTexture::nativeHandles()
+QRhiTexture::NativeTexture QMetalTexture::nativeTexture()
{
- return &nativeHandlesStruct;
+ return {&d->tex, 0};
}
id<MTLTexture> QMetalTextureData::viewForLevel(int level)
@@ -2505,8 +2590,8 @@ id<MTLTexture> QMetalTextureData::viewForLevel(int level)
}
QMetalSampler::QMetalSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v)
- : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v),
+ AddressMode u, AddressMode v, AddressMode w)
+ : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v, w),
d(new QMetalSamplerData)
{
}
@@ -2569,12 +2654,8 @@ static inline MTLSamplerAddressMode toMetalAddressMode(QRhiSampler::AddressMode
return MTLSamplerAddressModeRepeat;
case QRhiSampler::ClampToEdge:
return MTLSamplerAddressModeClampToEdge;
- case QRhiSampler::Border:
- return MTLSamplerAddressModeClampToBorderColor;
case QRhiSampler::Mirror:
return MTLSamplerAddressModeMirrorRepeat;
- case QRhiSampler::MirrorOnce:
- return MTLSamplerAddressModeMirrorClampToEdge;
default:
Q_UNREACHABLE();
return MTLSamplerAddressModeClampToEdge;
@@ -2647,6 +2728,32 @@ void QMetalRenderPassDescriptor::release()
// nothing to do here
}
+bool QMetalRenderPassDescriptor::isCompatible(const QRhiRenderPassDescriptor *other) const
+{
+ if (!other)
+ return false;
+
+ const QMetalRenderPassDescriptor *o = QRHI_RES(const QMetalRenderPassDescriptor, other);
+
+ if (colorAttachmentCount != o->colorAttachmentCount)
+ return false;
+
+ if (hasDepthStencil != o->hasDepthStencil)
+ return false;
+
+ for (int i = 0; i < colorAttachmentCount; ++i) {
+ if (colorFormat[i] != o->colorFormat[i])
+ return false;
+ }
+
+ if (hasDepthStencil) {
+ if (dsFormat != o->dsFormat)
+ return false;
+ }
+
+ return true;
+}
+
QMetalReferenceRenderTarget::QMetalReferenceRenderTarget(QRhiImplementation *rhi)
: QRhiRenderTarget(rhi),
d(new QMetalRenderTargetData)
@@ -2859,9 +2966,7 @@ bool QMetalShaderResourceBindings::build()
}
break;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
{
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.simage.tex);
@@ -2870,9 +2975,7 @@ bool QMetalShaderResourceBindings::build()
}
break;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
{
QMetalBuffer *bufD = QRHI_RES(QMetalBuffer, b->u.sbuf.buf);
@@ -3314,7 +3417,11 @@ bool QMetalGraphicsPipeline::build()
// validation blows up otherwise.
MTLPixelFormat fmt = MTLPixelFormat(rpD->dsFormat);
rpDesc.depthAttachmentPixelFormat = fmt;
+#ifdef Q_OS_MACOS
if (fmt != MTLPixelFormatDepth16Unorm && fmt != MTLPixelFormatDepth32Float)
+#else
+ if (fmt != MTLPixelFormatDepth32Float)
+#endif
rpDesc.stencilAttachmentPixelFormat = fmt;
}
@@ -3357,6 +3464,8 @@ bool QMetalGraphicsPipeline::build()
d->primitiveType = toMetalPrimitiveType(m_topology);
d->winding = m_frontFace == CCW ? MTLWindingCounterClockwise : MTLWindingClockwise;
d->cullMode = toMetalCullMode(m_cullMode);
+ d->depthBias = float(m_depthBias);
+ d->slopeScaledDepthBias = m_slopeScaledDepthBias;
lastActiveFrameSlot = -1;
generation += 1;
@@ -3505,6 +3614,7 @@ void QMetalCommandBuffer::resetPerPassCachedState()
currentIndexFormat = QRhiCommandBuffer::IndexUInt16;
currentCullMode = -1;
currentFrontFaceWinding = -1;
+ currentDepthBiasValues = { 0.0f, 0.0f };
d->currentFirstVertexBinding = -1;
d->currentVertexInputsBuffers.clear();
@@ -3531,6 +3641,10 @@ QMetalSwapChain::~QMetalSwapChain()
void QMetalSwapChain::release()
{
+#ifdef TARGET_IPHONE_SIMULATOR
+ if (@available(ios 13.0, *)) {
+#endif
+
if (!d->layer)
return;
@@ -3559,6 +3673,10 @@ void QMetalSwapChain::release()
QRHI_PROF_F(releaseSwapChain(this));
rhiD->unregisterResource(this);
+
+#ifdef TARGET_IPHONE_SIMULATOR
+ }
+#endif
}
QRhiCommandBuffer *QMetalSwapChain::currentFrameCommandBuffer()
@@ -3581,16 +3699,20 @@ QRhiRenderPassDescriptor *QMetalSwapChain::newCompatibleRenderPassDescriptor()
{
chooseFormats(); // ensure colorFormat and similar are filled out
- QRHI_RES_RHI(QRhiMetal);
QMetalRenderPassDescriptor *rpD = new QMetalRenderPassDescriptor(m_rhi);
rpD->colorAttachmentCount = 1;
rpD->hasDepthStencil = m_depthStencil != nullptr;
rpD->colorFormat[0] = int(d->colorFormat);
+#ifdef Q_OS_MACOS
// m_depthStencil may not be built yet so cannot rely on computed fields in it
+ QRHI_RES_RHI(QRhiMetal);
rpD->dsFormat = rhiD->d->dev.depth24Stencil8PixelFormatSupported
? MTLPixelFormatDepth24Unorm_Stencil8 : MTLPixelFormatDepth32Float_Stencil8;
+#else
+ rpD->dsFormat = MTLPixelFormatDepth32Float_Stencil8;
+#endif
return rpD;
}
@@ -3606,6 +3728,10 @@ void QMetalSwapChain::chooseFormats()
bool QMetalSwapChain::buildOrResize()
{
+#ifdef TARGET_IPHONE_SIMULATOR
+ if (@available(ios 13.0, *)) {
+#endif
+
Q_ASSERT(m_window);
const bool needsRegistration = !window || window != m_window;
@@ -3625,7 +3751,11 @@ bool QMetalSwapChain::buildOrResize()
return false;
}
+#ifdef Q_OS_MACOS
NSView *view = reinterpret_cast<NSView *>(window->winId());
+#else
+ UIView *view = reinterpret_cast<UIView *>(window->winId());
+#endif
Q_ASSERT(view);
d->layer = static_cast<CAMetalLayer *>(view.layer);
Q_ASSERT(d->layer);
@@ -3729,6 +3859,15 @@ bool QMetalSwapChain::buildOrResize()
rhiD->registerResource(this);
return true;
+
+#ifdef TARGET_IPHONE_SIMULATOR
+ } else {
+ // Won't ever get here in a normal app because MTLDevice creation would
+ // fail too. Print a warning, just in case.
+ qWarning("No CAMetalLayer support in this version of the iOS Simulator");
+ return false;
+ }
+#endif
}
QT_END_NAMESPACE
diff --git a/src/gui/rhi/qrhimetal_p.h b/src/gui/rhi/qrhimetal_p.h
index 094801c58c..17e28b2c0f 100644
--- a/src/gui/rhi/qrhimetal_p.h
+++ b/src/gui/rhi/qrhimetal_p.h
@@ -64,11 +64,6 @@ struct Q_GUI_EXPORT QRhiMetalNativeHandles : public QRhiNativeHandles
void *cmdQueue = nullptr; // id<MTLCommandQueue>
};
-struct Q_GUI_EXPORT QRhiMetalTextureNativeHandles : public QRhiNativeHandles
-{
- void *texture = nullptr; // id<MTLTexture>
-};
-
struct Q_GUI_EXPORT QRhiMetalCommandBufferNativeHandles : public QRhiNativeHandles
{
void *commandBuffer = nullptr; // id<MTLCommandBuffer>
diff --git a/src/gui/rhi/qrhimetal_p_p.h b/src/gui/rhi/qrhimetal_p_p.h
index 2be86db5c8..58e93e2cdb 100644
--- a/src/gui/rhi/qrhimetal_p_p.h
+++ b/src/gui/rhi/qrhimetal_p_p.h
@@ -100,13 +100,12 @@ struct QMetalTexture : public QRhiTexture
~QMetalTexture();
void release() override;
bool build() override;
- bool buildFrom(const QRhiNativeHandles *src) override;
- const QRhiNativeHandles *nativeHandles() override;
+ bool buildFrom(NativeTexture src) override;
+ NativeTexture nativeTexture() override;
bool prepareBuild(QSize *adjustedSize = nullptr);
QMetalTextureData *d;
- QRhiMetalTextureNativeHandles nativeHandlesStruct;
int mipLevelCount = 0;
int samples = 1;
uint generation = 0;
@@ -121,7 +120,7 @@ struct QMetalSamplerData;
struct QMetalSampler : public QRhiSampler
{
QMetalSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v);
+ AddressMode u, AddressMode v, AddressMode w);
~QMetalSampler();
void release() override;
bool build() override;
@@ -138,6 +137,7 @@ struct QMetalRenderPassDescriptor : public QRhiRenderPassDescriptor
QMetalRenderPassDescriptor(QRhiImplementation *rhi);
~QMetalRenderPassDescriptor();
void release() override;
+ bool isCompatible(const QRhiRenderPassDescriptor *other) const override;
// there is no MTLRenderPassDescriptor here as one will be created for each pass in beginPass()
@@ -288,6 +288,7 @@ struct QMetalCommandBuffer : public QRhiCommandBuffer
QRhiCommandBuffer::IndexFormat currentIndexFormat;
int currentCullMode;
int currentFrontFaceWinding;
+ QPair<float, float> currentDepthBiasValues;
const QRhiNativeHandles *nativeHandles();
void resetState();
@@ -349,9 +350,12 @@ public:
const QSize &pixelSize,
int sampleCount,
QRhiTexture::Flags flags) override;
- QRhiSampler *createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
+ QRhiSampler *createSampler(QRhiSampler::Filter magFilter,
+ QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler:: AddressMode u, QRhiSampler::AddressMode v) override;
+ QRhiSampler:: AddressMode u,
+ QRhiSampler::AddressMode v,
+ QRhiSampler::AddressMode w) override;
QRhiTextureRenderTarget *createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
QRhiTextureRenderTarget::Flags flags) override;
diff --git a/src/gui/rhi/qrhinull.cpp b/src/gui/rhi/qrhinull.cpp
index fe606f971f..4c59900aa6 100644
--- a/src/gui/rhi/qrhinull.cpp
+++ b/src/gui/rhi/qrhinull.cpp
@@ -67,13 +67,6 @@ QT_BEGIN_NAMESPACE
\brief Empty.
*/
-/*!
- \class QRhiNullTextureNativeHandles
- \internal
- \inmodule QtGui
- \brief Empty.
- */
-
QRhiNull::QRhiNull(QRhiNullInitParams *params)
: offscreenCommandBuffer(this)
{
@@ -200,9 +193,9 @@ QRhiTexture *QRhiNull::createTexture(QRhiTexture::Format format, const QSize &pi
QRhiSampler *QRhiNull::createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler::AddressMode u, QRhiSampler::AddressMode v)
+ QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w)
{
- return new QNullSampler(this, magFilter, minFilter, mipmapMode, u, v);
+ return new QNullSampler(this, magFilter, minFilter, mipmapMode, u, v, w);
}
QRhiTextureRenderTarget *QRhiNull::createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
@@ -638,9 +631,9 @@ bool QNullTexture::build()
return true;
}
-bool QNullTexture::buildFrom(const QRhiNativeHandles *src)
+bool QNullTexture::buildFrom(QRhiTexture::NativeTexture src)
{
- Q_UNUSED(src);
+ Q_UNUSED(src)
QRHI_RES_RHI(QRhiNull);
const bool isCube = m_flags.testFlag(CubeMap);
const bool hasMipMaps = m_flags.testFlag(MipMapped);
@@ -651,14 +644,9 @@ bool QNullTexture::buildFrom(const QRhiNativeHandles *src)
return true;
}
-const QRhiNativeHandles *QNullTexture::nativeHandles()
-{
- return &nativeHandlesStruct;
-}
-
QNullSampler::QNullSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v)
- : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v)
+ AddressMode u, AddressMode v, AddressMode w)
+ : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v, w)
{
}
@@ -690,6 +678,12 @@ void QNullRenderPassDescriptor::release()
{
}
+bool QNullRenderPassDescriptor::isCompatible(const QRhiRenderPassDescriptor *other) const
+{
+ Q_UNUSED(other);
+ return true;
+}
+
QNullReferenceRenderTarget::QNullReferenceRenderTarget(QRhiImplementation *rhi)
: QRhiRenderTarget(rhi),
d(rhi)
diff --git a/src/gui/rhi/qrhinull_p.h b/src/gui/rhi/qrhinull_p.h
index 7d3ce5dbf1..dbf385555d 100644
--- a/src/gui/rhi/qrhinull_p.h
+++ b/src/gui/rhi/qrhinull_p.h
@@ -60,10 +60,6 @@ struct Q_GUI_EXPORT QRhiNullNativeHandles : public QRhiNativeHandles
{
};
-struct Q_GUI_EXPORT QRhiNullTextureNativeHandles : public QRhiNativeHandles
-{
-};
-
QT_END_NAMESPACE
#endif
diff --git a/src/gui/rhi/qrhinull_p_p.h b/src/gui/rhi/qrhinull_p_p.h
index ce517bfa63..0b3d40f1aa 100644
--- a/src/gui/rhi/qrhinull_p_p.h
+++ b/src/gui/rhi/qrhinull_p_p.h
@@ -80,17 +80,15 @@ struct QNullTexture : public QRhiTexture
~QNullTexture();
void release() override;
bool build() override;
- bool buildFrom(const QRhiNativeHandles *src) override;
- const QRhiNativeHandles *nativeHandles() override;
+ bool buildFrom(NativeTexture src) override;
- QRhiNullTextureNativeHandles nativeHandlesStruct;
QImage image[QRhi::MAX_LAYERS][QRhi::MAX_LEVELS];
};
struct QNullSampler : public QRhiSampler
{
QNullSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v);
+ AddressMode u, AddressMode v, AddressMode w);
~QNullSampler();
void release() override;
bool build() override;
@@ -101,6 +99,7 @@ struct QNullRenderPassDescriptor : public QRhiRenderPassDescriptor
QNullRenderPassDescriptor(QRhiImplementation *rhi);
~QNullRenderPassDescriptor();
void release() override;
+ bool isCompatible(const QRhiRenderPassDescriptor *other) const override;
};
struct QNullRenderTargetData
@@ -213,9 +212,12 @@ public:
const QSize &pixelSize,
int sampleCount,
QRhiTexture::Flags flags) override;
- QRhiSampler *createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
+ QRhiSampler *createSampler(QRhiSampler::Filter magFilter,
+ QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler:: AddressMode u, QRhiSampler::AddressMode v) override;
+ QRhiSampler:: AddressMode u,
+ QRhiSampler::AddressMode v,
+ QRhiSampler::AddressMode w) override;
QRhiTextureRenderTarget *createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
QRhiTextureRenderTarget::Flags flags) override;
diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp
index a200a6e271..84ca835392 100644
--- a/src/gui/rhi/qrhivulkan.cpp
+++ b/src/gui/rhi/qrhivulkan.cpp
@@ -177,21 +177,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \class QRhiVulkanTextureNativeHandles
- \internal
- \inmodule QtGui
- \brief Holds the Vulkan image object that is backing a QRhiTexture.
-
- Importing and exporting Vulkan image objects that back a QRhiTexture when
- running with the Vulkan backend is supported via this class. Ownership of
- the Vulkan object is never transferred.
-
- \note Memory allocation details are not exposed. This is intentional since
- memory is typically suballocated from a bigger chunk of VkDeviceMemory, and
- exposing the allocator details is not desirable for now.
- */
-
-/*!
\class QRhiVulkanCommandBufferNativeHandles
\internal
\inmodule QtGui
@@ -501,6 +486,17 @@ bool QRhiVulkan::create(QRhi::Flags flags)
}
}
+ QByteArrayList envExtList;
+ if (qEnvironmentVariableIsSet("QT_VULKAN_DEVICE_EXTENSIONS")) {
+ envExtList = qgetenv("QT_VULKAN_DEVICE_EXTENSIONS").split(';');
+ for (auto ext : requestedDevExts)
+ envExtList.removeAll(ext);
+ for (const QByteArray &ext : envExtList) {
+ if (!ext.isEmpty())
+ requestedDevExts.append(ext.constData());
+ }
+ }
+
VkDeviceCreateInfo devInfo;
memset(&devInfo, 0, sizeof(devInfo));
devInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
@@ -771,6 +767,10 @@ static inline VkFormat toVkTextureFormat(QRhiTexture::Format format, QRhiTexture
return VK_FORMAT_R16G16B16A16_SFLOAT;
case QRhiTexture::RGBA32F:
return VK_FORMAT_R32G32B32A32_SFLOAT;
+ case QRhiTexture::R16F:
+ return VK_FORMAT_R16_SFLOAT;
+ case QRhiTexture::R32F:
+ return VK_FORMAT_R32_SFLOAT;
case QRhiTexture::D16:
return VK_FORMAT_D16_UNORM;
@@ -868,7 +868,6 @@ static inline bool isDepthTextureFormat(QRhiTexture::Format format)
{
switch (format) {
case QRhiTexture::Format::D16:
- Q_FALLTHROUGH();
case QRhiTexture::Format::D32F:
return true;
@@ -1032,54 +1031,62 @@ VkFormat QRhiVulkan::optimalDepthStencilFormat()
return optimalDsFormat;
}
-bool QRhiVulkan::createDefaultRenderPass(VkRenderPass *rp, bool hasDepthStencil, VkSampleCountFlagBits samples, VkFormat colorFormat)
+bool QRhiVulkan::createDefaultRenderPass(QVkRenderPassDescriptor *rpD, bool hasDepthStencil, VkSampleCountFlagBits samples, VkFormat colorFormat)
{
- VkAttachmentDescription attDesc[3];
- memset(attDesc, 0, sizeof(attDesc));
-
// attachment list layout is color (1), ds (0-1), resolve (0-1)
- attDesc[0].format = colorFormat;
- attDesc[0].samples = samples;
- attDesc[0].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
- attDesc[0].storeOp = samples > VK_SAMPLE_COUNT_1_BIT ? VK_ATTACHMENT_STORE_OP_DONT_CARE : VK_ATTACHMENT_STORE_OP_STORE;
- attDesc[0].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
- attDesc[0].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
- attDesc[0].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
- attDesc[0].finalLayout = samples > VK_SAMPLE_COUNT_1_BIT ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
-
- // clear on load + no store + lazy alloc + transient image should play
- // nicely with tiled GPUs (no physical backing necessary for ds buffer)
- attDesc[1].format = optimalDepthStencilFormat();
- attDesc[1].samples = samples;
- attDesc[1].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
- attDesc[1].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
- attDesc[1].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
- attDesc[1].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
- attDesc[1].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
- attDesc[1].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
+ VkAttachmentDescription attDesc;
+ memset(&attDesc, 0, sizeof(attDesc));
+ attDesc.format = colorFormat;
+ attDesc.samples = samples;
+ attDesc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
+ attDesc.storeOp = samples > VK_SAMPLE_COUNT_1_BIT ? VK_ATTACHMENT_STORE_OP_DONT_CARE : VK_ATTACHMENT_STORE_OP_STORE;
+ attDesc.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
+ attDesc.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
+ attDesc.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+ attDesc.finalLayout = samples > VK_SAMPLE_COUNT_1_BIT ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
+ rpD->attDescs.append(attDesc);
- if (samples > VK_SAMPLE_COUNT_1_BIT) {
- attDesc[2].format = colorFormat;
- attDesc[2].samples = VK_SAMPLE_COUNT_1_BIT;
- attDesc[2].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
- attDesc[2].storeOp = VK_ATTACHMENT_STORE_OP_STORE;
- attDesc[2].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
- attDesc[2].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
- attDesc[2].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
- attDesc[2].finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
+ rpD->colorRefs.append({ 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL });
+
+ if (hasDepthStencil) {
+ // clear on load + no store + lazy alloc + transient image should play
+ // nicely with tiled GPUs (no physical backing necessary for ds buffer)
+ memset(&attDesc, 0, sizeof(attDesc));
+ attDesc.format = optimalDepthStencilFormat();
+ attDesc.samples = samples;
+ attDesc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
+ attDesc.storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
+ attDesc.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
+ attDesc.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
+ attDesc.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+ attDesc.finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
+ rpD->attDescs.append(attDesc);
+
+ rpD->dsRef = { 1, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL };
}
- VkAttachmentReference colorRef = { 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
- VkAttachmentReference dsRef = { 1, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL };
- VkAttachmentReference resolveRef = { 2, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
+ if (samples > VK_SAMPLE_COUNT_1_BIT) {
+ memset(&attDesc, 0, sizeof(attDesc));
+ attDesc.format = colorFormat;
+ attDesc.samples = VK_SAMPLE_COUNT_1_BIT;
+ attDesc.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
+ attDesc.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
+ attDesc.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
+ attDesc.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
+ attDesc.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+ attDesc.finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
+ rpD->attDescs.append(attDesc);
+
+ rpD->resolveRefs.append({ 2, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL });
+ }
VkSubpassDescription subpassDesc;
memset(&subpassDesc, 0, sizeof(subpassDesc));
subpassDesc.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
subpassDesc.colorAttachmentCount = 1;
- subpassDesc.pColorAttachments = &colorRef;
- subpassDesc.pDepthStencilAttachment = hasDepthStencil ? &dsRef : nullptr;
+ subpassDesc.pColorAttachments = rpD->colorRefs.constData();
+ subpassDesc.pDepthStencilAttachment = hasDepthStencil ? &rpD->dsRef : nullptr;
// Replace the first implicit dep (TOP_OF_PIPE / ALL_COMMANDS) with our own.
VkSubpassDependency subpassDep;
@@ -1095,7 +1102,7 @@ bool QRhiVulkan::createDefaultRenderPass(VkRenderPass *rp, bool hasDepthStencil,
memset(&rpInfo, 0, sizeof(rpInfo));
rpInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
rpInfo.attachmentCount = 1;
- rpInfo.pAttachments = attDesc;
+ rpInfo.pAttachments = rpD->attDescs.constData();
rpInfo.subpassCount = 1;
rpInfo.pSubpasses = &subpassDesc;
rpInfo.dependencyCount = 1;
@@ -1106,19 +1113,21 @@ bool QRhiVulkan::createDefaultRenderPass(VkRenderPass *rp, bool hasDepthStencil,
if (samples > VK_SAMPLE_COUNT_1_BIT) {
rpInfo.attachmentCount += 1;
- subpassDesc.pResolveAttachments = &resolveRef;
+ subpassDesc.pResolveAttachments = rpD->resolveRefs.constData();
}
- VkResult err = df->vkCreateRenderPass(dev, &rpInfo, nullptr, rp);
+ VkResult err = df->vkCreateRenderPass(dev, &rpInfo, nullptr, &rpD->rp);
if (err != VK_SUCCESS) {
qWarning("Failed to create renderpass: %d", err);
return false;
}
+ rpD->hasDepthStencil = hasDepthStencil;
+
return true;
}
-bool QRhiVulkan::createOffscreenRenderPass(VkRenderPass *rp,
+bool QRhiVulkan::createOffscreenRenderPass(QVkRenderPassDescriptor *rpD,
const QRhiColorAttachment *firstColorAttachment,
const QRhiColorAttachment *lastColorAttachment,
bool preserveColor,
@@ -1126,10 +1135,6 @@ bool QRhiVulkan::createOffscreenRenderPass(VkRenderPass *rp,
QRhiRenderBuffer *depthStencilBuffer,
QRhiTexture *depthTexture)
{
- QVarLengthArray<VkAttachmentDescription, 8> attDescs;
- QVarLengthArray<VkAttachmentReference, 8> colorRefs;
- QVarLengthArray<VkAttachmentReference, 8> resolveRefs;
-
// attachment list layout is color (0-8), ds (0-1), resolve (0-8)
for (auto it = firstColorAttachment; it != lastColorAttachment; ++it) {
@@ -1150,14 +1155,14 @@ bool QRhiVulkan::createOffscreenRenderPass(VkRenderPass *rp,
// this has to interact correctly with activateTextureRenderTarget(), hence leaving in COLOR_ATT
attDesc.initialLayout = preserveColor ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_UNDEFINED;
attDesc.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
- attDescs.append(attDesc);
+ rpD->attDescs.append(attDesc);
- const VkAttachmentReference ref = { uint32_t(attDescs.count() - 1), VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
- colorRefs.append(ref);
+ const VkAttachmentReference ref = { uint32_t(rpD->attDescs.count() - 1), VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
+ rpD->colorRefs.append(ref);
}
- const bool hasDepthStencil = depthStencilBuffer || depthTexture;
- if (hasDepthStencil) {
+ rpD->hasDepthStencil = depthStencilBuffer || depthTexture;
+ if (rpD->hasDepthStencil) {
const VkFormat dsFormat = depthTexture ? QRHI_RES(QVkTexture, depthTexture)->vkformat
: QRHI_RES(QVkRenderBuffer, depthStencilBuffer)->vkformat;
const VkSampleCountFlagBits samples = depthTexture ? QRHI_RES(QVkTexture, depthTexture)->samples
@@ -1174,9 +1179,9 @@ bool QRhiVulkan::createOffscreenRenderPass(VkRenderPass *rp,
attDesc.stencilStoreOp = storeOp;
attDesc.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
attDesc.finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
- attDescs.append(attDesc);
+ rpD->attDescs.append(attDesc);
}
- VkAttachmentReference dsRef = { uint32_t(attDescs.count() - 1), VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL };
+ rpD->dsRef = { uint32_t(rpD->attDescs.count() - 1), VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL };
for (auto it = firstColorAttachment; it != lastColorAttachment; ++it) {
if (it->resolveTexture()) {
@@ -1194,37 +1199,37 @@ bool QRhiVulkan::createOffscreenRenderPass(VkRenderPass *rp,
attDesc.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attDesc.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
attDesc.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
- attDescs.append(attDesc);
+ rpD->attDescs.append(attDesc);
- const VkAttachmentReference ref = { uint32_t(attDescs.count() - 1), VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
- resolveRefs.append(ref);
+ const VkAttachmentReference ref = { uint32_t(rpD->attDescs.count() - 1), VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
+ rpD->resolveRefs.append(ref);
} else {
const VkAttachmentReference ref = { VK_ATTACHMENT_UNUSED, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
- resolveRefs.append(ref);
+ rpD->resolveRefs.append(ref);
}
}
VkSubpassDescription subpassDesc;
memset(&subpassDesc, 0, sizeof(subpassDesc));
subpassDesc.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
- subpassDesc.colorAttachmentCount = uint32_t(colorRefs.count());
- Q_ASSERT(colorRefs.count() == resolveRefs.count());
- subpassDesc.pColorAttachments = !colorRefs.isEmpty() ? colorRefs.constData() : nullptr;
- subpassDesc.pDepthStencilAttachment = hasDepthStencil ? &dsRef : nullptr;
- subpassDesc.pResolveAttachments = !resolveRefs.isEmpty() ? resolveRefs.constData() : nullptr;
+ subpassDesc.colorAttachmentCount = uint32_t(rpD->colorRefs.count());
+ Q_ASSERT(rpD->colorRefs.count() == rpD->resolveRefs.count());
+ subpassDesc.pColorAttachments = !rpD->colorRefs.isEmpty() ? rpD->colorRefs.constData() : nullptr;
+ subpassDesc.pDepthStencilAttachment = rpD->hasDepthStencil ? &rpD->dsRef : nullptr;
+ subpassDesc.pResolveAttachments = !rpD->resolveRefs.isEmpty() ? rpD->resolveRefs.constData() : nullptr;
VkRenderPassCreateInfo rpInfo;
memset(&rpInfo, 0, sizeof(rpInfo));
rpInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
- rpInfo.attachmentCount = uint32_t(attDescs.count());
- rpInfo.pAttachments = attDescs.constData();
+ rpInfo.attachmentCount = uint32_t(rpD->attDescs.count());
+ rpInfo.pAttachments = rpD->attDescs.constData();
rpInfo.subpassCount = 1;
rpInfo.pSubpasses = &subpassDesc;
// don't yet know the correct initial/final access and stage stuff for the
// implicit deps at this point, so leave it to the resource tracking to
// generate barriers
- VkResult err = df->vkCreateRenderPass(dev, &rpInfo, nullptr, rp);
+ VkResult err = df->vkCreateRenderPass(dev, &rpInfo, nullptr, &rpD->rp);
if (err != VK_SUCCESS) {
qWarning("Failed to create renderpass: %d", err);
return false;
@@ -1346,8 +1351,8 @@ bool QRhiVulkan::recreateSwapChain(QRhiSwapChain *swapChain)
quint32 actualSwapChainBufferCount = 0;
err = vkGetSwapchainImagesKHR(dev, swapChainD->sc, &actualSwapChainBufferCount, nullptr);
- if (err != VK_SUCCESS || actualSwapChainBufferCount < 2) {
- qWarning("Failed to get swapchain images: %d (count=%u)", err, actualSwapChainBufferCount);
+ if (err != VK_SUCCESS || actualSwapChainBufferCount == 0) {
+ qWarning("Failed to get swapchain images: %d", err);
return false;
}
@@ -1523,7 +1528,8 @@ void QRhiVulkan::releaseSwapChainResources(QRhiSwapChain *swapChain)
QRhi::FrameOpResult QRhiVulkan::beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags)
{
QVkSwapChain *swapChainD = QRHI_RES(QVkSwapChain, swapChain);
- QVkSwapChain::FrameResources &frame(swapChainD->frameRes[swapChainD->currentFrameSlot]);
+ const int frameResIndex = swapChainD->bufferCount > 1 ? swapChainD->currentFrameSlot : 0;
+ QVkSwapChain::FrameResources &frame(swapChainD->frameRes[frameResIndex]);
QRhiProfilerPrivate *rhiP = profilerPrivateOrNull();
if (!frame.imageAcquired) {
@@ -1566,7 +1572,7 @@ QRhi::FrameOpResult QRhiVulkan::beginFrame(QRhiSwapChain *swapChain, QRhi::Begin
// will make B wait for A's frame 0 commands, so if a resource is written
// in B's frame or when B checks for pending resource releases, that won't
// mess up A's in-flight commands (as they are not in flight anymore).
- waitCommandCompletion(int(swapChainD->currentFrameSlot));
+ waitCommandCompletion(frameResIndex);
// Now is the time to read the timestamps for the previous frame for this slot.
if (frame.timestampQueryIndex >= 0) {
@@ -1601,7 +1607,7 @@ QRhi::FrameOpResult QRhiVulkan::beginFrame(QRhiSwapChain *swapChain, QRhi::Begin
// when profiling is enabled, pick a free query (pair) from the pool
int timestampQueryIdx = -1;
- if (profilerPrivateOrNull()) {
+ if (profilerPrivateOrNull() && swapChainD->bufferCount > 1) { // no timestamps if not having at least 2 frames in flight
for (int i = 0; i < timestampQueryPoolMap.count(); ++i) {
if (!timestampQueryPoolMap.testBit(i)) {
timestampQueryPoolMap.setBit(i);
@@ -1643,7 +1649,8 @@ QRhi::FrameOpResult QRhiVulkan::endFrame(QRhiSwapChain *swapChain, QRhi::EndFram
recordPrimaryCommandBuffer(&swapChainD->cbWrapper);
- QVkSwapChain::FrameResources &frame(swapChainD->frameRes[swapChainD->currentFrameSlot]);
+ int frameResIndex = swapChainD->bufferCount > 1 ? swapChainD->currentFrameSlot : 0;
+ QVkSwapChain::FrameResources &frame(swapChainD->frameRes[frameResIndex]);
QVkSwapChain::ImageResources &image(swapChainD->imageRes[swapChainD->currentImageIndex]);
if (image.lastUse != QVkSwapChain::ImageResources::ScImageUseRender) {
@@ -1710,6 +1717,10 @@ QRhi::FrameOpResult QRhiVulkan::endFrame(QRhiSwapChain *swapChain, QRhi::EndFram
presInfo.waitSemaphoreCount = 1;
presInfo.pWaitSemaphores = &frame.drawSem; // gfxQueueFamilyIdx == presQueueFamilyIdx ? &frame.drawSem : &frame.presTransSem;
+ // Do platform-specific WM notification. F.ex. essential on Wayland in
+ // order to circumvent driver frame callbacks
+ inst->presentAboutToBeQueued(swapChainD->window);
+
VkResult err = vkQueuePresentKHR(gfxQueue, &presInfo);
if (err != VK_SUCCESS) {
if (err == VK_ERROR_OUT_OF_DATE_KHR) {
@@ -1851,7 +1862,8 @@ QRhi::FrameOpResult QRhiVulkan::endAndSubmitPrimaryCommandBuffer(VkCommandBuffer
void QRhiVulkan::waitCommandCompletion(int frameSlot)
{
for (QVkSwapChain *sc : qAsConst(swapchains)) {
- QVkSwapChain::FrameResources &frame(sc->frameRes[frameSlot]);
+ const int frameResIndex = sc->bufferCount > 1 ? frameSlot : 0;
+ QVkSwapChain::FrameResources &frame(sc->frameRes[frameResIndex]);
if (frame.cmdFenceWaitable) {
df->vkWaitForFences(dev, 1, &frame.cmdFence, VK_TRUE, UINT64_MAX);
df->vkResetFences(dev, 1, &frame.cmdFence);
@@ -2210,6 +2222,8 @@ void QRhiVulkan::beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch
cbD->recordingPass = QVkCommandBuffer::ComputePass;
+ cbD->computePassState.reset();
+
if (cbD->useSecondaryCb)
cbD->secondaryCbs.append(startSecondaryCommandBuffer());
}
@@ -2258,15 +2272,152 @@ void QRhiVulkan::setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *
psD->lastActiveFrameSlot = currentFrameSlot;
}
+template<typename T>
+inline void qrhivk_accumulateComputeResource(T *writtenResources, QRhiResource *resource,
+ QRhiShaderResourceBinding::Type bindingType,
+ int loadTypeVal, int storeTypeVal, int loadStoreTypeVal)
+{
+ VkAccessFlags access = 0;
+ if (bindingType == loadTypeVal) {
+ access = VK_ACCESS_SHADER_READ_BIT;
+ } else {
+ access = VK_ACCESS_SHADER_WRITE_BIT;
+ if (bindingType == loadStoreTypeVal)
+ access |= VK_ACCESS_SHADER_READ_BIT;
+ }
+ auto it = writtenResources->find(resource);
+ if (it != writtenResources->end())
+ it->first |= access;
+ else if (bindingType == storeTypeVal || bindingType == loadStoreTypeVal)
+ writtenResources->insert(resource, { access, true });
+}
+
void QRhiVulkan::dispatch(QRhiCommandBuffer *cb, int x, int y, int z)
{
QVkCommandBuffer *cbD = QRHI_RES(QVkCommandBuffer, cb);
Q_ASSERT(cbD->recordingPass == QVkCommandBuffer::ComputePass);
+ // When there are multiple dispatches, read-after-write and
+ // write-after-write need a barrier.
+ QVarLengthArray<VkImageMemoryBarrier, 8> imageBarriers;
+ QVarLengthArray<VkBufferMemoryBarrier, 8> bufferBarriers;
+ if (cbD->currentComputeSrb) {
+ // The key in the writtenResources map indicates that the resource was
+ // written in a previous dispatch, whereas the value accumulates the
+ // access mask in the current one.
+ for (auto &accessAndIsNewFlag : cbD->computePassState.writtenResources)
+ accessAndIsNewFlag = { 0, false };
+
+ QVkShaderResourceBindings *srbD = QRHI_RES(QVkShaderResourceBindings, cbD->currentComputeSrb);
+ const int bindingCount = srbD->m_bindings.count();
+ for (int i = 0; i < bindingCount; ++i) {
+ const QRhiShaderResourceBinding::Data *b = srbD->m_bindings.at(i).data();
+ switch (b->type) {
+ case QRhiShaderResourceBinding::ImageLoad:
+ case QRhiShaderResourceBinding::ImageStore:
+ case QRhiShaderResourceBinding::ImageLoadStore:
+ qrhivk_accumulateComputeResource(&cbD->computePassState.writtenResources,
+ b->u.simage.tex,
+ b->type,
+ QRhiShaderResourceBinding::ImageLoad,
+ QRhiShaderResourceBinding::ImageStore,
+ QRhiShaderResourceBinding::ImageLoadStore);
+ break;
+ case QRhiShaderResourceBinding::BufferLoad:
+ case QRhiShaderResourceBinding::BufferStore:
+ case QRhiShaderResourceBinding::BufferLoadStore:
+ qrhivk_accumulateComputeResource(&cbD->computePassState.writtenResources,
+ b->u.sbuf.buf,
+ b->type,
+ QRhiShaderResourceBinding::BufferLoad,
+ QRhiShaderResourceBinding::BufferStore,
+ QRhiShaderResourceBinding::BufferLoadStore);
+ break;
+ default:
+ break;
+ }
+ }
+
+ for (auto it = cbD->computePassState.writtenResources.begin(); it != cbD->computePassState.writtenResources.end(); ) {
+ const int accessInThisDispatch = it->first;
+ const bool isNewInThisDispatch = it->second;
+ if (accessInThisDispatch && !isNewInThisDispatch) {
+ if (it.key()->resourceType() == QRhiResource::Texture) {
+ QVkTexture *texD = QRHI_RES(QVkTexture, it.key());
+ VkImageMemoryBarrier barrier;
+ memset(&barrier, 0, sizeof(barrier));
+ barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
+ barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ // won't care about subresources, pretend the whole resource was written
+ barrier.subresourceRange.baseMipLevel = 0;
+ barrier.subresourceRange.levelCount = VK_REMAINING_MIP_LEVELS;
+ barrier.subresourceRange.baseArrayLayer = 0;
+ barrier.subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS;
+ barrier.oldLayout = texD->usageState.layout;
+ barrier.newLayout = texD->usageState.layout;
+ barrier.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
+ barrier.dstAccessMask = accessInThisDispatch;
+ barrier.image = texD->image;
+ imageBarriers.append(barrier);
+ } else {
+ QVkBuffer *bufD = QRHI_RES(QVkBuffer, it.key());
+ VkBufferMemoryBarrier barrier;
+ memset(&barrier, 0, sizeof(barrier));
+ barrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER;
+ barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ barrier.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
+ barrier.dstAccessMask = accessInThisDispatch;
+ barrier.buffer = bufD->buffers[bufD->m_type == QRhiBuffer::Dynamic ? currentFrameSlot : 0];
+ barrier.size = VK_WHOLE_SIZE;
+ bufferBarriers.append(barrier);
+ }
+ }
+ // Anything that was previously written, but is only read now, can be
+ // removed from the written list (because that previous write got a
+ // corresponding barrier now).
+ if (accessInThisDispatch == VK_ACCESS_SHADER_READ_BIT)
+ it = cbD->computePassState.writtenResources.erase(it);
+ else
+ ++it;
+ }
+ }
+
if (cbD->useSecondaryCb) {
- df->vkCmdDispatch(cbD->secondaryCbs.last(), uint32_t(x), uint32_t(y), uint32_t(z));
+ VkCommandBuffer secondaryCb = cbD->secondaryCbs.last();
+ if (!imageBarriers.isEmpty()) {
+ df->vkCmdPipelineBarrier(secondaryCb, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
+ 0, 0, nullptr,
+ 0, nullptr,
+ imageBarriers.count(), imageBarriers.constData());
+ }
+ if (!bufferBarriers.isEmpty()) {
+ df->vkCmdPipelineBarrier(secondaryCb, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
+ 0, 0, nullptr,
+ bufferBarriers.count(), bufferBarriers.constData(),
+ 0, nullptr);
+ }
+ df->vkCmdDispatch(secondaryCb, uint32_t(x), uint32_t(y), uint32_t(z));
} else {
QVkCommandBuffer::Command cmd;
+ if (!imageBarriers.isEmpty()) {
+ cmd.cmd = QVkCommandBuffer::Command::ImageBarrier;
+ cmd.args.imageBarrier.srcStageMask = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ cmd.args.imageBarrier.dstStageMask = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ cmd.args.imageBarrier.count = imageBarriers.count();
+ cmd.args.imageBarrier.index = cbD->pools.imageBarrier.count();
+ cbD->pools.imageBarrier.append(imageBarriers.constData(), imageBarriers.count());
+ cbD->commands.append(cmd);
+ }
+ if (!bufferBarriers.isEmpty()) {
+ cmd.cmd = QVkCommandBuffer::Command::BufferBarrier;
+ cmd.args.bufferBarrier.srcStageMask = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ cmd.args.bufferBarrier.dstStageMask = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ cmd.args.bufferBarrier.count = bufferBarriers.count();
+ cmd.args.bufferBarrier.index = cbD->pools.bufferBarrier.count();
+ cbD->pools.bufferBarrier.append(bufferBarriers.constData(), bufferBarriers.count());
+ cbD->commands.append(cmd);
+ }
cmd.cmd = QVkCommandBuffer::Command::Dispatch;
cmd.args.dispatch.x = x;
cmd.args.dispatch.y = y;
@@ -2311,9 +2462,10 @@ void QRhiVulkan::updateShaderResourceBindings(QRhiShaderResourceBindings *srb, i
{
QVkShaderResourceBindings *srbD = QRHI_RES(QVkShaderResourceBindings, srb);
- QVarLengthArray<VkDescriptorBufferInfo, 4> bufferInfos;
- QVarLengthArray<VkDescriptorImageInfo, 4> imageInfos;
- QVarLengthArray<VkWriteDescriptorSet, 8> writeInfos;
+ QVarLengthArray<VkDescriptorBufferInfo, 8> bufferInfos;
+ QVarLengthArray<VkDescriptorImageInfo, 8> imageInfos;
+ QVarLengthArray<VkWriteDescriptorSet, 12> writeInfos;
+ QVarLengthArray<QPair<int, int>, 12> infoIndices;
const bool updateAll = descSetIdx < 0;
int frameSlot = updateAll ? 0 : descSetIdx;
@@ -2330,6 +2482,9 @@ void QRhiVulkan::updateShaderResourceBindings(QRhiShaderResourceBindings *srb, i
writeInfo.dstBinding = uint32_t(b->binding);
writeInfo.descriptorCount = 1;
+ int bufferInfoIndex = -1;
+ int imageInfoIndex = -1;
+
switch (b->type) {
case QRhiShaderResourceBinding::UniformBuffer:
{
@@ -2345,8 +2500,8 @@ void QRhiVulkan::updateShaderResourceBindings(QRhiShaderResourceBindings *srb, i
bufInfo.range = VkDeviceSize(b->u.ubuf.maybeSize ? b->u.ubuf.maybeSize : bufD->m_size);
// be nice and assert when we know the vulkan device would die a horrible death due to non-aligned reads
Q_ASSERT(aligned(bufInfo.offset, ubufAlign) == bufInfo.offset);
+ bufferInfoIndex = bufferInfos.count();
bufferInfos.append(bufInfo);
- writeInfo.pBufferInfo = &bufferInfos.last();
}
break;
case QRhiShaderResourceBinding::SampledTexture:
@@ -2362,14 +2517,12 @@ void QRhiVulkan::updateShaderResourceBindings(QRhiShaderResourceBindings *srb, i
imageInfo.sampler = samplerD->sampler;
imageInfo.imageView = texD->imageView;
imageInfo.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
+ imageInfoIndex = imageInfos.count();
imageInfos.append(imageInfo);
- writeInfo.pImageInfo = &imageInfos.last();
}
break;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
{
QVkTexture *texD = QRHI_RES(QVkTexture, b->u.simage.tex);
@@ -2382,15 +2535,13 @@ void QRhiVulkan::updateShaderResourceBindings(QRhiShaderResourceBindings *srb, i
imageInfo.sampler = VK_NULL_HANDLE;
imageInfo.imageView = view;
imageInfo.imageLayout = VK_IMAGE_LAYOUT_GENERAL;
+ imageInfoIndex = imageInfos.count();
imageInfos.append(imageInfo);
- writeInfo.pImageInfo = &imageInfos.last();
}
}
break;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
{
QVkBuffer *bufD = QRHI_RES(QVkBuffer, b->u.sbuf.buf);
@@ -2401,8 +2552,8 @@ void QRhiVulkan::updateShaderResourceBindings(QRhiShaderResourceBindings *srb, i
bufInfo.buffer = bufD->m_type == QRhiBuffer::Dynamic ? bufD->buffers[frameSlot] : bufD->buffers[0];
bufInfo.offset = VkDeviceSize(b->u.ubuf.offset);
bufInfo.range = VkDeviceSize(b->u.ubuf.maybeSize ? b->u.ubuf.maybeSize : bufD->m_size);
+ bufferInfoIndex = bufferInfos.count();
bufferInfos.append(bufInfo);
- writeInfo.pBufferInfo = &bufferInfos.last();
}
break;
default:
@@ -2410,10 +2561,20 @@ void QRhiVulkan::updateShaderResourceBindings(QRhiShaderResourceBindings *srb, i
}
writeInfos.append(writeInfo);
+ infoIndices.append({ bufferInfoIndex, imageInfoIndex });
}
++frameSlot;
}
+ for (int i = 0, writeInfoCount = writeInfos.count(); i < writeInfoCount; ++i) {
+ const int bufferInfoIndex = infoIndices[i].first;
+ const int imageInfoIndex = infoIndices[i].second;
+ if (bufferInfoIndex >= 0)
+ writeInfos[i].pBufferInfo = &bufferInfos[bufferInfoIndex];
+ else if (imageInfoIndex >= 0)
+ writeInfos[i].pImageInfo = &imageInfos[imageInfoIndex];
+ }
+
df->vkUpdateDescriptorSets(dev, uint32_t(writeInfos.count()), writeInfos.constData(), 0, nullptr);
}
@@ -2460,7 +2621,9 @@ void QRhiVulkan::trackedBufferBarrier(QVkCommandBuffer *cbD, QVkBuffer *bufD, in
cmd.cmd = QVkCommandBuffer::Command::BufferBarrier;
cmd.args.bufferBarrier.srcStageMask = s.stage;
cmd.args.bufferBarrier.dstStageMask = stage;
- cmd.args.bufferBarrier.desc = bufMemBarrier;
+ cmd.args.bufferBarrier.count = 1;
+ cmd.args.bufferBarrier.index = cbD->pools.bufferBarrier.count();
+ cbD->pools.bufferBarrier.append(bufMemBarrier);
cbD->commands.append(cmd);
s.access = access;
@@ -2502,7 +2665,9 @@ void QRhiVulkan::trackedImageBarrier(QVkCommandBuffer *cbD, QVkTexture *texD,
cmd.cmd = QVkCommandBuffer::Command::ImageBarrier;
cmd.args.imageBarrier.srcStageMask = srcStage;
cmd.args.imageBarrier.dstStageMask = stage;
- cmd.args.imageBarrier.desc = barrier;
+ cmd.args.imageBarrier.count = 1;
+ cmd.args.imageBarrier.index = cbD->pools.imageBarrier.count();
+ cbD->pools.imageBarrier.append(barrier);
cbD->commands.append(cmd);
s.layout = layout;
@@ -2536,7 +2701,9 @@ void QRhiVulkan::subresourceBarrier(QVkCommandBuffer *cbD, VkImage image,
cmd.cmd = QVkCommandBuffer::Command::ImageBarrier;
cmd.args.imageBarrier.srcStageMask = srcStage;
cmd.args.imageBarrier.dstStageMask = dstStage;
- cmd.args.imageBarrier.desc = barrier;
+ cmd.args.imageBarrier.count = 1;
+ cmd.args.imageBarrier.index = cbD->pools.imageBarrier.count();
+ cbD->pools.imageBarrier.append(barrier);
cbD->commands.append(cmd);
}
@@ -3404,12 +3571,12 @@ void QRhiVulkan::recordPrimaryCommandBuffer(QVkCommandBuffer *cbD)
case QVkCommandBuffer::Command::ImageBarrier:
df->vkCmdPipelineBarrier(cbD->cb, cmd.args.imageBarrier.srcStageMask, cmd.args.imageBarrier.dstStageMask,
0, 0, nullptr, 0, nullptr,
- 1, &cmd.args.imageBarrier.desc);
+ cmd.args.imageBarrier.count, cbD->pools.imageBarrier.constData() + cmd.args.imageBarrier.index);
break;
case QVkCommandBuffer::Command::BufferBarrier:
df->vkCmdPipelineBarrier(cbD->cb, cmd.args.bufferBarrier.srcStageMask, cmd.args.bufferBarrier.dstStageMask,
0, 0, nullptr,
- 1, &cmd.args.bufferBarrier.desc,
+ cmd.args.bufferBarrier.count, cbD->pools.bufferBarrier.constData() + cmd.args.bufferBarrier.index,
0, nullptr);
break;
case QVkCommandBuffer::Command::BlitImage:
@@ -3558,9 +3725,7 @@ static inline VkImageLayout toVkLayout(QRhiPassResourceTracker::TextureAccess ac
case QRhiPassResourceTracker::TexDepthOutput:
return VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
case QRhiPassResourceTracker::TexStorageLoad:
- Q_FALLTHROUGH();
case QRhiPassResourceTracker::TexStorageStore:
- Q_FALLTHROUGH();
case QRhiPassResourceTracker::TexStorageLoadStore:
return VK_IMAGE_LAYOUT_GENERAL;
default:
@@ -3895,9 +4060,9 @@ QRhiTexture *QRhiVulkan::createTexture(QRhiTexture::Format format, const QSize &
QRhiSampler *QRhiVulkan::createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler::AddressMode u, QRhiSampler::AddressMode v)
+ QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w)
{
- return new QVkSampler(this, magFilter, minFilter, mipmapMode, u, v);
+ return new QVkSampler(this, magFilter, minFilter, mipmapMode, u, v, w);
}
QRhiTextureRenderTarget *QRhiVulkan::createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
@@ -4039,9 +4204,7 @@ void QRhiVulkan::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBin
}
break;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
{
QVkTexture *texD = QRHI_RES(QVkTexture, b->u.simage.tex);
@@ -4066,9 +4229,7 @@ void QRhiVulkan::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBin
}
break;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
{
QVkBuffer *bufD = QRHI_RES(QVkBuffer, b->u.sbuf.buf);
@@ -4613,12 +4774,8 @@ static inline VkSamplerAddressMode toVkAddressMode(QRhiSampler::AddressMode m)
return VK_SAMPLER_ADDRESS_MODE_REPEAT;
case QRhiSampler::ClampToEdge:
return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
- case QRhiSampler::Border:
- return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER;
case QRhiSampler::Mirror:
return VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT;
- case QRhiSampler::MirrorOnce:
- return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
default:
Q_UNREACHABLE();
return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
@@ -4861,16 +5018,12 @@ static inline VkDescriptorType toVkDescriptorType(const QRhiShaderResourceBindin
return VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
case QRhiShaderResourceBinding::ImageLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::ImageLoadStore:
return VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
case QRhiShaderResourceBinding::BufferLoad:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferStore:
- Q_FALLTHROUGH();
case QRhiShaderResourceBinding::BufferLoadStore:
return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
@@ -5181,7 +5334,6 @@ void QVkTexture::release()
image = VK_NULL_HANDLE;
imageView = VK_NULL_HANDLE;
imageAlloc = nullptr;
- nativeHandlesStruct.image = VK_NULL_HANDLE;
QRHI_RES_RHI(QRhiVulkan);
rhiD->releaseQueue.append(e);
@@ -5266,8 +5418,6 @@ bool QVkTexture::finishBuild()
return false;
}
- nativeHandlesStruct.image = image;
-
lastActiveFrameSlot = -1;
generation += 1;
@@ -5339,16 +5489,16 @@ bool QVkTexture::build()
return true;
}
-bool QVkTexture::buildFrom(const QRhiNativeHandles *src)
+bool QVkTexture::buildFrom(QRhiTexture::NativeTexture src)
{
- const QRhiVulkanTextureNativeHandles *h = static_cast<const QRhiVulkanTextureNativeHandles *>(src);
- if (!h || !h->image)
+ auto *img = static_cast<const VkImage*>(src.object);
+ if (!img || !*img)
return false;
if (!prepareBuild())
return false;
- image = h->image;
+ image = *img;
if (!finishBuild())
return false;
@@ -5356,7 +5506,7 @@ bool QVkTexture::buildFrom(const QRhiNativeHandles *src)
QRHI_PROF;
QRHI_PROF_F(newTexture(this, false, int(mipLevelCount), m_flags.testFlag(CubeMap) ? 6 : 1, samples));
- usageState.layout = h->layout;
+ usageState.layout = VkImageLayout(src.layout);
owns = false;
QRHI_RES_RHI(QRhiVulkan);
@@ -5364,10 +5514,9 @@ bool QVkTexture::buildFrom(const QRhiNativeHandles *src)
return true;
}
-const QRhiNativeHandles *QVkTexture::nativeHandles()
+QRhiTexture::NativeTexture QVkTexture::nativeTexture()
{
- nativeHandlesStruct.layout = usageState.layout;
- return &nativeHandlesStruct;
+ return {&image, usageState.layout};
}
VkImageView QVkTexture::imageViewForLevel(int level)
@@ -5408,8 +5557,8 @@ VkImageView QVkTexture::imageViewForLevel(int level)
}
QVkSampler::QVkSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v)
- : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v)
+ AddressMode u, AddressMode v, AddressMode w)
+ : QRhiSampler(rhi, magFilter, minFilter, mipmapMode, u, v, w)
{
}
@@ -5501,6 +5650,61 @@ void QVkRenderPassDescriptor::release()
rhiD->unregisterResource(this);
}
+static inline bool attachmentDescriptionEquals(const VkAttachmentDescription &a, const VkAttachmentDescription &b)
+{
+ return a.format == b.format
+ && a.samples == b.samples
+ && a.loadOp == b.loadOp
+ && a.storeOp == b.storeOp
+ && a.stencilLoadOp == b.stencilLoadOp
+ && a.stencilStoreOp == b.stencilStoreOp
+ && a.initialLayout == b.initialLayout
+ && a.finalLayout == b.finalLayout;
+}
+
+bool QVkRenderPassDescriptor::isCompatible(const QRhiRenderPassDescriptor *other) const
+{
+ if (!other)
+ return false;
+
+ const QVkRenderPassDescriptor *o = QRHI_RES(const QVkRenderPassDescriptor, other);
+
+ if (attDescs.count() != o->attDescs.count())
+ return false;
+ if (colorRefs.count() != o->colorRefs.count())
+ return false;
+ if (resolveRefs.count() != o->resolveRefs.count())
+ return false;
+ if (hasDepthStencil != o->hasDepthStencil)
+ return false;
+
+ for (int i = 0, ie = colorRefs.count(); i != ie; ++i) {
+ const uint32_t attIdx = colorRefs[i].attachment;
+ if (attIdx != o->colorRefs[i].attachment)
+ return false;
+ if (attIdx != VK_ATTACHMENT_UNUSED && !attachmentDescriptionEquals(attDescs[attIdx], o->attDescs[attIdx]))
+ return false;
+ }
+
+ if (hasDepthStencil) {
+ const uint32_t attIdx = dsRef.attachment;
+ if (attIdx != o->dsRef.attachment)
+ return false;
+ if (attIdx != VK_ATTACHMENT_UNUSED && !attachmentDescriptionEquals(attDescs[attIdx], o->attDescs[attIdx]))
+ return false;
+ }
+
+ for (int i = 0, ie = resolveRefs.count(); i != ie; ++i) {
+ const uint32_t attIdx = resolveRefs[i].attachment;
+ if (attIdx != o->resolveRefs[i].attachment)
+ return false;
+ if (attIdx != VK_ATTACHMENT_UNUSED && !attachmentDescriptionEquals(attDescs[attIdx], o->attDescs[attIdx]))
+ return false;
+ }
+
+ return true;
+}
+
const QRhiNativeHandles *QVkRenderPassDescriptor::nativeHandles()
{
nativeHandlesStruct.renderPass = rp;
@@ -5584,7 +5788,7 @@ QRhiRenderPassDescriptor *QVkTextureRenderTarget::newCompatibleRenderPassDescrip
QRHI_RES_RHI(QRhiVulkan);
QVkRenderPassDescriptor *rp = new QVkRenderPassDescriptor(m_rhi);
- if (!rhiD->createOffscreenRenderPass(&rp->rp,
+ if (!rhiD->createOffscreenRenderPass(rp,
m_desc.cbeginColorAttachments(),
m_desc.cendColorAttachments(),
m_flags.testFlag(QRhiTextureRenderTarget::PreserveColorContents),
@@ -6018,6 +6222,11 @@ bool QVkGraphicsPipeline::build()
rastInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
rastInfo.cullMode = toVkCullMode(m_cullMode);
rastInfo.frontFace = toVkFrontFace(m_frontFace);
+ if (m_depthBias != 0 || !qFuzzyIsNull(m_slopeScaledDepthBias)) {
+ rastInfo.depthBiasEnable = true;
+ rastInfo.depthBiasConstantFactor = float(m_depthBias);
+ rastInfo.depthBiasSlopeFactor = m_slopeScaledDepthBias;
+ }
rastInfo.lineWidth = rhiD->hasWideLines ? m_lineWidth : 1.0f;
pipelineInfo.pRasterizationState = &rastInfo;
@@ -6285,7 +6494,7 @@ QRhiRenderPassDescriptor *QVkSwapChain::newCompatibleRenderPassDescriptor()
QRHI_RES_RHI(QRhiVulkan);
QVkRenderPassDescriptor *rp = new QVkRenderPassDescriptor(m_rhi);
- if (!rhiD->createDefaultRenderPass(&rp->rp,
+ if (!rhiD->createDefaultRenderPass(rp,
m_depthStencil != nullptr,
samples,
colorFormat))
@@ -6303,17 +6512,11 @@ static inline bool isSrgbFormat(VkFormat format)
{
switch (format) {
case VK_FORMAT_R8_SRGB:
- Q_FALLTHROUGH();
case VK_FORMAT_R8G8_SRGB:
- Q_FALLTHROUGH();
case VK_FORMAT_R8G8B8_SRGB:
- Q_FALLTHROUGH();
case VK_FORMAT_B8G8R8_SRGB:
- Q_FALLTHROUGH();
case VK_FORMAT_R8G8B8A8_SRGB:
- Q_FALLTHROUGH();
case VK_FORMAT_B8G8R8A8_SRGB:
- Q_FALLTHROUGH();
case VK_FORMAT_A8B8G8R8_SRGB_PACK32:
return true;
default:
diff --git a/src/gui/rhi/qrhivulkan_p.h b/src/gui/rhi/qrhivulkan_p.h
index ff19c7a54e..d495919671 100644
--- a/src/gui/rhi/qrhivulkan_p.h
+++ b/src/gui/rhi/qrhivulkan_p.h
@@ -69,12 +69,6 @@ struct Q_GUI_EXPORT QRhiVulkanNativeHandles : public QRhiNativeHandles
void *vmemAllocator = nullptr;
};
-struct Q_GUI_EXPORT QRhiVulkanTextureNativeHandles : public QRhiNativeHandles
-{
- VkImage image = VK_NULL_HANDLE;
- VkImageLayout layout = VK_IMAGE_LAYOUT_GENERAL;
-};
-
struct Q_GUI_EXPORT QRhiVulkanCommandBufferNativeHandles : public QRhiNativeHandles
{
VkCommandBuffer commandBuffer = VK_NULL_HANDLE;
diff --git a/src/gui/rhi/qrhivulkan_p_p.h b/src/gui/rhi/qrhivulkan_p_p.h
index d0e1e6758b..d42b83b882 100644
--- a/src/gui/rhi/qrhivulkan_p_p.h
+++ b/src/gui/rhi/qrhivulkan_p_p.h
@@ -120,8 +120,8 @@ struct QVkTexture : public QRhiTexture
~QVkTexture();
void release() override;
bool build() override;
- bool buildFrom(const QRhiNativeHandles *src) override;
- const QRhiNativeHandles *nativeHandles() override;
+ bool buildFrom(NativeTexture src) override;
+ NativeTexture nativeTexture() override;
bool prepareBuild(QSize *adjustedSize = nullptr);
bool finishBuild();
@@ -134,7 +134,6 @@ struct QVkTexture : public QRhiTexture
QVkAlloc stagingAllocations[QVK_FRAMES_IN_FLIGHT];
VkImageView perLevelImageViews[QRhi::MAX_LEVELS];
bool owns = true;
- QRhiVulkanTextureNativeHandles nativeHandlesStruct;
struct UsageState {
// no tracking of subresource layouts (some operations can keep
// subresources in different layouts for some time, but that does not
@@ -155,7 +154,7 @@ struct QVkTexture : public QRhiTexture
struct QVkSampler : public QRhiSampler
{
QVkSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
- AddressMode u, AddressMode v);
+ AddressMode u, AddressMode v, AddressMode w);
~QVkSampler();
void release() override;
bool build() override;
@@ -171,10 +170,16 @@ struct QVkRenderPassDescriptor : public QRhiRenderPassDescriptor
QVkRenderPassDescriptor(QRhiImplementation *rhi);
~QVkRenderPassDescriptor();
void release() override;
+ bool isCompatible(const QRhiRenderPassDescriptor *other) const override;
const QRhiNativeHandles *nativeHandles() override;
VkRenderPass rp = VK_NULL_HANDLE;
bool ownsRp = false;
+ QVarLengthArray<VkAttachmentDescription, 8> attDescs;
+ QVarLengthArray<VkAttachmentReference, 8> colorRefs;
+ QVarLengthArray<VkAttachmentReference, 8> resolveRefs;
+ bool hasDepthStencil = false;
+ VkAttachmentReference dsRef;
QRhiVulkanRenderPassNativeHandles nativeHandlesStruct;
int lastActiveFrameSlot = -1;
};
@@ -365,6 +370,13 @@ struct QVkCommandBuffer : public QRhiCommandBuffer
QVarLengthArray<VkCommandBuffer, 4> secondaryCbs;
bool inExternal;
+ struct {
+ QHash<QRhiResource *, QPair<VkAccessFlags, bool> > writtenResources;
+ void reset() {
+ writtenResources.clear();
+ }
+ } computePassState;
+
struct Command {
enum Cmd {
CopyBuffer,
@@ -424,12 +436,14 @@ struct QVkCommandBuffer : public QRhiCommandBuffer
struct {
VkPipelineStageFlags srcStageMask;
VkPipelineStageFlags dstStageMask;
- VkImageMemoryBarrier desc;
+ int count;
+ int index;
} imageBarrier;
struct {
VkPipelineStageFlags srcStageMask;
VkPipelineStageFlags dstStageMask;
- VkBufferMemoryBarrier desc;
+ int count;
+ int index;
} bufferBarrier;
struct {
VkImage src;
@@ -532,6 +546,8 @@ struct QVkCommandBuffer : public QRhiCommandBuffer
pools.vertexBuffer.clear();
pools.vertexBufferOffset.clear();
pools.debugMarkerData.clear();
+ pools.imageBarrier.clear();
+ pools.bufferBarrier.clear();
}
struct {
@@ -541,6 +557,8 @@ struct QVkCommandBuffer : public QRhiCommandBuffer
QVarLengthArray<VkBuffer, 4> vertexBuffer;
QVarLengthArray<VkDeviceSize, 4> vertexBufferOffset;
QVarLengthArray<QByteArray, 4> debugMarkerData;
+ QVarLengthArray<VkImageMemoryBarrier, 8> imageBarrier;
+ QVarLengthArray<VkBufferMemoryBarrier, 8> bufferBarrier;
} pools;
friend class QRhiVulkan;
@@ -639,9 +657,12 @@ public:
const QSize &pixelSize,
int sampleCount,
QRhiTexture::Flags flags) override;
- QRhiSampler *createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter,
+ QRhiSampler *createSampler(QRhiSampler::Filter magFilter,
+ QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
- QRhiSampler:: AddressMode u, QRhiSampler::AddressMode v) override;
+ QRhiSampler:: AddressMode u,
+ QRhiSampler::AddressMode v,
+ QRhiSampler::AddressMode w) override;
QRhiTextureRenderTarget *createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
QRhiTextureRenderTarget::Flags flags) override;
@@ -727,11 +748,11 @@ public:
VkFormat optimalDepthStencilFormat();
VkSampleCountFlagBits effectiveSampleCount(int sampleCount);
- bool createDefaultRenderPass(VkRenderPass *rp,
+ bool createDefaultRenderPass(QVkRenderPassDescriptor *rpD,
bool hasDepthStencil,
VkSampleCountFlagBits samples,
VkFormat colorFormat);
- bool createOffscreenRenderPass(VkRenderPass *rp,
+ bool createOffscreenRenderPass(QVkRenderPassDescriptor *rpD,
const QRhiColorAttachment *firstColorAttachment,
const QRhiColorAttachment *lastColorAttachment,
bool preserveColor,
diff --git a/src/gui/rhi/qshader.cpp b/src/gui/rhi/qshader.cpp
index 9d35d83336..69f4a68215 100644
--- a/src/gui/rhi/qshader.cpp
+++ b/src/gui/rhi/qshader.cpp
@@ -214,9 +214,6 @@ QT_BEGIN_NAMESPACE
QShader, it indicates no shader code was found for the requested key.
*/
-static const int QSB_VERSION = 2;
-static const int QSB_VERSION_WITHOUT_BINDINGS = 1;
-
/*!
Constructs a new, empty (and thus invalid) QShader instance.
*/
@@ -368,9 +365,9 @@ QByteArray QShader::serialized() const
if (!buf.open(QIODevice::WriteOnly))
return QByteArray();
- ds << QSB_VERSION;
+ ds << QShaderPrivate::QSB_VERSION;
ds << int(d->stage);
- ds << d->desc.toBinaryJson();
+ d->desc.serialize(&ds);
ds << d->shaders.count();
for (auto it = d->shaders.cbegin(), itEnd = d->shaders.cend(); it != itEnd; ++it) {
const QShaderKey &k(it.key());
@@ -429,17 +426,37 @@ QShader QShader::fromSerialized(const QByteArray &data)
Q_ASSERT(d->ref.loadRelaxed() == 1); // must be detached
int intVal;
ds >> intVal;
- const int qsbVersion = intVal;
- if (qsbVersion != QSB_VERSION && qsbVersion != QSB_VERSION_WITHOUT_BINDINGS) {
- qWarning("Attempted to deserialize QShader with unknown version %d.", qsbVersion);
+ d->qsbVersion = intVal;
+ if (d->qsbVersion != QShaderPrivate::QSB_VERSION
+ && d->qsbVersion != QShaderPrivate::QSB_VERSION_WITH_CBOR
+ && d->qsbVersion != QShaderPrivate::QSB_VERSION_WITH_BINARY_JSON
+ && d->qsbVersion != QShaderPrivate::QSB_VERSION_WITHOUT_BINDINGS)
+ {
+ qWarning("Attempted to deserialize QShader with unknown version %d.", d->qsbVersion);
return QShader();
}
ds >> intVal;
d->stage = Stage(intVal);
- QByteArray descBin;
- ds >> descBin;
- d->desc = QShaderDescription::fromBinaryJson(descBin);
+ if (d->qsbVersion > QShaderPrivate::QSB_VERSION_WITH_CBOR) {
+ d->desc = QShaderDescription::deserialize(&ds);
+ } else if (d->qsbVersion > QShaderPrivate::QSB_VERSION_WITH_BINARY_JSON) {
+ QByteArray descBin;
+ ds >> descBin;
+ d->desc = QShaderDescription::fromCbor(descBin);
+ } else {
+#if QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
+ QT_WARNING_PUSH
+ QT_WARNING_DISABLE_DEPRECATED
+ QByteArray descBin;
+ ds >> descBin;
+ d->desc = QShaderDescription::fromBinaryJson(descBin);
+ QT_WARNING_POP
+#else
+ qWarning("Cannot load QShaderDescription from binary JSON due to disabled binaryjson feature");
+ d->desc = QShaderDescription();
+#endif
+ }
int count;
ds >> count;
for (int i = 0; i < count; ++i) {
@@ -454,7 +471,7 @@ QShader QShader::fromSerialized(const QByteArray &data)
d->shaders[k] = shader;
}
- if (qsbVersion != QSB_VERSION_WITHOUT_BINDINGS) {
+ if (d->qsbVersion > QShaderPrivate::QSB_VERSION_WITHOUT_BINDINGS) {
ds >> count;
for (int i = 0; i < count; ++i) {
QShaderKey k;
@@ -657,6 +674,13 @@ QDebug operator<<(QDebug dbg, const QShaderVersion &v)
pair, because combined image samplers may map to two native resources (a
texture and a sampler) in some shading languages. In that case the second
value refers to the sampler.
+
+ \note The native binding may be -1, in case there is no active binding for
+ the resource in the shader. (for example, there is a uniform block
+ declared, but it is not used in the shader code) The map is always
+ complete, meaning there is an entry for all declared uniform blocks,
+ storage blocks, image objects, and combined samplers, but the value will be
+ -1 for those that are not actually referenced in the shader functions.
*/
/*!
diff --git a/src/gui/rhi/qshader_p_p.h b/src/gui/rhi/qshader_p_p.h
index 4535e01491..66ef18f391 100644
--- a/src/gui/rhi/qshader_p_p.h
+++ b/src/gui/rhi/qshader_p_p.h
@@ -57,6 +57,11 @@ QT_BEGIN_NAMESPACE
struct Q_GUI_EXPORT QShaderPrivate
{
+ static const int QSB_VERSION = 4;
+ static const int QSB_VERSION_WITH_CBOR = 3;
+ static const int QSB_VERSION_WITH_BINARY_JSON = 2;
+ static const int QSB_VERSION_WITHOUT_BINDINGS = 1;
+
QShaderPrivate()
: ref(1)
{
@@ -64,6 +69,7 @@ struct Q_GUI_EXPORT QShaderPrivate
QShaderPrivate(const QShaderPrivate *other)
: ref(1),
+ qsbVersion(other->qsbVersion),
stage(other->stage),
desc(other->desc),
shaders(other->shaders),
@@ -75,6 +81,7 @@ struct Q_GUI_EXPORT QShaderPrivate
static const QShaderPrivate *get(const QShader *s) { return s->d; }
QAtomicInt ref;
+ int qsbVersion = QSB_VERSION;
QShader::Stage stage = QShader::VertexStage;
QShaderDescription desc;
QHash<QShaderKey, QShaderCode> shaders;
diff --git a/src/gui/rhi/qshaderdescription.cpp b/src/gui/rhi/qshaderdescription.cpp
index 179d5f3a07..96c8d082fc 100644
--- a/src/gui/rhi/qshaderdescription.cpp
+++ b/src/gui/rhi/qshaderdescription.cpp
@@ -36,8 +36,12 @@
#include "qshaderdescription_p_p.h"
#include <QDebug>
+#include <QDataStream>
#include <QJsonObject>
#include <QJsonArray>
+#include <QCborValue>
+#include <QCborMap>
+#include <QCborArray>
QT_BEGIN_NAMESPACE
@@ -99,8 +103,8 @@ QT_BEGIN_NAMESPACE
float \c opacity at offset 64.
All this is described by a QShaderDescription object. QShaderDescription
- can also be serialized to JSON and binary JSON, and can be deserialized
- from binary JSON. In practice this is rarely needed since QShader
+ can also be serialized to JSON and CBOR, and can be deserialized
+ from CBOR. In practice this is rarely needed since QShader
takes care of the associated QShaderDescription automatically, but if the
QShaderDescription of the above shader would be written out as JSON, it
would look like the following:
@@ -333,13 +337,14 @@ bool QShaderDescription::isValid() const
}
/*!
- \return a serialized binary version of the data.
+ \return a serialized binary version of the data in CBOR (Concise Binary
+ Object Representation) format.
- \sa toJson()
+ \sa QCborValue, toJson()
*/
-QByteArray QShaderDescription::toBinaryJson() const
+QByteArray QShaderDescription::toCbor() const
{
- return d->makeDoc().toBinaryData();
+ return QCborValue::fromJsonValue(d->makeDoc().object()).toCbor();
}
/*!
@@ -347,21 +352,60 @@ QByteArray QShaderDescription::toBinaryJson() const
\note There is no deserialization method provided for JSON text.
- \sa toBinaryJson()
+ \sa toCbor()
*/
QByteArray QShaderDescription::toJson() const
{
return d->makeDoc().toJson();
}
+void QShaderDescription::serialize(QDataStream *stream) const
+{
+ d->writeToStream(stream);
+}
+
+#if QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
/*!
+ \deprecated
+
Deserializes the given binary JSON \a data and returns a new
QShaderDescription.
+
+ \sa fromCbor()
*/
QShaderDescription QShaderDescription::fromBinaryJson(const QByteArray &data)
{
QShaderDescription desc;
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QShaderDescriptionPrivate::get(&desc)->loadDoc(QJsonDocument::fromBinaryData(data));
+QT_WARNING_POP
+ return desc;
+}
+#endif
+
+/*!
+ Deserializes the given CBOR \a data and returns a new QShaderDescription.
+ */
+QShaderDescription QShaderDescription::fromCbor(const QByteArray &data)
+{
+ QShaderDescription desc;
+ const QCborValue cbor = QCborValue::fromCbor(data);
+ if (cbor.isMap()) {
+ const QJsonDocument doc(cbor.toMap().toJsonObject());
+ QShaderDescriptionPrivate::get(&desc)->loadDoc(doc);
+ }
+ if (cbor.isArray()) {
+ const QJsonDocument doc(cbor.toArray().toJsonArray());
+ QShaderDescriptionPrivate::get(&desc)->loadDoc(doc);
+ }
+ return desc;
+}
+
+QShaderDescription QShaderDescription::deserialize(QDataStream *stream)
+{
+ QShaderDescription desc;
+ QShaderDescriptionPrivate::get(&desc)->loadFromStream(stream);
return desc;
}
@@ -836,6 +880,15 @@ static void addDeco(QJsonObject *obj, const QShaderDescription::InOutVariable &v
(*obj)[imageFlagsKey] = int(v.imageFlags);
}
+static void serializeDecorations(QDataStream *stream, const QShaderDescription::InOutVariable &v)
+{
+ (*stream) << v.location;
+ (*stream) << v.binding;
+ (*stream) << v.descriptorSet;
+ (*stream) << int(v.imageFormat);
+ (*stream) << int(v.imageFlags);
+}
+
static QJsonObject inOutObject(const QShaderDescription::InOutVariable &v)
{
QJsonObject obj;
@@ -845,6 +898,13 @@ static QJsonObject inOutObject(const QShaderDescription::InOutVariable &v)
return obj;
}
+static void serializeInOutVar(QDataStream *stream, const QShaderDescription::InOutVariable &v)
+{
+ (*stream) << v.name;
+ (*stream) << int(v.type);
+ serializeDecorations(stream, v);
+}
+
static QJsonObject blockMemberObject(const QShaderDescription::BlockVariable &v)
{
QJsonObject obj;
@@ -873,6 +933,23 @@ static QJsonObject blockMemberObject(const QShaderDescription::BlockVariable &v)
return obj;
}
+static void serializeBlockMemberVar(QDataStream *stream, const QShaderDescription::BlockVariable &v)
+{
+ (*stream) << v.name;
+ (*stream) << int(v.type);
+ (*stream) << v.offset;
+ (*stream) << v.size;
+ (*stream) << v.arrayDims.count();
+ for (int dim : v.arrayDims)
+ (*stream) << dim;
+ (*stream) << v.arrayStride;
+ (*stream) << v.matrixStride;
+ (*stream) << v.matrixIsRowMajor;
+ (*stream) << v.structMembers.count();
+ for (const QShaderDescription::BlockVariable &sv : v.structMembers)
+ serializeBlockMemberVar(stream, sv);
+}
+
QJsonDocument QShaderDescriptionPrivate::makeDoc()
{
QJsonObject root;
@@ -971,6 +1048,67 @@ QJsonDocument QShaderDescriptionPrivate::makeDoc()
return QJsonDocument(root);
}
+void QShaderDescriptionPrivate::writeToStream(QDataStream *stream)
+{
+ (*stream) << inVars.count();
+ for (const QShaderDescription::InOutVariable &v : qAsConst(inVars))
+ serializeInOutVar(stream, v);
+
+ (*stream) << outVars.count();
+ for (const QShaderDescription::InOutVariable &v : qAsConst(outVars))
+ serializeInOutVar(stream, v);
+
+ (*stream) << uniformBlocks.count();
+ for (const QShaderDescription::UniformBlock &b : uniformBlocks) {
+ (*stream) << b.blockName;
+ (*stream) << b.structName;
+ (*stream) << b.size;
+ (*stream) << b.binding;
+ (*stream) << b.descriptorSet;
+ (*stream) << b.members.count();
+ for (const QShaderDescription::BlockVariable &v : b.members)
+ serializeBlockMemberVar(stream, v);
+ }
+
+ (*stream) << pushConstantBlocks.count();
+ for (const QShaderDescription::PushConstantBlock &b : pushConstantBlocks) {
+ (*stream) << b.name;
+ (*stream) << b.size;
+ (*stream) << b.members.count();
+ for (const QShaderDescription::BlockVariable &v : b.members)
+ serializeBlockMemberVar(stream, v);
+ }
+
+ (*stream) << storageBlocks.count();
+ for (const QShaderDescription::StorageBlock &b : storageBlocks) {
+ (*stream) << b.blockName;
+ (*stream) << b.instanceName;
+ (*stream) << b.knownSize;
+ (*stream) << b.binding;
+ (*stream) << b.descriptorSet;
+ (*stream) << b.members.count();
+ for (const QShaderDescription::BlockVariable &v : b.members)
+ serializeBlockMemberVar(stream, v);
+ }
+
+ (*stream) << combinedImageSamplers.count();
+ for (const QShaderDescription::InOutVariable &v : qAsConst(combinedImageSamplers)) {
+ (*stream) << v.name;
+ (*stream) << int(v.type);
+ serializeDecorations(stream, v);
+ }
+
+ (*stream) << storageImages.count();
+ for (const QShaderDescription::InOutVariable &v : qAsConst(storageImages)) {
+ (*stream) << v.name;
+ (*stream) << int(v.type);
+ serializeDecorations(stream, v);
+ }
+
+ for (size_t i = 0; i < 3; ++i)
+ (*stream) << localSize[i];
+}
+
static QShaderDescription::InOutVariable inOutVar(const QJsonObject &obj)
{
QShaderDescription::InOutVariable var;
@@ -989,6 +1127,29 @@ static QShaderDescription::InOutVariable inOutVar(const QJsonObject &obj)
return var;
}
+static void deserializeDecorations(QDataStream *stream, QShaderDescription::InOutVariable *v)
+{
+ (*stream) >> v->location;
+ (*stream) >> v->binding;
+ (*stream) >> v->descriptorSet;
+ int f;
+ (*stream) >> f;
+ v->imageFormat = QShaderDescription::ImageFormat(f);
+ (*stream) >> f;
+ v->imageFlags = QShaderDescription::ImageFlags(f);
+}
+
+static QShaderDescription::InOutVariable deserializeInOutVar(QDataStream *stream)
+{
+ QShaderDescription::InOutVariable var;
+ (*stream) >> var.name;
+ int t;
+ (*stream) >> t;
+ var.type = QShaderDescription::VariableType(t);
+ deserializeDecorations(stream, &var);
+ return var;
+}
+
static QShaderDescription::BlockVariable blockVar(const QJsonObject &obj)
{
QShaderDescription::BlockVariable var;
@@ -1015,6 +1176,30 @@ static QShaderDescription::BlockVariable blockVar(const QJsonObject &obj)
return var;
}
+static QShaderDescription::BlockVariable deserializeBlockMemberVar(QDataStream *stream)
+{
+ QShaderDescription::BlockVariable var;
+ (*stream) >> var.name;
+ int t;
+ (*stream) >> t;
+ var.type = QShaderDescription::VariableType(t);
+ (*stream) >> var.offset;
+ (*stream) >> var.size;
+ int count;
+ (*stream) >> count;
+ var.arrayDims.resize(count);
+ for (int i = 0; i < count; ++i)
+ (*stream) >> var.arrayDims[i];
+ (*stream) >> var.arrayStride;
+ (*stream) >> var.matrixStride;
+ (*stream) >> var.matrixIsRowMajor;
+ (*stream) >> count;
+ var.structMembers.resize(count);
+ for (int i = 0; i < count; ++i)
+ var.structMembers[i] = deserializeBlockMemberVar(stream);
+ return var;
+}
+
void QShaderDescriptionPrivate::loadDoc(const QJsonDocument &doc)
{
if (doc.isNull()) {
@@ -1119,4 +1304,187 @@ void QShaderDescriptionPrivate::loadDoc(const QJsonDocument &doc)
}
}
+void QShaderDescriptionPrivate::loadFromStream(QDataStream *stream)
+{
+ Q_ASSERT(ref.loadRelaxed() == 1); // must be detached
+
+ int count;
+ (*stream) >> count;
+ inVars.resize(count);
+ for (int i = 0; i < count; ++i)
+ inVars[i] = deserializeInOutVar(stream);
+
+ (*stream) >> count;
+ outVars.resize(count);
+ for (int i = 0; i < count; ++i)
+ outVars[i] = deserializeInOutVar(stream);
+
+ (*stream) >> count;
+ uniformBlocks.resize(count);
+ for (int i = 0; i < count; ++i) {
+ (*stream) >> uniformBlocks[i].blockName;
+ (*stream) >> uniformBlocks[i].structName;
+ (*stream) >> uniformBlocks[i].size;
+ (*stream) >> uniformBlocks[i].binding;
+ (*stream) >> uniformBlocks[i].descriptorSet;
+ int memberCount;
+ (*stream) >> memberCount;
+ uniformBlocks[i].members.resize(memberCount);
+ for (int memberIdx = 0; memberIdx < memberCount; ++memberIdx)
+ uniformBlocks[i].members[memberIdx] = deserializeBlockMemberVar(stream);
+ }
+
+ (*stream) >> count;
+ pushConstantBlocks.resize(count);
+ for (int i = 0; i < count; ++i) {
+ (*stream) >> pushConstantBlocks[i].name;
+ (*stream) >> pushConstantBlocks[i].size;
+ int memberCount;
+ (*stream) >> memberCount;
+ pushConstantBlocks[i].members.resize(memberCount);
+ for (int memberIdx = 0; memberIdx < memberCount; ++memberIdx)
+ pushConstantBlocks[i].members[memberIdx] = deserializeBlockMemberVar(stream);
+ }
+
+ (*stream) >> count;
+ storageBlocks.resize(count);
+ for (int i = 0; i < count; ++i) {
+ (*stream) >> storageBlocks[i].blockName;
+ (*stream) >> storageBlocks[i].instanceName;
+ (*stream) >> storageBlocks[i].knownSize;
+ (*stream) >> storageBlocks[i].binding;
+ (*stream) >> storageBlocks[i].descriptorSet;
+ int memberCount;
+ (*stream) >> memberCount;
+ storageBlocks[i].members.resize(memberCount);
+ for (int memberIdx = 0; memberIdx < memberCount; ++memberIdx)
+ storageBlocks[i].members[memberIdx] = deserializeBlockMemberVar(stream);
+ }
+
+ (*stream) >> count;
+ combinedImageSamplers.resize(count);
+ for (int i = 0; i < count; ++i) {
+ (*stream) >> combinedImageSamplers[i].name;
+ int t;
+ (*stream) >> t;
+ combinedImageSamplers[i].type = QShaderDescription::VariableType(t);
+ deserializeDecorations(stream, &combinedImageSamplers[i]);
+ }
+
+ (*stream) >> count;
+ storageImages.resize(count);
+ for (int i = 0; i < count; ++i) {
+ (*stream) >> storageImages[i].name;
+ int t;
+ (*stream) >> t;
+ storageImages[i].type = QShaderDescription::VariableType(t);
+ deserializeDecorations(stream, &storageImages[i]);
+ }
+
+ for (size_t i = 0; i < 3; ++i)
+ (*stream) >> localSize[i];
+}
+
+/*!
+ Returns \c true if the two QShaderDescription objects \a lhs and \a rhs are
+ equal.
+
+ \relates QShaderDescription
+ */
+bool operator==(const QShaderDescription &lhs, const QShaderDescription &rhs) Q_DECL_NOTHROW
+{
+ if (lhs.d == rhs.d)
+ return true;
+
+ return lhs.d->inVars == rhs.d->inVars
+ && lhs.d->outVars == rhs.d->outVars
+ && lhs.d->uniformBlocks == rhs.d->uniformBlocks
+ && lhs.d->pushConstantBlocks == rhs.d->pushConstantBlocks
+ && lhs.d->storageBlocks == rhs.d->storageBlocks
+ && lhs.d->combinedImageSamplers == rhs.d->combinedImageSamplers
+ && lhs.d->storageImages == rhs.d->storageImages
+ && lhs.d->localSize == rhs.d->localSize;
+}
+
+/*!
+ Returns \c true if the two InOutVariable objects \a lhs and \a rhs are
+ equal.
+
+ \relates QShaderDescription::InOutVariable
+ */
+bool operator==(const QShaderDescription::InOutVariable &lhs, const QShaderDescription::InOutVariable &rhs) Q_DECL_NOTHROW
+{
+ return lhs.name == rhs.name
+ && lhs.type == rhs.type
+ && lhs.location == rhs.location
+ && lhs.binding == rhs.binding
+ && lhs.descriptorSet == rhs.descriptorSet
+ && lhs.imageFormat == rhs.imageFormat
+ && lhs.imageFlags == rhs.imageFlags;
+}
+
+/*!
+ Returns \c true if the two BlockVariable objects \a lhs and \a rhs are
+ equal.
+
+ \relates QShaderDescription::BlockVariable
+ */
+bool operator==(const QShaderDescription::BlockVariable &lhs, const QShaderDescription::BlockVariable &rhs) Q_DECL_NOTHROW
+{
+ return lhs.name == rhs.name
+ && lhs.type == rhs.type
+ && lhs.offset == rhs.offset
+ && lhs.size == rhs.size
+ && lhs.arrayDims == rhs.arrayDims
+ && lhs.arrayStride == rhs.arrayStride
+ && lhs.matrixStride == rhs.matrixStride
+ && lhs.matrixIsRowMajor == rhs.matrixIsRowMajor
+ && lhs.structMembers == rhs.structMembers;
+}
+
+/*!
+ Returns \c true if the two UniformBlock objects \a lhs and \a rhs are
+ equal.
+
+ \relates QShaderDescription::UniformBlock
+ */
+bool operator==(const QShaderDescription::UniformBlock &lhs, const QShaderDescription::UniformBlock &rhs) Q_DECL_NOTHROW
+{
+ return lhs.blockName == rhs.blockName
+ && lhs.structName == rhs.structName
+ && lhs.size == rhs.size
+ && lhs.binding == rhs.binding
+ && lhs.descriptorSet == rhs.descriptorSet
+ && lhs.members == rhs.members;
+}
+
+/*!
+ Returns \c true if the two PushConstantBlock objects \a lhs and \a rhs are
+ equal.
+
+ \relates QShaderDescription::PushConstantBlock
+ */
+bool operator==(const QShaderDescription::PushConstantBlock &lhs, const QShaderDescription::PushConstantBlock &rhs) Q_DECL_NOTHROW
+{
+ return lhs.name == rhs.name
+ && lhs.size == rhs.size
+ && lhs.members == rhs.members;
+}
+
+/*!
+ Returns \c true if the two StorageBlock objects \a lhs and \a rhs are
+ equal.
+
+ \relates QShaderDescription::StorageBlock
+ */
+bool operator==(const QShaderDescription::StorageBlock &lhs, const QShaderDescription::StorageBlock &rhs) Q_DECL_NOTHROW
+{
+ return lhs.blockName == rhs.blockName
+ && lhs.instanceName == rhs.instanceName
+ && lhs.knownSize == rhs.knownSize
+ && lhs.binding == rhs.binding
+ && lhs.descriptorSet == rhs.descriptorSet
+ && lhs.members == rhs.members;
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/rhi/qshaderdescription_p.h b/src/gui/rhi/qshaderdescription_p.h
index 5a63b998cd..108fc32a56 100644
--- a/src/gui/rhi/qshaderdescription_p.h
+++ b/src/gui/rhi/qshaderdescription_p.h
@@ -56,6 +56,7 @@
QT_BEGIN_NAMESPACE
struct QShaderDescriptionPrivate;
+class QDataStream;
class Q_GUI_EXPORT QShaderDescription
{
@@ -68,10 +69,16 @@ public:
bool isValid() const;
- QByteArray toBinaryJson() const;
+ QByteArray toCbor() const;
+ void serialize(QDataStream *stream) const;
QByteArray toJson() const;
+#if QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use CBOR format instead")
static QShaderDescription fromBinaryJson(const QByteArray &data);
+#endif
+ static QShaderDescription fromCbor(const QByteArray &data);
+ static QShaderDescription deserialize(QDataStream *stream);
enum VariableType {
Unknown = 0,
@@ -263,6 +270,7 @@ private:
#ifndef QT_NO_DEBUG_STREAM
friend Q_GUI_EXPORT QDebug operator<<(QDebug, const QShaderDescription &);
#endif
+ friend Q_GUI_EXPORT bool operator==(const QShaderDescription &lhs, const QShaderDescription &rhs) Q_DECL_NOTHROW;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QShaderDescription::ImageFlags)
@@ -276,6 +284,43 @@ Q_GUI_EXPORT QDebug operator<<(QDebug, const QShaderDescription::PushConstantBlo
Q_GUI_EXPORT QDebug operator<<(QDebug, const QShaderDescription::StorageBlock &);
#endif
+Q_GUI_EXPORT bool operator==(const QShaderDescription &lhs, const QShaderDescription &rhs) Q_DECL_NOTHROW;
+Q_GUI_EXPORT bool operator==(const QShaderDescription::InOutVariable &lhs, const QShaderDescription::InOutVariable &rhs) Q_DECL_NOTHROW;
+Q_GUI_EXPORT bool operator==(const QShaderDescription::BlockVariable &lhs, const QShaderDescription::BlockVariable &rhs) Q_DECL_NOTHROW;
+Q_GUI_EXPORT bool operator==(const QShaderDescription::UniformBlock &lhs, const QShaderDescription::UniformBlock &rhs) Q_DECL_NOTHROW;
+Q_GUI_EXPORT bool operator==(const QShaderDescription::PushConstantBlock &lhs, const QShaderDescription::PushConstantBlock &rhs) Q_DECL_NOTHROW;
+Q_GUI_EXPORT bool operator==(const QShaderDescription::StorageBlock &lhs, const QShaderDescription::StorageBlock &rhs) Q_DECL_NOTHROW;
+
+inline bool operator!=(const QShaderDescription &lhs, const QShaderDescription &rhs) Q_DECL_NOTHROW
+{
+ return !(lhs == rhs);
+}
+
+inline bool operator!=(const QShaderDescription::InOutVariable &lhs, const QShaderDescription::InOutVariable &rhs) Q_DECL_NOTHROW
+{
+ return !(lhs == rhs);
+}
+
+inline bool operator!=(const QShaderDescription::BlockVariable &lhs, const QShaderDescription::BlockVariable &rhs) Q_DECL_NOTHROW
+{
+ return !(lhs == rhs);
+}
+
+inline bool operator!=(const QShaderDescription::UniformBlock &lhs, const QShaderDescription::UniformBlock &rhs) Q_DECL_NOTHROW
+{
+ return !(lhs == rhs);
+}
+
+inline bool operator!=(const QShaderDescription::PushConstantBlock &lhs, const QShaderDescription::PushConstantBlock &rhs) Q_DECL_NOTHROW
+{
+ return !(lhs == rhs);
+}
+
+inline bool operator!=(const QShaderDescription::StorageBlock &lhs, const QShaderDescription::StorageBlock &rhs) Q_DECL_NOTHROW
+{
+ return !(lhs == rhs);
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/gui/rhi/qshaderdescription_p_p.h b/src/gui/rhi/qshaderdescription_p_p.h
index 1caee24984..69b6e811a1 100644
--- a/src/gui/rhi/qshaderdescription_p_p.h
+++ b/src/gui/rhi/qshaderdescription_p_p.h
@@ -80,7 +80,9 @@ struct Q_GUI_EXPORT QShaderDescriptionPrivate
static const QShaderDescriptionPrivate *get(const QShaderDescription *desc) { return desc->d; }
QJsonDocument makeDoc();
+ void writeToStream(QDataStream *stream);
void loadDoc(const QJsonDocument &doc);
+ void loadFromStream(QDataStream *stream);
QAtomicInt ref;
QVector<QShaderDescription::InOutVariable> inVars;
diff --git a/src/gui/rhi/rhi.pri b/src/gui/rhi/rhi.pri
index 4297a5602b..ccd9592634 100644
--- a/src/gui/rhi/rhi.pri
+++ b/src/gui/rhi/rhi.pri
@@ -43,15 +43,15 @@ win32 {
LIBS += -ld3d11 -ldxgi -ldxguid
}
-# darwin {
-macos {
+macos|ios {
HEADERS += \
rhi/qrhimetal_p.h \
rhi/qrhimetal_p_p.h
SOURCES += \
rhi/qrhimetal.mm
- LIBS += -framework AppKit -framework Metal
+ macos: LIBS += -framework AppKit
+ LIBS += -framework Metal
}
include($$PWD/../../3rdparty/VulkanMemoryAllocator.pri)
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp
index 8b8f3e28ac..8528f59844 100644
--- a/src/gui/text/qabstracttextdocumentlayout.cpp
+++ b/src/gui/text/qabstracttextdocumentlayout.cpp
@@ -471,7 +471,7 @@ QTextObjectInterface *QAbstractTextDocumentLayout::handlerForObject(int objectTy
QTextObjectHandler handler = d->handlers.value(objectType);
if (!handler.component)
- return 0;
+ return nullptr;
return handler.iface;
}
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 627b3ec8c0..a12eb98528 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -123,6 +123,7 @@ static const QCssKnownValue properties[NumProperties - 1] = {
{ "font-variant", FontVariant },
{ "font-weight", FontWeight },
{ "height", Height },
+ { "icon", QtIcon },
{ "image", QtImage },
{ "image-position", QtImageAlignment },
{ "left", Left },
@@ -682,7 +683,7 @@ bool ValueExtractor::extractOutline(int *borders, QBrush *colors, BorderStyle *s
static Qt::Alignment parseAlignment(const QCss::Value *values, int count)
{
- Qt::Alignment a[2] = { 0, 0 };
+ Qt::Alignment a[2] = { { }, { } };
for (int i = 0; i < qMin(2, count); i++) {
if (values[i].type != Value::KnownIdentifier)
break;
@@ -706,7 +707,7 @@ static Qt::Alignment parseAlignment(const QCss::Value *values, int count)
static ColorData parseColorValue(QCss::Value v)
{
if (v.type == Value::Identifier || v.type == Value::String) {
- v.variant.convert(QVariant::Color);
+ v.variant.convert(QMetaType::QColor);
v.type = Value::Color;
}
@@ -1142,7 +1143,7 @@ static bool setFontSizeFromValue(QCss::Value value, QFont *font, int *fontSizeAd
} else if (s.endsWith(QLatin1String("px"), Qt::CaseInsensitive)) {
s.chop(2);
value.variant = s;
- if (value.variant.convert(QVariant::Int)) {
+ if (value.variant.convert(QMetaType::Int)) {
font->setPixelSize(value.variant.toInt());
valid = true;
}
@@ -1380,6 +1381,37 @@ bool ValueExtractor::extractImage(QIcon *icon, Qt::Alignment *a, QSize *size)
return hit;
}
+bool ValueExtractor::extractIcon(QIcon *icon, QSize *size)
+{
+ // Find last declaration that specifies an icon
+ const auto declaration = std::find_if(
+ declarations.rbegin(), declarations.rend(),
+ [](const Declaration &decl) { return decl.d->propertyId == QtIcon; });
+ if (declaration == declarations.rend())
+ return false;
+
+ *icon = declaration->iconValue();
+
+ // If the value contains a URI, try to get the size of the icon
+ if (declaration->d->values.isEmpty())
+ return true;
+
+ const auto &propertyValue = declaration->d->values.constFirst();
+ if (propertyValue.type != Value::Uri)
+ return true;
+
+ // First try to read just the size from the image without loading it
+ const QString url(propertyValue.variant.toString());
+ QImageReader imageReader(url);
+ *size = imageReader.size();
+ if (!size->isNull())
+ return true;
+
+ // Get the size by loading the image instead
+ *size = imageReader.read().size();
+ return true;
+}
+
///////////////////////////////////////////////////////////////////////////////
// Declaration
QColor Declaration::colorValue(const QPalette &pal) const
@@ -1388,9 +1420,9 @@ QColor Declaration::colorValue(const QPalette &pal) const
return QColor();
if (d->parsed.isValid()) {
- if (d->parsed.type() == QVariant::Color)
+ if (d->parsed.userType() == QMetaType::QColor)
return qvariant_cast<QColor>(d->parsed);
- if (d->parsed.type() == QVariant::Int)
+ if (d->parsed.userType() == QMetaType::Int)
return pal.color((QPalette::ColorRole)(d->parsed.toInt()));
}
@@ -1410,9 +1442,9 @@ QBrush Declaration::brushValue(const QPalette &pal) const
return QBrush();
if (d->parsed.isValid()) {
- if (d->parsed.type() == QVariant::Brush)
+ if (d->parsed.userType() == QMetaType::QBrush)
return qvariant_cast<QBrush>(d->parsed);
- if (d->parsed.type() == QVariant::Int)
+ if (d->parsed.userType() == QMetaType::Int)
return pal.color((QPalette::ColorRole)(d->parsed.toInt()));
}
@@ -1437,9 +1469,9 @@ void Declaration::brushValues(QBrush *c, const QPalette &pal) const
needParse = 0;
QList<QVariant> v = d->parsed.toList();
for (i = 0; i < qMin(v.count(), 4); i++) {
- if (v.at(i).type() == QVariant::Brush) {
+ if (v.at(i).userType() == QMetaType::QBrush) {
c[i] = qvariant_cast<QBrush>(v.at(i));
- } else if (v.at(i).type() == QVariant::Int) {
+ } else if (v.at(i).userType() == QMetaType::Int) {
c[i] = pal.color((QPalette::ColorRole)(v.at(i).toInt()));
} else {
needParse |= (1<<i);
@@ -1566,7 +1598,7 @@ void Declaration::colorValues(QColor *c, const QPalette &pal) const
if (d->parsed.isValid()) {
QList<QVariant> v = d->parsed.toList();
for (i = 0; i < qMin(d->values.count(), 4); i++) {
- if (v.at(i).type() == QVariant::Color) {
+ if (v.at(i).userType() == QMetaType::QColor) {
c[i] = qvariant_cast<QColor>(v.at(i));
} else {
c[i] = pal.color((QPalette::ColorRole)(v.at(i).toInt()));
@@ -2691,7 +2723,7 @@ bool Parser::parseTerm(Value *value)
switch (lookup()) {
case NUMBER:
value->type = Value::Number;
- value->variant.convert(QVariant::Double);
+ value->variant.convert(QMetaType::Double);
break;
case PERCENTAGE:
value->type = Value::Percentage;
diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h
index d91b095a76..ef5ae8c80b 100644
--- a/src/gui/text/qcssparser_p.h
+++ b/src/gui/text/qcssparser_p.h
@@ -198,6 +198,7 @@ enum Property {
QtLineHeightType,
FontKerning,
QtForegroundTextureCacheKey,
+ QtIcon,
NumProperties
};
@@ -855,6 +856,7 @@ struct Q_GUI_EXPORT ValueExtractor
bool extractPalette(QBrush *fg, QBrush *sfg, QBrush *sbg, QBrush *abg);
int extractStyleFeatures();
bool extractImage(QIcon *icon, Qt::Alignment *a, QSize *size);
+ bool extractIcon(QIcon *icon, QSize *size);
void lengthValues(const Declaration &decl, int *m);
diff --git a/src/gui/text/qdistancefield.cpp b/src/gui/text/qdistancefield.cpp
index d8a971c7b7..c843e3b706 100644
--- a/src/gui/text/qdistancefield.cpp
+++ b/src/gui/text/qdistancefield.cpp
@@ -850,7 +850,7 @@ QDistanceFieldData::QDistanceFieldData(const QDistanceFieldData &other)
if (nbytes && other.data)
data = (uchar *)memcpy(malloc(nbytes), other.data, nbytes);
else
- data = 0;
+ data = nullptr;
}
QDistanceFieldData::~QDistanceFieldData()
@@ -952,7 +952,7 @@ void QDistanceField::setGlyph(QFontEngine *fontEngine, glyph_t glyph, bool doubl
{
QFixedPoint position;
QPainterPath path;
- fontEngine->addGlyphsToPath(&glyph, &position, 1, &path, 0);
+ fontEngine->addGlyphsToPath(&glyph, &position, 1, &path, { });
path.translate(-path.boundingRect().topLeft());
path.setFillRule(Qt::WindingFill);
@@ -1046,7 +1046,7 @@ const uchar *QDistanceField::constBits() const
uchar *QDistanceField::scanLine(int i)
{
if (isNull())
- return 0;
+ return nullptr;
Q_ASSERT(i >= 0 && i < d->height);
return d->data + i * d->width;
@@ -1055,7 +1055,7 @@ uchar *QDistanceField::scanLine(int i)
const uchar *QDistanceField::scanLine(int i) const
{
if (isNull())
- return 0;
+ return nullptr;
Q_ASSERT(i >= 0 && i < d->height);
return d->data + i * d->width;
@@ -1064,7 +1064,7 @@ const uchar *QDistanceField::scanLine(int i) const
const uchar *QDistanceField::constScanLine(int i) const
{
if (isNull())
- return 0;
+ return nullptr;
Q_ASSERT(i >= 0 && i < d->height);
return d->data + i * d->width;
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index bf130fa0b7..8f0d7d9d38 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -180,14 +180,14 @@ Q_GUI_EXPORT int qt_defaultDpi()
}
QFontPrivate::QFontPrivate()
- : engineData(0), dpi(qt_defaultDpi()),
+ : engineData(nullptr), dpi(qt_defaultDpi()),
underline(false), overline(false), strikeOut(false), kerning(true),
- capital(0), letterSpacingIsAbsolute(false), scFont(0)
+ capital(0), letterSpacingIsAbsolute(false), scFont(nullptr)
{
}
QFontPrivate::QFontPrivate(const QFontPrivate &other)
- : request(other.request), engineData(0), dpi(other.dpi),
+ : request(other.request), engineData(nullptr), dpi(other.dpi),
underline(other.underline), overline(other.overline),
strikeOut(other.strikeOut), kerning(other.kerning),
capital(other.capital), letterSpacingIsAbsolute(other.letterSpacingIsAbsolute),
@@ -202,10 +202,10 @@ QFontPrivate::~QFontPrivate()
{
if (engineData && !engineData->ref.deref())
delete engineData;
- engineData = 0;
+ engineData = nullptr;
if (scFont && scFont != this)
scFont->ref.deref();
- scFont = 0;
+ scFont = nullptr;
}
extern QRecursiveMutex *qt_fontdatabase_mutex();
@@ -221,7 +221,7 @@ QFontEngine *QFontPrivate::engineForScript(int script) const
// throw out engineData that came from a different thread
if (!engineData->ref.deref())
delete engineData;
- engineData = 0;
+ engineData = nullptr;
}
if (!engineData || !QT_FONT_ENGINE_FROM_DATA(engineData, script))
QFontDatabase::load(this, script);
@@ -261,7 +261,7 @@ QFontPrivate *QFontPrivate::smallCapsFontPrivate() const
void QFontPrivate::resolve(uint mask, const QFontPrivate *other)
{
- Q_ASSERT(other != 0);
+ Q_ASSERT(other != nullptr);
dpi = other->dpi;
@@ -346,7 +346,7 @@ QFontEngineData::~QFontEngineData()
if (engines[i]) {
if (!engines[i]->ref.deref())
delete engines[i];
- engines[i] = 0;
+ engines[i] = nullptr;
}
}
}
@@ -610,10 +610,10 @@ void QFont::detach()
if (d->ref.loadRelaxed() == 1) {
if (d->engineData && !d->engineData->ref.deref())
delete d->engineData;
- d->engineData = 0;
+ d->engineData = nullptr;
if (d->scFont && d->scFont != d.data())
d->scFont->ref.deref();
- d->scFont = 0;
+ d->scFont = nullptr;
return;
}
@@ -1353,8 +1353,8 @@ QFont::StyleHint QFont::styleHint() const
\value NoAntialias don't antialias the fonts.
\value NoSubpixelAntialias avoid subpixel antialiasing on the fonts if possible.
\value PreferAntialias antialias if possible.
- \value OpenGLCompatible forces the use of OpenGL compatible
- fonts.
+ \value OpenGLCompatible This style strategy has been deprecated. All fonts are
+ OpenGL-compatible by default.
\value NoFontMerging If the font selected for a certain writing system
does not contain a character requested to draw, then Qt automatically chooses a similar
looking font that contains the character. The NoFontMerging flag disables this feature.
@@ -1373,8 +1373,8 @@ QFont::StyleHint QFont::styleHint() const
\value PreferQuality prefer the best quality font. The font matcher
will use the nearest standard point size that the font
supports.
- \value ForceIntegerMetrics forces the use of integer values in font engines that support fractional
- font metrics.
+ \value ForceIntegerMetrics This style strategy has been deprecated. Use \l QFontMetrics to
+ retrieve rounded font metrics.
*/
/*!
@@ -1666,7 +1666,7 @@ void QFont::setRawMode(bool)
bool QFont::exactMatch() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return d->request.exactMatch(engine->fontDef);
}
@@ -1753,7 +1753,7 @@ bool QFont::operator!=(const QFont &f) const
*/
QFont::operator QVariant() const
{
- return QVariant(QVariant::Font, this);
+ return QVariant(QMetaType::QFont, this);
}
/*!
@@ -1834,7 +1834,7 @@ Q_GLOBAL_STATIC(QFontSubst, globalFontSubst)
QString QFont::substitute(const QString &familyName)
{
QFontSubst *fontSubst = globalFontSubst();
- Q_ASSERT(fontSubst != 0);
+ Q_ASSERT(fontSubst != nullptr);
QFontSubst::ConstIterator it = fontSubst->constFind(familyName.toLower());
if (it != fontSubst->constEnd() && !(*it).isEmpty())
return (*it).first();
@@ -1855,7 +1855,7 @@ QString QFont::substitute(const QString &familyName)
QStringList QFont::substitutes(const QString &familyName)
{
QFontSubst *fontSubst = globalFontSubst();
- Q_ASSERT(fontSubst != 0);
+ Q_ASSERT(fontSubst != nullptr);
return fontSubst->value(familyName.toLower(), QStringList());
}
@@ -1870,7 +1870,7 @@ void QFont::insertSubstitution(const QString &familyName,
const QString &substituteName)
{
QFontSubst *fontSubst = globalFontSubst();
- Q_ASSERT(fontSubst != 0);
+ Q_ASSERT(fontSubst != nullptr);
QStringList &list = (*fontSubst)[familyName.toLower()];
QString s = substituteName.toLower();
if (!list.contains(s))
@@ -1888,7 +1888,7 @@ void QFont::insertSubstitutions(const QString &familyName,
const QStringList &substituteNames)
{
QFontSubst *fontSubst = globalFontSubst();
- Q_ASSERT(fontSubst != 0);
+ Q_ASSERT(fontSubst != nullptr);
QStringList &list = (*fontSubst)[familyName.toLower()];
for (const QString &substituteName : substituteNames) {
const QString lowerSubstituteName = substituteName.toLower();
@@ -1906,7 +1906,7 @@ void QFont::insertSubstitutions(const QString &familyName,
void QFont::removeSubstitutions(const QString &familyName)
{
QFontSubst *fontSubst = globalFontSubst();
- Q_ASSERT(fontSubst != 0);
+ Q_ASSERT(fontSubst != nullptr);
fontSubst->remove(familyName.toLower());
}
@@ -1926,7 +1926,7 @@ void QFont::removeSubstitutions(const QString &familyName)
QStringList QFont::substitutions()
{
QFontSubst *fontSubst = globalFontSubst();
- Q_ASSERT(fontSubst != 0);
+ Q_ASSERT(fontSubst != nullptr);
QStringList ret = fontSubst->keys();
ret.sort();
@@ -1940,7 +1940,7 @@ QStringList QFont::substitutions()
*/
static quint8 get_font_bits(int version, const QFontPrivate *f)
{
- Q_ASSERT(f != 0);
+ Q_ASSERT(f != nullptr);
quint8 bits = 0;
if (f->request.style)
bits |= 0x01;
@@ -1965,7 +1965,7 @@ static quint8 get_font_bits(int version, const QFontPrivate *f)
static quint8 get_extended_font_bits(const QFontPrivate *f)
{
- Q_ASSERT(f != 0);
+ Q_ASSERT(f != nullptr);
quint8 bits = 0;
if (f->request.ignorePitch)
bits |= 0x01;
@@ -1980,7 +1980,7 @@ static quint8 get_extended_font_bits(const QFontPrivate *f)
*/
static void set_font_bits(int version, quint8 bits, QFontPrivate *f)
{
- Q_ASSERT(f != 0);
+ Q_ASSERT(f != nullptr);
f->request.style = (bits & 0x01) != 0 ? QFont::StyleItalic : QFont::StyleNormal;
f->underline = (bits & 0x02) != 0;
f->overline = (bits & 0x40) != 0;
@@ -1995,7 +1995,7 @@ static void set_font_bits(int version, quint8 bits, QFontPrivate *f)
static void set_extended_font_bits(quint8 bits, QFontPrivate *f)
{
- Q_ASSERT(f != 0);
+ Q_ASSERT(f != nullptr);
f->request.ignorePitch = (bits & 0x01) != 0;
f->letterSpacingIsAbsolute = (bits & 0x02) != 0;
}
@@ -2549,7 +2549,7 @@ QFontInfo &QFontInfo::operator=(const QFontInfo &fi)
QString QFontInfo::family() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->fontDef.family;
}
@@ -2564,7 +2564,7 @@ QString QFontInfo::family() const
QString QFontInfo::styleName() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->fontDef.styleName;
}
@@ -2576,7 +2576,7 @@ QString QFontInfo::styleName() const
int QFontInfo::pointSize() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->fontDef.pointSize);
}
@@ -2588,7 +2588,7 @@ int QFontInfo::pointSize() const
qreal QFontInfo::pointSizeF() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->fontDef.pointSize;
}
@@ -2600,7 +2600,7 @@ qreal QFontInfo::pointSizeF() const
int QFontInfo::pixelSize() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->fontDef.pixelSize;
}
@@ -2612,7 +2612,7 @@ int QFontInfo::pixelSize() const
bool QFontInfo::italic() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->fontDef.style != QFont::StyleNormal;
}
@@ -2624,7 +2624,7 @@ bool QFontInfo::italic() const
QFont::Style QFontInfo::style() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return (QFont::Style)engine->fontDef.style;
}
@@ -2636,7 +2636,7 @@ QFont::Style QFontInfo::style() const
int QFontInfo::weight() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->fontDef.weight;
}
@@ -2701,13 +2701,13 @@ bool QFontInfo::strikeOut() const
bool QFontInfo::fixedPitch() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
#ifdef Q_OS_MAC
if (!engine->fontDef.fixedPitchComputed) {
QChar ch[2] = { QLatin1Char('i'), QLatin1Char('m') };
QGlyphLayoutArray<2> g;
int l = 2;
- if (!engine->stringToCMap(ch, 2, &g, &l, 0))
+ if (!engine->stringToCMap(ch, 2, &g, &l, {}))
Q_UNREACHABLE();
Q_ASSERT(l == 2);
engine->fontDef.fixedPitch = g.advances[0] == g.advances[1];
@@ -2727,7 +2727,7 @@ bool QFontInfo::fixedPitch() const
QFont::StyleHint QFontInfo::styleHint() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return (QFont::StyleHint) engine->fontDef.styleHint;
}
@@ -2759,7 +2759,7 @@ bool QFontInfo::rawMode() const
bool QFontInfo::exactMatch() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return d->request.exactMatch(engine->fontDef);
}
@@ -2793,7 +2793,7 @@ QFontCache *QFontCache::instance()
void QFontCache::cleanup()
{
- QThreadStorage<QFontCache *> *cache = 0;
+ QThreadStorage<QFontCache *> *cache = nullptr;
QT_TRY {
cache = theFontCache();
} QT_CATCH (const std::bad_alloc &) {
@@ -2830,7 +2830,7 @@ void QFontCache::clear()
Q_ASSERT(engineCacheCount.value(data->engines[i]) == 0);
delete data->engines[i];
}
- data->engines[i] = 0;
+ data->engines[i] = nullptr;
}
}
if (!data->ref.deref()) {
@@ -2863,7 +2863,7 @@ void QFontCache::clear()
FC_DEBUG("QFontCache::clear: engine %p still has refcount %d",
engine, engine->ref.loadRelaxed());
}
- it.value().data = 0;
+ it.value().data = nullptr;
}
}
} while (mightHaveEnginesLeftForCleanup);
@@ -2881,7 +2881,7 @@ QFontEngineData *QFontCache::findEngineData(const QFontDef &def) const
{
EngineDataCache::ConstIterator it = engineDataCache.constFind(def);
if (it == engineDataCache.constEnd())
- return 0;
+ return nullptr;
// found
return it.value();
@@ -2912,7 +2912,7 @@ QFontEngine *QFontCache::findEngine(const Key &key)
{
EngineCache::Iterator it = engineCache.find(key),
end = engineCache.end();
- if (it == end) return 0;
+ if (it == end) return nullptr;
Q_ASSERT(it.value().data != nullptr);
Q_ASSERT(key.multi == (it.value().data->type() == QFontEngine::Multi));
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index 683aa3bf65..e5734679ed 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -80,8 +80,10 @@ public:
PreferQuality = 0x0040,
PreferAntialias = 0x0080,
NoAntialias = 0x0100,
- OpenGLCompatible = 0x0200,
- ForceIntegerMetrics = 0x0400,
+#if QT_DEPRECATED_SINCE(5, 15)
+ OpenGLCompatible Q_DECL_ENUMERATOR_DEPRECATED = 0x0200,
+ ForceIntegerMetrics Q_DECL_ENUMERATOR_DEPRECATED = 0x0400,
+#endif
NoSubpixelAntialias = 0x0800,
PreferNoShaping = 0x1000,
NoFontMerging = 0x8000
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 67702ab5b5..f2fd585835 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -210,7 +210,7 @@ struct QtFontStyle
QtFontStyle(const Key &k)
: key(k), bitmapScalable(false), smoothScalable(false),
- count(0), pixelSizes(0)
+ count(0), pixelSizes(nullptr)
{
}
@@ -265,7 +265,7 @@ QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add)
return pixelSizes + i;
}
if (!add)
- return 0;
+ return nullptr;
if (!pixelSizes) {
// Most style have only one font size, we avoid waisting memory
@@ -280,13 +280,13 @@ QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add)
pixelSizes = newPixelSizes;
}
pixelSizes[count].pixelSize = size;
- pixelSizes[count].handle = 0;
+ pixelSizes[count].handle = nullptr;
return pixelSizes + (count++);
}
struct QtFontFoundry
{
- QtFontFoundry(const QString &n) : name(n), count(0), styles(0) {}
+ QtFontFoundry(const QString &n) : name(n), count(0), styles(nullptr) {}
~QtFontFoundry() {
while (count--)
delete styles[count];
@@ -314,7 +314,7 @@ QtFontStyle *QtFontFoundry::style(const QtFontStyle::Key &key, const QString &st
}
}
if (!create)
- return 0;
+ return nullptr;
// qDebug("adding key (weight=%d, style=%d, oblique=%d stretch=%d) at %d", key.weight, key.style, key.oblique, key.stretch, pos);
if (!(count % 8)) {
@@ -345,7 +345,7 @@ struct QtFontFamily
:
populated(false),
fixedPitch(false),
- name(n), count(0), foundries(0)
+ name(n), count(0), foundries(nullptr)
{
memset(writingSystems, 0, sizeof(writingSystems));
}
@@ -381,7 +381,7 @@ QtFontFoundry *QtFontFamily::foundry(const QString &f, bool create)
return foundries[i];
}
if (!create)
- return 0;
+ return nullptr;
if (!(count % 8)) {
QtFontFoundry **newFoundries = (QtFontFoundry **)
@@ -450,7 +450,7 @@ class QFontDatabasePrivate
{
public:
QFontDatabasePrivate()
- : count(0), families(0),
+ : count(0), families(nullptr),
fallbacksCache(64)
{ }
@@ -469,7 +469,7 @@ public:
while (count--)
delete families[count];
::free(families);
- families = 0;
+ families = nullptr;
count = 0;
// don't clear the memory fonts!
}
@@ -505,7 +505,7 @@ void QFontDatabasePrivate::invalidate()
QtFontFamily *QFontDatabasePrivate::family(const QString &f, FamilyRequestFlags flags)
{
- QtFontFamily *fam = 0;
+ QtFontFamily *fam = nullptr;
int low = 0;
int high = count;
@@ -645,7 +645,7 @@ static void parseFontName(const QString &name, QString &foundry, QString &family
struct QtFontDesc
{
- inline QtFontDesc() : family(0), foundry(0), style(0), size(0) {}
+ inline QtFontDesc() : family(nullptr), foundry(nullptr), style(nullptr), size(nullptr) {}
QtFontFamily *family;
QtFontFoundry *foundry;
QtFontStyle *style;
@@ -949,7 +949,7 @@ QFontEngine *loadSingleEngine(int script,
if (Q_UNLIKELY(!engine->supportsScript(QChar::Script(script)))) {
qWarning(" OpenType support missing for \"%s\", script %d",
qPrintable(def.family), script);
- return 0;
+ return nullptr;
}
engine->isSmoothlyScalable = style->smoothScalable;
@@ -976,7 +976,7 @@ QFontEngine *loadSingleEngine(int script,
+ qPrintable(def.family), script);
if (engine->ref.loadRelaxed() == 0)
delete engine;
- return 0;
+ return nullptr;
}
engine->isSmoothlyScalable = style->smoothScalable;
@@ -1081,9 +1081,9 @@ unsigned int bestFoundry(int script, unsigned int score, int styleStrategy,
Q_UNUSED(script);
Q_UNUSED(pitch);
- desc->foundry = 0;
- desc->style = 0;
- desc->size = 0;
+ desc->foundry = nullptr;
+ desc->style = nullptr;
+ desc->size = nullptr;
qCDebug(lcFontMatch, " REMARK: looking for best foundry for family '%s' [%d]", family->name.toLatin1().constData(), family->count);
@@ -1104,7 +1104,7 @@ unsigned int bestFoundry(int script, unsigned int score, int styleStrategy,
}
int px = -1;
- QtFontSize *size = 0;
+ QtFontSize *size = nullptr;
// 1. see if we have an exact matching size
if (!(styleStrategy & QFont::ForceOutline)) {
@@ -1244,10 +1244,10 @@ static int match(int script, const QFontDef &request,
foundry_name.isEmpty() ? "-- any --" : foundry_name.toLatin1().constData(),
script, request.weight, request.style, request.stretch, request.pixelSize, pitch);
- desc->family = 0;
- desc->foundry = 0;
- desc->style = 0;
- desc->size = 0;
+ desc->family = nullptr;
+ desc->foundry = nullptr;
+ desc->style = nullptr;
+ desc->size = nullptr;
unsigned int score = ~0u;
@@ -1280,7 +1280,7 @@ static int match(int script, const QFontDef &request,
bestFoundry(script, score, request.styleStrategy,
test.family, foundry_name, styleKey, request.pixelSize, pitch,
&test, request.styleName);
- if (test.foundry == 0 && !foundry_name.isEmpty()) {
+ if (test.foundry == nullptr && !foundry_name.isEmpty()) {
// the specific foundry was not found, so look for
// any foundry matching our requirements
newscore = bestFoundry(script, score, request.styleStrategy, test.family,
@@ -2068,7 +2068,7 @@ bool QFontDatabase::isPrivateFamily(const QString &family) const
*/
QString QFontDatabase::writingSystemName(WritingSystem writingSystem)
{
- const char *name = 0;
+ const char *name = nullptr;
switch (writingSystem) {
case Any:
name = QT_TRANSLATE_NOOP("QFontDatabase", "Any");
@@ -2548,7 +2548,7 @@ QStringList QFontDatabase::applicationFontFamilies(int id)
QFont QFontDatabase::systemFont(QFontDatabase::SystemFont type)
{
- const QFont *font = 0;
+ const QFont *font = nullptr;
if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) {
switch (type) {
case GeneralFont:
@@ -2825,7 +2825,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
if (fe->type() == QFontEngine::Box && !req.families.at(0).isEmpty()) {
if (fe->ref.loadRelaxed() == 0)
delete fe;
- fe = 0;
+ fe = nullptr;
} else {
if (d->dpi > 0)
fe->fontDef.pointSize = qreal(double((fe->fontDef.pixelSize * 72) / d->dpi));
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 403a0510fa..3ca9e9bbde 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -141,7 +141,7 @@ static void hb_getAdvances(HB_Font font, const HB_Glyph *glyphs, hb_uint32 numGl
qglyphs.glyphs = const_cast<glyph_t *>(glyphs);
qglyphs.advances = reinterpret_cast<QFixed *>(advances);
- fe->recalcAdvances(&qglyphs, (flags & HB_ShaperFlag_UseDesignMetrics) ? QFontEngine::DesignMetrics : QFontEngine::ShaperFlags(0));
+ fe->recalcAdvances(&qglyphs, (flags & HB_ShaperFlag_UseDesignMetrics) ? QFontEngine::DesignMetrics : QFontEngine::ShaperFlags{});
}
static HB_Bool hb_canRender(HB_Font font, const HB_UChar16 *string, hb_uint32 length)
@@ -221,7 +221,7 @@ static bool qt_get_font_table_default(void *user_data, uint tag, uchar *buffer,
#ifdef QT_BUILD_INTERNAL
// for testing purpose only, not thread-safe!
-static QList<QFontEngine *> *enginesCollector = 0;
+static QList<QFontEngine *> *enginesCollector = nullptr;
Q_AUTOTEST_EXPORT void QFontEngine_startCollectingEngines()
{
@@ -234,7 +234,7 @@ Q_AUTOTEST_EXPORT QList<QFontEngine *> QFontEngine_stopCollectingEngines()
Q_ASSERT(enginesCollector);
QList<QFontEngine *> ret = *enginesCollector;
delete enginesCollector;
- enginesCollector = 0;
+ enginesCollector = nullptr;
return ret;
}
#endif // QT_BUILD_INTERNAL
@@ -506,7 +506,7 @@ void QFontEngine::getGlyphPositions(const QGlyphLayout &glyphs, const QTransform
g.numGlyphs = 1;
g.glyphs = &kashidaGlyph;
g.advances = &kashidaWidth;
- recalcAdvances(&g, 0);
+ recalcAdvances(&g, { });
for (uint k = 0; k < glyphs.justifications[i].nKashidas; ++k) {
xpos -= kashidaWidth;
@@ -569,9 +569,9 @@ void QFontEngine::getGlyphPositions(const QGlyphLayout &glyphs, const QTransform
void QFontEngine::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing)
{
glyph_metrics_t gi = boundingBox(glyph);
- if (leftBearing != 0)
+ if (leftBearing != nullptr)
*leftBearing = gi.leftBearing().toReal();
- if (rightBearing != 0)
+ if (rightBearing != nullptr)
*rightBearing = gi.rightBearing().toReal();
}
@@ -948,7 +948,7 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph)
im.fill(Qt::transparent);
QPainter p(&im);
p.setRenderHint(QPainter::Antialiasing);
- addGlyphsToPath(&glyph, &pt, 1, &path, 0);
+ addGlyphsToPath(&glyph, &pt, 1, &path, { });
p.setPen(Qt::NoPen);
p.setBrush(Qt::black);
p.drawPath(path);
@@ -1022,7 +1022,7 @@ QByteArray QFontEngine::getSfntTable(uint tag) const
{
QByteArray table;
uint len = 0;
- if (!getSfntTableData(tag, 0, &len))
+ if (!getSfntTableData(tag, nullptr, &len))
return table;
table.resize(len);
if (!getSfntTableData(tag, reinterpret_cast<uchar *>(table.data()), &len))
@@ -1231,11 +1231,11 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy
// version check
quint16 version;
if (!qSafeFromBigEndian(header, endPtr, &version) || version != 0)
- return 0;
+ return nullptr;
quint16 numTables;
if (!qSafeFromBigEndian(header + 2, endPtr, &numTables))
- return 0;
+ return nullptr;
const uchar *maps = table + 4;
@@ -1255,11 +1255,11 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy
for (int n = 0; n < numTables; ++n) {
quint16 platformId;
if (!qSafeFromBigEndian(maps + 8 * n, endPtr, &platformId))
- return 0;
+ return nullptr;
quint16 platformSpecificId = 0;
if (!qSafeFromBigEndian(maps + 8 * n + 2, endPtr, &platformSpecificId))
- return 0;
+ return nullptr;
switch (platformId) {
case 0: // Unicode
@@ -1309,38 +1309,38 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy
}
}
if(tableToUse < 0)
- return 0;
+ return nullptr;
resolveTable:
*isSymbolFont = (symbolTable > -1);
quint32 unicode_table = 0;
if (!qSafeFromBigEndian(maps + 8 * tableToUse + 4, endPtr, &unicode_table))
- return 0;
+ return nullptr;
if (!unicode_table)
- return 0;
+ return nullptr;
// get the header of the unicode table
header = table + unicode_table;
quint16 format;
if (!qSafeFromBigEndian(header, endPtr, &format))
- return 0;
+ return nullptr;
quint32 length;
if (format < 8) {
quint16 tmp;
if (!qSafeFromBigEndian(header + 2, endPtr, &tmp))
- return 0;
+ return nullptr;
length = tmp;
} else {
if (!qSafeFromBigEndian(header + 4, endPtr, &length))
- return 0;
+ return nullptr;
}
if (table + unicode_table + length > endPtr)
- return 0;
+ return nullptr;
*cmapSize = length;
// To support symbol fonts that contain a unicode table for the symbol area
@@ -1844,7 +1844,7 @@ QFontEngine *QFontEngineMulti::loadEngine(int at)
return engine;
}
- return 0;
+ return nullptr;
}
glyph_t QFontEngineMulti::glyphIndex(uint ucs4) const
@@ -1865,7 +1865,7 @@ glyph_t QFontEngineMulti::glyphIndex(uint ucs4) const
const_cast<QFontEngineMulti *>(this)->ensureEngineAt(x);
engine = m_engines.at(x);
}
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (engine->type() == Box)
continue;
@@ -1934,7 +1934,7 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
if (!engine)
continue;
}
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (engine->type() == Box)
continue;
@@ -2308,7 +2308,7 @@ QImage QFontEngineMulti::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPosit
*/
QFontEngine *QFontEngineMulti::createMultiFontEngine(QFontEngine *fe, int script)
{
- QFontEngine *engine = 0;
+ QFontEngine *engine = nullptr;
QFontCache::Key key(fe->fontDef, script, /*multi = */true);
QFontCache *fc = QFontCache::instance();
// We can't rely on the fontDef (and hence the cache Key)
diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp
index 409176d41b..e00f9d058c 100644
--- a/src/gui/text/qfontengine_qpf2.cpp
+++ b/src/gui/text/qfontengine_qpf2.cpp
@@ -151,17 +151,17 @@ static inline const uchar *verifyTag(const uchar *tagPtr, const uchar *endPtr)
const QFontEngineQPF2::Glyph *QFontEngineQPF2::findGlyph(glyph_t g) const
{
if (!g || g >= glyphMapEntries)
- return 0;
+ return nullptr;
const quint32 *gmapPtr = reinterpret_cast<const quint32 *>(fontData + glyphMapOffset);
quint32 glyphPos = qFromBigEndian<quint32>(gmapPtr[g]);
if (glyphPos > glyphDataSize) {
if (glyphPos == 0xffffffff)
- return 0;
+ return nullptr;
#if defined(DEBUG_FONTENGINE)
qDebug() << "glyph" << g << "outside of glyphData, remapping font file";
#endif
if (glyphPos > glyphDataSize)
- return 0;
+ return nullptr;
}
return reinterpret_cast<const Glyph *>(fontData + glyphDataOffset + glyphPos);
}
@@ -230,7 +230,7 @@ QFontEngineQPF2::QFontEngineQPF2(const QFontDef &def, const QByteArray &data)
{
fontDef = def;
cache_cost = 100;
- cmap = 0;
+ cmap = nullptr;
cmapOffset = 0;
cmapSize = 0;
glyphMapOffset = 0;
@@ -456,7 +456,7 @@ glyph_metrics_t QFontEngineQPF2::boundingBox(glyph_t glyph)
QFixed QFontEngineQPF2::ascent() const
{
- return QFixed::fromReal(extractHeaderField(fontData, Tag_Ascent).value<qreal>());
+ return QFixed::fromReal(qvariant_cast<qreal>(extractHeaderField(fontData, Tag_Ascent)));
}
QFixed QFontEngineQPF2::capHeight() const
@@ -466,37 +466,37 @@ QFixed QFontEngineQPF2::capHeight() const
QFixed QFontEngineQPF2::descent() const
{
- return QFixed::fromReal(extractHeaderField(fontData, Tag_Descent).value<qreal>());
+ return QFixed::fromReal(qvariant_cast<qreal>(extractHeaderField(fontData, Tag_Descent)));
}
QFixed QFontEngineQPF2::leading() const
{
- return QFixed::fromReal(extractHeaderField(fontData, Tag_Leading).value<qreal>());
+ return QFixed::fromReal(qvariant_cast<qreal>(extractHeaderField(fontData, Tag_Leading)));
}
qreal QFontEngineQPF2::maxCharWidth() const
{
- return extractHeaderField(fontData, Tag_MaxCharWidth).value<qreal>();
+ return qvariant_cast<qreal>(extractHeaderField(fontData, Tag_MaxCharWidth));
}
qreal QFontEngineQPF2::minLeftBearing() const
{
- return extractHeaderField(fontData, Tag_MinLeftBearing).value<qreal>();
+ return qvariant_cast<qreal>(extractHeaderField(fontData, Tag_MinLeftBearing));
}
qreal QFontEngineQPF2::minRightBearing() const
{
- return extractHeaderField(fontData, Tag_MinRightBearing).value<qreal>();
+ return qvariant_cast<qreal>(extractHeaderField(fontData, Tag_MinRightBearing));
}
QFixed QFontEngineQPF2::underlinePosition() const
{
- return QFixed::fromReal(extractHeaderField(fontData, Tag_UnderlinePosition).value<qreal>());
+ return QFixed::fromReal(qvariant_cast<qreal>(extractHeaderField(fontData, Tag_UnderlinePosition)));
}
QFixed QFontEngineQPF2::lineThickness() const
{
- return QFixed::fromReal(extractHeaderField(fontData, Tag_LineThickness).value<qreal>());
+ return QFixed::fromReal(qvariant_cast<qreal>(extractHeaderField(fontData, Tag_LineThickness)));
}
bool QFontEngineQPF2::isValid() const
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index b7a3066f3a..73fcc4bc78 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -161,7 +161,7 @@ QFontMetrics::QFontMetrics(const QFont &font)
Constructs a font metrics object for \a font and \a paintdevice.
The font metrics will be compatible with the paintdevice passed.
- If the \a paintdevice is 0, the metrics will be screen-compatible,
+ If the \a paintdevice is \nullptr, the metrics will be screen-compatible,
ie. the metrics you get if you use the font for drawing text on a
\l{QWidget}{widgets} or \l{QPixmap}{pixmaps},
not on a QPicture or QPrinter.
@@ -282,7 +282,7 @@ bool QFontMetrics::operator ==(const QFontMetrics &other) const
int QFontMetrics::ascent() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->ascent());
}
@@ -301,7 +301,7 @@ int QFontMetrics::ascent() const
int QFontMetrics::capHeight() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->capHeight());
}
@@ -318,7 +318,7 @@ int QFontMetrics::capHeight() const
int QFontMetrics::descent() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->descent());
}
@@ -332,7 +332,7 @@ int QFontMetrics::descent() const
int QFontMetrics::height() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->ascent()) + qRound(engine->descent());
}
@@ -346,7 +346,7 @@ int QFontMetrics::height() const
int QFontMetrics::leading() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->leading());
}
@@ -360,7 +360,7 @@ int QFontMetrics::leading() const
int QFontMetrics::lineSpacing() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->leading()) + qRound(engine->ascent()) + qRound(engine->descent());
}
@@ -377,7 +377,7 @@ int QFontMetrics::lineSpacing() const
int QFontMetrics::minLeftBearing() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->minLeftBearing());
}
@@ -394,7 +394,7 @@ int QFontMetrics::minLeftBearing() const
int QFontMetrics::minRightBearing() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->minRightBearing());
}
@@ -404,7 +404,7 @@ int QFontMetrics::minRightBearing() const
int QFontMetrics::maxWidth() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->maxCharWidth());
}
@@ -415,7 +415,7 @@ int QFontMetrics::maxWidth() const
int QFontMetrics::xHeight() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (d->capital == QFont::SmallCaps)
return qRound(d->smallCapsFontPrivate()->engineForScript(QChar::Script_Common)->ascent());
return qRound(engine->xHeight());
@@ -429,7 +429,7 @@ int QFontMetrics::xHeight() const
int QFontMetrics::averageCharWidth() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->averageCharWidth());
}
@@ -450,7 +450,7 @@ bool QFontMetrics::inFontUcs4(uint ucs4) const
{
const int script = QChar::script(ucs4);
QFontEngine *engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (engine->type() == QFontEngine::Box)
return false;
return engine->canRender(ucs4);
@@ -476,7 +476,7 @@ int QFontMetrics::leftBearing(QChar ch) const
engine = d->smallCapsFontPrivate()->engineForScript(script);
else
engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (engine->type() == QFontEngine::Box)
return 0;
@@ -509,7 +509,7 @@ int QFontMetrics::rightBearing(QChar ch) const
engine = d->smallCapsFontPrivate()->engineForScript(script);
else
engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (engine->type() == QFontEngine::Box)
return 0;
@@ -518,7 +518,7 @@ int QFontMetrics::rightBearing(QChar ch) const
glyph_t glyph = engine->glyphIndex(ch.unicode());
qreal rb;
- engine->getGlyphBearings(glyph, 0, &rb);
+ engine->getGlyphBearings(glyph, nullptr, &rb);
return qRound(rb);
}
@@ -562,7 +562,7 @@ int QFontMetrics::width(const QString &text, int len, int flags) const
int numGlyphs = len;
QVarLengthGlyphLayoutArray glyphs(numGlyphs);
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- if (!engine->stringToCMap(text.data(), len, &glyphs, &numGlyphs, 0))
+ if (!engine->stringToCMap(text.data(), len, &glyphs, &numGlyphs, { }))
Q_UNREACHABLE();
QFixed width;
@@ -673,7 +673,7 @@ int QFontMetrics::horizontalAdvance(QChar ch) const
engine = d->smallCapsFontPrivate()->engineForScript(script);
else
engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
d->alterCharForCapitalization(ch);
@@ -684,7 +684,7 @@ int QFontMetrics::horizontalAdvance(QChar ch) const
glyphs.numGlyphs = 1;
glyphs.glyphs = &glyph;
glyphs.advances = &advance;
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
return qRound(advance);
}
@@ -725,7 +725,7 @@ int QFontMetrics::charWidth(const QString &text, int pos) const
engine = d->smallCapsFontPrivate()->engineForScript(script);
else
engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
d->alterCharForCapitalization(ch);
@@ -736,7 +736,7 @@ int QFontMetrics::charWidth(const QString &text, int pos) const
glyphs.numGlyphs = 1;
glyphs.glyphs = &glyph;
glyphs.advances = &advance;
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
width = qRound(advance);
}
@@ -802,7 +802,7 @@ QRect QFontMetrics::boundingRect(QChar ch) const
engine = d->smallCapsFontPrivate()->engineForScript(script);
else
engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
d->alterCharForCapitalization(ch);
@@ -879,7 +879,7 @@ QRect QFontMetrics::boundingRect(const QRect &rect, int flags, const QString &te
QRectF rb;
QRectF rr(rect);
qt_format_text(QFont(d.data()), rr, flags | Qt::TextDontPrint, text, &rb, tabStops, tabArray,
- tabArrayLen, 0);
+ tabArrayLen, nullptr);
return rb.toAlignedRect();
}
@@ -997,7 +997,7 @@ QString QFontMetrics::elidedText(const QString &text, Qt::TextElideMode mode, in
int QFontMetrics::underlinePos() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->underlinePosition());
}
@@ -1033,7 +1033,7 @@ int QFontMetrics::strikeOutPos() const
int QFontMetrics::lineWidth() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return qRound(engine->lineThickness());
}
@@ -1154,7 +1154,7 @@ QFontMetricsF::QFontMetricsF(const QFont &font)
Constructs a font metrics object for \a font and \a paintdevice.
The font metrics will be compatible with the paintdevice passed.
- If the \a paintdevice is 0, the metrics will be screen-compatible,
+ If the \a paintdevice is \nullptr, the metrics will be screen-compatible,
ie. the metrics you get if you use the font for drawing text on a
\l{QWidget}{widgets} or \l{QPixmap}{pixmaps},
not on a QPicture or QPrinter.
@@ -1251,7 +1251,7 @@ bool QFontMetricsF::operator ==(const QFontMetricsF &other) const
qreal QFontMetricsF::ascent() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->ascent().toReal();
}
@@ -1270,7 +1270,7 @@ qreal QFontMetricsF::ascent() const
qreal QFontMetricsF::capHeight() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->capHeight().toReal();
}
@@ -1288,7 +1288,7 @@ qreal QFontMetricsF::capHeight() const
qreal QFontMetricsF::descent() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->descent().toReal();
}
@@ -1302,7 +1302,7 @@ qreal QFontMetricsF::descent() const
qreal QFontMetricsF::height() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return (engine->ascent() + engine->descent()).toReal();
}
@@ -1317,7 +1317,7 @@ qreal QFontMetricsF::height() const
qreal QFontMetricsF::leading() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->leading().toReal();
}
@@ -1331,7 +1331,7 @@ qreal QFontMetricsF::leading() const
qreal QFontMetricsF::lineSpacing() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return (engine->leading() + engine->ascent() + engine->descent()).toReal();
}
@@ -1348,7 +1348,7 @@ qreal QFontMetricsF::lineSpacing() const
qreal QFontMetricsF::minLeftBearing() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->minLeftBearing();
}
@@ -1365,7 +1365,7 @@ qreal QFontMetricsF::minLeftBearing() const
qreal QFontMetricsF::minRightBearing() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->minRightBearing();
}
@@ -1375,7 +1375,7 @@ qreal QFontMetricsF::minRightBearing() const
qreal QFontMetricsF::maxWidth() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->maxCharWidth();
}
@@ -1386,7 +1386,7 @@ qreal QFontMetricsF::maxWidth() const
qreal QFontMetricsF::xHeight() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (d->capital == QFont::SmallCaps)
return d->smallCapsFontPrivate()->engineForScript(QChar::Script_Common)->ascent().toReal();
return engine->xHeight().toReal();
@@ -1400,7 +1400,7 @@ qreal QFontMetricsF::xHeight() const
qreal QFontMetricsF::averageCharWidth() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->averageCharWidth().toReal();
}
@@ -1423,7 +1423,7 @@ bool QFontMetricsF::inFontUcs4(uint ucs4) const
{
const int script = QChar::script(ucs4);
QFontEngine *engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (engine->type() == QFontEngine::Box)
return false;
return engine->canRender(ucs4);
@@ -1449,7 +1449,7 @@ qreal QFontMetricsF::leftBearing(QChar ch) const
engine = d->smallCapsFontPrivate()->engineForScript(script);
else
engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (engine->type() == QFontEngine::Box)
return 0;
@@ -1482,7 +1482,7 @@ qreal QFontMetricsF::rightBearing(QChar ch) const
engine = d->smallCapsFontPrivate()->engineForScript(script);
else
engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
if (engine->type() == QFontEngine::Box)
return 0;
@@ -1491,7 +1491,7 @@ qreal QFontMetricsF::rightBearing(QChar ch) const
glyph_t glyph = engine->glyphIndex(ch.unicode());
qreal rb;
- engine->getGlyphBearings(glyph, 0, &rb);
+ engine->getGlyphBearings(glyph, nullptr, &rb);
return rb;
}
@@ -1611,7 +1611,7 @@ qreal QFontMetricsF::horizontalAdvance(QChar ch) const
engine = d->smallCapsFontPrivate()->engineForScript(script);
else
engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
d->alterCharForCapitalization(ch);
@@ -1622,7 +1622,7 @@ qreal QFontMetricsF::horizontalAdvance(QChar ch) const
glyphs.numGlyphs = 1;
glyphs.glyphs = &glyph;
glyphs.advances = &advance;
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
return advance.toReal();
}
@@ -1682,7 +1682,7 @@ QRectF QFontMetricsF::boundingRect(QChar ch) const
engine = d->smallCapsFontPrivate()->engineForScript(script);
else
engine = d->engineForScript(script);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
d->alterCharForCapitalization(ch);
@@ -1761,7 +1761,7 @@ QRectF QFontMetricsF::boundingRect(const QRectF &rect, int flags, const QString&
QRectF rb;
qt_format_text(QFont(d.data()), rect, flags | Qt::TextDontPrint, text, &rb, tabStops, tabArray,
- tabArrayLen, 0);
+ tabArrayLen, nullptr);
return rb;
}
@@ -1881,7 +1881,7 @@ QString QFontMetricsF::elidedText(const QString &text, Qt::TextElideMode mode, q
qreal QFontMetricsF::underlinePos() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->underlinePosition().toReal();
}
@@ -1916,7 +1916,7 @@ qreal QFontMetricsF::strikeOutPos() const
qreal QFontMetricsF::lineWidth() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
- Q_ASSERT(engine != 0);
+ Q_ASSERT(engine != nullptr);
return engine->lineThickness().toReal();
}
diff --git a/src/gui/text/qglyphrun.cpp b/src/gui/text/qglyphrun.cpp
index 3c16c3bf62..f4cd839f15 100644
--- a/src/gui/text/qglyphrun.cpp
+++ b/src/gui/text/qglyphrun.cpp
@@ -279,7 +279,7 @@ void QGlyphRun::clear()
{
detach();
d->rawFont = QRawFont();
- d->flags = 0;
+ d->flags = { };
setPositions(QVector<QPointF>());
setGlyphIndexes(QVector<quint32>());
diff --git a/src/gui/text/qglyphrun_p.h b/src/gui/text/qglyphrun_p.h
index 465c3c7000..46e2a8bbfb 100644
--- a/src/gui/text/qglyphrun_p.h
+++ b/src/gui/text/qglyphrun_p.h
@@ -65,8 +65,7 @@ class QGlyphRunPrivate: public QSharedData
{
public:
QGlyphRunPrivate()
- : flags(nullptr)
- , glyphIndexData(glyphIndexes.constData())
+ : glyphIndexData(glyphIndexes.constData())
, glyphIndexDataSize(0)
, glyphPositionData(glyphPositions.constData())
, glyphPositionDataSize(0)
diff --git a/src/gui/text/qharfbuzzng.cpp b/src/gui/text/qharfbuzzng.cpp
index 2f25aea92b..397e6cc49f 100644
--- a/src/gui/text/qharfbuzzng.cpp
+++ b/src/gui/text/qharfbuzzng.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2013 Konstantin Ritt
** Contact: https://www.qt.io/licensing/
**
@@ -216,7 +216,20 @@ static const hb_script_t _qtscript_to_hbscript[] = {
HB_SCRIPT_MASARAM_GONDI,
HB_SCRIPT_NUSHU,
HB_SCRIPT_SOYOMBO,
- HB_SCRIPT_ZANABAZAR_SQUARE
+ HB_SCRIPT_ZANABAZAR_SQUARE,
+
+ // Unicode 12.1 additions (not present in harfbuzz-ng 1.7.4)
+ hb_script_t(HB_TAG('D', 'o', 'g', 'r')), // Script_Dogra
+ hb_script_t(HB_TAG('G', 'o', 'n', 'g')), // Script_GunjalaGondi
+ hb_script_t(HB_TAG('R', 'o', 'h', 'g')), // Script_HanifiRohingya
+ hb_script_t(HB_TAG('M', 'a', 'k', 'a')), // Script_Makasar
+ hb_script_t(HB_TAG('M', 'e', 'd', 'f')), // Script_Medefaidrin
+ hb_script_t(HB_TAG('S', 'o', 'g', 'o')), // Script_OldSogdian
+ hb_script_t(HB_TAG('S', 'o', 'g', 'd')), // Script_Sogdian
+ hb_script_t(HB_TAG('E', 'l', 'y', 'm')), // Script_Elymaic
+ hb_script_t(HB_TAG('N', 'a', 'n', 'd')), // Script_Nandinagari
+ hb_script_t(HB_TAG('H', 'm', 'n', 'p')), // Script_NyiakengPuachueHmong
+ hb_script_t(HB_TAG('W', 'c', 'h', 'o')), // Script_Wancho
};
Q_STATIC_ASSERT(QChar::ScriptCount == sizeof(_qtscript_to_hbscript) / sizeof(_qtscript_to_hbscript[0]));
@@ -682,12 +695,12 @@ _hb_qt_font_create(QFontEngine *fe)
return NULL;
}
- const int y_ppem = fe->fontDef.pixelSize;
- const int x_ppem = (fe->fontDef.pixelSize * fe->fontDef.stretch) / 100;
+ const qreal y_ppem = fe->fontDef.pixelSize;
+ const qreal x_ppem = (fe->fontDef.pixelSize * fe->fontDef.stretch) / 100.0;
hb_font_set_funcs(font, hb_qt_get_font_funcs(), (void *)fe, NULL);
- hb_font_set_scale(font, QFixed(x_ppem).value(), -QFixed(y_ppem).value());
- hb_font_set_ppem(font, x_ppem, y_ppem);
+ hb_font_set_scale(font, QFixed::fromReal(x_ppem).value(), -QFixed::fromReal(y_ppem).value());
+ hb_font_set_ppem(font, int(x_ppem), int(y_ppem));
hb_font_set_ptem(font, fe->fontDef.pointSize);
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index 90322b24da..48ba8987f3 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -82,7 +82,7 @@ void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void *
if (!fontName.isEmpty() && pixelSize) {
QFont::Weight fontWeight = QFont::Normal;
- if (weight.type() == QVariant::Int || weight.type() == QVariant::UInt)
+ if (weight.userType() == QMetaType::Int || weight.userType() == QMetaType::UInt)
fontWeight = QFont::Weight(weight.toInt());
QFont::Style fontStyle = static_cast<QFont::Style>(style.toInt());
@@ -368,7 +368,7 @@ QFontEngine *QPlatformFontDatabase::fontEngine(const QByteArray &fontData, qreal
Q_UNUSED(pixelSize);
Q_UNUSED(hintingPreference);
qWarning("This plugin does not support font engines created directly from font data");
- return 0;
+ return nullptr;
}
/*!
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index a060448924..884525bd76 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -303,7 +303,7 @@ QPainterPath QRawFont::pathForGlyph(quint32 glyphIndex) const
QFixedPoint position;
QPainterPath path;
- d->fontEngine->addGlyphsToPath(&glyphIndex, &position, 1, &path, 0);
+ d->fontEngine->addGlyphsToPath(&glyphIndex, &position, 1, &path, { });
return path;
}
@@ -750,7 +750,7 @@ QRawFont QRawFont::fromFont(const QFont &font, QFontDatabase::WritingSystem writ
int script = qt_script_for_writing_system(writingSystem);
QFontEngine *fe = font_d->engineForScript(script);
- if (fe != 0 && fe->type() == QFontEngine::Multi) {
+ if (fe != nullptr && fe->type() == QFontEngine::Multi) {
QFontEngineMulti *multiEngine = static_cast<QFontEngineMulti *>(fe);
fe = multiEngine->engine(0);
@@ -770,7 +770,7 @@ QRawFont QRawFont::fromFont(const QFont &font, QFontDatabase::WritingSystem writ
Q_ASSERT(fe);
}
- if (fe != 0) {
+ if (fe != nullptr) {
rawFont.d.data()->setFontEngine(fe);
rawFont.d.data()->hintingPreference = font.hintingPreference();
}
@@ -795,7 +795,7 @@ void QRawFont::setPixelSize(qreal pixelSize)
void QRawFontPrivate::loadFromData(const QByteArray &fontData, qreal pixelSize,
QFont::HintingPreference hintingPreference)
{
- Q_ASSERT(fontEngine == 0);
+ Q_ASSERT(fontEngine == nullptr);
QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
setFontEngine(pfdb->fontEngine(fontData, pixelSize, hintingPreference));
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 490e0b6b8f..e588b44efd 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -403,7 +403,7 @@ QSizeF QStaticText::size() const
}
QStaticTextPrivate::QStaticTextPrivate()
- : textWidth(-1.0), items(0), itemCount(0), glyphPool(0), positionPool(0),
+ : textWidth(-1.0), items(nullptr), itemCount(0), glyphPool(nullptr), positionPool(nullptr),
needsRelayout(true), useBackendOptimizations(false), textFormat(Qt::AutoText),
untransformedCoordinates(false)
{
@@ -411,7 +411,7 @@ QStaticTextPrivate::QStaticTextPrivate()
QStaticTextPrivate::QStaticTextPrivate(const QStaticTextPrivate &other)
: text(other.text), font(other.font), textWidth(other.textWidth), matrix(other.matrix),
- items(0), itemCount(0), glyphPool(0), positionPool(0), textOption(other.textOption),
+ items(nullptr), itemCount(0), glyphPool(nullptr), positionPool(nullptr), textOption(other.textOption),
needsRelayout(true), useBackendOptimizations(other.useBackendOptimizations),
textFormat(other.textFormat), untransformedCoordinates(other.untransformedCoordinates)
{
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index cf584f6980..b50957d63d 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -299,7 +299,7 @@ QSyntaxHighlighter::QSyntaxHighlighter(QObject *parent)
: QObject(*new QSyntaxHighlighterPrivate, parent)
{
if (parent && parent->inherits("QTextEdit")) {
- QTextDocument *doc = parent->property("document").value<QTextDocument *>();
+ QTextDocument *doc = qvariant_cast<QTextDocument *>(parent->property("document"));
if (doc)
setDocument(doc);
}
@@ -321,7 +321,7 @@ QSyntaxHighlighter::QSyntaxHighlighter(QTextDocument *parent)
*/
QSyntaxHighlighter::~QSyntaxHighlighter()
{
- setDocument(0);
+ setDocument(nullptr);
}
/*!
@@ -601,7 +601,7 @@ QTextBlockUserData *QSyntaxHighlighter::currentBlockUserData() const
{
Q_D(const QSyntaxHighlighter);
if (!d->currentBlock.isValid())
- return 0;
+ return nullptr;
return d->currentBlock.userData();
}
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 056a854789..fa323ef4bd 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -371,7 +371,7 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
int newPosition = position;
- if (mode == QTextCursor::KeepAnchor && complexSelectionTable() != 0) {
+ if (mode == QTextCursor::KeepAnchor && complexSelectionTable() != nullptr) {
if ((op >= QTextCursor::EndOfLine && op <= QTextCursor::NextWord)
|| (op >= QTextCursor::Right && op <= QTextCursor::WordRight)) {
QTextTable *t = qobject_cast<QTextTable *>(priv->frameAt(position));
@@ -671,7 +671,7 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
QTextTable *QTextCursorPrivate::complexSelectionTable() const
{
if (position == anchor)
- return 0;
+ return nullptr;
QTextTable *t = qobject_cast<QTextTable *>(priv->frameAt(position));
if (t) {
@@ -681,7 +681,7 @@ QTextTable *QTextCursorPrivate::complexSelectionTable() const
Q_ASSERT(cell_anchor.isValid());
if (cell_pos == cell_anchor)
- t = 0;
+ t = nullptr;
}
return t;
}
@@ -1044,7 +1044,7 @@ QTextLayout *QTextCursorPrivate::blockLayout(QTextBlock &block) const{
Constructs a null cursor.
*/
QTextCursor::QTextCursor()
- : d(0)
+ : d(nullptr)
{
}
@@ -1623,7 +1623,7 @@ bool QTextCursor::hasComplexSelection() const
if (!d)
return false;
- return d->complexSelectionTable() != 0;
+ return d->complexSelectionTable() != nullptr;
}
/*!
@@ -2111,7 +2111,7 @@ QTextList *QTextCursor::insertList(QTextListFormat::Style style)
QTextList *QTextCursor::createList(const QTextListFormat &format)
{
if (!d || !d->priv)
- return 0;
+ return nullptr;
QTextList *list = static_cast<QTextList *>(d->priv->createObject(format));
QTextBlockFormat modifier;
@@ -2146,7 +2146,7 @@ QTextList *QTextCursor::createList(QTextListFormat::Style style)
QTextList *QTextCursor::currentList() const
{
if (!d || !d->priv)
- return 0;
+ return nullptr;
QTextBlockFormat b = blockFormat();
QTextObject *o = d->priv->objectForFormat(b);
@@ -2186,7 +2186,7 @@ QTextTable *QTextCursor::insertTable(int rows, int cols)
QTextTable *QTextCursor::insertTable(int rows, int cols, const QTextTableFormat &format)
{
if(!d || !d->priv || rows == 0 || cols == 0)
- return 0;
+ return nullptr;
int pos = d->position;
QTextTable *t = QTextTablePrivate::createTable(d->priv, d->position, rows, cols, format);
@@ -2206,7 +2206,7 @@ QTextTable *QTextCursor::insertTable(int rows, int cols, const QTextTableFormat
QTextTable *QTextCursor::currentTable() const
{
if(!d || !d->priv)
- return 0;
+ return nullptr;
QTextFrame *frame = d->priv->frameAt(d->position);
while (frame) {
@@ -2215,7 +2215,7 @@ QTextTable *QTextCursor::currentTable() const
return table;
frame = frame->parentFrame();
}
- return 0;
+ return nullptr;
}
/*!
@@ -2230,7 +2230,7 @@ QTextTable *QTextCursor::currentTable() const
QTextFrame *QTextCursor::insertFrame(const QTextFrameFormat &format)
{
if (!d || !d->priv)
- return 0;
+ return nullptr;
return d->priv->insertFrame(selectionStart(), selectionEnd(), format);
}
@@ -2243,7 +2243,7 @@ QTextFrame *QTextCursor::insertFrame(const QTextFrameFormat &format)
QTextFrame *QTextCursor::currentFrame() const
{
if(!d || !d->priv)
- return 0;
+ return nullptr;
return d->priv->frameAt(d->position);
}
@@ -2604,7 +2604,7 @@ QTextDocument *QTextCursor::document() const
{
if (d->priv)
return d->priv->document();
- return 0; // document went away
+ return nullptr; // document went away
}
QT_END_NAMESPACE
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 1353568ec1..46cfc79643 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -1678,7 +1678,7 @@ QTextCursor QTextDocument::find(const QRegularExpression &expr, const QTextCurso
*/
QTextObject *QTextDocument::createObject(const QTextFormat &f)
{
- QTextObject *obj = 0;
+ QTextObject *obj = nullptr;
if (f.isListFormat())
obj = new QTextList(this);
else if (f.isTableFormat())
@@ -2234,7 +2234,7 @@ QVariant QTextDocument::loadResource(int type, const QUrl &name)
}
if (!r.isNull()) {
- if (type == ImageResource && r.type() == QVariant::ByteArray) {
+ if (type == ImageResource && r.userType() == QMetaType::QByteArray) {
if (qApp->thread() != QThread::currentThread()) {
// must use images in non-GUI threads
QImage image;
@@ -2421,7 +2421,7 @@ bool QTextHtmlExporter::emitCharFormatStyle(const QTextCharFormat &format)
sizeof("small") + sizeof("medium") + 1, // "x-large" )> compressed into "xx-large"
sizeof("small") + sizeof("medium"), // "xx-large" )
};
- const char *name = 0;
+ const char *name = nullptr;
const int idx = format.intProperty(QTextFormat::FontSizeAdjustment) + 1;
if (idx >= 0 && idx <= 4) {
name = sizeNameData + sizeNameOffsets[idx];
@@ -3049,12 +3049,12 @@ QString QTextHtmlExporter::findUrlForImage(const QTextDocument *doc, qint64 cach
for (; it != priv->cachedResources.constEnd(); ++it) {
const QVariant &v = it.value();
- if (v.type() == QVariant::Image && !isPixmap) {
+ if (v.userType() == QMetaType::QImage && !isPixmap) {
if (qvariant_cast<QImage>(v).cacheKey() == cacheKey)
break;
}
- if (v.type() == QVariant::Pixmap && isPixmap) {
+ if (v.userType() == QMetaType::QPixmap && isPixmap) {
if (qvariant_cast<QPixmap>(v).cacheKey() == cacheKey)
break;
}
@@ -3072,7 +3072,7 @@ void QTextDocumentPrivate::mergeCachedResources(const QTextDocumentPrivate *priv
if (!priv)
return;
- cachedResources.unite(priv->cachedResources);
+ cachedResources.insert(priv->cachedResources);
}
void QTextHtmlExporter::emitBackgroundAttribute(const QTextFormat &format)
@@ -3255,7 +3255,7 @@ void QTextHtmlExporter::emitFrame(const QTextFrame::Iterator &frameIt)
QTextFrame::Iterator next = frameIt;
++next;
if (next.atEnd()
- && frameIt.currentFrame() == 0
+ && frameIt.currentFrame() == nullptr
&& frameIt.parentFrame() != doc->rootFrame()
&& frameIt.currentBlock().begin().atEnd())
return;
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index a1b1c2e92b..524931ebde 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -185,7 +185,7 @@ QTextDocumentPrivate::QTextDocumentPrivate()
docChangeOldLength(0),
docChangeLength(0),
framesDirty(true),
- rtFrame(0),
+ rtFrame(nullptr),
initialBlockCharFormatIndex(-1) // set correctly later in init()
{
editBlock = 0;
@@ -195,7 +195,7 @@ QTextDocumentPrivate::QTextDocumentPrivate()
undoState = 0;
revision = -1; // init() inserts a block, bringing it to 0
- lout = 0;
+ lout = nullptr;
modified = false;
modifiedState = 0;
@@ -243,7 +243,7 @@ void QTextDocumentPrivate::clear()
curs->adjusted_anchor = 0;
}
- QList<QTextCursorPrivate *>oldCursors = cursors;
+ QSet<QTextCursorPrivate *> oldCursors = cursors;
QT_TRY{
cursors.clear();
@@ -272,7 +272,7 @@ void QTextDocumentPrivate::clear()
blocks.clear();
cachedResources.clear();
delete rtFrame;
- rtFrame = 0;
+ rtFrame = nullptr;
init();
cursors = oldCursors;
{
@@ -290,7 +290,7 @@ void QTextDocumentPrivate::clear()
QTextDocumentPrivate::~QTextDocumentPrivate()
{
for (QTextCursorPrivate *curs : qAsConst(cursors))
- curs->priv = 0;
+ curs->priv = nullptr;
cursors.clear();
undoState = 0;
undoEnabled = true;
@@ -643,7 +643,7 @@ void QTextDocumentPrivate::move(int pos, int to, int length, QTextUndoCommand::O
// qDebug("remove_block at %d", key);
Q_ASSERT(X->size_array[0] == 1 && isValidBlockSeparator(text.at(X->stringPosition)));
b = blocks.previous(b);
- B = 0;
+ B = nullptr;
c.command = blocks.size(b) == 1 ? QTextUndoCommand::BlockDeleted : QTextUndoCommand::BlockRemoved;
w = remove_block(key, &c.blockFormat, QTextUndoCommand::BlockAdded, op);
@@ -1437,7 +1437,7 @@ static QTextFrame *findChildFrame(QTextFrame *f, int pos)
else
return c;
}
- return 0;
+ return nullptr;
}
QTextFrame *QTextDocumentPrivate::rootFrame() const
@@ -1467,7 +1467,7 @@ void QTextDocumentPrivate::clearFrame(QTextFrame *f)
for (int i = 0; i < f->d_func()->childFrames.count(); ++i)
clearFrame(f->d_func()->childFrames.at(i));
f->d_func()->childFrames.clear();
- f->d_func()->parentFrame = 0;
+ f->d_func()->parentFrame = nullptr;
}
void QTextDocumentPrivate::scan_frames(int pos, int charsRemoved, int charsAdded)
@@ -1551,7 +1551,7 @@ QTextFrame *QTextDocumentPrivate::insertFrame(int start, int end, const QTextFra
Q_ASSERT(start <= end || end == -1);
if (start != end && frameAt(start) != frameAt(end))
- return 0;
+ return nullptr;
beginEditBlock();
@@ -1599,7 +1599,7 @@ void QTextDocumentPrivate::removeFrame(QTextFrame *frame)
QTextObject *QTextDocumentPrivate::objectForIndex(int objectIndex) const
{
if (objectIndex < 0)
- return 0;
+ return nullptr;
QTextObject *object = objects.value(objectIndex, 0);
if (!object) {
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h
index 40252c93eb..ce8e905eb0 100644
--- a/src/gui/text/qtextdocument_p.h
+++ b/src/gui/text/qtextdocument_p.h
@@ -277,8 +277,8 @@ private:
public:
void documentChange(int from, int length);
- inline void addCursor(QTextCursorPrivate *c) { cursors.append(c); }
- inline void removeCursor(QTextCursorPrivate *c) { cursors.removeAll(c); }
+ inline void addCursor(QTextCursorPrivate *c) { cursors.insert(c); }
+ inline void removeCursor(QTextCursorPrivate *c) { cursors.remove(c); }
QTextFrame *frameAt(int pos) const;
QTextFrame *rootFrame() const;
@@ -330,7 +330,7 @@ private:
BlockMap blocks;
int initialBlockCharFormatIndex;
- QList<QTextCursorPrivate *> cursors;
+ QSet<QTextCursorPrivate *> cursors;
QMap<int, QTextObject *> objects;
QMap<QUrl, QVariant> resources;
QMap<QUrl, QVariant> cachedResources;
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index 742c56382d..d7bc707491 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -277,7 +277,7 @@ void QTextDocumentFragmentPrivate::insert(QTextCursor &_cursor) const
\sa isEmpty()
*/
QTextDocumentFragment::QTextDocumentFragment()
- : d(0)
+ : d(nullptr)
{
}
@@ -287,7 +287,7 @@ QTextDocumentFragment::QTextDocumentFragment()
like the document's title.
*/
QTextDocumentFragment::QTextDocumentFragment(const QTextDocument *document)
- : d(0)
+ : d(nullptr)
{
if (!document)
return;
@@ -304,7 +304,7 @@ QTextDocumentFragment::QTextDocumentFragment(const QTextDocument *document)
\sa isEmpty(), QTextCursor::selection()
*/
QTextDocumentFragment::QTextDocumentFragment(const QTextCursor &cursor)
- : d(0)
+ : d(nullptr)
{
if (!cursor.hasSelection())
return;
@@ -678,7 +678,7 @@ QTextHtmlImporter::ProcessNodeResult QTextHtmlImporter::processSpecialNodes()
if (n->parent)
n = &at(n->parent);
else
- n = 0;
+ n = nullptr;
}
}
@@ -793,7 +793,7 @@ bool QTextHtmlImporter::closeTag()
bool blockTagClosed = false;
while (depth > endDepth) {
- Table *t = 0;
+ Table *t = nullptr;
if (!tables.isEmpty())
t = &tables.last();
@@ -816,7 +816,7 @@ bool QTextHtmlImporter::closeTag()
indent = t->lastIndent;
tables.resize(tables.size() - 1);
- t = 0;
+ t = nullptr;
if (tables.isEmpty()) {
cursor = doc->rootFrame()->lastCursorPosition();
@@ -1123,7 +1123,7 @@ QTextHtmlImporter::ProcessNodeResult QTextHtmlImporter::processBlockNode()
// for list items we may want to collapse with the bottom margin of the
// list.
- const QTextHtmlParserNode *parentNode = currentNode->parent ? &at(currentNode->parent) : 0;
+ const QTextHtmlParserNode *parentNode = currentNode->parent ? &at(currentNode->parent) : nullptr;
if ((currentNode->id == Html_li || currentNode->id == Html_dt || currentNode->id == Html_dd)
&& parentNode
&& (parentNode->isListStart() || parentNode->id == Html_dl)
@@ -1270,7 +1270,7 @@ void QTextHtmlImporter::appendBlock(const QTextBlockFormat &format, QTextCharFor
QTextDocumentFragment QTextDocumentFragment::fromHtml(const QString &html)
{
- return fromHtml(html, 0);
+ return fromHtml(html, nullptr);
}
/*!
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index ed23a4d8d9..9d70873590 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -111,7 +111,7 @@ public:
QTextFrameData::QTextFrameData()
: maximumWidth(QFIXED_MAX),
- currentLayoutStruct(0), sizeDirty(true), layoutDirty(true)
+ currentLayoutStruct(nullptr), sizeDirty(true), layoutDirty(true)
{
}
@@ -248,7 +248,7 @@ public:
if (v.isNull()) {
return cellPadding;
} else {
- Q_ASSERT(v.userType() == QVariant::Double || v.userType() == QMetaType::Float);
+ Q_ASSERT(v.userType() == QMetaType::Double || v.userType() == QMetaType::Float);
return QFixed::fromReal(v.toReal() * deviceScale);
}
}
@@ -571,7 +571,7 @@ public:
void setCellPosition(QTextTable *t, const QTextTableCell &cell, const QPointF &pos);
QRectF layoutTable(QTextTable *t, int layoutFrom, int layoutTo, QFixed parentY);
- void positionFloat(QTextFrame *frame, QTextLine *currentLine = 0);
+ void positionFloat(QTextFrame *frame, QTextLine *currentLine = nullptr);
// calls the next one
QRectF layoutFrame(QTextFrame *f, int layoutFrom, int layoutTo, QFixed parentY = 0);
@@ -1554,7 +1554,7 @@ static inline double prioritizedEdgeAnchorOffset(const QTextDocumentLayoutPrivat
competingCell = adjacentCell(table, cell, orthogonalEdge);
if (competingCell.isValid()) {
checkJoinedEdge(table, td, competingCell, edgeData.edge, edgeData, couldHaveContinuation,
- &maxCompetingEdgeData, 0);
+ &maxCompetingEdgeData, nullptr);
}
}
@@ -1946,7 +1946,7 @@ void QTextDocumentLayoutPrivate::drawFlow(const QPointF &offset, QPainter *paint
QTextFrame::Iterator it, const QList<QTextFrame *> &floats, QTextBlock *cursorBlockNeedingRepaint) const
{
Q_Q(const QTextDocumentLayout);
- const bool inRootFrame = (!it.atEnd() && it.parentFrame() && it.parentFrame()->parentFrame() == 0);
+ const bool inRootFrame = (!it.atEnd() && it.parentFrame() && it.parentFrame()->parentFrame() == nullptr);
QVector<QCheckPoint>::ConstIterator lastVisibleCheckPoint = checkPoints.end();
if (inRootFrame && context.clip.isValid()) {
@@ -1954,7 +1954,7 @@ void QTextDocumentLayoutPrivate::drawFlow(const QPointF &offset, QPainter *paint
}
QTextBlock previousBlock;
- QTextFrame *previousFrame = 0;
+ QTextFrame *previousFrame = nullptr;
for (; !it.atEnd(); ++it) {
QTextFrame *c = it.currentFrame();
@@ -2050,7 +2050,7 @@ void QTextDocumentLayoutPrivate::drawBlock(const QPointF &offset, QPainter *pain
QVector<QTextLayout::FormatRange> selections;
int blpos = bl.position();
int bllen = bl.length();
- const QTextCharFormat *selFormat = 0;
+ const QTextCharFormat *selFormat = nullptr;
for (int i = 0; i < context.selections.size(); ++i) {
const QAbstractTextDocumentLayout::Selection &range = context.selections.at(i);
const int selStart = range.cursor.selectionStart() - blpos;
@@ -2920,7 +2920,7 @@ QRectF QTextDocumentLayoutPrivate::layoutFrame(QTextFrame *f, int layoutFrom, in
QTextFrameFormat fformat = f->frameFormat();
QTextFrame *parent = f->parentFrame();
- const QTextFrameData *pd = parent ? data(parent) : 0;
+ const QTextFrameData *pd = parent ? data(parent) : nullptr;
const qreal maximumWidth = qMax(qreal(0), pd ? pd->contentsWidth.toReal() : document->pageSize().width());
QFixed width = QFixed::fromReal(fformat.width().value(maximumWidth));
@@ -2971,7 +2971,7 @@ QRectF QTextDocumentLayoutPrivate::layoutFrame(QTextFrame *f, int layoutFrom, in
}
QTextFrame *parent = f->parentFrame();
- const QTextFrameData *pd = parent ? data(parent) : 0;
+ const QTextFrameData *pd = parent ? data(parent) : nullptr;
// accumulate top and bottom margins
if (parent) {
@@ -3296,7 +3296,7 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QTextLayout
const QFixed origMaximumWidth = layoutStruct->maximumWidth;
layoutStruct->maximumWidth = 0;
- const QTextBlockFormat *previousBlockFormatPtr = 0;
+ const QTextBlockFormat *previousBlockFormatPtr = nullptr;
if (lastIt.currentBlock().isValid())
previousBlockFormatPtr = &previousBlockFormat;
@@ -3405,7 +3405,7 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QTextLayout
}
- fd->currentLayoutStruct = 0;
+ fd->currentLayoutStruct = nullptr;
}
static inline void getLineHeightParams(const QTextBlockFormat &blockFormat, const QTextLine &line, qreal scaling,
@@ -3865,7 +3865,7 @@ int QTextDocumentLayout::hitTest(const QPointF &point, Qt::HitTestAccuracy accur
d->ensureLayouted(QFixed::fromReal(point.y()));
QTextFrame *f = d->docPrivate->rootFrame();
int position = 0;
- QTextLayout *l = 0;
+ QTextLayout *l = nullptr;
QFixedPoint pointf;
pointf.x = QFixed::fromReal(point.x());
pointf.y = QFixed::fromReal(point.y());
@@ -3944,7 +3944,7 @@ void QTextDocumentLayout::positionInlineObject(QTextInlineObject item, int posIn
line = b.layout()->lineAt(b.layout()->lineCount()-1);
// qDebug() << "layoutObject: line.isValid" << line.isValid() << b.position() << b.length() <<
// frame->firstPosition() << frame->lastPosition();
- d->positionFloat(frame, line.isValid() ? &line : 0);
+ d->positionFloat(frame, line.isValid() ? &line : nullptr);
}
void QTextDocumentLayout::drawInlineObject(QPainter *p, const QRectF &rect, QTextInlineObject item,
diff --git a/src/gui/text/qtextdocumentwriter.cpp b/src/gui/text/qtextdocumentwriter.cpp
index 193d2c0dd3..0bafa5d9ff 100644
--- a/src/gui/text/qtextdocumentwriter.cpp
+++ b/src/gui/text/qtextdocumentwriter.cpp
@@ -107,7 +107,7 @@ public:
\internal
*/
QTextDocumentWriterPrivate::QTextDocumentWriterPrivate(QTextDocumentWriter *qq)
- : device(0),
+ : device(nullptr),
deleteDevice(false),
#if QT_CONFIG(textcodec)
codec(QTextCodec::codecForName("utf-8")),
@@ -320,7 +320,7 @@ bool QTextDocumentWriter::write(const QTextDocument *document)
*/
bool QTextDocumentWriter::write(const QTextDocumentFragment &fragment)
{
- if (fragment.d == 0)
+ if (fragment.d == nullptr)
return false; // invalid fragment.
QTextDocument *doc = fragment.d->doc;
if (doc)
@@ -337,7 +337,7 @@ bool QTextDocumentWriter::write(const QTextDocumentFragment &fragment)
#if QT_CONFIG(textcodec)
void QTextDocumentWriter::setCodec(QTextCodec *codec)
{
- if (codec == 0)
+ if (codec == nullptr)
codec = QTextCodec::codecForName("UTF-8");
Q_ASSERT(codec);
d->codec = codec;
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 209433dac5..ac39a8cf69 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -72,7 +72,7 @@ public:
: m_string(string),
m_analysis(analysis),
m_items(items),
- m_splitter(0)
+ m_splitter(nullptr)
{
}
~Itemizer()
@@ -138,7 +138,7 @@ private:
if (!m_splitter)
m_splitter = new QTextBoundaryFinder(QTextBoundaryFinder::Word,
m_string.constData(), m_string.length(),
- /*buffer*/0, /*buffer size*/0);
+ /*buffer*/nullptr, /*buffer size*/0);
m_splitter->setPosition(start);
QScriptAnalysis itemAnalysis = m_analysis[start];
@@ -1680,8 +1680,8 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si,
QGlyphLayout g = availableGlyphs(&si).mid(glyphs_shaped, num_glyphs);
ushort *log_clusters = logClusters(&si) + item_pos;
- hb_glyph_info_t *infos = hb_buffer_get_glyph_infos(buffer, 0);
- hb_glyph_position_t *positions = hb_buffer_get_glyph_positions(buffer, 0);
+ hb_glyph_info_t *infos = hb_buffer_get_glyph_infos(buffer, nullptr);
+ hb_glyph_position_t *positions = hb_buffer_get_glyph_positions(buffer, nullptr);
uint str_pos = 0;
uint last_cluster = ~0u;
uint last_glyph_pos = glyphs_shaped;
@@ -1720,7 +1720,7 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si,
g.glyphs[i] = actualFontEngine->glyphIndex('-');
if (Q_LIKELY(g.glyphs[i] != 0)) {
QGlyphLayout tmp = g.mid(i, 1);
- actualFontEngine->recalcAdvances(&tmp, 0);
+ actualFontEngine->recalcAdvances(&tmp, { });
}
g.attributes[i].dontPrint = true;
}
@@ -1762,7 +1762,10 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si,
}
#endif
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (!actualFontEngine->supportsSubPixelPositions() || (actualFontEngine->fontDef.styleStrategy & QFont::ForceIntegerMetrics)) {
+QT_WARNING_POP
for (uint i = 0; i < num_glyphs; ++i)
g.advances[i] = g.advances[i].round();
}
@@ -1896,7 +1899,7 @@ int QTextEngine::shapeTextWithHarfbuzz(const QScriptItem &si, const ushort *stri
}
if (kerningEnabled && !shaper_item.kerning_applied)
- actualFontEngine->doKerning(&g, option.useDesignMetrics() ? QFontEngine::DesignMetrics : QFontEngine::ShaperFlags(0));
+ actualFontEngine->doKerning(&g, option.useDesignMetrics() ? QFontEngine::DesignMetrics : QFontEngine::ShaperFlags{});
if (engineIdx != 0) {
for (quint32 i = 0; i < shaper_item.num_glyphs; ++i)
@@ -1917,12 +1920,12 @@ void QTextEngine::init(QTextEngine *e)
e->visualMovement = false;
e->delayDecorations = false;
- e->layoutData = 0;
+ e->layoutData = nullptr;
e->minWidth = 0;
e->maxWidth = 0;
- e->specialData = 0;
+ e->specialData = nullptr;
e->stackEngine = false;
#ifndef QT_NO_RAWFONT
e->useRawFont = false;
@@ -1956,7 +1959,7 @@ const QCharAttributes *QTextEngine::attributes() const
itemize();
if (! ensureSpace(layoutData->string.length()))
- return NULL;
+ return nullptr;
QVarLengthArray<QUnicodeTools::ScriptItem> scriptItems(layoutData->items.size());
for (int i = 0; i < layoutData->items.size(); ++i) {
@@ -2148,7 +2151,7 @@ void QTextEngine::itemize() const
if (it == end || format != frag->format) {
if (s && position >= s->preeditPosition) {
position += s->preeditText.length();
- s = 0;
+ s = nullptr;
}
Q_ASSERT(position <= length);
QFont::Capitalization capitalization =
@@ -2443,8 +2446,8 @@ QTextEngine::FontEngineCache::FontEngineCache()
//input is common (and hard to cache at a higher level)
QFontEngine *QTextEngine::fontEngine(const QScriptItem &si, QFixed *ascent, QFixed *descent, QFixed *leading) const
{
- QFontEngine *engine = 0;
- QFontEngine *scaledEngine = 0;
+ QFontEngine *engine = nullptr;
+ QFontEngine *scaledEngine = nullptr;
int script = si.analysis.script;
QFont font = fnt;
@@ -2459,7 +2462,7 @@ QFontEngine *QTextEngine::fontEngine(const QScriptItem &si, QFixed *ascent, QFix
engine->ref.ref();
if (feCache.prevScaledFontEngine) {
releaseCachedFontEngine(feCache.prevScaledFontEngine);
- feCache.prevScaledFontEngine = 0;
+ feCache.prevScaledFontEngine = nullptr;
}
}
if (si.analysis.flags == QScriptAnalysis::SmallCaps) {
@@ -2538,7 +2541,7 @@ QFontEngine *QTextEngine::fontEngine(const QScriptItem &si, QFixed *ascent, QFix
feCache.prevScript = script;
feCache.prevPosition = -1;
feCache.prevLength = -1;
- feCache.prevScaledFontEngine = 0;
+ feCache.prevScaledFontEngine = nullptr;
}
}
@@ -2581,7 +2584,7 @@ static void set(QJustificationPoint *point, int type, const QGlyphLayout &glyph,
g.numGlyphs = 1;
g.glyphs = &kashidaGlyph;
g.advances = &point->kashidaWidth;
- fe->recalcAdvances(&g, 0);
+ fe->recalcAdvances(&g, { });
if (point->kashidaWidth == 0)
point->type = Justification_Prohibited;
@@ -2808,14 +2811,14 @@ void QScriptLine::setDefaultHeight(QTextEngine *eng)
QTextEngine::LayoutData::LayoutData()
{
- memory = 0;
+ memory = nullptr;
allocated = 0;
memory_on_stack = false;
used = 0;
hasBidi = false;
layoutState = LayoutEmpty;
haveCharAttributes = false;
- logClustersPtr = 0;
+ logClustersPtr = nullptr;
available_glyphs = 0;
}
@@ -2833,8 +2836,8 @@ QTextEngine::LayoutData::LayoutData(const QString &str, void **stack_memory, int
allocated = 0;
memory_on_stack = false;
- memory = 0;
- logClustersPtr = 0;
+ memory = nullptr;
+ logClustersPtr = nullptr;
} else {
memory_on_stack = true;
memory = stack_memory;
@@ -2855,7 +2858,7 @@ QTextEngine::LayoutData::~LayoutData()
{
if (!memory_on_stack)
free(memory);
- memory = 0;
+ memory = nullptr;
}
bool QTextEngine::LayoutData::reallocate(int totalGlyphs)
@@ -2879,7 +2882,7 @@ bool QTextEngine::LayoutData::reallocate(int totalGlyphs)
return false;
}
- void **newMem = (void **)::realloc(memory_on_stack ? 0 : memory, newAllocated*sizeof(void *));
+ void **newMem = (void **)::realloc(memory_on_stack ? nullptr : memory, newAllocated*sizeof(void *));
if (!newMem) {
layoutState = LayoutFailed;
return false;
@@ -2928,7 +2931,7 @@ void QTextEngine::freeMemory()
{
if (!stackEngine) {
delete layoutData;
- layoutData = 0;
+ layoutData = nullptr;
} else {
layoutData->used = 0;
layoutData->hasBidi = false;
@@ -3035,7 +3038,7 @@ void QTextEngine::setPreeditArea(int position, const QString &preeditText)
return;
if (specialData->formats.isEmpty()) {
delete specialData;
- specialData = 0;
+ specialData = nullptr;
} else {
specialData->preeditText = QString();
specialData->preeditPosition = -1;
@@ -3057,7 +3060,7 @@ void QTextEngine::setFormats(const QVector<QTextLayout::FormatRange> &formats)
return;
if (specialData->preeditText.isEmpty()) {
delete specialData;
- specialData = 0;
+ specialData = nullptr;
} else {
specialData->formats.clear();
}
@@ -3214,13 +3217,13 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int
glyphs.advances = &ellipsisWidth;
if (glyph != 0) {
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
ellipsisText = ellipsisChar;
} else {
glyph = engine->glyphIndex('.');
if (glyph != 0) {
- engine->recalcAdvances(&glyphs, 0);
+ engine->recalcAdvances(&glyphs, { });
ellipsisWidth *= 3;
ellipsisText = QStringLiteral("...");
@@ -3895,12 +3898,7 @@ QStackTextEngine::QStackTextEngine(const QString &string, const QFont &f)
}
QTextItemInt::QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFormat &format)
- : justified(false),
- underlineStyle(QTextCharFormat::NoUnderline),
- charFormat(format),
- num_chars(0),
- chars(nullptr),
- logClusters(nullptr),
+ : charFormat(format),
f(font),
fontEngine(font->d->engineForScript(si.analysis.script))
{
@@ -3910,13 +3908,9 @@ QTextItemInt::QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFo
}
QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe, const QTextCharFormat &format)
- : flags(0),
- justified(false),
- underlineStyle(QTextCharFormat::NoUnderline),
- charFormat(format),
+ : charFormat(format),
num_chars(numChars),
chars(chars_),
- logClusters(nullptr),
f(font),
glyphs(g),
fontEngine(fe)
@@ -3928,7 +3922,7 @@ void QTextItemInt::initWithScriptItem(const QScriptItem &si)
{
// explicitly initialize flags so that initFontAttributes can be called
// multiple times on the same TextItem
- flags = 0;
+ flags = { };
if (si.analysis.bidiLevel %2)
flags |= QTextItem::RightToLeft;
ascent = si.ascent;
@@ -4013,7 +4007,7 @@ QTextLineItemIterator::QTextLineItemIterator(QTextEngine *_eng, int _lineNum, co
const QTextLayout::FormatRange *_selection)
: eng(_eng),
line(eng->lines[_lineNum]),
- si(0),
+ si(nullptr),
lineNum(_lineNum),
lineEnd(line.from + line.length),
firstItem(eng->findItem(line.from)),
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index 76b9757eba..f069951ce5 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -303,10 +303,7 @@ struct QScriptItem;
class QTextItemInt : public QTextItem
{
public:
- inline QTextItemInt()
- : justified(false), underlineStyle(QTextCharFormat::NoUnderline), num_chars(0), chars(nullptr),
- logClusters(nullptr), f(nullptr), fontEngine(nullptr)
- {}
+ inline QTextItemInt() = default;
QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFormat &format = QTextCharFormat());
QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars, int numChars, QFontEngine *fe,
const QTextCharFormat &format = QTextCharFormat());
@@ -321,16 +318,16 @@ public:
QFixed width;
RenderFlags flags;
- bool justified;
- QTextCharFormat::UnderlineStyle underlineStyle;
+ bool justified = false;
+ QTextCharFormat::UnderlineStyle underlineStyle = QTextCharFormat::NoUnderline;
const QTextCharFormat charFormat;
- int num_chars;
- const QChar *chars;
- const unsigned short *logClusters;
- const QFont *f;
+ int num_chars = 0;
+ const QChar *chars = nullptr;
+ const unsigned short *logClusters = nullptr;
+ const QFont *f = nullptr;
QGlyphLayout glyphs;
- QFontEngine *fontEngine;
+ QFontEngine *fontEngine = nullptr;
};
struct QScriptItem
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index e3bd49a15e..10b8ade117 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -144,7 +144,7 @@ QT_BEGIN_NAMESPACE
*/
QTextLength::operator QVariant() const
{
- return QVariant(QVariant::TextLength, this);
+ return QVariant(QMetaType::QTextLength, this);
}
#ifndef QT_NO_DATASTREAM
@@ -288,20 +288,20 @@ static inline uint variantHash(const QVariant &variant)
{
// simple and fast hash functions to differentiate between type and value
switch (variant.userType()) { // sorted by occurrence frequency
- case QVariant::String: return qHash(variant.toString());
- case QVariant::Double: return qHash(variant.toDouble());
- case QVariant::Int: return 0x811890 + variant.toInt();
- case QVariant::Brush:
+ case QMetaType::QString: return qHash(variant.toString());
+ case QMetaType::Double: return qHash(variant.toDouble());
+ case QMetaType::Int: return 0x811890 + variant.toInt();
+ case QMetaType::QBrush:
return 0x01010101 + hash(qvariant_cast<QBrush>(variant));
- case QVariant::Bool: return 0x371818 + variant.toBool();
- case QVariant::Pen: return 0x02020202 + hash(qvariant_cast<QPen>(variant));
- case QVariant::List:
+ case QMetaType::Bool: return 0x371818 + variant.toBool();
+ case QMetaType::QPen: return 0x02020202 + hash(qvariant_cast<QPen>(variant));
+ case QMetaType::QVariantList:
return 0x8377 + qvariant_cast<QVariantList>(variant).count();
- case QVariant::Color: return hash(qvariant_cast<QColor>(variant));
- case QVariant::TextLength:
+ case QMetaType::QColor: return hash(qvariant_cast<QColor>(variant));
+ case QMetaType::QTextLength:
return 0x377 + hash(qvariant_cast<QTextLength>(variant).rawValue());
case QMetaType::Float: return qHash(variant.toFloat());
- case QVariant::Invalid: return 0;
+ case QMetaType::UnknownType: return 0;
default: break;
}
return qHash(variant.typeName());
@@ -874,7 +874,7 @@ QTextFormat::~QTextFormat()
*/
QTextFormat::operator QVariant() const
{
- return QVariant(QVariant::TextFormat, this);
+ return QVariant(QMetaType::QTextFormat, this);
}
/*!
@@ -984,7 +984,7 @@ bool QTextFormat::boolProperty(int propertyId) const
if (!d)
return false;
const QVariant prop = d->property(propertyId);
- if (prop.userType() != QVariant::Bool)
+ if (prop.userType() != QMetaType::Bool)
return false;
return prop.toBool();
}
@@ -1004,7 +1004,7 @@ int QTextFormat::intProperty(int propertyId) const
if (!d)
return def;
const QVariant prop = d->property(propertyId);
- if (prop.userType() != QVariant::Int)
+ if (prop.userType() != QMetaType::Int)
return def;
return prop.toInt();
}
@@ -1022,7 +1022,7 @@ qreal QTextFormat::doubleProperty(int propertyId) const
if (!d)
return 0.;
const QVariant prop = d->property(propertyId);
- if (prop.userType() != QVariant::Double && prop.userType() != QMetaType::Float)
+ if (prop.userType() != QMetaType::Double && prop.userType() != QMetaType::Float)
return 0.;
return qvariant_cast<qreal>(prop);
}
@@ -1040,7 +1040,7 @@ QString QTextFormat::stringProperty(int propertyId) const
if (!d)
return QString();
const QVariant prop = d->property(propertyId);
- if (prop.userType() != QVariant::String)
+ if (prop.userType() != QMetaType::QString)
return QString();
return prop.toString();
}
@@ -1058,7 +1058,7 @@ QColor QTextFormat::colorProperty(int propertyId) const
if (!d)
return QColor();
const QVariant prop = d->property(propertyId);
- if (prop.userType() != QVariant::Color)
+ if (prop.userType() != QMetaType::QColor)
return QColor();
return qvariant_cast<QColor>(prop);
}
@@ -1076,7 +1076,7 @@ QPen QTextFormat::penProperty(int propertyId) const
if (!d)
return QPen(Qt::NoPen);
const QVariant prop = d->property(propertyId);
- if (prop.userType() != QVariant::Pen)
+ if (prop.userType() != QMetaType::QPen)
return QPen(Qt::NoPen);
return qvariant_cast<QPen>(prop);
}
@@ -1094,7 +1094,7 @@ QBrush QTextFormat::brushProperty(int propertyId) const
if (!d)
return QBrush(Qt::NoBrush);
const QVariant prop = d->property(propertyId);
- if (prop.userType() != QVariant::Brush)
+ if (prop.userType() != QMetaType::QBrush)
return QBrush(Qt::NoBrush);
return qvariant_cast<QBrush>(prop);
}
@@ -1126,13 +1126,13 @@ QVector<QTextLength> QTextFormat::lengthVectorProperty(int propertyId) const
if (!d)
return vector;
const QVariant prop = d->property(propertyId);
- if (prop.userType() != QVariant::List)
+ if (prop.userType() != QMetaType::QVariantList)
return vector;
QList<QVariant> propertyList = prop.toList();
for (int i=0; i<propertyList.size(); ++i) {
QVariant var = propertyList.at(i);
- if (var.userType() == QVariant::TextLength)
+ if (var.userType() == QMetaType::QTextLength)
vector.append(qvariant_cast<QTextLength>(var));
}
@@ -1222,7 +1222,7 @@ int QTextFormat::objectIndex() const
if (!d)
return -1;
const QVariant prop = d->property(ObjectIndex);
- if (prop.userType() != QVariant::Int) // ####
+ if (prop.userType() != QMetaType::Int) // ####
return -1;
return prop.toInt();
}
@@ -1859,9 +1859,9 @@ void QTextCharFormat::setUnderlineStyle(UnderlineStyle style)
QString QTextCharFormat::anchorName() const
{
QVariant prop = property(AnchorName);
- if (prop.userType() == QVariant::StringList)
+ if (prop.userType() == QMetaType::QStringList)
return prop.toStringList().value(0);
- else if (prop.userType() != QVariant::String)
+ else if (prop.userType() != QMetaType::QString)
return QString();
return prop.toString();
}
@@ -1878,9 +1878,9 @@ QString QTextCharFormat::anchorName() const
QStringList QTextCharFormat::anchorNames() const
{
QVariant prop = property(AnchorName);
- if (prop.userType() == QVariant::StringList)
+ if (prop.userType() == QMetaType::QStringList)
return prop.toStringList();
- else if (prop.userType() != QVariant::String)
+ else if (prop.userType() != QMetaType::QString)
return QStringList();
return QStringList(prop.toString());
}
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index b867f42480..f003544391 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -463,7 +463,7 @@ static const QTextHtmlElement *lookupElementHelper(const QString &element)
const QTextHtmlElement *end = &elements[Html_NumElements];
const QTextHtmlElement *e = std::lower_bound(start, end, element);
if ((e == end) || (element < *e))
- return 0;
+ return nullptr;
return e;
}
@@ -519,7 +519,7 @@ void QTextHtmlParser::dumpHtml()
QTextHtmlParserNode *QTextHtmlParser::newNode(int parent)
{
QTextHtmlParserNode *lastNode = &nodes.last();
- QTextHtmlParserNode *newNode = 0;
+ QTextHtmlParserNode *newNode = nullptr;
bool reuseLastNode = true;
@@ -1451,19 +1451,19 @@ void QTextHtmlParserNode::applyBackgroundImage(const QString &url, const QTextDo
if (QCoreApplication::instance()->thread() != QThread::currentThread()) {
// must use images in non-GUI threads
- if (val.type() == QVariant::Image) {
+ if (val.userType() == QMetaType::QImage) {
QImage image = qvariant_cast<QImage>(val);
charFormat.setBackground(image);
- } else if (val.type() == QVariant::ByteArray) {
+ } else if (val.userType() == QMetaType::QByteArray) {
QImage image;
if (image.loadFromData(val.toByteArray())) {
charFormat.setBackground(image);
}
}
} else {
- if (val.type() == QVariant::Image || val.type() == QVariant::Pixmap) {
+ if (val.userType() == QMetaType::QImage || val.userType() == QMetaType::QPixmap) {
charFormat.setBackground(qvariant_cast<QPixmap>(val));
- } else if (val.type() == QVariant::ByteArray) {
+ } else if (val.userType() == QMetaType::QByteArray) {
QPixmap pm;
if (pm.loadFromData(val.toByteArray())) {
charFormat.setBackground(pm);
@@ -1907,9 +1907,9 @@ void QTextHtmlParser::importStyleSheet(const QString &href)
QVariant res = resourceProvider->resource(QTextDocument::StyleSheetResource, href);
QString css;
- if (res.type() == QVariant::String) {
+ if (res.userType() == QMetaType::QString) {
css = res.toString();
- } else if (res.type() == QVariant::ByteArray) {
+ } else if (res.userType() == QMetaType::QByteArray) {
// #### detect @charset
css = QString::fromUtf8(res.toByteArray());
}
@@ -2123,7 +2123,7 @@ QVector<QCss::Declaration> QTextHtmlParser::declarationsForNode(int node) const
QCss::StyleSelector::NodePtr n;
n.id = node;
- const char *extraPseudo = 0;
+ const char *extraPseudo = nullptr;
if (nodes.at(node).id == Html_a && nodes.at(node).hasHref)
extraPseudo = "link";
// Ensure that our own style is taken into consideration
diff --git a/src/gui/text/qtextimagehandler.cpp b/src/gui/text/qtextimagehandler.cpp
index f7117bfe0a..0d87a2135d 100644
--- a/src/gui/text/qtextimagehandler.cpp
+++ b/src/gui/text/qtextimagehandler.cpp
@@ -88,9 +88,9 @@ static QPixmap getPixmap(QTextDocument *doc, const QTextImageFormat &format, con
qreal sourcePixelRatio = 1.0;
name = resolveFileName(name, &url, devicePixelRatio, &sourcePixelRatio);
const QVariant data = doc->resource(QTextDocument::ImageResource, url);
- if (data.type() == QVariant::Pixmap || data.type() == QVariant::Image) {
+ if (data.userType() == QMetaType::QPixmap || data.userType() == QMetaType::QImage) {
pm = qvariant_cast<QPixmap>(data);
- } else if (data.type() == QVariant::ByteArray) {
+ } else if (data.userType() == QMetaType::QByteArray) {
pm.loadFromData(data.toByteArray());
}
@@ -170,9 +170,9 @@ static QImage getImage(QTextDocument *doc, const QTextImageFormat &format, const
qreal sourcePixelRatio = 1.0;
name = resolveFileName(name, &url, devicePixelRatio, &sourcePixelRatio);
const QVariant data = doc->resource(QTextDocument::ImageResource, url);
- if (data.type() == QVariant::Image) {
+ if (data.userType() == QMetaType::QImage) {
image = qvariant_cast<QImage>(data);
- } else if (data.type() == QVariant::ByteArray) {
+ } else if (data.userType() == QMetaType::QByteArray) {
image.loadFromData(data.toByteArray());
}
@@ -246,7 +246,7 @@ QSizeF QTextImageHandler::intrinsicSize(QTextDocument *doc, int posInDocument, c
QImage QTextImageHandler::image(QTextDocument *doc, const QTextImageFormat &imageFormat)
{
- Q_ASSERT(doc != 0);
+ Q_ASSERT(doc != nullptr);
return getImage(doc, imageFormat);
}
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index a3e194f835..02c42eaf03 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -350,7 +350,7 @@ QTextLayout::QTextLayout(const QString& text)
\a font.
All the metric and layout calculations will be done in terms of
- the paint device, \a paintdevice. If \a paintdevice is 0 the
+ the paint device, \a paintdevice. If \a paintdevice is \nullptr the
calculations will be done in screen metrics.
*/
@@ -1649,7 +1649,7 @@ namespace {
struct LineBreakHelper
{
LineBreakHelper()
- : glyphCount(0), maxGlyphs(0), currentPosition(0), fontEngine(0), logClusters(0),
+ : glyphCount(0), maxGlyphs(0), currentPosition(0), fontEngine(nullptr), logClusters(nullptr),
manualWrap(false), whiteSpaceOrObject(true)
{
}
@@ -1705,7 +1705,7 @@ namespace {
inline void calculateRightBearing(QFontEngine *engine, glyph_t glyph)
{
qreal rb;
- engine->getGlyphBearings(glyph, 0, &rb);
+ engine->getGlyphBearings(glyph, nullptr, &rb);
// We only care about negative right bearings, so we limit the range
// of the bearing here so that we can assume it's negative in the rest
@@ -2212,7 +2212,7 @@ static QGlyphRun glyphRunWithInfo(QFontEngine *fontEngine,
int textPosition,
int textLength)
{
- Q_ASSERT(logClusters != 0);
+ Q_ASSERT(logClusters != nullptr);
QGlyphRun glyphRun;
@@ -2593,7 +2593,7 @@ void QTextLine::draw(QPainter *p, const QPointF &pos, const QTextLayout::FormatR
} else { // si.isTab
QFont f = eng->font(si);
QTextItemInt gf(si, &f, format);
- gf.chars = 0;
+ gf.chars = nullptr;
gf.num_chars = 0;
gf.width = iterator.itemWidth;
QPainterPrivate::get(p)->drawTextItem(QPointF(iterator.x.toReal(), y.toReal()), gf, eng);
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index b845889c3d..77dcae0dc8 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -596,7 +596,7 @@ void QTextFramePrivate::remove_me()
parentFrame->d_func()->childFrames.removeAt(index);
childFrames.clear();
- parentFrame = 0;
+ parentFrame = nullptr;
}
/*!
@@ -654,10 +654,10 @@ QTextFrame::iterator QTextFrame::end() const
*/
QTextFrame::iterator::iterator()
{
- f = 0;
+ f = nullptr;
b = 0;
e = 0;
- cf = 0;
+ cf = nullptr;
cb = 0;
}
@@ -669,7 +669,7 @@ QTextFrame::iterator::iterator(QTextFrame *frame, int block, int begin, int end)
f = frame;
b = begin;
e = end;
- cf = 0;
+ cf = nullptr;
cb = block;
}
@@ -739,7 +739,7 @@ QTextFrame::iterator &QTextFrame::iterator::operator++()
if (cf) {
int end = cf->lastPosition() + 1;
cb = map.findNode(end);
- cf = 0;
+ cf = nullptr;
} else if (cb) {
cb = map.next(cb);
if (cb == e)
@@ -777,7 +777,7 @@ QTextFrame::iterator &QTextFrame::iterator::operator--()
if (cf) {
int start = cf->firstPosition() - 1;
cb = map.findNode(start);
- cf = 0;
+ cf = nullptr;
} else {
if (cb == b)
goto end;
@@ -907,7 +907,7 @@ QTextBlockUserData::~QTextBlockUserData()
bool QTextBlock::isValid() const
{
- return p != 0 && p->blockMap().isValid(n);
+ return p != nullptr && p->blockMap().isValid(n);
}
/*!
@@ -1079,7 +1079,7 @@ bool QTextBlock::contains(int position) const
QTextLayout *QTextBlock::layout() const
{
if (!p || !n)
- return 0;
+ return nullptr;
const QTextBlockData *b = p->blockMap().fragment(n);
if (!b->layout)
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index 0e8666565f..155ec43c50 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -70,7 +70,7 @@ static QString pixelToPoint(qreal pixels)
// strategies
class QOutputStrategy {
public:
- QOutputStrategy() : contentStream(0), counter(1) { }
+ QOutputStrategy() : contentStream(nullptr), counter(1) { }
virtual ~QOutputStrategy() {}
virtual void addFile(const QString &fileName, const QString &mimeType, const QByteArray &bytes) = 0;
@@ -240,7 +240,7 @@ void QTextOdfWriter::writeFrame(QXmlStreamWriter &writer, const QTextFrame *fram
}
QTextFrame::iterator iterator = frame->begin();
- QTextFrame *child = 0;
+ QTextFrame *child = nullptr;
int tableRow = -1;
while (! iterator.atEnd()) {
@@ -437,7 +437,7 @@ static bool probeImageData(QIODevice *device, QImage *image, QString *mimeType,
void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextFragment &fragment) const
{
writer.writeStartElement(drawNS, QString::fromLatin1("frame"));
- if (m_strategy == 0) {
+ if (m_strategy == nullptr) {
// don't do anything.
}
else if (fragment.charFormat().isImageFormat()) {
@@ -455,9 +455,9 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF
name.prepend(QLatin1String("qrc"));
QUrl url = QUrl(name);
const QVariant variant = m_document->resource(QTextDocument::ImageResource, url);
- if (variant.type() == QVariant::Image) {
+ if (variant.userType() == QMetaType::QImage) {
image = qvariant_cast<QImage>(variant);
- } else if (variant.type() == QVariant::ByteArray) {
+ } else if (variant.userType() == QMetaType::QByteArray) {
data = variant.toByteArray();
QBuffer buffer(&data);
@@ -997,8 +997,8 @@ QTextOdfWriter::QTextOdfWriter(const QTextDocument &document, QIODevice *device)
svgNS (QLatin1String("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0")),
m_document(&document),
m_device(device),
- m_strategy(0),
- m_codec(0),
+ m_strategy(nullptr),
+ m_codec(nullptr),
m_createArchive(true)
{
}
@@ -1093,7 +1093,7 @@ bool QTextOdfWriter::writeAll()
writer.writeEndElement(); // document-content
writer.writeEndDocument();
delete m_strategy;
- m_strategy = 0;
+ m_strategy = nullptr;
return true;
}
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index 2c2c05567f..2f195599f0 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -62,7 +62,7 @@ QTextOption::QTextOption()
unused2(0),
f(0),
tab(-1),
- d(0)
+ d(nullptr)
{
direction = Qt::LayoutDirectionAuto;
}
@@ -80,7 +80,7 @@ QTextOption::QTextOption(Qt::Alignment alignment)
unused2(0),
f(0),
tab(-1),
- d(0)
+ d(nullptr)
{
direction = QGuiApplication::layoutDirection();
}
@@ -107,7 +107,7 @@ QTextOption::QTextOption(const QTextOption &o)
unused2(o.unused2),
f(o.f),
tab(o.tab),
- d(0)
+ d(nullptr)
{
if (o.d)
d = new QTextOptionPrivate(*o.d);
@@ -124,7 +124,7 @@ QTextOption &QTextOption::operator=(const QTextOption &o)
if (this == &o)
return *this;
- QTextOptionPrivate* dNew = 0;
+ QTextOptionPrivate* dNew = nullptr;
if (o.d)
dNew = new QTextOptionPrivate(*o.d);
delete d;
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp
index fc7fbcac12..80c0f122e8 100644
--- a/src/gui/text/qzip.cpp
+++ b/src/gui/text/qzip.cpp
@@ -141,8 +141,8 @@ static int inflate(Bytef *dest, ulong *destLen, const Bytef *source, ulong sourc
if ((uLong)stream.avail_out != *destLen)
return Z_BUF_ERROR;
- stream.zalloc = (alloc_func)0;
- stream.zfree = (free_func)0;
+ stream.zalloc = (alloc_func)nullptr;
+ stream.zfree = (free_func)nullptr;
err = inflateInit2(&stream, -MAX_WBITS);
if (err != Z_OK)
@@ -172,9 +172,9 @@ static int deflate (Bytef *dest, ulong *destLen, const Bytef *source, ulong sour
stream.avail_out = (uInt)*destLen;
if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
- stream.zalloc = (alloc_func)0;
- stream.zfree = (free_func)0;
- stream.opaque = (voidpf)0;
+ stream.zalloc = (alloc_func)nullptr;
+ stream.zfree = (free_func)nullptr;
+ stream.opaque = (voidpf)nullptr;
err = deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY);
if (err != Z_OK) return err;
@@ -705,7 +705,7 @@ void QZipWriterPrivate::addEntry(EntryType type, const QString &fileName, const
}
// TODO add a check if data.length() > contents.length(). Then try to store the original and revert the compression method to be uncompressed
writeUInt(header.h.compressed_size, data.length());
- uint crc_32 = ::crc32(0, 0, 0);
+ uint crc_32 = ::crc32(0, nullptr, 0);
crc_32 = ::crc32(crc_32, (const uchar *)contents.constData(), contents.length());
writeUInt(header.h.crc_32, crc_32);
@@ -886,7 +886,7 @@ bool QZipReader::isReadable() const
bool QZipReader::exists() const
{
QFile *f = qobject_cast<QFile*> (d->device);
- if (f == 0)
+ if (f == nullptr)
return true;
return f->exists();
}
@@ -1178,7 +1178,7 @@ bool QZipWriter::isWritable() const
bool QZipWriter::exists() const
{
QFile *f = qobject_cast<QFile*> (d->device);
- if (f == 0)
+ if (f == nullptr)
return true;
return f->exists();
}
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index 99214c4960..763f309fc7 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -287,7 +287,7 @@ void QDesktopServices::setUrlHandler(const QString &scheme, QObject *receiver, c
*/
void QDesktopServices::unsetUrlHandler(const QString &scheme)
{
- setUrlHandler(scheme, 0, 0);
+ setUrlHandler(scheme, nullptr, nullptr);
}
#if QT_DEPRECATED_SINCE(5, 0)
diff --git a/src/gui/util/qgridlayoutengine.cpp b/src/gui/util/qgridlayoutengine.cpp
index 33adac40b2..4af5e47f8f 100644
--- a/src/gui/util/qgridlayoutengine.cpp
+++ b/src/gui/util/qgridlayoutengine.cpp
@@ -177,7 +177,7 @@ void QGridLayoutRowData::distributeMultiCells(const QGridLayoutRowInfo &rowInfo,
qreal extra = compare(box, totalBox, j);
if (extra > 0.0) {
calculateGeometries(start, end, box.q_sizes(j), dummy.data(), newSizes.data(),
- 0, totalBox, rowInfo, snapToPixelGrid);
+ nullptr, totalBox, rowInfo, snapToPixelGrid);
for (int k = 0; k < span; ++k)
extras[k].q_sizes(j) = newSizes[k];
@@ -988,7 +988,7 @@ void QGridLayoutEngine::removeItem(QGridLayoutItem *item)
for (int i = item->firstRow(); i <= item->lastRow(); ++i) {
for (int j = item->firstColumn(); j <= item->lastColumn(); ++j) {
if (itemAt(i, j) == item)
- setItemAt(i, j, 0);
+ setItemAt(i, j, nullptr);
}
}
@@ -1001,7 +1001,7 @@ QGridLayoutItem *QGridLayoutEngine::itemAt(int row, int column, Qt::Orientation
if (orientation == Qt::Horizontal)
qSwap(row, column);
if (uint(row) >= uint(rowCount()) || uint(column) >= uint(columnCount()))
- return 0;
+ return nullptr;
return q_grid.at((row * internalGridColumnCount()) + column);
}
@@ -1100,7 +1100,7 @@ QSizeF QGridLayoutEngine::sizeHint(Qt::SizeHint which, const QSizeF &constraint,
if (constraintOrientation() == Qt::Vertical) {
//We have items whose height depends on their width
if (constraint.width() >= 0) {
- ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], NULL, NULL, Qt::Horizontal, styleInfo);
+ ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], nullptr, nullptr, Qt::Horizontal, styleInfo);
QVector<qreal> sizehint_xx;
QVector<qreal> sizehint_widths;
@@ -1110,14 +1110,14 @@ QSizeF QGridLayoutEngine::sizeHint(Qt::SizeHint which, const QSizeF &constraint,
//Calculate column widths and positions, and put results in q_xx.data() and q_widths.data() so that we can use this information as
//constraints to find the row heights
q_columnData.calculateGeometries(0, columnCount(), width, sizehint_xx.data(), sizehint_widths.data(),
- 0, sizehint_totalBoxes[Hor], q_infos[Hor], m_snapToPixelGrid);
+ nullptr, sizehint_totalBoxes[Hor], q_infos[Hor], m_snapToPixelGrid);
ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], sizehint_xx.data(), sizehint_widths.data(), Qt::Vertical, styleInfo);
sizeHintCalculated = true;
}
} else {
if (constraint.height() >= 0) {
//We have items whose width depends on their height
- ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], NULL, NULL, Qt::Vertical, styleInfo);
+ ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], nullptr, nullptr, Qt::Vertical, styleInfo);
QVector<qreal> sizehint_yy;
QVector<qreal> sizehint_heights;
@@ -1127,7 +1127,7 @@ QSizeF QGridLayoutEngine::sizeHint(Qt::SizeHint which, const QSizeF &constraint,
//Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() so that we can use this information as
//constraints to find the column widths
q_rowData.calculateGeometries(0, rowCount(), height, sizehint_yy.data(), sizehint_heights.data(),
- 0, sizehint_totalBoxes[Ver], q_infos[Ver], m_snapToPixelGrid);
+ nullptr, sizehint_totalBoxes[Ver], q_infos[Ver], m_snapToPixelGrid);
ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], sizehint_yy.data(), sizehint_heights.data(), Qt::Horizontal, styleInfo);
sizeHintCalculated = true;
}
@@ -1137,8 +1137,8 @@ QSizeF QGridLayoutEngine::sizeHint(Qt::SizeHint which, const QSizeF &constraint,
}
//No items with height for width, so it doesn't matter which order we do these in
- ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], NULL, NULL, Qt::Horizontal, styleInfo);
- ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], NULL, NULL, Qt::Vertical, styleInfo);
+ ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], nullptr, nullptr, Qt::Horizontal, styleInfo);
+ ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], nullptr, nullptr, Qt::Vertical, styleInfo);
return QSizeF(q_totalBoxes[Hor].q_sizes(which), q_totalBoxes[Ver].q_sizes(which));
}
@@ -1147,7 +1147,7 @@ QLayoutPolicy::ControlTypes QGridLayoutEngine::controlTypes(LayoutSide side) con
Qt::Orientation orientation = (side == Top || side == Bottom) ? Qt::Vertical : Qt::Horizontal;
int row = (side == Top || side == Left) ? effectiveFirstRow(orientation)
: effectiveLastRow(orientation);
- QLayoutPolicy::ControlTypes result = 0;
+ QLayoutPolicy::ControlTypes result;
for (int column = columnCount(orientation) - 1; column >= 0; --column) {
if (QGridLayoutItem *item = itemAt(row, column, orientation))
@@ -1650,18 +1650,18 @@ void QGridLayoutEngine::ensureGeometries(const QSizeF &size,
if (constraintOrientation() != Qt::Horizontal) {
//We might have items whose height depends on their width (HFW)
- ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], NULL, NULL, Qt::Horizontal, styleInfo);
+ ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], nullptr, nullptr, Qt::Horizontal, styleInfo);
//Calculate column widths and positions, and put results in q_xx.data() and q_widths.data() so that we can use this information as
//constraints to find the row heights
q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(),
- 0, q_totalBoxes[Hor], q_infos[Hor], m_snapToPixelGrid);
+ nullptr, q_totalBoxes[Hor], q_infos[Hor], m_snapToPixelGrid);
ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], q_xx.data(), q_widths.data(), Qt::Vertical, styleInfo);
//Calculate row heights and positions, and put results in q_yy.data() and q_heights.data()
q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(),
q_descents.data(), q_totalBoxes[Ver], q_infos[Ver], m_snapToPixelGrid);
} else {
//We have items whose width depends on their height (WFH)
- ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], NULL, NULL, Qt::Vertical, styleInfo);
+ ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], nullptr, nullptr, Qt::Vertical, styleInfo);
//Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() so that we can use this information as
//constraints to find the column widths
q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(),
@@ -1669,7 +1669,7 @@ void QGridLayoutEngine::ensureGeometries(const QSizeF &size,
ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], q_yy.data(), q_heights.data(), Qt::Horizontal, styleInfo);
//Calculate row heights and positions, and put results in q_yy.data() and q_heights.data()
q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(),
- 0, q_totalBoxes[Hor], q_infos[Hor], m_snapToPixelGrid);
+ nullptr, q_totalBoxes[Hor], q_infos[Hor], m_snapToPixelGrid);
}
}
diff --git a/src/gui/util/qgridlayoutengine_p.h b/src/gui/util/qgridlayoutengine_p.h
index 5f0e84edb1..181326103b 100644
--- a/src/gui/util/qgridlayoutengine_p.h
+++ b/src/gui/util/qgridlayoutengine_p.h
@@ -276,7 +276,7 @@ class Q_GUI_EXPORT QGridLayoutItem
{
public:
QGridLayoutItem(int row, int column, int rowSpan = 1, int columnSpan = 1,
- Qt::Alignment alignment = nullptr);
+ Qt::Alignment alignment = { });
virtual ~QGridLayoutItem() {}
inline int firstRow() const { return q_firstRows[Ver]; }
@@ -339,7 +339,7 @@ private:
class Q_GUI_EXPORT QGridLayoutEngine
{
public:
- QGridLayoutEngine(Qt::Alignment defaultAlignment = Qt::Alignment(nullptr), bool snapToPixelGrid = false);
+ QGridLayoutEngine(Qt::Alignment defaultAlignment = { }, bool snapToPixelGrid = false);
inline ~QGridLayoutEngine() { qDeleteAll(q_items); }
int rowCount(Qt::Orientation orientation) const;
diff --git a/src/gui/util/qshadergenerator.cpp b/src/gui/util/qshadergenerator.cpp
index bcb985de54..4beed8ed25 100644
--- a/src/gui/util/qshadergenerator.cpp
+++ b/src/gui/util/qshadergenerator.cpp
@@ -273,11 +273,11 @@ namespace
const QByteArray placeholder = QByteArray(QByteArrayLiteral("$") + parameterName.toUtf8());
const QVariant parameter = node.parameter(parameterName);
if (parameter.userType() == qMetaTypeId<QShaderLanguage::StorageQualifier>()) {
- const QShaderLanguage::StorageQualifier qualifier = parameter.value<QShaderLanguage::StorageQualifier>();
+ const QShaderLanguage::StorageQualifier qualifier = qvariant_cast<QShaderLanguage::StorageQualifier>(parameter);
const QByteArray value = toGlsl(qualifier, format);
result.replace(placeholder, value);
} else if (parameter.userType() == qMetaTypeId<QShaderLanguage::VariableType>()) {
- const QShaderLanguage::VariableType type = parameter.value<QShaderLanguage::VariableType>();
+ const QShaderLanguage::VariableType type = qvariant_cast<QShaderLanguage::VariableType>(parameter);
const QByteArray value = toGlsl(type);
result.replace(placeholder, value);
} else {
diff --git a/src/gui/util/qshadergraphloader.cpp b/src/gui/util/qshadergraphloader.cpp
index a393e876e0..26848020f2 100644
--- a/src/gui/util/qshadergraphloader.cpp
+++ b/src/gui/util/qshadergraphloader.cpp
@@ -136,7 +136,7 @@ void QShaderGraphLoader::load()
if (prototypesValue.isObject()) {
QShaderNodesLoader loader;
loader.load(prototypesValue.toObject());
- m_prototypes.unite(loader.nodes());
+ m_prototypes.insert(loader.nodes());
} else {
qWarning() << "Invalid prototypes property, should be an object";
m_status = Error;
diff --git a/src/gui/util/qtexturefiledata.cpp b/src/gui/util/qtexturefiledata.cpp
index ebf46f8e4e..41cbd1b15a 100644
--- a/src/gui/util/qtexturefiledata.cpp
+++ b/src/gui/util/qtexturefiledata.cpp
@@ -247,7 +247,7 @@ void QTextureFileData::setLogName(const QByteArray &name)
static QByteArray glFormatName(quint32 fmt)
{
- const char *id = 0;
+ const char *id = nullptr;
#if QT_CONFIG(opengl)
id = QMetaEnum::fromType<QOpenGLTexture::TextureFormat>().valueToKey(fmt);
#endif
diff --git a/src/gui/util/qvalidator.cpp b/src/gui/util/qvalidator.cpp
index 2237b016e9..54cbb28ffa 100644
--- a/src/gui/util/qvalidator.cpp
+++ b/src/gui/util/qvalidator.cpp
@@ -688,7 +688,7 @@ QValidator::State QDoubleValidatorPrivate::validateWithLocale(QString &input, QL
return QValidator::Invalid;
bool ok = false;
- double i = buff.toDouble(&ok); // returns 0.0 if !ok
+ double i = locale.toDouble(input, &ok); // returns 0.0 if !ok
if (i == qt_qnan())
return QValidator::Invalid;
if (!ok)
diff --git a/src/gui/vulkan/qplatformvulkaninstance.cpp b/src/gui/vulkan/qplatformvulkaninstance.cpp
index 9d044bfd58..1b5d3370f0 100644
--- a/src/gui/vulkan/qplatformvulkaninstance.cpp
+++ b/src/gui/vulkan/qplatformvulkaninstance.cpp
@@ -80,6 +80,11 @@ QPlatformVulkanInstance::~QPlatformVulkanInstance()
{
}
+void QPlatformVulkanInstance::presentAboutToBeQueued(QWindow *window)
+{
+ Q_UNUSED(window);
+}
+
void QPlatformVulkanInstance::presentQueued(QWindow *window)
{
Q_UNUSED(window);
diff --git a/src/gui/vulkan/qplatformvulkaninstance.h b/src/gui/vulkan/qplatformvulkaninstance.h
index d47c59b5db..f96f1720fb 100644
--- a/src/gui/vulkan/qplatformvulkaninstance.h
+++ b/src/gui/vulkan/qplatformvulkaninstance.h
@@ -77,6 +77,7 @@ public:
virtual QByteArrayList enabledExtensions() const = 0;
virtual PFN_vkVoidFunction getInstanceProcAddr(const char *name) = 0;
virtual bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) = 0;
+ virtual void presentAboutToBeQueued(QWindow *window);
virtual void presentQueued(QWindow *window);
virtual void setDebugFilters(const QVector<QVulkanInstance::DebugFilter> &filters);
diff --git a/src/gui/vulkan/qvulkaninstance.cpp b/src/gui/vulkan/qvulkaninstance.cpp
index 0605d88cca..4b961a6f20 100644
--- a/src/gui/vulkan/qvulkaninstance.cpp
+++ b/src/gui/vulkan/qvulkaninstance.cpp
@@ -251,7 +251,6 @@ public:
QVulkanInstancePrivate(QVulkanInstance *q)
: q_ptr(q),
vkInst(VK_NULL_HANDLE),
- flags(0),
errorCode(VK_SUCCESS)
{ }
~QVulkanInstancePrivate() { reset(); }
@@ -759,7 +758,7 @@ VkSurfaceKHR QVulkanInstance::surfaceForWindow(QWindow *window)
// VkSurfaceKHR is non-dispatchable and maps to a pointer on x64 and a uint64 on x86.
// Therefore a pointer is returned from the platform plugin, not the value itself.
void *p = nativeInterface->nativeResourceForWindow(QByteArrayLiteral("vkSurface"), window);
- return p ? *static_cast<VkSurfaceKHR *>(p) : 0;
+ return p ? *static_cast<VkSurfaceKHR *>(p) : VK_NULL_HANDLE;
}
/*!
@@ -775,6 +774,20 @@ bool QVulkanInstance::supportsPresent(VkPhysicalDevice physicalDevice, uint32_t
}
/*!
+ This function should be called by the application's renderer before queuing
+ a present operation for \a window.
+
+ While on some platforms this will be a no-op, some may perform windowing
+ system dependent synchronization. For example, on Wayland this will
+ add send a wl_surface.frame request in order to prevent the driver from
+ blocking for minimized windows.
+ */
+void QVulkanInstance::presentAboutToBeQueued(QWindow *window)
+{
+ d_ptr->platformInst->presentAboutToBeQueued(window);
+}
+
+/*!
This function should be called by the application's renderer after queuing
a present operation for \a window.
diff --git a/src/gui/vulkan/qvulkaninstance.h b/src/gui/vulkan/qvulkaninstance.h
index 70f2fd5102..5b3db9a4c8 100644
--- a/src/gui/vulkan/qvulkaninstance.h
+++ b/src/gui/vulkan/qvulkaninstance.h
@@ -186,6 +186,7 @@ public:
bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window);
+ void presentAboutToBeQueued(QWindow *window);
void presentQueued(QWindow *window);
typedef bool (*DebugFilter)(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object,
diff --git a/src/gui/vulkan/qvulkanwindow.cpp b/src/gui/vulkan/qvulkanwindow.cpp
index 4b5c2b56ee..e211863f21 100644
--- a/src/gui/vulkan/qvulkanwindow.cpp
+++ b/src/gui/vulkan/qvulkanwindow.cpp
@@ -647,18 +647,40 @@ void QVulkanWindowPrivate::init()
#endif
qCDebug(lcGuiVk, "Using queue families: graphics = %u present = %u", gfxQueueFamilyIdx, presQueueFamilyIdx);
- VkDeviceQueueCreateInfo queueInfo[2];
+ QVector<VkDeviceQueueCreateInfo> queueInfo;
+ queueInfo.reserve(2);
const float prio[] = { 0 };
- memset(queueInfo, 0, sizeof(queueInfo));
- queueInfo[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
- queueInfo[0].queueFamilyIndex = gfxQueueFamilyIdx;
- queueInfo[0].queueCount = 1;
- queueInfo[0].pQueuePriorities = prio;
+ VkDeviceQueueCreateInfo addQueueInfo;
+ memset(&addQueueInfo, 0, sizeof(addQueueInfo));
+ addQueueInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
+ addQueueInfo.queueFamilyIndex = gfxQueueFamilyIdx;
+ addQueueInfo.queueCount = 1;
+ addQueueInfo.pQueuePriorities = prio;
+ queueInfo.append(addQueueInfo);
if (gfxQueueFamilyIdx != presQueueFamilyIdx) {
- queueInfo[1].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
- queueInfo[1].queueFamilyIndex = presQueueFamilyIdx;
- queueInfo[1].queueCount = 1;
- queueInfo[1].pQueuePriorities = prio;
+ addQueueInfo.queueFamilyIndex = presQueueFamilyIdx;
+ addQueueInfo.queueCount = 1;
+ addQueueInfo.pQueuePriorities = prio;
+ queueInfo.append(addQueueInfo);
+ }
+ if (queueCreateInfoModifier) {
+ queueCreateInfoModifier(queueFamilyProps.constData(), queueCount, queueInfo);
+ bool foundGfxQueue = false;
+ bool foundPresQueue = false;
+ for (const VkDeviceQueueCreateInfo& createInfo : qAsConst(queueInfo)) {
+ foundGfxQueue |= createInfo.queueFamilyIndex == gfxQueueFamilyIdx;
+ foundPresQueue |= createInfo.queueFamilyIndex == presQueueFamilyIdx;
+ }
+ if (!foundGfxQueue) {
+ qWarning("QVulkanWindow: Graphics queue missing after call to queueCreateInfoModifier");
+ status = StatusFail;
+ return;
+ }
+ if (!foundPresQueue) {
+ qWarning("QVulkanWindow: Present queue missing after call to queueCreateInfoModifier");
+ status = StatusFail;
+ return;
+ }
}
// Filter out unsupported extensions in order to keep symmetry
@@ -667,6 +689,15 @@ void QVulkanWindowPrivate::init()
QVulkanInfoVector<QVulkanExtension> supportedExtensions = q->supportedDeviceExtensions();
QByteArrayList reqExts = requestedDevExtensions;
reqExts.append("VK_KHR_swapchain");
+
+ QByteArray envExts = qgetenv("QT_VULKAN_DEVICE_EXTENSIONS");
+ if (!envExts.isEmpty()) {
+ QByteArrayList envExtList = envExts.split(';');
+ for (auto ext : reqExts)
+ envExtList.removeAll(ext);
+ reqExts.append(envExtList);
+ }
+
for (const QByteArray &ext : reqExts) {
if (supportedExtensions.contains(ext))
devExts.append(ext.constData());
@@ -676,8 +707,8 @@ void QVulkanWindowPrivate::init()
VkDeviceCreateInfo devInfo;
memset(&devInfo, 0, sizeof(devInfo));
devInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
- devInfo.queueCreateInfoCount = gfxQueueFamilyIdx == presQueueFamilyIdx ? 1 : 2;
- devInfo.pQueueCreateInfos = queueInfo;
+ devInfo.queueCreateInfoCount = queueInfo.size();
+ devInfo.pQueueCreateInfos = queueInfo.constData();
devInfo.enabledExtensionCount = devExts.count();
devInfo.ppEnabledExtensionNames = devExts.constData();
@@ -1546,6 +1577,52 @@ bool QVulkanWindow::event(QEvent *e)
}
/*!
+ \typedef QVulkanWindow::QueueCreateInfoModifier
+
+ A function function that is called during graphics initialization to add
+ additAional queues that should be created.
+
+ Set if the renderer needs additional queues besides the default graphics
+ queue (e.g. a transfer queue).
+ The provided queue family properties can be used to select the indices for
+ the additional queues.
+ The renderer can subsequently request the actual queue in initResources().
+
+ Note when requesting additional graphics queues: Qt itself always requests
+ a graphics queue, you'll need to search queueCreateInfo for the appropriate
+ entry and manipulate it to obtain the additional queue.
+
+ \sa setQueueCreateInfoModifier()
+ */
+
+/*!
+ Return a previously set queue create info modification function.
+
+ \sa setQueueCreateInfoModifier()
+
+ \since 5.15
+ */
+QVulkanWindow::QueueCreateInfoModifier QVulkanWindow::queueCreateInfoModifier() const
+{
+ Q_D(const QVulkanWindow);
+ return d->queueCreateInfoModifier;
+}
+
+/*!
+ Set a queue create info modification function.
+
+ \sa queueCreateInfoModifier()
+
+ \since 5.15
+ */
+void QVulkanWindow::setQueueCreateInfoModifier(QueueCreateInfoModifier modifier)
+{
+ Q_D(QVulkanWindow);
+ d->queueCreateInfoModifier = modifier;
+}
+
+
+/*!
Returns true if this window has successfully initialized all Vulkan
resources, including the swapchain.
@@ -1798,7 +1875,7 @@ void QVulkanWindowPrivate::beginFrame()
// build new draw command buffer
if (image.cmdBuf) {
devFuncs->vkFreeCommandBuffers(dev, cmdPool, 1, &image.cmdBuf);
- image.cmdBuf = 0;
+ image.cmdBuf = nullptr;
}
VkCommandBufferAllocateInfo cmdBufInfo = {
@@ -1950,6 +2027,10 @@ void QVulkanWindowPrivate::endFrame()
presInfo.waitSemaphoreCount = 1;
presInfo.pWaitSemaphores = gfxQueueFamilyIdx == presQueueFamilyIdx ? &frame.drawSem : &frame.presTransSem;
+ // Do platform-specific WM notification. F.ex. essential on Wayland in
+ // order to circumvent driver frame callbacks
+ inst->presentAboutToBeQueued(q);
+
err = vkQueuePresentKHR(gfxQueue, &presInfo);
if (err != VK_SUCCESS) {
if (err == VK_ERROR_OUT_OF_DATE_KHR) {
@@ -2211,6 +2292,23 @@ VkQueue QVulkanWindow::graphicsQueue() const
}
/*!
+ Returns the family index of the active graphics queue.
+
+ \note Calling this function is only valid from the invocation of
+ QVulkanWindowRenderer::initResources() up until
+ QVulkanWindowRenderer::releaseResources(). Implementations of
+ QVulkanWindowRenderer::updateQueueCreateInfo() can also call this
+ function.
+
+ \since 5.15
+ */
+uint32_t QVulkanWindow::graphicsQueueFamilyIndex() const
+{
+ Q_D(const QVulkanWindow);
+ return d->gfxQueueFamilyIdx;
+}
+
+/*!
Returns the active graphics command pool.
\note Calling this function is only valid from the invocation of
diff --git a/src/gui/vulkan/qvulkanwindow.h b/src/gui/vulkan/qvulkanwindow.h
index 927c81042f..530b6c0744 100644
--- a/src/gui/vulkan/qvulkanwindow.h
+++ b/src/gui/vulkan/qvulkanwindow.h
@@ -103,6 +103,12 @@ public:
QVector<int> supportedSampleCounts();
void setSampleCount(int sampleCount);
+ typedef std::function<void(const VkQueueFamilyProperties *,
+ uint32_t,
+ QVector<VkDeviceQueueCreateInfo> &)> QueueCreateInfoModifier;
+ QueueCreateInfoModifier queueCreateInfoModifier() const;
+ void setQueueCreateInfoModifier(QueueCreateInfoModifier modifier);
+
bool isValid() const;
virtual QVulkanWindowRenderer *createRenderer();
@@ -112,6 +118,7 @@ public:
const VkPhysicalDeviceProperties *physicalDeviceProperties() const;
VkDevice device() const;
VkQueue graphicsQueue() const;
+ uint32_t graphicsQueueFamilyIndex() const;
VkCommandPool graphicsCommandPool() const;
uint32_t hostVisibleMemoryIndex() const;
uint32_t deviceLocalMemoryIndex() const;
diff --git a/src/gui/vulkan/qvulkanwindow_p.h b/src/gui/vulkan/qvulkanwindow_p.h
index fb374a5564..915e359673 100644
--- a/src/gui/vulkan/qvulkanwindow_p.h
+++ b/src/gui/vulkan/qvulkanwindow_p.h
@@ -97,11 +97,12 @@ public:
int physDevIndex = 0;
QVector<VkPhysicalDevice> physDevs;
QVector<VkPhysicalDeviceProperties> physDevProps;
- QVulkanWindow::Flags flags = nullptr;
+ QVulkanWindow::Flags flags;
QByteArrayList requestedDevExtensions;
QHash<VkPhysicalDevice, QVulkanInfoVector<QVulkanExtension> > supportedDevExtensions;
QVector<VkFormat> requestedColorFormats;
VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_1_BIT;
+ QVulkanWindow::QueueCreateInfoModifier queueCreateInfoModifier;
VkDevice dev = VK_NULL_HANDLE;
QVulkanDeviceFunctions *devFuncs;
diff --git a/src/network/access/qabstractprotocolhandler.cpp b/src/network/access/qabstractprotocolhandler.cpp
index f15dfe6899..6847816ba7 100644
--- a/src/network/access/qabstractprotocolhandler.cpp
+++ b/src/network/access/qabstractprotocolhandler.cpp
@@ -43,7 +43,7 @@
QT_BEGIN_NAMESPACE
QAbstractProtocolHandler::QAbstractProtocolHandler(QHttpNetworkConnectionChannel *channel)
- : m_channel(channel), m_reply(0), m_socket(m_channel->socket), m_connection(m_channel->connection)
+ : m_channel(channel), m_reply(nullptr), m_socket(m_channel->socket), m_connection(m_channel->connection)
{
Q_ASSERT(m_channel);
Q_ASSERT(m_socket);
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index cc230a5411..cda800ce35 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -74,7 +74,7 @@ public:
CsConnectionRefused
};
- QFtpDTP(QFtpPI *p, QObject *parent = 0);
+ QFtpDTP(QFtpPI *p, QObject *parent = nullptr);
void setData(QByteArray *);
void setDevice(QIODevice *);
@@ -149,7 +149,7 @@ class QFtpPI : public QObject
Q_OBJECT
public:
- QFtpPI(QObject *parent = 0);
+ QFtpPI(QObject *parent = nullptr);
void connectToHost(const QString &host, quint16 port);
@@ -229,7 +229,7 @@ class QFtpCommand
{
public:
QFtpCommand(QFtp::Command cmd, const QStringList &raw, const QByteArray &ba);
- QFtpCommand(QFtp::Command cmd, const QStringList &raw, QIODevice *dev = 0);
+ QFtpCommand(QFtp::Command cmd, const QStringList &raw, QIODevice *dev = nullptr);
~QFtpCommand();
int id;
@@ -279,7 +279,7 @@ QFtpCommand::~QFtpCommand()
*********************************************************************/
QFtpDTP::QFtpDTP(QFtpPI *p, QObject *parent) :
QObject(parent),
- socket(0),
+ socket(nullptr),
listener(this),
pi(p),
callWriteData(false)
@@ -314,10 +314,10 @@ void QFtpDTP::connectToHost(const QString & host, quint16 port)
if (socket) {
delete socket;
- socket = 0;
+ socket = nullptr;
}
socket = new QTcpSocket(this);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the socket
socket->setProperty("_q_networksession", property("_q_networksession"));
#endif
@@ -333,7 +333,7 @@ void QFtpDTP::connectToHost(const QString & host, quint16 port)
int QFtpDTP::setupListener(const QHostAddress &address)
{
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the socket
listener.setProperty("_q_networksession", property("_q_networksession"));
#endif
@@ -427,7 +427,7 @@ void QFtpDTP::writeData()
}
// do we continue uploading?
- callWriteData = data.dev != 0;
+ callWriteData = data.dev != nullptr;
}
}
@@ -779,7 +779,7 @@ void QFtpDTP::setupSocket()
void QFtpDTP::clearData()
{
is_ba = false;
- data.dev = 0;
+ data.dev = nullptr;
}
/**********************************************************************
@@ -792,7 +792,7 @@ QFtpPI::QFtpPI(QObject *parent) :
rawCommand(false),
transferConnectionExtended(true),
dtp(this),
- commandSocket(0),
+ commandSocket(nullptr),
state(Begin), abortState(None),
currentCmd(QString()),
waitForDtpToConnect(false),
@@ -817,7 +817,7 @@ QFtpPI::QFtpPI(QObject *parent) :
void QFtpPI::connectToHost(const QString &host, quint16 port)
{
emit connectState(QFtp::HostLookup);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the socket & DTP
commandSocket.setProperty("_q_networksession", property("_q_networksession"));
dtp.setProperty("_q_networksession", property("_q_networksession"));
@@ -1820,7 +1820,7 @@ int QFtp::cd(const QString &dir)
\internal
Downloads the file \a file from the server.
- If \a dev is 0, then the readyRead() signal is emitted when there
+ If \a dev is \nullptr, then the readyRead() signal is emitted when there
is data available to read. You can then read the data with the
read() or readAll() functions.
@@ -2173,10 +2173,10 @@ QFtp::Command QFtp::currentCommand() const
QIODevice* QFtp::currentDevice() const
{
if (d_func()->pending.isEmpty())
- return 0;
+ return nullptr;
QFtpCommand *c = d_func()->pending.first();
if (c->is_ba)
- return 0;
+ return nullptr;
return c->data.dev;
}
@@ -2287,7 +2287,7 @@ void QFtpPrivate::_q_startNextCommand()
c->rawCmds.clear();
_q_piFinished(QLatin1String("Proxy set to ") + proxyHost + QLatin1Char(':') + QString::number(proxyPort));
} else if (c->command == QFtp::ConnectToHost) {
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the PI
pi.setProperty("_q_networksession", q->property("_q_networksession"));
#endif
diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp
index c59df9d8b8..d6fefc4314 100644
--- a/src/network/access/qhttpmultipart.cpp
+++ b/src/network/access/qhttpmultipart.cpp
@@ -111,7 +111,7 @@ QHttpPart::QHttpPart(const QHttpPart &other) : d(other.d)
*/
QHttpPart::~QHttpPart()
{
- d = 0;
+ d = nullptr;
}
/*!
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 21c6359807..fce01bf349 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -135,7 +135,7 @@ void QHttpNetworkConnectionPrivate::init()
for (int i = 0; i < channelCount; i++) {
channels[i].setConnection(this->q_func());
channels[i].ssl = encrypt;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//push session down to channels
channels[i].networkSession = networkSession;
#endif
@@ -382,9 +382,9 @@ void QHttpNetworkConnectionPrivate::emitReplyError(QAbstractSocket *socket,
// Clean the channel
channels[i].close();
- channels[i].reply = 0;
+ channels[i].reply = nullptr;
if (channels[i].protocolHandler)
- channels[i].protocolHandler->setReply(0);
+ channels[i].protocolHandler->setReply(nullptr);
channels[i].request = QHttpNetworkRequest();
if (socket)
channels[i].requeueCurrentlyPipelinedRequests();
@@ -408,7 +408,7 @@ void QHttpNetworkConnectionPrivate::copyCredentials(int fromChannel, QAuthentica
}
// select another channel
- QAuthenticator* otherAuth = 0;
+ QAuthenticator* otherAuth = nullptr;
for (int i = 0; i < activeChannelCount; ++i) {
if (i == fromChannel)
continue;
@@ -441,7 +441,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
if (authMethod != QAuthenticatorPrivate::None) {
int i = indexOf(socket);
//Use a single authenticator for all domains. ### change later to use domain/realm
- QAuthenticator* auth = 0;
+ QAuthenticator* auth = nullptr;
if (isProxy) {
auth = &channels[i].proxyAuthenticator;
channels[i].proxyAuthMethod = authMethod;
@@ -496,7 +496,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
// we need to bail out if authentication is required.
if (priv->phase == QAuthenticatorPrivate::Done || !reply->request().withCredentials()) {
// Reset authenticator so the next request on that channel does not get messed up
- auth = 0;
+ auth = nullptr;
if (isProxy)
channels[i].proxyAuthenticator = QAuthenticator();
else
@@ -766,7 +766,7 @@ void QHttpNetworkConnectionPrivate::fillPipeline(QAbstractSocket *socket)
int i = indexOf(socket);
// return fast if there was no reply right now processed
- if (channels[i].reply == 0)
+ if (channels[i].reply == nullptr)
return;
if (! (defaultPipelineLength - channels[i].alreadyPipelinedRequests.length() >= defaultRePipelineLength)) {
@@ -937,9 +937,9 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
for (int i = 0; i < activeChannelCount; ++i) {
// is the reply associated the currently processing of this channel?
if (channels[i].reply == reply) {
- channels[i].reply = 0;
+ channels[i].reply = nullptr;
if (channels[i].protocolHandler)
- channels[i].protocolHandler->setReply(0);
+ channels[i].protocolHandler->setReply(nullptr);
channels[i].request = QHttpNetworkRequest();
channels[i].resendCurrent = false;
@@ -1272,7 +1272,7 @@ void QHttpNetworkConnectionPrivate::startNetworkLayerStateLookup()
channels[1].networkLayerPreference = QAbstractSocket::IPv6Protocol;
int timeout = 300;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
if (networkSession) {
const QNetworkConfiguration::BearerType bearerType = networkSession->configuration().bearerType();
if (bearerType == QNetworkConfiguration::Bearer2G)
@@ -1314,7 +1314,7 @@ void QHttpNetworkConnectionPrivate::_q_connectDelayedChannel()
channels[1].ensureConnection();
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
QHttpNetworkConnection::QHttpNetworkConnection(const QString &hostName, quint16 port, bool encrypt,
QHttpNetworkConnection::ConnectionType connectionType,
QObject *parent, QSharedPointer<QNetworkSession> networkSession)
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index 6808a0c0ac..845b55bc5d 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -101,7 +101,7 @@ public:
ConnectionTypeHTTP2Direct
};
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
explicit QHttpNetworkConnection(const QString &hostName, quint16 port = 80, bool encrypt = false,
ConnectionType connectionType = ConnectionTypeHTTP,
QObject *parent = nullptr, QSharedPointer<QNetworkSession> networkSession
@@ -292,7 +292,7 @@ public:
QSharedPointer<QSslContext> sslContext;
#endif
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
QSharedPointer<QNetworkSession> networkSession;
#endif
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 39f392a79b..72af21bd8f 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -57,7 +57,7 @@
# include <QtNetwork/qsslcipher.h>
#endif
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
#include "private/qnetworksession_p.h"
#endif
@@ -87,11 +87,11 @@ private:
static const int reconnectAttemptsDefault = 3;
QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel()
- : socket(0)
+ : socket(nullptr)
, ssl(false)
, isInitialized(false)
, state(IdleState)
- , reply(0)
+ , reply(nullptr)
, written(0)
, bytesTotal(0)
, resendCurrent(false)
@@ -102,13 +102,13 @@ QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel()
, proxyAuthMethod(QAuthenticatorPrivate::None)
, authenticationCredentialsSent(false)
, proxyCredentialsSent(false)
- , protocolHandler(0)
+ , protocolHandler(nullptr)
#ifndef QT_NO_SSL
, ignoreAllSslErrors(false)
#endif
, pipeliningSupported(PipeliningSupportUnknown)
, networkLayerPreference(QAbstractSocket::AnyIPProtocol)
- , connection(0)
+ , connection(nullptr)
{
// Inlining this function in the header leads to compiler error on
// release-armv5, on at least timebox 9.2 and 10.1.
@@ -124,7 +124,7 @@ void QHttpNetworkConnectionChannel::init()
#else
socket = new QTcpSocket;
#endif
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//push session down to socket
if (networkSession)
socket->setProperty("_q_networksession", QVariant::fromValue(networkSession));
@@ -295,9 +295,9 @@ void QHttpNetworkConnectionChannel::handleUnexpectedEOF()
close();
reply->d_func()->errorString = connection->d_func()->errorDetail(QNetworkReply::RemoteHostClosedError, socket);
emit reply->finishedWithError(QNetworkReply::RemoteHostClosedError, reply->d_func()->errorString);
- reply = 0;
+ reply = nullptr;
if (protocolHandler)
- protocolHandler->setReply(0);
+ protocolHandler->setReply(nullptr);
request = QHttpNetworkRequest();
QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
} else {
@@ -526,8 +526,8 @@ void QHttpNetworkConnectionChannel::allDone()
// problem.
if (!resendCurrent) {
request = QHttpNetworkRequest();
- reply = 0;
- protocolHandler->setReply(0);
+ reply = nullptr;
+ protocolHandler->setReply(nullptr);
}
// move next from pipeline to current request
@@ -1100,9 +1100,9 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
if (reply) {
reply->d_func()->errorString = errorString;
emit reply->finishedWithError(errorCode, errorString);
- reply = 0;
+ reply = nullptr;
if (protocolHandler)
- protocolHandler->setReply(0);
+ protocolHandler->setReply(nullptr);
}
} while (!connection->d_func()->highPriorityQueue.isEmpty()
|| !connection->d_func()->lowPriorityQueue.isEmpty());
diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h
index 270b3eb9ba..d8ac3979d1 100644
--- a/src/network/access/qhttpnetworkconnectionchannel_p.h
+++ b/src/network/access/qhttpnetworkconnectionchannel_p.h
@@ -139,7 +139,7 @@ public:
#endif
// to emit the signal for all in-flight replies:
void emitFinishedWithError(QNetworkReply::NetworkError error, const char *message);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
QSharedPointer<QNetworkSession> networkSession;
#endif
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index a8b635c45a..af456c3607 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -330,12 +330,12 @@ QHttpNetworkReplyPrivate::QHttpNetworkReplyPrivate(const QUrl &newUrl)
currentlyUploadedDataInWindow(0),
totallyUploadedData(0),
removedContentLength(-1),
- connection(0),
+ connection(nullptr),
autoDecompress(false), responseData(), requestIsPrepared(false)
,pipeliningUsed(false), spdyUsed(false), downstreamLimited(false)
- ,userProvidedDownloadBuffer(0)
+ ,userProvidedDownloadBuffer(nullptr)
#ifndef QT_NO_COMPRESS
- ,inflateStrm(0)
+ ,inflateStrm(nullptr)
#endif
{
@@ -375,8 +375,8 @@ void QHttpNetworkReplyPrivate::clearHttpLayerInformation()
// TODO: Isn't everything HTTP layer related? We don't need to set connection and connectionChannel to 0 at all
void QHttpNetworkReplyPrivate::clear()
{
- connection = 0;
- connectionChannel = 0;
+ connection = nullptr;
+ connectionChannel = nullptr;
autoDecompress = false;
clearHttpLayerInformation();
}
diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp
index a3f71b8d2f..5fb8885bdf 100644
--- a/src/network/access/qhttpnetworkrequest.cpp
+++ b/src/network/access/qhttpnetworkrequest.cpp
@@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(QHttpNetworkRequest::Operation op,
QHttpNetworkRequest::Priority pri, const QUrl &newUrl)
- : QHttpNetworkHeaderPrivate(newUrl), operation(op), priority(pri), uploadByteDevice(0),
+ : QHttpNetworkHeaderPrivate(newUrl), operation(op), priority(pri), uploadByteDevice(nullptr),
autoDecompress(false), pipeliningAllowed(false), spdyAllowed(false), http2Allowed(false),
http2Direct(false), withCredentials(true), preConnect(false), redirectCount(0),
redirectPolicy(QNetworkRequest::ManualRedirectPolicy)
diff --git a/src/network/access/qhttpprotocolhandler.cpp b/src/network/access/qhttpprotocolhandler.cpp
index edcbdcbe0e..981effb54f 100644
--- a/src/network/access/qhttpprotocolhandler.cpp
+++ b/src/network/access/qhttpprotocolhandler.cpp
@@ -233,7 +233,7 @@ void QHttpProtocolHandler::_q_readyRead()
char c;
qint64 ret = m_socket->peek(&c, 1);
if (ret < 0) {
- m_channel->_q_error(m_socket->error());
+ m_channel->_q_error(m_socket->socketError());
// We still need to handle the reply so it emits its signals etc.
if (m_reply)
_q_receiveReply();
@@ -278,7 +278,7 @@ bool QHttpProtocolHandler::sendRequest()
m_reply->d_func()->state = QHttpNetworkReplyPrivate::AllDoneState;
m_channel->allDone();
m_connection->preConnectFinished(); // will only decrease the counter
- m_reply = 0; // so we can reuse this channel
+ m_reply = nullptr; // so we can reuse this channel
return true; // we have a working connection and are done
}
@@ -373,7 +373,7 @@ bool QHttpProtocolHandler::sendRequest()
// premature eof happened
m_connection->d_func()->emitReplyError(m_socket, m_reply, QNetworkReply::UnknownNetworkError);
return false;
- } else if (readPointer == 0 || currentReadSize == 0) {
+ } else if (readPointer == nullptr || currentReadSize == 0) {
// nothing to read currently, break the loop
break;
} else {
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index 63a3c4f204..7757fb9503 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -185,11 +185,11 @@ public:
QNetworkAccessCachedHttpConnection(const QString &hostName, quint16 port, bool encrypt,
QHttpNetworkConnection::ConnectionType connectionType)
: QHttpNetworkConnection(hostName, port, encrypt, connectionType)
-#else
+#else // ### Qt6: Remove section
QNetworkAccessCachedHttpConnection(const QString &hostName, quint16 port, bool encrypt,
QHttpNetworkConnection::ConnectionType connectionType,
QSharedPointer<QNetworkSession> networkSession)
- : QHttpNetworkConnection(hostName, port, encrypt, connectionType, /*parent=*/0,
+ : QHttpNetworkConnection(hostName, port, encrypt, connectionType, /*parent=*/nullptr,
std::move(networkSession))
#endif
{
@@ -241,9 +241,9 @@ QHttpThreadDelegate::QHttpThreadDelegate(QObject *parent) :
, removedContentLength(-1)
, incomingErrorCode(QNetworkReply::NoError)
, downloadBuffer()
- , httpConnection(0)
- , httpReply(0)
- , synchronousRequestLoop(0)
+ , httpConnection(nullptr)
+ , httpReply(nullptr)
+ , synchronousRequestLoop(nullptr)
{
}
@@ -348,7 +348,7 @@ void QHttpThreadDelegate::startRequest()
#ifdef QT_NO_BEARERMANAGEMENT
httpConnection = new QNetworkAccessCachedHttpConnection(urlCopy.host(), urlCopy.port(), ssl,
connectionType);
-#else
+#else // ### Qt6: Remove section
httpConnection = new QNetworkAccessCachedHttpConnection(urlCopy.host(), urlCopy.port(), ssl,
connectionType,
networkSession);
@@ -439,7 +439,7 @@ void QHttpThreadDelegate::abortRequest()
if (httpReply) {
httpReply->abort();
delete httpReply;
- httpReply = 0;
+ httpReply = nullptr;
}
// Got aborted by the timeout timer
@@ -545,7 +545,7 @@ void QHttpThreadDelegate::finishedSlot()
QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "deleteLater", Qt::QueuedConnection);
- httpReply = 0;
+ httpReply = nullptr;
}
void QHttpThreadDelegate::synchronousFinishedSlot()
@@ -568,7 +568,7 @@ void QHttpThreadDelegate::synchronousFinishedSlot()
QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection);
QMetaObject::invokeMethod(synchronousRequestLoop, "quit", Qt::QueuedConnection);
- httpReply = 0;
+ httpReply = nullptr;
}
void QHttpThreadDelegate::finishedWithErrorSlot(QNetworkReply::NetworkError errorCode, const QString &detail)
@@ -590,7 +590,7 @@ void QHttpThreadDelegate::finishedWithErrorSlot(QNetworkReply::NetworkError erro
QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "deleteLater", Qt::QueuedConnection);
- httpReply = 0;
+ httpReply = nullptr;
}
@@ -609,7 +609,7 @@ void QHttpThreadDelegate::synchronousFinishedWithErrorSlot(QNetworkReply::Networ
QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection);
QMetaObject::invokeMethod(synchronousRequestLoop, "quit", Qt::QueuedConnection);
- httpReply = 0;
+ httpReply = nullptr;
}
static void downloadBufferDeleter(char *ptr)
diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h
index 355d1afc30..a5272fc15c 100644
--- a/src/network/access/qhttpthreaddelegate_p.h
+++ b/src/network/access/qhttpthreaddelegate_p.h
@@ -118,7 +118,7 @@ public:
QNetworkReply::NetworkError incomingErrorCode;
QString incomingErrorDetail;
QHttp2Configuration http2Parameters;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
QSharedPointer<QNetworkSession> networkSession;
#endif
diff --git a/src/network/access/qnetworkaccessauthenticationmanager.cpp b/src/network/access/qnetworkaccessauthenticationmanager.cpp
index b661cc45b3..0df11684b1 100644
--- a/src/network/access/qnetworkaccessauthenticationmanager.cpp
+++ b/src/network/access/qnetworkaccessauthenticationmanager.cpp
@@ -71,7 +71,7 @@ public:
if (it == end() && !isEmpty())
--it;
if (it == end() || !domain.startsWith(it->domain))
- return 0;
+ return nullptr;
return &*it;
}
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index 566e410051..9d7e7200fa 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -105,7 +105,7 @@ QNetworkAccessBackend *QNetworkAccessManagerPrivate::findBackend(QNetworkAccessM
++it;
}
}
- return 0;
+ return nullptr;
}
QStringList QNetworkAccessManagerPrivate::backendSupportedSchemes() const
@@ -131,7 +131,7 @@ QNonContiguousByteDevice* QNetworkAccessBackend::createUploadByteDevice()
else if (reply->outgoingData) {
uploadByteDevice = QNonContiguousByteDeviceFactory::createShared(reply->outgoingData);
} else {
- return 0;
+ return nullptr;
}
// We want signal emissions only for normal asynchronous uploads
@@ -151,8 +151,8 @@ void QNetworkAccessBackend::emitReplyUploadProgress(qint64 bytesSent, qint64 byt
}
QNetworkAccessBackend::QNetworkAccessBackend()
- : manager(0)
- , reply(0)
+ : manager(nullptr)
+ , reply(nullptr)
, synchronous(false)
{
}
@@ -223,7 +223,7 @@ QList<QNetworkProxy> QNetworkAccessBackend::proxyList() const
QAbstractNetworkCache *QNetworkAccessBackend::networkCache() const
{
if (!manager)
- return 0;
+ return nullptr;
return manager->networkCache;
}
@@ -371,7 +371,7 @@ void QNetworkAccessBackend::sslErrors(const QList<QSslError> &errors)
*/
bool QNetworkAccessBackend::start()
{
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
// For bearer, check if session start is required
QSharedPointer<QNetworkSession> networkSession(manager->getNetworkSession());
if (networkSession) {
diff --git a/src/network/access/qnetworkaccesscache.cpp b/src/network/access/qnetworkaccesscache.cpp
index b694a2c999..ba092f2618 100644
--- a/src/network/access/qnetworkaccesscache.cpp
+++ b/src/network/access/qnetworkaccesscache.cpp
@@ -73,7 +73,7 @@ struct QNetworkAccessCache::Node
int useCount;
Node()
- : older(0), newer(0), object(0), useCount(0)
+ : older(nullptr), newer(nullptr), object(nullptr), useCount(0)
{ }
};
@@ -103,7 +103,7 @@ void QNetworkAccessCache::CacheableObject::setShareable(bool enable)
}
QNetworkAccessCache::QNetworkAccessCache()
- : oldest(0), newest(0)
+ : oldest(nullptr), newest(nullptr)
{
}
@@ -130,7 +130,7 @@ void QNetworkAccessCache::clear()
timer.stop();
- oldest = newest = 0;
+ oldest = newest = nullptr;
}
/*!
@@ -145,11 +145,11 @@ void QNetworkAccessCache::linkEntry(const QByteArray &key)
Node *const node = &it.value();
Q_ASSERT(node != oldest && node != newest);
- Q_ASSERT(node->older == 0 && node->newer == 0);
+ Q_ASSERT(node->older == nullptr && node->newer == nullptr);
Q_ASSERT(node->useCount == 0);
if (newest) {
- Q_ASSERT(newest->newer == 0);
+ Q_ASSERT(newest->newer == nullptr);
newest->newer = node;
node->older = newest;
}
@@ -186,7 +186,7 @@ bool QNetworkAccessCache::unlinkEntry(const QByteArray &key)
if (node->newer)
node->newer->older = node->older;
- node->newer = node->older = 0;
+ node->newer = node->older = nullptr;
return wasOldest;
}
@@ -235,9 +235,9 @@ void QNetworkAccessCache::timerEvent(QTimerEvent *)
// fixup the list
if (oldest)
- oldest->older = 0;
+ oldest->older = nullptr;
else
- newest = 0;
+ newest = nullptr;
updateTimer();
}
@@ -277,7 +277,7 @@ bool QNetworkAccessCache::requestEntry(const QByteArray &key, QObject *target, c
if (node->useCount > 0 && !node->object->shareable) {
// object is not shareable and is in use
// queue for later use
- Q_ASSERT(node->older == 0 && node->newer == 0);
+ Q_ASSERT(node->older == nullptr && node->newer == nullptr);
node->receiverQueue.push_back({target, member});
// request queued
@@ -296,7 +296,7 @@ QNetworkAccessCache::CacheableObject *QNetworkAccessCache::requestEntryNow(const
{
NodeHash::Iterator it = hash.find(key);
if (it == hash.end())
- return 0;
+ return nullptr;
if (it->useCount > 0) {
if (it->object->shareable) {
++it->useCount;
@@ -304,7 +304,7 @@ QNetworkAccessCache::CacheableObject *QNetworkAccessCache::requestEntryNow(const
}
// object in use and not shareable
- return 0;
+ return nullptr;
}
// entry not in use, let the caller have it
diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp
index 67a856506c..0406f2fac1 100644
--- a/src/network/access/qnetworkaccessdebugpipebackend.cpp
+++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp
@@ -70,13 +70,13 @@ QNetworkAccessDebugPipeBackendFactory::create(QNetworkAccessManager::Operation o
default:
// no, we can't handle this operation
- return 0;
+ return nullptr;
}
QUrl url = request.url();
if (url.scheme() == QLatin1String("debugpipe"))
return new QNetworkAccessDebugPipeBackend;
- return 0;
+ return nullptr;
}
QNetworkAccessDebugPipeBackend::QNetworkAccessDebugPipeBackend()
@@ -188,7 +188,7 @@ void QNetworkAccessDebugPipeBackend::pushFromUpstreamToSocket()
emitReplyUploadProgress(bytesUploaded, bytesUploaded);
possiblyFinish();
break;
- } else if (haveRead == 0 || readPointer == 0) {
+ } else if (haveRead == 0 || readPointer == nullptr) {
// nothing to read right now, we will be called again later
break;
} else {
@@ -242,9 +242,9 @@ void QNetworkAccessDebugPipeBackend::closeDownstreamChannel()
void QNetworkAccessDebugPipeBackend::socketError()
{
- qWarning("QNetworkAccessDebugPipeBackend::socketError() %d",socket.error());
+ qWarning("QNetworkAccessDebugPipeBackend::socketError() %d",socket.socketError());
QNetworkReply::NetworkError code;
- switch (socket.error()) {
+ switch (socket.socketError()) {
case QAbstractSocket::RemoteHostClosedError:
return; // socketDisconnected will be called
diff --git a/src/network/access/qnetworkaccessfilebackend.cpp b/src/network/access/qnetworkaccessfilebackend.cpp
index 60353cb03e..507417f86c 100644
--- a/src/network/access/qnetworkaccessfilebackend.cpp
+++ b/src/network/access/qnetworkaccessfilebackend.cpp
@@ -73,7 +73,7 @@ QNetworkAccessFileBackendFactory::create(QNetworkAccessManager::Operation op,
default:
// no, we can't handle this operation
- return 0;
+ return nullptr;
}
QUrl url = request.url();
@@ -95,7 +95,7 @@ QNetworkAccessFileBackendFactory::create(QNetworkAccessManager::Operation op,
return new QNetworkAccessFileBackend;
}
- return 0;
+ return nullptr;
}
QNetworkAccessFileBackend::QNetworkAccessFileBackend()
@@ -198,7 +198,7 @@ void QNetworkAccessFileBackend::uploadReadyReadSlot()
file.close();
finished();
break;
- } else if (haveRead == 0 || readPointer == 0) {
+ } else if (haveRead == 0 || readPointer == nullptr) {
// nothing to read right now, we will be called again later
break;
} else {
diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
index 51ed2f5a55..7b09608499 100644
--- a/src/network/access/qnetworkaccessftpbackend.cpp
+++ b/src/network/access/qnetworkaccessftpbackend.cpp
@@ -75,13 +75,13 @@ QNetworkAccessFtpBackendFactory::create(QNetworkAccessManager::Operation op,
default:
// no, we can't handle this operation
- return 0;
+ return nullptr;
}
QUrl url = request.url();
if (url.scheme().compare(QLatin1String("ftp"), Qt::CaseInsensitive) == 0)
return new QNetworkAccessFtpBackend;
- return 0;
+ return nullptr;
}
class QNetworkAccessCachedFtpConnection: public QFtp, public QNetworkAccessCache::CacheableObject
@@ -104,7 +104,7 @@ public:
};
QNetworkAccessFtpBackend::QNetworkAccessFtpBackend()
- : ftp(0), uploadDevice(0), totalBytes(0), helpId(-1), sizeId(-1), mdtmId(-1), pwdId(-1),
+ : ftp(nullptr), uploadDevice(nullptr), totalBytes(0), helpId(-1), sizeId(-1), mdtmId(-1), pwdId(-1),
supportsSize(false), supportsMdtm(false), supportsPwd(false), state(Idle)
{
}
@@ -161,7 +161,7 @@ void QNetworkAccessFtpBackend::open()
if (!objectCache->requestEntry(cacheKey, this,
SLOT(ftpConnectionReady(QNetworkAccessCache::CacheableObject*)))) {
ftp = new QNetworkAccessCachedFtpConnection;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the QFtp
ftp->setProperty("_q_networksession", property("_q_networksession"));
#endif
@@ -215,7 +215,7 @@ void QNetworkAccessFtpBackend::disconnectFromFtp(CacheCleanupMode mode)
state = Disconnecting;
if (ftp) {
- disconnect(ftp, 0, this, 0);
+ disconnect(ftp, nullptr, this, nullptr);
QByteArray key = makeCacheKey(url());
if (mode == RemoveCachedConnection) {
@@ -225,7 +225,7 @@ void QNetworkAccessFtpBackend::disconnectFromFtp(CacheCleanupMode mode)
QNetworkAccessManagerPrivate::getObjectCache(this)->releaseEntry(key);
}
- ftp = 0;
+ ftp = nullptr;
}
}
@@ -362,7 +362,7 @@ void QNetworkAccessFtpBackend::ftpDone()
QFtp::TransferType type = QFtp::Binary;
if (operation() == QNetworkAccessManager::GetOperation) {
setCachingEnabled(true);
- ftp->get(url().path(), 0, type);
+ ftp->get(url().path(), nullptr, type);
} else {
ftp->put(uploadDevice, url().path(), type);
}
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 76b95b5823..1120446bc7 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -311,6 +311,7 @@ static void ensureInitialized()
/*!
\fn void QNetworkAccessManager::networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible)
+ \obsolete
This signal is emitted when the value of the \l networkAccessible property changes.
\a accessible is the new network accessibility.
@@ -320,6 +321,7 @@ static void ensureInitialized()
\fn void QNetworkAccessManager::networkSessionConnected()
\since 4.7
+ \obsolete
\internal
@@ -1008,10 +1010,11 @@ QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &requ
return d_func()->postProcess(createRequest(QNetworkAccessManager::DeleteOperation, request));
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
/*!
\since 4.7
+ \obsolete
Sets the network configuration that will be used when creating the
\l {QNetworkSession}{network session} to \a config.
@@ -1049,6 +1052,7 @@ void QNetworkAccessManager::setConfiguration(const QNetworkConfiguration &config
/*!
\since 4.7
+ \obsolete
Returns the network configuration that will be used to create the
\l {QNetworkSession}{network session} which will be used when processing network requests.
@@ -1069,6 +1073,7 @@ QNetworkConfiguration QNetworkAccessManager::configuration() const
/*!
\since 4.7
+ \obsolete
Returns the current active network configuration.
@@ -1097,6 +1102,7 @@ QNetworkConfiguration QNetworkAccessManager::activeConfiguration() const
/*!
\since 4.7
+ \obsolete
Overrides the reported network accessibility. If \a accessible is NotAccessible the reported
network accessiblity will always be NotAccessible. Otherwise the reported network
@@ -1109,16 +1115,20 @@ void QNetworkAccessManager::setNetworkAccessible(QNetworkAccessManager::NetworkA
d->defaultAccessControl = accessible == NotAccessible ? false : true;
if (d->networkAccessible != accessible) {
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
NetworkAccessibility previous = networkAccessible();
d->networkAccessible = accessible;
NetworkAccessibility current = networkAccessible();
if (previous != current)
emit networkAccessibleChanged(current);
+QT_WARNING_POP
}
}
/*!
\since 4.7
+ \obsolete
Returns the current network accessibility.
*/
@@ -1240,7 +1250,7 @@ void QNetworkAccessManager::connectToHostEncrypted(const QString &hostName, quin
// There is no way to enable SPDY/HTTP2 via a request, so we need to check
// the ssl configuration whether SPDY/HTTP2 is allowed here.
if (sslConfiguration.allowedNextProtocols().contains(QSslConfiguration::ALPNProtocolHTTP2))
- request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
+ request.setAttribute(QNetworkRequest::Http2AllowedAttribute, true);
else if (sslConfiguration.allowedNextProtocols().contains(QSslConfiguration::NextProtocolSpdy3_0))
request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true);
@@ -1404,6 +1414,11 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
req.setAttribute(QNetworkRequest::RedirectPolicyAttribute, redirectPolicy());
}
+#if QT_CONFIG(http)
+ if (!req.transferTimeout())
+ req.setTransferTimeout(transferTimeout());
+#endif
+
if (autoDeleteReplies()
&& req.attribute(QNetworkRequest::AutoDeleteReplyOnFinishAttribute).isNull()) {
req.setAttribute(QNetworkRequest::AutoDeleteReplyOnFinishAttribute, true);
@@ -1479,7 +1494,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
if (!d->statusMonitor.isMonitoring() && !d->statusMonitor.start())
qWarning(lcNetMon, "failed to start network status monitoring");
} else {
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
// Return a disabled network reply if network access is disabled.
// Except if the scheme is empty or file:// or if the host resolves to a loopback address.
if (d->networkAccessible == NotAccessible && !isLocalFile) {
@@ -1553,7 +1568,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
}
#endif
QNetworkReplyHttpImpl *reply = new QNetworkReplyHttpImpl(this, request, op, outgoingData);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
if (!d->statusMonitor.isEnabled()) {
connect(this, SIGNAL(networkSessionConnected()),
reply, SLOT(_q_networkSessionConnected()));
@@ -1565,7 +1580,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
// first step: create the reply
QNetworkReplyImpl *reply = new QNetworkReplyImpl(this);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
// NETMONTODO: network reply impl must be augmented to use the same monitoring
// capabilities as http network reply impl does. Once it does: uncomment the condition below
if (!isLocalFile /*&& !d->statusMonitor.isEnabled()*/) {
@@ -1713,18 +1728,50 @@ void QNetworkAccessManager::setAutoDeleteReplies(bool shouldAutoDelete)
d_func()->autoDeleteReplies = shouldAutoDelete;
}
-void QNetworkAccessManagerPrivate::_q_replyFinished()
+/*!
+ \since 5.15
+
+ Returns the timeout used for transfers, in milliseconds.
+
+ This timeout is zero if setTransferTimeout() hasn't been
+ called, which means that the timeout is not used.
+*/
+int QNetworkAccessManager::transferTimeout() const
+{
+ return d_func()->transferTimeout;
+}
+
+/*!
+ \since 5.15
+
+ Sets \a timeout as the transfer timeout in milliseconds.
+
+ Transfers are aborted if no bytes are transferred before
+ the timeout expires. Zero means no timer is set. If no
+ argument is provided, the timeout is
+ QNetworkRequest::TransferTimeoutPreset. If this function
+ is not called, the timeout is disabled and has the
+ value zero. The request-specific non-zero timeouts set for
+ the requests that are executed override this value. This means
+ that if QNetworkAccessManager has an enabled timeout, it needs
+ to be disabled to execute a request without a timeout.
+
+ \sa transferTimeout()
+*/
+void QNetworkAccessManager::setTransferTimeout(int timeout)
+{
+ d_func()->transferTimeout = timeout;
+}
+
+void QNetworkAccessManagerPrivate::_q_replyFinished(QNetworkReply *reply)
{
Q_Q(QNetworkAccessManager);
- QNetworkReply *reply = qobject_cast<QNetworkReply *>(q->sender());
- if (reply) {
- emit q->finished(reply);
- if (reply->request().attribute(QNetworkRequest::AutoDeleteReplyOnFinishAttribute, false).toBool())
- QMetaObject::invokeMethod(reply, [reply] { reply->deleteLater(); }, Qt::QueuedConnection);
- }
+ emit q->finished(reply);
+ if (reply->request().attribute(QNetworkRequest::AutoDeleteReplyOnFinishAttribute, false).toBool())
+ QMetaObject::invokeMethod(reply, [reply] { reply->deleteLater(); }, Qt::QueuedConnection);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
// If there are no active requests, release our reference to the network session.
// It will not be destroyed immediately, but rather when the connection cache is flushed
// after 2 minutes.
@@ -1734,13 +1781,13 @@ void QNetworkAccessManagerPrivate::_q_replyFinished()
#endif
}
-void QNetworkAccessManagerPrivate::_q_replyEncrypted()
+void QNetworkAccessManagerPrivate::_q_replyEncrypted(QNetworkReply *reply)
{
#ifndef QT_NO_SSL
Q_Q(QNetworkAccessManager);
- QNetworkReply *reply = qobject_cast<QNetworkReply *>(q->sender());
- if (reply)
- emit q->encrypted(reply);
+ emit q->encrypted(reply);
+#else
+ Q_UNUSED(reply);
#endif
}
@@ -1772,15 +1819,17 @@ QNetworkReply *QNetworkAccessManagerPrivate::postProcess(QNetworkReply *reply)
{
Q_Q(QNetworkAccessManager);
QNetworkReplyPrivate::setManager(reply, q);
- q->connect(reply, SIGNAL(finished()), SLOT(_q_replyFinished()));
+ q->connect(reply, &QNetworkReply::finished, reply,
+ [this, reply]() { _q_replyFinished(reply); });
#ifndef QT_NO_SSL
/* In case we're compiled without SSL support, we don't have this signal and we need to
* avoid getting a connection error. */
- q->connect(reply, SIGNAL(encrypted()), SLOT(_q_replyEncrypted()));
+ q->connect(reply, &QNetworkReply::encrypted, reply,
+ [this, reply]() { _q_replyEncrypted(reply); });
q->connect(reply, SIGNAL(sslErrors(QList<QSslError>)), SLOT(_q_replySslErrors(QList<QSslError>)));
q->connect(reply, SIGNAL(preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)), SLOT(_q_replyPreSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)));
#endif
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
activeReplyCount++;
#endif
@@ -1941,7 +1990,7 @@ void QNetworkAccessManagerPrivate::destroyThread()
{
if (thread) {
thread->quit();
- thread->wait(5000);
+ thread->wait(QDeadlineTimer(5000));
if (thread->isFinished())
delete thread;
else
@@ -1950,7 +1999,7 @@ void QNetworkAccessManagerPrivate::destroyThread()
}
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &config)
{
Q_Q(QNetworkAccessManager);
@@ -1985,10 +2034,13 @@ void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &co
if (!networkSessionStrongRef) {
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (networkAccessible == QNetworkAccessManager::NotAccessible || !online)
emit q->networkAccessibleChanged(QNetworkAccessManager::NotAccessible);
else
emit q->networkAccessibleChanged(QNetworkAccessManager::UnknownAccessibility);
+QT_WARNING_POP
return;
}
@@ -2035,6 +2087,8 @@ void QNetworkAccessManagerPrivate::_q_networkSessionStateChanged(QNetworkSession
bool reallyOnline = false;
//Do not emit the networkSessionConnected signal here, except for roaming -> connected
//transition, otherwise it is emitted twice in a row when opening a connection.
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (state == QNetworkSession::Connected && lastSessionState != QNetworkSession::Roaming)
emit q->networkSessionConnected();
lastSessionState = state;
@@ -2070,6 +2124,7 @@ void QNetworkAccessManagerPrivate::_q_networkSessionStateChanged(QNetworkSession
_q_networkSessionClosed();
createSession(q->configuration());
}
+QT_WARNING_POP
}
void QNetworkAccessManagerPrivate::_q_onlineStateChanged(bool isOnline)
@@ -2081,6 +2136,8 @@ void QNetworkAccessManagerPrivate::_q_onlineStateChanged(bool isOnline)
return;
}
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
// if the user set a config, we only care whether this one is active.
// Otherwise, this QNAM is online if there is an online config.
@@ -2106,6 +2163,7 @@ void QNetworkAccessManagerPrivate::_q_onlineStateChanged(bool isOnline)
emit q->networkAccessibleChanged(networkAccessible);
}
}
+QT_WARNING_POP
}
void QNetworkAccessManagerPrivate::_q_configurationChanged(const QNetworkConfiguration &configuration)
diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h
index 98498d07d2..375d2e03f7 100644
--- a/src/network/access/qnetworkaccessmanager.h
+++ b/src/network/access/qnetworkaccessmanager.h
@@ -64,7 +64,7 @@ class QNetworkProxy;
class QNetworkProxyFactory;
class QSslError;
class QHstsPolicy;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
class QNetworkConfiguration;
#endif
class QHttpMultiPart;
@@ -75,7 +75,7 @@ class Q_NETWORK_EXPORT QNetworkAccessManager: public QObject
{
Q_OBJECT
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
Q_PROPERTY(NetworkAccessibility networkAccessible READ networkAccessible WRITE setNetworkAccessible NOTIFY networkAccessibleChanged)
#endif
@@ -91,7 +91,7 @@ public:
UnknownOperation = 0
};
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
enum NetworkAccessibility {
UnknownAccessibility = -1,
NotAccessible = 0,
@@ -146,13 +146,13 @@ public:
QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QHttpMultiPart *multiPart);
#endif
-#ifndef QT_NO_BEARERMANAGEMENT
- void setConfiguration(const QNetworkConfiguration &config);
- QNetworkConfiguration configuration() const;
- QNetworkConfiguration activeConfiguration() const;
+#if !defined(QT_NO_BEARERMANAGEMENT) // ### Qt6: Remove section
+ QT_DEPRECATED_VERSION_5_15 void setConfiguration(const QNetworkConfiguration &config);
+ QT_DEPRECATED_VERSION_5_15 QNetworkConfiguration configuration() const;
+ QT_DEPRECATED_VERSION_5_15 QNetworkConfiguration activeConfiguration() const;
- void setNetworkAccessible(NetworkAccessibility accessible);
- NetworkAccessibility networkAccessible() const;
+ QT_DEPRECATED_VERSION_5_15 void setNetworkAccessible(NetworkAccessibility accessible);
+ QT_DEPRECATED_VERSION_5_15 NetworkAccessibility networkAccessible() const;
#endif
#ifndef QT_NO_SSL
@@ -170,6 +170,9 @@ public:
bool autoDeleteReplies() const;
void setAutoDeleteReplies(bool autoDelete);
+ int transferTimeout() const;
+ void setTransferTimeout(int timeout = QNetworkRequest::TransferTimeoutPreset);
+
Q_SIGNALS:
#ifndef QT_NO_NETWORKPROXY
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator);
@@ -182,10 +185,10 @@ Q_SIGNALS:
void preSharedKeyAuthenticationRequired(QNetworkReply *reply, QSslPreSharedKeyAuthenticator *authenticator);
#endif
-#ifndef QT_NO_BEARERMANAGEMENT
- void networkSessionConnected();
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
+ QT_DEPRECATED_VERSION_5_15 void networkSessionConnected();
- void networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible);
+ QT_DEPRECATED_VERSION_5_15 void networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible);
#endif
protected:
@@ -205,11 +208,9 @@ private:
friend class QNetworkReplyWasmImpl;
#endif
Q_DECLARE_PRIVATE(QNetworkAccessManager)
- Q_PRIVATE_SLOT(d_func(), void _q_replyFinished())
- Q_PRIVATE_SLOT(d_func(), void _q_replyEncrypted())
Q_PRIVATE_SLOT(d_func(), void _q_replySslErrors(QList<QSslError>))
Q_PRIVATE_SLOT(d_func(), void _q_replyPreSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*))
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionClosed())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionStateChanged(QNetworkSession::State))
Q_PRIVATE_SLOT(d_func(), void _q_configurationChanged(const QNetworkConfiguration &))
diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h
index 67ea2094b3..7926463d56 100644
--- a/src/network/access/qnetworkaccessmanager_p.h
+++ b/src/network/access/qnetworkaccessmanager_p.h
@@ -62,7 +62,7 @@
#include "QtNetwork/qnetworkproxy.h"
#include "QtNetwork/qnetworksession.h"
#include "qnetworkaccessauthenticationmanager_p.h"
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
#include "QtNetwork/qnetworkconfigmanager.h"
#endif
@@ -87,7 +87,7 @@ public:
#ifndef QT_NO_NETWORKPROXY
proxyFactory(nullptr),
#endif
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
lastSessionState(QNetworkSession::Invalid),
networkConfiguration(networkConfigurationManager.defaultConfiguration()),
customNetworkConfiguration(false),
@@ -102,7 +102,7 @@ public:
redirectPolicy(QNetworkRequest::ManualRedirectPolicy),
authenticationManager(QSharedPointer<QNetworkAccessAuthenticationManager>::create())
{
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
// we would need all active configurations to check for
// d->networkConfigurationManager.isOnline(), which is asynchronous
// and potentially expensive. We can just check the configuration here
@@ -120,8 +120,8 @@ public:
QThread * createThread();
void destroyThread();
- void _q_replyFinished();
- void _q_replyEncrypted();
+ void _q_replyFinished(QNetworkReply *reply);
+ void _q_replyEncrypted(QNetworkReply *reply);
void _q_replySslErrors(const QList<QSslError> &errors);
void _q_replyPreSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator);
QNetworkReply *postProcess(QNetworkReply *reply);
@@ -153,7 +153,7 @@ public:
QStringList backendSupportedSchemes() const;
void _q_onlineStateChanged(bool isOnline);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
void createSession(const QNetworkConfiguration &config);
QSharedPointer<QNetworkSession> getNetworkSession() const;
@@ -186,7 +186,7 @@ public:
QNetworkProxyFactory *proxyFactory;
#endif
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
QSharedPointer<QNetworkSession> networkSessionStrongRef;
QWeakPointer<QNetworkSession> networkSessionWeakRef;
QNetworkSession::State lastSessionState;
@@ -229,7 +229,9 @@ public:
bool autoDeleteReplies = false;
-#ifndef QT_NO_BEARERMANAGEMENT
+ int transferTimeout = 0;
+
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
Q_AUTOTEST_EXPORT static const QWeakPointer<const QNetworkSession> getNetworkSession(const QNetworkAccessManager *manager);
#endif
Q_DECLARE_PUBLIC(QNetworkAccessManager)
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index 903de322ff..47f6112b22 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -131,7 +131,7 @@ QNetworkCookie::QNetworkCookie(const QNetworkCookie &other)
QNetworkCookie::~QNetworkCookie()
{
// QSharedDataPointer auto deletes
- d = 0;
+ d = nullptr;
}
/*!
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index df2e4902a4..b30d1c9664 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -180,11 +180,11 @@ QIODevice *QNetworkDiskCache::prepare(const QNetworkCacheMetaData &metaData)
#endif
Q_D(QNetworkDiskCache);
if (!metaData.isValid() || !metaData.url().isValid() || !metaData.saveToDisk())
- return 0;
+ return nullptr;
if (d->cacheDirectory.isEmpty()) {
qWarning("QNetworkDiskCache::prepare() The cache directory is not set");
- return 0;
+ return nullptr;
}
const auto headers = metaData.rawHeaders();
@@ -192,14 +192,14 @@ QIODevice *QNetworkDiskCache::prepare(const QNetworkCacheMetaData &metaData)
if (header.first.compare("content-length", Qt::CaseInsensitive) == 0) {
const qint64 size = header.second.toLongLong();
if (size > (maximumCacheSize() * 3)/4)
- return 0;
+ return nullptr;
break;
}
}
QScopedPointer<QCacheItem> cacheItem(new QCacheItem);
cacheItem->metaData = metaData;
- QIODevice *device = 0;
+ QIODevice *device = nullptr;
if (cacheItem->canCompress()) {
cacheItem->data.open(QBuffer::ReadWrite);
device = &(cacheItem->data);
@@ -208,12 +208,12 @@ QIODevice *QNetworkDiskCache::prepare(const QNetworkCacheMetaData &metaData)
QT_TRY {
cacheItem->file = new QTemporaryFile(templateName, &cacheItem->data);
} QT_CATCH(...) {
- cacheItem->file = 0;
+ cacheItem->file = nullptr;
}
if (!cacheItem->file || !cacheItem->file->open()) {
qWarning("QNetworkDiskCache::prepare() unable to open temporary file");
cacheItem.reset();
- return 0;
+ return nullptr;
}
cacheItem->writeHeader(cacheItem->file);
device = cacheItem->file;
@@ -397,19 +397,19 @@ QIODevice *QNetworkDiskCache::data(const QUrl &url)
Q_D(QNetworkDiskCache);
QScopedPointer<QBuffer> buffer;
if (!url.isValid())
- return 0;
+ return nullptr;
if (d->lastItem.metaData.url() == url && d->lastItem.data.isOpen()) {
buffer.reset(new QBuffer);
buffer->setData(d->lastItem.data.data());
} else {
QScopedPointer<QFile> file(new QFile(d->cacheFileName(url)));
if (!file->open(QFile::ReadOnly | QIODevice::Unbuffered))
- return 0;
+ return nullptr;
if (!d->lastItem.read(file.data(), true)) {
file->close();
remove(url);
- return 0;
+ return nullptr;
}
if (d->lastItem.data.isOpen()) {
// compressed
@@ -419,7 +419,7 @@ QIODevice *QNetworkDiskCache::data(const QUrl &url)
buffer.reset(new QBuffer);
// ### verify that QFile uses the fd size and not the file name
qint64 size = file->size() - file->pos();
- const uchar *p = 0;
+ const uchar *p = nullptr;
#if !defined(Q_OS_INTEGRITY)
p = file->map(file->pos(), size);
#endif
@@ -557,7 +557,7 @@ qint64 QNetworkDiskCache::expire()
for (QCacheItem *item : qAsConst(d->inserting)) {
if (item && item->file && item->file->fileName() == name) {
delete item->file;
- item->file = 0;
+ item->file = nullptr;
break;
}
}
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index fb30bfd4f1..c22dce8f1c 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -554,14 +554,33 @@ QNetworkAccessManager::Operation QNetworkReply::operation() const
return d_func()->operation;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
+ \deprecated
+
+ Use networkError() instead.
+
Returns the error that was found during the processing of this
request. If no error was found, returns NoError.
- \sa setError()
+ \sa setError(), networkError()
*/
QNetworkReply::NetworkError QNetworkReply::error() const
{
+ return networkError();
+}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/*!
+ \since 5.15
+
+ Returns the error that was found during the processing of this
+ request. If no error was found, returns NoError.
+
+ \sa setError()
+*/
+QNetworkReply::NetworkError QNetworkReply::networkError() const
+{
return d_func()->errorCode;
}
@@ -858,7 +877,7 @@ void QNetworkReply::setRequest(const QNetworkRequest &request)
Calling setError() does not emit the error(QNetworkReply::NetworkError)
signal.
- \sa error(), errorString()
+ \sa error(), errorString(), networkError()
*/
void QNetworkReply::setError(NetworkError errorCode, const QString &errorString)
{
diff --git a/src/network/access/qnetworkreply.h b/src/network/access/qnetworkreply.h
index 4a402daa91..139009a56a 100644
--- a/src/network/access/qnetworkreply.h
+++ b/src/network/access/qnetworkreply.h
@@ -124,7 +124,12 @@ public:
QNetworkAccessManager *manager() const;
QNetworkAccessManager::Operation operation() const;
QNetworkRequest request() const;
- NetworkError error() const;
+
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use networkError()") NetworkError error() const;
+#endif // QT_DEPRECATED_SINCE(5, 15)
+ NetworkError networkError() const;
+
bool isFinished() const;
bool isRunning() const;
QUrl url() const;
diff --git a/src/network/access/qnetworkreplyfileimpl.cpp b/src/network/access/qnetworkreplyfileimpl.cpp
index ef319ebf0d..afab8ffd94 100644
--- a/src/network/access/qnetworkreplyfileimpl.cpp
+++ b/src/network/access/qnetworkreplyfileimpl.cpp
@@ -50,7 +50,7 @@
QT_BEGIN_NAMESPACE
QNetworkReplyFileImplPrivate::QNetworkReplyFileImplPrivate()
- : QNetworkReplyPrivate(), managerPrivate(0), realFile(0)
+ : QNetworkReplyPrivate(), managerPrivate(nullptr), realFile(nullptr)
{
qRegisterMetaType<QNetworkRequest::KnownHeaders>();
qRegisterMetaType<QNetworkReply::NetworkError>();
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index 8ac81d1780..12f402cabd 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -164,7 +164,7 @@ static QHash<QByteArray, QByteArray> parseHttpOptionHeader(const QByteArray &hea
}
}
-#if QT_CONFIG(bearermanagement)
+#if QT_CONFIG(bearermanagement) // ### Qt6: Remove section
static bool isSessionNeeded(const QUrl &url)
{
if (QNetworkStatusMonitor::isEnabled()) {
@@ -461,6 +461,7 @@ QNetworkReplyHttpImplPrivate::QNetworkReplyHttpImplPrivate()
, preMigrationDownloaded(-1)
, bytesDownloaded(0)
, bytesBuffered(0)
+ , transferTimeout(nullptr)
, downloadBufferReadPosition(0)
, downloadBufferCurrentSize(0)
, downloadZerocopyBuffer(nullptr)
@@ -692,7 +693,7 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
auto redirectPolicy = QNetworkRequest::ManualRedirectPolicy;
const QVariant value = newHttpRequest.attribute(QNetworkRequest::RedirectPolicyAttribute);
if (value.isValid())
- redirectPolicy = value.value<QNetworkRequest::RedirectPolicy>();
+ redirectPolicy = qvariant_cast<QNetworkRequest::RedirectPolicy>(value);
else if (newHttpRequest.attribute(QNetworkRequest::FollowRedirectsAttribute).toBool())
redirectPolicy = QNetworkRequest::NoLessSafeRedirectPolicy;
@@ -777,7 +778,7 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
if (request.attribute(QNetworkRequest::SpdyAllowedAttribute).toBool())
httpRequest.setSPDYAllowed(true);
- if (request.attribute(QNetworkRequest::HTTP2AllowedAttribute).toBool())
+ if (request.attribute(QNetworkRequest::Http2AllowedAttribute).toBool())
httpRequest.setHTTP2Allowed(true);
if (request.attribute(QNetworkRequest::Http2DirectAttribute).toBool()) {
@@ -800,7 +801,7 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
QHttpThreadDelegate *delegate = new QHttpThreadDelegate;
// Propagate Http/2 settings:
delegate->http2Parameters = request.http2Configuration();
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
if (!QNetworkStatusMonitor::isEnabled())
delegate->networkSession = managerPrivate->getNetworkSession();
#endif
@@ -985,7 +986,7 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
}
thread->quit();
- thread->wait(5000);
+ thread->wait(QDeadlineTimer(5000));
if (thread->isFinished())
delete thread;
else
@@ -1067,6 +1068,7 @@ void QNetworkReplyHttpImplPrivate::replyDownloadData(QByteArray d)
if (!isHttpRedirectResponse()) {
buffer.append(d);
bytesDownloaded += d.size();
+ setupTransferTimeout();
}
bytesBuffered += d.size();
@@ -1207,7 +1209,7 @@ void QNetworkReplyHttpImplPrivate::followRedirect()
if (managerPrivate->thread)
managerPrivate->thread->disconnect();
-#if QT_CONFIG(bearermanagement)
+#if QT_CONFIG(bearermanagement) // ### Qt6: Remove section
// If the original request didn't need a session (i.e. it was to localhost)
// then we might not have a session open, to which to redirect, if the
// new URL is remote. When this happens, we need to open the session now:
@@ -1280,15 +1282,15 @@ void QNetworkReplyHttpImplPrivate::replyDownloadMetaData(const QList<QPair<QByte
}
q->setAttribute(QNetworkRequest::HttpPipeliningWasUsedAttribute, pu);
- const QVariant http2Allowed = request.attribute(QNetworkRequest::HTTP2AllowedAttribute);
+ const QVariant http2Allowed = request.attribute(QNetworkRequest::Http2AllowedAttribute);
const QVariant http2Direct = request.attribute(QNetworkRequest::Http2DirectAttribute);
if ((http2Allowed.isValid() && http2Allowed.toBool())
|| (http2Direct.isValid() && http2Direct.toBool())) {
- q->setAttribute(QNetworkRequest::HTTP2WasUsedAttribute, spdyWasUsed);
+ q->setAttribute(QNetworkRequest::Http2WasUsedAttribute, spdyWasUsed);
q->setAttribute(QNetworkRequest::SpdyWasUsedAttribute, false);
} else {
q->setAttribute(QNetworkRequest::SpdyWasUsedAttribute, spdyWasUsed);
- q->setAttribute(QNetworkRequest::HTTP2WasUsedAttribute, false);
+ q->setAttribute(QNetworkRequest::Http2WasUsedAttribute, false);
}
// reconstruct the HTTP header
@@ -1401,6 +1403,7 @@ void QNetworkReplyHttpImplPrivate::replyDownloadProgressSlot(qint64 bytesReceive
return;
bytesDownloaded = bytesReceived;
+ setupTransferTimeout();
downloadBufferCurrentSize = bytesReceived;
@@ -1791,13 +1794,13 @@ void QNetworkReplyHttpImplPrivate::setResumeOffset(quint64 offset)
*/
bool QNetworkReplyHttpImplPrivate::start(const QNetworkRequest &newHttpRequest)
{
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
QSharedPointer<QNetworkSession> networkSession(managerPrivate->getNetworkSession());
if (!networkSession || QNetworkStatusMonitor::isEnabled()) {
#endif
postRequest(newHttpRequest);
return true;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
}
// This is not ideal.
@@ -1826,7 +1829,7 @@ bool QNetworkReplyHttpImplPrivate::start(const QNetworkRequest &newHttpRequest)
#endif
}
-#if QT_CONFIG(bearermanagement)
+#if QT_CONFIG(bearermanagement) // ### Qt6: Remove section
bool QNetworkReplyHttpImplPrivate::startWaitForSession(QSharedPointer<QNetworkSession> &session)
{
Q_Q(QNetworkReplyHttpImpl);
@@ -1857,13 +1860,12 @@ bool QNetworkReplyHttpImplPrivate::startWaitForSession(QSharedPointer<QNetworkSe
void QNetworkReplyHttpImplPrivate::_q_startOperation()
{
Q_Q(QNetworkReplyHttpImpl);
-
if (state == Working) // ensure this function is only being called once
return;
state = Working;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
// Do not start background requests if they are not allowed by session policy
QSharedPointer<QNetworkSession> session(manager->d_func()->getNetworkSession());
QVariant isBackground = request.attribute(QNetworkRequest::BackgroundRequestAttribute, QVariant::fromValue(false));
@@ -1897,6 +1899,7 @@ void QNetworkReplyHttpImplPrivate::_q_startOperation()
}
#endif // QT_NO_BEARERMANAGEMENT
+ setupTransferTimeout();
if (synchronous) {
state = Finished;
q_func()->setFinished(true);
@@ -2033,7 +2036,32 @@ void QNetworkReplyHttpImplPrivate::_q_bufferOutgoingData()
}
}
-#ifndef QT_NO_BEARERMANAGEMENT
+void QNetworkReplyHttpImplPrivate::_q_transferTimedOut()
+{
+ Q_Q(QNetworkReplyHttpImpl);
+ q->abort();
+}
+
+void QNetworkReplyHttpImplPrivate::setupTransferTimeout()
+{
+ Q_Q(QNetworkReplyHttpImpl);
+ if (!transferTimeout) {
+ transferTimeout = new QTimer(q);
+ QObject::connect(transferTimeout, SIGNAL(timeout()),
+ q, SLOT(_q_transferTimedOut()),
+ Qt::QueuedConnection);
+ }
+ transferTimeout->stop();
+ if (request.transferTimeout()) {
+ transferTimeout->setSingleShot(true);
+ transferTimeout->setInterval(request.transferTimeout());
+ QMetaObject::invokeMethod(transferTimeout, "start",
+ Qt::QueuedConnection);
+
+ }
+}
+
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
void QNetworkReplyHttpImplPrivate::_q_networkSessionConnected()
{
Q_Q(QNetworkReplyHttpImpl);
@@ -2115,6 +2143,8 @@ void QNetworkReplyHttpImplPrivate::emitReplyUploadProgress(qint64 bytesSent, qin
if (isFinished)
return;
+ setupTransferTimeout();
+
if (!emitAllUploadProgressSignals) {
//choke signal emissions, except the first and last signals which are unconditional
if (uploadProgressSignalChoke.isValid()) {
@@ -2126,7 +2156,6 @@ void QNetworkReplyHttpImplPrivate::emitReplyUploadProgress(qint64 bytesSent, qin
uploadProgressSignalChoke.start();
}
}
-
emit q->uploadProgress(bytesSent, bytesTotal);
}
@@ -2159,7 +2188,8 @@ void QNetworkReplyHttpImplPrivate::_q_finished()
void QNetworkReplyHttpImplPrivate::finished()
{
Q_Q(QNetworkReplyHttpImpl);
-
+ if (transferTimeout)
+ transferTimeout->stop();
if (state == Finished || state == Aborted || state == WaitingForSession)
return;
@@ -2167,7 +2197,7 @@ void QNetworkReplyHttpImplPrivate::finished()
if (preMigrationDownloaded != Q_INT64_C(-1))
totalSize = totalSize.toLongLong() + preMigrationDownloaded;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
Q_ASSERT(managerPrivate);
QSharedPointer<QNetworkSession> session = managerPrivate->getNetworkSession();
if (!QNetworkStatusMonitor::isEnabled() && session && session->state() == QNetworkSession::Roaming &&
diff --git a/src/network/access/qnetworkreplyhttpimpl_p.h b/src/network/access/qnetworkreplyhttpimpl_p.h
index ef69ce0653..c4de63990b 100644
--- a/src/network/access/qnetworkreplyhttpimpl_p.h
+++ b/src/network/access/qnetworkreplyhttpimpl_p.h
@@ -59,13 +59,14 @@
#include "QtCore/qdatetime.h"
#include "QtCore/qsharedpointer.h"
#include "QtCore/qscopedpointer.h"
+#include "QtCore/qtimer.h"
#include "qatomic.h"
#include <QtNetwork/QNetworkCacheMetaData>
#include <private/qhttpnetworkrequest_p.h>
#include <private/qnetworkreply_p.h>
#include <QtNetwork/QNetworkProxy>
-#include <QtNetwork/QNetworkSession>
+#include <QtNetwork/QNetworkSession> // ### Qt6: Remove include
#ifndef QT_NO_SSL
#include <QtNetwork/QSslConfiguration>
@@ -100,7 +101,8 @@ public:
Q_PRIVATE_SLOT(d_func(), void _q_cacheLoadReadyRead())
Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingData())
Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingDataFinished())
-#ifndef QT_NO_BEARERMANAGEMENT
+ Q_PRIVATE_SLOT(d_func(), void _q_transferTimedOut())
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionConnected())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionStateChanged(QNetworkSession::State))
@@ -160,7 +162,7 @@ signals:
class QNetworkReplyHttpImplPrivate: public QNetworkReplyPrivate
{
-#if QT_CONFIG(bearermanagement)
+#if QT_CONFIG(bearermanagement) // ### Qt6: Remove section
bool startWaitForSession(QSharedPointer<QNetworkSession> &session);
#endif
@@ -181,7 +183,10 @@ public:
void _q_cacheSaveDeviceAboutToClose();
-#ifndef QT_NO_BEARERMANAGEMENT
+ void _q_transferTimedOut();
+ void setupTransferTimeout();
+
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
void _q_networkSessionConnected();
void _q_networkSessionFailed();
void _q_networkSessionStateChanged(QNetworkSession::State);
@@ -250,6 +255,8 @@ public:
qint64 bytesDownloaded;
qint64 bytesBuffered;
+ QTimer *transferTimeout;
+
// Only used when the "zero copy" style is used.
// Please note that the whole "zero copy" download buffer API is private right now. Do not use it.
qint64 downloadBufferReadPosition;
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 6eab500e8c..51bb386186 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -45,7 +45,7 @@
#include "QtCore/qcoreapplication.h"
#include "QtCore/qdatetime.h"
#include "QtNetwork/qsslconfiguration.h"
-#include "QtNetwork/qnetworksession.h"
+#include "QtNetwork/qnetworksession.h" // ### Qt6: Remove include
#include "qnetworkaccessmanager_p.h"
#include <QtCore/QCoreApplication>
@@ -53,9 +53,9 @@
QT_BEGIN_NAMESPACE
inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate()
- : backend(0), outgoingData(0),
- copyDevice(0),
- cacheEnabled(false), cacheSaveDevice(0),
+ : backend(nullptr), outgoingData(nullptr),
+ copyDevice(nullptr),
+ cacheEnabled(false), cacheSaveDevice(nullptr),
notificationHandlingPaused(false),
bytesDownloaded(0), lastBytesDownloaded(-1), bytesUploaded(-1), preMigrationDownloaded(-1),
httpStatusCode(0),
@@ -63,7 +63,7 @@ inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate()
, downloadBufferReadPosition(0)
, downloadBufferCurrentSize(0)
, downloadBufferMaximumSize(0)
- , downloadBuffer(0)
+ , downloadBuffer(nullptr)
{
if (request.attribute(QNetworkRequest::EmitAllUploadProgressSignalsAttribute).toBool() == true)
emitAllUploadProgressSignals = true;
@@ -88,7 +88,7 @@ void QNetworkReplyImplPrivate::_q_startOperation()
return;
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
Q_Q(QNetworkReplyImpl);
// Do not start background requests if they are not allowed by session policy
QSharedPointer<QNetworkSession> session(manager->d_func()->getNetworkSession());
@@ -102,7 +102,7 @@ void QNetworkReplyImplPrivate::_q_startOperation()
#endif
if (!backend->start()) {
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
// backend failed to start because the session state is not Connected.
// QNetworkAccessManager will call _q_startOperation again for us when the session
// state changes.
@@ -132,7 +132,7 @@ void QNetworkReplyImplPrivate::_q_startOperation()
#endif
return;
} else {
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
if (session) {
QObject::connect(session.data(), SIGNAL(stateChanged(QNetworkSession::State)),
q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)), Qt::QueuedConnection);
@@ -140,7 +140,7 @@ void QNetworkReplyImplPrivate::_q_startOperation()
#endif
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
if (session) {
//get notification of policy changes.
QObject::connect(session.data(), SIGNAL(usagePoliciesChanged(QNetworkSession::UsagePolicies)),
@@ -287,7 +287,7 @@ void QNetworkReplyImplPrivate::_q_bufferOutgoingData()
}
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
void QNetworkReplyImplPrivate::_q_networkSessionConnected()
{
Q_Q(QNetworkReplyImpl);
@@ -489,7 +489,7 @@ void QNetworkReplyImplPrivate::resumeNotificationHandling()
QAbstractNetworkCache *QNetworkReplyImplPrivate::networkCache() const
{
if (!backend)
- return 0;
+ return nullptr;
return backend->networkCache();
}
@@ -504,7 +504,7 @@ void QNetworkReplyImplPrivate::createCache()
bool QNetworkReplyImplPrivate::isCachingEnabled() const
{
- return (cacheEnabled && networkCache() != 0);
+ return (cacheEnabled && networkCache() != nullptr);
}
void QNetworkReplyImplPrivate::setCachingEnabled(bool enable)
@@ -529,7 +529,7 @@ void QNetworkReplyImplPrivate::setCachingEnabled(bool enable)
"backend %s probably needs to be fixed",
backend->metaObject()->className());
networkCache()->remove(url);
- cacheSaveDevice = 0;
+ cacheSaveDevice = nullptr;
cacheEnabled = false;
}
}
@@ -541,7 +541,7 @@ void QNetworkReplyImplPrivate::completeCacheSave()
} else if (cacheEnabled && cacheSaveDevice) {
networkCache()->insert(cacheSaveDevice);
}
- cacheSaveDevice = 0;
+ cacheSaveDevice = nullptr;
cacheEnabled = false;
}
@@ -610,7 +610,7 @@ void QNetworkReplyImplPrivate::initCacheSaveDevice()
networkCache()->metaObject()->className());
networkCache()->remove(url);
- cacheSaveDevice = 0;
+ cacheSaveDevice = nullptr;
cacheEnabled = false;
}
}
@@ -787,7 +787,7 @@ void QNetworkReplyImplPrivate::finished()
totalSize = totalSize.toLongLong() + preMigrationDownloaded;
if (!manager.isNull()) {
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
QSharedPointer<QNetworkSession> session (manager->d_func()->getNetworkSession());
if (session && session->state() == QNetworkSession::Roaming &&
state == Working && errorCode != QNetworkReply::OperationCanceledError) {
@@ -927,9 +927,9 @@ void QNetworkReplyImpl::abort()
// stop both upload and download
if (d->outgoingData)
- disconnect(d->outgoingData, 0, this, 0);
+ disconnect(d->outgoingData, nullptr, this, nullptr);
if (d->copyDevice)
- disconnect(d->copyDevice, 0, this, 0);
+ disconnect(d->copyDevice, nullptr, this, nullptr);
QNetworkReply::close();
@@ -943,7 +943,7 @@ void QNetworkReplyImpl::abort()
// finished may access the backend
if (d->backend) {
d->backend->deleteLater();
- d->backend = 0;
+ d->backend = nullptr;
}
}
@@ -958,7 +958,7 @@ void QNetworkReplyImpl::close()
if (d->backend)
d->backend->closeDownstreamChannel();
if (d->copyDevice)
- disconnect(d->copyDevice, 0, this, 0);
+ disconnect(d->copyDevice, nullptr, this, nullptr);
QNetworkReply::close();
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h
index 8cec79541a..f98f773775 100644
--- a/src/network/access/qnetworkreplyimpl_p.h
+++ b/src/network/access/qnetworkreplyimpl_p.h
@@ -62,7 +62,7 @@
#include "private/qringbuffer_p.h"
#include "private/qbytedata_p.h"
#include <QSharedPointer>
-#include <QtNetwork/QNetworkSession>
+#include <QtNetwork/QNetworkSession> // ### Qt6: Remove include
QT_BEGIN_NAMESPACE
@@ -92,7 +92,7 @@ public:
Q_PRIVATE_SLOT(d_func(), void _q_copyReadChannelFinished())
Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingData())
Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingDataFinished())
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionConnected())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionStateChanged(QNetworkSession::State))
@@ -124,7 +124,7 @@ public:
void _q_copyReadChannelFinished();
void _q_bufferOutgoingData();
void _q_bufferOutgoingDataFinished();
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
void _q_networkSessionConnected();
void _q_networkSessionFailed();
void _q_networkSessionStateChanged(QNetworkSession::State);
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 118fb6b1fb..70b09dba22 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -277,23 +277,30 @@ QT_BEGIN_NAMESPACE
Indicates whether the QNetworkAccessManager code is
allowed to use SPDY with this request. This applies only
to SSL requests, and depends on the server supporting SPDY.
+ Obsolete, use Http2 instead of Spdy.
\value SpdyWasUsedAttribute
Replies only, type: QMetaType::Bool
Indicates whether SPDY was used for receiving
- this reply.
+ this reply. Obsolete, use Http2 instead of Spdy.
- \value HTTP2AllowedAttribute
+ \value Http2AllowedAttribute
Requests only, type: QMetaType::Bool (default: false)
Indicates whether the QNetworkAccessManager code is
allowed to use HTTP/2 with this request. This applies
to SSL requests or 'cleartext' HTTP/2.
- \value HTTP2WasUsedAttribute
+ \value Http2WasUsedAttribute
Replies only, type: QMetaType::Bool (default: false)
Indicates whether HTTP/2 was used for receiving this reply.
(This value was introduced in 5.9.)
+ \value HTTP2AllowedAttribute
+ Obsolete alias for Http2AllowedAttribute.
+
+ \value HTTP2WasUsedAttribute
+ Obsolete alias for Http2WasUsedAttribute.
+
\value EmitAllUploadProgressSignalsAttribute
Requests only, type: QMetaType::Bool (default: false)
Indicates whether all upload signals should be emitted.
@@ -329,7 +336,7 @@ QT_BEGIN_NAMESPACE
server supports HTTP/2. The attribute works with SSL or 'cleartext'
HTTP/2. If a server turns out to not support HTTP/2, when HTTP/2 direct
was specified, QNetworkAccessManager gives up, without attempting to
- fall back to HTTP/1.1. If both HTTP2AllowedAttribute and
+ fall back to HTTP/1.1. If both Http2AllowedAttribute and
Http2DirectAttribute are set, Http2DirectAttribute takes priority.
(This value was introduced in 5.11.)
@@ -418,6 +425,18 @@ QT_BEGIN_NAMESPACE
based on some app-specific configuration.
*/
+/*!
+ \enum QNetworkRequest::TransferTimeoutConstant
+ \since 5.15
+
+ A constant that can be used for enabling transfer
+ timeouts with a preset value.
+
+ \value TransferTimeoutPreset The transfer timeout in milliseconds.
+ Used if setTimeout() is called
+ without an argument.
+ */
+
class QNetworkRequestPrivate: public QSharedData, public QNetworkHeadersPrivate
{
public:
@@ -425,9 +444,10 @@ public:
inline QNetworkRequestPrivate()
: priority(QNetworkRequest::NormalPriority)
#ifndef QT_NO_SSL
- , sslConfiguration(0)
+ , sslConfiguration(nullptr)
#endif
, maxRedirectsAllowed(maxRedirectCount)
+ , transferTimeout(0)
{ qRegisterMetaType<QNetworkRequest>(); }
~QNetworkRequestPrivate()
{
@@ -444,7 +464,7 @@ public:
priority = other.priority;
maxRedirectsAllowed = other.maxRedirectsAllowed;
#ifndef QT_NO_SSL
- sslConfiguration = 0;
+ sslConfiguration = nullptr;
if (other.sslConfiguration)
sslConfiguration = new QSslConfiguration(*other.sslConfiguration);
#endif
@@ -452,6 +472,7 @@ public:
#if QT_CONFIG(http)
h2Configuration = other.h2Configuration;
#endif
+ transferTimeout = other.transferTimeout;
}
inline bool operator==(const QNetworkRequestPrivate &other) const
@@ -465,6 +486,7 @@ public:
#if QT_CONFIG(http)
&& h2Configuration == other.h2Configuration
#endif
+ && transferTimeout == other.transferTimeout
;
// don't compare cookedHeaders
}
@@ -479,6 +501,7 @@ public:
#if QT_CONFIG(http)
QHttp2Configuration h2Configuration;
#endif
+ int transferTimeout;
};
/*!
@@ -527,7 +550,7 @@ QNetworkRequest::QNetworkRequest(const QNetworkRequest &other)
QNetworkRequest::~QNetworkRequest()
{
// QSharedDataPointer auto deletes
- d = 0;
+ d = nullptr;
}
/*!
@@ -902,6 +925,40 @@ void QNetworkRequest::setHttp2Configuration(const QHttp2Configuration &configura
{
d->h2Configuration = configuration;
}
+
+/*!
+ \since 5.15
+
+ Returns the timeout used for transfers, in milliseconds.
+
+ This timeout is zero if setTransferTimeout hasn't been
+ called, which means that the timeout is not used.
+
+ \sa setTransferTimeout
+*/
+int QNetworkRequest::transferTimeout() const
+{
+ return d->transferTimeout;
+}
+
+/*!
+ \since 5.15
+
+ Sets \a timeout as the transfer timeout in milliseconds.
+
+ Transfers are aborted if no bytes are transferred before
+ the timeout expires. Zero means no timer is set. If no
+ argument is provided, the timeout is
+ QNetworkRequest::TransferTimeoutPreset. If this function
+ is not called, the timeout is disabled and has the
+ value zero.
+
+ \sa transferTimeout
+*/
+void QNetworkRequest::setTransferTimeout(int timeout)
+{
+ d->transferTimeout = timeout;
+}
#endif // QT_CONFIG(http) || defined(Q_CLANG_QDOC)
static QByteArray headerName(QNetworkRequest::KnownHeaders header)
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index e09ff8aaae..dcd2c6b61f 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -89,12 +89,18 @@ public:
DownloadBufferAttribute, // internal
SynchronousRequestAttribute, // internal
BackgroundRequestAttribute,
+#if QT_DEPRECATED_SINCE(5, 15)
SpdyAllowedAttribute,
SpdyWasUsedAttribute,
- EmitAllUploadProgressSignalsAttribute,
+#endif // QT_DEPRECATED_SINCE(5, 15)
+ EmitAllUploadProgressSignalsAttribute = BackgroundRequestAttribute + 3,
FollowRedirectsAttribute,
- HTTP2AllowedAttribute,
- HTTP2WasUsedAttribute,
+ Http2AllowedAttribute,
+ Http2WasUsedAttribute,
+#if QT_DEPRECATED_SINCE(5, 15)
+ HTTP2AllowedAttribute Q_DECL_ENUMERATOR_DEPRECATED_X("Use Http2AllowedAttribute") = Http2AllowedAttribute,
+ HTTP2WasUsedAttribute Q_DECL_ENUMERATOR_DEPRECATED_X("Use Http2WasUsedAttribute"),
+#endif // QT_DEPRECATED_SINCE(5, 15)
OriginalContentLengthAttribute,
RedirectPolicyAttribute,
Http2DirectAttribute,
@@ -128,6 +134,9 @@ public:
UserVerifiedRedirectPolicy
};
+ enum TransferTimeoutConstant {
+ TransferTimeoutPreset = 30000
+ };
QNetworkRequest();
explicit QNetworkRequest(const QUrl &url);
@@ -179,6 +188,9 @@ public:
#if QT_CONFIG(http) || defined(Q_CLANG_QDOC)
QHttp2Configuration http2Configuration() const;
void setHttp2Configuration(const QHttp2Configuration &configuration);
+
+ int transferTimeout() const;
+ void setTransferTimeout(int timeout = TransferTimeoutPreset);
#endif // QT_CONFIG(http) || defined(Q_CLANG_QDOC)
private:
QSharedDataPointer<QNetworkRequestPrivate> d;
diff --git a/src/network/access/qspdyprotocolhandler.cpp b/src/network/access/qspdyprotocolhandler.cpp
index f845235bf7..eef8df288d 100644
--- a/src/network/access/qspdyprotocolhandler.cpp
+++ b/src/network/access/qspdyprotocolhandler.cpp
@@ -254,7 +254,7 @@ static const char spdyDictionary[] = {
//}
QSpdyProtocolHandler::QSpdyProtocolHandler(QHttpNetworkConnectionChannel *channel)
- : QObject(0), QAbstractProtocolHandler(channel),
+ : QObject(nullptr), QAbstractProtocolHandler(channel),
m_nextStreamID(-1),
m_maxConcurrentStreams(100), // 100 is recommended in the SPDY RFC
m_initialWindowSize(0),
@@ -613,7 +613,7 @@ void QSpdyProtocolHandler::sendSYN_STREAM(const HttpMessagePair &messagePair,
QHttpNetworkRequest request = messagePair.first;
QHttpNetworkReply *reply = messagePair.second;
- ControlFrameFlags flags = 0;
+ ControlFrameFlags flags;
if (!request.uploadByteDevice()) {
// no upload -> this is the last frame, send the FIN flag
@@ -675,14 +675,14 @@ void QSpdyProtocolHandler::sendRST_STREAM(qint32 streamID, RST_STREAM_STATUS_COD
char wireData[8];
appendIntToFourBytes(wireData, streamID);
appendIntToFourBytes(wireData + 4, statusCode);
- sendControlFrame(FrameType_RST_STREAM, /* flags = */ 0, wireData, /* length = */ 8);
+ sendControlFrame(FrameType_RST_STREAM, /* flags = */ { }, wireData, /* length = */ 8);
}
void QSpdyProtocolHandler::sendPING(quint32 pingID)
{
char rawData[4];
appendIntToFourBytes(rawData, pingID);
- sendControlFrame(FrameType_PING, /* flags = */ 0, rawData, /* length = */ 4);
+ sendControlFrame(FrameType_PING, /* flags = */ { }, rawData, /* length = */ 4);
}
bool QSpdyProtocolHandler::uploadData(qint32 streamID)
@@ -720,11 +720,11 @@ bool QSpdyProtocolHandler::uploadData(qint32 streamID)
m_connection->d_func()->emitReplyError(m_socket, reply,
QNetworkReply::UnknownNetworkError);
return false;
- } else if (readPointer == 0 || currentReadSize == 0) {
+ } else if (readPointer == nullptr || currentReadSize == 0) {
// nothing to read currently, break the loop
break;
} else {
- DataFrameFlags flags = 0;
+ DataFrameFlags flags;
// we will send the FIN flag later if appropriate
qint64 currentWriteSize = sendDataFrame(streamID, flags, currentReadSize, readPointer);
if (currentWriteSize == -1 || currentWriteSize != currentReadSize) {
@@ -746,7 +746,7 @@ bool QSpdyProtocolHandler::uploadData(qint32 streamID)
}
if (replyPrivate->totallyUploadedData == request.contentLength()) {
DataFrameFlags finFlag = DataFrame_FLAG_FIN;
- qint64 writeSize = sendDataFrame(streamID, finFlag, 0, 0);
+ qint64 writeSize = sendDataFrame(streamID, finFlag, 0, nullptr);
Q_ASSERT(writeSize == 0);
Q_UNUSED(writeSize); // silence -Wunused-variable
replyPrivate->state = QHttpNetworkReplyPrivate::SPDYHalfClosed;
@@ -774,7 +774,7 @@ void QSpdyProtocolHandler::sendWINDOW_UPDATE(qint32 streamID, quint32 deltaWindo
appendIntToFourBytes(windowUpdateData, streamID);
appendIntToFourBytes(windowUpdateData + 4, deltaWindowSize);
- sendControlFrame(FrameType_WINDOW_UPDATE, /* flags = */ 0, windowUpdateData, /* length = */ 8);
+ sendControlFrame(FrameType_WINDOW_UPDATE, /* flags = */ { }, windowUpdateData, /* length = */ 8);
}
qint64 QSpdyProtocolHandler::sendDataFrame(qint32 streamID, DataFrameFlags flags,
@@ -892,7 +892,7 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
HttpMessagePair pair = it.value();
QHttpNetworkReply *httpReply = pair.second;
- Q_ASSERT(httpReply != 0);
+ Q_ASSERT(httpReply != nullptr);
if (httpReply->d_func()->state == QHttpNetworkReplyPrivate::SPDYClosed) {
sendRST_STREAM(streamID, RST_STREAM_STREAM_ALREADY_CLOSED);
@@ -950,7 +950,7 @@ void QSpdyProtocolHandler::parseHttpHeaders(char flags, const QByteArray &frameD
if (flag_fin) {
if (httpReply->d_func()->state != QHttpNetworkReplyPrivate::SPDYHalfClosed)
- sendDataFrame(streamID, DataFrame_FLAG_FIN, 0, 0);
+ sendDataFrame(streamID, DataFrame_FLAG_FIN, 0, nullptr);
replyFinished(httpReply, streamID);
}
}
@@ -1199,7 +1199,7 @@ void QSpdyProtocolHandler::handleDataFrame(const QByteArray &frameHeaders)
HttpMessagePair pair = it.value();
QHttpNetworkRequest httpRequest = pair.first;
QHttpNetworkReply *httpReply = pair.second;
- Q_ASSERT(httpReply != 0);
+ Q_ASSERT(httpReply != nullptr);
QHttpNetworkReplyPrivate *replyPrivate = httpReply->d_func();
@@ -1261,7 +1261,7 @@ void QSpdyProtocolHandler::handleDataFrame(const QByteArray &frameHeaders)
if (flag_fin) {
if (httpReply->d_func()->state != QHttpNetworkReplyPrivate::SPDYHalfClosed)
- sendDataFrame(streamID, DataFrame_FLAG_FIN, 0, 0);
+ sendDataFrame(streamID, DataFrame_FLAG_FIN, 0, nullptr);
replyFinished(httpReply, streamID);
}
}
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index cd87c3669c..751735c8bd 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -68,7 +68,7 @@ static void connManager_cleanup()
int shutdown = appShutdown.fetchAndStoreAcquire(1);
Q_ASSERT(shutdown == 0);
Q_UNUSED(shutdown);
- QNetworkConfigurationManagerPrivate *cmp = connManager_ptr.fetchAndStoreAcquire(0);
+ QNetworkConfigurationManagerPrivate *cmp = connManager_ptr.fetchAndStoreAcquire(nullptr);
if (cmp)
cmp->cleanup();
}
@@ -355,7 +355,7 @@ QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabil
if (priv)
return priv->capabilities();
- return QNetworkConfigurationManager::Capabilities(0);
+ return {};
}
/*!
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp
index b432444669..f0aa452dd3 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.cpp
+++ b/src/network/bearer/qnetworkconfigmanager_p.cpp
@@ -59,7 +59,7 @@
QT_BEGIN_NAMESPACE
QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate()
- : QObject(), pollTimer(0),
+ : QObject(), pollTimer(nullptr),
loader(QBearerEngineFactoryInterface_iid, QLatin1String("/bearer")),
forcedPolling(0), firstUpdate(true)
{
@@ -93,7 +93,7 @@ void QNetworkConfigurationManagerPrivate::cleanup()
{
QThread* thread = bearerThread;
deleteLater();
- if (thread->wait(5000))
+ if (thread->wait(QDeadlineTimer(5000)))
delete thread;
}
@@ -367,7 +367,7 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations()
bool envOK = false;
const int skipGeneric = qEnvironmentVariableIntValue("QT_EXCLUDE_GENERIC_BEARER", &envOK);
- QBearerEngine *generic = 0;
+ QBearerEngine *generic = nullptr;
QFactoryLoader *l = &loader;
const PluginKeyMap keyMap = l->keyMap();
const PluginKeyMapConstIterator cend = keyMap.constEnd();
diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp
index 19bc44e02a..25c4ab711e 100644
--- a/src/network/bearer/qnetworkconfiguration.cpp
+++ b/src/network/bearer/qnetworkconfiguration.cpp
@@ -209,7 +209,7 @@ QT_BEGIN_NAMESPACE
\sa isValid()
*/
QNetworkConfiguration::QNetworkConfiguration()
- : d(0)
+ : d(nullptr)
{
}
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 1636bcee97..324016d72a 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -250,7 +250,7 @@ QT_BEGIN_NAMESPACE
\sa QNetworkConfiguration
*/
QNetworkSession::QNetworkSession(const QNetworkConfiguration &connectionConfig, QObject *parent)
- : QObject(parent), d(0)
+ : QObject(parent), d(nullptr)
{
qRegisterMetaType<QNetworkSession::State>();
qRegisterMetaType<QNetworkSession::SessionError>();
diff --git a/src/network/configure.json b/src/network/configure.json
index ddf8f4c709..496401749f 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -61,11 +61,11 @@
"export": "openssl",
"test": {
"tail": [
- "#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10000000L",
- "# error OpenSSL >= 1.0.0 is required",
+ "#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L",
+ "# error OpenSSL >= 1.1.0 is required",
"#endif",
- "#if OPENSSL_VERSION_NUMBER-0 >= 0x10002000L && !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)",
- "# error OpenSSL was reported as >= 1.0.2 but is missing required features, possibly it's libressl which is unsupported",
+ "#if !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)",
+ "# error OpenSSL was reported as >= 1.1.0 but is missing required features, possibly it's libressl which is unsupported",
"#endif"
]
},
@@ -189,19 +189,6 @@
},
"use": "network"
},
- "openssl11": {
- "label": "OpenSSL 1.1 support",
- "type": "compile",
- "test": {
- "include": "openssl/opensslv.h",
- "tail": [
- "#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L",
- "# error OpenSSL >= 1.1 is required",
- "#endif"
- ]
- },
- "use": "openssl"
- },
"dtls": {
"label": "DTLS support in OpenSSL",
"type": "compile",
@@ -339,7 +326,7 @@
},
"opensslv11": {
"label": "OpenSSL 1.1",
- "condition": "features.openssl && tests.openssl11",
+ "condition": "features.openssl",
"output": [ "publicFeature" ]
},
"sctp": {
diff --git a/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp b/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp
index 12691da7a2..b381ae7b6e 100644
--- a/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp
+++ b/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp
@@ -55,3 +55,11 @@ for (const QSslCertificate &cert : certs) {
qDebug() << cert.issuerInfo(QSslCertificate::Organization);
}
//! [0]
+
+//! [1]
+const auto certs = QSslCertificate::fromPath("C:/ssl/certificate.*.pem",
+ QSsl::Pem, QSslCertificate::Wildcard);
+for (const QSslCertificate &cert : certs) {
+ qDebug() << cert.issuerInfo(QSslCertificate::Organization);
+}
+//! [1]
diff --git a/src/network/doc/snippets/network/tcpwait.cpp b/src/network/doc/snippets/network/tcpwait.cpp
index 97856e157f..d57305930c 100644
--- a/src/network/doc/snippets/network/tcpwait.cpp
+++ b/src/network/doc/snippets/network/tcpwait.cpp
@@ -51,8 +51,6 @@
#include <QtGui>
#include <QTcpSocket>
-#include "server.h"
-
int main(int argv, char **args)
{
QCoreApplication app(argv, args);
diff --git a/src/network/doc/snippets/snippets.pro b/src/network/doc/snippets/snippets.pro
new file mode 100644
index 0000000000..39153e0c8e
--- /dev/null
+++ b/src/network/doc/snippets/snippets.pro
@@ -0,0 +1,7 @@
+TEMPLATE = app
+
+TARGET = network_cppsnippets
+
+QT += network
+
+SOURCES += network/tcpwait.cpp
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 33a30eb1cd..e9a8e2a9e5 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -158,7 +158,7 @@ static QByteArray qGssapiContinue(QAuthenticatorPrivate *ctx,
Constructs an empty authentication object.
*/
QAuthenticator::QAuthenticator()
- : d(0)
+ : d(nullptr)
{
}
@@ -175,7 +175,7 @@ QAuthenticator::~QAuthenticator()
Constructs a copy of \a other.
*/
QAuthenticator::QAuthenticator(const QAuthenticator &other)
- : d(0)
+ : d(nullptr)
{
if (other.d)
*this = other;
@@ -1227,7 +1227,7 @@ QByteArray qEncodeHmacMd5(QByteArray &key, const QByteArray &message)
static QByteArray qCreatev2Hash(const QAuthenticatorPrivate *ctx,
QNtlmPhase3Block *phase3)
{
- Q_ASSERT(phase3 != 0);
+ Q_ASSERT(phase3 != nullptr);
// since v2 Hash is need for both NTLMv2 and LMv2 it is calculated
// only once and stored and reused
if(phase3->v2Hash.size() == 0) {
@@ -1284,7 +1284,7 @@ static QByteArray qEncodeNtlmv2Response(const QAuthenticatorPrivate *ctx,
const QNtlmPhase2Block& ch,
QNtlmPhase3Block *phase3)
{
- Q_ASSERT(phase3 != 0);
+ Q_ASSERT(phase3 != nullptr);
// return value stored in phase3
qCreatev2Hash(ctx, phase3);
@@ -1351,7 +1351,7 @@ static QByteArray qEncodeLmv2Response(const QAuthenticatorPrivate *ctx,
const QNtlmPhase2Block& ch,
QNtlmPhase3Block *phase3)
{
- Q_ASSERT(phase3 != 0);
+ Q_ASSERT(phase3 != nullptr);
// return value stored in phase3
qCreatev2Hash(ctx, phase3);
diff --git a/src/network/kernel/qdnslookup.cpp b/src/network/kernel/qdnslookup.cpp
index 1b66829070..ab1be02b6b 100644
--- a/src/network/kernel/qdnslookup.cpp
+++ b/src/network/kernel/qdnslookup.cpp
@@ -481,7 +481,7 @@ void QDnsLookup::abort()
{
Q_D(QDnsLookup);
if (d->runnable) {
- d->runnable = 0;
+ d->runnable = nullptr;
d->reply = QDnsLookupReply();
d->reply.error = QDnsLookup::OperationCancelledError;
d->reply.errorString = tr("Operation cancelled");
@@ -992,7 +992,7 @@ void QDnsLookupPrivate::_q_lookupFinished(const QDnsLookupReply &_reply)
qDebug("DNS reply for %s: %i (%s)", qPrintable(name), _reply.error, qPrintable(_reply.errorString));
#endif
reply = _reply;
- runnable = 0;
+ runnable = nullptr;
isFinished = true;
emit q->finished();
}
diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
index ee7484ab35..12b40fc35d 100644
--- a/src/network/kernel/qdnslookup_unix.cpp
+++ b/src/network/kernel/qdnslookup_unix.cpp
@@ -73,13 +73,13 @@ QT_BEGIN_NAMESPACE
typedef struct __res_state* res_state;
#endif
typedef int (*dn_expand_proto)(const unsigned char *, const unsigned char *, const unsigned char *, char *, int);
-static dn_expand_proto local_dn_expand = 0;
+static dn_expand_proto local_dn_expand = nullptr;
typedef void (*res_nclose_proto)(res_state);
-static res_nclose_proto local_res_nclose = 0;
+static res_nclose_proto local_res_nclose = nullptr;
typedef int (*res_ninit_proto)(res_state);
-static res_ninit_proto local_res_ninit = 0;
+static res_ninit_proto local_res_ninit = nullptr;
typedef int (*res_nquery_proto)(res_state, const char *, int, int, unsigned char *, int);
-static res_nquery_proto local_res_nquery = 0;
+static res_nquery_proto local_res_nquery = nullptr;
// Custom deleter to close resolver state.
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index b54fb349fb..ed1c23ed6e 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -144,7 +144,7 @@ static bool parseIp6(const QString &address, QIPAddressUtils::IPv6Address &addr,
} else {
scopeId->clear();
}
- return QIPAddressUtils::parseIp6(addr, tmp.constBegin(), tmp.constEnd()) == 0;
+ return QIPAddressUtils::parseIp6(addr, tmp.constBegin(), tmp.constEnd()) == nullptr;
}
bool QHostAddressPrivate::parse(const QString &ipString)
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 9dbb154914..93be053ef3 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -383,34 +383,13 @@ QHostInfo QHostInfo::fromName(const QString &name)
return hostInfo;
}
-#ifndef QT_NO_BEARERMANAGEMENT
-QHostInfo QHostInfoPrivate::fromName(const QString &name, QSharedPointer<QNetworkSession> session)
-{
-#if defined QHOSTINFO_DEBUG
- qDebug("QHostInfoPrivate::fromName(\"%s\") with session %p",name.toLatin1().constData(), session.data());
-#endif
-
- QHostInfo hostInfo = QHostInfoAgent::fromName(name, session);
- QHostInfoLookupManager* manager = theHostInfoLookupManager();
- manager->cache.put(name, hostInfo);
- return hostInfo;
-}
-#endif
-
-#ifndef QT_NO_BEARERMANAGEMENT
-QHostInfo QHostInfoAgent::fromName(const QString &hostName, QSharedPointer<QNetworkSession>)
-{
- return QHostInfoAgent::fromName(hostName);
-}
-#endif
-
QHostInfo QHostInfoAgent::reverseLookup(const QHostAddress &address)
{
QHostInfo results;
// Reverse lookup
sockaddr_in sa4;
sockaddr_in6 sa6;
- sockaddr *sa = 0;
+ sockaddr *sa = nullptr;
QT_SOCKLEN_T saSize;
if (address.protocol() == QAbstractSocket::IPv4Protocol) {
sa = reinterpret_cast<sockaddr *>(&sa4);
@@ -455,7 +434,7 @@ QHostInfo QHostInfoAgent::lookup(const QString &hostName)
return results;
}
- addrinfo *res = 0;
+ addrinfo *res = nullptr;
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h
index 1798ceab0a..d7875a0673 100644
--- a/src/network/kernel/qhostinfo_p.h
+++ b/src/network/kernel/qhostinfo_p.h
@@ -119,9 +119,6 @@ class QHostInfoAgent
{
public:
static QHostInfo fromName(const QString &hostName);
-#ifndef QT_NO_BEARERMANAGEMENT
- static QHostInfo fromName(const QString &hostName, QSharedPointer<QNetworkSession> networkSession);
-#endif
private:
static QHostInfo lookup(const QString &hostName);
static QHostInfo reverseLookup(const QHostAddress &address);
@@ -136,10 +133,6 @@ public:
lookupId(0)
{
}
-#ifndef QT_NO_BEARERMANAGEMENT
- //not a public API yet
- static QHostInfo fromName(const QString &hostName, QSharedPointer<QNetworkSession> networkSession);
-#endif
static int lookupHostImpl(const QString &name,
const QObject *receiver,
QtPrivate::QSlotObjectBase *slotObj,
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 78a05f8407..625fbabf31 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -80,12 +80,12 @@ enum LibResolvFeature {
typedef struct __res_state *res_state_ptr;
typedef int (*res_init_proto)(void);
-static res_init_proto local_res_init = 0;
+static res_init_proto local_res_init = nullptr;
typedef int (*res_ninit_proto)(res_state_ptr);
-static res_ninit_proto local_res_ninit = 0;
+static res_ninit_proto local_res_ninit = nullptr;
typedef void (*res_nclose_proto)(res_state_ptr);
-static res_nclose_proto local_res_nclose = 0;
-static res_state_ptr local_res = 0;
+static res_nclose_proto local_res_nclose = nullptr;
+static res_state_ptr local_res = nullptr;
#if QT_CONFIG(library) && !defined(Q_OS_QNX)
namespace {
diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp
index d43dba3e0c..eed57f8a32 100644
--- a/src/network/kernel/qnetworkinterface.cpp
+++ b/src/network/kernel/qnetworkinterface.cpp
@@ -627,7 +627,7 @@ bool QNetworkAddressEntry::isPermanent() const
Constructs an empty network interface object.
*/
QNetworkInterface::QNetworkInterface()
- : d(0)
+ : d(nullptr)
{
}
@@ -746,7 +746,7 @@ QString QNetworkInterface::humanReadableName() const
*/
QNetworkInterface::InterfaceFlags QNetworkInterface::flags() const
{
- return d ? d->flags : InterfaceFlags(0);
+ return d ? d->flags : InterfaceFlags{};
}
/*!
diff --git a/src/network/kernel/qnetworkinterface_p.h b/src/network/kernel/qnetworkinterface_p.h
index 44e27a7e34..b879a397f2 100644
--- a/src/network/kernel/qnetworkinterface_p.h
+++ b/src/network/kernel/qnetworkinterface_p.h
@@ -82,7 +82,7 @@ public:
class QNetworkInterfacePrivate: public QSharedData
{
public:
- QNetworkInterfacePrivate() : index(0), flags(nullptr)
+ QNetworkInterfacePrivate() : index(0)
{ }
~QNetworkInterfacePrivate()
{ }
diff --git a/src/network/kernel/qnetworkinterface_unix_p.h b/src/network/kernel/qnetworkinterface_unix_p.h
index 553af5a303..e5c8909eca 100644
--- a/src/network/kernel/qnetworkinterface_unix_p.h
+++ b/src/network/kernel/qnetworkinterface_unix_p.h
@@ -80,7 +80,7 @@ QT_BEGIN_NAMESPACE
static QNetworkInterface::InterfaceFlags convertFlags(uint rawFlags)
{
- QNetworkInterface::InterfaceFlags flags = nullptr;
+ QNetworkInterface::InterfaceFlags flags;
flags |= (rawFlags & IFF_UP) ? QNetworkInterface::IsUp : QNetworkInterface::InterfaceFlag(0);
flags |= (rawFlags & IFF_RUNNING) ? QNetworkInterface::IsRunning : QNetworkInterface::InterfaceFlag(0);
flags |= (rawFlags & IFF_BROADCAST) ? QNetworkInterface::CanBroadcast : QNetworkInterface::InterfaceFlag(0);
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index a2a89ed94b..3cabdd0bd5 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -241,7 +241,7 @@
#include "qstringlist.h"
#include "qurl.h"
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
#include <QtNetwork/QNetworkConfiguration>
#endif
@@ -254,13 +254,13 @@ class QGlobalNetworkProxy
{
public:
QGlobalNetworkProxy()
- : applicationLevelProxy(0)
- , applicationLevelProxyFactory(0)
+ : applicationLevelProxy(nullptr)
+ , applicationLevelProxyFactory(nullptr)
#if QT_CONFIG(socks5)
- , socks5SocketEngineHandler(0)
+ , socks5SocketEngineHandler(nullptr)
#endif
#if QT_CONFIG(http)
- , httpSocketEngineHandler(0)
+ , httpSocketEngineHandler(nullptr)
#endif
#ifdef QT_USE_SYSTEM_PROXIES
, useSystemProxies(true)
@@ -313,7 +313,7 @@ public:
applicationLevelProxy = new QNetworkProxy;
*applicationLevelProxy = proxy;
delete applicationLevelProxyFactory;
- applicationLevelProxyFactory = 0;
+ applicationLevelProxyFactory = nullptr;
useSystemProxies = false;
}
@@ -501,7 +501,7 @@ template<> void QSharedDataPointer<QNetworkProxyPrivate>::detach()
\sa setType(), setApplicationProxy()
*/
QNetworkProxy::QNetworkProxy()
- : d(0)
+ : d(nullptr)
{
// make sure we have QGlobalNetworkProxy singleton created, otherwise
// you don't have any socket engine handler created when directly setting
@@ -984,11 +984,6 @@ template<> void QSharedDataPointer<QNetworkProxyQueryPrivate>::detach()
like choosing an caching HTTP proxy for HTTP-based connections,
but a more powerful SOCKSv5 proxy for all others.
- The network configuration specifies which configuration to use,
- when bearer management is used. For example on a mobile phone
- the proxy settings are likely to be different for the cellular
- network vs WLAN.
-
Some of the criteria may not make sense in all of the types of
query. The following table lists the criteria that are most
commonly used, according to the type of query.
diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp
index 92f91956b9..67fda24ea6 100644
--- a/src/network/kernel/qnetworkproxy_mac.cpp
+++ b/src/network/kernel/qnetworkproxy_mac.cpp
@@ -210,16 +210,14 @@ QList<QNetworkProxy> macQueryInternal(const QNetworkProxyQuery &query)
QList<QNetworkProxy> result;
// obtain a dictionary to the proxy settings:
- CFDictionaryRef dict = SCDynamicStoreCopyProxies(NULL);
+ const QCFType<CFDictionaryRef> dict = SCDynamicStoreCopyProxies(NULL);
if (!dict) {
qWarning("QNetworkProxyFactory::systemProxyForQuery: SCDynamicStoreCopyProxies returned NULL");
return result; // failed
}
- if (isHostExcluded(dict, query.peerHostName())) {
- CFRelease(dict);
+ if (isHostExcluded(dict, query.peerHostName()))
return result; // no proxy for this host
- }
// is there a PAC enabled? If so, use it first.
CFNumberRef pacEnabled;
@@ -329,7 +327,6 @@ QList<QNetworkProxy> macQueryInternal(const QNetworkProxyQuery &query)
result << https;
}
- CFRelease(dict);
return result;
}
diff --git a/src/network/kernel/qurlinfo.cpp b/src/network/kernel/qurlinfo.cpp
index 7ae6822fb4..e6f2e70ff4 100644
--- a/src/network/kernel/qurlinfo.cpp
+++ b/src/network/kernel/qurlinfo.cpp
@@ -126,7 +126,7 @@ public:
QUrlInfo::QUrlInfo()
{
- d = 0;
+ d = nullptr;
}
/*!
@@ -139,7 +139,7 @@ QUrlInfo::QUrlInfo(const QUrlInfo &ui)
d = new QUrlInfoPrivate;
*d = *ui.d;
} else {
- d = 0;
+ d = nullptr;
}
}
@@ -443,7 +443,7 @@ QUrlInfo &QUrlInfo::operator=(const QUrlInfo &ui)
*d = *ui.d;
} else {
delete d;
- d = 0;
+ d = nullptr;
}
return *this;
}
@@ -683,7 +683,7 @@ bool QUrlInfo::equal(const QUrlInfo &i1, const QUrlInfo &i2,
bool QUrlInfo::operator==(const QUrlInfo &other) const
{
if (!d)
- return other.d == 0;
+ return other.d == nullptr;
if (!other.d)
return false;
@@ -721,7 +721,7 @@ bool QUrlInfo::operator==(const QUrlInfo &other) const
*/
bool QUrlInfo::isValid() const
{
- return d != 0;
+ return d != nullptr;
}
QT_END_NAMESPACE
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index b1ea9a4133..3d88c0337d 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -215,7 +215,7 @@
connections, you will have to register it with Q_DECLARE_METATYPE() and
qRegisterMetaType().
- \sa error(), errorString(), {Creating Custom Qt Types}
+ \sa socketError(), errorString(), {Creating Custom Qt Types}
*/
/*!
@@ -329,7 +329,7 @@
is non-blocking).
\value UnknownSocketError An unidentified error occurred.
- \sa QAbstractSocket::error()
+ \sa QAbstractSocket::socketError()
*/
/*!
@@ -464,7 +464,10 @@
#include "qabstractsocket_p.h"
#include "private/qhostinfo_p.h"
+#if QT_CONFIG(bearermanagement) // ### Qt6: Remove section
#include "private/qnetworksession_p.h"
+#endif
+#include "private/qnetworkconfiguration_p.h" // ### Qt6: Remove include
#include <qabstracteventdispatcher.h>
#include <qhostaddress.h>
@@ -564,12 +567,12 @@ QAbstractSocketPrivate::QAbstractSocketPrivate()
port(0),
localPort(0),
peerPort(0),
- socketEngine(0),
+ socketEngine(nullptr),
cachedSocketDescriptor(-1),
readBufferMaxSize(0),
isBuffered(false),
hasPendingData(false),
- connectTimer(0),
+ connectTimer(nullptr),
hostLookupId(-1),
socketType(QAbstractSocket::UnknownSocketType),
state(QAbstractSocket::UnconnectedState),
@@ -603,7 +606,7 @@ void QAbstractSocketPrivate::resetSocketLayer()
socketEngine->close();
socketEngine->disconnect();
delete socketEngine;
- socketEngine = 0;
+ socketEngine = nullptr;
cachedSocketDescriptor = -1;
}
if (connectTimer)
@@ -643,7 +646,7 @@ bool QAbstractSocketPrivate::initSocketLayer(QAbstractSocket::NetworkLayerProtoc
QAbstractSocket::tr("Operation on socket is not supported"));
return false;
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the socket engine (if it has been set)
socketEngine->setProperty("_q_networksession", q->property("_q_networksession"));
#endif
@@ -659,7 +662,7 @@ bool QAbstractSocketPrivate::initSocketLayer(QAbstractSocket::NetworkLayerProtoc
configureCreatedSocket();
- if (threadData->hasEventDispatcher())
+ if (threadData.loadRelaxed()->hasEventDispatcher())
socketEngine->setReceiver(this);
#if defined (QABSTRACTSOCKET_DEBUG)
@@ -1138,7 +1141,7 @@ void QAbstractSocketPrivate::_q_connectToNextAddress()
}
// Start the connect timer.
- if (threadData->hasEventDispatcher()) {
+ if (threadData.loadRelaxed()->hasEventDispatcher()) {
if (!connectTimer) {
connectTimer = new QTimer(q);
QObject::connect(connectTimer, SIGNAL(timeout()),
@@ -1146,7 +1149,7 @@ void QAbstractSocketPrivate::_q_connectToNextAddress()
Qt::DirectConnection);
}
int connectTimeout = QNetworkConfigurationPrivate::DefaultTimeout;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
QSharedPointer<QNetworkSession> networkSession = qvariant_cast< QSharedPointer<QNetworkSession> >(q->property("_q_networksession"));
if (networkSession) {
QNetworkConfiguration networkConfiguration = networkSession->configuration();
@@ -1740,7 +1743,7 @@ void QAbstractSocket::connectToHost(const QString &hostName, quint16 port,
return;
#endif
} else {
- if (d->threadData->hasEventDispatcher()) {
+ if (d->threadData.loadRelaxed()->hasEventDispatcher()) {
// this internal API for QHostInfo either immediately gives us the desired
// QHostInfo from cache or later calls the _q_startConnecting slot.
bool immediateResultValid = false;
@@ -1941,7 +1944,7 @@ bool QAbstractSocket::setSocketDescriptor(qintptr socketDescriptor, SocketState
d->setError(UnsupportedSocketOperationError, tr("Operation on socket is not supported"));
return false;
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the socket engine (if it has been set)
d->socketEngine->setProperty("_q_networksession", property("_q_networksession"));
#endif
@@ -1953,7 +1956,7 @@ bool QAbstractSocket::setSocketDescriptor(qintptr socketDescriptor, SocketState
// Sync up with error string, which open() shall clear.
d->socketError = UnknownSocketError;
- if (d->threadData->hasEventDispatcher())
+ if (d->threadData.loadRelaxed()->hasEventDispatcher())
d->socketEngine->setReceiver(d);
QIODevice::open(openMode);
@@ -2094,7 +2097,7 @@ QVariant QAbstractSocket::socketOption(QAbstractSocket::SocketOption option)
Waits until the socket is connected, up to \a msecs
milliseconds. If the connection has been established, this
function returns \c true; otherwise it returns \c false. In the case
- where it returns \c false, you can call error() to determine
+ where it returns \c false, you can call socketError() to determine
the cause of the error.
The following example waits up to one second for a connection
@@ -2134,7 +2137,7 @@ bool QAbstractSocket::waitForConnected(int msecs)
QElapsedTimer stopWatch;
stopWatch.start();
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
QSharedPointer<QNetworkSession> networkSession = qvariant_cast< QSharedPointer<QNetworkSession> >(property("_q_networksession"));
#endif
@@ -2144,27 +2147,20 @@ bool QAbstractSocket::waitForConnected(int msecs)
#endif
QHostInfo::abortHostLookup(d->hostLookupId);
d->hostLookupId = -1;
-#ifndef QT_NO_BEARERMANAGEMENT
- if (networkSession) {
- d->_q_startConnecting(QHostInfoPrivate::fromName(d->hostName, networkSession));
- } else
-#endif
- {
- QHostAddress temp;
- if (temp.setAddress(d->hostName)) {
- QHostInfo info;
- info.setAddresses(QList<QHostAddress>() << temp);
- d->_q_startConnecting(info);
- } else {
- d->_q_startConnecting(QHostInfo::fromName(d->hostName));
- }
+ QHostAddress temp;
+ if (temp.setAddress(d->hostName)) {
+ QHostInfo info;
+ info.setAddresses(QList<QHostAddress>() << temp);
+ d->_q_startConnecting(info);
+ } else {
+ d->_q_startConnecting(QHostInfo::fromName(d->hostName));
}
}
if (state() == UnconnectedState)
return false; // connect not im progress anymore!
int connectTimeout = QNetworkConfigurationPrivate::DefaultTimeout;
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
if (networkSession) {
QNetworkConfiguration networkConfiguration = networkSession->configuration();
connectTimeout = networkConfiguration.connectTimeout();
@@ -2873,7 +2869,7 @@ void QAbstractSocket::setReadBufferSize(qint64 size)
/*!
Returns the state of the socket.
- \sa error()
+ \sa socketError()
*/
QAbstractSocket::SocketState QAbstractSocket::state() const
{
@@ -2900,16 +2896,35 @@ QAbstractSocket::SocketType QAbstractSocket::socketType() const
return d_func()->socketType;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
+ \deprecated
+
+ Use socketError() instead.
+
Returns the type of error that last occurred.
- \sa state(), errorString()
+ \sa state(), errorString(), socketError()
*/
QAbstractSocket::SocketError QAbstractSocket::error() const
{
+ return socketError();
+}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/*!
+ \since 5.15
+
+ Returns the type of error that last occurred.
+
+ \sa state(), errorString()
+*/
+QAbstractSocket::SocketError QAbstractSocket::socketError() const
+{
return d_func()->socketError;
}
+
/*!
Sets the type of error that last occurred to \a socketError.
diff --git a/src/network/socket/qabstractsocket.h b/src/network/socket/qabstractsocket.h
index de09195eeb..cbc79ea684 100644
--- a/src/network/socket/qabstractsocket.h
+++ b/src/network/socket/qabstractsocket.h
@@ -180,7 +180,12 @@ public:
SocketType socketType() const;
SocketState state() const;
- SocketError error() const;
+
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use socketError()") SocketError error() const;
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+ SocketError socketError() const;
// from QIODevice
void close() override;
diff --git a/src/network/socket/qabstractsocketengine.cpp b/src/network/socket/qabstractsocketengine.cpp
index 3fffff6d5a..54c7452c66 100644
--- a/src/network/socket/qabstractsocketengine.cpp
+++ b/src/network/socket/qabstractsocketengine.cpp
@@ -85,7 +85,7 @@ QAbstractSocketEnginePrivate::QAbstractSocketEnginePrivate()
, peerPort(0)
, inboundStreamCount(0)
, outboundStreamCount(0)
- , receiver(0)
+ , receiver(nullptr)
{
}
@@ -104,7 +104,7 @@ QAbstractSocketEngine *QAbstractSocketEngine::createSocketEngine(QAbstractSocket
#ifndef QT_NO_NETWORKPROXY
// proxy type must have been resolved by now
if (proxy.type() == QNetworkProxy::DefaultProxy)
- return 0;
+ return nullptr;
#endif
QMutexLocker locker(&socketHandlers()->mutex);
@@ -116,7 +116,7 @@ QAbstractSocketEngine *QAbstractSocketEngine::createSocketEngine(QAbstractSocket
#ifndef QT_NO_NETWORKPROXY
// only NoProxy can have reached here
if (proxy.type() != QNetworkProxy::NoProxy)
- return 0;
+ return nullptr;
#endif
return new QNativeSocketEngine(parent);
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index c67b273937..21f97be29a 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -72,7 +72,7 @@ bool QHttpSocketEngine::initialize(QAbstractSocket::SocketType type, QAbstractSo
setSocketType(type);
d->socket = new QTcpSocket(this);
d->reply = new QHttpNetworkReply(QUrl(), this);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
d->socket->setProperty("_q_networkSession", property("_q_networkSession"));
#endif
@@ -216,7 +216,7 @@ void QHttpSocketEngine::close()
if (d->socket) {
d->socket->close();
delete d->socket;
- d->socket = 0;
+ d->socket = nullptr;
}
}
@@ -370,8 +370,8 @@ bool QHttpSocketEngine::waitForRead(int msecs, bool *timedOut)
if (!d->socket->waitForReadyRead(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))) {
if (d->socket->state() == QAbstractSocket::UnconnectedState)
return true;
- setError(d->socket->error(), d->socket->errorString());
- if (timedOut && d->socket->error() == QAbstractSocket::SocketTimeoutError)
+ setError(d->socket->socketError(), d->socket->errorString());
+ if (timedOut && d->socket->socketError() == QAbstractSocket::SocketTimeoutError)
*timedOut = true;
return false;
}
@@ -385,8 +385,8 @@ bool QHttpSocketEngine::waitForRead(int msecs, bool *timedOut)
// Report any error that may occur.
if (d->state != Connected) {
- setError(d->socket->error(), d->socket->errorString());
- if (timedOut && d->socket->error() == QAbstractSocket::SocketTimeoutError)
+ setError(d->socket->socketError(), d->socket->errorString());
+ if (timedOut && d->socket->socketError() == QAbstractSocket::SocketTimeoutError)
*timedOut = true;
return false;
}
@@ -401,7 +401,7 @@ bool QHttpSocketEngine::waitForWrite(int msecs, bool *timedOut)
if (d->state == Connected) {
if (d->socket->bytesToWrite()) {
if (!d->socket->waitForBytesWritten(msecs)) {
- if (d->socket->error() == QAbstractSocket::SocketTimeoutError && timedOut)
+ if (d->socket->socketError() == QAbstractSocket::SocketTimeoutError && timedOut)
*timedOut = true;
return false;
}
@@ -421,8 +421,7 @@ bool QHttpSocketEngine::waitForWrite(int msecs, bool *timedOut)
// Report any error that may occur.
if (d->state != Connected) {
-// setError(d->socket->error(), d->socket->errorString());
- if (timedOut && d->socket->error() == QAbstractSocket::SocketTimeoutError)
+ if (timedOut && d->socket->socketError() == QAbstractSocket::SocketTimeoutError)
*timedOut = true;
}
@@ -586,7 +585,7 @@ void QHttpSocketEngine::slotSocketReadNotification()
}
int statusCode = d->reply->statusCode();
- QAuthenticatorPrivate *priv = 0;
+ QAuthenticatorPrivate *priv = nullptr;
if (statusCode == 200) {
d->state = Connected;
setLocalAddress(d->socket->localAddress());
@@ -829,8 +828,8 @@ QHttpSocketEnginePrivate::QHttpSocketEnginePrivate()
, credentialsSent(false)
, pendingResponseData(0)
{
- socket = 0;
- reply = 0;
+ socket = nullptr;
+ reply = nullptr;
state = QHttpSocketEngine::None;
}
@@ -843,15 +842,15 @@ QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(QAbstractSoc
QObject *parent)
{
if (socketType != QAbstractSocket::TcpSocket)
- return 0;
+ return nullptr;
// proxy type must have been resolved by now
if (proxy.type() != QNetworkProxy::HttpProxy)
- return 0;
+ return nullptr;
// we only accept active sockets
if (!qobject_cast<QAbstractSocket *>(parent))
- return 0;
+ return nullptr;
QHttpSocketEngine *engine = new QHttpSocketEngine(parent);
engine->setProxy(proxy);
@@ -860,7 +859,7 @@ QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(QAbstractSoc
QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(qintptr, QObject *)
{
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp
index 3e36a7b229..5ca2db70b9 100644
--- a/src/network/socket/qlocalserver.cpp
+++ b/src/network/socket/qlocalserver.cpp
@@ -417,7 +417,7 @@ QLocalSocket *QLocalServer::nextPendingConnection()
{
Q_D(QLocalServer);
if (d->pendingConnections.isEmpty())
- return 0;
+ return nullptr;
QLocalSocket *nextSocket = d->pendingConnections.dequeue();
#ifndef QT_LOCALSOCKET_TCP
if (d->pendingConnections.size() <= d->maxPendingConnections)
diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp
index 9547ec5b88..88367d680d 100644
--- a/src/network/socket/qlocalserver_unix.cpp
+++ b/src/network/socket/qlocalserver_unix.cpp
@@ -243,7 +243,7 @@ void QLocalServerPrivate::closeServer()
if (socketNotifier) {
socketNotifier->setEnabled(false); // Otherwise, closed socket is checked before deleter runs
socketNotifier->deleteLater();
- socketNotifier = 0;
+ socketNotifier = nullptr;
}
if (-1 != listenSocket)
diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp
index af7cdb76d2..38e47d6e26 100644
--- a/src/network/socket/qlocalsocket.cpp
+++ b/src/network/socket/qlocalsocket.cpp
@@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE
The socket is opened in the given \a openMode and first enters ConnectingState.
If a connection is established, QLocalSocket enters ConnectedState and emits connected().
- After calling this function, the socket can emit error() to signal that an error occurred.
+ After calling this function, the socket can emit errorOccurred() to signal that an error occurred.
\sa state(), serverName(), waitForConnected()
*/
@@ -87,7 +87,7 @@ QT_BEGIN_NAMESPACE
Note that unlike in most other QIODevice subclasses, open() may not open the device directly.
The function return false if the socket was already connected or if the server to connect
- to was not defined and true in any other case. The connected() or error() signals will be
+ to was not defined and true in any other case. The connected() or errorOccurred() signals will be
emitted once the device is actualy open (or the connection failed).
See connectToServer() for more details.
@@ -329,6 +329,14 @@ QT_BEGIN_NAMESPACE
/*!
\fn void QLocalSocket::error(QLocalSocket::LocalSocketError socketError)
+ \obsolete
+
+ Use errorOccurred() instead.
+*/
+
+/*!
+ \fn void QLocalSocket::errorOccurred(QLocalSocket::LocalSocketError socketError)
+ \since 5.15
This signal is emitted after an error occurred. The \a socketError
parameter describes the type of error that occurred.
@@ -362,6 +370,9 @@ QLocalSocket::QLocalSocket(QObject * parent)
{
Q_D(QLocalSocket);
d->init();
+
+ // Support the deprecated error() signal:
+ connect(this, &QLocalSocket::errorOccurred, this, QOverload<QLocalSocket::LocalSocketError>::of(&QLocalSocket::error));
}
/*!
@@ -372,7 +383,7 @@ QLocalSocket::~QLocalSocket()
QLocalSocket::close();
#if !defined(Q_OS_WIN) && !defined(QT_LOCALSOCKET_TCP)
Q_D(QLocalSocket);
- d->unixSocket.setParent(0);
+ d->unixSocket.setParent(nullptr);
#endif
}
@@ -389,7 +400,7 @@ bool QLocalSocket::open(OpenMode openMode)
The socket is opened in the given \a openMode and first enters ConnectingState.
If a connection is established, QLocalSocket enters ConnectedState and emits connected().
- After calling this function, the socket can emit error() to signal that an error occurred.
+ After calling this function, the socket can emit errorOccurred() to signal that an error occurred.
\sa state(), serverName(), waitForConnected()
*/
diff --git a/src/network/socket/qlocalsocket.h b/src/network/socket/qlocalsocket.h
index 1876a6ac0d..ae78c86b3c 100644
--- a/src/network/socket/qlocalsocket.h
+++ b/src/network/socket/qlocalsocket.h
@@ -117,7 +117,11 @@ public:
Q_SIGNALS:
void connected();
void disconnected();
+#if QT_DEPRECATED_SINCE(5,15)
+ QT_DEPRECATED_X("Use QLocalSocket::errorOccurred(QLocalSocket::LocalSocketError) instead")
void error(QLocalSocket::LocalSocketError socketError);
+#endif
+ void errorOccurred(QLocalSocket::LocalSocketError socketError);
void stateChanged(QLocalSocket::LocalSocketState socketState);
protected:
diff --git a/src/network/socket/qlocalsocket_p.h b/src/network/socket/qlocalsocket_p.h
index d93b53be0c..e3bcd92326 100644
--- a/src/network/socket/qlocalsocket_p.h
+++ b/src/network/socket/qlocalsocket_p.h
@@ -125,7 +125,7 @@ public:
bool ownsTcpSocket;
void setSocket(QLocalUnixSocket*);
QString generateErrorString(QLocalSocket::LocalSocketError, const QString &function) const;
- void errorOccurred(QLocalSocket::LocalSocketError, const QString &function);
+ void setErrorAndEmit(QLocalSocket::LocalSocketError, const QString &function);
void _q_stateChanged(QAbstractSocket::SocketState newState);
void _q_error(QAbstractSocket::SocketError newError);
#elif defined(Q_OS_WIN)
@@ -142,7 +142,7 @@ public:
qint64 skip(qint64 maxSize) override;
QLocalUnixSocket unixSocket;
QString generateErrorString(QLocalSocket::LocalSocketError, const QString &function) const;
- void errorOccurred(QLocalSocket::LocalSocketError, const QString &function);
+ void setErrorAndEmit(QLocalSocket::LocalSocketError, const QString &function);
void _q_stateChanged(QAbstractSocket::SocketState newState);
void _q_error(QAbstractSocket::SocketError newError);
void _q_connectToSocket();
diff --git a/src/network/socket/qlocalsocket_tcp.cpp b/src/network/socket/qlocalsocket_tcp.cpp
index 41e5b47627..e13bcfc0cb 100644
--- a/src/network/socket/qlocalsocket_tcp.cpp
+++ b/src/network/socket/qlocalsocket_tcp.cpp
@@ -95,7 +95,7 @@ void QLocalSocketPrivate::_q_error(QAbstractSocket::SocketError socketError)
QLocalSocket::LocalSocketError error = (QLocalSocket::LocalSocketError)socketError;
QString errorString = generateErrorString(error, function);
q->setErrorString(errorString);
- emit q->error(error);
+ emit q->errorOccurred(error);
}
void QLocalSocketPrivate::_q_stateChanged(QAbstractSocket::SocketState newState)
@@ -168,7 +168,7 @@ QString QLocalSocketPrivate::generateErrorString(QLocalSocket::LocalSocketError
return errorString;
}
-void QLocalSocketPrivate::errorOccurred(QLocalSocket::LocalSocketError error, const QString &function)
+void QLocalSocketPrivate::setErrorAndEmit(QLocalSocket::LocalSocketError error, const QString &function)
{
Q_Q(QLocalSocket);
switch (error) {
@@ -206,7 +206,7 @@ void QLocalSocketPrivate::errorOccurred(QLocalSocket::LocalSocketError error, co
QString errorString = generateErrorString(error, function);
q->setErrorString(errorString);
- emit q->error(error);
+ emit q->errorOccurred(error);
// errors cause a disconnect
tcpSocket->setSocketState(QAbstractSocket::UnconnectedState);
@@ -222,7 +222,7 @@ void QLocalSocket::connectToServer(OpenMode openMode)
Q_D(QLocalSocket);
if (state() == ConnectedState || state() == ConnectingState) {
setErrorString(tr("Trying to connect while connection is in progress"));
- emit error(QLocalSocket::OperationError);
+ emit errorOccurred(QLocalSocket::OperationError);
return;
}
@@ -231,8 +231,8 @@ void QLocalSocket::connectToServer(OpenMode openMode)
emit stateChanged(d->state);
if (d->serverName.isEmpty()) {
- d->errorOccurred(ServerNotFoundError,
- QLatin1String("QLocalSocket::connectToServer"));
+ d->setErrorAndEmit(ServerNotFoundError,
+ QLatin1String("QLocalSocket::connectToServer"));
return;
}
@@ -246,8 +246,8 @@ void QLocalSocket::connectToServer(OpenMode openMode)
bool ok;
const quint16 port = settings.value(d->fullServerName).toUInt(&ok);
if (!ok) {
- d->errorOccurred(ServerNotFoundError,
- QLatin1String("QLocalSocket::connectToServer"));
+ d->setErrorAndEmit(ServerNotFoundError,
+ QLatin1String("QLocalSocket::connectToServer"));
return;
}
QIODevice::open(openMode);
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index d1df26d9f1..e860b880d5 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -61,10 +61,9 @@
QT_BEGIN_NAMESPACE
QLocalSocketPrivate::QLocalSocketPrivate() : QIODevicePrivate(),
- delayConnect(0),
- connectTimer(0),
+ delayConnect(nullptr),
+ connectTimer(nullptr),
connectingSocket(-1),
- connectingOpenMode(0),
state(QLocalSocket::UnconnectedState)
{
}
@@ -100,7 +99,7 @@ void QLocalSocketPrivate::_q_error(QAbstractSocket::SocketError socketError)
QLocalSocket::LocalSocketError error = (QLocalSocket::LocalSocketError)socketError;
QString errorString = generateErrorString(error, function);
q->setErrorString(errorString);
- emit q->error(error);
+ emit q->errorOccurred(error);
}
void QLocalSocketPrivate::_q_stateChanged(QAbstractSocket::SocketState newState)
@@ -173,7 +172,7 @@ QString QLocalSocketPrivate::generateErrorString(QLocalSocket::LocalSocketError
return errorString;
}
-void QLocalSocketPrivate::errorOccurred(QLocalSocket::LocalSocketError error, const QString &function)
+void QLocalSocketPrivate::setErrorAndEmit(QLocalSocket::LocalSocketError error, const QString &function)
{
Q_Q(QLocalSocket);
switch (error) {
@@ -211,7 +210,7 @@ void QLocalSocketPrivate::errorOccurred(QLocalSocket::LocalSocketError error, co
QString errorString = generateErrorString(error, function);
q->setErrorString(errorString);
- emit q->error(error);
+ emit q->errorOccurred(error);
// errors cause a disconnect
unixSocket.setSocketState(QAbstractSocket::UnconnectedState);
@@ -228,7 +227,7 @@ void QLocalSocket::connectToServer(OpenMode openMode)
if (state() == ConnectedState || state() == ConnectingState) {
QString errorString = d->generateErrorString(QLocalSocket::OperationError, QLatin1String("QLocalSocket::connectToserver"));
setErrorString(errorString);
- emit error(QLocalSocket::OperationError);
+ emit errorOccurred(QLocalSocket::OperationError);
return;
}
@@ -238,15 +237,15 @@ void QLocalSocket::connectToServer(OpenMode openMode)
emit stateChanged(d->state);
if (d->serverName.isEmpty()) {
- d->errorOccurred(ServerNotFoundError,
- QLatin1String("QLocalSocket::connectToServer"));
+ d->setErrorAndEmit(ServerNotFoundError,
+ QLatin1String("QLocalSocket::connectToServer"));
return;
}
// create the socket
if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM, 0, O_NONBLOCK))) {
- d->errorOccurred(UnsupportedSocketOperationError,
- QLatin1String("QLocalSocket::connectToServer"));
+ d->setErrorAndEmit(UnsupportedSocketOperationError,
+ QLatin1String("QLocalSocket::connectToServer"));
return;
}
@@ -282,7 +281,7 @@ void QLocalSocketPrivate::_q_connectToSocket()
name.sun_family = PF_UNIX;
if (sizeof(name.sun_path) < (uint)encodedConnectingPathName.size() + 1) {
QString function = QLatin1String("QLocalSocket::connectToServer");
- errorOccurred(QLocalSocket::ServerNotFoundError, function);
+ setErrorAndEmit(QLocalSocket::ServerNotFoundError, function);
return;
}
::memcpy(name.sun_path, encodedConnectingPathName.constData(),
@@ -293,17 +292,17 @@ void QLocalSocketPrivate::_q_connectToSocket()
{
case EINVAL:
case ECONNREFUSED:
- errorOccurred(QLocalSocket::ConnectionRefusedError, function);
+ setErrorAndEmit(QLocalSocket::ConnectionRefusedError, function);
break;
case ENOENT:
- errorOccurred(QLocalSocket::ServerNotFoundError, function);
+ setErrorAndEmit(QLocalSocket::ServerNotFoundError, function);
break;
case EACCES:
case EPERM:
- errorOccurred(QLocalSocket::SocketAccessError, function);
+ setErrorAndEmit(QLocalSocket::SocketAccessError, function);
break;
case ETIMEDOUT:
- errorOccurred(QLocalSocket::SocketTimeoutError, function);
+ setErrorAndEmit(QLocalSocket::SocketTimeoutError, function);
break;
case EAGAIN:
// Try again later, all of the sockets listening are full
@@ -321,7 +320,7 @@ void QLocalSocketPrivate::_q_connectToSocket()
delayConnect->setEnabled(true);
break;
default:
- errorOccurred(QLocalSocket::UnknownSocketError, function);
+ setErrorAndEmit(QLocalSocket::UnknownSocketError, function);
}
return;
}
@@ -337,11 +336,11 @@ void QLocalSocketPrivate::_q_connectToSocket()
q->emit connected();
} else {
QString function = QLatin1String("QLocalSocket::connectToServer");
- errorOccurred(QLocalSocket::UnknownSocketError, function);
+ setErrorAndEmit(QLocalSocket::UnknownSocketError, function);
}
connectingSocket = -1;
connectingName.clear();
- connectingOpenMode = 0;
+ connectingOpenMode = { };
}
bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
@@ -380,10 +379,10 @@ void QLocalSocketPrivate::cancelDelayedConnect()
if (delayConnect) {
delayConnect->setEnabled(false);
delete delayConnect;
- delayConnect = 0;
+ delayConnect = nullptr;
connectTimer->stop();
delete connectTimer;
- connectTimer = 0;
+ connectTimer = nullptr;
}
}
@@ -438,7 +437,7 @@ void QLocalSocket::close()
::close(d->connectingSocket);
d->connectingSocket = -1;
d->connectingName.clear();
- d->connectingOpenMode = 0;
+ d->connectingOpenMode = { };
d->serverName.clear();
d->fullServerName.clear();
QIODevice::close();
@@ -465,7 +464,7 @@ void QLocalSocket::disconnectFromServer()
QLocalSocket::LocalSocketError QLocalSocket::error() const
{
Q_D(const QLocalSocket);
- switch (d->unixSocket.error()) {
+ switch (d->unixSocket.socketError()) {
case QAbstractSocket::ConnectionRefusedError:
return QLocalSocket::ConnectionRefusedError;
case QAbstractSocket::RemoteHostClosedError:
@@ -530,8 +529,8 @@ bool QLocalSocket::waitForConnected(int msec)
const int result = qt_poll_msecs(&pfd, 1, timeout);
if (result == -1)
- d->errorOccurred(QLocalSocket::UnknownSocketError,
- QLatin1String("QLocalSocket::waitForConnected"));
+ d->setErrorAndEmit(QLocalSocket::UnknownSocketError,
+ QLatin1String("QLocalSocket::waitForConnected"));
else if (result > 0)
d->_q_connectToSocket();
} while (state() == ConnectingState && !timer.hasExpired(msec));
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 4decbd5ded..48ffd87beb 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -91,7 +91,7 @@ void QLocalSocketPrivate::_q_winError(ulong windowsError, const QString &functio
if (state == QLocalSocket::UnconnectedState && currentState != QLocalSocket::ConnectingState)
emit q->disconnected();
}
- emit q->error(error);
+ emit q->errorOccurred(error);
}
QLocalSocketPrivate::QLocalSocketPrivate() : QIODevicePrivate(),
@@ -123,7 +123,7 @@ void QLocalSocket::connectToServer(OpenMode openMode)
if (state() == ConnectedState || state() == ConnectingState) {
d->error = OperationError;
d->errorString = tr("Trying to connect while connection is in progress");
- emit error(QLocalSocket::OperationError);
+ emit errorOccurred(QLocalSocket::OperationError);
return;
}
@@ -135,7 +135,7 @@ void QLocalSocket::connectToServer(OpenMode openMode)
d->error = ServerNotFoundError;
d->errorString = tr("%1: Invalid name").arg(QLatin1String("QLocalSocket::connectToServer"));
d->state = UnconnectedState;
- emit error(d->error);
+ emit errorOccurred(d->error);
emit stateChanged(d->state);
return;
}
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp
index 5126a5330f..31628846dc 100644
--- a/src/network/socket/qnativesocketengine.cpp
+++ b/src/network/socket/qnativesocketengine.cpp
@@ -191,9 +191,9 @@ QT_BEGIN_NAMESPACE
*/
QNativeSocketEnginePrivate::QNativeSocketEnginePrivate() :
socketDescriptor(-1),
- readNotifier(0),
- writeNotifier(0),
- exceptNotifier(0)
+ readNotifier(nullptr),
+ writeNotifier(nullptr),
+ exceptNotifier(nullptr)
{
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QSysInfo::machineHostName(); // this initializes ws2_32.dll
@@ -985,15 +985,15 @@ void QNativeSocketEngine::close()
d->inboundStreamCount = d->outboundStreamCount = 0;
if (d->readNotifier) {
qDeleteInEventHandler(d->readNotifier);
- d->readNotifier = 0;
+ d->readNotifier = nullptr;
}
if (d->writeNotifier) {
qDeleteInEventHandler(d->writeNotifier);
- d->writeNotifier = 0;
+ d->writeNotifier = nullptr;
}
if (d->exceptNotifier) {
qDeleteInEventHandler(d->exceptNotifier);
- d->exceptNotifier = 0;
+ d->exceptNotifier = nullptr;
}
}
@@ -1341,7 +1341,7 @@ void QNativeSocketEngine::setReadNotificationEnabled(bool enable)
Q_D(QNativeSocketEngine);
if (d->readNotifier) {
d->readNotifier->setEnabled(enable);
- } else if (enable && d->threadData->hasEventDispatcher()) {
+ } else if (enable && d->threadData.loadRelaxed()->hasEventDispatcher()) {
d->readNotifier = new QReadNotifier(d->socketDescriptor, this);
d->readNotifier->setEnabled(true);
}
@@ -1358,7 +1358,7 @@ void QNativeSocketEngine::setWriteNotificationEnabled(bool enable)
Q_D(QNativeSocketEngine);
if (d->writeNotifier) {
d->writeNotifier->setEnabled(enable);
- } else if (enable && d->threadData->hasEventDispatcher()) {
+ } else if (enable && d->threadData.loadRelaxed()->hasEventDispatcher()) {
d->writeNotifier = new QWriteNotifier(d->socketDescriptor, this);
d->writeNotifier->setEnabled(true);
}
@@ -1375,7 +1375,7 @@ void QNativeSocketEngine::setExceptionNotificationEnabled(bool enable)
Q_D(QNativeSocketEngine);
if (d->exceptNotifier) {
d->exceptNotifier->setEnabled(enable);
- } else if (enable && d->threadData->hasEventDispatcher()) {
+ } else if (enable && d->threadData.loadRelaxed()->hasEventDispatcher()) {
d->exceptNotifier = new QExceptionNotifier(d->socketDescriptor, this);
d->exceptNotifier->setEnabled(true);
}
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 3ca586e247..e5b9fbbdb2 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -628,7 +628,7 @@ bool QNativeSocketEnginePrivate::nativeListen(int backlog)
int QNativeSocketEnginePrivate::nativeAccept()
{
- int acceptedDescriptor = qt_safe_accept(socketDescriptor, 0, 0);
+ int acceptedDescriptor = qt_safe_accept(socketDescriptor, nullptr, nullptr);
if (acceptedDescriptor == -1) {
switch (errno) {
case EBADF:
@@ -1002,7 +1002,7 @@ qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxS
struct cmsghdr *cmsgptr;
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wsign-compare")
- for (cmsgptr = CMSG_FIRSTHDR(&msg); cmsgptr != NULL;
+ for (cmsgptr = CMSG_FIRSTHDR(&msg); cmsgptr != nullptr;
cmsgptr = CMSG_NXTHDR(&msg, cmsgptr)) {
QT_WARNING_POP
if (cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_PKTINFO
@@ -1166,7 +1166,7 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
#endif
if (msg.msg_controllen == 0)
- msg.msg_control = 0;
+ msg.msg_control = nullptr;
ssize_t sentBytes = qt_safe_sendmsg(socketDescriptor, &msg, 0);
if (sentBytes < 0) {
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index 9edabd7822..dd115c33dc 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -53,6 +53,8 @@
#include <qnetworkinterface.h>
#include <qoperatingsystemversion.h>
+#include <algorithm>
+
//#define QNATIVESOCKETENGINE_DEBUG
#if defined(QNATIVESOCKETENGINE_DEBUG)
# include <qstring.h>
@@ -1141,13 +1143,14 @@ qint64 QNativeSocketEnginePrivate::nativePendingDatagramSize() const
qint64 ret = -1;
int recvResult = 0;
DWORD flags;
- // We start at 1500 bytes (the MTU for Ethernet V2), which should catch
- // almost all uses (effective MTU for UDP under IPv4 is 1468), except
- // for localhost datagrams and those reassembled by the IP layer.
- char udpMessagePeekBuffer[1500];
- std::vector<WSABUF> buf;
+ // We increase the amount we peek by 2048 * 5 on each iteration
+ // Grabs most cases fast and early.
+ char udpMessagePeekBuffer[2048];
+ const int increments = 5;
+ QVarLengthArray<WSABUF, 10> buf;
for (;;) {
- buf.resize(buf.size() + 5, {sizeof(udpMessagePeekBuffer), udpMessagePeekBuffer});
+ buf.reserve(buf.size() + increments);
+ std::fill_n(std::back_inserter(buf), increments, WSABUF{sizeof(udpMessagePeekBuffer), udpMessagePeekBuffer});
flags = MSG_PEEK;
DWORD bytesRead = 0;
diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp
index 8a030601dc..f0ccc9054a 100644
--- a/src/network/socket/qsocks5socketengine.cpp
+++ b/src/network/socket/qsocks5socketengine.cpp
@@ -365,13 +365,13 @@ QSocks5BindData *QSocks5BindStore::retrieve(qintptr socketDescriptor)
QMutexLocker lock(&mutex);
const auto it = store.constFind(socketDescriptor);
if (it == store.cend())
- return 0;
+ return nullptr;
QSocks5BindData *bindData = it.value();
store.erase(it);
if (bindData) {
if (bindData->controlSocket->thread() != QThread::currentThread()) {
qWarning("Cannot access socks5 bind data from different thread");
- return 0;
+ return nullptr;
}
} else {
QSOCKS5_DEBUG << "__ERROR__ binddata == 0";
@@ -503,12 +503,12 @@ QSocks5SocketEnginePrivate::QSocks5SocketEnginePrivate()
, writeNotificationEnabled(false)
, exceptNotificationEnabled(false)
, socketDescriptor(-1)
- , data(0)
- , connectData(0)
+ , data(nullptr)
+ , connectData(nullptr)
#ifndef QT_NO_UDPSOCKET
- , udpData(0)
+ , udpData(nullptr)
#endif
- , bindData(0)
+ , bindData(nullptr)
, readNotificationActivated(false)
, writeNotificationActivated(false)
, readNotificationPending(false)
@@ -535,7 +535,7 @@ void QSocks5SocketEnginePrivate::initialize(Socks5Mode socks5Mode)
udpData = new QSocks5UdpAssociateData;
data = udpData;
udpData->udpSocket = new QUdpSocket(q);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
udpData->udpSocket->setProperty("_q_networksession", q->property("_q_networksession"));
#endif
udpData->udpSocket->setProxy(QNetworkProxy::NoProxy);
@@ -549,7 +549,7 @@ void QSocks5SocketEnginePrivate::initialize(Socks5Mode socks5Mode)
}
data->controlSocket = new QTcpSocket(q);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
data->controlSocket->setProperty("_q_networksession", q->property("_q_networksession"));
#endif
data->controlSocket->setProxy(QNetworkProxy::NoProxy);
@@ -594,7 +594,7 @@ void QSocks5SocketEnginePrivate::setErrorState(Socks5State state, const QString
case ConnectError:
case ControlSocketError: {
- QAbstractSocket::SocketError controlSocketError = data->controlSocket->error();
+ QAbstractSocket::SocketError controlSocketError = data->controlSocket->socketError();
if (socks5State != Connected) {
switch (controlSocketError) {
case QAbstractSocket::ConnectionRefusedError:
@@ -918,7 +918,7 @@ void QSocks5SocketEnginePrivate::_q_emitPendingReadNotification()
return;
// check if there needs to be a new zero read notification
if (data && data->controlSocket->state() == QAbstractSocket::UnconnectedState
- && data->controlSocket->error() == QAbstractSocket::RemoteHostClosedError) {
+ && data->controlSocket->socketError() == QAbstractSocket::RemoteHostClosedError) {
connectData->readBuffer.clear();
emitReadNotification();
}
@@ -1038,11 +1038,11 @@ bool QSocks5SocketEngine::initialize(qintptr socketDescriptor, QAbstractSocket::
d->data = d->connectData;
d->mode = QSocks5SocketEnginePrivate::ConnectMode;
d->data->controlSocket = bindData->controlSocket;
- bindData->controlSocket = 0;
+ bindData->controlSocket = nullptr;
d->data->controlSocket->setParent(this);
d->socketProtocol = d->data->controlSocket->localAddress().protocol();
d->data->authenticator = bindData->authenticator;
- bindData->authenticator = 0;
+ bindData->authenticator = nullptr;
d->localPort = bindData->localPort;
d->localAddress = bindData->localAddress;
d->peerPort = bindData->peerPort;
@@ -1256,7 +1256,7 @@ void QSocks5SocketEnginePrivate::_q_controlSocketError(QAbstractSocket::SocketEr
data->controlSocket->close();
emitConnectionNotification();
} else {
- q_func()->setError(data->controlSocket->error(), data->controlSocket->errorString());
+ q_func()->setError(data->controlSocket->socketError(), data->controlSocket->errorString());
emitReadNotification();
emitWriteNotification();
}
@@ -1348,7 +1348,7 @@ bool QSocks5SocketEngine::bind(const QHostAddress &addr, quint16 port)
if (d->mode == QSocks5SocketEnginePrivate::UdpAssociateMode) {
if (!d->udpData->udpSocket->bind(address, port)) {
QSOCKS5_Q_DEBUG << "local udp bind failed";
- setError(d->udpData->udpSocket->error(), d->udpData->udpSocket->errorString());
+ setError(d->udpData->udpSocket->socketError(), d->udpData->udpSocket->errorString());
return false;
}
d->localAddress = d->udpData->udpSocket->localAddress();
@@ -1367,7 +1367,7 @@ bool QSocks5SocketEngine::bind(const QHostAddress &addr, quint16 port)
QElapsedTimer stopWatch;
stopWatch.start();
d->data->controlSocket->connectToHost(d->proxyInfo.hostName(), d->proxyInfo.port());
- if (!d->waitForConnected(msecs, 0) ||
+ if (!d->waitForConnected(msecs, nullptr) ||
d->data->controlSocket->state() == QAbstractSocket::UnconnectedState) {
// waitForConnected sets the error state and closes the socket
QSOCKS5_Q_DEBUG << "waitForConnected to proxy server" << d->data->controlSocket->errorString();
@@ -1428,13 +1428,13 @@ int QSocks5SocketEngine::accept()
case QSocks5SocketEnginePrivate::BindSuccess:
QSOCKS5_Q_DEBUG << "BindSuccess adding" << d->socketDescriptor << "to the bind store";
d->data->controlSocket->disconnect();
- d->data->controlSocket->setParent(0);
+ d->data->controlSocket->setParent(nullptr);
d->bindData->localAddress = d->localAddress;
d->bindData->localPort = d->localPort;
sd = d->socketDescriptor;
socks5BindStore()->add(sd, d->bindData);
- d->data = 0;
- d->bindData = 0;
+ d->data = nullptr;
+ d->bindData = nullptr;
d->socketDescriptor = 0;
//### do something about this socket layer ... set it closed and an error about why ...
// reset state and local port/address
@@ -1656,8 +1656,8 @@ qint64 QSocks5SocketEngine::writeDatagram(const char *data, qint64 len, const QI
}
if (d->udpData->udpSocket->writeDatagram(sealedBuf, d->udpData->associateAddress, d->udpData->associatePort) != sealedBuf.size()) {
//### try frgamenting
- if (d->udpData->udpSocket->error() == QAbstractSocket::DatagramTooLargeError)
- setError(d->udpData->udpSocket->error(), d->udpData->udpSocket->errorString());
+ if (d->udpData->udpSocket->socketError() == QAbstractSocket::DatagramTooLargeError)
+ setError(d->udpData->udpSocket->socketError(), d->udpData->udpSocket->errorString());
//### else maybe more serious error
return -1;
}
@@ -1727,7 +1727,7 @@ bool QSocks5SocketEnginePrivate::waitForConnected(int msecs, bool *timedOut)
return true;
setErrorState(QSocks5SocketEnginePrivate::ControlSocketError);
- if (timedOut && data->controlSocket->error() == QAbstractSocket::SocketTimeoutError)
+ if (timedOut && data->controlSocket->socketError() == QAbstractSocket::SocketTimeoutError)
*timedOut = true;
return false;
}
@@ -1765,8 +1765,8 @@ bool QSocks5SocketEngine::waitForRead(int msecs, bool *timedOut)
if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState)
return true;
- setError(d->data->controlSocket->error(), d->data->controlSocket->errorString());
- if (timedOut && d->data->controlSocket->error() == QAbstractSocket::SocketTimeoutError)
+ setError(d->data->controlSocket->socketError(), d->data->controlSocket->errorString());
+ if (timedOut && d->data->controlSocket->socketError() == QAbstractSocket::SocketTimeoutError)
*timedOut = true;
return false;
}
@@ -1775,8 +1775,8 @@ bool QSocks5SocketEngine::waitForRead(int msecs, bool *timedOut)
} else {
while (!d->readNotificationActivated) {
if (!d->udpData->udpSocket->waitForReadyRead(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))) {
- setError(d->udpData->udpSocket->error(), d->udpData->udpSocket->errorString());
- if (timedOut && d->udpData->udpSocket->error() == QAbstractSocket::SocketTimeoutError)
+ setError(d->udpData->udpSocket->socketError(), d->udpData->udpSocket->errorString());
+ if (timedOut && d->udpData->udpSocket->socketError() == QAbstractSocket::SocketTimeoutError)
*timedOut = true;
return false;
}
@@ -1909,7 +1909,7 @@ QSocks5SocketEngineHandler::createSocketEngine(QAbstractSocket::SocketType socke
// proxy type must have been resolved by now
if (proxy.type() != QNetworkProxy::Socks5Proxy) {
QSOCKS5_DEBUG << "not proxying";
- return 0;
+ return nullptr;
}
QScopedPointer<QSocks5SocketEngine> engine(new QSocks5SocketEngine(parent));
engine->setProxy(proxy);
@@ -1923,7 +1923,7 @@ QAbstractSocketEngine *QSocks5SocketEngineHandler::createSocketEngine(qintptr so
QSOCKS5_DEBUG << "bind store contains" << socketDescriptor;
return new QSocks5SocketEngine(parent);
}
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp
index 98e58192a2..c23b143de3 100644
--- a/src/network/socket/qtcpserver.cpp
+++ b/src/network/socket/qtcpserver.cpp
@@ -121,7 +121,7 @@ QTcpServerPrivate::QTcpServerPrivate()
: port(0)
, socketType(QAbstractSocket::UnknownSocketType)
, state(QAbstractSocket::UnconnectedState)
- , socketEngine(0)
+ , socketEngine(nullptr)
, serverSocketError(QAbstractSocket::UnknownSocketError)
, maxConnections(30)
{
@@ -314,7 +314,7 @@ bool QTcpServer::listen(const QHostAddress &address, quint16 port)
d->serverSocketErrorString = tr("Operation on socket is not supported");
return false;
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the socket engine (if it has been set)
d->socketEngine->setProperty("_q_networksession", property("_q_networksession"));
#endif
@@ -389,7 +389,7 @@ void QTcpServer::close()
// in out of memory situations, the socketEngine
// will be deleted in ~QTcpServer (it's a child-object of this)
}
- d->socketEngine = 0;
+ d->socketEngine = nullptr;
}
d->state = QAbstractSocket::UnconnectedState;
@@ -436,7 +436,7 @@ bool QTcpServer::setSocketDescriptor(qintptr socketDescriptor)
d->serverSocketErrorString = tr("Operation on socket is not supported");
return false;
}
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the socket engine (if it has been set)
d->socketEngine->setProperty("_q_networksession", property("_q_networksession"));
#endif
@@ -561,7 +561,7 @@ QTcpSocket *QTcpServer::nextPendingConnection()
{
Q_D(QTcpServer);
if (d->pendingConnections.isEmpty())
- return 0;
+ return nullptr;
if (!d->socketEngine) {
qWarning("QTcpServer::nextPendingConnection() called while not listening");
diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp
index 0e3d516535..9694dfa507 100644
--- a/src/network/socket/qudpsocket.cpp
+++ b/src/network/socket/qudpsocket.cpp
@@ -479,7 +479,7 @@ QNetworkDatagram QUdpSocket::receiveDatagram(qint64 maxSize)
/*!
Receives a datagram no larger than \a maxSize bytes and stores
it in \a data. The sender's host address and port is stored in
- *\a address and *\a port (unless the pointers are 0).
+ *\a address and *\a port (unless the pointers are \nullptr).
Returns the size of the datagram on success; otherwise returns
-1.
diff --git a/src/network/ssl/qdtls_openssl.cpp b/src/network/ssl/qdtls_openssl.cpp
index d9ddcceb40..36b4d572fd 100644
--- a/src/network/ssl/qdtls_openssl.cpp
+++ b/src/network/ssl/qdtls_openssl.cpp
@@ -156,8 +156,6 @@ void delete_connection(SSL *ssl)
q_SSL_free(ssl);
}
-#if QT_CONFIG(opensslv11)
-
void delete_BIO_ADDR(BIO_ADDR *bio)
{
// A deleter for QSharedPointer<BIO_ADDR>
@@ -172,8 +170,6 @@ void delete_bio_method(BIO_METHOD *method)
q_BIO_meth_free(method);
}
-#endif // openssl 1.1
-
// The 'deleter' for QScopedPointer<BIO>.
struct bio_deleter
{
@@ -411,10 +407,6 @@ extern "C" long q_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
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):
@@ -578,11 +570,9 @@ extern "C" long q_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
// 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 << ")";
@@ -594,15 +584,11 @@ extern "C" long q_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
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.
+ // data and append it to this new BIO using BIO_set_data. We don't need
+ // it and thus q_dgram_destroy below is a noop.
return 1;
}
@@ -614,39 +600,6 @@ extern "C" int q_dgram_destroy(BIO *bio)
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
@@ -777,7 +730,6 @@ 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()) {
@@ -793,9 +745,6 @@ bool DtlsState::initBIO(QDtlsBasePrivate *dtlsBase)
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();
@@ -808,9 +757,7 @@ bool DtlsState::initBIO(QDtlsBasePrivate *dtlsBase)
q_SSL_set_bio(tlsConnection.data(), bio, bio);
newBio.take();
-#if QT_CONFIG(opensslv11)
bioMethod.swap(customMethod);
-#endif // openssl 1.1
return true;
}
@@ -869,7 +816,6 @@ bool QDtlsClientVerifierOpenSSL::verifyClient(QUdpSocket *socket, const QByteArr
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,
@@ -883,10 +829,7 @@ bool QDtlsClientVerifierOpenSSL::verifyClient(QUdpSocket *socket, const QByteArr
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;
@@ -953,7 +896,6 @@ bool QDtlsPrivateOpenSSL::startHandshake(QUdpSocket *socket, const QByteArray &d
// 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,
@@ -967,10 +909,7 @@ bool QDtlsPrivateOpenSSL::startHandshake(QUdpSocket *socket, const QByteArray &d
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"));
@@ -1186,7 +1125,7 @@ qint64 QDtlsPrivateOpenSSL::writeDatagramEncrypted(QUdpSocket *socket,
// 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()) {
+ if (socket->socketError() != QAbstractSocket::UnknownSocketError && description.isEmpty()) {
setDtlsError(QDtlsError::UnderlyingSocketError, socket->errorString());
} else {
setDtlsError(QDtlsError::TlsFatalError,
diff --git a/src/network/ssl/qdtls_openssl_p.h b/src/network/ssl/qdtls_openssl_p.h
index 9306fa2433..35e9f29a5d 100644
--- a/src/network/ssl/qdtls_openssl_p.h
+++ b/src/network/ssl/qdtls_openssl_p.h
@@ -84,9 +84,8 @@ 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.
+ // Note, bioMethod _must_ outlive BIOs it was used to create. Thus
+ // the order of declarations here matters.
using BioMethod = QSharedPointer<BIO_METHOD>;
BioMethod bioMethod;
diff --git a/src/network/ssl/qssl.h b/src/network/ssl/qssl.h
index 42c7b5c56d..b28c2a87b9 100644
--- a/src/network/ssl/qssl.h
+++ b/src/network/ssl/qssl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtNetwork module of the Qt Toolkit.
@@ -77,17 +77,21 @@ namespace QSsl {
#endif
enum SslProtocol {
+#if QT_DEPRECATED_SINCE(5, 15)
SslV3,
SslV2,
- TlsV1_0,
+#endif
+ TlsV1_0 = 2,
#if QT_DEPRECATED_SINCE(5,0)
TlsV1 = TlsV1_0,
#endif
TlsV1_1,
TlsV1_2,
AnyProtocol,
+#if QT_DEPRECATED_SINCE(5, 15)
TlsV1SslV3,
- SecureProtocols,
+#endif
+ SecureProtocols = AnyProtocol + 2,
TlsV1_0OrLater,
TlsV1_1OrLater,
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 4820953468..c179cf9c4a 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -124,7 +124,9 @@
#if QT_CONFIG(schannel)
#include "qsslsocket_schannel_p.h"
#endif
-
+#if QT_CONFIG(regularexpression)
+#include "qregularexpression.h"
+#endif
#include "qssl_p.h"
#include "qsslcertificate.h"
#include "qsslcertificate_p.h"
@@ -462,7 +464,10 @@ QByteArray QSslCertificate::digest(QCryptographicHash::Algorithm algorithm) cons
\since 5.0
*/
+#if QT_DEPRECATED_SINCE(5,15)
/*!
+ \obsolete
+
Searches all files in the \a path for certificates encoded in the
specified \a format and returns them in a list. \a path must be a file
or a pattern matching one or more files, as specified by \a syntax.
@@ -537,6 +542,106 @@ QList<QSslCertificate> QSslCertificate::fromPath(const QString &path,
}
return certs;
}
+#endif // QT_DEPRECATED_SINCE(5,15)
+
+/*!
+ \since 5.15
+
+ Searches all files in the \a path for certificates encoded in the
+ specified \a format and returns them in a list. \a path must be a file
+ or a pattern matching one or more files, as specified by \a syntax.
+
+ Example:
+
+ \snippet code/src_network_ssl_qsslcertificate.cpp 1
+
+ \sa fromData()
+*/
+QList<QSslCertificate> QSslCertificate::fromPath(const QString &path,
+ QSsl::EncodingFormat format,
+ PatternSyntax syntax)
+{
+ // $, (,), *, +, ., ?, [, ,], ^, {, | and }.
+
+ // make sure to use the same path separators on Windows and Unix like systems.
+ QString sourcePath = QDir::fromNativeSeparators(path);
+
+ // Find the path without the filename
+ QString pathPrefix = sourcePath.left(sourcePath.lastIndexOf(QLatin1Char('/')));
+
+ // Check if the path contains any special chars
+ int pos = -1;
+
+#if QT_CONFIG(regularexpression)
+ if (syntax == Wildcard)
+ pos = pathPrefix.indexOf(QRegularExpression(QLatin1String("[*?[]")));
+ else if (syntax == RegExp)
+ pos = sourcePath.indexOf(QRegularExpression(QLatin1String("[\\$\\(\\)\\*\\+\\.\\?\\[\\]\\^\\{\\}\\|]")));
+#else
+ if (syntax == Wildcard || syntax == RegExp)
+ qWarning("Regular expression support is disabled in this build. Only fixed string can be searched");
+ return QList<QSslCertificate>();
+#endif
+
+ if (pos != -1) {
+ // there was a special char in the path so cut of the part containing that char.
+ pathPrefix = pathPrefix.left(pos);
+ const int lastIndexOfSlash = pathPrefix.lastIndexOf(QLatin1Char('/'));
+ if (lastIndexOfSlash != -1)
+ pathPrefix = pathPrefix.left(lastIndexOfSlash);
+ else
+ pathPrefix.clear();
+ } else {
+ // Check if the path is a file.
+ if (QFileInfo(sourcePath).isFile()) {
+ QFile file(sourcePath);
+ QIODevice::OpenMode openMode = QIODevice::ReadOnly;
+ if (format == QSsl::Pem)
+ openMode |= QIODevice::Text;
+ if (file.open(openMode))
+ return QSslCertificate::fromData(file.readAll(), format);
+ return QList<QSslCertificate>();
+ }
+ }
+
+ // Special case - if the prefix ends up being nothing, use "." instead.
+ int startIndex = 0;
+ if (pathPrefix.isEmpty()) {
+ pathPrefix = QLatin1String(".");
+ startIndex = 2;
+ }
+
+ // The path can be a file or directory.
+ QList<QSslCertificate> certs;
+
+#if QT_CONFIG(regularexpression)
+ if (syntax == Wildcard)
+ sourcePath = QRegularExpression::wildcardToRegularExpression(sourcePath);
+
+ QRegularExpression pattern(QRegularExpression::anchoredPattern(sourcePath));
+#endif
+
+ QDirIterator it(pathPrefix, QDir::Files, QDirIterator::FollowSymlinks | QDirIterator::Subdirectories);
+ while (it.hasNext()) {
+ QString filePath = startIndex == 0 ? it.next() : it.next().mid(startIndex);
+
+#if QT_CONFIG(regularexpression)
+ if (!pattern.match(filePath).hasMatch())
+ continue;
+#else
+ if (sourcePath != filePath)
+ continue;
+#endif
+
+ QFile file(filePath);
+ QIODevice::OpenMode openMode = QIODevice::ReadOnly;
+ if (format == QSsl::Pem)
+ openMode |= QIODevice::Text;
+ if (file.open(openMode))
+ certs += QSslCertificate::fromData(file.readAll(), format);
+ }
+ return certs;
+}
/*!
Searches for and parses all certificates in \a device that are
diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h
index 69901b526c..9993769888 100644
--- a/src/network/ssl/qsslcertificate.h
+++ b/src/network/ssl/qsslcertificate.h
@@ -84,6 +84,13 @@ public:
EmailAddress
};
+ enum PatternSyntax {
+ RegExp,
+ Wildcard,
+ FixedString
+ };
+
+
explicit QSslCertificate(QIODevice *device, QSsl::EncodingFormat format = QSsl::Pem);
explicit QSslCertificate(const QByteArray &data = QByteArray(), QSsl::EncodingFormat format = QSsl::Pem);
QSslCertificate(const QSslCertificate &other);
@@ -139,9 +146,20 @@ public:
QByteArray toDer() const;
QString toText() const;
- static QList<QSslCertificate> fromPath(
+#if QT_DEPRECATED_SINCE(5,15)
+ QT_DEPRECATED_X("Use the overload not using QRegExp") static QList<QSslCertificate> fromPath(
const QString &path, QSsl::EncodingFormat format = QSsl::Pem,
QRegExp::PatternSyntax syntax = QRegExp::FixedString);
+
+ static QList<QSslCertificate> fromPath(
+ const QString &path, QSsl::EncodingFormat format,
+ PatternSyntax syntax);
+#else
+ static QList<QSslCertificate> fromPath(
+ const QString &path, QSsl::EncodingFormat format = QSsl::Pem,
+ PatternSyntax syntax = FixedString);
+#endif
+
static QList<QSslCertificate> fromDevice(
QIODevice *device, QSsl::EncodingFormat format = QSsl::Pem);
static QList<QSslCertificate> fromData(
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index 7e92d3a526..f5ce02807f 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -631,11 +631,10 @@ QList<QSslCipher> QSslConfiguration::supportedCiphers()
Returns this connection's CA certificate database. The CA certificate
database is used by the socket during the handshake phase to
validate the peer's certificate. It can be modified prior to the
- handshake with setCaCertificates(), or with \l{QSslSocket}'s
- \l{QSslSocket::}{addCaCertificate()} and
- \l{QSslSocket::}{addCaCertificates()}.
+ handshake with setCaCertificates(), or with addCaCertificate() and
+ addCaCertificates().
- \sa setCaCertificates()
+ \sa setCaCertificates(), addCaCertificate(), addCaCertificates()
*/
QList<QSslCertificate> QSslConfiguration::caCertificates() const
{
@@ -652,7 +651,7 @@ QList<QSslCertificate> QSslConfiguration::caCertificates() const
that is not available (as is commonly the case on iOS), the default database
is empty.
- \sa caCertificates()
+ \sa caCertificates(), addCaCertificates(), addCaCertificate()
*/
void QSslConfiguration::setCaCertificates(const QList<QSslCertificate> &certificates)
{
@@ -661,6 +660,74 @@ void QSslConfiguration::setCaCertificates(const QList<QSslCertificate> &certific
}
/*!
+ \since 5.15
+
+ Searches all files in the \a path for certificates encoded in the
+ specified \a format and adds them to this socket's CA certificate
+ database. \a path must be a file or a pattern matching one or more
+ files, as specified by \a syntax. Returns \c true if one or more
+ certificates are added to the socket's CA certificate database;
+ otherwise returns \c false.
+
+ The CA certificate database is used by the socket during the
+ handshake phase to validate the peer's certificate.
+
+ For more precise control, use addCaCertificate().
+
+ \sa addCaCertificate(), QSslCertificate::fromPath()
+*/
+bool QSslConfiguration::addCaCertificates(const QString &path, QSsl::EncodingFormat format,
+ QSslCertificate::PatternSyntax syntax)
+{
+ QList<QSslCertificate> certs = QSslCertificate::fromPath(path, format, syntax);
+ if (certs.isEmpty())
+ return false;
+
+ d->caCertificates += certs;
+ return true;
+}
+
+/*!
+ \since 5.15
+
+ Adds \a certificate to this configuration's CA certificate database.
+ The certificate database must be set prior to the SSL handshake.
+ The CA certificate database is used by the socket during the
+ handshake phase to validate the peer's certificate.
+
+ \note The default configuration uses the system CA certificate database. If
+ that is not available (as is commonly the case on iOS), the default database
+ is empty.
+
+ \sa caCertificates(), setCaCertificates(), addCaCertificates()
+*/
+void QSslConfiguration::addCaCertificate(const QSslCertificate &certificate)
+{
+ d->caCertificates += certificate;
+ d->allowRootCertOnDemandLoading = false;
+}
+
+/*!
+ \since 5.15
+
+ Adds \a certificates to this configuration's CA certificate database.
+ The certificate database must be set prior to the SSL handshake.
+ The CA certificate database is used by the socket during the
+ handshake phase to validate the peer's certificate.
+
+ \note The default configuration uses the system CA certificate database. If
+ that is not available (as is commonly the case on iOS), the default database
+ is empty.
+
+ \sa caCertificates(), setCaCertificates(), addCaCertificate()
+*/
+void QSslConfiguration::addCaCertificates(const QList<QSslCertificate> &certificates)
+{
+ d->caCertificates += certificates;
+ d->allowRootCertOnDemandLoading = false;
+}
+
+/*!
\since 5.5
This function provides the CA certificate database
@@ -668,7 +735,8 @@ void QSslConfiguration::setCaCertificates(const QList<QSslCertificate> &certific
returned by this function is used to initialize the database
returned by caCertificates() on the default QSslConfiguration.
- \sa caCertificates(), setCaCertificates(), defaultConfiguration()
+ \sa caCertificates(), setCaCertificates(), defaultConfiguration(),
+ addCaCertificate(), addCaCertificates()
*/
QList<QSslCertificate> QSslConfiguration::systemCaCertificates()
{
@@ -714,7 +782,7 @@ bool QSslConfiguration::testSslOption(QSsl::SslOption option) const
knowledge of the session allows for eavesdropping on data
encrypted with the session parameters.
- \sa setSessionTicket(), QSsl::SslOptionDisableSessionPersistence, setSslOption()
+ \sa setSessionTicket(), QSsl::SslOptionDisableSessionPersistence, setSslOption(), QSslSocket::newSessionTicketReceived()
*/
QByteArray QSslConfiguration::sessionTicket() const
{
@@ -729,7 +797,7 @@ QByteArray QSslConfiguration::sessionTicket() const
for this to work, and \a sessionTicket must be in ASN.1 format
as returned by sessionTicket().
- \sa sessionTicket(), QSsl::SslOptionDisableSessionPersistence, setSslOption()
+ \sa sessionTicket(), QSsl::SslOptionDisableSessionPersistence, setSslOption(), QSslSocket::newSessionTicketReceived()
*/
void QSslConfiguration::setSessionTicket(const QByteArray &sessionTicket)
{
@@ -747,7 +815,7 @@ void QSslConfiguration::setSessionTicket(const QByteArray &sessionTicket)
QSsl::SslOptionDisableSessionPersistence was not turned off,
this function returns -1.
- \sa sessionTicket(), QSsl::SslOptionDisableSessionPersistence, setSslOption()
+ \sa sessionTicket(), QSsl::SslOptionDisableSessionPersistence, setSslOption(), QSslSocket::newSessionTicketReceived()
*/
int QSslConfiguration::sessionTicketLifeTimeHint() const
{
diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h
index c25c2686de..09616098a5 100644
--- a/src/network/ssl/qsslconfiguration.h
+++ b/src/network/ssl/qsslconfiguration.h
@@ -131,6 +131,11 @@ public:
// Certificate Authority (CA) settings
QList<QSslCertificate> caCertificates() const;
void setCaCertificates(const QList<QSslCertificate> &certificates);
+ bool addCaCertificates(const QString &path, QSsl::EncodingFormat format = QSsl::Pem,
+ QSslCertificate::PatternSyntax syntax = QSslCertificate::FixedString);
+ void addCaCertificate(const QSslCertificate &certificate);
+ void addCaCertificates(const QList<QSslCertificate> &certificates);
+
static QList<QSslCertificate> systemCaCertificates();
void setSslOption(QSsl::SslOption option, bool on);
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
index 8566d78aef..0aa8a4f438 100644
--- a/src/network/ssl/qsslcontext_openssl.cpp
+++ b/src/network/ssl/qsslcontext_openssl.cpp
@@ -3,6 +3,7 @@
** Copyright (C) 2017 The Qt Company Ltd.
** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
** Copyright (C) 2014 Governikus GmbH & Co. KG.
+** Copyright (C) 2016 Richard J. Moore <rich@kde.org>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtNetwork module of the Qt Toolkit.
@@ -39,21 +40,53 @@
**
****************************************************************************/
-
#include <QtNetwork/qsslsocket.h>
+#include <QtNetwork/qssldiffiehellmanparameters.h>
#include "private/qssl_p.h"
+#include "private/qsslsocket_p.h"
#include "private/qsslcontext_openssl_p.h"
#include "private/qsslsocket_openssl_p.h"
#include "private/qsslsocket_openssl_symbols_p.h"
+#include "private/qssldiffiehellmanparameters_p.h"
+
+#include <vector>
QT_BEGIN_NAMESPACE
+// defined in qsslsocket_openssl.cpp:
+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
+
+#ifdef TLS1_3_VERSION
+extern "C" int q_ssl_sess_set_new_cb(SSL *context, SSL_SESSION *session);
+#endif // TLS1_3_VERSION
+
+// Defined in qsslsocket.cpp
+QList<QSslCipher> q_getDefaultDtlsCiphers();
+
static inline QString msgErrorSettingBackendConfig(const QString &why)
{
return QSslSocket::tr("Error when setting the OpenSSL configuration (%1)").arg(why);
}
+static inline QString msgErrorSettingEllipticCurves(const QString &why)
+{
+ return QSslSocket::tr("Error when setting the elliptic curves (%1)").arg(why);
+}
+
QSslContext::QSslContext()
: ctx(nullptr),
pkey(nullptr),
@@ -89,7 +122,7 @@ QSharedPointer<QSslContext> QSslContext::sharedFromConfiguration(QSslSocket::Ssl
return sslContext;
}
-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
static int next_proto_cb(SSL *, unsigned char **out, unsigned char *outlen,
const unsigned char *in, unsigned int inlen, void *arg)
@@ -126,7 +159,9 @@ QSslContext::NPNContext QSslContext::npnContext() const
{
return m_npnContext;
}
-#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
+#endif // !OPENSSL_NO_NEXTPROTONEG
+
+
// Needs to be deleted by caller
SSL* QSslContext::createSsl()
@@ -137,8 +172,8 @@ SSL* QSslContext::createSsl()
if (!session && !sessionASN1().isEmpty()
&& !sslConfiguration.testSslOption(QSsl::SslOptionDisableSessionPersistence)) {
const unsigned char *data = reinterpret_cast<const unsigned char *>(m_sessionASN1.constData());
- session = q_d2i_SSL_SESSION(
- nullptr, &data, m_sessionASN1.size()); // refcount is 1 already, set by function above
+ session = q_d2i_SSL_SESSION(nullptr, &data, m_sessionASN1.size());
+ // 'session' has refcount 1 already, set by the function above
}
if (session) {
@@ -150,7 +185,7 @@ SSL* QSslContext::createSsl()
}
}
-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
QList<QByteArray> protocols = sslConfiguration.d->nextAllowedProtocols;
if (!protocols.isEmpty()) {
m_supportedNPNVersions.clear();
@@ -168,27 +203,22 @@ SSL* QSslContext::createSsl()
m_npnContext.data = reinterpret_cast<unsigned char *>(m_supportedNPNVersions.data());
m_npnContext.len = m_supportedNPNVersions.count();
m_npnContext.status = QSslConfiguration::NextProtocolNegotiationNone;
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
- if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
- // Callback's type has a parameter 'const unsigned char ** out'
- // since it was introduced in 1.0.2. Internally, OpenSSL's own code
- // (tests/examples) cast it to unsigned char * (since it's 'out').
- // We just re-use our NPN callback and cast here:
- typedef int (*alpn_callback_t) (SSL *, const unsigned char **, unsigned char *,
- const unsigned char *, unsigned int, void *);
- // With ALPN callback is for a server side only, for a client m_npnContext.status
- // will stay in NextProtocolNegotiationNone.
- q_SSL_CTX_set_alpn_select_cb(ctx, alpn_callback_t(next_proto_cb), &m_npnContext);
- // Client:
- q_SSL_set_alpn_protos(ssl, m_npnContext.data, m_npnContext.len);
- }
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ...
-
+ // Callback's type has a parameter 'const unsigned char ** out'
+ // since it was introduced in 1.0.2. Internally, OpenSSL's own code
+ // (tests/examples) cast it to unsigned char * (since it's 'out').
+ // We just re-use our NPN callback and cast here:
+ typedef int (*alpn_callback_t) (SSL *, const unsigned char **, unsigned char *,
+ const unsigned char *, unsigned int, void *);
+ // With ALPN callback is for a server side only, for a client m_npnContext.status
+ // will stay in NextProtocolNegotiationNone.
+ q_SSL_CTX_set_alpn_select_cb(ctx, alpn_callback_t(next_proto_cb), &m_npnContext);
+ // Client:
+ q_SSL_set_alpn_protos(ssl, m_npnContext.data, m_npnContext.len);
// And in case our peer does not support ALPN, but supports NPN:
q_SSL_CTX_set_next_proto_select_cb(ctx, next_proto_cb, &m_npnContext);
}
}
-#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
+#endif // !OPENSSL_NO_NEXTPROTONEG
return ssl;
}
@@ -247,6 +277,403 @@ QString QSslContext::errorString() const
return errorStr;
}
+void QSslContext::initSslContext(QSslContext *sslContext, QSslSocket::SslMode mode,
+ const QSslConfiguration &configuration,
+ bool allowRootCertOnDemandLoading)
+{
+ sslContext->sslConfiguration = configuration;
+ sslContext->errorCode = QSslError::NoError;
+
+ bool client = (mode == QSslSocket::SslClientMode);
+
+ 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 if (sslContext->sslConfiguration.protocol() == QSsl::SslV3) {
+ // SSL 3 is no longer supported, but chosen deliberately -> error
+ sslContext->ctx = nullptr;
+ unsupportedProtocol = true;
+ } else {
+ switch (sslContext->sslConfiguration.protocol()) {
+ case QSsl::DtlsV1_0:
+ case QSsl::DtlsV1_0OrLater:
+ case QSsl::DtlsV1_2:
+ case QSsl::DtlsV1_2OrLater:
+#if QT_CONFIG(dtls)
+ isDtls = true;
+ sslContext->ctx = q_SSL_CTX_new(client ? q_DTLS_client_method() : q_DTLS_server_method());
+#else // dtls
+ sslContext->ctx = nullptr;
+ unsupportedProtocol = true;
+ qCWarning(lcSsl, "DTLS protocol requested, but feature 'dtls' is disabled");
+
+#endif // dtls
+ break;
+ case QSsl::TlsV1_3:
+ case QSsl::TlsV1_3OrLater:
+#if !defined(TLS1_3_VERSION)
+ qCWarning(lcSsl, "TLS 1.3 is not supported");
+ sslContext->ctx = nullptr;
+ unsupportedProtocol = true;
+ break;
+#endif // TLS1_3_VERSION
+ 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) {
+ // After stopping Flash 10 the SSL library loses its ciphers. Try re-adding them
+ // by re-initializing the library.
+ if (!reinitialized) {
+ reinitialized = true;
+ if (q_OPENSSL_init_ssl(0, nullptr) == 1)
+ goto init_context;
+ }
+
+ sslContext->errorStr = QSslSocket::tr("Error creating SSL context (%1)").arg(
+ unsupportedProtocol ? QSslSocket::tr("unsupported protocol") : QSslSocketBackendPrivate::getErrorsFromOpenSsl()
+ );
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+
+ 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()) {
+ case QSsl::TlsV1_0:
+ minVersion = TLS1_VERSION;
+ maxVersion = TLS1_VERSION;
+ break;
+ case QSsl::TlsV1_1:
+ minVersion = TLS1_1_VERSION;
+ maxVersion = TLS1_1_VERSION;
+ break;
+ case QSsl::TlsV1_2:
+ minVersion = TLS1_2_VERSION;
+ maxVersion = TLS1_2_VERSION;
+ break;
+ case QSsl::TlsV1_3:
+#ifdef TLS1_3_VERSION
+ minVersion = TLS1_3_VERSION;
+ maxVersion = TLS1_3_VERSION;
+#else
+ // This protocol is not supported by OpenSSL 1.1 and we handle
+ // it as an error (see the code above).
+ Q_UNREACHABLE();
+#endif // TLS1_3_VERSION
+ break;
+ // Ranges:
+ case QSsl::TlsV1SslV3:
+ case QSsl::AnyProtocol:
+ case QSsl::SecureProtocols:
+ case QSsl::TlsV1_0OrLater:
+ minVersion = TLS1_VERSION;
+ maxVersion = 0;
+ break;
+ case QSsl::TlsV1_1OrLater:
+ minVersion = TLS1_1_VERSION;
+ maxVersion = 0;
+ break;
+ case QSsl::TlsV1_2OrLater:
+ minVersion = TLS1_2_VERSION;
+ maxVersion = 0;
+ break;
+ 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;
+ case QSsl::TlsV1_3OrLater:
+#ifdef TLS1_3_VERSION
+ minVersion = TLS1_3_VERSION;
+ maxVersion = 0;
+ break;
+#else
+ // This protocol is not supported by OpenSSL 1.1 and we handle
+ // it as an error (see the code above).
+ Q_UNREACHABLE();
+ break;
+#endif // TLS1_3_VERSION
+ case QSsl::SslV2:
+ case QSsl::SslV3:
+ // These protocols are not supported, and we handle
+ // them as an error (see the code above).
+ Q_UNREACHABLE();
+ break;
+ case QSsl::UnknownProtocol:
+ break;
+ }
+
+ 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 != 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;
+ return;
+ }
+
+ // Enable bug workarounds.
+ long options = QSslSocketBackendPrivate::setupOpenSslOptions(configuration.protocol(), configuration.d->sslOptions);
+ q_SSL_CTX_set_options(sslContext->ctx, options);
+
+ // Tell OpenSSL to release memory early
+ // http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html
+ q_SSL_CTX_set_mode(sslContext->ctx, SSL_MODE_RELEASE_BUFFERS);
+
+ auto filterCiphers = [](const QList<QSslCipher> &ciphers, bool selectTls13)
+ {
+ QByteArray cipherString;
+ bool first = true;
+
+ for (const QSslCipher &cipher : qAsConst(ciphers)) {
+ const bool isTls13Cipher = cipher.protocol() == QSsl::TlsV1_3 || cipher.protocol() == QSsl::TlsV1_3OrLater;
+ if (selectTls13 != isTls13Cipher)
+ continue;
+
+ if (first)
+ first = false;
+ else
+ cipherString.append(':');
+ cipherString.append(cipher.name().toLatin1());
+ }
+ return cipherString;
+ };
+
+ // Initialize ciphers
+ QList<QSslCipher> ciphers = sslContext->sslConfiguration.ciphers();
+ if (ciphers.isEmpty())
+ ciphers = isDtls ? q_getDefaultDtlsCiphers() : QSslSocketPrivate::defaultCiphers();
+
+ const QByteArray preTls13Ciphers = filterCiphers(ciphers, false);
+
+ if (preTls13Ciphers.size()) {
+ if (!q_SSL_CTX_set_cipher_list(sslContext->ctx, preTls13Ciphers.data())) {
+ sslContext->errorStr = QSslSocket::tr("Invalid or empty cipher list (%1)").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+ }
+
+ const QByteArray tls13Ciphers = filterCiphers(ciphers, true);
+#ifdef TLS1_3_VERSION
+ if (tls13Ciphers.size()) {
+ if (!q_SSL_CTX_set_ciphersuites(sslContext->ctx, tls13Ciphers.data())) {
+ sslContext->errorStr = QSslSocket::tr("Invalid or empty cipher list (%1)").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+ }
+#endif // TLS1_3_VERSION
+ if (!preTls13Ciphers.size() && !tls13Ciphers.size()) {
+ sslContext->errorStr = QSslSocket::tr("Invalid or empty cipher list (%1)").arg(QStringLiteral(""));
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+
+ const QDateTime now = QDateTime::currentDateTimeUtc();
+
+ // Add all our CAs to this store.
+ const auto caCertificates = sslContext->sslConfiguration.caCertificates();
+ for (const QSslCertificate &caCertificate : caCertificates) {
+ // From https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html:
+ //
+ // If several CA certificates matching the name, key identifier, and
+ // serial number condition are available, only the first one will be
+ // examined. This may lead to unexpected results if the same CA
+ // certificate is available with different expiration dates. If a
+ // ``certificate expired'' verification error occurs, no other
+ // certificate will be searched. Make sure to not have expired
+ // certificates mixed with valid ones.
+ //
+ // See also: QSslSocketBackendPrivate::verify()
+ if (caCertificate.expiryDate() >= now) {
+ q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(sslContext->ctx), (X509 *)caCertificate.handle());
+ }
+ }
+
+ if (QSslSocketPrivate::s_loadRootCertsOnDemand && allowRootCertOnDemandLoading) {
+ // tell OpenSSL the directories where to look up the root certs on demand
+ const QList<QByteArray> unixDirs = QSslSocketPrivate::unixRootCertDirectories();
+ for (const QByteArray &unixDir : unixDirs)
+ q_SSL_CTX_load_verify_locations(sslContext->ctx, nullptr, unixDir.constData());
+ }
+
+ if (!sslContext->sslConfiguration.localCertificate().isNull()) {
+ // Require a private key as well.
+ if (sslContext->sslConfiguration.privateKey().isNull()) {
+ sslContext->errorStr = QSslSocket::tr("Cannot provide a certificate with no key, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+
+ // Load certificate
+ if (!q_SSL_CTX_use_certificate(sslContext->ctx, (X509 *)sslContext->sslConfiguration.localCertificate().handle())) {
+ sslContext->errorStr = QSslSocket::tr("Error loading local certificate, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+
+ if (configuration.d->privateKey.algorithm() == QSsl::Opaque) {
+ sslContext->pkey = reinterpret_cast<EVP_PKEY *>(configuration.d->privateKey.handle());
+ } else {
+ // Load private key
+ sslContext->pkey = q_EVP_PKEY_new();
+ // before we were using EVP_PKEY_assign_R* functions and did not use EVP_PKEY_free.
+ // this lead to a memory leak. Now we use the *_set1_* functions which do not
+ // take ownership of the RSA/DSA key instance because the QSslKey already has ownership.
+ if (configuration.d->privateKey.algorithm() == QSsl::Rsa)
+ q_EVP_PKEY_set1_RSA(sslContext->pkey, reinterpret_cast<RSA *>(configuration.d->privateKey.handle()));
+ else if (configuration.d->privateKey.algorithm() == QSsl::Dsa)
+ q_EVP_PKEY_set1_DSA(sslContext->pkey, reinterpret_cast<DSA *>(configuration.d->privateKey.handle()));
+#ifndef OPENSSL_NO_EC
+ else if (configuration.d->privateKey.algorithm() == QSsl::Ec)
+ q_EVP_PKEY_set1_EC_KEY(sslContext->pkey, reinterpret_cast<EC_KEY *>(configuration.d->privateKey.handle()));
+#endif
+ }
+
+ if (!q_SSL_CTX_use_PrivateKey(sslContext->ctx, sslContext->pkey)) {
+ sslContext->errorStr = QSslSocket::tr("Error loading private key, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+ if (configuration.d->privateKey.algorithm() == QSsl::Opaque)
+ sslContext->pkey = nullptr; // Don't free the private key, it belongs to QSslKey
+
+ // Check if the certificate matches the private key.
+ if (!q_SSL_CTX_check_private_key(sslContext->ctx)) {
+ sslContext->errorStr = QSslSocket::tr("Private key does not certify public key, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+
+ // If we have any intermediate certificates then we need to add them to our chain
+ bool first = true;
+ for (const QSslCertificate &cert : qAsConst(configuration.d->localCertificateChain)) {
+ if (first) {
+ first = false;
+ continue;
+ }
+ q_SSL_CTX_ctrl(sslContext->ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0,
+ q_X509_dup(reinterpret_cast<X509 *>(cert.handle())));
+ }
+ }
+
+ // Initialize peer verification, different callbacks, TLS/DTLS verification first
+ // (note, all these set_some_callback do not have return value):
+ 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,
+#if QT_CONFIG(dtls)
+ isDtls ? dtlscallbacks::q_X509DtlsCallback :
+#endif // dtls
+ q_X509Callback);
+ }
+
+#ifdef TLS1_3_VERSION
+ // NewSessionTicket callback:
+ if (mode == QSslSocket::SslClientMode && !isDtls) {
+ q_SSL_CTX_sess_set_new_cb(sslContext->ctx, q_ssl_sess_set_new_cb);
+ q_SSL_CTX_set_session_cache_mode(sslContext->ctx, SSL_SESS_CACHE_CLIENT);
+ }
+
+#endif // TLS1_3_VERSION
+
+#if QT_CONFIG(dtls)
+ // DTLS cookies:
+ 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)
+ q_SSL_CTX_set_verify_depth(sslContext->ctx, sslContext->sslConfiguration.peerVerifyDepth());
+
+ // set persisted session if the user set it
+ if (!configuration.sessionTicket().isEmpty())
+ sslContext->setSessionASN1(configuration.sessionTicket());
+
+ // Set temp DH params
+ QSslDiffieHellmanParameters dhparams = configuration.diffieHellmanParameters();
+
+ if (!dhparams.isValid()) {
+ sslContext->errorStr = QSslSocket::tr("Diffie-Hellman parameters are not valid");
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+
+ if (!dhparams.isEmpty()) {
+ const QByteArray &params = dhparams.d->derData;
+ const char *ptr = params.constData();
+ DH *dh = q_d2i_DHparams(nullptr, reinterpret_cast<const unsigned char **>(&ptr),
+ params.length());
+ if (dh == nullptr)
+ qFatal("q_d2i_DHparams failed to convert QSslDiffieHellmanParameters to DER form");
+ q_SSL_CTX_set_tmp_dh(sslContext->ctx, dh);
+ q_DH_free(dh);
+ }
+
+#ifndef OPENSSL_NO_PSK
+ if (!client)
+ q_SSL_CTX_use_psk_identity_hint(sslContext->ctx, sslContext->sslConfiguration.preSharedKeyIdentityHint().constData());
+#endif // !OPENSSL_NO_PSK
+
+ const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
+ if (!qcurves.isEmpty()) {
+#ifdef OPENSSL_NO_EC
+ sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version with disabled elliptic curves"));
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+#else
+ // Set the curves to be used.
+ std::vector<int> curves;
+ curves.reserve(qcurves.size());
+ for (const auto &sslCurve : qcurves)
+ curves.push_back(sslCurve.id);
+ if (!q_SSL_CTX_ctrl(sslContext->ctx, SSL_CTRL_SET_CURVES, long(curves.size()), &curves[0])) {
+ sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ return;
+ }
+#endif
+ }
+
+ applyBackendConfig(sslContext);
+}
+
#if QT_CONFIG(ocsp)
extern "C" int qt_OCSP_status_server_callback(SSL *ssl, void *); // Defined in qsslsocket_openssl.cpp.
#endif // ocsp
@@ -269,65 +696,55 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
}
#endif // ocsp
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
- if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
- QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
- if (cctx) {
- q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
- q_SSL_CONF_CTX_set_flags(cctx.data(), SSL_CONF_FLAG_FILE);
-
- for (auto i = conf.constBegin(); i != conf.constEnd(); ++i) {
- if (i.key() == "Qt-OCSP-response") // This never goes to SSL_CONF_cmd().
- continue;
-
- if (!i.value().canConvert(QMetaType::QByteArray)) {
- sslContext->errorCode = QSslError::UnspecifiedError;
- sslContext->errorStr = msgErrorSettingBackendConfig(
- QSslSocket::tr("Expecting QByteArray for %1").arg(
- QString::fromUtf8(i.key())));
- return;
- }
-
- const QByteArray &value = i.value().toByteArray();
- const int result = q_SSL_CONF_cmd(cctx.data(), i.key().constData(), value.constData());
- if (result == 2)
- continue;
+ QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
+ if (cctx) {
+ q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
+ q_SSL_CONF_CTX_set_flags(cctx.data(), SSL_CONF_FLAG_FILE);
+
+ for (auto i = conf.constBegin(); i != conf.constEnd(); ++i) {
+ if (i.key() == "Qt-OCSP-response") // This never goes to SSL_CONF_cmd().
+ continue;
+ if (!i.value().canConvert(QMetaType::QByteArray)) {
sslContext->errorCode = QSslError::UnspecifiedError;
- switch (result) {
- case 0:
- sslContext->errorStr = msgErrorSettingBackendConfig(
- QSslSocket::tr("An error occurred attempting to set %1 to %2").arg(
- QString::fromUtf8(i.key()), QString::fromUtf8(value)));
- return;
- case 1:
- sslContext->errorStr = msgErrorSettingBackendConfig(
- QSslSocket::tr("Wrong value for %1 (%2)").arg(
- QString::fromUtf8(i.key()), QString::fromUtf8(value)));
- return;
- default:
- sslContext->errorStr = msgErrorSettingBackendConfig(
- QSslSocket::tr("Unrecognized command %1 = %2").arg(
- QString::fromUtf8(i.key()), QString::fromUtf8(value)));
- return;
- }
+ sslContext->errorStr = msgErrorSettingBackendConfig(
+ QSslSocket::tr("Expecting QByteArray for %1").arg(
+ QString::fromUtf8(i.key())));
+ return;
}
- if (q_SSL_CONF_CTX_finish(cctx.data()) == 0) {
- sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
- sslContext->errorCode = QSslError::UnspecifiedError;
+ const QByteArray &value = i.value().toByteArray();
+ const int result = q_SSL_CONF_cmd(cctx.data(), i.key().constData(), value.constData());
+ if (result == 2)
+ continue;
+
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ switch (result) {
+ case 0:
+ sslContext->errorStr = msgErrorSettingBackendConfig(
+ QSslSocket::tr("An error occurred attempting to set %1 to %2").arg(
+ QString::fromUtf8(i.key()), QString::fromUtf8(value)));
+ return;
+ case 1:
+ sslContext->errorStr = msgErrorSettingBackendConfig(
+ QSslSocket::tr("Wrong value for %1 (%2)").arg(
+ QString::fromUtf8(i.key()), QString::fromUtf8(value)));
+ return;
+ default:
+ sslContext->errorStr = msgErrorSettingBackendConfig(
+ QSslSocket::tr("Unrecognized command %1 = %2").arg(
+ QString::fromUtf8(i.key()), QString::fromUtf8(value)));
+ return;
}
- } else {
- sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
- sslContext->errorCode = QSslError::UnspecifiedError;
- }
- } else
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
- {
- // specific algorithms requested, but not possible to set
+ }
+
+ if (q_SSL_CONF_CTX_finish(cctx.data()) == 0) {
+ sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
+ sslContext->errorCode = QSslError::UnspecifiedError;
+ }
+ } else {
+ sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
sslContext->errorCode = QSslError::UnspecifiedError;
- sslContext->errorStr = msgErrorSettingBackendConfig(
- QSslSocket::tr("OpenSSL version too old, need at least v1.0.2"));
}
}
diff --git a/src/network/ssl/qsslcontext_openssl11.cpp b/src/network/ssl/qsslcontext_openssl11.cpp
deleted file mode 100644
index db023b7331..0000000000
--- a/src/network/ssl/qsslcontext_openssl11.cpp
+++ /dev/null
@@ -1,467 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
-** Copyright (C) 2014 Governikus GmbH & Co. KG.
-** Copyright (C) 2016 Richard J. Moore <rich@kde.org>
-** 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 <QtNetwork/qsslsocket.h>
-#include <QtNetwork/qssldiffiehellmanparameters.h>
-
-#include "private/qssl_p.h"
-#include "private/qsslcontext_openssl_p.h"
-#include "private/qsslsocket_p.h"
-#include "private/qsslsocket_openssl_p.h"
-#include "private/qsslsocket_openssl_symbols_p.h"
-#include "private/qssldiffiehellmanparameters_p.h"
-
-#include <vector>
-
-QT_BEGIN_NAMESPACE
-
-// defined in qsslsocket_openssl.cpp:
-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)
-{
- sslContext->sslConfiguration = configuration;
- sslContext->errorCode = QSslError::NoError;
-
- bool client = (mode == QSslSocket::SslClientMode);
-
- 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 if (sslContext->sslConfiguration.protocol() == QSsl::SslV3) {
- // SSL 3 is no longer supported, but chosen deliberately -> error
- sslContext->ctx = nullptr;
- unsupportedProtocol = true;
- } else {
- switch (sslContext->sslConfiguration.protocol()) {
- case QSsl::DtlsV1_0:
- case QSsl::DtlsV1_0OrLater:
- case QSsl::DtlsV1_2:
- case QSsl::DtlsV1_2OrLater:
-#if QT_CONFIG(dtls)
- isDtls = true;
- sslContext->ctx = q_SSL_CTX_new(client ? q_DTLS_client_method() : q_DTLS_server_method());
-#else // dtls
- sslContext->ctx = nullptr;
- unsupportedProtocol = true;
- qCWarning(lcSsl, "DTLS protocol requested, but feature 'dtls' is disabled");
-
-#endif // dtls
- break;
- case QSsl::TlsV1_3:
- case QSsl::TlsV1_3OrLater:
-#if !defined(TLS1_3_VERSION)
- qCWarning(lcSsl, "TLS 1.3 is not supported");
- sslContext->ctx = nullptr;
- unsupportedProtocol = true;
- break;
-#endif // TLS1_3_VERSION
- 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) {
- // After stopping Flash 10 the SSL library loses its ciphers. Try re-adding them
- // by re-initializing the library.
- if (!reinitialized) {
- reinitialized = true;
- if (q_OPENSSL_init_ssl(0, nullptr) == 1)
- goto init_context;
- }
-
- sslContext->errorStr = QSslSocket::tr("Error creating SSL context (%1)").arg(
- unsupportedProtocol ? QSslSocket::tr("unsupported protocol") : QSslSocketBackendPrivate::getErrorsFromOpenSsl()
- );
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- 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()) {
- case QSsl::TlsV1_0:
- minVersion = TLS1_VERSION;
- maxVersion = TLS1_VERSION;
- break;
- case QSsl::TlsV1_1:
- minVersion = TLS1_1_VERSION;
- maxVersion = TLS1_1_VERSION;
- break;
- case QSsl::TlsV1_2:
- minVersion = TLS1_2_VERSION;
- maxVersion = TLS1_2_VERSION;
- break;
- case QSsl::TlsV1_3:
-#ifdef TLS1_3_VERSION
- minVersion = TLS1_3_VERSION;
- maxVersion = TLS1_3_VERSION;
-#else
- // This protocol is not supported by OpenSSL 1.1 and we handle
- // it as an error (see the code above).
- Q_UNREACHABLE();
-#endif // TLS1_3_VERSION
- break;
- // Ranges:
- case QSsl::TlsV1SslV3:
- case QSsl::AnyProtocol:
- case QSsl::SecureProtocols:
- case QSsl::TlsV1_0OrLater:
- minVersion = TLS1_VERSION;
- maxVersion = 0;
- break;
- case QSsl::TlsV1_1OrLater:
- minVersion = TLS1_1_VERSION;
- maxVersion = 0;
- break;
- case QSsl::TlsV1_2OrLater:
- minVersion = TLS1_2_VERSION;
- maxVersion = 0;
- break;
- 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;
- case QSsl::TlsV1_3OrLater:
-#ifdef TLS1_3_VERSION
- minVersion = TLS1_3_VERSION;
- maxVersion = 0;
- break;
-#else
- // This protocol is not supported by OpenSSL 1.1 and we handle
- // it as an error (see the code above).
- Q_UNREACHABLE();
- break;
-#endif // TLS1_3_VERSION
- case QSsl::SslV2:
- case QSsl::SslV3:
- // These protocols are not supported, and we handle
- // them as an error (see the code above).
- Q_UNREACHABLE();
- break;
- case QSsl::UnknownProtocol:
- break;
- }
-
- 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 != 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;
- return;
- }
-
- // Enable bug workarounds.
- long options = QSslSocketBackendPrivate::setupOpenSslOptions(configuration.protocol(), configuration.d->sslOptions);
- q_SSL_CTX_set_options(sslContext->ctx, options);
-
- // Tell OpenSSL to release memory early
- // http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html
- q_SSL_CTX_set_mode(sslContext->ctx, SSL_MODE_RELEASE_BUFFERS);
-
- auto filterCiphers = [](const QList<QSslCipher> &ciphers, bool selectTls13)
- {
- QByteArray cipherString;
- bool first = true;
-
- for (const QSslCipher &cipher : qAsConst(ciphers)) {
- const bool isTls13Cipher = cipher.protocol() == QSsl::TlsV1_3 || cipher.protocol() == QSsl::TlsV1_3OrLater;
- if (selectTls13 != isTls13Cipher)
- continue;
-
- if (first)
- first = false;
- else
- cipherString.append(':');
- cipherString.append(cipher.name().toLatin1());
- }
- return cipherString;
- };
-
- // Initialize ciphers
- QList<QSslCipher> ciphers = sslContext->sslConfiguration.ciphers();
- if (ciphers.isEmpty())
- ciphers = isDtls ? q_getDefaultDtlsCiphers() : QSslSocketPrivate::defaultCiphers();
-
- const QByteArray preTls13Ciphers = filterCiphers(ciphers, false);
-
- if (preTls13Ciphers.size()) {
- if (!q_SSL_CTX_set_cipher_list(sslContext->ctx, preTls13Ciphers.data())) {
- sslContext->errorStr = QSslSocket::tr("Invalid or empty cipher list (%1)").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
- }
-
- const QByteArray tls13Ciphers = filterCiphers(ciphers, true);
-#ifdef TLS1_3_VERSION
- if (tls13Ciphers.size()) {
- if (!q_SSL_CTX_set_ciphersuites(sslContext->ctx, tls13Ciphers.data())) {
- sslContext->errorStr = QSslSocket::tr("Invalid or empty cipher list (%1)").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
- }
-#endif // TLS1_3_VERSION
- if (!preTls13Ciphers.size() && !tls13Ciphers.size()) {
- sslContext->errorStr = QSslSocket::tr("Invalid or empty cipher list (%1)").arg(QStringLiteral(""));
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- const QDateTime now = QDateTime::currentDateTimeUtc();
-
- // Add all our CAs to this store.
- const auto caCertificates = sslContext->sslConfiguration.caCertificates();
- for (const QSslCertificate &caCertificate : caCertificates) {
- // From https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html:
- //
- // If several CA certificates matching the name, key identifier, and
- // serial number condition are available, only the first one will be
- // examined. This may lead to unexpected results if the same CA
- // certificate is available with different expiration dates. If a
- // ``certificate expired'' verification error occurs, no other
- // certificate will be searched. Make sure to not have expired
- // certificates mixed with valid ones.
- //
- // See also: QSslSocketBackendPrivate::verify()
- if (caCertificate.expiryDate() >= now) {
- q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(sslContext->ctx), (X509 *)caCertificate.handle());
- }
- }
-
- if (QSslSocketPrivate::s_loadRootCertsOnDemand && allowRootCertOnDemandLoading) {
- // tell OpenSSL the directories where to look up the root certs on demand
- const QList<QByteArray> unixDirs = QSslSocketPrivate::unixRootCertDirectories();
- for (const QByteArray &unixDir : unixDirs)
- q_SSL_CTX_load_verify_locations(sslContext->ctx, nullptr, unixDir.constData());
- }
-
- if (!sslContext->sslConfiguration.localCertificate().isNull()) {
- // Require a private key as well.
- if (sslContext->sslConfiguration.privateKey().isNull()) {
- sslContext->errorStr = QSslSocket::tr("Cannot provide a certificate with no key, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- // Load certificate
- if (!q_SSL_CTX_use_certificate(sslContext->ctx, (X509 *)sslContext->sslConfiguration.localCertificate().handle())) {
- sslContext->errorStr = QSslSocket::tr("Error loading local certificate, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- if (configuration.d->privateKey.algorithm() == QSsl::Opaque) {
- sslContext->pkey = reinterpret_cast<EVP_PKEY *>(configuration.d->privateKey.handle());
- } else {
- // Load private key
- sslContext->pkey = q_EVP_PKEY_new();
- // before we were using EVP_PKEY_assign_R* functions and did not use EVP_PKEY_free.
- // this lead to a memory leak. Now we use the *_set1_* functions which do not
- // take ownership of the RSA/DSA key instance because the QSslKey already has ownership.
- if (configuration.d->privateKey.algorithm() == QSsl::Rsa)
- q_EVP_PKEY_set1_RSA(sslContext->pkey, reinterpret_cast<RSA *>(configuration.d->privateKey.handle()));
- else if (configuration.d->privateKey.algorithm() == QSsl::Dsa)
- q_EVP_PKEY_set1_DSA(sslContext->pkey, reinterpret_cast<DSA *>(configuration.d->privateKey.handle()));
-#ifndef OPENSSL_NO_EC
- else if (configuration.d->privateKey.algorithm() == QSsl::Ec)
- q_EVP_PKEY_set1_EC_KEY(sslContext->pkey, reinterpret_cast<EC_KEY *>(configuration.d->privateKey.handle()));
-#endif
- }
-
- if (!q_SSL_CTX_use_PrivateKey(sslContext->ctx, sslContext->pkey)) {
- sslContext->errorStr = QSslSocket::tr("Error loading private key, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
- if (configuration.d->privateKey.algorithm() == QSsl::Opaque)
- sslContext->pkey = nullptr; // Don't free the private key, it belongs to QSslKey
-
- // Check if the certificate matches the private key.
- if (!q_SSL_CTX_check_private_key(sslContext->ctx)) {
- sslContext->errorStr = QSslSocket::tr("Private key does not certify public key, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- // If we have any intermediate certificates then we need to add them to our chain
- bool first = true;
- for (const QSslCertificate &cert : qAsConst(configuration.d->localCertificateChain)) {
- if (first) {
- first = false;
- continue;
- }
- q_SSL_CTX_ctrl(sslContext->ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0,
- q_X509_dup(reinterpret_cast<X509 *>(cert.handle())));
- }
- }
-
- // Initialize peer verification.
- 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,
-#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)
- q_SSL_CTX_set_verify_depth(sslContext->ctx, sslContext->sslConfiguration.peerVerifyDepth());
-
- // set persisted session if the user set it
- if (!configuration.sessionTicket().isEmpty())
- sslContext->setSessionASN1(configuration.sessionTicket());
-
- // Set temp DH params
- QSslDiffieHellmanParameters dhparams = configuration.diffieHellmanParameters();
-
- if (!dhparams.isValid()) {
- sslContext->errorStr = QSslSocket::tr("Diffie-Hellman parameters are not valid");
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- if (!dhparams.isEmpty()) {
- const QByteArray &params = dhparams.d->derData;
- const char *ptr = params.constData();
- DH *dh = q_d2i_DHparams(nullptr, reinterpret_cast<const unsigned char **>(&ptr),
- params.length());
- if (dh == nullptr)
- qFatal("q_d2i_DHparams failed to convert QSslDiffieHellmanParameters to DER form");
- q_SSL_CTX_set_tmp_dh(sslContext->ctx, dh);
- q_DH_free(dh);
- }
-
-#ifndef OPENSSL_NO_PSK
- if (!client)
- q_SSL_CTX_use_psk_identity_hint(sslContext->ctx, sslContext->sslConfiguration.preSharedKeyIdentityHint().constData());
-#endif // !OPENSSL_NO_PSK
-
- const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
- if (!qcurves.isEmpty()) {
-#ifdef OPENSSL_NO_EC
- sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version with disabled elliptic curves"));
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
-#else
- // Set the curves to be used.
- std::vector<int> curves;
- curves.reserve(qcurves.size());
- for (const auto &sslCurve : qcurves)
- curves.push_back(sslCurve.id);
- if (!q_SSL_CTX_ctrl(sslContext->ctx, SSL_CTRL_SET_CURVES, long(curves.size()), &curves[0])) {
- sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-#endif
- }
-
- applyBackendConfig(sslContext);
-}
-
-QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslcontext_openssl_p.h b/src/network/ssl/qsslcontext_openssl_p.h
index 1fa27279c7..70cb97aad8 100644
--- a/src/network/ssl/qsslcontext_openssl_p.h
+++ b/src/network/ssl/qsslcontext_openssl_p.h
@@ -86,7 +86,7 @@ public:
void setSessionASN1(const QByteArray &sessionASN1);
int sessionTicketLifeTimeHint() const;
-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
// must be public because we want to use it from an OpenSSL callback
struct NPNContext {
NPNContext() : data(nullptr),
@@ -98,7 +98,7 @@ public:
QSslConfiguration::NextProtocolNegotiationStatus status;
};
NPNContext npnContext() const;
-#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
+#endif // !OPENSSL_NO_NEXTPROTONEG
protected:
QSslContext();
@@ -118,10 +118,10 @@ private:
QSslError::SslError errorCode;
QString errorStr;
QSslConfiguration sslConfiguration;
-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
QByteArray m_supportedNPNVersions;
NPNContext m_npnContext;
-#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
+#endif // !OPENSSL_NO_NEXTPROTONEG
};
#endif // QT_NO_SSL
diff --git a/src/network/ssl/qsslcontext_opensslpre11.cpp b/src/network/ssl/qsslcontext_opensslpre11.cpp
deleted file mode 100644
index 956c5c32ec..0000000000
--- a/src/network/ssl/qsslcontext_opensslpre11.cpp
+++ /dev/null
@@ -1,407 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
-** Copyright (C) 2014 Governikus GmbH & Co. KG.
-** 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 <QtNetwork/qsslsocket.h>
-#include <QtNetwork/qssldiffiehellmanparameters.h>
-
-#include "private/qssl_p.h"
-#include "private/qsslcontext_openssl_p.h"
-#include "private/qsslsocket_p.h"
-#include "private/qsslsocket_openssl_p.h"
-#include "private/qsslsocket_openssl_symbols_p.h"
-#include "private/qssldiffiehellmanparameters_p.h"
-
-QT_BEGIN_NAMESPACE
-
-// defined in qsslsocket_openssl.cpp:
-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)
-{
- sslContext->sslConfiguration = configuration;
- 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;
-#else // dtls
- case QSsl::DtlsV1_0:
- case QSsl::DtlsV1_0OrLater:
- case QSsl::DtlsV1_2:
- case QSsl::DtlsV1_2OrLater:
- sslContext->ctx = nullptr;
- unsupportedProtocol = true;
- qCWarning(lcSsl, "DTLS protocol requested, but feature 'dtls' is disabled");
- break;
-#endif // dtls
- case QSsl::SslV2:
- case QSsl::SslV3:
- // We don't support SSLv2 / SSLv3.
- sslContext->ctx = 0;
- unsupportedProtocol = true;
- break;
- case QSsl::SecureProtocols:
- // SSLv2 and SSLv3 will be disabled by SSL options
- // But we need q_SSLv23_server_method() otherwise AnyProtocol will be unable to connect on Win32.
- case QSsl::AnyProtocol:
- default:
- sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method());
- break;
- case QSsl::TlsV1SslV3:
- case QSsl::TlsV1_0:
- sslContext->ctx = q_SSL_CTX_new(client ? q_TLSv1_client_method() : q_TLSv1_server_method());
- break;
- case QSsl::TlsV1_1:
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
- sslContext->ctx = q_SSL_CTX_new(client ? q_TLSv1_1_client_method() : q_TLSv1_1_server_method());
-#else
- // TLS 1.1 not supported by the system, but chosen deliberately -> error
- sslContext->ctx = 0;
- unsupportedProtocol = true;
-#endif
- break;
- case QSsl::TlsV1_2:
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
- sslContext->ctx = q_SSL_CTX_new(client ? q_TLSv1_2_client_method() : q_TLSv1_2_server_method());
-#else
- // TLS 1.2 not supported by the system, but chosen deliberately -> error
- sslContext->ctx = 0;
- unsupportedProtocol = true;
-#endif
- break;
- case QSsl::TlsV1_0OrLater:
- // Specific protocols will be specified via SSL options.
- sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method());
- break;
- case QSsl::TlsV1_1OrLater:
- case QSsl::TlsV1_2OrLater:
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
- // Specific protocols will be specified via SSL options.
- sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method());
-#else
- // TLS 1.1/1.2 not supported by the system, but chosen deliberately -> error
- sslContext->ctx = 0;
- unsupportedProtocol = true;
-#endif
- break;
- case QSsl::TlsV1_3:
- case QSsl::TlsV1_3OrLater:
- // TLS 1.3 is not supported by the system, but chosen deliberately -> error
- sslContext->ctx = nullptr;
- unsupportedProtocol = true;
- 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.
- if (!reinitialized) {
- reinitialized = true;
- if (q_SSL_library_init() == 1)
- goto init_context;
- }
-
- sslContext->errorStr = QSslSocket::tr("Error creating SSL context (%1)").arg(
- unsupportedProtocol ? QSslSocket::tr("unsupported protocol") : QSslSocketBackendPrivate::getErrorsFromOpenSsl()
- );
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- // Enable bug workarounds.
- // DTLSTODO: check this setupOpenSslOptions ...
- long options = QSslSocketBackendPrivate::setupOpenSslOptions(configuration.protocol(), configuration.d->sslOptions);
- q_SSL_CTX_set_options(sslContext->ctx, options);
-
- // Tell OpenSSL to release memory early
- // http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html
- q_SSL_CTX_set_mode(sslContext->ctx, SSL_MODE_RELEASE_BUFFERS);
-
- // Initialize ciphers
- QByteArray cipherString;
- bool first = true;
- QList<QSslCipher> ciphers = sslContext->sslConfiguration.ciphers();
- if (ciphers.isEmpty())
- ciphers = isDtls ? q_getDefaultDtlsCiphers() : QSslSocketPrivate::defaultCiphers();
- for (const QSslCipher &cipher : qAsConst(ciphers)) {
- if (first)
- first = false;
- else
- cipherString.append(':');
- cipherString.append(cipher.name().toLatin1());
- }
-
- if (!q_SSL_CTX_set_cipher_list(sslContext->ctx, cipherString.data())) {
- sslContext->errorStr = QSslSocket::tr("Invalid or empty cipher list (%1)").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- const QDateTime now = QDateTime::currentDateTimeUtc();
-
- // Add all our CAs to this store.
- const auto caCertificates = sslContext->sslConfiguration.caCertificates();
- for (const QSslCertificate &caCertificate : caCertificates) {
- // From https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html:
- //
- // If several CA certificates matching the name, key identifier, and
- // serial number condition are available, only the first one will be
- // examined. This may lead to unexpected results if the same CA
- // certificate is available with different expiration dates. If a
- // ``certificate expired'' verification error occurs, no other
- // certificate will be searched. Make sure to not have expired
- // certificates mixed with valid ones.
- //
- // See also: QSslSocketBackendPrivate::verify()
- if (caCertificate.expiryDate() >= now) {
- q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(sslContext->ctx), (X509 *)caCertificate.handle());
- }
- }
-
- if (QSslSocketPrivate::s_loadRootCertsOnDemand && allowRootCertOnDemandLoading) {
- // tell OpenSSL the directories where to look up the root certs on demand
- const QList<QByteArray> unixDirs = QSslSocketPrivate::unixRootCertDirectories();
- for (const QByteArray &unixDir : unixDirs)
- q_SSL_CTX_load_verify_locations(sslContext->ctx, 0, unixDir.constData());
- }
-
- if (!sslContext->sslConfiguration.localCertificate().isNull()) {
- // Require a private key as well.
- if (sslContext->sslConfiguration.privateKey().isNull()) {
- sslContext->errorStr = QSslSocket::tr("Cannot provide a certificate with no key, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- // Load certificate
- if (!q_SSL_CTX_use_certificate(sslContext->ctx, (X509 *)sslContext->sslConfiguration.localCertificate().handle())) {
- sslContext->errorStr = QSslSocket::tr("Error loading local certificate, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- if (configuration.d->privateKey.algorithm() == QSsl::Opaque) {
- sslContext->pkey = reinterpret_cast<EVP_PKEY *>(configuration.d->privateKey.handle());
- } else {
- // Load private key
- sslContext->pkey = q_EVP_PKEY_new();
- // before we were using EVP_PKEY_assign_R* functions and did not use EVP_PKEY_free.
- // this lead to a memory leak. Now we use the *_set1_* functions which do not
- // take ownership of the RSA/DSA key instance because the QSslKey already has ownership.
- if (configuration.d->privateKey.algorithm() == QSsl::Rsa)
- q_EVP_PKEY_set1_RSA(sslContext->pkey, reinterpret_cast<RSA *>(configuration.d->privateKey.handle()));
- else if (configuration.d->privateKey.algorithm() == QSsl::Dsa)
- q_EVP_PKEY_set1_DSA(sslContext->pkey, reinterpret_cast<DSA *>(configuration.d->privateKey.handle()));
-#ifndef OPENSSL_NO_EC
- else if (configuration.d->privateKey.algorithm() == QSsl::Ec)
- q_EVP_PKEY_set1_EC_KEY(sslContext->pkey, reinterpret_cast<EC_KEY *>(configuration.d->privateKey.handle()));
-#endif
- }
-
- if (!q_SSL_CTX_use_PrivateKey(sslContext->ctx, sslContext->pkey)) {
- sslContext->errorStr = QSslSocket::tr("Error loading private key, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
- if (configuration.d->privateKey.algorithm() == QSsl::Opaque)
- sslContext->pkey = 0; // Don't free the private key, it belongs to QSslKey
-
- // Check if the certificate matches the private key.
- if (!q_SSL_CTX_check_private_key(sslContext->ctx)) {
- sslContext->errorStr = QSslSocket::tr("Private key does not certify public key, %1").arg(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- // If we have any intermediate certificates then we need to add them to our chain
- bool first = true;
- for (const QSslCertificate &cert : qAsConst(configuration.d->localCertificateChain)) {
- if (first) {
- first = false;
- continue;
- }
- q_SSL_CTX_ctrl(sslContext->ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0,
- q_X509_dup(reinterpret_cast<X509 *>(cert.handle())));
- }
- }
-
- // Initialize peer verification.
- 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,
-#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)
- q_SSL_CTX_set_verify_depth(sslContext->ctx, sslContext->sslConfiguration.peerVerifyDepth());
-
- // set persisted session if the user set it
- if (!configuration.sessionTicket().isEmpty())
- sslContext->setSessionASN1(configuration.sessionTicket());
-
- // Set temp DH params
- QSslDiffieHellmanParameters dhparams = configuration.diffieHellmanParameters();
-
- if (!dhparams.isValid()) {
- sslContext->errorStr = QSslSocket::tr("Diffie-Hellman parameters are not valid");
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
-
- if (!dhparams.isEmpty()) {
- const QByteArray &params = dhparams.d->derData;
- const char *ptr = params.constData();
- DH *dh = q_d2i_DHparams(NULL, reinterpret_cast<const unsigned char **>(&ptr), params.length());
- if (dh == NULL)
- qFatal("q_d2i_DHparams failed to convert QSslDiffieHellmanParameters to DER form");
- q_SSL_CTX_set_tmp_dh(sslContext->ctx, dh);
- q_DH_free(dh);
- }
-
-#ifndef OPENSSL_NO_EC
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
- if (q_SSLeay() >= 0x10002000L) {
- q_SSL_CTX_ctrl(sslContext->ctx, SSL_CTRL_SET_ECDH_AUTO, 1, NULL);
- } else
-#endif
- {
- // Set temp ECDH params
- EC_KEY *ecdh = 0;
- ecdh = q_EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
- q_SSL_CTX_set_tmp_ecdh(sslContext->ctx, ecdh);
- q_EC_KEY_free(ecdh);
- }
-#endif // OPENSSL_NO_EC
-
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
- if (!client)
- q_SSL_CTX_use_psk_identity_hint(sslContext->ctx, sslContext->sslConfiguration.preSharedKeyIdentityHint().constData());
-#endif // OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
-
- const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
- if (!qcurves.isEmpty()) {
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
- // Set the curves to be used
- if (q_SSLeay() >= 0x10002000L) {
- // SSL_CTX_ctrl wants a non-const pointer as last argument,
- // but let's avoid a copy into a temporary array
- if (!q_SSL_CTX_ctrl(sslContext->ctx,
- SSL_CTRL_SET_CURVES,
- qcurves.size(),
- const_cast<int *>(reinterpret_cast<const int *>(qcurves.data())))) {
- sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocketBackendPrivate::getErrorsFromOpenSsl());
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
- } else
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
- {
- // specific curves requested, but not possible to set -> error
- sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2"));
- sslContext->errorCode = QSslError::UnspecifiedError;
- return;
- }
- }
-
- applyBackendConfig(sslContext);
-}
-
-QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslellipticcurve_openssl.cpp b/src/network/ssl/qsslellipticcurve_openssl.cpp
index b5e38ada53..bb7ad66bd2 100644
--- a/src/network/ssl/qsslellipticcurve_openssl.cpp
+++ b/src/network/ssl/qsslellipticcurve_openssl.cpp
@@ -83,10 +83,8 @@ QSslEllipticCurve QSslEllipticCurve::fromShortName(const QString &name)
const QByteArray curveNameLatin1 = name.toLatin1();
int nid = q_OBJ_sn2nid(curveNameLatin1.data());
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
- if (nid == 0 && QSslSocket::sslLibraryVersionNumber() >= 0x10002000L)
+ if (nid == 0)
nid = q_EC_curve_nist2nid(curveNameLatin1.data());
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
result.id = nid;
diff --git a/src/network/ssl/qsslkey_openssl.cpp b/src/network/ssl/qsslkey_openssl.cpp
index 888058df22..43cb8c6de8 100644
--- a/src/network/ssl/qsslkey_openssl.cpp
+++ b/src/network/ssl/qsslkey_openssl.cpp
@@ -93,11 +93,7 @@ bool QSslKeyPrivate::fromEVP_PKEY(EVP_PKEY *pkey)
if (pkey == nullptr)
return false;
-#if QT_CONFIG(opensslv11)
const int keyType = q_EVP_PKEY_type(q_EVP_PKEY_base_id(pkey));
-#else
- const int keyType = pkey->type;
-#endif
if (keyType == EVP_PKEY_RSA) {
isNull = false;
algorithm = QSsl::Rsa;
@@ -350,33 +346,17 @@ static QByteArray doCrypt(QSslKeyPrivate::Cipher cipher, const QByteArray &data,
QByteArray output;
output.resize(data.size() + EVP_MAX_BLOCK_LENGTH);
-#if QT_CONFIG(opensslv11)
EVP_CIPHER_CTX *ctx = q_EVP_CIPHER_CTX_new();
q_EVP_CIPHER_CTX_reset(ctx);
-#else
- EVP_CIPHER_CTX evpCipherContext;
- EVP_CIPHER_CTX *ctx = &evpCipherContext;
- q_EVP_CIPHER_CTX_init(ctx);
-#endif
-
q_EVP_CipherInit(ctx, type, nullptr, nullptr, enc);
q_EVP_CIPHER_CTX_set_key_length(ctx, key.size());
if (cipher == QSslKeyPrivate::Rc2Cbc)
q_EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC2_KEY_BITS, 8 * key.size(), nullptr);
-#if QT_CONFIG(opensslv11)
- // EVP_CipherInit in 1.1 resets the context thus making the calls above useless.
- // We call EVP_CipherInit_ex instead.
q_EVP_CipherInit_ex(ctx, nullptr, nullptr,
reinterpret_cast<const unsigned char *>(key.constData()),
reinterpret_cast<const unsigned char *>(iv.constData()),
enc);
-#else
- q_EVP_CipherInit(ctx, NULL,
- reinterpret_cast<const unsigned char *>(key.constData()),
- reinterpret_cast<const unsigned char *>(iv.constData()), enc);
-#endif // opensslv11
-
q_EVP_CipherUpdate(ctx,
reinterpret_cast<unsigned char *>(output.data()), &len,
reinterpret_cast<const unsigned char *>(data.constData()), data.size());
@@ -384,12 +364,8 @@ static QByteArray doCrypt(QSslKeyPrivate::Cipher cipher, const QByteArray &data,
reinterpret_cast<unsigned char *>(output.data()) + len, &i);
len += i;
-#if QT_CONFIG(opensslv11)
q_EVP_CIPHER_CTX_reset(ctx);
q_EVP_CIPHER_CTX_free(ctx);
-#else
- q_EVP_CIPHER_CTX_cleanup(ctx);
-#endif
return output.left(len);
}
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 4e9e947263..4ed1951c7d 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -139,10 +139,21 @@
before the handshake phase with setLocalCertificate() and
setPrivateKey().
\li The CA certificate database can be extended and customized with
- addCaCertificate(), addCaCertificates(), addDefaultCaCertificate(),
- addDefaultCaCertificates(), and QSslConfiguration::defaultConfiguration().setCaCertificates().
+ QSslConfiguration::addCaCertificate(),
+ QSslConfiguration::addCaCertificates().
\endlist
+ To extend the list of \e default CA certificates used by the SSL sockets
+ during the SSL handshake you must update the default configuration, as
+ in the snippet below:
+
+ \code
+ QList<QSslCertificate> certificates = getCertificates();
+ QSslConfiguration configuration = QSslConfiguration::defaultConfiguration();
+ configuration.addCaCertificates(certificates);
+ QSslConfiguration::setDefaultConfiguration(configuration);
+ \endcode
+
\note If available, root certificates on Unix (excluding \macos) will be
loaded on demand from the standard certificate directories. If you do not
want to load root certificates on demand, you need to call either
@@ -278,7 +289,7 @@
If you want to continue connecting despite the errors that have occurred,
you must call QSslSocket::ignoreSslErrors() from inside a slot connected to
this signal. If you need to access the error list at a later point, you
- can call sslErrors() (without arguments).
+ can call sslHandshakeErrors().
\a errors contains one or more errors that prevent QSslSocket from
verifying the identity of the peer.
@@ -311,6 +322,22 @@
\sa QSslPreSharedKeyAuthenticator
*/
+/*!
+ \fn void QSslSocket::newSessionTicketReceived()
+ \since 5.15
+
+ If TLS 1.3 protocol was negotiated during a handshake, QSslSocket
+ emits this signal after receiving NewSessionTicket message. Session
+ and session ticket's lifetime hint are updated in the socket's
+ configuration. The session can be used for session resumption (and
+ a shortened handshake) in future TLS connections.
+
+ \note This functionality enabled only with OpenSSL backend and requires
+ OpenSSL v 1.1.1 or above.
+
+ \sa QSslSocket::sslConfiguration(), QSslConfiguration::sessionTicket(), QSslConfiguration::sessionTicketLifeTimeHint()
+*/
+
#include "qssl_p.h"
#include "qsslsocket.h"
#include "qsslcipher.h"
@@ -538,7 +565,7 @@ bool QSslSocket::setSocketDescriptor(qintptr socketDescriptor, SocketState state
d->createPlainSocket(openMode);
bool retVal = d->plainSocket->setSocketDescriptor(socketDescriptor, state, openMode);
d->cachedSocketDescriptor = d->plainSocket->socketDescriptor();
- d->setError(d->plainSocket->error(), d->plainSocket->errorString());
+ d->setError(d->plainSocket->socketError(), d->plainSocket->errorString());
setSocketState(state);
setOpenMode(openMode);
setLocalPort(d->plainSocket->localPort());
@@ -1384,6 +1411,10 @@ QList<QSslCipher> QSslSocket::supportedCiphers()
#endif // #if QT_DEPRECATED_SINCE(5, 5)
/*!
+ \deprecated
+
+ Use QSslConfiguration::addCaCertificates() instead.
+
Searches all files in the \a path for certificates encoded in the
specified \a format and adds them to this socket's CA certificate
database. \a path must be a file or a pattern matching one or more
@@ -1402,7 +1433,10 @@ bool QSslSocket::addCaCertificates(const QString &path, QSsl::EncodingFormat for
QRegExp::PatternSyntax syntax)
{
Q_D(QSslSocket);
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QList<QSslCertificate> certs = QSslCertificate::fromPath(path, format, syntax);
+QT_WARNING_POP
if (certs.isEmpty())
return false;
@@ -1411,6 +1445,10 @@ bool QSslSocket::addCaCertificates(const QString &path, QSsl::EncodingFormat for
}
/*!
+ \deprecated
+
+ Use QSslConfiguration::addCaCertificate() instead.
+
Adds the \a certificate to this socket's CA certificate database.
The CA certificate database is used by the socket during the
handshake phase to validate the peer's certificate.
@@ -1427,6 +1465,10 @@ void QSslSocket::addCaCertificate(const QSslCertificate &certificate)
}
/*!
+ \deprecated
+
+ Use QSslConfiguration::addCaCertificates() instead.
+
Adds the \a certificates to this socket's CA certificate database.
The CA certificate database is used by the socket during the
handshake phase to validate the peer's certificate.
@@ -1489,6 +1531,10 @@ QList<QSslCertificate> QSslSocket::caCertificates() const
#endif // #if QT_DEPRECATED_SINCE(5, 5)
/*!
+ \deprecated
+
+ Use QSslConfiguration::addCaCertificates() on the default QSslConfiguration instead.
+
Searches all files in the \a path for certificates with the
specified \a encoding and adds them to the default CA certificate
database. \a path can be an explicit file, or it can contain
@@ -1498,8 +1544,8 @@ QList<QSslCertificate> QSslSocket::caCertificates() const
Each SSL socket's CA certificate database is initialized to the
default CA certificate database.
- \sa QSslConfiguration::caCertificates(), addCaCertificates(),
- addDefaultCaCertificate()
+ \sa QSslConfiguration::caCertificates(), QSslConfiguration::addCaCertificates(),
+ QSslConfiguration::addCaCertificate()
*/
bool QSslSocket::addDefaultCaCertificates(const QString &path, QSsl::EncodingFormat encoding,
QRegExp::PatternSyntax syntax)
@@ -1508,11 +1554,15 @@ bool QSslSocket::addDefaultCaCertificates(const QString &path, QSsl::EncodingFor
}
/*!
+ \deprecated
+
+ Use QSslConfiguration::addCaCertificate() on the default QSslConfiguration instead.
+
Adds \a certificate to the default CA certificate database. Each
SSL socket's CA certificate database is initialized to the default
CA certificate database.
- \sa addCaCertificates()
+ \sa QSslConfiguration::addCaCertificates()
*/
void QSslSocket::addDefaultCaCertificate(const QSslCertificate &certificate)
{
@@ -1520,11 +1570,15 @@ void QSslSocket::addDefaultCaCertificate(const QSslCertificate &certificate)
}
/*!
+ \deprecated
+
+ Use QSslConfiguration::addCaCertificates() on the default QSslConfiguration instead.
+
Adds \a certificates to the default CA certificate database. Each
SSL socket's CA certificate database is initialized to the default
CA certificate database.
- \sa QSslConfiguration::caCertificates(), addCaCertificates()
+ \sa QSslConfiguration::caCertificates(), QSslConfiguration::addCaCertificates()
*/
void QSslSocket::addDefaultCaCertificates(const QList<QSslCertificate> &certificates)
{
@@ -1616,7 +1670,7 @@ bool QSslSocket::waitForConnected(int msecs)
bool retVal = d->plainSocket->waitForConnected(msecs);
if (!retVal) {
setSocketState(d->plainSocket->state());
- d->setError(d->plainSocket->error(), d->plainSocket->errorString());
+ d->setError(d->plainSocket->socketError(), d->plainSocket->errorString());
}
return retVal;
}
@@ -1785,21 +1839,42 @@ bool QSslSocket::waitForDisconnected(int msecs)
bool retVal = d->plainSocket->waitForDisconnected(qt_subtract_from_timeout(msecs, stopWatch.elapsed()));
if (!retVal) {
setSocketState(d->plainSocket->state());
- d->setError(d->plainSocket->error(), d->plainSocket->errorString());
+ d->setError(d->plainSocket->socketError(), d->plainSocket->errorString());
}
return retVal;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
+ \deprecated
+
+ Use sslHandshakeErrors() instead.
+
Returns a list of the last SSL errors that occurred. This is the
same list as QSslSocket passes via the sslErrors() signal. If the
connection has been encrypted with no errors, this function will
return an empty list.
- \sa connectToHostEncrypted()
+ \sa connectToHostEncrypted(), sslHandshakeErrors()
*/
QList<QSslError> QSslSocket::sslErrors() const
{
+ return sslHandshakeErrors();
+}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/*!
+ \since 5.15
+
+ Returns a list of the last SSL errors that occurred. This is the
+ same list as QSslSocket passes via the sslErrors() signal. If the
+ connection has been encrypted with no errors, this function will
+ return an empty list.
+
+ \sa connectToHostEncrypted()
+*/
+QList<QSslError> QSslSocket::sslHandshakeErrors() const
+{
Q_D(const QSslSocket);
return d->sslErrors;
}
@@ -2000,7 +2075,7 @@ void QSslSocket::ignoreSslErrors()
You can clear the list of errors you want to ignore by calling this
function with an empty list.
- \sa sslErrors()
+ \sa sslErrors(), sslHandshakeErrors()
*/
void QSslSocket::ignoreSslErrors(const QList<QSslError> &errors)
{
@@ -2305,7 +2380,10 @@ bool QSslSocketPrivate::addDefaultCaCertificates(const QString &path, QSsl::Enco
QRegExp::PatternSyntax syntax)
{
QSslSocketPrivate::ensureInitialized();
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QList<QSslCertificate> certs = QSslCertificate::fromPath(path, format, syntax);
+QT_WARNING_POP
if (certs.isEmpty())
return false;
@@ -2441,7 +2519,7 @@ void QSslSocketPrivate::createPlainSocket(QIODevice::OpenMode openMode)
q->setPeerName(QString());
plainSocket = new QTcpSocket(q);
-#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_BEARERMANAGEMENT // ### Qt6: Remove section
//copy network session down to the plain socket (if it has been set)
plainSocket->setProperty("_q_networksession", q->property("_q_networksession"));
#endif
@@ -2633,7 +2711,7 @@ void QSslSocketPrivate::_q_errorSlot(QAbstractSocket::SocketError error)
readBufferMaxSize = tmpReadBufferMaxSize;
}
- setErrorAndEmit(plainSocket->error(), plainSocket->errorString());
+ setErrorAndEmit(plainSocket->socketError(), plainSocket->errorString());
}
/*!
diff --git a/src/network/ssl/qsslsocket.h b/src/network/ssl/qsslsocket.h
index 35943c7d7e..298e7aa6c8 100644
--- a/src/network/ssl/qsslsocket.h
+++ b/src/network/ssl/qsslsocket.h
@@ -164,18 +164,22 @@ public:
#endif // QT_DEPRECATED_SINCE(5, 5)
// CA settings.
- bool addCaCertificates(const QString &path, QSsl::EncodingFormat format = QSsl::Pem,
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use QSslConfiguration::addCaCertificates()") bool addCaCertificates(const QString &path, QSsl::EncodingFormat format = QSsl::Pem,
QRegExp::PatternSyntax syntax = QRegExp::FixedString);
- void addCaCertificate(const QSslCertificate &certificate);
- void addCaCertificates(const QList<QSslCertificate> &certificates);
+ QT_DEPRECATED_X("Use QSslConfiguration::addCaCertificate()") void addCaCertificate(const QSslCertificate &certificate);
+ QT_DEPRECATED_X("Use QSslConfiguration::addCaCertificates()") void addCaCertificates(const QList<QSslCertificate> &certificates);
+#endif // QT_DEPRECATED_SINCE(5, 15)
#if QT_DEPRECATED_SINCE(5, 5)
QT_DEPRECATED_X("Use QSslConfiguration::setCaCertificates()") void setCaCertificates(const QList<QSslCertificate> &certificates);
QT_DEPRECATED_X("Use QSslConfiguration::caCertificates()") QList<QSslCertificate> caCertificates() const;
#endif // QT_DEPRECATED_SINCE(5, 5)
- static bool addDefaultCaCertificates(const QString &path, QSsl::EncodingFormat format = QSsl::Pem,
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED static bool addDefaultCaCertificates(const QString &path, QSsl::EncodingFormat format = QSsl::Pem,
QRegExp::PatternSyntax syntax = QRegExp::FixedString);
- static void addDefaultCaCertificate(const QSslCertificate &certificate);
- static void addDefaultCaCertificates(const QList<QSslCertificate> &certificates);
+ QT_DEPRECATED static void addDefaultCaCertificate(const QSslCertificate &certificate);
+ QT_DEPRECATED static void addDefaultCaCertificates(const QList<QSslCertificate> &certificates);
+#endif // QT_DEPRECATED_SINCE(5, 15)
#if QT_DEPRECATED_SINCE(5, 5)
QT_DEPRECATED static void setDefaultCaCertificates(const QList<QSslCertificate> &certificates);
QT_DEPRECATED static QList<QSslCertificate> defaultCaCertificates();
@@ -188,7 +192,10 @@ public:
bool waitForBytesWritten(int msecs = 30000) override;
bool waitForDisconnected(int msecs = 30000) override;
- QList<QSslError> sslErrors() const;
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use sslHandshakeErrors()") QList<QSslError> sslErrors() const;
+#endif // QT_DEPRECATED_SINCE(5, 15)
+ QList<QSslError> sslHandshakeErrors() const;
static bool supportsSsl();
static long sslLibraryVersionNumber();
@@ -210,6 +217,7 @@ Q_SIGNALS:
void modeChanged(QSslSocket::SslMode newMode);
void encryptedBytesWritten(qint64 totalBytes);
void preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator);
+ void newSessionTicketReceived();
protected:
qint64 readData(char *data, qint64 maxlen) override;
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 51510f1c60..4be27affca 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -66,15 +66,12 @@
#include "qsslpresharedkeyauthenticator.h"
#include "qsslpresharedkeyauthenticator_p.h"
#include "qocspresponse_p.h"
+#include "qsslkey.h"
#ifdef Q_OS_WIN
#include "qwindowscarootfetcher_p.h"
#endif
-#if !QT_CONFIG(opensslv11)
-#include <openssl/x509_vfy.h>
-#endif
-
#include <QtCore/qdatetime.h>
#include <QtCore/qdebug.h>
#include <QtCore/qdir.h>
@@ -87,6 +84,8 @@
#include <QtCore/qurl.h>
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qscopedvaluerollback.h>
+#include <QtCore/qlibrary.h>
+#include <QtCore/qoperatingsystemversion.h>
#if QT_CONFIG(ocsp)
#include "qocsp_p.h"
@@ -99,13 +98,12 @@
QT_BEGIN_NAMESPACE
+Q_GLOBAL_STATIC(QRecursiveMutex, qt_opensslInitMutex)
+
bool QSslSocketPrivate::s_libraryLoaded = false;
bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
bool QSslSocketPrivate::s_loadRootCertsOnDemand = false;
-
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
int QSslSocketBackendPrivate::s_indexForSSLExtraData = -1;
-#endif
QString QSslSocketBackendPrivate::getErrorsFromOpenSsl()
{
@@ -123,7 +121,7 @@ QString QSslSocketBackendPrivate::getErrorsFromOpenSsl()
extern "C" {
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
+#ifndef OPENSSL_NO_PSK
static unsigned int q_ssl_psk_client_callback(SSL *ssl,
const char *hint,
char *identity, unsigned int max_identity_len,
@@ -144,7 +142,6 @@ static unsigned int q_ssl_psk_server_callback(SSL *ssl,
}
#ifdef TLS1_3_VERSION
-#ifndef OPENSSL_NO_PSK
static unsigned int q_ssl_psk_restore_client(SSL *ssl,
const char *hint,
char *identity, unsigned int max_identity_len,
@@ -165,7 +162,6 @@ static unsigned int q_ssl_psk_restore_client(SSL *ssl,
return 0;
}
-#endif // !OPENSSL_NO_PSK
static int q_ssl_psk_use_session_callback(SSL *ssl, const EVP_MD *md, const unsigned char **id,
size_t *idlen, SSL_SESSION **sess)
@@ -176,7 +172,6 @@ static int q_ssl_psk_use_session_callback(SSL *ssl, const EVP_MD *md, const unsi
Q_UNUSED(idlen);
Q_UNUSED(sess);
-#ifndef OPENSSL_NO_PSK
#ifdef QT_DEBUG
QSslSocketBackendPrivate *d = reinterpret_cast<QSslSocketBackendPrivate *>(q_SSL_get_ex_data(ssl, QSslSocketBackendPrivate::s_indexForSSLExtraData));
Q_ASSERT(d);
@@ -185,13 +180,28 @@ static int q_ssl_psk_use_session_callback(SSL *ssl, const EVP_MD *md, const unsi
// Temporarily rebind the psk because it will be called next. The function will restore it.
q_SSL_set_psk_client_callback(ssl, &q_ssl_psk_restore_client);
-#endif
return 1; // need to return 1 or else "the connection setup fails."
}
+
+int q_ssl_sess_set_new_cb(SSL *ssl, SSL_SESSION *session)
+{
+ if (!ssl) {
+ qCWarning(lcSsl, "Invalid SSL (nullptr)");
+ return 0;
+ }
+ if (!session) {
+ qCWarning(lcSsl, "Invalid SSL_SESSION (nullptr)");
+ return 0;
+ }
+
+ auto socketPrivate = static_cast<QSslSocketBackendPrivate *>(q_SSL_get_ex_data(ssl,
+ QSslSocketBackendPrivate::s_indexForSSLExtraData));
+ return socketPrivate->handleNewSessionTicket(ssl);
+}
#endif // TLS1_3_VERSION
-#endif
+#endif // !OPENSSL_NO_PSK
#if QT_CONFIG(ocsp)
@@ -408,13 +418,8 @@ int q_X509Callback(int ok, X509_STORE_CTX *ctx)
ErrorListPtr errors = nullptr;
// Error list is attached to either 'SSL' or 'X509_STORE'.
- if (X509_STORE *store = q_X509_STORE_CTX_get0_store(ctx)) { // We try store first:
-#if QT_CONFIG(opensslv11)
+ if (X509_STORE *store = q_X509_STORE_CTX_get0_store(ctx)) // We try store first:
errors = ErrorListPtr(q_X509_STORE_get_ex_data(store, 0));
-#else
- errors = ErrorListPtr(q_CRYPTO_get_ex_data(&store->ex_data, 0));
-#endif // opensslv11
- }
if (!errors) {
// Not found on store? Try SSL and its external data then. According to the OpenSSL's
@@ -477,17 +482,12 @@ long QSslSocketBackendPrivate::setupOpenSslOptions(QSsl::SslProtocol protocol, Q
options = SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3;
else if (protocol == QSsl::TlsV1_0OrLater)
options = SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3;
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
- // Choosing Tlsv1_1OrLater or TlsV1_2OrLater on OpenSSL < 1.0.1
- // will cause an error in QSslContext::fromConfiguration, meaning
- // we will never get here.
else if (protocol == QSsl::TlsV1_1OrLater)
options = SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1;
else if (protocol == QSsl::TlsV1_2OrLater)
options = SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1|SSL_OP_NO_TLSv1_1;
else if (protocol == QSsl::TlsV1_3OrLater)
options = SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1|SSL_OP_NO_TLSv1_1|SSL_OP_NO_TLSv1_2;
-#endif
else
options = SSL_OP_ALL;
@@ -591,15 +591,13 @@ bool QSslSocketBackendPrivate::initSslContext()
q_SSL_set_ex_data(ssl, s_indexForSSLExtraData, this);
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
+#ifndef OPENSSL_NO_PSK
// Set the client callback for PSK
- if (QSslSocket::sslLibraryVersionNumber() >= 0x10001000L) {
- if (mode == QSslSocket::SslClientMode)
- q_SSL_set_psk_client_callback(ssl, &q_ssl_psk_client_callback);
- else if (mode == QSslSocket::SslServerMode)
- q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
- }
-#endif
+ if (mode == QSslSocket::SslClientMode)
+ q_SSL_set_psk_client_callback(ssl, &q_ssl_psk_client_callback);
+ else if (mode == QSslSocket::SslServerMode)
+ q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
+
#if OPENSSL_VERSION_NUMBER >= 0x10101006L
// Set the client callback for TLSv1.3 PSK
if (mode == QSslSocket::SslClientMode
@@ -608,6 +606,9 @@ bool QSslSocketBackendPrivate::initSslContext()
}
#endif // openssl version >= 0x10101006L
+#endif // OPENSSL_NO_PSK
+
+
#if QT_CONFIG(ocsp)
if (configuration.ocspStaplingEnabled) {
if (mode == QSslSocket::SslServerMode) {
@@ -674,10 +675,43 @@ bool QSslSocketPrivate::supportsSsl()
/*!
\internal
+ Returns the version number of the SSL library in use. Note that
+ this is the version of the library in use at run-time, not compile
+ time.
+*/
+long QSslSocketPrivate::sslLibraryVersionNumber()
+{
+ if (!supportsSsl())
+ return 0;
+
+ return q_OpenSSL_version_num();
+}
+
+/*!
+ \internal
+
+ Returns the version string of the SSL library in use. Note that
+ this is the version of the library in use at run-time, not compile
+ time. If no SSL support is available then this will return an empty value.
+*/
+QString QSslSocketPrivate::sslLibraryVersionString()
+{
+ if (!supportsSsl())
+ return QString();
+
+ const char *versionString = q_OpenSSL_version(OPENSSL_VERSION);
+ if (!versionString)
+ return QString();
+
+ return QString::fromLatin1(versionString);
+}
+
+/*!
+ \internal
+
Declared static in QSslSocketPrivate, makes sure the SSL libraries have
been initialized.
*/
-
void QSslSocketPrivate::ensureInitialized()
{
if (!supportsSsl())
@@ -686,11 +720,23 @@ void QSslSocketPrivate::ensureInitialized()
ensureCiphersAndCertsLoaded();
}
+/*!
+ \internal
+
+ Returns the version number of the SSL library in use at compile
+ time.
+*/
long QSslSocketPrivate::sslLibraryBuildVersionNumber()
{
return OPENSSL_VERSION_NUMBER;
}
+/*!
+ \internal
+
+ Returns the version string of the SSL library in use at compile
+ time.
+*/
QString QSslSocketPrivate::sslLibraryBuildVersionString()
{
// Using QStringLiteral to store the version string as unicode and
@@ -707,11 +753,7 @@ QString QSslSocketPrivate::sslLibraryBuildVersionString()
*/
void QSslSocketPrivate::resetDefaultCiphers()
{
-#if QT_CONFIG(opensslv11)
SSL_CTX *myCtx = q_SSL_CTX_new(q_TLS_client_method());
-#else
- SSL_CTX *myCtx = q_SSL_CTX_new(q_SSLv23_client_method());
-#endif
// Note, we assert, not just silently return/bail out early:
// this should never happen and problems with OpenSSL's initialization
// must be caught before this (see supportsSsl()).
@@ -967,7 +1009,7 @@ void QSslSocketBackendPrivate::transmit()
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());
+ setErrorAndEmit(plainSocket->socketError(), plainSocket->errorString());
return;
}
transmitting = true;
@@ -1366,6 +1408,60 @@ void QSslSocketBackendPrivate::storePeerCertificates()
}
}
+int QSslSocketBackendPrivate::handleNewSessionTicket(SSL *connection)
+{
+ // If we return 1, this means we own the session, but we don't.
+ // 0 would tell OpenSSL to deref (but they still have it in the
+ // internal cache).
+ Q_Q(QSslSocket);
+
+ Q_ASSERT(connection);
+
+ if (q->sslConfiguration().testSslOption(QSsl::SslOptionDisableSessionPersistence)) {
+ // We silently ignore, do nothing, remove from cache.
+ return 0;
+ }
+
+ SSL_SESSION *currentSession = q_SSL_get_session(connection);
+ if (!currentSession) {
+ qCWarning(lcSsl,
+ "New session ticket callback, the session is invalid (nullptr)");
+ return 0;
+ }
+
+ if (q_SSL_version(connection) < 0x304) {
+ // We only rely on this mechanics with TLS >= 1.3
+ return 0;
+ }
+
+#ifdef TLS1_3_VERSION
+ if (!q_SSL_SESSION_is_resumable(currentSession)) {
+ qCDebug(lcSsl, "New session ticket, but the session is non-resumable");
+ return 0;
+ }
+#endif // TLS1_3_VERSION
+
+ const int sessionSize = q_i2d_SSL_SESSION(currentSession, nullptr);
+ if (sessionSize <= 0) {
+ qCWarning(lcSsl, "could not store persistent version of SSL session");
+ return 0;
+ }
+
+ // We have somewhat perverse naming, it's not a ticket, it's a session.
+ QByteArray sessionTicket(sessionSize, 0);
+ auto data = reinterpret_cast<unsigned char *>(sessionTicket.data());
+ if (!q_i2d_SSL_SESSION(currentSession, &data)) {
+ qCWarning(lcSsl, "could not store persistent version of SSL session");
+ return 0;
+ }
+
+ configuration.sslSession = sessionTicket;
+ configuration.sslSessionTicketLifeTimeHint = int(q_SSL_SESSION_get_ticket_lifetime_hint(currentSession));
+
+ emit q->newSessionTicketReceived();
+ return 0;
+}
+
bool QSslSocketBackendPrivate::checkSslErrors()
{
Q_Q(QSslSocket);
@@ -1738,6 +1834,174 @@ QSsl::SslProtocol QSslSocketBackendPrivate::sessionProtocol() const
return QSsl::UnknownProtocol;
}
+
+void QSslSocketBackendPrivate::continueHandshake()
+{
+ Q_Q(QSslSocket);
+ // if we have a max read buffer size, reset the plain socket's to match
+ if (readBufferMaxSize)
+ plainSocket->setReadBufferSize(readBufferMaxSize);
+
+ if (q_SSL_session_reused(ssl))
+ configuration.peerSessionShared = true;
+
+#ifdef QT_DECRYPT_SSL_TRAFFIC
+ if (q_SSL_get_session(ssl)) {
+ size_t master_key_len = q_SSL_SESSION_get_master_key(q_SSL_get_session(ssl), 0, 0);
+ size_t client_random_len = q_SSL_get_client_random(ssl, 0, 0);
+ QByteArray masterKey(int(master_key_len), 0); // Will not overflow
+ QByteArray clientRandom(int(client_random_len), 0); // Will not overflow
+
+ q_SSL_SESSION_get_master_key(q_SSL_get_session(ssl),
+ reinterpret_cast<unsigned char*>(masterKey.data()),
+ masterKey.size());
+ q_SSL_get_client_random(ssl, reinterpret_cast<unsigned char *>(clientRandom.data()),
+ clientRandom.size());
+
+ QByteArray debugLineClientRandom("CLIENT_RANDOM ");
+ debugLineClientRandom.append(clientRandom.toHex().toUpper());
+ debugLineClientRandom.append(" ");
+ debugLineClientRandom.append(masterKey.toHex().toUpper());
+ debugLineClientRandom.append("\n");
+
+ QString sslKeyFile = QDir::tempPath() + QLatin1String("/qt-ssl-keys");
+ QFile file(sslKeyFile);
+ if (!file.open(QIODevice::Append))
+ qCWarning(lcSsl) << "could not open file" << sslKeyFile << "for appending";
+ if (!file.write(debugLineClientRandom))
+ qCWarning(lcSsl) << "could not write to file" << sslKeyFile;
+ file.close();
+ } else {
+ qCWarning(lcSsl, "could not decrypt SSL traffic");
+ }
+#endif
+
+ // Cache this SSL session inside the QSslContext
+ if (!(configuration.sslOptions & QSsl::SslOptionDisableSessionSharing)) {
+ if (!sslContextPointer->cacheSession(ssl)) {
+ sslContextPointer.clear(); // we could not cache the session
+ } else {
+ // Cache the session for permanent usage as well
+ if (!(configuration.sslOptions & QSsl::SslOptionDisableSessionPersistence)) {
+ if (!sslContextPointer->sessionASN1().isEmpty())
+ configuration.sslSession = sslContextPointer->sessionASN1();
+ configuration.sslSessionTicketLifeTimeHint = sslContextPointer->sessionTicketLifeTimeHint();
+ }
+ }
+ }
+
+#if !defined(OPENSSL_NO_NEXTPROTONEG)
+
+ configuration.nextProtocolNegotiationStatus = sslContextPointer->npnContext().status;
+ if (sslContextPointer->npnContext().status == QSslConfiguration::NextProtocolNegotiationUnsupported) {
+ // we could not agree -> be conservative and use HTTP/1.1
+ configuration.nextNegotiatedProtocol = QByteArrayLiteral("http/1.1");
+ } else {
+ const unsigned char *proto = nullptr;
+ unsigned int proto_len = 0;
+
+ q_SSL_get0_alpn_selected(ssl, &proto, &proto_len);
+ if (proto_len && mode == QSslSocket::SslClientMode) {
+ // Client does not have a callback that sets it ...
+ configuration.nextProtocolNegotiationStatus = QSslConfiguration::NextProtocolNegotiationNegotiated;
+ }
+
+ if (!proto_len) { // Test if NPN was more lucky ...
+ q_SSL_get0_next_proto_negotiated(ssl, &proto, &proto_len);
+ }
+
+ if (proto_len)
+ configuration.nextNegotiatedProtocol = QByteArray(reinterpret_cast<const char *>(proto), proto_len);
+ else
+ configuration.nextNegotiatedProtocol.clear();
+ }
+#endif // !defined(OPENSSL_NO_NEXTPROTONEG)
+
+ if (mode == QSslSocket::SslClientMode) {
+ EVP_PKEY *key;
+ if (q_SSL_get_server_tmp_key(ssl, &key))
+ configuration.ephemeralServerKey = QSslKey(key, QSsl::PublicKey);
+ }
+
+ connectionEncrypted = true;
+ emit q->encrypted();
+ if (autoStartHandshake && pendingClose) {
+ pendingClose = false;
+ q->disconnectFromHost();
+ }
+}
+
+bool QSslSocketPrivate::ensureLibraryLoaded()
+{
+ if (!q_resolveOpenSslSymbols())
+ return false;
+
+ const QMutexLocker locker(qt_opensslInitMutex);
+
+ if (!s_libraryLoaded) {
+ // Initialize OpenSSL.
+ if (q_OPENSSL_init_ssl(0, nullptr) != 1)
+ return false;
+ q_SSL_load_error_strings();
+ q_OpenSSL_add_all_algorithms();
+
+ QSslSocketBackendPrivate::s_indexForSSLExtraData
+ = q_CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, 0L, nullptr, nullptr,
+ nullptr, nullptr);
+
+ // Initialize OpenSSL's random seed.
+ if (!q_RAND_status()) {
+ qWarning("Random number generator not seeded, disabling SSL support");
+ return false;
+ }
+
+ s_libraryLoaded = true;
+ }
+ return true;
+}
+
+void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
+{
+ const QMutexLocker locker(qt_opensslInitMutex);
+
+ if (s_loadedCiphersAndCerts)
+ return;
+ s_loadedCiphersAndCerts = true;
+
+ resetDefaultCiphers();
+ resetDefaultEllipticCurves();
+
+#if QT_CONFIG(library)
+ //load symbols needed to receive certificates from system store
+#if defined(Q_OS_QNX)
+ s_loadRootCertsOnDemand = true;
+#elif defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
+ // check whether we can enable on-demand root-cert loading (i.e. check whether the sym links are there)
+ QList<QByteArray> dirs = unixRootCertDirectories();
+ QStringList symLinkFilter;
+ symLinkFilter << QLatin1String("[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].[0-9]");
+ for (int a = 0; a < dirs.count(); ++a) {
+ QDirIterator iterator(QLatin1String(dirs.at(a)), symLinkFilter, QDir::Files);
+ if (iterator.hasNext()) {
+ s_loadRootCertsOnDemand = true;
+ break;
+ }
+ }
+#endif
+#endif // QT_CONFIG(library)
+ // if on-demand loading was not enabled, load the certs now
+ if (!s_loadRootCertsOnDemand)
+ setDefaultCaCertificates(systemCaCertificates());
+#ifdef Q_OS_WIN
+ //Enabled for fetching additional root certs from windows update on windows.
+ //This flag is set false by setDefaultCaCertificates() indicating the app uses
+ //its own cert bundle rather than the system one.
+ //Same logic that disables the unix on demand cert loading.
+ //Unlike unix, we do preload the certificates from the cert store.
+ s_loadRootCertsOnDemand = true;
+#endif
+}
+
QList<QSslCertificate> QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates(STACK_OF(X509) *x509)
{
ensureInitialized();
@@ -1790,19 +2054,11 @@ QList<QSslError> QSslSocketBackendPrivate::verify(const QList<QSslCertificate> &
}
QVector<QSslErrorEntry> lastErrors;
-#if QT_CONFIG(opensslv11)
if (!q_X509_STORE_set_ex_data(certStore, 0, &lastErrors)) {
qCWarning(lcSsl) << "Unable to attach external data (error list) to a store";
errors << QSslError(QSslError::UnspecifiedError);
return errors;
}
-#else
- if (!q_CRYPTO_set_ex_data(&certStore->ex_data, 0, &lastErrors)) {
- qCWarning(lcSsl) << "Unable to attach external data (error list) to a store";
- errors << QSslError(QSslError::UnspecifiedError);
- return errors;
- }
-#endif // opensslv11
// Register a custom callback to get all verification errors.
q_X509_STORE_set_verify_cb(certStore, q_X509Callback);
diff --git a/src/network/ssl/qsslsocket_openssl11.cpp b/src/network/ssl/qsslsocket_openssl11.cpp
deleted file mode 100644
index 1d935c5217..0000000000
--- a/src/network/ssl/qsslsocket_openssl11.cpp
+++ /dev/null
@@ -1,271 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Copyright (C) 2014 Governikus GmbH & Co. KG
-** Copyright (C) 2016 Richard J. Moore <rich@kde.org>
-** 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$
-**
-****************************************************************************/
-
-/****************************************************************************
-**
-** In addition, as a special exception, the copyright holders listed above give
-** permission to link the code of its release of Qt with the OpenSSL project's
-** "OpenSSL" library (or modified versions of the "OpenSSL" library that use the
-** same license as the original version), and distribute the linked executables.
-**
-** You must comply with the GNU General Public License version 2 in all
-** respects for all of the code used other than the "OpenSSL" code. If you
-** modify this file, you may extend this exception to your version of the file,
-** but you are not obligated to do so. If you do not wish to do so, delete
-** this exception statement from your version of this file.
-**
-****************************************************************************/
-
-//#define QT_DECRYPT_SSL_TRAFFIC
-
-#include "qssl_p.h"
-#include "qsslsocket_openssl_p.h"
-#include "qsslsocket_openssl_symbols_p.h"
-#include "qsslsocket.h"
-#include "qsslkey.h"
-
-#include <QtCore/qdebug.h>
-#include <QtCore/qdir.h>
-#include <QtCore/qdiriterator.h>
-#include <QtCore/qfile.h>
-#include <QtCore/qmutex.h>
-#include <QtCore/qlibrary.h>
-#include <QtCore/qoperatingsystemversion.h>
-
-QT_BEGIN_NAMESPACE
-
-Q_GLOBAL_STATIC(QRecursiveMutex, qt_opensslInitMutex)
-
-void QSslSocketPrivate::deinitialize()
-{
- // This function exists only for compatibility with the pre-11 code,
- // where deinitialize() actually does some cleanup. To be discarded
- // once we retire < 1.1.
-}
-
-bool QSslSocketPrivate::ensureLibraryLoaded()
-{
- if (!q_resolveOpenSslSymbols())
- return false;
-
- const QMutexLocker locker(qt_opensslInitMutex);
-
- if (!s_libraryLoaded) {
- // Initialize OpenSSL.
- if (q_OPENSSL_init_ssl(0, nullptr) != 1)
- return false;
- q_SSL_load_error_strings();
- q_OpenSSL_add_all_algorithms();
-
- QSslSocketBackendPrivate::s_indexForSSLExtraData
- = q_CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, 0L, nullptr, nullptr,
- nullptr, nullptr);
-
- // Initialize OpenSSL's random seed.
- if (!q_RAND_status()) {
- qWarning("Random number generator not seeded, disabling SSL support");
- return false;
- }
-
- s_libraryLoaded = true;
- }
- return true;
-}
-
-void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
-{
- const QMutexLocker locker(qt_opensslInitMutex);
-
- if (s_loadedCiphersAndCerts)
- return;
- s_loadedCiphersAndCerts = true;
-
- resetDefaultCiphers();
- resetDefaultEllipticCurves();
-
-#if QT_CONFIG(library)
- //load symbols needed to receive certificates from system store
-#if defined(Q_OS_QNX)
- s_loadRootCertsOnDemand = true;
-#elif defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
- // check whether we can enable on-demand root-cert loading (i.e. check whether the sym links are there)
- QList<QByteArray> dirs = unixRootCertDirectories();
- QStringList symLinkFilter;
- symLinkFilter << QLatin1String("[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].[0-9]");
- for (int a = 0; a < dirs.count(); ++a) {
- QDirIterator iterator(QLatin1String(dirs.at(a)), symLinkFilter, QDir::Files);
- if (iterator.hasNext()) {
- s_loadRootCertsOnDemand = true;
- break;
- }
- }
-#endif
-#endif // QT_CONFIG(library)
- // if on-demand loading was not enabled, load the certs now
- if (!s_loadRootCertsOnDemand)
- setDefaultCaCertificates(systemCaCertificates());
-#ifdef Q_OS_WIN
- //Enabled for fetching additional root certs from windows update on windows.
- //This flag is set false by setDefaultCaCertificates() indicating the app uses
- //its own cert bundle rather than the system one.
- //Same logic that disables the unix on demand cert loading.
- //Unlike unix, we do preload the certificates from the cert store.
- s_loadRootCertsOnDemand = true;
-#endif
-}
-
-long QSslSocketPrivate::sslLibraryVersionNumber()
-{
- if (!supportsSsl())
- return 0;
-
- return q_OpenSSL_version_num();
-}
-
-QString QSslSocketPrivate::sslLibraryVersionString()
-{
- if (!supportsSsl())
- return QString();
-
- const char *versionString = q_OpenSSL_version(OPENSSL_VERSION);
- if (!versionString)
- return QString();
-
- return QString::fromLatin1(versionString);
-}
-
-void QSslSocketBackendPrivate::continueHandshake()
-{
- Q_Q(QSslSocket);
- // if we have a max read buffer size, reset the plain socket's to match
- if (readBufferMaxSize)
- plainSocket->setReadBufferSize(readBufferMaxSize);
-
- if (q_SSL_session_reused(ssl))
- configuration.peerSessionShared = true;
-
-#ifdef QT_DECRYPT_SSL_TRAFFIC
- if (q_SSL_get_session(ssl)) {
- size_t master_key_len = q_SSL_SESSION_get_master_key(q_SSL_get_session(ssl), 0, 0);
- size_t client_random_len = q_SSL_get_client_random(ssl, 0, 0);
- QByteArray masterKey(int(master_key_len), 0); // Will not overflow
- QByteArray clientRandom(int(client_random_len), 0); // Will not overflow
-
- q_SSL_SESSION_get_master_key(q_SSL_get_session(ssl),
- reinterpret_cast<unsigned char*>(masterKey.data()),
- masterKey.size());
- q_SSL_get_client_random(ssl, reinterpret_cast<unsigned char *>(clientRandom.data()),
- clientRandom.size());
-
- QByteArray debugLineClientRandom("CLIENT_RANDOM ");
- debugLineClientRandom.append(clientRandom.toHex().toUpper());
- debugLineClientRandom.append(" ");
- debugLineClientRandom.append(masterKey.toHex().toUpper());
- debugLineClientRandom.append("\n");
-
- QString sslKeyFile = QDir::tempPath() + QLatin1String("/qt-ssl-keys");
- QFile file(sslKeyFile);
- if (!file.open(QIODevice::Append))
- qCWarning(lcSsl) << "could not open file" << sslKeyFile << "for appending";
- if (!file.write(debugLineClientRandom))
- qCWarning(lcSsl) << "could not write to file" << sslKeyFile;
- file.close();
- } else {
- qCWarning(lcSsl, "could not decrypt SSL traffic");
- }
-#endif
-
- // Cache this SSL session inside the QSslContext
- if (!(configuration.sslOptions & QSsl::SslOptionDisableSessionSharing)) {
- if (!sslContextPointer->cacheSession(ssl)) {
- sslContextPointer.clear(); // we could not cache the session
- } else {
- // Cache the session for permanent usage as well
- if (!(configuration.sslOptions & QSsl::SslOptionDisableSessionPersistence)) {
- if (!sslContextPointer->sessionASN1().isEmpty())
- configuration.sslSession = sslContextPointer->sessionASN1();
- configuration.sslSessionTicketLifeTimeHint = sslContextPointer->sessionTicketLifeTimeHint();
- }
- }
- }
-
-#if !defined(OPENSSL_NO_NEXTPROTONEG)
-
- configuration.nextProtocolNegotiationStatus = sslContextPointer->npnContext().status;
- if (sslContextPointer->npnContext().status == QSslConfiguration::NextProtocolNegotiationUnsupported) {
- // we could not agree -> be conservative and use HTTP/1.1
- configuration.nextNegotiatedProtocol = QByteArrayLiteral("http/1.1");
- } else {
- const unsigned char *proto = nullptr;
- unsigned int proto_len = 0;
-
- q_SSL_get0_alpn_selected(ssl, &proto, &proto_len);
- if (proto_len && mode == QSslSocket::SslClientMode) {
- // Client does not have a callback that sets it ...
- configuration.nextProtocolNegotiationStatus = QSslConfiguration::NextProtocolNegotiationNegotiated;
- }
-
- if (!proto_len) { // Test if NPN was more lucky ...
- q_SSL_get0_next_proto_negotiated(ssl, &proto, &proto_len);
- }
-
- if (proto_len)
- configuration.nextNegotiatedProtocol = QByteArray(reinterpret_cast<const char *>(proto), proto_len);
- else
- configuration.nextNegotiatedProtocol.clear();
- }
-#endif // !defined(OPENSSL_NO_NEXTPROTONEG)
-
- if (mode == QSslSocket::SslClientMode) {
- EVP_PKEY *key;
- if (q_SSL_get_server_tmp_key(ssl, &key))
- configuration.ephemeralServerKey = QSslKey(key, QSsl::PublicKey);
- }
-
- connectionEncrypted = true;
- emit q->encrypted();
- if (autoStartHandshake && pendingClose) {
- pendingClose = false;
- q->disconnectFromHost();
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_openssl11_symbols_p.h b/src/network/ssl/qsslsocket_openssl11_symbols_p.h
deleted file mode 100644
index 0fe0899d4f..0000000000
--- a/src/network/ssl/qsslsocket_openssl11_symbols_p.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
-** Copyright (C) 2016 Richard J. Moore <rich@kde.org>
-** 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$
-**
-****************************************************************************/
-
-/****************************************************************************
-**
-** In addition, as a special exception, the copyright holders listed above give
-** permission to link the code of its release of Qt with the OpenSSL project's
-** "OpenSSL" library (or modified versions of the "OpenSSL" library that use the
-** same license as the original version), and distribute the linked executables.
-**
-** You must comply with the GNU General Public License version 2 in all
-** respects for all of the code used other than the "OpenSSL" code. If you
-** modify this file, you may extend this exception to your version of the file,
-** but you are not obligated to do so. If you do not wish to do so, delete
-** this exception statement from your version of this file.
-**
-****************************************************************************/
-
-#ifndef QSSLSOCKET_OPENSSL11_SYMBOLS_P_H
-#define QSSLSOCKET_OPENSSL11_SYMBOLS_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.
-//
-
-// Note: this file does not have QT_BEGIN_NAMESPACE/QT_END_NAMESPACE, it's done
-// in qsslsocket_openssl_symbols_p.h.
-
-#ifndef QSSLSOCKET_OPENSSL_SYMBOLS_P_H
-#error "You are not supposed to use this header file, include qsslsocket_openssl_symbols_p.h instead"
-#endif
-
-const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
-
-Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
-Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
-
-int q_DSA_bits(DSA *a);
-int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
-Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
-int q_EVP_PKEY_base_id(EVP_PKEY *a);
-int q_RSA_bits(RSA *a);
-Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
-Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
-Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null();
-Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
-Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
-Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
-int q_SSL_session_reused(SSL *a);
-unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
-int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
-size_t q_SSL_get_client_random(SSL *a, unsigned char *out, size_t outlen);
-size_t q_SSL_SESSION_get_master_key(const SSL_SESSION *session, unsigned char *out, size_t outlen);
-int q_CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-const SSL_METHOD *q_TLS_method();
-const SSL_METHOD *q_TLS_client_method();
-const SSL_METHOD *q_TLS_server_method();
-ASN1_TIME *q_X509_getm_notBefore(X509 *a);
-ASN1_TIME *q_X509_getm_notAfter(X509 *a);
-
-Q_AUTOTEST_EXPORT void q_X509_up_ref(X509 *a);
-long q_X509_get_version(X509 *a);
-EVP_PKEY *q_X509_get_pubkey(X509 *a);
-void q_X509_STORE_set_verify_cb(X509_STORE *ctx, X509_STORE_CTX_verify_cb verify_cb);
-int q_X509_STORE_set_ex_data(X509_STORE *ctx, int idx, void *data);
-void *q_X509_STORE_get_ex_data(X509_STORE *r, int idx);
-STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx);
-void q_DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
-int q_DH_bits(DH *dh);
-
-# define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
- | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
-
-#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
-#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
-
-#define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
- | OPENSSL_INIT_ADD_ALL_DIGESTS \
- | OPENSSL_INIT_LOAD_CONFIG, NULL)
-#define q_OPENSSL_add_all_algorithms_noconf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
- | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
-
-int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
-void q_CRYPTO_free(void *str, const char *file, int line);
-
-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);
-
-#ifdef TLS1_3_VERSION
-int q_SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str);
-#endif
-
-#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);
-
-#if QT_CONFIG(ocsp)
-const OCSP_CERTID *q_OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x);
-#endif // ocsp
-
-#define q_SSL_CTX_set_min_proto_version(ctx, version) \
- q_SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, nullptr)
-
-#define q_SSL_CTX_set_max_proto_version(ctx, version) \
- q_SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, nullptr)
-
-extern "C" {
-typedef int (*q_SSL_psk_use_session_cb_func_t)(SSL *, const EVP_MD *, const unsigned char **, size_t *,
- SSL_SESSION **);
-}
-void q_SSL_set_psk_use_session_callback(SSL *s, q_SSL_psk_use_session_cb_func_t);
-
-#endif
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index c23234e291..47ccf06e71 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -130,9 +130,7 @@ public:
BIO *writeBio;
SSL_SESSION *session;
QVector<QSslErrorEntry> errorList;
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
static int s_indexForSSLExtraData; // index used in SSL_get_ex_data to get the matching QSslSocketBackendPrivate
-#endif
bool inSetAndEmitError = false;
@@ -148,6 +146,7 @@ public:
void continueHandshake() override;
bool checkSslErrors();
void storePeerCertificates();
+ int handleNewSessionTicket(SSL *context);
unsigned int tlsPskClientCallback(const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len);
unsigned int tlsPskServerCallback(const char *identity, unsigned char *psk, unsigned int max_psk_len);
#ifdef Q_OS_WIN
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index 26336edd3d..71a268ae6e 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -137,10 +137,6 @@ void qsslSocketCannotResolveSymbolWarning(const char *functionName)
#endif // QT_LINKED_OPENSSL
-#if QT_CONFIG(opensslv11)
-
-// Below are the functions first introduced in version 1.1:
-
DEFINEFUNC(const unsigned char *, ASN1_STRING_get0_data, const ASN1_STRING *a, a, return nullptr, return)
DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return 0, return)
DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return 0, return)
@@ -163,6 +159,8 @@ DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long
#ifdef TLS1_3_VERSION
DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
+DEFINEFUNC2(void, SSL_CTX_sess_set_new_cb, SSL_CTX *ctx, ctx, NewSessionCallback cb, cb, return, return)
+DEFINEFUNC(int, SSL_SESSION_is_resumable, const SSL_SESSION *s, s, return 0, return)
#endif
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)
@@ -237,93 +235,6 @@ 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:
-
-DEFINEFUNC(unsigned char *, ASN1_STRING_data, ASN1_STRING *a, a, return nullptr, return)
-
-#ifdef SSLEAY_MACROS
-DEFINEFUNC3(void *, ASN1_dup, i2d_of_void *a, a, d2i_of_void *b, b, char *c, c, return nullptr, return)
-#endif
-DEFINEFUNC2(BIO *, BIO_new_file, const char *filename, filename, const char *mode, mode, return nullptr, return)
-DEFINEFUNC(void, ERR_clear_error, DUMMYARG, DUMMYARG, return, DUMMYARG)
-DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return nullptr, return)
-DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return)
-DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
-DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
-DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
-DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
-DEFINEFUNC3(int, CRYPTO_set_ex_data, CRYPTO_EX_DATA *ad, ad, int idx, idx, void *val, val, return 0, return)
-DEFINEFUNC2(void *, CRYPTO_get_ex_data, const CRYPTO_EX_DATA *ad, ad, int idx, idx, return nullptr, return)
-DEFINEFUNC(unsigned long, ERR_peek_last_error, DUMMYARG, DUMMYARG, return 0, return)
-DEFINEFUNC(void, ERR_free_strings, void, DUMMYARG, return, DUMMYARG)
-DEFINEFUNC(void, EVP_CIPHER_CTX_cleanup, EVP_CIPHER_CTX *a, a, return, DUMMYARG)
-DEFINEFUNC(void, EVP_CIPHER_CTX_init, EVP_CIPHER_CTX *a, a, return, DUMMYARG)
-
-#ifdef SSLEAY_MACROS
-DEFINEFUNC6(void *, PEM_ASN1_read_bio, d2i_of_void *a, a, const char *b, b, BIO *c, c, void **d, d, pem_password_cb *e, e, void *f, f, return nullptr, return)
-DEFINEFUNC6(void *, PEM_ASN1_write_bio, d2i_of_void *a, a, const char *b, b, BIO *c, c, void **d, d, pem_password_cb *e, e, void *f, f, return nullptr, return)
-#endif // SSLEAY_MACROS
-
-DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
-DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
-
-DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
-DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
-DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
-DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
-
-DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return)
-DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG)
-
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
-DEFINEFUNC5(int, SSL_get_ex_new_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)
-#endif // OPENSSL_VERSION_NUMBER >= 0x10001000L
-
-DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
-DEFINEFUNC(const SSL_METHOD *, TLSv1_1_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-DEFINEFUNC(const SSL_METHOD *, TLSv1_2_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
-DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
-DEFINEFUNC(const SSL_METHOD *, TLSv1_1_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-DEFINEFUNC(const SSL_METHOD *, TLSv1_2_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
-
-DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get_chain, X509_STORE_CTX *a, a, return nullptr, return)
-
-#ifdef SSLEAY_MACROS
-DEFINEFUNC2(int, i2d_DSAPrivateKey, const DSA *a, a, unsigned char **b, b, return -1, return)
-DEFINEFUNC2(int, i2d_RSAPrivateKey, const RSA *a, a, unsigned char **b, b, return -1, return)
-#ifndef OPENSSL_NO_EC
-DEFINEFUNC2(int, i2d_ECPrivateKey, const EC_KEY *a, a, unsigned char **b, b, return -1, return)
-#endif
-DEFINEFUNC3(RSA *, d2i_RSAPrivateKey, RSA **a, a, unsigned char **b, b, long c, c, return nullptr, return)
-DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsigned char **b, b, long c, c, return nullptr, return)
-#ifndef OPENSSL_NO_EC
-DEFINEFUNC3(EC_KEY *, d2i_ECPrivateKey, EC_KEY **a, a, unsigned char **b, b, long c, c, return nullptr, 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 nullptr, return)
-DEFINEFUNC(void, OPENSSL_add_all_algorithms_noconf, void, DUMMYARG, return, DUMMYARG)
-DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG)
-DEFINEFUNC(long, SSLeay, void, DUMMYARG, return 0, return)
-DEFINEFUNC(const char *, SSLeay_version, int a, a, return nullptr, return)
-
-#endif // QT_CONFIG(opensslv11)
-
DEFINEFUNC(long, ASN1_INTEGER_get, ASN1_INTEGER *a, a, return 0, return)
DEFINEFUNC2(int, ASN1_INTEGER_cmp, const ASN1_INTEGER *a, a, const ASN1_INTEGER *b, b, return 1, return)
DEFINEFUNC(int, ASN1_STRING_length, ASN1_STRING *a, a, return 0, return)
@@ -392,36 +303,28 @@ DEFINEFUNC(int, OBJ_sn2nid, const char *s, s, return 0, return)
DEFINEFUNC(int, OBJ_ln2nid, const char *s, s, return 0, return)
DEFINEFUNC3(int, i2t_ASN1_OBJECT, char *a, a, int b, b, ASN1_OBJECT *c, c, return -1, return)
DEFINEFUNC4(int, OBJ_obj2txt, char *a, a, int b, b, ASN1_OBJECT *c, c, int d, d, return -1, return)
-
DEFINEFUNC(int, OBJ_obj2nid, const ASN1_OBJECT *a, a, return NID_undef, return)
-
-#ifndef SSLEAY_MACROS
DEFINEFUNC4(EVP_PKEY *, PEM_read_bio_PrivateKey, BIO *a, a, EVP_PKEY **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
DEFINEFUNC4(DSA *, PEM_read_bio_DSAPrivateKey, BIO *a, a, DSA **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
DEFINEFUNC4(RSA *, PEM_read_bio_RSAPrivateKey, BIO *a, a, RSA **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
+
#ifndef OPENSSL_NO_EC
DEFINEFUNC4(EC_KEY *, PEM_read_bio_ECPrivateKey, BIO *a, a, EC_KEY **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
-#endif
+DEFINEFUNC7(int, PEM_write_bio_ECPrivateKey, BIO *a, a, EC_KEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
+DEFINEFUNC4(EC_KEY *, PEM_read_bio_EC_PUBKEY, BIO *a, a, EC_KEY **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
+DEFINEFUNC2(int, PEM_write_bio_EC_PUBKEY, BIO *a, a, EC_KEY *b, b, return 0, return)
+#endif // OPENSSL_NO_EC
+
DEFINEFUNC4(DH *, PEM_read_bio_DHparams, BIO *a, a, DH **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
DEFINEFUNC7(int, PEM_write_bio_DSAPrivateKey, BIO *a, a, DSA *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
DEFINEFUNC7(int, PEM_write_bio_RSAPrivateKey, BIO *a, a, RSA *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
DEFINEFUNC7(int, PEM_write_bio_PrivateKey, BIO *a, a, EVP_PKEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
-#ifndef OPENSSL_NO_EC
-DEFINEFUNC7(int, PEM_write_bio_ECPrivateKey, BIO *a, a, EC_KEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
-#endif
-#endif // !SSLEAY_MACROS
DEFINEFUNC4(EVP_PKEY *, PEM_read_bio_PUBKEY, BIO *a, a, EVP_PKEY **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
DEFINEFUNC4(DSA *, PEM_read_bio_DSA_PUBKEY, BIO *a, a, DSA **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
DEFINEFUNC4(RSA *, PEM_read_bio_RSA_PUBKEY, BIO *a, a, RSA **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
-#ifndef OPENSSL_NO_EC
-DEFINEFUNC4(EC_KEY *, PEM_read_bio_EC_PUBKEY, BIO *a, a, EC_KEY **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
-#endif
DEFINEFUNC2(int, PEM_write_bio_DSA_PUBKEY, BIO *a, a, DSA *b, b, return 0, return)
DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKEY, BIO *a, a, RSA *b, b, return 0, return)
DEFINEFUNC2(int, PEM_write_bio_PUBKEY, BIO *a, a, EVP_PKEY *b, b, return 0, return)
-#ifndef OPENSSL_NO_EC
-DEFINEFUNC2(int, PEM_write_bio_EC_PUBKEY, BIO *a, a, EC_KEY *b, b, return 0, return)
-#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)
@@ -448,14 +351,12 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return)
DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return nullptr, return)
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, return);
DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return);
DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return);
DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
-#endif
DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
@@ -477,21 +378,19 @@ DEFINEFUNC2(int, SSL_set_session, SSL* to, to, SSL_SESSION *session, session, re
DEFINEFUNC(void, SSL_SESSION_free, SSL_SESSION *ses, ses, return, DUMMYARG)
DEFINEFUNC(SSL_SESSION*, SSL_get1_session, SSL *ssl, ssl, return nullptr, return)
DEFINEFUNC(SSL_SESSION*, SSL_get_session, const SSL *ssl, ssl, return nullptr, return)
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
DEFINEFUNC3(int, SSL_set_ex_data, SSL *ssl, ssl, int idx, idx, void *arg, arg, return 0, return)
DEFINEFUNC2(void *, SSL_get_ex_data, const SSL *ssl, ssl, int idx, idx, return nullptr, return)
-#endif
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
+
+#ifndef OPENSSL_NO_PSK
DEFINEFUNC2(void, SSL_set_psk_client_callback, SSL* ssl, ssl, q_psk_client_callback_t callback, callback, return, DUMMYARG)
DEFINEFUNC2(void, SSL_set_psk_server_callback, SSL* ssl, ssl, q_psk_server_callback_t callback, callback, return, DUMMYARG)
DEFINEFUNC2(int, SSL_CTX_use_psk_identity_hint, SSL_CTX* ctx, ctx, const char *hint, hint, return 0, return)
-#endif
+#endif // !OPENSSL_NO_PSK
+
DEFINEFUNC3(int, SSL_write, SSL *a, a, const void *b, b, int c, c, return -1, return)
DEFINEFUNC2(int, X509_cmp, X509 *a, a, X509 *b, b, return -1, return)
DEFINEFUNC4(int, X509_digest, const X509 *x509, x509, const EVP_MD *type, type, unsigned char *md, md, unsigned int *len, len, return -1, return)
-#ifndef SSLEAY_MACROS
DEFINEFUNC(X509 *, X509_dup, X509 *a, a, return nullptr, return)
-#endif
DEFINEFUNC2(void, X509_print, BIO *a, a, X509 *b, b, return, DUMMYARG);
DEFINEFUNC(ASN1_OBJECT *, X509_EXTENSION_get_object, X509_EXTENSION *a, a, return nullptr, return)
DEFINEFUNC(void, X509_free, X509 *a, a, return, DUMMYARG)
@@ -535,7 +434,8 @@ DEFINEFUNC(int, SSL_get_ex_data_X509_STORE_CTX_idx, DUMMYARG, DUMMYARG, 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 nullptr, return)
-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_NEXTPROTONEG)
+
+#ifndef OPENSSL_NO_NEXTPROTONEG
DEFINEFUNC6(int, SSL_select_next_proto, unsigned char **out, out, unsigned char *outlen, outlen,
const unsigned char *in, in, unsigned int inlen, inlen,
const unsigned char *client, client, unsigned int client_len, client_len,
@@ -548,7 +448,6 @@ DEFINEFUNC3(void, SSL_CTX_set_next_proto_select_cb, SSL_CTX *s, s,
void *arg, arg, return, DUMMYARG)
DEFINEFUNC3(void, SSL_get0_next_proto_negotiated, const SSL *s, s,
const unsigned char **data, data, unsigned *len, len, return, DUMMYARG)
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
DEFINEFUNC3(int, SSL_set_alpn_protos, SSL *s, s, const unsigned char *protos, protos,
unsigned protos_len, protos_len, return -1, return)
DEFINEFUNC3(void, SSL_CTX_set_alpn_select_cb, SSL_CTX *s, s,
@@ -559,8 +458,7 @@ DEFINEFUNC3(void, SSL_CTX_set_alpn_select_cb, SSL_CTX *s, s,
void *arg, arg, return, DUMMYARG)
DEFINEFUNC3(void, SSL_get0_alpn_selected, const SSL *s, s, const unsigned char **data, data,
unsigned *len, len, return, DUMMYARG)
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ...
-#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
+#endif // !OPENSSL_NO_NEXTPROTONEG
// DTLS:
#if QT_CONFIG(dtls)
@@ -581,14 +479,13 @@ DEFINEFUNC3(DH *, d2i_DHparams, DH**a, a, const unsigned char **pp, pp, long len
DEFINEFUNC2(int, i2d_DHparams, DH *a, a, unsigned char **p, p, return -1, return)
DEFINEFUNC2(int, DH_check, DH *dh, dh, int *codes, codes, return 0, return)
DEFINEFUNC3(BIGNUM *, BN_bin2bn, const unsigned char *s, s, int len, len, BIGNUM *ret, ret, return nullptr, return)
+
#ifndef OPENSSL_NO_EC
DEFINEFUNC(EC_KEY *, EC_KEY_dup, const EC_KEY *ec, ec, return nullptr, return)
DEFINEFUNC(EC_KEY *, EC_KEY_new_by_curve_name, int nid, nid, return nullptr, return)
DEFINEFUNC(void, EC_KEY_free, EC_KEY *ecdh, ecdh, return, DUMMYARG)
DEFINEFUNC2(size_t, EC_get_builtin_curves, EC_builtin_curve * r, r, size_t nitems, nitems, return 0, return)
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
DEFINEFUNC(int, EC_curve_nist2nid, const char *name, name, return 0, return)
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
#endif // OPENSSL_NO_EC
DEFINEFUNC5(int, PKCS12_parse, PKCS12 *p12, p12, const char *pass, pass, EVP_PKEY **pkey, pkey, \
@@ -760,7 +657,6 @@ static LoadedOpenSsl loadOpenSsl()
{
LoadedOpenSsl result;
-#if QT_CONFIG(opensslv11)
// With OpenSSL 1.1 the names have changed to libssl-1_1(-x64) and libcrypto-1_1(-x64), for builds using
// MSVC and GCC, (-x64 suffix for 64-bit builds).
@@ -774,21 +670,6 @@ static LoadedOpenSsl loadOpenSsl()
QLatin1String("libcrypto-1_1" QT_SSL_SUFFIX), result);
#undef QT_SSL_SUFFIX
-
-#else // QT_CONFIG(opensslv11)
-
- // When OpenSSL is built using MSVC then the libraries are named 'ssleay32.dll' and 'libeay32'dll'.
- // When OpenSSL is built using GCC then different library names are used (depending on the OpenSSL version)
- // The oldest version of a GCC-based OpenSSL which can be detected by the code below is 0.9.8g (released in 2007)
- if (!tryToLoadOpenSslWin32Library(QLatin1String("ssleay32"), QLatin1String("libeay32"), result)) {
- if (!tryToLoadOpenSslWin32Library(QLatin1String("libssl-10"), QLatin1String("libcrypto-10"), result)) {
- if (!tryToLoadOpenSslWin32Library(QLatin1String("libssl-8"), QLatin1String("libcrypto-8"), result)) {
- tryToLoadOpenSslWin32Library(QLatin1String("libssl-7"), QLatin1String("libcrypto-7"), result);
- }
- }
- }
-#endif // !QT_CONFIG(opensslv11)
-
return result;
}
#else
@@ -852,27 +733,6 @@ static LoadedOpenSsl loadOpenSsl()
libssl->unload();
libcrypto->unload();
}
-
-#if !QT_CONFIG(opensslv11)
- // first-and-half attempts: for OpenSSL 1.0 try to load some hardcoded sonames:
- // - "1.0.0" is the official upstream one
- // - "1.0.2" is found on some distributions (e.g. Debian) that patch OpenSSL
- static const QLatin1String fallbackSonames[] = {
- QLatin1String("1.0.0"),
- QLatin1String("1.0.2")
- };
-
- for (auto fallbackSoname : fallbackSonames) {
- libssl->setFileNameAndVersion(QLatin1String("ssl"), fallbackSoname);
- libcrypto->setFileNameAndVersion(QLatin1String("crypto"), fallbackSoname);
- if (libcrypto->load() && libssl->load()) {
- return result;
- } else {
- libssl->unload();
- libcrypto->unload();
- }
- }
-#endif
#endif
#ifndef Q_OS_DARWIN
@@ -890,11 +750,9 @@ static LoadedOpenSsl loadOpenSsl()
return defaultSuffix;
return suffix;
};
-# if QT_CONFIG(opensslv11)
+
static QString suffix = QString::fromLatin1(openSSLSuffix("_1_1"));
-# else
- static QString suffix = QString::fromLatin1(openSSLSuffix());
-# endif
+
libssl->setFileNameAndVersion(QLatin1String("ssl") + suffix, -1);
libcrypto->setFileNameAndVersion(QLatin1String("crypto") + suffix, -1);
# else
@@ -968,8 +826,6 @@ bool q_resolveOpenSslSymbols()
// failed to load them
return false;
-#if QT_CONFIG(opensslv11)
-
RESOLVEFUNC(OPENSSL_init_ssl)
RESOLVEFUNC(OPENSSL_init_crypto)
RESOLVEFUNC(ASN1_STRING_get0_data)
@@ -985,10 +841,14 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(OPENSSL_sk_value)
RESOLVEFUNC(DH_get0_pqg)
RESOLVEFUNC(SSL_CTX_set_options)
+
#ifdef TLS1_3_VERSION
RESOLVEFUNC(SSL_CTX_set_ciphersuites)
RESOLVEFUNC(SSL_set_psk_use_session_callback)
+ RESOLVEFUNC(SSL_CTX_sess_set_new_cb)
+ RESOLVEFUNC(SSL_SESSION_is_resumable)
#endif // TLS 1.3 or OpenSSL > 1.1.1
+
RESOLVEFUNC(SSL_get_client_random)
RESOLVEFUNC(SSL_SESSION_get_master_key)
RESOLVEFUNC(SSL_session_reused)
@@ -1010,6 +870,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(CRYPTO_free)
RESOLVEFUNC(OpenSSL_version_num)
RESOLVEFUNC(OpenSSL_version)
+
if (!_q_OpenSSL_version) {
// Apparently, we were built with OpenSSL 1.1 enabled but are now using
// a wrong library.
@@ -1034,6 +895,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(BIO_meth_set_create)
RESOLVEFUNC(BIO_meth_set_destroy)
#endif // dtls
+
#if QT_CONFIG(ocsp)
RESOLVEFUNC(OCSP_SINGLERESP_get0_id)
RESOLVEFUNC(d2i_OCSP_RESPONSE)
@@ -1058,99 +920,12 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(OCSP_cert_to_id)
RESOLVEFUNC(OCSP_id_cmp)
#endif // ocsp
+
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)
-
-#ifdef SSLEAY_MACROS
- RESOLVEFUNC(ASN1_dup)
-#endif // SSLEAY_MACROS
- RESOLVEFUNC(BIO_new_file)
- RESOLVEFUNC(ERR_clear_error)
- RESOLVEFUNC(CRYPTO_free)
- RESOLVEFUNC(CRYPTO_num_locks)
- RESOLVEFUNC(CRYPTO_set_id_callback)
- RESOLVEFUNC(CRYPTO_set_locking_callback)
- RESOLVEFUNC(CRYPTO_set_ex_data)
- RESOLVEFUNC(CRYPTO_get_ex_data)
- RESOLVEFUNC(ERR_peek_last_error)
- RESOLVEFUNC(ERR_free_strings)
- RESOLVEFUNC(EVP_CIPHER_CTX_cleanup)
- RESOLVEFUNC(EVP_CIPHER_CTX_init)
-
-#ifdef SSLEAY_MACROS // ### verify
- RESOLVEFUNC(PEM_ASN1_read_bio)
-#endif // SSLEAY_MACROS
-
- RESOLVEFUNC(sk_new_null)
- RESOLVEFUNC(sk_push)
- RESOLVEFUNC(sk_free)
- RESOLVEFUNC(sk_num)
- RESOLVEFUNC(sk_pop_free)
- RESOLVEFUNC(sk_value)
- RESOLVEFUNC(SSL_library_init)
- RESOLVEFUNC(SSL_load_error_strings)
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
- RESOLVEFUNC(SSL_get_ex_new_index)
-#endif
- RESOLVEFUNC(SSLv23_client_method)
- RESOLVEFUNC(TLSv1_client_method)
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
- RESOLVEFUNC(TLSv1_1_client_method)
- RESOLVEFUNC(TLSv1_2_client_method)
-#endif
- RESOLVEFUNC(SSLv23_server_method)
- RESOLVEFUNC(TLSv1_server_method)
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
- RESOLVEFUNC(TLSv1_1_server_method)
- RESOLVEFUNC(TLSv1_2_server_method)
-#endif
- RESOLVEFUNC(X509_STORE_CTX_get_chain)
-#ifdef SSLEAY_MACROS
- RESOLVEFUNC(i2d_DSAPrivateKey)
- RESOLVEFUNC(i2d_RSAPrivateKey)
- 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)
- RESOLVEFUNC(SSLeay)
-
- if (!_q_SSLeay || q_SSLeay() >= 0x10100000L) {
- // OpenSSL 1.1 has deprecated and removed SSLeay. We consider a failure to
- // resolve this symbol as a failure to resolve symbols.
- // The right operand of '||' above is ... a bit of paranoia.
- qCWarning(lcSsl, "Incompatible version of OpenSSL");
- return false;
- }
-
-
- RESOLVEFUNC(SSLeay_version)
-
-#ifndef OPENSSL_NO_EC
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
- if (q_SSLeay() >= 0x10002000L)
- RESOLVEFUNC(EC_curve_nist2nid)
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
-#endif // OPENSSL_NO_EC
-
-
-#endif // !opensslv11
-
RESOLVEFUNC(ASN1_INTEGER_get)
RESOLVEFUNC(ASN1_INTEGER_cmp)
RESOLVEFUNC(ASN1_STRING_length)
@@ -1172,9 +947,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(EC_GROUP_get_degree)
#endif
RESOLVEFUNC(BN_num_bits)
-#if QT_CONFIG(opensslv11)
RESOLVEFUNC(BN_is_word)
-#endif
RESOLVEFUNC(BN_mod_word)
RESOLVEFUNC(DSA_new)
RESOLVEFUNC(DSA_free)
@@ -1207,17 +980,21 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(EVP_PKEY_set1_RSA)
RESOLVEFUNC(EVP_PKEY_set1_DSA)
RESOLVEFUNC(EVP_PKEY_set1_DH)
+
#ifndef OPENSSL_NO_EC
RESOLVEFUNC(EVP_PKEY_set1_EC_KEY)
-#endif
+ RESOLVEFUNC(EVP_PKEY_get1_EC_KEY)
+ RESOLVEFUNC(PEM_read_bio_ECPrivateKey)
+ RESOLVEFUNC(PEM_write_bio_ECPrivateKey)
+ RESOLVEFUNC(PEM_read_bio_EC_PUBKEY)
+ RESOLVEFUNC(PEM_write_bio_EC_PUBKEY)
+#endif // OPENSSL_NO_EC
+
RESOLVEFUNC(EVP_PKEY_cmp)
RESOLVEFUNC(EVP_PKEY_free)
RESOLVEFUNC(EVP_PKEY_get1_DSA)
RESOLVEFUNC(EVP_PKEY_get1_RSA)
RESOLVEFUNC(EVP_PKEY_get1_DH)
-#ifndef OPENSSL_NO_EC
- RESOLVEFUNC(EVP_PKEY_get1_EC_KEY)
-#endif
RESOLVEFUNC(EVP_PKEY_new)
RESOLVEFUNC(EVP_PKEY_type)
RESOLVEFUNC(OBJ_nid2sn)
@@ -1227,35 +1004,19 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(i2t_ASN1_OBJECT)
RESOLVEFUNC(OBJ_obj2txt)
RESOLVEFUNC(OBJ_obj2nid)
-
-#ifndef SSLEAY_MACROS
RESOLVEFUNC(PEM_read_bio_PrivateKey)
RESOLVEFUNC(PEM_read_bio_DSAPrivateKey)
RESOLVEFUNC(PEM_read_bio_RSAPrivateKey)
-#ifndef OPENSSL_NO_EC
- RESOLVEFUNC(PEM_read_bio_ECPrivateKey)
-#endif
RESOLVEFUNC(PEM_read_bio_DHparams)
RESOLVEFUNC(PEM_write_bio_DSAPrivateKey)
RESOLVEFUNC(PEM_write_bio_RSAPrivateKey)
RESOLVEFUNC(PEM_write_bio_PrivateKey)
-#ifndef OPENSSL_NO_EC
- RESOLVEFUNC(PEM_write_bio_ECPrivateKey)
-#endif
-#endif // !SSLEAY_MACROS
-
RESOLVEFUNC(PEM_read_bio_PUBKEY)
RESOLVEFUNC(PEM_read_bio_DSA_PUBKEY)
RESOLVEFUNC(PEM_read_bio_RSA_PUBKEY)
-#ifndef OPENSSL_NO_EC
- RESOLVEFUNC(PEM_read_bio_EC_PUBKEY)
-#endif
RESOLVEFUNC(PEM_write_bio_DSA_PUBKEY)
RESOLVEFUNC(PEM_write_bio_RSA_PUBKEY)
RESOLVEFUNC(PEM_write_bio_PUBKEY)
-#ifndef OPENSSL_NO_EC
- RESOLVEFUNC(PEM_write_bio_EC_PUBKEY)
-#endif
RESOLVEFUNC(RAND_seed)
RESOLVEFUNC(RAND_status)
RESOLVEFUNC(RAND_bytes)
@@ -1279,14 +1040,12 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
RESOLVEFUNC(SSL_CTX_get_cert_store);
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
RESOLVEFUNC(SSL_CONF_CTX_new);
RESOLVEFUNC(SSL_CONF_CTX_free);
RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
RESOLVEFUNC(SSL_CONF_CTX_set_flags);
RESOLVEFUNC(SSL_CONF_CTX_finish);
RESOLVEFUNC(SSL_CONF_cmd);
-#endif
RESOLVEFUNC(SSL_accept)
RESOLVEFUNC(SSL_clear)
RESOLVEFUNC(SSL_connect)
@@ -1311,16 +1070,16 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_SESSION_free)
RESOLVEFUNC(SSL_get1_session)
RESOLVEFUNC(SSL_get_session)
-#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)
+
+#ifndef OPENSSL_NO_PSK
RESOLVEFUNC(SSL_set_psk_client_callback)
RESOLVEFUNC(SSL_set_psk_server_callback)
RESOLVEFUNC(SSL_CTX_use_psk_identity_hint)
-#endif
+#endif // !OPENSSL_NO_PSK
+
RESOLVEFUNC(SSL_write)
RESOLVEFUNC(X509_NAME_entry_count)
RESOLVEFUNC(X509_NAME_get_entry)
@@ -1340,10 +1099,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(X509_STORE_CTX_get0_store)
RESOLVEFUNC(X509_cmp)
RESOLVEFUNC(X509_STORE_CTX_get_ex_data)
-
-#ifndef SSLEAY_MACROS
RESOLVEFUNC(X509_dup)
-#endif
RESOLVEFUNC(X509_print)
RESOLVEFUNC(X509_digest)
RESOLVEFUNC(X509_EXTENSION_get_object)
@@ -1371,22 +1127,23 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_CTX_load_verify_locations)
RESOLVEFUNC(i2d_SSL_SESSION)
RESOLVEFUNC(d2i_SSL_SESSION)
-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_NEXTPROTONEG)
+
+#ifndef OPENSSL_NO_NEXTPROTONEG
RESOLVEFUNC(SSL_select_next_proto)
RESOLVEFUNC(SSL_CTX_set_next_proto_select_cb)
RESOLVEFUNC(SSL_get0_next_proto_negotiated)
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
- RESOLVEFUNC(SSL_set_alpn_protos)
- RESOLVEFUNC(SSL_CTX_set_alpn_select_cb)
- RESOLVEFUNC(SSL_get0_alpn_selected)
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ...
-#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
+ RESOLVEFUNC(SSL_set_alpn_protos)
+ RESOLVEFUNC(SSL_CTX_set_alpn_select_cb)
+ RESOLVEFUNC(SSL_get0_alpn_selected)
+#endif // !OPENSSL_NO_NEXTPROTONEG
+
#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(CRYPTO_malloc)
RESOLVEFUNC(DH_new)
RESOLVEFUNC(DH_free)
@@ -1394,12 +1151,14 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(i2d_DHparams)
RESOLVEFUNC(DH_check)
RESOLVEFUNC(BN_bin2bn)
+
#ifndef OPENSSL_NO_EC
RESOLVEFUNC(EC_KEY_dup)
RESOLVEFUNC(EC_KEY_new_by_curve_name)
RESOLVEFUNC(EC_KEY_free)
RESOLVEFUNC(EC_get_builtin_curves)
#endif // OPENSSL_NO_EC
+
RESOLVEFUNC(PKCS12_parse)
RESOLVEFUNC(d2i_PKCS12_bio)
RESOLVEFUNC(PKCS12_free)
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index 69b2b90fbd..f35e0ba22b 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -220,11 +220,145 @@ QT_BEGIN_NAMESPACE
#endif // !defined QT_LINKED_OPENSSL
-#if QT_CONFIG(opensslv11)
-#include "qsslsocket_openssl11_symbols_p.h"
-#else
-#include "qsslsocket_opensslpre11_symbols_p.h"
-#endif // QT_CONFIG
+// TODO: the following lines previously were a part of 1.1 - specific header.
+// To reduce the amount of the change, I'm directly copying and pasting the
+// content of the header here. Later, can be better sorted/split into groups,
+// depending on the functionality.
+
+const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
+
+Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
+Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
+
+int q_DSA_bits(DSA *a);
+int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
+Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
+int q_EVP_PKEY_base_id(EVP_PKEY *a);
+int q_RSA_bits(RSA *a);
+Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
+Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
+Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null();
+Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
+Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
+Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
+int q_SSL_session_reused(SSL *a);
+unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
+int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+size_t q_SSL_get_client_random(SSL *a, unsigned char *out, size_t outlen);
+size_t q_SSL_SESSION_get_master_key(const SSL_SESSION *session, unsigned char *out, size_t outlen);
+int q_CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
+const SSL_METHOD *q_TLS_method();
+const SSL_METHOD *q_TLS_client_method();
+const SSL_METHOD *q_TLS_server_method();
+ASN1_TIME *q_X509_getm_notBefore(X509 *a);
+ASN1_TIME *q_X509_getm_notAfter(X509 *a);
+
+Q_AUTOTEST_EXPORT void q_X509_up_ref(X509 *a);
+long q_X509_get_version(X509 *a);
+EVP_PKEY *q_X509_get_pubkey(X509 *a);
+void q_X509_STORE_set_verify_cb(X509_STORE *ctx, X509_STORE_CTX_verify_cb verify_cb);
+int q_X509_STORE_set_ex_data(X509_STORE *ctx, int idx, void *data);
+void *q_X509_STORE_get_ex_data(X509_STORE *r, int idx);
+STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx);
+void q_DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
+int q_DH_bits(DH *dh);
+
+# define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
+ | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
+
+#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
+#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
+
+#define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
+ | OPENSSL_INIT_ADD_ALL_DIGESTS \
+ | OPENSSL_INIT_LOAD_CONFIG, NULL)
+#define q_OPENSSL_add_all_algorithms_noconf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
+ | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
+
+int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+void q_CRYPTO_free(void *str, const char *file, int line);
+
+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);
+
+#ifdef TLS1_3_VERSION
+int q_SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str);
+
+// The functions below do not really have to be ifdefed like this, but for now
+// they only used in TLS 1.3 handshake (and probably future versions).
+// Plus, 'is resumalbe' is OpenSSL 1.1.1-only (and again we need it for
+// TLS 1.3-specific session management).
+
+extern "C"
+{
+using NewSessionCallback = int (*)(SSL *, SSL_SESSION *);
+}
+
+void q_SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, NewSessionCallback cb);
+int q_SSL_SESSION_is_resumable(const SSL_SESSION *s);
+
+#define q_SSL_CTX_set_session_cache_mode(ctx,m) \
+ q_SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL)
+
+#endif
+
+#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);
+
+#if QT_CONFIG(ocsp)
+const OCSP_CERTID *q_OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x);
+#endif // ocsp
+
+#define q_SSL_CTX_set_min_proto_version(ctx, version) \
+ q_SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, nullptr)
+
+#define q_SSL_CTX_set_max_proto_version(ctx, version) \
+ q_SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, nullptr)
+
+extern "C" {
+typedef int (*q_SSL_psk_use_session_cb_func_t)(SSL *, const EVP_MD *, const unsigned char **, size_t *,
+ SSL_SESSION **);
+}
+void q_SSL_set_psk_use_session_callback(SSL *s, q_SSL_psk_use_session_cb_func_t);
+// Here the content of the 1.1 header ends.
bool q_resolveOpenSslSymbols();
long q_ASN1_INTEGER_get(ASN1_INTEGER *a);
@@ -237,27 +371,14 @@ BIO *q_BIO_new_mem_buf(void *a, int b);
int q_BIO_read(BIO *a, void *b, int c);
Q_AUTOTEST_EXPORT int q_BIO_write(BIO *a, const void *b, int c);
int q_BN_num_bits(const BIGNUM *a);
-
-#if QT_CONFIG(opensslv11)
int q_BN_is_word(BIGNUM *a, BN_ULONG w);
-#else // opensslv11
-// BN_is_word is implemented purely as a
-// macro in OpenSSL < 1.1. It doesn't
-// call any functions.
-//
-// The implementation of BN_is_word is
-// 100% the same between 1.0.0, 1.0.1
-// and 1.0.2.
-//
-// Users are required to include <openssl/bn.h>.
-#define q_BN_is_word BN_is_word
-#endif // !opensslv11
-
BN_ULONG q_BN_mod_word(const BIGNUM *a, BN_ULONG w);
+
#ifndef OPENSSL_NO_EC
const EC_GROUP* q_EC_KEY_get0_group(const EC_KEY* k);
int q_EC_GROUP_get_degree(const EC_GROUP* g);
-#endif
+#endif // OPENSSL_NO_EC
+
DSA *q_DSA_new();
void q_DSA_free(DSA *a);
X509 *q_d2i_X509(X509 **a, const unsigned char **b, long c);
@@ -277,23 +398,28 @@ const EVP_MD *q_EVP_get_digestbyname(const char *name);
#ifndef OPENSSL_NO_DES
const EVP_CIPHER *q_EVP_des_cbc();
const EVP_CIPHER *q_EVP_des_ede3_cbc();
-#endif
+#endif // OPENSSL_NO_DES
+
#ifndef OPENSSL_NO_RC2
const EVP_CIPHER *q_EVP_rc2_cbc();
-#endif
+#endif // OPENSSL_NO_RC2
+
#ifndef OPENSSL_NO_AES
const EVP_CIPHER *q_EVP_aes_128_cbc();
const EVP_CIPHER *q_EVP_aes_192_cbc();
const EVP_CIPHER *q_EVP_aes_256_cbc();
-#endif
+#endif // OPENSSL_NO_AES
+
Q_AUTOTEST_EXPORT const EVP_MD *q_EVP_sha1();
int q_EVP_PKEY_assign(EVP_PKEY *a, int b, char *c);
Q_AUTOTEST_EXPORT int q_EVP_PKEY_set1_RSA(EVP_PKEY *a, RSA *b);
Q_AUTOTEST_EXPORT int q_EVP_PKEY_set1_DSA(EVP_PKEY *a, DSA *b);
Q_AUTOTEST_EXPORT int q_EVP_PKEY_set1_DH(EVP_PKEY *a, DH *b);
+
#ifndef OPENSSL_NO_EC
Q_AUTOTEST_EXPORT int q_EVP_PKEY_set1_EC_KEY(EVP_PKEY *a, EC_KEY *b);
#endif
+
Q_AUTOTEST_EXPORT int q_EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
Q_AUTOTEST_EXPORT void q_EVP_PKEY_free(EVP_PKEY *a);
RSA *q_EVP_PKEY_get1_RSA(EVP_PKEY *a);
@@ -313,18 +439,18 @@ int q_i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *obj);
int q_OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *obj, int no_name);
int q_OBJ_obj2nid(const ASN1_OBJECT *a);
#define q_EVP_get_digestbynid(a) q_EVP_get_digestbyname(q_OBJ_nid2sn(a))
-#ifdef SSLEAY_MACROS
-// ### verify
-void *q_PEM_ASN1_read_bio(d2i_of_void *a, const char *b, BIO *c, void **d, pem_password_cb *e,
- void *f);
-// ### ditto for write
-#else
Q_AUTOTEST_EXPORT EVP_PKEY *q_PEM_read_bio_PrivateKey(BIO *a, EVP_PKEY **b, pem_password_cb *c, void *d);
DSA *q_PEM_read_bio_DSAPrivateKey(BIO *a, DSA **b, pem_password_cb *c, void *d);
RSA *q_PEM_read_bio_RSAPrivateKey(BIO *a, RSA **b, pem_password_cb *c, void *d);
+
#ifndef OPENSSL_NO_EC
EC_KEY *q_PEM_read_bio_ECPrivateKey(BIO *a, EC_KEY **b, pem_password_cb *c, void *d);
-#endif
+int q_PEM_write_bio_ECPrivateKey(BIO *a, EC_KEY *b, const EVP_CIPHER *c, unsigned char *d,
+ int e, pem_password_cb *f, void *g);
+EC_KEY *q_PEM_read_bio_EC_PUBKEY(BIO *a, EC_KEY **b, pem_password_cb *c, void *d);
+int q_PEM_write_bio_EC_PUBKEY(BIO *a, EC_KEY *b);
+#endif // OPENSSL_NO_EC
+
DH *q_PEM_read_bio_DHparams(BIO *a, DH **b, pem_password_cb *c, void *d);
int q_PEM_write_bio_DSAPrivateKey(BIO *a, DSA *b, const EVP_CIPHER *c, unsigned char *d,
int e, pem_password_cb *f, void *g);
@@ -332,23 +458,13 @@ int q_PEM_write_bio_RSAPrivateKey(BIO *a, RSA *b, const EVP_CIPHER *c, unsigned
int e, pem_password_cb *f, void *g);
int q_PEM_write_bio_PrivateKey(BIO *a, EVP_PKEY *b, const EVP_CIPHER *c, unsigned char *d,
int e, pem_password_cb *f, void *g);
-#ifndef OPENSSL_NO_EC
-int q_PEM_write_bio_ECPrivateKey(BIO *a, EC_KEY *b, const EVP_CIPHER *c, unsigned char *d,
- int e, pem_password_cb *f, void *g);
-#endif
-#endif // SSLEAY_MACROS
Q_AUTOTEST_EXPORT EVP_PKEY *q_PEM_read_bio_PUBKEY(BIO *a, EVP_PKEY **b, pem_password_cb *c, void *d);
DSA *q_PEM_read_bio_DSA_PUBKEY(BIO *a, DSA **b, pem_password_cb *c, void *d);
RSA *q_PEM_read_bio_RSA_PUBKEY(BIO *a, RSA **b, pem_password_cb *c, void *d);
-#ifndef OPENSSL_NO_EC
-EC_KEY *q_PEM_read_bio_EC_PUBKEY(BIO *a, EC_KEY **b, pem_password_cb *c, void *d);
-#endif
int q_PEM_write_bio_DSA_PUBKEY(BIO *a, DSA *b);
int q_PEM_write_bio_RSA_PUBKEY(BIO *a, RSA *b);
int q_PEM_write_bio_PUBKEY(BIO *a, EVP_PKEY *b);
-#ifndef OPENSSL_NO_EC
-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);
@@ -378,14 +494,12 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
int q_SSL_CTX_use_RSAPrivateKey(SSL_CTX *a, RSA *b);
int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c);
X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a);
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
SSL_CONF_CTX *q_SSL_CONF_CTX_new();
void q_SSL_CONF_CTX_free(SSL_CONF_CTX *a);
void q_SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *a, SSL_CTX *b);
unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b);
int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a);
int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
-#endif
void q_SSL_free(SSL *a);
STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
@@ -407,26 +521,18 @@ 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);
SSL_SESSION *q_SSL_get_session(const SSL *ssl);
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
int q_SSL_set_ex_data(SSL *ssl, int idx, void *arg);
void *q_SSL_get_ex_data(const SSL *ssl, int idx);
-#endif
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
+#ifndef OPENSSL_NO_PSK
typedef unsigned int (*q_psk_client_callback_t)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len);
void q_SSL_set_psk_client_callback(SSL *ssl, q_psk_client_callback_t callback);
typedef unsigned int (*q_psk_server_callback_t)(SSL *ssl, const char *identity, unsigned char *psk, unsigned int max_psk_len);
void q_SSL_set_psk_server_callback(SSL *ssl, q_psk_server_callback_t callback);
int q_SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *hint);
-#endif // OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
+#endif // !OPENSSL_NO_PSK
int q_SSL_write(SSL *a, const void *b, int c);
int q_X509_cmp(X509 *a, X509 *b);
-#ifdef SSLEAY_MACROS
-void *q_ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x);
-#define q_X509_dup(x509) (X509 *)q_ASN1_dup((i2d_of_void *)q_i2d_X509, \
- (d2i_of_void *)q_d2i_X509,(char *)x509)
-#else
X509 *q_X509_dup(X509 *a);
-#endif
void q_X509_print(BIO *a, X509*b);
int q_X509_digest(const X509 *x509, const EVP_MD *type, unsigned char *md, unsigned int *len);
ASN1_OBJECT *q_X509_EXTENSION_get_object(X509_EXTENSION *a);
@@ -485,13 +591,10 @@ void q_EC_KEY_free(EC_KEY *ecdh);
// EC curves management
size_t q_EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
int q_EC_curve_nist2nid(const char *name);
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
#endif // OPENSSL_NO_EC
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
+
#define q_SSL_get_server_tmp_key(ssl, key) q_SSL_ctrl((ssl), SSL_CTRL_GET_SERVER_TMP_KEY, 0, (char *)key)
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
// PKCS#12 support
int q_PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca);
@@ -521,7 +624,7 @@ int q_SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char
int q_i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
SSL_SESSION *q_d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length);
-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
int q_SSL_select_next_proto(unsigned char **out, unsigned char *outlen,
const unsigned char *in, unsigned int inlen,
const unsigned char *client, unsigned int client_len);
@@ -533,7 +636,6 @@ void q_SSL_CTX_set_next_proto_select_cb(SSL_CTX *s,
void *arg);
void q_SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data,
unsigned *len);
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
int q_SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos,
unsigned protos_len);
void q_SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx,
@@ -545,8 +647,8 @@ void q_SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx,
void *arg), void *arg);
void q_SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
unsigned *len);
-#endif
-#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
+#endif // !OPENSSL_NO_NEXTPROTONEG
+
#if QT_CONFIG(dtls)
@@ -586,13 +688,9 @@ int q_BIO_set_ex_data(BIO *b, int idx, void *data);
class QDateTime;
QDateTime q_getTimeFromASN1(const ASN1_TIME *aTime);
-#ifndef OPENSSL_NO_TLSEXT
-
#define q_SSL_set_tlsext_status_type(ssl, type) \
q_SSL_ctrl((ssl), SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, (type), nullptr)
-#endif // OPENSSL_NO_TLSEXT
-
#if QT_CONFIG(ocsp)
OCSP_RESPONSE *q_d2i_OCSP_RESPONSE(OCSP_RESPONSE **a, const unsigned char **in, long len);
diff --git a/src/network/ssl/qsslsocket_opensslpre11.cpp b/src/network/ssl/qsslsocket_opensslpre11.cpp
deleted file mode 100644
index 2af437f0fa..0000000000
--- a/src/network/ssl/qsslsocket_opensslpre11.cpp
+++ /dev/null
@@ -1,408 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Copyright (C) 2014 Governikus GmbH & Co. KG
-** 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$
-**
-****************************************************************************/
-
-/****************************************************************************
-**
-** In addition, as a special exception, the copyright holders listed above give
-** permission to link the code of its release of Qt with the OpenSSL project's
-** "OpenSSL" library (or modified versions of the "OpenSSL" library that use the
-** same license as the original version), and distribute the linked executables.
-**
-** You must comply with the GNU General Public License version 2 in all
-** respects for all of the code used other than the "OpenSSL" code. If you
-** modify this file, you may extend this exception to your version of the file,
-** but you are not obligated to do so. If you do not wish to do so, delete
-** this exception statement from your version of this file.
-**
-****************************************************************************/
-
-//#define QT_DECRYPT_SSL_TRAFFIC
-
-#include "qssl_p.h"
-#include "qsslsocket_openssl_p.h"
-#include "qsslsocket_openssl_symbols_p.h"
-#include "qsslsocket.h"
-#include "qsslkey.h"
-
-#include <QtCore/qdebug.h>
-#include <QtCore/qdir.h>
-#include <QtCore/qdiriterator.h>
-#include <QtCore/qthread.h>
-#include <QtCore/qfile.h>
-#include <QtCore/qmutex.h>
-
-QT_BEGIN_NAMESPACE
-
-/* \internal
-
- From OpenSSL's thread(3) manual page:
-
- OpenSSL can safely be used in multi-threaded applications provided that at
- least two callback functions are set.
-
- locking_function(int mode, int n, const char *file, int line) is needed to
- perform locking on shared data structures. (Note that OpenSSL uses a
- number of global data structures that will be implicitly shared
- whenever multiple threads use OpenSSL.) Multi-threaded
- applications will crash at random if it is not set. ...
- ...
- id_function(void) is a function that returns a thread ID. It is not
- needed on Windows nor on platforms where getpid() returns a different
- ID for each thread (most notably Linux)
-*/
-
-class QOpenSslLocks
-{
-public:
- QOpenSslLocks()
- : initLocker(QMutex::Recursive),
- locksLocker(QMutex::Recursive)
- {
- QMutexLocker locker(&locksLocker);
- int numLocks = q_CRYPTO_num_locks();
- locks = new QMutex *[numLocks];
- memset(locks, 0, numLocks * sizeof(QMutex *));
- }
- ~QOpenSslLocks()
- {
- QMutexLocker locker(&locksLocker);
- for (int i = 0; i < q_CRYPTO_num_locks(); ++i)
- delete locks[i];
- delete [] locks;
-
- QSslSocketPrivate::deinitialize();
- }
- QMutex *lock(int num)
- {
- QMutexLocker locker(&locksLocker);
- QMutex *tmp = locks[num];
- if (!tmp)
- tmp = locks[num] = new QMutex(QMutex::Recursive);
- return tmp;
- }
-
- QMutex *globalLock()
- {
- return &locksLocker;
- }
-
- QMutex *initLock()
- {
- return &initLocker;
- }
-
-private:
- QMutex initLocker;
- QMutex locksLocker;
- QMutex **locks;
-};
-
-Q_GLOBAL_STATIC(QOpenSslLocks, openssl_locks)
-
-extern "C" {
-static void locking_function(int mode, int lockNumber, const char *, int)
-{
- QMutex *mutex = openssl_locks()->lock(lockNumber);
-
- // Lock or unlock it
- if (mode & CRYPTO_LOCK)
- mutex->lock();
- else
- mutex->unlock();
-}
-static unsigned long id_function()
-{
- return (quintptr)QThread::currentThreadId();
-}
-
-} // extern "C"
-
-static void q_OpenSSL_add_all_algorithms_safe()
-{
-#ifdef Q_OS_WIN
- // Prior to version 1.0.1m an attempt to call OpenSSL_add_all_algorithms on
- // Windows could result in 'exit' call from OPENSSL_config (QTBUG-43843).
- // We can predict this and avoid OPENSSL_add_all_algorithms call.
- // From OpenSSL docs:
- // "An application does not need to add algorithms to use them explicitly,
- // for example by EVP_sha1(). It just needs to add them if it (or any of
- // the functions it calls) needs to lookup algorithms.
- // The cipher and digest lookup functions are used in many parts of the
- // library. If the table is not initialized several functions will
- // misbehave and complain they cannot find algorithms. This includes the
- // PEM, PKCS#12, SSL and S/MIME libraries. This is a common query in
- // the OpenSSL mailing lists."
- //
- // Anyway, as a result, we chose not to call this function if it would exit.
-
- if (q_SSLeay() < 0x100010DFL)
- {
- // Now, before we try to call it, check if an attempt to open config file
- // will result in exit:
- if (char *confFileName = q_CONF_get1_default_config_file()) {
- BIO *confFile = q_BIO_new_file(confFileName, "r");
- const auto lastError = q_ERR_peek_last_error();
- q_CRYPTO_free(confFileName);
- if (confFile) {
- q_BIO_free(confFile);
- } else {
- q_ERR_clear_error();
- if (ERR_GET_REASON(lastError) == ERR_R_SYS_LIB) {
- qCWarning(lcSsl, "failed to open openssl.conf file");
- return;
- }
- }
- }
- }
-#endif // Q_OS_WIN
-
- q_OpenSSL_add_all_algorithms();
-}
-
-
-void QSslSocketPrivate::deinitialize()
-{
- q_CRYPTO_set_id_callback(0);
- q_CRYPTO_set_locking_callback(0);
- q_ERR_free_strings();
-}
-
-
-bool QSslSocketPrivate::ensureLibraryLoaded()
-{
- if (!q_resolveOpenSslSymbols())
- return false;
-
- // Check if the library itself needs to be initialized.
- QMutexLocker locker(openssl_locks()->initLock());
-
- if (!s_libraryLoaded) {
- // Initialize OpenSSL.
- q_CRYPTO_set_id_callback(id_function);
- q_CRYPTO_set_locking_callback(locking_function);
- if (q_SSL_library_init() != 1)
- return false;
- q_SSL_load_error_strings();
- q_OpenSSL_add_all_algorithms_safe();
-
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
- if (q_SSLeay() >= 0x10001000L)
- QSslSocketBackendPrivate::s_indexForSSLExtraData = q_SSL_get_ex_new_index(0L, NULL, NULL, NULL, NULL);
-#endif
-
- // Initialize OpenSSL's random seed.
- if (!q_RAND_status()) {
- qWarning("Random number generator not seeded, disabling SSL support");
- return false;
- }
-
- s_libraryLoaded = true;
- }
- return true;
-}
-
-void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
-{
- QMutexLocker locker(openssl_locks()->initLock());
- if (s_loadedCiphersAndCerts)
- return;
- s_loadedCiphersAndCerts = true;
-
- resetDefaultCiphers();
- resetDefaultEllipticCurves();
-
-#if QT_CONFIG(library)
- //load symbols needed to receive certificates from system store
-#if defined(Q_OS_QNX)
- s_loadRootCertsOnDemand = true;
-#elif defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
- // check whether we can enable on-demand root-cert loading (i.e. check whether the sym links are there)
- QList<QByteArray> dirs = unixRootCertDirectories();
- QStringList symLinkFilter;
- symLinkFilter << QLatin1String("[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].[0-9]");
- for (int a = 0; a < dirs.count(); ++a) {
- QDirIterator iterator(QLatin1String(dirs.at(a)), symLinkFilter, QDir::Files);
- if (iterator.hasNext()) {
- s_loadRootCertsOnDemand = true;
- break;
- }
- }
-#endif
-#endif // QT_CONFIG(library)
- // if on-demand loading was not enabled, load the certs now
- if (!s_loadRootCertsOnDemand)
- setDefaultCaCertificates(systemCaCertificates());
-#ifdef Q_OS_WIN
- //Enabled for fetching additional root certs from windows update on windows 6+
- //This flag is set false by setDefaultCaCertificates() indicating the app uses
- //its own cert bundle rather than the system one.
- //Same logic that disables the unix on demand cert loading.
- //Unlike unix, we do preload the certificates from the cert store.
- s_loadRootCertsOnDemand = true;
-#endif
-}
-
-long QSslSocketPrivate::sslLibraryVersionNumber()
-{
- if (!supportsSsl())
- return 0;
-
- return q_SSLeay();
-}
-
-QString QSslSocketPrivate::sslLibraryVersionString()
-{
- if (!supportsSsl())
- return QString();
-
- const char *versionString = q_SSLeay_version(SSLEAY_VERSION);
- if (!versionString)
- return QString();
-
- return QString::fromLatin1(versionString);
-}
-
-void QSslSocketBackendPrivate::continueHandshake()
-{
- Q_Q(QSslSocket);
- // if we have a max read buffer size, reset the plain socket's to match
- if (readBufferMaxSize)
- plainSocket->setReadBufferSize(readBufferMaxSize);
-
- if (q_SSL_ctrl((ssl), SSL_CTRL_GET_SESSION_REUSED, 0, NULL))
- configuration.peerSessionShared = true;
-
-#ifdef QT_DECRYPT_SSL_TRAFFIC
- if (ssl->session && ssl->s3) {
- const char *mk = reinterpret_cast<const char *>(ssl->session->master_key);
- QByteArray masterKey(mk, ssl->session->master_key_length);
- const char *random = reinterpret_cast<const char *>(ssl->s3->client_random);
- QByteArray clientRandom(random, SSL3_RANDOM_SIZE);
-
- // different format, needed for e.g. older Wireshark versions:
-// const char *sid = reinterpret_cast<const char *>(ssl->session->session_id);
-// QByteArray sessionID(sid, ssl->session->session_id_length);
-// QByteArray debugLineRSA("RSA Session-ID:");
-// debugLineRSA.append(sessionID.toHex().toUpper());
-// debugLineRSA.append(" Master-Key:");
-// debugLineRSA.append(masterKey.toHex().toUpper());
-// debugLineRSA.append("\n");
-
- QByteArray debugLineClientRandom("CLIENT_RANDOM ");
- debugLineClientRandom.append(clientRandom.toHex().toUpper());
- debugLineClientRandom.append(" ");
- debugLineClientRandom.append(masterKey.toHex().toUpper());
- debugLineClientRandom.append("\n");
-
- QString sslKeyFile = QDir::tempPath() + QLatin1String("/qt-ssl-keys");
- QFile file(sslKeyFile);
- if (!file.open(QIODevice::Append))
- qCWarning(lcSsl) << "could not open file" << sslKeyFile << "for appending";
- if (!file.write(debugLineClientRandom))
- qCWarning(lcSsl) << "could not write to file" << sslKeyFile;
- file.close();
- } else {
- qCWarning(lcSsl, "could not decrypt SSL traffic");
- }
-#endif
-
- // Cache this SSL session inside the QSslContext
- if (!(configuration.sslOptions & QSsl::SslOptionDisableSessionSharing)) {
- if (!sslContextPointer->cacheSession(ssl)) {
- sslContextPointer.clear(); // we could not cache the session
- } else {
- // Cache the session for permanent usage as well
- if (!(configuration.sslOptions & QSsl::SslOptionDisableSessionPersistence)) {
- if (!sslContextPointer->sessionASN1().isEmpty())
- configuration.sslSession = sslContextPointer->sessionASN1();
- configuration.sslSessionTicketLifeTimeHint = sslContextPointer->sessionTicketLifeTimeHint();
- }
- }
- }
-
-#if OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_NEXTPROTONEG)
-
- configuration.nextProtocolNegotiationStatus = sslContextPointer->npnContext().status;
- if (sslContextPointer->npnContext().status == QSslConfiguration::NextProtocolNegotiationUnsupported) {
- // we could not agree -> be conservative and use HTTP/1.1
- configuration.nextNegotiatedProtocol = QByteArrayLiteral("http/1.1");
- } else {
- const unsigned char *proto = 0;
- unsigned int proto_len = 0;
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
- if (q_SSLeay() >= 0x10002000L) {
- q_SSL_get0_alpn_selected(ssl, &proto, &proto_len);
- if (proto_len && mode == QSslSocket::SslClientMode) {
- // Client does not have a callback that sets it ...
- configuration.nextProtocolNegotiationStatus = QSslConfiguration::NextProtocolNegotiationNegotiated;
- }
- }
-
- if (!proto_len) { // Test if NPN was more lucky ...
-#else
- {
-#endif
- q_SSL_get0_next_proto_negotiated(ssl, &proto, &proto_len);
- }
-
- if (proto_len)
- configuration.nextNegotiatedProtocol = QByteArray(reinterpret_cast<const char *>(proto), proto_len);
- else
- configuration.nextNegotiatedProtocol.clear();
- }
-#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
-
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
- if (q_SSLeay() >= 0x10002000L && mode == QSslSocket::SslClientMode) {
- EVP_PKEY *key;
- if (q_SSL_get_server_tmp_key(ssl, &key))
- configuration.ephemeralServerKey = QSslKey(key, QSsl::PublicKey);
- }
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ...
-
- connectionEncrypted = true;
- emit q->encrypted();
- if (autoStartHandshake && pendingClose) {
- pendingClose = false;
- q->disconnectFromHost();
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
deleted file mode 100644
index f5626d5d16..0000000000
--- a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
-** 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$
-**
-****************************************************************************/
-
-/****************************************************************************
-**
-** In addition, as a special exception, the copyright holders listed above give
-** permission to link the code of its release of Qt with the OpenSSL project's
-** "OpenSSL" library (or modified versions of the "OpenSSL" library that use the
-** same license as the original version), and distribute the linked executables.
-**
-** You must comply with the GNU General Public License version 2 in all
-** respects for all of the code used other than the "OpenSSL" code. If you
-** modify this file, you may extend this exception to your version of the file,
-** but you are not obligated to do so. If you do not wish to do so, delete
-** this exception statement from your version of this file.
-**
-****************************************************************************/
-
-
-#ifndef QSSLSOCKET_OPENSSLPRE11_SYMBOLS_P_H
-#define QSSLSOCKET_OPENSSLPRE11_SYMBOLS_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.
-//
-
-// Note: this file does not have QT_BEGIN_NAMESPACE/QT_END_NAMESPACE, it's done
-// in qsslsocket_openssl_symbols_p.h.
-
-#ifndef QSSLSOCKET_OPENSSL_SYMBOLS_P_H
-#error "You are not supposed to use this header file, include qsslsocket_openssl_symbols_p.h instead"
-#endif
-
-unsigned char * q_ASN1_STRING_data(ASN1_STRING *a);
-BIO *q_BIO_new_file(const char *filename, const char *mode);
-void q_ERR_clear_error();
-Q_AUTOTEST_EXPORT BIO *q_BIO_new(BIO_METHOD *a);
-Q_AUTOTEST_EXPORT BIO_METHOD *q_BIO_s_mem();
-int q_CRYPTO_num_locks();
-void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int));
-void q_CRYPTO_set_id_callback(unsigned long (*a)());
-void q_CRYPTO_free(void *a);
-int q_CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
-void *q_CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
-unsigned long q_ERR_peek_last_error();
-void q_ERR_free_strings();
-void q_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
-void q_EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
-
-typedef _STACK STACK;
-
-// The typedef we use to make our pre 1.1 code look more like 1.1 (less ifdefs).
-typedef STACK OPENSSL_STACK;
-
-// We resolve q_sk_ functions, but use q_OPENSSL_sk_ macros in code to reduce
-// the amount of #ifdefs.
-int q_sk_num(STACK *a);
-#define q_OPENSSL_sk_num(a) q_sk_num(a)
-void q_sk_pop_free(STACK *a, void (*b)(void *));
-#define q_OPENSSL_sk_pop_free(a, b) q_sk_pop_free(a, b)
-STACK *q_sk_new_null();
-#define q_OPENSSL_sk_new_null() q_sk_new_null()
-
-void q_sk_free(STACK *a);
-
-// Just a name alias (not a function call expression) since in code we take an
-// address of this:
-#define q_OPENSSL_sk_free q_sk_free
-
-void *q_sk_value(STACK *a, int b);
-void q_sk_push(STACK *st, void *data);
-
-#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
-#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
-
-SSL_CTX *q_SSL_CTX_new(const SSL_METHOD *a);
-
-int q_SSL_library_init();
-void q_SSL_load_error_strings();
-
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
-int q_SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
-#endif
-
-const SSL_METHOD *q_SSLv23_client_method();
-const SSL_METHOD *q_TLSv1_client_method();
-const SSL_METHOD *q_TLSv1_1_client_method();
-const SSL_METHOD *q_TLSv1_2_client_method();
-const SSL_METHOD *q_SSLv23_server_method();
-const SSL_METHOD *q_TLSv1_server_method();
-const SSL_METHOD *q_TLSv1_1_server_method();
-const SSL_METHOD *q_TLSv1_2_server_method();
-
-STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
-
-#ifdef SSLEAY_MACROS
-int q_i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
-int q_i2d_RSAPrivateKey(const RSA *a, unsigned char **pp);
-RSA *q_d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length);
-DSA *q_d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length);
-#define q_PEM_read_bio_RSAPrivateKey(bp, x, cb, u) \
- (RSA *)q_PEM_ASN1_read_bio( \
- (void *(*)(void**, const unsigned char**, long int))q_d2i_RSAPrivateKey, PEM_STRING_RSA, bp, (void **)x, cb, u)
-#define q_PEM_read_bio_DSAPrivateKey(bp, x, cb, u) \
- (DSA *)q_PEM_ASN1_read_bio( \
- (void *(*)(void**, const unsigned char**, long int))q_d2i_DSAPrivateKey, PEM_STRING_DSA, bp, (void **)x, cb, u)
-#define q_PEM_write_bio_RSAPrivateKey(bp,x,enc,kstr,klen,cb,u) \
- PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_RSAPrivateKey,PEM_STRING_RSA,\
- bp,(char *)x,enc,kstr,klen,cb,u)
-#define q_PEM_write_bio_DSAPrivateKey(bp,x,enc,kstr,klen,cb,u) \
- PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_DSAPrivateKey,PEM_STRING_DSA,\
- bp,(char *)x,enc,kstr,klen,cb,u)
-#define q_PEM_read_bio_DHparams(bp, dh, cb, u) \
- (DH *)q_PEM_ASN1_read_bio( \
- (void *(*)(void**, const unsigned char**, long int))q_d2i_DHparams, PEM_STRING_DHPARAMS, bp, (void **)x, cb, u)
-#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)
-#define q_X509_getm_notBefore(x) X509_get_notBefore(x)
-
-// "Forward compatibility" with OpenSSL 1.1 (to save on #if-ery elsewhere):
-#define q_X509_get_version(x509) q_ASN1_INTEGER_get((x509)->cert_info->version)
-#define q_ASN1_STRING_get0_data(x) q_ASN1_STRING_data(x)
-#define q_EVP_PKEY_base_id(pkey) ((pkey)->type)
-#define q_X509_get_pubkey(x509) q_X509_PUBKEY_get((x509)->cert_info->key)
-#define q_SSL_SESSION_get_ticket_lifetime_hint(s) ((s)->tlsext_tick_lifetime_hint)
-#define q_RSA_bits(rsa) q_BN_num_bits((rsa)->n)
-#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
-#define q_DH_bits(dsa) q_BN_num_bits((dh)->p)
-#define q_X509_STORE_set_verify_cb(s,c) X509_STORE_set_verify_cb_func((s),(c))
-
-char *q_CONF_get1_default_config_file();
-void q_OPENSSL_add_all_algorithms_noconf();
-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/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index daa9be23f4..1abd18bb32 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -127,7 +127,6 @@ public:
static long sslLibraryBuildVersionNumber();
static QString sslLibraryBuildVersionString();
static void ensureInitialized();
- static void deinitialize();
static QList<QSslCipher> defaultCiphers();
static QList<QSslCipher> supportedCiphers();
static void setDefaultCiphers(const QList<QSslCipher> &ciphers);
diff --git a/src/network/ssl/qsslsocket_schannel.cpp b/src/network/ssl/qsslsocket_schannel.cpp
index c6e3e4d786..f9586b7862 100644
--- a/src/network/ssl/qsslsocket_schannel.cpp
+++ b/src/network/ssl/qsslsocket_schannel.cpp
@@ -431,6 +431,53 @@ QByteArray createAlpnString(const QByteArrayList &nextAllowedProtocols)
return alpnString;
}
#endif // SUPPORTS_ALPN
+
+qint64 readToBuffer(QByteArray &buffer, QTcpSocket *plainSocket)
+{
+ Q_ASSERT(plainSocket);
+ static const qint64 shrinkCutoff = 1024 * 12;
+ static const qint64 defaultRead = 1024 * 16;
+ qint64 bytesRead = 0;
+
+ const auto toRead = std::min(defaultRead, plainSocket->bytesAvailable());
+ if (toRead > 0) {
+ const auto bufferSize = buffer.size();
+ buffer.reserve(bufferSize + toRead); // avoid growth strategy kicking in
+ buffer.resize(bufferSize + toRead);
+ bytesRead = plainSocket->read(buffer.data() + bufferSize, toRead);
+ buffer.resize(bufferSize + bytesRead);
+ // In case of excessive memory usage we shrink:
+ if (buffer.size() < shrinkCutoff && buffer.capacity() > defaultRead)
+ buffer.shrink_to_fit();
+ }
+
+ return bytesRead;
+}
+
+void retainExtraData(QByteArray &buffer, const SecBuffer &secBuffer)
+{
+ Q_ASSERT(secBuffer.BufferType == SECBUFFER_EXTRA);
+ if (int(secBuffer.cbBuffer) >= buffer.size())
+ return;
+
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl, "We got SECBUFFER_EXTRA, will retain %lu bytes", secBuffer.cbBuffer);
+#endif
+ std::move(buffer.end() - secBuffer.cbBuffer, buffer.end(), buffer.begin());
+ buffer.resize(secBuffer.cbBuffer);
+}
+
+qint64 checkIncompleteData(const SecBuffer &secBuffer)
+{
+ if (secBuffer.BufferType == SECBUFFER_MISSING) {
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl, "Need %lu more bytes.", secBuffer.cbBuffer);
+#endif
+ return secBuffer.cbBuffer;
+}
+ return 0;
+}
+
} // anonymous namespace
bool QSslSocketPrivate::s_loadRootCertsOnDemand = true;
@@ -535,7 +582,7 @@ bool QSslSocketBackendPrivate::sendToken(void *token, unsigned long tokenLength,
if (written != qint64(tokenLength)) {
// Failed to write/buffer everything or an error occurred
if (emitError)
- setErrorAndEmit(plainSocket->error(), plainSocket->errorString());
+ setErrorAndEmit(plainSocket->socketError(), plainSocket->errorString());
return false;
}
return true;
@@ -619,8 +666,8 @@ bool QSslSocketBackendPrivate::acquireCredentialsHandle()
nullptr);
if (!chainContext) {
const QString message = isClient
- ? QSslSocket::tr("The certificate provided cannot be used for a client.")
- : QSslSocket::tr("The certificate provided cannot be used for a server.");
+ ? QSslSocket::tr("The certificate provided cannot be used for a client.")
+ : QSslSocket::tr("The certificate provided cannot be used for a server.");
setErrorAndEmit(QAbstractSocket::SocketError::SslInvalidUserDataError, message);
return false;
}
@@ -774,7 +821,11 @@ bool QSslSocketBackendPrivate::acceptContext()
Q_ASSERT(mode == QSslSocket::SslServerMode);
ULONG contextReq = getContextRequirements();
- intermediateBuffer += plainSocket->read(16384);
+ if (missingData > plainSocket->bytesAvailable())
+ return true;
+
+ missingData = 0;
+ readToBuffer(intermediateBuffer, plainSocket);
if (intermediateBuffer.isEmpty())
return true; // definitely need more data..
@@ -830,6 +881,7 @@ bool QSslSocketBackendPrivate::acceptContext()
if (status == SEC_E_INCOMPLETE_MESSAGE) {
// Need more data
+ missingData = checkIncompleteData(outBuffers[0]);
return true;
}
@@ -837,9 +889,9 @@ bool QSslSocketBackendPrivate::acceptContext()
// https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel
// inBuffers[1].cbBuffer indicates the amount of bytes _NOT_ processed, the rest need to
// be stored.
- intermediateBuffer = intermediateBuffer.right(int(inBuffers[1].cbBuffer));
+ retainExtraData(intermediateBuffer, inBuffers[1]);
} else { /* No 'extra' data, message not incomplete */
- intermediateBuffer.clear();
+ intermediateBuffer.resize(0);
}
if (status != SEC_I_CONTINUE_NEEDED) {
@@ -865,11 +917,15 @@ bool QSslSocketBackendPrivate::performHandshake()
Q_ASSERT(schannelState == SchannelState::PerformHandshake);
#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << "Bytes available from socket:" << plainSocket->bytesAvailable();
- qCDebug(lcSsl) << "intermediateBuffer size:" << intermediateBuffer.size();
+ qCDebug(lcSsl, "Bytes available from socket: %lld", plainSocket->bytesAvailable());
+ qCDebug(lcSsl, "intermediateBuffer size: %d", intermediateBuffer.size());
#endif
- intermediateBuffer += plainSocket->read(16384);
+ if (missingData > plainSocket->bytesAvailable())
+ return true;
+
+ missingData = 0;
+ readToBuffer(intermediateBuffer, plainSocket);
if (intermediateBuffer.isEmpty())
return true; // no data, will fail
@@ -918,11 +974,10 @@ bool QSslSocketBackendPrivate::performHandshake()
// https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel
// inputBuffers[1].cbBuffer indicates the amount of bytes _NOT_ processed, the rest need to
// be stored.
- intermediateBuffer = intermediateBuffer.right(int(inputBuffers[1].cbBuffer));
- } else {
+ retainExtraData(intermediateBuffer, inputBuffers[1]);
+ } else if (status != SEC_E_INCOMPLETE_MESSAGE) {
// Clear the buffer if we weren't asked for more data
- if (status != SEC_E_INCOMPLETE_MESSAGE)
- intermediateBuffer.clear();
+ intermediateBuffer.resize(0);
}
switch (status) {
case SEC_E_OK:
@@ -955,6 +1010,7 @@ bool QSslSocketBackendPrivate::performHandshake()
return true;
case SEC_E_INCOMPLETE_MESSAGE:
// Simply incomplete, wait for more data
+ missingData = checkIncompleteData(outBuffers[0]);
return true;
case SEC_E_ALGORITHM_MISMATCH:
setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
@@ -1158,6 +1214,8 @@ void QSslSocketBackendPrivate::reset()
connectionEncrypted = false;
shutdown = false;
renegotiating = false;
+
+ missingData = 0;
}
void QSslSocketBackendPrivate::startClientEncryption()
@@ -1229,13 +1287,12 @@ void QSslSocketBackendPrivate::transmit()
fullMessage.resize(inputBuffers[0].cbBuffer + inputBuffers[1].cbBuffer + inputBuffers[2].cbBuffer);
const qint64 bytesWritten = plainSocket->write(fullMessage);
#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << "Wrote" << bytesWritten << "of total"
- << fullMessage.length() << "bytes";
+ qCDebug(lcSsl, "Wrote %lld of total %d bytes", bytesWritten, fullMessage.length());
#endif
if (bytesWritten >= 0) {
totalBytesWritten += bytesWritten;
} else {
- setErrorAndEmit(plainSocket->error(), plainSocket->errorString());
+ setErrorAndEmit(plainSocket->socketError(), plainSocket->errorString());
return;
}
}
@@ -1255,36 +1312,32 @@ void QSslSocketBackendPrivate::transmit()
int totalRead = 0;
bool hadIncompleteData = false;
while (!readBufferMaxSize || buffer.size() < readBufferMaxSize) {
- QByteArray ciphertext;
- if (intermediateBuffer.length()) {
+ if (missingData > plainSocket->bytesAvailable()) {
#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << "Restoring data from intermediateBuffer:"
- << intermediateBuffer.length() << "bytes";
+ qCDebug(lcSsl, "We're still missing %lld bytes, will check later.", missingData);
#endif
- ciphertext.swap(intermediateBuffer);
+ break;
}
- int initialLength = ciphertext.length();
- ciphertext += plainSocket->read(16384);
+
+ missingData = 0;
+ const qint64 bytesRead = readToBuffer(intermediateBuffer, plainSocket);
#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << "Read" << ciphertext.length() - initialLength
- << "encrypted bytes from the socket";
+ qCDebug(lcSsl, "Read %lld encrypted bytes from the socket", bytesRead);
#endif
- if (ciphertext.length() == 0 || (hadIncompleteData && initialLength == ciphertext.length())) {
+ if (intermediateBuffer.length() == 0 || (hadIncompleteData && bytesRead == 0)) {
#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << (hadIncompleteData ? "No new data received, leaving loop!"
- : "Nothing to decrypt, leaving loop!");
+ qCDebug(lcSsl, (hadIncompleteData ? "No new data received, leaving loop!"
+ : "Nothing to decrypt, leaving loop!"));
#endif
- if (ciphertext.length()) // We have data, it came from intermediateBuffer, swap back
- intermediateBuffer.swap(ciphertext);
break;
}
hadIncompleteData = false;
#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << "Total amount of bytes to decrypt:" << ciphertext.length();
+ qCDebug(lcSsl, "Total amount of bytes to decrypt: %d", intermediateBuffer.length());
#endif
SecBuffer dataBuffer[4]{
- createSecBuffer(ciphertext, SECBUFFER_DATA),
+ createSecBuffer(intermediateBuffer, SECBUFFER_DATA),
createSecBuffer(nullptr, 0, SECBUFFER_EMPTY),
createSecBuffer(nullptr, 0, SECBUFFER_EMPTY),
createSecBuffer(nullptr, 0, SECBUFFER_EMPTY)
@@ -1300,34 +1353,30 @@ void QSslSocketBackendPrivate::transmit()
if (dataBuffer[1].cbBuffer > 0) {
// It is always decrypted in-place.
// But [0] is the STREAM_HEADER, [1] is the DATA and [2] is the STREAM_TRAILER.
- // The pointers in all of those still point into the 'ciphertext' byte array.
+ // The pointers in all of those still point into 'intermediateBuffer'.
buffer.append(static_cast<char *>(dataBuffer[1].pvBuffer),
dataBuffer[1].cbBuffer);
totalRead += dataBuffer[1].cbBuffer;
#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << "Decrypted" << dataBuffer[1].cbBuffer
- << "bytes. New read buffer size:" << buffer.size();
+ qCDebug(lcSsl, "Decrypted %lu bytes. New read buffer size: %d",
+ dataBuffer[1].cbBuffer, buffer.size());
#endif
}
if (dataBuffer[3].BufferType == SECBUFFER_EXTRA) {
// https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel
// dataBuffer[3].cbBuffer indicates the amount of bytes _NOT_ processed,
// the rest need to be stored.
-#ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << "We've got excess data, moving it to the intermediate buffer:"
- << dataBuffer[3].cbBuffer << "bytes";
-#endif
- intermediateBuffer = ciphertext.right(int(dataBuffer[3].cbBuffer));
+ retainExtraData(intermediateBuffer, dataBuffer[3]);
+ } else {
+ intermediateBuffer.resize(0);
}
}
if (status == SEC_E_INCOMPLETE_MESSAGE) {
- // Need more data before we can decrypt.. to the buffer it goes!
+ missingData = checkIncompleteData(dataBuffer[0]);
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl, "We didn't have enough data to decrypt anything, will try again!");
#endif
- Q_ASSERT(intermediateBuffer.isEmpty());
- intermediateBuffer.swap(ciphertext);
// We try again, but if we don't get any more data then we leave
hadIncompleteData = true;
} else if (status == SEC_E_INVALID_HANDLE) {
diff --git a/src/network/ssl/qsslsocket_schannel_p.h b/src/network/ssl/qsslsocket_schannel_p.h
index 6ab200e1f9..a184deef49 100644
--- a/src/network/ssl/qsslsocket_schannel_p.h
+++ b/src/network/ssl/qsslsocket_schannel_p.h
@@ -145,6 +145,7 @@ private:
const CERT_CONTEXT *localCertContext = nullptr;
ULONG contextAttributes = 0;
+ qint64 missingData = 0;
bool renegotiating = false;
};
diff --git a/src/network/ssl/qsslsocket_winrt.cpp b/src/network/ssl/qsslsocket_winrt.cpp
index 39c1ce55e3..f3ca3dc257 100644
--- a/src/network/ssl/qsslsocket_winrt.cpp
+++ b/src/network/ssl/qsslsocket_winrt.cpp
@@ -157,11 +157,6 @@ QSslSocketBackendPrivate::~QSslSocketBackendPrivate()
g->syncCaCertificates(QSet<QSslCertificate>(), previousCaCertificates);
}
-void QSslSocketPrivate::deinitialize()
-{
- Q_UNIMPLEMENTED();
-}
-
bool QSslSocketPrivate::supportsSsl()
{
return true;
diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri
index a9b7197aca..dfbf539303 100644
--- a/src/network/ssl/ssl.pri
+++ b/src/network/ssl/ssl.pri
@@ -102,17 +102,7 @@ qtConfig(ssl) {
qtConfig(ocsp): HEADERS += ssl/qocsp_p.h
- qtConfig(opensslv11) {
- HEADERS += ssl/qsslsocket_openssl11_symbols_p.h
- SOURCES += ssl/qsslsocket_openssl11.cpp \
- ssl/qsslcontext_openssl11.cpp
-
- QMAKE_CXXFLAGS += -DOPENSSL_API_COMPAT=0x10100000L
- } else {
- HEADERS += ssl/qsslsocket_opensslpre11_symbols_p.h
- SOURCES += ssl/qsslsocket_opensslpre11.cpp \
- ssl/qsslcontext_opensslpre11.cpp
- }
+ QMAKE_CXXFLAGS += -DOPENSSL_API_COMPAT=0x10100000L
darwin:SOURCES += ssl/qsslsocket_mac_shared.cpp
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 2d7b0280d8..4108b70094 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -83,7 +83,8 @@ QT_BEGIN_NAMESPACE
class QGLDefaultExtensions
{
public:
- QGLDefaultExtensions() : extensions(0) {
+ QGLDefaultExtensions()
+ {
QGLTemporaryContext tempContext;
Q_ASSERT(QOpenGLContext::currentContext());
QOpenGLExtensions *ext = qgl_extensions();
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index d0f82a85fa..362b3ef189 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -1395,7 +1395,7 @@ bool QGLFramebufferObject::hasOpenGLFramebufferBlit()
Blits from the \a sourceRect rectangle in the \a source framebuffer
object to the \a targetRect rectangle in the \a target framebuffer object.
- If \a source or \a target is 0, the default framebuffer will be used
+ If \a source or \a target is \nullptr, the default framebuffer will be used
instead of a framebuffer object as source or target respectively.
The \a buffers parameter should be a mask consisting of any combination of
diff --git a/src/opengl/qglfunctions.cpp b/src/opengl/qglfunctions.cpp
index f22f9f470b..b20311bec4 100644
--- a/src/opengl/qglfunctions.cpp
+++ b/src/opengl/qglfunctions.cpp
@@ -279,7 +279,7 @@ QGLFunctions::OpenGLFeatures QGLFunctions::openGLFeatures() const
{
QGLFunctionsPrivateEx *d = static_cast<QGLFunctionsPrivateEx *>(d_ptr);
if (!d)
- return 0;
+ return { };
if (d->m_features == -1)
d->m_features = qt_gl_resolve_features();
return QGLFunctions::OpenGLFeatures(d->m_features);
diff --git a/src/platformheaders/nativecontexts/qglxnativecontext.h b/src/platformheaders/nativecontexts/qglxnativecontext.h
index 2b566d127a..989d68eb9e 100644
--- a/src/platformheaders/nativecontexts/qglxnativecontext.h
+++ b/src/platformheaders/nativecontexts/qglxnativecontext.h
@@ -56,13 +56,13 @@ typedef int VisualID;
struct QGLXNativeContext
{
QGLXNativeContext()
- : m_context(0),
- m_display(0),
+ : m_context(nullptr),
+ m_display(nullptr),
m_window(0),
m_visualId(0)
{ }
- QGLXNativeContext(GLXContext ctx, Display *dpy = 0, Window wnd = 0, VisualID vid = 0)
+ QGLXNativeContext(GLXContext ctx, Display *dpy = nullptr, Window wnd = 0, VisualID vid = 0)
: m_context(ctx),
m_display(dpy),
m_window(wnd),
diff --git a/src/platformsupport/accessibility/qaccessiblebridgeutils.cpp b/src/platformsupport/accessibility/qaccessiblebridgeutils.cpp
index f280e65c29..a15b93e31e 100644
--- a/src/platformsupport/accessibility/qaccessiblebridgeutils.cpp
+++ b/src/platformsupport/accessibility/qaccessiblebridgeutils.cpp
@@ -93,7 +93,7 @@ bool performEffectiveAction(QAccessibleInterface *iface, const QString &actionNa
if (!success)
return false;
stepSize = (max - min) / 10; // this is pretty arbitrary, we just need to provide something
- const int typ = currentVariant.type();
+ const int typ = currentVariant.userType();
if (typ != QMetaType::Float && typ != QMetaType::Double) {
// currentValue is an integer. Round it up to ensure stepping in case it was below 1
stepSize = qCeil(stepSize);
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp
index 5ee4773b70..5303d37cee 100644
--- a/src/platformsupport/eglconvenience/qeglconvenience.cpp
+++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp
@@ -281,11 +281,11 @@ EGLConfig QEglConfigChooser::chooseConfig()
}
configureAttributes.append(EGL_NONE);
- EGLConfig cfg = 0;
+ EGLConfig cfg = nullptr;
do {
// Get the number of matching configurations for this set of properties.
EGLint matching = 0;
- if (!eglChooseConfig(display(), configureAttributes.constData(), 0, 0, &matching) || !matching)
+ if (!eglChooseConfig(display(), configureAttributes.constData(), nullptr, 0, &matching) || !matching)
continue;
// Fetch all of the matching configurations and find the
@@ -450,7 +450,7 @@ static struct AttrInfo attrs[] = {
{EGL_BIND_TO_TEXTURE_RGBA, "EGL_BIND_TO_TEXTURE_RGBA"},
{EGL_MIN_SWAP_INTERVAL, "EGL_MIN_SWAP_INTERVAL"},
{EGL_MAX_SWAP_INTERVAL, "EGL_MAX_SWAP_INTERVAL"},
- {-1, 0}};
+ {-1, nullptr}};
void q_printEglConfig(EGLDisplay display, EGLConfig config)
{
diff --git a/src/platformsupport/eglconvenience/qeglpbuffer_p.h b/src/platformsupport/eglconvenience/qeglpbuffer_p.h
index 8ad2eb7248..a137d0d328 100644
--- a/src/platformsupport/eglconvenience/qeglpbuffer_p.h
+++ b/src/platformsupport/eglconvenience/qeglpbuffer_p.h
@@ -60,7 +60,7 @@ class QEGLPbuffer : public QPlatformOffscreenSurface
{
public:
QEGLPbuffer(EGLDisplay display, const QSurfaceFormat &format, QOffscreenSurface *offscreenSurface,
- QEGLPlatformContext::Flags flags = nullptr);
+ QEGLPlatformContext::Flags flags = { });
~QEGLPbuffer();
QSurfaceFormat format() const override { return m_format; }
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 94def16748..63cf771f32 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -137,7 +137,7 @@ void QEGLPlatformContext::init(const QSurfaceFormat &format, QPlatformOpenGLCont
m_format = q_glFormatFromConfig(m_eglDisplay, m_eglConfig, format);
// m_format now has the renderableType() resolved (it cannot be Default anymore)
// but does not yet contain version, profile, options.
- m_shareContext = share ? static_cast<QEGLPlatformContext *>(share)->m_eglContext : 0;
+ m_shareContext = share ? static_cast<QEGLPlatformContext *>(share)->m_eglContext : nullptr;
QVector<EGLint> contextAttrs;
contextAttrs.append(EGL_CONTEXT_CLIENT_VERSION);
@@ -194,8 +194,8 @@ void QEGLPlatformContext::init(const QSurfaceFormat &format, QPlatformOpenGLCont
eglBindAPI(m_api);
m_eglContext = eglCreateContext(m_eglDisplay, m_eglConfig, m_shareContext, contextAttrs.constData());
if (m_eglContext == EGL_NO_CONTEXT && m_shareContext != EGL_NO_CONTEXT) {
- m_shareContext = 0;
- m_eglContext = eglCreateContext(m_eglDisplay, m_eglConfig, 0, contextAttrs.constData());
+ m_shareContext = nullptr;
+ m_eglContext = eglCreateContext(m_eglDisplay, m_eglConfig, nullptr, contextAttrs.constData());
}
if (m_eglContext == EGL_NO_CONTEXT) {
@@ -218,7 +218,7 @@ void QEGLPlatformContext::adopt(const QVariant &nativeHandle, QPlatformOpenGLCon
qWarning("QEGLPlatformContext: Requires a QEGLNativeContext");
return;
}
- QEGLNativeContext handle = nativeHandle.value<QEGLNativeContext>();
+ QEGLNativeContext handle = qvariant_cast<QEGLNativeContext>(nativeHandle);
EGLContext context = handle.context();
if (!context) {
qWarning("QEGLPlatformContext: No EGLContext given");
@@ -262,7 +262,7 @@ void QEGLPlatformContext::adopt(const QVariant &nativeHandle, QPlatformOpenGLCon
}
m_eglContext = context;
- m_shareContext = share ? static_cast<QEGLPlatformContext *>(share)->m_eglContext : 0;
+ m_shareContext = share ? static_cast<QEGLPlatformContext *>(share)->m_eglContext : nullptr;
updateFormatFromGL();
}
@@ -326,7 +326,7 @@ void QEGLPlatformContext::updateFormatFromGL()
EGLBoolean ok = eglMakeCurrent(m_eglDisplay, tempSurface, tempSurface, m_eglContext);
if (!ok) {
EGLConfig config = q_configFromGLFormat(m_eglDisplay, m_format, false, EGL_PBUFFER_BIT);
- tempContext = eglCreateContext(m_eglDisplay, config, 0, m_contextAttrs.constData());
+ tempContext = eglCreateContext(m_eglDisplay, config, nullptr, m_contextAttrs.constData());
if (tempContext != EGL_NO_CONTEXT)
ok = eglMakeCurrent(m_eglDisplay, tempSurface, tempSurface, tempContext);
}
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
index ed77c57df5..f0388cd29c 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
@@ -69,7 +69,7 @@ public:
QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
EGLConfig *config = nullptr, const QVariant &nativeHandle = QVariant(),
- Flags flags = nullptr);
+ Flags flags = { });
~QEGLPlatformContext();
void initialize() override;
diff --git a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp
index a37547f513..20cfb5155e 100644
--- a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp
+++ b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
*/
QWindowsGuiEventDispatcher::QWindowsGuiEventDispatcher(QObject *parent) :
- QEventDispatcherWin32(parent), m_flags(0)
+ QEventDispatcherWin32(parent)
{
setObjectName(QStringLiteral("QWindowsGuiEventDispatcher"));
createInternalHwnd(); // QTBUG-40881: Do not delay registering timers, etc. for QtMfc.
diff --git a/src/platformsupport/fbconvenience/qfbscreen.cpp b/src/platformsupport/fbconvenience/qfbscreen.cpp
index c42fd879f8..76984dfe5c 100644
--- a/src/platformsupport/fbconvenience/qfbscreen.cpp
+++ b/src/platformsupport/fbconvenience/qfbscreen.cpp
@@ -255,7 +255,7 @@ QFbWindow *QFbScreen::windowForId(WId wid) const
QFbScreen::Flags QFbScreen::flags() const
{
- return 0;
+ return { };
}
QT_END_NAMESPACE
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
index 7abf295782..af49ad6407 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
@@ -56,6 +56,8 @@
#include <QtGui/qguiapplication.h>
+#include <QtCore/private/qduplicatetracker_p.h>
+
#include <fontconfig/fontconfig.h>
#if FC_VERSION >= 20402
#include <fontconfig/fcfreetype.h>
@@ -260,7 +262,18 @@ static const char specialLanguages[][6] = {
"", // MasaramGondi
"", // Nushu
"", // Soyombo
- "" // ZanabazarSquare
+ "", // ZanabazarSquare
+ "", // Dogra
+ "", // GunjalaGondi
+ "", // HanifiRohingya
+ "", // Makasar
+ "", // Medefaidrin
+ "", // OldSogdian
+ "", // Sogdian
+ "", // Elymaic
+ "", // Nandinagari
+ "", // NyiakengPuachueHmong
+ "" // Wancho
};
Q_STATIC_ASSERT(sizeof specialLanguages / sizeof *specialLanguages == QChar::ScriptCount);
@@ -349,7 +362,7 @@ Q_STATIC_ASSERT(sizeof(capabilityForWritingSystem) / sizeof(*capabilityForWritin
static const char *getFcFamilyForStyleHint(const QFont::StyleHint style)
{
- const char *stylehint = 0;
+ const char *stylehint = nullptr;
switch (style) {
case QFont::SansSerif:
stylehint = "sans-serif";
@@ -383,7 +396,7 @@ static void populateFromPattern(FcPattern *pattern)
{
QString familyName;
QString familyNameLang;
- FcChar8 *value = 0;
+ FcChar8 *value = nullptr;
int weight_value;
int slant_value;
int spacing_value;
@@ -406,7 +419,7 @@ static void populateFromPattern(FcPattern *pattern)
slant_value = FC_SLANT_ROMAN;
weight_value = FC_WEIGHT_REGULAR;
spacing_value = FC_PROPORTIONAL;
- file_value = 0;
+ file_value = nullptr;
indexValue = 0;
scalable = FcTrue;
@@ -420,20 +433,20 @@ static void populateFromPattern(FcPattern *pattern)
if (FcPatternGetInteger(pattern, FC_SPACING, 0, &spacing_value) != FcResultMatch)
spacing_value = FC_PROPORTIONAL;
if (FcPatternGetString(pattern, FC_FILE, 0, &file_value) != FcResultMatch)
- file_value = 0;
+ file_value = nullptr;
if (FcPatternGetInteger(pattern, FC_INDEX, 0, &indexValue) != FcResultMatch)
indexValue = 0;
if (FcPatternGetBool(pattern, FC_SCALABLE, 0, &scalable) != FcResultMatch)
scalable = FcTrue;
if (FcPatternGetString(pattern, FC_FOUNDRY, 0, &foundry_value) != FcResultMatch)
- foundry_value = 0;
+ foundry_value = nullptr;
if (FcPatternGetString(pattern, FC_STYLE, 0, &style_value) != FcResultMatch)
- style_value = 0;
+ style_value = nullptr;
if (FcPatternGetBool(pattern,FC_ANTIALIAS,0,&antialias) != FcResultMatch)
antialias = true;
QSupportedWritingSystems writingSystems;
- FcLangSet *langset = 0;
+ FcLangSet *langset = nullptr;
FcResult res = FcPatternGetLangSet(pattern, FC_LANG, 0, &langset);
if (res == FcResultMatch) {
bool hasLang = false;
@@ -450,7 +463,7 @@ static void populateFromPattern(FcPattern *pattern)
if (*capabilityForWritingSystem[j] && requiresOpenType(j)) {
if (cap == nullptr)
capRes = FcPatternGetString(pattern, FC_CAPABILITY, 0, &cap);
- if (capRes == FcResultMatch && strstr(reinterpret_cast<const char *>(cap), capabilityForWritingSystem[j]) == 0)
+ if (capRes == FcResultMatch && strstr(reinterpret_cast<const char *>(cap), capabilityForWritingSystem[j]) == nullptr)
continue;
}
#endif
@@ -535,14 +548,14 @@ void QFontconfigDatabase::populateFontDatabase()
#if FC_VERSION >= 20297
FC_CAPABILITY,
#endif
- (const char *)0
+ (const char *)nullptr
};
const char **p = properties;
while (*p) {
FcObjectSetAdd(os, *p);
++p;
}
- fonts = FcFontList(0, pattern, os);
+ fonts = FcFontList(nullptr, pattern, os);
FcObjectSetDestroy(os);
FcPatternDestroy(pattern);
}
@@ -561,7 +574,7 @@ void QFontconfigDatabase::populateFontDatabase()
{ "Serif", "serif", false },
{ "Sans Serif", "sans-serif", false },
{ "Monospace", "monospace", true },
- { 0, 0, false }
+ { nullptr, nullptr, false }
};
const FcDefaultFont *f = defaults;
// aliases only make sense for 'common', not for any of the specials
@@ -570,9 +583,9 @@ void QFontconfigDatabase::populateFontDatabase()
while (f->qtname) {
QString familyQtName = QString::fromLatin1(f->qtname);
- registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleNormal,QFont::Unstretched,true,true,0,f->fixed,ws,0);
- registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleItalic,QFont::Unstretched,true,true,0,f->fixed,ws,0);
- registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleOblique,QFont::Unstretched,true,true,0,f->fixed,ws,0);
+ registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleNormal,QFont::Unstretched,true,true,0,f->fixed,ws,nullptr);
+ registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleItalic,QFont::Unstretched,true,true,0,f->fixed,ws,nullptr);
+ registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleOblique,QFont::Unstretched,true,true,0,f->fixed,ws,nullptr);
++f;
}
@@ -588,7 +601,7 @@ void QFontconfigDatabase::populateFontDatabase()
void QFontconfigDatabase::invalidate()
{
// Clear app fonts.
- FcConfigAppFontClear(0);
+ FcConfigAppFontClear(nullptr);
}
QFontEngineMulti *QFontconfigDatabase::fontEngineMulti(QFontEngine *fontEngine, QChar::Script script)
@@ -680,7 +693,7 @@ QFontEngine::SubpixelAntialiasingType subpixelTypeFromMatch(FcPattern *match, bo
QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, void *usrPtr)
{
if (!usrPtr)
- return 0;
+ return nullptr;
FontFile *fontfile = static_cast<FontFile *> (usrPtr);
QFontEngine::FaceId fid;
@@ -695,7 +708,7 @@ QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, void *usrPtr)
if (!engine->init(fid, engine->antialias, engine->defaultFormat) || engine->invalid()) {
delete engine;
- engine = 0;
+ engine = nullptr;
}
return engine;
@@ -704,8 +717,8 @@ QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, void *usrPtr)
QFontEngine *QFontconfigDatabase::fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference)
{
QFontEngineFT *engine = static_cast<QFontEngineFT*>(QFreeTypeFontDatabase::fontEngine(fontData, pixelSize, hintingPreference));
- if (engine == 0)
- return 0;
+ if (engine == nullptr)
+ return nullptr;
setupFontEngine(engine, engine->fontDef);
@@ -746,7 +759,7 @@ QStringList QFontconfigDatabase::fallbacksForFamily(const QString &family, QFont
// while a Japanese font should be used for that if LANG=ja)
FcPattern *dummy = FcPatternCreate();
FcDefaultSubstitute(dummy);
- FcChar8 *lang = 0;
+ FcChar8 *lang = nullptr;
FcResult res = FcPatternGetString(dummy, FC_LANG, 0, &lang);
if (res == FcResultMatch)
FcPatternAddString(pattern, FC_LANG, lang);
@@ -759,27 +772,26 @@ QStringList QFontconfigDatabase::fallbacksForFamily(const QString &family, QFont
FcPatternAddWeak(pattern, FC_FAMILY, value, FcTrue);
}
- FcConfigSubstitute(0, pattern, FcMatchPattern);
+ FcConfigSubstitute(nullptr, pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);
FcResult result = FcResultMatch;
- FcFontSet *fontSet = FcFontSort(0,pattern,FcFalse,0,&result);
+ FcFontSet *fontSet = FcFontSort(nullptr,pattern,FcFalse,nullptr,&result);
FcPatternDestroy(pattern);
if (fontSet) {
- QSet<QString> duplicates;
+ QDuplicateTracker<QString> duplicates;
duplicates.reserve(fontSet->nfont + 1);
- duplicates.insert(family.toCaseFolded());
+ (void)duplicates.hasSeen(family.toCaseFolded());
for (int i = 0; i < fontSet->nfont; i++) {
- FcChar8 *value = 0;
+ FcChar8 *value = nullptr;
if (FcPatternGetString(fontSet->fonts[i], FC_FAMILY, 0, &value) != FcResultMatch)
continue;
// capitalize(value);
const QString familyName = QString::fromUtf8((const char *)value);
const QString familyNameCF = familyName.toCaseFolded();
- if (!duplicates.contains(familyNameCF)) {
+ if (!duplicates.hasSeen(familyNameCF)) {
fallbackFamilies << familyName;
- duplicates.insert(familyNameCF);
}
}
FcFontSetDestroy(fontSet);
@@ -800,7 +812,7 @@ static FcPattern *queryFont(const FcChar8 *file, const QByteArray &data, int id,
FT_Library lib = qt_getFreetype();
- FcPattern *pattern = 0;
+ FcPattern *pattern = nullptr;
FT_Face face;
if (!FT_New_Memory_Face(lib, (const FT_Byte *)data.constData(), data.size(), id, &face)) {
@@ -819,16 +831,16 @@ QStringList QFontconfigDatabase::addApplicationFont(const QByteArray &fontData,
{
QStringList families;
- FcFontSet *set = FcConfigGetFonts(0, FcSetApplication);
+ FcFontSet *set = FcConfigGetFonts(nullptr, FcSetApplication);
if (!set) {
- FcConfigAppFontAddFile(0, (const FcChar8 *)":/non-existent");
- set = FcConfigGetFonts(0, FcSetApplication); // try again
+ FcConfigAppFontAddFile(nullptr, (const FcChar8 *)":/non-existent");
+ set = FcConfigGetFonts(nullptr, FcSetApplication); // try again
if (!set)
return families;
}
int id = 0;
- FcBlanks *blanks = FcConfigGetBlanks(0);
+ FcBlanks *blanks = FcConfigGetBlanks(nullptr);
int count = 0;
FcPattern *pattern;
@@ -838,7 +850,7 @@ QStringList QFontconfigDatabase::addApplicationFont(const QByteArray &fontData,
if (!pattern)
return families;
- FcChar8 *fam = 0;
+ FcChar8 *fam = nullptr;
if (FcPatternGetString(pattern, FC_FAMILY, 0, &fam) == FcResultMatch) {
QString family = QString::fromUtf8(reinterpret_cast<const char *>(fam));
families << family;
@@ -866,10 +878,10 @@ QString QFontconfigDatabase::resolveFontFamilyAlias(const QString &family) const
const QByteArray cs = family.toUtf8();
FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *) cs.constData());
}
- FcConfigSubstitute(0, pattern, FcMatchPattern);
+ FcConfigSubstitute(nullptr, pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);
- FcChar8 *familyAfterSubstitution = 0;
+ FcChar8 *familyAfterSubstitution = nullptr;
FcPatternGetString(pattern, FC_FAMILY, 0, &familyAfterSubstitution);
resolved = QString::fromUtf8((const char *) familyAfterSubstitution);
FcPatternDestroy(pattern);
@@ -884,7 +896,7 @@ QFont QFontconfigDatabase::defaultFont() const
// or https://bugs.freedesktop.org/show_bug.cgi?id=35482 is fixed
FcPattern *dummy = FcPatternCreate();
FcDefaultSubstitute(dummy);
- FcChar8 *lang = 0;
+ FcChar8 *lang = nullptr;
FcResult res = FcPatternGetString(dummy, FC_LANG, 0, &lang);
FcPattern *pattern = FcPatternCreate();
@@ -893,10 +905,10 @@ QFont QFontconfigDatabase::defaultFont() const
// certain FC_LANG based custom rules may happen in FcConfigSubstitute()
FcPatternAddString(pattern, FC_LANG, lang);
}
- FcConfigSubstitute(0, pattern, FcMatchPattern);
+ FcConfigSubstitute(nullptr, pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);
- FcChar8 *familyAfterSubstitution = 0;
+ FcChar8 *familyAfterSubstitution = nullptr;
FcPatternGetString(pattern, FC_FAMILY, 0, &familyAfterSubstitution);
QString resolved = QString::fromUtf8((const char *) familyAfterSubstitution);
FcPatternDestroy(pattern);
@@ -953,10 +965,10 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef
FcResult result;
- FcConfigSubstitute(0, pattern, FcMatchPattern);
+ FcConfigSubstitute(nullptr, pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);
- FcPattern *match = FcFontMatch(0, pattern, &result);
+ FcPattern *match = FcFontMatch(nullptr, pattern, &result);
if (match) {
engine->setDefaultHintStyle(defaultHintStyleFromMatch((QFont::HintingPreference)fontDef.hintingPreference, match, useXftConf));
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp
index 2fbcb6216e..cbf0793d75 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp
@@ -60,7 +60,7 @@ bool QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter(int at, uint u
{
bool charSetHasChar = true;
FcPattern *matchPattern = getMatchPatternForFallback(at - 1);
- if (matchPattern != 0) {
+ if (matchPattern != nullptr) {
FcCharSet *charSet;
FcPatternGetCharSet(matchPattern, FC_CHARSET, 0, &charSet);
charSetHasChar = FcCharSetHasChar(charSet, ucs4);
@@ -85,7 +85,7 @@ FcPattern * QFontEngineMultiFontConfig::getMatchPatternForFallback(int fallBackI
value.u.s = reinterpret_cast<const FcChar8 *>(cs.data());
FcPatternAdd(requestPattern, FC_FAMILY, value, true);
FcResult result;
- ret = FcFontMatch(0, requestPattern, &result);
+ ret = FcFontMatch(nullptr, requestPattern, &result);
cachedMatchPatterns.insert(fallBackIndex, ret);
FcPatternDestroy(requestPattern);
return ret;
diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
index 8c6cc8fbc1..8273041549 100644
--- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
+++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
@@ -121,7 +121,7 @@ class QtFreetypeData
{
public:
QtFreetypeData()
- : library(0)
+ : library(nullptr)
{ }
~QtFreetypeData();
@@ -135,7 +135,7 @@ QtFreetypeData::~QtFreetypeData()
iter.value()->cleanup();
faces.clear();
FT_Done_FreeType(library);
- library = 0;
+ library = nullptr;
}
Q_GLOBAL_STATIC(QThreadStorage<QtFreetypeData *>, theFreetypeData)
@@ -215,7 +215,7 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
const QByteArray &fontData)
{
if (face_id.filename.isEmpty() && fontData.isEmpty())
- return 0;
+ return nullptr;
QtFreetypeData *freetypeData = qt_getFreetypeData();
@@ -238,7 +238,7 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
} else if (!QFileInfo(fileName).isNativePath()) {
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly)) {
- return 0;
+ return nullptr;
}
newFreetype->fontData = file.readAll();
}
@@ -247,10 +247,10 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
}
if (!newFreetype->fontData.isEmpty()) {
if (FT_New_Memory_Face(freetypeData->library, (const FT_Byte *)newFreetype->fontData.constData(), newFreetype->fontData.size(), face_id.index, &face)) {
- return 0;
+ return nullptr;
}
} else if (FT_New_Face(freetypeData->library, face_id.filename, face_id.index, &face)) {
- return 0;
+ return nullptr;
}
newFreetype->face = face;
@@ -261,8 +261,8 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
newFreetype->matrix.yy = 0x10000;
newFreetype->matrix.xy = 0;
newFreetype->matrix.yx = 0;
- newFreetype->unicode_map = 0;
- newFreetype->symbol_map = 0;
+ newFreetype->unicode_map = nullptr;
+ newFreetype->symbol_map = nullptr;
memset(newFreetype->cmapCache, 0, sizeof(newFreetype->cmapCache));
@@ -307,7 +307,7 @@ void QFreetypeFace::cleanup()
{
hbFace.reset();
FT_Done_Face(face);
- face = 0;
+ face = nullptr;
}
void QFreetypeFace::release(const QFontEngine::FaceId &face_id)
@@ -324,7 +324,7 @@ void QFreetypeFace::release(const QFontEngine::FaceId &face_id)
if (freetypeData->faces.isEmpty()) {
FT_Done_FreeType(freetypeData->library);
- freetypeData->library = 0;
+ freetypeData->library = nullptr;
}
}
@@ -659,7 +659,7 @@ QFontEngineFT *QFontEngineFT::create(const QByteArray &fontData, qreal pixelSize
QFontEngineFTRawData *fe = new QFontEngineFTRawData(fontDef);
if (!fe->initFromData(fontData)) {
delete fe;
- return 0;
+ return nullptr;
}
fe->updateFamilyNameAndStyle();
@@ -682,7 +682,7 @@ QFontEngineFT::QFontEngineFT(const QFontDef &fd)
embolden = false;
obliquen = false;
antialias = true;
- freetype = 0;
+ freetype = nullptr;
default_load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH;
default_hint_style = ftInitialDefaultHintStyle;
subpixelType = Subpixel_None;
@@ -729,7 +729,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
face_id = faceId;
- symbol = freetype->symbol_map != 0;
+ symbol = freetype->symbol_map != nullptr;
PS_FontInfoRec psrec;
// don't assume that type1 fonts are symbol fonts by default
if (FT_Get_PS_Font_Info(freetype->face, &psrec) == FT_Err_Ok) {
@@ -744,12 +744,12 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
bool fake_oblique = (fontDef.style != QFont::StyleNormal) && !(face->style_flags & FT_STYLE_FLAG_ITALIC);
if (fake_oblique)
obliquen = true;
- FT_Set_Transform(face, &matrix, 0);
+ FT_Set_Transform(face, &matrix, nullptr);
freetype->matrix = matrix;
// fake bold
if ((fontDef.weight >= QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face)) {
if (const TT_OS2 *os2 = reinterpret_cast<const TT_OS2 *>(FT_Get_Sfnt_Table(face, ft_sfnt_os2))) {
- if (os2->usWeightClass < 750)
+ if (os2->usWeightClass < 700)
embolden = true;
}
}
@@ -953,7 +953,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
format = defaultFormat != Format_None ? defaultFormat : Format_Mono;
Q_ASSERT(format != Format_None);
- Glyph *g = set ? set->getGlyph(glyph, subPixelPosition) : 0;
+ Glyph *g = set ? set->getGlyph(glyph, subPixelPosition) : nullptr;
if (g && g->format == format && (fetchMetricsOnly || g->data))
return g;
@@ -1051,10 +1051,10 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
// If any of the metrics are too large to fit, don't cache them
if (areMetricsTooLarge(info))
- return 0;
+ return nullptr;
g = new Glyph;
- g->data = 0;
+ g->data = nullptr;
g->linearAdvance = info.linearAdvance;
g->width = info.width;
g->height = info.height;
@@ -1176,12 +1176,12 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
convertRGBToARGB_V(slot->bitmap.buffer, (uint *)glyph_buffer.data(), info.width, info.height, slot->bitmap.pitch, subpixelType != Subpixel_VRGB);
} else {
qWarning("QFontEngine: Glyph rendered in unknown pixel_mode=%d", slot->bitmap.pixel_mode);
- return 0;
+ return nullptr;
}
if (!g) {
g = new Glyph;
- g->data = 0;
+ g->data = nullptr;
}
g->linearAdvance = info.linearAdvance;
@@ -1334,7 +1334,10 @@ void QFontEngineFT::doKerning(QGlyphLayout *g, QFontEngine::ShaperFlags flags) c
}
}
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (shouldUseDesignMetrics(flags) && !(fontDef.styleStrategy & QFont::ForceIntegerMetrics))
+QT_WARNING_POP
flags |= DesignMetrics;
else
flags &= ~DesignMetrics;
@@ -1357,7 +1360,7 @@ static inline FT_Matrix QTransformToFTMatrix(const QTransform &matrix)
QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
{
if (matrix.type() > QTransform::TxShear || !cacheEnabled)
- return 0;
+ return nullptr;
// FT_Set_Transform only supports scalable fonts
if (!FT_IS_SCALABLE(freetype->face))
@@ -1365,7 +1368,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
FT_Matrix m = QTransformToFTMatrix(matrix);
- QGlyphSet *gs = 0;
+ QGlyphSet *gs = nullptr;
for (int i = 0; i < transformedGlyphSets.count(); ++i) {
const QGlyphSet &g = transformedGlyphSets.at(i);
@@ -1393,7 +1396,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
gs->transformationMatrix = m;
gs->outline_drawing = fontDef.pixelSize * fontDef.pixelSize * qAbs(matrix.determinant()) > QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE;
}
- Q_ASSERT(gs != 0);
+ Q_ASSERT(gs != nullptr);
return gs;
}
@@ -1401,7 +1404,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
void QFontEngineFT::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics)
{
FT_Face face = lockFace(Unscaled);
- FT_Set_Transform(face, 0, 0);
+ FT_Set_Transform(face, nullptr, nullptr);
FT_Load_Glyph(face, glyph, FT_LOAD_NO_BITMAP);
int left = face->glyph->metrics.horiBearingX;
@@ -1424,7 +1427,7 @@ void QFontEngineFT::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_me
else
QFreetypeFace::addGlyphToPath(face, face->glyph, p, path, face->units_per_EM << 6, face->units_per_EM << 6);
- FT_Set_Transform(face, &freetype->matrix, 0);
+ FT_Set_Transform(face, &freetype->matrix, nullptr);
unlockFace();
}
@@ -1622,10 +1625,10 @@ glyph_metrics_t QFontEngineFT::scaledBitmapMetrics(const glyph_metrics_t &m, con
void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::ShaperFlags flags) const
{
- FT_Face face = 0;
+ FT_Face face = nullptr;
bool design = shouldUseDesignMetrics(flags);
for (int i = 0; i < glyphs->numGlyphs; i++) {
- Glyph *g = cacheEnabled ? defaultGlyphSet.getGlyph(glyphs->glyphs[i]) : 0;
+ Glyph *g = cacheEnabled ? defaultGlyphSet.getGlyph(glyphs->glyphs[i]) : nullptr;
// Since we are passing Format_None to loadGlyph, use same default format logic as loadGlyph
GlyphFormat acceptableFormat = (defaultFormat != Format_None) ? defaultFormat : Format_Mono;
if (g && g->format == acceptableFormat) {
@@ -1633,7 +1636,7 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::ShaperFlag
} else {
if (!face)
face = lockFace();
- g = loadGlyph(cacheEnabled ? &defaultGlyphSet : 0, glyphs->glyphs[i], 0, Format_None, true);
+ g = loadGlyph(cacheEnabled ? &defaultGlyphSet : nullptr, glyphs->glyphs[i], 0, Format_None, true);
if (g)
glyphs->advances[i] = design ? QFixed::fromFixed(g->linearAdvance) : QFixed(g->advance);
else
@@ -1649,7 +1652,10 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::ShaperFlag
if (face)
unlockFace();
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) {
+QT_WARNING_POP
for (int i = 0; i < glyphs->numGlyphs; ++i)
glyphs->advances[i] = glyphs->advances[i].round();
}
@@ -1657,7 +1663,7 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::ShaperFlag
glyph_metrics_t QFontEngineFT::boundingBox(const QGlyphLayout &glyphs)
{
- FT_Face face = 0;
+ FT_Face face = nullptr;
glyph_metrics_t overall;
// initialize with line height, we get the same behaviour on all platforms
@@ -1672,11 +1678,11 @@ glyph_metrics_t QFontEngineFT::boundingBox(const QGlyphLayout &glyphs)
QFixed ymax = 0;
QFixed xmax = 0;
for (int i = 0; i < glyphs.numGlyphs; i++) {
- Glyph *g = cacheEnabled ? defaultGlyphSet.getGlyph(glyphs.glyphs[i]) : 0;
+ Glyph *g = cacheEnabled ? defaultGlyphSet.getGlyph(glyphs.glyphs[i]) : nullptr;
if (!g) {
if (!face)
face = lockFace();
- g = loadGlyph(cacheEnabled ? &defaultGlyphSet : 0, glyphs.glyphs[i], 0, Format_None, true);
+ g = loadGlyph(cacheEnabled ? &defaultGlyphSet : nullptr, glyphs.glyphs[i], 0, Format_None, true);
}
if (g) {
QFixed x = overall.xoff + glyphs.offsets[i].x + g->x;
@@ -1716,12 +1722,12 @@ glyph_metrics_t QFontEngineFT::boundingBox(const QGlyphLayout &glyphs)
glyph_metrics_t QFontEngineFT::boundingBox(glyph_t glyph)
{
- FT_Face face = 0;
+ FT_Face face = nullptr;
glyph_metrics_t overall;
- Glyph *g = cacheEnabled ? defaultGlyphSet.getGlyph(glyph) : 0;
+ Glyph *g = cacheEnabled ? defaultGlyphSet.getGlyph(glyph) : nullptr;
if (!g) {
face = lockFace();
- g = loadGlyph(cacheEnabled ? &defaultGlyphSet : 0, glyph, 0, Format_None, true);
+ g = loadGlyph(cacheEnabled ? &defaultGlyphSet : nullptr, glyph, 0, Format_None, true);
}
if (g) {
overall.x = g->x;
@@ -1729,7 +1735,10 @@ glyph_metrics_t QFontEngineFT::boundingBox(glyph_t glyph)
overall.width = g->width;
overall.height = g->height;
overall.xoff = g->advance;
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
+QT_WARNING_POP
overall.xoff = overall.xoff.round();
if (!cacheEnabled && g != &emptyGlyph)
delete g;
@@ -1854,10 +1863,10 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyphFor(glyph_t g,
bool disableOutlineDrawing)
{
QGlyphSet *glyphSet = loadGlyphSet(t);
- if (glyphSet != 0 && glyphSet->outline_drawing && !disableOutlineDrawing && !fetchBoundingBox)
- return 0;
+ if (glyphSet != nullptr && glyphSet->outline_drawing && !disableOutlineDrawing && !fetchBoundingBox)
+ return nullptr;
- Glyph *glyph = glyphSet != 0 ? glyphSet->getGlyph(g, subPixelPosition) : 0;
+ Glyph *glyph = glyphSet != nullptr ? glyphSet->getGlyph(g, subPixelPosition) : nullptr;
if (!glyph || glyph->format != format || (!fetchBoundingBox && !glyph->data)) {
QScopedValueRollback<HintStyle> saved_default_hint_style(default_hint_style);
if (t.type() >= QTransform::TxScale && !is2dRotation(t))
@@ -1865,7 +1874,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyphFor(glyph_t g,
lockFace();
FT_Matrix m = this->matrix;
- FT_Matrix ftMatrix = glyphSet != 0 ? glyphSet->transformationMatrix : QTransformToFTMatrix(t);
+ FT_Matrix ftMatrix = glyphSet != nullptr ? glyphSet->transformationMatrix : QTransformToFTMatrix(t);
FT_Matrix_Multiply(&ftMatrix, &m);
freetype->matrix = m;
glyph = loadGlyph(glyphSet, g, subPixelPosition, format, false, disableOutlineDrawing);
@@ -1978,7 +1987,7 @@ FT_Face QFontEngineFT::lockFace(Scaling scale) const
freetype->matrix.xy != matrix.xy ||
freetype->matrix.yx != matrix.yx) {
freetype->matrix = matrix;
- FT_Set_Transform(face, &freetype->matrix, 0);
+ FT_Set_Transform(face, &freetype->matrix, nullptr);
}
return face;
@@ -2017,7 +2026,7 @@ void QFontEngineFT::QGlyphSet::clear()
for (int i = 0; i < 256; ++i) {
if (fast_glyph_data[i]) {
delete fast_glyph_data[i];
- fast_glyph_data[i] = 0;
+ fast_glyph_data[i] = nullptr;
}
}
fast_glyph_count = 0;
@@ -2031,7 +2040,7 @@ void QFontEngineFT::QGlyphSet::removeGlyphFromCache(glyph_t index, QFixed subPix
if (useFastGlyphData(index, subPixelPosition)) {
if (fast_glyph_data[index]) {
delete fast_glyph_data[index];
- fast_glyph_data[index] = 0;
+ fast_glyph_data[index] = nullptr;
if (fast_glyph_count > 0)
--fast_glyph_count;
}
@@ -2056,7 +2065,7 @@ int QFontEngineFT::getPointInOutline(glyph_t glyph, int flags, quint32 point, QF
lockFace();
bool hsubpixel = true;
int vfactor = 1;
- int load_flags = loadFlags(0, Format_A8, flags, hsubpixel, vfactor);
+ int load_flags = loadFlags(nullptr, Format_A8, flags, hsubpixel, vfactor);
int result = freetype->getPointInOutline(glyph, load_flags, point, xpos, ypos, nPoints);
unlockFace();
return result;
@@ -2091,7 +2100,7 @@ QFontEngine *QFontEngineFT::cloneWithSize(qreal pixelSize) const
QFontEngineFT *fe = new QFontEngineFT(fontDef);
if (!fe->initFromFontEngine(this)) {
delete fe;
- return 0;
+ return nullptr;
} else {
return fe;
}
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index 30c80ebd86..ce793dfafa 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -345,7 +345,10 @@ bool QCoreTextFontEngine::stringToCMap(const QChar *str, int len, QGlyphLayout *
glyph_metrics_t QCoreTextFontEngine::boundingBox(const QGlyphLayout &glyphs)
{
QFixed w;
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
bool round = fontDef.styleStrategy & QFont::ForceIntegerMetrics;
+QT_WARNING_POP
for (int i = 0; i < glyphs.numGlyphs; ++i) {
w += round ? glyphs.effectiveAdvance(i).round()
@@ -371,7 +374,10 @@ glyph_metrics_t QCoreTextFontEngine::boundingBox(glyph_t glyph)
ret.xoff = QFixed::fromReal(advances[0].width);
ret.yoff = QFixed::fromReal(advances[0].height);
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) {
+QT_WARNING_POP
ret.xoff = ret.xoff.round();
ret.yoff = ret.yoff.round();
}
@@ -381,9 +387,12 @@ glyph_metrics_t QCoreTextFontEngine::boundingBox(glyph_t glyph)
QFixed QCoreTextFontEngine::ascent() const
{
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
? QFixed::fromReal(CTFontGetAscent(ctfont)).round()
: QFixed::fromReal(CTFontGetAscent(ctfont));
+QT_WARNING_POP
}
QFixed QCoreTextFontEngine::capHeight() const
@@ -392,7 +401,10 @@ QFixed QCoreTextFontEngine::capHeight() const
if (c <= 0)
return calculatedCapHeight();
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
+QT_WARNING_POP
c = c.round();
return c;
@@ -401,28 +413,40 @@ QFixed QCoreTextFontEngine::capHeight() const
QFixed QCoreTextFontEngine::descent() const
{
QFixed d = QFixed::fromReal(CTFontGetDescent(ctfont));
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
+QT_WARNING_POP
d = d.round();
return d;
}
QFixed QCoreTextFontEngine::leading() const
{
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
? QFixed::fromReal(CTFontGetLeading(ctfont)).round()
: QFixed::fromReal(CTFontGetLeading(ctfont));
+QT_WARNING_POP
}
QFixed QCoreTextFontEngine::xHeight() const
{
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
? QFixed::fromReal(CTFontGetXHeight(ctfont)).round()
: QFixed::fromReal(CTFontGetXHeight(ctfont));
+QT_WARNING_POP
}
QFixed QCoreTextFontEngine::averageCharWidth() const
{
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
? avgCharWidth.round() : avgCharWidth;
+QT_WARNING_POP
}
qreal QCoreTextFontEngine::maxCharWidth() const
@@ -917,8 +941,11 @@ void QCoreTextFontEngine::loadAdvancesForGlyphs(QVarLengthArray<CGGlyph> &cgGlyp
for (int i = 0; i < numGlyphs; ++i) {
QFixed advance = QFixed::fromReal(advances[i].width);
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
glyphs->advances[i] = fontDef.styleStrategy & QFont::ForceIntegerMetrics
? advance.round() : advance;
+QT_WARNING_POP
}
}
@@ -1027,7 +1054,10 @@ QFontEngine::Properties QCoreTextFontEngine::properties() const
result.capHeight = QFixed::fromReal(CTFontGetCapHeight(ctfont) * scale);
result.lineWidth = QFixed::fromReal(CTFontGetUnderlineThickness(ctfont) * scale);
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) {
+QT_WARNING_POP
result.ascent = result.ascent.round();
result.descent = result.descent.round();
result.leading = result.leading.round();
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
index 011476cf13..36a94724c1 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
@@ -1069,18 +1069,16 @@ static bool addFontToDatabase(QString familyName,
QString subFamilyName;
QString subFamilyStyle;
- if (ttf) {
- // Look-up names registered in the font
- QFontNames canonicalNames = qt_getCanonicalFontNames(logFont);
- if (qt_localizedName(familyName) && !canonicalNames.name.isEmpty())
- englishName = canonicalNames.name;
- if (!canonicalNames.preferredName.isEmpty()) {
- subFamilyName = familyName;
- subFamilyStyle = styleName;
- faceName = familyName; // Remember the original name for later lookups
- familyName = canonicalNames.preferredName;
- styleName = canonicalNames.preferredStyle;
- }
+ // Look-up names registered in the font
+ QFontNames canonicalNames = qt_getCanonicalFontNames(logFont);
+ if (qt_localizedName(familyName) && !canonicalNames.name.isEmpty())
+ englishName = canonicalNames.name;
+ if (!canonicalNames.preferredName.isEmpty()) {
+ subFamilyName = familyName;
+ subFamilyStyle = styleName;
+ faceName = familyName; // Remember the original name for later lookups
+ familyName = canonicalNames.preferredName;
+ styleName = canonicalNames.preferredStyle;
}
QSupportedWritingSystems writingSystems;
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft.cpp
index a6b7fcf31e..5c2742d295 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft.cpp
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft.cpp
@@ -215,17 +215,15 @@ static bool addFontToDatabase(QString familyName,
QString subFamilyName;
QString subFamilyStyle;
- if (ttf) {
- // Look-up names registered in the font
- QFontNames canonicalNames = qt_getCanonicalFontNames(logFont);
- if (qt_localizedName(familyName) && !canonicalNames.name.isEmpty())
- englishName = canonicalNames.name;
- if (!canonicalNames.preferredName.isEmpty()) {
- subFamilyName = familyName;
- subFamilyStyle = styleName;
- familyName = canonicalNames.preferredName;
- styleName = canonicalNames.preferredStyle;
- }
+ // Look-up names registered in the font
+ QFontNames canonicalNames = qt_getCanonicalFontNames(logFont);
+ if (qt_localizedName(familyName) && !canonicalNames.name.isEmpty())
+ englishName = canonicalNames.name;
+ if (!canonicalNames.preferredName.isEmpty()) {
+ subFamilyName = familyName;
+ subFamilyStyle = styleName;
+ familyName = canonicalNames.preferredName;
+ styleName = canonicalNames.preferredStyle;
}
QSupportedWritingSystems writingSystems;
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
index bc34a77e08..e8f9cfb2a8 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
@@ -461,7 +461,7 @@ bool QWindowsFontEngineDirectWrite::stringToCMap(const QChar *str, int len, QGly
glyphs->numGlyphs = actualLength;
if (!(flags & GlyphIndicesOnly))
- recalcAdvances(glyphs, 0);
+ recalcAdvances(glyphs, {});
return true;
}
@@ -487,7 +487,10 @@ void QWindowsFontEngineDirectWrite::recalcAdvances(QGlyphLayout *glyphs, QFontEn
qreal stretch = fontDef.stretch != QFont::AnyStretch ? fontDef.stretch / 100.0 : 1.0;
for (int i = 0; i < glyphs->numGlyphs; ++i)
glyphs->advances[i] = DESIGN_TO_LOGICAL(glyphMetrics[i].advanceWidth * stretch);
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) {
+QT_WARNING_POP
for (int i = 0; i < glyphs->numGlyphs; ++i)
glyphs->advances[i] = glyphs->advances[i].round();
}
@@ -531,7 +534,10 @@ glyph_metrics_t QWindowsFontEngineDirectWrite::boundingBox(const QGlyphLayout &g
if (glyphs.numGlyphs == 0)
return glyph_metrics_t();
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
bool round = fontDef.styleStrategy & QFont::ForceIntegerMetrics;
+QT_WARNING_POP
QFixed w = 0;
for (int i = 0; i < glyphs.numGlyphs; ++i) {
@@ -557,7 +563,10 @@ glyph_metrics_t QWindowsFontEngineDirectWrite::boundingBox(glyph_t g)
QFixed topSideBearing = DESIGN_TO_LOGICAL(glyphMetrics.topSideBearing);
QFixed bottomSideBearing = DESIGN_TO_LOGICAL(glyphMetrics.bottomSideBearing);
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) {
+QT_WARNING_POP
advanceWidth = advanceWidth.round();
advanceHeight = advanceHeight.round();
}
@@ -579,9 +588,12 @@ glyph_metrics_t QWindowsFontEngineDirectWrite::boundingBox(glyph_t g)
QFixed QWindowsFontEngineDirectWrite::ascent() const
{
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return fontDef.styleStrategy & QFont::ForceIntegerMetrics
? m_ascent.round()
: m_ascent;
+QT_WARNING_POP
}
QFixed QWindowsFontEngineDirectWrite::capHeight() const
@@ -589,37 +601,52 @@ QFixed QWindowsFontEngineDirectWrite::capHeight() const
if (m_capHeight <= 0)
return calculatedCapHeight();
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return fontDef.styleStrategy & QFont::ForceIntegerMetrics
? m_capHeight.round()
: m_capHeight;
+QT_WARNING_POP
}
QFixed QWindowsFontEngineDirectWrite::descent() const
{
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return fontDef.styleStrategy & QFont::ForceIntegerMetrics
? m_descent.round()
: m_descent;
+QT_WARNING_POP
}
QFixed QWindowsFontEngineDirectWrite::leading() const
{
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return fontDef.styleStrategy & QFont::ForceIntegerMetrics
? m_lineGap.round()
: m_lineGap;
+QT_WARNING_POP
}
QFixed QWindowsFontEngineDirectWrite::xHeight() const
{
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return fontDef.styleStrategy & QFont::ForceIntegerMetrics
? m_xHeight.round()
: m_xHeight;
+QT_WARNING_POP
}
qreal QWindowsFontEngineDirectWrite::maxCharWidth() const
{
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return fontDef.styleStrategy & QFont::ForceIntegerMetrics
? m_maxAdvanceWidth.round().toReal()
: m_maxAdvanceWidth.toReal();
+QT_WARNING_POP
}
QImage QWindowsFontEngineDirectWrite::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t)
@@ -696,7 +723,7 @@ QImage QWindowsFontEngineDirectWrite::imageForGlyph(glyph_t t,
&transform,
renderMode,
DWRITE_MEASURING_MODE_NATURAL,
- 0.0, 0.0,
+ margin, margin,
&glyphAnalysis
);
@@ -997,6 +1024,7 @@ glyph_metrics_t QWindowsFontEngineDirectWrite::alphaMapBoundingBox(glyph_t glyph
DWRITE_RENDERING_MODE renderMode =
hintingPreferenceToRenderingMode(QFont::HintingPreference(fontDef.hintingPreference));
+ const int margin = glyphMargin(QFontEngine::Format_A32);
IDWriteGlyphRunAnalysis *glyphAnalysis = NULL;
HRESULT hr = m_fontEngineData->directWriteFactory->CreateGlyphRunAnalysis(
&glyphRun,
@@ -1004,7 +1032,7 @@ glyph_metrics_t QWindowsFontEngineDirectWrite::alphaMapBoundingBox(glyph_t glyph
&transform,
renderMode,
DWRITE_MEASURING_MODE_NATURAL,
- 0.0, 0.0,
+ margin, margin,
&glyphAnalysis
);
@@ -1013,10 +1041,8 @@ glyph_metrics_t QWindowsFontEngineDirectWrite::alphaMapBoundingBox(glyph_t glyph
glyphAnalysis->GetAlphaTextureBounds(DWRITE_TEXTURE_CLEARTYPE_3x1, &rect);
glyphAnalysis->Release();
- int margin = glyphMargin(QFontEngine::Format_A32);
-
- return glyph_metrics_t(rect.left,
- rect.top,
+ return glyph_metrics_t(rect.left - margin,
+ rect.top - margin,
rect.right - rect.left + margin * 2,
rect.bottom - rect.top + margin * 2,
bbox.xoff, bbox.yoff);
diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp
index 81bccb1c25..5387214e8c 100644
--- a/src/platformsupport/glxconvenience/qglxconvenience.cpp
+++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp
@@ -193,7 +193,7 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format
{
QXcbSoftwareOpenGLEnforcer softwareOpenGLEnforcer;
- GLXFBConfig config = 0;
+ GLXFBConfig config = nullptr;
do {
const QVector<int> spec = qglx_buildSpec(format, drawableBit, flags);
@@ -273,7 +273,7 @@ XVisualInfo *qglx_findVisualInfo(Display *display, int screen, QSurfaceFormat *f
{
Q_ASSERT(format);
- XVisualInfo *visualInfo = 0;
+ XVisualInfo *visualInfo = nullptr;
GLXFBConfig config = qglx_findConfig(display, screen, *format, false, drawableBit, flags);
if (config)
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
index 6a53ad2088..a729eeb851 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
+++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
@@ -99,8 +99,7 @@ std::unique_ptr<QEvdevMouseHandler> QEvdevMouseHandler::create(const QString &de
}
QEvdevMouseHandler::QEvdevMouseHandler(const QString &device, int fd, bool abs, bool compression, int jitterLimit)
- : m_device(device), m_fd(fd), m_notify(0), m_x(0), m_y(0), m_prevx(0), m_prevy(0),
- m_abs(abs), m_compression(compression), m_buttons(0), m_prevInvalid(true)
+ : m_device(device), m_fd(fd), m_abs(abs), m_compression(compression)
{
setObjectName(QLatin1String("Evdev Mouse Handler"));
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h b/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h
index 727f1a02f9..93314e885f 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h
+++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h
@@ -84,16 +84,16 @@ private:
QString m_device;
int m_fd;
- QSocketNotifier *m_notify;
- int m_x, m_y;
- int m_prevx, m_prevy;
+ QSocketNotifier *m_notify = nullptr;
+ int m_x = 0, m_y = 0;
+ int m_prevx = 0, m_prevy = 0;
bool m_abs;
bool m_compression;
Qt::MouseButtons m_buttons;
Qt::MouseButton m_button;
QEvent::Type m_eventType;
int m_jitterLimitSquared;
- bool m_prevInvalid;
+ bool m_prevInvalid = true;
int m_hardwareWidth;
int m_hardwareHeight;
qreal m_hardwareScalerY;
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
index c51db59e1f..78728ef4ce 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
@@ -113,16 +113,13 @@ public:
QList<QWindowSystemInterface::TouchPoint> m_lastTouchPoints;
struct Contact {
- int trackingId;
- int x;
- int y;
- int maj;
- int pressure;
- Qt::TouchPointState state;
+ int trackingId = -1;
+ int x = 0;
+ int y = 0;
+ int maj = -1;
+ int pressure = 0;
+ Qt::TouchPointState state = Qt::TouchPointPressed;
QTouchEvent::TouchPoint::InfoFlags flags;
- Contact() : trackingId(-1),
- x(0), y(0), maj(-1), pressure(0),
- state(Qt::TouchPointPressed), flags(0) { }
};
QHash<int, Contact> m_contacts; // The key is a tracking id for type A, slot number for type B.
QHash<int, Contact> m_lastContacts;
diff --git a/src/platformsupport/input/integrityhid/qintegrityhidmanager.h b/src/platformsupport/input/integrityhid/qintegrityhidmanager.h
index 36d7587457..fde5fd7dbb 100644
--- a/src/platformsupport/input/integrityhid/qintegrityhidmanager.h
+++ b/src/platformsupport/input/integrityhid/qintegrityhidmanager.h
@@ -52,7 +52,7 @@ class QIntegrityHIDManager : public QThread
{
Q_OBJECT
public:
- QIntegrityHIDManager(const QString &key, const QString &specification, QObject *parent = 0);
+ QIntegrityHIDManager(const QString &key, const QString &specification, QObject *parent = nullptr);
~QIntegrityHIDManager();
void run(void);
diff --git a/src/platformsupport/input/libinput/qlibinputtouch.cpp b/src/platformsupport/input/libinput/qlibinputtouch.cpp
index e1abd44eb5..446218e4b3 100644
--- a/src/platformsupport/input/libinput/qlibinputtouch.cpp
+++ b/src/platformsupport/input/libinput/qlibinputtouch.cpp
@@ -166,7 +166,7 @@ void QLibInputTouch::processTouchUp(libinput_event_touch *e)
if (tp) {
tp->state = Qt::TouchPointReleased;
// There may not be a Frame event after the last Up. Work this around.
- Qt::TouchPointStates s = 0;
+ Qt::TouchPointStates s;
for (int i = 0; i < state->m_points.count(); ++i)
s |= state->m_points.at(i).state;
if (s == Qt::TouchPointReleased)
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice.cpp b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
index 6121faf362..18f7b5e23b 100644
--- a/src/platformsupport/kmsconvenience/qkmsdevice.cpp
+++ b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
@@ -176,6 +176,15 @@ static bool parseModeline(const QByteArray &text, drmModeModeInfoPtr mode)
return true;
}
+static inline void assignPlane(QKmsOutput *output, QKmsPlane *plane)
+{
+ if (output->eglfs_plane)
+ output->eglfs_plane->activeCrtcId = 0;
+
+ plane->activeCrtcId = output->crtc_id;
+ output->eglfs_plane = plane;
+}
+
QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
drmModeConnectorPtr connector,
ScreenInfo *vinfo)
@@ -253,7 +262,7 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
// Get the current mode on the current crtc
drmModeModeInfo crtc_mode;
memset(&crtc_mode, 0, sizeof crtc_mode);
- if (drmModeEncoderPtr encoder = drmModeGetEncoder(m_dri_fd, connector->connector_id)) {
+ if (drmModeEncoderPtr encoder = drmModeGetEncoder(m_dri_fd, connector->encoder_id)) {
drmModeCrtcPtr crtc = drmModeGetCrtc(m_dri_fd, encoder->crtc_id);
drmModeFreeEncoder(encoder);
@@ -449,13 +458,16 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
#endif
QString planeListStr;
- for (const QKmsPlane &plane : qAsConst(m_planes)) {
+ for (QKmsPlane &plane : m_planes) {
if (plane.possibleCrtcs & (1 << output.crtc_index)) {
output.available_planes.append(plane);
planeListStr.append(QString::number(plane.id));
planeListStr.append(QLatin1Char(' '));
- if (plane.type == QKmsPlane::PrimaryPlane)
- output.eglfs_plane = (QKmsPlane*)&plane;
+
+ // Choose the first primary plane that is not already assigned to
+ // another screen's associated crtc.
+ if (!output.eglfs_plane && plane.type == QKmsPlane::PrimaryPlane && !plane.activeCrtcId)
+ assignPlane(&output, &plane);
}
}
qCDebug(qLcKmsDebug, "Output %s can use %d planes: %s",
@@ -477,9 +489,11 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
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;
+ for (QKmsPlane &kmsplane : m_planes) {
+ if (kmsplane.id == output.forced_plane_id) {
+ assignPlane(&output, &kmsplane);
+ break;
+ }
}
drmModeFreePlane(plane);
@@ -490,8 +504,37 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
}
}
- if (output.eglfs_plane)
- qCDebug(qLcKmsDebug, "Output eglfs plane is: %d", output.eglfs_plane->id);
+ // A more useful version: allows specifying "crtc_id,plane_id:crtc_id,plane_id:..."
+ // in order to allow overriding the plane used for a given crtc.
+ if (qEnvironmentVariableIsSet("QT_QPA_EGLFS_KMS_PLANES_FOR_CRTCS")) {
+ const QString val = qEnvironmentVariable("QT_QPA_EGLFS_KMS_PLANES_FOR_CRTCS");
+ qCDebug(qLcKmsDebug, "crtc_id:plane_id override list: %s", qPrintable(val));
+ const QStringList crtcPlanePairs = val.split(QLatin1Char(':'));
+ for (const QString &crtcPlanePair : crtcPlanePairs) {
+ const QStringList values = crtcPlanePair.split(QLatin1Char(','));
+ if (values.count() == 2 && uint(values[0].toInt()) == output.crtc_id) {
+ uint planeId = values[1].toInt();
+ for (QKmsPlane &kmsplane : m_planes) {
+ if (kmsplane.id == planeId) {
+ assignPlane(&output, &kmsplane);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if (output.eglfs_plane) {
+ qCDebug(qLcKmsDebug, "Chose plane %u for output %s (crtc id %u) (may not be applicable)",
+ output.eglfs_plane->id, connectorName.constData(), output.crtc_id);
+ }
+
+#if QT_CONFIG(drm_atomic)
+ if (hasAtomicSupport() && !output.eglfs_plane) {
+ qCDebug(qLcKmsDebug, "No plane associated with output %s (crtc id %u) and atomic modesetting is enabled. This is bad.",
+ connectorName.constData(), output.crtc_id);
+ }
+#endif
m_crtc_allocator |= (1 << output.crtc_index);
@@ -538,10 +581,6 @@ QKmsDevice::QKmsDevice(QKmsScreenConfig *screenConfig, const QString &path)
, 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()) {
@@ -557,7 +596,7 @@ QKmsDevice::QKmsDevice(QKmsScreenConfig *screenConfig, const QString &path)
QKmsDevice::~QKmsDevice()
{
#if QT_CONFIG(drm_atomic)
- atomicReset();
+ threadLocalAtomicReset();
#endif
}
@@ -834,7 +873,7 @@ void QKmsDevice::discoverPlanes()
plane.type = QKmsPlane::Type(value);
} else if (!strcmp(prop->name, "rotation")) {
plane.initialRotation = QKmsPlane::Rotations(int(value));
- plane.availableRotations = 0;
+ plane.availableRotations = { };
if (propTypeIs(prop, DRM_MODE_PROP_BITMASK)) {
for (int i = 0; i < prop->count_enums; ++i)
plane.availableRotations |= QKmsPlane::Rotation(1 << prop->enums[i].value);
@@ -897,39 +936,51 @@ bool QKmsDevice::hasAtomicSupport()
}
#if QT_CONFIG(drm_atomic)
-drmModeAtomicReq * QKmsDevice::atomic_request()
+drmModeAtomicReq *QKmsDevice::threadLocalAtomicRequest()
{
- if (!m_atomic_request && m_has_atomic_support)
- m_atomic_request = drmModeAtomicAlloc();
+ if (!m_has_atomic_support)
+ return nullptr;
+
+ AtomicReqs &a(m_atomicReqs.localData());
+ if (!a.request)
+ a.request = drmModeAtomicAlloc();
- return m_atomic_request;
+ return a.request;
}
-bool QKmsDevice::atomicCommit(void *user_data)
+bool QKmsDevice::threadLocalAtomicCommit(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 (!m_has_atomic_support)
+ return false;
- if (ret) {
- qWarning("Failed to commit atomic request (code=%d)", ret);
- return false;
- }
+ AtomicReqs &a(m_atomicReqs.localData());
+ if (!a.request)
+ return false;
- m_previous_request = m_atomic_request;
- m_atomic_request = nullptr;
+ int ret = drmModeAtomicCommit(m_dri_fd, a.request,
+ DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET,
+ user_data);
- return true;
+ if (ret) {
+ qWarning("Failed to commit atomic request (code=%d)", ret);
+ return false;
}
- return false;
+ a.previous_request = a.request;
+ a.request = nullptr;
+
+ return true;
}
-void QKmsDevice::atomicReset()
+void QKmsDevice::threadLocalAtomicReset()
{
- if (m_previous_request) {
- drmModeAtomicFree(m_previous_request);
- m_previous_request = nullptr;
+ if (!m_has_atomic_support)
+ return;
+
+ AtomicReqs &a(m_atomicReqs.localData());
+ if (a.previous_request) {
+ drmModeAtomicFree(a.previous_request);
+ a.previous_request = nullptr;
}
}
#endif
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice_p.h b/src/platformsupport/kmsconvenience/qkmsdevice_p.h
index b1150e2875..55a590cfce 100644
--- a/src/platformsupport/kmsconvenience/qkmsdevice_p.h
+++ b/src/platformsupport/kmsconvenience/qkmsdevice_p.h
@@ -57,6 +57,7 @@
#include <qpa/qplatformscreen.h>
#include <QtCore/QMap>
#include <QtCore/QVariant>
+#include <QtCore/QThreadStorage>
#include <xf86drm.h>
#include <xf86drmMode.h>
@@ -179,6 +180,8 @@ struct QKmsPlane
uint32_t crtcheightPropertyId = 0;
uint32_t zposPropertyId = 0;
uint32_t blendOpPropertyId = 0;
+
+ uint32_t activeCrtcId = 0;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QKmsPlane::Rotations)
@@ -239,10 +242,9 @@ public:
bool hasAtomicSupport();
#if QT_CONFIG(drm_atomic)
- bool atomicCommit(void *user_data);
- void atomicReset();
-
- drmModeAtomicReq *atomic_request();
+ drmModeAtomicReq *threadLocalAtomicRequest();
+ bool threadLocalAtomicCommit(void *user_data);
+ void threadLocalAtomicReset();
#endif
void createScreens();
@@ -282,8 +284,11 @@ protected:
bool m_has_atomic_support;
#if QT_CONFIG(drm_atomic)
- drmModeAtomicReq *m_atomic_request;
- drmModeAtomicReq *m_previous_request;
+ struct AtomicReqs {
+ drmModeAtomicReq *request = nullptr;
+ drmModeAtomicReq *previous_request = nullptr;
+ };
+ QThreadStorage<AtomicReqs> m_atomicReqs;
#endif
quint32 m_crtc_allocator;
diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
index 4a83c6eb80..012edc82e4 100644
--- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
+++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
@@ -2230,7 +2230,7 @@ bool AtSpiAdaptor::valueInterface(QAccessibleInterface *interface, const QString
return false;
if (function == QLatin1String("SetCurrentValue")) {
- QDBusVariant v = message.arguments().at(2).value<QDBusVariant>();
+ QDBusVariant v = qvariant_cast<QDBusVariant>(message.arguments().at(2));
double value = v.variant().toDouble();
//Temporary fix
//See https://bugzilla.gnome.org/show_bug.cgi?id=652596
@@ -2250,7 +2250,7 @@ bool AtSpiAdaptor::valueInterface(QAccessibleInterface *interface, const QString
qCDebug(lcAccessibilityAtspi) << "WARNING: AtSpiAdaptor::valueInterface does not implement " << function << message.path();
return false;
}
- if (!value.canConvert(QVariant::Double)) {
+ if (!value.canConvert(QMetaType::Double)) {
qCDebug(lcAccessibilityAtspi) << "AtSpiAdaptor::valueInterface: Could not convert to double: " << function;
}
diff --git a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp
index 82a13d2fa0..ccf2180dc5 100644
--- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp
+++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenutypes.cpp
@@ -152,7 +152,7 @@ const QDBusArgument &operator>>(const QDBusArgument &arg, QDBusMenuLayoutItem &i
while (!arg.atEnd()) {
QDBusVariant dbusVariant;
arg >> dbusVariant;
- QDBusArgument childArgument = dbusVariant.variant().value<QDBusArgument>();
+ QDBusArgument childArgument = qvariant_cast<QDBusArgument>(dbusVariant.variant());
QDBusMenuLayoutItem child;
childArgument >> child;
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index 70d5616075..36d9e4e065 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -517,7 +517,7 @@ QFont *QKdeThemePrivate::kdeFont(const QVariant &fontValue)
// causing recursion.
QString fontDescription;
QString fontFamily;
- if (fontValue.type() == QVariant::StringList) {
+ if (fontValue.userType() == QMetaType::QStringList) {
const QStringList list = fontValue.toStringList();
if (!list.isEmpty()) {
fontFamily = list.first();
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
index c0da9d8370..f6acf00f39 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
@@ -109,7 +109,7 @@ public:
QVariant themeHint(ThemeHint hint) const override;
QIcon fileIcon(const QFileInfo &fileInfo,
- QPlatformTheme::IconOptions iconOptions = nullptr) const override;
+ QPlatformTheme::IconOptions iconOptions = { }) const override;
const QPalette *palette(Palette type = SystemPalette) const override;
@@ -134,7 +134,7 @@ public:
QGnomeTheme();
QVariant themeHint(ThemeHint hint) const override;
QIcon fileIcon(const QFileInfo &fileInfo,
- QPlatformTheme::IconOptions = nullptr) const override;
+ QPlatformTheme::IconOptions = { }) const override;
const QFont *font(Font type) const override;
QString standardButtonText(int button) const override;
diff --git a/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp b/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp
index 68340a3173..6f6ba58319 100644
--- a/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp
+++ b/src/platformsupport/vkconvenience/qbasicvulkanplatforminstance.cpp
@@ -214,6 +214,22 @@ void QBasicPlatformVulkanInstance::initInstance(QVulkanInstance *instance, const
for (const QByteArray &ext : extraExts)
m_enabledExtensions.append(ext);
+ QByteArray envExts = qgetenv("QT_VULKAN_INSTANCE_EXTENSIONS");
+ if (!envExts.isEmpty()) {
+ QByteArrayList envExtList = envExts.split(';');
+ for (auto ext : m_enabledExtensions)
+ envExtList.removeAll(ext);
+ m_enabledExtensions.append(envExtList);
+ }
+
+ QByteArray envLayers = qgetenv("QT_VULKAN_INSTANCE_LAYERS");
+ if (!envLayers.isEmpty()) {
+ QByteArrayList envLayerList = envLayers.split(';');
+ for (auto ext : m_enabledLayers)
+ envLayerList.removeAll(ext);
+ m_enabledLayers.append(envLayerList);
+ }
+
// No clever stuff with QSet and friends: the order for layers matters
// and the user-provided order must be kept.
for (int i = 0; i < m_enabledLayers.count(); ++i) {
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index e74b1cf744..85a9f9b9e0 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -250,7 +250,7 @@ void QNetworkManagerEngine::interfacePropertiesChanged(const QMap<QString, QVari
if (i.key() == QLatin1String("ActiveConnections")) {
// Active connections changed, update configurations.
- const auto activeConnections = qdbus_cast<QList<QDBusObjectPath> >(i.value().value<QDBusArgument>());
+ const auto activeConnections = qdbus_cast<QList<QDBusObjectPath> >(qvariant_cast<QDBusArgument>(i.value()));
QStringList identifiers = accessPointConfigurations.keys();
QStringList priorActiveConnections = activeConnectionsList.keys();
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
index 35199eb7a2..2d6cba1791 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
@@ -193,7 +193,7 @@ QList <QDBusObjectPath> QNetworkManagerInterface::activeConnections() const
{
if (propertyMap.contains("ActiveConnections")) {
- const QDBusArgument &dbusArgs = propertyMap.value("ActiveConnections").value<QDBusArgument>();
+ const QDBusArgument &dbusArgs = qvariant_cast<QDBusArgument>(propertyMap.value("ActiveConnections"));
QDBusObjectPath path;
QList <QDBusObjectPath> list;
@@ -403,7 +403,7 @@ quint32 QNetworkManagerInterfaceDevice::deviceType() const
QDBusObjectPath QNetworkManagerInterfaceDevice::ip4config() const
{
if (propertyMap.contains("Ip4Config"))
- return propertyMap.value("Ip4Config").value<QDBusObjectPath>();
+ return qvariant_cast<QDBusObjectPath>(propertyMap.value("Ip4Config"));
return QDBusObjectPath();
}
@@ -411,7 +411,7 @@ void QNetworkManagerInterfaceDevice::propertiesSwap(QMap<QString,QVariant> map)
{
for (auto i = map.cbegin(), end = map.cend(); i != end; ++i) {
if (i.key() == QLatin1String("AvailableConnections")) { //Device
- const QDBusArgument &dbusArgs = i.value().value<QDBusArgument>();
+ const QDBusArgument &dbusArgs = qvariant_cast<QDBusArgument>(i.value());
QDBusObjectPath path;
QStringList paths;
dbusArgs.beginArray();
@@ -489,7 +489,7 @@ QStringList QNetworkManagerInterfaceDeviceWired::availableConnections()
{
QStringList list;
if (propertyMap.contains("AvailableConnections")) {
- const QDBusArgument &dbusArgs = propertyMap.value("Carrier").value<QDBusArgument>();
+ const QDBusArgument &dbusArgs = qvariant_cast<QDBusArgument>(propertyMap.value("Carrier"));
QDBusObjectPath path;
dbusArgs.beginArray();
while (!dbusArgs.atEnd()) {
@@ -598,7 +598,7 @@ quint32 QNetworkManagerInterfaceDeviceWireless::bitrate() const
QDBusObjectPath QNetworkManagerInterfaceDeviceWireless::activeAccessPoint() const
{
if (propertyMap.contains("ActiveAccessPoint"))
- return propertyMap.value("ActiveAccessPoint").value<QDBusObjectPath>();
+ return qvariant_cast<QDBusObjectPath>(propertyMap.value("ActiveAccessPoint"));
return QDBusObjectPath();
}
@@ -931,14 +931,14 @@ QNetworkManagerConnectionActive::~QNetworkManagerConnectionActive()
QDBusObjectPath QNetworkManagerConnectionActive::connection() const
{
if (propertyMap.contains("Connection"))
- return propertyMap.value("Connection").value<QDBusObjectPath>();
+ return qvariant_cast<QDBusObjectPath>(propertyMap.value("Connection"));
return QDBusObjectPath();
}
QDBusObjectPath QNetworkManagerConnectionActive::specificObject() const
{
if (propertyMap.contains("SpecificObject"))
- return propertyMap.value("SpecificObject").value<QDBusObjectPath>();
+ return qvariant_cast<QDBusObjectPath>(propertyMap.value("SpecificObject"));
return QDBusObjectPath();
}
@@ -946,7 +946,7 @@ QStringList QNetworkManagerConnectionActive::devices() const
{
QStringList list;
if (propertyMap.contains("Devices")) {
- const QDBusArgument &dbusArgs = propertyMap.value("Devices").value<QDBusArgument>();
+ const QDBusArgument &dbusArgs = qvariant_cast<QDBusArgument>(propertyMap.value("Devices"));
QDBusObjectPath path;
dbusArgs.beginArray();
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index c6b678ab20..8eba9ccc42 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -65,7 +65,7 @@ static QBearerEngineImpl *getEngineFromId(const QString &id)
}
}
- return 0;
+ return nullptr;
}
class QNetworkSessionManagerPrivate : public QObject
@@ -73,7 +73,7 @@ class QNetworkSessionManagerPrivate : public QObject
Q_OBJECT
public:
- QNetworkSessionManagerPrivate(QObject *parent = 0) : QObject(parent) {}
+ QNetworkSessionManagerPrivate(QObject *parent = nullptr) : QObject(parent) {}
~QNetworkSessionManagerPrivate() {}
inline void forceSessionClose(const QNetworkConfiguration &config)
@@ -119,7 +119,7 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface()
// Defer setting serviceConfig and activeConfig until open().
Q_FALLTHROUGH();
default:
- engine = 0;
+ engine = nullptr;
}
networkConfigurationsChanged();
diff --git a/src/plugins/generic/tuiotouch/qtuiohandler.cpp b/src/plugins/generic/tuiotouch/qtuiohandler.cpp
index cb82672acd..6ad4597b19 100644
--- a/src/plugins/generic/tuiotouch/qtuiohandler.cpp
+++ b/src/plugins/generic/tuiotouch/qtuiohandler.cpp
@@ -226,7 +226,7 @@ void QTuioHandler::process2DCurSource(const QOscMessage &message)
return;
}
- if (QMetaType::Type(arguments.at(1).type()) != QMetaType::QByteArray) {
+ if (QMetaType::Type(arguments.at(1).userType()) != QMetaType::QByteArray) {
qCWarning(lcTuioSource, "Ignoring malformed TUIO source message (bad argument type)");
return;
}
@@ -248,7 +248,7 @@ void QTuioHandler::process2DCurAlive(const QOscMessage &message)
QMap<int, QTuioCursor> newActiveCursors;
for (int i = 1; i < arguments.count(); ++i) {
- if (QMetaType::Type(arguments.at(i).type()) != QMetaType::Int) {
+ if (QMetaType::Type(arguments.at(i).userType()) != QMetaType::Int) {
qCWarning(lcTuioHandler) << "Ignoring malformed TUIO alive message (bad argument on position" << i << arguments << ')';
return;
}
@@ -293,12 +293,12 @@ void QTuioHandler::process2DCurSet(const QOscMessage &message)
return;
}
- if (QMetaType::Type(arguments.at(1).type()) != QMetaType::Int ||
- QMetaType::Type(arguments.at(2).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(3).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(4).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(5).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(6).type()) != QMetaType::Float
+ if (QMetaType::Type(arguments.at(1).userType()) != QMetaType::Int ||
+ QMetaType::Type(arguments.at(2).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(3).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(4).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(5).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(6).userType()) != QMetaType::Float
) {
qCWarning(lcTuioSet) << "Ignoring malformed TUIO set message with bad types: " << arguments;
return;
@@ -391,7 +391,7 @@ void QTuioHandler::process2DObjSource(const QOscMessage &message)
return;
}
- if (QMetaType::Type(arguments.at(1).type()) != QMetaType::QByteArray) {
+ if (QMetaType::Type(arguments.at(1).userType()) != QMetaType::QByteArray) {
qCWarning(lcTuioSource, "Ignoring malformed TUIO source message (bad argument type)");
return;
}
@@ -413,7 +413,7 @@ void QTuioHandler::process2DObjAlive(const QOscMessage &message)
QMap<int, QTuioToken> newActiveTokens;
for (int i = 1; i < arguments.count(); ++i) {
- if (QMetaType::Type(arguments.at(i).type()) != QMetaType::Int) {
+ if (QMetaType::Type(arguments.at(i).userType()) != QMetaType::Int) {
qCWarning(lcTuioHandler) << "Ignoring malformed TUIO alive message (bad argument on position" << i << arguments << ')';
return;
}
@@ -458,16 +458,16 @@ void QTuioHandler::process2DObjSet(const QOscMessage &message)
return;
}
- if (QMetaType::Type(arguments.at(1).type()) != QMetaType::Int ||
- QMetaType::Type(arguments.at(2).type()) != QMetaType::Int ||
- QMetaType::Type(arguments.at(3).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(4).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(5).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(6).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(7).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(8).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(9).type()) != QMetaType::Float ||
- QMetaType::Type(arguments.at(10).type()) != QMetaType::Float) {
+ if (QMetaType::Type(arguments.at(1).userType()) != QMetaType::Int ||
+ QMetaType::Type(arguments.at(2).userType()) != QMetaType::Int ||
+ QMetaType::Type(arguments.at(3).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(4).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(5).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(6).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(7).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(8).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(9).userType()) != QMetaType::Float ||
+ QMetaType::Type(arguments.at(10).userType()) != QMetaType::Float) {
qCWarning(lcTuioSet) << "Ignoring malformed TUIO set message with bad types: " << arguments;
return;
}
diff --git a/src/plugins/imageformats/gif/main.cpp b/src/plugins/imageformats/gif/main.cpp
index c171111fac..993871420c 100644
--- a/src/plugins/imageformats/gif/main.cpp
+++ b/src/plugins/imageformats/gif/main.cpp
@@ -62,7 +62,7 @@ QImageIOPlugin::Capabilities QGifPlugin::capabilities(QIODevice *device, const Q
{
if (format == "gif" || (device && device->isReadable() && QGifHandler::canRead(device)))
return Capabilities(CanRead);
- return 0;
+ return { };
}
QImageIOHandler *QGifPlugin::create(QIODevice *device, const QByteArray &format) const
diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp
index a6029b691c..c92cc3ea61 100644
--- a/src/plugins/imageformats/gif/qgifhandler.cpp
+++ b/src/plugins/imageformats/gif/qgifhandler.cpp
@@ -147,8 +147,8 @@ private:
*/
QGIFFormat::QGIFFormat()
{
- globalcmap = 0;
- localcmap = 0;
+ globalcmap = nullptr;
+ localcmap = nullptr;
lncols = 0;
gncols = 0;
disposal = NoDisposal;
@@ -160,9 +160,9 @@ QGIFFormat::QGIFFormat()
lcmap = false;
newFrame = false;
partialNewFrame = false;
- table[0] = 0;
- table[1] = 0;
- stack = 0;
+ table[0] = nullptr;
+ table[1] = nullptr;
+ stack = nullptr;
}
/*!
@@ -550,7 +550,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
}
oldcode=incode;
const int h = image->height();
- QRgb *line = 0;
+ QRgb *line = nullptr;
if (!out_of_bounds && h > y)
line = (QRgb*)FAST_SCAN_LINE(bits, bpl, y);
while (sp>stack) {
diff --git a/src/plugins/imageformats/ico/main.cpp b/src/plugins/imageformats/ico/main.cpp
index baaf33e1fc..b00d8c7fd3 100644
--- a/src/plugins/imageformats/ico/main.cpp
+++ b/src/plugins/imageformats/ico/main.cpp
@@ -46,9 +46,9 @@ QImageIOPlugin::Capabilities QICOPlugin::capabilities(QIODevice *device, const Q
if (format == "ico" || format == "cur")
return Capabilities(CanRead | CanWrite);
if (!format.isEmpty())
- return 0;
+ return { };
if (!device->isOpen())
- return 0;
+ return { };
Capabilities cap;
if (device->isReadable() && QtIcoHandler::canRead(device))
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index c8e31dceac..eb50f52bd6 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -535,8 +535,6 @@ QImage ICOReader::iconAt(int index)
if (!mask.isNull()) {
img = image;
img.setAlphaChannel(mask);
- // (Luckily, it seems that setAlphaChannel() does not ruin the alpha values
- // of partially transparent pixels in those icons that have that)
}
}
}
@@ -615,13 +613,7 @@ bool ICOReader::write(QIODevice *device, const QVector<QImage> &images)
}
QImage maskImage(image.width(), image.height(), QImage::Format_Mono);
image = image.convertToFormat(QImage::Format_ARGB32);
-
- if (image.hasAlphaChannel()) {
- maskImage = image.createAlphaMask();
- } else {
- maskImage.fill(0xff);
- }
- maskImage = maskImage.convertToFormat(QImage::Format_Mono);
+ maskImage.fill(Qt::color1);
int nbits = 32;
int bpl_bmp = ((image.width()*nbits+31)/32)*4;
@@ -671,7 +663,7 @@ bool ICOReader::write(QIODevice *device, const QVector<QImage> &images)
*b++ = qRed(*p);
*b++ = qAlpha(*p);
if (qAlpha(*p) > 0) // Even mostly transparent pixels must not be masked away
- maskImage.setPixel(x, y, Qt::color1); // (i.e. createAlphaMask() takes away too much)
+ maskImage.setPixel(x, y, 0);
p++;
x++;
}
@@ -679,7 +671,6 @@ bool ICOReader::write(QIODevice *device, const QVector<QImage> &images)
}
delete[] buf;
- maskImage.invertPixels(); // seems as though it needs this
// NOTE! !! The mask is only flipped vertically - not horizontally !!
for (y = maskImage.height() - 1; y >= 0; y--)
buffer.write((char*)maskImage.scanLine(y), maskImage.bytesPerLine());
diff --git a/src/plugins/imageformats/jpeg/main.cpp b/src/plugins/imageformats/jpeg/main.cpp
index 58442053a1..83f13c4a9d 100644
--- a/src/plugins/imageformats/jpeg/main.cpp
+++ b/src/plugins/imageformats/jpeg/main.cpp
@@ -51,9 +51,9 @@ QImageIOPlugin::Capabilities QJpegPlugin::capabilities(QIODevice *device, const
if (format == "jpeg" || format == "jpg")
return Capabilities(CanRead | CanWrite);
if (!format.isEmpty())
- return 0;
+ return { };
if (!device->isOpen())
- return 0;
+ return { };
Capabilities cap;
if (device->isReadable() && QJpegHandler::canRead(device))
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 1f1675e490..c31e2db3c5 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -248,13 +248,12 @@ static bool ensureValidImage(QImage *dest, struct jpeg_decompress_struct *info,
static bool read_jpeg_image(QImage *outImage,
QSize scaledSize, QRect scaledClipRect,
- QRect clipRect, volatile int inQuality,
+ QRect clipRect, int quality,
Rgb888ToRgb32Converter converter,
j_decompress_ptr info, struct my_error_mgr* err )
{
if (!setjmp(err->setjmp_buffer)) {
// -1 means default quality.
- int quality = inQuality;
if (quality < 0)
quality = 75;
@@ -529,7 +528,14 @@ static inline void write_icc_profile(const QImage &image, j_compress_ptr cinfo)
}
}
-static bool write_jpeg_image(const QImage &image, QIODevice *device, volatile int sourceQuality, const QString &description, bool optimize, bool progressive)
+static bool do_write_jpeg_image(struct jpeg_compress_struct &cinfo,
+ JSAMPROW *row_pointer,
+ const QImage &image,
+ QIODevice *device,
+ int sourceQuality,
+ const QString &description,
+ bool optimize,
+ bool progressive)
{
bool success = false;
const QVector<QRgb> cmap = image.colorTable();
@@ -537,10 +543,6 @@ static bool write_jpeg_image(const QImage &image, QIODevice *device, volatile in
if (image.format() == QImage::Format_Invalid || image.format() == QImage::Format_Alpha8)
return false;
- struct jpeg_compress_struct cinfo;
- JSAMPROW row_pointer[1];
- row_pointer[0] = 0;
-
struct my_jpeg_destination_mgr *iod_dest = new my_jpeg_destination_mgr(device);
struct my_error_mgr jerr;
@@ -713,6 +715,27 @@ static bool write_jpeg_image(const QImage &image, QIODevice *device, volatile in
}
delete iod_dest;
+ return success;
+}
+
+static bool write_jpeg_image(const QImage &image,
+ QIODevice *device,
+ int sourceQuality,
+ const QString &description,
+ bool optimize,
+ bool progressive)
+{
+ // protect these objects from the setjmp/longjmp pair inside
+ // do_write_jpeg_image (by making them non-local).
+ struct jpeg_compress_struct cinfo;
+ JSAMPROW row_pointer[1];
+ row_pointer[0] = nullptr;
+
+ const bool success = do_write_jpeg_image(cinfo, row_pointer,
+ image, device,
+ sourceQuality, description,
+ optimize, progressive);
+
delete [] row_pointer[0];
return success;
}
@@ -728,7 +751,7 @@ public:
};
QJpegHandlerPrivate(QJpegHandler *qq)
- : quality(75), transformation(QImageIOHandler::TransformationNone), iod_src(0),
+ : quality(75), transformation(QImageIOHandler::TransformationNone), iod_src(nullptr),
rgb888ToRgb32ConverterPtr(qt_convert_rgb888_to_rgb32), state(Ready), optimize(false), progressive(false), q(qq)
{}
@@ -738,7 +761,7 @@ public:
{
jpeg_destroy_decompress(&info);
delete iod_src;
- iod_src = 0;
+ iod_src = nullptr;
}
}
@@ -931,7 +954,7 @@ bool QJpegHandlerPrivate::readJpegHeader(QIODevice *device)
QByteArray exifData;
- for (jpeg_saved_marker_ptr marker = info.marker_list; marker != NULL; marker = marker->next) {
+ for (jpeg_saved_marker_ptr marker = info.marker_list; marker != nullptr; marker = marker->next) {
if (marker->marker == JPEG_COM) {
QString key, value;
QString s = QString::fromUtf8((const char *)marker->data, marker->data_length);
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
index f2429f24ff..47ac54927b 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
@@ -285,7 +285,7 @@ void QIBusPlatformInputContext::commitText(const QDBusVariant &text)
if (!input)
return;
- const QDBusArgument arg = text.variant().value<QDBusArgument>();
+ const QDBusArgument arg = qvariant_cast<QDBusArgument>(text.variant());
QIBusText t;
if (debug)
@@ -311,7 +311,7 @@ void QIBusPlatformInputContext::updatePreeditText(const QDBusVariant &text, uint
if (!input)
return;
- const QDBusArgument arg = text.variant().value<QDBusArgument>();
+ const QDBusArgument arg = qvariant_cast<QDBusArgument>(text.variant());
QIBusText t;
arg >> t;
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
index 8e7b8df120..e9c9c55f6a 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
@@ -61,7 +61,7 @@ public:
explicit QIBusFilterEventWatcher(const QDBusPendingCall &call,
QObject *parent = nullptr,
QWindow *window = nullptr,
- const Qt::KeyboardModifiers modifiers = nullptr,
+ const Qt::KeyboardModifiers modifiers = { },
const QVariantList arguments = QVariantList())
: QDBusPendingCallWatcher(call, parent)
, m_window(window)
diff --git a/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp b/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp
index 156e9b7c90..6b46e106ab 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp
@@ -83,10 +83,10 @@ QIBusEngineDesc QIBusProxy::getGlobalEngine()
QVariant variant = reply.value().variant();
if (!variant.isValid())
return desc;
- QVariant child = variant.value<QDBusVariant>().variant();
+ QVariant child = qvariant_cast<QDBusVariant>(variant).variant();
if (!child.isValid())
return desc;
- const QDBusArgument argument = child.value<QDBusArgument>();
+ const QDBusArgument argument = qvariant_cast<QDBusArgument>(child);
argument >> desc;
return desc;
}
diff --git a/src/plugins/platforminputcontexts/ibus/qibustypes.cpp b/src/plugins/platforminputcontexts/ibus/qibustypes.cpp
index a2551f1320..443df271a8 100644
--- a/src/plugins/platforminputcontexts/ibus/qibustypes.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibustypes.cpp
@@ -62,7 +62,7 @@ void QIBusSerializable::deserializeFrom(const QDBusArgument &argument)
argument >> key;
argument >> value;
argument.endMapEntry();
- attachments[key] = value.variant().value<QDBusArgument>();
+ attachments[key] = qvariant_cast<QDBusArgument>(value.variant());
}
argument.endMap();
}
@@ -201,7 +201,7 @@ void QIBusAttributeList::deserializeFrom(const QDBusArgument &arg)
arg >> var;
QIBusAttribute attr;
- var.variant().value<QDBusArgument>() >> attr;
+ qvariant_cast<QDBusArgument>(var.variant()) >> attr;
attributes.append(std::move(attr));
}
arg.endArray();
@@ -268,7 +268,7 @@ void QIBusText::deserializeFrom(const QDBusArgument &argument)
argument >> text;
QDBusVariant variant;
argument >> variant;
- variant.variant().value<QDBusArgument>() >> attributes;
+ qvariant_cast<QDBusArgument>(variant.variant()) >> attributes;
argument.endStructure();
}
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp
index e0c437be27..c81cc66166 100644
--- a/src/plugins/platforms/android/qandroidplatformintegration.cpp
+++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp
@@ -74,6 +74,8 @@
#include "qandroidplatformvulkaninstance.h"
#endif
+#include <QtGui/qpa/qplatforminputcontextfactory_p.h>
+
QT_BEGIN_NAMESPACE
int QAndroidPlatformIntegration::m_defaultGeometryWidth = 320;
@@ -255,6 +257,15 @@ static bool needsBasicRenderloopWorkaround()
return needsWorkaround;
}
+void QAndroidPlatformIntegration::initialize()
+{
+ const QString icStr = QPlatformInputContextFactory::requested();
+ if (icStr.isNull())
+ m_inputContext.reset(new QAndroidInputContext);
+ else
+ m_inputContext.reset(QPlatformInputContextFactory::create(icStr));
+}
+
bool QAndroidPlatformIntegration::hasCapability(Capability cap) const
{
switch (cap) {
@@ -366,7 +377,7 @@ QPlatformClipboard *QAndroidPlatformIntegration::clipboard() const
QPlatformInputContext *QAndroidPlatformIntegration::inputContext() const
{
- return &m_platformInputContext;
+ return m_inputContext.data();
}
QPlatformNativeInterface *QAndroidPlatformIntegration::nativeInterface() const
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.h b/src/plugins/platforms/android/qandroidplatformintegration.h
index c795c499bc..ecbde4f951 100644
--- a/src/plugins/platforms/android/qandroidplatformintegration.h
+++ b/src/plugins/platforms/android/qandroidplatformintegration.h
@@ -81,6 +81,8 @@ public:
QAndroidPlatformIntegration(const QStringList &paramList);
~QAndroidPlatformIntegration();
+ void initialize() override;
+
bool hasCapability(QPlatformIntegration::Capability cap) const override;
QPlatformWindow *createPlatformWindow(QWindow *window) const override;
@@ -167,7 +169,7 @@ private:
mutable QPlatformAccessibility *m_accessibility;
#endif
- mutable QAndroidInputContext m_platformInputContext;
+ QScopedPointer<QPlatformInputContext> m_inputContext;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro
index 6645b6c90a..a919963cf4 100644
--- a/src/plugins/platforms/cocoa/cocoa.pro
+++ b/src/plugins/platforms/cocoa/cocoa.pro
@@ -85,6 +85,11 @@ qtConfig(accessibility) {
qcocoaaccessibility.h
}
+qtConfig(sessionmanager) {
+ SOURCES += qcocoasessionmanager.cpp
+ HEADERS += qcocoasessionmanager.h
+}
+
RESOURCES += qcocoaresources.qrc
LIBS += -framework AppKit -framework CoreServices -framework Carbon -framework IOKit -framework QuartzCore -framework CoreVideo -framework Metal -framework IOSurface -lcups
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 9b0a6b1b86..3fb9e83d35 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -79,11 +79,14 @@
#include "qcocoamenuitem.h"
#include "qcocoansmenu.h"
+#if QT_CONFIG(sessionmanager)
+# include "qcocoasessionmanager.h"
+#endif
+
#include <qevent.h>
#include <qurl.h>
#include <qdebug.h>
#include <qguiapplication.h>
-#include <private/qguiapplication_p.h>
#include "qt_mac_p.h"
#include <qpa/qwindowsysteminterface.h>
#include <qwindowdefs.h>
@@ -149,7 +152,7 @@ QT_USE_NAMESPACE
if ([reflectionDelegate respondsToSelector:_cmd])
return [reflectionDelegate applicationShouldTerminate:sender];
- if (QGuiApplicationPrivate::instance()->threadData->eventLoops.isEmpty()) {
+ if (QGuiApplicationPrivate::instance()->threadData.loadRelaxed()->eventLoops.isEmpty()) {
// No event loop is executing. This probably means that Qt is used as a plugin,
// or as a part of a native Cocoa application. In any case it should be fine to
// terminate now.
@@ -157,6 +160,17 @@ QT_USE_NAMESPACE
return NSTerminateNow;
}
+#if QT_CONFIG(sessionmanager)
+ QCocoaSessionManager *cocoaSessionManager = QCocoaSessionManager::instance();
+ cocoaSessionManager->resetCancellation();
+ cocoaSessionManager->appCommitData();
+
+ if (cocoaSessionManager->wasCanceled()) {
+ qCDebug(lcQpaApplication) << "Session management canceled application termination";
+ return NSTerminateCancel;
+ }
+#endif
+
if (!QWindowSystemInterface::handleApplicationTermination<QWindowSystemInterface::SynchronousDelivery>()) {
qCDebug(lcQpaApplication) << "Application termination canceled";
return NSTerminateCancel;
@@ -359,7 +373,7 @@ QT_USE_NAMESPACE
if (!platformItem || platformItem->menu())
return;
- QScopedScopeLevelCounter scopeLevelCounter(QGuiApplicationPrivate::instance()->threadData);
+ QScopedScopeLevelCounter scopeLevelCounter(QGuiApplicationPrivate::instance()->threadData.loadRelaxed());
QGuiApplicationPrivate::modifier_buttons = [QNSView convertKeyModifiers:[NSEvent modifierFlags]];
static QMetaMethod activatedSignal = QMetaMethod::fromSignal(&QCocoaMenuItem::activated);
diff --git a/src/plugins/platforms/cocoa/qcocoaclipboard.mm b/src/plugins/platforms/cocoa/qcocoaclipboard.mm
index a35c153084..141940cc50 100644
--- a/src/plugins/platforms/cocoa/qcocoaclipboard.mm
+++ b/src/plugins/platforms/cocoa/qcocoaclipboard.mm
@@ -67,7 +67,7 @@ void QCocoaClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
}
pasteBoard->sync();
- pasteBoard->setMimeData(data);
+ pasteBoard->setMimeData(data, QMacPasteboard::LazyRequest);
emitChanged(mode);
}
}
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
index 69587a24be..b8d2532b8e 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
@@ -186,6 +186,7 @@ public:
QAtomicInt serialNumber;
int lastSerial;
bool interrupt;
+ bool propagateInterrupt = false;
static void postedEventsSourceCallback(void *info);
static void waitingObserverCallback(CFRunLoopObserverRef observer,
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
index e87fc39c42..94b9e62eab 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
@@ -84,13 +84,12 @@
#include "private/qthread_p.h"
#include "private/qguiapplication_p.h"
#include <qdebug.h>
+#include <qscopeguard.h>
#include <AppKit/AppKit.h>
QT_BEGIN_NAMESPACE
-QT_USE_NAMESPACE
-
static inline CFRunLoopRef mainRunLoop()
{
return CFRunLoopGetMain();
@@ -293,46 +292,42 @@ bool QCocoaEventDispatcher::hasPendingEvents()
return qGlobalPostedEventsCount() || (qt_is_gui_used && !CFRunLoopIsWaiting(CFRunLoopGetMain()));
}
-static bool IsMouseOrKeyEvent( NSEvent* event )
+static bool isUserInputEvent(NSEvent* event)
{
- bool result = false;
-
- switch( [event type] )
- {
- case NSEventTypeLeftMouseDown:
- case NSEventTypeLeftMouseUp:
- case NSEventTypeRightMouseDown:
- case NSEventTypeRightMouseUp:
- case NSEventTypeMouseMoved: // ??
- case NSEventTypeLeftMouseDragged:
- case NSEventTypeRightMouseDragged:
- case NSEventTypeMouseEntered:
- case NSEventTypeMouseExited:
- case NSEventTypeKeyDown:
- case NSEventTypeKeyUp:
- case NSEventTypeFlagsChanged: // key modifiers changed?
- case NSEventTypeCursorUpdate: // ??
- case NSEventTypeScrollWheel:
- case NSEventTypeTabletPoint:
- case NSEventTypeTabletProximity:
- case NSEventTypeOtherMouseDown:
- case NSEventTypeOtherMouseUp:
- case NSEventTypeOtherMouseDragged:
+ switch ([event type]) {
+ case NSEventTypeLeftMouseDown:
+ case NSEventTypeLeftMouseUp:
+ case NSEventTypeRightMouseDown:
+ case NSEventTypeRightMouseUp:
+ case NSEventTypeMouseMoved: // ??
+ case NSEventTypeLeftMouseDragged:
+ case NSEventTypeRightMouseDragged:
+ case NSEventTypeMouseEntered:
+ case NSEventTypeMouseExited:
+ case NSEventTypeKeyDown:
+ case NSEventTypeKeyUp:
+ case NSEventTypeFlagsChanged: // key modifiers changed?
+ case NSEventTypeCursorUpdate: // ??
+ case NSEventTypeScrollWheel:
+ case NSEventTypeTabletPoint:
+ case NSEventTypeTabletProximity:
+ case NSEventTypeOtherMouseDown:
+ case NSEventTypeOtherMouseUp:
+ case NSEventTypeOtherMouseDragged:
#ifndef QT_NO_GESTURES
- case NSEventTypeGesture: // touch events
- case NSEventTypeMagnify:
- case NSEventTypeSwipe:
- case NSEventTypeRotate:
- case NSEventTypeBeginGesture:
- case NSEventTypeEndGesture:
+ case NSEventTypeGesture: // touch events
+ case NSEventTypeMagnify:
+ case NSEventTypeSwipe:
+ case NSEventTypeRotate:
+ case NSEventTypeBeginGesture:
+ case NSEventTypeEndGesture:
#endif // QT_NO_GESTURES
- result = true;
+ return true;
break;
-
- default:
+ default:
break;
}
- return result;
+ return false;
}
static inline void qt_mac_waitForMoreEvents(NSString *runLoopMode = NSDefaultRunLoopMode)
@@ -352,6 +347,16 @@ static inline void qt_mac_waitForMoreEvents(NSString *runLoopMode = NSDefaultRun
bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
{
Q_D(QCocoaEventDispatcher);
+
+ // In rare rather corner cases a user's application messes with
+ // QEventLoop::exec()/exit() and QCoreApplication::processEvents(),
+ // we have to undo what bool blocker normally does.
+ d->propagateInterrupt = false;
+ const auto boolBlockerUndo = qScopeGuard([d](){
+ if (d->propagateInterrupt)
+ d->interrupt = true;
+ d->propagateInterrupt = false;
+ });
QBoolBlocker interruptBlocker(d->interrupt, false);
bool interruptLater = false;
@@ -465,7 +470,7 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
dequeue: YES];
if (event) {
- if (IsMouseOrKeyEvent(event)) {
+ if (isUserInputEvent(event)) {
[event retain];
d->queuedUserInputEvents.append(event);
continue;
@@ -485,7 +490,7 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
if (event) {
if (flags & QEventLoop::ExcludeUserInputEvents) {
- if (IsMouseOrKeyEvent(event)) {
+ if (isUserInputEvent(event)) {
[event retain];
d->queuedUserInputEvents.append(event);
continue;
@@ -500,7 +505,16 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
if ((d->processEventsFlags & QEventLoop::EventLoopExec) == 0) {
// When called "manually", always process posted events and timers
+ bool oldInterrupt = d->interrupt;
d->processPostedEvents();
+ if (!oldInterrupt && d->interrupt && !d->currentModalSession()) {
+ // We had direct processEvent call, coming not from QEventLoop::exec().
+ // One of the posted events triggered an application to interrupt the loop.
+ // But bool blocker will reset d->interrupt to false, so the real event
+ // loop will never notice it was interrupted. Now we'll have to fix it by
+ // enforcing the value of d->interrupt.
+ d->propagateInterrupt = true;
+ }
retVal = d->processTimers() || retVal;
}
@@ -515,7 +529,7 @@ bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
if (hadModalSession && !d->currentModalSessionCached)
interruptLater = true;
}
- bool canWait = (d->threadData->canWait
+ bool canWait = (d->threadData.loadRelaxed()->canWait
&& !retVal
&& !d->interrupt
&& (d->processEventsFlags & QEventLoop::WaitForMoreEvents));
@@ -882,7 +896,7 @@ void QCocoaEventDispatcherPrivate::processPostedEvents()
}
int serial = serialNumber.loadRelaxed();
- if (!threadData->canWait || (serial != lastSerial)) {
+ if (!threadData.loadRelaxed()->canWait || (serial != lastSerial)) {
lastSerial = serial;
QCoreApplication::sendPostedEvents();
QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::AllEvents);
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h
index bfc3bfe9de..0c14e07551 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.h
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.h
@@ -92,6 +92,10 @@ public:
QCocoaVulkanInstance *getCocoaVulkanInstance() const;
#endif
+#if QT_CONFIG(sessionmanager)
+ QPlatformSessionManager *createPlatformSessionManager(const QString &id, const QString &key) const override;
+#endif
+
QCoreTextFontDatabase *fontDatabase() const override;
QCocoaNativeInterface *nativeInterface() const override;
QPlatformInputContext *inputContext() const override;
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index b7f15a2bf1..61308d6bf9 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -52,6 +52,9 @@
#include "qcocoamimetypes.h"
#include "qcocoaaccessibility.h"
#include "qcocoascreen.h"
+#if QT_CONFIG(sessionmanager)
+# include "qcocoasessionmanager.h"
+#endif
#include <qpa/qplatforminputcontextfactory_p.h>
#include <qpa/qplatformaccessibility.h>
@@ -245,6 +248,13 @@ QCocoaIntegration::Options QCocoaIntegration::options() const
return mOptions;
}
+#if QT_CONFIG(sessionmanager)
+QPlatformSessionManager *QCocoaIntegration::createPlatformSessionManager(const QString &id, const QString &key) const
+{
+ return new QCocoaSessionManager(id, key);
+}
+#endif
+
bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) const
{
switch (cap) {
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm
index 8c4fca0d29..90d5180fed 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenu.mm
@@ -334,7 +334,7 @@ void QCocoaMenu::setEnabled(bool enabled)
bool QCocoaMenu::isEnabled() const
{
- return m_attachedItem ? m_attachedItem.enabled : m_enabled && m_parentEnabled;
+ return m_enabled && m_parentEnabled;
}
void QCocoaMenu::setVisible(bool visible)
diff --git a/src/plugins/platforms/cocoa/qcocoasessionmanager.cpp b/src/plugins/platforms/cocoa/qcocoasessionmanager.cpp
new file mode 100644
index 0000000000..74e318b5be
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qcocoasessionmanager.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Samuel Gaist <samuel.gaist@idiap.ch>
+** 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 QT_NO_SESSIONMANAGER
+#include <private/qsessionmanager_p.h>
+#include <private/qguiapplication_p.h>
+
+#include <qcocoasessionmanager.h>
+#include <qstring.h>
+
+QT_BEGIN_NAMESPACE
+
+QCocoaSessionManager::QCocoaSessionManager(const QString &id, const QString &key)
+ : QPlatformSessionManager(id, key),
+ m_canceled(false)
+{
+}
+
+QCocoaSessionManager::~QCocoaSessionManager()
+{
+}
+
+bool QCocoaSessionManager::allowsInteraction()
+{
+ return false;
+}
+
+void QCocoaSessionManager::resetCancellation()
+{
+ m_canceled = false;
+}
+
+void QCocoaSessionManager::cancel()
+{
+ m_canceled = true;
+}
+
+bool QCocoaSessionManager::wasCanceled() const
+{
+ return m_canceled;
+}
+
+QCocoaSessionManager *QCocoaSessionManager::instance()
+{
+ auto *qGuiAppPriv = QGuiApplicationPrivate::instance();
+ auto *managerPrivate = static_cast<QSessionManagerPrivate*>(QObjectPrivate::get(qGuiAppPriv->session_manager));
+ return static_cast<QCocoaSessionManager *>(managerPrivate->platformSessionManager);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_SESSIONMANAGER
diff --git a/src/plugins/platforms/cocoa/qcocoasessionmanager.h b/src/plugins/platforms/cocoa/qcocoasessionmanager.h
new file mode 100644
index 0000000000..89ab7bd157
--- /dev/null
+++ b/src/plugins/platforms/cocoa/qcocoasessionmanager.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Samuel Gaist <samuel.gaist@idiap.ch>
+** 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 QCOCOASESSIONMANAGER_H
+#define QCOCOASESSIONMANAGER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is part of the QPA API and is not meant to be used
+// in applications. Usage of this API may make your code
+// source and binary incompatible with future versions of Qt.
+//
+
+#ifndef QT_NO_SESSIONMANAGER
+
+#include <qpa/qplatformsessionmanager.h>
+
+QT_BEGIN_NAMESPACE
+
+class QCocoaSessionManager : public QPlatformSessionManager
+{
+public:
+ QCocoaSessionManager(const QString &id, const QString &key);
+ virtual ~QCocoaSessionManager();
+
+ bool allowsInteraction() override;
+ void cancel() override;
+ void resetCancellation();
+ bool wasCanceled() const;
+
+ static QCocoaSessionManager *instance();
+
+private:
+ bool m_canceled;
+
+ Q_DISABLE_COPY(QCocoaSessionManager)
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_SESSIONMANAGER
+
+#endif // QCOCOASESSIONMANAGER_H
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h
index 6779bda491..738c40aba6 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h
@@ -65,7 +65,7 @@ public:
void updateMenu(QPlatformMenu *menu) override;
QRect geometry() const override;
void showMessage(const QString &title, const QString &msg,
- const QIcon& icon, MessageIcon iconType, int secs) override;
+ const QIcon& icon, MessageIcon iconType, int msecs) override;
bool isSystemTrayAvailable() const override;
bool supportsMessages() const override;
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
index a5b42ac4e3..559188aa5f 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
@@ -265,7 +265,7 @@ bool QCocoaSystemTrayIcon::supportsMessages() const
}
void QCocoaSystemTrayIcon::showMessage(const QString &title, const QString &message,
- const QIcon& icon, MessageIcon, int)
+ const QIcon& icon, MessageIcon, int msecs)
{
if (!m_sys)
return;
@@ -283,6 +283,10 @@ void QCocoaSystemTrayIcon::showMessage(const QString &title, const QString &mess
NSUserNotificationCenter *center = NSUserNotificationCenter.defaultUserNotificationCenter;
center.delegate = m_sys->item;
[center deliverNotification:notification];
+ if (msecs) {
+ NSTimeInterval timeout = msecs / 1000.0;
+ [center performSelector:@selector(removeDeliveredNotification:) withObject:notification afterDelay:timeout];
+ }
[notification release];
}
QT_END_NAMESPACE
@@ -435,8 +439,7 @@ QT_END_NAMESPACE
}
- (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification {
- Q_UNUSED(center);
- Q_UNUSED(notification);
+ [center removeDeliveredNotification:notification];
emit systray->messageClicked();
}
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.h b/src/plugins/platforms/cocoa/qcocoatheme.h
index a00cbdfea3..50e56ef1bf 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.h
+++ b/src/plugins/platforms/cocoa/qcocoatheme.h
@@ -70,7 +70,7 @@ public:
const QPalette *palette(Palette type = SystemPalette) const override;
const QFont *font(Font type = SystemFont) const override;
QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
- QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions options = 0) const override;
+ QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions options = {}) const override;
QVariant themeHint(ThemeHint hint) const override;
QString standardButtonText(int button) const override;
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index fef72bc496..b15c0ac31c 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -218,6 +218,8 @@ protected:
void toggleFullScreen();
bool isTransitioningToFullScreen() const;
+ bool startSystemMove() override;
+
// private:
public: // for QNSView
friend class QCocoaBackingStore;
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 69d192b4f5..9cb4470e02 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -299,6 +299,22 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect)
// will call QPlatformWindow::setGeometry(rect) during resize confirmation (see qnsview.mm)
}
+bool QCocoaWindow::startSystemMove()
+{
+ switch (NSApp.currentEvent.type) {
+ case NSEventTypeLeftMouseDown:
+ case NSEventTypeRightMouseDown:
+ case NSEventTypeOtherMouseDown:
+ case NSEventTypeMouseMoved:
+ // The documentation only describes starting a system move
+ // based on mouse down events, but move events also work.
+ [m_view.window performWindowDragWithEvent:NSApp.currentEvent];
+ return true;
+ default:
+ return false;
+ }
+}
+
void QCocoaWindow::setVisible(bool visible)
{
qCDebug(lcQpaWindow) << "QCocoaWindow::setVisible" << window() << visible;
diff --git a/src/plugins/platforms/cocoa/qmacclipboard.mm b/src/plugins/platforms/cocoa/qmacclipboard.mm
index 358a6b49fd..654647b35a 100644
--- a/src/plugins/platforms/cocoa/qmacclipboard.mm
+++ b/src/plugins/platforms/cocoa/qmacclipboard.mm
@@ -138,8 +138,12 @@ QMacPasteboard::QMacPasteboard(CFStringRef name, uchar mt)
QMacPasteboard::~QMacPasteboard()
{
- // commit all promises for paste after exit close
- resolvingBeforeDestruction = true;
+ /*
+ Commit all promises for paste when shutting down,
+ unless we are the stack-allocated clipboard used by QCocoaDrag.
+ */
+ if (mime_type == QMacInternalPasteboardMime::MIME_DND)
+ resolvingBeforeDestruction = true;
PasteboardResolvePromises(paste);
if (paste)
CFRelease(paste);
diff --git a/src/plugins/platforms/cocoa/qnsview_menus.mm b/src/plugins/platforms/cocoa/qnsview_menus.mm
index a55fd97eb7..b6cd832282 100644
--- a/src/plugins/platforms/cocoa/qnsview_menus.mm
+++ b/src/plugins/platforms/cocoa/qnsview_menus.mm
@@ -84,7 +84,8 @@ static bool selectorIsCutCopyPaste(SEL selector)
menuParent = menuObject->menuParent();
}
- if (menubar && menubar->cocoaWindow() != self.platformWindow)
+ // we have no menubar parent for the application menu items, e.g About and Preferences
+ if (!menubar || menubar->cocoaWindow() != self.platformWindow)
return NO;
}
diff --git a/src/plugins/platforms/eglfs/api/api.pri b/src/plugins/platforms/eglfs/api/api.pri
index a6d81016b6..68965b58d8 100644
--- a/src/plugins/platforms/eglfs/api/api.pri
+++ b/src/plugins/platforms/eglfs/api/api.pri
@@ -23,4 +23,13 @@ qtConfig(opengl) {
$$PWD/qeglfscontext_p.h
}
+qtConfig(vulkan) {
+ SOURCES += \
+ $$PWD/vulkan/qeglfsvulkaninstance.cpp \
+ $$PWD/vulkan/qeglfsvulkanwindow.cpp
+ HEADERS += \
+ $$PWD/vulkan/qeglfsvulkaninstance_p.h \
+ $$PWD/vulkan/qeglfsvulkanwindow_p.h
+}
+
INCLUDEPATH += $$PWD
diff --git a/src/plugins/platforms/eglfs/api/qeglfscontext.cpp b/src/plugins/platforms/eglfs/api/qeglfscontext.cpp
index c5cef34d8e..48fafbda8d 100644
--- a/src/plugins/platforms/eglfs/api/qeglfscontext.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfscontext.cpp
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
QEglFSContext::QEglFSContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
EGLConfig *config, const QVariant &nativeHandle)
: QEGLPlatformContext(format, share, display, config, nativeHandle,
- qt_egl_device_integration()->supportsSurfacelessContexts() ? Flags(0) : QEGLPlatformContext::NoSurfaceless),
+ qt_egl_device_integration()->supportsSurfacelessContexts() ? Flags() : QEGLPlatformContext::NoSurfaceless),
m_tempWindow(0)
{
}
@@ -78,7 +78,7 @@ EGLSurface QEglFSContext::createTemporaryOffscreenSurface()
}
}
EGLConfig config = q_configFromGLFormat(eglDisplay(), format());
- return eglCreateWindowSurface(eglDisplay(), config, m_tempWindow, 0);
+ return eglCreateWindowSurface(eglDisplay(), config, m_tempWindow, nullptr);
}
void QEglFSContext::destroyTemporaryOffscreenSurface(EGLSurface surface)
diff --git a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp
index 22319fcc66..98e05195ee 100644
--- a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp
@@ -62,7 +62,7 @@ QEglFSCursor::QEglFSCursor(QPlatformScreen *screen)
: m_visible(true),
m_screen(static_cast<QEglFSScreen *>(screen)),
m_activeScreen(nullptr),
- m_deviceListener(0),
+ m_deviceListener(nullptr),
m_updateRequested(false)
{
QByteArray hideCursorVal = qgetenv("QT_QPA_EGLFS_HIDECURSOR");
diff --git a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp
index 81bad45cd2..e3145aa0b0 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp
@@ -52,6 +52,7 @@
#include <QScreen>
#include <QDir>
#if QT_CONFIG(regularexpression)
+# include <QFileInfo>
# include <QRegularExpression>
#endif
#include <QLoggingCategory>
@@ -144,7 +145,12 @@ int QEglFSDeviceIntegration::framebufferIndex() const
int fbIndex = 0;
#if QT_CONFIG(regularexpression)
QRegularExpression fbIndexRx(QLatin1String("fb(\\d+)"));
- QRegularExpressionMatch match = fbIndexRx.match(QString::fromLocal8Bit(fbDeviceName()));
+ QFileInfo fbinfo(QString::fromLocal8Bit(fbDeviceName()));
+ QRegularExpressionMatch match;
+ if (fbinfo.isSymLink())
+ match = fbIndexRx.match(fbinfo.symLinkTarget());
+ else
+ match = fbIndexRx.match(fbinfo.fileName());
if (match.hasMatch())
fbIndex = match.captured(1).toInt();
#endif
@@ -375,6 +381,14 @@ void *QEglFSDeviceIntegration::wlDisplay() const
return nullptr;
}
+#if QT_CONFIG(vulkan)
+QPlatformVulkanInstance *QEglFSDeviceIntegration::createPlatformVulkanInstance(QVulkanInstance *instance)
+{
+ Q_UNUSED(instance);
+ return nullptr;
+}
+#endif
+
EGLConfig QEglFSDeviceIntegration::chooseConfig(EGLDisplay display, const QSurfaceFormat &format)
{
class Chooser : public QEglConfigChooser {
diff --git a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration_p.h b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration_p.h
index 71ffb4c69a..08447a40ea 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration_p.h
+++ b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration_p.h
@@ -108,6 +108,10 @@ public:
virtual void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen);
virtual void *wlDisplay() const;
+#if QT_CONFIG(vulkan)
+ virtual QPlatformVulkanInstance *createPlatformVulkanInstance(QVulkanInstance *instance);
+#endif
+
static EGLConfig chooseConfig(EGLDisplay display, const QSurfaceFormat &format);
};
diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
index 674f579b4f..e26d984cc1 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
@@ -109,10 +109,10 @@ QT_BEGIN_NAMESPACE
QEglFSIntegration::QEglFSIntegration()
: m_display(EGL_NO_DISPLAY),
- m_inputContext(0),
+ m_inputContext(nullptr),
m_fontDb(new QGenericUnixFontDatabase),
m_services(new QGenericUnixServices),
- m_kbdMgr(0),
+ m_kbdMgr(nullptr),
m_disableInputHandlers(false)
{
m_disableInputHandlers = qEnvironmentVariableIntValue("QT_QPA_EGLFS_DISABLE_INPUT");
@@ -223,7 +223,7 @@ QPlatformOpenGLContext *QEglFSIntegration::createPlatformOpenGLContext(QOpenGLCo
EGLConfig config = QEglFSDeviceIntegration::chooseConfig(dpy, adjustedFormat);
ctx = new QEglFSContext(adjustedFormat, share, dpy, &config, QVariant());
} else {
- ctx = new QEglFSContext(adjustedFormat, share, dpy, 0, nativeHandle);
+ ctx = new QEglFSContext(adjustedFormat, share, dpy, nullptr, nativeHandle);
}
nativeHandle = QVariant::fromValue<QEGLNativeContext>(QEGLNativeContext(ctx->eglContext(), dpy));
@@ -236,7 +236,7 @@ QPlatformOffscreenSurface *QEglFSIntegration::createPlatformOffscreenSurface(QOf
EGLDisplay dpy = surface->screen() ? static_cast<QEglFSScreen *>(surface->screen()->handle())->display() : display();
QSurfaceFormat fmt = qt_egl_device_integration()->surfaceFormatFor(surface->requestedFormat());
if (qt_egl_device_integration()->supportsPBuffers()) {
- QEGLPlatformContext::Flags flags = 0;
+ QEGLPlatformContext::Flags flags;
if (!qt_egl_device_integration()->supportsSurfacelessContexts())
flags |= QEGLPlatformContext::NoSurfaceless;
return new QEGLPbuffer(dpy, fmt, surface, flags);
@@ -247,6 +247,13 @@ QPlatformOffscreenSurface *QEglFSIntegration::createPlatformOffscreenSurface(QOf
}
#endif // QT_NO_OPENGL
+#if QT_CONFIG(vulkan)
+QPlatformVulkanInstance *QEglFSIntegration::createPlatformVulkanInstance(QVulkanInstance *instance) const
+{
+ return qt_egl_device_integration()->createPlatformVulkanInstance(instance);
+}
+#endif
+
bool QEglFSIntegration::hasCapability(QPlatformIntegration::Capability cap) const
{
// We assume that devices will have more and not less capabilities
@@ -283,7 +290,8 @@ enum ResourceType {
NativeDisplay,
XlibDisplay,
WaylandDisplay,
- EglSurface
+ EglSurface,
+ VkSurface
};
static int resourceType(const QByteArray &key)
@@ -296,7 +304,8 @@ static int resourceType(const QByteArray &key)
QByteArrayLiteral("nativedisplay"),
QByteArrayLiteral("display"),
QByteArrayLiteral("server_wl_display"),
- QByteArrayLiteral("eglsurface")
+ QByteArrayLiteral("eglsurface"),
+ QByteArrayLiteral("vksurface")
};
const QByteArray *end = names + sizeof(names) / sizeof(names[0]);
const QByteArray *result = std::find(names, end, key);
@@ -307,7 +316,7 @@ static int resourceType(const QByteArray &key)
void *QEglFSIntegration::nativeResourceForIntegration(const QByteArray &resource)
{
- void *result = 0;
+ void *result = nullptr;
switch (resourceType(resource)) {
case EglDisplay:
@@ -329,7 +338,7 @@ void *QEglFSIntegration::nativeResourceForIntegration(const QByteArray &resource
void *QEglFSIntegration::nativeResourceForScreen(const QByteArray &resource, QScreen *screen)
{
- void *result = 0;
+ void *result = nullptr;
switch (resourceType(resource)) {
case XlibDisplay:
@@ -347,7 +356,7 @@ void *QEglFSIntegration::nativeResourceForScreen(const QByteArray &resource, QSc
void *QEglFSIntegration::nativeResourceForWindow(const QByteArray &resource, QWindow *window)
{
- void *result = 0;
+ void *result = nullptr;
switch (resourceType(resource)) {
case EglDisplay:
@@ -364,6 +373,12 @@ void *QEglFSIntegration::nativeResourceForWindow(const QByteArray &resource, QWi
if (window && window->handle())
result = reinterpret_cast<void*>(static_cast<QEglFSWindow *>(window->handle())->surface());
break;
+#if QT_CONFIG(vulkan)
+ case VkSurface:
+ if (window && window->handle() && window->surfaceType() == QSurface::VulkanSurface)
+ result = static_cast<QEglFSWindow *>(window->handle())->vulkanSurfacePtr();
+ break;
+#endif
default:
break;
}
@@ -374,7 +389,7 @@ void *QEglFSIntegration::nativeResourceForWindow(const QByteArray &resource, QWi
#ifndef QT_NO_OPENGL
void *QEglFSIntegration::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
{
- void *result = 0;
+ void *result = nullptr;
switch (resourceType(resource)) {
case EglContext:
@@ -402,7 +417,7 @@ static void *eglContextForContext(QOpenGLContext *context)
QEglFSContext *handle = static_cast<QEglFSContext *>(context->handle());
if (!handle)
- return 0;
+ return nullptr;
return handle->eglContext();
}
@@ -416,7 +431,7 @@ QPlatformNativeInterface::NativeResourceForContextFunction QEglFSIntegration::na
#else
Q_UNUSED(resource);
#endif
- return 0;
+ return nullptr;
}
QFunctionPointer QEglFSIntegration::platformFunction(const QByteArray &function) const
diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h b/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
index 898b322834..b293651ce7 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
+++ b/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
@@ -86,6 +86,9 @@ public:
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const override;
#endif
+#if QT_CONFIG(vulkan)
+ QPlatformVulkanInstance *createPlatformVulkanInstance(QVulkanInstance *instance) const override;
+#endif
bool hasCapability(QPlatformIntegration::Capability cap) const override;
QPlatformNativeInterface *nativeInterface() const override;
diff --git a/src/plugins/platforms/eglfs/api/qeglfsoffscreenwindow.cpp b/src/plugins/platforms/eglfs/api/qeglfsoffscreenwindow.cpp
index 864271cd3a..c96e329816 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsoffscreenwindow.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfsoffscreenwindow.cpp
@@ -67,7 +67,7 @@ QEglFSOffscreenWindow::QEglFSOffscreenWindow(EGLDisplay display, const QSurfaceF
return;
}
EGLConfig config = q_configFromGLFormat(m_display, m_format);
- m_surface = eglCreateWindowSurface(m_display, config, m_window, 0);
+ m_surface = eglCreateWindowSurface(m_display, config, m_window, nullptr);
if (m_surface != EGL_NO_SURFACE)
m_format = q_glFormatFromConfig(m_display, config);
}
diff --git a/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp
index 11b68c0589..8a8e8cd563 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QEglFSScreen::QEglFSScreen(EGLDisplay dpy)
: m_dpy(dpy),
m_surface(EGL_NO_SURFACE),
- m_cursor(0)
+ m_cursor(nullptr)
{
m_cursor = qt_egl_device_integration()->createCursor(this);
}
@@ -164,7 +164,7 @@ void QEglFSScreen::handleCursorMove(const QPoint &pos)
return;
}
- QWindow *enter = 0, *leave = 0;
+ QWindow *enter = nullptr, *leave = nullptr;
for (int i = windows.count() - 1; i >= 0; --i) {
QWindow *window = windows[i]->sourceWindow();
const QRect geom = window->geometry();
diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp
index 1fed182882..f7e116eb88 100644
--- a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp
@@ -61,13 +61,12 @@ QT_BEGIN_NAMESPACE
QEglFSWindow::QEglFSWindow(QWindow *w)
: QPlatformWindow(w),
#ifndef QT_NO_OPENGL
- m_backingStore(0),
- m_rasterCompositingContext(0),
+ m_backingStore(nullptr),
+ m_rasterCompositingContext(nullptr),
#endif
m_winId(0),
m_surface(EGL_NO_SURFACE),
- m_window(0),
- m_flags(0)
+ m_window(0)
{
}
@@ -186,7 +185,7 @@ void QEglFSWindow::destroy()
#endif
}
- m_flags = 0;
+ m_flags = { };
}
void QEglFSWindow::invalidateSurface()
@@ -208,7 +207,7 @@ void QEglFSWindow::resetSurface()
m_format = q_glFormatFromConfig(display, m_config, platformFormat);
const QSize surfaceSize = screen()->rawGeometry().size();
m_window = qt_egl_device_integration()->createNativeWindow(this, surfaceSize, m_format);
- m_surface = eglCreateWindowSurface(display, m_config, m_window, NULL);
+ m_surface = eglCreateWindowSurface(display, m_config, m_window, nullptr);
}
void QEglFSWindow::setVisible(bool visible)
@@ -338,7 +337,7 @@ const QPlatformTextureList *QEglFSWindow::textures() const
if (m_backingStore)
return m_backingStore->textures();
- return 0;
+ return nullptr;
}
void QEglFSWindow::endCompositing()
diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h
index be2a0630d3..7bf74c25ee 100644
--- a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h
+++ b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h
@@ -64,6 +64,7 @@ QT_BEGIN_NAMESPACE
class QOpenGLCompositorBackingStore;
class QPlatformTextureList;
+
#ifndef QT_NO_OPENGL
class Q_EGLFS_EXPORT QEglFSWindow : public QPlatformWindow, public QOpenGLCompositorWindow
#else
@@ -96,6 +97,9 @@ public:
EGLNativeWindowType eglWindow() const;
EGLSurface surface() const;
QEglFSScreen *screen() const override;
+#if QT_CONFIG(vulkan)
+ virtual void *vulkanSurfacePtr() { return nullptr; }
+#endif
bool hasNativeWindow() const { return m_flags.testFlag(HasNativeWindow); }
diff --git a/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkaninstance.cpp b/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkaninstance.cpp
new file mode 100644
index 0000000000..a75251ca5f
--- /dev/null
+++ b/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkaninstance.cpp
@@ -0,0 +1,280 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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 "qeglfsvulkaninstance_p.h"
+#include "qeglfswindow_p.h"
+#include "qeglfshooks_p.h"
+#include <QLoggingCategory>
+
+QT_BEGIN_NAMESPACE
+
+Q_DECLARE_LOGGING_CATEGORY(qLcEglDevDebug)
+
+QEglFSVulkanInstance::QEglFSVulkanInstance(QVulkanInstance *instance)
+ : m_instance(instance)
+{
+ loadVulkanLibrary(QStringLiteral("vulkan"));
+}
+
+void QEglFSVulkanInstance::createOrAdoptInstance()
+{
+ qCDebug(qLcEglDevDebug, "Creating Vulkan instance for VK_KHR_display");
+
+ const QByteArray extName = QByteArrayLiteral("VK_KHR_display");
+ initInstance(m_instance, { extName });
+ if (!m_vkInst)
+ return;
+ if (!enabledExtensions().contains(extName)) {
+ qWarning("Failed to enable VK_KHR_display extension");
+ return;
+ }
+
+#if VK_KHR_display
+ m_getPhysicalDeviceDisplayPropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)
+ m_vkGetInstanceProcAddr(m_vkInst, "vkGetPhysicalDeviceDisplayPropertiesKHR");
+ m_getDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR)
+ m_vkGetInstanceProcAddr(m_vkInst, "vkGetDisplayModePropertiesKHR");
+ m_getPhysicalDeviceDisplayPlanePropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)
+ m_vkGetInstanceProcAddr(m_vkInst, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
+
+ m_getDisplayPlaneSupportedDisplaysKHR = (PFN_vkGetDisplayPlaneSupportedDisplaysKHR)
+ m_vkGetInstanceProcAddr(m_vkInst, "vkGetDisplayPlaneSupportedDisplaysKHR");
+ m_getDisplayPlaneCapabilitiesKHR = (PFN_vkGetDisplayPlaneCapabilitiesKHR)
+ m_vkGetInstanceProcAddr(m_vkInst, "vkGetDisplayPlaneCapabilitiesKHR");
+
+ m_createDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR)
+ m_vkGetInstanceProcAddr(m_vkInst, "vkCreateDisplayPlaneSurfaceKHR");
+#endif
+
+ m_enumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices)
+ m_vkGetInstanceProcAddr(m_vkInst, "vkEnumeratePhysicalDevices");
+
+ // Use for first physical device, unless overridden by QT_VK_PHYSICAL_DEVICE_INDEX.
+ // This behavior matches what the Vulkan backend of QRhi would do.
+
+ uint32_t physDevCount = 0;
+ m_enumeratePhysicalDevices(m_vkInst, &physDevCount, nullptr);
+ if (!physDevCount) {
+ qWarning("No physical devices");
+ return;
+ }
+ QVarLengthArray<VkPhysicalDevice, 4> physDevs(physDevCount);
+ VkResult err = m_enumeratePhysicalDevices(m_vkInst, &physDevCount, physDevs.data());
+ if (err != VK_SUCCESS || !physDevCount) {
+ qWarning("Failed to enumerate physical devices: %d", err);
+ return;
+ }
+
+ if (qEnvironmentVariableIsSet("QT_VK_PHYSICAL_DEVICE_INDEX")) {
+ int requestedPhysDevIndex = qEnvironmentVariableIntValue("QT_VK_PHYSICAL_DEVICE_INDEX");
+ if (requestedPhysDevIndex >= 0 && uint32_t(requestedPhysDevIndex) < physDevCount)
+ m_physDev = physDevs[requestedPhysDevIndex];
+ }
+
+ if (m_physDev == VK_NULL_HANDLE)
+ m_physDev = physDevs[0];
+}
+
+bool QEglFSVulkanInstance::supportsPresent(VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex,
+ QWindow *window)
+{
+ Q_UNUSED(physicalDevice);
+ Q_UNUSED(queueFamilyIndex);
+ Q_UNUSED(window);
+ return true;
+}
+
+VkSurfaceKHR QEglFSVulkanInstance::createSurface(QEglFSWindow *window)
+{
+#if VK_KHR_display
+ qCDebug(qLcEglDevDebug, "Creating VkSurfaceKHR via VK_KHR_display for window %p", (void *) window);
+
+ if (!m_physDev) {
+ qWarning("No physical device, cannot create surface");
+ return VK_NULL_HANDLE;
+ }
+
+ uint32_t displayCount = 0;
+ VkResult err = m_getPhysicalDeviceDisplayPropertiesKHR(m_physDev, &displayCount, nullptr);
+ if (err != VK_SUCCESS) {
+ qWarning("Failed to get display properties: %d", err);
+ return VK_NULL_HANDLE;
+ }
+
+ qCDebug(qLcEglDevDebug, "Display count: %u", displayCount);
+
+ QVarLengthArray<VkDisplayPropertiesKHR, 4> displayProps(displayCount);
+ m_getPhysicalDeviceDisplayPropertiesKHR(m_physDev, &displayCount, displayProps.data());
+
+ VkDisplayKHR display = VK_NULL_HANDLE;
+ VkDisplayModeKHR displayMode = VK_NULL_HANDLE;
+ uint32_t width = 0;
+ uint32_t height = 0;
+
+ for (uint32_t i = 0; i < displayCount; ++i) {
+ const VkDisplayPropertiesKHR &disp(displayProps[i]);
+ qCDebug(qLcEglDevDebug, "Display #%u:\n display: %p\n name: %s\n dimensions: %ux%u\n resolution: %ux%u",
+ i, (void *) disp.display, disp.displayName,
+ disp.physicalDimensions.width, disp.physicalDimensions.height,
+ disp.physicalResolution.width, disp.physicalResolution.height);
+
+ // Just pick the first display and the first mode.
+ if (i == 0)
+ display = disp.display;
+
+ uint32_t modeCount = 0;
+ if (m_getDisplayModePropertiesKHR(m_physDev, disp.display, &modeCount, nullptr) != VK_SUCCESS) {
+ qWarning("Failed to get modes for display");
+ continue;
+ }
+ QVarLengthArray<VkDisplayModePropertiesKHR, 16> modeProps(modeCount);
+ m_getDisplayModePropertiesKHR(m_physDev, disp.display, &modeCount, modeProps.data());
+ for (uint32_t j = 0; j < modeCount; ++j) {
+ const VkDisplayModePropertiesKHR &mode(modeProps[j]);
+ qCDebug(qLcEglDevDebug, " Mode #%u:\n mode: %p\n visibleRegion: %ux%u\n refreshRate: %u",
+ j, (void *) mode.displayMode,
+ mode.parameters.visibleRegion.width, mode.parameters.visibleRegion.height,
+ mode.parameters.refreshRate);
+ if (j == 0) {
+ displayMode = mode.displayMode;
+ width = mode.parameters.visibleRegion.width;
+ height = mode.parameters.visibleRegion.height;
+ }
+ }
+ }
+
+ if (display == VK_NULL_HANDLE || displayMode == VK_NULL_HANDLE) {
+ qWarning("Failed to choose display and mode");
+ return VK_NULL_HANDLE;
+ }
+ uint32_t planeCount = 0;
+ err = m_getPhysicalDeviceDisplayPlanePropertiesKHR(m_physDev, &planeCount, nullptr);
+ if (err != VK_SUCCESS) {
+ qWarning("Failed to get plane properties: %d", err);
+ return VK_NULL_HANDLE;
+ }
+
+ qCDebug(qLcEglDevDebug, "Plane count: %u", planeCount);
+
+ QVarLengthArray<VkDisplayPlanePropertiesKHR, 4> planeProps(planeCount);
+ m_getPhysicalDeviceDisplayPlanePropertiesKHR(m_physDev, &planeCount, planeProps.data());
+
+ uint32_t planeIndex = UINT_MAX;
+ for (uint32_t i = 0; i < planeCount; ++i) {
+ uint32_t supportedDisplayCount = 0;
+ err = m_getDisplayPlaneSupportedDisplaysKHR(m_physDev, i, &supportedDisplayCount, nullptr);
+ if (err != VK_SUCCESS) {
+ qWarning("Failed to query supported displays for plane: %d", err);
+ return VK_NULL_HANDLE;
+ }
+
+ QVarLengthArray<VkDisplayKHR, 4> supportedDisplays(supportedDisplayCount);
+ m_getDisplayPlaneSupportedDisplaysKHR(m_physDev, i, &supportedDisplayCount, supportedDisplays.data());
+ qCDebug(qLcEglDevDebug, "Plane #%u supports %u displays, currently bound to display %p",
+ i, supportedDisplayCount, (void *) planeProps[i].currentDisplay);
+
+ VkDisplayPlaneCapabilitiesKHR caps;
+ err = m_getDisplayPlaneCapabilitiesKHR(m_physDev, displayMode, i, &caps);
+ if (err != VK_SUCCESS) {
+ qWarning("Failed to query plane capabilities: %d", err);
+ return VK_NULL_HANDLE;
+ }
+
+ qCDebug(qLcEglDevDebug, " supportedAlpha: %d (1=no, 2=global, 4=per pixel, 8=per pixel premul)\n"
+ " minSrc=%d, %d %ux%u\n"
+ " maxSrc=%d, %d %ux%u\n"
+ " minDst=%d, %d %ux%u\n"
+ " maxDst=%d, %d %ux%u",
+ int(caps.supportedAlpha),
+ caps.minSrcPosition.x, caps.minSrcPosition.y, caps.minSrcExtent.width, caps.minSrcExtent.height,
+ caps.maxSrcPosition.x, caps.maxSrcPosition.y, caps.maxSrcExtent.width, caps.maxSrcExtent.height,
+ caps.minDstPosition.x, caps.minDstPosition.y, caps.minDstExtent.width, caps.minDstExtent.height,
+ caps.maxDstPosition.x, caps.maxDstPosition.y, caps.maxDstExtent.width, caps.maxDstExtent.height);
+
+ // if the plane is not in use and supports our chosen display, use that plane
+ if (supportedDisplays.contains(display)
+ && (planeProps[i].currentDisplay == VK_NULL_HANDLE || planeProps[i].currentDisplay == display))
+ {
+ planeIndex = i;
+ }
+ }
+
+ if (planeIndex == UINT_MAX) {
+ qWarning("Failed to find a suitable plane");
+ return VK_NULL_HANDLE;
+ }
+
+ qCDebug(qLcEglDevDebug, "Using plane #%u", planeIndex);
+
+ VkDisplaySurfaceCreateInfoKHR surfaceCreateInfo = {};
+ surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR;
+ surfaceCreateInfo.displayMode = displayMode;
+ surfaceCreateInfo.planeIndex = planeIndex;
+ surfaceCreateInfo.planeStackIndex = planeProps[planeIndex].currentStackIndex;
+ surfaceCreateInfo.transform = VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR;
+ surfaceCreateInfo.globalAlpha = 1.0f;
+ surfaceCreateInfo.alphaMode = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR;
+ surfaceCreateInfo.imageExtent = { width, height };
+
+ VkSurfaceKHR surface = VK_NULL_HANDLE;
+ err = m_createDisplayPlaneSurfaceKHR(m_vkInst, &surfaceCreateInfo, nullptr, &surface);
+ if (err != VK_SUCCESS || surface == VK_NULL_HANDLE) {
+ qWarning("Failed to create surface: %d", err);
+ return VK_NULL_HANDLE;
+ }
+
+ qCDebug(qLcEglDevDebug, "Created surface %p", (void *) surface);
+
+ return surface;
+
+#else
+ Q_UNUSED(window);
+ qWarning("VK_KHR_display support was not compiled in, cannot create surface");
+ return VK_NULL_HANDLE;
+#endif
+}
+
+void QEglFSVulkanInstance::presentAboutToBeQueued(QWindow *window)
+{
+ // support QT_QPA_EGLFS_FORCEVSYNC (i.MX8 with eglfs_viv)
+ qt_egl_device_integration()->waitForVSync(window->handle());
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkaninstance_p.h b/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkaninstance_p.h
new file mode 100644
index 0000000000..9d6d47f439
--- /dev/null
+++ b/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkaninstance_p.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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 QEGLFSVULKANINSTANCE_H
+#define QEGLFSVULKANINSTANCE_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 "qeglfsglobal_p.h"
+#include <QtVulkanSupport/private/qbasicvulkanplatforminstance_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QEglFSWindow;
+
+class Q_EGLFS_EXPORT QEglFSVulkanInstance : public QBasicPlatformVulkanInstance
+{
+public:
+ QEglFSVulkanInstance(QVulkanInstance *instance);
+
+ void createOrAdoptInstance() override;
+ bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) override;
+ void presentAboutToBeQueued(QWindow *window) override;
+
+ VkSurfaceKHR createSurface(QEglFSWindow *window);
+
+private:
+ QVulkanInstance *m_instance;
+ VkPhysicalDevice m_physDev = VK_NULL_HANDLE;
+ PFN_vkEnumeratePhysicalDevices m_enumeratePhysicalDevices = nullptr;
+#if VK_KHR_display
+ PFN_vkGetPhysicalDeviceDisplayPropertiesKHR m_getPhysicalDeviceDisplayPropertiesKHR = nullptr;
+ PFN_vkGetDisplayModePropertiesKHR m_getDisplayModePropertiesKHR = nullptr;
+ PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR m_getPhysicalDeviceDisplayPlanePropertiesKHR = nullptr;
+ PFN_vkGetDisplayPlaneSupportedDisplaysKHR m_getDisplayPlaneSupportedDisplaysKHR = nullptr;
+ PFN_vkGetDisplayPlaneCapabilitiesKHR m_getDisplayPlaneCapabilitiesKHR = nullptr;
+ PFN_vkCreateDisplayPlaneSurfaceKHR m_createDisplayPlaneSurfaceKHR = nullptr;
+#endif
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkanwindow.cpp b/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkanwindow.cpp
new file mode 100644
index 0000000000..ae41ca00b6
--- /dev/null
+++ b/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkanwindow.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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 "qeglfsvulkanwindow_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QEglFSVulkanWindow::QEglFSVulkanWindow(QWindow *window)
+ : QEglFSWindow(window),
+ m_surface(VK_NULL_HANDLE)
+{
+}
+
+QEglFSVulkanWindow::~QEglFSVulkanWindow()
+{
+ if (m_surface) {
+ QVulkanInstance *inst = window()->vulkanInstance();
+ if (inst)
+ static_cast<QEglFSVulkanInstance *>(inst->handle())->destroySurface(m_surface);
+ }
+}
+
+void *QEglFSVulkanWindow::vulkanSurfacePtr()
+{
+ if (m_surface)
+ return &m_surface;
+
+ QVulkanInstance *inst = window()->vulkanInstance();
+ if (!inst) {
+ qWarning("Attempted to create Vulkan surface without an instance; was QWindow::setVulkanInstance() called?");
+ return nullptr;
+ }
+ QEglFSVulkanInstance *eglfsInst = static_cast<QEglFSVulkanInstance *>(inst->handle());
+ m_surface = eglfsInst->createSurface(this);
+
+ return &m_surface;
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkanwindow_p.h b/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkanwindow_p.h
new file mode 100644
index 0000000000..492fb41ca4
--- /dev/null
+++ b/src/plugins/platforms/eglfs/api/vulkan/qeglfsvulkanwindow_p.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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 QEGLFSVULKANWINDOW_H
+#define QEGLFSVULKANWINDOW_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 "qeglfsglobal_p.h"
+#include "qeglfswindow_p.h"
+#include "qeglfsvulkaninstance_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class Q_EGLFS_EXPORT QEglFSVulkanWindow : public QEglFSWindow
+{
+public:
+ QEglFSVulkanWindow(QWindow *window);
+ ~QEglFSVulkanWindow();
+
+ void *vulkanSurfacePtr() override;
+
+private:
+ VkSurfaceKHR m_surface;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
index 4d0cf0c47e..dc98cdce4b 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
@@ -69,7 +69,7 @@ QEglFSKmsGbmCursor::QEglFSKmsGbmCursor(QEglFSKmsGbmScreen *screen)
: m_screen(screen)
, m_cursorSize(64, 64) // 64x64 is the old standard size, we now try to query the real size below
, m_bo(nullptr)
- , m_cursorImage(0, 0, 0, 0, 0, 0)
+ , m_cursorImage(nullptr, nullptr, 0, 0, 0, 0)
, m_state(CursorPendingVisible)
, m_deviceListener(nullptr)
{
@@ -102,7 +102,7 @@ QEglFSKmsGbmCursor::QEglFSKmsGbmCursor(QEglFSKmsGbmScreen *screen)
#ifndef QT_NO_CURSOR
QCursor cursor(Qt::ArrowCursor);
- changeCursor(&cursor, 0);
+ changeCursor(&cursor, nullptr);
#endif
setPos(QPoint(0, 0));
}
@@ -214,7 +214,8 @@ void QEglFSKmsGbmCursor::changeCursor(QCursor *windowCursor, QWindow *window)
Q_FOREACH (QPlatformScreen *screen, m_screen->virtualSiblings()) {
QEglFSKmsScreen *kmsScreen = static_cast<QEglFSKmsScreen *>(screen);
-
+ if (kmsScreen->isCursorOutOfRange())
+ continue;
int status = drmModeSetCursor(kmsScreen->device()->fd(), kmsScreen->output().crtc_id, handle,
m_cursorSize.width(), m_cursorSize.height());
if (status != 0)
@@ -232,17 +233,36 @@ void QEglFSKmsGbmCursor::setPos(const QPoint &pos)
{
Q_FOREACH (QPlatformScreen *screen, m_screen->virtualSiblings()) {
QEglFSKmsScreen *kmsScreen = static_cast<QEglFSKmsScreen *>(screen);
- QPoint origin = kmsScreen->geometry().topLeft();
- QPoint localPos = pos - origin;
- QPoint adjustedPos = localPos - m_cursorImage.hotspot();
-
- int ret = drmModeMoveCursor(kmsScreen->device()->fd(), kmsScreen->output().crtc_id, adjustedPos.x(), adjustedPos.y());
- if (ret == 0)
- m_pos = pos;
- else
- qWarning("Failed to move cursor on screen %s: %d", kmsScreen->name().toLatin1().constData(), ret);
-
- kmsScreen->handleCursorMove(pos);
+ const QRect screenGeom = kmsScreen->geometry();
+ const QPoint origin = screenGeom.topLeft();
+ const QPoint localPos = pos - origin;
+ const QPoint adjustedLocalPos = localPos - m_cursorImage.hotspot();
+
+ if (localPos.x() < 0 || localPos.y() < 0
+ || localPos.x() >= screenGeom.width() || localPos.y() >= screenGeom.height())
+ {
+ if (!kmsScreen->isCursorOutOfRange()) {
+ kmsScreen->setCursorOutOfRange(true);
+ drmModeSetCursor(kmsScreen->device()->fd(), kmsScreen->output().crtc_id, 0, 0, 0);
+ }
+ } else {
+ int ret;
+ if (kmsScreen->isCursorOutOfRange()) {
+ kmsScreen->setCursorOutOfRange(false);
+ uint32_t handle = gbm_bo_get_handle(m_bo).u32;
+ ret = drmModeSetCursor(kmsScreen->device()->fd(), kmsScreen->output().crtc_id,
+ handle, m_cursorSize.width(), m_cursorSize.height());
+ } else {
+ ret = drmModeMoveCursor(kmsScreen->device()->fd(), kmsScreen->output().crtc_id,
+ adjustedLocalPos.x(), adjustedLocalPos.y());
+ }
+ if (ret == 0)
+ m_pos = pos;
+ else
+ qWarning("Failed to move cursor on screen %s: %d", kmsScreen->name().toLatin1().constData(), ret);
+
+ kmsScreen->handleCursorMove(pos);
+ }
}
}
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
index d47b579238..5d2dfedba2 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
@@ -85,6 +85,8 @@ public:
void updateMouseStatus();
+ void reevaluateVisibilityForScreens() { setPos(pos()); }
+
private:
void initCursorAtlas();
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp
index 20127ae7f7..503419cf91 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp
@@ -83,6 +83,8 @@ bool QEglFSKmsGbmDevice::open()
setFd(fd);
+ m_eventReader.create(this);
+
return true;
}
@@ -90,6 +92,8 @@ void QEglFSKmsGbmDevice::close()
{
// Note: screens are gone at this stage.
+ m_eventReader.destroy();
+
if (m_gbm_device) {
gbm_device_destroy(m_gbm_device);
m_gbm_device = nullptr;
@@ -155,4 +159,14 @@ void QEglFSKmsGbmDevice::registerScreenCloning(QPlatformScreen *screen,
gbmScreen->initCloning(screenThisScreenClones, screensCloningThisScreen);
}
+void QEglFSKmsGbmDevice::registerScreen(QPlatformScreen *screen,
+ bool isPrimary,
+ const QPoint &virtualPos,
+ const QList<QPlatformScreen *> &virtualSiblings)
+{
+ QEglFSKmsDevice::registerScreen(screen, isPrimary, virtualPos, virtualSiblings);
+ if (screenConfig()->hwCursor() && m_globalCursor)
+ m_globalCursor->reevaluateVisibilityForScreens();
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.h
index 518e2ce58b..f1476f8ffa 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.h
@@ -70,6 +70,10 @@ public:
void registerScreenCloning(QPlatformScreen *screen,
QPlatformScreen *screenThisScreenClones,
const QVector<QPlatformScreen *> &screensCloningThisScreen) override;
+ void registerScreen(QPlatformScreen *screen,
+ bool isPrimary,
+ const QPoint &virtualPos,
+ const QList<QPlatformScreen *> &virtualSiblings) override;
private:
Q_DISABLE_COPY(QEglFSKmsGbmDevice)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
index f154520669..caa1187b40 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
@@ -54,8 +54,6 @@
QT_BEGIN_NAMESPACE
-QMutex QEglFSKmsGbmScreen::m_waitForFlipMutex;
-
QEglFSKmsGbmIntegration::QEglFSKmsGbmIntegration()
{
qCDebug(qLcEglfsKmsDebug, "New DRM/KMS via GBM integration created");
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
index 16dbfe1522..6f5c3b6953 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
@@ -110,7 +110,7 @@ QEglFSKmsGbmScreen::FrameBuffer *QEglFSKmsGbmScreen::framebufferForBufferObject(
return fb.take();
}
-QEglFSKmsGbmScreen::QEglFSKmsGbmScreen(QKmsDevice *device, const QKmsOutput &output, bool headless)
+QEglFSKmsGbmScreen::QEglFSKmsGbmScreen(QEglFSKmsDevice *device, const QKmsOutput &output, bool headless)
: QEglFSKmsScreen(device, output, headless)
, m_gbm_surface(nullptr)
, m_gbm_bo_current(nullptr)
@@ -243,7 +243,7 @@ void QEglFSKmsGbmScreen::ensureModeSet(uint32_t fb)
if (device()->hasAtomicSupport()) {
#if QT_CONFIG(drm_atomic)
- drmModeAtomicReq *request = device()->atomic_request();
+ drmModeAtomicReq *request = device()->threadLocalAtomicRequest();
if (request) {
drmModeAtomicAddProperty(request, op.connector_id, op.crtcIdPropertyId, op.crtc_id);
drmModeAtomicAddProperty(request, op.crtc_id, op.modeIdPropertyId, op.mode_blob_id);
@@ -276,19 +276,15 @@ void QEglFSKmsGbmScreen::waitForFlip()
if (!m_gbm_bo_next)
return;
- QMutexLocker lock(&m_waitForFlipMutex);
- while (m_gbm_bo_next) {
- drmEventContext drmEvent;
- memset(&drmEvent, 0, sizeof(drmEvent));
- drmEvent.version = 2;
- drmEvent.vblank_handler = nullptr;
- drmEvent.page_flip_handler = pageFlipHandler;
- drmHandleEvent(device()->fd(), &drmEvent);
- }
+ m_flipMutex.lock();
+ device()->eventReader()->startWaitFlip(this, &m_flipMutex, &m_flipCond);
+ m_flipCond.wait(&m_flipMutex);
+ m_flipMutex.unlock();
+
+ flipFinished();
#if QT_CONFIG(drm_atomic)
- if (device()->hasAtomicSupport())
- device()->atomicReset();
+ device()->threadLocalAtomicReset();
#endif
}
@@ -324,16 +320,16 @@ void QEglFSKmsGbmScreen::flip()
if (device()->hasAtomicSupport()) {
#if QT_CONFIG(drm_atomic)
- drmModeAtomicReq *request = device()->atomic_request();
+ drmModeAtomicReq *request = device()->threadLocalAtomicRequest();
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);
+ op.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);
+ op.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,
@@ -371,7 +367,7 @@ void QEglFSKmsGbmScreen::flip()
if (device()->hasAtomicSupport()) {
#if QT_CONFIG(drm_atomic)
- drmModeAtomicReq *request = device()->atomic_request();
+ drmModeAtomicReq *request = device()->threadLocalAtomicRequest();
if (request) {
drmModeAtomicAddProperty(request, d.screen->output().eglfs_plane->id,
d.screen->output().eglfs_plane->framebufferPropertyId, fb->fb);
@@ -394,22 +390,10 @@ void QEglFSKmsGbmScreen::flip()
}
#if QT_CONFIG(drm_atomic)
- if (device()->hasAtomicSupport())
- device()->atomicCommit(this);
+ device()->threadLocalAtomicCommit(this);
#endif
}
-void QEglFSKmsGbmScreen::pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
-{
- Q_UNUSED(fd);
- Q_UNUSED(sequence);
- Q_UNUSED(tv_sec);
- Q_UNUSED(tv_usec);
-
- QEglFSKmsGbmScreen *screen = static_cast<QEglFSKmsGbmScreen *>(user_data);
- screen->flipFinished();
-}
-
void QEglFSKmsGbmScreen::flipFinished()
{
if (m_cloneSource) {
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.h
index b94f44b7b1..69feeee703 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.h
@@ -43,7 +43,8 @@
#define QEGLFSKMSGBMSCREEN_H
#include "qeglfskmsscreen.h"
-#include <QtCore/QMutex>
+#include <QMutex>
+#include <QWaitCondition>
#include <gbm.h>
@@ -54,7 +55,7 @@ class QEglFSKmsGbmCursor;
class QEglFSKmsGbmScreen : public QEglFSKmsScreen
{
public:
- QEglFSKmsGbmScreen(QKmsDevice *device, const QKmsOutput &output, bool headless);
+ QEglFSKmsGbmScreen(QEglFSKmsDevice *device, const QKmsOutput &output, bool headless);
~QEglFSKmsGbmScreen();
QPlatformCursor *cursor() const override;
@@ -75,18 +76,15 @@ private:
void cloneDestFlipFinished(QEglFSKmsGbmScreen *cloneDestScreen);
void updateFlipStatus();
- static void pageFlipHandler(int fd,
- unsigned int sequence,
- unsigned int tv_sec,
- unsigned int tv_usec,
- void *user_data);
-
gbm_surface *m_gbm_surface;
gbm_bo *m_gbm_bo_current;
gbm_bo *m_gbm_bo_next;
bool m_flipPending;
+ QMutex m_flipMutex;
+ QWaitCondition m_flipCond;
+
QScopedPointer<QEglFSKmsGbmCursor> m_cursor;
struct FrameBuffer {
@@ -101,8 +99,6 @@ private:
bool cloneFlipPending = false;
};
QVector<CloneDestination> m_cloneDests;
-
- static QMutex m_waitForFlipMutex;
};
QT_END_NAMESPACE
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 1626c86239..5a62e437c4 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(qLcEglfsKmsDebug)
-QEglFSKmsEglDeviceScreen::QEglFSKmsEglDeviceScreen(QKmsDevice *device, const QKmsOutput &output)
+QEglFSKmsEglDeviceScreen::QEglFSKmsEglDeviceScreen(QEglFSKmsDevice *device, const QKmsOutput &output)
: QEglFSKmsScreen(device, output)
{
}
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.h
index 5efe35f8b3..961398ba3e 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.h
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QEglFSKmsEglDeviceScreen : public QEglFSKmsScreen
{
public:
- QEglFSKmsEglDeviceScreen(QKmsDevice *device, const QKmsOutput &output);
+ QEglFSKmsEglDeviceScreen(QEglFSKmsDevice *device, const QKmsOutput &output);
~QEglFSKmsEglDeviceScreen();
QPlatformCursor *cursor() const override;
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro
index 40806b6a9b..e51903ed96 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro
@@ -14,9 +14,11 @@ CONFIG += egl
SOURCES += $$PWD/qeglfskmsintegration.cpp \
$$PWD/qeglfskmsdevice.cpp \
- $$PWD/qeglfskmsscreen.cpp
+ $$PWD/qeglfskmsscreen.cpp \
+ $$PWD/qeglfskmseventreader.cpp
HEADERS += $$PWD/qeglfskmsintegration.h \
$$PWD/qeglfskmsdevice.h \
$$PWD/qeglfskmsscreen.h \
- $$PWD/qeglfskmshelpers.h
+ $$PWD/qeglfskmshelpers.h \
+ $$PWD/qeglfskmseventreader.h
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.h
index fc83a620d9..34908aa60f 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.h
@@ -42,6 +42,7 @@
#define QEGLFSKMSDEVICE_H
#include "private/qeglfsglobal_p.h"
+#include "qeglfskmseventreader.h"
#include <QtKmsSupport/private/qkmsdevice_p.h>
QT_BEGIN_NAMESPACE
@@ -55,6 +56,11 @@ public:
bool isPrimary,
const QPoint &virtualPos,
const QList<QPlatformScreen *> &virtualSiblings) override;
+
+ QEglFSKmsEventReader *eventReader() { return &m_eventReader; }
+
+protected:
+ QEglFSKmsEventReader m_eventReader;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.cpp
new file mode 100644
index 0000000000..645a0ae2e9
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.cpp
@@ -0,0 +1,218 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 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 "qeglfskmseventreader.h"
+#include "qeglfskmsdevice.h"
+#include <QSocketNotifier>
+#include <QCoreApplication>
+#include <QLoggingCategory>
+
+QT_BEGIN_NAMESPACE
+
+Q_DECLARE_LOGGING_CATEGORY(qLcEglfsKmsDebug)
+
+static void pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
+{
+ Q_UNUSED(fd);
+ Q_UNUSED(sequence);
+ Q_UNUSED(tv_sec);
+ Q_UNUSED(tv_usec);
+
+ QEglFSKmsEventReaderThread *t = static_cast<QEglFSKmsEventReaderThread *>(QThread::currentThread());
+ t->eventHost()->handlePageFlipCompleted(user_data);
+}
+
+class RegisterWaitFlipEvent : public QEvent
+{
+public:
+ static const QEvent::Type TYPE = QEvent::Type(QEvent::User + 1);
+ RegisterWaitFlipEvent(void *key, QMutex *mutex, QWaitCondition *cond)
+ : QEvent(TYPE), key(key), mutex(mutex), cond(cond)
+ { }
+ void *key;
+ QMutex *mutex;
+ QWaitCondition *cond;
+};
+
+bool QEglFSKmsEventHost::event(QEvent *event)
+{
+ if (event->type() == RegisterWaitFlipEvent::TYPE) {
+ RegisterWaitFlipEvent *e = static_cast<RegisterWaitFlipEvent *>(event);
+ PendingFlipWait *p = &pendingFlipWaits[0];
+ PendingFlipWait *end = p + MAX_FLIPS;
+ while (p < end) {
+ if (!p->key) {
+ p->key = e->key;
+ p->mutex = e->mutex;
+ p->cond = e->cond;
+ updateStatus();
+ return true;
+ }
+ ++p;
+ }
+ qWarning("Cannot queue page flip wait (more than %d screens?)", MAX_FLIPS);
+ e->mutex->lock();
+ e->cond->wakeOne();
+ e->mutex->unlock();
+ return true;
+ }
+ return QObject::event(event);
+}
+
+void QEglFSKmsEventHost::updateStatus()
+{
+ void **begin = &completedFlips[0];
+ void **end = begin + MAX_FLIPS;
+
+ for (int i = 0; i < MAX_FLIPS; ++i) {
+ PendingFlipWait *w = pendingFlipWaits + i;
+ if (!w->key)
+ continue;
+
+ void **p = begin;
+ while (p < end) {
+ if (*p == w->key) {
+ *p = nullptr;
+ w->key = nullptr;
+ w->mutex->lock();
+ w->cond->wakeOne();
+ w->mutex->unlock();
+ return;
+ }
+ ++p;
+ }
+ }
+}
+
+void QEglFSKmsEventHost::handlePageFlipCompleted(void *key)
+{
+ void **begin = &completedFlips[0];
+ void **end = begin + MAX_FLIPS;
+ void **p = begin;
+ while (p < end) {
+ if (*p == key) {
+ updateStatus();
+ return;
+ }
+ ++p;
+ }
+ p = begin;
+ while (p < end) {
+ if (!*p) {
+ *p = key;
+ updateStatus();
+ return;
+ }
+ ++p;
+ }
+ qWarning("Cannot store page flip status (more than %d screens?)", MAX_FLIPS);
+}
+
+void QEglFSKmsEventReaderThread::run()
+{
+ qCDebug(qLcEglfsKmsDebug, "Event reader thread: entering event loop");
+
+ QSocketNotifier notifier(m_fd, QSocketNotifier::Read);
+ QObject::connect(&notifier, &QSocketNotifier::activated, &notifier, [this] {
+ drmEventContext drmEvent;
+ memset(&drmEvent, 0, sizeof(drmEvent));
+ drmEvent.version = 2;
+ drmEvent.vblank_handler = nullptr;
+ drmEvent.page_flip_handler = pageFlipHandler;
+ drmHandleEvent(m_fd, &drmEvent);
+ });
+
+ exec();
+
+ m_ev.moveToThread(thread()); // move back to the thread where m_ev was created
+
+ qCDebug(qLcEglfsKmsDebug, "Event reader thread: event loop stopped");
+}
+
+QEglFSKmsEventReader::~QEglFSKmsEventReader()
+{
+ destroy();
+}
+
+void QEglFSKmsEventReader::create(QEglFSKmsDevice *device)
+{
+ destroy();
+
+ if (!device)
+ return;
+
+ m_device = device;
+
+ qCDebug(qLcEglfsKmsDebug, "Initalizing event reader for device %p fd %d",
+ m_device, m_device->fd());
+
+ m_thread = new QEglFSKmsEventReaderThread(m_device->fd());
+ m_thread->start();
+
+ // Change thread affinity for the event host, so that postEvent()
+ // goes through the event reader thread's event loop for that object.
+ m_thread->eventHost()->moveToThread(m_thread);
+}
+
+void QEglFSKmsEventReader::destroy()
+{
+ if (!m_device)
+ return;
+
+ qCDebug(qLcEglfsKmsDebug, "Stopping event reader for device %p", m_device);
+
+ if (m_thread) {
+ m_thread->quit();
+ m_thread->wait();
+ delete m_thread;
+ m_thread = nullptr;
+ }
+
+ m_device = nullptr;
+}
+
+void QEglFSKmsEventReader::startWaitFlip(void *key, QMutex *mutex, QWaitCondition *cond)
+{
+ if (m_thread) {
+ QCoreApplication::postEvent(m_thread->eventHost(),
+ new RegisterWaitFlipEvent(key, mutex, cond));
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.h
new file mode 100644
index 0000000000..4aa285b0fe
--- /dev/null
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 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 QEGLFSKKMSEVENTREADER_H
+#define QEGLFSKKMSEVENTREADER_H
+
+#include "private/qeglfsglobal_p.h"
+#include <QObject>
+#include <QThread>
+#include <QMutex>
+#include <QWaitCondition>
+
+QT_BEGIN_NAMESPACE
+
+class QEglFSKmsDevice;
+
+struct QEglFSKmsEventHost : public QObject
+{
+ struct PendingFlipWait {
+ void *key;
+ QMutex *mutex;
+ QWaitCondition *cond;
+ };
+
+ static const int MAX_FLIPS = 32;
+ void *completedFlips[MAX_FLIPS] = {};
+ QEglFSKmsEventHost::PendingFlipWait pendingFlipWaits[MAX_FLIPS] = {};
+
+ bool event(QEvent *event) override;
+ void updateStatus();
+ void handlePageFlipCompleted(void *key);
+};
+
+class QEglFSKmsEventReaderThread : public QThread
+{
+public:
+ QEglFSKmsEventReaderThread(int fd) : m_fd(fd) { }
+ void run() override;
+ QEglFSKmsEventHost *eventHost() { return &m_ev; }
+
+private:
+ int m_fd;
+ QEglFSKmsEventHost m_ev;
+};
+
+class Q_EGLFS_EXPORT QEglFSKmsEventReader
+{
+public:
+ ~QEglFSKmsEventReader();
+
+ void create(QEglFSKmsDevice *device);
+ void destroy();
+
+ void startWaitFlip(void *key, QMutex *mutex, QWaitCondition *cond);
+
+private:
+ QEglFSKmsDevice *m_device = nullptr;
+ QEglFSKmsEventReaderThread *m_thread = nullptr;
+};
+
+QT_END_NAMESPACE
+
+#endif // QEGLFSKKMSEVENTREADER_H
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 a6aac61506..28b6b7df63 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp
@@ -140,7 +140,7 @@ void *QEglFSKmsIntegration::nativeResourceForIntegration(const QByteArray &name)
#if QT_CONFIG(drm_atomic)
if (name == QByteArrayLiteral("dri_atomic_request") && m_device)
- return (void *) (qintptr) m_device->atomic_request();
+ return (void *) (qintptr) m_device->threadLocalAtomicRequest();
#endif
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 e5354d97bd..959f17eba3 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include "qeglfskmsscreen.h"
+#include "qeglfskmsdevice.h"
#include "qeglfsintegration_p.h"
#include <QtCore/QLoggingCategory>
@@ -68,10 +69,11 @@ private:
QEglFSKmsScreen *m_screen;
};
-QEglFSKmsScreen::QEglFSKmsScreen(QKmsDevice *device, const QKmsOutput &output, bool headless)
+QEglFSKmsScreen::QEglFSKmsScreen(QEglFSKmsDevice *device, const QKmsOutput &output, bool headless)
: QEglFSScreen(static_cast<QEglFSIntegration *>(QGuiApplicationPrivate::platformIntegration())->display())
, m_device(device)
, m_output(output)
+ , m_cursorOutOfRange(false)
, m_powerState(PowerStateOn)
, m_interruptHandler(new QEglFSKmsInterruptHandler(this))
, m_headless(headless)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
index 7f395aacb7..a5c8f5b4e8 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
@@ -51,12 +51,13 @@
QT_BEGIN_NAMESPACE
+class QEglFSKmsDevice;
class QEglFSKmsInterruptHandler;
class Q_EGLFS_EXPORT QEglFSKmsScreen : public QEglFSScreen
{
public:
- QEglFSKmsScreen(QKmsDevice *device, const QKmsOutput &output, bool headless = false);
+ QEglFSKmsScreen(QEglFSKmsDevice *device, const QKmsOutput &output, bool headless = false);
~QEglFSKmsScreen();
void setVirtualPosition(const QPoint &pos);
@@ -87,7 +88,7 @@ public:
int currentMode() const override;
int preferredMode() const override;
- QKmsDevice *device() const { return m_device; }
+ QEglFSKmsDevice *device() const { return m_device; }
virtual void waitForFlip();
@@ -99,12 +100,16 @@ public:
QPlatformScreen::PowerState powerState() const override;
void setPowerState(QPlatformScreen::PowerState state) override;
+ bool isCursorOutOfRange() const { return m_cursorOutOfRange; }
+ void setCursorOutOfRange(bool b) { m_cursorOutOfRange = b; }
+
protected:
- QKmsDevice *m_device;
+ QEglFSKmsDevice *m_device;
QKmsOutput m_output;
QEdidParser m_edid;
QPoint m_pos;
+ bool m_cursorOutOfRange;
QList<QPlatformScreen *> m_siblings;
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.cpp
index 475d9d55dd..c255bc84b7 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.cpp
@@ -99,7 +99,7 @@ QEglFSKmsVsp2Screen::DmaBuffer *QEglFSKmsVsp2Screen::dmaBufferForGbmBuffer(gbm_b
return fb.take();
}
-QEglFSKmsVsp2Screen::QEglFSKmsVsp2Screen(QKmsDevice *device, const QKmsOutput &output)
+QEglFSKmsVsp2Screen::QEglFSKmsVsp2Screen(QEglFSKmsDevice *device, const QKmsOutput &output)
: QEglFSKmsScreen(device, output)
, m_blender(new Blender(this))
{
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h
index 7618510333..378786643d 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
class QEglFSKmsVsp2Screen : public QEglFSKmsScreen
{
public:
- QEglFSKmsVsp2Screen(QKmsDevice *device, const QKmsOutput &output);
+ QEglFSKmsVsp2Screen(QEglFSKmsDevice *device, const QKmsOutput &output);
gbm_surface *createSurface();
void resetSurface();
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp
index 2fc076ad0c..5e1d28a353 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp
@@ -41,6 +41,11 @@
#include <EGL/eglvivante.h>
#include <QDebug>
+#if QT_CONFIG(vulkan)
+#include "private/qeglfsvulkaninstance_p.h"
+#include "private/qeglfsvulkanwindow_p.h"
+#endif
+
#ifdef Q_OS_INTEGRITY
extern "C" void VivanteInit(void);
#endif
@@ -97,4 +102,20 @@ void QEglFSVivIntegration::destroyNativeWindow(EGLNativeWindowType window)
fbDestroyWindow(window);
}
+#if QT_CONFIG(vulkan)
+
+QEglFSWindow *QEglFSVivIntegration::createWindow(QWindow *window) const
+{
+ if (window->surfaceType() == QSurface::VulkanSurface)
+ return new QEglFSVulkanWindow(window);
+ return QEglFSDeviceIntegration::createWindow(window);
+}
+
+QPlatformVulkanInstance *QEglFSVivIntegration::createPlatformVulkanInstance(QVulkanInstance *instance)
+{
+ return new QEglFSVulkanInstance(instance);
+}
+
+#endif // vulkan
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.h
index 4d1718afcf..02b59c16b5 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.h
@@ -53,6 +53,12 @@ public:
void destroyNativeWindow(EGLNativeWindowType window) override;
EGLNativeDisplayType platformDisplay() const override;
+ // Vulkan support with VK_KHR_display
+#if QT_CONFIG(vulkan)
+ QEglFSWindow *createWindow(QWindow *window) const override;
+ QPlatformVulkanInstance *createPlatformVulkanInstance(QVulkanInstance *instance) override;
+#endif
+
private:
QSize mScreenSize;
EGLNativeDisplayType mNativeDisplay;
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp
index 07b2de7c58..ce5a721906 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp
@@ -75,7 +75,7 @@ void EventReader::run()
if (client->format == 32
&& client->type == atoms[Atoms::WM_PROTOCOLS]
&& client->data.data32[0] == atoms[Atoms::WM_DELETE_WINDOW]) {
- QWindow *window = m_integration->platformWindow() ? m_integration->platformWindow()->window() : 0;
+ QWindow *window = m_integration->platformWindow() ? m_integration->platformWindow()->window() : nullptr;
if (window)
QWindowSystemInterface::handleCloseEvent(window);
}
@@ -106,7 +106,7 @@ void QEglFSX11Integration::sendConnectionEvent(xcb_atom_t a)
void QEglFSX11Integration::platformInit()
{
- m_display = XOpenDisplay(0);
+ m_display = XOpenDisplay(nullptr);
if (Q_UNLIKELY(!m_display))
qFatal("Could not open display");
@@ -121,7 +121,7 @@ void QEglFSX11Integration::platformInit()
xcb_create_window(m_connection, XCB_COPY_FROM_PARENT,
m_connectionEventListener, it.data->root,
0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_ONLY,
- it.data->root_visual, 0, 0);
+ it.data->root_visual, 0, nullptr);
m_eventReader = new EventReader(this);
m_eventReader->start();
@@ -135,11 +135,11 @@ void QEglFSX11Integration::platformDestroy()
m_eventReader->wait();
delete m_eventReader;
- m_eventReader = 0;
+ m_eventReader = nullptr;
XCloseDisplay(DISPLAY);
- m_display = 0;
- m_connection = 0;
+ m_display = nullptr;
+ m_connection = nullptr;
}
EGLNativeDisplayType QEglFSX11Integration::platformDisplay() const
@@ -175,7 +175,7 @@ EGLNativeWindowType QEglFSX11Integration::createNativeWindow(QPlatformWindow *pl
xcb_create_window(m_connection, XCB_COPY_FROM_PARENT, m_window, it.data->root,
0, 0, size.width(), size.height(), 0,
XCB_WINDOW_CLASS_INPUT_OUTPUT, it.data->root_visual,
- 0, 0);
+ 0, nullptr);
xcb_intern_atom_cookie_t cookies[Atoms::N_ATOMS];
static const char *atomNames[Atoms::N_ATOMS] = {
@@ -189,7 +189,7 @@ EGLNativeWindowType QEglFSX11Integration::createNativeWindow(QPlatformWindow *pl
for (int i = 0; i < Atoms::N_ATOMS; ++i) {
cookies[i] = xcb_intern_atom(m_connection, false, strlen(atomNames[i]), atomNames[i]);
- xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(m_connection, cookies[i], 0);
+ xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(m_connection, cookies[i], nullptr);
m_atoms[i] = reply->atom;
free(reply);
}
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.h
index bf431caaac..ebcc19b682 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.h
@@ -67,7 +67,7 @@ class EventReader;
class QEglFSX11Integration : public QEglFSDeviceIntegration
{
public:
- QEglFSX11Integration() : m_connection(0), m_window(0), m_eventReader(0) {}
+ QEglFSX11Integration() : m_connection(nullptr), m_window(0), m_eventReader(nullptr) {}
void platformInit() override;
void platformDestroy() override;
diff --git a/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro b/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
index 8bb7b614f1..bd02aea4d3 100644
--- a/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
+++ b/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
@@ -20,6 +20,9 @@ qtHaveModule(input_support-private): \
qtHaveModule(platformcompositor_support-private): \
QT += platformcompositor_support-private
+qtConfig(vulkan): \
+ QT += vulkan_support-private
+
# Avoid X11 header collision, use generic EGL native types
DEFINES += QT_EGL_NO_X11
diff --git a/src/plugins/platforms/eglfs/qeglfsmain.cpp b/src/plugins/platforms/eglfs/qeglfsmain.cpp
index 4f77b7cd17..b41bbec27d 100644
--- a/src/plugins/platforms/eglfs/qeglfsmain.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsmain.cpp
@@ -56,7 +56,7 @@ QPlatformIntegration* QEglFSIntegrationPlugin::create(const QString& system, con
if (!system.compare(QLatin1String("eglfs"), Qt::CaseInsensitive))
return new QEglFSIntegration;
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
index 54152aebf7..c5244a51ad 100644
--- a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
+++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
@@ -373,7 +373,7 @@ bool QIOSFileEngineAssetsLibrary::close()
QAbstractFileEngine::FileFlags QIOSFileEngineAssetsLibrary::fileFlags(QAbstractFileEngine::FileFlags type) const
{
- QAbstractFileEngine::FileFlags flags = 0;
+ QAbstractFileEngine::FileFlags flags;
const bool isDir = (m_assetUrl == QLatin1String("assets-library://"));
const bool exists = isDir || m_assetUrl == g_iteratorCurrentUrl.localData() || loadAsset();
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index cdec57de71..1b6a802ca2 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -51,6 +51,9 @@
#include <qpa/qplatformintegration.h>
#import <QuartzCore/CAEAGLLayer.h>
+#ifdef Q_OS_IOS
+#import <QuartzCore/CAMetalLayer.h>
+#endif
#include <QtDebug>
@@ -58,9 +61,15 @@ QT_BEGIN_NAMESPACE
QIOSWindow::QIOSWindow(QWindow *window)
: QPlatformWindow(window)
- , m_view([[QUIView alloc] initWithQIOSWindow:this])
, m_windowLevel(0)
{
+#ifdef Q_OS_IOS
+ if (window->surfaceType() == QSurface::MetalSurface)
+ m_view = [[QUIMetalView alloc] initWithQIOSWindow:this];
+ else
+#endif
+ m_view = [[QUIView alloc] initWithQIOSWindow:this];
+
connect(qGuiApp, &QGuiApplication::applicationStateChanged, this, &QIOSWindow::applicationStateChanged);
setParent(QPlatformWindow::parent());
diff --git a/src/plugins/platforms/ios/quiview.h b/src/plugins/platforms/ios/quiview.h
index e1d5d5af0c..1ab9481dd6 100644
--- a/src/plugins/platforms/ios/quiview.h
+++ b/src/plugins/platforms/ios/quiview.h
@@ -70,3 +70,7 @@ QT_END_NAMESPACE
@property (nonatomic, readonly) UIEdgeInsets qt_safeAreaInsets;
@end
+#ifdef Q_OS_IOS
+@interface QUIMetalView : QUIView
+@end
+#endif
diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm
index 91a186bace..59eae07388 100644
--- a/src/plugins/platforms/ios/quiview.mm
+++ b/src/plugins/platforms/ios/quiview.mm
@@ -100,13 +100,15 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
- (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 = @{
- kEAGLDrawablePropertyRetainedBacking: @(YES),
- kEAGLDrawablePropertyColorFormat: kEAGLColorFormatRGBA8
- };
+ if ([self.layer isKindOfClass:[CAEAGLLayer class]]) {
+ // Set up EAGL layer
+ CAEAGLLayer *eaglLayer = static_cast<CAEAGLLayer *>(self.layer);
+ eaglLayer.opaque = TRUE;
+ eaglLayer.drawableProperties = @{
+ kEAGLDrawablePropertyRetainedBacking: @(YES),
+ kEAGLDrawablePropertyColorFormat: kEAGLColorFormatRGBA8
+ };
+ }
if (isQtApplication())
self.hidden = YES;
@@ -675,6 +677,25 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
@end
+#ifdef Q_OS_IOS
+@implementation QUIMetalView
+
++ (Class)layerClass
+{
+#ifdef TARGET_IPHONE_SIMULATOR
+ if (@available(ios 13.0, *))
+#endif
+
+ return [CAMetalLayer class];
+
+#ifdef TARGET_IPHONE_SIMULATOR
+ return nil;
+#endif
+}
+
+@end
+#endif
+
#ifndef QT_NO_ACCESSIBILITY
// Include category as an alternative to using -ObjC (Apple QA1490)
#include "quiview_accessibility.mm"
diff --git a/src/plugins/platforms/offscreen/main.cpp b/src/plugins/platforms/offscreen/main.cpp
index 207db60f3a..f364d9f004 100644
--- a/src/plugins/platforms/offscreen/main.cpp
+++ b/src/plugins/platforms/offscreen/main.cpp
@@ -57,7 +57,7 @@ QPlatformIntegration *QOffscreenIntegrationPlugin::create(const QString& system,
if (!system.compare(QLatin1String("offscreen"), Qt::CaseInsensitive))
return QOffscreenIntegration::createOffscreenIntegration();
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/offscreen/qoffscreencommon.cpp b/src/plugins/platforms/offscreen/qoffscreencommon.cpp
index eae25012c1..de75a3e012 100644
--- a/src/plugins/platforms/offscreen/qoffscreencommon.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreencommon.cpp
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
-QPlatformWindow *QOffscreenScreen::windowContainingCursor = 0;
+QPlatformWindow *QOffscreenScreen::windowContainingCursor = nullptr;
class QOffscreenCursor : public QPlatformCursor
{
@@ -60,7 +60,7 @@ public:
{
m_pos = pos;
const QWindowList wl = QGuiApplication::topLevelWindows();
- QWindow *containing = 0;
+ QWindow *containing = nullptr;
for (QWindow *w : wl) {
if (w->type() != Qt::Desktop && w->isExposed() && w->geometry().contains(pos)) {
containing = w;
@@ -72,7 +72,7 @@ public:
if (containing)
local -= containing->position();
- QWindow *previous = QOffscreenScreen::windowContainingCursor ? QOffscreenScreen::windowContainingCursor->window() : 0;
+ QWindow *previous = QOffscreenScreen::windowContainingCursor ? QOffscreenScreen::windowContainingCursor->window() : nullptr;
if (containing != previous)
QWindowSystemInterface::handleEnterLeaveEvent(containing, previous, local, pos);
@@ -80,7 +80,7 @@ public:
QWindowSystemInterface::handleMouseEvent(containing, local, pos, QGuiApplication::mouseButtons(), Qt::NoButton,
QEvent::MouseMove, QGuiApplication::keyboardModifiers(), Qt::MouseEventSynthesizedByQt);
- QOffscreenScreen::windowContainingCursor = containing ? containing->handle() : 0;
+ QOffscreenScreen::windowContainingCursor = containing ? containing->handle() : nullptr;
}
#ifndef QT_NO_CURSOR
void changeCursor(QCursor *windowCursor, QWindow *window) override
@@ -106,7 +106,7 @@ QPixmap QOffscreenScreen::grabWindow(WId id, int x, int y, int width, int height
QOffscreenWindow *window = QOffscreenWindow::windowForWinId(id);
if (!window || window->window()->type() == Qt::Desktop) {
const QWindowList wl = QGuiApplication::topLevelWindows();
- QWindow *containing = 0;
+ QWindow *containing = nullptr;
for (QWindow *w : wl) {
if (w->type() != Qt::Desktop && w->isExposed() && w->geometry().contains(rect)) {
containing = w;
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
index 869e9228cd..3a4494fc2e 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
@@ -79,7 +79,7 @@ template <typename BaseEventDispatcher>
class QOffscreenEventDispatcher : public BaseEventDispatcher
{
public:
- explicit QOffscreenEventDispatcher(QObject *parent = 0)
+ explicit QOffscreenEventDispatcher(QObject *parent = nullptr)
: BaseEventDispatcher(parent)
{
}
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
index 92fc8aa57a..84991d751f 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
@@ -206,7 +206,7 @@ QOffscreenX11GLXContext::QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGL
if (d->format.renderableType() != QSurfaceFormat::OpenGL)
return;
- d->shareContext = 0;
+ d->shareContext = nullptr;
if (context->shareHandle())
d->shareContext = static_cast<QOffscreenX11GLXContext *>(context->shareHandle())->d->context;
@@ -216,9 +216,9 @@ QOffscreenX11GLXContext::QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGL
if (config) {
d->context = glXCreateNewContext(x11->display(), config, GLX_RGBA_TYPE, d->shareContext, true);
if (!d->context && d->shareContext) {
- d->shareContext = 0;
+ d->shareContext = nullptr;
// re-try without a shared glx context
- d->context = glXCreateNewContext(x11->display(), config, GLX_RGBA_TYPE, 0, true);
+ d->context = glXCreateNewContext(x11->display(), config, GLX_RGBA_TYPE, nullptr, true);
}
// Get the basic surface format details
@@ -234,8 +234,8 @@ QOffscreenX11GLXContext::QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGL
d->context = glXCreateContext(x11->display(), visualInfo, d->shareContext, true);
if (!d->context && d->shareContext) {
// re-try without a shared glx context
- d->shareContext = 0;
- d->context = glXCreateContext(x11->display(), visualInfo, 0, true);
+ d->shareContext = nullptr;
+ d->context = glXCreateContext(x11->display(), visualInfo, nullptr, true);
}
d->window = createDummyWindow(x11, visualInfo);
@@ -269,7 +269,7 @@ bool QOffscreenX11GLXContext::makeCurrent(QPlatformSurface *surface)
void QOffscreenX11GLXContext::doneCurrent()
{
- glXMakeCurrent(d->x11->display(), 0, 0);
+ glXMakeCurrent(d->x11->display(), 0, nullptr);
}
void QOffscreenX11GLXContext::swapBuffers(QPlatformSurface *)
diff --git a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp
index 832e94034d..53880c877e 100644
--- a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp
@@ -69,7 +69,7 @@ QOffscreenWindow::QOffscreenWindow(QWindow *window)
QOffscreenWindow::~QOffscreenWindow()
{
if (QOffscreenScreen::windowContainingCursor == this)
- QOffscreenScreen::windowContainingCursor = 0;
+ QOffscreenScreen::windowContainingCursor = nullptr;
m_windowForWinIdHash.remove(m_winId);
}
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp
index 1d030ba1aa..69391c4fec 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.cpp
+++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp
@@ -58,8 +58,6 @@
QT_BEGIN_NAMESPACE
-EGLDisplay QQnxGLContext::ms_eglDisplay = EGL_NO_DISPLAY;
-
static QEGLPlatformContext::Flags makeFlags()
{
QEGLPlatformContext::Flags result = 0;
@@ -71,7 +69,8 @@ static QEGLPlatformContext::Flags makeFlags()
}
QQnxGLContext::QQnxGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share)
- : QEGLPlatformContext(format, share, ms_eglDisplay, 0, QVariant(), makeFlags())
+ : QEGLPlatformContext(format, share, QQnxIntegration::instance()->eglDisplay(), 0, QVariant(),
+ makeFlags())
{
}
@@ -79,28 +78,6 @@ QQnxGLContext::~QQnxGLContext()
{
}
-void QQnxGLContext::initializeContext()
-{
- qGLContextDebug();
-
- // Initialize connection to EGL
- ms_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- if (Q_UNLIKELY(ms_eglDisplay == EGL_NO_DISPLAY))
- qFatal("QQnxGLContext: failed to obtain EGL display: %x", eglGetError());
-
- EGLBoolean eglResult = eglInitialize(ms_eglDisplay, 0, 0);
- if (Q_UNLIKELY(eglResult != EGL_TRUE))
- qFatal("QQnxGLContext: failed to initialize EGL display, err=%d", eglGetError());
-}
-
-void QQnxGLContext::shutdownContext()
-{
- qGLContextDebug();
-
- // Close connection to EGL
- eglTerminate(ms_eglDisplay);
-}
-
EGLSurface QQnxGLContext::eglSurfaceForPlatformSurface(QPlatformSurface *surface)
{
QQnxEglWindow *window = static_cast<QQnxEglWindow *>(surface);
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.h b/src/plugins/platforms/qnx/qqnxglcontext.h
index 19179a80e2..5d807ee9e4 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.h
+++ b/src/plugins/platforms/qnx/qqnxglcontext.h
@@ -58,19 +58,12 @@ public:
QQnxGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share);
virtual ~QQnxGLContext();
- static void initializeContext();
- static void shutdownContext();
-
bool makeCurrent(QPlatformSurface *surface) override;
void swapBuffers(QPlatformSurface *surface) override;
void doneCurrent() override;
protected:
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) override;
-
-private:
- //Can be static because different displays returne the same handle
- static EGLDisplay ms_eglDisplay;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index f479e94988..84baa6ec44 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -170,6 +170,9 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
#if QT_CONFIG(draganddrop)
, m_drag(new QSimpleDrag())
#endif
+#if QT_CONFIG(opengl)
+ , m_eglDisplay(EGL_NO_DISPLAY)
+#endif
{
ms_instance = this;
m_options = parseOptions(paramList);
@@ -195,9 +198,8 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
QMetaObject::invokeMethod(m_navigatorEventNotifier, "start", Qt::QueuedConnection);
#endif
-#if !defined(QT_NO_OPENGL)
- // Initialize global OpenGL resources
- QQnxGLContext::initializeContext();
+#if QT_CONFIG(opengl)
+ createEglDisplay();
#endif
// Create/start event thread
@@ -284,9 +286,8 @@ QQnxIntegration::~QQnxIntegration()
// Close connection to QNX composition manager
screen_destroy_context(m_screenContext);
-#if !defined(QT_NO_OPENGL)
- // Cleanup global OpenGL resources
- QQnxGLContext::shutdownContext();
+#if QT_CONFIG(opengl)
+ destroyEglDisplay();
#endif
#if QT_CONFIG(qqnx_pps)
@@ -741,4 +742,28 @@ bool QQnxIntegration::supportsNavigatorEvents() const
return m_navigator != 0;
}
+#if QT_CONFIG(opengl)
+void QQnxIntegration::createEglDisplay()
+{
+ qIntegrationDebug();
+
+ // Initialize connection to EGL
+ m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (Q_UNLIKELY(m_eglDisplay == EGL_NO_DISPLAY))
+ qFatal("QQnxiIntegration: failed to obtain EGL display: %x", eglGetError());
+
+ EGLBoolean eglResult = eglInitialize(m_eglDisplay, 0, 0);
+ if (Q_UNLIKELY(eglResult != EGL_TRUE))
+ qFatal("QQnxIntegration: failed to initialize EGL display, err=%d", eglGetError());
+}
+
+void QQnxIntegration::destroyEglDisplay()
+{
+ qIntegrationDebug();
+
+ // Close connection to EGL
+ eglTerminate(m_eglDisplay);
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qnx/qqnxintegration.h b/src/plugins/platforms/qnx/qqnxintegration.h
index 0bf37880d1..2596af3c45 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.h
+++ b/src/plugins/platforms/qnx/qqnxintegration.h
@@ -46,6 +46,10 @@
#include <screen/screen.h>
+#if QT_CONFIG(opengl)
+#include <EGL/egl.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QQnxScreenEventThread;
@@ -96,7 +100,8 @@ public:
QPlatformWindow *createPlatformWindow(QWindow *window) const override;
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
-#if !defined(QT_NO_OPENGL)
+#if QT_CONFIG(opengl)
+ EGLDisplay eglDisplay() const { return m_eglDisplay; }
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
#endif
@@ -175,6 +180,12 @@ private:
Options m_options;
+#if QT_CONFIG(opengl)
+ EGLDisplay m_eglDisplay;
+ void createEglDisplay();
+ void destroyEglDisplay();
+#endif
+
static QQnxIntegration *ms_instance;
friend class QQnxWindow;
diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
index 3bd6a86b59..25f7b09a60 100644
--- a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
+++ b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
@@ -94,6 +94,11 @@ void *QQnxNativeInterface::nativeResourceForIntegration(const QByteArray &resour
if (resource == "screenContext")
return m_integration->screenContext();
+#if QT_CONFIG(opengl)
+ if (resource.toLower() == "egldisplay")
+ return m_integration->eglDisplay();
+#endif
+
return 0;
}
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
index a9b5860187..e3a6aea99f 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
@@ -257,7 +257,7 @@ void QQnxScreenEventHandler::injectKeyboardEvent(int flags, int sym, int modifie
capKeyString(cap, modifiers, key);
QWindowSystemInterface::handleExtendedKeyEvent(QGuiApplication::focusWindow(), type, key, qtMod,
- scan, virtualKey, modifiers, keyStr);
+ scan, virtualKey, modifiers, keyStr, flags & KEY_REPEAT);
qScreenEventDebug() << "Qt key t=" << type << ", k=" << key << ", s=" << keyStr;
}
diff --git a/src/plugins/platforms/vnc/main.cpp b/src/plugins/platforms/vnc/main.cpp
index 3ec0f0b78d..ac7e18e03f 100644
--- a/src/plugins/platforms/vnc/main.cpp
+++ b/src/plugins/platforms/vnc/main.cpp
@@ -56,7 +56,7 @@ QPlatformIntegration* QVncIntegrationPlugin::create(const QString& system, const
if (!system.compare(QLatin1String("vnc"), Qt::CaseInsensitive))
return new QVncIntegration(paramList);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/vnc/qvnc.cpp b/src/plugins/platforms/vnc/qvnc.cpp
index 32114c6443..8390fa19cd 100644
--- a/src/plugins/platforms/vnc/qvnc.cpp
+++ b/src/plugins/platforms/vnc/qvnc.cpp
@@ -537,7 +537,7 @@ QVncClientCursor::QVncClientCursor()
{
QWindow *w = QGuiApplication::focusWindow();
QCursor c = w ? w->cursor() : QCursor(Qt::ArrowCursor);
- changeCursor(&c, 0);
+ changeCursor(&c, nullptr);
}
QVncClientCursor::~QVncClientCursor()
@@ -595,7 +595,7 @@ void QVncClientCursor::changeCursor(QCursor *widgetCursor, QWindow *window)
cursor = widgetCursor->pixmap().toImage();
} else {
// system cursor
- QPlatformCursorImage platformImage(0, 0, 0, 0, 0, 0);
+ QPlatformCursorImage platformImage(nullptr, nullptr, 0, 0, 0, 0);
platformImage.set(shape);
cursor = *platformImage.image();
hotspot = platformImage.hotspot();
diff --git a/src/plugins/platforms/vnc/qvncclient.cpp b/src/plugins/platforms/vnc/qvncclient.cpp
index 3a373a5e4b..c5caddc58d 100644
--- a/src/plugins/platforms/vnc/qvncclient.cpp
+++ b/src/plugins/platforms/vnc/qvncclient.cpp
@@ -65,7 +65,6 @@ QVncClient::QVncClient(QTcpSocket *clientSocket, QVncServer *server)
, m_cutTextPending(0)
, m_supportHextile(false)
, m_wantUpdate(false)
- , m_keymod(0)
, m_dirtyCursor(false)
, m_updatePending(false)
, m_protocolVersion(V3_3)
@@ -618,7 +617,7 @@ void QVncClient::keyEvent()
m_keymod = ev.down ? m_keymod | Qt::AltModifier :
m_keymod & ~Qt::AltModifier;
if (ev.unicode || ev.keycode)
- QWindowSystemInterface::handleKeyEvent(0, ev.down ? QEvent::KeyPress : QEvent::KeyRelease, ev.keycode, m_keymod, QString(ev.unicode));
+ QWindowSystemInterface::handleKeyEvent(nullptr, ev.down ? QEvent::KeyPress : QEvent::KeyRelease, ev.keycode, m_keymod, QString(ev.unicode));
m_handleMsg = false;
}
}
diff --git a/src/plugins/platforms/vnc/qvncscreen.cpp b/src/plugins/platforms/vnc/qvncscreen.cpp
index 2eca18fb4d..5dc3919ff5 100644
--- a/src/plugins/platforms/vnc/qvncscreen.cpp
+++ b/src/plugins/platforms/vnc/qvncscreen.cpp
@@ -101,7 +101,7 @@ bool QVncScreen::initialize()
default:
qWarning("QVNCScreen::initDevice: No support for screen depth %d",
depth());
- dirty = 0;
+ dirty = nullptr;
return false;
}
diff --git a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
index d89cd78b28..ca8db9b215 100644
--- a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
+++ b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
@@ -33,9 +33,11 @@
#include <emscripten.h>
+#if QT_CONFIG(thread)
#if (__EMSCRIPTEN_major__ > 1 || __EMSCRIPTEN_minor__ > 38 || __EMSCRIPTEN_minor__ == 38 && __EMSCRIPTEN_tiny__ >= 22)
# define EMSCRIPTEN_HAS_ASYNC_RUN_IN_MAIN_RUNTIME_THREAD
#endif
+#endif
#ifdef EMSCRIPTEN_HAS_ASYNC_RUN_IN_MAIN_RUNTIME_THREAD
#include <emscripten/threading.h>
diff --git a/src/plugins/platforms/wasm/qwasmeventtranslator.cpp b/src/plugins/platforms/wasm/qwasmeventtranslator.cpp
index 1ccac87afa..62ada796db 100644
--- a/src/plugins/platforms/wasm/qwasmeventtranslator.cpp
+++ b/src/plugins/platforms/wasm/qwasmeventtranslator.cpp
@@ -339,8 +339,7 @@ QWasmEventTranslator::QWasmEventTranslator(QWasmScreen *screen)
void QWasmEventTranslator::initEventHandlers()
{
- QByteArray _canvasId = screen()->canvasId().toUtf8();
- const char *canvasId = _canvasId.constData();
+ QByteArray canvasSelector = "#" + screen()->canvasId().toUtf8();
// The Platform Detect: expand coverage and move as needed
enum Platform {
@@ -364,21 +363,21 @@ void QWasmEventTranslator::initEventHandlers()
}
}
- emscripten_set_keydown_callback(canvasId, (void *)this, 1, &keyboard_cb);
- emscripten_set_keyup_callback(canvasId, (void *)this, 1, &keyboard_cb);
+ emscripten_set_keydown_callback(canvasSelector.constData(), (void *)this, 1, &keyboard_cb);
+ emscripten_set_keyup_callback(canvasSelector.constData(), (void *)this, 1, &keyboard_cb);
- emscripten_set_mousedown_callback(canvasId, (void *)this, 1, &mouse_cb);
- emscripten_set_mouseup_callback(canvasId, (void *)this, 1, &mouse_cb);
- emscripten_set_mousemove_callback(canvasId, (void *)this, 1, &mouse_cb);
+ emscripten_set_mousedown_callback(canvasSelector.constData(), (void *)this, 1, &mouse_cb);
+ emscripten_set_mouseup_callback(canvasSelector.constData(), (void *)this, 1, &mouse_cb);
+ emscripten_set_mousemove_callback(canvasSelector.constData(), (void *)this, 1, &mouse_cb);
- emscripten_set_focus_callback(canvasId, (void *)this, 1, &focus_cb);
+ emscripten_set_focus_callback(canvasSelector.constData(), (void *)this, 1, &focus_cb);
- emscripten_set_wheel_callback(canvasId, (void *)this, 1, &wheel_cb);
+ emscripten_set_wheel_callback(canvasSelector.constData(), (void *)this, 1, &wheel_cb);
- emscripten_set_touchstart_callback(canvasId, (void *)this, 1, &touchCallback);
- emscripten_set_touchend_callback(canvasId, (void *)this, 1, &touchCallback);
- emscripten_set_touchmove_callback(canvasId, (void *)this, 1, &touchCallback);
- emscripten_set_touchcancel_callback(canvasId, (void *)this, 1, &touchCallback);
+ emscripten_set_touchstart_callback(canvasSelector.constData(), (void *)this, 1, &touchCallback);
+ emscripten_set_touchend_callback(canvasSelector.constData(), (void *)this, 1, &touchCallback);
+ emscripten_set_touchmove_callback(canvasSelector.constData(), (void *)this, 1, &touchCallback);
+ emscripten_set_touchcancel_callback(canvasSelector.constData(), (void *)this, 1, &touchCallback);
}
template <typename Event>
@@ -548,7 +547,7 @@ void resizeWindow(QWindow *window, QWasmWindow::ResizeMode mode,
void QWasmEventTranslator::processMouse(int eventType, const EmscriptenMouseEvent *mouseEvent)
{
- auto timestamp = mouseEvent->timestamp;
+ auto timestamp = emscripten_date_now();
QPoint targetPoint(mouseEvent->targetX, mouseEvent->targetY);
QPoint globalPoint = screen()->geometry().topLeft() + targetPoint;
@@ -674,7 +673,7 @@ int QWasmEventTranslator::wheel_cb(int eventType, const EmscriptenWheelEvent *wh
QWasmEventTranslator *translator = (QWasmEventTranslator*)userData;
Qt::KeyboardModifiers modifiers = translator->translateMouseEventModifier(&mouseEvent);
- auto timestamp = mouseEvent.timestamp;
+ auto timestamp = emscripten_date_now();
QPoint targetPoint(mouseEvent.targetX, mouseEvent.targetY);
QPoint globalPoint = eventTranslator->screen()->geometry().topLeft() + targetPoint;
diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp
index ee3f6afb73..9934f5ac19 100644
--- a/src/plugins/platforms/wasm/qwasmintegration.cpp
+++ b/src/plugins/platforms/wasm/qwasmintegration.cpp
@@ -108,9 +108,8 @@ QWasmIntegration::QWasmIntegration()
s_instance = this;
// We expect that qtloader.js has populated Module.qtCanvasElements with one or more canvases.
- // Also check Module.canvas, which may be set if the emscripen or a custom loader is used.
emscripten::val qtCanvaseElements = val::module_property("qtCanvasElements");
- emscripten::val canvas = val::module_property("canvas");
+ emscripten::val canvas = val::module_property("canvas"); // TODO: remove for Qt 6.0
if (!qtCanvaseElements.isUndefined()) {
int screenCount = qtCanvaseElements["length"].as<int>();
@@ -119,7 +118,9 @@ QWasmIntegration::QWasmIntegration()
QString canvasId = QWasmString::toQString(canvas["id"]);
addScreen(canvasId);
}
- } else if (!canvas.isUndefined()){
+ } else if (!canvas.isUndefined()) {
+ qWarning() << "Module.canvas is deprecated. A future version of Qt will stop reading this property. "
+ << "Instead, set Module.qtCanvasElements to be an array of canvas elements, or use qtloader.js.";
QString canvasId = QWasmString::toQString(canvas["id"]);
addScreen(canvasId);
}
@@ -139,7 +140,7 @@ QWasmIntegration::QWasmIntegration()
integration->resizeAllScreens();
return 0;
};
- emscripten_set_resize_callback(nullptr, nullptr, 1, onWindowResize);
+ emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, nullptr, 1, onWindowResize);
}
QWasmIntegration::~QWasmIntegration()
diff --git a/src/plugins/platforms/wasm/qwasmopenglcontext.cpp b/src/plugins/platforms/wasm/qwasmopenglcontext.cpp
index 501ab99116..4ddd56fd8c 100644
--- a/src/plugins/platforms/wasm/qwasmopenglcontext.cpp
+++ b/src/plugins/platforms/wasm/qwasmopenglcontext.cpp
@@ -106,7 +106,8 @@ EMSCRIPTEN_WEBGL_CONTEXT_HANDLE QWasmOpenGLContext::createEmscriptenContext(cons
attributes.depth = useDepthStencil;
attributes.stencil = useDepthStencil;
- EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context = emscripten_webgl_create_context(canvasId.toUtf8().constData(), &attributes);
+ QByteArray convasSelector = "#" + canvasId.toUtf8();
+ EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context = emscripten_webgl_create_context(convasSelector.constData(), &attributes);
return context;
}
diff --git a/src/plugins/platforms/wasm/qwasmscreen.cpp b/src/plugins/platforms/wasm/qwasmscreen.cpp
index d407111c2f..ba14421255 100644
--- a/src/plugins/platforms/wasm/qwasmscreen.cpp
+++ b/src/plugins/platforms/wasm/qwasmscreen.cpp
@@ -57,6 +57,8 @@ QWasmScreen::QWasmScreen(const QString &canvasId)
m_compositor = new QWasmCompositor(this);
m_eventTranslator = new QWasmEventTranslator(this);
updateQScreenAndCanvasRenderSize();
+ emscripten::val canvas = emscripten::val::global(m_canvasId.toUtf8().constData());
+ canvas.call<void>("focus");
}
QWasmScreen::~QWasmScreen()
@@ -178,10 +180,10 @@ void QWasmScreen::updateQScreenAndCanvasRenderSize()
// Setting the render size to a value larger than the CSS size enables high-dpi
// rendering.
- QByteArray canvasId = m_canvasId.toUtf8();
+ QByteArray canvasSelector = "#" + m_canvasId.toUtf8();
double css_width;
double css_height;
- emscripten_get_element_css_size(canvasId.constData(), &css_width, &css_height);
+ emscripten_get_element_css_size(canvasSelector.constData(), &css_width, &css_height);
QSizeF cssSize(css_width, css_height);
QSizeF canvasSize = cssSize * devicePixelRatio();
diff --git a/src/plugins/platforms/windows/qwindowsclipboard.cpp b/src/plugins/platforms/windows/qwindowsclipboard.cpp
index 4e6d3306e1..efcb0b6e6e 100644
--- a/src/plugins/platforms/windows/qwindowsclipboard.cpp
+++ b/src/plugins/platforms/windows/qwindowsclipboard.cpp
@@ -82,7 +82,7 @@ static QDebug operator<<(QDebug d, const QMimeData *mimeData)
d << "QMimeData(";
if (mimeData) {
const QStringList formats = mimeData->formats();
- d << "formats=" << formats.join(QLatin1String(", "));
+ d << "formats=" << formats.join(u", ");
if (mimeData->hasText())
d << ", text=" << mimeData->text();
if (mimeData->hasHtml())
@@ -190,7 +190,7 @@ void QWindowsClipboard::releaseIData()
void QWindowsClipboard::registerViewer()
{
m_clipboardViewer = QWindowsContext::instance()->
- createDummyWindow(QStringLiteral("Qt5ClipboardView"), L"Qt5ClipboardView",
+ createDummyWindow(QStringLiteral("ClipboardView"), L"QtClipboardView",
qClipboardViewerWndProc, WS_OVERLAPPED);
// Try format listener API (Vista onwards) first.
@@ -339,7 +339,7 @@ void QWindowsClipboard::setMimeData(QMimeData *mimeData, QClipboard::Mode mode)
if (src != S_OK) {
QString mimeDataFormats = mimeData ?
- mimeData->formats().join(QLatin1String(", ")) : QString(QStringLiteral("NULL"));
+ mimeData->formats().join(u", ") : QString(QStringLiteral("NULL"));
qErrnoWarning("OleSetClipboard: Failed to set mime data (%s) on clipboard: %s",
qPrintable(mimeDataFormats),
QWindowsContext::comErrorString(src).constData());
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index d31352b854..2591966d54 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -42,6 +42,7 @@
#include "qwindowsintegration.h"
#include "qwindowswindow.h"
#include "qwindowskeymapper.h"
+#include "qwindowsnativeinterface.h"
#include "qwindowsmousehandler.h"
#include "qwindowspointerhandler.h"
#include "qtwindowsglobal.h"
@@ -72,6 +73,7 @@
#include <QtCore/qset.h>
#include <QtCore/qhash.h>
+#include <QtCore/qlibraryinfo.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qdebug.h>
#include <QtCore/qoperatingsystemversion.h>
@@ -276,8 +278,11 @@ struct QWindowsContextPrivate {
bool m_asyncExpose = false;
HPOWERNOTIFY m_powerNotification = nullptr;
HWND m_powerDummyWindow = nullptr;
+ static bool m_darkMode;
};
+bool QWindowsContextPrivate::m_darkMode = false;
+
QWindowsContextPrivate::QWindowsContextPrivate()
: m_oleInitializeResult(OleInitialize(nullptr))
{
@@ -292,6 +297,7 @@ QWindowsContextPrivate::QWindowsContextPrivate()
m_systemInfo |= QWindowsContext::SI_RTL_Extensions;
m_keyMapper.setUseRTLExtensions(true);
}
+ m_darkMode = QWindowsTheme::queryDarkMode();
if (FAILED(m_oleInitializeResult)) {
qWarning() << "QWindowsContext: OleInitialize() failed: "
<< QWindowsContext::comErrorString(m_oleInitializeResult);
@@ -426,7 +432,7 @@ bool QWindowsContext::initPowerNotificationHandler()
if (d->m_powerNotification)
return false;
- d->m_powerDummyWindow = createDummyWindow(QStringLiteral("QtPowerDummyWindow"), L"QtPowerDummyWindow", qWindowsPowerWindowProc);
+ d->m_powerDummyWindow = createDummyWindow(QStringLiteral("PowerDummyWindow"), L"QtPowerDummyWindow", qWindowsPowerWindowProc);
if (!d->m_powerDummyWindow)
return false;
@@ -484,6 +490,11 @@ void QWindowsContext::setProcessDpiAwareness(QtWindows::ProcessDpiAwareness dpiA
}
}
+bool QWindowsContext::isDarkMode()
+{
+ return QWindowsContextPrivate::m_darkMode;
+}
+
QWindowsContext *QWindowsContext::instance()
{
return m_instance;
@@ -536,6 +547,23 @@ void QWindowsContext::setKeyGrabber(QWindow *w)
d->m_keyMapper.setKeyGrabber(w);
}
+QString QWindowsContext::classNamePrefix()
+{
+ static QString result;
+ if (result.isEmpty()) {
+ QTextStream str(&result);
+ str << "Qt" << QT_VERSION_MAJOR << QT_VERSION_MINOR << QT_VERSION_PATCH;
+ if (QLibraryInfo::isDebugBuild())
+ str << 'd';
+#ifdef QT_NAMESPACE
+# define xstr(s) str(s)
+# define str(s) #s
+ str << xstr(QT_NAMESPACE);
+#endif
+ }
+ return result;
+}
+
// Window class registering code (from qapplication_win.cpp)
QString QWindowsContext::registerWindowClass(const QWindow *w)
@@ -567,8 +595,8 @@ QString QWindowsContext::registerWindowClass(const QWindow *w)
break;
}
// Create a unique name for the flag combination
- QString cname;
- cname += QLatin1String("Qt5QWindow");
+ QString cname = classNamePrefix();
+ cname += QLatin1String("QWindow");
switch (type) {
case Qt::Tool:
cname += QLatin1String("Tool");
@@ -878,7 +906,7 @@ HWND QWindowsContext::createDummyWindow(const QString &classNameIn,
{
if (!wndProc)
wndProc = DefWindowProc;
- QString className = registerWindowClass(classNameIn, wndProc);
+ QString className = registerWindowClass(classNamePrefix() + classNameIn, wndProc);
return CreateWindowEx(0, reinterpret_cast<LPCWSTR>(className.utf16()),
windowName, style,
CW_USEDEFAULT, CW_USEDEFAULT,
@@ -1185,9 +1213,27 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
t->displayChanged();
QWindowsWindow::displayChanged();
return d->m_screenManager.handleDisplayChange(wParam, lParam);
- case QtWindows::SettingChangedEvent:
+ case QtWindows::SettingChangedEvent: {
QWindowsWindow::settingsChanged();
+ const bool darkMode = QWindowsTheme::queryDarkMode();
+ if (darkMode != QWindowsContextPrivate::m_darkMode) {
+ QWindowsContextPrivate::m_darkMode = darkMode;
+ auto nativeInterface =
+ static_cast<QWindowsNativeInterface *>(QWindowsIntegration::instance()->nativeInterface());
+ emit nativeInterface->darkModeChanged(darkMode);
+ const auto options = QWindowsIntegration::instance()->options();
+ if ((options & QWindowsIntegration::DarkModeWindowFrames) != 0) {
+ for (QWindowsWindow *w : d->m_windows)
+ w->setDarkBorder(QWindowsContextPrivate::m_darkMode);
+ }
+ if ((options & QWindowsIntegration::DarkModeStyle) != 0) {
+ QWindowsTheme::instance()->refresh();
+ for (QWindowsWindow *w : d->m_windows)
+ QWindowSystemInterface::handleThemeChange(w->window());
+ }
+ }
return d->m_screenManager.handleScreenChanges();
+ }
default:
break;
}
diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h
index 8027f09389..1831ac6ec0 100644
--- a/src/plugins/platforms/windows/qwindowscontext.h
+++ b/src/plugins/platforms/windows/qwindowscontext.h
@@ -180,6 +180,7 @@ public:
int defaultDPI() const;
+ static QString classNamePrefix();
QString registerWindowClass(const QWindow *w);
QString registerWindowClass(QString cname, WNDPROC proc,
unsigned style = 0, HBRUSH brush = nullptr,
@@ -225,6 +226,8 @@ public:
void setProcessDpiAwareness(QtWindows::ProcessDpiAwareness dpiAwareness);
static int processDpiAwareness();
+ static bool isDarkMode();
+
void setDetectAltGrModifier(bool a);
// Returns a combination of SystemInfoFlags
diff --git a/src/plugins/platforms/windows/qwindowscursor.cpp b/src/plugins/platforms/windows/qwindowscursor.cpp
index 59457f1720..19de3d5939 100644
--- a/src/plugins/platforms/windows/qwindowscursor.cpp
+++ b/src/plugins/platforms/windows/qwindowscursor.cpp
@@ -80,10 +80,10 @@ QWindowsPixmapCursorCacheKey::QWindowsPixmapCursorCacheKey(const QCursor &c)
: bitmapCacheKey(c.pixmap().cacheKey()), maskCacheKey(0)
{
if (!bitmapCacheKey) {
- Q_ASSERT(c.bitmap());
- Q_ASSERT(c.mask());
- bitmapCacheKey = c.bitmap()->cacheKey();
- maskCacheKey = c.mask()->cacheKey();
+ Q_ASSERT(!c.bitmap(Qt::ReturnByValue).isNull());
+ Q_ASSERT(!c.mask(Qt::ReturnByValue).isNull());
+ bitmapCacheKey = c.bitmap(Qt::ReturnByValue).cacheKey();
+ maskCacheKey = c.mask(Qt::ReturnByValue).cacheKey();
}
}
@@ -169,9 +169,9 @@ static HCURSOR createBitmapCursor(const QImage &bbits, const QImage &mbits,
// Create a cursor from image and mask of the format QImage::Format_Mono.
static HCURSOR createBitmapCursor(const QCursor &cursor, qreal scaleFactor = 1)
{
- Q_ASSERT(cursor.shape() == Qt::BitmapCursor && cursor.bitmap());
- QImage bbits = cursor.bitmap()->toImage();
- QImage mbits = cursor.mask()->toImage();
+ Q_ASSERT(cursor.shape() == Qt::BitmapCursor && !cursor.bitmap(Qt::ReturnByValue).isNull());
+ QImage bbits = cursor.bitmap(Qt::ReturnByValue).toImage();
+ QImage mbits = cursor.mask(Qt::ReturnByValue).toImage();
scaleFactor /= bbits.devicePixelRatioF();
if (!qFuzzyCompare(scaleFactor, 1)) {
const QSize scaledSize = (QSizeF(bbits.size()) * scaleFactor).toSize();
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index b7ab952a1d..b038e19689 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -91,7 +91,7 @@ static inline QString guidToString(const GUID &g)
str << '{' << g.Data1 << ", " << g.Data2 << ", " << g.Data3;
str.setFieldWidth(2);
str.setFieldAlignment(QTextStream::AlignRight);
- str.setPadChar(QLatin1Char('0'));
+ str.setPadChar(u'0');
str << ",{" << g.Data4[0] << ", " << g.Data4[1] << ", " << g.Data4[2] << ", " << g.Data4[3]
<< ", " << g.Data4[4] << ", " << g.Data4[5] << ", " << g.Data4[6] << ", " << g.Data4[7]
<< "}};";
@@ -466,14 +466,14 @@ inline void QWindowsFileDialogSharedData::setSelectedNameFilter(const QString &f
inline QList<QUrl> QWindowsFileDialogSharedData::selectedFiles() const
{
m_data->mutex.lock();
- const QList<QUrl> result = m_data->selectedFiles;
+ const auto result = m_data->selectedFiles;
m_data->mutex.unlock();
return result;
}
inline QString QWindowsFileDialogSharedData::selectedFile() const
{
- const QList<QUrl> files = selectedFiles();
+ const auto files = selectedFiles();
return files.isEmpty() ? QString() : files.front().toLocalFile();
}
@@ -915,7 +915,7 @@ IShellItem *QWindowsNativeFileDialogBase::shellItem(const QUrl &url)
return nullptr;
}
return result;
- } else if (url.scheme() == QLatin1String("clsid")) {
+ } else if (url.scheme() == u"clsid") {
// Support for virtual folders via GUID
// (see https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457(v=vs.85).aspx)
// specified as "clsid:<GUID>" (without '{', '}').
@@ -1040,20 +1040,20 @@ static QList<FilterSpec> filterSpecs(const QStringList &filters,
// Split filter specification as 'Texts (*.txt[;] *.doc)', '*.txt[;] *.doc'
// into description and filters specification as '*.txt;*.doc'
for (const QString &filterString : filters) {
- const int openingParenPos = filterString.lastIndexOf(QLatin1Char('('));
+ const int openingParenPos = filterString.lastIndexOf(u'(');
const int closingParenPos = openingParenPos != -1 ?
- filterString.indexOf(QLatin1Char(')'), openingParenPos + 1) : -1;
+ filterString.indexOf(u')', openingParenPos + 1) : -1;
FilterSpec filterSpec;
filterSpec.filter = closingParenPos == -1 ?
filterString :
filterString.mid(openingParenPos + 1, closingParenPos - openingParenPos - 1).trimmed();
if (filterSpec.filter.isEmpty())
- filterSpec.filter += QLatin1Char('*');
+ filterSpec.filter += u'*';
filterSpec.filter.replace(filterSeparatorRE, separator);
filterSpec.description = filterString;
if (hideFilterDetails && openingParenPos != -1) { // Do not show pattern in description
filterSpec.description.truncate(openingParenPos);
- while (filterSpec.description.endsWith(QLatin1Char(' ')))
+ while (filterSpec.description.endsWith(u' '))
filterSpec.description.truncate(filterSpec.description.size() - 1);
}
*totalStringLength += filterSpec.filter.size() + filterSpec.description.size();
@@ -1084,8 +1084,8 @@ void QWindowsNativeFileDialogBase::setNameFilters(const QStringList &filters)
// 'AAA files (a.*) (a.*)'
QString description = specs[i].description;
const QString &filter = specs[i].filter;
- if (!m_hideFiltersDetails && !filter.startsWith(QLatin1String("*."))) {
- const int pos = description.lastIndexOf(QLatin1Char('('));
+ if (!m_hideFiltersDetails && !filter.startsWith(u"*.")) {
+ const int pos = description.lastIndexOf(u'(');
if (pos > 0)
description.truncate(pos);
}
@@ -1151,8 +1151,8 @@ static bool isHexRange(const QString& s, int start, int end)
for (;start < end; ++start) {
QChar ch = s.at(start);
if (!(ch.isDigit()
- || (ch >= QLatin1Char('a') && ch <= QLatin1Char('f'))
- || (ch >= QLatin1Char('A') && ch <= QLatin1Char('F'))))
+ || (ch >= u'a' && ch <= u'f')
+ || (ch >= u'A' && ch <= u'F')))
return false;
}
return true;
@@ -1161,7 +1161,7 @@ static bool isHexRange(const QString& s, int start, int end)
static inline bool isClsid(const QString &s)
{
// detect "374DE290-123F-4565-9164-39C4925E467B".
- const QChar dash(QLatin1Char('-'));
+ const QChar dash(u'-');
return s.size() == 36
&& isHexRange(s, 0, 8)
&& s.at(8) == dash
@@ -1204,7 +1204,7 @@ void QWindowsNativeFileDialogBase::selectNameFilter(const QString &filter)
if (index < 0) {
qWarning("%s: Invalid parameter '%s' not found in '%s'.",
__FUNCTION__, qPrintable(filter),
- qPrintable(m_nameFilters.join(QLatin1String(", "))));
+ qPrintable(m_nameFilters.join(u", ")));
return;
}
m_fileDialog->SetFileTypeIndex(index + 1); // one-based.
@@ -1313,15 +1313,15 @@ public:
// Also handles the simple name filter case "*.txt" -> "txt"
static inline QString suffixFromFilter(const QString &filter)
{
- int suffixPos = filter.indexOf(QLatin1String("*."));
+ int suffixPos = filter.indexOf(u"*.");
if (suffixPos < 0)
return QString();
suffixPos += 2;
- int endPos = filter.indexOf(QLatin1Char(' '), suffixPos + 1);
+ int endPos = filter.indexOf(u' ', suffixPos + 1);
if (endPos < 0)
- endPos = filter.indexOf(QLatin1Char(';'), suffixPos + 1);
+ endPos = filter.indexOf(u';', suffixPos + 1);
if (endPos < 0)
- endPos = filter.indexOf(QLatin1Char(')'), suffixPos + 1);
+ endPos = filter.indexOf(u')', suffixPos + 1);
if (endPos < 0)
endPos = filter.size();
return filter.mid(suffixPos, endPos - suffixPos);
@@ -1406,27 +1406,27 @@ static void cleanupTemporaryItemCopies()
static bool validFileNameCharacter(QChar c)
{
- return c.isLetterOrNumber() || c == QLatin1Char('_') || c == QLatin1Char('-');
+ return c.isLetterOrNumber() || c == u'_' || c == u'-';
}
QString tempFilePattern(QString name)
{
- const int lastSlash = qMax(name.lastIndexOf(QLatin1Char('/')),
- name.lastIndexOf(QLatin1Char('\\')));
+ const int lastSlash = qMax(name.lastIndexOf(u'/'),
+ name.lastIndexOf(u'\\'));
if (lastSlash != -1)
name.remove(0, lastSlash + 1);
- int lastDot = name.lastIndexOf(QLatin1Char('.'));
+ int lastDot = name.lastIndexOf(u'.');
if (lastDot < 0)
lastDot = name.size();
name.insert(lastDot, QStringLiteral("_XXXXXX"));
for (int i = lastDot - 1; i >= 0; --i) {
if (!validFileNameCharacter(name.at(i)))
- name[i] = QLatin1Char('_');
+ name[i] = u'_';
}
- name.prepend(QDir::tempPath() + QLatin1Char('/'));
+ name.prepend(QDir::tempPath() + u'/');
return name;
}
@@ -1456,7 +1456,7 @@ static QString createTemporaryItemCopy(QWindowsShellItem &qItem, QString *errorM
static QUrl itemToDialogUrl(QWindowsShellItem &qItem, QString *errorMessage)
{
QUrl url = qItem.url();
- if (url.isLocalFile() || url.scheme().startsWith(QLatin1String("http")))
+ if (url.isLocalFile() || url.scheme().startsWith(u"http"))
return url;
const QString path = qItem.path();
if (path.isEmpty() && !qItem.isDir() && qItem.canStream()) {
@@ -1859,10 +1859,12 @@ void QWindowsXpNativeFileDialog::populateOpenFileName(OPENFILENAME *ofn, HWND ow
// for the target. If it contains any invalid character, the dialog
// will not show.
ofn->nMaxFile = 65535;
- const QString initiallySelectedFile =
- QDir::toNativeSeparators(m_data.selectedFile()).remove(QLatin1Char('<')).
- remove(QLatin1Char('>')).remove(QLatin1Char('"')).remove(QLatin1Char('|'));
- ofn->lpstrFile = qStringToWCharArray(initiallySelectedFile, ofn->nMaxFile);
+ QString initiallySelectedFile = m_data.selectedFile();
+ initiallySelectedFile.remove(u'<');
+ initiallySelectedFile.remove(u'>');
+ initiallySelectedFile.remove(u'"');
+ initiallySelectedFile.remove(u'|');
+ ofn->lpstrFile = qStringToWCharArray(QDir::toNativeSeparators(initiallySelectedFile), ofn->nMaxFile);
ofn->lpstrInitialDir = qStringToWCharArray(QDir::toNativeSeparators(m_data.directory().toLocalFile()));
ofn->lpstrTitle = (wchar_t*)m_title.utf16();
// Determine lpstrDefExt. Note that the current MSDN docs document this
@@ -1872,7 +1874,7 @@ void QWindowsXpNativeFileDialog::populateOpenFileName(OPENFILENAME *ofn, HWND ow
// the extension of the current filter".
if (m_options->acceptMode() == QFileDialogOptions::AcceptSave) {
QString defaultSuffix = m_options->defaultSuffix();
- if (defaultSuffix.startsWith(QLatin1Char('.')))
+ if (defaultSuffix.startsWith(u'.'))
defaultSuffix.remove(0, 1);
// QTBUG-33156, also create empty strings to trigger the appending mechanism.
ofn->lpstrDefExt = qStringToWCharArray(defaultSuffix);
@@ -1905,7 +1907,7 @@ QList<QUrl> QWindowsXpNativeFileDialog::execFileNames(HWND owner, int *selectedF
wchar_t *ptr = ofn.lpstrFile + dir.size() + 1;
if (*ptr) {
result.pop_front();
- const QString path = dir + QLatin1Char('/');
+ const QString path = dir + u'/';
while (*ptr) {
const QString fileName = QString::fromWCharArray(ptr);
result.push_back(QUrl::fromLocalFile(path + fileName));
diff --git a/src/plugins/platforms/windows/qwindowsdropdataobject.cpp b/src/plugins/platforms/windows/qwindowsdropdataobject.cpp
index e1a41c0ede..c9dd1c7c17 100644
--- a/src/plugins/platforms/windows/qwindowsdropdataobject.cpp
+++ b/src/plugins/platforms/windows/qwindowsdropdataobject.cpp
@@ -95,7 +95,7 @@ bool QWindowsDropDataObject::shouldIgnore(LPFORMATETC pformatetc) const
|| pformatetc->cfFormat == CF_TEXT
|| formatName == QStringLiteral("UniformResourceLocator")
|| formatName == QStringLiteral("UniformResourceLocatorW")) {
- QList<QUrl> urls = dropData->urls();
+ const auto urls = dropData->urls();
return std::all_of(urls.cbegin(), urls.cend(), [] (const QUrl &u) { return u.isLocalFile(); });
}
}
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
index e9f3dc5189..76baa93d98 100644
--- a/src/plugins/platforms/windows/qwindowseglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
@@ -88,7 +88,7 @@ static void *resolveFunc(HMODULE lib, const char *name)
while (!proc && argSize <= 64) {
nameStr = baseNameStr;
if (argSize >= 0)
- nameStr += QLatin1Char('@') + QString::number(argSize);
+ nameStr += u'@' + QString::number(argSize);
argSize = argSize < 0 ? 0 : argSize + 4;
proc = (void *) ::GetProcAddress(lib, nameStr.toLatin1().constData());
}
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 8bf88300e9..f5d0a8780a 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -196,6 +196,7 @@ bool QWindowsOpengl32DLL::init(bool softwareRendering)
wglShareLists = reinterpret_cast<BOOL (WINAPI *)(HGLRC, HGLRC)>(resolve("wglShareLists"));
wglSwapBuffers = reinterpret_cast<BOOL (WINAPI *)(HDC)>(resolve("wglSwapBuffers"));
wglSetPixelFormat = reinterpret_cast<BOOL (WINAPI *)(HDC, int, const PIXELFORMATDESCRIPTOR *)>(resolve("wglSetPixelFormat"));
+ wglDescribePixelFormat = reinterpret_cast<int (WINAPI *)(HDC, int, UINT, PIXELFORMATDESCRIPTOR *)>(resolve("wglDescribePixelFormat"));
glGetError = reinterpret_cast<GLenum (APIENTRY *)()>(resolve("glGetError"));
glGetIntegerv = reinterpret_cast<void (APIENTRY *)(GLenum , GLint *)>(resolve("glGetIntegerv"));
@@ -214,6 +215,11 @@ BOOL QWindowsOpengl32DLL::setPixelFormat(HDC dc, int pf, const PIXELFORMATDESCRI
return moduleIsNotOpengl32() ? wglSetPixelFormat(dc, pf, pfd) : SetPixelFormat(dc, pf, pfd);
}
+int QWindowsOpengl32DLL::describePixelFormat(HDC dc, int pf, UINT size, PIXELFORMATDESCRIPTOR *pfd)
+{
+ return moduleIsNotOpengl32() ? wglDescribePixelFormat(dc, pf, size, pfd) : DescribePixelFormat(dc, pf, size, pfd);
+}
+
QWindowsOpenGLContext *QOpenGLStaticContext::createContext(QOpenGLContext *context)
{
return new QWindowsGLContext(this, context);
@@ -322,11 +328,11 @@ static inline bool
static void describeFormats(HDC hdc)
{
- const int pfiMax = DescribePixelFormat(hdc, 0, 0, nullptr);
+ const int pfiMax = QOpenGLStaticContext::opengl32.describePixelFormat(hdc, 0, 0, nullptr);
for (int i = 0; i < pfiMax; i++) {
PIXELFORMATDESCRIPTOR pfd;
initPixelFormatDescriptor(&pfd);
- DescribePixelFormat(hdc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
+ QOpenGLStaticContext::opengl32.describePixelFormat(hdc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
qCDebug(lcQpaGl) << '#' << i << '/' << pfiMax << ':' << pfd;
}
}
@@ -617,7 +623,7 @@ static int choosePixelFormat(HDC hdc,
// Verify if format is acceptable. Note that the returned
// formats have been observed to not contain PFD_SUPPORT_OPENGL, ignore.
initPixelFormatDescriptor(obtainedPfd);
- DescribePixelFormat(hdc, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), obtainedPfd);
+ QOpenGLStaticContext::opengl32.describePixelFormat(hdc, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), obtainedPfd);
if (!isAcceptableFormat(additional, *obtainedPfd, true)) {
qCDebug(lcQpaGl) << __FUNCTION__ << " obtained px #" << pixelFormat
<< " not acceptable=" << *obtainedPfd;
@@ -796,7 +802,7 @@ static HGLRC createContext(const QOpenGLStaticContext &staticContext,
static inline HWND createDummyGLWindow()
{
return QWindowsContext::instance()->
- createDummyWindow(QStringLiteral("QtOpenGLDummyWindow"),
+ createDummyWindow(QStringLiteral("OpenGLDummyWindow"),
L"OpenGLDummyWindow", nullptr, WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
}
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h
index 8b0c33f7d5..8794368fe4 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.h
+++ b/src/plugins/platforms/windows/qwindowsglcontext.h
@@ -89,7 +89,7 @@ struct QWindowsOpenGLContextFormat
QSurfaceFormat::OpenGLContextProfile profile = QSurfaceFormat::NoProfile;
int version = 0; //! majorVersion<<8 + minorVersion
- QSurfaceFormat::FormatOptions options = nullptr;
+ QSurfaceFormat::FormatOptions options;
};
#ifndef QT_NO_DEBUG_STREAM
@@ -107,6 +107,7 @@ struct QWindowsOpengl32DLL
// Wrappers. Always use these instead of SwapBuffers/wglSwapBuffers/etc.
BOOL swapBuffers(HDC dc);
BOOL setPixelFormat(HDC dc, int pf, const PIXELFORMATDESCRIPTOR *pfd);
+ int describePixelFormat(HDC dc, int pf, UINT size, PIXELFORMATDESCRIPTOR *pfd);
// WGL
HGLRC (WINAPI * wglCreateContext)(HDC dc);
@@ -130,6 +131,7 @@ private:
// For Mesa llvmpipe shipped with a name other than opengl32.dll
BOOL (WINAPI * wglSwapBuffers)(HDC dc);
BOOL (WINAPI * wglSetPixelFormat)(HDC dc, int pf, const PIXELFORMATDESCRIPTOR *pfd);
+ int (WINAPI * wglDescribePixelFormat)(HDC dc, int pf, UINT size, PIXELFORMATDESCRIPTOR *pfd);
};
class QOpenGLStaticContext : public QWindowsStaticOpenGLContext
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
index 19d632dc10..f1f5d3a96e 100644
--- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
@@ -285,7 +285,8 @@ void QWindowsInputContext::showInputPanel()
// the Surface seems unnecessary there anyway. But leave it hidden for IME.
// Only trigger the native OSK if the Qt OSK is not in use.
static bool imModuleEmpty = qEnvironmentVariableIsEmpty("QT_IM_MODULE");
- if (imModuleEmpty
+ bool nativeVKDisabled = QCoreApplication::testAttribute(Qt::AA_MSWindowsDisableVirtualKeyboard);
+ if ((imModuleEmpty && !nativeVKDisabled)
&& QOperatingSystemVersion::current()
>= QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 16299)) {
ShowCaret(platformWindow->handle());
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 09117f663d..4b4047ac0c 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -162,7 +162,7 @@ bool parseIntOption(const QString &parameter,const QLatin1String &option,
IntType minimumValue, IntType maximumValue, IntType *target)
{
const int valueLength = parameter.size() - option.size() - 1;
- if (valueLength < 1 || !parameter.startsWith(option) || parameter.at(option.size()) != QLatin1Char('='))
+ if (valueLength < 1 || !parameter.startsWith(option) || parameter.at(option.size()) != u'=')
return false;
bool ok;
const QStringRef valueRef = parameter.rightRef(valueLength);
@@ -186,39 +186,43 @@ static inline unsigned parseOptions(const QStringList &paramList,
{
unsigned options = 0;
for (const QString &param : paramList) {
- if (param.startsWith(QLatin1String("fontengine="))) {
- if (param.endsWith(QLatin1String("freetype"))) {
+ if (param.startsWith(u"fontengine=")) {
+ if (param.endsWith(u"freetype")) {
options |= QWindowsIntegration::FontDatabaseFreeType;
- } else if (param.endsWith(QLatin1String("native"))) {
+ } else if (param.endsWith(u"native")) {
options |= QWindowsIntegration::FontDatabaseNative;
}
- } else if (param.startsWith(QLatin1String("dialogs="))) {
- if (param.endsWith(QLatin1String("xp"))) {
+ } else if (param.startsWith(u"dialogs=")) {
+ if (param.endsWith(u"xp")) {
options |= QWindowsIntegration::XpNativeDialogs;
- } else if (param.endsWith(QLatin1String("none"))) {
+ } else if (param.endsWith(u"none")) {
options |= QWindowsIntegration::NoNativeDialogs;
}
- } else if (param == QLatin1String("altgr")) {
+ } else if (param == u"altgr") {
options |= QWindowsIntegration::DetectAltGrModifier;
- } else if (param == QLatin1String("gl=gdi")) {
+ } else if (param == u"gl=gdi") {
options |= QWindowsIntegration::DisableArb;
- } else if (param == QLatin1String("nodirectwrite")) {
+ } else if (param == u"nodirectwrite") {
options |= QWindowsIntegration::DontUseDirectWriteFonts;
- } else if (param == QLatin1String("nocolorfonts")) {
+ } else if (param == u"nocolorfonts") {
options |= QWindowsIntegration::DontUseColorFonts;
- } else if (param == QLatin1String("nomousefromtouch")) {
+ } else if (param == u"nomousefromtouch") {
options |= QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch;
} else if (parseIntOption(param, QLatin1String("verbose"), 0, INT_MAX, &QWindowsContext::verbose)
|| parseIntOption(param, QLatin1String("tabletabsoluterange"), 0, INT_MAX, tabletAbsoluteRange)
|| parseIntOption(param, QLatin1String("dpiawareness"), QtWindows::ProcessDpiUnaware, QtWindows::ProcessPerMonitorDpiAware, dpiAwareness)) {
- } else if (param == QLatin1String("menus=native")) {
+ } else if (param == u"menus=native") {
options |= QWindowsIntegration::AlwaysUseNativeMenus;
- } else if (param == QLatin1String("menus=none")) {
+ } else if (param == u"menus=none") {
options |= QWindowsIntegration::NoNativeMenus;
- } else if (param == QLatin1String("nowmpointer")) {
+ } else if (param == u"nowmpointer") {
options |= QWindowsIntegration::DontUseWMPointer;
- } else if (param == QLatin1String("reverse")) {
+ } else if (param == u"reverse") {
options |= QWindowsIntegration::RtlEnabled;
+ } else if (param == u"darkmode=1") {
+ options |= QWindowsIntegration::DarkModeWindowFrames;
+ } else if (param == u"darkmode=2") {
+ options |= QWindowsIntegration::DarkModeWindowFrames | QWindowsIntegration::DarkModeStyle;
} else {
qWarning() << "Unknown option" << param;
}
diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h
index b49d21022b..1f16d13769 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.h
+++ b/src/plugins/platforms/windows/qwindowsintegration.h
@@ -70,7 +70,9 @@ public:
NoNativeMenus = 0x200,
DontUseWMPointer = 0x400,
DetectAltGrModifier = 0x800,
- RtlEnabled = 0x1000
+ RtlEnabled = 0x1000,
+ DarkModeWindowFrames = 0x2000,
+ DarkModeStyle = 0x4000
};
explicit QWindowsIntegration(const QStringList &paramList);
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index 4f0f846749..e3edf7e81e 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -1019,14 +1019,14 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, MSG msg,
if (dirStatus == VK_LSHIFT
&& ((msg.wParam == VK_SHIFT && GetKeyState(VK_LCONTROL))
|| (msg.wParam == VK_CONTROL && GetKeyState(VK_LSHIFT)))) {
- sendExtendedPressRelease(receiver, Qt::Key_Direction_L, nullptr,
+ sendExtendedPressRelease(receiver, Qt::Key_Direction_L, {},
scancode, vk_key, nModifiers, QString(), false);
result = true;
dirStatus = 0;
} else if (dirStatus == VK_RSHIFT
&& ( (msg.wParam == VK_SHIFT && GetKeyState(VK_RCONTROL))
|| (msg.wParam == VK_CONTROL && GetKeyState(VK_RSHIFT)))) {
- sendExtendedPressRelease(receiver, Qt::Key_Direction_R, nullptr,
+ sendExtendedPressRelease(receiver, Qt::Key_Direction_R, {},
scancode, vk_key, nModifiers, QString(), false);
result = true;
dirStatus = 0;
@@ -1388,7 +1388,7 @@ QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const
if (key && key != baseKey && ((keyMods & neededMods) == neededMods)) {
const Qt::KeyboardModifiers missingMods = keyMods & ~neededMods;
const int matchedKey = int(key) + missingMods;
- const QList<int>::iterator it =
+ const auto it =
std::find_if(result.begin(), result.end(),
[key] (int k) { return (k & ~Qt::KeyboardModifierMask) == key; });
// QTBUG-67200: Use the match with the least modifiers (prefer
diff --git a/src/plugins/platforms/windows/qwindowsmenu.cpp b/src/plugins/platforms/windows/qwindowsmenu.cpp
index d20edd685e..7c3e87eec1 100644
--- a/src/plugins/platforms/windows/qwindowsmenu.cpp
+++ b/src/plugins/platforms/windows/qwindowsmenu.cpp
@@ -445,7 +445,7 @@ QString QWindowsMenuItem::nativeText() const
QString result = m_text;
#if QT_CONFIG(shortcut)
if (!m_shortcut.isEmpty()) {
- result += QLatin1Char('\t');
+ result += u'\t';
result += m_shortcut.toString(QKeySequence::NativeText);
}
#endif
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index b9d8b191f5..fe9e1fe31f 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -107,7 +107,7 @@ 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: ";
- const QList<QByteArray> &formats = QImageReader::supportedImageFormats();
+ const auto &formats = QImageReader::supportedImageFormats();
for (const QByteArray &af : formats) {
msg += af;
msg += ' ';
@@ -635,11 +635,11 @@ bool QWindowsMimeText::convertFromMime(const FORMATETC &formatetc, const QMimeDa
int ri = 0;
bool cr = false;
for (int i=0; i < s; ++i) {
- if (*u == QLatin1Char('\r'))
+ if (*u == u'\r')
cr = true;
else {
- if (*u == QLatin1Char('\n') && !cr)
- res[ri++] = QLatin1Char('\r');
+ if (*u == u'\n' && !cr)
+ res[ri++] = u'\r';
cr = false;
}
res[ri++] = *u;
@@ -663,7 +663,7 @@ bool QWindowsMimeText::convertFromMime(const FORMATETC &formatetc, const QMimeDa
bool QWindowsMimeText::canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
{
- return mimeType.startsWith(QLatin1String("text/plain"))
+ return mimeType.startsWith(u"text/plain")
&& (canGetData(CF_UNICODETEXT, pDataObj)
|| canGetData(CF_TEXT, pDataObj));
}
@@ -680,7 +680,7 @@ QString QWindowsMimeText::mimeForFormat(const FORMATETC &formatetc) const
QVector<FORMATETC> QWindowsMimeText::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
{
QVector<FORMATETC> formatics;
- if (mimeType.startsWith(QLatin1String("text/plain")) && mimeData->hasText()) {
+ if (mimeType.startsWith(u"text/plain") && mimeData->hasText()) {
formatics += setCf(CF_UNICODETEXT);
formatics += setCf(CF_TEXT);
}
@@ -747,7 +747,7 @@ QWindowsMimeURI::QWindowsMimeURI()
bool QWindowsMimeURI::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
{
if (mimeData->hasUrls() && getCf(formatetc) == CF_HDROP) {
- const QList<QUrl> urls = mimeData->urls();
+ const auto urls = mimeData->urls();
for (const QUrl &url : urls) {
if (url.isLocalFile())
return true;
@@ -760,7 +760,7 @@ bool QWindowsMimeURI::convertFromMime(const FORMATETC &formatetc, const QMimeDat
{
if (canConvertFromMime(formatetc, mimeData)) {
if (getCf(formatetc) == CF_HDROP) {
- const QList<QUrl> &urls = mimeData->urls();
+ const auto &urls = mimeData->urls();
QStringList fileNames;
int size = sizeof(DROPFILES)+2;
for (const QUrl &url : urls) {
@@ -791,7 +791,7 @@ bool QWindowsMimeURI::convertFromMime(const FORMATETC &formatetc, const QMimeDat
return setData(result, pmedium);
}
if (getCf(formatetc) == CF_INETURL_W) {
- QList<QUrl> urls = mimeData->urls();
+ const auto urls = mimeData->urls();
QByteArray result;
if (!urls.isEmpty()) {
QString url = urls.at(0).toString();
@@ -803,7 +803,7 @@ bool QWindowsMimeURI::convertFromMime(const FORMATETC &formatetc, const QMimeDat
return setData(result, pmedium);
}
if (getCf(formatetc) == CF_INETURL) {
- QList<QUrl> urls = mimeData->urls();
+ const auto urls = mimeData->urls();
QByteArray result;
if (!urls.isEmpty())
result = urls.at(0).toString().toLocal8Bit();
@@ -816,7 +816,7 @@ bool QWindowsMimeURI::convertFromMime(const FORMATETC &formatetc, const QMimeDat
bool QWindowsMimeURI::canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
{
- return mimeType == QLatin1String("text/uri-list")
+ return mimeType == u"text/uri-list"
&& (canGetData(CF_HDROP, pDataObj) || canGetData(CF_INETURL_W, pDataObj) || canGetData(CF_INETURL, pDataObj));
}
@@ -831,7 +831,7 @@ QString QWindowsMimeURI::mimeForFormat(const FORMATETC &formatetc) const
QVector<FORMATETC> QWindowsMimeURI::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
{
QVector<FORMATETC> formatics;
- if (mimeType == QLatin1String("text/uri-list")) {
+ if (mimeType == u"text/uri-list") {
if (canConvertFromMime(setCf(CF_HDROP), mimeData))
formatics += setCf(CF_HDROP);
if (canConvertFromMime(setCf(CF_INETURL_W), mimeData))
@@ -844,7 +844,7 @@ QVector<FORMATETC> QWindowsMimeURI::formatsForMime(const QString &mimeType, cons
QVariant QWindowsMimeURI::convertToMime(const QString &mimeType, LPDATAOBJECT pDataObj, QVariant::Type preferredType) const
{
- if (mimeType == QLatin1String("text/uri-list")) {
+ if (mimeType == u"text/uri-list") {
if (canGetData(CF_HDROP, pDataObj)) {
QList<QVariant> urls;
@@ -916,7 +916,7 @@ QWindowsMimeHtml::QWindowsMimeHtml()
QVector<FORMATETC> QWindowsMimeHtml::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
{
QVector<FORMATETC> formatetcs;
- if (mimeType == QLatin1String("text/html") && (!mimeData->html().isEmpty()))
+ if (mimeType == u"text/html" && (!mimeData->html().isEmpty()))
formatetcs += setCf(CF_HTML);
return formatetcs;
}
@@ -930,7 +930,7 @@ QString QWindowsMimeHtml::mimeForFormat(const FORMATETC &formatetc) const
bool QWindowsMimeHtml::canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
{
- return mimeType == QLatin1String("text/html") && canGetData(CF_HTML, pDataObj);
+ return mimeType == u"text/html" && canGetData(CF_HTML, pDataObj);
}
@@ -1053,7 +1053,7 @@ QWindowsMimeImage::QWindowsMimeImage()
QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
{
QVector<FORMATETC> formatetcs;
- if (mimeData->hasImage() && mimeType == QLatin1String("application/x-qt-image")) {
+ if (mimeData->hasImage() && mimeType == u"application/x-qt-image") {
//add DIBV5 if image has alpha channel. Do not add CF_PNG here as it will confuse MS Office (QTBUG47656).
auto image = qvariant_cast<QImage>(mimeData->imageData());
if (!image.isNull() && image.hasAlphaChannel())
@@ -1075,7 +1075,7 @@ QString QWindowsMimeImage::mimeForFormat(const FORMATETC &formatetc) const
bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
{
- return mimeType == QLatin1String("application/x-qt-image")
+ return mimeType == u"application/x-qt-image"
&& (canGetData(CF_DIB, pDataObj) || canGetData(CF_PNG, pDataObj));
}
@@ -1149,7 +1149,7 @@ QVariant QWindowsMimeImage::convertToMime(const QString &mimeType, IDataObject *
{
Q_UNUSED(preferredType);
QVariant result;
- if (mimeType != QLatin1String("application/x-qt-image"))
+ if (mimeType != u"application/x-qt-image")
return result;
//Try to convert from a format which has more data
//DIBV5, use only if its is not synthesized
@@ -1220,7 +1220,7 @@ bool QBuiltInMimes::convertFromMime(const FORMATETC &formatetc, const QMimeData
{
if (canConvertFromMime(formatetc, mimeData)) {
QByteArray data;
- if (outFormats.value(getCf(formatetc)) == QLatin1String("text/html")) {
+ if (outFormats.value(getCf(formatetc)) == u"text/html") {
// text/html is in wide chars on windows (compatible with mozillia)
QString html = mimeData->html();
// same code as in the text converter up above
@@ -1232,11 +1232,11 @@ bool QBuiltInMimes::convertFromMime(const FORMATETC &formatetc, const QMimeData
int ri = 0;
bool cr = false;
for (int i=0; i < s; ++i) {
- if (*u == QLatin1Char('\r'))
+ if (*u == u'\r')
cr = true;
else {
- if (*u == QLatin1Char('\n') && !cr)
- res[ri++] = QLatin1Char('\r');
+ if (*u == u'\n' && !cr)
+ res[ri++] = u'\r';
cr = false;
}
res[ri++] = *u;
@@ -1285,7 +1285,7 @@ QVariant QBuiltInMimes::convertToMime(const QString &mimeType, IDataObject *pDat
QByteArray data = getData(inFormats.key(mimeType), pDataObj);
if (!data.isEmpty()) {
qCDebug(lcQpaMime) << __FUNCTION__;
- if (mimeType == QLatin1String("text/html") && preferredType == QVariant::String) {
+ if (mimeType == u"text/html" && preferredType == QVariant::String) {
// text/html is in wide chars on windows (compatible with Mozilla)
val = QString::fromWCharArray(reinterpret_cast<const wchar_t *>(data.constData()));
} else {
@@ -1404,12 +1404,12 @@ static bool isCustomMimeType(const QString &mimeType)
static QString customMimeType(const QString &mimeType, int *lindex = nullptr)
{
int len = sizeof(x_qt_windows_mime) - 1;
- int n = mimeType.lastIndexOf(QLatin1Char('\"')) - len;
+ int n = mimeType.lastIndexOf(u'\"') - len;
QString ret = mimeType.mid(len, n);
- const int beginPos = mimeType.indexOf(QLatin1String(";index="));
+ const int beginPos = mimeType.indexOf(u";index=");
if (beginPos > -1) {
- const int endPos = mimeType.indexOf(QLatin1Char(';'), beginPos + 1);
+ const int endPos = mimeType.indexOf(u';', beginPos + 1);
const int indexStartPos = beginPos + 7;
if (lindex)
*lindex = mimeType.midRef(indexStartPos, endPos == -1 ? endPos : endPos - indexStartPos).toInt();
@@ -1480,7 +1480,7 @@ QString QLastResortMimes::mimeForFormat(const FORMATETC &formatetc) const
}
}
if (!ianaType)
- format = QLatin1String(x_qt_windows_mime) + clipFormat + QLatin1Char('\"');
+ format = QLatin1String(x_qt_windows_mime) + clipFormat + u'"';
else
format = clipFormat;
}
diff --git a/src/plugins/platforms/windows/qwindowsmime.h b/src/plugins/platforms/windows/qwindowsmime.h
index 1c389e8800..f8708f1259 100644
--- a/src/plugins/platforms/windows/qwindowsmime.h
+++ b/src/plugins/platforms/windows/qwindowsmime.h
@@ -43,7 +43,6 @@
#include <QtCore/qt_windows.h>
#include <QtCore/qvector.h>
-#include <QtCore/qlist.h>
#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
@@ -95,7 +94,7 @@ public:
private:
void ensureInitialized() const;
- mutable QList<QWindowsMime *> m_mimes;
+ mutable QVector<QWindowsMime *> m_mimes;
mutable int m_internalMimeCount = 0;
};
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index 6df5e6aa27..b776efc942 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -165,7 +165,7 @@ void QWindowsMouseHandler::clearEvents()
Qt::MouseButtons QWindowsMouseHandler::queryMouseButtons()
{
- Qt::MouseButtons result = nullptr;
+ Qt::MouseButtons result;
const bool mouseSwapped = GetSystemMetrics(SM_SWAPBUTTON);
if (GetAsyncKeyState(VK_LBUTTON) < 0)
result |= mouseSwapped ? Qt::RightButton: Qt::LeftButton;
@@ -630,7 +630,7 @@ bool QWindowsMouseHandler::translateTouchEvent(QWindow *window, HWND,
QTouchPointList touchPoints;
touchPoints.reserve(winTouchPointCount);
- Qt::TouchPointStates allStates = nullptr;
+ Qt::TouchPointStates allStates;
GetTouchInputInfo(reinterpret_cast<HTOUCHINPUT>(msg.lParam),
UINT(msg.wParam), winTouchInputs.data(), sizeof(TOUCHINPUT));
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
index d1d181d66e..1195f15a59 100644
--- a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
+++ b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
@@ -47,6 +47,7 @@
#include "qwindowsopengltester.h"
#include "qwindowsintegration.h"
#include "qwindowsmime.h"
+#include "qwindowstheme.h"
#include "qwin10helpers.h"
#include <QtGui/qwindow.h>
@@ -316,4 +317,15 @@ QVariant QWindowsNativeInterface::gpuList() const
return result;
}
+bool QWindowsNativeInterface::isDarkMode() const
+{
+ return QWindowsContext::isDarkMode();
+}
+
+// Dark mode support level 2 (style)
+bool QWindowsNativeInterface::isDarkModeStyle() const
+{
+ return (QWindowsIntegration::instance()->options() & QWindowsIntegration::DarkModeStyle) != 0;
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.h b/src/plugins/platforms/windows/qwindowsnativeinterface.h
index ce395dc5a4..90ba7a44c9 100644
--- a/src/plugins/platforms/windows/qwindowsnativeinterface.h
+++ b/src/plugins/platforms/windows/qwindowsnativeinterface.h
@@ -65,6 +65,8 @@ class QWindowsNativeInterface : public QPlatformNativeInterface
{
Q_OBJECT
Q_PROPERTY(bool asyncExpose READ asyncExpose WRITE setAsyncExpose)
+ Q_PROPERTY(bool darkMode READ isDarkMode STORED false NOTIFY darkModeChanged)
+ Q_PROPERTY(bool darkModeStyle READ isDarkModeStyle STORED false)
Q_PROPERTY(QVariant gpu READ gpu STORED false)
Q_PROPERTY(QVariant gpuList READ gpuList STORED false)
@@ -92,6 +94,9 @@ public:
bool asyncExpose() const;
void setAsyncExpose(bool value);
+ bool isDarkMode() const;
+ bool isDarkModeStyle() const;
+
QVariant gpu() const;
QVariant gpuList() const;
@@ -109,6 +114,9 @@ public:
QFunctionPointer platformFunction(const QByteArray &function) const override;
+Q_SIGNALS:
+ void darkModeChanged(bool);
+
private:
static QWindowsWindowFunctions::WindowActivationBehavior m_windowActivationBehavior;
};
diff --git a/src/plugins/platforms/windows/qwindowsopengltester.cpp b/src/plugins/platforms/windows/qwindowsopengltester.cpp
index afc1991e2c..72092a4481 100644
--- a/src/plugins/platforms/windows/qwindowsopengltester.cpp
+++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp
@@ -206,7 +206,7 @@ QString GpuDescription::toString() const
str << " Card name : " << description
<< "\n Driver Name : " << driverName
<< "\n Driver Version : " << driverVersion.toString()
- << "\n Vendor ID : 0x" << qSetPadChar(QLatin1Char('0'))
+ << "\n Vendor ID : 0x" << qSetPadChar(u'0')
<< Qt::uppercasedigits << Qt::hex << qSetFieldWidth(4) << vendorId
<< "\n Device ID : 0x" << qSetFieldWidth(4) << deviceId
<< "\n SubSys ID : 0x" << qSetFieldWidth(8) << subSysId
@@ -285,7 +285,7 @@ static inline QString resolveBugListFile(const QString &fileName)
// then resolve via QStandardPaths::ConfigLocation.
const QString settingsPath = QLibraryInfo::location(QLibraryInfo::SettingsPath);
if (!settingsPath.isEmpty()) { // SettingsPath is empty unless specified in qt.conf.
- const QFileInfo fi(settingsPath + QLatin1Char('/') + fileName);
+ const QFileInfo fi(settingsPath + u'/' + fileName);
if (fi.isFile())
return fi.absoluteFilePath();
}
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
index b477147da7..fba24d8696 100644
--- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
@@ -482,7 +482,7 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd,
<< " message=" << Qt::hex << msg.message
<< " count=" << Qt::dec << count;
- Qt::TouchPointStates allStates = nullptr;
+ Qt::TouchPointStates allStates;
for (quint32 i = 0; i < count; ++i) {
if (QWindowsContext::verbose > 1)
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index df63adf558..c7a0c2e62e 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -73,7 +73,7 @@ static inline QDpi monitorDPI(HMONITOR hMonitor)
return {0, 0};
}
-using WindowsScreenDataList = QList<QWindowsScreenData>;
+using WindowsScreenDataList = QVector<QWindowsScreenData>;
static bool monitorData(HMONITOR hMonitor, QWindowsScreenData *data)
{
@@ -87,7 +87,7 @@ static bool monitorData(HMONITOR hMonitor, QWindowsScreenData *data)
data->geometry = QRect(QPoint(info.rcMonitor.left, info.rcMonitor.top), QPoint(info.rcMonitor.right - 1, info.rcMonitor.bottom - 1));
data->availableGeometry = QRect(QPoint(info.rcWork.left, info.rcWork.top), QPoint(info.rcWork.right - 1, info.rcWork.bottom - 1));
data->name = QString::fromWCharArray(info.szDevice);
- if (data->name == QLatin1String("WinDisc")) {
+ if (data->name == u"WinDisc") {
data->flags |= QWindowsScreenData::LockScreen;
} else {
if (const HDC hdc = CreateDC(info.szDevice, nullptr, nullptr, nullptr)) {
@@ -467,7 +467,7 @@ bool QWindowsScreenManager::handleDisplayChange(WPARAM wParam, LPARAM lParam)
return false;
}
-static inline int indexOfMonitor(const QList<QWindowsScreen *> &screens,
+static inline int indexOfMonitor(const QWindowsScreenManager::WindowsScreenList &screens,
const QString &monitorName)
{
for (int i= 0; i < screens.size(); ++i)
@@ -476,7 +476,7 @@ static inline int indexOfMonitor(const QList<QWindowsScreen *> &screens,
return -1;
}
-static inline int indexOfMonitor(const QList<QWindowsScreenData> &screenData,
+static inline int indexOfMonitor(const WindowsScreenDataList &screenData,
const QString &monitorName)
{
for (int i = 0; i < screenData.size(); ++i)
diff --git a/src/plugins/platforms/windows/qwindowsscreen.h b/src/plugins/platforms/windows/qwindowsscreen.h
index 2fd56f53cf..5c095808f2 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.h
+++ b/src/plugins/platforms/windows/qwindowsscreen.h
@@ -127,7 +127,7 @@ private:
class QWindowsScreenManager
{
public:
- using WindowsScreenList = QList<QWindowsScreen *>;
+ using WindowsScreenList = QVector<QWindowsScreen *>;
QWindowsScreenManager();
diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp
index 83b052bb49..6a2708ee26 100644
--- a/src/plugins/platforms/windows/qwindowsservices.cpp
+++ b/src/plugins/platforms/windows/qwindowsservices.cpp
@@ -92,7 +92,7 @@ static inline QString mailCommand()
// "rundll32.exe .. url.dll,MailToProtocolHandler %l" is returned. Launching it
// silently fails or brings up a broken dialog after a long time, so exclude it and
// fall back to ShellExecute() which brings up the URL assocation dialog.
- if (command.isEmpty() || command.contains(QLatin1String(",MailToProtocolHandler")))
+ if (command.isEmpty() || command.contains(u",MailToProtocolHandler"))
return QString();
wchar_t expandedCommand[MAX_PATH] = {0};
return ExpandEnvironmentStrings(reinterpret_cast<const wchar_t *>(command.utf16()),
@@ -108,7 +108,7 @@ static inline bool launchMail(const QUrl &url)
return false;
}
//Make sure the path for the process is in quotes
- const QChar doubleQuote = QLatin1Char('"');
+ const QChar doubleQuote = u'"';
if (!command.startsWith(doubleQuote)) {
const int exeIndex = command.indexOf(QStringLiteral(".exe "), 0, Qt::CaseInsensitive);
if (exeIndex != -1) {
@@ -140,7 +140,7 @@ static inline bool launchMail(const QUrl &url)
bool QWindowsServices::openUrl(const QUrl &url)
{
const QString scheme = url.scheme();
- if (scheme == QLatin1String("mailto") && launchMail(url))
+ if (scheme == u"mailto" && launchMail(url))
return true;
return shellExecute(url);
}
diff --git a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
index ab830e1461..53562c87dd 100644
--- a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
+++ b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
@@ -168,7 +168,7 @@ static inline HWND createTrayIconMessageWindow()
return nullptr;
// Register window class in the platform plugin.
const QString className =
- ctx->registerWindowClass(QStringLiteral("QTrayIconMessageWindowClass"),
+ ctx->registerWindowClass(QWindowsContext::classNamePrefix() + QStringLiteral("TrayIconMessageWindowClass"),
qWindowsTrayIconWndProc);
const wchar_t windowName[] = L"QTrayIconMessageWindow";
return CreateWindowEx(0, reinterpret_cast<const wchar_t *>(className.utf16()),
@@ -261,7 +261,7 @@ void QWindowsSystemTrayIcon::showMessage(const QString &title, const QString &me
// For empty messages, ensures that they show when only title is set
QString message = messageIn;
if (message.isEmpty() && !title.isEmpty())
- message.append(QLatin1Char(' '));
+ message.append(u' ');
NOTIFYICONDATA tnd;
initNotifyIconData(tnd);
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp
index 40f9652cbd..325956b7ba 100644
--- a/src/plugins/platforms/windows/qwindowstheme.cpp
+++ b/src/plugins/platforms/windows/qwindowstheme.cpp
@@ -63,6 +63,7 @@
#include <QtCore/qcoreapplication.h>
#include <QtCore/qdebug.h>
#include <QtCore/qtextstream.h>
+#include <QtCore/qoperatingsystemversion.h>
#include <QtCore/qsysinfo.h>
#include <QtCore/qcache.h>
#include <QtCore/qthread.h>
@@ -78,6 +79,7 @@
#include <QtFontDatabaseSupport/private/qwindowsfontdatabase_p.h>
#include <private/qhighdpiscaling_p.h>
#include <private/qsystemlibrary_p.h>
+#include <private/qwinregistry_p.h>
#include <algorithm>
@@ -96,7 +98,7 @@ static inline QTextStream& operator<<(QTextStream &str, const QColor &c)
{
str.setIntegerBase(16);
str.setFieldWidth(2);
- str.setPadChar(QLatin1Char('0'));
+ str.setPadChar(u'0');
str << " rgb: #" << c.red() << c.green() << c.blue();
str.setIntegerBase(10);
str.setFieldWidth(0);
@@ -164,7 +166,7 @@ public:
QMutexLocker readyLocker(&m_readyMutex);
while (!m_cancelled.loadRelaxed()) {
if (!m_params && !m_cancelled.loadRelaxed()
- && !m_readyCondition.wait(&m_readyMutex, 1000))
+ && !m_readyCondition.wait(&m_readyMutex, QDeadlineTimer(1000ll)))
continue;
if (m_params) {
@@ -189,7 +191,7 @@ public:
CoUninitialize();
}
- bool runWithParams(QShGetFileInfoParams *params, unsigned long timeOutMSecs)
+ bool runWithParams(QShGetFileInfoParams *params, qint64 timeOutMSecs)
{
QMutexLocker doneLocker(&m_doneMutex);
@@ -198,7 +200,7 @@ public:
m_readyCondition.wakeAll();
m_readyMutex.unlock();
- return m_doneCondition.wait(&m_doneMutex, timeOutMSecs);
+ return m_doneCondition.wait(&m_doneMutex, QDeadlineTimer(timeOutMSecs));
}
void cancel()
@@ -220,7 +222,7 @@ private:
static bool shGetFileInfoBackground(const QString &fileName, DWORD attributes,
SHFILEINFO *info, UINT flags,
- unsigned long timeOutMSecs = 5000)
+ qint64 timeOutMSecs = 5000)
{
static QShGetFileInfoThread *getFileInfoThread = nullptr;
if (!getFileInfoThread) {
@@ -241,6 +243,15 @@ static bool shGetFileInfoBackground(const QString &fileName, DWORD attributes,
return result;
}
+// Dark Mode constants
+enum DarkModeColors : QRgb {
+ darkModeBtnHighlightRgb = 0xc0c0c0,
+ darkModeBtnShadowRgb = 0x808080,
+ darkModeHighlightRgb = 0x0055ff, // deviating from 0x800080
+ darkModeMenuHighlightRgb = darkModeHighlightRgb,
+ darkModeGrayTextRgb = 0x00ff00
+};
+
// from QStyle::standardPalette
static inline QPalette standardPalette()
{
@@ -258,23 +269,55 @@ static inline QPalette standardPalette()
return palette;
}
-static inline QPalette systemPalette()
+static void populateLightSystemBasePalette(QPalette &result)
{
- QPalette result = standardPalette();
result.setColor(QPalette::WindowText, getSysColor(COLOR_WINDOWTEXT));
- result.setColor(QPalette::Button, getSysColor(COLOR_BTNFACE));
- result.setColor(QPalette::Light, getSysColor(COLOR_BTNHIGHLIGHT));
+ const QColor btnFace = getSysColor(COLOR_BTNFACE);
+ result.setColor(QPalette::Button, btnFace);
+ const QColor btnHighlight = getSysColor(COLOR_BTNHIGHLIGHT);
+ result.setColor(QPalette::Light, btnHighlight);
result.setColor(QPalette::Dark, getSysColor(COLOR_BTNSHADOW));
result.setColor(QPalette::Mid, result.button().color().darker(150));
result.setColor(QPalette::Text, getSysColor(COLOR_WINDOWTEXT));
- result.setColor(QPalette::BrightText, getSysColor(COLOR_BTNHIGHLIGHT));
+ result.setColor(QPalette::BrightText, btnHighlight);
result.setColor(QPalette::Base, getSysColor(COLOR_WINDOW));
- result.setColor(QPalette::Window, getSysColor(COLOR_BTNFACE));
+ result.setColor(QPalette::Window, btnFace);
result.setColor(QPalette::ButtonText, getSysColor(COLOR_BTNTEXT));
result.setColor(QPalette::Midlight, getSysColor(COLOR_3DLIGHT));
result.setColor(QPalette::Shadow, getSysColor(COLOR_3DDKSHADOW));
result.setColor(QPalette::Highlight, getSysColor(COLOR_HIGHLIGHT));
result.setColor(QPalette::HighlightedText, getSysColor(COLOR_HIGHLIGHTTEXT));
+}
+
+static void populateDarkSystemBasePalette(QPalette &result)
+{
+ const QColor darkModeWindowText = Qt::white;
+ result.setColor(QPalette::WindowText, darkModeWindowText);
+ const QColor darkModebtnFace = Qt::black;
+ result.setColor(QPalette::Button, darkModebtnFace);
+ const QColor btnHighlight = QColor(darkModeBtnHighlightRgb);
+ result.setColor(QPalette::Light, btnHighlight);
+ result.setColor(QPalette::Dark, QColor(darkModeBtnShadowRgb));
+ result.setColor(QPalette::Mid, result.button().color().darker(150));
+ result.setColor(QPalette::Text, darkModeWindowText);
+ result.setColor(QPalette::BrightText, btnHighlight);
+ result.setColor(QPalette::Base, darkModebtnFace);
+ result.setColor(QPalette::Window, darkModebtnFace);
+ result.setColor(QPalette::ButtonText, darkModeWindowText);
+ result.setColor(QPalette::Midlight, darkModeWindowText);
+ result.setColor(QPalette::Shadow, darkModeWindowText);
+ result.setColor(QPalette::Highlight, QColor(darkModeHighlightRgb));
+ result.setColor(QPalette::HighlightedText, darkModeWindowText);
+}
+
+static QPalette systemPalette(bool light)
+{
+ QPalette result = standardPalette();
+ if (light)
+ populateLightSystemBasePalette(result);
+ else
+ populateDarkSystemBasePalette(result);
+
result.setColor(QPalette::Link, Qt::blue);
result.setColor(QPalette::LinkVisited, Qt::magenta);
result.setColor(QPalette::Inactive, QPalette::Button, result.button().color());
@@ -300,19 +343,19 @@ static inline QPalette systemPalette()
result.setColor(QPalette::Disabled, QPalette::Text, disabled);
result.setColor(QPalette::Disabled, QPalette::ButtonText, disabled);
result.setColor(QPalette::Disabled, QPalette::Highlight,
- getSysColor(COLOR_HIGHLIGHT));
+ light ? getSysColor(COLOR_HIGHLIGHT) : QColor(darkModeHighlightRgb));
result.setColor(QPalette::Disabled, QPalette::HighlightedText,
- getSysColor(COLOR_HIGHLIGHTTEXT));
+ light ? getSysColor(COLOR_HIGHLIGHTTEXT) : QColor(Qt::white));
result.setColor(QPalette::Disabled, QPalette::Base,
result.window().color());
return result;
}
-static inline QPalette toolTipPalette(const QPalette &systemPalette)
+static inline QPalette toolTipPalette(const QPalette &systemPalette, bool light)
{
QPalette result(systemPalette);
- const QColor tipBgColor(getSysColor(COLOR_INFOBK));
- const QColor tipTextColor(getSysColor(COLOR_INFOTEXT));
+ const QColor tipBgColor = light ? getSysColor(COLOR_INFOBK) : QColor(Qt::black);
+ const QColor tipTextColor = light ? getSysColor(COLOR_INFOTEXT) : QColor(Qt::white);
result.setColor(QPalette::All, QPalette::Button, tipBgColor);
result.setColor(QPalette::All, QPalette::Window, tipBgColor);
@@ -337,12 +380,13 @@ static inline QPalette toolTipPalette(const QPalette &systemPalette)
return result;
}
-static inline QPalette menuPalette(const QPalette &systemPalette)
+static inline QPalette menuPalette(const QPalette &systemPalette, bool light)
{
QPalette result(systemPalette);
- const QColor menuColor(getSysColor(COLOR_MENU));
- const QColor menuTextColor(getSysColor(COLOR_MENUTEXT));
- const QColor disabled(getSysColor(COLOR_GRAYTEXT));
+ const QColor menuColor = light ? getSysColor(COLOR_MENU) : QColor(Qt::black);
+ const QColor menuTextColor = light ? getSysColor(COLOR_MENUTEXT) : QColor(Qt::white);
+ const QColor disabled = light
+ ? getSysColor(COLOR_GRAYTEXT) : QColor(darkModeGrayTextRgb);
// we might need a special color group for the result.
result.setColor(QPalette::Active, QPalette::Button, menuColor);
result.setColor(QPalette::Active, QPalette::Text, menuTextColor);
@@ -351,8 +395,10 @@ static inline QPalette menuPalette(const QPalette &systemPalette)
result.setColor(QPalette::Disabled, QPalette::WindowText, disabled);
result.setColor(QPalette::Disabled, QPalette::Text, disabled);
const bool isFlat = booleanSystemParametersInfo(SPI_GETFLATMENU, false);
- result.setColor(QPalette::Disabled, QPalette::Highlight,
- getSysColor(isFlat ? COLOR_MENUHILIGHT : COLOR_HIGHLIGHT));
+ const QColor highlightColor = light
+ ? (getSysColor(isFlat ? COLOR_MENUHILIGHT : COLOR_HIGHLIGHT))
+ : QColor(darkModeMenuHighlightRgb);
+ result.setColor(QPalette::Disabled, QPalette::Highlight, highlightColor);
result.setColor(QPalette::Disabled, QPalette::HighlightedText, disabled);
result.setColor(QPalette::Disabled, QPalette::Button,
result.color(QPalette::Active, QPalette::Button));
@@ -373,12 +419,12 @@ static inline QPalette menuPalette(const QPalette &systemPalette)
return result;
}
-static inline QPalette *menuBarPalette(const QPalette &menuPalette)
+static inline QPalette *menuBarPalette(const QPalette &menuPalette, bool light)
{
QPalette *result = nullptr;
if (booleanSystemParametersInfo(SPI_GETFLATMENU, false)) {
result = new QPalette(menuPalette);
- const QColor menubar(getSysColor(COLOR_MENUBAR));
+ const QColor menubar(light ? getSysColor(COLOR_MENUBAR) : QColor(Qt::black));
result->setColor(QPalette::Active, QPalette::Button, menubar);
result->setColor(QPalette::Disabled, QPalette::Button, menubar);
result->setColor(QPalette::Inactive, QPalette::Button, menubar);
@@ -485,10 +531,26 @@ void QWindowsTheme::refreshPalettes()
if (!QGuiApplication::desktopSettingsAware())
return;
- m_palettes[SystemPalette] = new QPalette(systemPalette());
- m_palettes[ToolTipPalette] = new QPalette(toolTipPalette(*m_palettes[SystemPalette]));
- m_palettes[MenuPalette] = new QPalette(menuPalette(*m_palettes[SystemPalette]));
- m_palettes[MenuBarPalette] = menuBarPalette(*m_palettes[MenuPalette]);
+ const bool light =
+ !QWindowsContext::isDarkMode()
+ || (QWindowsIntegration::instance()->options() & QWindowsIntegration::DarkModeStyle) == 0;
+ m_palettes[SystemPalette] = new QPalette(systemPalette(light));
+ m_palettes[ToolTipPalette] = new QPalette(toolTipPalette(*m_palettes[SystemPalette], light));
+ m_palettes[MenuPalette] = new QPalette(menuPalette(*m_palettes[SystemPalette], light));
+ m_palettes[MenuBarPalette] = menuBarPalette(*m_palettes[MenuPalette], light);
+ if (!light) {
+ m_palettes[ButtonPalette] = new QPalette(*m_palettes[SystemPalette]);
+ m_palettes[ButtonPalette]->setColor(QPalette::Button, QColor(0x666666u));
+ const QColor checkBoxBlue(0x0078d7u);
+ const QColor white(Qt::white);
+ m_palettes[CheckBoxPalette] = new QPalette(*m_palettes[SystemPalette]);
+ m_palettes[CheckBoxPalette]->setColor(QPalette::Window, checkBoxBlue);
+ m_palettes[CheckBoxPalette]->setColor(QPalette::Base, checkBoxBlue);
+ m_palettes[CheckBoxPalette]->setColor(QPalette::Button, checkBoxBlue);
+ m_palettes[CheckBoxPalette]->setColor(QPalette::ButtonText, white);
+ m_palettes[RadioButtonPalette] = new QPalette(*m_palettes[CheckBoxPalette]);
+
+ }
}
void QWindowsTheme::clearFonts()
@@ -497,6 +559,12 @@ void QWindowsTheme::clearFonts()
std::fill(m_fonts, m_fonts + NFonts, nullptr);
}
+void QWindowsTheme::refresh()
+{
+ refreshPalettes();
+ refreshFonts();
+}
+
void QWindowsTheme::refreshFonts()
{
clearFonts();
@@ -731,13 +799,13 @@ static QString dirIconPixmapCacheKey(int iIcon, int iconSize, int imageListSize)
{
QString key = QLatin1String("qt_dir_") + QString::number(iIcon);
if (iconSize == SHGFI_LARGEICON)
- key += QLatin1Char('l');
+ key += u'l';
switch (imageListSize) {
case sHIL_EXTRALARGE:
- key += QLatin1Char('e');
+ key += u'e';
break;
case sHIL_JUMBO:
- key += QLatin1Char('j');
+ key += u'j';
break;
}
return key;
@@ -815,9 +883,9 @@ QString QWindowsFileIconEngine::cacheKey() const
// It is faster to just look at the file extensions;
// avoiding slow QFileInfo::isExecutable() (QTBUG-13182)
QString suffix = fileInfo().suffix();
- if (!suffix.compare(QLatin1String("exe"), Qt::CaseInsensitive)
- || !suffix.compare(QLatin1String("lnk"), Qt::CaseInsensitive)
- || !suffix.compare(QLatin1String("ico"), Qt::CaseInsensitive)) {
+ if (!suffix.compare(u"exe", Qt::CaseInsensitive)
+ || !suffix.compare(u"lnk", Qt::CaseInsensitive)
+ || !suffix.compare(u"ico", Qt::CaseInsensitive)) {
return QString();
}
return QLatin1String("qt_.")
@@ -946,6 +1014,23 @@ bool QWindowsTheme::useNativeMenus()
return result;
}
+bool QWindowsTheme::queryDarkMode()
+{
+ if (QOperatingSystemVersion::current()
+ < QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 17763)
+ || queryHighContrast()) {
+ return false;
+ }
+ const auto setting = QWinRegistryKey(HKEY_CURRENT_USER, LR"(Software\Microsoft\Windows\CurrentVersion\Themes\Personalize)")
+ .dwordValue(L"AppsUseLightTheme");
+ return setting.second && setting.first == 0;
+}
+
+bool QWindowsTheme::queryHighContrast()
+{
+ return booleanSystemParametersInfo(SPI_GETHIGHCONTRAST, false);
+}
+
QPlatformMenuItem *QWindowsTheme::createPlatformMenuItem() const
{
qCDebug(lcQpaMenus) << __FUNCTION__;
diff --git a/src/plugins/platforms/windows/qwindowstheme.h b/src/plugins/platforms/windows/qwindowstheme.h
index 07120230ce..af28f2878c 100644
--- a/src/plugins/platforms/windows/qwindowstheme.h
+++ b/src/plugins/platforms/windows/qwindowstheme.h
@@ -71,7 +71,7 @@ public:
QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
- QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions = nullptr) const override;
+ QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions = {}) const override;
void windowsThemeChanged(QWindow *window);
void displayChanged() { refreshIconPixmapSizes(); }
@@ -84,13 +84,15 @@ public:
void showPlatformMenuBar() override;
static bool useNativeMenus();
+ static bool queryDarkMode();
+ static bool queryHighContrast();
void refreshFonts();
+ void refresh();
static const char *name;
private:
- void refresh() { refreshPalettes(); refreshFonts(); }
void clearPalettes();
void refreshPalettes();
void clearFonts();
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 496b18ba1a..6729ceed0f 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -253,7 +253,7 @@ QDebug operator<<(QDebug d, const GUID &guid)
{
QDebugStateSaver saver(d);
d.nospace();
- d << '{' << Qt::hex << Qt::uppercasedigits << qSetPadChar(QLatin1Char('0'))
+ d << '{' << Qt::hex << Qt::uppercasedigits << qSetPadChar(u'0')
<< qSetFieldWidth(8) << guid.Data1
<< qSetFieldWidth(0) << '-' << qSetFieldWidth(4)
<< guid.Data2 << qSetFieldWidth(0) << '-' << qSetFieldWidth(4)
@@ -592,7 +592,7 @@ static QPoint calcPosition(const QWindow *w, const QWindowCreationContextPtr &co
return posFrame;
// Find the original screen containing the coordinates.
- const QList<QScreen *> screens = screenForGL->virtualSiblings();
+ const auto screens = screenForGL->virtualSiblings();
const QScreen *orgScreen = nullptr;
for (QScreen *screen : screens) {
if (screen->handle()->availableGeometry().contains(posFrame)) {
@@ -749,6 +749,11 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
}
}
+static inline bool shouldApplyDarkFrame(const QWindow *w)
+{
+ return w->isTopLevel() && !w->flags().testFlag(Qt::FramelessWindowHint);
+}
+
QWindowsWindowData
WindowCreationData::create(const QWindow *w, const WindowData &data, QString title) const
{
@@ -816,6 +821,12 @@ QWindowsWindowData
return result;
}
+ if (QWindowsContext::isDarkMode()
+ && (QWindowsIntegration::instance()->options() & QWindowsIntegration::DarkModeWindowFrames) != 0
+ && shouldApplyDarkFrame(w)) {
+ QWindowsWindow::setDarkBorderToWindow(result.hwnd, true);
+ }
+
if (mirrorParentWidth != 0) {
context->obtainedPos.setX(mirrorParentWidth - context->obtainedSize.width()
- context->obtainedPos.x());
@@ -2594,37 +2605,41 @@ bool QWindowsWindow::setMouseGrabEnabled(bool grab)
return grab;
}
-static inline DWORD cornerToWinOrientation(Qt::Corner corner)
+static inline DWORD edgesToWinOrientation(Qt::Edges edges)
{
- switch (corner) {
- case Qt::TopLeftCorner:
- return 0xf004; // SZ_SIZETOPLEFT;
- case Qt::TopRightCorner:
- return 0xf005; // SZ_SIZETOPRIGHT
- case Qt::BottomLeftCorner:
- return 0xf007; // SZ_SIZEBOTTOMLEFT
- case Qt::BottomRightCorner:
- return 0xf008; // SZ_SIZEBOTTOMRIGHT
- }
- return 0;
+ if (edges == Qt::LeftEdge)
+ return 0xf001; // SC_SIZELEFT;
+ else if (edges == (Qt::RightEdge))
+ return 0xf002; // SC_SIZERIGHT
+ else if (edges == (Qt::TopEdge))
+ return 0xf003; // SC_SIZETOP
+ else if (edges == (Qt::TopEdge | Qt::LeftEdge))
+ return 0xf004; // SC_SIZETOPLEFT
+ else if (edges == (Qt::TopEdge | Qt::RightEdge))
+ return 0xf005; // SC_SIZETOPRIGHT
+ else if (edges == (Qt::BottomEdge))
+ return 0xf006; // SC_SIZEBOTTOM
+ else if (edges == (Qt::BottomEdge | Qt::LeftEdge))
+ return 0xf007; // SC_SIZEBOTTOMLEFT
+ else if (edges == (Qt::BottomEdge | Qt::RightEdge))
+ return 0xf008; // SC_SIZEBOTTOMRIGHT
+
+ return 0xf000; // SC_SIZE
}
-bool QWindowsWindow::startSystemResize(const QPoint &, Qt::Corner corner)
+bool QWindowsWindow::startSystemResize(Qt::Edges edges)
{
- if (!GetSystemMenu(m_data.hwnd, FALSE))
+ if (Q_UNLIKELY(!(window()->flags() & Qt::MSWindowsFixedSizeDialogHint)))
return false;
ReleaseCapture();
- PostMessage(m_data.hwnd, WM_SYSCOMMAND, cornerToWinOrientation(corner), 0);
+ PostMessage(m_data.hwnd, WM_SYSCOMMAND, edgesToWinOrientation(edges), 0);
setFlag(SizeGripOperation);
return true;
}
-bool QWindowsWindow::startSystemMove(const QPoint &)
+bool QWindowsWindow::startSystemMove()
{
- if (!GetSystemMenu(m_data.hwnd, FALSE))
- return false;
-
ReleaseCapture();
PostMessage(m_data.hwnd, WM_SYSCOMMAND, 0xF012 /*SC_DRAGMOVE*/, 0);
return true;
@@ -2893,6 +2908,39 @@ bool QWindowsWindow::isTopLevel() const
return window()->isTopLevel() && !m_data.embedded;
}
+enum : WORD {
+ DwmwaUseImmersiveDarkMode = 20,
+ DwmwaUseImmersiveDarkModeBefore20h1 = 19
+};
+
+static bool queryDarkBorder(HWND hwnd)
+{
+ BOOL result = FALSE;
+ const bool ok =
+ SUCCEEDED(DwmGetWindowAttribute(hwnd, DwmwaUseImmersiveDarkMode, &result, sizeof(result)))
+ || SUCCEEDED(DwmGetWindowAttribute(hwnd, DwmwaUseImmersiveDarkModeBefore20h1, &result, sizeof(result)));
+ if (!ok)
+ qWarning("%s: Unable to retrieve dark window border setting.", __FUNCTION__);
+ return result == TRUE;
+}
+
+bool QWindowsWindow::setDarkBorderToWindow(HWND hwnd, bool d)
+{
+ const BOOL darkBorder = d ? TRUE : FALSE;
+ const bool ok =
+ SUCCEEDED(DwmSetWindowAttribute(hwnd, DwmwaUseImmersiveDarkMode, &darkBorder, sizeof(darkBorder)))
+ || SUCCEEDED(DwmSetWindowAttribute(hwnd, DwmwaUseImmersiveDarkModeBefore20h1, &darkBorder, sizeof(darkBorder)));
+ if (!ok)
+ qWarning("%s: Unable to set dark window border.", __FUNCTION__);
+ return ok;
+}
+
+void QWindowsWindow::setDarkBorder(bool d)
+{
+ if (shouldApplyDarkFrame(window()) && queryDarkBorder(m_data.hwnd) != d)
+ setDarkBorderToWindow(m_data.hwnd, d);
+}
+
QWindowsMenuBar *QWindowsWindow::menuBar() const
{
return m_menuBar.data();
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index 1f8800272b..e1f7908687 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -277,8 +277,8 @@ public:
bool setMouseGrabEnabled(bool grab) override;
inline bool hasMouseCapture() const { return GetCapture() == m_data.hwnd; }
- bool startSystemResize(const QPoint &pos, Qt::Corner corner) override;
- bool startSystemMove(const QPoint &pos) override;
+ bool startSystemResize(Qt::Edges edges) override;
+ bool startSystemMove() override;
void setFrameStrutEventsEnabled(bool enabled) override;
bool frameStrutEventsEnabled() const override { return testFlag(FrameStrutEventsEnabled); }
@@ -287,6 +287,9 @@ public:
HWND handle() const override { return m_data.hwnd; }
bool isTopLevel() const override;
+ static bool setDarkBorderToWindow(HWND hwnd, bool d);
+ void setDarkBorder(bool d);
+
QWindowsMenuBar *menuBar() const;
void setMenuBar(QWindowsMenuBar *mb);
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
index cc293b777c..5f564f81c2 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
@@ -393,12 +393,14 @@ HRESULT QWindowsUiaMainProvider::GetPropertyValue(PROPERTYID idProp, VARIANT *pR
// Control type converted from role.
auto controlType = roleToControlTypeId(accessible->role());
- // The native OSK should be disbled if the Qt OSK is in use.
+ // The native OSK should be disbled if the Qt OSK is in use,
+ // or if disabled via application attribute.
static bool imModuleEmpty = qEnvironmentVariableIsEmpty("QT_IM_MODULE");
+ bool nativeVKDisabled = QCoreApplication::testAttribute(Qt::AA_MSWindowsDisableVirtualKeyboard);
// If we want to disable the native OSK auto-showing
// we have to report text fields as non-editable.
- if (controlType == UIA_EditControlTypeId && !imModuleEmpty)
+ if (controlType == UIA_EditControlTypeId && (!imModuleEmpty || nativeVKDisabled))
controlType = UIA_TextControlTypeId;
setVariantI4(controlType, pRetVal);
@@ -473,7 +475,7 @@ QString QWindowsUiaMainProvider::automationIdForAccessible(const QAccessibleInte
if (name.isEmpty())
return QString();
if (!result.isEmpty())
- result.prepend(QLatin1Char('.'));
+ result.prepend(u'.');
result.prepend(name);
obj = obj->parent();
}
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp
index 3305e9c5c4..fb41012cf4 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.cpp
@@ -49,6 +49,7 @@
#include <QtCore/qloggingcategory.h>
#include <QtCore/qstring.h>
#include <QtCore/qlist.h>
+#include <QtCore/qvector.h>
QT_BEGIN_NAMESPACE
@@ -78,7 +79,7 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaSelectionProvider::GetSelection(SAFEARRAY *
return UIA_E_ELEMENTNOTAVAILABLE;
// First put selected items in a list, then build a safe array with the right size.
- QList<QAccessibleInterface *> selectedList;
+ QVector<QAccessibleInterface *> selectedList;
for (int i = 0; i < accessible->childCount(); ++i) {
if (QAccessibleInterface *child = accessible->child(i)) {
if (child->state().selected) {
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp
index 2a94012590..1348ec7cc0 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.cpp
@@ -80,7 +80,7 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaTableItemProvider::GetRowHeaderItems(SAFEAR
if (!tableCellInterface)
return UIA_E_ELEMENTNOTAVAILABLE;
- QList<QAccessibleInterface *> headers = tableCellInterface->rowHeaderCells();
+ const auto headers = tableCellInterface->rowHeaderCells();
if ((*pRetVal = SafeArrayCreateVector(VT_UNKNOWN, 0, headers.size()))) {
for (LONG i = 0; i < headers.size(); ++i) {
@@ -110,7 +110,7 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaTableItemProvider::GetColumnHeaderItems(SAF
if (!tableCellInterface)
return UIA_E_ELEMENTNOTAVAILABLE;
- QList<QAccessibleInterface *> headers = tableCellInterface->columnHeaderCells();
+ const auto headers = tableCellInterface->columnHeaderCells();
if ((*pRetVal = SafeArrayCreateVector(VT_UNKNOWN, 0, headers.size()))) {
for (LONG i = 0; i < headers.size(); ++i) {
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h
index c3ce8d8745..fda53f17a1 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h
@@ -52,7 +52,7 @@ class QXcbEglContext : public QEGLPlatformContext
public:
QXcbEglContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share,
EGLDisplay display, const QVariant &nativeHandle)
- : QEGLPlatformContext(glFormat, share, display, 0, nativeHandle)
+ : QEGLPlatformContext(glFormat, share, display, nullptr, nativeHandle)
{
}
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp
index 65beac227c..30e3381993 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp
@@ -93,7 +93,7 @@ void QXcbEglWindow::create()
{
QXcbWindow::create();
- m_surface = eglCreateWindowSurface(m_glIntegration->eglDisplay(), m_config, m_window, 0);
+ m_surface = eglCreateWindowSurface(m_glIntegration->eglDisplay(), m_config, m_window, nullptr);
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
index 2b77062b16..75189a9c80 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -223,13 +223,13 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
const QVariant &nativeHandle)
: QPlatformOpenGLContext()
, m_display(static_cast<Display *>(screen->connection()->xlib_display()))
- , m_config(0)
- , m_context(0)
- , m_shareContext(0)
+ , m_config(nullptr)
+ , m_context(nullptr)
+ , m_shareContext(nullptr)
, m_format(format)
, m_isPBufferCurrent(false)
, m_ownsContext(nativeHandle.isNull())
- , m_getGraphicsResetStatus(0)
+ , m_getGraphicsResetStatus(nullptr)
, m_lost(false)
{
if (nativeHandle.isNull())
@@ -254,14 +254,14 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
GLXFBConfig config = qglx_findConfig(m_display, screen->screenNumber(), m_format);
m_config = config;
- XVisualInfo *visualInfo = 0;
+ XVisualInfo *visualInfo = nullptr;
Window window = 0; // Temporary window used to query OpenGL context
if (config) {
const QByteArrayList glxExt = QByteArray(glXQueryExtensionsString(m_display, screen->screenNumber())).split(' ');
// Resolve entry point for glXCreateContextAttribsARB
- glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
+ glXCreateContextAttribsARBProc glXCreateContextAttribsARB = nullptr;
if (glxExt.contains("GLX_ARB_create_context"))
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB");
@@ -271,7 +271,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
// Use glXCreateContextAttribsARB if available
// Also, GL ES context creation requires GLX_EXT_create_context_es2_profile
- if (glXCreateContextAttribsARB != 0
+ if (glXCreateContextAttribsARB != nullptr
&& (m_format.renderableType() != QSurfaceFormat::OpenGLES || (supportsProfiles && glxExt.contains("GLX_EXT_create_context_es2_profile")))) {
// Try to create an OpenGL context for each known OpenGL version in descending
// order from the requested version.
@@ -358,9 +358,9 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
m_context = glXCreateContextAttribsARB(m_display, config, m_shareContext, true, contextAttributes.data());
if (!m_context && m_shareContext) {
// re-try without a shared glx context
- m_context = glXCreateContextAttribsARB(m_display, config, 0, true, contextAttributes.data());
+ m_context = glXCreateContextAttribsARB(m_display, config, nullptr, true, contextAttributes.data());
if (m_context)
- m_shareContext = 0;
+ m_shareContext = nullptr;
}
}
}
@@ -375,9 +375,9 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
m_context = glXCreateNewContext(m_display, config, GLX_RGBA_TYPE, m_shareContext, true);
if (!m_context && m_shareContext) {
// re-try without a shared glx context
- m_context = glXCreateNewContext(m_display, config, GLX_RGBA_TYPE, 0, true);
+ m_context = glXCreateNewContext(m_display, config, GLX_RGBA_TYPE, nullptr, true);
if (m_context)
- m_shareContext = 0;
+ m_shareContext = nullptr;
}
}
@@ -399,7 +399,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
m_context = glXCreateContext(m_display, visualInfo, m_shareContext, true);
if (!m_context && m_shareContext) {
// re-try without a shared glx context
- m_shareContext = 0;
+ m_shareContext = nullptr;
m_context = glXCreateContext(m_display, visualInfo, nullptr, true);
}
@@ -429,7 +429,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share, const
qWarning("QGLXContext: Requires a QGLXNativeContext");
return;
}
- QGLXNativeContext handle = nativeHandle.value<QGLXNativeContext>();
+ QGLXNativeContext handle = qvariant_cast<QGLXNativeContext>(nativeHandle);
GLXContext context = handle.context();
if (!context) {
qWarning("QGLXContext: No GLXContext given");
@@ -444,7 +444,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share, const
// Legacy contexts created using glXCreateContext are created using a visual
// and the FBConfig cannot be queried. The only way to adapt these contexts
// is to figure out the visual id.
- XVisualInfo *vinfo = 0;
+ XVisualInfo *vinfo = nullptr;
// If the VisualID is provided use it.
VisualID vid = handle.visualId();
if (!vid) {
@@ -464,13 +464,13 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share, const
vinfo = XGetVisualInfo(dpy, VisualScreenMask | VisualIDMask, &v, &n);
if (n < 1) {
XFree(vinfo);
- vinfo = 0;
+ vinfo = nullptr;
}
}
// For contexts created with an FBConfig using the modern functions providing the
// visual or window is not mandatory. Just query the config from the context.
- GLXFBConfig config = 0;
+ GLXFBConfig config = nullptr;
if (!vinfo) {
int configId = 0;
if (glXQueryContext(dpy, context, GLX_FBCONFIG_ID, &configId) != Success) {
@@ -595,8 +595,8 @@ bool QGLXContext::makeCurrent(QPlatformSurface *surface)
if (interval >= 0 && interval != window->swapInterval() && screen) {
typedef void (*qt_glXSwapIntervalEXT)(Display *, GLXDrawable, int);
typedef void (*qt_glXSwapIntervalMESA)(unsigned int);
- static qt_glXSwapIntervalEXT glXSwapIntervalEXT = 0;
- static qt_glXSwapIntervalMESA glXSwapIntervalMESA = 0;
+ static qt_glXSwapIntervalEXT glXSwapIntervalEXT = nullptr;
+ static qt_glXSwapIntervalMESA glXSwapIntervalMESA = nullptr;
static bool resolved = false;
if (!resolved) {
resolved = true;
@@ -621,9 +621,9 @@ bool QGLXContext::makeCurrent(QPlatformSurface *surface)
void QGLXContext::doneCurrent()
{
if (m_isPBufferCurrent)
- glXMakeContextCurrent(m_display, 0, 0, 0);
+ glXMakeContextCurrent(m_display, 0, 0, nullptr);
else
- glXMakeCurrent(m_display, 0, 0);
+ glXMakeCurrent(m_display, 0, nullptr);
m_isPBufferCurrent = false;
}
@@ -658,12 +658,12 @@ QSurfaceFormat QGLXContext::format() const
bool QGLXContext::isSharing() const
{
- return m_shareContext != 0;
+ return m_shareContext != nullptr;
}
bool QGLXContext::isValid() const
{
- return m_context != 0 && !m_lost;
+ return m_context != nullptr && !m_lost;
}
bool QGLXContext::m_queriedDummyContext = false;
@@ -675,7 +675,7 @@ bool QGLXContext::m_supportsThreading = true;
// binary search.
static const char *qglx_threadedgl_blacklist_renderer[] = {
"Chromium", // QTBUG-32225 (initialization fails)
- 0
+ nullptr
};
static const char *qglx_threadedgl_blacklist_vendor[] = {
@@ -695,7 +695,7 @@ void QGLXContext::queryDummyContext()
return;
QOpenGLContext *oldContext = QOpenGLContext::currentContext();
- QSurface *oldSurface = 0;
+ QSurface *oldSurface = nullptr;
if (oldContext)
oldSurface = oldContext->surface();
@@ -732,7 +732,7 @@ void QGLXContext::queryDummyContext()
if (const char *renderer = (const char *) glGetString(GL_RENDERER)) {
for (int i = 0; qglx_threadedgl_blacklist_renderer[i]; ++i) {
- if (strstr(renderer, qglx_threadedgl_blacklist_renderer[i]) != 0) {
+ if (strstr(renderer, qglx_threadedgl_blacklist_renderer[i]) != nullptr) {
qCDebug(lcQpaGl).nospace() << "Multithreaded OpenGL disabled: "
"blacklisted renderer \""
<< qglx_threadedgl_blacklist_renderer[i]
@@ -744,7 +744,7 @@ void QGLXContext::queryDummyContext()
}
if (const char *vendor = (const char *) glGetString(GL_VENDOR)) {
for (int i = 0; qglx_threadedgl_blacklist_vendor[i]; ++i) {
- if (strstr(vendor, qglx_threadedgl_blacklist_vendor[i]) != 0) {
+ if (strstr(vendor, qglx_threadedgl_blacklist_vendor[i]) != nullptr) {
qCDebug(lcQpaGl).nospace() << "Multithreaded OpenGL disabled: "
"blacklisted vendor \""
<< qglx_threadedgl_blacklist_vendor[i]
@@ -759,7 +759,7 @@ void QGLXContext::queryDummyContext()
// Blacklist Mesa drivers due to QTCREATORBUG-10875 (crash in creator),
// QTBUG-34492 (flickering in fullscreen) and QTBUG-38221
const char *mesaVersionStr = nullptr;
- if (strstr(glxvendor, "Mesa Project") != 0) {
+ if (strstr(glxvendor, "Mesa Project") != nullptr) {
mesaVersionStr = (const char *) glGetString(GL_VERSION);
m_supportsThreading = false;
}
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
index 34895caaa2..6814dbd844 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
@@ -133,7 +133,7 @@ bool QXcbGlxIntegration::handleXcbEvent(xcb_generic_event_t *event, uint respons
Display *xdisplay = static_cast<Display *>(m_connection->xlib_display());
XLockDisplay(xdisplay);
bool locked = true;
- Bool (*proc)(Display*, XEvent*, xEvent*) = XESetWireToEvent(xdisplay, responseType, 0);
+ Bool (*proc)(Display*, XEvent*, xEvent*) = XESetWireToEvent(xdisplay, responseType, nullptr);
if (proc) {
XESetWireToEvent(xdisplay, responseType, proc);
XEvent dummy;
@@ -212,7 +212,7 @@ QPlatformOffscreenSurface *QXcbGlxIntegration::createPlatformOffscreenSurface(QO
if (glxPbufferUsable)
return new QGLXPbuffer(surface);
else
- return 0; // trigger fallback to hidden QWindow
+ return nullptr; // trigger fallback to hidden QWindow
}
diff --git a/src/plugins/platforms/xcb/qxcbatom.cpp b/src/plugins/platforms/xcb/qxcbatom.cpp
index ecb73cb90b..79b5ba06e6 100644
--- a/src/plugins/platforms/xcb/qxcbatom.cpp
+++ b/src/plugins/platforms/xcb/qxcbatom.cpp
@@ -265,7 +265,7 @@ void QXcbAtom::initializeAllAtoms(xcb_connection_t *connection) {
cookies[i] = xcb_intern_atom(connection, false, strlen(names[i]), names[i]);
for (i = 0; i < QXcbAtom::NAtoms; ++i) {
- xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(connection, cookies[i], 0);
+ xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(connection, cookies[i], nullptr);
m_allAtoms[i] = reply->atom;
free(reply);
}
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 741317d766..8f55bc2e96 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -229,7 +229,7 @@ void QXcbBackingStoreImage::resize(const QSize &size)
m_xcb_format->bits_per_pixel,
0, byteOrder,
XCB_IMAGE_ORDER_MSB_FIRST,
- 0, ~0, 0);
+ nullptr, ~0, nullptr);
const size_t segmentSize = imageDataSize(m_xcb_image);
@@ -412,13 +412,13 @@ bool QXcbBackingStoreImage::createSystemVShmSegment(xcb_connection_t *c, size_t
return false;
}
- void *addr = shmat(id, 0, 0);
+ void *addr = shmat(id, nullptr, 0);
if (addr == (void *)-1) {
qCWarning(lcQpaXcb, "shmat() failed (%d: %s) for id %d", errno, strerror(errno), id);
return false;
}
- if (shmctl(id, IPC_RMID, 0) == -1)
+ if (shmctl(id, IPC_RMID, nullptr) == -1)
qCWarning(lcQpaXcb, "Error while marking the shared memory segment to be destroyed");
const auto seg = xcb_generate_id(c);
@@ -780,7 +780,7 @@ QXcbBackingStore::~QXcbBackingStore()
QPaintDevice *QXcbBackingStore::paintDevice()
{
if (!m_image)
- return 0;
+ return nullptr;
return m_rgbImage.isNull() ? m_image->image() : &m_rgbImage;
}
@@ -1036,7 +1036,7 @@ void QXcbSystemTrayBackingStore::recreateImage(QXcbWindow *win, const QSize &siz
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);
+ xcb_render_create_picture(xcb_connection(), m_xrenderPicture, m_xrenderPixmap, m_xrenderPictFormat, 0, nullptr);
// XRender expects premultiplied alpha
if (m_image)
@@ -1077,7 +1077,7 @@ void QXcbSystemTrayBackingStore::initXRenderMode()
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_render_create_picture_checked(conn, m_windowPicture, platformWindow->xcb_window(), vfmt->format, 0, nullptr);
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",
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
index 2cb6720d40..fe9ddfece7 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
@@ -123,8 +123,9 @@ protected:
return list.contains(format);
}
- QVariant retrieveData_sys(const QString &fmt, QVariant::Type requestedType) const override
+ QVariant retrieveData_sys(const QString &fmt, QVariant::Type type) const override
{
+ auto requestedType = QMetaType::Type(type);
if (fmt.isEmpty() || isEmpty())
return QByteArray();
@@ -226,8 +227,8 @@ QXcbClipboard::QXcbClipboard(QXcbConnection *c)
{
Q_ASSERT(QClipboard::Clipboard == 0);
Q_ASSERT(QClipboard::Selection == 1);
- m_clientClipboard[QClipboard::Clipboard] = 0;
- m_clientClipboard[QClipboard::Selection] = 0;
+ m_clientClipboard[QClipboard::Clipboard] = nullptr;
+ m_clientClipboard[QClipboard::Selection] = nullptr;
m_timestamp[QClipboard::Clipboard] = XCB_CURRENT_TIME;
m_timestamp[QClipboard::Selection] = XCB_CURRENT_TIME;
m_owner = connection()->getQtSelectionOwner();
@@ -316,7 +317,7 @@ QClipboard::Mode QXcbClipboard::modeForAtom(xcb_atom_t a) const
QMimeData * QXcbClipboard::mimeData(QClipboard::Mode mode)
{
if (mode > QClipboard::Selection)
- return 0;
+ return nullptr;
xcb_window_t clipboardOwner = getSelectionOwner(atomForMode(mode));
if (clipboardOwner == owner()) {
@@ -334,7 +335,7 @@ void QXcbClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
if (mode > QClipboard::Selection)
return;
- QXcbClipboardMime *xClipboard = 0;
+ QXcbClipboardMime *xClipboard = nullptr;
// verify if there is data to be cleared on global X Clipboard.
if (!data) {
xClipboard = qobject_cast<QXcbClipboardMime *>(mimeData(mode));
@@ -353,7 +354,7 @@ void QXcbClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
if (m_clientClipboard[mode]) {
if (m_clientClipboard[QClipboard::Clipboard] != m_clientClipboard[QClipboard::Selection])
delete m_clientClipboard[mode];
- m_clientClipboard[mode] = 0;
+ m_clientClipboard[mode] = nullptr;
m_timestamp[mode] = XCB_CURRENT_TIME;
}
@@ -416,7 +417,7 @@ xcb_window_t QXcbClipboard::requestor() const
XCB_WINDOW_CLASS_INPUT_OUTPUT, // window class
platformScreen->screen()->root_visual, // visual
0, // value mask
- 0); // value list
+ nullptr); // value list
QXcbWindow::setWindowTitle(connection(), window,
QStringLiteral("Qt Clipboard Requestor Window"));
@@ -529,7 +530,7 @@ void QXcbClipboard::handleSelectionClearRequest(xcb_selection_clear_event_t *eve
if (newOwner != XCB_NONE) {
if (m_clientClipboard[QClipboard::Clipboard] != m_clientClipboard[QClipboard::Selection])
delete m_clientClipboard[mode];
- m_clientClipboard[mode] = 0;
+ m_clientClipboard[mode] = nullptr;
m_timestamp[mode] = XCB_CURRENT_TIME;
}
}
@@ -576,7 +577,7 @@ void QXcbClipboard::handleSelectionRequest(xcb_selection_request_event_t *req)
xcb_atom_t multipleAtom = atom(QXcbAtom::MULTIPLE);
xcb_atom_t timestampAtom = atom(QXcbAtom::TIMESTAMP);
- struct AtomPair { xcb_atom_t target; xcb_atom_t property; } *multi = 0;
+ struct AtomPair { xcb_atom_t target; xcb_atom_t property; } *multi = nullptr;
xcb_atom_t multi_type = XCB_NONE;
int multi_format = 0;
int nmulti = 0;
@@ -587,7 +588,7 @@ void QXcbClipboard::handleSelectionRequest(xcb_selection_request_event_t *req)
QByteArray multi_data;
if (req->property == XCB_NONE
|| !clipboardReadProperty(req->requestor, req->property, false, &multi_data,
- 0, &multi_type, &multi_format)
+ nullptr, &multi_type, &multi_format)
|| multi_format != 32) {
// MULTIPLE property not formatted correctly
xcb_send_event(xcb_connection(), false, req->requestor, XCB_EVENT_MASK_NO_EVENT, (const char *)&event);
@@ -842,7 +843,7 @@ QByteArray QXcbClipboard::clipboardReadIncrementalProperty(xcb_window_t win, xcb
continue;
prev_time = event->time;
- if (clipboardReadProperty(win, property, true, &tmp_buf, &length, 0, 0)) {
+ if (clipboardReadProperty(win, property, true, &tmp_buf, &length, nullptr, nullptr)) {
if (length == 0) { // no more data, we're done
if (nullterm) {
buf.resize(offset+1);
@@ -900,7 +901,7 @@ QByteArray QXcbClipboard::getSelection(xcb_atom_t selection, xcb_atom_t target,
return buf;
xcb_atom_t type;
- if (clipboardReadProperty(win, property, true, &buf, 0, &type, 0)) {
+ if (clipboardReadProperty(win, property, true, &buf, nullptr, &type, nullptr)) {
if (type == atom(QXcbAtom::INCR)) {
int nbytes = buf.size() >= 4 ? *((int*)buf.data()) : 0;
buf = clipboardReadIncrementalProperty(win, property, nbytes, false);
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index cac6345b66..435c4aee93 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -66,14 +66,10 @@
#include <errno.h>
#include <xcb/xfixes.h>
-#if QT_CONFIG(xkb)
#define explicit dont_use_cxx_explicit
#include <xcb/xkb.h>
#undef explicit
-#endif
-#if QT_CONFIG(xcb_xinput)
#include <xcb/xinput.h>
-#endif
QT_BEGIN_NAMESPACE
@@ -88,12 +84,6 @@ Q_LOGGING_CATEGORY(lcQpaKeyboard, "qt.qpa.xkeyboard")
Q_LOGGING_CATEGORY(lcQpaClipboard, "qt.qpa.clipboard")
Q_LOGGING_CATEGORY(lcQpaXDnd, "qt.qpa.xdnd")
-// this event type was added in libxcb 1.10,
-// but we support also older version
-#ifndef XCB_GE_GENERIC
-#define XCB_GE_GENERIC 35
-#endif
-
QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, xcb_visualid_t defaultVisualId, const char *displayName)
: QXcbBasicConnection(displayName)
, m_canGrabServer(canGrabServer)
@@ -112,12 +102,10 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
initializeScreens();
-#if QT_CONFIG(xcb_xinput)
if (hasXInput2()) {
xi2SetupDevices();
xi2SelectStateEvents();
}
-#endif
m_wmSupport.reset(new QXcbWMSupport(this));
m_keyboard = new QXcbKeyboard(this);
@@ -196,7 +184,7 @@ QXcbWindow *QXcbConnection::platformWindowFromId(xcb_window_t id)
QXcbWindowEventListener *listener = m_mapper.value(id, 0);
if (listener)
return listener->toWindow();
- return 0;
+ return nullptr;
}
#define HANDLE_PLATFORM_WINDOW_EVENT(event_t, windowMember, handler) \
@@ -467,7 +455,7 @@ void QXcbConnection::printXcbError(const char *message, xcb_generic_error_t *err
static Qt::MouseButtons translateMouseButtons(int s)
{
- Qt::MouseButtons ret = 0;
+ Qt::MouseButtons ret;
if (s & XCB_BUTTON_MASK_1)
ret |= Qt::LeftButton;
if (s & XCB_BUTTON_MASK_2)
@@ -518,7 +506,6 @@ Qt::MouseButton QXcbConnection::translateMouseButton(xcb_button_t s)
}
}
-#if QT_CONFIG(xkb)
namespace {
typedef union {
/* All XKB events share these fields. */
@@ -534,7 +521,6 @@ namespace {
xcb_xkb_state_notify_event_t state_notify;
} _xkb_event;
}
-#endif
void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
{
@@ -611,16 +597,12 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
HANDLE_PLATFORM_WINDOW_EVENT(xcb_client_message_event_t, window, handleClientMessageEvent);
}
case XCB_ENTER_NOTIFY:
-#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(xcb_xinput)
if (hasXInput2() && !xi2MouseEventsDisabled())
break;
-#endif
m_keyboard->updateXKBStateFromCore(reinterpret_cast<xcb_leave_notify_event_t *>(event)->state);
HANDLE_PLATFORM_WINDOW_EVENT(xcb_leave_notify_event_t, event, handleLeaveNotifyEvent);
case XCB_FOCUS_IN:
@@ -682,13 +664,11 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
}
break;
}
-#if QT_CONFIG(xcb_xinput)
case XCB_GE_GENERIC:
// Here the windowEventListener is invoked from xi2HandleEvent()
if (hasXInput2() && isXIEvent(event))
xi2HandleEvent(reinterpret_cast<xcb_ge_event_t *>(event));
break;
-#endif
default:
handled = false; // event type not recognized
break;
@@ -712,7 +692,6 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
auto change_event = reinterpret_cast<xcb_randr_screen_change_notify_event_t *>(event);
if (auto virtualDesktop = virtualDesktopForRootWindow(change_event->root))
virtualDesktop->handleScreenChange(change_event);
-#if QT_CONFIG(xkb)
} else if (isXkbType(response_type)) {
auto xkb_event = reinterpret_cast<_xkb_event *>(event);
if (xkb_event->any.deviceID == m_keyboard->coreDeviceId()) {
@@ -735,7 +714,6 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
break;
}
}
-#endif
} else {
handled = false; // event type still not recognized
}
@@ -825,7 +803,7 @@ xcb_window_t QXcbConnection::getQtSelectionOwner()
XCB_WINDOW_CLASS_INPUT_OUTPUT, // window class
xcbScreen->root_visual, // visual
0, // value mask
- 0); // value list
+ nullptr); // value list
QXcbWindow::setWindowTitle(connection(), m_qtSelectionOwner,
QLatin1String("Qt Selection Owner for ") + QCoreApplication::applicationName());
@@ -852,7 +830,7 @@ xcb_window_t QXcbConnection::clientLeader()
0,
XCB_WINDOW_CLASS_INPUT_OUTPUT,
screen->screen()->root_visual,
- 0, 0);
+ 0, nullptr);
QXcbWindow::setWindowTitle(connection(), m_clientLeader,
@@ -912,7 +890,6 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event) const
});
}
-#if QT_CONFIG(xcb_xinput)
// compress XI_* events
if (responseType == XCB_GE_GENERIC) {
if (!hasXInput2())
@@ -948,7 +925,6 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event) const
return false;
}
-#endif
if (responseType == XCB_CONFIGURE_NOTIFY) {
// compress multiple configure notify events for the same window
@@ -978,7 +954,6 @@ bool QXcbConnection::isUserInputEvent(xcb_generic_event_t *event) const
if (isInputEvent)
return true;
-#if QT_CONFIG(xcb_xinput)
if (connection()->hasXInput2()) {
isInputEvent = isXIType(event, XCB_INPUT_BUTTON_PRESS) ||
isXIType(event, XCB_INPUT_BUTTON_RELEASE) ||
@@ -993,7 +968,6 @@ bool QXcbConnection::isUserInputEvent(xcb_generic_event_t *event) const
}
if (isInputEvent)
return true;
-#endif
if (eventType == XCB_CLIENT_MESSAGE) {
auto clientMessage = reinterpret_cast<const xcb_client_message_event_t *>(event);
@@ -1057,7 +1031,7 @@ void QXcbConnection::sync()
{
// from xcb_aux_sync
xcb_get_input_focus_cookie_t cookie = xcb_get_input_focus(xcb_connection());
- free(xcb_get_input_focus_reply(xcb_connection(), cookie, 0));
+ free(xcb_get_input_focus_reply(xcb_connection(), cookie, nullptr));
}
QXcbSystemTrayTracker *QXcbConnection::systemTrayTracker() const
@@ -1075,14 +1049,14 @@ QXcbSystemTrayTracker *QXcbConnection::systemTrayTracker() const
Qt::MouseButtons QXcbConnection::queryMouseButtons() const
{
int stateMask = 0;
- QXcbCursor::queryPointer(connection(), 0, 0, &stateMask);
+ QXcbCursor::queryPointer(connection(), nullptr, nullptr, &stateMask);
return translateMouseButtons(stateMask);
}
Qt::KeyboardModifiers QXcbConnection::queryKeyboardModifiers() const
{
int stateMask = 0;
- QXcbCursor::queryPointer(connection(), 0, 0, &stateMask);
+ QXcbCursor::queryPointer(connection(), nullptr, nullptr, &stateMask);
return keyboard()->translateModifiers(stateMask);
}
@@ -1140,7 +1114,7 @@ void QXcbSyncWindowRequest::invalidate()
{
if (m_window) {
m_window->clearSyncWindowRequest();
- m_window = 0;
+ m_window = nullptr;
}
}
@@ -1160,7 +1134,7 @@ void QXcbConnectionGrabber::release()
{
if (m_connection) {
m_connection->ungrabServer();
- m_connection = 0;
+ m_connection = nullptr;
}
}
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 7cf25d41a6..8a4b577d2e 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -104,10 +104,8 @@ 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(xcb_xinput)
virtual void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource = Qt::MouseEventNotSynthesized) {}
virtual void handleXIEnterLeave(xcb_ge_event_t *) {}
-#endif
virtual QXcbWindow *toWindow() { return nullptr; }
};
@@ -129,7 +127,7 @@ class Q_XCB_EXPORT QXcbConnection : public QXcbBasicConnection
{
Q_OBJECT
public:
- QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, xcb_visualid_t defaultVisualId, const char *displayName = 0);
+ QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, xcb_visualid_t defaultVisualId, const char *displayName = nullptr);
~QXcbConnection();
QXcbConnection *connection() const { return const_cast<QXcbConnection *>(this); }
@@ -225,7 +223,6 @@ public:
bool isUserInputEvent(xcb_generic_event_t *event) const;
-#if QT_CONFIG(xcb_xinput)
void xi2SelectStateEvents();
void xi2SelectDeviceEvents(xcb_window_t window);
void xi2SelectDeviceEventsCompatibility(xcb_window_t window);
@@ -233,10 +230,9 @@ public:
bool xi2MouseEventsDisabled() const;
Qt::MouseButton xiToQtMouseButton(uint32_t b);
void xi2UpdateScrollingDevices();
- bool startSystemMoveResizeForTouchBegin(xcb_window_t window, const QPoint &point, int corner);
+ bool startSystemMoveResizeForTouch(xcb_window_t window, int edges);
void abortSystemMoveResizeForTouch();
bool isTouchScreen(int id);
-#endif
bool canGrab() const { return m_canGrabServer; }
@@ -267,7 +263,6 @@ private:
inline bool timeGreaterThan(xcb_timestamp_t a, xcb_timestamp_t b) const
{ return static_cast<int32_t>(a - b) > 0 || b == XCB_CURRENT_TIME; }
-#if QT_CONFIG(xcb_xinput)
void xi2SetupDevice(void *info, bool removeExisting = true);
void xi2SetupDevices();
struct TouchDeviceData {
@@ -299,7 +294,7 @@ private:
int deviceId = 0;
QTabletEvent::PointerType pointerType = QTabletEvent::UnknownPointer;
QTabletEvent::TabletDevice tool = QTabletEvent::Stylus;
- Qt::MouseButtons buttons = 0;
+ Qt::MouseButtons buttons;
qint64 serialId = 0;
bool inProximity = false;
struct ValuatorClassInfo {
@@ -323,8 +318,8 @@ private:
int horizontalIndex = 0;
double verticalIncrement = 0;
double horizontalIncrement = 0;
- Qt::Orientations orientations = 0;
- Qt::Orientations legacyOrientations = 0;
+ Qt::Orientations orientations;
+ Qt::Orientations legacyOrientations;
QPointF lastScrollPosition;
};
QHash<int, ScrollingDevice> m_scrollingDevices;
@@ -339,9 +334,8 @@ private:
xcb_window_t window = XCB_NONE;
uint16_t deviceid;
uint32_t pointid;
- int corner;
+ int edges;
} m_startSystemMoveResizeInfo;
-#endif // QT_CONFIG(xcb_xinput)
const bool m_canGrabServer;
const xcb_visualid_t m_defaultVisualId;
@@ -366,7 +360,7 @@ private:
WindowMapper m_mapper;
- Qt::MouseButtons m_buttonState = nullptr;
+ Qt::MouseButtons m_buttonState;
Qt::MouseButton m_button = Qt::NoButton;
QXcbWindow *m_focusWindow = nullptr;
@@ -389,12 +383,10 @@ private:
QTimer m_focusInTimer;
};
-#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);
#endif
-#endif
class QXcbConnectionGrabber
{
diff --git a/src/plugins/platforms/xcb/qxcbconnection_basic.cpp b/src/plugins/platforms/xcb/qxcbconnection_basic.cpp
index 9a028e5a7e..18dee89adb 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_basic.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_basic.cpp
@@ -45,14 +45,10 @@
#include <xcb/xfixes.h>
#include <xcb/xinerama.h>
#include <xcb/render.h>
-#if QT_CONFIG(xcb_xinput)
#include <xcb/xinput.h>
-#endif
-#if QT_CONFIG(xkb)
#define explicit dont_use_cxx_explicit
#include <xcb/xkb.h>
#undef explicit
-#endif
#if QT_CONFIG(xcb_xlib)
#define register /* C++17 deprecated register */
@@ -97,7 +93,7 @@ static int nullErrorHandler(Display *dpy, XErrorEvent *err)
static int ioErrorHandler(Display *dpy)
{
xcb_connection_t *conn = XGetXCBConnection(dpy);
- if (conn != NULL) {
+ if (conn != nullptr) {
/* Print a message with a textual description of the error */
int code = xcb_connection_has_error(conn);
const char *str = "Unknown error";
@@ -138,14 +134,7 @@ QXcbBasicConnection::QXcbBasicConnection(const char *displayName)
xcb_extension_t *extensions[] = {
&xcb_shm_id, &xcb_xfixes_id, &xcb_randr_id, &xcb_shape_id, &xcb_sync_id,
- &xcb_render_id,
-#if QT_CONFIG(xkb)
- &xcb_xkb_id,
-#endif
-#if QT_CONFIG(xcb_xinput)
- &xcb_input_id,
-#endif
- 0
+ &xcb_render_id, &xcb_xkb_id, &xcb_input_id, nullptr
};
for (xcb_extension_t **ext_it = extensions; *ext_it; ++ext_it)
@@ -160,10 +149,8 @@ QXcbBasicConnection::QXcbBasicConnection(const char *displayName)
initializeXinerama();
initializeXFixes();
initializeXRender();
-#if QT_CONFIG(xcb_xinput)
if (!qEnvironmentVariableIsSet("QT_XCB_NO_XI2"))
initializeXInput2();
-#endif
initializeXShape();
initializeXKB();
}
@@ -213,7 +200,6 @@ bool QXcbBasicConnection::hasBigRequest() const
return m_maximumRequestLength > m_setup->maximum_request_length;
}
-#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"
@@ -240,7 +226,6 @@ bool QXcbBasicConnection::isXIType(xcb_generic_event_t *event, uint16_t type) co
auto *e = reinterpret_cast<qt_xcb_ge_event_t *>(event);
return e->event_type == type;
}
-#endif // QT_CONFIG(xcb_xinput)
bool QXcbBasicConnection::isXFixesType(uint responseType, int eventType) const
{
@@ -370,7 +355,6 @@ void QXcbBasicConnection::initializeXRandr()
m_xrandrFirstEvent = reply->first_event;
}
-#if QT_CONFIG(xcb_xinput)
void QXcbBasicConnection::initializeXInput2()
{
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_xcbConnection, &xcb_input_id);
@@ -393,7 +377,6 @@ void QXcbBasicConnection::initializeXInput2()
m_xinputFirstEvent = reply->first_event;
m_xi2Minor = xinputQuery->minor_version;
}
-#endif
void QXcbBasicConnection::initializeXShape()
{
@@ -417,7 +400,6 @@ void QXcbBasicConnection::initializeXShape()
void QXcbBasicConnection::initializeXKB()
{
-#if QT_CONFIG(xkb)
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_xcbConnection, &xcb_xkb_id);
if (!reply || !reply->present) {
qCWarning(lcQpaXcb, "XKeyboard extension not present on the X server");
@@ -439,7 +421,6 @@ void QXcbBasicConnection::initializeXKB()
m_hasXkb = true;
m_xkbFirstEvent = reply->first_event;
-#endif
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbconnection_basic.h b/src/plugins/platforms/xcb/qxcbconnection_basic.h
index 1bd4310562..109186f966 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_basic.h
+++ b/src/plugins/platforms/xcb/qxcbconnection_basic.h
@@ -99,12 +99,10 @@ public:
bool hasXinerama() const { return m_hasXinerama; }
bool hasBigRequest() const;
-#if QT_CONFIG(xcb_xinput)
bool isAtLeastXI21() const { return m_xi2Enabled && m_xi2Minor >= 1; }
bool isAtLeastXI22() const { return m_xi2Enabled && m_xi2Minor >= 2; }
bool isXIEvent(xcb_generic_event_t *event) const;
bool isXIType(xcb_generic_event_t *event, uint16_t type) const;
-#endif
bool isXFixesType(uint responseType, int eventType) const;
bool isXRandrType(uint responseType, int eventType) const;
@@ -119,9 +117,7 @@ protected:
void initializeXShape();
void initializeXKB();
void initializeXSync();
-#if QT_CONFIG(xcb_xinput)
void initializeXInput2();
-#endif
private:
#if QT_CONFIG(xcb_xlib)
@@ -147,11 +143,9 @@ private:
QPair<int, int> m_xrenderVersion;
bool m_xi2Enabled = false;
-#if QT_CONFIG(xcb_xinput)
int m_xi2Minor = -1;
int m_xiOpCode = -1;
uint32_t m_xinputFirstEvent = 0;
-#endif
uint32_t m_xfixesFirstEvent = 0;
uint32_t m_xrandrFirstEvent = 0;
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 0a82bbc7a9..4620f0fd1d 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -166,7 +166,7 @@ void QXcbConnection::xi2SetupDevice(void *info, bool removeExisting)
}
case XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON: {
auto *bci = reinterpret_cast<xcb_input_button_class_t *>(classinfo);
- xcb_atom_t *labels = 0;
+ xcb_atom_t *labels = nullptr;
if (bci->num_buttons >= 5) {
labels = xcb_input_button_class_labels(bci);
xcb_atom_t label4 = labels[3];
@@ -424,7 +424,7 @@ QXcbConnection::TouchDeviceData *QXcbConnection::touchDeviceForId(int id)
QXcbConnection::TouchDeviceData *QXcbConnection::populateTouchDevices(void *info)
{
auto *deviceinfo = reinterpret_cast<xcb_input_xi_device_info_t *>(info);
- QTouchDevice::Capabilities caps = 0;
+ QTouchDevice::Capabilities caps;
int type = -1;
int maxTouchPoints = 1;
bool isTouchDevice = false;
@@ -527,7 +527,7 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
int sourceDeviceId = xiEvent->deviceid; // may be the master id
qt_xcb_input_device_event_t *xiDeviceEvent = nullptr;
xcb_input_enter_event_t *xiEnterEvent = nullptr;
- QXcbWindowEventListener *eventListener = 0;
+ QXcbWindowEventListener *eventListener = nullptr;
switch (xiEvent->event_type) {
case XCB_INPUT_BUTTON_PRESS:
@@ -753,7 +753,7 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
xcb_input_xi_allow_events(xcb_connection(), XCB_CURRENT_TIME, xiDeviceEvent->deviceid,
XCB_INPUT_EVENT_MODE_REJECT_TOUCH,
xiDeviceEvent->detail, xiDeviceEvent->event);
- window->doStartSystemMoveResize(QPoint(x, y), m_startSystemMoveResizeInfo.corner);
+ window->doStartSystemMoveResize(QPoint(x, y), m_startSystemMoveResizeInfo.edges);
m_startSystemMoveResizeInfo.window = XCB_NONE;
}
}
@@ -787,19 +787,20 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
touchPoint.state = Qt::TouchPointStationary;
}
-bool QXcbConnection::startSystemMoveResizeForTouchBegin(xcb_window_t window, const QPoint &point, int corner)
+bool QXcbConnection::startSystemMoveResizeForTouch(xcb_window_t window, int edges)
{
QHash<int, TouchDeviceData>::const_iterator devIt = m_touchDevices.constBegin();
for (; devIt != m_touchDevices.constEnd(); ++devIt) {
TouchDeviceData deviceData = devIt.value();
if (deviceData.qtTouchDevice->type() == QTouchDevice::TouchScreen) {
- QHash<int, QPointF>::const_iterator pointIt = deviceData.pointPressedPosition.constBegin();
- for (; pointIt != deviceData.pointPressedPosition.constEnd(); ++pointIt) {
- if (pointIt.value().toPoint() == point) {
+ auto pointIt = deviceData.touchPoints.constBegin();
+ for (; pointIt != deviceData.touchPoints.constEnd(); ++pointIt) {
+ Qt::TouchPointState state = pointIt.value().state;
+ if (state == Qt::TouchPointMoved || state == Qt::TouchPointPressed || state == Qt::TouchPointStationary) {
m_startSystemMoveResizeInfo.window = window;
m_startSystemMoveResizeInfo.deviceid = devIt.key();
m_startSystemMoveResizeInfo.pointid = pointIt.key();
- m_startSystemMoveResizeInfo.corner = corner;
+ m_startSystemMoveResizeInfo.edges = edges;
return true;
}
}
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
index fbadab4d50..639e4f039c 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -67,10 +67,10 @@ enum {
};
#undef CursorShape
-static PtrXcursorLibraryLoadCursor ptrXcursorLibraryLoadCursor = 0;
-static PtrXcursorLibraryGetTheme ptrXcursorLibraryGetTheme = 0;
-static PtrXcursorLibrarySetTheme ptrXcursorLibrarySetTheme = 0;
-static PtrXcursorLibraryGetDefaultSize ptrXcursorLibraryGetDefaultSize = 0;
+static PtrXcursorLibraryLoadCursor ptrXcursorLibraryLoadCursor = nullptr;
+static PtrXcursorLibraryGetTheme ptrXcursorLibraryGetTheme = nullptr;
+static PtrXcursorLibrarySetTheme ptrXcursorLibrarySetTheme = nullptr;
+static PtrXcursorLibraryGetDefaultSize ptrXcursorLibraryGetDefaultSize = nullptr;
#endif
static xcb_font_t cursorFont = 0;
@@ -118,7 +118,7 @@ static const uint8_t mcur_fdiag_bits[] = {
static const uint8_t *cursor_bits16[] = {
cur_ver_bits, mcur_ver_bits, cur_hor_bits, mcur_hor_bits,
cur_bdiag_bits, mcur_bdiag_bits, cur_fdiag_bits, mcur_fdiag_bits,
- 0, 0, cur_blank_bits, cur_blank_bits };
+ nullptr, nullptr, cur_blank_bits, cur_blank_bits };
static const uint8_t vsplit_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -219,7 +219,7 @@ static const uint8_t busym_bits[] = {
static const uint8_t * const cursor_bits32[] = {
vsplit_bits, vsplitm_bits, hsplit_bits, hsplitm_bits,
- 0, 0, 0, 0, whatsthis_bits, whatsthism_bits, busy_bits, busym_bits
+ nullptr, nullptr, nullptr, nullptr, whatsthis_bits, whatsthism_bits, busy_bits, busym_bits
};
static const uint8_t forbidden_bits[] = {
@@ -452,19 +452,19 @@ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
if (cshape == Qt::BlankCursor) {
xcb_pixmap_t cp = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(), cur_blank_bits, 16, 16,
- 1, 0, 0, 0);
+ 1, 0, 0, nullptr);
xcb_pixmap_t mp = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(), cur_blank_bits, 16, 16,
- 1, 0, 0, 0);
+ 1, 0, 0, nullptr);
cursor = xcb_generate_id(conn);
xcb_create_cursor(conn, cursor, cp, mp, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 8, 8);
} else if (cshape >= Qt::SizeVerCursor && cshape < Qt::SizeAllCursor) {
int i = (cshape - Qt::SizeVerCursor) * 2;
xcb_pixmap_t pm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),
const_cast<uint8_t*>(cursor_bits16[i]),
- 16, 16, 1, 0, 0, 0);
+ 16, 16, 1, 0, 0, nullptr);
xcb_pixmap_t pmm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),
const_cast<uint8_t*>(cursor_bits16[i + 1]),
- 16, 16, 1, 0, 0, 0);
+ 16, 16, 1, 0, 0, nullptr);
cursor = xcb_generate_id(conn);
xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 8, 8);
} else if ((cshape >= Qt::SplitVCursor && cshape <= Qt::SplitHCursor)
@@ -472,10 +472,10 @@ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
int i = (cshape - Qt::SplitVCursor) * 2;
xcb_pixmap_t pm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),
const_cast<uint8_t*>(cursor_bits32[i]),
- 32, 32, 1, 0, 0, 0);
+ 32, 32, 1, 0, 0, nullptr);
xcb_pixmap_t pmm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),
const_cast<uint8_t*>(cursor_bits32[i + 1]),
- 32, 32, 1, 0, 0, 0);
+ 32, 32, 1, 0, 0, nullptr);
int hs = (cshape == Qt::PointingHandCursor || cshape == Qt::WhatsThisCursor
|| cshape == Qt::BusyCursor) ? 0 : 16;
cursor = xcb_generate_id(conn);
@@ -484,20 +484,20 @@ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
int i = (cshape - Qt::ForbiddenCursor) * 2;
xcb_pixmap_t pm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),
const_cast<uint8_t*>(cursor_bits20[i]),
- 20, 20, 1, 0, 0, 0);
+ 20, 20, 1, 0, 0, nullptr);
xcb_pixmap_t pmm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),
const_cast<uint8_t*>(cursor_bits20[i + 1]),
- 20, 20, 1, 0, 0, 0);
+ 20, 20, 1, 0, 0, nullptr);
cursor = xcb_generate_id(conn);
xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 10, 10);
} else if (cshape == Qt::OpenHandCursor || cshape == Qt::ClosedHandCursor) {
bool open = cshape == Qt::OpenHandCursor;
xcb_pixmap_t pm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),
const_cast<uint8_t*>(open ? openhand_bits : closedhand_bits),
- 16, 16, 1, 0, 0, 0);
+ 16, 16, 1, 0, 0, nullptr);
xcb_pixmap_t pmm = xcb_create_pixmap_from_bitmap_data(conn, m_screen->root(),
const_cast<uint8_t*>(open ? openhandm_bits : closedhandm_bits),
- 16, 16, 1, 0, 0, 0);
+ 16, 16, 1, 0, 0, nullptr);
cursor = xcb_generate_id(conn);
xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 8, 8);
} else if (cshape == Qt::DragCopyCursor || cshape == Qt::DragMoveCursor
@@ -660,14 +660,14 @@ void QXcbCursor::queryPointer(QXcbConnection *c, QXcbVirtualDesktop **virtualDes
QPoint QXcbCursor::pos() const
{
QPoint p;
- queryPointer(connection(), 0, &p);
+ queryPointer(connection(), nullptr, &p);
return p;
}
void QXcbCursor::setPos(const QPoint &pos)
{
QXcbVirtualDesktop *virtualDesktop = nullptr;
- queryPointer(connection(), &virtualDesktop, 0);
+ queryPointer(connection(), &virtualDesktop, nullptr);
xcb_warp_pointer(xcb_connection(), XCB_NONE, virtualDesktop->root(), 0, 0, 0, 0, pos.x(), pos.y());
xcb_flush(xcb_connection());
}
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index 3d525598ca..e76fc8bd40 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -114,7 +114,7 @@ protected:
QStringList formats_sys() const override;
QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const override;
- QVariant xdndObtainData(const QByteArray &format, QVariant::Type requestedType) const;
+ QVariant xdndObtainData(const QByteArray &format, QMetaType::Type requestedType) const;
QXcbDrag *drag;
};
@@ -148,7 +148,7 @@ void QXcbDrag::init()
source_time = XCB_CURRENT_TIME;
target_time = XCB_CURRENT_TIME;
- QXcbCursor::queryPointer(connection(), &current_virtual_desktop, 0);
+ QXcbCursor::queryPointer(connection(), &current_virtual_desktop, nullptr);
drag_types.clear();
//current_embedding_widget = 0;
@@ -384,13 +384,13 @@ void QXcbDrag::move(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardMod
if (!findXdndAwareTarget(globalPos, &target))
return;
- QXcbWindow *w = 0;
+ QXcbWindow *w = nullptr;
if (target) {
w = connection()->platformWindowFromId(target);
if (w && (w->window()->type() == Qt::Desktop) /*&& !w->acceptDrops()*/)
- w = 0;
+ w = nullptr;
} else {
- w = 0;
+ w = nullptr;
target = current_virtual_desktop->root();
}
@@ -522,7 +522,7 @@ void QXcbDrag::drop(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardMod
QXcbWindow *w = connection()->platformWindowFromId(current_proxy_target);
if (w && w->window()->type() == Qt::Desktop) // && !w->acceptDrops()
- w = 0;
+ w = nullptr;
Transaction t = {
connection()->time(),
@@ -716,7 +716,7 @@ void QXcbDrag::handle_xdnd_position(QPlatformWindow *w, const xcb_client_message
target_time = e->data.data32[3];
}
- QMimeData *dropData = 0;
+ QMimeData *dropData = nullptr;
Qt::DropActions supported_actions = Qt::IgnoreAction;
if (currentDrag()) {
dropData = currentDrag()->mimeData();
@@ -883,7 +883,7 @@ void QXcbDrag::handleLeave(QPlatformWindow *w, const xcb_client_message_event_t
event->data.data32[0], xdnd_dragsource);
}
- QWindowSystemInterface::handleDrag(w->window(), nullptr, QPoint(), Qt::IgnoreAction, 0, 0);
+ QWindowSystemInterface::handleDrag(w->window(), nullptr, QPoint(), Qt::IgnoreAction, { }, { });
}
void QXcbDrag::send_leave()
@@ -911,7 +911,7 @@ void QXcbDrag::send_leave()
QXcbWindow *w = connection()->platformWindowFromId(current_proxy_target);
if (w && (w->window()->type() == Qt::Desktop) /*&& !w->acceptDrops()*/)
- w = 0;
+ w = nullptr;
qCDebug(lcQpaXDnd) << "sending XdndLeave to target:" << current_target;
@@ -945,7 +945,7 @@ void QXcbDrag::handleDrop(QPlatformWindow *, const xcb_client_message_event_t *e
target_time = l[2];
Qt::DropActions supported_drop_actions;
- QMimeData *dropData = 0;
+ QMimeData *dropData = nullptr;
if (currentDrag()) {
dropData = currentDrag()->mimeData();
supported_drop_actions = Qt::DropActions(l[4]);
@@ -1152,7 +1152,7 @@ void QXcbDrag::handleSelectionRequest(const xcb_selection_request_event_t *event
}
}
- QDrag *transactionDrag = 0;
+ QDrag *transactionDrag = nullptr;
if (at >= 0) {
transactionDrag = transactions.at(at).drag;
} else if (at == -2) {
@@ -1222,7 +1222,7 @@ bool QXcbDrag::dndEnable(QXcbWindow *w, bool on)
if (w->window()->type() == Qt::Desktop) {
xcb_delete_property(xcb_connection(), w->xcb_window(), atom(QXcbAtom::XdndProxy));
delete desktop_proxy;
- desktop_proxy = 0;
+ desktop_proxy = nullptr;
} else {
qCDebug(lcQpaXDnd) << "not deleting XDndAware";
}
@@ -1248,11 +1248,11 @@ QXcbDropData::~QXcbDropData()
QVariant QXcbDropData::retrieveData_sys(const QString &mimetype, QVariant::Type requestedType) const
{
QByteArray mime = mimetype.toLatin1();
- QVariant data = xdndObtainData(mime, requestedType);
+ QVariant data = xdndObtainData(mime, QMetaType::Type(requestedType));
return data;
}
-QVariant QXcbDropData::xdndObtainData(const QByteArray &format, QVariant::Type requestedType) const
+QVariant QXcbDropData::xdndObtainData(const QByteArray &format, QMetaType::Type requestedType) const
{
QByteArray result;
diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h
index 1388e68acc..7bef7a818a 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.h
+++ b/src/plugins/platforms/xcb/qxcbdrag.h
@@ -86,7 +86,7 @@ public:
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,
- Qt::MouseButtons b = nullptr, Qt::KeyboardModifiers mods = nullptr);
+ Qt::MouseButtons b = { }, Qt::KeyboardModifiers mods = { });
void handleStatus(const xcb_client_message_event_t *event);
void handleSelectionRequest(const xcb_selection_request_event_t *event);
@@ -109,7 +109,7 @@ private:
void init();
void handle_xdnd_position(QPlatformWindow *w, const xcb_client_message_event_t *event,
- Qt::MouseButtons b = nullptr, Qt::KeyboardModifiers mods = nullptr);
+ Qt::MouseButtons b = { }, Qt::KeyboardModifiers mods = { });
void handle_xdnd_status(const xcb_client_message_event_t *event);
void send_leave();
diff --git a/src/plugins/platforms/xcb/qxcbimage.cpp b/src/plugins/platforms/xcb/qxcbimage.cpp
index 8f33e6ed31..b0e610dd51 100644
--- a/src/plugins/platforms/xcb/qxcbimage.cpp
+++ b/src/plugins/platforms/xcb/qxcbimage.cpp
@@ -221,7 +221,7 @@ xcb_pixmap_t qt_xcb_XPixmapFromBitmap(QXcbScreen *screen, const QImage &image)
for (int i = 0; i < height; i++)
memcpy(buf + (destLineSize * i), map + (bytesPerLine * i), destLineSize);
xcb_pixmap_t pm = xcb_create_pixmap_from_bitmap_data(conn, screen->root(), buf,
- width, height, 1, 0, 0, 0);
+ width, height, 1, 0, 0, nullptr);
delete[] buf;
return pm;
}
@@ -249,7 +249,7 @@ xcb_cursor_t qt_xcb_createCursorXRender(QXcbScreen *screen, const QImage &image,
32, 32, 32, 32,
QSysInfo::ByteOrder == QSysInfo::BigEndian ? XCB_IMAGE_ORDER_MSB_FIRST : XCB_IMAGE_ORDER_LSB_FIRST,
XCB_IMAGE_ORDER_MSB_FIRST,
- 0, 0, 0);
+ nullptr, 0, nullptr);
if (!xi) {
qWarning("qt_xcb_createCursorXRender: xcb_image_create failed");
return XCB_NONE;
@@ -266,10 +266,10 @@ xcb_cursor_t qt_xcb_createCursorXRender(QXcbScreen *screen, const QImage &image,
xcb_create_pixmap(conn, 32, pix, screen->root(), w, h);
xcb_render_picture_t pic = xcb_generate_id(conn);
- xcb_render_create_picture(conn, pic, pix, fmt->id, 0, 0);
+ xcb_render_create_picture(conn, pic, pix, fmt->id, 0, nullptr);
xcb_gcontext_t gc = xcb_generate_id(conn);
- xcb_create_gc(conn, gc, pix, 0, 0);
+ xcb_create_gc(conn, gc, pix, 0, nullptr);
xcb_image_put(conn, pix, gc, xi, 0, 0, 0);
xcb_free_gc(conn, gc);
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index efda6b67ce..3fd989e1f9 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -130,7 +130,7 @@ QXcbIntegration *QXcbIntegration::m_instance = nullptr;
QXcbIntegration::QXcbIntegration(const QStringList &parameters, int &argc, char **argv)
: m_services(new QGenericUnixServices)
- , m_instanceName(0)
+ , m_instanceName(nullptr)
, m_canGrab(true)
, m_defaultVisualId(UINT_MAX)
{
@@ -146,7 +146,7 @@ QXcbIntegration::QXcbIntegration(const QStringList &parameters, int &argc, char
m_nativeInterface.reset(new QXcbNativeInterface);
// Parse arguments
- const char *displayName = 0;
+ const char *displayName = nullptr;
bool noGrabArg = false;
bool doGrabArg = false;
if (argc) {
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index d0e02ecdd1..e8286381a2 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -49,13 +49,7 @@
#include <private/qguiapplication_p.h>
-#if QT_CONFIG(xkb)
-#include <xkbcommon/xkbcommon-x11.h>
-#endif
-
-#if QT_CONFIG(xcb_xinput)
#include <xcb/xinput.h>
-#endif
QT_BEGIN_NAMESPACE
@@ -392,20 +386,16 @@ void QXcbKeyboard::updateKeymap()
xkb_context_set_log_level(m_xkbContext.get(), logLevel);
}
-#if QT_CONFIG(xkb)
if (connection()->hasXKB()) {
m_xkbKeymap.reset(xkb_x11_keymap_new_from_device(m_xkbContext.get(), xcb_connection(),
core_device_id, XKB_KEYMAP_COMPILE_NO_FLAGS));
if (m_xkbKeymap)
m_xkbState.reset(xkb_x11_state_new_from_device(m_xkbKeymap.get(), xcb_connection(), core_device_id));
} else {
-#endif
m_xkbKeymap.reset(keymapFromCore(keysymMods));
if (m_xkbKeymap)
m_xkbState.reset(xkb_state_new(m_xkbKeymap.get()));
-#if QT_CONFIG(xkb)
}
-#endif
if (!m_xkbKeymap) {
qCWarning(lcQpaKeyboard, "failed to compile a keymap");
@@ -428,7 +418,6 @@ QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const
return QXkbCommon::possibleKeys(m_xkbState.get(), event, m_superAsMeta, m_hyperAsMeta);
}
-#if QT_CONFIG(xkb)
void QXcbKeyboard::updateXKBState(xcb_xkb_state_notify_event_t *state)
{
if (m_config && connection()->hasXKB()) {
@@ -444,7 +433,6 @@ void QXcbKeyboard::updateXKBState(xcb_xkb_state_notify_event_t *state)
handleStateChanges(changedComponents);
}
}
-#endif
static xkb_layout_index_t lockedGroup(quint16 state)
{
@@ -473,7 +461,6 @@ void QXcbKeyboard::updateXKBStateFromCore(quint16 state)
}
}
-#if QT_CONFIG(xcb_xinput)
void QXcbKeyboard::updateXKBStateFromXI(void *modInfo, void *groupInfo)
{
if (m_config && !connection()->hasXKB()) {
@@ -491,7 +478,6 @@ void QXcbKeyboard::updateXKBStateFromXI(void *modInfo, void *groupInfo)
handleStateChanges(changedComponents);
}
}
-#endif
void QXcbKeyboard::handleStateChanges(xkb_state_component changedComponents)
{
@@ -541,7 +527,6 @@ void QXcbKeyboard::updateXKBMods()
QXcbKeyboard::QXcbKeyboard(QXcbConnection *connection)
: QXcbObject(connection)
{
-#if QT_CONFIG(xkb)
core_device_id = 0;
if (connection->hasXKB()) {
selectEvents();
@@ -551,11 +536,9 @@ QXcbKeyboard::QXcbKeyboard(QXcbConnection *connection)
return;
}
} else {
-#endif
m_key_symbols = xcb_key_symbols_alloc(xcb_connection());
-#if QT_CONFIG(xkb)
}
-#endif
+
updateKeymap();
}
@@ -573,7 +556,6 @@ void QXcbKeyboard::initialize()
void QXcbKeyboard::selectEvents()
{
-#if QT_CONFIG(xkb)
const uint16_t required_map_parts = (XCB_XKB_MAP_PART_KEY_TYPES |
XCB_XKB_MAP_PART_KEY_SYMS |
XCB_XKB_MAP_PART_MODIFIER_MAP |
@@ -597,19 +579,17 @@ void QXcbKeyboard::selectEvents()
required_events,
required_map_parts,
required_map_parts,
- 0);
+ nullptr);
xcb_generic_error_t *error = xcb_request_check(xcb_connection(), select);
if (error) {
free(error);
qCWarning(lcQpaXcb, "failed to select notify events from XKB");
}
-#endif
}
void QXcbKeyboard::updateVModMapping()
{
-#if QT_CONFIG(xkb)
xcb_xkb_get_names_value_list_t names_list;
memset(&vmod_masks, 0, sizeof(vmod_masks));
@@ -640,7 +620,7 @@ void QXcbKeyboard::updateVModMapping()
vmod_mask = name_reply->virtualMods;
// find the virtual modifiers for which names are defined.
for (bit = 1; vmod_mask; bit <<= 1) {
- vmod_name = 0;
+ vmod_name = nullptr;
if (!(vmod_mask & bit))
continue;
@@ -667,12 +647,10 @@ void QXcbKeyboard::updateVModMapping()
else if (qstrcmp(vmod_name, "Hyper") == 0)
vmod_masks.hyper = bit;
}
-#endif
}
void QXcbKeyboard::updateVModToRModMapping()
{
-#if QT_CONFIG(xkb)
xcb_xkb_get_map_map_t map;
memset(&rmod_masks, 0, sizeof(rmod_masks));
@@ -729,7 +707,6 @@ void QXcbKeyboard::updateVModToRModMapping()
else if (vmod_masks.hyper == bit)
rmod_masks.hyper = modmap;
}
-#endif
}
// Small helper: set modifier bit, if modifier position is valid
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h
index e35c82ad24..0ee08aeff2 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.h
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.h
@@ -43,14 +43,12 @@
#include "qxcbobject.h"
#include <xcb/xcb_keysyms.h>
-#if QT_CONFIG(xkb)
#define explicit dont_use_cxx_explicit
#include <xcb/xkb.h>
#undef explicit
-#endif
-#include <xkbcommon/xkbcommon.h>
#include <QtXkbCommonSupport/private/qxkbcommon_p.h>
+#include <xkbcommon/xkbcommon-x11.h>
#include <QEvent>
@@ -74,18 +72,14 @@ public:
void updateKeymap();
QList<int> possibleKeys(const QKeyEvent *event) const;
- // when XKEYBOARD not present on the X server
void updateXKBMods();
xkb_mod_mask_t xkbModMask(quint16 state);
void updateXKBStateFromCore(quint16 state);
-#if QT_CONFIG(xcb_xinput)
void updateXKBStateFromXI(void *modInfo, void *groupInfo);
-#endif
-#if QT_CONFIG(xkb)
- // when XKEYBOARD is present on the X server
+
int coreDeviceId() const { return core_device_id; }
void updateXKBState(xcb_xkb_state_notify_event_t *state);
-#endif
+
void handleStateChanges(xkb_state_component changedComponents);
protected:
@@ -97,10 +91,9 @@ protected:
typedef QMap<xcb_keysym_t, int> KeysymModifierMap;
struct xkb_keymap *keymapFromCore(const KeysymModifierMap &keysymMods);
- // when XKEYBOARD not present on the X server
void updateModifiers(const KeysymModifierMap &keysymMods);
KeysymModifierMap keysymsToModifiers();
- // when XKEYBOARD is present on the X server
+
void updateVModMapping();
void updateVModToRModMapping();
@@ -119,7 +112,6 @@ private:
_mod_masks rmod_masks;
- // when XKEYBOARD not present on the X server
xcb_key_symbols_t *m_key_symbols = nullptr;
struct _xkb_mods {
xkb_mod_index_t shift;
@@ -132,11 +124,9 @@ private:
xkb_mod_index_t mod5;
};
_xkb_mods xkb_mods;
-#if QT_CONFIG(xkb)
- // when XKEYBOARD is present on the X server
+
_mod_masks vmod_masks;
int core_device_id;
-#endif
QXkbCommon::ScopedXKBState m_xkbState;
QXkbCommon::ScopedXKBKeymap m_xkbKeymap;
diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp
index d611f86a9c..0b3219f792 100644
--- a/src/plugins/platforms/xcb/qxcbmime.cpp
+++ b/src/plugins/platforms/xcb/qxcbmime.cpp
@@ -159,7 +159,7 @@ QVector<xcb_atom_t> QXcbMime::mimeAtomsForFormat(QXcbConnection *connection, con
}
QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a, const QByteArray &d, const QString &format,
- QVariant::Type requestedType, const QByteArray &encoding)
+ QMetaType::Type requestedType, const QByteArray &encoding)
{
QByteArray data = d;
QString atomName = mimeAtomToString(connection, a);
@@ -169,7 +169,7 @@ QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a,
&& atomName == format + QLatin1String(";charset=") + QLatin1String(encoding)) {
#if QT_CONFIG(textcodec)
- if (requestedType == QVariant::String) {
+ if (requestedType == QMetaType::QString) {
QTextCodec *codec = QTextCodec::codecForName(encoding);
if (codec)
return codec->toUnicode(data);
@@ -264,7 +264,7 @@ QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a,
return QVariant();
}
-xcb_atom_t QXcbMime::mimeAtomForFormat(QXcbConnection *connection, const QString &format, QVariant::Type requestedType,
+xcb_atom_t QXcbMime::mimeAtomForFormat(QXcbConnection *connection, const QString &format, QMetaType::Type requestedType,
const QVector<xcb_atom_t> &atoms, QByteArray *requestedEncoding)
{
requestedEncoding->clear();
@@ -297,7 +297,7 @@ xcb_atom_t QXcbMime::mimeAtomForFormat(QXcbConnection *connection, const QString
// for string/text requests try to use a format with a well-defined charset
// first to avoid encoding problems
- if (requestedType == QVariant::String
+ if (requestedType == QMetaType::QString
&& format.startsWith(QLatin1String("text/"))
&& !format.contains(QLatin1String("charset="))) {
diff --git a/src/plugins/platforms/xcb/qxcbmime.h b/src/plugins/platforms/xcb/qxcbmime.h
index f2136ec9f4..dcb4f6b6c6 100644
--- a/src/plugins/platforms/xcb/qxcbmime.h
+++ b/src/plugins/platforms/xcb/qxcbmime.h
@@ -60,8 +60,8 @@ public:
static bool mimeDataForAtom(QXcbConnection *connection, xcb_atom_t a, QMimeData *mimeData, QByteArray *data,
xcb_atom_t *atomFormat, int *dataFormat);
static QVariant mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a, const QByteArray &data, const QString &format,
- QVariant::Type requestedType, const QByteArray &encoding);
- static xcb_atom_t mimeAtomForFormat(QXcbConnection *connection, const QString &format, QVariant::Type requestedType,
+ QMetaType::Type requestedType, const QByteArray &encoding);
+ static xcb_atom_t mimeAtomForFormat(QXcbConnection *connection, const QString &format, QMetaType::Type requestedType,
const QVector<xcb_atom_t> &atoms, QByteArray *requestedEncoding);
};
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 81b889a80f..30fa6864ac 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -268,7 +268,7 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QXcbNativeInterfa
if (lowerCaseResource == "peekeventqueue")
return NativeResourceForIntegrationFunction(reinterpret_cast<void *>(peekEventQueue));
- return 0;
+ return nullptr;
}
QPlatformNativeInterface::NativeResourceForContextFunction QXcbNativeInterface::nativeResourceFunctionForContext(const QByteArray &resource)
@@ -291,7 +291,7 @@ QPlatformNativeInterface::NativeResourceForScreenFunction QXcbNativeInterface::n
return NativeResourceForScreenFunction(reinterpret_cast<void *>(setAppTime));
else if (lowerCaseResource == "setappusertime")
return NativeResourceForScreenFunction(reinterpret_cast<void *>(setAppUserTime));
- return 0;
+ return nullptr;
}
QPlatformNativeInterface::NativeResourceForWindowFunction QXcbNativeInterface::nativeResourceFunctionForWindow(const QByteArray &resource)
@@ -365,7 +365,7 @@ void *QXcbNativeInterface::startupId()
QXcbConnection *defaultConnection = integration->defaultConnection();
if (defaultConnection)
return reinterpret_cast<void *>(const_cast<char *>(defaultConnection->startupId().constData()));
- return 0;
+ return nullptr;
}
void *QXcbNativeInterface::x11Screen()
@@ -374,7 +374,7 @@ void *QXcbNativeInterface::x11Screen()
QXcbConnection *defaultConnection = integration->defaultConnection();
if (defaultConnection)
return reinterpret_cast<void *>(defaultConnection->primaryScreenNumber());
- return 0;
+ return nullptr;
}
void *QXcbNativeInterface::rootWindow()
@@ -383,7 +383,7 @@ void *QXcbNativeInterface::rootWindow()
QXcbConnection *defaultConnection = integration->defaultConnection();
if (defaultConnection)
return reinterpret_cast<void *>(defaultConnection->rootWindow());
- return 0;
+ return nullptr;
}
void *QXcbNativeInterface::display()
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index e937464c62..698be45aa8 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -467,7 +467,7 @@ const xcb_visualtype_t *QXcbVirtualDesktop::visualForId(xcb_visualid_t visualid)
{
QMap<xcb_visualid_t, xcb_visualtype_t>::const_iterator it = m_visuals.find(visualid);
if (it == m_visuals.constEnd())
- return 0;
+ return nullptr;
return &*it;
}
@@ -587,7 +587,7 @@ QWindow *QXcbScreen::topLevelAt(const QPoint &p) const
do {
auto translate_reply = Q_XCB_REPLY_UNCHECKED(xcb_translate_coordinates, xcb_connection(), parent, child, x, y);
if (!translate_reply) {
- return 0;
+ return nullptr;
}
parent = child;
@@ -596,14 +596,14 @@ QWindow *QXcbScreen::topLevelAt(const QPoint &p) const
y = translate_reply->dst_y;
if (!child || child == root)
- return 0;
+ return nullptr;
QPlatformWindow *platformWindow = connection()->platformWindowFromId(child);
if (platformWindow)
return platformWindow->window();
} while (parent != child);
- return 0;
+ return nullptr;
}
void QXcbScreen::windowShown(QXcbWindow *window)
diff --git a/src/plugins/platforms/xcb/qxcbsessionmanager.cpp b/src/plugins/platforms/xcb/qxcbsessionmanager.cpp
index f880d4d722..2eb32c069e 100644
--- a/src/plugins/platforms/xcb/qxcbsessionmanager.cpp
+++ b/src/plugins/platforms/xcb/qxcbsessionmanager.cpp
@@ -69,7 +69,7 @@ public Q_SLOTS:
};
-static SmcConn smcConnection = 0;
+static SmcConn smcConnection = nullptr;
static bool sm_interactionActive;
static bool sm_smActive;
static int sm_interactStyle;
@@ -81,7 +81,7 @@ static bool sm_phase2;
static bool sm_in_phase2;
bool qt_sm_blockUserInput = false;
-static QSmSocketReceiver* sm_receiver = 0;
+static QSmSocketReceiver* sm_receiver = nullptr;
static void resetSmState();
static void sm_setProperty(const char *name, const char *type,
@@ -191,7 +191,7 @@ static void sm_performSaveYourself(QXcbSessionManager *sm)
// generate a new session key
timeval tv;
- gettimeofday(&tv, 0);
+ gettimeofday(&tv, nullptr);
sm->setSessionKey(QString::number(qulonglong(tv.tv_sec)) +
QLatin1Char('_') +
QString::number(qulonglong(tv.tv_usec)));
@@ -203,7 +203,7 @@ static void sm_performSaveYourself(QXcbSessionManager *sm)
// tell the session manager about our program in best POSIX style
sm_setProperty(QString::fromLatin1(SmProgram), argument0);
// tell the session manager about our user as well.
- struct passwd *entryPtr = 0;
+ struct passwd *entryPtr = nullptr;
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && (_POSIX_THREAD_SAFE_FUNCTIONS - 0 > 0)
QVarLengthArray<char, 1024> buf(qMax<long>(sysconf(_SC_GETPW_R_SIZE_MAX), 1024L));
struct passwd entry;
@@ -329,7 +329,7 @@ static void sm_saveYourselfPhase2Callback(SmcConn smcConn, SmPointer clientData)
void QSmSocketReceiver::socketActivated(int)
{
- IceProcessMessages(SmcGetIceConnection(smcConnection), 0, 0);
+ IceProcessMessages(SmcGetIceConnection(smcConnection), nullptr, nullptr);
}
@@ -337,11 +337,11 @@ void QSmSocketReceiver::socketActivated(int)
QXcbSessionManager::QXcbSessionManager(const QString &id, const QString &key)
: QPlatformSessionManager(id, key)
- , m_eventLoop(0)
+ , m_eventLoop(nullptr)
{
resetSmState();
char cerror[256];
- char* myId = 0;
+ char* myId = nullptr;
QByteArray b_id = id.toLatin1();
char* prevId = b_id.data();
@@ -359,7 +359,7 @@ QXcbSessionManager::QXcbSessionManager(const QString &id, const QString &key)
if (!qEnvironmentVariableIsSet("SESSION_MANAGER"))
return;
- smcConnection = SmcOpenConnection(0, 0, 1, 0,
+ smcConnection = SmcOpenConnection(nullptr, nullptr, 1, 0,
SmcSaveYourselfProcMask |
SmcDieProcMask |
SmcSaveCompleteProcMask |
@@ -382,8 +382,8 @@ QXcbSessionManager::QXcbSessionManager(const QString &id, const QString &key)
QXcbSessionManager::~QXcbSessionManager()
{
if (smcConnection)
- SmcCloseConnection(smcConnection, 0, 0);
- smcConnection = 0;
+ SmcCloseConnection(smcConnection, 0, nullptr);
+ smcConnection = nullptr;
delete sm_receiver;
}
@@ -411,7 +411,7 @@ bool QXcbSessionManager::allowsInteraction()
QEventLoop eventLoop;
m_eventLoop = &eventLoop;
eventLoop.exec();
- m_eventLoop = 0;
+ m_eventLoop = nullptr;
sm_waitingForInteraction = false;
if (sm_smActive) { // not cancelled
@@ -441,7 +441,7 @@ bool QXcbSessionManager::allowsErrorInteraction()
QEventLoop eventLoop;
m_eventLoop = &eventLoop;
eventLoop.exec();
- m_eventLoop = 0;
+ m_eventLoop = nullptr;
sm_waitingForInteraction = false;
if (sm_smActive) { // not cancelled
diff --git a/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp b/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp
index 684e603fab..ff5ad98cd2 100644
--- a/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp
+++ b/src/plugins/platforms/xcb/qxcbsystemtraytracker.cpp
@@ -64,11 +64,11 @@ QXcbSystemTrayTracker *QXcbSystemTrayTracker::create(QXcbConnection *connection)
// Selection, tray atoms for GNOME, NET WM Specification
const xcb_atom_t trayAtom = connection->atom(QXcbAtom::_NET_SYSTEM_TRAY_OPCODE);
if (!trayAtom)
- return 0;
+ return nullptr;
const QByteArray netSysTray = QByteArrayLiteral("_NET_SYSTEM_TRAY_S") + QByteArray::number(connection->primaryScreenNumber());
const xcb_atom_t selection = connection->internAtom(netSysTray.constData());
if (!selection)
- return 0;
+ return nullptr;
return new QXcbSystemTrayTracker(connection, trayAtom, selection);
}
diff --git a/src/plugins/platforms/xcb/qxcbvulkaninstance.cpp b/src/plugins/platforms/xcb/qxcbvulkaninstance.cpp
index b3f8a5832d..bb82bcec39 100644
--- a/src/plugins/platforms/xcb/qxcbvulkaninstance.cpp
+++ b/src/plugins/platforms/xcb/qxcbvulkaninstance.cpp
@@ -93,7 +93,7 @@ bool QXcbVulkanInstance::supportsPresent(VkPhysicalDevice physicalDevice,
VkSurfaceKHR QXcbVulkanInstance::createSurface(QXcbWindow *window)
{
- VkSurfaceKHR surface = 0;
+ VkSurfaceKHR surface = VK_NULL_HANDLE;
if (!m_createSurface) {
m_createSurface = reinterpret_cast<PFN_vkCreateXcbSurfaceKHR>(
diff --git a/src/plugins/platforms/xcb/qxcbvulkanwindow.cpp b/src/plugins/platforms/xcb/qxcbvulkanwindow.cpp
index 25bc340f97..a05ecab51d 100644
--- a/src/plugins/platforms/xcb/qxcbvulkanwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbvulkanwindow.cpp
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
QXcbVulkanWindow::QXcbVulkanWindow(QWindow *window)
: QXcbWindow(window),
- m_surface(0)
+ m_surface(VK_NULL_HANDLE)
{
}
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index cfe048d5c4..71ec47b053 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -67,9 +67,7 @@
#include <xcb/xcb_icccm.h>
#include <xcb/xfixes.h>
#include <xcb/shape.h>
-#if QT_CONFIG(xcb_xinput)
#include <xcb/xinput.h>
-#endif
#include <private/qguiapplication_p.h>
#include <private/qwindow_p.h>
@@ -176,13 +174,13 @@ static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s)
{
#include <X11/Xatom.h>
- static XTextProperty tp = { 0, 0, 0, 0 };
+ static XTextProperty tp = { nullptr, 0, 0, 0 };
static bool free_prop = true; // we can't free tp.value in case it references
// the data of the static QByteArray below.
if (tp.value) {
if (free_prop)
XFree(tp.value);
- tp.value = 0;
+ tp.value = nullptr;
free_prop = true;
}
@@ -193,7 +191,7 @@ static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s)
QByteArray mapped = mapper->fromUnicode(s);
char* tl[2];
tl[0] = mapped.data();
- tl[1] = 0;
+ tl[1] = nullptr;
errCode = XmbTextListToTextProperty(dpy, tl, 1, XStdICCTextStyle, &tp);
if (errCode < 0)
qCDebug(lcQpaXcb, "XmbTextListToTextProperty result code %d", errCode);
@@ -282,7 +280,7 @@ void QXcbWindow::create()
m_window = platformScreen->root();
m_depth = platformScreen->screen()->root_depth;
m_visualId = platformScreen->screen()->root_visual;
- const xcb_visualtype_t *visual = 0;
+ const xcb_visualtype_t *visual = nullptr;
if (connection()->hasDefaultVisualId()) {
visual = platformScreen->visualForId(connection()->defaultVisualId());
if (visual)
@@ -492,14 +490,12 @@ void QXcbWindow::create()
atom(QXcbAtom::_XEMBED_INFO),
32, 2, (void *)data);
-#if QT_CONFIG(xcb_xinput)
if (connection()->hasXInput2()) {
if (connection()->xi2MouseEventsDisabled())
connection()->xi2SelectDeviceEventsCompatibility(m_window);
else
connection()->xi2SelectDeviceEvents(m_window);
}
-#endif
setWindowState(window()->windowStates());
setWindowFlags(window()->flags());
@@ -823,7 +819,7 @@ bool QXcbWindow::relayFocusToModalWindow() const
while (w && w->parent())
w = w->parent();
- QWindow *modalWindow = 0;
+ QWindow *modalWindow = nullptr;
const bool blocked = QGuiApplicationPrivate::instance()->isWindowBlocked(w, &modalWindow);
if (blocked && modalWindow != w) {
modalWindow->requestActivate();
@@ -880,7 +876,7 @@ enum {
QXcbWindow::NetWmStates QXcbWindow::netWmStates()
{
- NetWmStates result(0);
+ NetWmStates result;
auto reply = Q_XCB_REPLY_UNCHECKED(xcb_get_property, xcb_connection(),
0, m_window, atom(QXcbAtom::_NET_WM_STATE),
@@ -931,10 +927,10 @@ void QXcbWindow::setWindowFlags(Qt::WindowFlags flags)
xcb_change_window_attributes(xcb_connection(), xcb_window(), mask, values);
- QXcbWindowFunctions::WmWindowTypes wmWindowTypes = 0;
+ QXcbWindowFunctions::WmWindowTypes wmWindowTypes;
if (window()->dynamicPropertyNames().contains(wm_window_type_property_id)) {
wmWindowTypes = static_cast<QXcbWindowFunctions::WmWindowTypes>(
- window()->property(wm_window_type_property_id).value<int>());
+ qvariant_cast<int>(window()->property(wm_window_type_property_id)));
}
setWmWindowType(wmWindowTypes, flags);
@@ -1067,7 +1063,7 @@ void QXcbWindow::setNetWmStateOnUnmappedWindow()
if (Q_UNLIKELY(m_mapped))
qCWarning(lcQpaXcb()) << "internal error: " << Q_FUNC_INFO << "called on mapped window";
- NetWmStates states(0);
+ NetWmStates states;
const Qt::WindowFlags flags = window()->flags();
if (flags & Qt::WindowStaysOnTopHint) {
states |= NetWmStateAbove;
@@ -1197,7 +1193,7 @@ void QXcbWindow::updateNetWmUserTime(xcb_timestamp_t timestamp)
XCB_WINDOW_CLASS_INPUT_OUTPUT, // window class
m_visualId, // visual
0, // value mask
- 0); // value list
+ nullptr); // value list
wid = m_netWmUserTimeWindow;
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);
@@ -1227,7 +1223,7 @@ void QXcbWindow::setTransparentForMouseEvents(bool transparent)
xcb_rectangle_t rectangle;
- xcb_rectangle_t *rect = 0;
+ xcb_rectangle_t *rect = nullptr;
int nrect = 0;
if (!transparent) {
@@ -1483,7 +1479,7 @@ uint QXcbWindow::visualIdStatic(QWindow *window)
QXcbWindowFunctions::WmWindowTypes QXcbWindow::wmWindowTypes() const
{
- QXcbWindowFunctions::WmWindowTypes result(0);
+ QXcbWindowFunctions::WmWindowTypes result;
auto reply = Q_XCB_REPLY_UNCHECKED(xcb_get_property, xcb_connection(),
0, m_window, atom(QXcbAtom::_NET_WM_WINDOW_TYPE),
@@ -1891,7 +1887,7 @@ void QXcbWindow::handleButtonPressEvent(int event_x, int event_y, int root_x, in
if (m_embedded && !m_trayIconWindow) {
if (window() != QGuiApplication::focusWindow()) {
const QXcbWindow *container = static_cast<const QXcbWindow *>(parent());
- Q_ASSERT(container != 0);
+ Q_ASSERT(container != nullptr);
sendXEmbedMessage(container->xcb_window(), XEMBED_REQUEST_FOCUS);
}
@@ -1900,9 +1896,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(xcb_xinput)
if (!connection()->isAtLeastXI21()) {
-#endif
QPoint angleDelta;
if (detail == 4)
angleDelta.setY(120);
@@ -1915,9 +1909,7 @@ void QXcbWindow::handleButtonPressEvent(int event_x, int event_y, int root_x, in
if (modifiers & Qt::AltModifier)
angleDelta = angleDelta.transposed();
QWindowSystemInterface::handleWheelEvent(window(), timestamp, local, global, QPoint(), angleDelta, modifiers);
-#if QT_CONFIG(xcb_xinput)
}
-#endif
return;
}
@@ -1953,13 +1945,8 @@ static inline bool doCheckUnGrabAncestor(QXcbConnection *conn)
* not pressed, otherwise (e.g. on Alt+Tab) it can igonre important enter/leave events.
*/
if (conn) {
-
const bool mouseButtonsPressed = (conn->buttonState() != Qt::NoButton);
-#if QT_CONFIG(xcb_xinput)
return mouseButtonsPressed || (conn->hasXInput2() && !conn->xi2MouseEventsDisabled());
-#else
- return mouseButtonsPressed;
-#endif
}
return true;
}
@@ -1991,10 +1978,9 @@ void QXcbWindow::handleEnterNotifyEvent(int event_x, int event_y, int root_x, in
if (ignoreEnterEvent(mode, detail, connection()) || connection()->mousePressWindow())
return;
-#if QT_CONFIG(xcb_xinput)
+
// Updates scroll valuators, as user might have done some scrolling outside our X client.
connection()->xi2UpdateScrollingDevices();
-#endif
const QPoint local(event_x, event_y);
QWindowSystemInterface::handleEnterEvent(window(), local, global);
@@ -2069,7 +2055,6 @@ void QXcbWindow::handleMotionNotifyEvent(const xcb_motion_notify_event_t *event)
event->time, QEvent::MouseMove);
}
-#if QT_CONFIG(xcb_xinput)
static inline int fixed1616ToInt(xcb_input_fp1616_t val)
{
return int(qreal(val) / 0x10000);
@@ -2107,7 +2092,7 @@ void QXcbWindow::handleXIMouseEvent(xcb_ge_event_t *event, Qt::MouseEventSource
const Qt::MouseButton button = conn->xiToQtMouseButton(ev->detail);
- const char *sourceName = 0;
+ const char *sourceName = nullptr;
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled())) {
const QMetaObject *metaObject = qt_getEnumMetaObject(source);
const QMetaEnum me = metaObject->enumerator(metaObject->indexOfEnumerator(qt_getEnumName(source)));
@@ -2170,13 +2155,13 @@ void QXcbWindow::handleXIEnterLeave(xcb_ge_event_t *event)
break;
}
}
-#endif
QXcbWindow *QXcbWindow::toWindow() { return this; }
void QXcbWindow::handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global,
Qt::KeyboardModifiers modifiers, QEvent::Type type, Qt::MouseEventSource source)
{
+ m_lastPointerPosition = local;
connection()->setTime(time);
Qt::MouseButton button = type == QEvent::MouseMove ? Qt::NoButton : connection()->button();
QWindowSystemInterface::handleMouseEvent(window(), time, local, global,
@@ -2306,14 +2291,12 @@ bool QXcbWindow::setMouseGrabEnabled(bool grab)
if (grab && !connection()->canGrab())
return false;
-#if QT_CONFIG(xcb_xinput)
if (connection()->hasXInput2() && !connection()->xi2MouseEventsDisabled()) {
bool result = connection()->xi2SetMouseGrabEnabled(m_window, grab);
if (grab && result)
connection()->setMouseGrabber(this);
return result;
}
-#endif
if (!grab) {
xcb_ungrab_pointer(xcb_connection(), XCB_TIME_CURRENT_TIME);
@@ -2363,47 +2346,65 @@ bool QXcbWindow::windowEvent(QEvent *event)
return QPlatformWindow::windowEvent(event);
}
-bool QXcbWindow::startSystemResize(const QPoint &pos, Qt::Corner corner)
+bool QXcbWindow::startSystemResize(Qt::Edges edges)
{
- return startSystemMoveResize(pos, corner);
+ return startSystemMoveResize(m_lastPointerPosition, edges);
}
-bool QXcbWindow::startSystemMove(const QPoint &pos)
+bool QXcbWindow::startSystemMove()
{
- return startSystemMoveResize(pos, 4);
+ return startSystemMoveResize(m_lastPointerPosition, 16);
}
-bool QXcbWindow::startSystemMoveResize(const QPoint &pos, int corner)
+bool QXcbWindow::startSystemMoveResize(const QPoint &pos, int edges)
{
- return false; // ### FIXME QTBUG-69716
const xcb_atom_t moveResize = connection()->atom(QXcbAtom::_NET_WM_MOVERESIZE);
if (!connection()->wmSupport()->isSupportedByWM(moveResize))
return false;
- const QPoint globalPos = QHighDpi::toNativePixels(window()->mapToGlobal(pos), window()->screen());
-#if QT_CONFIG(xcb_xinput)
// ### FIXME QTBUG-53389
- bool startedByTouch = connection()->startSystemMoveResizeForTouchBegin(m_window, globalPos, corner);
+ bool startedByTouch = connection()->startSystemMoveResizeForTouch(m_window, edges);
if (startedByTouch) {
- if (connection()->isUnity() || connection()->isGnome()) {
- // These desktops fail to move/resize via _NET_WM_MOVERESIZE (WM bug?).
+ if (connection()->isUnity()) {
+ // Unity fails to move/resize via _NET_WM_MOVERESIZE (WM bug?).
connection()->abortSystemMoveResizeForTouch();
return false;
}
- // KWin, Openbox, AwesomeWM have been tested to work with _NET_WM_MOVERESIZE.
- } else
-#endif
- { // Started by mouse press.
+ // KWin, Openbox, AwesomeWM and Gnome have been tested to work with _NET_WM_MOVERESIZE.
+ } else { // Started by mouse press.
if (connection()->isUnity())
return false; // _NET_WM_MOVERESIZE on this WM is bouncy (WM bug?).
- doStartSystemMoveResize(globalPos, corner);
+ doStartSystemMoveResize(mapToGlobal(pos), edges);
}
return true;
}
-void QXcbWindow::doStartSystemMoveResize(const QPoint &globalPos, int corner)
+static uint qtEdgesToXcbMoveResizeDirection(Qt::Edges edges)
+{
+ if (edges == (Qt::TopEdge | Qt::LeftEdge))
+ return 0;
+ if (edges == Qt::TopEdge)
+ return 1;
+ if (edges == (Qt::TopEdge | Qt::RightEdge))
+ return 2;
+ if (edges == Qt::RightEdge)
+ return 3;
+ if (edges == (Qt::RightEdge | Qt::BottomEdge))
+ return 4;
+ if (edges == Qt::BottomEdge)
+ return 5;
+ if (edges == (Qt::BottomEdge | Qt::LeftEdge))
+ return 6;
+ if (edges == Qt::LeftEdge)
+ return 7;
+
+ qWarning() << "Cannot convert " << edges << "to _NET_WM_MOVERESIZE direction.";
+ return 0;
+}
+
+void QXcbWindow::doStartSystemMoveResize(const QPoint &globalPos, int edges)
{
const xcb_atom_t moveResize = connection()->atom(QXcbAtom::_NET_WM_MOVERESIZE);
xcb_client_message_event_t xev;
@@ -2414,16 +2415,10 @@ void QXcbWindow::doStartSystemMoveResize(const QPoint &globalPos, int corner)
xev.format = 32;
xev.data.data32[0] = globalPos.x();
xev.data.data32[1] = globalPos.y();
- if (corner == 4) {
+ if (edges == 16)
xev.data.data32[2] = 8; // move
- } else {
- const bool bottom = corner == Qt::BottomRightCorner || corner == Qt::BottomLeftCorner;
- const bool left = corner == Qt::BottomLeftCorner || corner == Qt::TopLeftCorner;
- if (bottom)
- xev.data.data32[2] = left ? 6 : 4; // bottomleft/bottomright
- else
- xev.data.data32[2] = left ? 0 : 2; // topleft/topright
- }
+ else
+ xev.data.data32[2] = qtEdgesToXcbMoveResizeDirection(Qt::Edges(edges));
xev.data.data32[3] = XCB_BUTTON_INDEX_1;
xev.data.data32[4] = 0;
xcb_ungrab_pointer(connection()->xcb_connection(), XCB_CURRENT_TIME);
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index a808437c5a..d6f370eebe 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -107,8 +107,8 @@ public:
bool windowEvent(QEvent *event) override;
- bool startSystemResize(const QPoint &pos, Qt::Corner corner) override;
- bool startSystemMove(const QPoint &pos) override;
+ bool startSystemResize(Qt::Edges edges) override;
+ bool startSystemMove() override;
void setOpacity(qreal level) override;
void setMask(const QRegion &region) override;
@@ -137,10 +137,8 @@ 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(xcb_xinput)
void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized) override;
void handleXIEnterLeave(xcb_ge_event_t *) override;
-#endif
QXcbWindow *toWindow() override;
@@ -170,8 +168,8 @@ public:
QXcbScreen *xcbScreen() const;
- bool startSystemMoveResize(const QPoint &pos, int corner);
- void doStartSystemMoveResize(const QPoint &globalPos, int corner);
+ bool startSystemMoveResize(const QPoint &pos, int edges);
+ void doStartSystemMoveResize(const QPoint &globalPos, int edges);
static bool isTrayIconWindow(QWindow *window)
{
@@ -266,6 +264,7 @@ protected:
QRegion m_exposeRegion;
QSize m_oldWindowSize;
+ QPoint m_lastPointerPosition;
xcb_visualid_t m_visualId = 0;
// Last sent state. Initialized to an invalid state, on purpose.
diff --git a/src/plugins/platforms/xcb/qxcbxsettings.cpp b/src/plugins/platforms/xcb/qxcbxsettings.cpp
index 88f15e344f..902f196ba9 100644
--- a/src/plugins/platforms/xcb/qxcbxsettings.cpp
+++ b/src/plugins/platforms/xcb/qxcbxsettings.cpp
@@ -256,7 +256,7 @@ QXcbXSettings::QXcbXSettings(QXcbVirtualDesktop *screen)
QXcbXSettings::~QXcbXSettings()
{
delete d_ptr;
- d_ptr = 0;
+ d_ptr = nullptr;
}
bool QXcbXSettings::initialized() const
diff --git a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
deleted file mode 100644
index 078b275381..0000000000
--- a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# 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-xinput
-#
-CONFIG += static
-
-XCB_DIR = $$QT_SOURCE_TREE/src/3rdparty/xcb
-
-MODULE_INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude
-INCLUDEPATH += $$XCB_DIR/include/xcb
-
-QMAKE_USE += xcb/nolink
-
-# ignore compiler warnings in 3rdparty code
-QMAKE_CFLAGS_STATIC_LIB+=-w
-
-#
-# libxcb
-#
-LIBXCB_DIR = $$XCB_DIR/libxcb
-
-SOURCES += \
- $$LIBXCB_DIR/xfixes.c \
- $$LIBXCB_DIR/randr.c \
- $$LIBXCB_DIR/shm.c \
- $$LIBXCB_DIR/sync.c \
- $$LIBXCB_DIR/render.c \
- $$LIBXCB_DIR/shape.c \
- $$LIBXCB_DIR/xkb.c \
- $$LIBXCB_DIR/xinerama.c \
- $$LIBXCB_DIR/xinput.c
-
-#
-# xcb-util
-#
-XCB_UTIL_DIR = $$XCB_DIR/xcb-util
-
-
-SOURCES += \
- $$XCB_UTIL_DIR/xcb_aux.c \
- $$XCB_UTIL_DIR/atoms.c \
- $$XCB_UTIL_DIR/event.c
-
-#
-# xcb-util-image
-#
-XCB_IMAGE_DIR = $$XCB_DIR/xcb-util-image
-
-SOURCES += $$XCB_IMAGE_DIR/xcb_image.c
-
-#
-# xcb-util-keysyms
-#
-XCB_KEYSYMS_DIR = $$XCB_DIR/xcb-util-keysyms
-
-SOURCES += $$XCB_KEYSYMS_DIR/keysyms.c
-
-#
-# xcb-util-renderutil
-#
-
-XCB_RENDERUTIL_DIR = $$XCB_DIR/xcb-util-renderutil
-
-SOURCES += $$XCB_RENDERUTIL_DIR/util.c
-
-#
-# xcb-util-wm
-#
-XCB_WM_DIR = $$XCB_DIR/xcb-util-wm
-
-SOURCES += \
- $$XCB_WM_DIR/icccm.c
-
-OTHER_FILES = $$XCB_DIR/README
-
-TR_EXCLUDE += $$XCB_DIR/*
-
-load(qt_helper_lib)
diff --git a/src/plugins/platforms/xcb/xcb.pro b/src/plugins/platforms/xcb/xcb.pro
index 0d27645a60..1c43c5ca04 100644
--- a/src/plugins/platforms/xcb/xcb.pro
+++ b/src/plugins/platforms/xcb/xcb.pro
@@ -2,8 +2,6 @@ TEMPLATE = subdirs
CONFIG += ordered
QT_FOR_CONFIG += gui-private
-!qtConfig(system-xcb): SUBDIRS += xcb-static
-
SUBDIRS += xcb_qpa_lib.pro
SUBDIRS += xcb-plugin.pro
SUBDIRS += gl_integrations
diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
index 34c671c8c7..a5d05faa9c 100644
--- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro
+++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
@@ -35,6 +35,7 @@ SOURCES = \
qxcbeventdispatcher.cpp \
qxcbconnection_basic.cpp \
qxcbconnection_screens.cpp \
+ qxcbconnection_xi2.cpp \
qxcbatom.cpp
HEADERS = \
@@ -71,10 +72,6 @@ qtConfig(xcb-xlib) {
QMAKE_USE += xcb_xlib
}
-qtConfig(xcb-xinput) {
- SOURCES += qxcbconnection_xi2.cpp
-}
-
qtConfig(xcb-sm) {
QMAKE_USE += x11sm
SOURCES += qxcbsessionmanager.cpp
@@ -94,20 +91,19 @@ qtConfig(vulkan) {
qxcbvulkanwindow.h
}
-!qtConfig(system-xcb) {
- QMAKE_USE += xcb-static
-} else {
- qtConfig(xcb-xinput): QMAKE_USE += xcb_xinput
- QMAKE_USE += \
- xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil \
- xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama
-}
-QMAKE_USE += xcb
+QMAKE_USE += \
+ xcb xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render xcb_renderutil \
+ xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xkbcommon xkbcommon_x11
-QMAKE_USE += xkbcommon
-qtConfig(xkb) {
- QMAKE_USE += xkbcommon_x11
- qtConfig(system-xcb): QMAKE_USE += xcb_xkb
+qtConfig(system-xcb-xinput) {
+ QMAKE_USE += xcb_xinput
+} else {
+ # Use bundled xcb-xinput sources.
+ XCB_DIR = $$QT_SOURCE_TREE/src/3rdparty/xcb
+ INCLUDEPATH += $$XCB_DIR/include/
+ SOURCES += $$XCB_DIR/libxcb/xinput.c
+ # Ignore compiler warnings in 3rdparty C code.
+ QMAKE_CFLAGS+=-w
}
qtConfig(dlopen): QMAKE_USE += libdl
diff --git a/src/plugins/platformthemes/gtk3/main.cpp b/src/plugins/platformthemes/gtk3/main.cpp
index fb1c425d8e..860fc3a26e 100644
--- a/src/plugins/platformthemes/gtk3/main.cpp
+++ b/src/plugins/platformthemes/gtk3/main.cpp
@@ -57,7 +57,7 @@ QPlatformTheme *QGtk3ThemePlugin::create(const QString &key, const QStringList &
if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive))
return new QGtk3Theme;
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
index c64a02fa0c..65564b59a1 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
+++ b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
@@ -165,12 +165,12 @@ void QGtk3Dialog::onResponse(QGtk3Dialog *dialog, int response)
void QGtk3Dialog::onParentWindowDestroyed()
{
// The QGtk3*DialogHelper classes own this object. Make sure the parent doesn't delete it.
- setParent(0);
+ setParent(nullptr);
}
QGtk3ColorDialogHelper::QGtk3ColorDialogHelper()
{
- d.reset(new QGtk3Dialog(gtk_color_chooser_dialog_new("", 0)));
+ d.reset(new QGtk3Dialog(gtk_color_chooser_dialog_new("", nullptr)));
connect(d.data(), SIGNAL(accept()), this, SLOT(onAccepted()));
connect(d.data(), SIGNAL(reject()), this, SIGNAL(reject()));
@@ -238,7 +238,7 @@ void QGtk3ColorDialogHelper::applyOptions()
QGtk3FileDialogHelper::QGtk3FileDialogHelper()
{
- d.reset(new QGtk3Dialog(gtk_file_chooser_dialog_new("", 0,
+ d.reset(new QGtk3Dialog(gtk_file_chooser_dialog_new("", nullptr,
GTK_FILE_CHOOSER_ACTION_OPEN,
qUtf8Printable(QGtk3Theme::defaultStandardButtonText(QPlatformDialogHelper::Cancel)), GTK_RESPONSE_CANCEL,
qUtf8Printable(QGtk3Theme::defaultStandardButtonText(QPlatformDialogHelper::Ok)), GTK_RESPONSE_OK,
@@ -497,7 +497,7 @@ void QGtk3FileDialogHelper::setNameFilters(const QStringList &filters)
QGtk3FontDialogHelper::QGtk3FontDialogHelper()
{
- d.reset(new QGtk3Dialog(gtk_font_chooser_dialog_new("", 0)));
+ d.reset(new QGtk3Dialog(gtk_font_chooser_dialog_new("", nullptr)));
connect(d.data(), SIGNAL(accept()), this, SLOT(onAccepted()));
connect(d.data(), SIGNAL(reject()), this, SIGNAL(reject()));
diff --git a/src/plugins/platformthemes/gtk3/qgtk3menu.cpp b/src/plugins/platformthemes/gtk3/qgtk3menu.cpp
index 4f0bd9d9a0..d9d117faeb 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3menu.cpp
+++ b/src/plugins/platformthemes/gtk3/qgtk3menu.cpp
@@ -200,7 +200,7 @@ void QGtk3MenuItem::setMenu(QPlatformMenu *menu)
{
m_menu = qobject_cast<QGtk3Menu *>(menu);
if (GTK_IS_MENU_ITEM(m_item))
- gtk_menu_item_set_submenu(GTK_MENU_ITEM(m_item), m_menu ? m_menu->handle() : NULL);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(m_item), m_menu ? m_menu->handle() : nullptr);
}
bool QGtk3MenuItem::isVisible() const
@@ -436,7 +436,7 @@ void QGtk3Menu::showPopup(const QWindow *parentWindow, const QRect &targetRect,
if (pw)
m_targetPos = pw->mapToGlobal(m_targetPos);
- gtk_menu_popup(GTK_MENU(m_menu), NULL, NULL, qt_gtk_menu_position_func, this, 0, gtk_get_current_event_time());
+ gtk_menu_popup(GTK_MENU(m_menu), nullptr, nullptr, qt_gtk_menu_position_func, this, 0, gtk_get_current_event_time());
}
void QGtk3Menu::dismiss()
diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
index 077955eb4e..93520344f8 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
+++ b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
@@ -86,9 +86,9 @@ QGtk3Theme::QGtk3Theme()
{
// gtk_init will reset the Xlib error handler, and that causes
// Qt applications to quit on X errors. Therefore, we need to manually restore it.
- int (*oldErrorHandler)(Display *, XErrorEvent *) = XSetErrorHandler(NULL);
+ int (*oldErrorHandler)(Display *, XErrorEvent *) = XSetErrorHandler(nullptr);
- gtk_init(0, 0);
+ gtk_init(nullptr, nullptr);
XSetErrorHandler(oldErrorHandler);
@@ -99,7 +99,7 @@ QGtk3Theme::QGtk3Theme()
g_type_ensure(PANGO_TYPE_FONT_FACE);
/* Use our custom log handler. */
- g_log_set_handler("Gtk", G_LOG_LEVEL_MESSAGE, gtkMessageHandler, NULL);
+ g_log_set_handler("Gtk", G_LOG_LEVEL_MESSAGE, gtkMessageHandler, nullptr);
}
static inline QVariant gtkGetLongPressTime()
@@ -173,7 +173,7 @@ QPlatformDialogHelper *QGtk3Theme::createPlatformDialogHelper(DialogType type) c
case FontDialog:
return new QGtk3FontDialogHelper;
default:
- return 0;
+ return nullptr;
}
}
@@ -197,7 +197,7 @@ bool QGtk3Theme::useNativeFileDialog()
* dialogs entirely since we can't avoid creation of a platform
* dialog helper.
*/
- return gtk_check_version(3, 15, 5) == 0;
+ return gtk_check_version(3, 15, 5) == nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
index 5cfc4df0d0..d38b3ddda3 100644
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
@@ -72,7 +72,7 @@ public:
QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
QIcon fileIcon(const QFileInfo &fileInfo,
- QPlatformTheme::IconOptions iconOptions = nullptr) const override;
+ QPlatformTheme::IconOptions iconOptions = { }) const override;
QIconEngine *createIconEngine(const QString &iconName) const override;
diff --git a/src/plugins/printsupport/cups/qcupsprintengine.cpp b/src/plugins/printsupport/cups/qcupsprintengine.cpp
index c9683eb99d..43d5e119ad 100644
--- a/src/plugins/printsupport/cups/qcupsprintengine.cpp
+++ b/src/plugins/printsupport/cups/qcupsprintengine.cpp
@@ -100,10 +100,10 @@ void QCupsPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &v
d->cupsOptions = value.toStringList();
break;
case PPK_QPageSize:
- d->setPageSize(value.value<QPageSize>());
+ d->setPageSize(qvariant_cast<QPageSize>(value));
break;
case PPK_QPageLayout: {
- QPageLayout pageLayout = value.value<QPageLayout>();
+ QPageLayout pageLayout = qvariant_cast<QPageLayout>(value);
if (pageLayout.isValid() && (d->m_printDevice.isValidPageLayout(pageLayout, d->resolution)
|| d->m_printDevice.supportsCustomPageSizes()
|| d->m_printDevice.supportedPageSizes().isEmpty())) {
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
index cd20eef1df..28ccbeadcd 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -72,7 +72,9 @@
{ "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": false },
{ "type": "mysqlConfig", "query": "--libs", "cleanlibs": false },
{ "libs": "-lmysqlclient_r", "condition": "!config.win32" },
+ { "libs": "-llibmariadb", "condition": "config.win32" },
{ "libs": "-llibmysql", "condition": "config.win32" },
+ { "libs": "-lmariadb", "condition": "!config.win32" },
{ "libs": "-lmysqlclient", "condition": "!config.win32" }
]
},
diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
index 3368c74373..ffbc56829b 100644
--- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
+++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
@@ -730,7 +730,7 @@ static char* createArrayBuffer(char *buffer, const QList<QVariant> &list,
if (curDim != dim) {
for(i = 0; i < list.size(); ++i) {
- if (list.at(i).type() != QVariant::List) { // dimensions mismatch
+ if (list.at(i).userType() != QVariant::List) { // dimensions mismatch
error = QLatin1String("Array dimensons mismatch. Fieldname: %1");
return 0;
}
@@ -1162,7 +1162,7 @@ bool QIBaseResult::gotoNext(QSqlCachedResult::ValueCache& row, int rowIdx)
// null value
QVariant v;
v.convert(qIBaseTypeName2(d->sqlda->sqlvar[i].sqltype, d->sqlda->sqlvar[i].sqlscale < 0));
- if(v.type() == QVariant::Double) {
+ if (v.userType() == QVariant::Double) {
switch(numericalPrecisionPolicy()) {
case QSql::LowPrecisionInt32:
v.convert(QVariant::Int);
@@ -1914,7 +1914,12 @@ void QIBaseDriver::qHandleEventNotification(void *updatedResultBuffer)
if (counts[0]) {
if (eBuffer->subscriptionState == QIBaseEventBuffer::Subscribed) {
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
emit notification(i.key());
+QT_WARNING_POP
+#endif
emit notification(i.key(), QSqlDriver::UnknownSource, QVariant());
}
else if (eBuffer->subscriptionState == QIBaseEventBuffer::Starting)
diff --git a/src/plugins/sqldrivers/mysql/main.cpp b/src/plugins/sqldrivers/mysql/main.cpp
index d8d70483ef..4c6753097f 100644
--- a/src/plugins/sqldrivers/mysql/main.cpp
+++ b/src/plugins/sqldrivers/mysql/main.cpp
@@ -61,7 +61,9 @@ QMYSQLDriverPlugin::QMYSQLDriverPlugin()
QSqlDriver* QMYSQLDriverPlugin::create(const QString &name)
{
- if (name == QLatin1String("QMYSQL") || name == QLatin1String("QMYSQL3")) {
+ if (name == QLatin1String("QMYSQL") ||
+ name == QLatin1String("QMYSQL3") ||
+ name == QLatin1String("QMARIADB")) {
QMYSQLDriver* driver = new QMYSQLDriver();
return driver;
}
diff --git a/src/plugins/sqldrivers/mysql/mysql.json b/src/plugins/sqldrivers/mysql/mysql.json
index 0caaadb7ce..89f5e65fb9 100644
--- a/src/plugins/sqldrivers/mysql/mysql.json
+++ b/src/plugins/sqldrivers/mysql/mysql.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "QMYSQL3", "QMYSQL" ]
+ "Keys": [ "QMYSQL3", "QMYSQL", "QMARIADB" ]
}
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
index febbe58506..90a810d516 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
@@ -65,16 +65,7 @@
Q_DECLARE_METATYPE(MYSQL_RES*)
Q_DECLARE_METATYPE(MYSQL*)
-
-#if MYSQL_VERSION_ID >= 40108
Q_DECLARE_METATYPE(MYSQL_STMT*)
-#endif
-
-#if MYSQL_VERSION_ID >= 40100
-# define Q_CLIENT_MULTI_STATEMENTS CLIENT_MULTI_STATEMENTS
-#else
-# define Q_CLIENT_MULTI_STATEMENTS 0
-#endif
// MySQL above version 8 removed my_bool typedef while MariaDB kept it,
// by redefining it we can regain source compatibility.
@@ -199,10 +190,8 @@ protected:
bool nextResult() override;
void detachFromResultSet() override;
-#if MYSQL_VERSION_ID >= 40108
bool prepare(const QString &stmt) override;
bool exec() override;
-#endif
};
class QMYSQLResultPrivate: public QSqlResultPrivate
@@ -217,9 +206,7 @@ public:
result(0),
rowsAffected(0),
hasBlobs(false)
-#if MYSQL_VERSION_ID >= 40108
, stmt(0), meta(0), inBinds(0), outBinds(0)
-#endif
, preparedQuery(false)
{ }
@@ -236,24 +223,22 @@ public:
{
QMyField()
: outField(0), nullIndicator(false), bufLength(0ul),
- myField(0), type(QVariant::Invalid)
+ myField(0), type(QMetaType::UnknownType)
{}
char *outField;
my_bool nullIndicator;
ulong bufLength;
MYSQL_FIELD *myField;
- QVariant::Type type;
+ QMetaType::Type type;
};
QVector<QMyField> fields;
-#if MYSQL_VERSION_ID >= 40108
MYSQL_STMT* stmt;
MYSQL_RES* meta;
MYSQL_BIND *inBinds;
MYSQL_BIND *outBinds;
-#endif
bool preparedQuery;
};
@@ -261,11 +246,9 @@ public:
#if QT_CONFIG(textcodec)
static QTextCodec* codec(MYSQL* mysql)
{
-#if MYSQL_VERSION_ID >= 32321
QTextCodec* heuristicCodec = QTextCodec::codecForName(mysql_character_set_name(mysql));
if (heuristicCodec)
return heuristicCodec;
-#endif
return QTextCodec::codecForLocale();
}
#endif // textcodec
@@ -280,25 +263,25 @@ static QSqlError qMakeError(const QString& err, QSqlError::ErrorType type,
}
-static QVariant::Type qDecodeMYSQLType(int mysqltype, uint flags)
+static QMetaType::Type qDecodeMYSQLType(int mysqltype, uint flags)
{
- QVariant::Type type;
+ QMetaType::Type type;
switch (mysqltype) {
case FIELD_TYPE_TINY :
- type = static_cast<QVariant::Type>((flags & UNSIGNED_FLAG) ? QMetaType::UChar : QMetaType::Char);
+ type = (flags & UNSIGNED_FLAG) ? QMetaType::UChar : QMetaType::Char;
break;
case FIELD_TYPE_SHORT :
- type = static_cast<QVariant::Type>((flags & UNSIGNED_FLAG) ? QMetaType::UShort : QMetaType::Short);
+ type = (flags & UNSIGNED_FLAG) ? QMetaType::UShort : QMetaType::Short;
break;
case FIELD_TYPE_LONG :
case FIELD_TYPE_INT24 :
- type = (flags & UNSIGNED_FLAG) ? QVariant::UInt : QVariant::Int;
+ type = (flags & UNSIGNED_FLAG) ? QMetaType::UInt : QMetaType::Int;
break;
case FIELD_TYPE_YEAR :
- type = QVariant::Int;
+ type = QMetaType::Int;
break;
case FIELD_TYPE_LONGLONG :
- type = (flags & UNSIGNED_FLAG) ? QVariant::ULongLong : QVariant::LongLong;
+ type = (flags & UNSIGNED_FLAG) ? QMetaType::ULongLong : QMetaType::LongLong;
break;
case FIELD_TYPE_FLOAT :
case FIELD_TYPE_DOUBLE :
@@ -306,19 +289,19 @@ static QVariant::Type qDecodeMYSQLType(int mysqltype, uint flags)
#if defined(FIELD_TYPE_NEWDECIMAL)
case FIELD_TYPE_NEWDECIMAL:
#endif
- type = QVariant::Double;
+ type = QMetaType::Double;
break;
case FIELD_TYPE_DATE :
- type = QVariant::Date;
+ type = QMetaType::QDate;
break;
case FIELD_TYPE_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;
+ type = QMetaType::QString;
break;
case FIELD_TYPE_DATETIME :
case FIELD_TYPE_TIMESTAMP :
- type = QVariant::DateTime;
+ type = QMetaType::QDateTime;
break;
case FIELD_TYPE_STRING :
case FIELD_TYPE_VAR_STRING :
@@ -326,12 +309,12 @@ static QVariant::Type qDecodeMYSQLType(int mysqltype, uint flags)
case FIELD_TYPE_TINY_BLOB :
case FIELD_TYPE_MEDIUM_BLOB :
case FIELD_TYPE_LONG_BLOB :
- type = (flags & BINARY_FLAG) ? QVariant::ByteArray : QVariant::String;
+ type = (flags & BINARY_FLAG) ? QMetaType::QByteArray : QMetaType::QString;
break;
default:
case FIELD_TYPE_ENUM :
case FIELD_TYPE_SET :
- type = QVariant::String;
+ type = QMetaType::QString;
break;
}
return type;
@@ -340,7 +323,7 @@ static QVariant::Type qDecodeMYSQLType(int mysqltype, uint flags)
static QSqlField qToField(MYSQL_FIELD *field, QTextCodec *tc)
{
QSqlField f(toUnicode(tc, field->name),
- qDecodeMYSQLType(int(field->type), field->flags),
+ QVariant::Type(qDecodeMYSQLType(int(field->type), field->flags)),
toUnicode(tc, field->table));
f.setRequired(IS_NOT_NULL(field->flags));
f.setLength(field->length);
@@ -350,8 +333,6 @@ static QSqlField qToField(MYSQL_FIELD *field, QTextCodec *tc)
return f;
}
-#if MYSQL_VERSION_ID >= 40108
-
static QSqlError qMakeStmtError(const QString& err, QSqlError::ErrorType type,
MYSQL_STMT* stmt)
{
@@ -445,7 +426,6 @@ bool QMYSQLResultPrivate::bindInValues()
}
return true;
}
-#endif
QMYSQLResult::QMYSQLResult(const QMYSQLDriver* db)
: QSqlResult(*new QMYSQLResultPrivate(this, db))
@@ -460,11 +440,9 @@ QMYSQLResult::~QMYSQLResult()
QVariant QMYSQLResult::handle() const
{
Q_D(const QMYSQLResult);
-#if MYSQL_VERSION_ID >= 40108
if(d->preparedQuery)
return d->meta ? QVariant::fromValue(d->meta) : QVariant::fromValue(d->stmt);
else
-#endif
return QVariant::fromValue(d->result);
}
@@ -476,15 +454,12 @@ void QMYSQLResult::cleanup()
// must iterate trough leftover result sets from multi-selects or stored procedures
// if this isn't done subsequent queries will fail with "Commands out of sync"
-#if MYSQL_VERSION_ID >= 40100
while (driver() && d->drv_d_func()->mysql && mysql_next_result(d->drv_d_func()->mysql) == 0) {
MYSQL_RES *res = mysql_store_result(d->drv_d_func()->mysql);
if (res)
mysql_free_result(res);
}
-#endif
-#if MYSQL_VERSION_ID >= 40108
if (d->stmt) {
if (mysql_stmt_close(d->stmt))
qWarning("QMYSQLResult::cleanup: unable to free statement handle");
@@ -509,7 +484,6 @@ void QMYSQLResult::cleanup()
delete[] d->inBinds;
d->inBinds = 0;
}
-#endif
d->hasBlobs = false;
d->fields.clear();
@@ -536,7 +510,6 @@ bool QMYSQLResult::fetch(int i)
if (at() == i)
return true;
if (d->preparedQuery) {
-#if MYSQL_VERSION_ID >= 40108
mysql_stmt_data_seek(d->stmt, i);
int nRC = mysql_stmt_fetch(d->stmt);
@@ -550,9 +523,6 @@ bool QMYSQLResult::fetch(int i)
"Unable to fetch data"), QSqlError::StatementError, d->stmt));
return false;
}
-#else
- return false;
-#endif
} else {
mysql_data_seek(d->result, i);
d->row = mysql_fetch_row(d->result);
@@ -570,7 +540,6 @@ bool QMYSQLResult::fetchNext()
if (!driver())
return false;
if (d->preparedQuery) {
-#if MYSQL_VERSION_ID >= 40108
int nRC = mysql_stmt_fetch(d->stmt);
if (nRC) {
#ifdef MYSQL_DATA_TRUNCATED
@@ -582,9 +551,6 @@ bool QMYSQLResult::fetchNext()
"Unable to fetch data"), QSqlError::StatementError, d->stmt));
return false;
}
-#else
- return false;
-#endif
} else {
d->row = mysql_fetch_row(d->result);
if (!d->row)
@@ -607,11 +573,7 @@ bool QMYSQLResult::fetchLast()
my_ulonglong numRows;
if (d->preparedQuery) {
-#if MYSQL_VERSION_ID >= 40108
numRows = mysql_stmt_num_rows(d->stmt);
-#else
- numRows = 0;
-#endif
} else {
numRows = mysql_num_rows(d->result);
}
@@ -648,7 +610,7 @@ QVariant QMYSQLResult::data(int field)
QString val;
if (d->preparedQuery) {
if (f.nullIndicator)
- return QVariant(f.type);
+ return QVariant(QVariant::Type(f.type));
if (qIsInteger(f.type)) {
QVariant variant(f.type, f.outField);
@@ -660,34 +622,34 @@ QVariant QMYSQLResult::data(int field)
return variant;
}
- if (f.type != QVariant::ByteArray)
+ if (f.type != QMetaType::QByteArray)
val = toUnicode(d->drv_d_func()->tc, f.outField, f.bufLength);
} else {
if (d->row[field] == NULL) {
// NULL value
- return QVariant(f.type);
+ return QVariant(QVariant::Type(f.type));
}
fieldLength = mysql_fetch_lengths(d->result)[field];
- if (f.type != QVariant::ByteArray)
+ if (f.type != QMetaType::QByteArray)
val = toUnicode(d->drv_d_func()->tc, d->row[field], fieldLength);
}
switch (static_cast<int>(f.type)) {
- case QVariant::LongLong:
+ case QMetaType::LongLong:
return QVariant(val.toLongLong());
- case QVariant::ULongLong:
+ case QMetaType::ULongLong:
return QVariant(val.toULongLong());
case QMetaType::Char:
case QMetaType::Short:
- case QVariant::Int:
+ case QMetaType::Int:
return QVariant(val.toInt());
case QMetaType::UChar:
case QMetaType::UShort:
- case QVariant::UInt:
+ case QMetaType::UInt:
return QVariant(val.toUInt());
- case QVariant::Double: {
+ case QMetaType::Double: {
QVariant v;
bool ok=false;
double dbl = val.toDouble(&ok);
@@ -711,13 +673,13 @@ QVariant QMYSQLResult::data(int field)
return v;
return QVariant();
}
- case QVariant::Date:
+ case QMetaType::QDate:
return qDateFromString(val);
- case QVariant::Time:
+ case QMetaType::QTime:
return qTimeFromString(val);
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
return qDateTimeFromString(val);
- case QVariant::ByteArray: {
+ case QMetaType::QByteArray: {
QByteArray ba;
if (d->preparedQuery) {
@@ -727,7 +689,7 @@ QVariant QMYSQLResult::data(int field)
}
return QVariant(ba);
}
- case QVariant::String:
+ case QMetaType::QString:
default:
return QVariant(val);
}
@@ -788,11 +750,7 @@ int QMYSQLResult::size()
Q_D(const QMYSQLResult);
if (driver() && isSelect())
if (d->preparedQuery)
-#if MYSQL_VERSION_ID >= 40108
return mysql_stmt_num_rows(d->stmt);
-#else
- return -1;
-#endif
else
return int(mysql_num_rows(d->result));
else
@@ -821,11 +779,9 @@ QVariant QMYSQLResult::lastInsertId() const
return QVariant();
if (d->preparedQuery) {
-#if MYSQL_VERSION_ID >= 40108
quint64 id = mysql_stmt_insert_id(d->stmt);
if (id)
return QVariant(id);
-#endif
} else {
quint64 id = mysql_insert_id(d->drv_d_func()->mysql);
if (id)
@@ -842,11 +798,7 @@ QSqlRecord QMYSQLResult::record() const
if (!isActive() || !isSelect() || !driver())
return info;
-#if MYSQL_VERSION_ID >= 40108
res = d->preparedQuery ? d->meta : d->result;
-#else
- res = d->result;
-#endif
if (!mysql_errno(d->drv_d_func()->mysql)) {
mysql_field_seek(res, 0);
@@ -865,7 +817,7 @@ bool QMYSQLResult::nextResult()
Q_D(QMYSQLResult);
if (!driver())
return false;
-#if MYSQL_VERSION_ID >= 40100
+
setAt(-1);
setActive(false);
@@ -908,9 +860,6 @@ bool QMYSQLResult::nextResult()
setActive(true);
return true;
-#else
- return false;
-#endif
}
void QMYSQLResult::virtual_hook(int id, void *data)
@@ -918,24 +867,21 @@ void QMYSQLResult::virtual_hook(int id, void *data)
QSqlResult::virtual_hook(id, data);
}
-
-#if MYSQL_VERSION_ID >= 40108
-
-static MYSQL_TIME *toMySqlDate(QDate date, QTime time, QVariant::Type type)
+static MYSQL_TIME *toMySqlDate(QDate date, QTime time, int type)
{
- Q_ASSERT(type == QVariant::Time || type == QVariant::Date
- || type == QVariant::DateTime);
+ Q_ASSERT(type == QMetaType::QTime || type == QMetaType::QDate
+ || type == QMetaType::QDateTime);
MYSQL_TIME *myTime = new MYSQL_TIME;
memset(myTime, 0, sizeof(MYSQL_TIME));
- if (type == QVariant::Time || type == QVariant::DateTime) {
+ if (type == QMetaType::QTime || type == QMetaType::QDateTime) {
myTime->hour = time.hour();
myTime->minute = time.minute();
myTime->second = time.second();
myTime->second_part = time.msec() * 1000;
}
- if (type == QVariant::Date || type == QVariant::DateTime) {
+ if (type == QMetaType::QDate || type == QMetaType::QDateTime) {
myTime->year = date.year();
myTime->month = date.month();
myTime->day = date.day();
@@ -949,7 +895,7 @@ bool QMYSQLResult::prepare(const QString& query)
Q_D(QMYSQLResult);
if (!driver())
return false;
-#if MYSQL_VERSION_ID >= 40108
+
cleanup();
if (!d->drv_d_func()->preparedQuerysEnabled)
return QSqlResult::prepare(query);
@@ -983,9 +929,6 @@ bool QMYSQLResult::prepare(const QString& query)
setSelect(d->bindInValues());
d->preparedQuery = true;
return true;
-#else
- return false;
-#endif
}
bool QMYSQLResult::exec()
@@ -1028,30 +971,30 @@ bool QMYSQLResult::exec()
currBind->length = 0;
currBind->is_unsigned = 0;
- switch (val.type()) {
- case QVariant::ByteArray:
+ switch (val.userType()) {
+ case QMetaType::QByteArray:
currBind->buffer_type = MYSQL_TYPE_BLOB;
currBind->buffer = const_cast<char *>(val.toByteArray().constData());
currBind->buffer_length = val.toByteArray().size();
break;
- case QVariant::Time:
- case QVariant::Date:
- case QVariant::DateTime: {
- MYSQL_TIME *myTime = toMySqlDate(val.toDate(), val.toTime(), val.type());
+ case QMetaType::QTime:
+ case QMetaType::QDate:
+ case QMetaType::QDateTime: {
+ MYSQL_TIME *myTime = toMySqlDate(val.toDate(), val.toTime(), val.userType());
timeVector.append(myTime);
currBind->buffer = myTime;
- switch(val.type()) {
- case QVariant::Time:
+ switch (val.userType()) {
+ case QMetaType::QTime:
currBind->buffer_type = MYSQL_TYPE_TIME;
myTime->time_type = MYSQL_TIMESTAMP_TIME;
break;
- case QVariant::Date:
+ case QMetaType::QDate:
currBind->buffer_type = MYSQL_TYPE_DATE;
myTime->time_type = MYSQL_TIMESTAMP_DATE;
break;
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
currBind->buffer_type = MYSQL_TYPE_DATETIME;
myTime->time_type = MYSQL_TIMESTAMP_DATETIME;
break;
@@ -1061,32 +1004,32 @@ bool QMYSQLResult::exec()
currBind->buffer_length = sizeof(MYSQL_TIME);
currBind->length = 0;
break; }
- case QVariant::UInt:
- case QVariant::Int:
+ case QMetaType::UInt:
+ case QMetaType::Int:
currBind->buffer_type = MYSQL_TYPE_LONG;
currBind->buffer = data;
currBind->buffer_length = sizeof(int);
- currBind->is_unsigned = (val.type() != QVariant::Int);
+ currBind->is_unsigned = (val.userType() != QMetaType::Int);
break;
- case QVariant::Bool:
+ case QMetaType::Bool:
currBind->buffer_type = MYSQL_TYPE_TINY;
currBind->buffer = data;
currBind->buffer_length = sizeof(bool);
currBind->is_unsigned = false;
break;
- case QVariant::Double:
+ case QMetaType::Double:
currBind->buffer_type = MYSQL_TYPE_DOUBLE;
currBind->buffer = data;
currBind->buffer_length = sizeof(double);
break;
- case QVariant::LongLong:
- case QVariant::ULongLong:
+ case QMetaType::LongLong:
+ case QMetaType::ULongLong:
currBind->buffer_type = MYSQL_TYPE_LONGLONG;
currBind->buffer = data;
currBind->buffer_length = sizeof(qint64);
- currBind->is_unsigned = (val.type() == QVariant::ULongLong);
+ currBind->is_unsigned = (val.userType() == QMetaType::ULongLong);
break;
- case QVariant::String:
+ case QMetaType::QString:
default: {
QByteArray ba = fromUnicode(d->drv_d_func()->tc, val.toString());
stringVector.append(ba);
@@ -1155,7 +1098,7 @@ bool QMYSQLResult::exec()
setActive(true);
return true;
}
-#endif
+
/////////////////////////////////////////////////////////
static int qMySqlConnectionCount = 0;
@@ -1164,18 +1107,16 @@ static bool qMySqlInitHandledByUser = false;
static void qLibraryInit()
{
#ifndef Q_NO_MYSQL_EMBEDDED
-# if MYSQL_VERSION_ID >= 40000
if (qMySqlInitHandledByUser || qMySqlConnectionCount > 1)
return;
-# if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
+# if MYSQL_VERSION_ID >= 50003
if (mysql_library_init(0, 0, 0)) {
# else
if (mysql_server_init(0, 0, 0)) {
# endif
qWarning("QMYSQLDriver::qServerInit: unable to start server.");
}
-# endif // MYSQL_VERSION_ID
#endif // Q_NO_MYSQL_EMBEDDED
#if defined(MARIADB_BASE_VERSION) || defined(MARIADB_VERSION_ID)
@@ -1187,12 +1128,10 @@ static void qLibraryEnd()
{
#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID)
# if !defined(Q_NO_MYSQL_EMBEDDED)
-# if MYSQL_VERSION_ID > 40000
-# if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
- mysql_library_end();
-# else
- mysql_server_end();
-# endif
+# if MYSQL_VERSION_ID >= 50003
+ mysql_library_end();
+# else
+ mysql_server_end();
# endif
# endif
#endif
@@ -1271,17 +1210,9 @@ bool QMYSQLDriver::hasFeature(DriverFeature f) const
return true;
case PreparedQueries:
case PositionalPlaceholders:
-#if MYSQL_VERSION_ID >= 40108
return d->preparedQuerysEnabled;
-#else
- return false;
-#endif
case MultipleResultSets:
-#if MYSQL_VERSION_ID >= 40100
return true;
-#else
- return false;
-#endif
}
return false;
}
@@ -1322,7 +1253,7 @@ bool QMYSQLDriver::open(const QString& db,
we have to enable CLIEN_MULTI_STATEMENTS here, otherwise _any_
stored procedure call will fail.
*/
- unsigned int optionFlags = Q_CLIENT_MULTI_STATEMENTS;
+ unsigned int optionFlags = CLIENT_MULTI_STATEMENTS;
const QStringList opts(connOpts.split(QLatin1Char(';'), QString::SkipEmptyParts));
QString unixSocket;
QString sslCert;
@@ -1330,12 +1261,10 @@ bool QMYSQLDriver::open(const QString& db,
QString sslKey;
QString sslCAPath;
QString sslCipher;
-#if MYSQL_VERSION_ID >= 50000
my_bool reconnect=false;
uint connectTimeout = 0;
uint readTimeout = 0;
uint writeTimeout = 0;
-#endif
// extract the real options from the string
for (int i = 0; i < opts.count(); ++i) {
@@ -1346,18 +1275,15 @@ bool QMYSQLDriver::open(const QString& db,
QString opt = tmp.left(idx).simplified();
if (opt == QLatin1String("UNIX_SOCKET"))
unixSocket = val;
-#if MYSQL_VERSION_ID >= 50000
else if (opt == QLatin1String("MYSQL_OPT_RECONNECT")) {
if (val == QLatin1String("TRUE") || val == QLatin1String("1") || val.isEmpty())
reconnect = true;
- } else if (opt == QLatin1String("MYSQL_OPT_CONNECT_TIMEOUT")) {
+ } else if (opt == QLatin1String("MYSQL_OPT_CONNECT_TIMEOUT"))
connectTimeout = val.toInt();
- } else if (opt == QLatin1String("MYSQL_OPT_READ_TIMEOUT")) {
+ else if (opt == QLatin1String("MYSQL_OPT_READ_TIMEOUT"))
readTimeout = val.toInt();
- } else if (opt == QLatin1String("MYSQL_OPT_WRITE_TIMEOUT")) {
+ else if (opt == QLatin1String("MYSQL_OPT_WRITE_TIMEOUT"))
writeTimeout = val.toInt();
- }
-#endif
else if (opt == QLatin1String("SSL_KEY"))
sslKey = val;
else if (opt == QLatin1String("SSL_CERT"))
@@ -1442,7 +1368,7 @@ bool QMYSQLDriver::open(const QString& db,
return false;
}
-#if (MYSQL_VERSION_ID >= 40113 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50007
+#if MYSQL_VERSION_ID >= 50007
if (mysql_get_client_version() >= 50503 && mysql_get_server_version(d->mysql) >= 50503) {
// force the communication to be utf8mb4 (only utf8mb4 supports 4-byte characters)
mysql_set_character_set(d->mysql, "utf8mb4");
@@ -1457,20 +1383,15 @@ bool QMYSQLDriver::open(const QString& db,
d->tc = codec(d->mysql);
#endif
}
-#endif
+#endif // MYSQL_VERSION_ID >= 50007
-#if MYSQL_VERSION_ID >= 40108
d->preparedQuerysEnabled = mysql_get_client_version() >= 40108
&& mysql_get_server_version(d->mysql) >= 40100;
-#else
- d->preparedQuerysEnabled = false;
-#endif
#if QT_CONFIG(thread)
mysql_thread_init();
#endif
-
setOpen(true);
setOpenError(false);
return true;
@@ -1499,46 +1420,21 @@ QStringList QMYSQLDriver::tables(QSql::TableType type) const
{
Q_D(const QMYSQLDriver);
QStringList tl;
-#if MYSQL_VERSION_ID >= 40100
- if( mysql_get_server_version(d->mysql) < 50000)
- {
-#endif
- if (!isOpen())
- return tl;
- if (!(type & QSql::Tables))
- return tl;
-
- MYSQL_RES* tableRes = mysql_list_tables(d->mysql, NULL);
- MYSQL_ROW row;
- int i = 0;
- while (tableRes) {
- mysql_data_seek(tableRes, i);
- row = mysql_fetch_row(tableRes);
- if (!row)
- break;
- tl.append(toUnicode(d->tc, row[0]));
- i++;
- }
- mysql_free_result(tableRes);
-#if MYSQL_VERSION_ID >= 40100
- } else {
- QSqlQuery q(createResult());
- if(type & QSql::Tables) {
- QString sql = QLatin1String("select table_name from information_schema.tables where table_schema = '") + QLatin1String(d->mysql->db) + QLatin1String("' and table_type = 'BASE TABLE'");
- q.exec(sql);
+ QSqlQuery q(createResult());
+ if (type & QSql::Tables) {
+ QString sql = QLatin1String("select table_name from information_schema.tables where table_schema = '") + QLatin1String(d->mysql->db) + QLatin1String("' and table_type = 'BASE TABLE'");
+ q.exec(sql);
- while(q.next())
- tl.append(q.value(0).toString());
- }
- if(type & QSql::Views) {
- QString sql = QLatin1String("select table_name from information_schema.tables where table_schema = '") + QLatin1String(d->mysql->db) + QLatin1String("' and table_type = 'VIEW'");
- q.exec(sql);
+ while (q.next())
+ tl.append(q.value(0).toString());
+ }
+ if (type & QSql::Views) {
+ QString sql = QLatin1String("select table_name from information_schema.tables where table_schema = '") + QLatin1String(d->mysql->db) + QLatin1String("' and table_type = 'VIEW'");
+ q.exec(sql);
- while(q.next())
- tl.append(q.value(0).toString());
- }
+ while (q.next())
+ tl.append(q.value(0).toString());
}
-#endif
return tl;
}
@@ -1652,16 +1548,16 @@ QString QMYSQLDriver::formatValue(const QSqlField &field, bool trimStrings) cons
if (field.isNull()) {
r = QStringLiteral("NULL");
} else {
- switch(field.type()) {
- case QVariant::Double:
+ switch (+field.type()) {
+ case QMetaType::Double:
r = QString::number(field.value().toDouble(), 'g', field.precision());
break;
- case QVariant::String:
+ case QMetaType::QString:
// Escape '\' characters
r = QSqlDriver::formatValue(field, trimStrings);
r.replace(QLatin1String("\\"), QLatin1String("\\\\"));
break;
- case QVariant::ByteArray:
+ case QMetaType::QByteArray:
if (isOpen()) {
const QByteArray ba = field.value().toByteArray();
// buffer has to be at least length*2+1 bytes
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql_p.h b/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
index 48b04fb1f5..9ccc8f4e4f 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
@@ -75,8 +75,8 @@ class Q_EXPORT_SQLDRIVER_MYSQL QMYSQLDriver : public QSqlDriver
Q_DECLARE_PRIVATE(QMYSQLDriver)
Q_OBJECT
public:
- explicit QMYSQLDriver(QObject *parent=0);
- explicit QMYSQLDriver(MYSQL *con, QObject * parent=0);
+ explicit QMYSQLDriver(QObject *parent=nullptr);
+ explicit QMYSQLDriver(MYSQL *con, QObject * parent=nullptr);
~QMYSQLDriver();
bool hasFeature(DriverFeature f) const override;
bool open(const QString & db,
diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
index 7709b13cd1..33bad23e3b 100644
--- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
@@ -1422,7 +1422,7 @@ bool QODBCResult::exec()
SQLLEN *ind = &indicators[i];
if (val.isNull())
*ind = SQL_NULL_DATA;
- switch (val.type()) {
+ switch (val.userType()) {
case QVariant::Date: {
QByteArray &ba = tmpStorage[i];
ba.resize(sizeof(DATE_STRUCT));
@@ -1694,7 +1694,7 @@ bool QODBCResult::exec()
return true;
for (i = 0; i < values.count(); ++i) {
- switch (values.at(i).type()) {
+ switch (values.at(i).userType()) {
case QVariant::Date: {
DATE_STRUCT ds = *((DATE_STRUCT *)const_cast<char *>(tmpStorage.at(i).constData()));
values[i] = QVariant(QDate(ds.year, ds.month, ds.day));
@@ -1735,7 +1735,7 @@ bool QODBCResult::exec()
break; }
}
if (indicators[i] == SQL_NULL_DATA)
- values[i] = QVariant(values[i].type());
+ values[i] = QVariant(QVariant::Type(values[i].userType()));
}
return true;
}
diff --git a/src/plugins/sqldrivers/psql/qsql_psql.cpp b/src/plugins/sqldrivers/psql/qsql_psql.cpp
index e0f82eee73..d735d29fc7 100644
--- a/src/plugins/sqldrivers/psql/qsql_psql.cpp
+++ b/src/plugins/sqldrivers/psql/qsql_psql.cpp
@@ -1684,7 +1684,12 @@ void QPSQLDriver::_q_handleNotification(int)
if (notify->extra)
payload = d->isUtf8 ? QString::fromUtf8(notify->extra) : QString::fromLatin1(notify->extra);
#endif
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
emit notification(name);
+QT_WARNING_POP
+#endif
QSqlDriver::NotificationSource source = (notify->be_pid == PQbackendPID(d->connection)) ? QSqlDriver::SelfSource : QSqlDriver::OtherSource;
emit notification(name, source, payload);
}
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
index 001bd673fc..551d762434 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -505,7 +505,7 @@ bool QSQLiteResult::exec()
if (value.isNull()) {
res = sqlite3_bind_null(d->stmt, i + 1);
} else {
- switch (value.type()) {
+ switch (value.userType()) {
case QVariant::ByteArray: {
const QByteArray *ba = static_cast<const QByteArray*>(value.constData());
res = sqlite3_bind_blob(d->stmt, i + 1, ba->constData(),
@@ -1044,7 +1044,12 @@ void QSQLiteDriver::handleNotification(const QString &tableName, qint64 rowid)
{
Q_D(const QSQLiteDriver);
if (d->notificationid.contains(tableName)) {
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
emit notification(tableName);
+QT_WARNING_POP
+#endif
emit notification(tableName, QSqlDriver::UnknownSource, QVariant(rowid));
}
}
diff --git a/src/plugins/sqldrivers/sqlite2/qsql_sqlite2_p.h b/src/plugins/sqldrivers/sqlite2/qsql_sqlite2_p.h
index 48c64536f1..57db0a4d47 100644
--- a/src/plugins/sqldrivers/sqlite2/qsql_sqlite2_p.h
+++ b/src/plugins/sqldrivers/sqlite2/qsql_sqlite2_p.h
@@ -76,8 +76,8 @@ class Q_EXPORT_SQLDRIVER_SQLITE2 QSQLite2Driver : public QSqlDriver
Q_DECLARE_PRIVATE(QSQLite2Driver)
Q_OBJECT
public:
- explicit QSQLite2Driver(QObject *parent = 0);
- explicit QSQLite2Driver(sqlite *connection, QObject *parent = 0);
+ explicit QSQLite2Driver(QObject *parent = nullptr);
+ explicit QSQLite2Driver(sqlite *connection, QObject *parent = nullptr);
~QSQLite2Driver();
bool hasFeature(DriverFeature f) const override;
bool open(const QString &db,
diff --git a/src/plugins/sqldrivers/tds/qsql_tds_p.h b/src/plugins/sqldrivers/tds/qsql_tds_p.h
index 948e3c7024..b72fababbb 100644
--- a/src/plugins/sqldrivers/tds/qsql_tds_p.h
+++ b/src/plugins/sqldrivers/tds/qsql_tds_p.h
@@ -85,8 +85,8 @@ class Q_EXPORT_SQLDRIVER_TDS QTDSDriver : public QSqlDriver
Q_OBJECT
friend class QTDSResultPrivate;
public:
- explicit QTDSDriver(QObject* parent = 0);
- QTDSDriver(LOGINREC* rec, const QString& host, const QString &db, QObject* parent = 0);
+ explicit QTDSDriver(QObject* parent = nullptr);
+ QTDSDriver(LOGINREC* rec, const QString& host, const QString &db, QObject* parent = nullptr);
~QTDSDriver();
bool hasFeature(DriverFeature f) const override;
bool open(const QString &db,
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index ecdde06bb8..a5ab8eeb17 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -236,6 +236,18 @@ static QLinearGradient titlebarGradientInactive()
}
#if QT_CONFIG(tabwidget)
+/*
+ Since macOS 10.14 AppKit is using transparency more extensively, especially for the
+ dark theme. Inactive buttons, for example, are semi-transparent. And we use them to
+ draw tab widget's tab bar. The combination of NSBox (also a part of tab widget)
+ and these transparent buttons gives us an undesired side-effect: an outline of
+ NSBox is visible through transparent buttons. To avoid this, we have this hack below:
+ we clip the area where the line would be visible through the buttons. The area we
+ want to clip away can be described as an intersection of the option's rect and
+ the tab widget's tab bar rect. But some adjustments are required, since those rects
+ are anyway adjusted during the rendering and they are not exactly what you'll see on
+ the screen. Thus this switch-statement inside.
+*/
static void clipTabBarFrame(const QStyleOption *option, const QMacStyle *style, CGContextRef ctx)
{
Q_ASSERT(option);
@@ -246,7 +258,19 @@ static void clipTabBarFrame(const QStyleOption *option, const QMacStyle *style,
QTabWidget *tabWidget = qobject_cast<QTabWidget *>(option->styleObject);
Q_ASSERT(tabWidget);
- const QRect tabBarRect = style->subElementRect(QStyle::SE_TabWidgetTabBar, option, tabWidget).adjusted(2, 2, -3, -2);
+ QRect tabBarRect = style->subElementRect(QStyle::SE_TabWidgetTabBar, option, tabWidget).adjusted(2, 0, -3, 0);
+ switch (tabWidget->tabPosition()) {
+ case QTabWidget::South:
+ tabBarRect.setY(tabBarRect.y() + tabBarRect.height() / 2);
+ break;
+ case QTabWidget::North:
+ case QTabWidget::West:
+ tabBarRect = tabBarRect.adjusted(0, 2, 0, -2);
+ break;
+ case QTabWidget::East:
+ tabBarRect = tabBarRect.adjusted(tabBarRect.width() / 2, 2, tabBarRect.width() / 2, -2);
+ }
+
const QRegion clipPath = QRegion(option->rect) - tabBarRect;
QVarLengthArray<CGRect, 3> cgRects;
for (const QRect &qtRect : clipPath)
@@ -1388,14 +1412,22 @@ void QMacStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *widg
// High-dpi icons do not need adjustment; make sure tabIconSize is not larger than iconSize
tabIconSize = QSize(qMin(tabIconSize.width(), iconSize.width()), qMin(tabIconSize.height(), iconSize.height()));
- *iconRect = QRect(tr.left(), tr.center().y() - tabIconSize.height() / 2,
- tabIconSize.width(), tabIconSize.height());
+ const int stylePadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2 - hpadding;
+
+ if (opt->documentMode) {
+ // documents show the icon as part of the the text
+ const int textWidth =
+ opt->fontMetrics.boundingRect(tr, Qt::AlignCenter | Qt::TextShowMnemonic, opt->text).width();
+ *iconRect = QRect(tr.center().x() - textWidth / 2 - stylePadding - tabIconSize.width(),
+ tr.center().y() - tabIconSize.height() / 2,
+ tabIconSize.width(), tabIconSize.height());
+ } else {
+ *iconRect = QRect(tr.left() + stylePadding, tr.center().y() - tabIconSize.height() / 2,
+ tabIconSize.width(), tabIconSize.height());
+ }
if (!verticalTabs)
*iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect);
- int stylePadding = proxyStyle->pixelMetric(QStyle::PM_TabBarTabHSpace, opt, widget) / 2;
- stylePadding -= hpadding;
-
tr.setLeft(tr.left() + stylePadding + tabIconSize.width() + 4);
tr.setRight(tr.right() - stylePadding - tabIconSize.width() - 4);
}
@@ -2553,7 +2585,7 @@ QPalette QMacStyle::standardPalette() const
auto platformTheme = QGuiApplicationPrivate::platformTheme();
auto styleNames = platformTheme->themeHint(QPlatformTheme::StyleNames);
if (styleNames.toStringList().contains("macintosh"))
- return *platformTheme->palette();
+ return QPalette(); // Inherit everything from theme
else
return QStyle::standardPalette();
}
@@ -2873,7 +2905,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
ret = false;
break;
case SH_Table_GridLineColor:
- ret = int(qt_mac_toQColor(NSColor.gridColor).rgb());
+ ret = int(qt_mac_toQColor(NSColor.gridColor).rgba());
break;
default:
ret = QCommonStyle::styleHint(sh, opt, w, hret);
@@ -3064,13 +3096,18 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
bool needTranslation = false;
if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave
&& !qt_mac_applicationIsInDarkMode()) {
- // Another surprise from AppKit (SDK 10.14) - -displayRectIgnoringOpacity:
- // is different from drawRect: for some Apple-known reason box is smaller
- // in height than we need, resulting in tab buttons sitting too high/not
- // centered. Attempts to play with insets etc did not work - the same wrong
- // height. Simple translation is not working (too much space "at bottom"),
- // so we make it bigger and translate (otherwise it's clipped at bottom btw).
- adjustedRect.adjust(0, 0, 0, 3);
+ // In Aqua theme we have to use the 'default' NSBox (as opposite
+ // to the 'custom' QDarkNSBox we use in dark theme). Since -drawRect:
+ // does nothing in default NSBox, we call -displayRectIgnoringOpaticty:.
+ // Unfortunately, the resulting box is smaller then the actual rect we
+ // wanted. This can be seen, e.g. because tabs (buttons) are misaligned
+ // vertically and even worse, if QTabWidget has autoFillBackground
+ // set, this background overpaints NSBox making it to disappear.
+ // We trick our NSBox to render in a larger rectangle, so that
+ // the actuall result (which is again smaller than requested),
+ // more or less is what we really want. We'll have to adjust CTM
+ // and translate accordingly.
+ adjustedRect.adjust(0, 0, 6, 6);
needTranslation = true;
}
d->drawNSViewInRect(box, adjustedRect, p, ^(CGContextRef ctx, const CGRect &rect) {
@@ -3085,7 +3122,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
[box drawRect:rect];
} else {
if (needTranslation)
- CGContextTranslateCTM(ctx, 0.0, 4.0);
+ CGContextTranslateCTM(ctx, -3.0, 5.0);
[box displayRectIgnoringOpacity:box.bounds inContext:NSGraphicsContext.currentContext];
}
});
@@ -4581,6 +4618,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
case SE_ToolBoxTabContents:
rect = QCommonStyle::subElementRect(sr, opt, widget);
break;
+ case SE_PushButtonBevel:
case SE_PushButtonContents:
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
// Comment from the old HITheme days:
@@ -4594,9 +4632,20 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
const auto ct = cocoaControlType(btn, widget);
const auto cs = d->effectiveAquaSizeConstrain(btn, widget);
const auto cw = QMacStylePrivate::CocoaControl(ct, cs);
- const auto frameRect = cw.adjustedControlFrame(btn->rect);
- const auto titleMargins = cw.titleMargins();
- rect = (frameRect - titleMargins).toRect();
+ auto frameRect = cw.adjustedControlFrame(btn->rect);
+ if (sr == SE_PushButtonContents) {
+ frameRect -= cw.titleMargins();
+ } else {
+ auto *pb = static_cast<NSButton *>(d->cocoaControl(cw));
+ if (cw.type != QMacStylePrivate::Button_SquareButton) {
+ frameRect = QRectF::fromCGRect([pb alignmentRectForFrame:pb.frame]);
+ if (cw.type == QMacStylePrivate::Button_PushButton)
+ frameRect -= pushButtonShadowMargins[cw.size];
+ else if (cw.type == QMacStylePrivate::Button_PullDown)
+ frameRect -= pullDownButtonShadowMargins[cw.size];
+ }
+ }
+ rect = frameRect.toRect();
}
break;
case SE_HeaderLabel: {
diff --git a/src/plugins/styles/mac/qmacstyle_mac_p_p.h b/src/plugins/styles/mac/qmacstyle_mac_p_p.h
index d6af18f01f..274936bd79 100644
--- a/src/plugins/styles/mac/qmacstyle_mac_p_p.h
+++ b/src/plugins/styles/mac/qmacstyle_mac_p_p.h
@@ -284,7 +284,7 @@ public:
CocoaControlType windowButtonCocoaControl(QStyle::SubControl sc) const;
#if QT_CONFIG(tabbar)
- void tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const;
+ void tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const override;
static Direction tabDirection(QTabBar::Shape shape);
static bool verticalTabs(QMacStylePrivate::Direction tabDirection);
#endif
diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp
index e213d65946..e8d74180cd 100644
--- a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp
@@ -1365,6 +1365,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
QWindowsStyle::drawControl(element, &copyOpt, painter, widget);
}
break;
+#if QT_CONFIG(dockwidget)
case CE_DockWidgetTitle:
if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(option)) {
const QDockWidget *dockWidget = qobject_cast<const QDockWidget *>(widget);
@@ -1431,6 +1432,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
}
}
break;
+#endif // QT_CONFIG(dockwidget)
#if QT_CONFIG(itemviews)
case CE_ItemViewItem:
{
@@ -2110,7 +2112,7 @@ int QWindowsVistaStyle::styleHint(StyleHint hint, const QStyleOption *option, co
break;
case SH_Table_GridLineColor:
if (option)
- ret = int(option->palette.color(QPalette::Base).darker(118).rgb());
+ ret = int(option->palette.color(QPalette::Base).darker(118).rgba());
else
ret = -1;
break;
@@ -2311,11 +2313,13 @@ void QWindowsVistaStyle::polish(QWidget *widget)
#endif // QT_CONFIG(lineedit)
if (qobject_cast<QGroupBox*>(widget))
widget->setAttribute(Qt::WA_Hover);
+#if QT_CONFIG(commandlinkbutton)
else if (qobject_cast<QCommandLinkButton*>(widget)) {
QFont buttonFont = widget->font();
buttonFont.setFamily(QLatin1String("Segoe UI"));
widget->setFont(buttonFont);
}
+#endif // QT_CONFIG(commandlinkbutton)
else if (widget->inherits("QTipLabel")){
//note that since tooltips are not reused
//we do not have to care about unpolishing
@@ -2392,12 +2396,15 @@ void QWindowsVistaStyle::unpolish(QWidget *widget)
#endif // QT_CONFIG(inputdialog)
else if (QTreeView *tree = qobject_cast<QTreeView *> (widget)) {
tree->viewport()->setAttribute(Qt::WA_Hover, false);
- } else if (qobject_cast<QCommandLinkButton*>(widget)) {
+ }
+#if QT_CONFIG(commandlinkbutton)
+ else if (qobject_cast<QCommandLinkButton*>(widget)) {
QFont font = QApplication::font("QCommandLinkButton");
QFont widgetFont = widget->font();
widgetFont.setFamily(font.family()); //Only family set by polish
widget->setFont(widgetFont);
}
+#endif // QT_CONFIG(commandlinkbutton)
}
diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h b/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h
index 8fef9f9927..c1d764a60e 100644
--- a/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h
+++ b/src/plugins/styles/windowsvista/qwindowsvistastyle_p_p.h
@@ -106,7 +106,9 @@
#include <qtableview.h>
#endif
#include <qdatetime.h>
+#if QT_CONFIG(commandlinkbutton)
#include <qcommandlinkbutton.h>
+#endif
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
index bf80138b32..9d143da169 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
@@ -225,9 +225,11 @@ static HRGN qt_hrgn_from_qregion(const QRegion &region)
*/
bool QWindowsXPStylePrivate::useXP(bool update)
{
- if (!update)
- return use_xp;
- return use_xp = IsThemeActive() && (IsAppThemed() || !QCoreApplication::instance());
+ if (update) {
+ use_xp = IsThemeActive() && (IsAppThemed() || !QCoreApplication::instance())
+ && !QWindowsStylePrivate::isDarkMode();
+ }
+ return use_xp;
}
/* \internal
@@ -663,7 +665,7 @@ static inline bool isFullyOpaque(const XPThemeData &themeData)
\note drawBackgroundThruNativeBuffer() can return false for large
sizes due to buffer()/CreateDIBSection() failing.
*/
-bool QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData)
+bool QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData, qreal correctionFactor)
{
if (themeData.rect.isEmpty())
return true;
@@ -708,9 +710,9 @@ bool QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData)
}
const HDC dc = canDrawDirectly ? hdcForWidgetBackingStore(themeData.widget) : nullptr;
- const bool result = dc
+ const bool result = dc && qFuzzyCompare(correctionFactor, qreal(1))
? drawBackgroundDirectly(dc, themeData, aditionalDevicePixelRatio)
- : drawBackgroundThruNativeBuffer(themeData, aditionalDevicePixelRatio);
+ : drawBackgroundThruNativeBuffer(themeData, aditionalDevicePixelRatio, correctionFactor);
painter->restore();
return result;
}
@@ -784,9 +786,14 @@ bool QWindowsXPStylePrivate::drawBackgroundDirectly(HDC dc, XPThemeData &themeDa
other pixmaps etc), or when special transformations are needed (e.g.
flips (horizonal mirroring only, vertical are handled by the theme
engine).
+
+ \a correctionFactor is an additional factor used to scale up controls
+ that are too small on High DPI screens, as has been observed for
+ WP_MDICLOSEBUTTON, WP_MDIRESTOREBUTTON, WP_MDIMINBUTTON (QTBUG-75927).
*/
bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeData,
- qreal additionalDevicePixelRatio)
+ qreal additionalDevicePixelRatio,
+ qreal correctionFactor)
{
QPainter *painter = themeData.painter;
QRectF rectF = scaleRect(QRectF(themeData.rect), additionalDevicePixelRatio);
@@ -795,7 +802,11 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa
rectF = QRectF(0, 0, rectF.height(), rectF.width());
}
rectF.moveTo(0, 0);
+
+ const bool hasCorrectionFactor = !qFuzzyCompare(correctionFactor, qreal(1));
QRect rect = rectF.toRect();
+ QRect drawRect = hasCorrectionFactor
+ ? QRectF(rectF.topLeft() / correctionFactor, rectF.size() / correctionFactor).toRect() : rect;
int partId = themeData.partId;
int stateId = themeData.stateId;
int w = rect.width();
@@ -824,6 +835,10 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa
pixmapCacheKey.append(QLatin1Char('h'));
pixmapCacheKey.append(QString::number(additionalDevicePixelRatio));
pixmapCacheKey.append(QLatin1Char('d'));
+ if (hasCorrectionFactor) {
+ pixmapCacheKey.append(QLatin1Char('c'));
+ pixmapCacheKey.append(QString::number(correctionFactor));
+ }
QPixmap cachedPixmap;
ThemeMapKey key(themeData);
@@ -882,7 +897,7 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa
// and DTGB_OMITCONTENT
bool addBorderContentClipping = false;
QRegion extraClip;
- QRect area = rect;
+ QRect area = drawRect;
if (themeData.noBorder || themeData.noContent) {
extraClip = area;
// We are running on a system where the uxtheme.dll does not have
@@ -913,19 +928,19 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa
QImage img;
if (!haveCachedPixmap) { // If the pixmap is not cached, generate it! -------------------------
- if (!buffer(w, h)) // Ensure a buffer of at least (w, h) in size
+ if (!buffer(drawRect.width(), drawRect.height())) // Ensure a buffer of at least (w, h) in size
return false;
HDC dc = bufferHDC();
// Clear the buffer
if (alphaType != NoAlpha) {
// Consider have separate "memset" function for small chunks for more speedup
- memset(bufferPixels, 0x00, bufferW * h * 4);
+ memset(bufferPixels, 0x00, bufferW * drawRect.height() * 4);
}
// Difference between area and rect
- int dx = area.x() - rect.x();
- int dy = area.y() - rect.y();
+ int dx = area.x() - drawRect.x();
+ int dy = area.y() - drawRect.y();
// Adjust so painting rect starts from Origo
rect.moveTo(0,0);
@@ -955,7 +970,7 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa
if (!hasAlpha && partIsTransparent)
potentialInvalidAlpha = true;
#if defined(DEBUG_XP_STYLE) && 1
- dumpNativeDIB(w, h);
+ dumpNativeDIB(drawRect.width(), drawRect.height());
#endif
}
@@ -983,6 +998,8 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa
printf("Image format is: %s\n", alphaType == RealAlpha ? "Real Alpha" : alphaType == MaskAlpha ? "Masked Alpha" : "No Alpha");
#endif
img = QImage(bufferPixels, bufferW, bufferH, format);
+ if (hasCorrectionFactor)
+ img = img.scaled(w, h, Qt::KeepAspectRatio, Qt::SmoothTransformation);
img.setDevicePixelRatio(additionalDevicePixelRatio);
}
@@ -1023,7 +1040,7 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa
imgCopy = cachedPixmap.toImage();
if (themeData.rotate) {
- QMatrix rotMatrix;
+ QTransform rotMatrix;
rotMatrix.rotate(themeData.rotate);
imgCopy = imgCopy.transformed(rotMatrix);
}
@@ -2461,6 +2478,61 @@ QRect QWindowsXPStylePrivate::scrollBarGripperBounds(QStyle::State flags, const
return sufficientSpace ? QRect(theme->rect.topLeft() + QPoint(hSpace, vSpace) / 2, size) : QRect();
}
+#if QT_CONFIG(mdiarea)
+// Helper for drawing MDI buttons into the corner widget of QMenuBar in case a
+// QMdiSubWindow is maximized.
+static void populateMdiButtonTheme(const QStyle *proxy, const QWidget *widget,
+ const QStyleOptionComplex *option,
+ QStyle::SubControl subControl, int part,
+ XPThemeData *theme)
+{
+ theme->partId = part;
+ theme->rect = proxy->subControlRect(QStyle::CC_MdiControls, option, subControl, widget);
+ if (!option->state.testFlag(QStyle::State_Enabled))
+ theme->stateId = CBS_INACTIVE;
+ else if (option->state.testFlag(QStyle::State_Sunken) && option->activeSubControls.testFlag(subControl))
+ theme->stateId = CBS_PUSHED;
+ else if (option->state.testFlag(QStyle::State_MouseOver) && option->activeSubControls.testFlag(subControl))
+ theme->stateId = CBS_HOT;
+ else
+ theme->stateId = CBS_NORMAL;
+}
+
+// Calculate an small (max 2), empirical correction factor for scaling up
+// WP_MDICLOSEBUTTON, WP_MDIRESTOREBUTTON, WP_MDIMINBUTTON, which are too
+// small on High DPI screens (QTBUG-75927).
+qreal mdiButtonCorrectionFactor(XPThemeData &theme, const QPaintDevice *pd = nullptr)
+{
+ const auto dpr = pd ? pd->devicePixelRatioF() : qApp->devicePixelRatio();
+ const QSizeF nativeSize = QSizeF(theme.size()) / dpr;
+ const QSizeF requestedSize(theme.rect.size());
+ const auto rawFactor = qMin(requestedSize.width() / nativeSize.width(),
+ requestedSize.height() / nativeSize.height());
+ const auto factor = rawFactor >= qreal(2) ? qreal(2) : qreal(1);
+ return factor;
+}
+#endif // QT_CONFIG(mdiarea)
+
+static void populateTitleBarButtonTheme(const QStyle *proxy, const QWidget *widget,
+ const QStyleOptionComplex *option,
+ QStyle::SubControl subControl,
+ bool isTitleBarActive, int part,
+ XPThemeData *theme)
+{
+ theme->rect = proxy->subControlRect(QStyle::CC_TitleBar, option, subControl, widget);
+ theme->partId = part;
+ if (widget && !widget->isEnabled())
+ theme->stateId = RBS_DISABLED;
+ else if (option->activeSubControls == subControl && option->state.testFlag(QStyle::State_Sunken))
+ theme->stateId = RBS_PUSHED;
+ else if (option->activeSubControls == subControl && option->state.testFlag(QStyle::State_MouseOver))
+ theme->stateId = RBS_HOT;
+ else if (!isTitleBarActive)
+ theme->stateId = RBS_INACTIVE;
+ else
+ theme->stateId = RBS_NORMAL;
+}
+
/*!
\reimp
*/
@@ -3022,56 +3094,17 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
if (sub & SC_TitleBarMinButton && tb->titleBarFlags & Qt::WindowMinimizeButtonHint
&& !(tb->titleBarState & Qt::WindowMinimized)) {
- theme.rect = proxy()->subControlRect(CC_TitleBar, option, SC_TitleBarMinButton, widget);
- partId = WP_MINBUTTON;
- if (widget && !widget->isEnabled())
- stateId = MINBS_DISABLED;
- else if (option->activeSubControls == SC_TitleBarMinButton && (option->state & State_Sunken))
- stateId = MINBS_PUSHED;
- else if (option->activeSubControls == SC_TitleBarMinButton && (option->state & State_MouseOver))
- stateId = MINBS_HOT;
- else if (!isActive)
- stateId = MINBS_INACTIVE;
- else
- stateId = MINBS_NORMAL;
- theme.partId = partId;
- theme.stateId = stateId;
+ populateTitleBarButtonTheme(proxy(), widget, option, SC_TitleBarMinButton, isActive, WP_MINBUTTON, &theme);
d->drawBackground(theme);
}
if (sub & SC_TitleBarMaxButton && tb->titleBarFlags & Qt::WindowMaximizeButtonHint
&& !(tb->titleBarState & Qt::WindowMaximized)) {
- theme.rect = proxy()->subControlRect(CC_TitleBar, option, SC_TitleBarMaxButton, widget);
- partId = WP_MAXBUTTON;
- if (widget && !widget->isEnabled())
- stateId = MAXBS_DISABLED;
- else if (option->activeSubControls == SC_TitleBarMaxButton && (option->state & State_Sunken))
- stateId = MAXBS_PUSHED;
- else if (option->activeSubControls == SC_TitleBarMaxButton && (option->state & State_MouseOver))
- stateId = MAXBS_HOT;
- else if (!isActive)
- stateId = MAXBS_INACTIVE;
- else
- stateId = MAXBS_NORMAL;
- theme.partId = partId;
- theme.stateId = stateId;
+ populateTitleBarButtonTheme(proxy(), widget, option, SC_TitleBarMaxButton, isActive, WP_MAXBUTTON, &theme);
d->drawBackground(theme);
}
if (sub & SC_TitleBarContextHelpButton
&& tb->titleBarFlags & Qt::WindowContextHelpButtonHint) {
- theme.rect = proxy()->subControlRect(CC_TitleBar, option, SC_TitleBarContextHelpButton, widget);
- partId = WP_HELPBUTTON;
- if (widget && !widget->isEnabled())
- stateId = MINBS_DISABLED;
- else if (option->activeSubControls == SC_TitleBarContextHelpButton && (option->state & State_Sunken))
- stateId = MINBS_PUSHED;
- else if (option->activeSubControls == SC_TitleBarContextHelpButton && (option->state & State_MouseOver))
- stateId = MINBS_HOT;
- else if (!isActive)
- stateId = MINBS_INACTIVE;
- else
- stateId = MINBS_NORMAL;
- theme.partId = partId;
- theme.stateId = stateId;
+ populateTitleBarButtonTheme(proxy(), widget, option, SC_TitleBarContextHelpButton, isActive, WP_HELPBUTTON, &theme);
d->drawBackground(theme);
}
bool drawNormalButton = (sub & SC_TitleBarNormalButton)
@@ -3080,74 +3113,21 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
|| ((tb->titleBarFlags & Qt::WindowMaximizeButtonHint)
&& (tb->titleBarState & Qt::WindowMaximized)));
if (drawNormalButton) {
- theme.rect = proxy()->subControlRect(CC_TitleBar, option, SC_TitleBarNormalButton, widget);
- partId = WP_RESTOREBUTTON;
- if (widget && !widget->isEnabled())
- stateId = RBS_DISABLED;
- else if (option->activeSubControls == SC_TitleBarNormalButton && (option->state & State_Sunken))
- stateId = RBS_PUSHED;
- else if (option->activeSubControls == SC_TitleBarNormalButton && (option->state & State_MouseOver))
- stateId = RBS_HOT;
- else if (!isActive)
- stateId = RBS_INACTIVE;
- else
- stateId = RBS_NORMAL;
- theme.partId = partId;
- theme.stateId = stateId;
+ populateTitleBarButtonTheme(proxy(), widget, option, SC_TitleBarNormalButton, isActive, WP_RESTOREBUTTON, &theme);
d->drawBackground(theme);
}
if (sub & SC_TitleBarShadeButton && tb->titleBarFlags & Qt::WindowShadeButtonHint
&& !(tb->titleBarState & Qt::WindowMinimized)) {
- theme.rect = proxy()->subControlRect(CC_TitleBar, option, SC_TitleBarShadeButton, widget);
- partId = WP_MINBUTTON;
- if (widget && !widget->isEnabled())
- stateId = MINBS_DISABLED;
- else if (option->activeSubControls == SC_TitleBarShadeButton && (option->state & State_Sunken))
- stateId = MINBS_PUSHED;
- else if (option->activeSubControls == SC_TitleBarShadeButton && (option->state & State_MouseOver))
- stateId = MINBS_HOT;
- else if (!isActive)
- stateId = MINBS_INACTIVE;
- else
- stateId = MINBS_NORMAL;
- theme.partId = partId;
- theme.stateId = stateId;
+ populateTitleBarButtonTheme(proxy(), widget, option, SC_TitleBarShadeButton, isActive, WP_MINBUTTON, &theme);
d->drawBackground(theme);
}
if (sub & SC_TitleBarUnshadeButton && tb->titleBarFlags & Qt::WindowShadeButtonHint
&& tb->titleBarState & Qt::WindowMinimized) {
- theme.rect = proxy()->subControlRect(CC_TitleBar, option, SC_TitleBarUnshadeButton, widget);
- partId = WP_RESTOREBUTTON;
- if (widget && !widget->isEnabled())
- stateId = RBS_DISABLED;
- else if (option->activeSubControls == SC_TitleBarUnshadeButton && (option->state & State_Sunken))
- stateId = RBS_PUSHED;
- else if (option->activeSubControls == SC_TitleBarUnshadeButton && (option->state & State_MouseOver))
- stateId = RBS_HOT;
- else if (!isActive)
- stateId = RBS_INACTIVE;
- else
- stateId = RBS_NORMAL;
- theme.partId = partId;
- theme.stateId = stateId;
+ populateTitleBarButtonTheme(proxy(), widget, option, SC_TitleBarUnshadeButton, isActive, WP_RESTOREBUTTON, &theme);
d->drawBackground(theme);
}
if (sub & SC_TitleBarCloseButton && tb->titleBarFlags & Qt::WindowSystemMenuHint) {
- theme.rect = proxy()->subControlRect(CC_TitleBar, option, SC_TitleBarCloseButton, widget);
- //partId = titlebar->testWFlags(Qt::WA_WState_Tool) ? WP_SMALLCLOSEBUTTON : WP_CLOSEBUTTON;
- partId = WP_CLOSEBUTTON;
- if (widget && !widget->isEnabled())
- stateId = CBS_DISABLED;
- else if (option->activeSubControls == SC_TitleBarCloseButton && (option->state & State_Sunken))
- stateId = CBS_PUSHED;
- else if (option->activeSubControls == SC_TitleBarCloseButton && (option->state & State_MouseOver))
- stateId = CBS_HOT;
- else if (!isActive)
- stateId = CBS_INACTIVE;
- else
- stateId = CBS_NORMAL;
- theme.partId = partId;
- theme.stateId = stateId;
+ populateTitleBarButtonTheme(proxy(), widget, option, SC_TitleBarCloseButton, isActive, WP_CLOSEBUTTON, &theme);
d->drawBackground(theme);
}
}
@@ -3157,56 +3137,21 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
#if QT_CONFIG(mdiarea)
case CC_MdiControls:
{
- QRect buttonRect;
XPThemeData theme(widget, p, QWindowsXPStylePrivate::WindowTheme, WP_MDICLOSEBUTTON, CBS_NORMAL);
+ if (Q_UNLIKELY(!theme.isValid()))
+ return;
- if (option->subControls & SC_MdiCloseButton) {
- buttonRect = proxy()->subControlRect(CC_MdiControls, option, SC_MdiCloseButton, widget);
- if (theme.isValid()) {
- theme.partId = WP_MDICLOSEBUTTON;
- theme.rect = buttonRect;
- if (!(flags & State_Enabled))
- theme.stateId = CBS_INACTIVE;
- else if (flags & State_Sunken && (option->activeSubControls & SC_MdiCloseButton))
- theme.stateId = CBS_PUSHED;
- else if (flags & State_MouseOver && (option->activeSubControls & SC_MdiCloseButton))
- theme.stateId = CBS_HOT;
- else
- theme.stateId = CBS_NORMAL;
- d->drawBackground(theme);
- }
+ if (option->subControls.testFlag(SC_MdiCloseButton)) {
+ populateMdiButtonTheme(proxy(), widget, option, SC_MdiCloseButton, WP_MDICLOSEBUTTON, &theme);
+ d->drawBackground(theme, mdiButtonCorrectionFactor(theme, widget));
}
- if (option->subControls & SC_MdiNormalButton) {
- buttonRect = proxy()->subControlRect(CC_MdiControls, option, SC_MdiNormalButton, widget);
- if (theme.isValid()) {
- theme.partId = WP_MDIRESTOREBUTTON;
- theme.rect = buttonRect;
- if (!(flags & State_Enabled))
- theme.stateId = CBS_INACTIVE;
- else if (flags & State_Sunken && (option->activeSubControls & SC_MdiNormalButton))
- theme.stateId = CBS_PUSHED;
- else if (flags & State_MouseOver && (option->activeSubControls & SC_MdiNormalButton))
- theme.stateId = CBS_HOT;
- else
- theme.stateId = CBS_NORMAL;
- d->drawBackground(theme);
- }
+ if (option->subControls.testFlag(SC_MdiNormalButton)) {
+ populateMdiButtonTheme(proxy(), widget, option, SC_MdiNormalButton, WP_MDIRESTOREBUTTON, &theme);
+ d->drawBackground(theme, mdiButtonCorrectionFactor(theme, widget));
}
- if (option->subControls & QStyle::SC_MdiMinButton) {
- buttonRect = proxy()->subControlRect(CC_MdiControls, option, SC_MdiMinButton, widget);
- if (theme.isValid()) {
- theme.partId = WP_MDIMINBUTTON;
- theme.rect = buttonRect;
- if (!(flags & State_Enabled))
- theme.stateId = CBS_INACTIVE;
- else if (flags & State_Sunken && (option->activeSubControls & SC_MdiMinButton))
- theme.stateId = CBS_PUSHED;
- else if (flags & State_MouseOver && (option->activeSubControls & SC_MdiMinButton))
- theme.stateId = CBS_HOT;
- else
- theme.stateId = CBS_NORMAL;
- d->drawBackground(theme);
- }
+ if (option->subControls.testFlag(QStyle::SC_MdiMinButton)) {
+ populateMdiButtonTheme(proxy(), widget, option, SC_MdiMinButton, WP_MDIMINBUTTON, &theme);
+ d->drawBackground(theme, mdiButtonCorrectionFactor(theme, widget));
}
}
break;
@@ -3668,19 +3613,20 @@ QSize QWindowsXPStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt
sz = QWindowsStyle::sizeFromContents(ct, option, sz, widget);
break;
- case CT_MdiControls:
+ case CT_MdiControls: {
+ sz.setHeight(int(QStyleHelper::dpiScaled(19, option)));
+ int width = 54;
if (const QStyleOptionComplex *styleOpt = qstyleoption_cast<const QStyleOptionComplex *>(option)) {
- int width = 0;
+ width = 0;
if (styleOpt->subControls & SC_MdiMinButton)
width += 17 + 1;
if (styleOpt->subControls & SC_MdiNormalButton)
width += 17 + 1;
if (styleOpt->subControls & SC_MdiCloseButton)
width += 17 + 1;
- sz = QSize(width, 19);
- } else {
- sz = QSize(54, 19);
}
+ sz.setWidth(int(QStyleHelper::dpiScaled(width, option)));
+ }
break;
default:
@@ -3774,8 +3720,7 @@ int QWindowsXPStyle::styleHint(StyleHint hint, const QStyleOption *option, const
/*! \reimp */
QPalette QWindowsXPStyle::standardPalette() const
{
- return QWindowsXPStylePrivate::useXP() && QApplicationPrivate::sys_pal
- ? *QApplicationPrivate::sys_pal : QWindowsStyle::standardPalette();
+ return QWindowsXPStylePrivate::useXP() ? QPalette() : QWindowsStyle::standardPalette();
}
/*!
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h b/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h
index ad7754e3d4..06b37a6e5c 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle_p_p.h
@@ -241,8 +241,8 @@ public:
bool isTransparent(XPThemeData &themeData);
QRegion region(XPThemeData &themeData);
- bool drawBackground(XPThemeData &themeData);
- bool drawBackgroundThruNativeBuffer(XPThemeData &themeData, qreal aditionalDevicePixelRatio);
+ bool drawBackground(XPThemeData &themeData, qreal correctionFactor = 1);
+ bool drawBackgroundThruNativeBuffer(XPThemeData &themeData, qreal aditionalDevicePixelRatio, qreal correctionFactor);
bool drawBackgroundDirectly(HDC dc, XPThemeData &themeData, qreal aditionalDevicePixelRatio);
bool hasAlphaChannel(const QRect &rect);
diff --git a/src/plugins/styles/windowsvista/windowsvista.pro b/src/plugins/styles/windowsvista/windowsvista.pro
index c08db7f533..483914c13d 100644
--- a/src/plugins/styles/windowsvista/windowsvista.pro
+++ b/src/plugins/styles/windowsvista/windowsvista.pro
@@ -11,9 +11,7 @@ HEADERS += qwindowsxpstyle_p.h qwindowsxpstyle_p_p.h
SOURCES += qwindowsxpstyle.cpp
QMAKE_USE_PRIVATE += user32 gdi32
-
-# DEFINES/LIBS needed for qwizard_win.cpp and the styles
-include(../../../widgets/kernel/win.pri)
+LIBS_PRIVATE *= -luxtheme
DISTFILES += windowsvistastyle.json
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
index 1d8af9dbf0..78e5b8d1ef 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
@@ -533,10 +533,10 @@ void QPageSetupWidget::setupPrinter() const
{
m_printer->setPageLayout(m_pageLayout);
#if QT_CONFIG(cups)
- QCUPSSupport::PagesPerSheet pagesPerSheet = m_ui.pagesPerSheetCombo->currentData()
- .value<QCUPSSupport::PagesPerSheet>();
- QCUPSSupport::PagesPerSheetLayout pagesPerSheetLayout = m_ui.pagesPerSheetLayoutCombo->currentData()
- .value<QCUPSSupport::PagesPerSheetLayout>();
+ QCUPSSupport::PagesPerSheet pagesPerSheet = qvariant_cast<QCUPSSupport::PagesPerSheet>(m_ui.pagesPerSheetCombo->currentData()
+);
+ QCUPSSupport::PagesPerSheetLayout pagesPerSheetLayout = qvariant_cast<QCUPSSupport::PagesPerSheetLayout>(m_ui.pagesPerSheetLayoutCombo->currentData()
+);
QCUPSSupport::setPagesPerSheetLayout(m_printer, pagesPerSheet, pagesPerSheetLayout);
#endif
#ifdef PSD_ENABLE_PAPERSOURCE
@@ -587,11 +587,11 @@ void QPageSetupWidget::pageSizeChanged()
{
QPageSize pageSize;
if (m_ui.pageSizeCombo->currentIndex() != m_realCustomPageSizeIndex) {
- pageSize = m_ui.pageSizeCombo->currentData().value<QPageSize>();
+ pageSize = qvariant_cast<QPageSize>(m_ui.pageSizeCombo->currentData());
#if QT_CONFIG(cups)
if (m_pageSizePpdOption) {
- ppd_file_t *ppd = m_printDevice->property(PDPK_PpdFile).value<ppd_file_t*>();
+ ppd_file_t *ppd = qvariant_cast<ppd_file_t*>(m_printDevice->property(PDPK_PpdFile));
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];
@@ -676,7 +676,7 @@ void QPageSetupWidget::unitChanged()
{
if (m_blockSignals)
return;
- m_units = m_ui.unitCombo->currentData().value<QPageLayout::Unit>();
+ m_units = qvariant_cast<QPageLayout::Unit>(m_ui.unitCombo->currentData());
m_pageLayout.setUnits(m_units);
updateWidget();
}
@@ -725,7 +725,7 @@ QPageSetupDialog::QPageSetupDialog(QPrinter *printer, QWidget *parent)
}
QPageSetupDialog::QPageSetupDialog(QWidget *parent)
- : QDialog(*(new QUnixPageSetupDialogPrivate(0)), parent)
+ : QDialog(*(new QUnixPageSetupDialogPrivate(nullptr)), parent)
{
Q_D(QPageSetupDialog);
setWindowTitle(QCoreApplication::translate("QPrintPreviewDialog", "Page Setup"));
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index 7bbf137977..bf77666c41 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -426,7 +426,7 @@ bool QPrintPropertiesDialog::createAdvancedOptionsWidget()
{
bool anyWidgetCreated = false;
- ppd_file_t *ppd = m_currentPrintDevice->property(PDPK_PpdFile).value<ppd_file_t*>();
+ ppd_file_t *ppd = qvariant_cast<ppd_file_t*>(m_currentPrintDevice->property(PDPK_PpdFile));
if (ppd) {
m_cupsCodec = QTextCodec::codecForName(ppd->lang_encoding);
@@ -532,7 +532,7 @@ bool QPrintPropertiesDialog::createAdvancedOptionsWidget()
void QPrintPropertiesDialog::setPrinterAdvancedCupsOptions() const
{
for (const QComboBox *choicesCb : m_advancedOptionsCombos) {
- const ppd_option_t *option = choicesCb->property(ppdOptionProperty).value<const ppd_option_t *>();
+ const ppd_option_t *option = qvariant_cast<const ppd_option_t *>(choicesCb->property(ppdOptionProperty));
// 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
@@ -551,7 +551,7 @@ void QPrintPropertiesDialog::setPrinterAdvancedCupsOptions() const
void QPrintPropertiesDialog::revertAdvancedOptionsToSavedValues() const
{
for (QComboBox *choicesCb : m_advancedOptionsCombos) {
- const int originallySelectedChoice = choicesCb->property(ppdOriginallySelectedChoiceProperty).value<int>();
+ const int originallySelectedChoice = qvariant_cast<int>(choicesCb->property(ppdOriginallySelectedChoiceProperty));
const int newComboIndexToSelect = choicesCb->findData(originallySelectedChoice);
choicesCb->setCurrentIndex(newComboIndexToSelect);
// The currentIndexChanged lambda takes care of resetting the ppd option
@@ -580,8 +580,8 @@ bool QPrintPropertiesDialog::anyAdvancedOptionConflict() const
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 *>();
+ const ppd_option_t *option = qvariant_cast<const ppd_option_t *>(choicesCb->property(ppdOptionProperty));
+ QLabel *warningLabel = qvariant_cast<QLabel *>(choicesCb->property(warningLabelProperty));
if (option->conflicted) {
anyConflicted = true;
const int pixmap_size = choicesCb->sizeHint().height() * .75;
@@ -902,7 +902,7 @@ void QPrintDialogPrivate::setupPrinter()
// page set
if (p->printRange() == QPrinter::AllPages || p->printRange() == QPrinter::PageRange) {
//If the application is selecting pages and the first page number is even then need to adjust the odd-even accordingly
- QCUPSSupport::PageSet pageSet = options.pageSetCombo->itemData(options.pageSetCombo->currentIndex()).value<QCUPSSupport::PageSet>();
+ QCUPSSupport::PageSet pageSet = qvariant_cast<QCUPSSupport::PageSet>(options.pageSetCombo->itemData(options.pageSetCombo->currentIndex()));
if (q->isOptionEnabled(QPrintDialog::PrintPageRange)
&& p->printRange() == QPrinter::PageRange
&& (q->fromPage() % 2 == 0)) {
@@ -1178,7 +1178,7 @@ QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p, QPrinter *
void QUnixPrintWidgetPrivate::updateWidget()
{
- const bool printToFile = q == 0 || q->isOptionEnabled(QPrintDialog::PrintToFile);
+ const bool printToFile = q == nullptr || q->isOptionEnabled(QPrintDialog::PrintToFile);
if (printToFile && !filePrintersAdded) {
if (widget.printers->count())
widget.printers->insertSeparator(widget.printers->count());
@@ -1325,10 +1325,10 @@ bool QUnixPrintWidgetPrivate::checkFields()
#if QT_CONFIG(cups)
if (propertiesDialog) {
- QCUPSSupport::PagesPerSheet pagesPerSheet = propertiesDialog->widget.pageSetup->m_ui.pagesPerSheetCombo
- ->currentData().value<QCUPSSupport::PagesPerSheet>();
+ QCUPSSupport::PagesPerSheet pagesPerSheet = qvariant_cast<QCUPSSupport::PagesPerSheet>(propertiesDialog->widget.pageSetup->m_ui.pagesPerSheetCombo
+ ->currentData());
- QCUPSSupport::PageSet pageSet = optionsPane->options.pageSetCombo->currentData().value<QCUPSSupport::PageSet>();
+ QCUPSSupport::PageSet pageSet = qvariant_cast<QCUPSSupport::PageSet>(optionsPane->options.pageSetCombo->currentData());
if (pagesPerSheet != QCUPSSupport::OnePagePerSheet
diff --git a/src/printsupport/dialogs/qprintsettingsoutput.ui b/src/printsupport/dialogs/qprintsettingsoutput.ui
index 290111a98c..360634aaa7 100644
--- a/src/printsupport/dialogs/qprintsettingsoutput.ui
+++ b/src/printsupport/dialogs/qprintsettingsoutput.ui
@@ -351,13 +351,13 @@
<item row="0" column="0">
<widget class="QGroupBox" name="duplex">
<property name="title">
- <string>Duplex Printing</string>
+ <string>Double Sided Printing</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="noDuplex">
<property name="text">
- <string>None</string>
+ <string>Off</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -367,14 +367,14 @@
<item>
<widget class="QRadioButton" name="duplexLong">
<property name="text">
- <string>Long side</string>
+ <string>Long side binding</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="duplexShort">
<property name="text">
- <string>Short side</string>
+ <string>Short side binding</string>
</property>
</widget>
</item>
diff --git a/src/printsupport/kernel/qcups.cpp b/src/printsupport/kernel/qcups.cpp
index 2fc4621960..0fc8cdd1b7 100644
--- a/src/printsupport/kernel/qcups.cpp
+++ b/src/printsupport/kernel/qcups.cpp
@@ -149,7 +149,7 @@ QCUPSSupport::JobHoldUntilWithTime QCUPSSupport::parseJobHoldUntil(const QString
ppd_option_t *QCUPSSupport::findPpdOption(const char *optionName, QPrintDevice *printDevice)
{
- ppd_file_t *ppd = printDevice->property(PDPK_PpdFile).value<ppd_file_t*>();
+ ppd_file_t *ppd = qvariant_cast<ppd_file_t*>(printDevice->property(PDPK_PpdFile));
if (ppd) {
for (int i = 0; i < ppd->num_groups; ++i) {
diff --git a/src/printsupport/kernel/qpaintengine_alpha.cpp b/src/printsupport/kernel/qpaintengine_alpha.cpp
index 410051df2a..8106db4edb 100644
--- a/src/printsupport/kernel/qpaintengine_alpha.cpp
+++ b/src/printsupport/kernel/qpaintengine_alpha.cpp
@@ -377,16 +377,16 @@ void QAlphaPaintEngine::cleanUp()
delete d->m_picpainter;
delete d->m_pic;
- d->m_picpainter = 0;
- d->m_pic = 0;
- d->m_picengine = 0;
+ d->m_picpainter = nullptr;
+ d->m_pic = nullptr;
+ d->m_picengine = nullptr;
}
QAlphaPaintEnginePrivate::QAlphaPaintEnginePrivate()
: m_pass(0),
- m_pic(0),
- m_picengine(0),
- m_picpainter(0),
+ m_pic(nullptr),
+ m_picengine(nullptr),
+ m_picpainter(nullptr),
m_numberOfCachedRects(0),
m_hasalpha(false),
m_alphaPen(false),
diff --git a/src/printsupport/kernel/qpaintengine_alpha_p.h b/src/printsupport/kernel/qpaintengine_alpha_p.h
index efae442690..bc6ca91017 100644
--- a/src/printsupport/kernel/qpaintengine_alpha_p.h
+++ b/src/printsupport/kernel/qpaintengine_alpha_p.h
@@ -81,7 +81,7 @@ public:
void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) override;
protected:
- QAlphaPaintEngine(QAlphaPaintEnginePrivate &data, PaintEngineFeatures devcaps = 0);
+ QAlphaPaintEngine(QAlphaPaintEnginePrivate &data, PaintEngineFeatures devcaps = { });
QRegion alphaClipping() const;
bool continueCall() const;
void flushAndInit(bool init = true);
diff --git a/src/printsupport/kernel/qplatformprintplugin.h b/src/printsupport/kernel/qplatformprintplugin.h
index 30e8f7938a..db28da4dd3 100644
--- a/src/printsupport/kernel/qplatformprintplugin.h
+++ b/src/printsupport/kernel/qplatformprintplugin.h
@@ -66,7 +66,7 @@ class Q_PRINTSUPPORT_EXPORT QPlatformPrinterSupportPlugin : public QObject
{
Q_OBJECT
public:
- explicit QPlatformPrinterSupportPlugin(QObject *parent = 0);
+ explicit QPlatformPrinterSupportPlugin(QObject *parent = nullptr);
~QPlatformPrinterSupportPlugin();
virtual QPlatformPrinterSupport *create(const QString &key) = 0;
diff --git a/src/printsupport/kernel/qprintengine_pdf.cpp b/src/printsupport/kernel/qprintengine_pdf.cpp
index 3c24e5ac69..7f1c20916b 100644
--- a/src/printsupport/kernel/qprintengine_pdf.cpp
+++ b/src/printsupport/kernel/qprintengine_pdf.cpp
@@ -217,19 +217,19 @@ void QPdfPrintEngine::setProperty(PrintEnginePropertyKey key, const QVariant &va
break;
}
case PPK_QPageSize: {
- QPageSize pageSize = value.value<QPageSize>();
+ QPageSize pageSize = qvariant_cast<QPageSize>(value);
if (pageSize.isValid())
d->m_pageLayout.setPageSize(pageSize);
break;
}
case PPK_QPageMargins: {
- QPair<QMarginsF, QPageLayout::Unit> pair = value.value<QPair<QMarginsF, QPageLayout::Unit> >();
+ QPair<QMarginsF, QPageLayout::Unit> pair = qvariant_cast<QPair<QMarginsF, QPageLayout::Unit> >(value);
d->m_pageLayout.setUnits(pair.second);
d->m_pageLayout.setMargins(pair.first);
break;
}
case PPK_QPageLayout: {
- QPageLayout pageLayout = value.value<QPageLayout>();
+ QPageLayout pageLayout = qvariant_cast<QPageLayout>(value);
if (pageLayout.isValid())
d->m_pageLayout = pageLayout;
break;
diff --git a/src/printsupport/kernel/qprintengine_pdf_p.h b/src/printsupport/kernel/qprintengine_pdf_p.h
index e7ae21f260..c8d8f8e866 100644
--- a/src/printsupport/kernel/qprintengine_pdf_p.h
+++ b/src/printsupport/kernel/qprintengine_pdf_p.h
@@ -55,7 +55,6 @@
#ifndef QT_NO_PRINTER
#include "QtCore/qmap.h"
-#include "QtGui/qmatrix.h"
#include "QtCore/qstring.h"
#include "QtCore/qvector.h"
#include "QtGui/qpaintengine.h"
diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp
index ddcd8c4702..fbf5e5c2ba 100644
--- a/src/printsupport/kernel/qprinter.cpp
+++ b/src/printsupport/kernel/qprinter.cpp
@@ -294,7 +294,7 @@ public:
{
QPrinterPrivate *pd = QPrinterPrivate::get(m_printer);
- return pd->printEngine->property(QPrintEngine::PPK_QPageLayout).value<QPageLayout>();
+ return qvariant_cast<QPageLayout>(pd->printEngine->property(QPrintEngine::PPK_QPageLayout));
}
QPrinter *m_printer;
diff --git a/src/printsupport/kernel/qprinter_p.h b/src/printsupport/kernel/qprinter_p.h
index 37c9702c17..4c42ed5717 100644
--- a/src/printsupport/kernel/qprinter_p.h
+++ b/src/printsupport/kernel/qprinter_p.h
@@ -76,12 +76,12 @@ class Q_PRINTSUPPORT_EXPORT QPrinterPrivate
public:
QPrinterPrivate(QPrinter *printer)
: pdfVersion(QPrinter::PdfVersion_1_4),
- printEngine(0),
- paintEngine(0),
- realPrintEngine(0),
- realPaintEngine(0),
+ printEngine(nullptr),
+ paintEngine(nullptr),
+ realPrintEngine(nullptr),
+ realPaintEngine(nullptr),
#if QT_CONFIG(printpreviewwidget)
- previewEngine(0),
+ previewEngine(nullptr),
#endif
q_ptr(printer),
printRange(QPrinter::AllPages),
diff --git a/src/printsupport/widgets/qcupsjobwidget.cpp b/src/printsupport/widgets/qcupsjobwidget.cpp
index dcdb933f73..456ed9db19 100644
--- a/src/printsupport/widgets/qcupsjobwidget.cpp
+++ b/src/printsupport/widgets/qcupsjobwidget.cpp
@@ -150,7 +150,7 @@ void QCupsJobWidget::setJobHold(QCUPSSupport::JobHoldUntil jobHold, const QTime
QCUPSSupport::JobHoldUntil QCupsJobWidget::jobHold() const
{
- return m_ui.jobHoldComboBox->itemData(m_ui.jobHoldComboBox->currentIndex()).value<QCUPSSupport::JobHoldUntil>();
+ return qvariant_cast<QCUPSSupport::JobHoldUntil>(m_ui.jobHoldComboBox->itemData(m_ui.jobHoldComboBox->currentIndex()));
}
void QCupsJobWidget::toggleJobHoldTime()
@@ -247,7 +247,7 @@ void QCupsJobWidget::setStartBannerPage(const QCUPSSupport::BannerPage bannerPag
QCUPSSupport::BannerPage QCupsJobWidget::startBannerPage() const
{
- return m_ui.startBannerPageCombo->itemData(m_ui.startBannerPageCombo->currentIndex()).value<QCUPSSupport::BannerPage>();
+ return qvariant_cast<QCUPSSupport::BannerPage>(m_ui.startBannerPageCombo->itemData(m_ui.startBannerPageCombo->currentIndex()));
}
void QCupsJobWidget::setEndBannerPage(const QCUPSSupport::BannerPage bannerPage)
@@ -257,7 +257,7 @@ void QCupsJobWidget::setEndBannerPage(const QCUPSSupport::BannerPage bannerPage)
QCUPSSupport::BannerPage QCupsJobWidget::endBannerPage() const
{
- return m_ui.endBannerPageCombo->itemData(m_ui.endBannerPageCombo->currentIndex()).value<QCUPSSupport::BannerPage>();
+ return qvariant_cast<QCUPSSupport::BannerPage>(m_ui.endBannerPageCombo->itemData(m_ui.endBannerPageCombo->currentIndex()));
}
QT_END_NAMESPACE
diff --git a/src/printsupport/widgets/qprintpreviewwidget.cpp b/src/printsupport/widgets/qprintpreviewwidget.cpp
index 92370be2bd..16b84e328d 100644
--- a/src/printsupport/widgets/qprintpreviewwidget.cpp
+++ b/src/printsupport/widgets/qprintpreviewwidget.cpp
@@ -264,7 +264,7 @@ void QPrintPreviewWidgetPrivate::_q_fit(bool doFitting)
} else {
graphicsView->fitInView(target, Qt::KeepAspectRatio);
if (zoomMode == QPrintPreviewWidget::FitInView) {
- int step = qRound(graphicsView->matrix().mapRect(target).height());
+ const int step = qRound(graphicsView->transform().mapRect(target).height());
graphicsView->verticalScrollBar()->setSingleStep(step);
graphicsView->verticalScrollBar()->setPageStep(step);
}
diff --git a/src/sql/doc/snippets/code/doc_src_sql-driver.qdoc b/src/sql/doc/snippets/code/doc_src_sql-driver.qdoc
index 12a39d80b2..b869b309b7 100644
--- a/src/sql/doc/snippets/code/doc_src_sql-driver.qdoc
+++ b/src/sql/doc/snippets/code/doc_src_sql-driver.qdoc
@@ -235,7 +235,7 @@ make sub-oci
//! [35]
QSqlDatabase: QPSQL driver not loaded
-QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
+QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QMARIADB QODBC QODBC3 QPSQL QPSQL7
Could not create database object
//! [35]
diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc
index f6fc90a7e9..e77cc772e6 100644
--- a/src/sql/doc/src/sql-driver.qdoc
+++ b/src/sql/doc/src/sql-driver.qdoc
@@ -48,7 +48,7 @@
\header \li Driver name \li DBMS
\row \li \l{#QDB2}{QDB2} \li IBM DB2 (version 7.1 and above)
\row \li \l{#QIBASE}{QIBASE} \li Borland InterBase
- \row \li \l{#QMYSQL}{QMYSQL} \li MySQL (version 5.0 and above)
+ \row \li \l{#QMYSQL}{QMYSQL / MARIADB} \li MySQL or MariaDB (version 5.0 and above)
\row \li \l{#QOCI}{QOCI} \li Oracle Call Interface Driver
\row \li \l{#QODBC}{QODBC}
\li Open Database Connectivity (ODBC) - Microsoft SQL Server and other
@@ -123,7 +123,13 @@
\section1 Driver Specifics
\target QMYSQL
- \section2 QMYSQL for MySQL 5 and higher
+ \section2 QMYSQL for MySQL or MariaDB 5 and higher
+
+ MariaDB is a fork of MySQL intended to remain free and open-source software
+ under the GNU General Public License. MariaDB intended to maintain high
+ compatibility with MySQL, ensuring a drop-in replacement capability with
+ library binary parity and exact matching with MySQL APIs and commands.
+ Therefore the plugin for MySQL and MariaDB are combined into one Qt plugin.
\section3 QMYSQL Stored Procedure Support
@@ -158,12 +164,13 @@
\section3 How to Build the QMYSQL Plugin on Unix and \macos
- You need the MySQL header files, as well as the shared library
- \c{libmysqlclient.so}. Depending on your Linux distribution, you may
- need to install a package which is usually called "mysql-devel".
+ You need the MySQL / MariaDB header files, as well as the shared library
+ \c{libmysqlclient.so} / \c{libmariadb.so}. Depending on your Linux distribution,
+ you may need to install a package which is usually called "mysql-devel"
+ or "mariadb-devel".
- Tell \l qmake where to find the MySQL header files and shared
- libraries (here it is assumed that MySQL is installed in
+ Tell \l qmake where to find the MySQL / MariaDB header files and shared
+ libraries (here it is assumed that MySQL / MariaDB is installed in
\c{/usr/local}) and run \c{make}:
\snippet code/doc_src_sql-driver.qdoc 3
@@ -171,7 +178,8 @@
\section3 How to Build the QMYSQL Plugin on Windows
You need to get the MySQL installation files (e.g.
- \l {https://dev.mysql.com/downloads/installer/}{mysql-installer-web-community-8.0.18.0.msi}).
+ \l {https://dev.mysql.com/downloads/installer/}{mysql-installer-web-community-8.0.18.0.msi}) or
+ \l {https://downloads.mariadb.org/connector-c/3.1.5/}{mariadb-connector-c-3.1.5-win64.msi}.
Run the installer,
select custom installation and install the MySQL C Connector
which matches your Qt installation (x86 or x64).
@@ -181,6 +189,12 @@
\li \c {<MySQL dir>/lib/libmysql.dll}
\li \c {<MySQL dir>/include/mysql.h}
\endlist
+ and for MariaDB
+ \list
+ \li \c {<MariaDB dir>/lib/libmariadb.lib}
+ \li \c {<MariaDB dir>/lib/libmariadb.dll}
+ \li \c {<MariaDB dir>/include/mysql.h}
+ \endlist
Build the plugin as follows (here it is assumed that the MySQL
C Connector is installed in
@@ -191,7 +205,7 @@
If you are not using a Microsoft compiler, replace \c nmake with \c
mingw32-make in the line above.
- When you distribute your application, remember to include libmysql.dll
+ When you distribute your application, remember to include libmysql.dll / libmariadb.dll
in your installation package. It must be placed in the same folder
as the application executable. \e libmysql.dll additionally needs the
MSVC runtime libraries which can be installed with
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 01726d79ef..32338c1fe2 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -84,7 +84,7 @@ Q_GLOBAL_STATIC(QConnectionDict, dbDict)
class QSqlDatabasePrivate
{
public:
- QSqlDatabasePrivate(QSqlDatabase *d, QSqlDriver *dr = 0):
+ QSqlDatabasePrivate(QSqlDatabase *d, QSqlDriver *dr = nullptr):
ref(1),
q(d),
driver(dr),
@@ -178,7 +178,7 @@ DriverDict &QSqlDatabasePrivate::driverDict()
QSqlDatabasePrivate *QSqlDatabasePrivate::shared_null()
{
static QSqlNullDriver dr;
- static QSqlDatabasePrivate n(NULL, &dr);
+ static QSqlDatabasePrivate n(nullptr, &dr);
return &n;
}
@@ -702,7 +702,7 @@ void QSqlDatabasePrivate::init(const QString &type)
qWarning("QSqlDatabase: %s driver not loaded", type.toLatin1().data());
qWarning("QSqlDatabase: available drivers: %s",
QSqlDatabase::drivers().join(QLatin1Char(' ')).toLatin1().data());
- if (QCoreApplication::instance() == 0)
+ if (QCoreApplication::instance() == nullptr)
qWarning("QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins");
driver = shared_null()->driver;
}
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index 7f7b81b05b..d1c9057aac 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
static QString prepareIdentifier(const QString &identifier,
QSqlDriver::IdentifierType type, const QSqlDriver *driver)
{
- Q_ASSERT( driver != NULL );
+ Q_ASSERT( driver != nullptr );
QString ret = identifier;
if (!driver->isIdentifierEscaped(identifier, type)) {
ret = driver->escapeIdentifier(identifier, type);
@@ -110,6 +110,9 @@ QSqlDriver::~QSqlDriver()
that the driver subscribes to. \a name identifies the event notification.
\sa subscribeToNotification()
+
+ \obsolete use QSqlDriver::notification(const QString &name, QSqlDriver::NotificationSource source, const QVariant &payload)
+ instead
*/
/*!
@@ -609,30 +612,30 @@ QString QSqlDriver::formatValue(const QSqlField &field, bool trimStrings) const
if (field.isNull())
r = nullTxt;
else {
- switch (field.type()) {
- case QVariant::Int:
- case QVariant::UInt:
- if (field.value().type() == QVariant::Bool)
+ switch (+field.type()) {
+ case QMetaType::Int:
+ case QMetaType::UInt:
+ if (field.value().userType() == QMetaType::Bool)
r = field.value().toBool() ? QLatin1String("1") : QLatin1String("0");
else
r = field.value().toString();
break;
#if QT_CONFIG(datestring)
- case QVariant::Date:
+ case QMetaType::QDate:
if (field.value().toDate().isValid())
r = QLatin1Char('\'') + field.value().toDate().toString(Qt::ISODate)
+ QLatin1Char('\'');
else
r = nullTxt;
break;
- case QVariant::Time:
+ case QMetaType::QTime:
if (field.value().toTime().isValid())
r = QLatin1Char('\'') + field.value().toTime().toString(Qt::ISODate)
+ QLatin1Char('\'');
else
r = nullTxt;
break;
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
if (field.value().toDateTime().isValid())
r = QLatin1Char('\'') +
field.value().toDateTime().toString(Qt::ISODate) + QLatin1Char('\'');
@@ -640,8 +643,8 @@ QString QSqlDriver::formatValue(const QSqlField &field, bool trimStrings) const
r = nullTxt;
break;
#endif
- case QVariant::String:
- case QVariant::Char:
+ case QMetaType::QString:
+ case QMetaType::QChar:
{
QString result = field.value().toString();
if (trimStrings) {
@@ -655,10 +658,10 @@ QString QSqlDriver::formatValue(const QSqlField &field, bool trimStrings) const
r = QLatin1Char('\'') + result + QLatin1Char('\'');
break;
}
- case QVariant::Bool:
+ case QMetaType::Bool:
r = QString::number(field.value().toBool());
break;
- case QVariant::ByteArray : {
+ case QMetaType::QByteArray : {
if (hasFeature(BLOB)) {
QByteArray ba = field.value().toByteArray();
QString res;
diff --git a/src/sql/kernel/qsqldriver.h b/src/sql/kernel/qsqldriver.h
index 1e03be48d3..ca9f7dc51e 100644
--- a/src/sql/kernel/qsqldriver.h
+++ b/src/sql/kernel/qsqldriver.h
@@ -135,7 +135,10 @@ public Q_SLOTS:
virtual bool cancelQuery();
Q_SIGNALS:
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use the 3-args version of notification() instead.")
void notification(const QString &name);
+#endif
void notification(const QString &name, QSqlDriver::NotificationSource source, const QVariant &payload);
protected:
diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp
index 5a6d173b3b..86a22bae10 100644
--- a/src/sql/kernel/qsqlfield.cpp
+++ b/src/sql/kernel/qsqlfield.cpp
@@ -48,7 +48,7 @@ class QSqlFieldPrivate
public:
QSqlFieldPrivate(const QString &name,
QVariant::Type type, const QString &tableName) :
- ref(1), nm(name), table(tableName), def(QVariant()), type(type),
+ ref(1), nm(name), table(tableName), def(QVariant()), type(QMetaType::Type(type)),
req(QSqlField::Unknown), len(-1), prec(-1), tp(-1),
ro(false), gen(true), autoval(false)
{}
@@ -86,7 +86,7 @@ public:
QString nm;
QString table;
QVariant def;
- QVariant::Type type;
+ QMetaType::Type type;
QSqlField::RequiredStatus req;
int len;
int prec;
@@ -399,7 +399,7 @@ QString QSqlField::name() const
*/
QVariant::Type QSqlField::type() const
{
- return d->type;
+ return QVariant::Type(d->type);
}
/*!
@@ -411,12 +411,11 @@ QVariant::Type QSqlField::type() const
void QSqlField::setType(QVariant::Type type)
{
detach();
- d->type = type;
+ d->type = QMetaType::Type(type);
if (!val.isValid())
val = QVariant(type);
}
-
/*!
Returns \c true if the field's value is read-only; otherwise returns
false.
@@ -526,7 +525,7 @@ bool QSqlField::isGenerated() const
*/
bool QSqlField::isValid() const
{
- return d->type != QVariant::Invalid;
+ return d->type != QMetaType::UnknownType;
}
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/sql/kernel/qsqlfield.h b/src/sql/kernel/qsqlfield.h
index 8650ba8715..892420d26e 100644
--- a/src/sql/kernel/qsqlfield.h
+++ b/src/sql/kernel/qsqlfield.h
@@ -55,7 +55,7 @@ public:
enum RequiredStatus { Unknown = -1, Optional = 0, Required = 1 };
explicit QSqlField(const QString& fieldName = QString(),
- QVariant::Type type = QVariant::Invalid);
+ QVariant::Type type = {});
QSqlField(const QString &fieldName, QVariant::Type type,
const QString &tableName);
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index cc91c6d0ed..a41b3d8424 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -645,7 +645,7 @@ bool QSqlResult::exec()
for (i = d->holders.count() - 1; i >= 0; --i) {
holder = d->holders.at(i).holderName;
val = d->values.value(d->indexes.value(holder).value(0,-1));
- QSqlField f(QLatin1String(""), val.type());
+ QSqlField f(QLatin1String(""), QVariant::Type(val.userType()));
f.setValue(val);
query = query.replace(d->holders.at(i).holderPos,
holder.length(), driver()->formatValue(f));
@@ -659,7 +659,7 @@ bool QSqlResult::exec()
if (i == -1)
continue;
QVariant var = d->values.value(idx);
- QSqlField f(QLatin1String(""), var.type());
+ QSqlField f(QLatin1String(""), QVariant::Type(var.userType()));
if (var.isNull())
f.clear();
else
diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp
index 34be010474..20adec6a3b 100644
--- a/src/sql/models/qsqlrelationaltablemodel.cpp
+++ b/src/sql/models/qsqlrelationaltablemodel.cpp
@@ -137,7 +137,7 @@ class QRelatedTableModel;
struct QRelation
{
public:
- QRelation(): model(0), m_parent(0), m_dictInitialized(false) {}
+ QRelation(): model(nullptr), m_parent(nullptr), m_dictInitialized(false) {}
void init(QSqlRelationalTableModel *parent, const QSqlRelation &relation);
void populateModel();
@@ -161,7 +161,7 @@ struct QRelation
class QRelatedTableModel : public QSqlTableModel
{
public:
- QRelatedTableModel(QRelation *rel, QObject *parent = 0, QSqlDatabase db = QSqlDatabase());
+ QRelatedTableModel(QRelation *rel, QObject *parent = nullptr, QSqlDatabase db = QSqlDatabase());
bool select() override;
private:
bool firstSelect;
@@ -174,7 +174,7 @@ private:
*/
void QRelation::init(QSqlRelationalTableModel *parent, const QSqlRelation &relation)
{
- Q_ASSERT(parent != NULL);
+ Q_ASSERT(parent != nullptr);
m_parent = parent;
rel = relation;
}
@@ -183,7 +183,7 @@ void QRelation::populateModel()
{
if (!isValid())
return;
- Q_ASSERT(m_parent != NULL);
+ Q_ASSERT(m_parent != nullptr);
if (!model) {
model = new QRelatedTableModel(this, m_parent, m_parent->database());
@@ -202,7 +202,7 @@ void QRelation::populateDictionary()
if (!isValid())
return;
- if (model == NULL)
+ if (model == nullptr)
populateModel();
QSqlRecord record;
@@ -234,13 +234,13 @@ void QRelation::clearDictionary()
void QRelation::clear()
{
delete model;
- model = 0;
+ model = nullptr;
clearDictionary();
}
bool QRelation::isValid()
{
- return (rel.isValid() && m_parent != NULL);
+ return (rel.isValid() && m_parent != nullptr);
}
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 969194983e..7d2421d34e 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -1305,7 +1305,7 @@ Qt::ItemFlags QSqlTableModel::flags(const QModelIndex &index) const
Q_D(const QSqlTableModel);
if (index.internalPointer() || index.column() < 0 || index.column() >= d->rec.count()
|| index.row() < 0)
- return 0;
+ return { };
bool editable = true;
@@ -1369,7 +1369,7 @@ QSqlRecord QSqlTableModel::record(int row) const
// get generated flags from the cache
const QSqlTableModelPrivate::ModifiedRow mrow = d->cache.value(row);
if (mrow.op() != QSqlTableModelPrivate::None) {
- const QSqlRecord crec = mrow.rec();
+ const QSqlRecord &crec = mrow.rec();
for (int i = 0, cnt = rec.count(); i < cnt; ++i)
rec.setGenerated(i, crec.isGenerated(i));
}
diff --git a/src/src.pro b/src/src.pro
index 8ff3ec4c1f..592f0cf644 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -70,7 +70,7 @@ src_winmain.depends = sub-corelib # just for the module .pri file
src_corelib.subdir = $$PWD/corelib
src_corelib.target = sub-corelib
-src_corelib.depends = src_tools_moc src_tools_rcc src_tools_tracegen
+src_corelib.depends = src_tools_moc src_tools_tracegen
src_xml.subdir = $$PWD/xml
src_xml.target = sub-xml
@@ -118,7 +118,7 @@ src_angle.target = sub-angle
src_gui.subdir = $$PWD/gui
src_gui.target = sub-gui
-src_gui.depends = src_corelib
+src_gui.depends = src_corelib src_tools_rcc
src_platformheaders.subdir = $$PWD/platformheaders
src_platformheaders.target = sub-platformheaders
diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc
index 89edabf3f3..3acc08d8f4 100644
--- a/src/testlib/doc/src/qttestlib-manual.qdoc
+++ b/src/testlib/doc/src/qttestlib-manual.qdoc
@@ -237,7 +237,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, \c xunitxml or \c tap). The special filename \c -
+ \c txt, \c xml, \c lightxml, \c junitxml 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.
@@ -247,8 +247,8 @@
Outputs results as an XML document.
\li \c -lightxml \br
Outputs results as a stream of XML tags.
- \li \c -xunitxml \br
- Outputs results as an Xunit XML document.
+ \li \c -junitxml \br
+ Outputs results as an JUnit XML document.
\li \c -csv \br
Outputs results as comma-separated values (CSV). This mode is only suitable for
benchmarks, since it suppresses normal pass/fail messages.
@@ -264,7 +264,7 @@
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,
- \c -xunitxml or \c -tap options should be used.
+ \c -junitxml 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/qabstractitemmodeltester.cpp b/src/testlib/qabstractitemmodeltester.cpp
index 859966c0e3..2e05097122 100644
--- a/src/testlib/qabstractitemmodeltester.cpp
+++ b/src/testlib/qabstractitemmodeltester.cpp
@@ -605,7 +605,7 @@ void QAbstractItemModelTesterPrivate::data()
// Check that the alignment is one we know about
QVariant textAlignmentVariant = model->data(model->index(0, 0), Qt::TextAlignmentRole);
if (textAlignmentVariant.isValid()) {
- Qt::Alignment alignment = textAlignmentVariant.value<Qt::Alignment>();
+ Qt::Alignment alignment = qvariant_cast<Qt::Alignment>(textAlignmentVariant);
MODELTESTER_COMPARE(alignment, (alignment & (Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask)));
}
diff --git a/src/testlib/qxunittestlogger.cpp b/src/testlib/qjunittestlogger.cpp
index b3cac9cb82..2d71f7967b 100644
--- a/src/testlib/qxunittestlogger.cpp
+++ b/src/testlib/qjunittestlogger.cpp
@@ -37,9 +37,9 @@
**
****************************************************************************/
-#include <QtTest/private/qxunittestlogger_p.h>
+#include <QtTest/private/qjunittestlogger_p.h>
#include <QtTest/private/qtestelement_p.h>
-#include <QtTest/private/qtestxunitstreamer_p.h>
+#include <QtTest/private/qtestjunitstreamer_p.h>
#include <QtTest/qtestcase.h>
#include <QtTest/private/qtestresult_p.h>
#include <QtTest/private/qbenchmark_p.h>
@@ -57,27 +57,27 @@
QT_BEGIN_NAMESPACE
-QXunitTestLogger::QXunitTestLogger(const char *filename)
+QJUnitTestLogger::QJUnitTestLogger(const char *filename)
: QAbstractTestLogger(filename)
{
}
-QXunitTestLogger::~QXunitTestLogger()
+QJUnitTestLogger::~QJUnitTestLogger()
{
delete currentLogElement;
delete logFormatter;
}
-void QXunitTestLogger::startLogging()
+void QJUnitTestLogger::startLogging()
{
QAbstractTestLogger::startLogging();
- logFormatter = new QTestXunitStreamer(this);
+ logFormatter = new QTestJUnitStreamer(this);
delete errorLogElement;
errorLogElement = new QTestElement(QTest::LET_SystemError);
}
-void QXunitTestLogger::stopLogging()
+void QJUnitTestLogger::stopLogging()
{
QTestElement *iterator = listOfTestcases;
@@ -132,7 +132,7 @@ void QXunitTestLogger::stopLogging()
QAbstractTestLogger::stopLogging();
}
-void QXunitTestLogger::enterTestFunction(const char *function)
+void QJUnitTestLogger::enterTestFunction(const char *function)
{
currentLogElement = new QTestElement(QTest::LET_TestCase);
currentLogElement->addAttribute(QTest::AI_Name, function);
@@ -141,11 +141,11 @@ void QXunitTestLogger::enterTestFunction(const char *function)
++testCounter;
}
-void QXunitTestLogger::leaveTestFunction()
+void QJUnitTestLogger::leaveTestFunction()
{
}
-void QXunitTestLogger::addIncident(IncidentTypes type, const char *description,
+void QJUnitTestLogger::addIncident(IncidentTypes type, const char *description,
const char *file, int line)
{
const char *typeBuf = nullptr;
@@ -242,15 +242,15 @@ void QXunitTestLogger::addIncident(IncidentTypes type, const char *description,
currentLogElement->addAttribute(QTest::AI_Line, buf);
/*
- Since XFAIL does not add a failure to the testlog in xunitxml, add a message, so we still
+ Since XFAIL does not add a failure to the testlog in junitxml, add a message, so we still
have some information about the expected failure.
*/
if (type == QAbstractTestLogger::XFail) {
- QXunitTestLogger::addMessage(QAbstractTestLogger::Info, QString::fromUtf8(description), file, line);
+ QJUnitTestLogger::addMessage(QAbstractTestLogger::Info, QString::fromUtf8(description), file, line);
}
}
-void QXunitTestLogger::addBenchmarkResult(const QBenchmarkResult &result)
+void QJUnitTestLogger::addBenchmarkResult(const QBenchmarkResult &result)
{
QTestElement *benchmarkElement = new QTestElement(QTest::LET_Benchmark);
@@ -268,7 +268,7 @@ void QXunitTestLogger::addBenchmarkResult(const QBenchmarkResult &result)
currentLogElement->addLogElement(benchmarkElement);
}
-void QXunitTestLogger::addTag(QTestElement* element)
+void QJUnitTestLogger::addTag(QTestElement* element)
{
const char *tag = QTestResult::currentDataTag();
const char *gtag = QTestResult::currentGlobalDataTag();
@@ -289,7 +289,7 @@ void QXunitTestLogger::addTag(QTestElement* element)
element->addAttribute(QTest::AI_Tag, buf.constData());
}
-void QXunitTestLogger::addMessage(MessageTypes type, const QString &message, const char *file, int line)
+void QJUnitTestLogger::addMessage(MessageTypes type, const QString &message, const char *file, int line)
{
QTestElement *errorElement = new QTestElement(QTest::LET_Error);
const char *typeBuf = nullptr;
diff --git a/src/testlib/qxunittestlogger_p.h b/src/testlib/qjunittestlogger_p.h
index 518ba098f4..6fd4e4c331 100644
--- a/src/testlib/qxunittestlogger_p.h
+++ b/src/testlib/qjunittestlogger_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QXUNITTESTLOGGER_P_H
-#define QXUNITTESTLOGGER_P_H
+#ifndef QJUNITTESTLOGGER_P_H
+#define QJUNITTESTLOGGER_P_H
//
// W A R N I N G
@@ -55,14 +55,14 @@
QT_BEGIN_NAMESPACE
-class QTestXunitStreamer;
+class QTestJUnitStreamer;
class QTestElement;
-class QXunitTestLogger : public QAbstractTestLogger
+class QJUnitTestLogger : public QAbstractTestLogger
{
public:
- QXunitTestLogger(const char *filename);
- ~QXunitTestLogger();
+ QJUnitTestLogger(const char *filename);
+ ~QJUnitTestLogger();
void startLogging() override;
void stopLogging() override;
@@ -82,7 +82,7 @@ class QXunitTestLogger : public QAbstractTestLogger
QTestElement *listOfTestcases = nullptr;
QTestElement *currentLogElement = nullptr;
QTestElement *errorLogElement = nullptr;
- QTestXunitStreamer *logFormatter = nullptr;
+ QTestJUnitStreamer *logFormatter = nullptr;
int testCounter = 0;
int failureCounter = 0;
@@ -91,4 +91,4 @@ class QXunitTestLogger : public QAbstractTestLogger
QT_END_NAMESPACE
-#endif // QXUNITTESTLOGGER_P_H
+#endif // QJUNITTESTLOGGER_P_H
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
index 3b1ffb389e..0298ff96e3 100644
--- a/src/testlib/qtest.h
+++ b/src/testlib/qtest.h
@@ -218,7 +218,7 @@ template<> inline char *toString(const QVariant &v)
vstring.append(type);
if (!v.isNull()) {
vstring.append(',');
- if (v.canConvert(QVariant::String)) {
+ if (v.canConvert(QMetaType::QString)) {
vstring.append(v.toString().toLocal8Bit());
}
else {
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 70733a692a..20c370dc38 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -58,8 +58,8 @@
#include <QtCore/qdiriterator.h>
#include <QtCore/qtemporarydir.h>
#include <QtCore/qthread.h>
-#include <QtCore/qwaitcondition.h>
-#include <QtCore/qmutex.h>
+#include <QtCore/private/qlocking_p.h>
+#include <QtCore/private/qwaitcondition_p.h>
#include <QtCore/qtestsupport_core.h>
@@ -85,6 +85,9 @@
#include <cmath>
#include <numeric>
#include <algorithm>
+#include <condition_variable>
+#include <mutex>
+#include <chrono>
#include <stdarg.h>
#include <stdio.h>
@@ -151,10 +154,6 @@ static bool debuggerPresent()
#elif defined(Q_OS_WIN)
return IsDebuggerPresent();
#elif defined(Q_OS_MACOS)
- auto equals = [](CFStringRef str1, CFStringRef str2) -> bool {
- return CFStringCompare(str1, str2, kCFCompareCaseInsensitive) == kCFCompareEqualTo;
- };
-
// Check if there is an exception handler for the process:
mach_msg_type_number_t portCount = 0;
exception_mask_t masks[EXC_TYPES_COUNT];
@@ -171,25 +170,22 @@ static bool debuggerPresent()
}
}
}
-
- // Ok, no debugger attached. So, let's see if CrashReporter will throw up a dialog. If so, we
- // leave it to the OS to do the stack trace.
- CFStringRef crashReporterType = static_cast<CFStringRef>(
- CFPreferencesCopyAppValue(CFSTR("DialogType"), CFSTR("com.apple.CrashReporter")));
- if (crashReporterType == nullptr)
- return true;
-
- const bool createsStackTrace =
- !equals(crashReporterType, CFSTR("server")) &&
- !equals(crashReporterType, CFSTR("none"));
- CFRelease(crashReporterType);
- return createsStackTrace;
+ return false;
#else
// TODO
return false;
#endif
}
+static bool hasSystemCrashReporter()
+{
+#if defined(Q_OS_MACOS)
+ return QTestPrivate::macCrashReporterWillShowDialog();
+#else
+ return false;
+#endif
+}
+
static void disableCoreDump()
{
bool ok = false;
@@ -213,7 +209,7 @@ static void stackTrace()
if (ok && disableStackDump == 1)
return;
- if (debuggerPresent())
+ if (debuggerPresent() || hasSystemCrashReporter())
return;
#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
@@ -287,14 +283,15 @@ namespace QTestPrivate
namespace QTest
{
+extern Q_TESTLIB_EXPORT int lastMouseTimestamp;
+
class WatchDog;
static QObject *currentTestObject = nullptr;
static QString mainSourcePath;
#if defined(Q_OS_MACOS)
-bool macNeedsActivate = false;
-IOPMAssertionID powerID;
+static IOPMAssertionID macPowerSavingDisabled = 0;
#endif
class TestMethods {
@@ -406,7 +403,7 @@ int Q_TESTLIB_EXPORT defaultKeyDelay()
return keyDelay;
}
#if QT_CONFIG(thread)
-static int defaultTimeout()
+static std::chrono::milliseconds defaultTimeout()
{
if (timeout == -1) {
bool ok = false;
@@ -415,7 +412,7 @@ static int defaultTimeout()
if (!ok || timeout <= 0)
timeout = 5*60*1000;
}
- return timeout;
+ return std::chrono::milliseconds{timeout};
}
#endif
@@ -533,7 +530,7 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool
" Valid formats are:\n"
" txt : Plain text\n"
" csv : CSV format (suitable for benchmarks)\n"
- " xunitxml : XML XUnit document\n"
+ " junitxml : XML JUnit document\n"
" xml : XML document\n"
" lightxml : A stream of XML tags\n"
" teamcity : TeamCity format\n"
@@ -545,7 +542,7 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool
" -o filename : Write the output into file\n"
" -txt : Output results in Plain Text\n"
" -csv : Output results in a CSV format (suitable for benchmarks)\n"
- " -xunitxml : Output results as XML XUnit document\n"
+ " -junitxml : Output results as XML JUnit document\n"
" -xml : Output results as XML document\n"
" -lightxml : Output results as stream of XML tags\n"
" -teamcity : Output results in TeamCity format\n"
@@ -629,8 +626,8 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool
logFormat = QTestLog::Plain;
} else if (strcmp(argv[i], "-csv") == 0) {
logFormat = QTestLog::CSV;
- } else if (strcmp(argv[i], "-xunitxml") == 0) {
- logFormat = QTestLog::XunitXML;
+ } else if (strcmp(argv[i], "-junitxml") == 0 || strcmp(argv[i], "-xunitxml") == 0) {
+ logFormat = QTestLog::JUnitXML;
} else if (strcmp(argv[i], "-xml") == 0) {
logFormat = QTestLog::XML;
} else if (strcmp(argv[i], "-lightxml") == 0) {
@@ -669,14 +666,14 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool
logFormat = QTestLog::LightXML;
else if (strcmp(format, "xml") == 0)
logFormat = QTestLog::XML;
- else if (strcmp(format, "xunitxml") == 0)
- logFormat = QTestLog::XunitXML;
+ else if (strcmp(format, "junitxml") == 0 || strcmp(format, "xunitxml") == 0)
+ logFormat = QTestLog::JUnitXML;
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, tap, teamcity or xunitxml\n");
+ fprintf(stderr, "output format must be one of txt, csv, lightxml, xml, tap, teamcity or junitxml\n");
exit(1);
}
if (strcmp(filename, "-") == 0 && QTestLog::loggerUsingStdout()) {
@@ -1008,53 +1005,81 @@ void TestMethods::invokeTestOnData(int index) const
class WatchDog : public QThread
{
+ enum Expectation {
+ ThreadStart,
+ TestFunctionStart,
+ TestFunctionEnd,
+ ThreadEnd,
+ };
+
+ bool waitFor(std::unique_lock<QtPrivate::mutex> &m, Expectation e) {
+ auto expectationChanged = [this, e] { return expecting != e; };
+ switch (e) {
+ case TestFunctionEnd:
+ return waitCondition.wait_for(m, defaultTimeout(), expectationChanged);
+ case ThreadStart:
+ case ThreadEnd:
+ case TestFunctionStart:
+ waitCondition.wait(m, expectationChanged);
+ return true;
+ }
+ Q_UNREACHABLE();
+ return false;
+ }
+
public:
WatchDog()
{
- QMutexLocker locker(&mutex);
- timeout.storeRelaxed(-1);
+ auto locker = qt_unique_lock(mutex);
+ expecting = ThreadStart;
start();
- waitCondition.wait(&mutex);
+ waitFor(locker, ThreadStart);
}
~WatchDog() {
{
- QMutexLocker locker(&mutex);
- timeout.storeRelaxed(0);
- waitCondition.wakeAll();
+ const auto locker = qt_scoped_lock(mutex);
+ expecting = ThreadEnd;
+ waitCondition.notify_all();
}
wait();
}
void beginTest() {
- QMutexLocker locker(&mutex);
- timeout.storeRelaxed(defaultTimeout());
- waitCondition.wakeAll();
+ const auto locker = qt_scoped_lock(mutex);
+ expecting = TestFunctionEnd;
+ waitCondition.notify_all();
}
void testFinished() {
- QMutexLocker locker(&mutex);
- timeout.storeRelaxed(-1);
- waitCondition.wakeAll();
+ const auto locker = qt_scoped_lock(mutex);
+ expecting = TestFunctionStart;
+ waitCondition.notify_all();
}
void run() override {
- QMutexLocker locker(&mutex);
- waitCondition.wakeAll();
+ auto locker = qt_unique_lock(mutex);
+ expecting = TestFunctionStart;
+ waitCondition.notify_all();
while (true) {
- int t = timeout.loadRelaxed();
- if (!t)
- break;
- if (Q_UNLIKELY(!waitCondition.wait(&mutex, t))) {
- stackTrace();
- qFatal("Test function timed out");
+ switch (expecting) {
+ case ThreadEnd:
+ return;
+ case ThreadStart:
+ Q_UNREACHABLE();
+ case TestFunctionStart:
+ case TestFunctionEnd:
+ if (Q_UNLIKELY(!waitFor(locker, expecting))) {
+ stackTrace();
+ qFatal("Test function timed out");
+ }
}
}
}
private:
- QBasicAtomicInt timeout;
- QMutex mutex;
- QWaitCondition waitCondition;
+ QtPrivate::mutex mutex;
+ QtPrivate::condition_variable waitCondition;
+ Expectation expecting;
};
#else // !QT_CONFIG(thread)
@@ -1137,6 +1162,7 @@ bool TestMethods::invokeTest(int index, const char *data, WatchDog *watchDog) co
QTestPrivate::qtestMouseButtons = Qt::NoButton;
if (watchDog)
watchDog->beginTest();
+ QTest::lastMouseTimestamp += 500; // Maintain at least 500ms mouse event timestamps between each test function call
invokeTestOnData(index);
if (watchDog)
watchDog->testFinished();
@@ -1497,126 +1523,6 @@ void TestMethods::invokeTests(QObject *testObject) const
QTestResult::setCurrentTestFunction(nullptr);
}
-#if defined(Q_OS_UNIX) && !defined(Q_OS_WASM)
-class FatalSignalHandler
-{
-public:
- FatalSignalHandler();
- ~FatalSignalHandler();
-
-private:
- static void signal(int);
- sigset_t handledSignals;
-};
-
-void FatalSignalHandler::signal(int signum)
-{
- const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime());
- const int msecsTotalTime = qRound(QTestLog::msecsTotalTime());
- if (signum != SIGINT) {
- stackTrace();
- if (qEnvironmentVariableIsSet("QTEST_PAUSE_ON_CRASH")) {
- fprintf(stderr, "Pausing process %d for debugging\n", getpid());
- raise(SIGSTOP);
- }
- }
- qFatal("Received signal %d\n"
- " Function time: %dms Total time: %dms",
- signum, msecsFunctionTime, msecsTotalTime);
-#if defined(Q_OS_INTEGRITY)
- {
- struct sigaction act;
- memset(&act, 0, sizeof(struct sigaction));
- act.sa_handler = SIG_DFL;
- sigaction(signum, &act, NULL);
- }
-#endif
-}
-
-FatalSignalHandler::FatalSignalHandler()
-{
- sigemptyset(&handledSignals);
-
- const int fatalSignals[] = {
- SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGBUS, SIGFPE, SIGSEGV, SIGPIPE, SIGTERM, 0 };
-
- struct sigaction act;
- memset(&act, 0, sizeof(act));
- act.sa_handler = FatalSignalHandler::signal;
-
- // Remove the handler after it is invoked.
-#if !defined(Q_OS_INTEGRITY)
- act.sa_flags = SA_RESETHAND;
-#endif
-
-// tvOS/watchOS both define SA_ONSTACK (in sys/signal.h) but mark sigaltstack() as
-// unavailable (__WATCHOS_PROHIBITED __TVOS_PROHIBITED in signal.h)
-#if defined(SA_ONSTACK) && !defined(Q_OS_TVOS) && !defined(Q_OS_WATCHOS)
- // Let the signal handlers use an alternate stack
- // This is necessary if SIGSEGV is to catch a stack overflow
-# if defined(Q_CC_GNU) && defined(Q_OF_ELF)
- // Put the alternate stack in the .lbss (large BSS) section so that it doesn't
- // interfere with normal .bss symbols
- __attribute__((section(".lbss.altstack"), aligned(4096)))
-# endif
- static char alternate_stack[16 * 1024];
- stack_t stack;
- stack.ss_flags = 0;
- stack.ss_size = sizeof alternate_stack;
- stack.ss_sp = alternate_stack;
- sigaltstack(&stack, nullptr);
- act.sa_flags |= SA_ONSTACK;
-#endif
-
- // Block all fatal signals in our signal handler so we don't try to close
- // the testlog twice.
- sigemptyset(&act.sa_mask);
- for (int i = 0; fatalSignals[i]; ++i)
- sigaddset(&act.sa_mask, fatalSignals[i]);
-
- struct sigaction oldact;
-
- for (int i = 0; fatalSignals[i]; ++i) {
- sigaction(fatalSignals[i], &act, &oldact);
- if (
-#ifdef SA_SIGINFO
- oldact.sa_flags & SA_SIGINFO ||
-#endif
- oldact.sa_handler != SIG_DFL) {
- sigaction(fatalSignals[i], &oldact, nullptr);
- } else
- {
- sigaddset(&handledSignals, fatalSignals[i]);
- }
- }
-}
-
-
-FatalSignalHandler::~FatalSignalHandler()
-{
- // Unregister any of our remaining signal handlers
- struct sigaction act;
- memset(&act, 0, sizeof(act));
- act.sa_handler = SIG_DFL;
-
- struct sigaction oldact;
-
- for (int i = 1; i < 32; ++i) {
- if (!sigismember(&handledSignals, i))
- continue;
- sigaction(i, &act, &oldact);
-
- // If someone overwrote it in the mean time, put it back
- if (oldact.sa_handler != FatalSignalHandler::signal)
- sigaction(i, &oldact, nullptr);
- }
-}
-
-#endif
-
-
-} // namespace
-
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
// Helper class for resolving symbol names by dynamically loading "dbghelp.dll".
@@ -1715,49 +1621,177 @@ DebugSymbolResolver::Symbol DebugSymbolResolver::resolveSymbol(DWORD64 address)
return result;
}
-static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo)
+#endif // Q_OS_WIN && !Q_OS_WINRT
+
+class FatalSignalHandler
{
- enum { maxStackFrames = 100 };
- char appName[MAX_PATH];
- if (!GetModuleFileNameA(NULL, appName, MAX_PATH))
- appName[0] = 0;
- const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime());
- const int msecsTotalTime = qRound(QTestLog::msecsTotalTime());
- const void *exceptionAddress = exInfo->ExceptionRecord->ExceptionAddress;
- printf("A crash occurred in %s.\n"
- "Function time: %dms Total time: %dms\n\n"
- "Exception address: 0x%p\n"
- "Exception code : 0x%lx\n",
- appName, msecsFunctionTime, msecsTotalTime,
- exceptionAddress, exInfo->ExceptionRecord->ExceptionCode);
-
- DebugSymbolResolver resolver(GetCurrentProcess());
- if (resolver.isValid()) {
- DebugSymbolResolver::Symbol exceptionSymbol = resolver.resolveSymbol(DWORD64(exceptionAddress));
- if (exceptionSymbol.name) {
- printf("Nearby symbol : %s\n", exceptionSymbol.name);
- delete [] exceptionSymbol.name;
+public:
+ FatalSignalHandler()
+ {
+#if defined(Q_OS_WIN)
+# if !defined(Q_CC_MINGW)
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
+# endif
+# if !defined(Q_OS_WINRT)
+ SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX);
+ SetUnhandledExceptionFilter(windowsFaultHandler);
+# endif
+#elif defined(Q_OS_UNIX) && !defined(Q_OS_WASM)
+ sigemptyset(&handledSignals);
+
+ const int fatalSignals[] = {
+ SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGBUS, SIGFPE, SIGSEGV, SIGPIPE, SIGTERM, 0 };
+
+ struct sigaction act;
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = FatalSignalHandler::signal;
+
+ // Remove the handler after it is invoked.
+# if !defined(Q_OS_INTEGRITY)
+ act.sa_flags = SA_RESETHAND;
+# endif
+
+ // tvOS/watchOS both define SA_ONSTACK (in sys/signal.h) but mark sigaltstack() as
+ // unavailable (__WATCHOS_PROHIBITED __TVOS_PROHIBITED in signal.h)
+# if defined(SA_ONSTACK) && !defined(Q_OS_TVOS) && !defined(Q_OS_WATCHOS)
+ // Let the signal handlers use an alternate stack
+ // This is necessary if SIGSEGV is to catch a stack overflow
+# if defined(Q_CC_GNU) && defined(Q_OF_ELF)
+ // Put the alternate stack in the .lbss (large BSS) section so that it doesn't
+ // interfere with normal .bss symbols
+ __attribute__((section(".lbss.altstack"), aligned(4096)))
+# endif
+ static char alternate_stack[16 * 1024];
+ stack_t stack;
+ stack.ss_flags = 0;
+ stack.ss_size = sizeof alternate_stack;
+ stack.ss_sp = alternate_stack;
+ sigaltstack(&stack, nullptr);
+ act.sa_flags |= SA_ONSTACK;
+# endif
+
+ // Block all fatal signals in our signal handler so we don't try to close
+ // the testlog twice.
+ sigemptyset(&act.sa_mask);
+ for (int i = 0; fatalSignals[i]; ++i)
+ sigaddset(&act.sa_mask, fatalSignals[i]);
+
+ struct sigaction oldact;
+
+ for (int i = 0; fatalSignals[i]; ++i) {
+ sigaction(fatalSignals[i], &act, &oldact);
+ if (
+# ifdef SA_SIGINFO
+ oldact.sa_flags & SA_SIGINFO ||
+# endif
+ oldact.sa_handler != SIG_DFL) {
+ sigaction(fatalSignals[i], &oldact, nullptr);
+ } else
+ {
+ sigaddset(&handledSignals, fatalSignals[i]);
+ }
}
- void *stack[maxStackFrames];
- fputs("\nStack:\n", stdout);
- const unsigned frameCount = CaptureStackBackTrace(0, DWORD(maxStackFrames), stack, NULL);
- for (unsigned f = 0; f < frameCount; ++f) {
- DebugSymbolResolver::Symbol symbol = resolver.resolveSymbol(DWORD64(stack[f]));
- if (symbol.name) {
- printf("#%3u: %s() - 0x%p\n", f + 1, symbol.name, (const void *)symbol.address);
- delete [] symbol.name;
- } else {
- printf("#%3u: Unable to obtain symbol\n", f + 1);
+#endif // defined(Q_OS_UNIX) && !defined(Q_OS_WASM)
+ }
+
+ ~FatalSignalHandler()
+ {
+#if defined(Q_OS_UNIX) && !defined(Q_OS_WASM)
+ // Unregister any of our remaining signal handlers
+ struct sigaction act;
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = SIG_DFL;
+
+ struct sigaction oldact;
+
+ for (int i = 1; i < 32; ++i) {
+ if (!sigismember(&handledSignals, i))
+ continue;
+ sigaction(i, &act, &oldact);
+
+ // If someone overwrote it in the mean time, put it back
+ if (oldact.sa_handler != FatalSignalHandler::signal)
+ sigaction(i, &oldact, nullptr);
+ }
+#endif
+ }
+
+private:
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+ static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo)
+ {
+ enum { maxStackFrames = 100 };
+ char appName[MAX_PATH];
+ if (!GetModuleFileNameA(NULL, appName, MAX_PATH))
+ appName[0] = 0;
+ const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime());
+ const int msecsTotalTime = qRound(QTestLog::msecsTotalTime());
+ const void *exceptionAddress = exInfo->ExceptionRecord->ExceptionAddress;
+ printf("A crash occurred in %s.\n"
+ "Function time: %dms Total time: %dms\n\n"
+ "Exception address: 0x%p\n"
+ "Exception code : 0x%lx\n",
+ appName, msecsFunctionTime, msecsTotalTime,
+ exceptionAddress, exInfo->ExceptionRecord->ExceptionCode);
+
+ DebugSymbolResolver resolver(GetCurrentProcess());
+ if (resolver.isValid()) {
+ DebugSymbolResolver::Symbol exceptionSymbol = resolver.resolveSymbol(DWORD64(exceptionAddress));
+ if (exceptionSymbol.name) {
+ printf("Nearby symbol : %s\n", exceptionSymbol.name);
+ delete [] exceptionSymbol.name;
+ }
+ void *stack[maxStackFrames];
+ fputs("\nStack:\n", stdout);
+ const unsigned frameCount = CaptureStackBackTrace(0, DWORD(maxStackFrames), stack, NULL);
+ for (unsigned f = 0; f < frameCount; ++f) {
+ DebugSymbolResolver::Symbol symbol = resolver.resolveSymbol(DWORD64(stack[f]));
+ if (symbol.name) {
+ printf("#%3u: %s() - 0x%p\n", f + 1, symbol.name, (const void *)symbol.address);
+ delete [] symbol.name;
+ } else {
+ printf("#%3u: Unable to obtain symbol\n", f + 1);
+ }
}
}
+
+ fputc('\n', stdout);
+ fflush(stdout);
+
+ return EXCEPTION_EXECUTE_HANDLER;
}
+#endif // defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
- fputc('\n', stdout);
- fflush(stdout);
+#if defined(Q_OS_UNIX) && !defined(Q_OS_WASM)
+ static void signal(int signum)
+ {
+ const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime());
+ const int msecsTotalTime = qRound(QTestLog::msecsTotalTime());
+ if (signum != SIGINT) {
+ stackTrace();
+ if (qEnvironmentVariableIsSet("QTEST_PAUSE_ON_CRASH")) {
+ fprintf(stderr, "Pausing process %d for debugging\n", getpid());
+ raise(SIGSTOP);
+ }
+ }
+ qFatal("Received signal %d\n"
+ " Function time: %dms Total time: %dms",
+ signum, msecsFunctionTime, msecsTotalTime);
+# if defined(Q_OS_INTEGRITY)
+ {
+ struct sigaction act;
+ memset(&act, 0, sizeof(struct sigaction));
+ act.sa_handler = SIG_DFL;
+ sigaction(signum, &act, NULL);
+ }
+# endif
+ }
- return EXCEPTION_EXECUTE_HANDLER;
-}
-#endif // Q_OS_WIN) && !Q_OS_WINRT
+ sigset_t handledSignals;
+#endif // defined(Q_OS_UNIX) && !defined(Q_OS_WASM)
+};
+
+} // namespace
static void initEnvironment()
{
@@ -1817,23 +1851,17 @@ void QTest::qInit(QObject *testObject, int argc, char **argv)
initEnvironment();
QBenchmarkGlobalData::current = new QBenchmarkGlobalData;
-#if defined(Q_OS_MACX)
- macNeedsActivate = qApp && (qstrcmp(qApp->metaObject()->className(), "QApplication") == 0);
-
- // Don't restore saved window state for auto tests.
+#if defined(Q_OS_MACOS)
+ // Don't restore saved window state for auto tests
QTestPrivate::disableWindowRestore();
- // Disable App Nap which may cause tests to stall.
+ // Disable App Nap which may cause tests to stall
QTestPrivate::AppNapDisabler appNapDisabler;
-#endif
-
-#if defined(Q_OS_MACX)
- if (macNeedsActivate) {
- CFStringRef reasonForActivity= CFSTR("No Display Sleep");
- IOReturn ok = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &powerID);
- if (ok != kIOReturnSuccess)
- macNeedsActivate = false; // no need to release the assertion on exit.
+ if (qApp && (qstrcmp(qApp->metaObject()->className(), "QApplication") == 0)) {
+ IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep,
+ kIOPMAssertionLevelOn, CFSTR("QtTest running tests"),
+ &macPowerSavingDisabled);
}
#endif
@@ -1871,18 +1899,6 @@ int QTest::qRun()
try {
#endif
-#if defined(Q_OS_WIN)
- if (!noCrashHandler) {
-# ifndef Q_CC_MINGW
- _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
-# endif
-# ifndef Q_OS_WINRT
- SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX);
- SetUnhandledExceptionFilter(windowsFaultHandler);
-# endif
- } // !noCrashHandler
-#endif // Q_OS_WIN
-
#if QT_CONFIG(valgrind)
if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) {
if (Q_UNLIKELY(!qApp))
@@ -1897,11 +1913,10 @@ int QTest::qRun()
} else
#endif
{
-#if defined(Q_OS_UNIX) && !defined(Q_OS_WASM)
QScopedPointer<FatalSignalHandler> handler;
if (!noCrashHandler)
handler.reset(new FatalSignalHandler);
-#endif
+
TestMethods::MetaMethods commandLineMethods;
for (const QString &tf : qAsConst(QTest::testFunctions)) {
const QByteArray tfB = tf.toLatin1();
@@ -1920,25 +1935,19 @@ int QTest::qRun()
}
#ifndef QT_NO_EXCEPTIONS
- } catch (...) {
- QTestResult::addFailure("Caught unhandled exception", __FILE__, __LINE__);
- if (QTestResult::currentTestFunction()) {
- QTestResult::finishedCurrentTestFunction();
- QTestResult::setCurrentTestFunction(nullptr);
- }
-
- QTestLog::stopLogging();
-#if defined(Q_OS_MACX)
- if (macNeedsActivate) {
- IOPMAssertionRelease(powerID);
- }
-#endif
- currentTestObject = nullptr;
+ } catch (...) {
+ QTestResult::addFailure("Caught unhandled exception", __FILE__, __LINE__);
+ if (QTestResult::currentTestFunction()) {
+ QTestResult::finishedCurrentTestFunction();
+ QTestResult::setCurrentTestFunction(nullptr);
+ }
- // Rethrow exception to make debugging easier.
- throw;
- return 1;
- }
+ qCleanup();
+
+ // Re-throw exception to make debugging easier
+ throw;
+ return 1;
+ }
#endif
#if QT_CONFIG(valgrind)
@@ -1965,8 +1974,7 @@ void QTest::qCleanup()
QSignalDumper::endDump();
#if defined(Q_OS_MACOS)
- if (macNeedsActivate)
- IOPMAssertionRelease(powerID);
+ IOPMAssertionRelease(macPowerSavingDisabled);
#endif
}
diff --git a/src/testlib/qtestxunitstreamer.cpp b/src/testlib/qtestjunitstreamer.cpp
index bdbdfa9610..9c3a9c9ca5 100644
--- a/src/testlib/qtestxunitstreamer.cpp
+++ b/src/testlib/qtestjunitstreamer.cpp
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#include <QtTest/private/qtestxunitstreamer_p.h>
-#include <QtTest/private/qxunittestlogger_p.h>
+#include <QtTest/private/qtestjunitstreamer_p.h>
+#include <QtTest/private/qjunittestlogger_p.h>
#include <QtTest/private/qtestelement_p.h>
#include <QtTest/private/qtestelementattribute_p.h>
#include <QtTest/qtestassert.h>
@@ -48,15 +48,15 @@
QT_BEGIN_NAMESPACE
-QTestXunitStreamer::QTestXunitStreamer(QXunitTestLogger *logger)
+QTestJUnitStreamer::QTestJUnitStreamer(QJUnitTestLogger *logger)
: testLogger(logger)
{
QTEST_ASSERT(testLogger);
}
-QTestXunitStreamer::~QTestXunitStreamer() = default;
+QTestJUnitStreamer::~QTestJUnitStreamer() = default;
-void QTestXunitStreamer::indentForElement(const QTestElement* element, char* buf, int size)
+void QTestJUnitStreamer::indentForElement(const QTestElement* element, char* buf, int size)
{
if (size == 0) return;
@@ -74,7 +74,7 @@ void QTestXunitStreamer::indentForElement(const QTestElement* element, char* buf
}
}
-void QTestXunitStreamer::formatStart(const QTestElement *element, QTestCharBuffer *formatted) const
+void QTestJUnitStreamer::formatStart(const QTestElement *element, QTestCharBuffer *formatted) const
{
if (!element || !formatted )
return;
@@ -95,7 +95,7 @@ void QTestXunitStreamer::formatStart(const QTestElement *element, QTestCharBuffe
QTest::qt_asprintf(formatted, "%s<%s", indent, element->elementName());
}
-void QTestXunitStreamer::formatEnd(const QTestElement *element, QTestCharBuffer *formatted) const
+void QTestJUnitStreamer::formatEnd(const QTestElement *element, QTestCharBuffer *formatted) const
{
if (!element || !formatted )
return;
@@ -111,7 +111,7 @@ void QTestXunitStreamer::formatEnd(const QTestElement *element, QTestCharBuffer
QTest::qt_asprintf(formatted, "%s</%s>\n", indent, element->elementName());
}
-void QTestXunitStreamer::formatAttributes(const QTestElement* element, const QTestElementAttribute *attribute, QTestCharBuffer *formatted) const
+void QTestJUnitStreamer::formatAttributes(const QTestElement* element, const QTestElementAttribute *attribute, QTestCharBuffer *formatted) const
{
if (!attribute || !formatted )
return;
@@ -143,7 +143,7 @@ void QTestXunitStreamer::formatAttributes(const QTestElement* element, const QTe
}
}
-void QTestXunitStreamer::formatAfterAttributes(const QTestElement *element, QTestCharBuffer *formatted) const
+void QTestJUnitStreamer::formatAfterAttributes(const QTestElement *element, QTestCharBuffer *formatted) const
{
if (!element || !formatted )
return;
@@ -164,7 +164,7 @@ void QTestXunitStreamer::formatAfterAttributes(const QTestElement *element, QTes
QTest::qt_asprintf(formatted, ">\n");
}
-void QTestXunitStreamer::output(QTestElement *element) const
+void QTestJUnitStreamer::output(QTestElement *element) const
{
QTEST_ASSERT(element);
@@ -172,7 +172,7 @@ void QTestXunitStreamer::output(QTestElement *element) const
outputElements(element);
}
-void QTestXunitStreamer::outputElements(QTestElement *element, bool) const
+void QTestJUnitStreamer::outputElements(QTestElement *element, bool) const
{
QTestCharBuffer buf;
bool hasChildren;
@@ -205,7 +205,7 @@ void QTestXunitStreamer::outputElements(QTestElement *element, bool) const
}
}
-void QTestXunitStreamer::outputElementAttributes(const QTestElement* element, QTestElementAttribute *attribute) const
+void QTestJUnitStreamer::outputElementAttributes(const QTestElement* element, QTestElementAttribute *attribute) const
{
QTestCharBuffer buf;
while (attribute) {
@@ -215,7 +215,7 @@ void QTestXunitStreamer::outputElementAttributes(const QTestElement* element, QT
}
}
-void QTestXunitStreamer::outputString(const char *msg) const
+void QTestJUnitStreamer::outputString(const char *msg) const
{
testLogger->outputString(msg);
}
diff --git a/src/testlib/qtestxunitstreamer_p.h b/src/testlib/qtestjunitstreamer_p.h
index db6d2896f7..7d91e2b66c 100644
--- a/src/testlib/qtestxunitstreamer_p.h
+++ b/src/testlib/qtestjunitstreamer_p.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef QTESTXUNITSTREAMER_P_H
-#define QTESTXUNITSTREAMER_P_H
+#ifndef QTESTJUNITSTREAMER_P_H
+#define QTESTJUNITSTREAMER_P_H
//
// W A R N I N G
@@ -58,14 +58,14 @@ QT_BEGIN_NAMESPACE
class QTestElement;
class QTestElementAttribute;
-class QXunitTestLogger;
+class QJUnitTestLogger;
struct QTestCharBuffer;
-class QTestXunitStreamer
+class QTestJUnitStreamer
{
public:
- QTestXunitStreamer(QXunitTestLogger *logger);
- ~QTestXunitStreamer();
+ QTestJUnitStreamer(QJUnitTestLogger *logger);
+ ~QTestJUnitStreamer();
void formatStart(const QTestElement *element, QTestCharBuffer *formatted) const;
void formatEnd(const QTestElement *element, QTestCharBuffer *formatted) const;
@@ -78,10 +78,9 @@ class QTestXunitStreamer
void outputString(const char *msg) const;
private:
- void displayXunitXmlHeader() const;
static void indentForElement(const QTestElement* element, char* buf, int size);
- QXunitTestLogger *testLogger;
+ QJUnitTestLogger *testLogger;
};
QT_END_NAMESPACE
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index f3ebf343c5..7bd108ab00 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -44,7 +44,7 @@
#include <QtTest/private/qabstracttestlogger_p.h>
#include <QtTest/private/qplaintestlogger_p.h>
#include <QtTest/private/qcsvbenchmarklogger_p.h>
-#include <QtTest/private/qxunittestlogger_p.h>
+#include <QtTest/private/qjunittestlogger_p.h>
#include <QtTest/private/qxmltestlogger_p.h>
#include <QtTest/private/qteamcitylogger_p.h>
#include <QtTest/private/qtaptestlogger_p.h>
@@ -152,7 +152,7 @@ namespace QTest {
inline bool matches(QtMsgType tp, const QString &message) const
{
return tp == type
- && (pattern.type() == QVariant::String ?
+ && (pattern.userType() == QMetaType::QString ?
stringsMatch(pattern.toString(), message) :
#if QT_CONFIG(regularexpression)
pattern.toRegularExpression().match(message).hasMatch());
@@ -292,7 +292,7 @@ void QTestLog::printUnhandledIgnoreMessages()
QString message;
QTest::IgnoreResultList *list = QTest::ignoreResultList;
while (list) {
- if (list->pattern.type() == QVariant::String) {
+ if (list->pattern.userType() == QMetaType::QString) {
message = QStringLiteral("Did not receive message: \"") + list->pattern.toString() + QLatin1Char('"');
} else {
#if QT_CONFIG(regularexpression)
@@ -456,8 +456,8 @@ void QTestLog::addLogger(LogMode mode, const char *filename)
case QTestLog::LightXML:
logger = new QXmlTestLogger(QXmlTestLogger::Light, filename);
break;
- case QTestLog::XunitXML:
- logger = new QXunitTestLogger(filename);
+ case QTestLog::JUnitXML:
+ logger = new QJUnitTestLogger(filename);
break;
case QTestLog::TeamCity:
logger = new QTeamCityLogger(filename);
@@ -597,4 +597,6 @@ qint64 QTestLog::nsecsFunctionTime()
return elapsedFunctionTime.nsecsElapsed();
}
+#include "moc_qtestlog_p.cpp"
+
QT_END_NAMESPACE
diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h
index fff36f290d..ddaf14ed9b 100644
--- a/src/testlib/qtestlog_p.h
+++ b/src/testlib/qtestlog_p.h
@@ -57,6 +57,8 @@
#include <QtCore/private/qcore_mac_p.h>
#endif
+#include <QtCore/qobjectdefs.h>
+
QT_BEGIN_NAMESPACE
class QBenchmarkResult;
@@ -65,13 +67,14 @@ class QTestData;
class Q_TESTLIB_EXPORT QTestLog
{
+ Q_GADGET
public:
QTestLog() = delete;
~QTestLog() = delete;
Q_DISABLE_COPY_MOVE(QTestLog)
enum LogMode {
- Plain = 0, XML, LightXML, XunitXML, CSV, TeamCity, TAP
+ Plain = 0, XML, LightXML, JUnitXML, CSV, TeamCity, TAP
#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
, Apple
#endif
@@ -79,6 +82,7 @@ public:
, XCTest
#endif
};
+ Q_ENUM(LogMode);
static void enterTestFunction(const char* function);
static void leaveTestFunction();
diff --git a/src/testlib/qtestutil_macos.mm b/src/testlib/qtestutil_macos.mm
index 7579c3b164..880cd0f91f 100644
--- a/src/testlib/qtestutil_macos.mm
+++ b/src/testlib/qtestutil_macos.mm
@@ -39,6 +39,8 @@
#include "qtestutil_macos_p.h"
+#include "QtCore/private/qcore_mac_p.h"
+
#import <AppKit/AppKit.h>
QT_BEGIN_NAMESPACE
@@ -55,6 +57,32 @@ namespace QTestPrivate {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"ApplePersistenceIgnoreState"];
}
+ bool macCrashReporterWillShowDialog()
+ {
+ auto dialogType = QCFType<CFStringRef>(CFPreferencesCopyAppValue(
+ CFSTR("DialogType"), CFSTR("com.apple.CrashReporter")));
+
+ auto stringCompare = [](CFStringRef str1, CFStringRef str2) -> bool {
+ return CFStringCompare(str1, str2, kCFCompareCaseInsensitive) == kCFCompareEqualTo;
+ };
+
+ if (!dialogType || stringCompare(dialogType, CFSTR("basic"))) {
+ // The default (basic) dialog type only shows up if the
+ // application is 'user visible', as indicated by the
+ // activation policy.
+ auto *runningApp = NSRunningApplication.currentApplication;
+ return runningApp && runningApp.activationPolicy == NSApplicationActivationPolicyRegular;
+ } else if (stringCompare(dialogType, CFSTR("developer"))
+ || stringCompare(dialogType, CFSTR("crashreport"))) {
+ // While in developer mode the dialog will show for all
+ // crashed applications, including backgrounded ones.
+ return true;
+ } else {
+ // Finally, 'server' or 'none' will result in no dialog
+ return false;
+ }
+ }
+
/*! \internal
\class AppNapDisabler
\brief Disables App Nap by registereing a bacground activity.
diff --git a/src/testlib/qtestutil_macos_p.h b/src/testlib/qtestutil_macos_p.h
index 36f27167c0..c9a152dfdb 100644
--- a/src/testlib/qtestutil_macos_p.h
+++ b/src/testlib/qtestutil_macos_p.h
@@ -58,6 +58,7 @@ QT_BEGIN_NAMESPACE
namespace QTestPrivate {
void disableWindowRestore();
+ bool macCrashReporterWillShowDialog();
class AppNapDisabler
{
diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro
index 530bc6b425..787df6b648 100644
--- a/src/testlib/testlib.pro
+++ b/src/testlib/testlib.pro
@@ -51,10 +51,10 @@ HEADERS = \
qtestblacklist_p.h \
qtesthelpers_p.h \
qttestglobal.h \
- qtestxunitstreamer_p.h \
+ qtestjunitstreamer_p.h \
qtaptestlogger_p.h \
qxmltestlogger_p.h \
- qxunittestlogger_p.h
+ qjunittestlogger_p.h
SOURCES = \
qtestcase.cpp \
@@ -77,8 +77,8 @@ SOURCES = \
qtestelement.cpp \
qtestelementattribute.cpp \
qtestmouse.cpp \
- qtestxunitstreamer.cpp \
- qxunittestlogger.cpp \
+ qtestjunitstreamer.cpp \
+ qjunittestlogger.cpp \
qtestblacklist.cpp \
qtaptestlogger.cpp
@@ -112,7 +112,7 @@ mac {
macos {
HEADERS += qtestutil_macos_p.h
OBJECTIVE_SOURCES += qtestutil_macos.mm
- LIBS += -framework Foundation -framework ApplicationServices -framework IOKit
+ LIBS += -framework Foundation -framework ApplicationServices -framework IOKit -framework AppKit
}
# XCTest support (disabled for now)
diff --git a/src/tools/androidtestrunner/main.cpp b/src/tools/androidtestrunner/main.cpp
index 1046c7b7ef..5471db3afd 100644
--- a/src/tools/androidtestrunner/main.cpp
+++ b/src/tools/androidtestrunner/main.cpp
@@ -460,7 +460,7 @@ int main(int argc, char *argv[])
}
// Run androiddeployqt
- static auto verbose = g_options.verbose ? QStringLiteral("--verbose") : QStringLiteral();
+ static auto verbose = g_options.verbose ? QStringLiteral("--verbose") : QString();
if (!execCommand(QStringLiteral("%1 %3 --reinstall --output %2 --apk %4").arg(g_options.androidDeployQtCommand,
g_options.buildPath,
verbose,
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 9863ff5e69..bfd199a8ba 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -19,6 +19,10 @@ DEFINES += \
QT_NO_FOREACH \
QT_NO_CAST_FROM_ASCII
+INCLUDEPATH += \
+ $$PWD/.. \
+ $$PWD/../../3rdparty/tinycbor/src
+
SOURCES += \
../../corelib/codecs/qlatincodec.cpp \
../../corelib/codecs/qtextcodec.cpp \
@@ -63,8 +67,11 @@ SOURCES += \
../../corelib/kernel/qsharedmemory.cpp \
../../corelib/kernel/qsystemsemaphore.cpp \
../../corelib/plugin/quuid.cpp \
+ ../../corelib/serialization/qcborcommon.cpp \
+ ../../corelib/serialization/qcborstreamwriter.cpp \
+ ../../corelib/serialization/qcborvalue.cpp \
../../corelib/serialization/qdatastream.cpp \
- ../../corelib/serialization/qjson.cpp \
+ ../../corelib/serialization/qjsoncbor.cpp \
../../corelib/serialization/qjsondocument.cpp \
../../corelib/serialization/qjsonobject.cpp \
../../corelib/serialization/qjsonarray.cpp \
diff --git a/src/tools/moc/collectjson.cpp b/src/tools/moc/collectjson.cpp
new file mode 100644
index 0000000000..4029bca5e9
--- /dev/null
+++ b/src/tools/moc/collectjson.cpp
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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 General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** 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-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qfile.h>
+#include <qjsonarray.h>
+#include <qjsondocument.h>
+#include <qjsonobject.h>
+#include <qhashfunctions.h>
+#include <qstringlist.h>
+#include <cstdlib>
+
+static bool readFromDevice(QIODevice *device, QJsonArray *allMetaObjects)
+{
+ const QByteArray contents = device->readAll();
+ if (contents.isEmpty())
+ return true;
+
+ QJsonParseError error {};
+ QJsonDocument metaObjects = QJsonDocument::fromJson(contents, &error);
+ if (error.error != QJsonParseError::NoError) {
+ fprintf(stderr, "%s at %d\n", error.errorString().toUtf8().constData(), error.offset);
+ return false;
+ }
+
+ allMetaObjects->append(metaObjects.object());
+ return true;
+}
+
+int collectJson(const QStringList &jsonFiles, const QString &outputFile)
+{
+ qSetGlobalQHashSeed(0);
+
+ QFile output;
+ if (outputFile.isEmpty()) {
+ if (!output.open(stdout, QIODevice::WriteOnly)) {
+ fprintf(stderr, "Error opening stdout for writing\n");
+ return EXIT_FAILURE;
+ }
+ } else {
+ output.setFileName(outputFile);
+ if (!output.open(QIODevice::WriteOnly)) {
+ fprintf(stderr, "Error opening %s for writing\n", qPrintable(outputFile));
+ return EXIT_FAILURE;
+ }
+ }
+
+ QJsonArray allMetaObjects;
+ if (jsonFiles.isEmpty()) {
+ QFile f;
+ if (!f.open(stdin, QIODevice::ReadOnly)) {
+ fprintf(stderr, "Error opening stdin for reading\n");
+ return EXIT_FAILURE;
+ }
+
+ if (!readFromDevice(&f, &allMetaObjects)) {
+ fprintf(stderr, "Error parsing data from stdin\n");
+ return EXIT_FAILURE;
+ }
+ }
+
+ for (const QString &jsonFile: jsonFiles) {
+ QFile f(jsonFile);
+ if (!f.open(QIODevice::ReadOnly)) {
+ fprintf(stderr, "Error opening %s for reading\n", qPrintable(jsonFile));
+ return EXIT_FAILURE;
+ }
+
+ if (!readFromDevice(&f, &allMetaObjects)) {
+ fprintf(stderr, "Error parsing %s\n", qPrintable(jsonFile));
+ return EXIT_FAILURE;
+ }
+ }
+
+ QJsonDocument doc(allMetaObjects);
+ output.write(doc.toJson());
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/tools/moc/collectjson.h b/src/tools/moc/collectjson.h
new file mode 100644
index 0000000000..9d329c96ca
--- /dev/null
+++ b/src/tools/moc/collectjson.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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 General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** 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-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COLLECTJSON_H
+#define COLLECTJSON_H
+
+#include <qglobal.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+QT_BEGIN_NAMESPACE
+
+int collectJson(const QStringList &jsonFiles, const QString &outputFile);
+
+QT_END_NAMESPACE
+
+#endif // COLLECTOJSON_H
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 6a74e739e6..8d4fb2efc6 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -77,7 +77,7 @@ static const char *metaTypeEnumValueString(int type)
QT_FOR_EACH_STATIC_TYPE(RETURN_METATYPENAME_STRING)
}
#undef RETURN_METATYPENAME_STRING
- return 0;
+ return nullptr;
}
Generator::Generator(ClassDef *classDef, const QVector<QByteArray> &metaTypes, const QHash<QByteArray, QByteArray> &knownQObjectClasses, const QHash<QByteArray, QByteArray> &knownGadgets, FILE *outfile)
@@ -462,7 +462,7 @@ void Generator::generateCode()
// Build extra array
//
QVector<QByteArray> extraList;
- QHash<QByteArray, QByteArray> knownExtraMetaObject = knownGadgets;
+ QMultiHash<QByteArray, QByteArray> knownExtraMetaObject = knownGadgets;
knownExtraMetaObject.unite(knownQObjectClasses);
for (int i = 0; i < cdef->propertyList.count(); ++i) {
@@ -541,8 +541,10 @@ void Generator::generateCode()
if (isQObject)
fprintf(out, " nullptr,\n");
- else if (cdef->superclassList.size() && (!cdef->hasQGadget || knownGadgets.contains(purestSuperClass)))
+ else if (cdef->superclassList.size() && !cdef->hasQGadget) // for qobject, we know the super class must have a static metaobject
fprintf(out, " QMetaObject::SuperData::link<%s::staticMetaObject>(),\n", purestSuperClass.constData());
+ else if (cdef->superclassList.size()) // for gadgets we need to query at compile time for it
+ fprintf(out, " QtPrivate::MetaObjectForType<%s>::value(),\n", purestSuperClass.constData());
else
fprintf(out, " nullptr,\n");
fprintf(out, " qt_meta_stringdata_%s.data,\n"
@@ -862,6 +864,8 @@ void Generator::generateProperties()
flags |= Constant;
if (p.final)
flags |= Final;
+ if (p.required)
+ flags |= Required;
fprintf(out, " %4d, ", stridx(p.name));
generateTypeInfo(p.type);
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
index ba559b572f..b8c2d7f594 100644
--- a/src/tools/moc/main.cpp
+++ b/src/tools/moc/main.cpp
@@ -30,6 +30,7 @@
#include "preprocessor.h"
#include "moc.h"
#include "outputrevision.h"
+#include "collectjson.h"
#include <qfile.h>
#include <qfileinfo.h>
@@ -37,10 +38,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
+#include <errno.h>
#include <qcoreapplication.h>
#include <qcommandlineoption.h>
#include <qcommandlineparser.h>
+#include <qscopedpointer.h>
QT_BEGIN_NAMESPACE
@@ -77,6 +80,10 @@ void error(const char *msg = "Invalid argument")
fprintf(stderr, "moc: %s\n", msg);
}
+struct ScopedPointerFileCloser
+{
+ static inline void cleanup(FILE *handle) { if (handle) fclose(handle); }
+};
static inline bool hasNext(const Symbols &symbols, int i)
{ return (i < symbols.size()); }
@@ -168,6 +175,49 @@ static QStringList argumentsFromCommandLineAndFile(const QStringList &arguments)
return allArguments;
}
+// Escape characters in given path. Dependency paths are Make-style, not NMake/Jom style.
+// The paths can also be consumed by Ninja.
+// "$" replaced by "$$"
+// "#" replaced by "\#"
+// " " replaced by "\ "
+// "\#" replaced by "\\#"
+// "\ " replaced by "\\\ "
+//
+// The escape rules are according to what clang / llvm escapes when generating a Make-style
+// dependency file.
+// Is a template function, because input param can be either a QString or a QByteArray.
+template <typename T> struct CharType;
+template <> struct CharType<QString> { using type = QLatin1Char; };
+template <> struct CharType<QByteArray> { using type = char; };
+template <typename StringType>
+StringType escapeDependencyPath(const StringType &path)
+{
+ using CT = typename CharType<StringType>::type;
+ StringType escapedPath;
+ int size = path.size();
+ escapedPath.reserve(size);
+ for (int i = 0; i < size; ++i) {
+ if (path[i] == CT('$')) {
+ escapedPath.append(CT('$'));
+ } else if (path[i] == CT('#')) {
+ escapedPath.append(CT('\\'));
+ } else if (path[i] == CT(' ')) {
+ escapedPath.append(CT('\\'));
+ int backwards_it = i - 1;
+ while (backwards_it > 0 && path[backwards_it] == CT('\\')) {
+ escapedPath.append(CT('\\'));
+ --backwards_it;
+ }
+ }
+ escapedPath.append(path[i]);
+ }
+ return escapedPath;
+}
+
+QByteArray escapeAndEncodeDependencyPath(const QString &path)
+{
+ return QFile::encodeName(escapeDependencyPath(path));
+}
int runMoc(int argc, char **argv)
{
@@ -293,10 +343,36 @@ int runMoc(int argc, char **argv)
ignoreConflictsOption.setDescription(QStringLiteral("Ignore all options that conflict with compilers, like -pthread conflicting with moc's -p option."));
parser.addOption(ignoreConflictsOption);
+ QCommandLineOption jsonOption(QStringLiteral("output-json"));
+ jsonOption.setDescription(QStringLiteral("In addition to generating C++ code, create a machine-readable JSON file in a file that matches the output file and an extra .json extension."));
+ parser.addOption(jsonOption);
+
+ QCommandLineOption collectOption(QStringLiteral("collect-json"));
+ collectOption.setDescription(QStringLiteral("Instead of processing C++ code, collect previously generated JSON output into a single file."));
+ parser.addOption(collectOption);
+
+ QCommandLineOption depFileOption(QStringLiteral("output-dep-file"));
+ depFileOption.setDescription(
+ QStringLiteral("Output a Make-style dep file for build system consumption."));
+ parser.addOption(depFileOption);
+
+ QCommandLineOption depFilePathOption(QStringLiteral("dep-file-path"));
+ depFilePathOption.setDescription(QStringLiteral("Path where to write the dep file."));
+ depFilePathOption.setValueName(QStringLiteral("file"));
+ parser.addOption(depFilePathOption);
+
+ QCommandLineOption depFileRuleNameOption(QStringLiteral("dep-file-rule-name"));
+ depFileRuleNameOption.setDescription(
+ QStringLiteral("The rule name (first line) of the dep file."));
+ depFileRuleNameOption.setValueName(QStringLiteral("rule name"));
+ parser.addOption(depFileRuleNameOption);
+
parser.addPositionalArgument(QStringLiteral("[header-file]"),
QStringLiteral("Header file to read from, otherwise stdin."));
parser.addPositionalArgument(QStringLiteral("[@option-file]"),
QStringLiteral("Read additional options from option-file."));
+ parser.addPositionalArgument(QStringLiteral("[MOC generated json file]"),
+ QStringLiteral("MOC generated json output"));
const QStringList arguments = argumentsFromCommandLineAndFile(app.arguments());
if (arguments.isEmpty())
@@ -305,6 +381,10 @@ int runMoc(int argc, char **argv)
parser.process(arguments);
const QStringList files = parser.positionalArguments();
+ output = parser.value(outputOption);
+ if (parser.isSet(collectOption))
+ return collectJson(files, output);
+
if (files.count() > 1) {
error(qPrintable(QLatin1String("Too many input files specified: '") + files.join(QLatin1String("' '")) + QLatin1Char('\'')));
parser.showHelp(1);
@@ -313,7 +393,6 @@ int runMoc(int argc, char **argv)
}
const bool ignoreConflictingOptions = parser.isSet(ignoreConflictsOption);
- output = parser.value(outputOption);
pp.preprocessOnly = parser.isSet(preprocessOption);
if (parser.isSet(noIncludeOption)) {
moc.noInclude = true;
@@ -456,6 +535,7 @@ int runMoc(int argc, char **argv)
// 1. preprocess
const auto includeFiles = parser.values(includeOption);
+ QStringList validIncludesFiles;
for (const QString &includeName : includeFiles) {
QByteArray rawName = pp.resolveInclude(QFile::encodeName(includeName), moc.filename);
if (rawName.isEmpty()) {
@@ -468,6 +548,7 @@ int runMoc(int argc, char **argv)
moc.symbols += Symbol(0, MOC_INCLUDE_BEGIN, rawName);
moc.symbols += pp.preprocessed(rawName, &f);
moc.symbols += Symbol(0, MOC_INCLUDE_END, rawName);
+ validIncludesFiles.append(includeName);
} else {
fprintf(stderr, "Warning: Cannot open %s included by moc file %s: %s\n",
rawName.constData(),
@@ -485,6 +566,9 @@ int runMoc(int argc, char **argv)
// 3. and output meta object code
+ QScopedPointer<FILE, ScopedPointerFileCloser> jsonOutput;
+
+ bool outputToFile = true;
if (output.size()) { // output file specified
#if defined(_MSC_VER)
if (_wfopen_s(&out, reinterpret_cast<const wchar_t *>(output.utf16()), L"w") != 0)
@@ -496,8 +580,24 @@ int runMoc(int argc, char **argv)
fprintf(stderr, "moc: Cannot create %s\n", QFile::encodeName(output).constData());
return 1;
}
+
+ if (parser.isSet(jsonOption)) {
+ const QString jsonOutputFileName = output + QLatin1String(".json");
+ FILE *f;
+#if defined(_MSC_VER)
+ if (_wfopen_s(&f, reinterpret_cast<const wchar_t *>(jsonOutputFileName.utf16()), L"w") != 0)
+#else
+ f = fopen(QFile::encodeName(jsonOutputFileName).constData(), "w");
+ if (!f)
+#endif
+ fprintf(stderr, "moc: Cannot create JSON output file %s. %s\n",
+ QFile::encodeName(jsonOutputFileName).constData(),
+ strerror(errno));
+ jsonOutput.reset(f);
+ }
} else { // use stdout
out = stdout;
+ outputToFile = false;
}
if (pp.preprocessOnly) {
@@ -506,12 +606,80 @@ int runMoc(int argc, char **argv)
if (moc.classList.isEmpty())
moc.note("No relevant classes found. No output generated.");
else
- moc.generate(out);
+ moc.generate(out, jsonOutput.data());
}
if (output.size())
fclose(out);
+ if (parser.isSet(depFileOption)) {
+ // 4. write a Make-style dependency file (can also be consumed by Ninja).
+ QString depOutputFileName;
+ QString depRuleName = output;
+
+ if (parser.isSet(depFileRuleNameOption))
+ depRuleName = parser.value(depFileRuleNameOption);
+
+ if (parser.isSet(depFilePathOption)) {
+ depOutputFileName = parser.value(depFilePathOption);
+ } else if (outputToFile) {
+ depOutputFileName = output + QLatin1String(".d");
+ } else {
+ fprintf(stderr, "moc: Writing to stdout, but no depfile path specified.\n");
+ }
+
+ QScopedPointer<FILE, ScopedPointerFileCloser> depFileHandle;
+ FILE *depFileHandleRaw;
+#if defined(_MSC_VER)
+ if (_wfopen_s(&depFileHandleRaw,
+ reinterpret_cast<const wchar_t *>(depOutputFileName.utf16()), L"w") != 0)
+#else
+ depFileHandleRaw = fopen(QFile::encodeName(depOutputFileName).constData(), "w");
+ if (!depFileHandleRaw)
+#endif
+ fprintf(stderr, "moc: Cannot create dep output file '%s'. %s\n",
+ QFile::encodeName(depOutputFileName).constData(),
+ strerror(errno));
+ depFileHandle.reset(depFileHandleRaw);
+
+ if (!depFileHandle.isNull()) {
+ // First line is the path to the generated file.
+ fprintf(depFileHandle.data(), "%s: ",
+ escapeAndEncodeDependencyPath(depRuleName).constData());
+
+ QByteArrayList dependencies;
+
+ // If there's an input file, it's the first dependency.
+ if (!filename.isEmpty()) {
+ dependencies.append(escapeAndEncodeDependencyPath(filename).constData());
+ }
+
+ // Additional passed-in includes are dependencies (like moc_predefs.h).
+ for (const QString &includeName : validIncludesFiles) {
+ dependencies.append(escapeAndEncodeDependencyPath(includeName).constData());
+ }
+
+ // Plugin metadata json files discovered via Q_PLUGIN_METADATA macros are also
+ // dependencies.
+ for (const QString &pluginMetadataFile : moc.parsedPluginMetadataFiles) {
+ dependencies.append(escapeAndEncodeDependencyPath(pluginMetadataFile).constData());
+ }
+
+ // All pre-processed includes are dependnecies.
+ // Sort the entries for easier human consumption.
+ auto includeList = pp.preprocessedIncludes.values();
+ std::sort(includeList.begin(), includeList.end());
+
+ for (QByteArray &includeName : includeList) {
+ dependencies.append(escapeDependencyPath(includeName));
+ }
+
+ // Join dependencies, output them, and output a final new line.
+ const auto dependenciesJoined = dependencies.join(QByteArrayLiteral(" \\\n "));
+ fprintf(depFileHandle.data(), "%s\n", dependenciesJoined.constData());
+ }
+ }
+
return 0;
}
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 50946443be..b562416c31 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -35,6 +35,7 @@
#include <QtCore/qfile.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
+#include <QtCore/qjsondocument.h>
// for normalizeTypeInternal
#include <private/qmetaobject_moc_p.h>
@@ -929,9 +930,9 @@ void Moc::parse()
if (it != classList.end()) {
it->classInfoList += def.classInfoList;
- it->enumDeclarations.unite(def.enumDeclarations);
+ it->enumDeclarations.insert(def.enumDeclarations);
it->enumList += def.enumList;
- it->flagAliases.unite(def.flagAliases);
+ it->flagAliases.insert(def.flagAliases);
} else {
knownGadgets.insert(def.classname, def.qualified);
knownGadgets.insert(def.qualified, def.qualified);
@@ -999,7 +1000,7 @@ static QByteArrayList requiredQtContainers(const QVector<ClassDef> &classes)
return required;
}
-void Moc::generate(FILE *out)
+void Moc::generate(FILE *out, FILE *jsonOutput)
{
QByteArray fn = filename;
int i = filename.length()-1;
@@ -1062,6 +1063,23 @@ void Moc::generate(FILE *out)
fprintf(out, "QT_WARNING_POP\n");
fprintf(out, "QT_END_MOC_NAMESPACE\n");
+
+ if (jsonOutput) {
+ QJsonObject mocData;
+ mocData[QLatin1String("outputRevision")] = mocOutputRevision;
+ mocData[QLatin1String("inputFile")] = QLatin1String(fn.constData());
+
+ QJsonArray classesJsonFormatted;
+
+ for (const ClassDef &cdef: qAsConst(classList))
+ classesJsonFormatted.append(cdef.toJson());
+
+ if (!classesJsonFormatted.isEmpty())
+ mocData[QLatin1String("classes")] = classesJsonFormatted;
+
+ QJsonDocument jsonDoc(mocData);
+ fputs(jsonDoc.toJson().constData(), jsonOutput);
+ }
}
void Moc::parseSlots(ClassDef *def, FunctionDef::Access access)
@@ -1220,6 +1238,9 @@ void Moc::createPropertyDef(PropertyDef &propDef)
} else if(l[0] == 'F' && l == "FINAL") {
propDef.final = true;
continue;
+ } else if (l[0] == 'R' && l == "REQUIRED") {
+ propDef.required = true;
+ continue;
}
QByteArray v, v2;
@@ -1364,6 +1385,7 @@ void Moc::parsePluginData(ClassDef *def)
error(msg.constData());
return;
}
+ parsedPluginMetadataFiles.append(fi.canonicalFilePath());
metaData = file.readAll();
}
}
@@ -1784,6 +1806,187 @@ void Moc::checkProperties(ClassDef *cdef)
}
}
+QJsonObject ClassDef::toJson() const
+{
+ QJsonObject cls;
+ cls[QLatin1String("className")] = QString::fromUtf8(classname.constData());
+ cls[QLatin1String("qualifiedClassName")] = QString::fromUtf8(qualified.constData());
+
+ QJsonArray classInfos;
+ for (const auto &info: qAsConst(classInfoList)) {
+ QJsonObject infoJson;
+ infoJson[QLatin1String("name")] = QString::fromUtf8(info.name);
+ infoJson[QLatin1String("value")] = QString::fromUtf8(info.value);
+ classInfos.append(infoJson);
+ }
+
+ if (classInfos.size())
+ cls[QLatin1String("classInfos")] = classInfos;
+
+ const auto appendFunctions = [&cls](const QString &type, const QVector<FunctionDef> &funcs) {
+ QJsonArray jsonFuncs;
+
+ for (const FunctionDef &fdef: funcs)
+ jsonFuncs.append(fdef.toJson());
+
+ if (!jsonFuncs.isEmpty())
+ cls[type] = jsonFuncs;
+ };
+
+ appendFunctions(QLatin1String("signals"), signalList);
+ appendFunctions(QLatin1String("slots"), slotList);
+ appendFunctions(QLatin1String("constructors"), constructorList);
+ appendFunctions(QLatin1String("methods"), methodList);
+
+ QJsonArray props;
+
+ for (const PropertyDef &propDef: qAsConst(propertyList))
+ props.append(propDef.toJson());
+
+ if (!props.isEmpty())
+ cls[QLatin1String("properties")] = props;
+
+ if (hasQGadget)
+ cls[QLatin1String("gadget")] = true;
+
+ QJsonArray superClasses;
+
+ for (const auto &super: qAsConst(superclassList)) {
+ const auto name = super.first;
+ const auto access = super.second;
+ QJsonObject superCls;
+ superCls[QLatin1String("name")] = QString::fromUtf8(name);
+ FunctionDef::accessToJson(&superCls, access);
+ superClasses.append(superCls);
+ }
+
+ if (!superClasses.isEmpty())
+ cls[QLatin1String("superClasses")] = superClasses;
+
+ QJsonArray enums;
+ for (const EnumDef &enumDef: qAsConst(enumList))
+ enums.append(enumDef.toJson(*this));
+ if (!enums.isEmpty())
+ cls[QLatin1String("enums")] = enums;
+
+ QJsonArray ifaces;
+ for (const QVector<Interface> &ifaceList: interfaceList) {
+ QJsonArray jsonList;
+ for (const Interface &iface: ifaceList) {
+ QJsonObject ifaceJson;
+ ifaceJson[QLatin1String("id")] = QString::fromUtf8(iface.interfaceId);
+ ifaceJson[QLatin1String("className")] = QString::fromUtf8(iface.className);
+ jsonList.append(ifaceJson);
+ }
+ ifaces.append(jsonList);
+ }
+ if (!ifaces.isEmpty())
+ cls[QLatin1String("interfaces")] = ifaces;
+
+ return cls;
+}
+
+QJsonObject FunctionDef::toJson() const
+{
+ QJsonObject fdef;
+ fdef[QLatin1String("name")] = QString::fromUtf8(name);
+ if (!tag.isEmpty())
+ fdef[QLatin1String("tag")] = QString::fromUtf8(tag);
+ fdef[QLatin1String("returnType")] = QString::fromUtf8(normalizedType);
+
+ QJsonArray args;
+ for (const ArgumentDef &arg: arguments)
+ args.append(arg.toJson());
+
+ if (!args.isEmpty())
+ fdef[QLatin1String("arguments")] = args;
+
+ accessToJson(&fdef, access);
+
+ if (revision > 0)
+ fdef[QLatin1String("revision")] = revision;
+
+ return fdef;
+}
+
+void FunctionDef::accessToJson(QJsonObject *obj, FunctionDef::Access acs)
+{
+ switch (acs) {
+ case Private: (*obj)[QLatin1String("access")] = QLatin1String("private"); break;
+ case Public: (*obj)[QLatin1String("access")] = QLatin1String("public"); break;
+ case Protected: (*obj)[QLatin1String("access")] = QLatin1String("protected"); break;
+ }
+}
+
+QJsonObject ArgumentDef::toJson() const
+{
+ QJsonObject arg;
+ arg[QLatin1String("type")] = QString::fromUtf8(normalizedType);
+ if (!name.isEmpty())
+ arg[QLatin1String("name")] = QString::fromUtf8(name);
+ return arg;
+}
+
+QJsonObject PropertyDef::toJson() const
+{
+ QJsonObject prop;
+ prop[QLatin1String("name")] = QString::fromUtf8(name);
+ prop[QLatin1String("type")] = QString::fromUtf8(type);
+
+ const auto jsonify = [&prop](const char *str, const QByteArray &member) {
+ if (!member.isEmpty())
+ prop[QLatin1String(str)] = QString::fromUtf8(member);
+ };
+
+ jsonify("member", member);
+ jsonify("read", read);
+ jsonify("write", write);
+ jsonify("reset", reset);
+ jsonify("notify", notify);
+ jsonify("privateClass", inPrivateClass);
+
+ const auto jsonifyBoolOrString = [&prop](const char *str, const QByteArray &boolOrString) {
+ QJsonValue value;
+ if (boolOrString == "true")
+ value = true;
+ else if (boolOrString == "false")
+ value = false;
+ else
+ value = QString::fromUtf8(boolOrString); // function name to query at run-time
+ prop[QLatin1String(str)] = value;
+ };
+
+ jsonifyBoolOrString("designable", designable);
+ jsonifyBoolOrString("scriptable", scriptable);
+ jsonifyBoolOrString("stored", stored);
+ jsonifyBoolOrString("user", user);
+
+ prop[QLatin1String("constant")] = constant;
+ prop[QLatin1String("final")] = final;
+ prop[QLatin1String("required")] = required;
+ if (revision > 0)
+ prop[QLatin1String("revision")] = revision;
+
+ return prop;
+}
+
+QJsonObject EnumDef::toJson(const ClassDef &cdef) const
+{
+ QJsonObject def;
+ def[QLatin1String("name")] = QString::fromUtf8(name);
+ if (!enumName.isEmpty())
+ def[QLatin1String("alias")] = QString::fromUtf8(enumName);
+ def[QLatin1String("isFlag")] = cdef.enumDeclarations.value(name);
+ def[QLatin1String("isClass")] = isEnumClass;
+
+ QJsonArray valueArr;
+ for (const QByteArray &value: values)
+ valueArr.append(QString::fromUtf8(value));
+ if (!valueArr.isEmpty())
+ def[QLatin1String("values")] = valueArr;
+
+ return def;
+}
QT_END_NAMESPACE
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index bb1c9501fe..04814b85a1 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -61,6 +61,7 @@ struct Type
};
Q_DECLARE_TYPEINFO(Type, Q_MOVABLE_TYPE);
+struct ClassDef;
struct EnumDef
{
QByteArray name;
@@ -68,6 +69,7 @@ struct EnumDef
QVector<QByteArray> values;
bool isEnumClass; // c++11 enum class
EnumDef() : isEnumClass(false) {}
+ QJsonObject toJson(const ClassDef &cdef) const;
};
Q_DECLARE_TYPEINFO(EnumDef, Q_MOVABLE_TYPE);
@@ -78,6 +80,8 @@ struct ArgumentDef
QByteArray rightType, normalizedType, name;
QByteArray typeNameForCast; // type name to be used in cast from void * in metacall
bool isDefault;
+
+ QJsonObject toJson() const;
};
Q_DECLARE_TYPEINFO(ArgumentDef, Q_MOVABLE_TYPE);
@@ -111,6 +115,9 @@ struct FunctionDef
bool isConstructor = false;
bool isDestructor = false;
bool isAbstract = false;
+
+ QJsonObject toJson() const;
+ static void accessToJson(QJsonObject *obj, Access acs);
};
Q_DECLARE_TYPEINFO(FunctionDef, Q_MOVABLE_TYPE);
@@ -130,6 +137,9 @@ struct PropertyDef
int revision = 0;
bool constant = false;
bool final = false;
+ bool required = false;
+
+ QJsonObject toJson() const;
};
Q_DECLARE_TYPEINFO(PropertyDef, Q_MOVABLE_TYPE);
@@ -183,6 +193,7 @@ struct ClassDef : BaseDef {
bool hasQObject = false;
bool hasQGadget = false;
+ QJsonObject toJson() const;
};
Q_DECLARE_TYPEINFO(ClassDef, Q_MOVABLE_TYPE);
Q_DECLARE_TYPEINFO(ClassDef::Interface, Q_MOVABLE_TYPE);
@@ -213,9 +224,10 @@ public:
QHash<QByteArray, QByteArray> knownQObjectClasses;
QHash<QByteArray, QByteArray> knownGadgets;
QMap<QString, QJsonArray> metaArgs;
+ QVector<QString> parsedPluginMetadataFiles;
void parse();
- void generate(FILE *out);
+ void generate(FILE *out, FILE *jsonOutput);
bool parseClassHead(ClassDef *def);
inline bool inClass(const ClassDef *def) const {
diff --git a/src/tools/moc/moc.pri b/src/tools/moc/moc.pri
index 90839a445b..278d5607cd 100644
--- a/src/tools/moc/moc.pri
+++ b/src/tools/moc/moc.pri
@@ -10,9 +10,12 @@ HEADERS = $$PWD/moc.h \
$$PWD/utils.h \
$$PWD/generator.h \
$$PWD/outputrevision.h \
- $$PWD/cbordevice.h
+ $$PWD/cbordevice.h \
+ $$PWD/collectjson.h
+
SOURCES = $$PWD/moc.cpp \
$$PWD/preprocessor.cpp \
$$PWD/generator.cpp \
$$PWD/parser.cpp \
- $$PWD/token.cpp
+ $$PWD/token.cpp \
+ $$PWD/collectjson.cpp
diff --git a/src/tools/moc/parser.cpp b/src/tools/moc/parser.cpp
index b7aefae1ec..068f75d4bd 100644
--- a/src/tools/moc/parser.cpp
+++ b/src/tools/moc/parser.cpp
@@ -37,7 +37,7 @@ QT_BEGIN_NAMESPACE
Symbol::LexemStore Symbol::lexemStore;
#endif
-static const char *error_msg = 0;
+static const char *error_msg = nullptr;
#ifdef Q_CC_MSVC
#define ErrorFormatString "%s(%d): "
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
index d135bddb4c..a99b8cc80c 100644
--- a/src/tools/moc/preprocessor.cpp
+++ b/src/tools/moc/preprocessor.cpp
@@ -943,7 +943,7 @@ int PP_Expression::primary_expression()
test(PP_RPAREN);
} else {
next();
- value = lexem().toInt(0, 0);
+ value = lexem().toInt(nullptr, 0);
}
return value;
}
diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
index 81ebafad79..768594efb4 100644
--- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
+++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
@@ -115,7 +115,7 @@ static QString addFunction(const FunctionDef &mm, bool isSignal = false) {
.arg(typeNameToXml(typeName));
// do we need to describe this argument?
- if (QDBusMetaType::signatureToType(typeName) == QVariant::Invalid)
+ if (QDBusMetaType::signatureToType(typeName) == QMetaType::UnknownType)
xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n")
.arg(typeNameToXml(mm.normalizedType.constData()));
} else {
@@ -159,7 +159,7 @@ static QString addFunction(const FunctionDef &mm, bool isSignal = false) {
isOutput ? QLatin1String("out") : QLatin1String("in"));
// do we need to describe this argument?
- if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
+ if (QDBusMetaType::signatureToType(signature) == QMetaType::UnknownType) {
const char *typeName = QMetaType::typeName(types.at(j));
xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.%1%2\" value=\"%3\"/>\n")
.arg(isOutput ? QLatin1String("Out") : QLatin1String("In"))
@@ -225,7 +225,7 @@ static QString generateInterfaceXml(const ClassDef *mo)
QLatin1String(signature),
QLatin1String(accessvalues[access]));
- if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
+ if (QDBusMetaType::signatureToType(signature) == QMetaType::UnknownType) {
retval += QString::fromLatin1(">\n <annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"%3\"/>\n </property>\n")
.arg(typeNameToXml(mp.type.constData()));
} else {
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
index 9cf753a3f1..9825596f3d 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -211,7 +211,7 @@ static QString classNameForInterface(const QString &interface, ClassType classTy
static QByteArray qtTypeName(const QString &signature, const QDBusIntrospection::Annotations &annotations, int paramId = -1, const char *direction = "Out", bool isSignal = false)
{
int type = QDBusMetaType::signatureToType(signature.toLatin1());
- if (type == QVariant::Invalid) {
+ if (type == QMetaType::UnknownType) {
QString annotationName = QString::fromLatin1("org.qtproject.QtDBus.QtTypeName");
if (paramId >= 0)
annotationName += QString::fromLatin1(".%1%2").arg(QLatin1String(direction)).arg(paramId);
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 7185219d34..7188c81300 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -129,7 +129,7 @@ public:
QLocale::Country m_country;
QFileInfo m_fileInfo;
RCCFileInfo *m_parent;
- QHash<QString, RCCFileInfo*> m_children;
+ QMultiHash<QString, RCCFileInfo *> m_children;
RCCResourceLibrary::CompressionAlgorithm m_compressAlgo;
int m_compressLevel;
int m_compressThreshold;
@@ -737,7 +737,7 @@ bool RCCResourceLibrary::addFile(const QString &alias, const RCCFileInfo &file)
parent->m_children.insert(node, s);
parent = s;
} else {
- parent = parent->m_children[node];
+ parent = *parent->m_children.constFind(node);
}
}
@@ -757,7 +757,7 @@ bool RCCResourceLibrary::addFile(const QString &alias, const RCCFileInfo &file)
break;
}
}
- parent->m_children.insertMulti(filename, s);
+ parent->m_children.insert(filename, s);
return true;
}
diff --git a/src/tools/tracegen/etw.cpp b/src/tools/tracegen/etw.cpp
index acd81bd5c1..eac518dbab 100644
--- a/src/tools/tracegen/etw.cpp
+++ b/src/tools/tracegen/etw.cpp
@@ -90,7 +90,7 @@ static QString createGuid(const QUuid &uuid)
QTextStream stream(&guid);
- hex(stream);
+ Qt::hex(stream);
stream << "("
<< "0x" << uuid.data1 << ", "
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index 1212c410ff..58ed210d3b 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -2304,7 +2304,7 @@ void WriteInitialization::initializeTreeWidget(DomWidget *w)
QString tempName = disableSorting(w, varName);
- QList<Item *> items = initializeTreeWidgetItems(w->elementItem());
+ const auto items = initializeTreeWidgetItems(w->elementItem());
for (int i = 0; i < items.count(); i++) {
Item *itm = items[i];
itm->writeSetupUi(varName);
@@ -2326,10 +2326,10 @@ void WriteInitialization::initializeTreeWidget(DomWidget *w)
conditions an item is needed needs to be done bottom-up, the whole process makes
two passes, storing the intermediate result in a recursive StringInitializerListMap.
*/
-QList<WriteInitialization::Item *> WriteInitialization::initializeTreeWidgetItems(const QVector<DomItem *> &domItems)
+WriteInitialization::Items WriteInitialization::initializeTreeWidgetItems(const QVector<DomItem *> &domItems)
{
// items
- QList<Item *> items;
+ Items items;
const int numDomItems = domItems.size();
items.reserve(numDomItems);
@@ -2357,7 +2357,7 @@ QList<WriteInitialization::Item *> WriteInitialization::initializeTreeWidgetItem
// AbstractFromBuilder saves flags last, so they always end up in the last column's map.
addQtFlagsInitializer(item, map, QLatin1String("flags"));
- const QList<Item *> subItems = initializeTreeWidgetItems(domItem->elementItem());
+ const auto subItems = initializeTreeWidgetItems(domItem->elementItem());
for (Item *subItem : subItems)
item->addChild(subItem);
}
diff --git a/src/tools/uic/cpp/cppwriteinitialization.h b/src/tools/uic/cpp/cppwriteinitialization.h
index 6f8e352f6a..ab996a2800 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.h
+++ b/src/tools/uic/cpp/cppwriteinitialization.h
@@ -187,7 +187,7 @@ private:
};
ItemData m_setupUiData;
ItemData m_retranslateUiData;
- QList<Item *> m_children;
+ QVector<Item *> m_children;
Item *m_parent = nullptr;
const QString m_itemClassName;
@@ -196,6 +196,7 @@ private:
QTextStream &m_retranslateUiStream;
Driver *m_driver;
};
+ using Items = QVector<Item *>;
void addInitializer(Item *item,
const QString &name, int column, const QString &value, const QString &directive = QString(), bool translatable = false) const;
@@ -214,7 +215,7 @@ private:
void initializeComboBox(DomWidget *w);
void initializeListWidget(DomWidget *w);
void initializeTreeWidget(DomWidget *w);
- QList<Item *> initializeTreeWidgetItems(const QVector<DomItem *> &domItems);
+ Items initializeTreeWidgetItems(const QVector<DomItem *> &domItems);
void initializeTableWidget(DomWidget *w);
QString disableSorting(DomWidget *w, const QString &varName);
diff --git a/src/tools/uic/treewalker.h b/src/tools/uic/treewalker.h
index 3777229517..6905d74fd9 100644
--- a/src/tools/uic/treewalker.h
+++ b/src/tools/uic/treewalker.h
@@ -29,7 +29,7 @@
#ifndef TREEWALKER_H
#define TREEWALKER_H
-#include <qlist.h>
+#include <qvector.h>
QT_BEGIN_NAMESPACE
diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp
index 334ced276d..f52a8bd7d4 100644
--- a/src/tools/uic/ui4.cpp
+++ b/src/tools/uic/ui4.cpp
@@ -59,7 +59,7 @@ void DomUI::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("version")) {
setAttributeVersion(attribute.value().toString());
continue;
@@ -94,7 +94,7 @@ void DomUI::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("author"), Qt::CaseInsensitive)) {
setElementAuthor(reader.readElementText());
continue;
@@ -581,7 +581,7 @@ void DomIncludes::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("include"), Qt::CaseInsensitive)) {
auto *v = new DomInclude();
v->read(reader);
@@ -621,7 +621,7 @@ void DomInclude::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("location")) {
setAttributeLocation(attribute.value().toString());
continue;
@@ -636,7 +636,7 @@ void DomInclude::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -678,7 +678,7 @@ void DomResources::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("name")) {
setAttributeName(attribute.value().toString());
continue;
@@ -689,7 +689,7 @@ void DomResources::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("include"), Qt::CaseInsensitive)) {
auto *v = new DomResource();
v->read(reader);
@@ -732,7 +732,7 @@ void DomResource::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("location")) {
setAttributeLocation(attribute.value().toString());
continue;
@@ -743,7 +743,7 @@ void DomResource::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -781,7 +781,7 @@ void DomActionGroup::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("name")) {
setAttributeName(attribute.value().toString());
continue;
@@ -792,7 +792,7 @@ void DomActionGroup::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("action"), Qt::CaseInsensitive)) {
auto *v = new DomAction();
v->read(reader);
@@ -886,7 +886,7 @@ void DomAction::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("name")) {
setAttributeName(attribute.value().toString());
continue;
@@ -901,7 +901,7 @@ void DomAction::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("property"), Qt::CaseInsensitive)) {
auto *v = new DomProperty();
v->read(reader);
@@ -962,7 +962,7 @@ void DomActionRef::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("name")) {
setAttributeName(attribute.value().toString());
continue;
@@ -973,7 +973,7 @@ void DomActionRef::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -1007,7 +1007,7 @@ void DomButtonGroup::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("name")) {
setAttributeName(attribute.value().toString());
continue;
@@ -1018,7 +1018,7 @@ void DomButtonGroup::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("property"), Qt::CaseInsensitive)) {
auto *v = new DomProperty();
v->read(reader);
@@ -1081,7 +1081,7 @@ void DomButtonGroups::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("buttongroup"), Qt::CaseInsensitive)) {
auto *v = new DomButtonGroup();
v->read(reader);
@@ -1126,7 +1126,7 @@ void DomCustomWidgets::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("customwidget"), Qt::CaseInsensitive)) {
auto *v = new DomCustomWidget();
v->read(reader);
@@ -1166,7 +1166,7 @@ void DomHeader::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("location")) {
setAttributeLocation(attribute.value().toString());
continue;
@@ -1177,7 +1177,7 @@ void DomHeader::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -1219,7 +1219,7 @@ void DomCustomWidget::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("class"), Qt::CaseInsensitive)) {
setElementClass(reader.readElementText());
continue;
@@ -1473,7 +1473,7 @@ void DomLayoutDefault::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("spacing")) {
setAttributeSpacing(attribute.value().toInt());
continue;
@@ -1488,7 +1488,7 @@ void DomLayoutDefault::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -1519,7 +1519,7 @@ void DomLayoutFunction::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("spacing")) {
setAttributeSpacing(attribute.value().toString());
continue;
@@ -1534,7 +1534,7 @@ void DomLayoutFunction::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -1569,7 +1569,7 @@ void DomTabStops::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("tabstop"), Qt::CaseInsensitive)) {
m_tabStop.append(reader.readElementText());
continue;
@@ -1615,7 +1615,7 @@ void DomLayout::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("class")) {
setAttributeClass(attribute.value().toString());
continue;
@@ -1650,7 +1650,7 @@ void DomLayout::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("property"), Qt::CaseInsensitive)) {
auto *v = new DomProperty();
v->read(reader);
@@ -1759,7 +1759,7 @@ void DomLayoutItem::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("row")) {
setAttributeRow(attribute.value().toInt());
continue;
@@ -1786,7 +1786,7 @@ void DomLayoutItem::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("widget"), Qt::CaseInsensitive)) {
auto *v = new DomWidget();
v->read(reader);
@@ -1910,7 +1910,7 @@ void DomRow::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("property"), Qt::CaseInsensitive)) {
auto *v = new DomProperty();
v->read(reader);
@@ -1955,7 +1955,7 @@ void DomColumn::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("property"), Qt::CaseInsensitive)) {
auto *v = new DomProperty();
v->read(reader);
@@ -2001,7 +2001,7 @@ void DomItem::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("row")) {
setAttributeRow(attribute.value().toInt());
continue;
@@ -2016,7 +2016,7 @@ void DomItem::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("property"), Qt::CaseInsensitive)) {
auto *v = new DomProperty();
v->read(reader);
@@ -2101,7 +2101,7 @@ void DomWidget::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("class")) {
setAttributeClass(attribute.value().toString());
continue;
@@ -2120,7 +2120,7 @@ void DomWidget::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("class"), Qt::CaseInsensitive)) {
m_class.append(reader.readElementText());
continue;
@@ -2344,7 +2344,7 @@ void DomSpacer::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("name")) {
setAttributeName(attribute.value().toString());
continue;
@@ -2355,7 +2355,7 @@ void DomSpacer::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("property"), Qt::CaseInsensitive)) {
auto *v = new DomProperty();
v->read(reader);
@@ -2398,7 +2398,7 @@ void DomColor::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("alpha")) {
setAttributeAlpha(attribute.value().toInt());
continue;
@@ -2409,7 +2409,7 @@ void DomColor::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("red"), Qt::CaseInsensitive)) {
setElementRed(reader.readElementText().toInt());
continue;
@@ -2494,7 +2494,7 @@ void DomGradientStop::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("position")) {
setAttributePosition(attribute.value().toDouble());
continue;
@@ -2505,7 +2505,7 @@ void DomGradientStop::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("color"), Qt::CaseInsensitive)) {
auto *v = new DomColor();
v->read(reader);
@@ -2568,7 +2568,7 @@ void DomGradient::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("startx")) {
setAttributeStartX(attribute.value().toDouble());
continue;
@@ -2627,7 +2627,7 @@ void DomGradient::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("gradientstop"), Qt::CaseInsensitive)) {
auto *v = new DomGradientStop();
v->read(reader);
@@ -2724,7 +2724,7 @@ void DomBrush::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("brushstyle")) {
setAttributeBrushStyle(attribute.value().toString());
continue;
@@ -2735,7 +2735,7 @@ void DomBrush::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("color"), Qt::CaseInsensitive)) {
auto *v = new DomColor();
v->read(reader);
@@ -2845,7 +2845,7 @@ void DomColorRole::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("role")) {
setAttributeRole(attribute.value().toString());
continue;
@@ -2856,7 +2856,7 @@ void DomColorRole::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("brush"), Qt::CaseInsensitive)) {
auto *v = new DomBrush();
v->read(reader);
@@ -2922,7 +2922,7 @@ void DomColorGroup::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("colorrole"), Qt::CaseInsensitive)) {
auto *v = new DomColorRole();
v->read(reader);
@@ -2983,7 +2983,7 @@ void DomPalette::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("active"), Qt::CaseInsensitive)) {
auto *v = new DomColorGroup();
v->read(reader);
@@ -3102,7 +3102,7 @@ void DomFont::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("family"), Qt::CaseInsensitive)) {
setElementFamily(reader.readElementText());
continue;
@@ -3308,7 +3308,7 @@ void DomPoint::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("x"), Qt::CaseInsensitive)) {
setElementX(reader.readElementText().toInt());
continue;
@@ -3370,7 +3370,7 @@ void DomRect::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("x"), Qt::CaseInsensitive)) {
setElementX(reader.readElementText().toInt());
continue;
@@ -3467,7 +3467,7 @@ void DomLocale::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("language")) {
setAttributeLanguage(attribute.value().toString());
continue;
@@ -3482,7 +3482,7 @@ void DomLocale::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -3513,7 +3513,7 @@ void DomSizePolicy::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("hsizetype")) {
setAttributeHSizeType(attribute.value().toString());
continue;
@@ -3528,7 +3528,7 @@ void DomSizePolicy::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("hsizetype"), Qt::CaseInsensitive)) {
setElementHSizeType(reader.readElementText().toInt());
continue;
@@ -3632,7 +3632,7 @@ void DomSize::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("width"), Qt::CaseInsensitive)) {
setElementWidth(reader.readElementText().toInt());
continue;
@@ -3694,7 +3694,7 @@ void DomDate::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("year"), Qt::CaseInsensitive)) {
setElementYear(reader.readElementText().toInt());
continue;
@@ -3774,7 +3774,7 @@ void DomTime::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("hour"), Qt::CaseInsensitive)) {
setElementHour(reader.readElementText().toInt());
continue;
@@ -3854,7 +3854,7 @@ void DomDateTime::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("hour"), Qt::CaseInsensitive)) {
setElementHour(reader.readElementText().toInt());
continue;
@@ -3990,7 +3990,7 @@ void DomStringList::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("notr")) {
setAttributeNotr(attribute.value().toString());
continue;
@@ -4013,7 +4013,7 @@ void DomStringList::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("string"), Qt::CaseInsensitive)) {
m_string.append(reader.readElementText());
continue;
@@ -4063,7 +4063,7 @@ void DomResourcePixmap::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("resource")) {
setAttributeResource(attribute.value().toString());
continue;
@@ -4078,7 +4078,7 @@ void DomResourcePixmap::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -4126,7 +4126,7 @@ void DomResourceIcon::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("theme")) {
setAttributeTheme(attribute.value().toString());
continue;
@@ -4141,7 +4141,7 @@ void DomResourceIcon::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("normaloff"), Qt::CaseInsensitive)) {
auto *v = new DomResourcePixmap();
v->read(reader);
@@ -4427,7 +4427,7 @@ void DomString::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("notr")) {
setAttributeNotr(attribute.value().toString());
continue;
@@ -4450,7 +4450,7 @@ void DomString::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -4495,7 +4495,7 @@ void DomPointF::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("x"), Qt::CaseInsensitive)) {
setElementX(reader.readElementText().toDouble());
continue;
@@ -4557,7 +4557,7 @@ void DomRectF::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("x"), Qt::CaseInsensitive)) {
setElementX(reader.readElementText().toDouble());
continue;
@@ -4655,7 +4655,7 @@ void DomSizeF::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("width"), Qt::CaseInsensitive)) {
setElementWidth(reader.readElementText().toDouble());
continue;
@@ -4717,7 +4717,7 @@ void DomChar::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("unicode"), Qt::CaseInsensitive)) {
setElementUnicode(reader.readElementText().toInt());
continue;
@@ -4764,7 +4764,7 @@ void DomUrl::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("string"), Qt::CaseInsensitive)) {
auto *v = new DomString();
v->read(reader);
@@ -4899,7 +4899,7 @@ void DomProperty::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("name")) {
setAttributeName(attribute.value().toString());
continue;
@@ -4914,7 +4914,7 @@ void DomProperty::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("bool"), Qt::CaseInsensitive)) {
setElementBool(reader.readElementText());
continue;
@@ -5659,7 +5659,7 @@ void DomConnections::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("connection"), Qt::CaseInsensitive)) {
auto *v = new DomConnection();
v->read(reader);
@@ -5703,7 +5703,7 @@ void DomConnection::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("sender"), Qt::CaseInsensitive)) {
setElementSender(reader.readElementText());
continue;
@@ -5836,7 +5836,7 @@ void DomConnectionHints::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("hint"), Qt::CaseInsensitive)) {
auto *v = new DomConnectionHint();
v->read(reader);
@@ -5876,7 +5876,7 @@ void DomConnectionHint::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("type")) {
setAttributeType(attribute.value().toString());
continue;
@@ -5887,7 +5887,7 @@ void DomConnectionHint::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("x"), Qt::CaseInsensitive)) {
setElementX(reader.readElementText().toInt());
continue;
@@ -5956,7 +5956,7 @@ void DomDesignerData::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("property"), Qt::CaseInsensitive)) {
auto *v = new DomProperty();
v->read(reader);
@@ -6001,7 +6001,7 @@ void DomSlots::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("signal"), Qt::CaseInsensitive)) {
m_signal.append(reader.readElementText());
continue;
@@ -6059,7 +6059,7 @@ void DomPropertySpecifications::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
if (!tag.compare(QLatin1String("tooltip"), Qt::CaseInsensitive)) {
auto *v = new DomPropertyToolTip();
v->read(reader);
@@ -6114,7 +6114,7 @@ void DomPropertyToolTip::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("name")) {
setAttributeName(attribute.value().toString());
continue;
@@ -6125,7 +6125,7 @@ void DomPropertyToolTip::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
@@ -6153,7 +6153,7 @@ void DomStringPropertySpecification::read(QXmlStreamReader &reader)
{
const QXmlStreamAttributes &attributes = reader.attributes();
for (const QXmlStreamAttribute &attribute : attributes) {
- const QStringRef name = attribute.name();
+ const auto name = attribute.name();
if (name == QLatin1String("name")) {
setAttributeName(attribute.value().toString());
continue;
@@ -6172,7 +6172,7 @@ void DomStringPropertySpecification::read(QXmlStreamReader &reader)
while (!reader.hasError()) {
switch (reader.readNext()) {
case QXmlStreamReader::StartElement : {
- const QStringRef tag = reader.name();
+ const auto tag = reader.name();
reader.raiseError(QLatin1String("Unexpected element ") + tag);
}
break;
diff --git a/src/tools/uic/ui4.h b/src/tools/uic/ui4.h
index 08a3abf490..94cdb40b6f 100644
--- a/src/tools/uic/ui4.h
+++ b/src/tools/uic/ui4.h
@@ -140,7 +140,7 @@ class DomStringPropertySpecification;
*/
class QDESIGNER_UILIB_EXPORT DomUI {
- Q_DISABLE_COPY(DomUI)
+ Q_DISABLE_COPY_MOVE(DomUI)
public:
DomUI() = default;
~DomUI();
@@ -339,7 +339,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomIncludes {
- Q_DISABLE_COPY(DomIncludes)
+ Q_DISABLE_COPY_MOVE(DomIncludes)
public:
DomIncludes() = default;
~DomIncludes();
@@ -363,7 +363,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomInclude {
- Q_DISABLE_COPY(DomInclude)
+ Q_DISABLE_COPY_MOVE(DomInclude)
public:
DomInclude() = default;
~DomInclude();
@@ -397,7 +397,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomResources {
- Q_DISABLE_COPY(DomResources)
+ Q_DISABLE_COPY_MOVE(DomResources)
public:
DomResources() = default;
~DomResources();
@@ -430,7 +430,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomResource {
- Q_DISABLE_COPY(DomResource)
+ Q_DISABLE_COPY_MOVE(DomResource)
public:
DomResource() = default;
~DomResource();
@@ -451,7 +451,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomActionGroup {
- Q_DISABLE_COPY(DomActionGroup)
+ Q_DISABLE_COPY_MOVE(DomActionGroup)
public:
DomActionGroup() = default;
~DomActionGroup();
@@ -499,7 +499,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomAction {
- Q_DISABLE_COPY(DomAction)
+ Q_DISABLE_COPY_MOVE(DomAction)
public:
DomAction() = default;
~DomAction();
@@ -545,7 +545,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomActionRef {
- Q_DISABLE_COPY(DomActionRef)
+ Q_DISABLE_COPY_MOVE(DomActionRef)
public:
DomActionRef() = default;
~DomActionRef();
@@ -566,7 +566,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomButtonGroup {
- Q_DISABLE_COPY(DomButtonGroup)
+ Q_DISABLE_COPY_MOVE(DomButtonGroup)
public:
DomButtonGroup() = default;
~DomButtonGroup();
@@ -604,7 +604,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomButtonGroups {
- Q_DISABLE_COPY(DomButtonGroups)
+ Q_DISABLE_COPY_MOVE(DomButtonGroups)
public:
DomButtonGroups() = default;
~DomButtonGroups();
@@ -628,7 +628,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomCustomWidgets {
- Q_DISABLE_COPY(DomCustomWidgets)
+ Q_DISABLE_COPY_MOVE(DomCustomWidgets)
public:
DomCustomWidgets() = default;
~DomCustomWidgets();
@@ -652,7 +652,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomHeader {
- Q_DISABLE_COPY(DomHeader)
+ Q_DISABLE_COPY_MOVE(DomHeader)
public:
DomHeader() = default;
~DomHeader();
@@ -678,7 +678,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomCustomWidget {
- Q_DISABLE_COPY(DomCustomWidget)
+ Q_DISABLE_COPY_MOVE(DomCustomWidget)
public:
DomCustomWidget() = default;
~DomCustomWidget();
@@ -764,7 +764,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomLayoutDefault {
- Q_DISABLE_COPY(DomLayoutDefault)
+ Q_DISABLE_COPY_MOVE(DomLayoutDefault)
public:
DomLayoutDefault() = default;
~DomLayoutDefault();
@@ -793,7 +793,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomLayoutFunction {
- Q_DISABLE_COPY(DomLayoutFunction)
+ Q_DISABLE_COPY_MOVE(DomLayoutFunction)
public:
DomLayoutFunction() = default;
~DomLayoutFunction();
@@ -822,7 +822,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomTabStops {
- Q_DISABLE_COPY(DomTabStops)
+ Q_DISABLE_COPY_MOVE(DomTabStops)
public:
DomTabStops() = default;
~DomTabStops();
@@ -846,7 +846,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomLayout {
- Q_DISABLE_COPY(DomLayout)
+ Q_DISABLE_COPY_MOVE(DomLayout)
public:
DomLayout() = default;
~DomLayout();
@@ -937,7 +937,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomLayoutItem {
- Q_DISABLE_COPY(DomLayoutItem)
+ Q_DISABLE_COPY_MOVE(DomLayoutItem)
public:
DomLayoutItem() = default;
~DomLayoutItem();
@@ -1014,7 +1014,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomRow {
- Q_DISABLE_COPY(DomRow)
+ Q_DISABLE_COPY_MOVE(DomRow)
public:
DomRow() = default;
~DomRow();
@@ -1038,7 +1038,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomColumn {
- Q_DISABLE_COPY(DomColumn)
+ Q_DISABLE_COPY_MOVE(DomColumn)
public:
DomColumn() = default;
~DomColumn();
@@ -1062,7 +1062,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomItem {
- Q_DISABLE_COPY(DomItem)
+ Q_DISABLE_COPY_MOVE(DomItem)
public:
DomItem() = default;
~DomItem();
@@ -1108,7 +1108,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomWidget {
- Q_DISABLE_COPY(DomWidget)
+ Q_DISABLE_COPY_MOVE(DomWidget)
public:
DomWidget() = default;
~DomWidget();
@@ -1212,7 +1212,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomSpacer {
- Q_DISABLE_COPY(DomSpacer)
+ Q_DISABLE_COPY_MOVE(DomSpacer)
public:
DomSpacer() = default;
~DomSpacer();
@@ -1245,7 +1245,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomColor {
- Q_DISABLE_COPY(DomColor)
+ Q_DISABLE_COPY_MOVE(DomColor)
public:
DomColor() = default;
~DomColor();
@@ -1294,7 +1294,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomGradientStop {
- Q_DISABLE_COPY(DomGradientStop)
+ Q_DISABLE_COPY_MOVE(DomGradientStop)
public:
DomGradientStop() = default;
~DomGradientStop();
@@ -1330,7 +1330,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomGradient {
- Q_DISABLE_COPY(DomGradient)
+ Q_DISABLE_COPY_MOVE(DomGradient)
public:
DomGradient() = default;
~DomGradient();
@@ -1459,7 +1459,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomBrush {
- Q_DISABLE_COPY(DomBrush)
+ Q_DISABLE_COPY_MOVE(DomBrush)
public:
DomBrush() = default;
~DomBrush();
@@ -1504,7 +1504,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomColorRole {
- Q_DISABLE_COPY(DomColorRole)
+ Q_DISABLE_COPY_MOVE(DomColorRole)
public:
DomColorRole() = default;
~DomColorRole();
@@ -1540,7 +1540,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomColorGroup {
- Q_DISABLE_COPY(DomColorGroup)
+ Q_DISABLE_COPY_MOVE(DomColorGroup)
public:
DomColorGroup() = default;
~DomColorGroup();
@@ -1569,7 +1569,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomPalette {
- Q_DISABLE_COPY(DomPalette)
+ Q_DISABLE_COPY_MOVE(DomPalette)
public:
DomPalette() = default;
~DomPalette();
@@ -1612,7 +1612,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomFont {
- Q_DISABLE_COPY(DomFont)
+ Q_DISABLE_COPY_MOVE(DomFont)
public:
DomFont() = default;
~DomFont();
@@ -1701,7 +1701,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomPoint {
- Q_DISABLE_COPY(DomPoint)
+ Q_DISABLE_COPY_MOVE(DomPoint)
public:
DomPoint() = default;
~DomPoint();
@@ -1734,7 +1734,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomRect {
- Q_DISABLE_COPY(DomRect)
+ Q_DISABLE_COPY_MOVE(DomRect)
public:
DomRect() = default;
~DomRect();
@@ -1781,7 +1781,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomLocale {
- Q_DISABLE_COPY(DomLocale)
+ Q_DISABLE_COPY_MOVE(DomLocale)
public:
DomLocale() = default;
~DomLocale();
@@ -1810,7 +1810,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomSizePolicy {
- Q_DISABLE_COPY(DomSizePolicy)
+ Q_DISABLE_COPY_MOVE(DomSizePolicy)
public:
DomSizePolicy() = default;
~DomSizePolicy();
@@ -1874,7 +1874,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomSize {
- Q_DISABLE_COPY(DomSize)
+ Q_DISABLE_COPY_MOVE(DomSize)
public:
DomSize() = default;
~DomSize();
@@ -1907,7 +1907,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomDate {
- Q_DISABLE_COPY(DomDate)
+ Q_DISABLE_COPY_MOVE(DomDate)
public:
DomDate() = default;
~DomDate();
@@ -1947,7 +1947,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomTime {
- Q_DISABLE_COPY(DomTime)
+ Q_DISABLE_COPY_MOVE(DomTime)
public:
DomTime() = default;
~DomTime();
@@ -1987,7 +1987,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomDateTime {
- Q_DISABLE_COPY(DomDateTime)
+ Q_DISABLE_COPY_MOVE(DomDateTime)
public:
DomDateTime() = default;
~DomDateTime();
@@ -2048,7 +2048,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomStringList {
- Q_DISABLE_COPY(DomStringList)
+ Q_DISABLE_COPY_MOVE(DomStringList)
public:
DomStringList() = default;
~DomStringList();
@@ -2105,7 +2105,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomResourcePixmap {
- Q_DISABLE_COPY(DomResourcePixmap)
+ Q_DISABLE_COPY_MOVE(DomResourcePixmap)
public:
DomResourcePixmap() = default;
~DomResourcePixmap();
@@ -2139,7 +2139,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomResourceIcon {
- Q_DISABLE_COPY(DomResourceIcon)
+ Q_DISABLE_COPY_MOVE(DomResourceIcon)
public:
DomResourceIcon() = default;
~DomResourceIcon();
@@ -2244,7 +2244,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomString {
- Q_DISABLE_COPY(DomString)
+ Q_DISABLE_COPY_MOVE(DomString)
public:
DomString() = default;
~DomString();
@@ -2294,7 +2294,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomPointF {
- Q_DISABLE_COPY(DomPointF)
+ Q_DISABLE_COPY_MOVE(DomPointF)
public:
DomPointF() = default;
~DomPointF();
@@ -2327,7 +2327,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomRectF {
- Q_DISABLE_COPY(DomRectF)
+ Q_DISABLE_COPY_MOVE(DomRectF)
public:
DomRectF() = default;
~DomRectF();
@@ -2374,7 +2374,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomSizeF {
- Q_DISABLE_COPY(DomSizeF)
+ Q_DISABLE_COPY_MOVE(DomSizeF)
public:
DomSizeF() = default;
~DomSizeF();
@@ -2407,7 +2407,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomChar {
- Q_DISABLE_COPY(DomChar)
+ Q_DISABLE_COPY_MOVE(DomChar)
public:
DomChar() = default;
~DomChar();
@@ -2433,7 +2433,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomUrl {
- Q_DISABLE_COPY(DomUrl)
+ Q_DISABLE_COPY_MOVE(DomUrl)
public:
DomUrl() = default;
~DomUrl();
@@ -2460,7 +2460,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomProperty {
- Q_DISABLE_COPY(DomProperty)
+ Q_DISABLE_COPY_MOVE(DomProperty)
public:
DomProperty() = default;
~DomProperty();
@@ -2651,7 +2651,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomConnections {
- Q_DISABLE_COPY(DomConnections)
+ Q_DISABLE_COPY_MOVE(DomConnections)
public:
DomConnections() = default;
~DomConnections();
@@ -2675,7 +2675,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomConnection {
- Q_DISABLE_COPY(DomConnection)
+ Q_DISABLE_COPY_MOVE(DomConnection)
public:
DomConnection() = default;
~DomConnection();
@@ -2730,7 +2730,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomConnectionHints {
- Q_DISABLE_COPY(DomConnectionHints)
+ Q_DISABLE_COPY_MOVE(DomConnectionHints)
public:
DomConnectionHints() = default;
~DomConnectionHints();
@@ -2754,7 +2754,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomConnectionHint {
- Q_DISABLE_COPY(DomConnectionHint)
+ Q_DISABLE_COPY_MOVE(DomConnectionHint)
public:
DomConnectionHint() = default;
~DomConnectionHint();
@@ -2796,7 +2796,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomDesignerData {
- Q_DISABLE_COPY(DomDesignerData)
+ Q_DISABLE_COPY_MOVE(DomDesignerData)
public:
DomDesignerData() = default;
~DomDesignerData();
@@ -2820,7 +2820,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomSlots {
- Q_DISABLE_COPY(DomSlots)
+ Q_DISABLE_COPY_MOVE(DomSlots)
public:
DomSlots() = default;
~DomSlots();
@@ -2849,7 +2849,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomPropertySpecifications {
- Q_DISABLE_COPY(DomPropertySpecifications)
+ Q_DISABLE_COPY_MOVE(DomPropertySpecifications)
public:
DomPropertySpecifications() = default;
~DomPropertySpecifications();
@@ -2878,7 +2878,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomPropertyToolTip {
- Q_DISABLE_COPY(DomPropertyToolTip)
+ Q_DISABLE_COPY_MOVE(DomPropertyToolTip)
public:
DomPropertyToolTip() = default;
~DomPropertyToolTip();
@@ -2899,7 +2899,7 @@ private:
};
class QDESIGNER_UILIB_EXPORT DomStringPropertySpecification {
- Q_DISABLE_COPY(DomStringPropertySpecification)
+ Q_DISABLE_COPY_MOVE(DomStringPropertySpecification)
public:
DomStringPropertySpecification() = default;
~DomStringPropertySpecification();
diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
index 99d87e2e46..236d1d4159 100644
--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
@@ -17,3 +17,14 @@ endif()
include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5Widgets_AccessibleFactory.cmake\" OPTIONAL)
set(Qt5Widgets_UIC_EXECUTABLE Qt5::uic)
+
+# Create versionless tool targets.
+foreach(__qt_tool uic)
+ if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::${__qt_tool}
+ AND TARGET Qt5::${__qt_tool})
+ add_executable(Qt::${__qt_tool} IMPORTED)
+ get_target_property(__qt_imported_location Qt5::${__qt_tool} IMPORTED_LOCATION)
+ set_target_properties(Qt::${__qt_tool}
+ PROPERTIES IMPORTED_LOCATION \"${__qt_imported_location}\")
+ endif()
+endforeach()
diff --git a/src/widgets/Qt5WidgetsMacros.cmake b/src/widgets/Qt5WidgetsMacros.cmake
index 737371a5ad..35d2a2dc54 100644
--- a/src/widgets/Qt5WidgetsMacros.cmake
+++ b/src/widgets/Qt5WidgetsMacros.cmake
@@ -41,7 +41,7 @@ include(CMakeParseArguments)
# qt5_wrap_ui(outfiles inputfile ... )
-function(QT5_WRAP_UI outfiles )
+function(qt5_wrap_ui outfiles )
set(options)
set(oneValueArgs)
set(multiValueArgs OPTIONS)
@@ -66,3 +66,15 @@ function(QT5_WRAP_UI outfiles )
endforeach()
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
+
+# This will override the CMake upstream command, because that one is for Qt 3.
+if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
+ function(qt_wrap_ui outfiles)
+ if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
+ qt5_wrap_ui("${outfiles}" ${ARGN})
+ elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
+ qt6_wrap_ui("${outfiles}" ${ARGN})
+ endif()
+ set("${outfiles}" "${${outfiles}}" PARENT_SCOPE)
+ endfunction()
+endif()
diff --git a/src/widgets/accessible/complexwidgets.cpp b/src/widgets/accessible/complexwidgets.cpp
index 5c993262bf..ce2ceac938 100644
--- a/src/widgets/accessible/complexwidgets.cpp
+++ b/src/widgets/accessible/complexwidgets.cpp
@@ -97,10 +97,10 @@ public:
if (t == QAccessible::ActionInterface) {
return static_cast<QAccessibleActionInterface*>(this);
}
- return 0;
+ return nullptr;
}
- QObject *object() const override { return 0; }
+ QObject *object() const override { return nullptr; }
QAccessible::Role role() const override { return QAccessible::PageTab; }
QAccessible::State state() const override {
if (!isValid()) {
@@ -132,7 +132,7 @@ public:
return false;
}
- QAccessibleInterface *childAt(int, int) const override { return 0; }
+ QAccessibleInterface *childAt(int, int) const override { return nullptr; }
int childCount() const override { return 0; }
int indexOfChild(const QAccessibleInterface *) const override { return -1; }
@@ -171,7 +171,7 @@ public:
QAccessibleInterface *parent() const override {
return QAccessible::queryAccessibleInterface(m_parent.data());
}
- QAccessibleInterface *child(int) const override { return 0; }
+ QAccessibleInterface *child(int) const override { return nullptr; }
// action interface
QStringList actionNames() const override
@@ -250,7 +250,7 @@ QAccessibleInterface* QAccessibleTabBar::child(int index) const
return QAccessible::queryAccessibleInterface(tabBar()->d_func()->rightB);
}
}
- return 0;
+ return nullptr;
}
int QAccessibleTabBar::indexOfChild(const QAccessibleInterface *child) const
@@ -327,7 +327,7 @@ QAccessibleInterface *QAccessibleComboBox::child(int index) const
} else if (index == 1 && comboBox()->isEditable()) {
return QAccessible::queryAccessibleInterface(comboBox()->lineEdit());
}
- return 0;
+ return nullptr;
}
int QAccessibleComboBox::childCount() const
@@ -340,7 +340,7 @@ QAccessibleInterface *QAccessibleComboBox::childAt(int x, int y) const
{
if (comboBox()->isEditable() && comboBox()->lineEdit()->rect().contains(x, y))
return child(1);
- return 0;
+ return nullptr;
}
int QAccessibleComboBox::indexOfChild(const QAccessibleInterface *child) const
@@ -445,7 +445,7 @@ bool QAccessibleAbstractScrollArea::isValid() const
QAccessibleInterface *QAccessibleAbstractScrollArea::childAt(int x, int y) const
{
if (!abstractScrollArea()->isVisible())
- return 0;
+ return nullptr;
for (int i = 0; i < childCount(); ++i) {
QPoint wpos = accessibleChildren().at(i)->mapToGlobal(QPoint(0, 0));
@@ -453,7 +453,7 @@ QAccessibleInterface *QAccessibleAbstractScrollArea::childAt(int x, int y) const
if (rect.contains(x, y))
return child(i);
}
- return 0;
+ return nullptr;
}
QAbstractScrollArea *QAccessibleAbstractScrollArea::abstractScrollArea() const
diff --git a/src/widgets/accessible/itemviews.cpp b/src/widgets/accessible/itemviews.cpp
index 3bfe215c05..5a7fdf9a03 100644
--- a/src/widgets/accessible/itemviews.cpp
+++ b/src/widgets/accessible/itemviews.cpp
@@ -121,7 +121,7 @@ QAccessibleTable::~QAccessibleTable()
QHeaderView *QAccessibleTable::horizontalHeader() const
{
- QHeaderView *header = 0;
+ QHeaderView *header = nullptr;
if (false) {
#if QT_CONFIG(tableview)
} else if (const QTableView *tv = qobject_cast<const QTableView*>(view())) {
@@ -137,7 +137,7 @@ QHeaderView *QAccessibleTable::horizontalHeader() const
QHeaderView *QAccessibleTable::verticalHeader() const
{
- QHeaderView *header = 0;
+ QHeaderView *header = nullptr;
if (false) {
#if QT_CONFIG(tableview)
} else if (const QTableView *tv = qobject_cast<const QTableView*>(view())) {
@@ -150,19 +150,19 @@ QHeaderView *QAccessibleTable::verticalHeader() const
QAccessibleInterface *QAccessibleTable::cellAt(int row, int column) const
{
if (!view()->model())
- return 0;
+ return nullptr;
Q_ASSERT(role() != QAccessible::Tree);
QModelIndex index = view()->model()->index(row, column, view()->rootIndex());
if (Q_UNLIKELY(!index.isValid())) {
qWarning() << "QAccessibleTable::cellAt: invalid index: " << index << " for " << view();
- return 0;
+ return nullptr;
}
return child(logicalIndex(index));
}
QAccessibleInterface *QAccessibleTable::caption() const
{
- return 0;
+ return nullptr;
}
QString QAccessibleTable::columnDescription(int column) const
@@ -254,7 +254,7 @@ QList<int> QAccessibleTable::selectedRows() const
QAccessibleInterface *QAccessibleTable::summary() const
{
- return 0;
+ return nullptr;
}
bool QAccessibleTable::isColumnSelected(int column) const
@@ -422,7 +422,7 @@ QAccessibleInterface *QAccessibleTable::childAt(int x, int y) const
if (index.isValid()) {
return child(logicalIndex(index));
}
- return 0;
+ return nullptr;
}
int QAccessibleTable::childCount() const
@@ -485,13 +485,13 @@ QAccessibleInterface *QAccessibleTable::parent() const
}
return QAccessible::queryAccessibleInterface(view()->parent());
}
- return 0;
+ return nullptr;
}
QAccessibleInterface *QAccessibleTable::child(int logicalIndex) const
{
if (!view()->model())
- return 0;
+ return nullptr;
auto id = childToId.constFind(logicalIndex);
if (id != childToId.constEnd())
@@ -505,7 +505,7 @@ QAccessibleInterface *QAccessibleTable::child(int logicalIndex) const
int row = logicalIndex / columns;
int column = logicalIndex % columns;
- QAccessibleInterface *iface = 0;
+ QAccessibleInterface *iface = nullptr;
if (vHeader) {
if (column == 0) {
@@ -528,7 +528,7 @@ QAccessibleInterface *QAccessibleTable::child(int logicalIndex) const
QModelIndex index = view()->model()->index(row, column, view()->rootIndex());
if (Q_UNLIKELY(!index.isValid())) {
qWarning("QAccessibleTable::child: Invalid index at: %d %d", row, column);
- return 0;
+ return nullptr;
}
iface = new QAccessibleTableCell(view(), index, cellRole());
}
@@ -542,7 +542,7 @@ void *QAccessibleTable::interface_cast(QAccessible::InterfaceType t)
{
if (t == QAccessible::TableInterface)
return static_cast<QAccessibleTableInterface*>(this);
- return 0;
+ return nullptr;
}
void QAccessibleTable::modelChange(QAccessibleTableModelChangeEvent *event)
@@ -676,13 +676,13 @@ QModelIndex QAccessibleTree::indexFromLogical(int row, int column) const
QAccessibleInterface *QAccessibleTree::childAt(int x, int y) const
{
if (!view()->model())
- return 0;
+ return nullptr;
QPoint viewportOffset = view()->viewport()->mapTo(view(), QPoint(0,0));
QPoint indexPosition = view()->mapFromGlobal(QPoint(x, y) - viewportOffset);
QModelIndex index = view()->indexAt(indexPosition);
if (!index.isValid())
- return 0;
+ return nullptr;
const QTreeView *treeView = qobject_cast<const QTreeView*>(view());
int row = treeView->d_func()->viewIndex(index) + (horizontalHeader() ? 1 : 0);
@@ -706,9 +706,9 @@ int QAccessibleTree::childCount() const
QAccessibleInterface *QAccessibleTree::child(int logicalIndex) const
{
if (logicalIndex < 0 || !view()->model() || !view()->model()->columnCount())
- return 0;
+ return nullptr;
- QAccessibleInterface *iface = 0;
+ QAccessibleInterface *iface = nullptr;
int index = logicalIndex;
if (horizontalHeader()) {
@@ -724,7 +724,7 @@ QAccessibleInterface *QAccessibleTree::child(int logicalIndex) const
int column = index % view()->model()->columnCount();
QModelIndex modelIndex = indexFromLogical(row, column);
if (!modelIndex.isValid())
- return 0;
+ return nullptr;
iface = new QAccessibleTableCell(view(), modelIndex, cellRole());
}
QAccessible::registerAccessibleInterface(iface);
@@ -772,7 +772,7 @@ QAccessibleInterface *QAccessibleTree::cellAt(int row, int column) const
QModelIndex index = indexFromLogical(row, column);
if (Q_UNLIKELY(!index.isValid())) {
qWarning("Requested invalid tree cell: %d %d", row, column);
- return 0;
+ return nullptr;
}
const QTreeView *treeView = qobject_cast<const QTreeView*>(view());
Q_ASSERT(treeView);
@@ -841,7 +841,7 @@ void *QAccessibleTableCell::interface_cast(QAccessible::InterfaceType t)
return static_cast<QAccessibleTableCellInterface*>(this);
if (t == QAccessible::ActionInterface)
return static_cast<QAccessibleActionInterface*>(this);
- return 0;
+ return nullptr;
}
int QAccessibleTableCell::columnExtent() const { return 1; }
@@ -869,7 +869,7 @@ QList<QAccessibleInterface*> QAccessibleTableCell::columnHeaderCells() const
QHeaderView *QAccessibleTableCell::horizontalHeader() const
{
- QHeaderView *header = 0;
+ QHeaderView *header = nullptr;
if (false) {
#if QT_CONFIG(tableview)
@@ -887,7 +887,7 @@ QHeaderView *QAccessibleTableCell::horizontalHeader() const
QHeaderView *QAccessibleTableCell::verticalHeader() const
{
- QHeaderView *header = 0;
+ QHeaderView *header = nullptr;
#if QT_CONFIG(tableview)
if (const QTableView *tv = qobject_cast<const QTableView*>(view))
header = tv->verticalHeader();
@@ -1115,7 +1115,7 @@ QAccessibleInterface *QAccessibleTableCell::parent() const
QAccessibleInterface *QAccessibleTableCell::child(int) const
{
- return 0;
+ return nullptr;
}
QAccessibleTableHeaderCell::QAccessibleTableHeaderCell(QAbstractItemView *view_, int index_, Qt::Orientation orientation_)
@@ -1143,7 +1143,7 @@ QAccessible::State QAccessibleTableHeaderCell::state() const
QRect QAccessibleTableHeaderCell::rect() const
{
- QHeaderView *header = 0;
+ QHeaderView *header = nullptr;
if (false) {
#if QT_CONFIG(tableview)
} else if (const QTableView *tv = qobject_cast<const QTableView*>(view)) {
@@ -1206,12 +1206,12 @@ QAccessibleInterface *QAccessibleTableHeaderCell::parent() const
QAccessibleInterface *QAccessibleTableHeaderCell::child(int) const
{
- return 0;
+ return nullptr;
}
QHeaderView *QAccessibleTableHeaderCell::headerView() const
{
- QHeaderView *header = 0;
+ QHeaderView *header = nullptr;
if (false) {
#if QT_CONFIG(tableview)
} else if (const QTableView *tv = qobject_cast<const QTableView*>(view)) {
diff --git a/src/widgets/accessible/qaccessiblemenu.cpp b/src/widgets/accessible/qaccessiblemenu.cpp
index 048d4062b8..99a9444ff1 100644
--- a/src/widgets/accessible/qaccessiblemenu.cpp
+++ b/src/widgets/accessible/qaccessiblemenu.cpp
@@ -88,8 +88,8 @@ QAccessibleInterface *QAccessibleMenu::childAt(int x, int y) const
{
QAction *act = menu()->actionAt(menu()->mapFromGlobal(QPoint(x,y)));
if(act && act->isSeparator())
- act = 0;
- return act ? getOrCreateMenu(menu(), act) : 0;
+ act = nullptr;
+ return act ? getOrCreateMenu(menu(), act) : nullptr;
}
QString QAccessibleMenu::text(QAccessible::Text t) const
@@ -112,7 +112,7 @@ QAccessibleInterface *QAccessibleMenu::child(int index) const
{
if (index < childCount())
return getOrCreateMenu(menu(), menu()->actions().at(index));
- return 0;
+ return nullptr;
}
QAccessibleInterface *QAccessibleMenu::parent() const
@@ -165,7 +165,7 @@ QAccessibleInterface *QAccessibleMenuBar::child(int index) const
if (index < childCount()) {
return getOrCreateMenu(menuBar(), menuBar()->actions().at(index));
}
- return 0;
+ return nullptr;
}
int QAccessibleMenuBar::indexOfChild(const QAccessibleInterface *child) const
@@ -195,7 +195,7 @@ QAccessibleInterface *QAccessibleMenuItem::childAt(int x, int y ) const
return childInterface;
}
}
- return 0;
+ return nullptr;
}
int QAccessibleMenuItem::childCount() const
@@ -224,14 +224,14 @@ QAccessibleInterface *QAccessibleMenuItem::child(int index) const
{
if (index == 0 && action()->menu())
return QAccessible::queryAccessibleInterface(action()->menu());
- return 0;
+ return nullptr;
}
void *QAccessibleMenuItem::interface_cast(QAccessible::InterfaceType t)
{
if (t == QAccessible::ActionInterface)
return static_cast<QAccessibleActionInterface*>(this);
- return 0;
+ return nullptr;
}
QObject *QAccessibleMenuItem::object() const
diff --git a/src/widgets/accessible/qaccessiblewidget.cpp b/src/widgets/accessible/qaccessiblewidget.cpp
index 3ab66c4ce4..68ad855c7c 100644
--- a/src/widgets/accessible/qaccessiblewidget.cpp
+++ b/src/widgets/accessible/qaccessiblewidget.cpp
@@ -363,7 +363,7 @@ QAccessibleInterface *QAccessibleWidget::child(int index) const
QWidgetList childList = childWidgets(widget());
if (index >= 0 && index < childList.size())
return QAccessible::queryAccessibleInterface(childList.at(index));
- return 0;
+ return nullptr;
}
/*! \reimp */
@@ -526,7 +526,7 @@ void *QAccessibleWidget::interface_cast(QAccessible::InterfaceType t)
{
if (t == QAccessible::ActionInterface)
return static_cast<QAccessibleActionInterface*>(this);
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/widgets/accessible/qaccessiblewidgetfactory.cpp b/src/widgets/accessible/qaccessiblewidgetfactory.cpp
index 0bac45de27..d59da86076 100644
--- a/src/widgets/accessible/qaccessiblewidgetfactory.cpp
+++ b/src/widgets/accessible/qaccessiblewidgetfactory.cpp
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *object)
{
- QAccessibleInterface *iface = 0;
+ QAccessibleInterface *iface = nullptr;
if (!object || !object->isWidgetType())
return iface;
@@ -79,7 +79,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
#if QT_CONFIG(lineedit)
} else if (classname == QLatin1String("QLineEdit")) {
if (widget->objectName() == QLatin1String("qt_spinbox_lineedit"))
- iface = 0;
+ iface = nullptr;
else
iface = new QAccessibleLineEdit(widget);
#endif
@@ -223,7 +223,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
#endif
} else if (classname == QLatin1String("QDesktopScreenWidget")) {
- iface = 0;
+ iface = nullptr;
} else if (classname == QLatin1String("QWidget")) {
iface = new QAccessibleWidget(widget);
} else if (classname == QLatin1String("QWindowContainer")) {
diff --git a/src/widgets/accessible/qaccessiblewidgets.cpp b/src/widgets/accessible/qaccessiblewidgets.cpp
index 52c953ed3a..574be1f5ea 100644
--- a/src/widgets/accessible/qaccessiblewidgets.cpp
+++ b/src/widgets/accessible/qaccessiblewidgets.cpp
@@ -332,14 +332,14 @@ QAccessibleStackedWidget::QAccessibleStackedWidget(QWidget *widget)
QAccessibleInterface *QAccessibleStackedWidget::childAt(int x, int y) const
{
if (!stackedWidget()->isVisible())
- return 0;
+ return nullptr;
QWidget *currentWidget = stackedWidget()->currentWidget();
if (!currentWidget)
- return 0;
+ return nullptr;
QPoint position = currentWidget->mapFromGlobal(QPoint(x, y));
if (currentWidget->rect().contains(position))
return child(stackedWidget()->currentIndex());
- return 0;
+ return nullptr;
}
int QAccessibleStackedWidget::childCount() const
@@ -359,7 +359,7 @@ int QAccessibleStackedWidget::indexOfChild(const QAccessibleInterface *child) co
QAccessibleInterface *QAccessibleStackedWidget::child(int index) const
{
if (index < 0 || index >= stackedWidget()->count())
- return 0;
+ return nullptr;
return QAccessible::queryAccessibleInterface(stackedWidget()->widget(index));
}
@@ -401,7 +401,7 @@ QAccessibleInterface *QAccessibleMdiArea::child(int index) const
QList<QMdiSubWindow *> subWindows = mdiArea()->subWindowList();
QWidget *targetObject = subWindows.value(index);
if (!targetObject)
- return 0;
+ return nullptr;
return QAccessible::queryAccessibleInterface(targetObject);
}
@@ -478,7 +478,7 @@ QAccessibleInterface *QAccessibleMdiSubWindow::child(int index) const
{
QMdiSubWindow *source = mdiSubWindow();
if (index != 0 || !source->widget())
- return 0;
+ return nullptr;
return QAccessible::queryAccessibleInterface(source->widget());
}
@@ -554,7 +554,7 @@ int QAccessibleCalendarWidget::indexOfChild(const QAccessibleInterface *child) c
QAccessibleInterface *QAccessibleCalendarWidget::child(int index) const
{
if (index < 0 || index >= childCount())
- return 0;
+ return nullptr;
if (childCount() > 1 && index == 0)
return QAccessible::queryAccessibleInterface(navigationBar());
@@ -573,7 +573,7 @@ QAbstractItemView *QAccessibleCalendarWidget::calendarView() const
if (child->objectName() == QLatin1String("qt_calendar_calendarview"))
return static_cast<QAbstractItemView *>(child);
}
- return 0;
+ return nullptr;
}
QWidget *QAccessibleCalendarWidget::navigationBar() const
@@ -582,7 +582,7 @@ QWidget *QAccessibleCalendarWidget::navigationBar() const
if (child->objectName() == QLatin1String("qt_calendar_navigationbar"))
return static_cast<QWidget *>(child);
}
- return 0;
+ return nullptr;
}
#endif // QT_CONFIG(calendarwidget)
@@ -624,7 +624,7 @@ QAccessibleInterface *QAccessibleDockWidget::child(int index) const
if (item)
return QAccessible::queryAccessibleInterface(item->widget());
}
- return 0;
+ return nullptr;
}
int QAccessibleDockWidget::indexOfChild(const QAccessibleInterface *child) const
@@ -1109,7 +1109,7 @@ QAccessibleInterface *QAccessibleMainWindow::child(int index) const
if (index >= 0 && index < kids.count()) {
return QAccessible::queryAccessibleInterface(kids.at(index));
}
- return 0;
+ return nullptr;
}
int QAccessibleMainWindow::childCount() const
@@ -1128,10 +1128,10 @@ QAccessibleInterface *QAccessibleMainWindow::childAt(int x, int y) const
{
QWidget *w = widget();
if (!w->isVisible())
- return 0;
+ return nullptr;
QPoint gp = w->mapToGlobal(QPoint(0, 0));
if (!QRect(gp.x(), gp.y(), w->width(), w->height()).contains(x, y))
- return 0;
+ return nullptr;
const QWidgetList kids = childWidgets(mainWindow());
QPoint rp = mainWindow()->mapFromGlobal(QPoint(x, y));
@@ -1140,7 +1140,7 @@ QAccessibleInterface *QAccessibleMainWindow::childAt(int x, int y) const
return QAccessible::queryAccessibleInterface(child);
}
}
- return 0;
+ return nullptr;
}
QMainWindow *QAccessibleMainWindow::mainWindow() const
diff --git a/src/widgets/accessible/simplewidgets.cpp b/src/widgets/accessible/simplewidgets.cpp
index ca74ee4b12..107fd729fe 100644
--- a/src/widgets/accessible/simplewidgets.cpp
+++ b/src/widgets/accessible/simplewidgets.cpp
@@ -76,6 +76,9 @@
#include <qlineedit.h>
#include <private/qlineedit_p.h>
#endif
+#ifndef QT_NO_PICTURE
+#include <QtGui/qpicture.h>
+#endif
#include <qstyle.h>
#include <qstyleoption.h>
#include <qtextdocument.h>
@@ -364,7 +367,7 @@ QAccessibleInterface *QAccessibleToolButton::child(int index) const
#else
Q_UNUSED(index)
#endif
- return 0;
+ return nullptr;
}
/*
@@ -431,10 +434,10 @@ QAccessible::Role QAccessibleDisplay::role() const
#if QT_CONFIG(label)
QLabel *l = qobject_cast<QLabel*>(object());
if (l) {
- if (l->pixmap())
+ if (!l->pixmap(Qt::ReturnByValue).isNull())
return QAccessible::Graphic;
#ifndef QT_NO_PICTURE
- if (l->picture())
+ if (!l->picture(Qt::ReturnByValue).isNull())
return QAccessible::Graphic;
#endif
#if QT_CONFIG(movie)
@@ -558,10 +561,7 @@ QSize QAccessibleDisplay::imageSize() const
#endif
return QSize();
#if QT_CONFIG(label)
- const QPixmap *pixmap = label->pixmap();
- if (!pixmap)
- return QSize();
- return pixmap->size();
+ return label->pixmap(Qt::ReturnByValue).size();
#endif
}
@@ -574,8 +574,7 @@ QPoint QAccessibleDisplay::imagePosition() const
#endif
return QPoint();
#if QT_CONFIG(label)
- const QPixmap *pixmap = label->pixmap();
- if (!pixmap)
+ if (label->pixmap(Qt::ReturnByValue).isNull())
return QPoint();
return QPoint(label->mapToGlobal(label->pos()));
@@ -976,7 +975,7 @@ QAccessibleInterface *QAccessibleWindowContainer::child(int i) const
{
if (i == 0)
return QAccessible::queryAccessibleInterface(container()->containedWindow());
- return 0;
+ return nullptr;
}
QWindowContainer *QAccessibleWindowContainer::container() const
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index d00a600424..689002b589 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -192,7 +192,7 @@ class QWellArray : public QWidget
Q_PROPERTY(int selectedRow READ selectedRow)
public:
- QWellArray(int rows, int cols, QWidget* parent=0);
+ QWellArray(int rows, int cols, QWidget* parent=nullptr);
~QWellArray() {}
QString cellContent(int row, int col) const;
@@ -744,7 +744,7 @@ class QColorLuminancePicker : public QWidget
{
Q_OBJECT
public:
- QColorLuminancePicker(QWidget* parent=0);
+ QColorLuminancePicker(QWidget* parent=nullptr);
~QColorLuminancePicker();
public slots:
@@ -789,7 +789,7 @@ QColorLuminancePicker::QColorLuminancePicker(QWidget* parent)
:QWidget(parent)
{
hue = 100; val = 100; sat = 100;
- pix = 0;
+ pix = nullptr;
// setAttribute(WA_NoErase, true);
}
@@ -812,7 +812,7 @@ void QColorLuminancePicker::setVal(int v)
if (val == v)
return;
val = qMax(0, qMin(v,255));
- delete pix; pix=0;
+ delete pix; pix=nullptr;
repaint();
emit newHsv(hue, sat, val);
}
@@ -861,7 +861,7 @@ void QColorLuminancePicker::setCol(int h, int s , int v)
val = v;
hue = h;
sat = s;
- delete pix; pix=0;
+ delete pix; pix=nullptr;
repaint();
}
@@ -1678,8 +1678,8 @@ void QColorDialogPrivate::init(const QColor &initial)
q->setWindowTitle(QColorDialog::tr("Select Color"));
// default: use the native dialog if possible. Can be overridden in setOptions()
- nativeDialogInUse = (platformColorDialogHelper() != 0);
- colorPickingEventFilter = 0;
+ nativeDialogInUse = (platformColorDialogHelper() != nullptr);
+ colorPickingEventFilter = nullptr;
nextCust = 0;
if (!nativeDialogInUse)
@@ -1703,7 +1703,7 @@ void QColorDialogPrivate::initWidgets()
QHBoxLayout *topLay = new QHBoxLayout();
mainLay->addLayout(topLay);
- leftLay = 0;
+ leftLay = nullptr;
#if defined(QT_SMALL_COLORDIALOG)
smallDisplay = true;
@@ -1773,8 +1773,8 @@ void QColorDialogPrivate::initWidgets()
pWidth = 150;
pHeight = 100;
#endif
- custom = 0;
- standard = 0;
+ custom = nullptr;
+ standard = nullptr;
}
QVBoxLayout *rightLay = new QVBoxLayout;
@@ -2302,7 +2302,7 @@ void QColorDialog::done(int result)
if (d->receiverToDisconnectOnClose) {
disconnect(this, SIGNAL(colorSelected(QColor)),
d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
- d->receiverToDisconnectOnClose = 0;
+ d->receiverToDisconnectOnClose = nullptr;
}
d->memberToDisconnectOnClose.clear();
}
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 3cdd9a5f04..906022a185 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -187,7 +187,7 @@ QWindow *QDialogPrivate::transientParentWindow() const
return parent->windowHandle();
else if (q->windowHandle())
return q->windowHandle()->transientParent();
- return 0;
+ return nullptr;
}
bool QDialogPrivate::setNativeDialogVisible(bool visible)
@@ -214,7 +214,7 @@ QVariant QDialogPrivate::styleHint(QPlatformDialogHelper::StyleHint hint) const
void QDialogPrivate::deletePlatformHelper()
{
delete m_platformHelper;
- m_platformHelper = 0;
+ m_platformHelper = nullptr;
m_platformHelperCreated = false;
nativeDialogInUse = false;
}
@@ -460,7 +460,7 @@ void QDialogPrivate::setDefault(QPushButton *pushButton)
*/
void QDialogPrivate::setMainDefault(QPushButton *pushButton)
{
- mainDef = 0;
+ mainDef = nullptr;
setDefault(pushButton);
}
@@ -602,7 +602,7 @@ int QDialog::exec()
}
if (guard.isNull())
return QDialog::Rejected;
- d->eventLoop = 0;
+ d->eventLoop = nullptr;
setAttribute(Qt::WA_ShowModal, wasShowModal);
@@ -679,12 +679,12 @@ void QDialog::contextMenuEvent(QContextMenuEvent *e)
#else
QWidget *w = childAt(e->pos());
if (!w) {
- w = rect().contains(e->pos()) ? this : 0;
+ w = rect().contains(e->pos()) ? this : nullptr;
if (!w)
return;
}
while (w && w->whatsThis().size() == 0 && !w->testAttribute(Qt::WA_CustomWhatsThis))
- w = w->isWindow() ? 0 : w->parentWidget();
+ w = w->isWindow() ? nullptr : w->parentWidget();
if (w) {
QPointer<QMenu> p = new QMenu(this);
QAction *wt = p.data()->addAction(tr("What's This?"));
@@ -920,7 +920,7 @@ void QDialog::adjustPosition(QWidget* w)
if (w) {
// Use pos() if the widget is embedded into a native window
QPoint pp;
- if (w->windowHandle() && w->windowHandle()->property("_q_embedded_native_parent_handle").value<WId>())
+ if (w->windowHandle() && qvariant_cast<WId>(w->windowHandle()->property("_q_embedded_native_parent_handle")))
pp = w->pos();
else
pp = w->mapToGlobal(QPoint(0,0));
@@ -1191,7 +1191,7 @@ void QDialog::setSizeGripEnabled(bool enabled)
d->resizer->show();
} else {
delete d->resizer;
- d->resizer = 0;
+ d->resizer = nullptr;
}
}
#endif // QT_CONFIG(sizegrip)
diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp
index f0ec2c0102..790d09414b 100644
--- a/src/widgets/dialogs/qerrormessage.cpp
+++ b/src/widgets/dialogs/qerrormessage.cpp
@@ -149,13 +149,13 @@ QSize QErrorMessageTextView::sizeHint() const
\sa QMessageBox, QStatusBar::showMessage(), {Standard Dialogs Example}
*/
-static QErrorMessage * qtMessageHandler = 0;
+static QErrorMessage * qtMessageHandler = nullptr;
static void deleteStaticcQErrorMessage() // post-routine
{
if (qtMessageHandler) {
delete qtMessageHandler;
- qtMessageHandler = 0;
+ qtMessageHandler = nullptr;
}
}
@@ -252,8 +252,8 @@ QErrorMessage::QErrorMessage(QWidget * parent)
QErrorMessage::~QErrorMessage()
{
if (this == qtMessageHandler) {
- qtMessageHandler = 0;
- QtMessageHandler tmp = qInstallMessageHandler(0);
+ qtMessageHandler = nullptr;
+ QtMessageHandler tmp = qInstallMessageHandler(nullptr);
// in case someone else has later stuck in another...
if (tmp != jump)
qInstallMessageHandler(tmp);
@@ -293,7 +293,7 @@ void QErrorMessage::done(int a)
QErrorMessage * QErrorMessage::qtHandler()
{
if (!qtMessageHandler) {
- qtMessageHandler = new QErrorMessage(0);
+ qtMessageHandler = new QErrorMessage(nullptr);
qAddPostRoutine(deleteStaticcQErrorMessage); // clean up
qtMessageHandler->setWindowTitle(QCoreApplication::applicationName());
qInstallMessageHandler(jump);
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 787c0e6511..7c2c202cd6 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -370,7 +370,7 @@ QFileDialog::QFileDialog(QWidget *parent,
const QString &caption,
const QString &directory,
const QString &filter)
- : QDialog(*new QFileDialogPrivate, parent, 0)
+ : QDialog(*new QFileDialogPrivate, parent, { })
{
Q_D(QFileDialog);
d->init(QUrl::fromLocalFile(directory), filter, caption);
@@ -380,7 +380,7 @@ QFileDialog::QFileDialog(QWidget *parent,
\internal
*/
QFileDialog::QFileDialog(const QFileDialogArgs &args)
- : QDialog(*new QFileDialogPrivate, args.parent, 0)
+ : QDialog(*new QFileDialogPrivate, args.parent, { })
{
Q_D(QFileDialog);
d->init(args.directory, args.filter, args.caption);
@@ -531,15 +531,15 @@ void QFileDialog::changeEvent(QEvent *e)
QFileDialogPrivate::QFileDialogPrivate()
:
#if QT_CONFIG(proxymodel)
- proxyModel(0),
+ proxyModel(nullptr),
#endif
- model(0),
+ model(nullptr),
currentHistoryLocation(-1),
- renameAction(0),
- deleteAction(0),
- showHiddenAction(0),
+ renameAction(nullptr),
+ deleteAction(nullptr),
+ showHiddenAction(nullptr),
useDefaultCaption(true),
- qFileDialogUi(0),
+ qFileDialogUi(nullptr),
options(QFileDialogOptions::create())
{
}
@@ -882,14 +882,14 @@ void QFileDialog::setVisible(bool visible)
#if QT_CONFIG(fscompleter)
// So the completer doesn't try to complete and therefore show a popup
if (!d->nativeDialogInUse)
- d->completer->setModel(0);
+ d->completer->setModel(nullptr);
#endif
} else {
d->createWidgets();
setAttribute(Qt::WA_DontShowOnScreen, false);
#if QT_CONFIG(fscompleter)
if (!d->nativeDialogInUse) {
- if (d->proxyModel != 0)
+ if (d->proxyModel != nullptr)
d->completer->setModel(d->proxyModel);
else
d->completer->setModel(d->model);
@@ -1824,7 +1824,7 @@ QModelIndex QFileDialogPrivate::rootIndex() const {
QAbstractItemView *QFileDialogPrivate::currentView() const {
if (!qFileDialogUi->stackedWidget)
- return 0;
+ return nullptr;
if (qFileDialogUi->stackedWidget->currentWidget() == qFileDialogUi->listView->parent())
return qFileDialogUi->listView;
return qFileDialogUi->treeView;
@@ -2038,7 +2038,7 @@ QAbstractItemDelegate *QFileDialog::itemDelegate() const
{
Q_D(const QFileDialog);
if (!d->usingWidgets())
- return 0;
+ return nullptr;
return d->qFileDialogUi->listView->itemDelegate();
}
@@ -2777,7 +2777,7 @@ void QFileDialog::done(int result)
if (d->receiverToDisconnectOnClose) {
disconnect(this, d->signalToDisconnectOnClose,
d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
- d->receiverToDisconnectOnClose = 0;
+ d->receiverToDisconnectOnClose = nullptr;
}
d->memberToDisconnectOnClose.clear();
d->signalToDisconnectOnClose.clear();
@@ -3016,7 +3016,7 @@ void QFileDialogPrivate::init(const QUrl &directory, const QString &nameFilter,
}
q->setAcceptMode(QFileDialog::AcceptOpen);
- nativeDialogInUse = platformFileDialogHelper() != 0;
+ nativeDialogInUse = platformFileDialogHelper() != nullptr;
if (!nativeDialogInUse)
createWidgets();
q->setFileMode(QFileDialog::AnyFile);
@@ -3274,7 +3274,7 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel)
this, SLOT(_q_rowsInserted(QModelIndex)));
}
- if (proxyModel != 0) {
+ if (proxyModel != nullptr) {
proxyModel->setParent(this);
d->proxyModel = proxyModel;
proxyModel->setSourceModel(d->model);
@@ -3287,13 +3287,13 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel)
connect(d->proxyModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(_q_rowsInserted(QModelIndex)));
} else {
- d->proxyModel = 0;
+ d->proxyModel = nullptr;
d->qFileDialogUi->listView->setModel(d->model);
d->qFileDialogUi->treeView->setModel(d->model);
#if QT_CONFIG(fscompleter)
d->completer->setModel(d->model);
d->completer->sourceModel = d->model;
- d->completer->proxyModel = 0;
+ d->completer->proxyModel = nullptr;
#endif
connect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(_q_rowsInserted(QModelIndex)));
@@ -3331,27 +3331,27 @@ QAbstractProxyModel *QFileDialog::proxyModel() const
void QFileDialogPrivate::createToolButtons()
{
Q_Q(QFileDialog);
- qFileDialogUi->backButton->setIcon(q->style()->standardIcon(QStyle::SP_ArrowBack, 0, q));
+ qFileDialogUi->backButton->setIcon(q->style()->standardIcon(QStyle::SP_ArrowBack, nullptr, q));
qFileDialogUi->backButton->setAutoRaise(true);
qFileDialogUi->backButton->setEnabled(false);
QObject::connect(qFileDialogUi->backButton, SIGNAL(clicked()), q, SLOT(_q_navigateBackward()));
- qFileDialogUi->forwardButton->setIcon(q->style()->standardIcon(QStyle::SP_ArrowForward, 0, q));
+ qFileDialogUi->forwardButton->setIcon(q->style()->standardIcon(QStyle::SP_ArrowForward, nullptr, q));
qFileDialogUi->forwardButton->setAutoRaise(true);
qFileDialogUi->forwardButton->setEnabled(false);
QObject::connect(qFileDialogUi->forwardButton, SIGNAL(clicked()), q, SLOT(_q_navigateForward()));
- qFileDialogUi->toParentButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogToParent, 0, q));
+ qFileDialogUi->toParentButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogToParent, nullptr, q));
qFileDialogUi->toParentButton->setAutoRaise(true);
qFileDialogUi->toParentButton->setEnabled(false);
QObject::connect(qFileDialogUi->toParentButton, SIGNAL(clicked()), q, SLOT(_q_navigateToParent()));
- qFileDialogUi->listModeButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogListView, 0, q));
+ qFileDialogUi->listModeButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogListView, nullptr, q));
qFileDialogUi->listModeButton->setAutoRaise(true);
qFileDialogUi->listModeButton->setDown(true);
QObject::connect(qFileDialogUi->listModeButton, SIGNAL(clicked()), q, SLOT(_q_showListView()));
- qFileDialogUi->detailModeButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogDetailedView, 0, q));
+ qFileDialogUi->detailModeButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogDetailedView, nullptr, q));
qFileDialogUi->detailModeButton->setAutoRaise(true);
QObject::connect(qFileDialogUi->detailModeButton, SIGNAL(clicked()), q, SLOT(_q_showDetailsView()));
@@ -3362,7 +3362,7 @@ void QFileDialogPrivate::createToolButtons()
qFileDialogUi->forwardButton->setFixedSize(toolSize);
qFileDialogUi->toParentButton->setFixedSize(toolSize);
- qFileDialogUi->newFolderButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogNewFolder, 0, q));
+ qFileDialogUi->newFolderButton->setIcon(q->style()->standardIcon(QStyle::SP_FileDialogNewFolder, nullptr, q));
qFileDialogUi->newFolderButton->setFixedSize(toolSize);
qFileDialogUi->newFolderButton->setAutoRaise(true);
qFileDialogUi->newFolderButton->setEnabled(false);
@@ -3599,7 +3599,7 @@ void QFileDialogPrivate::_q_showContextMenu(const QPoint &position)
Q_UNUSED(position);
#else
Q_Q(QFileDialog);
- QAbstractItemView *view = 0;
+ QAbstractItemView *view = nullptr;
if (q->viewMode() == QFileDialog::Detail)
view = qFileDialogUi->treeView;
else
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 9b8c303620..d516b1b312 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -586,9 +586,9 @@ QModelIndex QFileSystemModel::parent(const QModelIndex &index) const
return QModelIndex();
QFileSystemModelPrivate::QFileSystemNode *indexNode = d->node(index);
- Q_ASSERT(indexNode != 0);
+ Q_ASSERT(indexNode != nullptr);
QFileSystemModelPrivate::QFileSystemNode *parentNode = indexNode->parent;
- if (parentNode == 0 || parentNode == &d->root)
+ if (parentNode == nullptr || parentNode == &d->root)
return QModelIndex();
// get the parent's row
@@ -608,7 +608,7 @@ QModelIndex QFileSystemModel::parent(const QModelIndex &index) const
QModelIndex QFileSystemModelPrivate::index(const QFileSystemModelPrivate::QFileSystemNode *node, int column) const
{
Q_Q(const QFileSystemModel);
- QFileSystemModelPrivate::QFileSystemNode *parentNode = (node ? node->parent : 0);
+ QFileSystemModelPrivate::QFileSystemNode *parentNode = (node ? node->parent : nullptr);
if (node == &root || !parentNode)
return QModelIndex();
@@ -948,9 +948,8 @@ QVariant QFileSystemModel::headerData(int section, Qt::Orientation orientation,
if (section == 0) {
// ### TODO oh man this is ugly and doesn't even work all the way!
// it is still 2 pixels off
- QImage pixmap(16, 1, QImage::Format_Mono);
- pixmap.fill(0);
- pixmap.setAlphaChannel(pixmap.createAlphaMask());
+ QImage pixmap(16, 1, QImage::Format_ARGB32_Premultiplied);
+ pixmap.fill(Qt::transparent);
return pixmap;
}
break;
@@ -2078,7 +2077,8 @@ void QFileSystemModelPrivate::init()
#endif // filesystemwatcher
q->connect(&delayedSortTimer, SIGNAL(timeout()), q, SLOT(_q_performDelayedSort()), Qt::QueuedConnection);
- roleNames.insertMulti(QFileSystemModel::FileIconRole, QByteArrayLiteral("fileIcon")); // == Qt::decoration
+ roleNames.insert(QFileSystemModel::FileIconRole,
+ QByteArrayLiteral("fileIcon")); // == Qt::decoration
roleNames.insert(QFileSystemModel::FilePathRole, QByteArrayLiteral("filePath"));
roleNames.insert(QFileSystemModel::FileNameRole, QByteArrayLiteral("fileName"));
roleNames.insert(QFileSystemModel::FilePermissions, QByteArrayLiteral("filePermissions"));
diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h
index 844e417e2d..ad98b9ef44 100644
--- a/src/widgets/dialogs/qfilesystemmodel_p.h
+++ b/src/widgets/dialogs/qfilesystemmodel_p.h
@@ -116,7 +116,7 @@ public:
inline qint64 size() const { if (info && !info->isDir()) return info->size(); return 0; }
inline QString type() const { if (info) return info->displayType; return QLatin1String(""); }
inline QDateTime lastModified() const { if (info) return info->lastModified(); return QDateTime(); }
- inline QFile::Permissions permissions() const { if (info) return info->permissions(); return nullptr; }
+ inline QFile::Permissions permissions() const { if (info) return info->permissions(); return { }; }
inline bool isReadable() const { return ((permissions() & QFile::ReadUser) != 0); }
inline bool isWritable() const { return ((permissions() & QFile::WriteUser) != 0); }
inline bool isExecutable() const { return ((permissions() & QFile::ExeUser) != 0); }
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index 7e3592e034..fe8f88d64f 100644
--- a/src/widgets/dialogs/qfontdialog.cpp
+++ b/src/widgets/dialogs/qfontdialog.cpp
@@ -276,7 +276,7 @@ void QFontDialogPrivate::init()
mainGrid->setColumnMinimumWidth(3, spacing);
int margin = 0;
- mainGrid->getContentsMargins(0, 0, 0, &margin);
+ mainGrid->getContentsMargins(nullptr, nullptr, nullptr, &margin);
mainGrid->setRowMinimumHeight(3, margin);
mainGrid->setRowMinimumHeight(6, 2);
@@ -391,7 +391,7 @@ QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent, cons
QFont QFontDialog::getFont(bool *ok, QWidget *parent)
{
QFont initial;
- return QFontDialogPrivate::getFont(ok, initial, parent, QString(), 0);
+ return QFontDialogPrivate::getFont(ok, initial, parent, QString(), { });
}
QFont QFontDialogPrivate::getFont(bool *ok, const QFont &initial, QWidget *parent,
@@ -435,7 +435,7 @@ bool QFontDialog::eventFilter(QObject *o , QEvent *e)
QCoreApplication::sendEvent(d->sizeList, k);
if (ci != d->sizeList->currentItem()
- && style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, this))
+ && style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, nullptr, this))
d->sizeEdit->selectAll();
return true;
} else if ((o == d->familyList || o == d->styleList) &&
@@ -445,7 +445,7 @@ bool QFontDialog::eventFilter(QObject *o , QEvent *e)
return true;
}
} else if (e->type() == QEvent::FocusIn
- && style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, this)) {
+ && style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, nullptr, this)) {
if (o == d->familyList)
d->familyEdit->selectAll();
else if (o == d->styleList)
@@ -550,7 +550,7 @@ void QFontDialogPrivate::updateFamilies()
else
familyList->setCurrentItem(0);
familyEdit->setText(familyList->currentText());
- if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+ if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, nullptr, q)
&& familyList->hasFocus())
familyEdit->selectAll();
@@ -602,7 +602,7 @@ void QFontDialogPrivate::updateStyles()
}
styleEdit->setText(styleList->currentText());
- if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+ if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, nullptr, q)
&& styleList->hasFocus())
styleEdit->selectAll();
@@ -641,7 +641,7 @@ void QFontDialogPrivate::updateSizes()
const QSignalBlocker blocker(sizeEdit);
sizeEdit->setText((smoothScalable ? QString::number(size) : sizeList->currentText()));
- if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+ if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, nullptr, q)
&& sizeList->hasFocus())
sizeEdit->selectAll();
} else {
@@ -692,7 +692,7 @@ void QFontDialogPrivate::_q_familyHighlighted(int i)
Q_Q(QFontDialog);
family = familyList->text(i);
familyEdit->setText(family);
- if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+ if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, nullptr, q)
&& familyList->hasFocus())
familyEdit->selectAll();
@@ -709,7 +709,7 @@ void QFontDialogPrivate::_q_styleHighlighted(int index)
Q_Q(QFontDialog);
QString s = styleList->text(index);
styleEdit->setText(s);
- if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+ if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, nullptr, q)
&& styleList->hasFocus())
styleEdit->selectAll();
@@ -728,7 +728,7 @@ void QFontDialogPrivate::_q_sizeHighlighted(int index)
Q_Q(QFontDialog);
QString s = sizeList->text(index);
sizeEdit->setText(s);
- if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, 0, q)
+ if (q->style()->styleHint(QStyle::SH_FontDialog_SelectAssociatedText, nullptr, q)
&& sizeEdit->hasFocus())
sizeEdit->selectAll();
@@ -1019,7 +1019,7 @@ void QFontDialog::done(int result)
if (d->receiverToDisconnectOnClose) {
disconnect(this, SIGNAL(fontSelected(QFont)),
d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
- d->receiverToDisconnectOnClose = 0;
+ d->receiverToDisconnectOnClose = nullptr;
}
d->memberToDisconnectOnClose.clear();
}
diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp
index 3cfe8367e0..1cb4be0682 100644
--- a/src/widgets/dialogs/qinputdialog.cpp
+++ b/src/widgets/dialogs/qinputdialog.cpp
@@ -138,7 +138,7 @@ class QInputDialogDoubleSpinBox : public QDoubleSpinBox
Q_OBJECT
public:
- QInputDialogDoubleSpinBox(QWidget *parent = 0)
+ QInputDialogDoubleSpinBox(QWidget *parent = nullptr)
: QDoubleSpinBox(parent) {
connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(notifyTextChanged()));
connect(this, SIGNAL(editingFinished()), this, SLOT(notifyTextChanged()));
@@ -171,7 +171,7 @@ private:
class QInputDialogListView : public QListView
{
public:
- QInputDialogListView(QWidget *parent = 0) : QListView(parent) {}
+ QInputDialogListView(QWidget *parent = nullptr) : QListView(parent) {}
QVariant inputMethodQuery(Qt::InputMethodQuery query) const override
{
if (query == Qt::ImEnabled)
@@ -223,8 +223,8 @@ public:
};
QInputDialogPrivate::QInputDialogPrivate()
- : label(0), buttonBox(0), lineEdit(0), plainTextEdit(0), intSpinBox(0), doubleSpinBox(0),
- comboBox(0), listView(0), inputWidget(0), mainLayout(0)
+ : label(nullptr), buttonBox(nullptr), lineEdit(nullptr), plainTextEdit(nullptr), intSpinBox(nullptr), doubleSpinBox(nullptr),
+ comboBox(nullptr), listView(nullptr), inputWidget(nullptr), mainLayout(nullptr)
{
}
@@ -1174,7 +1174,7 @@ void QInputDialog::done(int result)
if (d->receiverToDisconnectOnClose) {
disconnect(this, signalForMember(d->memberToDisconnectOnClose),
d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
- d->receiverToDisconnectOnClose = 0;
+ d->receiverToDisconnectOnClose = nullptr;
}
d->memberToDisconnectOnClose.clear();
}
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index e1cc475a93..4e7a4a65e3 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -97,7 +97,7 @@ public:
class TextEdit : public QTextEdit
{
public:
- TextEdit(QWidget *parent=0) : QTextEdit(parent) { }
+ TextEdit(QWidget *parent=nullptr) : QTextEdit(parent) { }
#ifndef QT_NO_CONTEXTMENU
void contextMenuEvent(QContextMenuEvent * e) override
{
@@ -108,7 +108,7 @@ public:
#endif // QT_NO_CONTEXTMENU
};
- QMessageBoxDetailsText(QWidget *parent=0)
+ QMessageBoxDetailsText(QWidget *parent=nullptr)
: QWidget(parent)
, copyAvailable(false)
{
@@ -197,12 +197,12 @@ class QMessageBoxPrivate : public QDialogPrivate
Q_DECLARE_PUBLIC(QMessageBox)
public:
- QMessageBoxPrivate() : escapeButton(0), defaultButton(0), checkbox(0), clickedButton(0), detailsButton(0),
+ QMessageBoxPrivate() : escapeButton(nullptr), defaultButton(nullptr), checkbox(nullptr), clickedButton(nullptr), detailsButton(nullptr),
#if QT_CONFIG(textedit)
- detailsText(0),
+ detailsText(nullptr),
#endif
compatMode(false), autoAddOkButton(true),
- detectedEscapeButton(0), informativeLabel(0),
+ detectedEscapeButton(nullptr), informativeLabel(nullptr),
options(QMessageDialogOptions::create()) { }
void init(const QString &title = QString(), const QString &text = QString());
@@ -274,7 +274,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
label = new QLabel;
label->setObjectName(QLatin1String("qt_msgbox_label"));
- label->setTextInteractionFlags(Qt::TextInteractionFlags(q->style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, q)));
+ label->setTextInteractionFlags(Qt::TextInteractionFlags(q->style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, nullptr, q)));
label->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
label->setOpenExternalLinks(true);
iconLabel = new QLabel(q);
@@ -283,7 +283,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
buttonBox = new QDialogButtonBox;
buttonBox->setObjectName(QLatin1String("qt_msgbox_buttonbox"));
- buttonBox->setCenterButtons(q->style()->styleHint(QStyle::SH_MessageBox_CenterButtons, 0, q));
+ buttonBox->setCenterButtons(q->style()->styleHint(QStyle::SH_MessageBox_CenterButtons, nullptr, q));
QObject::connect(buttonBox, SIGNAL(clicked(QAbstractButton*)),
q, SLOT(_q_buttonClicked(QAbstractButton*)));
setupLayout();
@@ -305,7 +305,7 @@ void QMessageBoxPrivate::setupLayout()
Q_Q(QMessageBox);
delete q->layout();
QGridLayout *grid = new QGridLayout;
- bool hasIcon = iconLabel->pixmap() && !iconLabel->pixmap()->isNull();
+ bool hasIcon = !iconLabel->pixmap(Qt::ReturnByValue).isNull();
if (hasIcon)
grid->addWidget(iconLabel, 0, 0, 2, 1, Qt::AlignTop);
@@ -933,9 +933,9 @@ void QMessageBox::removeButton(QAbstractButton *button)
Q_D(QMessageBox);
d->customButtonList.removeAll(button);
if (d->escapeButton == button)
- d->escapeButton = 0;
+ d->escapeButton = nullptr;
if (d->defaultButton == button)
- d->defaultButton = 0;
+ d->defaultButton = nullptr;
d->buttonBox->removeButton(button);
d->updateSize();
}
@@ -958,9 +958,9 @@ void QMessageBox::setStandardButtons(StandardButtons buttons)
QList<QAbstractButton *> buttonList = d->buttonBox->buttons();
if (!buttonList.contains(d->escapeButton))
- d->escapeButton = 0;
+ d->escapeButton = nullptr;
if (!buttonList.contains(d->defaultButton))
- d->defaultButton = 0;
+ d->defaultButton = nullptr;
d->autoAddOkButton = false;
d->updateSize();
}
@@ -1087,7 +1087,7 @@ void QMessageBoxPrivate::detectEscapeButton()
for (auto *button : buttons) {
if (buttonBox->buttonRole(button) == QDialogButtonBox::RejectRole) {
if (detectedEscapeButton) { // already detected!
- detectedEscapeButton = 0;
+ detectedEscapeButton = nullptr;
break;
}
detectedEscapeButton = button;
@@ -1100,7 +1100,7 @@ void QMessageBoxPrivate::detectEscapeButton()
for (auto *button : buttons) {
if (buttonBox->buttonRole(button) == QDialogButtonBox::NoRole) {
if (detectedEscapeButton) { // already detected!
- detectedEscapeButton = 0;
+ detectedEscapeButton = nullptr;
break;
}
detectedEscapeButton = button;
@@ -1195,7 +1195,7 @@ void QMessageBox::setCheckBox(QCheckBox *cb)
d->checkbox->hide();
layout()->removeWidget(d->checkbox);
if (d->checkbox->parentWidget() == this) {
- d->checkbox->setParent(0);
+ d->checkbox->setParent(nullptr);
d->checkbox->deleteLater();
}
}
@@ -1323,9 +1323,7 @@ void QMessageBox::setIcon(Icon icon)
QPixmap QMessageBox::iconPixmap() const
{
Q_D(const QMessageBox);
- if (d->iconLabel && d->iconLabel->pixmap())
- return *d->iconLabel->pixmap();
- return QPixmap();
+ return d->iconLabel->pixmap(Qt::ReturnByValue);
}
void QMessageBox::setIconPixmap(const QPixmap &pixmap)
@@ -1439,9 +1437,9 @@ void QMessageBox::changeEvent(QEvent *ev)
{
if (d->icon != NoIcon)
setIcon(d->icon);
- Qt::TextInteractionFlags flags(style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, this));
+ Qt::TextInteractionFlags flags(style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, nullptr, this));
d->label->setTextInteractionFlags(flags);
- d->buttonBox->setCenterButtons(style()->styleHint(QStyle::SH_MessageBox_CenterButtons, 0, this));
+ d->buttonBox->setCenterButtons(style()->styleHint(QStyle::SH_MessageBox_CenterButtons, nullptr, this));
if (d->informativeLabel)
d->informativeLabel->setTextInteractionFlags(flags);
Q_FALLTHROUGH();
@@ -1630,7 +1628,7 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
QMessageBox msgBox(icon, title, text, QMessageBox::NoButton, parent);
QDialogButtonBox *buttonBox = msgBox.findChild<QDialogButtonBox*>();
- Q_ASSERT(buttonBox != 0);
+ Q_ASSERT(buttonBox != nullptr);
uint mask = QMessageBox::FirstButton;
while (mask <= QMessageBox::LastButton) {
@@ -2007,7 +2005,7 @@ QAbstractButton *QMessageBoxPrivate::abstractButtonForId(int id) const
if (result)
return result;
if (id & QMessageBox::FlagMask) // for compatibility with Qt 4.0/4.1 (even if it is silly)
- return 0;
+ return nullptr;
return q->button(newButton(id));
}
@@ -2528,13 +2526,13 @@ void QMessageBox::setDetailedText(const QString &text)
d->detailsText->hide();
d->detailsText->deleteLater();
}
- d->detailsText = 0;
+ d->detailsText = nullptr;
removeButton(d->detailsButton);
if (d->detailsButton) {
d->detailsButton->hide();
d->detailsButton->deleteLater();
}
- d->detailsButton = 0;
+ d->detailsButton = nullptr;
} else {
if (!d->detailsText) {
d->detailsText = new QMessageBoxDetailsText(this);
@@ -2583,12 +2581,12 @@ void QMessageBox::setInformativeText(const QString &text)
d->informativeLabel->hide();
d->informativeLabel->deleteLater();
}
- d->informativeLabel = 0;
+ d->informativeLabel = nullptr;
} else {
if (!d->informativeLabel) {
QLabel *label = new QLabel;
label->setObjectName(QLatin1String("qt_msgbox_informativelabel"));
- label->setTextInteractionFlags(Qt::TextInteractionFlags(style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, this)));
+ label->setTextInteractionFlags(Qt::TextInteractionFlags(style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, nullptr, this)));
label->setAlignment(Qt::AlignTop | Qt::AlignLeft);
label->setOpenExternalLinks(true);
label->setWordWrap(true);
@@ -2650,20 +2648,20 @@ void QMessageBox::setWindowModality(Qt::WindowModality windowModality)
QPixmap QMessageBoxPrivate::standardIcon(QMessageBox::Icon icon, QMessageBox *mb)
{
QStyle *style = mb ? mb->style() : QApplication::style();
- int iconSize = style->pixelMetric(QStyle::PM_MessageBoxIconSize, 0, mb);
+ int iconSize = style->pixelMetric(QStyle::PM_MessageBoxIconSize, nullptr, mb);
QIcon tmpIcon;
switch (icon) {
case QMessageBox::Information:
- tmpIcon = style->standardIcon(QStyle::SP_MessageBoxInformation, 0, mb);
+ tmpIcon = style->standardIcon(QStyle::SP_MessageBoxInformation, nullptr, mb);
break;
case QMessageBox::Warning:
- tmpIcon = style->standardIcon(QStyle::SP_MessageBoxWarning, 0, mb);
+ tmpIcon = style->standardIcon(QStyle::SP_MessageBoxWarning, nullptr, mb);
break;
case QMessageBox::Critical:
- tmpIcon = style->standardIcon(QStyle::SP_MessageBoxCritical, 0, mb);
+ tmpIcon = style->standardIcon(QStyle::SP_MessageBoxCritical, nullptr, mb);
break;
case QMessageBox::Question:
- tmpIcon = style->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mb);
+ tmpIcon = style->standardIcon(QStyle::SP_MessageBoxQuestion, nullptr, mb);
default:
break;
}
@@ -2745,7 +2743,7 @@ void QMessageBoxPrivate::helperDone(QDialog::DialogCode code, QPlatformDialogHel
QPixmap QMessageBox::standardIcon(Icon icon)
{
- return QMessageBoxPrivate::standardIcon(icon, 0);
+ return QMessageBoxPrivate::standardIcon(icon, nullptr);
}
/*!
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp
index 9507053ffe..40548e22a5 100644
--- a/src/widgets/dialogs/qprogressdialog.cpp
+++ b/src/widgets/dialogs/qprogressdialog.cpp
@@ -65,13 +65,13 @@ class QProgressDialogPrivate : public QDialogPrivate
Q_DECLARE_PUBLIC(QProgressDialog)
public:
- QProgressDialogPrivate() : label(0), cancel(0), bar(0),
+ QProgressDialogPrivate() : label(nullptr), cancel(nullptr), bar(nullptr),
shown_once(false),
cancellation_flag(false),
setValue_called(false),
showTime(defaultShowTime),
#ifndef QT_NO_SHORTCUT
- escapeShortcut(0),
+ escapeShortcut(nullptr),
#endif
useDefaultCancelText(false)
{
@@ -112,7 +112,7 @@ void QProgressDialogPrivate::init(const QString &labelText, const QString &cance
label = new QLabel(labelText, q);
bar = new QProgressBar(q);
bar->setRange(min, max);
- int align = q->style()->styleHint(QStyle::SH_ProgressDialog_TextLabelAlignment, 0, q);
+ int align = q->style()->styleHint(QStyle::SH_ProgressDialog_TextLabelAlignment, nullptr, q);
label->setAlignment(Qt::Alignment(align));
autoClose = true;
autoReset = true;
@@ -132,12 +132,12 @@ void QProgressDialogPrivate::init(const QString &labelText, const QString &cance
void QProgressDialogPrivate::layout()
{
Q_Q(QProgressDialog);
- int sp = q->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing, 0, q);
- int mb = q->style()->pixelMetric(QStyle::PM_LayoutBottomMargin, 0, q);
- int ml = qMin(q->width() / 10, q->style()->pixelMetric(QStyle::PM_LayoutLeftMargin, 0, q));
- int mr = qMin(q->width() / 10, q->style()->pixelMetric(QStyle::PM_LayoutRightMargin, 0, q));
+ int sp = q->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing, nullptr, q);
+ int mb = q->style()->pixelMetric(QStyle::PM_LayoutBottomMargin, nullptr, q);
+ int ml = qMin(q->width() / 10, q->style()->pixelMetric(QStyle::PM_LayoutLeftMargin, nullptr, q));
+ int mr = qMin(q->width() / 10, q->style()->pixelMetric(QStyle::PM_LayoutRightMargin, nullptr, q));
const bool centered =
- bool(q->style()->styleHint(QStyle::SH_ProgressDialog_CenterCancelButton, 0, q));
+ bool(q->style()->styleHint(QStyle::SH_ProgressDialog_CenterCancelButton, nullptr, q));
int additionalSpacing = 0;
QSize cs = cancel ? cancel->sizeHint() : QSize(0,0);
@@ -188,7 +188,7 @@ void QProgressDialogPrivate::_q_disconnectOnClose()
if (receiverToDisconnectOnClose) {
QObject::disconnect(q, SIGNAL(canceled()), receiverToDisconnectOnClose,
memberToDisconnectOnClose);
- receiverToDisconnectOnClose = 0;
+ receiverToDisconnectOnClose = nullptr;
}
memberToDisconnectOnClose.clear();
}
@@ -418,7 +418,7 @@ void QProgressDialog::setCancelButton(QPushButton *cancelButton)
} else {
#ifndef QT_NO_SHORTCUT
delete d->escapeShortcut;
- d->escapeShortcut = 0;
+ d->escapeShortcut = nullptr;
#endif
}
d->adoptChildWidget(cancelButton);
@@ -450,7 +450,7 @@ void QProgressDialogPrivate::setCancelButtonText(const QString &cancelButtonText
q->setCancelButton(new QPushButton(cancelButtonText, q));
}
} else {
- q->setCancelButton(0);
+ q->setCancelButton(nullptr);
}
ensureSizeIsAtLeastSizeHint();
}
@@ -492,7 +492,7 @@ void QProgressDialogPrivate::adoptChildWidget(QWidget *c)
if (c->parentWidget() == q)
c->hide(); // until after ensureSizeIsAtLeastSizeHint()
else
- c->setParent(q, 0);
+ c->setParent(q, { });
}
ensureSizeIsAtLeastSizeHint();
if (c)
diff --git a/src/widgets/dialogs/qsidebar.cpp b/src/widgets/dialogs/qsidebar.cpp
index 2c8c66e1e2..4272b612ec 100644
--- a/src/widgets/dialogs/qsidebar.cpp
+++ b/src/widgets/dialogs/qsidebar.cpp
@@ -73,7 +73,7 @@ void QSideBarDelegate::initStyleOption(QStyleOptionViewItem *option,
Example usage: File dialog sidebar and combo box
*/
-QUrlModel::QUrlModel(QObject *parent) : QStandardItemModel(parent), showFullPath(false), fileSystemModel(0)
+QUrlModel::QUrlModel(QObject *parent) : QStandardItemModel(parent), showFullPath(false), fileSystemModel(nullptr)
{
}
@@ -163,7 +163,7 @@ bool QUrlModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
*/
bool QUrlModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
- if (value.type() == QVariant::Url) {
+ if (value.userType() == QMetaType::QUrl) {
QUrl url = value.toUrl();
QModelIndex dirIndex = fileSystemModel->index(url.toLocalFile());
//On windows the popup display the "C:\", convert to nativeSeparators
@@ -298,7 +298,7 @@ void QUrlModel::setFileSystemModel(QFileSystemModel *model)
{
if (model == fileSystemModel)
return;
- if (fileSystemModel != 0) {
+ if (fileSystemModel != nullptr) {
disconnect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
disconnect(model, SIGNAL(layoutChanged()),
@@ -307,7 +307,7 @@ void QUrlModel::setFileSystemModel(QFileSystemModel *model)
this, SLOT(layoutChanged()));
}
fileSystemModel = model;
- if (fileSystemModel != 0) {
+ if (fileSystemModel != nullptr) {
connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
connect(model, SIGNAL(layoutChanged()),
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 0295241a74..87f6875c8c 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -115,7 +115,7 @@ static QWidget *iWantTheFocus(QWidget *ancestor)
return candidate;
}
}
- return 0;
+ return nullptr;
}
static bool objectInheritsXAndXIsCloserThanY(const QObject *object, const QByteArray &classX,
@@ -165,7 +165,7 @@ static const char *changed_signal(int which)
};
Q_STATIC_ASSERT(7 == NFallbackDefaultProperties);
Q_UNREACHABLE();
- return 0;
+ return nullptr;
}
class QWizardDefaultProperty
@@ -286,9 +286,9 @@ class QWizardHeader : public QWidget
public:
enum RulerType { Ruler };
- inline QWizardHeader(RulerType /* ruler */, QWidget *parent = 0)
+ inline QWizardHeader(RulerType /* ruler */, QWidget *parent = nullptr)
: QWidget(parent) { setFixedHeight(2); }
- QWizardHeader(QWidget *parent = 0);
+ QWizardHeader(QWidget *parent = nullptr);
void setup(const QWizardLayoutInfo &info, const QString &title,
const QString &subTitle, const QPixmap &logo, const QPixmap &banner,
@@ -438,7 +438,7 @@ void QWizardHeader::paintEvent(QPaintEvent * /* event */)
class QWizardRuler : public QWizardHeader
{
public:
- inline QWizardRuler(QWidget *parent = 0)
+ inline QWizardRuler(QWidget *parent = nullptr)
: QWizardHeader(Ruler, parent) {}
};
@@ -452,8 +452,8 @@ public:
}
QSize minimumSizeHint() const override {
- if (pixmap() && !pixmap()->isNull())
- return pixmap()->size() / pixmap()->devicePixelRatio();
+ if (!pixmap(Qt::ReturnByValue).isNull())
+ return pixmap(Qt::ReturnByValue).size() / pixmap(Qt::ReturnByValue).devicePixelRatio();
return QFrame::minimumSizeHint();
}
@@ -684,7 +684,7 @@ void QWizardPrivate::init()
std::fill(btns, btns + QWizard::NButtons, nullptr);
antiFlickerWidget = new QWizardAntiFlickerWidget(q, this);
- wizStyle = QWizard::WizardStyle(q->style()->styleHint(QStyle::SH_WizardStyle, 0, q));
+ wizStyle = QWizard::WizardStyle(q->style()->styleHint(QStyle::SH_WizardStyle, nullptr, q));
if (wizStyle == QWizard::MacStyle) {
opts = (QWizard::NoDefaultButton | QWizard::NoCancelButton);
} else if (wizStyle == QWizard::ModernStyle) {
@@ -836,7 +836,7 @@ void QWizardPrivate::switchToPage(int newId, Direction direction)
newPage && newPage->isCommitPage() ? QWizard::CommitButton : QWizard::NextButton;
QAbstractButton *nextOrFinishButton =
btns[canContinue ? nextOrCommit : QWizard::FinishButton];
- QWidget *candidate = 0;
+ QWidget *candidate = nullptr;
/*
If there is no default button and the Next or Finish button
@@ -887,7 +887,7 @@ static const char * buttonSlots(QWizard::WizardButton which)
case QWizard::NoButton:
Q_UNREACHABLE();
};
- return 0;
+ return nullptr;
};
QWizardLayoutInfo QWizardPrivate::layoutInfoForCurrentPage()
@@ -898,14 +898,14 @@ QWizardLayoutInfo QWizardPrivate::layoutInfoForCurrentPage()
QWizardLayoutInfo info;
const int layoutHorizontalSpacing = style->pixelMetric(QStyle::PM_LayoutHorizontalSpacing);
- info.topLevelMarginLeft = style->pixelMetric(QStyle::PM_LayoutLeftMargin, 0, q);
- info.topLevelMarginRight = style->pixelMetric(QStyle::PM_LayoutRightMargin, 0, q);
- info.topLevelMarginTop = style->pixelMetric(QStyle::PM_LayoutTopMargin, 0, q);
- info.topLevelMarginBottom = style->pixelMetric(QStyle::PM_LayoutBottomMargin, 0, q);
- info.childMarginLeft = style->pixelMetric(QStyle::PM_LayoutLeftMargin, 0, titleLabel);
- info.childMarginRight = style->pixelMetric(QStyle::PM_LayoutRightMargin, 0, titleLabel);
- info.childMarginTop = style->pixelMetric(QStyle::PM_LayoutTopMargin, 0, titleLabel);
- info.childMarginBottom = style->pixelMetric(QStyle::PM_LayoutBottomMargin, 0, titleLabel);
+ info.topLevelMarginLeft = style->pixelMetric(QStyle::PM_LayoutLeftMargin, nullptr, q);
+ info.topLevelMarginRight = style->pixelMetric(QStyle::PM_LayoutRightMargin, nullptr, q);
+ info.topLevelMarginTop = style->pixelMetric(QStyle::PM_LayoutTopMargin, nullptr, q);
+ info.topLevelMarginBottom = style->pixelMetric(QStyle::PM_LayoutBottomMargin, nullptr, q);
+ info.childMarginLeft = style->pixelMetric(QStyle::PM_LayoutLeftMargin, nullptr, titleLabel);
+ info.childMarginRight = style->pixelMetric(QStyle::PM_LayoutRightMargin, nullptr, titleLabel);
+ info.childMarginTop = style->pixelMetric(QStyle::PM_LayoutTopMargin, nullptr, titleLabel);
+ info.childMarginBottom = style->pixelMetric(QStyle::PM_LayoutBottomMargin, nullptr, titleLabel);
info.hspacing = (layoutHorizontalSpacing == -1)
? style->layoutSpacing(QSizePolicy::DefaultType, QSizePolicy::DefaultType, Qt::Horizontal)
: layoutHorizontalSpacing;
@@ -959,7 +959,7 @@ void QWizardPrivate::recreateLayout(const QWizardLayoutInfo &info)
for (int i = mainLayout->count() - 1; i >= 0; --i) {
QLayoutItem *item = mainLayout->takeAt(i);
if (item->layout()) {
- item->layout()->setParent(0);
+ item->layout()->setParent(nullptr);
} else {
delete item;
}
@@ -2281,7 +2281,7 @@ void QWizard::removePage(int id)
{
Q_D(QWizard);
- QWizardPage *removedPage = 0;
+ QWizardPage *removedPage = nullptr;
// update startItem accordingly
if (d->pageMap.count() > 0) { // only if we have any pages
@@ -2792,7 +2792,7 @@ QAbstractButton *QWizard::button(WizardButton which) const
return d->vistaHelper->backButton();
#endif
if (!d->ensureButton(which))
- return 0;
+ return nullptr;
return d->btns[which];
}
@@ -2924,7 +2924,7 @@ void QWizard::setDefaultProperty(const char *className, const char *property,
or when the watermark is not provided the side widget is displayed
on the left side of the wizard.
- Passing 0 shows no side widget.
+ Passing \nullptr shows no side widget.
When the \a widget is not \nullptr the wizard reparents it.
@@ -3444,7 +3444,7 @@ int QWizard::nextId() const
\sa wizard()
*/
QWizardPage::QWizardPage(QWidget *parent)
- : QWidget(*new QWizardPagePrivate, parent, 0)
+ : QWidget(*new QWizardPagePrivate, parent, { })
{
connect(this, SIGNAL(completeChanged()), this, SLOT(_q_updateCachedCompleteState()));
}
diff --git a/src/widgets/doc/snippets/code/doc_src_layout.cpp b/src/widgets/doc/snippets/code/doc_src_layout.cpp
index 5e9a740244..7bbd781bb2 100644
--- a/src/widgets/doc/snippets/code/doc_src_layout.cpp
+++ b/src/widgets/doc/snippets/code/doc_src_layout.cpp
@@ -53,14 +53,15 @@
#define CARD_H
#include <QtWidgets>
-#include <QList>
+#include <QVector>
class CardLayout : public QLayout
{
public:
- CardLayout(QWidget *parent, int dist): QLayout(parent, 0, dist) {}
- CardLayout(QLayout *parent, int dist): QLayout(parent, dist) {}
- CardLayout(int dist): QLayout(dist) {}
+ CardLayout(int spacing): QLayout()
+ { setSpacing(spacing); }
+ CardLayout(int spacing, QWidget *parent): QLayout(parent)
+ { setSpacing(spacing); }
~CardLayout();
void addItem(QLayoutItem *item) override;
@@ -72,7 +73,7 @@ public:
void setGeometry(const QRect &rect) override;
private:
- QList<QLayoutItem*> list;
+ QVector<QLayoutItem*> m_items;
};
#endif
//! [0]
@@ -85,23 +86,23 @@ private:
//! [2]
int CardLayout::count() const
{
- // QList::size() returns the number of QLayoutItems in the list
- return list.size();
+ // QVector::size() returns the number of QLayoutItems in m_items
+ return m_items.size();
}
//! [2]
//! [3]
QLayoutItem *CardLayout::itemAt(int idx) const
{
- // QList::value() performs index checking, and returns 0 if we are
+ // QVector::value() performs index checking, and returns nullptr if we are
// outside the valid range
- return list.value(idx);
+ return m_items.value(idx);
}
QLayoutItem *CardLayout::takeAt(int idx)
{
- // QList::take does not do index checking
- return idx >= 0 && idx < list.size() ? list.takeAt(idx) : 0;
+ // QVector::take does not do index checking
+ return idx >= 0 && idx < m_items.size() ? m_items.takeAt(idx) : 0;
}
//! [3]
@@ -109,7 +110,7 @@ QLayoutItem *CardLayout::takeAt(int idx)
//! [4]
void CardLayout::addItem(QLayoutItem *item)
{
- list.append(item);
+ m_items.append(item);
}
//! [4]
@@ -129,14 +130,14 @@ void CardLayout::setGeometry(const QRect &r)
{
QLayout::setGeometry(r);
- if (list.size() == 0)
+ if (m_items.size() == 0)
return;
- int w = r.width() - (list.count() - 1) * spacing();
- int h = r.height() - (list.count() - 1) * spacing();
+ int w = r.width() - (m_items.count() - 1) * spacing();
+ int h = r.height() - (m_items.count() - 1) * spacing();
int i = 0;
- while (i < list.size()) {
- QLayoutItem *o = list.at(i);
+ while (i < m_items.size()) {
+ QLayoutItem *o = m_items.at(i);
QRect geom(r.x() + i * spacing(), r.y() + i * spacing(), w, h);
o->setGeometry(geom);
++i;
@@ -148,29 +149,29 @@ void CardLayout::setGeometry(const QRect &r)
//! [7]
QSize CardLayout::sizeHint() const
{
- QSize s(0,0);
- int n = list.count();
+ QSize s(0, 0);
+ int n = m_items.count();
if (n > 0)
- s = QSize(100,70); //start with a nice default size
+ s = QSize(100, 70); //start with a nice default size
int i = 0;
while (i < n) {
- QLayoutItem *o = list.at(i);
+ QLayoutItem *o = m_items.at(i);
s = s.expandedTo(o->sizeHint());
++i;
}
- return s + n*QSize(spacing(), spacing());
+ return s + n * QSize(spacing(), spacing());
}
QSize CardLayout::minimumSize() const
{
- QSize s(0,0);
- int n = list.count();
+ QSize s(0, 0);
+ int n = m_items.count();
int i = 0;
while (i < n) {
- QLayoutItem *o = list.at(i);
+ QLayoutItem *o = m_items.at(i);
s = s.expandedTo(o->minimumSize());
++i;
}
- return s + n*QSize(spacing(), spacing());
+ return s + n * QSize(spacing(), spacing());
}
//! [7]
diff --git a/src/widgets/doc/snippets/code/src_gui_dialogs_qfiledialog.cpp b/src/widgets/doc/snippets/code/src_gui_dialogs_qfiledialog.cpp
index 4b4fb869f9..ed6043564b 100644
--- a/src/widgets/doc/snippets/code/src_gui_dialogs_qfiledialog.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_dialogs_qfiledialog.cpp
@@ -89,11 +89,10 @@ dialog.setNameFilter("*.cpp *.cc *.C *.cxx *.c++");
//! [7]
-QStringList filters;
-filters << "Image files (*.png *.xpm *.jpg)"
- << "Text files (*.txt)"
- << "Any files (*)";
-
+const QStringList filters({"Image files (*.png *.xpm *.jpg)",
+ "Text files (*.txt)",
+ "Any files (*)"
+ });
QFileDialog dialog(this);
dialog.setNameFilters(filters);
dialog.exec();
@@ -131,10 +130,10 @@ QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
//! [12]
//! [13]
-QStringList mimeTypeFilters;
-mimeTypeFilters << "image/jpeg" // will show "JPEG image (*.jpeg *.jpg *.jpe)
- << "image/png" // will show "PNG image (*.png)"
- << "application/octet-stream"; // will show "All files (*)"
+QStringList mimeTypeFilters({"image/jpeg", // will show "JPEG image (*.jpeg *.jpg *.jpe)
+ "image/png", // will show "PNG image (*.png)"
+ "application/octet-stream" // will show "All files (*)"
+ });
QFileDialog dialog(this);
dialog.setMimeTypeFilters(mimeTypeFilters);
diff --git a/src/widgets/doc/snippets/code/src_gui_itemviews_qtreewidget.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qtreewidget.cpp
index 792cc48ca7..f1e3b6ea45 100644
--- a/src/widgets/doc/snippets/code/src_gui_itemviews_qtreewidget.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qtreewidget.cpp
@@ -53,6 +53,6 @@ QTreeWidget *treeWidget = new QTreeWidget();
treeWidget->setColumnCount(1);
QList<QTreeWidgetItem *> items;
for (int i = 0; i < 10; ++i)
- items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(QString("item: %1").arg(i))));
+ items.append(new QTreeWidgetItem(static_cast<QTreeWidget *>(nullptr), QStringList(QString("item: %1").arg(i))));
treeWidget->insertTopLevelItems(0, items);
//! [0]
diff --git a/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
index 0a70c1d32a..a7bce6d378 100644
--- a/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
@@ -51,9 +51,10 @@
//! [0]
QCoreApplication* createApplication(int &argc, char *argv[])
{
- for (int i = 1; i < argc; ++i)
+ for (int i = 1; i < argc; ++i) {
if (!qstrcmp(argv[i], "-no-gui"))
return new QCoreApplication(argc, argv);
+ }
return new QApplication(argc, argv);
}
@@ -92,7 +93,7 @@ int main(int argc, char *argv[])
//! [3]
QSize MyWidget::sizeHint() const
{
- return QSize(80, 25).expandedTo(QApplication::globalStrut());
+ return QSize(80, 25);
}
//! [3]
@@ -187,14 +188,14 @@ for (const QString &command : commands)
//! [12]
-QWidget *widget = qApp->widgetAt(x, y);
+QWidget *widget = QApplication::widgetAt(x, y);
if (widget)
widget = widget->window();
//! [12]
//! [13]
-QWidget *widget = qApp->widgetAt(point);
+QWidget *widget = QApplication::widgetAt(point);
if (widget)
widget = widget->window();
//! [13]
diff --git a/src/widgets/doc/snippets/code/src_gui_kernel_qlayout.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qlayout.cpp
index 1a716029a9..c55834ebfb 100644
--- a/src/widgets/doc/snippets/code/src_gui_kernel_qlayout.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qlayout.cpp
@@ -70,8 +70,9 @@ void MyWidget::paintEvent(QPaintEvent *)
//! [1]
QLayoutItem *child;
-while ((child = layout->takeAt(0)) != 0) {
+while ((child = layout->takeAt(0)) != nullptr) {
...
- delete child;
+ delete child->widget(); // delete the widget
+ delete child; // delete the layout item
}
//! [1]
diff --git a/src/widgets/doc/snippets/code/src_gui_kernel_qlayoutitem.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qlayoutitem.cpp
index d9f70b91ed..dd0f860c01 100644
--- a/src/widgets/doc/snippets/code/src_gui_kernel_qlayoutitem.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qlayoutitem.cpp
@@ -52,8 +52,7 @@
int MyLayout::heightForWidth(int w) const
{
if (cache_dirty || cached_width != w) {
- // not all C++ compilers support "mutable"
- MyLayout *that = (MyLayout*)this;
+ MyLayout *that = const_cast<MyLayout *>(this);
int h = calculateHeightForWidth(w);
that->cached_hfw = h;
return h;
diff --git a/src/widgets/doc/snippets/code/src_gui_qproxystyle.cpp b/src/widgets/doc/snippets/code/src_gui_qproxystyle.cpp
index 3169d1c193..98dc0ff55b 100644
--- a/src/widgets/doc/snippets/code/src_gui_qproxystyle.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_qproxystyle.cpp
@@ -53,8 +53,8 @@ class MyProxyStyle : public QProxyStyle
{
public:
- int styleHint(StyleHint hint, const QStyleOption *option = 0,
- const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const override
+ int styleHint(StyleHint hint, const QStyleOption *option = nullptr,
+ const QWidget *widget = nullptr, QStyleHintReturn *returnData = nullptr) const override
{
if (hint == QStyle::SH_UnderlineShortcut)
return 1;
@@ -72,8 +72,8 @@ public:
class MyProxyStyle : public QProxyStyle
{
public:
- int styleHint(StyleHint hint, const QStyleOption *option = 0,
- const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const override
+ int styleHint(StyleHint hint, const QStyleOption *option = nullptr,
+ const QWidget *widget = nullptr, QStyleHintReturn *returnData = nullptr) const override
{
if (hint == QStyle::SH_UnderlineShortcut)
return 0;
diff --git a/src/widgets/doc/snippets/code/src_gui_widgets_qmenubar.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qmenubar.cpp
index b82c67b379..b52b0064ad 100644
--- a/src/widgets/doc/snippets/code/src_gui_widgets_qmenubar.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qmenubar.cpp
@@ -54,5 +54,5 @@ menubar->addMenu(fileMenu);
//! [1]
-QMenuBar *menuBar = new QMenuBar(0);
+QMenuBar *menuBar = new QMenuBar(nullptr);
//! [1]
diff --git a/src/widgets/doc/snippets/code/src_gui_widgets_qsplashscreen.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qsplashscreen.cpp
index b9c0b1a38b..91aa8a9c4e 100644
--- a/src/widgets/doc/snippets/code/src_gui_widgets_qsplashscreen.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qsplashscreen.cpp
@@ -56,10 +56,10 @@ splash->show();
... // Loading some items
splash->showMessage("Loaded modules");
-qApp->processEvents();
+QCoreApplication::processEvents();
... // Establishing connections
splash->showMessage("Established connections");
-qApp->processEvents();
+QCoreApplication::processEvents();
//! [0]
diff --git a/src/widgets/doc/snippets/javastyle.cpp b/src/widgets/doc/snippets/javastyle.cpp
index 8657d5ed29..ca6866376b 100644
--- a/src/widgets/doc/snippets/javastyle.cpp
+++ b/src/widgets/doc/snippets/javastyle.cpp
@@ -380,10 +380,10 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
QRect rect = bar->rect;
if (bar->orientation == Qt::Vertical) {
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width());
- QMatrix m;
+ QTransform m;
m.translate(rect.height()-1, 0);
m.rotate(90.0);
- painter->setMatrix(m);
+ painter->setTransform(m);
}
painter->setPen(bar->palette.color(QPalette::Mid));
@@ -2589,7 +2589,7 @@ int JavaStyle::styleHint(StyleHint hint, const QStyleOption *option,
switch (hint) {
case SH_Table_GridLineColor: {
- ret = static_cast<int>(option->palette.color(QPalette::Mid).rgb());
+ ret = static_cast<int>(option->palette.color(QPalette::Mid).rgba());
break;
}
case QStyle::SH_Menu_Scrollable:
diff --git a/src/widgets/doc/snippets/qsplashscreen/main.cpp b/src/widgets/doc/snippets/qsplashscreen/main.cpp
index 843932ca83..2512035879 100644
--- a/src/widgets/doc/snippets/qsplashscreen/main.cpp
+++ b/src/widgets/doc/snippets/qsplashscreen/main.cpp
@@ -71,3 +71,10 @@ int main(int argc, char *argv[])
return app.exec();
}
//! [1]
+
+//! [2]
+QScreen *screen = QGuiApplication::screens().at(1);
+QPixmap pixmap(":/splash.png");
+QSplashScreen splash(screen, pixmap);
+splash.show();
+//! [2]
diff --git a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
index 65569a9cd2..e42e6d42ec 100644
--- a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
@@ -300,7 +300,7 @@
\list
\li A data structure to store the items handled by the layout. Each
item is a \l{QLayoutItem}{QLayoutItem}. We will use a
- QList in this example.
+ QVector in this example.
\li \l{QLayout::}{addItem()}, how to add items to the layout.
\li \l{QLayout::}{setGeometry()}, how to perform the layout.
\li \l{QLayout::}{sizeHint()}, the preferred size of the layout.
diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
index efe30308f0..50f626e7a6 100644
--- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -993,6 +993,9 @@
\li Supports the \l{box model}. Supports the \l{#default-ps}{:default},
\l{#flat-ps}{:flat}, \l{#checked-ps}{:checked} pseudo states.
+ Since 5.15, the \l{#icon-prop}{icon} property can be set to
+ override the button icon.
+
For QPushButton with a menu, the menu indicator is styled
using the \l{#menu-indicator-sub}{::menu-indicator}
subcontrol. Appearance of checkable push buttons can be
@@ -1946,6 +1949,20 @@
See also \l{#width-prop}{width}.
\row
+ \li \b{\c icon} \target icon-prop
+ \li \l{#Url}{Url}+
+ \li The icon that is used, for widgets that have an icon.
+
+ The only widget currently supporting this property is QPushButton.
+
+ \note It's the application's responsibilty to assign an icon to a
+ button (using the QAbstractButton API), and not the style's. So be
+ careful setting it unless your stylesheet is targeting a specific
+ application.
+
+ Available since 5.15.
+
+ \row
\li \b{\c icon-size} \target icon-size-prop
\li \l{#Length}{Length}
\li The width and height of the icon in a widget.
diff --git a/src/widgets/effects/qgraphicseffect.cpp b/src/widgets/effects/qgraphicseffect.cpp
index 94188f3485..2eb74ce2a8 100644
--- a/src/widgets/effects/qgraphicseffect.cpp
+++ b/src/widgets/effects/qgraphicseffect.cpp
@@ -415,7 +415,7 @@ QGraphicsEffect::QGraphicsEffect(QGraphicsEffectPrivate &dd, QObject *parent)
QGraphicsEffect::~QGraphicsEffect()
{
Q_D(QGraphicsEffect);
- d->setGraphicsEffectSource(0);
+ d->setGraphicsEffectSource(nullptr);
}
/*!
diff --git a/src/widgets/effects/qpixmapfilter.cpp b/src/widgets/effects/qpixmapfilter.cpp
index e1e8175423..1f899c2660 100644
--- a/src/widgets/effects/qpixmapfilter.cpp
+++ b/src/widgets/effects/qpixmapfilter.cpp
@@ -208,7 +208,7 @@ QRectF QPixmapFilter::boundingRectFor(const QRectF &rect) const
class QPixmapConvolutionFilterPrivate : public QPixmapFilterPrivate
{
public:
- QPixmapConvolutionFilterPrivate(): convolutionKernel(0), kernelWidth(0), kernelHeight(0), convoluteAlpha(false) {}
+ QPixmapConvolutionFilterPrivate(): convolutionKernel(nullptr), kernelWidth(0), kernelHeight(0), convoluteAlpha(false) {}
~QPixmapConvolutionFilterPrivate() {
delete[] convolutionKernel;
}
@@ -424,7 +424,7 @@ void QPixmapConvolutionFilter::draw(QPainter *painter, const QPointF &p, const Q
// raster implementation
- QImage *target = 0;
+ QImage *target = nullptr;
if (painter->paintEngine()->paintDevice()->devType() == QInternal::Image) {
target = static_cast<QImage *>(painter->paintEngine()->paintDevice());
@@ -432,18 +432,18 @@ void QPixmapConvolutionFilter::draw(QPainter *painter, const QPointF &p, const Q
if (mat.type() > QTransform::TxTranslate) {
// Disabled because of transformation...
- target = 0;
+ target = nullptr;
} else {
QRasterPaintEngine *pe = static_cast<QRasterPaintEngine *>(painter->paintEngine());
if (pe->clipType() == QRasterPaintEngine::ComplexClip)
// disabled because of complex clipping...
- target = 0;
+ target = nullptr;
else {
QRectF clip = pe->clipBoundingRect();
QRectF rect = boundingRectFor(srcRect.isEmpty() ? src.rect() : srcRect);
QTransform x = painter->deviceTransform();
if (!clip.contains(rect.translated(x.dx() + p.x(), x.dy() + p.y()))) {
- target = 0;
+ target = nullptr;
}
}
@@ -1135,8 +1135,12 @@ void QPixmapColorizeFilter::draw(QPainter *painter, const QPointF &dest, const Q
destImage = std::move(buffer);
}
- if (srcImage.hasAlphaChannel())
- destImage.setAlphaChannel(srcImage.alphaChannel());
+ if (srcImage.hasAlphaChannel()) {
+ Q_ASSERT(destImage.format() == QImage::Format_ARGB32_Premultiplied);
+ QPainter maskPainter(&destImage);
+ maskPainter.setCompositionMode(QPainter::CompositionMode_DestinationIn);
+ maskPainter.drawImage(0, 0, srcImage);
+ }
painter->drawImage(dest, destImage);
}
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
index ea6a8018ca..4f1855a606 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
@@ -353,7 +353,7 @@ void QGraphicsAnchorLayout::addAnchors(QGraphicsLayoutItem *firstItem,
bool ok = true;
if (orientations & Qt::Horizontal) {
// Currently, if the first is ok, then the rest of the calls should be ok
- ok = addAnchor(secondItem, Qt::AnchorLeft, firstItem, Qt::AnchorLeft) != 0;
+ ok = addAnchor(secondItem, Qt::AnchorLeft, firstItem, Qt::AnchorLeft) != nullptr;
if (ok)
addAnchor(firstItem, Qt::AnchorRight, secondItem, Qt::AnchorRight);
}
@@ -465,7 +465,7 @@ void QGraphicsAnchorLayout::removeAt(int index)
d->removeAnchors(item);
d->items.remove(index);
- item->setParentLayoutItem(0);
+ item->setParentLayoutItem(nullptr);
invalidate();
}
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
index 4f44373cad..af0ee3d38c 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
const qreal g_offset = (sizeof(qreal) == sizeof(double)) ? QWIDGETSIZE_MAX : QWIDGETSIZE_MAX / 32;
QGraphicsAnchorPrivate::QGraphicsAnchorPrivate(int version)
- : QObjectPrivate(version), layoutPrivate(0), data(0),
+ : QObjectPrivate(version), layoutPrivate(nullptr), data(nullptr),
sizePolicy(QSizePolicy::Fixed), preferredSize(0),
hasSize(true)
{
@@ -72,7 +72,7 @@ QGraphicsAnchorPrivate::~QGraphicsAnchorPrivate()
if (data) {
// The QGraphicsAnchor was already deleted at this moment. We must clean
// the dangling pointer to avoid double deletion in the AnchorData dtor.
- data->graphicsAnchor = 0;
+ data->graphicsAnchor = nullptr;
layoutPrivate->removeAnchor(data->from, data->to);
}
@@ -631,9 +631,9 @@ QGraphicsAnchorLayoutPrivate::QGraphicsAnchorLayoutPrivate()
spacings[i] = -1;
graphHasConflicts[i] = false;
- layoutFirstVertex[i] = 0;
- layoutCentralVertex[i] = 0;
- layoutLastVertex[i] = 0;
+ layoutFirstVertex[i] = nullptr;
+ layoutCentralVertex[i] = nullptr;
+ layoutLastVertex[i] = nullptr;
}
}
@@ -981,7 +981,7 @@ bool QGraphicsAnchorLayoutPrivate::simplifyVertices(Orientation orientation)
feasible &= replaceVertex(orientation, next, newV, newV->m_secondAnchors);
// Update the layout vertex information if one of the vertices is a layout vertex.
- AnchorVertex *layoutVertex = 0;
+ AnchorVertex *layoutVertex = nullptr;
if (v->m_item == q)
layoutVertex = v;
else if (next->m_item == q)
@@ -1035,7 +1035,7 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP
QSet<AnchorVertex *> visited;
QStack<QPair<AnchorVertex *, AnchorVertex *> > stack;
- stack.push(qMakePair(static_cast<AnchorVertex *>(0), layoutFirstVertex[orientation]));
+ stack.push(qMakePair(static_cast<AnchorVertex *>(nullptr), layoutFirstVertex[orientation]));
QVector<AnchorVertex*> candidates;
// Walk depth-first, in the stack we store start of the candidate sequence (beforeSequence)
@@ -1384,7 +1384,7 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges()
// Save a reference to layout vertices
layoutFirstVertex[Horizontal] = internalVertex(layout, Qt::AnchorLeft);
- layoutCentralVertex[Horizontal] = 0;
+ layoutCentralVertex[Horizontal] = nullptr;
layoutLastVertex[Horizontal] = internalVertex(layout, Qt::AnchorRight);
// Vertical
@@ -1395,7 +1395,7 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges()
// Save a reference to layout vertices
layoutFirstVertex[Vertical] = internalVertex(layout, Qt::AnchorTop);
- layoutCentralVertex[Vertical] = 0;
+ layoutCentralVertex[Vertical] = nullptr;
layoutLastVertex[Vertical] = internalVertex(layout, Qt::AnchorBottom);
}
@@ -1581,7 +1581,7 @@ void QGraphicsAnchorLayoutPrivate::removeCenterAnchors(
}
if (item == q) {
- layoutCentralVertex[orientation] = 0;
+ layoutCentralVertex[orientation] = nullptr;
}
}
@@ -1636,29 +1636,29 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::addAnchor(QGraphicsLayoutItem *fi
qreal *spacing)
{
Q_Q(QGraphicsAnchorLayout);
- if ((firstItem == 0) || (secondItem == 0)) {
+ if ((firstItem == nullptr) || (secondItem == nullptr)) {
qWarning("QGraphicsAnchorLayout::addAnchor(): "
"Cannot anchor NULL items");
- return 0;
+ return nullptr;
}
if (firstItem == secondItem) {
qWarning("QGraphicsAnchorLayout::addAnchor(): "
"Cannot anchor the item to itself");
- return 0;
+ return nullptr;
}
if (edgeOrientation(secondEdge) != edgeOrientation(firstEdge)) {
qWarning("QGraphicsAnchorLayout::addAnchor(): "
"Cannot anchor edges of different orientations");
- return 0;
+ return nullptr;
}
const QGraphicsLayoutItem *parentWidget = q->parentLayoutItem();
if (firstItem == parentWidget || secondItem == parentWidget) {
qWarning("QGraphicsAnchorLayout::addAnchor(): "
"You cannot add the parent of the layout to the layout.");
- return 0;
+ return nullptr;
}
// In QGraphicsAnchorLayout, items are represented in its internal
@@ -1770,13 +1770,13 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::getAnchor(QGraphicsLayoutItem *fi
{
// Do not expose internal anchors
if (firstItem == secondItem)
- return 0;
+ return nullptr;
const Orientation orientation = edgeOrientation(firstEdge);
AnchorVertex *v1 = internalVertex(firstItem, firstEdge);
AnchorVertex *v2 = internalVertex(secondItem, secondEdge);
- QGraphicsAnchor *graphicsAnchor = 0;
+ QGraphicsAnchor *graphicsAnchor = nullptr;
AnchorData *data = graph[orientation].edgeData(v1, v2);
if (data) {
@@ -1811,7 +1811,7 @@ void QGraphicsAnchorLayoutPrivate::removeAnchor(AnchorVertex *firstVertex,
removeAnchor_helper(firstVertex, secondVertex);
// Ensure no dangling pointer is left behind
- firstVertex = secondVertex = 0;
+ firstVertex = secondVertex = nullptr;
// Checking if the item stays in the layout or not
bool keepFirstItem = false;
@@ -2017,13 +2017,13 @@ QLayoutStyleInfo &QGraphicsAnchorLayoutPrivate::styleInfo() const
if (styleInfoDirty) {
Q_Q(const QGraphicsAnchorLayout);
//### Fix this if QGV ever gets support for Metal style or different Aqua sizes.
- QWidget *wid = 0;
+ QWidget *wid = nullptr;
QGraphicsLayoutItem *parent = q->parentLayoutItem();
while (parent && parent->isLayout()) {
parent = parent->parentLayoutItem();
}
- QGraphicsWidget *w = 0;
+ QGraphicsWidget *w = nullptr;
if (parent) {
QGraphicsItem *parentItem = parent->graphicsItem();
if (parentItem && parentItem->isWidget())
@@ -2404,7 +2404,7 @@ QList<QSimplexConstraint *> QGraphicsAnchorLayoutPrivate::constraintsFromSizeHin
// Look for the layout edge. That can be either the first half in case the
// layout is split in two, or the whole layout anchor.
Orientation orient = Orientation(anchors.first()->orientation);
- AnchorData *layoutEdge = 0;
+ AnchorData *layoutEdge = nullptr;
if (layoutCentralVertex[orient]) {
layoutEdge = graph[orient].edgeData(layoutFirstVertex[orient], layoutCentralVertex[orient]);
} else {
@@ -2423,7 +2423,7 @@ QList<QSimplexConstraint *> QGraphicsAnchorLayoutPrivate::constraintsFromSizeHin
actualMax = -layoutEdge->minSize;
}
if (actualMax != expectedMax) {
- layoutEdge = 0;
+ layoutEdge = nullptr;
}
// For each variable, create constraints based on size hints
@@ -2496,8 +2496,8 @@ QGraphicsAnchorLayoutPrivate::getGraphParts(Orientation orientation)
Q_ASSERT(layoutFirstVertex[orientation] && layoutLastVertex[orientation]);
- AnchorData *edgeL1 = 0;
- AnchorData *edgeL2 = 0;
+ AnchorData *edgeL1 = nullptr;
+ AnchorData *edgeL2 = nullptr;
// The layout may have a single anchor between Left and Right or two half anchors
// passing through the center
@@ -2625,7 +2625,7 @@ void QGraphicsAnchorLayoutPrivate::setItemsGeometries(const QRectF &geom)
qreal left;
qreal right;
- q->getContentsMargins(&left, &top, &right, 0);
+ q->getContentsMargins(&left, &top, &right, nullptr);
const Qt::LayoutDirection visualDir = visualDirection();
if (visualDir == Qt::RightToLeft)
qSwap(left, right);
diff --git a/src/widgets/graphicsview/qgraphicsgridlayout.cpp b/src/widgets/graphicsview/qgraphicsgridlayout.cpp
index 6b7052a0ab..260e1861c7 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicsgridlayout.cpp
@@ -137,7 +137,7 @@ QGraphicsGridLayout::~QGraphicsGridLayout()
// ~QGraphicsLayoutItem.
removeAt(i);
if (item) {
- item->setParentLayoutItem(0);
+ item->setParentLayoutItem(nullptr);
if (item->ownedByLayout())
delete item;
}
@@ -535,11 +535,11 @@ QGraphicsLayoutItem *QGraphicsGridLayout::itemAt(int row, int column) const
Q_D(const QGraphicsGridLayout);
if (row < 0 || row >= rowCount() || column < 0 || column >= columnCount()) {
qWarning("QGraphicsGridLayout::itemAt: invalid row, column %d, %d", row, column);
- return 0;
+ return nullptr;
}
if (QGraphicsGridLayoutEngineItem *engineItem = static_cast<QGraphicsGridLayoutEngineItem*>(d->engine.itemAt(row, column)))
return engineItem->layoutItem();
- return 0;
+ return nullptr;
}
/*!
@@ -583,7 +583,7 @@ void QGraphicsGridLayout::removeAt(int index)
if (QGraphicsGridLayoutEngineItem *gridItem = static_cast<QGraphicsGridLayoutEngineItem*>(d->engine.itemAt(index))) {
if (QGraphicsLayoutItem *layoutItem = gridItem->layoutItem())
- layoutItem->setParentLayoutItem(0);
+ layoutItem->setParentLayoutItem(nullptr);
d->engine.removeItem(gridItem);
// recalculate rowInfo.count if we remove an item that is on the right/bottommost row
diff --git a/src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp b/src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp
index 6a8d5c907b..5797d9e539 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp
+++ b/src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp
@@ -96,7 +96,7 @@ Qt::Alignment QGraphicsGridLayoutEngine::alignment(QGraphicsLayoutItem *graphics
{
if (QGraphicsGridLayoutEngineItem *gridEngineItem = findLayoutItem(graphicsLayoutItem))
return gridEngineItem->alignment();
- return 0;
+ return { };
}
diff --git a/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h b/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
index e98160e40f..2f2c547977 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
+++ b/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
@@ -68,7 +68,7 @@ class QGraphicsLayoutPrivate;
class QGraphicsGridLayoutEngineItem : public QGridLayoutItem {
public:
QGraphicsGridLayoutEngineItem(QGraphicsLayoutItem *item, int row, int columns, int rowSpan = 1, int columnSpan = 1,
- Qt::Alignment alignment = nullptr)
+ Qt::Alignment alignment = { })
: QGridLayoutItem(row, columns, rowSpan, columnSpan, alignment), q_layoutItem(item) {}
virtual QLayoutPolicy::Policy sizePolicy(Qt::Orientation orientation) const override
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 7c0f836156..38cab60fc2 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -1250,7 +1250,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (isWidget)
static_cast<QGraphicsWidgetPrivate *>(this)->fixFocusChainBeforeReparenting((newParent &&
- newParent->isWidget()) ? static_cast<QGraphicsWidget *>(newParent) : 0,
+ newParent->isWidget()) ? static_cast<QGraphicsWidget *>(newParent) : nullptr,
scene);
if (scene) {
// Deliver the change to the index
@@ -1293,7 +1293,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
// Ensure any last parent focus scope does not point to this item or any of
// its descendents.
QGraphicsItem *p = parent;
- QGraphicsItem *parentFocusScopeItem = 0;
+ QGraphicsItem *parentFocusScopeItem = nullptr;
while (p) {
if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) {
// If this item's focus scope's focus scope item points
@@ -1301,7 +1301,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
QGraphicsItem *fsi = p->d_ptr->focusScopeItem;
if (q_ptr == fsi || q_ptr->isAncestorOf(fsi)) {
parentFocusScopeItem = fsi;
- p->d_ptr->focusScopeItem = 0;
+ p->d_ptr->focusScopeItem = nullptr;
fsi->d_ptr->focusScopeItemChange(false);
}
break;
@@ -1321,7 +1321,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) {
if (subFocusItem && subFocusItem != q_ptr) {
// Find the subFocusItem's topmost focus scope within the new parent's focusscope
- QGraphicsItem *ancestorScope = 0;
+ QGraphicsItem *ancestorScope = nullptr;
QGraphicsItem *p2 = subFocusItem->d_ptr->parent;
while (p2 && p2 != p) {
if (p2->d_ptr->flags & QGraphicsItem::ItemIsFocusScope)
@@ -1587,7 +1587,7 @@ QGraphicsItem::~QGraphicsItem()
if (QAbstractDeclarativeData::destroyed)
QAbstractDeclarativeData::destroyed(p->declarativeData, o);
}
- p->declarativeData = 0;
+ p->declarativeData = nullptr;
p->wasDeleted = false;
}
}
@@ -1607,14 +1607,14 @@ QGraphicsItem::~QGraphicsItem()
#endif
clearFocus();
- setFocusProxy(0);
+ setFocusProxy(nullptr);
// Update focus scope item ptr.
QGraphicsItem *p = d_ptr->parent;
while (p) {
if (p->flags() & ItemIsFocusScope) {
if (p->d_ptr->focusScopeItem == this)
- p->d_ptr->focusScopeItem = 0;
+ p->d_ptr->focusScopeItem = nullptr;
break;
}
p = p->d_ptr->parent;
@@ -1630,7 +1630,7 @@ QGraphicsItem::~QGraphicsItem()
d_ptr->scene->d_func()->removeItemHelper(this);
} else {
d_ptr->resetFocusProxy();
- setParentItem(0);
+ setParentItem(nullptr);
}
#if QT_CONFIG(graphicseffect)
@@ -1639,7 +1639,7 @@ QGraphicsItem::~QGraphicsItem()
if (d_ptr->transformData) {
for(int i = 0; i < d_ptr->transformData->graphicsTransforms.size(); ++i) {
QGraphicsTransform *t = d_ptr->transformData->graphicsTransforms.at(i);
- static_cast<QGraphicsTransformPrivate *>(t->d_ptr.data())->item = 0;
+ static_cast<QGraphicsTransformPrivate *>(t->d_ptr.data())->item = nullptr;
delete t;
}
}
@@ -1751,7 +1751,7 @@ QGraphicsWidget *QGraphicsItem::parentWidget() const
QGraphicsItem *p = parentItem();
while (p && !p->isWidget())
p = p->parentItem();
- return (p && p->isWidget()) ? static_cast<QGraphicsWidget *>(p) : 0;
+ return (p && p->isWidget()) ? static_cast<QGraphicsWidget *>(p) : nullptr;
}
/*!
@@ -1811,7 +1811,7 @@ QGraphicsItem *QGraphicsItem::panel() const
*/
QGraphicsObject *QGraphicsItem::toGraphicsObject()
{
- return d_ptr->isObject ? static_cast<QGraphicsObject *>(this) : 0;
+ return d_ptr->isObject ? static_cast<QGraphicsObject *>(this) : nullptr;
}
/*!
@@ -1822,7 +1822,7 @@ QGraphicsObject *QGraphicsItem::toGraphicsObject()
*/
const QGraphicsObject *QGraphicsItem::toGraphicsObject() const
{
- return d_ptr->isObject ? static_cast<const QGraphicsObject *>(this) : 0;
+ return d_ptr->isObject ? static_cast<const QGraphicsObject *>(this) : nullptr;
}
/*!
@@ -2224,7 +2224,7 @@ bool QGraphicsItem::isBlockedByModalPanel(QGraphicsItem **blockingPanel) const
return false;
- QGraphicsItem *dummy = 0;
+ QGraphicsItem *dummy = nullptr;
if (!blockingPanel)
blockingPanel = &dummy;
@@ -2331,12 +2331,17 @@ void QGraphicsItem::setCursor(const QCursor &cursor)
view->viewport()->setMouseTracking(true);
// Note: Some of this logic is duplicated in QGraphicsView's mouse events.
if (view->underMouse()) {
- const auto itemsUnderCursor = view->items(view->mapFromGlobal(QCursor::pos()));
- for (QGraphicsItem *itemUnderCursor : itemsUnderCursor) {
- if (itemUnderCursor->hasCursor()) {
- QMetaObject::invokeMethod(view, "_q_setViewportCursor",
- Q_ARG(QCursor, itemUnderCursor->cursor()));
- break;
+ const QPoint viewPoint = view->mapFromGlobal(QCursor::pos());
+ const QPointF cursorPos = mapFromScene(view->mapToScene(viewPoint));
+ // the cursor can only change if the current item is under the mouse
+ if (boundingRect().contains(cursorPos)) {
+ const auto itemsUnderCursor = view->items(viewPoint);
+ for (QGraphicsItem *itemUnderCursor : itemsUnderCursor) {
+ if (itemUnderCursor->hasCursor()) {
+ QMetaObject::invokeMethod(view, "_q_setViewportCursor",
+ Q_ARG(QCursor, itemUnderCursor->cursor()));
+ break;
+ }
}
}
break;
@@ -2420,7 +2425,7 @@ bool QGraphicsItem::isVisibleTo(const QGraphicsItem *parent) const
if (p->d_ptr->explicitlyHidden)
return false;
} while ((p = p->d_ptr->parent));
- return parent == 0;
+ return parent == nullptr;
}
/*!
@@ -2959,7 +2964,7 @@ void QGraphicsItem::setGraphicsEffect(QGraphicsEffect *effect)
if (d_ptr->graphicsEffect) {
delete d_ptr->graphicsEffect;
- d_ptr->graphicsEffect = 0;
+ d_ptr->graphicsEffect = nullptr;
} else if (d_ptr->parent) {
d_ptr->parent->d_ptr->updateChildWithGraphicsEffectFlagRecursively();
}
@@ -2984,7 +2989,7 @@ void QGraphicsItemPrivate::updateChildWithGraphicsEffectFlagRecursively()
if (itemPrivate->mayHaveChildWithGraphicsEffect)
return;
itemPrivate->mayHaveChildWithGraphicsEffect = 1;
- } while ((itemPrivate = itemPrivate->parent ? itemPrivate->parent->d_ptr.data() : 0));
+ } while ((itemPrivate = itemPrivate->parent ? itemPrivate->parent->d_ptr.data() : nullptr));
#endif
}
@@ -3396,13 +3401,13 @@ void QGraphicsItem::setActive(bool active)
if (!activePanel || activePanel == thisPanel) {
// Deactivate this item, and reactivate the parent panel,
// or the last active panel (if any).
- QGraphicsItem *nextToActivate = 0;
+ QGraphicsItem *nextToActivate = nullptr;
if (d_ptr->parent)
nextToActivate = d_ptr->parent->panel();
if (!nextToActivate)
nextToActivate = d_ptr->scene->d_func()->lastActivePanel;
if (nextToActivate == this || isAncestorOf(nextToActivate))
- nextToActivate = 0;
+ nextToActivate = nullptr;
d_ptr->scene->setActivePanel(nextToActivate);
}
}
@@ -3499,7 +3504,7 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim
}
// Update the child focus chain.
- QGraphicsItem *commonAncestor = 0;
+ QGraphicsItem *commonAncestor = nullptr;
if (scene && scene->focusItem() && scene->focusItem()->panel() == q_ptr->panel()) {
commonAncestor = scene->focusItem()->commonAncestorItem(f);
scene->focusItem()->d_ptr->clearSubFocus(scene->focusItem(), commonAncestor);
@@ -3552,7 +3557,7 @@ void QGraphicsItemPrivate::clearFocusHelper(bool giveFocusToParent, bool hiddenB
while (p) {
if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
if (p->d_ptr->focusScopeItem == q_ptr) {
- p->d_ptr->focusScopeItem = 0;
+ p->d_ptr->focusScopeItem = nullptr;
if (!subFocusItem->hasFocus()) //if it has focus, focusScopeItemChange is called elsewhere
focusScopeItemChange(false);
}
@@ -3572,7 +3577,7 @@ void QGraphicsItemPrivate::clearFocusHelper(bool giveFocusToParent, bool hiddenB
clearSubFocus(q_ptr);
// If this item has the scene's input focus, clear it.
- scene->setFocusItem(0);
+ scene->setFocusItem(nullptr);
}
}
@@ -3621,7 +3626,7 @@ void QGraphicsItem::setFocusProxy(QGraphicsItem *item)
qWarning("QGraphicsItem::setFocusProxy: focus proxy must be in same scene");
return;
}
- for (QGraphicsItem *f = item->focusProxy(); f != 0; f = f->focusProxy()) {
+ for (QGraphicsItem *f = item->focusProxy(); f != nullptr; f = f->focusProxy()) {
if (f == this) {
qWarning("QGraphicsItem::setFocusProxy: %p is already in the focus proxy chain", item);
return;
@@ -4452,7 +4457,7 @@ QTransform QGraphicsItem::deviceTransform(const QTransform &viewportTransform) c
QTransform QGraphicsItem::itemTransform(const QGraphicsItem *other, bool *ok) const
{
// Catch simple cases first.
- if (other == 0) {
+ if (other == nullptr) {
qWarning("QGraphicsItem::itemTransform: null pointer passed");
return QTransform();
}
@@ -4892,7 +4897,7 @@ void QGraphicsItem::stackBefore(const QGraphicsItem *sibling)
}
QList<QGraphicsItem *> *siblings = d_ptr->parent
? &d_ptr->parent->d_ptr->children
- : (d_ptr->scene ? &d_ptr->scene->d_func()->topLevelItems : 0);
+ : (d_ptr->scene ? &d_ptr->scene->d_func()->topLevelItems : nullptr);
if (!siblings) {
qWarning("QGraphicsItem::stackUnder: cannot stack under %p, which must be a sibling", sibling);
return;
@@ -4949,7 +4954,7 @@ QRectF QGraphicsItem::childrenBoundingRect() const
return d_ptr->childrenBoundingRect;
d_ptr->childrenBoundingRect = QRectF();
- d_ptr->childrenBoundingRectHelper(0, &d_ptr->childrenBoundingRect, 0);
+ d_ptr->childrenBoundingRectHelper(nullptr, &d_ptr->childrenBoundingRect, nullptr);
d_ptr->dirtyChildrenBoundingRect = 0;
return d_ptr->childrenBoundingRect;
}
@@ -5422,7 +5427,7 @@ QRegion QGraphicsItem::boundingRegion(const QTransform &itemToDeviceTransform) c
// Render
QStyleOptionGraphicsItem option;
- const_cast<QGraphicsItem *>(this)->paint(&p, &option, 0);
+ const_cast<QGraphicsItem *>(this)->paint(&p, &option, nullptr);
p.end();
// Transform QRegion back to device space
@@ -5575,7 +5580,7 @@ void QGraphicsItemPrivate::invalidateParentGraphicsEffectsRecursively()
if (!itemPrivate->updateDueToGraphicsEffect)
static_cast<QGraphicsItemEffectSourcePrivate *>(itemPrivate->graphicsEffect->d_func()->source->d_func())->invalidateCache();
}
- } while ((itemPrivate = itemPrivate->parent ? itemPrivate->parent->d_ptr.data() : 0));
+ } while ((itemPrivate = itemPrivate->parent ? itemPrivate->parent->d_ptr.data() : nullptr));
}
void QGraphicsItemPrivate::invalidateChildGraphicsEffectsRecursively(QGraphicsItemPrivate::InvalidateReason reason)
@@ -5739,7 +5744,7 @@ void QGraphicsItemPrivate::ensureSceneTransformRecursive(QGraphicsItem **topMost
if (*topMostDirtyItem == q_ptr) {
if (!dirtySceneTransform)
return; // OK, neither my ancestors nor I have dirty scene transforms.
- *topMostDirtyItem = 0;
+ *topMostDirtyItem = nullptr;
} else if (*topMostDirtyItem) {
return; // Continue backtrack.
}
@@ -5771,7 +5776,7 @@ void QGraphicsItemPrivate::setSubFocus(QGraphicsItem *rootItem, QGraphicsItem *s
if (parent != q_ptr && parent->d_ptr->subFocusItem) {
if (parent->d_ptr->subFocusItem == q_ptr)
break;
- parent->d_ptr->subFocusItem->d_ptr->clearSubFocus(0, stopItem);
+ parent->d_ptr->subFocusItem->d_ptr->clearSubFocus(nullptr, stopItem);
}
parent->d_ptr->subFocusItem = q_ptr;
parent->d_ptr->subFocusItemChange();
@@ -5793,7 +5798,7 @@ void QGraphicsItemPrivate::clearSubFocus(QGraphicsItem *rootItem, QGraphicsItem
do {
if (parent->d_ptr->subFocusItem != q_ptr)
break;
- parent->d_ptr->subFocusItem = 0;
+ parent->d_ptr->subFocusItem = nullptr;
if (parent != stopItem && !parent->isAncestorOf(stopItem))
parent->d_ptr->subFocusItemChange();
} while (!parent->isPanel() && (parent = parent->d_ptr->parent));
@@ -5808,7 +5813,7 @@ void QGraphicsItemPrivate::clearSubFocus(QGraphicsItem *rootItem, QGraphicsItem
void QGraphicsItemPrivate::resetFocusProxy()
{
for (int i = 0; i < focusProxyRefs.size(); ++i)
- *focusProxyRefs.at(i) = 0;
+ *focusProxyRefs.at(i) = nullptr;
focusProxyRefs.clear();
}
@@ -7322,7 +7327,7 @@ void QGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
// Find the active view.
- QGraphicsView *view = 0;
+ QGraphicsView *view = nullptr;
if (event->widget())
view = qobject_cast<QGraphicsView *>(event->widget()->parentWidget());
@@ -7330,7 +7335,7 @@ void QGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
int i = 0;
bool movedMe = false;
while (i <= selectedItems.size()) {
- QGraphicsItem *item = 0;
+ QGraphicsItem *item = nullptr;
if (i < selectedItems.size())
item = selectedItems.at(i);
else
@@ -7891,7 +7896,7 @@ void QGraphicsItemPrivate::children_append(QDeclarativeListProperty<QGraphicsObj
if (QGraphicsItemPrivate::get(graphicsObject)->sendParentChangeNotification) {
item->setParentItem(graphicsObject);
} else {
- QGraphicsItemPrivate::get(item)->setParentItemHelper(graphicsObject, 0, 0);
+ QGraphicsItemPrivate::get(item)->setParentItemHelper(graphicsObject, nullptr, nullptr);
}
}
}
@@ -7908,7 +7913,7 @@ QGraphicsObject *QGraphicsItemPrivate::children_at(QDeclarativeListProperty<QGra
if (index >= 0 && index < d->children.count())
return d->children.at(index)->toGraphicsObject();
else
- return 0;
+ return nullptr;
}
void QGraphicsItemPrivate::children_clear(QDeclarativeListProperty<QGraphicsObject> *list)
@@ -7917,10 +7922,10 @@ void QGraphicsItemPrivate::children_clear(QDeclarativeListProperty<QGraphicsObje
int childCount = d->children.count();
if (d->sendParentChangeNotification) {
for (int index = 0; index < childCount; index++)
- d->children.at(0)->setParentItem(0);
+ d->children.at(0)->setParentItem(nullptr);
} else {
for (int index = 0; index < childCount; index++)
- QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, 0, 0);
+ QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(nullptr, nullptr, nullptr);
}
}
@@ -9949,7 +9954,7 @@ class QGraphicsTextItemPrivate
{
public:
QGraphicsTextItemPrivate()
- : control(0), pageNumber(0), useDefaultImpl(false), tabChangesFocus(false), clickCausedFocus(0)
+ : control(nullptr), pageNumber(0), useDefaultImpl(false), tabChangesFocus(false), clickCausedFocus(0)
{ }
mutable QWidgetTextControl *control;
@@ -10511,13 +10516,13 @@ QVariant QGraphicsTextItem::inputMethodQuery(Qt::InputMethodQuery query) const
v = int(inputMethodHints());
else if (dd->control)
v = dd->control->inputMethodQuery(query, QVariant());
- if (v.type() == QVariant::RectF)
+ if (v.userType() == QMetaType::QRectF)
v = v.toRectF().translated(-dd->controlOffset());
- else if (v.type() == QVariant::PointF)
+ else if (v.userType() == QMetaType::QPointF)
v = v.toPointF() - dd->controlOffset();
- else if (v.type() == QVariant::Rect)
+ else if (v.userType() == QMetaType::QRect)
v = v.toRect().translated(-dd->controlOffset().toPoint());
- else if (v.type() == QVariant::Point)
+ else if (v.userType() == QMetaType::QPoint)
v = v.toPoint() - dd->controlOffset().toPoint();
return v;
}
@@ -11232,7 +11237,7 @@ void QGraphicsItemGroup::removeFromGroup(QGraphicsItem *item)
// ### Expensive, we could maybe use dirtySceneTransform bit for optimization
item->setTransform(itemTransform);
- item->d_func()->setIsMemberOfGroup(item->group() != 0);
+ item->d_func()->setIsMemberOfGroup(item->group() != nullptr);
// ### Quite expensive. But removeFromGroup() isn't called very often.
prepareGeometryChange();
@@ -11412,18 +11417,18 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QP
QTransform sceneTransform = item->sceneTransform();
QTransform newEffectTransform = sceneTransform.inverted();
newEffectTransform *= effectTransform;
- scened->draw(item, &pixmapPainter, 0, &sceneTransform, 0, 0, qreal(1.0),
+ scened->draw(item, &pixmapPainter, nullptr, &sceneTransform, nullptr, nullptr, qreal(1.0),
&newEffectTransform, false, true);
} else if (deviceCoordinates) {
// Device coordinates with info.
- scened->draw(item, &pixmapPainter, info->viewTransform, info->transformPtr, 0,
+ scened->draw(item, &pixmapPainter, info->viewTransform, info->transformPtr, nullptr,
info->widget, info->opacity, &effectTransform, info->wasDirtySceneTransform,
info->drawItem);
} else {
// Item coordinates with info.
QTransform newEffectTransform = info->transformPtr->inverted();
newEffectTransform *= effectTransform;
- scened->draw(item, &pixmapPainter, info->viewTransform, info->transformPtr, 0,
+ scened->draw(item, &pixmapPainter, info->viewTransform, info->transformPtr, nullptr,
info->widget, info->opacity, &newEffectTransform, info->wasDirtySceneTransform,
info->drawItem);
}
diff --git a/src/widgets/graphicsview/qgraphicsitemanimation.cpp b/src/widgets/graphicsview/qgraphicsitemanimation.cpp
index ad77e2f260..1c5dbf265c 100644
--- a/src/widgets/graphicsview/qgraphicsitemanimation.cpp
+++ b/src/widgets/graphicsview/qgraphicsitemanimation.cpp
@@ -106,7 +106,7 @@ class QGraphicsItemAnimationPrivate
{
public:
inline QGraphicsItemAnimationPrivate()
- : q(0), timeLine(0), item(0), step(0)
+ : q(nullptr), timeLine(nullptr), item(nullptr), step(0)
{ }
QGraphicsItemAnimation *q;
diff --git a/src/widgets/graphicsview/qgraphicslayout_p.cpp b/src/widgets/graphicsview/qgraphicslayout_p.cpp
index 59ed7acd72..c10763d065 100644
--- a/src/widgets/graphicsview/qgraphicslayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicslayout_p.cpp
@@ -97,7 +97,7 @@ void QGraphicsLayoutPrivate::getMargin(qreal *result, qreal userMargin, QStyle::
*result = 0.0;
if (QGraphicsItem *layoutParentItem = parentItem()) {
if (layoutParentItem->isWidget())
- *result = (qreal)static_cast<QGraphicsWidget*>(layoutParentItem)->style()->pixelMetric(pm, 0);
+ *result = (qreal)static_cast<QGraphicsWidget*>(layoutParentItem)->style()->pixelMetric(pm, nullptr);
}
}
}
diff --git a/src/widgets/graphicsview/qgraphicslayoutitem.cpp b/src/widgets/graphicsview/qgraphicslayoutitem.cpp
index 1192bad51e..8694dcb36b 100644
--- a/src/widgets/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/widgets/graphicsview/qgraphicslayoutitem.cpp
@@ -105,7 +105,7 @@ static void normalizeHints(qreal &minimum, qreal &preferred, qreal &maximum, qre
\internal
*/
QGraphicsLayoutItemPrivate::QGraphicsLayoutItemPrivate(QGraphicsLayoutItem *par, bool layout)
- : parent(par), userSizeHints(0), isLayout(layout), ownedByLayout(false), graphicsItem(0)
+ : parent(par), userSizeHints(nullptr), isLayout(layout), ownedByLayout(false), graphicsItem(nullptr)
{
}
diff --git a/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp b/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
index da2510a8cb..2f1526cc78 100644
--- a/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
+++ b/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
QGraphicsLayoutStyleInfo::QGraphicsLayoutStyleInfo(const QGraphicsLayoutPrivate *layout)
- : m_layout(layout), m_style(0)
+ : m_layout(layout), m_style(nullptr)
{
m_widget.reset(new QWidget); // pixelMetric might need a widget ptr
m_styleOption.initFrom(m_widget.get());
diff --git a/src/widgets/graphicsview/qgraphicslinearlayout.cpp b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
index 8964b3b77a..f76cc61586 100644
--- a/src/widgets/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
@@ -211,7 +211,7 @@ QGraphicsLinearLayout::~QGraphicsLinearLayout()
// ~QGraphicsLayoutItem.
removeAt(i);
if (item) {
- item->setParentLayoutItem(0);
+ item->setParentLayoutItem(nullptr);
if (item->ownedByLayout())
delete item;
}
@@ -280,7 +280,7 @@ void QGraphicsLinearLayout::insertItem(int index, QGraphicsLayoutItem *item)
Q_ASSERT(item);
d->fixIndex(&index);
d->engine.insertRow(index, d->orientation);
- QGraphicsGridLayoutEngineItem *gridEngineItem = new QGraphicsGridLayoutEngineItem(item, d->gridRow(index), d->gridColumn(index), 1, 1, 0);
+ QGraphicsGridLayoutEngineItem *gridEngineItem = new QGraphicsGridLayoutEngineItem(item, d->gridRow(index), d->gridColumn(index), 1, 1, { });
d->engine.insertItem(gridEngineItem, index);
invalidate();
}
@@ -310,7 +310,7 @@ void QGraphicsLinearLayout::removeItem(QGraphicsLayoutItem *item)
{
Q_D(QGraphicsLinearLayout);
if (QGraphicsGridLayoutEngineItem *gridItem = d->engine.findLayoutItem(item)) {
- item->setParentLayoutItem(0);
+ item->setParentLayoutItem(nullptr);
d->removeGridItem(gridItem);
delete gridItem;
invalidate();
@@ -333,7 +333,7 @@ void QGraphicsLinearLayout::removeAt(int index)
if (QGraphicsGridLayoutEngineItem *gridItem = static_cast<QGraphicsGridLayoutEngineItem*>(d->engine.itemAt(index))) {
if (QGraphicsLayoutItem *layoutItem = gridItem->layoutItem())
- layoutItem->setParentLayoutItem(0);
+ layoutItem->setParentLayoutItem(nullptr);
d->removeGridItem(gridItem);
delete gridItem;
invalidate();
@@ -483,9 +483,9 @@ QGraphicsLayoutItem *QGraphicsLinearLayout::itemAt(int index) const
Q_D(const QGraphicsLinearLayout);
if (index < 0 || index >= d->engine.itemCount()) {
qWarning("QGraphicsLinearLayout::itemAt: invalid index %d", index);
- return 0;
+ return nullptr;
}
- QGraphicsLayoutItem *item = 0;
+ QGraphicsLayoutItem *item = nullptr;
if (QGraphicsGridLayoutEngineItem *gridItem = static_cast<QGraphicsGridLayoutEngineItem *>(d->engine.itemAt(index)))
item = gridItem->layoutItem();
return item;
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
index 7413a26261..a9a57c57fa 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
@@ -235,7 +235,7 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneHoverEvent
mouseEvent.setPos(event->pos());
mouseEvent.setScreenPos(event->screenPos());
mouseEvent.setButton(Qt::NoButton);
- mouseEvent.setButtons(0);
+ mouseEvent.setButtons({ });
mouseEvent.setModifiers(event->modifiers());
sendWidgetMouseEvent(&mouseEvent);
event->setAccepted(mouseEvent.isAccepted());
@@ -291,7 +291,7 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneMouseEvent
}
if (!lastWidgetUnderMouse) {
- QApplicationPrivate::dispatchEnterLeave(embeddedMouseGrabber ? embeddedMouseGrabber : receiver, 0, event->screenPos());
+ QApplicationPrivate::dispatchEnterLeave(embeddedMouseGrabber ? embeddedMouseGrabber : receiver, nullptr, event->screenPos());
lastWidgetUnderMouse = receiver;
}
@@ -315,10 +315,10 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneMouseEvent
if (q->rect().contains(event->pos()) && q->acceptHoverEvents())
lastWidgetUnderMouse = alienWidget ? alienWidget : widget;
else // released on the frame our outside the item, or doesn't accept hover events.
- lastWidgetUnderMouse = 0;
+ lastWidgetUnderMouse = nullptr;
QApplicationPrivate::dispatchEnterLeave(lastWidgetUnderMouse, embeddedMouseGrabber, event->screenPos());
- embeddedMouseGrabber = 0;
+ embeddedMouseGrabber = nullptr;
#ifndef QT_NO_CURSOR
// ### Restore the cursor, don't override it.
@@ -368,7 +368,7 @@ void QGraphicsProxyWidgetPrivate::removeSubFocusHelper(QWidget *widget, Qt::Focu
QWidget *QGraphicsProxyWidgetPrivate::findFocusChild(QWidget *child, bool next) const
{
if (!widget)
- return 0;
+ return nullptr;
// Run around the focus chain until we find a widget that can take tab focus.
if (!child) {
@@ -376,12 +376,12 @@ QWidget *QGraphicsProxyWidgetPrivate::findFocusChild(QWidget *child, bool next)
} else {
child = next ? child->d_func()->focus_next : child->d_func()->focus_prev;
if ((next && child == widget) || (!next && child == widget->d_func()->focus_prev)) {
- return 0;
+ return nullptr;
}
}
if (!child)
- return 0;
+ return nullptr;
QWidget *oldChild = child;
uint focus_flag = qt_tab_all_widgets() ? Qt::TabFocus : Qt::StrongFocus;
@@ -394,7 +394,7 @@ QWidget *QGraphicsProxyWidgetPrivate::findFocusChild(QWidget *child, bool next)
}
child = next ? child->d_func()->focus_next : child->d_func()->focus_prev;
} while (child != oldChild && !(next && child == widget) && !(!next && child == widget->d_func()->focus_prev));
- return 0;
+ return nullptr;
}
/*!
@@ -405,9 +405,9 @@ void QGraphicsProxyWidgetPrivate::_q_removeWidgetSlot()
Q_Q(QGraphicsProxyWidget);
if (!widget.isNull()) {
if (const auto &extra = widget->d_func()->extra)
- extra->proxyWidget = 0;
+ extra->proxyWidget = nullptr;
}
- widget = 0;
+ widget = nullptr;
delete q;
}
@@ -430,7 +430,7 @@ void QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget()
QRectF widgetGeometry = widget->geometry();
QWidget *parentWidget = widget->parentWidget();
if (widget->isWindow()) {
- QGraphicsProxyWidget *proxyParent = 0;
+ QGraphicsProxyWidget *proxyParent = nullptr;
if (parentWidget && (proxyParent = qobject_cast<QGraphicsProxyWidget *>(q->parentWidget()))) {
// Nested window proxy (e.g., combobox popup), map widget to the
// parent widget's global coordinates, and map that to the parent
@@ -497,7 +497,7 @@ void QGraphicsProxyWidgetPrivate::unembedSubWindow(QWidget *subWin)
if (child->isWidget()) {
if (QGraphicsProxyWidget *proxy = qobject_cast<QGraphicsProxyWidget *>(static_cast<QGraphicsWidget *>(child))) {
if (proxy->widget() == subWin) {
- proxy->setWidget(0);
+ proxy->setWidget(nullptr);
scene->removeItem(proxy);
delete proxy;
return;
@@ -570,8 +570,8 @@ QGraphicsProxyWidget::~QGraphicsProxyWidget()
After this function returns, QGraphicsProxyWidget will keep its state
synchronized with that of \a widget whenever possible.
- If a widget is already embedded by this proxy when this function is
- called, that widget will first be automatically unembedded. Passing 0 for
+ If a widget is already embedded by this proxy when this function is called,
+ that widget will first be automatically unembedded. Passing \nullptr for
the \a widget argument will only unembed the widget, and the ownership of
the currently embedded widget will be passed on to the caller.
Every child widget that are embedded will also be embedded and their proxy
@@ -598,7 +598,7 @@ void QGraphicsProxyWidgetPrivate::setWidget_helper(QWidget *newWidget, bool auto
QObject::disconnect(widget, SIGNAL(destroyed()), q, SLOT(_q_removeWidgetSlot()));
widget->removeEventFilter(q);
widget->setAttribute(Qt::WA_DontShowOnScreen, false);
- widget->d_func()->extra->proxyWidget = 0;
+ widget->d_func()->extra->proxyWidget = nullptr;
resolveFont(inheritedFontResolveMask);
resolvePalette(inheritedPaletteResolveMask);
widget->update();
@@ -1081,7 +1081,7 @@ void QGraphicsProxyWidget::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
return;
QDragLeaveEvent proxyDragLeave;
QCoreApplication::sendEvent(d->dragDropWidget, &proxyDragLeave);
- d->dragDropWidget = 0;
+ d->dragDropWidget = nullptr;
#endif
}
@@ -1143,7 +1143,7 @@ void QGraphicsProxyWidget::dragMoveEvent(QGraphicsSceneDragDropEvent *event)
// Leave the last drag drop item
QDragLeaveEvent dragLeave;
QCoreApplication::sendEvent(d->dragDropWidget, &dragLeave);
- d->dragDropWidget = 0;
+ d->dragDropWidget = nullptr;
}
// Propagate
event->setDropAction(Qt::IgnoreAction);
@@ -1165,7 +1165,7 @@ void QGraphicsProxyWidget::dropEvent(QGraphicsSceneDragDropEvent *event)
QDropEvent dropEvent(widgetPos, event->possibleActions(), event->mimeData(), event->buttons(), event->modifiers());
QCoreApplication::sendEvent(d->dragDropWidget, &dropEvent);
event->setAccepted(dropEvent.isAccepted());
- d->dragDropWidget = 0;
+ d->dragDropWidget = nullptr;
}
#endif
}
@@ -1188,8 +1188,8 @@ void QGraphicsProxyWidget::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Q_D(QGraphicsProxyWidget);
// If hoverMove was compressed away, make sure we update properly here.
if (d->lastWidgetUnderMouse) {
- QApplicationPrivate::dispatchEnterLeave(0, d->lastWidgetUnderMouse, event->screenPos());
- d->lastWidgetUnderMouse = 0;
+ QApplicationPrivate::dispatchEnterLeave(nullptr, d->lastWidgetUnderMouse, event->screenPos());
+ d->lastWidgetUnderMouse = nullptr;
}
}
@@ -1205,13 +1205,13 @@ void QGraphicsProxyWidget::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
// Ignore events on the window frame.
if (!d->widget || !rect().contains(event->pos())) {
if (d->lastWidgetUnderMouse) {
- QApplicationPrivate::dispatchEnterLeave(0, d->lastWidgetUnderMouse, event->screenPos());
- d->lastWidgetUnderMouse = 0;
+ QApplicationPrivate::dispatchEnterLeave(nullptr, d->lastWidgetUnderMouse, event->screenPos());
+ d->lastWidgetUnderMouse = nullptr;
}
return;
}
- d->embeddedMouseGrabber = 0;
+ d->embeddedMouseGrabber = nullptr;
d->sendWidgetMouseEvent(event);
}
@@ -1230,7 +1230,7 @@ void QGraphicsProxyWidget::ungrabMouseEvent(QEvent *event)
{
Q_D(QGraphicsProxyWidget);
Q_UNUSED(event);
- d->embeddedMouseGrabber = 0;
+ d->embeddedMouseGrabber = nullptr;
}
/*!
@@ -1372,12 +1372,12 @@ void QGraphicsProxyWidget::focusInEvent(QFocusEvent *event)
switch (event->reason()) {
case Qt::TabFocusReason: {
- if (QWidget *focusChild = d->findFocusChild(0, true))
+ if (QWidget *focusChild = d->findFocusChild(nullptr, true))
focusChild->setFocus(event->reason());
break;
}
case Qt::BacktabFocusReason:
- if (QWidget *focusChild = d->findFocusChild(0, false))
+ if (QWidget *focusChild = d->findFocusChild(nullptr, false))
focusChild->setFocus(event->reason());
break;
default:
@@ -1441,17 +1441,17 @@ QVariant QGraphicsProxyWidget::inputMethodQuery(Qt::InputMethodQuery query) cons
focusWidget = d->widget;
QVariant v = focusWidget->inputMethodQuery(query);
QPointF focusWidgetPos = subWidgetRect(focusWidget).topLeft();
- switch (v.type()) {
- case QVariant::RectF:
+ switch (v.userType()) {
+ case QMetaType::QRectF:
v = v.toRectF().translated(focusWidgetPos);
break;
- case QVariant::PointF:
+ case QMetaType::QPointF:
v = v.toPointF() + focusWidgetPos;
break;
- case QVariant::Rect:
+ case QMetaType::QRect:
v = v.toRect().translated(focusWidgetPos.toPoint());
break;
- case QVariant::Point:
+ case QMetaType::QPoint:
v = v.toPoint() + focusWidgetPos.toPoint();
break;
default:
@@ -1578,16 +1578,16 @@ QGraphicsProxyWidget *QGraphicsProxyWidget::createProxyForChildWidget(QWidget *c
return proxy;
if (!child->parentWidget()) {
qWarning("QGraphicsProxyWidget::createProxyForChildWidget: top-level widget not in a QGraphicsScene");
- return 0;
+ return nullptr;
}
QGraphicsProxyWidget *parentProxy = createProxyForChildWidget(child->parentWidget());
if (!parentProxy)
- return 0;
+ return nullptr;
if (!QMetaObject::invokeMethod(parentProxy, "newProxyWidget", Qt::DirectConnection,
Q_RETURN_ARG(QGraphicsProxyWidget*, proxy), Q_ARG(const QWidget*, child)))
- return 0;
+ return nullptr;
proxy->setParent(parentProxy);
proxy->setWidget(child);
return proxy;
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index a47d0d879d..bbcceb1ce6 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -231,7 +231,6 @@
#include <QtWidgets/qgraphicslayout.h>
#include <QtWidgets/qgraphicsproxywidget.h>
#include <QtWidgets/qgraphicswidget.h>
-#include <QtGui/qmatrix.h>
#include <QtGui/qpaintengine.h>
#include <QtGui/qpainter.h>
#include <QtGui/qpixmapcache.h>
@@ -278,7 +277,7 @@ static void _q_hoverFromMouseEvent(QGraphicsSceneHoverEvent *hover, const QGraph
*/
QGraphicsScenePrivate::QGraphicsScenePrivate()
: indexMethod(QGraphicsScene::BspTreeIndex),
- index(0),
+ index(nullptr),
lastItemCount(0),
hasSceneRect(false),
dirtyGrowingItemsBoundingRect(true),
@@ -301,19 +300,19 @@ QGraphicsScenePrivate::QGraphicsScenePrivate()
minimumRenderSize(0.0),
selectionChanging(0),
rectAdjust(2),
- focusItem(0),
- lastFocusItem(0),
- passiveFocusItem(0),
- tabFocusFirst(0),
- activePanel(0),
- lastActivePanel(0),
+ focusItem(nullptr),
+ lastFocusItem(nullptr),
+ passiveFocusItem(nullptr),
+ tabFocusFirst(nullptr),
+ activePanel(nullptr),
+ lastActivePanel(nullptr),
activationRefCount(0),
childExplicitActivation(0),
- lastMouseGrabberItem(0),
- dragDropItem(0),
- enterWidget(0),
+ lastMouseGrabberItem(nullptr),
+ dragDropItem(nullptr),
+ enterWidget(nullptr),
lastDropAction(Qt::IgnoreAction),
- style(0)
+ style(nullptr)
{
}
@@ -443,8 +442,8 @@ void QGraphicsScenePrivate::_q_polishItems()
return;
const QVariant booleanTrueVariant(true);
- QGraphicsItem *item = 0;
- QGraphicsItemPrivate *itemd = 0;
+ QGraphicsItem *item = nullptr;
+ QGraphicsItemPrivate *itemd = nullptr;
const int oldUnpolishedCount = unpolishedItems.count();
for (int i = 0; i < oldUnpolishedCount; ++i) {
@@ -602,7 +601,7 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
unregisterScenePosItem(item);
QGraphicsScene *oldScene = item->d_func()->scene;
- item->d_func()->scene = 0;
+ item->d_func()->scene = nullptr;
//We need to remove all children first because they might use their parent
//attributes (e.g. sceneTransform).
@@ -614,7 +613,7 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
if (!item->d_ptr->inDestructor && !item->parentItem() && item->isWidget()) {
QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);
- widget->d_func()->fixFocusChainBeforeReparenting(0, oldScene, 0);
+ widget->d_func()->fixFocusChainBeforeReparenting(nullptr, oldScene, nullptr);
}
// Unregister focus proxy.
@@ -625,7 +624,7 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
if (parentItem->scene()) {
Q_ASSERT_X(parentItem->scene() == q, "QGraphicsScene::removeItem",
"Parent item's scene is different from this item's scene");
- item->setParentItem(0);
+ item->setParentItem(nullptr);
}
} else {
unregisterTopLevelItem(item);
@@ -633,17 +632,17 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
// Reset the mouse grabber and focus item data.
if (item == focusItem)
- focusItem = 0;
+ focusItem = nullptr;
if (item == lastFocusItem)
- lastFocusItem = 0;
+ lastFocusItem = nullptr;
if (item == passiveFocusItem)
- passiveFocusItem = 0;
+ passiveFocusItem = nullptr;
if (item == activePanel) {
// ### deactivate...
- activePanel = 0;
+ activePanel = nullptr;
}
if (item == lastActivePanel)
- lastActivePanel = 0;
+ lastActivePanel = nullptr;
// Change tabFocusFirst to the next widget in focus chain if removing the current one.
if (item == tabFocusFirst) {
@@ -651,7 +650,7 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
if (wd->focusNext && wd->focusNext != tabFocusFirst && wd->focusNext->scene() == q)
tabFocusFirst = wd->focusNext;
else
- tabFocusFirst = 0;
+ tabFocusFirst = nullptr;
}
// Cancel active touches
@@ -705,11 +704,11 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
// Reset the last mouse grabber item
if (item == lastMouseGrabberItem)
- lastMouseGrabberItem = 0;
+ lastMouseGrabberItem = nullptr;
// Reset the current drop item
if (item == dragDropItem)
- dragDropItem = 0;
+ dragDropItem = nullptr;
// Reenable selectionChanged() for individual items
--selectionChanging;
@@ -752,8 +751,8 @@ void QGraphicsScenePrivate::setActivePanelHelper(QGraphicsItem *item, bool durin
q->setFocus(Qt::ActiveWindowFocusReason);
// Find the item's panel.
- QGraphicsItem *panel = item ? item->panel() : 0;
- lastActivePanel = panel ? activePanel : 0;
+ QGraphicsItem *panel = item ? item->panel() : nullptr;
+ lastActivePanel = panel ? activePanel : nullptr;
if (panel == activePanel || (!q->isActive() && !duringActivationEvent))
return;
@@ -764,7 +763,7 @@ void QGraphicsScenePrivate::setActivePanelHelper(QGraphicsItem *item, bool durin
if (QGraphicsItem *fi = activePanel->focusItem()) {
// Remove focus from the current focus item.
if (fi == q->focusItem())
- setFocusItemHelper(0, Qt::ActiveWindowFocusReason, /* emitFocusChanged = */ false);
+ setFocusItemHelper(nullptr, Qt::ActiveWindowFocusReason, /* emitFocusChanged = */ false);
}
QEvent event(QEvent::WindowDeactivate);
@@ -841,7 +840,7 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
// accept input focus.
if (item && (!(item->flags() & QGraphicsItem::ItemIsFocusable)
|| !item->isVisible() || !item->isEnabled())) {
- item = 0;
+ item = nullptr;
}
// Set focus on the scene if an item requests focus.
@@ -849,7 +848,7 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
q->setFocus(focusReason);
if (item == focusItem) {
if (emitFocusChanged)
- emit q->focusItemChanged(focusItem, (QGraphicsItem *)0, focusReason);
+ emit q->focusItemChanged(focusItem, (QGraphicsItem *)nullptr, focusReason);
return;
}
}
@@ -869,7 +868,7 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
}
#endif //QT_NO_IM
- focusItem = 0;
+ focusItem = nullptr;
QFocusEvent event(QEvent::FocusOut, focusReason);
sendEvent(lastFocusItem, &event);
}
@@ -877,7 +876,7 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
// This handles the case that the item has been removed from the
// scene in response to the FocusOut event.
if (item && item->scene() != q)
- item = 0;
+ item = nullptr;
if (item)
focusItem = item;
@@ -1039,7 +1038,7 @@ void QGraphicsScenePrivate::clearMouseGrabber()
{
if (!mouseGrabberItems.isEmpty())
mouseGrabberItems.first()->ungrabMouse();
- lastMouseGrabberItem = 0;
+ lastMouseGrabberItem = nullptr;
}
/*!
@@ -1365,10 +1364,10 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou
// Update window activation.
QGraphicsItem *topItem = cachedItemsUnderMouse.value(0);
- QGraphicsWidget *newActiveWindow = topItem ? topItem->window() : 0;
+ QGraphicsWidget *newActiveWindow = topItem ? topItem->window() : nullptr;
if (newActiveWindow && newActiveWindow->isBlockedByModalPanel(&topItem)) {
// pass activation to the blocking modal window
- newActiveWindow = topItem ? topItem->window() : 0;
+ newActiveWindow = topItem ? topItem->window() : nullptr;
}
if (newActiveWindow != q->activeWindow())
@@ -1409,7 +1408,7 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou
// If nobody could take focus, clear it.
if (!stickyFocus && !setFocus && !sceneModality)
- q->setFocusItem(0, Qt::MouseFocusReason);
+ q->setFocusItem(nullptr, Qt::MouseFocusReason);
// Any item will do.
if (sceneModality && cachedItemsUnderMouse.isEmpty())
@@ -1694,7 +1693,7 @@ QGraphicsScene::~QGraphicsScene()
// Remove this scene from all associated views.
for (int j = 0; j < d->views.size(); ++j)
- d->views.at(j)->setScene(0);
+ d->views.at(j)->setScene(nullptr);
}
/*!
@@ -2432,7 +2431,7 @@ QGraphicsItemGroup *QGraphicsScene::createItemGroup(const QList<QGraphicsItem *>
}
// Find the common ancestor for all items
- QGraphicsItem *commonAncestor = 0;
+ QGraphicsItem *commonAncestor = nullptr;
if (!ancestors.isEmpty()) {
while (n < items.size()) {
int commonIndex = -1;
@@ -2446,7 +2445,7 @@ QGraphicsItemGroup *QGraphicsScene::createItemGroup(const QList<QGraphicsItem *>
} while ((parent = parent->parentItem()));
if (commonIndex == -1) {
- commonAncestor = 0;
+ commonAncestor = nullptr;
break;
}
@@ -2545,7 +2544,7 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
// from this scene.
if (QGraphicsItem *itemParent = item->d_ptr->parent) {
if (itemParent->d_ptr->scene != this)
- item->setParentItem(0);
+ item->setParentItem(nullptr);
}
// Add the item to this scene
@@ -2568,8 +2567,16 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
++d->selectionChanging;
int oldSelectedItemSize = d->selectedItems.size();
- // Enable mouse tracking if the item accepts hover events or has a cursor set.
- if (d->allItemsIgnoreHoverEvents && d->itemAcceptsHoverEvents_helper(item)) {
+ // Enable mouse tracking if we haven't already done so, and the item needs it.
+ // We cannot use itemAcceptsHoverEvents_helper() here, since we need to enable
+ // mouse tracking also if this item is temporarily blocked by a modal panel.
+
+ auto needsMouseTracking = [](const QGraphicsItemPrivate *item) {
+ return item->acceptsHover
+ || (item->isWidget && static_cast<const QGraphicsWidgetPrivate *>(item)->hasDecoration());
+ };
+
+ if (d->allItemsIgnoreHoverEvents && needsMouseTracking(item->d_ptr.data())) {
d->allItemsIgnoreHoverEvents = false;
d->enableMouseTrackingOnViews();
}
@@ -2903,7 +2910,7 @@ QGraphicsSimpleTextItem *QGraphicsScene::addSimpleText(const QString &text, cons
*/
QGraphicsProxyWidget *QGraphicsScene::addWidget(QWidget *widget, Qt::WindowFlags wFlags)
{
- QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(0, wFlags);
+ QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(nullptr, wFlags);
proxy->setWidget(widget);
addItem(proxy);
return proxy;
@@ -2936,7 +2943,7 @@ void QGraphicsScene::removeItem(QGraphicsItem *item)
const QVariant newSceneVariant(item->itemChange(QGraphicsItem::ItemSceneChange,
QVariant::fromValue<QGraphicsScene *>(0)));
QGraphicsScene *targetScene = qvariant_cast<QGraphicsScene *>(newSceneVariant);
- if (targetScene != 0 && targetScene != this) {
+ if (targetScene != nullptr && targetScene != this) {
targetScene->addItem(item);
return;
}
@@ -3038,7 +3045,7 @@ void QGraphicsScene::clearFocus()
if (d->hasFocus) {
d->hasFocus = false;
d->passiveFocusItem = d->focusItem;
- setFocusItem(0, Qt::OtherFocusReason);
+ setFocusItem(nullptr, Qt::OtherFocusReason);
}
}
@@ -3182,13 +3189,13 @@ QVariant QGraphicsScene::inputMethodQuery(Qt::InputMethodQuery query) const
return QVariant();
const QTransform matrix = d->focusItem->sceneTransform();
QVariant value = d->focusItem->inputMethodQuery(query);
- if (value.type() == QVariant::RectF)
+ if (value.userType() == QMetaType::QRectF)
value = matrix.mapRect(value.toRectF());
- else if (value.type() == QVariant::PointF)
+ else if (value.userType() == QMetaType::QPointF)
value = matrix.map(value.toPointF());
- else if (value.type() == QVariant::Rect)
+ else if (value.userType() == QMetaType::QRect)
value = matrix.mapRect(value.toRect());
- else if (value.type() == QVariant::Point)
+ else if (value.userType() == QMetaType::QPoint)
value = matrix.map(value.toPoint());
return value;
}
@@ -3484,7 +3491,7 @@ bool QGraphicsScene::event(QEvent *event)
// Deactivate the active panel (but keep it so we can
// reactivate it later).
QGraphicsItem *lastActivePanel = d->activePanel;
- d->setActivePanelHelper(0, true);
+ d->setActivePanelHelper(nullptr, true);
d->lastActivePanel = lastActivePanel;
} else {
// Activate all toplevel items.
@@ -3613,7 +3620,7 @@ void QGraphicsScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMen
void QGraphicsScene::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
{
Q_D(QGraphicsScene);
- d->dragDropItem = 0;
+ d->dragDropItem = nullptr;
d->lastDropAction = Qt::IgnoreAction;
event->accept();
}
@@ -3697,7 +3704,7 @@ void QGraphicsScene::dragMoveEvent(QGraphicsSceneDragDropEvent *event)
QGraphicsSceneDragDropEvent dragLeave(QEvent::GraphicsSceneDragLeave);
d->cloneDragDropEvent(&dragLeave, event);
d->sendDragDropEvent(d->dragDropItem, &dragLeave);
- d->dragDropItem = 0;
+ d->dragDropItem = nullptr;
}
// Propagate
event->setDropAction(Qt::IgnoreAction);
@@ -3717,7 +3724,7 @@ void QGraphicsScene::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
if (d->dragDropItem) {
// Leave the last drag drop item
d->sendDragDropEvent(d->dragDropItem, event);
- d->dragDropItem = 0;
+ d->dragDropItem = nullptr;
}
}
@@ -3735,7 +3742,7 @@ void QGraphicsScene::dropEvent(QGraphicsSceneDragDropEvent *event)
if (d->dragDropItem) {
// Drop on the last drag drop item
d->sendDragDropEvent(d->dragDropItem, event);
- d->dragDropItem = 0;
+ d->dragDropItem = nullptr;
}
}
@@ -3785,7 +3792,7 @@ void QGraphicsScene::focusOutEvent(QFocusEvent *focusEvent)
Q_D(QGraphicsScene);
d->hasFocus = false;
d->passiveFocusItem = d->focusItem;
- setFocusItem(0, focusEvent->reason());
+ setFocusItem(nullptr, focusEvent->reason());
// Remove all popups when the scene loses focus.
if (!d->popupWidgets.isEmpty())
@@ -3817,7 +3824,7 @@ void QGraphicsScene::helpEvent(QGraphicsSceneHelpEvent *helpEvent)
QList<QGraphicsItem *> itemsAtPos = d->itemsAtPosition(helpEvent->screenPos(),
helpEvent->scenePos(),
helpEvent->widget());
- QGraphicsItem *toolTipItem = 0;
+ QGraphicsItem *toolTipItem = nullptr;
for (int i = 0; i < itemsAtPos.size(); ++i) {
QGraphicsItem *tmp = itemsAtPos.at(i);
if (tmp->d_func()->isProxyWidget()) {
@@ -3875,7 +3882,7 @@ bool QGraphicsScenePrivate::dispatchHoverEvent(QGraphicsSceneHoverEvent *hoverEv
hoverEvent->widget());
}
- QGraphicsItem *item = 0;
+ QGraphicsItem *item = nullptr;
for (int i = 0; i < cachedItemsUnderMouse.size(); ++i) {
QGraphicsItem *tmp = cachedItemsUnderMouse.at(i);
if (itemAcceptsHoverEvents_helper(tmp)) {
@@ -3886,13 +3893,13 @@ bool QGraphicsScenePrivate::dispatchHoverEvent(QGraphicsSceneHoverEvent *hoverEv
// Find the common ancestor item for the new topmost hoverItem and the
// last item in the hoverItem list.
- QGraphicsItem *commonAncestorItem = (item && !hoverItems.isEmpty()) ? item->commonAncestorItem(hoverItems.constLast()) : 0;
+ QGraphicsItem *commonAncestorItem = (item && !hoverItems.isEmpty()) ? item->commonAncestorItem(hoverItems.constLast()) : nullptr;
while (commonAncestorItem && !itemAcceptsHoverEvents_helper(commonAncestorItem))
commonAncestorItem = commonAncestorItem->parentItem();
if (commonAncestorItem && commonAncestorItem->panel() != item->panel()) {
// The common ancestor isn't in the same panel as the two hovered
// items.
- commonAncestorItem = 0;
+ commonAncestorItem = nullptr;
}
// Check if the common ancestor item is known.
@@ -4122,7 +4129,7 @@ void QGraphicsScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
if (d->lastMouseGrabberItemHasImplicitMouseGrab)
d->mouseGrabberItems.constLast()->ungrabMouse();
} else {
- d->lastMouseGrabberItem = 0;
+ d->lastMouseGrabberItem = nullptr;
}
// Generate a hoverevent
@@ -4354,7 +4361,7 @@ static void _q_paintIntoCache(QPixmap *pix, QGraphicsItem *item, const QRegion &
pixmapPainter.setWorldTransform(itemToPixmap, true);
// Render.
- _q_paintItem(item, &pixmapPainter, option, 0, false, painterStateProtection);
+ _q_paintItem(item, &pixmapPainter, option, nullptr, false, painterStateProtection);
pixmapPainter.end();
if (!subPix.isNull()) {
@@ -4748,7 +4755,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
return;
QTransform transform(Qt::Uninitialized);
- QTransform *transformPtr = 0;
+ QTransform *transformPtr = nullptr;
bool translateOnlyTransform = false;
#define ENSURE_TRANSFORM_PTR \
if (!transformPtr) { \
@@ -4858,7 +4865,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
item->d_ptr->graphicsEffect->draw(painter);
painter->setWorldTransform(restoreTransform);
- sourced->info = 0;
+ sourced->info = nullptr;
} else
#endif // QT_CONFIG(graphicseffect)
{
@@ -4936,7 +4943,7 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q
Q_ASSERT(!(item->d_ptr->flags & QGraphicsItem::ItemHasNoContents));
Q_ASSERT(transformPtr);
item->d_ptr->initStyleOption(&styleOptionTmp, *transformPtr, exposedRegion
- ? *exposedRegion : QRegion(), exposedRegion == 0);
+ ? *exposedRegion : QRegion(), exposedRegion == nullptr);
const bool itemClipsToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsToShape;
bool restorePainterClip = false;
@@ -5322,7 +5329,7 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
if (itemClipsChildrenToShape) {
// Reset updateClip.
for (int i = 0; i < views.size(); ++i)
- views.at(i)->d_func()->setUpdateClip(0);
+ views.at(i)->d_func()->setUpdateClip(nullptr);
}
} else if (wasDirtyParentSceneTransform) {
item->d_ptr->invalidateChildrenSceneTransform();
@@ -5378,7 +5385,7 @@ void QGraphicsScene::drawItems(QPainter *painter,
// Determine view, expose and flags.
QGraphicsView *view = widget ? qobject_cast<QGraphicsView *>(widget->parentWidget()) : 0;
- QRegion *expose = 0;
+ QRegion *expose = nullptr;
const quint32 oldRectAdjust = d->rectAdjust;
if (view) {
d->updateAll = false;
@@ -5462,7 +5469,7 @@ bool QGraphicsScene::focusNextPrevChild(bool next)
}
// The item must be a widget.
- QGraphicsWidget *widget = 0;
+ QGraphicsWidget *widget = nullptr;
if (!item) {
widget = next ? d->tabFocusFirst : d->tabFocusFirst->d_func()->focusPrev;
} else {
@@ -5478,7 +5485,7 @@ bool QGraphicsScene::focusNextPrevChild(bool next)
// Run around the focus chain until we find a widget that can take tab focus.
do {
if (widget->flags() & QGraphicsItem::ItemIsFocusable
- && widget->isEnabled() && widget->isVisibleTo(0)
+ && widget->isEnabled() && widget->isVisibleTo(nullptr)
&& (widget->focusPolicy() & Qt::TabFocus)
&& (!item || !item->isPanel() || item->isAncestorOf(widget))
) {
@@ -5763,7 +5770,7 @@ void QGraphicsScene::setActiveWindow(QGraphicsWidget *widget)
}
// Activate the widget's panel (all windows are panels).
- QGraphicsItem *panel = widget ? widget->panel() : 0;
+ QGraphicsItem *panel = widget ? widget->panel() : nullptr;
setActivePanel(panel);
// Raise
@@ -5945,7 +5952,7 @@ void QGraphicsScenePrivate::touchEventHandler(QTouchEvent *sceneTouchEvent)
const QTouchEvent::TouchPoint &touchPoint = sceneTouchEvent->touchPoints().at(i);
// update state
- QGraphicsItem *item = 0;
+ QGraphicsItem *item = nullptr;
if (touchPoint.state() == Qt::TouchPointPressed) {
if (sceneTouchEvent->device()->type() == QTouchDevice::TouchPad) {
// on touch-pad devices, send all touch points to the same item
@@ -6103,7 +6110,7 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve
// If nobody could take focus, clear it.
if (!stickyFocus && !setFocus)
- q->setFocusItem(0, Qt::MouseFocusReason);
+ q->setFocusItem(nullptr, Qt::MouseFocusReason);
}
bool res = false;
@@ -6117,7 +6124,7 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve
eventAccepted = touchEvent->isAccepted();
if (itemForTouchPointId.value(touchEvent->touchPoints().first().id()) == 0) {
// item was deleted
- item = 0;
+ item = nullptr;
} else {
item->d_ptr->acceptedTouchBeginEvent = (res && eventAccepted);
}
@@ -6251,7 +6258,7 @@ void QGraphicsScenePrivate::gestureTargetsAtHotSpots(const QSet<QGesture *> &ges
if (!gesture->hasHotSpot())
continue;
const Qt::GestureType gestureType = gesture->gestureType();
- QList<QGraphicsItem *> items = itemsAtPosition(QPoint(), gesture->d_func()->sceneHotSpot, 0);
+ QList<QGraphicsItem *> items = itemsAtPosition(QPoint(), gesture->d_func()->sceneHotSpot, nullptr);
for (int j = 0; j < items.size(); ++j) {
QGraphicsItem *item = items.at(j);
@@ -6323,7 +6330,7 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event)
if (!startedGestures.isEmpty()) {
QSet<QGesture *> normalGestures; // that have just one target
QSet<QGesture *> conflictedGestures; // that have multiple possible targets
- gestureTargetsAtHotSpots(startedGestures, Qt::GestureFlag(0), &cachedItemGestures, 0,
+ gestureTargetsAtHotSpots(startedGestures, Qt::GestureFlag(0), &cachedItemGestures, nullptr,
&normalGestures, &conflictedGestures);
cachedTargetItems = cachedItemGestures.keys();
std::sort(cachedTargetItems.begin(), cachedTargetItems.end(), qt_closestItemFirst);
@@ -6497,7 +6504,7 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event)
}
gestureTargetsAtHotSpots(ignoredGestures, Qt::ReceivePartialGestures,
- &cachedItemGestures, &targetsSet, 0, 0);
+ &cachedItemGestures, &targetsSet, nullptr, nullptr);
cachedTargetItems = targetsSet.values();
std::sort(cachedTargetItems.begin(), cachedTargetItems.end(), qt_closestItemFirst);
@@ -6537,7 +6544,7 @@ void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original)
{
Q_ASSERT(original);
QGraphicsItem *originalItem = gestureTargets.value(original);
- if (originalItem == 0) // we only act on accepted gestures, which implies it has a target.
+ if (originalItem == nullptr) // we only act on accepted gestures, which implies it has a target.
return;
// iterate over all active gestures and for each find the owner
@@ -6560,13 +6567,13 @@ void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original)
QSet<QGesture *> almostCanceledGestures = canceledGestures;
QSet<QGesture *>::Iterator setIter;
while (!almostCanceledGestures.isEmpty()) {
- QGraphicsObject *target = 0;
+ QGraphicsObject *target = nullptr;
QSet<QGesture*> gestures;
setIter = almostCanceledGestures.begin();
// sort per target item
while (setIter != almostCanceledGestures.end()) {
QGraphicsObject *item = gestureTargets.value(*setIter);
- if (target == 0)
+ if (target == nullptr)
target = item;
if (target == item) {
gestures << *setIter;
@@ -6590,7 +6597,7 @@ void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original)
if (!g->hasHotSpot())
continue;
- QList<QGraphicsItem *> items = itemsAtPosition(QPoint(), g->d_func()->sceneHotSpot, 0);
+ QList<QGraphicsItem *> items = itemsAtPosition(QPoint(), g->d_func()->sceneHotSpot, nullptr);
for (int j = 0; j < items.size(); ++j) {
QGraphicsObject *item = items.at(j)->toGraphicsObject();
if (!item)
diff --git a/src/widgets/graphicsview/qgraphicsscene.h b/src/widgets/graphicsview/qgraphicsscene.h
index d36a871533..3ba9bddc32 100644
--- a/src/widgets/graphicsview/qgraphicsscene.h
+++ b/src/widgets/graphicsview/qgraphicsscene.h
@@ -47,7 +47,6 @@
#include <QtGui/qbrush.h>
#include <QtGui/qfont.h>
#include <QtGui/qtransform.h>
-#include <QtGui/qmatrix.h>
#include <QtGui/qpen.h>
QT_REQUIRE_CONFIG(graphicsview);
diff --git a/src/widgets/graphicsview/qgraphicssceneevent.cpp b/src/widgets/graphicsview/qgraphicssceneevent.cpp
index 5077a39d67..048ea6dc7d 100644
--- a/src/widgets/graphicsview/qgraphicssceneevent.cpp
+++ b/src/widgets/graphicsview/qgraphicssceneevent.cpp
@@ -278,8 +278,8 @@ class QGraphicsSceneEventPrivate
{
public:
inline QGraphicsSceneEventPrivate()
- : widget(0),
- q_ptr(0)
+ : widget(nullptr),
+ q_ptr(nullptr)
{ }
inline virtual ~QGraphicsSceneEventPrivate()
@@ -344,8 +344,7 @@ class QGraphicsSceneMouseEventPrivate : public QGraphicsSceneEventPrivate
Q_DECLARE_PUBLIC(QGraphicsSceneMouseEvent)
public:
inline QGraphicsSceneMouseEventPrivate()
- : button(Qt::NoButton),
- buttons(0), modifiers(0), source(Qt::MouseEventNotSynthesized), flags(0)
+ : button(Qt::NoButton), source(Qt::MouseEventNotSynthesized)
{ }
QPointF pos;
@@ -691,17 +690,15 @@ class QGraphicsSceneWheelEventPrivate : public QGraphicsSceneEventPrivate
{
Q_DECLARE_PUBLIC(QGraphicsSceneWheelEvent)
public:
- inline QGraphicsSceneWheelEventPrivate()
- : buttons(0), modifiers(0), delta(0), orientation(Qt::Horizontal)
- { }
+ inline QGraphicsSceneWheelEventPrivate() = default;
QPointF pos;
QPointF scenePos;
QPoint screenPos;
Qt::MouseButtons buttons;
Qt::KeyboardModifiers modifiers;
- int delta;
- Qt::Orientation orientation;
+ int delta = 0;
+ Qt::Orientation orientation = Qt::Horizontal;
};
/*!
@@ -872,15 +869,13 @@ class QGraphicsSceneContextMenuEventPrivate : public QGraphicsSceneEventPrivate
{
Q_DECLARE_PUBLIC(QGraphicsSceneContextMenuEvent)
public:
- inline QGraphicsSceneContextMenuEventPrivate()
- : modifiers(0), reason(QGraphicsSceneContextMenuEvent::Other)
- { }
+ inline QGraphicsSceneContextMenuEventPrivate() = default;
QPointF pos;
QPointF scenePos;
QPoint screenPos;
Qt::KeyboardModifiers modifiers;
- QGraphicsSceneContextMenuEvent::Reason reason;
+ QGraphicsSceneContextMenuEvent::Reason reason = QGraphicsSceneContextMenuEvent::Other;
};
/*!
@@ -1295,7 +1290,7 @@ class QGraphicsSceneDragDropEventPrivate : public QGraphicsSceneEventPrivate
Q_DECLARE_PUBLIC(QGraphicsSceneDragDropEvent)
public:
inline QGraphicsSceneDragDropEventPrivate()
- : source(0), mimeData(0)
+ : source(nullptr), mimeData(nullptr)
{ }
QPointF pos;
diff --git a/src/widgets/graphicsview/qgraphicstransform.cpp b/src/widgets/graphicsview/qgraphicstransform.cpp
index 0f0d9aaddc..fa763de05d 100644
--- a/src/widgets/graphicsview/qgraphicstransform.cpp
+++ b/src/widgets/graphicsview/qgraphicstransform.cpp
@@ -112,7 +112,7 @@ void QGraphicsTransformPrivate::setItem(QGraphicsItem *i)
Q_ASSERT(d_ptr->transformData);
d_ptr->transformData->graphicsTransforms.removeAll(q);
d_ptr->dirtySceneTransform = 1;
- item = 0;
+ item = nullptr;
}
item = i;
@@ -138,7 +138,7 @@ QGraphicsTransform::QGraphicsTransform(QObject *parent)
QGraphicsTransform::~QGraphicsTransform()
{
Q_D(QGraphicsTransform);
- d->setItem(0);
+ d->setItem(nullptr);
}
/*!
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index 57be850829..686b41960a 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -348,22 +348,21 @@ QGraphicsViewPrivate::QGraphicsViewPrivate()
hasUpdateClip(false),
mousePressButton(Qt::NoButton),
leftIndent(0), topIndent(0),
- lastMouseEvent(QEvent::None, QPointF(), QPointF(), QPointF(), Qt::NoButton, 0, 0),
+ lastMouseEvent(QEvent::None, QPointF(), QPointF(), QPointF(), Qt::NoButton, { }, { }),
alignment(Qt::AlignCenter),
transformationAnchor(QGraphicsView::AnchorViewCenter), resizeAnchor(QGraphicsView::NoAnchor),
viewportUpdateMode(QGraphicsView::MinimalViewportUpdate),
- optimizationFlags(0),
- scene(0),
+ scene(nullptr),
#if QT_CONFIG(rubberband)
rubberBanding(false),
rubberBandSelectionMode(Qt::IntersectsItemShape),
rubberBandSelectionOperation(Qt::ReplaceSelection),
#endif
- handScrollMotions(0), cacheMode(0),
+ handScrollMotions(0),
#ifndef QT_NO_CURSOR
hasStoredOriginalCursor(false),
#endif
- lastDragDropEvent(0),
+ lastDragDropEvent(nullptr),
updateSceneSlotReimplementedChecked(false)
{
styleOptions.reserve(QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS);
@@ -385,7 +384,7 @@ void QGraphicsViewPrivate::recalculateContentSize()
int height = maxSize.height();
QRectF viewRect = matrix.mapRect(q->sceneRect());
- bool frameOnlyAround = (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, 0, q));
+ bool frameOnlyAround = (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, nullptr, q));
if (frameOnlyAround) {
if (hbarpolicy == Qt::ScrollBarAlwaysOn)
height -= frameWidth * 2;
@@ -395,7 +394,7 @@ void QGraphicsViewPrivate::recalculateContentSize()
// Adjust the maximum width and height of the viewport based on the width
// of visible scroll bars.
- int scrollBarExtent = q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q);
+ int scrollBarExtent = q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, nullptr, q);
if (frameOnlyAround)
scrollBarExtent += frameWidth * 2;
@@ -964,7 +963,7 @@ static inline void QRect_unite(QRect *rect, const QRect &other)
/*
Calling this function results in update rects being clipped to the item's
bounding rect. Note that updates prior to this function call is not clipped.
- The clip is removed by passing 0.
+ The clip is removed by passing \nullptr.
*/
void QGraphicsViewPrivate::setUpdateClip(QGraphicsItem *item)
{
@@ -1163,19 +1162,19 @@ QList<QGraphicsItem *> QGraphicsViewPrivate::findItems(const QRegion &exposedReg
void QGraphicsViewPrivate::updateInputMethodSensitivity()
{
Q_Q(QGraphicsView);
- QGraphicsItem *focusItem = 0;
+ QGraphicsItem *focusItem = nullptr;
bool enabled = scene && (focusItem = scene->focusItem())
&& (focusItem->d_ptr->flags & QGraphicsItem::ItemAcceptsInputMethod);
q->setAttribute(Qt::WA_InputMethodEnabled, enabled);
q->viewport()->setAttribute(Qt::WA_InputMethodEnabled, enabled);
if (!enabled) {
- q->setInputMethodHints(0);
+ q->setInputMethodHints({ });
return;
}
QGraphicsProxyWidget *proxy = focusItem->d_ptr->isWidget && focusItem->d_ptr->isProxyWidget()
- ? static_cast<QGraphicsProxyWidget *>(focusItem) : 0;
+ ? static_cast<QGraphicsProxyWidget *>(focusItem) : nullptr;
if (!proxy) {
q->setInputMethodHints(focusItem->inputMethodHints());
} else if (QWidget *widget = proxy->widget()) {
@@ -1183,7 +1182,7 @@ void QGraphicsViewPrivate::updateInputMethodSensitivity()
widget = fw;
q->setInputMethodHints(widget->inputMethodHints());
} else {
- q->setInputMethodHints(0);
+ q->setInputMethodHints({ });
}
}
@@ -1193,7 +1192,7 @@ void QGraphicsViewPrivate::updateInputMethodSensitivity()
QGraphicsView::QGraphicsView(QWidget *parent)
: QAbstractScrollArea(*new QGraphicsViewPrivate, parent)
{
- setViewport(0);
+ setViewport(nullptr);
setAcceptDrops(true);
setBackgroundRole(QPalette::Base);
// Investigate leaving these disabled by default.
@@ -1209,7 +1208,7 @@ QGraphicsView::QGraphicsView(QGraphicsScene *scene, QWidget *parent)
: QAbstractScrollArea(*new QGraphicsViewPrivate, parent)
{
setScene(scene);
- setViewport(0);
+ setViewport(nullptr);
setAcceptDrops(true);
setBackgroundRole(QPalette::Base);
// Investigate leaving these disabled by default.
@@ -1223,7 +1222,7 @@ QGraphicsView::QGraphicsView(QGraphicsScene *scene, QWidget *parent)
QGraphicsView::QGraphicsView(QGraphicsViewPrivate &dd, QWidget *parent)
: QAbstractScrollArea(dd, parent)
{
- setViewport(0);
+ setViewport(nullptr);
setAcceptDrops(true);
setBackgroundRole(QPalette::Base);
// Investigate leaving these disabled by default.
@@ -1796,7 +1795,13 @@ void QGraphicsView::setSceneRect(const QRectF &rect)
d->recalculateContentSize();
}
+#if QT_DEPRECATED_SINCE(5, 15)
+
/*!
+ \obsolete
+
+ Use transform() instead.
+
Returns the current transformation matrix for the view. If no current
transformation is set, the identity matrix is returned.
@@ -1809,6 +1814,10 @@ QMatrix QGraphicsView::matrix() const
}
/*!
+ \obsolete
+
+ Use setTransform() instead.
+
Sets the view's current transformation matrix to \a matrix.
If \a combine is true, then \a matrix is combined with the current matrix;
@@ -1840,6 +1849,10 @@ void QGraphicsView::setMatrix(const QMatrix &matrix, bool combine)
}
/*!
+ \obsolete
+
+ Use resetTransform() instead.
+
Resets the view transformation matrix to the identity matrix.
\sa resetTransform()
@@ -1849,6 +1862,8 @@ void QGraphicsView::resetMatrix()
resetTransform();
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
/*!
Rotates the current view transformation \a angle degrees clockwise.
@@ -2375,7 +2390,7 @@ QGraphicsItem *QGraphicsView::itemAt(const QPoint &pos) const
{
Q_D(const QGraphicsView);
if (!d->scene)
- return 0;
+ return nullptr;
const QList<QGraphicsItem *> itemsAtPos = items(pos);
return itemsAtPos.isEmpty() ? 0 : itemsAtPos.first();
}
@@ -2590,13 +2605,13 @@ QVariant QGraphicsView::inputMethodQuery(Qt::InputMethodQuery query) const
return QVariant();
QVariant value = d->scene->inputMethodQuery(query);
- if (value.type() == QVariant::RectF)
+ if (value.userType() == QMetaType::QRectF)
value = d->mapRectFromScene(value.toRectF());
- else if (value.type() == QVariant::PointF)
+ else if (value.userType() == QMetaType::QPointF)
value = mapFromScene(value.toPointF());
- else if (value.type() == QVariant::Rect)
+ else if (value.userType() == QMetaType::QRect)
value = d->mapRectFromScene(value.toRect()).toRect();
- else if (value.type() == QVariant::Point)
+ else if (value.userType() == QMetaType::QPoint)
value = mapFromScene(value.toPoint());
return value;
}
@@ -2889,7 +2904,7 @@ bool QGraphicsView::viewportEvent(QEvent *event)
}
d->useLastMouseEvent = false;
// a hack to pass a viewport pointer to the scene inside the leave event
- Q_ASSERT(event->d == 0);
+ Q_ASSERT(event->d == nullptr);
QScopedValueRollback<QEventPrivate *> rb(event->d);
event->d = reinterpret_cast<QEventPrivate *>(viewport());
QCoreApplication::sendEvent(d->scene, event);
@@ -3020,7 +3035,7 @@ void QGraphicsView::dropEvent(QDropEvent *event)
event->setDropAction(sceneEvent.dropAction());
delete d->lastDragDropEvent;
- d->lastDragDropEvent = 0;
+ d->lastDragDropEvent = nullptr;
}
/*!
@@ -3078,7 +3093,7 @@ void QGraphicsView::dragLeaveEvent(QDragLeaveEvent *event)
sceneEvent.setWidget(d->lastDragDropEvent->widget());
sceneEvent.setSource(d->lastDragDropEvent->source());
delete d->lastDragDropEvent;
- d->lastDragDropEvent = 0;
+ d->lastDragDropEvent = nullptr;
// Send it to the scene.
QCoreApplication::sendEvent(d->scene, &sceneEvent);
@@ -3526,7 +3541,7 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
d->scene->d_func()->rectAdjust = 1;
else
d->scene->d_func()->rectAdjust = 2;
- d->scene->d_func()->drawItems(&painter, viewTransformed ? &viewTransform : 0,
+ d->scene->d_func()->drawItems(&painter, viewTransformed ? &viewTransform : nullptr,
&d->exposedRegion, viewport());
d->scene->d_func()->rectAdjust = oldRectAdjust;
// Make sure the painter's world transform is restored correctly when
@@ -3795,7 +3810,7 @@ void QGraphicsView::drawItems(QPainter *painter, int numItems,
{
Q_D(QGraphicsView);
if (d->scene) {
- QWidget *widget = painter->device() == viewport() ? viewport() : 0;
+ QWidget *widget = painter->device() == viewport() ? viewport() : nullptr;
d->scene->drawItems(painter, numItems, items, options, widget);
}
}
diff --git a/src/widgets/graphicsview/qgraphicsview.h b/src/widgets/graphicsview/qgraphicsview.h
index 1389796c3f..e98ec52d8f 100644
--- a/src/widgets/graphicsview/qgraphicsview.h
+++ b/src/widgets/graphicsview/qgraphicsview.h
@@ -165,9 +165,11 @@ public:
void setSceneRect(const QRectF &rect);
inline void setSceneRect(qreal x, qreal y, qreal w, qreal h);
- QMatrix matrix() const;
- void setMatrix(const QMatrix &matrix, bool combine = false);
- void resetMatrix();
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use transform()") QMatrix matrix() const;
+ QT_DEPRECATED_X("Use setTransform()") void setMatrix(const QMatrix &matrix, bool combine = false);
+ QT_DEPRECATED_X("Use resetTransform()") void resetMatrix();
+#endif // QT_DEPRECATED_SINCE(5, 15)
QTransform transform() const;
QTransform viewportTransform() const;
bool isTransformed() const;
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp
index cf041b9817..1035ed3575 100644
--- a/src/widgets/graphicsview/qgraphicswidget.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget.cpp
@@ -172,7 +172,7 @@ QT_BEGIN_NAMESPACE
window, a tool, a popup, etc).
*/
QGraphicsWidget::QGraphicsWidget(QGraphicsItem *parent, Qt::WindowFlags wFlags)
- : QGraphicsObject(*new QGraphicsWidgetPrivate, 0), QGraphicsLayoutItem(0, false)
+ : QGraphicsObject(*new QGraphicsWidgetPrivate, nullptr), QGraphicsLayoutItem(nullptr, false)
{
Q_D(QGraphicsWidget);
d->init(parent, wFlags);
@@ -184,7 +184,7 @@ QGraphicsWidget::QGraphicsWidget(QGraphicsItem *parent, Qt::WindowFlags wFlags)
Constructs a new QGraphicsWidget, using \a dd as parent.
*/
QGraphicsWidget::QGraphicsWidget(QGraphicsWidgetPrivate &dd, QGraphicsItem *parent, Qt::WindowFlags wFlags)
- : QGraphicsObject(dd, 0), QGraphicsLayoutItem(0, false)
+ : QGraphicsObject(dd, nullptr), QGraphicsLayoutItem(nullptr, false)
{
Q_D(QGraphicsWidget);
d->init(parent, wFlags);
@@ -241,7 +241,7 @@ QGraphicsWidget::~QGraphicsWidget()
if (QGraphicsScene *scn = scene()) {
QGraphicsScenePrivate *sceneD = scn->d_func();
if (sceneD->tabFocusFirst == this)
- sceneD->tabFocusFirst = (d->focusNext == this ? 0 : d->focusNext);
+ sceneD->tabFocusFirst = (d->focusNext == this ? nullptr : d->focusNext);
}
d->focusPrev->d_func()->focusNext = d->focusNext;
d->focusNext->d_func()->focusPrev = d->focusPrev;
@@ -263,15 +263,15 @@ QGraphicsWidget::~QGraphicsWidget()
if (item->isWidget()) {
QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);
if (widget->parentLayoutItem() == d->layout)
- widget->setParentLayoutItem(0);
+ widget->setParentLayoutItem(nullptr);
}
}
- d->layout = 0;
+ d->layout = nullptr;
delete temp;
}
// Remove this graphics widget from widgetStyles
- widgetStyles()->setStyleForWidget(this, 0);
+ widgetStyles()->setStyleForWidget(this, nullptr);
// Unset the parent here, when we're still a QGraphicsWidget.
// It is otherwise done in ~QGraphicsItem() where we'd be
@@ -942,7 +942,7 @@ QStyle *QGraphicsWidget::style() const
*/
void QGraphicsWidget::setStyle(QStyle *style)
{
- setAttribute(Qt::WA_SetStyle, style != 0);
+ setAttribute(Qt::WA_SetStyle, style != nullptr);
widgetStyles()->setStyleForWidget(this, style);
// Deliver StyleChange to the widget itself (doesn't propagate).
@@ -1557,7 +1557,7 @@ bool QGraphicsWidget::focusNextPrevChild(bool next)
{
Q_D(QGraphicsWidget);
// Let the parent's focusNextPrevChild implementation decide what to do.
- QGraphicsWidget *parent = 0;
+ QGraphicsWidget *parent = nullptr;
if (!isWindow() && (parent = parentWidget()))
return parent->focusNextPrevChild(next);
if (!d->scene)
@@ -1995,7 +1995,7 @@ void QGraphicsWidget::setShortcutAutoRepeat(int id, bool enabled)
*/
void QGraphicsWidget::addAction(QAction *action)
{
- insertAction(0, action);
+ insertAction(nullptr, action);
}
/*!
@@ -2012,7 +2012,7 @@ void QGraphicsWidget::addActions(QList<QAction *> actions)
#endif
{
for (int i = 0; i < actions.count(); ++i)
- insertAction(0, actions.at(i));
+ insertAction(nullptr, actions.at(i));
}
/*!
@@ -2041,7 +2041,7 @@ void QGraphicsWidget::insertAction(QAction *before, QAction *action)
int pos = d->actions.indexOf(before);
if (pos < 0) {
- before = 0;
+ before = nullptr;
pos = d->actions.size();
}
d->actions.insert(pos, action);
@@ -2346,7 +2346,7 @@ void QGraphicsWidget::paintWindowFrame(QPainter *painter, const QStyleOptionGrap
frameOptions.palette.setCurrentColorGroup(isActive ? QPalette::Active : QPalette::Normal);
frameOptions.rect = windowFrameRect;
- frameOptions.lineWidth = style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, widget);
+ frameOptions.lineWidth = style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, nullptr, widget);
frameOptions.midLineWidth = 1;
style()->drawPrimitive(QStyle::PE_FrameWindow, &frameOptions, painter, widget);
diff --git a/src/widgets/graphicsview/qgraphicswidget_p.cpp b/src/widgets/graphicsview/qgraphicswidget_p.cpp
index 0156faf8e4..e6f39d6803 100644
--- a/src/widgets/graphicsview/qgraphicswidget_p.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget_p.cpp
@@ -322,7 +322,7 @@ void QGraphicsWidgetPrivate::initStyleOptionTitleBar(QStyleOptionTitleBar *optio
option->titleBarState = Qt::WindowNoState;
}
QFont windowTitleFont = QApplication::font("QMdiSubWindowTitleBar");
- QRect textRect = q->style()->subControlRect(QStyle::CC_TitleBar, option, QStyle::SC_TitleBarLabel, 0);
+ QRect textRect = q->style()->subControlRect(QStyle::CC_TitleBar, option, QStyle::SC_TitleBarLabel, nullptr);
option->text = QFontMetrics(windowTitleFont).elidedText(
windowData->windowTitle, Qt::ElideRight, textRect.width());
}
@@ -690,7 +690,7 @@ void QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(QGraphicsSceneHoverEvent
break;
case Qt::TitleBarArea:
windowData->buttonRect = q->style()->subControlRect(
- QStyle::CC_TitleBar, &bar, QStyle::SC_TitleBarCloseButton, 0);
+ QStyle::CC_TitleBar, &bar, QStyle::SC_TitleBarCloseButton, nullptr);
if (windowData->buttonRect.contains(pos.toPoint()))
windowData->buttonMouseOver = true;
event->ignore();
@@ -707,7 +707,7 @@ void QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(QGraphicsSceneHoverEvent
Q_UNUSED(cursorShape);
#endif
// update buttons if we hover over them
- windowData->hoveredSubControl = q->style()->hitTestComplexControl(QStyle::CC_TitleBar, &bar, pos.toPoint(), 0);
+ windowData->hoveredSubControl = q->style()->hitTestComplexControl(QStyle::CC_TitleBar, &bar, pos.toPoint(), nullptr);
if (windowData->hoveredSubControl != QStyle::SC_TitleBarCloseButton)
windowData->hoveredSubControl = QStyle::SC_TitleBarLabel;
@@ -781,7 +781,7 @@ void QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting(QGraphicsWidget *new
if (!parent && oldScene && oldScene != newScene && oldScene->d_func()->tabFocusFirst == q) {
// detach from old scene's top level focus chain.
- oldScene->d_func()->tabFocusFirst = (focusAfter != q) ? focusAfter : 0;
+ oldScene->d_func()->tabFocusFirst = (focusAfter != q) ? focusAfter : nullptr;
}
// detach from current focus chain; skip this widget subtree.
diff --git a/src/widgets/graphicsview/qsimplex_p.cpp b/src/widgets/graphicsview/qsimplex_p.cpp
index e18f1fa4c4..38c2df5fc6 100644
--- a/src/widgets/graphicsview/qsimplex_p.cpp
+++ b/src/widgets/graphicsview/qsimplex_p.cpp
@@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE
/*!
\internal
*/
-QSimplex::QSimplex() : objective(0), rows(0), columns(0), firstArtificial(0), matrix(0)
+QSimplex::QSimplex() : objective(nullptr), rows(0), columns(0), firstArtificial(0), matrix(nullptr)
{
}
@@ -93,7 +93,7 @@ QSimplex::~QSimplex()
*/
void QSimplex::clearDataStructures()
{
- if (matrix == 0)
+ if (matrix == nullptr)
return;
// Matrix
@@ -101,7 +101,7 @@ void QSimplex::clearDataStructures()
columns = 0;
firstArtificial = 0;
free(matrix);
- matrix = 0;
+ matrix = nullptr;
// Constraints
for (int i = 0; i < constraints.size(); ++i) {
@@ -113,7 +113,7 @@ void QSimplex::clearDataStructures()
// Other
variables.clear();
- objective = 0;
+ objective = nullptr;
}
/*!
@@ -195,7 +195,7 @@ bool QSimplex::setConstraints(const QList<QSimplexConstraint *> &newConstraints)
QSimplexVariable *artificial;
Q_ASSERT(constraints[i]->helper.first == 0);
- Q_ASSERT(constraints[i]->artificial == 0);
+ Q_ASSERT(constraints[i]->artificial == nullptr);
switch(constraints[i]->ratio) {
case QSimplexConstraint::LessOrEqual:
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
index 31dde8832b..c5b22b5667 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp
@@ -255,7 +255,7 @@ QWidget *QAbstractItemDelegate::createEditor(QWidget *,
const QStyleOptionViewItem &,
const QModelIndex &) const
{
- return 0;
+ return nullptr;
}
@@ -387,44 +387,46 @@ bool QAbstractItemDelegate::helpEvent(QHelpEvent *event,
const QStyleOptionViewItem &option,
const QModelIndex &index)
{
- Q_D(QAbstractItemDelegate);
- Q_UNUSED(d);
- Q_UNUSED(index);
- Q_UNUSED(option);
-
if (!event || !view)
return false;
+ Q_D(QAbstractItemDelegate);
switch (event->type()) {
#ifndef QT_NO_TOOLTIP
case QEvent::ToolTip: {
QHelpEvent *he = static_cast<QHelpEvent*>(event);
const int precision = inherits("QItemDelegate") ? 10 : 6; // keep in sync with DBL_DIG in qitemdelegate.cpp
- const QString tooltip = d->textForRole(Qt::ToolTipRole, index.data(Qt::ToolTipRole), option.locale, precision);
- if (!tooltip.isEmpty()) {
- QToolTip::showText(he->globalPos(), tooltip, view);
- return true;
+ const QString tooltip = index.isValid() ?
+ d->textForRole(Qt::ToolTipRole, index.data(Qt::ToolTipRole), option.locale, precision) :
+ QString();
+ QRect rect;
+ if (index.isValid()) {
+ const QRect r = view->visualRect(index);
+ rect = QRect(view->mapToGlobal(r.topLeft()), r.size());
+ }
+ QToolTip::showText(he->globalPos(), tooltip, view, rect);
+ event->setAccepted(!tooltip.isEmpty());
+ break;
}
- break;}
#endif
#if QT_CONFIG(whatsthis)
- case QEvent::QueryWhatsThis: {
- if (index.data(Qt::WhatsThisRole).isValid())
- return true;
- break; }
+ case QEvent::QueryWhatsThis:
+ event->setAccepted(index.data(Qt::WhatsThisRole).isValid());
+ break;
case QEvent::WhatsThis: {
QHelpEvent *he = static_cast<QHelpEvent*>(event);
const int precision = inherits("QItemDelegate") ? 10 : 6; // keep in sync with DBL_DIG in qitemdelegate.cpp
- const QString whatsthis = d->textForRole(Qt::WhatsThisRole, index.data(Qt::WhatsThisRole), option.locale, precision);
- if (!whatsthis.isEmpty()) {
- QWhatsThis::showText(he->globalPos(), whatsthis, view);
- return true;
+ const QString whatsthis = index.isValid() ?
+ d->textForRole(Qt::WhatsThisRole, index.data(Qt::WhatsThisRole), option.locale, precision) :
+ QString();
+ QWhatsThis::showText(he->globalPos(), whatsthis, view);
+ event->setAccepted(!whatsthis.isEmpty());
+ break;
}
- break ; }
#endif
default:
break;
}
- return false;
+ return event->isAccepted();
}
/*!
@@ -583,27 +585,27 @@ QString QAbstractItemDelegatePrivate::textForRole(Qt::ItemDataRole role, const Q
case QMetaType::Float:
text = locale.toString(value.toFloat());
break;
- case QVariant::Double:
+ case QMetaType::Double:
text = locale.toString(value.toDouble(), 'g', precision);
break;
- case QVariant::Int:
- case QVariant::LongLong:
+ case QMetaType::Int:
+ case QMetaType::LongLong:
text = locale.toString(value.toLongLong());
break;
- case QVariant::UInt:
- case QVariant::ULongLong:
+ case QMetaType::UInt:
+ case QMetaType::ULongLong:
text = locale.toString(value.toULongLong());
break;
- case QVariant::Date:
+ case QMetaType::QDate:
text = locale.toString(value.toDate(), formatType);
break;
- case QVariant::Time:
+ case QMetaType::QTime:
text = locale.toString(value.toTime(), formatType);
break;
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
text = locale.toString(value.toDateTime(), formatType);
break;
- case QVariant::Type(QMetaType::QJsonValue): {
+ case QMetaType::QJsonValue: {
const QJsonValue val = value.toJsonValue();
if (val.isBool()) {
text = QVariant(val.toBool()).toString();
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index b07faf8be4..2524d4acfa 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -77,13 +77,13 @@ QT_BEGIN_NAMESPACE
QAbstractItemViewPrivate::QAbstractItemViewPrivate()
: model(QAbstractItemModelPrivate::staticEmptyModel()),
- itemDelegate(0),
- selectionModel(0),
+ itemDelegate(nullptr),
+ selectionModel(nullptr),
ctrlDragSelectionFlag(QItemSelectionModel::NoUpdate),
noSelectionOnMousePress(false),
selectionMode(QAbstractItemView::ExtendedSelection),
selectionBehavior(QAbstractItemView::SelectItems),
- currentlyCommittingEditor(0),
+ currentlyCommittingEditor(nullptr),
pressedModifiers(Qt::NoModifier),
pressedPosition(QPoint(-1, -1)),
pressedAlreadySelected(false),
@@ -145,8 +145,8 @@ void QAbstractItemViewPrivate::init()
q->setAttribute(Qt::WA_InputMethodEnabled);
- verticalScrollMode = static_cast<QAbstractItemView::ScrollMode>(q->style()->styleHint(QStyle::SH_ItemView_ScrollMode, 0, q, 0));
- horizontalScrollMode = static_cast<QAbstractItemView::ScrollMode>(q->style()->styleHint(QStyle::SH_ItemView_ScrollMode, 0, q, 0));
+ verticalScrollMode = static_cast<QAbstractItemView::ScrollMode>(q->style()->styleHint(QStyle::SH_ItemView_ScrollMode, nullptr, q, nullptr));
+ horizontalScrollMode = static_cast<QAbstractItemView::ScrollMode>(q->style()->styleHint(QStyle::SH_ItemView_ScrollMode, nullptr, q, nullptr));
}
void QAbstractItemViewPrivate::setHoverIndex(const QPersistentModelIndex &index)
@@ -757,7 +757,7 @@ void QAbstractItemView::setModel(QAbstractItemModel *model)
QAbstractItemModel *QAbstractItemView::model() const
{
Q_D(const QAbstractItemView);
- return (d->model == QAbstractItemModelPrivate::staticEmptyModel() ? 0 : d->model);
+ return (d->model == QAbstractItemModelPrivate::staticEmptyModel() ? nullptr : d->model);
}
/*!
@@ -915,7 +915,7 @@ QVariant QAbstractItemView::inputMethodQuery(Qt::InputMethodQuery query) const
void QAbstractItemView::setItemDelegateForRow(int row, QAbstractItemDelegate *delegate)
{
Q_D(QAbstractItemView);
- if (QAbstractItemDelegate *rowDelegate = d->rowDelegates.value(row, 0)) {
+ if (QAbstractItemDelegate *rowDelegate = d->rowDelegates.value(row, nullptr)) {
if (d->delegateRefCount(rowDelegate) == 1) {
disconnect(rowDelegate, SIGNAL(closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint)),
this, SLOT(closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint)));
@@ -949,7 +949,7 @@ void QAbstractItemView::setItemDelegateForRow(int row, QAbstractItemDelegate *de
QAbstractItemDelegate *QAbstractItemView::itemDelegateForRow(int row) const
{
Q_D(const QAbstractItemView);
- return d->rowDelegates.value(row, 0);
+ return d->rowDelegates.value(row, nullptr);
}
/*!
@@ -975,7 +975,7 @@ QAbstractItemDelegate *QAbstractItemView::itemDelegateForRow(int row) const
void QAbstractItemView::setItemDelegateForColumn(int column, QAbstractItemDelegate *delegate)
{
Q_D(QAbstractItemView);
- if (QAbstractItemDelegate *columnDelegate = d->columnDelegates.value(column, 0)) {
+ if (QAbstractItemDelegate *columnDelegate = d->columnDelegates.value(column, nullptr)) {
if (d->delegateRefCount(columnDelegate) == 1) {
disconnect(columnDelegate, SIGNAL(closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint)),
this, SLOT(closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint)));
@@ -1009,7 +1009,7 @@ void QAbstractItemView::setItemDelegateForColumn(int column, QAbstractItemDelega
QAbstractItemDelegate *QAbstractItemView::itemDelegateForColumn(int column) const
{
Q_D(const QAbstractItemView);
- return d->columnDelegates.value(column, 0);
+ return d->columnDelegates.value(column, nullptr);
}
/*!
@@ -1084,7 +1084,7 @@ void QAbstractItemView::setCurrentIndex(const QModelIndex &index)
{
Q_D(QAbstractItemView);
if (d->selectionModel && (!index.isValid() || d->isIndexEnabled(index))) {
- QItemSelectionModel::SelectionFlags command = selectionCommand(index, 0);
+ QItemSelectionModel::SelectionFlags command = selectionCommand(index, nullptr);
d->selectionModel->setCurrentIndex(index, command);
d->currentIndexSet = true;
if ((command & QItemSelectionModel::Current) == 0)
@@ -1201,7 +1201,7 @@ void QAbstractItemView::edit(const QModelIndex &index)
Q_D(QAbstractItemView);
if (Q_UNLIKELY(!d->isIndexValid(index)))
qWarning("edit: index was invalid");
- if (Q_UNLIKELY(!edit(index, AllEditTriggers, 0)))
+ if (Q_UNLIKELY(!edit(index, AllEditTriggers, nullptr)))
qWarning("edit: editing failed");
}
@@ -1286,7 +1286,7 @@ QAbstractItemView::ScrollMode QAbstractItemView::verticalScrollMode() const
void QAbstractItemView::resetVerticalScrollMode()
{
- auto sm = static_cast<ScrollMode>(style()->styleHint(QStyle::SH_ItemView_ScrollMode, 0, this, 0));
+ auto sm = static_cast<ScrollMode>(style()->styleHint(QStyle::SH_ItemView_ScrollMode, nullptr, this, nullptr));
setVerticalScrollMode(sm);
d_func()->verticalScrollModeSet = false;
}
@@ -1323,7 +1323,7 @@ QAbstractItemView::ScrollMode QAbstractItemView::horizontalScrollMode() const
void QAbstractItemView::resetHorizontalScrollMode()
{
- auto sm = static_cast<ScrollMode>(style()->styleHint(QStyle::SH_ItemView_ScrollMode, 0, this, 0));
+ auto sm = static_cast<ScrollMode>(style()->styleHint(QStyle::SH_ItemView_ScrollMode, nullptr, this, nullptr));
setHorizontalScrollMode(sm);
d_func()->horizontalScrollModeSet = false;
}
@@ -1964,7 +1964,7 @@ void QAbstractItemView::mouseDoubleClickEvent(QMouseEvent *event)
QPersistentModelIndex persistent = index;
emit doubleClicked(persistent);
if ((event->button() == Qt::LeftButton) && !edit(persistent, DoubleClicked, event)
- && !style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, 0, this))
+ && !style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, nullptr, this))
emit activated(persistent);
d->pressedIndex = QModelIndex();
}
@@ -2339,7 +2339,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
QVariant variant;
if (d->model)
variant = d->model->data(currentIndex(), Qt::DisplayRole);
- if (variant.type() == QVariant::String)
+ if (variant.userType() == QMetaType::QString)
QGuiApplication::clipboard()->setText(variant.toString());
event->accept();
}
@@ -2388,7 +2388,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
setFocus();
QItemSelectionModel::SelectionFlags command = selectionCommand(newCurrent, event);
if (command != QItemSelectionModel::NoUpdate
- || style()->styleHint(QStyle::SH_ItemView_MovementWithoutUpdatingSelection, 0, this)) {
+ || style()->styleHint(QStyle::SH_ItemView_MovementWithoutUpdatingSelection, nullptr, this)) {
// note that we don't check if the new current index is enabled because moveCursor() makes sure it is
if (command & QItemSelectionModel::Current) {
d->selectionModel->setCurrentIndex(newCurrent, QItemSelectionModel::NoUpdate);
@@ -2654,7 +2654,7 @@ bool QAbstractItemView::edit(const QModelIndex &index, EditTrigger trigger, QEve
if (!d->isIndexValid(index))
return false;
- if (QWidget *w = (d->persistent.isEmpty() ? static_cast<QWidget*>(0) : d->editorForIndex(index).widget.data())) {
+ if (QWidget *w = (d->persistent.isEmpty() ? static_cast<QWidget*>(nullptr) : d->editorForIndex(index).widget.data())) {
if (w->focusPolicy() == Qt::NoFocus)
return false;
w->setFocus();
@@ -2692,7 +2692,7 @@ bool QAbstractItemView::edit(const QModelIndex &index, EditTrigger trigger, QEve
if (trigger == SelectedClicked)
d->delayedEditing.start(QApplication::doubleClickInterval(), this);
else
- d->openEditor(index, d->shouldForwardEvent(trigger, event) ? event : 0);
+ d->openEditor(index, d->shouldForwardEvent(trigger, event) ? event : nullptr);
return true;
}
@@ -2909,7 +2909,7 @@ void QAbstractItemView::commitData(QWidget *editor)
editor->removeEventFilter(delegate);
delegate->setModelData(editor, d->model, index);
editor->installEventFilter(delegate);
- d->currentlyCommittingEditor = 0;
+ d->currentlyCommittingEditor = nullptr;
}
/*!
@@ -3074,9 +3074,10 @@ void QAbstractItemView::keyboardSearch(const QString &search)
QSize QAbstractItemView::sizeHintForIndex(const QModelIndex &index) const
{
Q_D(const QAbstractItemView);
- if (!d->isIndexValid(index) || !d->itemDelegate)
+ if (!d->isIndexValid(index))
return QSize();
- return d->delegateForIndex(index)->sizeHint(d->viewOptionsV1(), index);
+ const auto delegate = d->delegateForIndex(index);
+ return delegate ? delegate->sizeHint(d->viewOptionsV1(), index) : QSize();
}
/*!
@@ -3260,7 +3261,7 @@ QWidget* QAbstractItemView::indexWidget(const QModelIndex &index) const
if (QWidget *editor = d->editorForIndex(index).widget.data())
return editor;
- return 0;
+ return nullptr;
}
/*!
@@ -3675,7 +3676,7 @@ void QAbstractItemView::currentChanged(const QModelIndex &current, const QModelI
if (d->autoScroll)
scrollTo(current);
update(current);
- edit(current, CurrentChanged, 0);
+ edit(current, CurrentChanged, nullptr);
if (current.row() == (d->model->rowCount(d->root) - 1))
d->fetchMore();
} else {
@@ -3739,7 +3740,7 @@ QStyleOptionViewItem QAbstractItemView::viewOptions() const
if (d->iconSize.isValid()) {
option.decorationSize = d->iconSize;
} else {
- int pm = style()->pixelMetric(QStyle::PM_SmallIconSize, 0, this);
+ int pm = style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, this);
option.decorationSize = QSize(pm, pm);
}
option.decorationPosition = QStyleOptionViewItem::Left;
@@ -3747,7 +3748,7 @@ QStyleOptionViewItem QAbstractItemView::viewOptions() const
option.displayAlignment = Qt::AlignLeft|Qt::AlignVCenter;
option.textElideMode = d->textElideMode;
option.rect = QRect();
- option.showDecorationSelected = style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, 0, this);
+ option.showDecorationSelected = style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, nullptr, this);
if (d->wrapItemText)
option.features = QStyleOptionViewItem::WrapText;
option.locale = locale();
@@ -4233,7 +4234,7 @@ QWidget *QAbstractItemViewPrivate::editor(const QModelIndex &index,
if (!w) {
QAbstractItemDelegate *delegate = delegateForIndex(index);
if (!delegate)
- return 0;
+ return nullptr;
w = delegate->createEditor(viewport, options, index);
if (w) {
w->installEventFilter(delegate);
diff --git a/src/widgets/itemviews/qcolumnview.cpp b/src/widgets/itemviews/qcolumnview.cpp
index a4eed2d885..4d0161025c 100644
--- a/src/widgets/itemviews/qcolumnview.cpp
+++ b/src/widgets/itemviews/qcolumnview.cpp
@@ -142,7 +142,7 @@ void QColumnView::setResizeGripsVisible(bool visible)
connect(grip, SIGNAL(gripMoved(int)), this, SLOT(_q_gripMoved(int)));
} else {
QWidget *widget = view->cornerWidget();
- view->setCornerWidget(0);
+ view->setCornerWidget(nullptr);
widget->deleteLater();
}
}
@@ -327,7 +327,7 @@ void QColumnView::scrollTo(const QModelIndex &index, ScrollHint hint)
}
#if QT_CONFIG(animation)
- if (const int animationDuration = style()->styleHint(QStyle::SH_Widget_Animation_Duration, 0, this)) {
+ if (const int animationDuration = style()->styleHint(QStyle::SH_Widget_Animation_Duration, nullptr, this)) {
d->currentAnimation.setDuration(animationDuration);
d->currentAnimation.setEndValue(newScrollbarValue);
d->currentAnimation.start();
@@ -638,7 +638,7 @@ void QColumnViewPrivate::_q_clicked(const QModelIndex &index)
{
Q_Q(QColumnView);
QModelIndex parent = index.parent();
- QAbstractItemView *columnClicked = 0;
+ QAbstractItemView *columnClicked = nullptr;
for (int column = 0; column < columns.count(); ++column) {
if (columns.at(column)->rootIndex() == parent) {
columnClicked = columns[column];
@@ -666,7 +666,7 @@ void QColumnViewPrivate::_q_clicked(const QModelIndex &index)
QAbstractItemView *QColumnViewPrivate::createColumn(const QModelIndex &index, bool show)
{
Q_Q(QColumnView);
- QAbstractItemView *view = 0;
+ QAbstractItemView *view = nullptr;
if (model->hasChildren(index)) {
view = q->createColumn(index);
q->connect(view, SIGNAL(clicked(QModelIndex)),
@@ -1045,8 +1045,8 @@ QColumnViewPrivate::QColumnViewPrivate()
: QAbstractItemViewPrivate()
,showResizeGrips(true)
,offset(0)
-,previewWidget(0)
-,previewColumn(0)
+,previewWidget(nullptr)
+,previewColumn(nullptr)
{
}
diff --git a/src/widgets/itemviews/qcolumnviewgrip.cpp b/src/widgets/itemviews/qcolumnviewgrip.cpp
index 4a4237805f..00cd7df20a 100644
--- a/src/widgets/itemviews/qcolumnviewgrip.cpp
+++ b/src/widgets/itemviews/qcolumnviewgrip.cpp
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
Use setModel() to set the model.
*/
QColumnViewGrip::QColumnViewGrip(QWidget *parent)
-: QWidget(*new QColumnViewGripPrivate, parent, 0)
+ : QWidget(*new QColumnViewGripPrivate, parent, { })
{
#ifndef QT_NO_CURSOR
setCursor(Qt::SplitHCursor);
diff --git a/src/widgets/itemviews/qcolumnviewgrip_p.h b/src/widgets/itemviews/qcolumnviewgrip_p.h
index 4311edbeb4..13e4c764e8 100644
--- a/src/widgets/itemviews/qcolumnviewgrip_p.h
+++ b/src/widgets/itemviews/qcolumnviewgrip_p.h
@@ -73,7 +73,7 @@ public:
int moveGrip(int offset);
protected:
- QColumnViewGrip(QColumnViewGripPrivate &, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
+ QColumnViewGrip(QColumnViewGripPrivate &, QWidget *parent = nullptr, Qt::WindowFlags f = { });
void paintEvent(QPaintEvent *event) override;
void mouseDoubleClickEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
diff --git a/src/widgets/itemviews/qdatawidgetmapper.cpp b/src/widgets/itemviews/qdatawidgetmapper.cpp
index 125ee73194..24039c42f6 100644
--- a/src/widgets/itemviews/qdatawidgetmapper.cpp
+++ b/src/widgets/itemviews/qdatawidgetmapper.cpp
@@ -56,7 +56,7 @@ public:
Q_DECLARE_PUBLIC(QDataWidgetMapper)
QDataWidgetMapperPrivate()
- : model(QAbstractItemModelPrivate::staticEmptyModel()), delegate(0),
+ : model(QAbstractItemModelPrivate::staticEmptyModel()), delegate(nullptr),
orientation(Qt::Horizontal), submitPolicy(QDataWidgetMapper::AutoSubmit)
{
}
@@ -226,7 +226,7 @@ void QDataWidgetMapperPrivate::_q_modelDestroyed()
{
Q_Q(QDataWidgetMapper);
- model = 0;
+ model = nullptr;
q->setModel(QAbstractItemModelPrivate::staticEmptyModel());
}
@@ -374,7 +374,7 @@ QAbstractItemModel *QDataWidgetMapper::model() const
{
Q_D(const QDataWidgetMapper);
return d->model == QAbstractItemModelPrivate::staticEmptyModel()
- ? static_cast<QAbstractItemModel *>(0)
+ ? static_cast<QAbstractItemModel *>(nullptr)
: d->model;
}
@@ -567,7 +567,7 @@ QWidget *QDataWidgetMapper::mappedWidgetAt(int section) const
return e.widget;
}
- return 0;
+ return nullptr;
}
/*!
diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp
index 3dea8bd405..8d1538a213 100644
--- a/src/widgets/itemviews/qdirmodel.cpp
+++ b/src/widgets/itemviews/qdirmodel.cpp
@@ -39,6 +39,8 @@
#include "qdirmodel.h"
+#if QT_DEPRECATED_SINCE(5, 15)
+
#include <qfile.h>
#include <qfilesystemmodel.h>
#include <qurl.h>
@@ -73,7 +75,7 @@ class QDirModelPrivate : public QAbstractItemModelPrivate
public:
struct QDirNode
{
- QDirNode() : parent(0), populated(false), stat(false) {}
+ QDirNode() : parent(nullptr), populated(false), stat(false) {}
QDirNode *parent;
QFileInfo info;
QIcon icon; // cache the icon
@@ -236,7 +238,7 @@ QDirModel::QDirModel(const QStringList &nameFilters,
d->nameFilters = nameFilters.isEmpty() ? QStringList(QLatin1String("*")) : nameFilters;
d->filters = filters;
d->sort = sort;
- d->root.parent = 0;
+ d->root.parent = nullptr;
d->root.info = QFileInfo();
d->clear(&d->root);
}
@@ -291,7 +293,7 @@ QModelIndex QDirModel::index(int row, int column, const QModelIndex &parent) con
if (row >= p->children.count())
return QModelIndex();
// now get the internal pointer for the index
- QDirModelPrivate::QDirNode *n = d->node(row, d->indexValid(parent) ? p : 0);
+ QDirModelPrivate::QDirNode *n = d->node(row, d->indexValid(parent) ? p : nullptr);
Q_ASSERT(n);
return createIndex(row, column, n);
@@ -308,8 +310,8 @@ QModelIndex QDirModel::parent(const QModelIndex &child) const
if (!d->indexValid(child))
return QModelIndex();
QDirModelPrivate::QDirNode *node = d->node(child);
- QDirModelPrivate::QDirNode *par = (node ? node->parent : 0);
- if (par == 0) // parent is the root node
+ QDirModelPrivate::QDirNode *par = (node ? node->parent : nullptr);
+ if (par == nullptr) // parent is the root node
return QModelIndex();
// get the parent's row
@@ -1157,10 +1159,10 @@ void QDirModelPrivate::init()
filters = QDir::AllEntries | QDir::NoDotAndDotDot;
sort = QDir::Name;
nameFilters << QLatin1String("*");
- root.parent = 0;
+ root.parent = nullptr;
root.info = QFileInfo();
clear(&root);
- roleNames.insertMulti(QDirModel::FileIconRole, QByteArrayLiteral("fileIcon")); // == Qt::decoration
+ roleNames.insert(QDirModel::FileIconRole, QByteArrayLiteral("fileIcon")); // == Qt::decoration
roleNames.insert(QDirModel::FilePathRole, QByteArrayLiteral("filePath"));
roleNames.insert(QDirModel::FileNameRole, QByteArrayLiteral("fileName"));
}
@@ -1168,7 +1170,7 @@ void QDirModelPrivate::init()
QDirModelPrivate::QDirNode *QDirModelPrivate::node(int row, QDirNode *parent) const
{
if (row < 0)
- return 0;
+ return nullptr;
bool isDir = !parent || parent->info.isDir();
QDirNode *p = (parent ? parent : &root);
@@ -1177,7 +1179,7 @@ QDirModelPrivate::QDirNode *QDirModelPrivate::node(int row, QDirNode *parent) co
if (Q_UNLIKELY(row >= p->children.count())) {
qWarning("node: the row does not exist");
- return 0;
+ return nullptr;
}
return const_cast<QDirNode*>(&p->children.at(row));
@@ -1188,7 +1190,7 @@ QVector<QDirModelPrivate::QDirNode> QDirModelPrivate::children(QDirNode *parent,
Q_ASSERT(parent);
QFileInfoList infoList;
if (parent == &root) {
- parent = 0;
+ parent = nullptr;
infoList = QDir::drives();
} else if (parent->info.isDir()) {
//resolve directory links only if requested.
@@ -1331,7 +1333,7 @@ void QDirModelPrivate::appendChild(QDirModelPrivate::QDirNode *parent, const QSt
QDirModelPrivate::QDirNode node;
node.populated = false;
node.stat = shouldStat;
- node.parent = (parent == &root ? 0 : parent);
+ node.parent = (parent == &root ? nullptr : parent);
node.info = QFileInfo(path);
node.info.setCaching(true);
@@ -1372,3 +1374,5 @@ QFileInfo QDirModelPrivate::resolvedInfo(QFileInfo info)
QT_END_NAMESPACE
#include "moc_qdirmodel.cpp"
+
+#endif // QT_DEPRECATED_SINCE(5, 15)
diff --git a/src/widgets/itemviews/qdirmodel.h b/src/widgets/itemviews/qdirmodel.h
index ab91bbd763..665a622dbe 100644
--- a/src/widgets/itemviews/qdirmodel.h
+++ b/src/widgets/itemviews/qdirmodel.h
@@ -45,6 +45,8 @@
#include <QtCore/qdir.h>
#include <QtWidgets/qfileiconprovider.h>
+#if QT_DEPRECATED_SINCE(5, 15)
+
QT_REQUIRE_CONFIG(dirmodel);
QT_BEGIN_NAMESPACE
@@ -65,9 +67,10 @@ public:
FileNameRole
};
- QDirModel(const QStringList &nameFilters, QDir::Filters filters,
- QDir::SortFlags sort, QObject *parent = nullptr);
- explicit QDirModel(QObject *parent = nullptr);
+ QT_DEPRECATED_VERSION_X_5_15("Use QFileSystemModel") QDirModel(const QStringList &nameFilters,
+ QDir::Filters filters, QDir::SortFlags sort,
+ QObject *parent = nullptr);
+ QT_DEPRECATED_VERSION_X_5_15("Use QFileSystemModel") explicit QDirModel(QObject *parent = nullptr);
~QDirModel();
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
@@ -144,4 +147,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
#endif // QDIRMODEL_H
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index d7bdf6aa4c..84e2fd72a9 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -1583,7 +1583,7 @@ int QHeaderView::minimumSectionSize() const
Q_D(const QHeaderView);
if (d->minimumSectionSize == -1) {
QSize strut = QApplication::globalStrut();
- int margin = 2 * style()->pixelMetric(QStyle::PM_HeaderMargin, 0, this);
+ int margin = 2 * style()->pixelMetric(QStyle::PM_HeaderMargin, nullptr, this);
if (d->orientation == Qt::Horizontal)
return qMax(strut.width(), (fontMetrics().maxWidth() + margin));
return qMax(strut.height(), (fontMetrics().height() + margin));
@@ -2883,12 +2883,12 @@ void QHeaderView::paintSection(QPainter *painter, const QRect &rect, int logical
opt.text = d->model->headerData(logicalIndex, d->orientation,
Qt::DisplayRole).toString();
- int margin = 2 * style()->pixelMetric(QStyle::PM_HeaderMargin, 0, this);
+ int margin = 2 * style()->pixelMetric(QStyle::PM_HeaderMargin, nullptr, this);
- const Qt::Alignment headerArrowAlignment = static_cast<Qt::Alignment>(style()->styleHint(QStyle::SH_Header_ArrowAlignment, 0, this));
+ const Qt::Alignment headerArrowAlignment = static_cast<Qt::Alignment>(style()->styleHint(QStyle::SH_Header_ArrowAlignment, nullptr, this));
const bool isHeaderArrowOnTheSide = headerArrowAlignment & Qt::AlignVCenter;
if (isSortIndicatorShown() && sortIndicatorSection() == logicalIndex && isHeaderArrowOnTheSide)
- margin += style()->pixelMetric(QStyle::PM_HeaderMarkSize, 0, this);
+ margin += style()->pixelMetric(QStyle::PM_HeaderMarkSize, nullptr, this);
const QVariant variant = d->model->headerData(logicalIndex, d->orientation,
Qt::DecorationRole);
@@ -2896,8 +2896,8 @@ void QHeaderView::paintSection(QPainter *painter, const QRect &rect, int logical
if (opt.icon.isNull())
opt.icon = qvariant_cast<QPixmap>(variant);
if (!opt.icon.isNull()) // see CT_HeaderSection
- margin += style()->pixelMetric(QStyle::PM_SmallIconSize, 0, this) +
- style()->pixelMetric(QStyle::PM_HeaderMargin, 0, this);
+ margin += style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, this) +
+ style()->pixelMetric(QStyle::PM_HeaderMargin, nullptr, this);
if (d->textElideMode != Qt::ElideNone) {
const QRect textRect = style()->subElementRect(QStyle::SE_HeaderLabel, &opt, this);
@@ -3275,7 +3275,7 @@ int QHeaderViewPrivate::sectionHandleAt(int position)
return -1;
int log = logicalIndex(visual);
int pos = q->sectionViewportPosition(log);
- int grip = q->style()->pixelMetric(QStyle::PM_HeaderGripMargin, 0, q);
+ int grip = q->style()->pixelMetric(QStyle::PM_HeaderGripMargin, nullptr, q);
bool atLeft = position < pos + grip;
bool atRight = (position > pos + q->sectionSize(log) - grip);
@@ -3660,7 +3660,7 @@ void QHeaderViewPrivate::flipSortIndicator(int section)
sortOrder = (sortIndicatorOrder == Qt::DescendingOrder) ? Qt::AscendingOrder : Qt::DescendingOrder;
} else {
const QVariant value = model->headerData(section, orientation, Qt::InitialSortOrderRole);
- if (value.canConvert(QVariant::Int))
+ if (value.canConvert(QMetaType::Int))
sortOrder = static_cast<Qt::SortOrder>(value.toInt());
else
sortOrder = Qt::AscendingOrder;
@@ -3814,10 +3814,10 @@ void QHeaderViewPrivate::updateDefaultSectionSizeFromStyle()
{
Q_Q(QHeaderView);
if (orientation == Qt::Horizontal) {
- defaultSectionSize = q->style()->pixelMetric(QStyle::PM_HeaderDefaultSectionSizeHorizontal, 0, q);
+ defaultSectionSize = q->style()->pixelMetric(QStyle::PM_HeaderDefaultSectionSizeHorizontal, nullptr, q);
} else {
defaultSectionSize = qMax(q->minimumSectionSize(),
- q->style()->pixelMetric(QStyle::PM_HeaderDefaultSectionSizeVertical, 0, q));
+ q->style()->pixelMetric(QStyle::PM_HeaderDefaultSectionSizeVertical, nullptr, q));
}
}
diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp
index 460764f1b8..4420d39b8e 100644
--- a/src/widgets/itemviews/qitemdelegate.cpp
+++ b/src/widgets/itemviews/qitemdelegate.cpp
@@ -77,7 +77,7 @@ class QItemDelegatePrivate : public QAbstractItemDelegatePrivate
Q_DECLARE_PUBLIC(QItemDelegate)
public:
- QItemDelegatePrivate() : f(0), clipPainting(true) {}
+ QItemDelegatePrivate() : f(nullptr), clipPainting(true) {}
inline const QItemEditorFactory *editorFactory() const
{ return f ? f : QItemEditorFactory::defaultFactory(); }
@@ -149,7 +149,7 @@ QRect QItemDelegatePrivate::textLayoutBounds(const QStyleOptionViewItem &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;
+ const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, nullptr, w) + 1;
switch (option.decorationPosition) {
case QStyleOptionViewItem::Left:
case QStyleOptionViewItem::Right:
@@ -414,7 +414,7 @@ void QItemDelegate::paint(QPainter *painter,
if (value.isValid()) {
// ### we need the pixmap to call the virtual function
pixmap = decoration(opt, value);
- if (value.type() == QVariant::Icon) {
+ if (value.userType() == QMetaType::QIcon) {
d->tmp.icon = qvariant_cast<QIcon>(value);
d->tmp.mode = d->iconMode(option.state);
d->tmp.state = d->iconState(option.state);
@@ -502,9 +502,9 @@ QWidget *QItemDelegate::createEditor(QWidget *parent,
{
Q_D(const QItemDelegate);
if (!index.isValid())
- return 0;
+ return nullptr;
const QItemEditorFactory *factory = d->f;
- if (factory == 0)
+ if (factory == nullptr)
factory = QItemEditorFactory::defaultFactory();
QWidget *w = factory->createEditor(index.data(Qt::EditRole).userType(), parent);
if (w)
@@ -533,7 +533,7 @@ void QItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) con
if (!n.isEmpty()) {
if (!v.isValid())
- v = QVariant(editor->property(n).userType(), (const void *)0);
+ v = QVariant(editor->property(n).userType(), (const void *)nullptr);
editor->setProperty(n, v);
}
#endif
@@ -586,7 +586,7 @@ void QItemDelegate::updateEditorGeometry(QWidget *editor,
QPixmap pixmap = decoration(option, index.data(Qt::DecorationRole));
QString text = QItemDelegatePrivate::replaceNewLine(index.data(Qt::DisplayRole).toString());
QRect pixmapRect = QRect(QPoint(0, 0), option.decorationSize).intersected(pixmap.rect());
- QRect textRect = textRectangle(0, option.rect, option.font, text);
+ QRect textRect = textRectangle(nullptr, option.rect, option.font, text);
QRect checkRect = doCheck(option, textRect, index.data(Qt::CheckStateRole));
QStyleOptionViewItem opt = option;
opt.showDecorationSelected = true; // let the editor take up all available space
@@ -654,7 +654,7 @@ void QItemDelegate::drawDisplay(QPainter *painter, const QStyleOptionViewItem &o
const QWidget *widget = d->widget(option);
QStyle *style = widget ? widget->style() : QApplication::style();
- const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, widget) + 1;
+ const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, nullptr, widget) + 1;
QRect textRect = rect.adjusted(textMargin, 0, -textMargin, 0); // remove width padding
const bool wrapText = opt.features & QStyleOptionViewItem::WrapText;
d->textOption.setWrapMode(wrapText ? QTextOption::WordWrap : QTextOption::ManualWrap);
@@ -841,7 +841,7 @@ void QItemDelegate::doLayout(const QStyleOptionViewItem &option,
const bool hasText = textRect->isValid();
const bool hasMargin = (hasText | hasPixmap | hasCheck);
const int frameHMargin = hasMargin ?
- style->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, widget) + 1 : 0;
+ style->pixelMetric(QStyle::PM_FocusFrameHMargin, nullptr, widget) + 1 : 0;
const int textMargin = hasText ? frameHMargin : 0;
const int pixmapMargin = hasPixmap ? frameHMargin : 0;
const int checkMargin = hasCheck ? frameHMargin : 0;
@@ -969,12 +969,12 @@ void QItemDelegate::doLayout(const QStyleOptionViewItem &option,
QPixmap QItemDelegate::decoration(const QStyleOptionViewItem &option, const QVariant &variant) const
{
Q_D(const QItemDelegate);
- switch (variant.type()) {
- case QVariant::Icon: {
+ switch (variant.userType()) {
+ case QMetaType::QIcon: {
QIcon::Mode mode = d->iconMode(option.state);
QIcon::State state = d->iconState(option.state);
return qvariant_cast<QIcon>(variant).pixmap(option.decorationSize, mode, state); }
- case QVariant::Color: {
+ case QMetaType::QColor: {
static QPixmap pixmap(option.decorationSize);
pixmap.fill(qvariant_cast<QColor>(variant));
return pixmap; }
@@ -1060,24 +1060,24 @@ QRect QItemDelegate::rect(const QStyleOptionViewItem &option,
if (role == Qt::CheckStateRole)
return doCheck(option, option.rect, value);
if (value.isValid() && !value.isNull()) {
- switch (value.type()) {
- case QVariant::Invalid:
+ switch (value.userType()) {
+ case QMetaType::UnknownType:
break;
- case QVariant::Pixmap: {
+ case QMetaType::QPixmap: {
const QPixmap &pixmap = qvariant_cast<QPixmap>(value);
return QRect(QPoint(0, 0), pixmap.size() / pixmap.devicePixelRatio() ); }
- case QVariant::Image: {
+ case QMetaType::QImage: {
const QImage &image = qvariant_cast<QImage>(value);
return QRect(QPoint(0, 0), image.size() / image.devicePixelRatio() ); }
- case QVariant::Icon: {
+ case QMetaType::QIcon: {
QIcon::Mode mode = d->iconMode(option.state);
QIcon::State state = d->iconState(option.state);
QIcon icon = qvariant_cast<QIcon>(value);
QSize size = icon.actualSize(option.decorationSize, mode, state);
return QRect(QPoint(0, 0), size); }
- case QVariant::Color:
+ case QMetaType::QColor:
return QRect(QPoint(0, 0), option.decorationSize);
- case QVariant::String:
+ case QMetaType::QString:
default: {
const QString text = d->valueToText(value, option);
value = index.data(Qt::FontRole);
@@ -1242,7 +1242,7 @@ QStyleOptionViewItem QItemDelegate::setOptions(const QModelIndex &index,
opt.palette.setBrush(QPalette::Text, qvariant_cast<QBrush>(value));
// disable style animations for checkboxes etc. within itemviews (QTBUG-30146)
- opt.styleObject = 0;
+ opt.styleObject = nullptr;
return opt;
}
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp
index 8ed2ee5f28..fe9b482122 100644
--- a/src/widgets/itemviews/qitemeditorfactory.cpp
+++ b/src/widgets/itemviews/qitemeditorfactory.cpp
@@ -91,7 +91,7 @@ class QUIntSpinBox : public QSpinBox
Q_OBJECT
Q_PROPERTY(uint value READ uintValue WRITE setUIntValue NOTIFY uintValueChanged USER true)
public:
- explicit QUIntSpinBox(QWidget *parent = 0)
+ explicit QUIntSpinBox(QWidget *parent = nullptr)
: QSpinBox(parent)
{
connect(this, SIGNAL(valueChanged(int)), SIGNAL(uintValueChanged()));
@@ -176,7 +176,7 @@ QWidget *QItemEditorFactory::createEditor(int userType, QWidget *parent) const
QItemEditorCreatorBase *creator = creatorMap.value(userType, 0);
if (!creator) {
const QItemEditorFactory *dfactory = defaultFactory();
- return dfactory == this ? 0 : dfactory->createEditor(userType, parent);
+ return dfactory == this ? nullptr : dfactory->createEditor(userType, parent);
}
return creator->createWidget(parent);
}
@@ -241,21 +241,21 @@ QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent)
{
switch (userType) {
#if QT_CONFIG(combobox)
- case QVariant::Bool: {
+ case QMetaType::Bool: {
QBooleanComboBox *cb = new QBooleanComboBox(parent);
cb->setFrame(false);
cb->setSizePolicy(QSizePolicy::Ignored, cb->sizePolicy().verticalPolicy());
return cb; }
#endif
#if QT_CONFIG(spinbox)
- case QVariant::UInt: {
+ case QMetaType::UInt: {
QSpinBox *sb = new QUIntSpinBox(parent);
sb->setFrame(false);
sb->setMinimum(0);
sb->setMaximum(INT_MAX);
sb->setSizePolicy(QSizePolicy::Ignored, sb->sizePolicy().verticalPolicy());
return sb; }
- case QVariant::Int: {
+ case QMetaType::Int: {
QSpinBox *sb = new QSpinBox(parent);
sb->setFrame(false);
sb->setMinimum(INT_MIN);
@@ -264,25 +264,25 @@ QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent)
return sb; }
#endif
#if QT_CONFIG(datetimeedit)
- case QVariant::Date: {
+ case QMetaType::QDate: {
QDateTimeEdit *ed = new QDateEdit(parent);
ed->setFrame(false);
return ed; }
- case QVariant::Time: {
+ case QMetaType::QTime: {
QDateTimeEdit *ed = new QTimeEdit(parent);
ed->setFrame(false);
return ed; }
- case QVariant::DateTime: {
+ case QMetaType::QDateTime: {
QDateTimeEdit *ed = new QDateTimeEdit(parent);
ed->setFrame(false);
return ed; }
#endif
#if QT_CONFIG(label)
- case QVariant::Pixmap:
+ case QMetaType::QPixmap:
return new QLabel(parent);
#endif
#if QT_CONFIG(spinbox)
- case QVariant::Double: {
+ case QMetaType::Double: {
QDoubleSpinBox *sb = new QDoubleSpinBox(parent);
sb->setFrame(false);
sb->setMinimum(-DBL_MAX);
@@ -291,12 +291,12 @@ QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent)
return sb; }
#endif
#if QT_CONFIG(lineedit)
- case QVariant::String:
+ case QMetaType::QString:
default: {
// the default editor is a lineedit
QExpandingLineEdit *le = new QExpandingLineEdit(parent);
- le->setFrame(le->style()->styleHint(QStyle::SH_ItemView_DrawDelegateFrame, 0, le));
- if (!le->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, 0, le))
+ le->setFrame(le->style()->styleHint(QStyle::SH_ItemView_DrawDelegateFrame, nullptr, le));
+ if (!le->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, nullptr, le))
le->setWidgetOwnsGeometry(true);
return le; }
#else
@@ -304,42 +304,42 @@ QWidget *QDefaultItemEditorFactory::createEditor(int userType, QWidget *parent)
break;
#endif
}
- return 0;
+ return nullptr;
}
QByteArray QDefaultItemEditorFactory::valuePropertyName(int userType) const
{
switch (userType) {
#if QT_CONFIG(combobox)
- case QVariant::Bool:
+ case QMetaType::Bool:
return "currentIndex";
#endif
#if QT_CONFIG(spinbox)
- case QVariant::UInt:
- case QVariant::Int:
- case QVariant::Double:
+ case QMetaType::UInt:
+ case QMetaType::Int:
+ case QMetaType::Double:
return "value";
#endif
#if QT_CONFIG(datetimeedit)
- case QVariant::Date:
+ case QMetaType::QDate:
return "date";
- case QVariant::Time:
+ case QMetaType::QTime:
return "time";
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
return "dateTime";
#endif
- case QVariant::String:
+ case QMetaType::QString:
default:
// the default editor is a lineedit
return "text";
}
}
-static QItemEditorFactory *q_default_factory = 0;
+static QItemEditorFactory *q_default_factory = nullptr;
struct QDefaultFactoryCleaner
{
inline QDefaultFactoryCleaner() {}
- ~QDefaultFactoryCleaner() { delete q_default_factory; q_default_factory = 0; }
+ ~QDefaultFactoryCleaner() { delete q_default_factory; q_default_factory = nullptr; }
};
/*!
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index 62fffc17df..ec01922746 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -935,8 +935,8 @@ QStyleOptionViewItem QListView::viewOptions() const
QStyleOptionViewItem option = QAbstractItemView::viewOptions();
if (!d->iconSize.isValid()) { // otherwise it was already set in abstractitemview
int pm = (d->viewMode == QListView::ListMode
- ? style()->pixelMetric(QStyle::PM_ListViewIconSize, 0, this)
- : style()->pixelMetric(QStyle::PM_IconViewIconSize, 0, this));
+ ? style()->pixelMetric(QStyle::PM_ListViewIconSize, nullptr, this)
+ : style()->pixelMetric(QStyle::PM_IconViewIconSize, nullptr, this));
option.decorationSize = QSize(pm, pm);
}
if (d->viewMode == QListView::IconMode) {
@@ -1690,7 +1690,7 @@ bool QListView::event(QEvent *e)
QListViewPrivate::QListViewPrivate()
: QAbstractItemViewPrivate(),
- commonListView(0),
+ commonListView(nullptr),
wrap(false),
space(0),
flow(QListView::TopToBottom),
@@ -1735,10 +1735,10 @@ void QListViewPrivate::prepareItemsLayout()
// Qt::ScrollBarAlwaysOn but scrollbar extent must be deduced if policy
// is Qt::ScrollBarAsNeeded
int verticalMargin = vbarpolicy==Qt::ScrollBarAsNeeded
- ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, vbar) + frameAroundContents
+ ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, nullptr, vbar) + frameAroundContents
: 0;
int horizontalMargin = hbarpolicy==Qt::ScrollBarAsNeeded
- ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, hbar) + frameAroundContents
+ ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, nullptr, hbar) + frameAroundContents
: 0;
layoutBounds.adjust(0, 0, -verticalMargin, -horizontalMargin);
@@ -3074,7 +3074,7 @@ void QIconModeViewBase::doDynamicLayout(const QListViewLayoutInfo &info)
moved.resize(items.count());
QRect rect(QPoint(), topLeft);
- QListViewItem *item = 0;
+ QListViewItem *item = nullptr;
for (int row = info.first; row <= info.last; ++row) {
item = &items[row];
if (isHidden(row)) {
@@ -3180,7 +3180,7 @@ QVector<QModelIndex> QIconModeViewBase::intersectingSet(const QRect &area) const
QVector<QModelIndex> res;
that->interSectingVector = &res;
that->tree.climbTree(area, &QIconModeViewBase::addLeaf, data);
- that->interSectingVector = 0;
+ that->interSectingVector = nullptr;
return res;
}
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index e7dcfac403..c9379f9a8a 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -75,7 +75,7 @@ void QListModel::clear()
for (int i = 0; i < items.count(); ++i) {
if (items.at(i)) {
items.at(i)->d->theid = -1;
- items.at(i)->view = 0;
+ items.at(i)->view = nullptr;
delete items.at(i);
}
}
@@ -96,7 +96,7 @@ void QListModel::remove(QListWidgetItem *item)
Q_ASSERT(row != -1);
beginRemoveRows(QModelIndex(), row, row);
items.at(row)->d->theid = -1;
- items.at(row)->view = 0;
+ items.at(row)->view = nullptr;
items.removeAt(row);
endRemoveRows();
}
@@ -156,11 +156,11 @@ void QListModel::insert(int row, const QStringList &labels)
QListWidgetItem *QListModel::take(int row)
{
if (row < 0 || row >= items.count())
- return 0;
+ return nullptr;
beginRemoveRows(QModelIndex(), row, row);
items.at(row)->d->theid = -1;
- items.at(row)->view = 0;
+ items.at(row)->view = nullptr;
QListWidgetItem *item = items.takeAt(row);
endRemoveRows();
return item;
@@ -263,7 +263,7 @@ bool QListModel::insertRows(int row, int count, const QModelIndex &parent)
beginInsertRows(QModelIndex(), row, row + count - 1);
QListWidget *view = qobject_cast<QListWidget*>(QObject::parent());
- QListWidgetItem *itm = 0;
+ QListWidgetItem *itm = nullptr;
for (int r = row; r < row + count; ++r) {
itm = new QListWidgetItem;
@@ -282,10 +282,10 @@ bool QListModel::removeRows(int row, int count, const QModelIndex &parent)
return false;
beginRemoveRows(QModelIndex(), row, row + count - 1);
- QListWidgetItem *itm = 0;
+ QListWidgetItem *itm = nullptr;
for (int r = row; r < row + count; ++r) {
itm = items.takeAt(row);
- itm->view = 0;
+ itm->view = nullptr;
itm->d->theid = -1;
delete itm;
}
@@ -301,16 +301,23 @@ bool QListModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int co
{
if (sourceRow < 0
|| sourceRow + count - 1 >= rowCount(sourceParent)
- || destinationChild <= 0
+ || destinationChild < 0
|| destinationChild > rowCount(destinationParent)
+ || sourceRow == destinationChild
|| sourceRow == destinationChild - 1
- || count <= 0) {
+ || count <= 0
+ || sourceParent.isValid()
+ || destinationParent.isValid()) {
return false;
}
if (!beginMoveRows(QModelIndex(), sourceRow, sourceRow + count - 1, QModelIndex(), destinationChild))
return false;
- destinationChild--;
- const int fromRow = destinationChild < sourceRow ? (sourceRow + count - 1) : sourceRow;
+
+ int fromRow = sourceRow;
+ if (destinationChild < sourceRow)
+ fromRow += count - 1;
+ else
+ destinationChild--;
while (count--)
items.move(fromRow, destinationChild);
endMoveRows();
@@ -987,8 +994,9 @@ QDataStream &operator>>(QDataStream &in, QListWidgetItem &item)
\fn void QListWidgetItem::setSizeHint(const QSize &size)
\since 4.1
- Sets the size hint for the list item to be \a size. If no size hint is set,
- the item delegate will compute the size hint based on the item data.
+ Sets the size hint for the list item to be \a size.
+ If no size hint is set or \a size is invalid, the item
+ delegate will compute the size hint based on the item data.
*/
/*!
@@ -1119,6 +1127,8 @@ void QListWidgetItem::setFlags(Qt::ItemFlags aflags)
\since 4.2
Sets the background brush of the list item to the given \a brush.
+ Setting a default-constructed brush will let the view use the
+ default color from the style.
\sa background(), setForeground()
*/
@@ -1137,6 +1147,8 @@ void QListWidgetItem::setFlags(Qt::ItemFlags aflags)
\since 4.2
Sets the foreground brush of the list item to the given \a brush.
+ Setting a default-constructed brush will let the view use the
+ default color from the style.
\sa foreground(), setBackground()
*/
@@ -1215,7 +1227,7 @@ void QListWidgetPrivate::_q_emitCurrentItemChanged(const QModelIndex &current,
//persistentCurrent is invalid if something changed the model in response
//to the currentItemChanged signal emission and the item was removed
if (!persistentCurrent.isValid()) {
- currentItem = 0;
+ currentItem = nullptr;
}
emit q->currentTextChanged(currentItem ? currentItem->text() : QString());
@@ -1473,7 +1485,7 @@ QListWidgetItem *QListWidget::item(int row) const
{
Q_D(const QListWidget);
if (row < 0 || row >= d->model->rowCount())
- return 0;
+ return nullptr;
return d->listModel()->at(row);
}
@@ -1543,7 +1555,7 @@ QListWidgetItem *QListWidget::takeItem(int row)
{
Q_D(QListWidget);
if (row < 0 || row >= d->model->rowCount())
- return 0;
+ return nullptr;
return d->listModel()->take(row);
}
@@ -2059,7 +2071,7 @@ QListWidgetItem *QListWidget::itemFromIndex(const QModelIndex &index) const
Q_D(const QListWidget);
if (d->isIndexValid(index))
return d->listModel()->at(index.row());
- return 0;
+ return nullptr;
}
/*!
diff --git a/src/widgets/itemviews/qlistwidget.h b/src/widgets/itemviews/qlistwidget.h
index c102b144df..1319d658ab 100644
--- a/src/widgets/itemviews/qlistwidget.h
+++ b/src/widgets/itemviews/qlistwidget.h
@@ -127,7 +127,7 @@ public:
inline QBrush background() const
{ return qvariant_cast<QBrush>(data(Qt::BackgroundRole)); }
inline void setBackground(const QBrush &brush)
- { setData(Qt::BackgroundRole, brush); }
+ { setData(Qt::BackgroundRole, brush.style() != Qt::NoBrush ? QVariant(brush) : QVariant()); }
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X ("Use QListWidgetItem::foreground() instead")
@@ -141,7 +141,7 @@ public:
inline QBrush foreground() const
{ return qvariant_cast<QBrush>(data(Qt::ForegroundRole)); }
inline void setForeground(const QBrush &brush)
- { setData(Qt::ForegroundRole, brush); }
+ { setData(Qt::ForegroundRole, brush.style() != Qt::NoBrush ? QVariant(brush) : QVariant()); }
inline Qt::CheckState checkState() const
{ return static_cast<Qt::CheckState>(data(Qt::CheckStateRole).toInt()); }
@@ -151,7 +151,7 @@ public:
inline QSize sizeHint() const
{ return qvariant_cast<QSize>(data(Qt::SizeHintRole)); }
inline void setSizeHint(const QSize &size)
- { setData(Qt::SizeHintRole, size); }
+ { setData(Qt::SizeHintRole, size.isValid() ? QVariant(size) : QVariant()); }
virtual QVariant data(int role) const;
virtual void setData(int role, const QVariant &value);
diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp
index 702e290da3..c685cc7f05 100644
--- a/src/widgets/itemviews/qstyleditemdelegate.cpp
+++ b/src/widgets/itemviews/qstyleditemdelegate.cpp
@@ -83,7 +83,7 @@ class QStyledItemDelegatePrivate : public QAbstractItemDelegatePrivate
Q_DECLARE_PUBLIC(QStyledItemDelegate)
public:
- QStyledItemDelegatePrivate() : factory(0) { }
+ QStyledItemDelegatePrivate() : factory(nullptr) { }
static const QWidget *widget(const QStyleOptionViewItem &option)
{
@@ -302,8 +302,8 @@ void QStyledItemDelegate::initStyleOption(QStyleOptionViewItem *option,
value = index.data(Qt::DecorationRole);
if (value.isValid() && !value.isNull()) {
option->features |= QStyleOptionViewItem::HasDecoration;
- switch (value.type()) {
- case QVariant::Icon: {
+ switch (value.userType()) {
+ case QMetaType::QIcon: {
option->icon = qvariant_cast<QIcon>(value);
QIcon::Mode mode;
if (!(option->state & QStyle::State_Enabled))
@@ -319,19 +319,19 @@ void QStyledItemDelegate::initStyleOption(QStyleOptionViewItem *option,
qMin(option->decorationSize.height(), actualSize.height()));
break;
}
- case QVariant::Color: {
+ case QMetaType::QColor: {
QPixmap pixmap(option->decorationSize);
pixmap.fill(qvariant_cast<QColor>(value));
option->icon = QIcon(pixmap);
break;
}
- case QVariant::Image: {
+ case QMetaType::QImage: {
QImage image = qvariant_cast<QImage>(value);
option->icon = QIcon(QPixmap::fromImage(image));
option->decorationSize = image.size() / image.devicePixelRatio();
break;
}
- case QVariant::Pixmap: {
+ case QMetaType::QPixmap: {
QPixmap pixmap = qvariant_cast<QPixmap>(value);
option->icon = QIcon(pixmap);
option->decorationSize = pixmap.size() / pixmap.devicePixelRatio();
@@ -351,7 +351,7 @@ void QStyledItemDelegate::initStyleOption(QStyleOptionViewItem *option,
option->backgroundBrush = qvariant_cast<QBrush>(index.data(Qt::BackgroundRole));
// disable style animations for checkboxes etc. within itemviews (QTBUG-30146)
- option->styleObject = 0;
+ option->styleObject = nullptr;
}
/*!
@@ -426,7 +426,7 @@ QWidget *QStyledItemDelegate::createEditor(QWidget *parent,
{
Q_D(const QStyledItemDelegate);
if (!index.isValid())
- return 0;
+ return nullptr;
return d->editorFactory()->createEditor(index.data(Qt::EditRole).userType(), parent);
}
@@ -450,7 +450,7 @@ void QStyledItemDelegate::setEditorData(QWidget *editor, const QModelIndex &inde
if (!n.isEmpty()) {
if (!v.isValid())
- v = QVariant(editor->property(n).userType(), (const void *)0);
+ v = QVariant(editor->property(n).userType(), (const void *)nullptr);
editor->setProperty(n, v);
}
#endif
@@ -507,7 +507,7 @@ void QStyledItemDelegate::updateEditorGeometry(QWidget *editor,
//or it is in a QTableView
#if QT_CONFIG(tableview) && QT_CONFIG(lineedit)
if (qobject_cast<QExpandingLineEdit*>(editor) && !qobject_cast<const QTableView*>(widget))
- opt.showDecorationSelected = editor->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, 0, editor);
+ opt.showDecorationSelected = editor->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, nullptr, editor);
else
#endif
opt.showDecorationSelected = true;
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index 11c5be10fd..81fceba8dc 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -1431,7 +1431,7 @@ void QTableView::paintEvent(QPaintEvent *event)
const bool showGrid = d->showGrid;
const int gridSize = showGrid ? 1 : 0;
const int gridHint = style()->styleHint(QStyle::SH_Table_GridLineColor, &option, this);
- const QColor gridColor = static_cast<QRgb>(gridHint);
+ const QColor gridColor = QColor::fromRgba(static_cast<QRgb>(gridHint));
const QPen gridPen = QPen(gridColor, 0, d->gridStyle);
const QHeaderView *verticalHeader = d->verticalHeader;
const QHeaderView *horizontalHeader = d->horizontalHeader;
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index 9134abe270..60abd02564 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
QTableModel::QTableModel(int rows, int columns, QTableWidget *parent)
: QAbstractTableModel(parent),
- prototype(0),
+ prototype(nullptr),
tableItems(rows * columns, 0),
verticalHeaderItems(rows, 0),
horizontalHeaderItems(columns, 0)
@@ -104,18 +104,18 @@ bool QTableModel::removeRows(int row, int count, const QModelIndex &)
beginRemoveRows(QModelIndex(), row, row + count - 1);
int i = tableIndex(row, 0);
int n = count * columnCount();
- QTableWidgetItem *oldItem = 0;
+ QTableWidgetItem *oldItem = nullptr;
for (int j = i; j < n + i; ++j) {
oldItem = tableItems.at(j);
if (oldItem)
- oldItem->view = 0;
+ oldItem->view = nullptr;
delete oldItem;
}
tableItems.remove(qMax(i, 0), n);
for (int v = row; v < row + count; ++v) {
oldItem = verticalHeaderItems.at(v);
if (oldItem)
- oldItem->view = 0;
+ oldItem->view = nullptr;
delete oldItem;
}
verticalHeaderItems.remove(row, count);
@@ -129,13 +129,13 @@ bool QTableModel::removeColumns(int column, int count, const QModelIndex &)
return false;
beginRemoveColumns(QModelIndex(), column, column + count - 1);
- QTableWidgetItem *oldItem = 0;
+ QTableWidgetItem *oldItem = nullptr;
for (int row = rowCount() - 1; row >= 0; --row) {
int i = tableIndex(row, column);
for (int j = i; j < i + count; ++j) {
oldItem = tableItems.at(j);
if (oldItem)
- oldItem->view = 0;
+ oldItem->view = nullptr;
delete oldItem;
}
tableItems.remove(i, count);
@@ -143,7 +143,7 @@ bool QTableModel::removeColumns(int column, int count, const QModelIndex &)
for (int h=column; h<column+count; ++h) {
oldItem = horizontalHeaderItems.at(h);
if (oldItem)
- oldItem->view = 0;
+ oldItem->view = nullptr;
delete oldItem;
}
horizontalHeaderItems.remove(column, count);
@@ -162,7 +162,7 @@ void QTableModel::setItem(int row, int column, QTableWidgetItem *item)
// remove old
if (oldItem)
- oldItem->view = 0;
+ oldItem->view = nullptr;
delete tableItems.at(i);
QTableWidget *view = qobject_cast<QTableWidget*>(QObject::parent());
@@ -180,7 +180,7 @@ void QTableModel::setItem(int row, int column, QTableWidgetItem *item)
if (row < colItems.count())
colItems.remove(row);
int sortedRow;
- if (item == 0) {
+ if (item == nullptr) {
// move to after all non-0 (sortable) items
sortedRow = colItems.count();
} else {
@@ -222,7 +222,7 @@ QTableWidgetItem *QTableModel::takeItem(int row, int column)
long i = tableIndex(row, column);
QTableWidgetItem *itm = tableItems.value(i);
if (itm) {
- itm->view = 0;
+ itm->view = nullptr;
itm->d->id = -1;
tableItems[i] = 0;
const QModelIndex ind = index(row, column);
@@ -239,7 +239,7 @@ QTableWidgetItem *QTableModel::item(int row, int column) const
QTableWidgetItem *QTableModel::item(const QModelIndex &index) const
{
if (!isValid(index))
- return 0;
+ return nullptr;
return tableItems.at(tableIndex(index.row(), index.column()));
}
@@ -277,7 +277,7 @@ void QTableModel::setHorizontalHeaderItem(int section, QTableWidgetItem *item)
return;
if (oldItem)
- oldItem->view = 0;
+ oldItem->view = nullptr;
delete oldItem;
QTableWidget *view = qobject_cast<QTableWidget*>(QObject::parent());
@@ -299,7 +299,7 @@ void QTableModel::setVerticalHeaderItem(int section, QTableWidgetItem *item)
return;
if (oldItem)
- oldItem->view = 0;
+ oldItem->view = nullptr;
delete oldItem;
QTableWidget *view = qobject_cast<QTableWidget*>(QObject::parent());
@@ -315,10 +315,10 @@ void QTableModel::setVerticalHeaderItem(int section, QTableWidgetItem *item)
QTableWidgetItem *QTableModel::takeHorizontalHeaderItem(int section)
{
if (section < 0 || section >= horizontalHeaderItems.count())
- return 0;
+ return nullptr;
QTableWidgetItem *itm = horizontalHeaderItems.at(section);
if (itm) {
- itm->view = 0;
+ itm->view = nullptr;
itm->itemFlags &= ~ItemIsHeaderItem;
horizontalHeaderItems[section] = 0;
}
@@ -328,10 +328,10 @@ QTableWidgetItem *QTableModel::takeHorizontalHeaderItem(int section)
QTableWidgetItem *QTableModel::takeVerticalHeaderItem(int section)
{
if (section < 0 || section >= verticalHeaderItems.count())
- return 0;
+ return nullptr;
QTableWidgetItem *itm = verticalHeaderItems.at(section);
if (itm) {
- itm->view = 0;
+ itm->view = nullptr;
itm->itemFlags &= ~ItemIsHeaderItem;
verticalHeaderItems[section] = 0;
}
@@ -571,7 +571,7 @@ void QTableModel::ensureSorted(int column, Qt::SortOrder order,
sorting.reserve(count);
for (int row = start; row <= end; ++row) {
QTableWidgetItem *itm = item(row, column);
- if (itm == 0) {
+ if (itm == nullptr) {
// no more sortable items (all 0-items are
// at the end of the table when it is sorted)
break;
@@ -649,7 +649,7 @@ QVector<QTableWidgetItem*> QTableModel::columnItems(int column) const
items.reserve(rc);
for (int row = 0; row < rc; ++row) {
QTableWidgetItem *itm = item(row, column);
- if (itm == 0) {
+ if (itm == nullptr) {
// no more sortable items (all 0-items are
// at the end of the table when it is sorted)
break;
@@ -718,7 +718,7 @@ QVariant QTableModel::headerData(int section, Qt::Orientation orientation, int r
if (section < 0)
return QVariant();
- QTableWidgetItem *itm = 0;
+ QTableWidgetItem *itm = nullptr;
if (orientation == Qt::Horizontal && section < horizontalHeaderItems.count())
itm = horizontalHeaderItems.at(section);
else if (orientation == Qt::Vertical && section < verticalHeaderItems.count())
@@ -741,7 +741,7 @@ bool QTableModel::setHeaderData(int section, Qt::Orientation orientation,
(orientation == Qt::Vertical && verticalHeaderItems.size() <= section))
return false;
- QTableWidgetItem *itm = 0;
+ QTableWidgetItem *itm = nullptr;
if (orientation == Qt::Horizontal)
itm = horizontalHeaderItems.at(section);
else
@@ -764,14 +764,14 @@ void QTableModel::clear()
{
for (int j = 0; j < verticalHeaderItems.count(); ++j) {
if (verticalHeaderItems.at(j)) {
- verticalHeaderItems.at(j)->view = 0;
+ verticalHeaderItems.at(j)->view = nullptr;
delete verticalHeaderItems.at(j);
verticalHeaderItems[j] = 0;
}
}
for (int k = 0; k < horizontalHeaderItems.count(); ++k) {
if (horizontalHeaderItems.at(k)) {
- horizontalHeaderItems.at(k)->view = 0;
+ horizontalHeaderItems.at(k)->view = nullptr;
delete horizontalHeaderItems.at(k);
horizontalHeaderItems[k] = 0;
}
@@ -784,7 +784,7 @@ void QTableModel::clearContents()
beginResetModel();
for (int i = 0; i < tableItems.count(); ++i) {
if (tableItems.at(i)) {
- tableItems.at(i)->view = 0;
+ tableItems.at(i)->view = nullptr;
delete tableItems.at(i);
tableItems[i] = 0;
}
@@ -853,7 +853,7 @@ QMimeData *QTableModel::mimeData(const QModelIndexList &indexes) const
// cachedIndexes is a little hack to avoid copying from QModelIndexList to
// QList<QTreeWidgetItem*> and back again in the view
cachedIndexes = indexes;
- QMimeData *mimeData = (view ? view->mimeData(items) : 0);
+ QMimeData *mimeData = (view ? view->mimeData(items) : nullptr);
cachedIndexes.clear();
return mimeData;
}
@@ -1064,8 +1064,8 @@ QTableWidgetSelectionRange::~QTableWidgetSelectionRange()
\since 4.1
Sets the size hint for the table item to be \a size.
- If no size hint is set, the item delegate will compute the
- size hint based on the item data.
+ If no size hint is set or \a size is invalid, the item
+ delegate will compute the size hint based on the item data.
*/
/*!
@@ -1279,6 +1279,8 @@ void QTableWidgetItem::setFlags(Qt::ItemFlags aflags)
\since 4.2
Sets the item's background brush to the specified \a brush.
+ Setting a default-constructed brush will let the view use the
+ default color from the style.
\sa setForeground()
*/
@@ -1313,6 +1315,8 @@ void QTableWidgetItem::setFlags(Qt::ItemFlags aflags)
\since 4.2
Sets the item's foreground brush to the specified \a brush.
+ Setting a default-constructed brush will let the view use the
+ default color from the style.
\sa setBackground()
*/
@@ -2036,7 +2040,7 @@ QTableWidgetItem *QTableWidget::takeItem(int row, int column)
Q_D(QTableWidget);
QTableWidgetItem *item = d->tableModel()->takeItem(row, column);
if (item)
- item->view = 0;
+ item->view = nullptr;
return item;
}
@@ -2072,7 +2076,7 @@ QTableWidgetItem *QTableWidget::takeVerticalHeaderItem(int row)
Q_D(QTableWidget);
QTableWidgetItem *itm = d->tableModel()->takeVerticalHeaderItem(row);
if (itm)
- itm->view = 0;
+ itm->view = nullptr;
return itm;
}
@@ -2111,7 +2115,7 @@ QTableWidgetItem *QTableWidget::takeHorizontalHeaderItem(int column)
Q_D(QTableWidget);
QTableWidgetItem *itm = d->tableModel()->takeHorizontalHeaderItem(column);
if (itm)
- itm->view = 0;
+ itm->view = nullptr;
return itm;
}
@@ -2122,7 +2126,7 @@ void QTableWidget::setVerticalHeaderLabels(const QStringList &labels)
{
Q_D(QTableWidget);
QTableModel *model = d->tableModel();
- QTableWidgetItem *item = 0;
+ QTableWidgetItem *item = nullptr;
for (int i = 0; i < model->rowCount() && i < labels.count(); ++i) {
item = model->verticalHeaderItem(i);
if (!item) {
@@ -2140,7 +2144,7 @@ void QTableWidget::setHorizontalHeaderLabels(const QStringList &labels)
{
Q_D(QTableWidget);
QTableModel *model = d->tableModel();
- QTableWidgetItem *item = 0;
+ QTableWidgetItem *item = nullptr;
for (int i = 0; i < model->columnCount() && i < labels.count(); ++i) {
item = model->horizontalHeaderItem(i);
if (!item) {
diff --git a/src/widgets/itemviews/qtablewidget.h b/src/widgets/itemviews/qtablewidget.h
index 0d93a0a075..70e2046400 100644
--- a/src/widgets/itemviews/qtablewidget.h
+++ b/src/widgets/itemviews/qtablewidget.h
@@ -146,7 +146,7 @@ public:
inline QBrush background() const
{ return qvariant_cast<QBrush>(data(Qt::BackgroundRole)); }
inline void setBackground(const QBrush &brush)
- { setData(Qt::BackgroundRole, brush); }
+ { setData(Qt::BackgroundRole, brush.style() != Qt::NoBrush ? QVariant(brush) : QVariant()); }
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X ("Use QTableWidgetItem::foreground() instead")
@@ -160,7 +160,7 @@ public:
inline QBrush foreground() const
{ return qvariant_cast<QBrush>(data(Qt::ForegroundRole)); }
inline void setForeground(const QBrush &brush)
- { setData(Qt::ForegroundRole, brush); }
+ { setData(Qt::ForegroundRole, brush.style() != Qt::NoBrush ? QVariant(brush) : QVariant()); }
inline Qt::CheckState checkState() const
{ return static_cast<Qt::CheckState>(data(Qt::CheckStateRole).toInt()); }
@@ -170,7 +170,7 @@ public:
inline QSize sizeHint() const
{ return qvariant_cast<QSize>(data(Qt::SizeHintRole)); }
inline void setSizeHint(const QSize &size)
- { setData(Qt::SizeHintRole, size); }
+ { setData(Qt::SizeHintRole, size.isValid() ? QVariant(size) : QVariant()); }
virtual QVariant data(int role) const;
virtual void setData(int role, const QVariant &value);
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index 442369c2ec..9aba17be70 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -1517,7 +1517,7 @@ void QTreeView::drawTree(QPainter *painter, const QRegion &region) const
/// ### move to QObject :)
static inline bool ancestorOf(QObject *widget, QObject *other)
{
- for (QObject *parent = other; parent != 0; parent = parent->parent()) {
+ for (QObject *parent = other; parent != nullptr; parent = parent->parent()) {
if (parent == widget)
return true;
}
@@ -1888,7 +1888,7 @@ void QTreeView::mousePressEvent(QMouseEvent *event)
{
Q_D(QTreeView);
bool handled = false;
- if (style()->styleHint(QStyle::SH_ListViewExpand_SelectMouseType, 0, this) == QEvent::MouseButtonPress)
+ if (style()->styleHint(QStyle::SH_ListViewExpand_SelectMouseType, nullptr, this) == QEvent::MouseButtonPress)
handled = d->expandOrCollapseItemAtPos(event->pos());
if (!handled && d->itemDecorationAt(event->pos()) == -1)
QAbstractItemView::mousePressEvent(event);
@@ -1907,7 +1907,7 @@ void QTreeView::mouseReleaseEvent(QMouseEvent *event)
} else {
if (state() == QAbstractItemView::DragSelectingState || state() == QAbstractItemView::DraggingState)
setState(QAbstractItemView::NoState);
- if (style()->styleHint(QStyle::SH_ListViewExpand_SelectMouseType, 0, this) == QEvent::MouseButtonRelease)
+ if (style()->styleHint(QStyle::SH_ListViewExpand_SelectMouseType, nullptr, this) == QEvent::MouseButtonRelease)
d->expandOrCollapseItemAtPos(event->pos());
}
}
@@ -1944,7 +1944,7 @@ void QTreeView::mouseDoubleClickEvent(QMouseEvent *event)
if (edit(persistent, DoubleClicked, event) || state() != NoState)
return; // the double click triggered editing
- if (!style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, 0, this))
+ if (!style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, nullptr, this))
emit activated(persistent);
d->pressedIndex = QModelIndex();
@@ -2208,7 +2208,7 @@ QModelIndex QTreeView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie
d->collapse(vi, true);
d->moveCursorUpdatedView = true;
} else {
- bool descend = style()->styleHint(QStyle::SH_ItemView_ArrowKeysNavigateIntoChildren, 0, this);
+ bool descend = style()->styleHint(QStyle::SH_ItemView_ArrowKeysNavigateIntoChildren, nullptr, this);
if (descend) {
QModelIndex par = current.parent();
if (par.isValid() && par != rootIndex())
@@ -2244,7 +2244,7 @@ QModelIndex QTreeView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie
d->expand(vi, true);
d->moveCursorUpdatedView = true;
} else {
- bool descend = style()->styleHint(QStyle::SH_ItemView_ArrowKeysNavigateIntoChildren, 0, this);
+ bool descend = style()->styleHint(QStyle::SH_ItemView_ArrowKeysNavigateIntoChildren, nullptr, this);
if (descend) {
QModelIndex idx = d->modelIndex(d->below(vi));
if (idx.parent() == current)
@@ -3051,7 +3051,7 @@ void QTreeViewPrivate::initialize()
header->setDefaultAlignment(Qt::AlignLeft|Qt::AlignVCenter);
q->setHeader(header);
#if QT_CONFIG(animation)
- animationsEnabled = q->style()->styleHint(QStyle::SH_Widget_Animation_Duration, 0, q) > 0;
+ animationsEnabled = q->style()->styleHint(QStyle::SH_Widget_Animation_Duration, nullptr, q) > 0;
QObject::connect(&animatedOperation, SIGNAL(finished()), q, SLOT(_q_endAnimatedOperation()));
#endif // animation
}
@@ -3344,7 +3344,7 @@ void QTreeViewPrivate::layout(int i, bool recursiveExpanding, bool afterIsUninit
int hidden = 0;
int last = 0;
int children = 0;
- QTreeViewItem *item = 0;
+ QTreeViewItem *item = nullptr;
for (int j = first; j < first + count; ++j) {
current = model->index(j - first, 0, parent);
if (isRowHidden(current)) {
@@ -3955,7 +3955,7 @@ int QTreeViewPrivate::accessibleTree2Index(const QModelIndex &index) const
void QTreeViewPrivate::updateIndentationFromStyle()
{
Q_Q(const QTreeView);
- indent = q->style()->pixelMetric(QStyle::PM_TreeViewIndentation, 0, q);
+ indent = q->style()->pixelMetric(QStyle::PM_TreeViewIndentation, nullptr, q);
}
/*!
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index 6d0909108b..0d4c391e1c 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -48,6 +48,8 @@
#include <private/qwidgetitemdata_p.h>
#include <private/qtreewidgetitemiterator_p.h>
+#include <QtCore/private/qduplicatetracker_p.h>
+
#include <algorithm>
QT_BEGIN_NAMESPACE
@@ -144,7 +146,7 @@ QTreeModel::~QTreeModel()
clear();
headerItem->view = nullptr;
delete headerItem;
- rootItem->view = 0;
+ rootItem->view = nullptr;
delete rootItem;
}
@@ -160,8 +162,8 @@ void QTreeModel::clear()
beginResetModel();
for (int i = 0; i < rootItem->childCount(); ++i) {
QTreeWidgetItem *item = rootItem->children.at(i);
- item->par = 0;
- item->view = 0;
+ item->par = nullptr;
+ item->view = nullptr;
delete item;
}
rootItem->children.clear();
@@ -214,7 +216,7 @@ void QTreeModel::setColumnCount(int columns)
QTreeWidgetItem *QTreeModel::item(const QModelIndex &index) const
{
if (!index.isValid())
- return 0;
+ return nullptr;
return static_cast<QTreeWidgetItem*>(index.internalPointer());
}
@@ -515,9 +517,9 @@ bool QTreeModel::removeRows(int row, int count, const QModelIndex &parent) {
for (int i = row + count - 1; i >= row; --i) {
QTreeWidgetItem *child = itm ? itm->takeChild(i) : rootItem->children.takeAt(i);
Q_ASSERT(child);
- child->view = 0;
+ child->view = nullptr;
delete child;
- child = 0;
+ child = nullptr;
}
blocker.unblock();
@@ -1285,6 +1287,8 @@ bool QTreeWidgetItem::isFirstColumnSpanned() const
Sets the background brush of the label in the given \a column to the
specified \a brush.
+ Setting a default-constructed brush will let the view use the
+ default color from the style.
\note If \l{Qt Style Sheets} are used on the same widget as setBackground(),
style sheets will take precedence if the settings conflict.
@@ -1314,6 +1318,8 @@ bool QTreeWidgetItem::isFirstColumnSpanned() const
Returns the brush used to render the foreground (e.g. text) of the
specified \a column.
+ Setting a default-constructed brush will let the view use the
+ default color from the style.
\sa background()
*/
@@ -1357,8 +1363,8 @@ bool QTreeWidgetItem::isFirstColumnSpanned() const
\since 4.1
Sets the size hint for the tree item in the given \a column to be \a size.
- If no size hint is set, the item delegate will compute the size hint based
- on the item data.
+ If no size hint is set or \a size is invalid, the item
+ delegate will compute the size hint based on the item data.
*/
/*!
@@ -1608,11 +1614,11 @@ QTreeWidgetItem::~QTreeWidgetItem()
}
} else if (model) {
if (this == model->headerItem) {
- model->headerItem = 0;
+ model->headerItem = nullptr;
} else {
int i = model->rootItem->children.indexOf(this);
if (i >= 0) {
- model->beginRemoveItems(0, i, 1);
+ model->beginRemoveItems(nullptr, i, 1);
// users _could_ do changes when connected to rowsAboutToBeRemoved,
// so we check again to make sure 'i' is valid
if (!model->rootItem->children.isEmpty() && model->rootItem->children.at(i) == this)
@@ -1626,9 +1632,9 @@ QTreeWidgetItem::~QTreeWidgetItem()
for (int i = 0; i < children.count(); ++i) {
QTreeWidgetItem *child = children.at(i);
// make sure the child does not try to remove itself from our children list
- child->par = 0;
+ child->par = nullptr;
// make sure the child does not try to remove itself from the top level list
- child->view = 0;
+ child->view = nullptr;
delete child;
}
@@ -1644,16 +1650,16 @@ QTreeWidgetItem::~QTreeWidgetItem()
*/
QTreeWidgetItem *QTreeWidgetItem::clone() const
{
- QTreeWidgetItem *copy = 0;
+ QTreeWidgetItem *copy = nullptr;
QStack<const QTreeWidgetItem*> stack;
QStack<QTreeWidgetItem*> parentStack;
stack.push(this);
parentStack.push(0);
- QTreeWidgetItem *root = 0;
- const QTreeWidgetItem *item = 0;
- QTreeWidgetItem *parent = 0;
+ QTreeWidgetItem *root = nullptr;
+ const QTreeWidgetItem *item = nullptr;
+ QTreeWidgetItem *parent = nullptr;
while (!stack.isEmpty()) {
// get current item, and copied parent
item = stack.pop();
@@ -1988,8 +1994,8 @@ void QTreeWidgetItem::write(QDataStream &out) const
\sa data(), flags()
*/
QTreeWidgetItem::QTreeWidgetItem(const QTreeWidgetItem &other)
- : rtti(Type), values(other.values), view(0),
- d(new QTreeWidgetItemPrivate(this)), par(0),
+ : rtti(Type), values(other.values), view(nullptr),
+ d(new QTreeWidgetItemPrivate(this)), par(nullptr),
itemFlags(other.itemFlags)
{
d->display = other.d->display;
@@ -2032,14 +2038,14 @@ void QTreeWidgetItem::addChild(QTreeWidgetItem *child)
*/
void QTreeWidgetItem::insertChild(int index, QTreeWidgetItem *child)
{
- if (index < 0 || index > children.count() || child == 0 || child->view != 0 || child->par != 0)
+ if (index < 0 || index > children.count() || child == nullptr || child->view != nullptr || child->par != nullptr)
return;
if (QTreeModel *model = treeModel()) {
const bool wasSkipSort = model->skipPendingSort;
model->skipPendingSort = true;
if (model->rootItem == this)
- child->par = 0;
+ child->par = nullptr;
else
child->par = this;
if (view->isSortingEnabled()) {
@@ -2099,12 +2105,12 @@ QTreeWidgetItem *QTreeWidgetItem::takeChild(int index)
if (model) model->beginRemoveItems(this, index, 1);
d->updateHiddenStatus(children.at(index), false);
QTreeWidgetItem *item = children.takeAt(index);
- item->par = 0;
+ item->par = nullptr;
QStack<QTreeWidgetItem*> stack;
stack.push(item);
while (!stack.isEmpty()) {
QTreeWidgetItem *i = stack.pop();
- i->view = 0;
+ i->view = nullptr;
for (int c = 0; c < i->children.count(); ++c)
stack.push(i->children.at(c));
}
@@ -2112,7 +2118,7 @@ QTreeWidgetItem *QTreeWidgetItem::takeChild(int index)
if (model) model->endRemoveRows();
return item;
}
- return 0;
+ return nullptr;
}
/*!
@@ -2159,7 +2165,7 @@ void QTreeWidgetItem::insertChildren(int index, const QList<QTreeWidgetItem*> &c
stack.push(child);
}
if (model && (model->rootItem == this))
- child->par = 0;
+ child->par = nullptr;
else
child->par = this;
}
@@ -2202,12 +2208,12 @@ QList<QTreeWidgetItem*> QTreeWidgetItem::takeChildren()
if (model) model->beginRemoveItems(this, 0, children.count());
for (int n = 0; n < children.count(); ++n) {
QTreeWidgetItem *item = children.at(n);
- item->par = 0;
+ item->par = nullptr;
QStack<QTreeWidgetItem*> stack;
stack.push(item);
while (!stack.isEmpty()) {
QTreeWidgetItem *i = stack.pop();
- i->view = 0;
+ i->view = nullptr;
for (int c = 0; c < i->children.count(); ++c)
stack.push(i->children.at(c));
}
@@ -3171,13 +3177,12 @@ QList<QTreeWidgetItem*> QTreeWidget::selectedItems() const
const QModelIndexList indexes = selectionModel()->selectedIndexes();
QList<QTreeWidgetItem*> items;
items.reserve(indexes.count());
- QSet<QTreeWidgetItem *> seen;
+ QDuplicateTracker<QTreeWidgetItem *> seen;
seen.reserve(indexes.count());
for (const auto &index : indexes) {
QTreeWidgetItem *item = d->item(index);
- if (item->isHidden() || seen.contains(item))
+ if (item->isHidden() || seen.hasSeen(item))
continue;
- seen.insert(item);
items.append(item);
}
return items;
@@ -3302,7 +3307,7 @@ QTreeWidgetItem *QTreeWidget::itemAbove(const QTreeWidgetItem *item) const
{
Q_D(const QTreeWidget);
if (item == d->treeModel()->headerItem)
- return 0;
+ return nullptr;
const QModelIndex index = d->index(item);
const QModelIndex above = indexAbove(index);
return d->item(above);
@@ -3317,7 +3322,7 @@ QTreeWidgetItem *QTreeWidget::itemBelow(const QTreeWidgetItem *item) const
{
Q_D(const QTreeWidget);
if (item == d->treeModel()->headerItem)
- return 0;
+ return nullptr;
const QModelIndex index = d->index(item);
const QModelIndex below = indexBelow(index);
return d->item(below);
@@ -3420,14 +3425,14 @@ QMimeData *QTreeWidget::mimeData(const QList<QTreeWidgetItem*> items) const
for (const auto *item : items) {
if (Q_UNLIKELY(!item)) {
qWarning("QTreeWidget::mimeData: Null-item passed");
- return 0;
+ return nullptr;
}
for (int c = 0; c < item->values.count(); ++c) {
const QModelIndex index = indexFromItem(item, c);
if (Q_UNLIKELY(!index.isValid())) {
qWarning() << "QTreeWidget::mimeData: No index associated with item :" << item;
- return 0;
+ return nullptr;
}
indexes << index;
}
diff --git a/src/widgets/itemviews/qtreewidget.h b/src/widgets/itemviews/qtreewidget.h
index bed77b336d..b9543fb954 100644
--- a/src/widgets/itemviews/qtreewidget.h
+++ b/src/widgets/itemviews/qtreewidget.h
@@ -146,7 +146,7 @@ public:
inline QBrush background(int column) const
{ return qvariant_cast<QBrush>(data(column, Qt::BackgroundRole)); }
inline void setBackground(int column, const QBrush &brush)
- { setData(column, Qt::BackgroundRole, brush); }
+ { setData(column, Qt::BackgroundRole, brush.style() != Qt::NoBrush ? QVariant(brush) : QVariant()); }
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X ("Use QTreeWidgetItem::foreground() instead")
@@ -160,7 +160,7 @@ public:
inline QBrush foreground(int column) const
{ return qvariant_cast<QBrush>(data(column, Qt::ForegroundRole)); }
inline void setForeground(int column, const QBrush &brush)
- { setData(column, Qt::ForegroundRole, brush); }
+ { setData(column, Qt::ForegroundRole, brush.style() != Qt::NoBrush ? QVariant(brush) : QVariant()); }
inline Qt::CheckState checkState(int column) const
{ return static_cast<Qt::CheckState>(data(column, Qt::CheckStateRole).toInt()); }
@@ -170,7 +170,7 @@ public:
inline QSize sizeHint(int column) const
{ return qvariant_cast<QSize>(data(column, Qt::SizeHintRole)); }
inline void setSizeHint(int column, const QSize &size)
- { setData(column, Qt::SizeHintRole, size); }
+ { setData(column, Qt::SizeHintRole, size.isValid() ? QVariant(size) : QVariant()); }
virtual QVariant data(int column, int role) const;
virtual void setData(int column, int role, const QVariant &value);
diff --git a/src/widgets/itemviews/qtreewidgetitemiterator.cpp b/src/widgets/itemviews/qtreewidgetitemiterator.cpp
index 14c19fcb9c..a24106d90e 100644
--- a/src/widgets/itemviews/qtreewidgetitemiterator.cpp
+++ b/src/widgets/itemviews/qtreewidgetitemiterator.cpp
@@ -90,7 +90,7 @@ QTreeWidgetItemIterator::QTreeWidgetItemIterator(const QTreeWidgetItemIterator &
*/
QTreeWidgetItemIterator::QTreeWidgetItemIterator(QTreeWidget *widget, IteratorFlags flags)
-: current(0), flags(flags)
+: current(nullptr), flags(flags)
{
Q_ASSERT(widget);
QTreeModel *model = qobject_cast<QTreeModel*>(widget->model());
@@ -266,7 +266,7 @@ bool QTreeWidgetItemIterator::matchesFlags(const QTreeWidgetItem *item) const
QTreeWidgetItem* QTreeWidgetItemIteratorPrivate::nextSibling(const QTreeWidgetItem* item) const
{
Q_ASSERT(item);
- QTreeWidgetItem *next = 0;
+ QTreeWidgetItem *next = nullptr;
if (QTreeWidgetItem *par = item->parent()) {
int i = par->indexOfChild(const_cast<QTreeWidgetItem*>(item));
next = par->child(i + 1);
@@ -280,9 +280,9 @@ QTreeWidgetItem* QTreeWidgetItemIteratorPrivate::nextSibling(const QTreeWidgetIt
QTreeWidgetItem *QTreeWidgetItemIteratorPrivate::next(const QTreeWidgetItem *current)
{
- if (!current) return 0;
+ if (!current) return nullptr;
- QTreeWidgetItem *next = 0;
+ QTreeWidgetItem *next = nullptr;
if (current->childCount()) {
// walk the child
m_parentIndex.push(m_currentIndex);
@@ -307,9 +307,9 @@ QTreeWidgetItem *QTreeWidgetItemIteratorPrivate::next(const QTreeWidgetItem *cur
QTreeWidgetItem *QTreeWidgetItemIteratorPrivate::previous(const QTreeWidgetItem *current)
{
- if (!current) return 0;
+ if (!current) return nullptr;
- QTreeWidgetItem *prev = 0;
+ QTreeWidgetItem *prev = nullptr;
// walk the previous sibling
QTreeWidgetItem *parent = current->parent();
prev = parent ? parent->child(m_currentIndex - 1)
@@ -347,7 +347,7 @@ void QTreeWidgetItemIteratorPrivate::ensureValidIterator(const QTreeWidgetItem *
// we need to adjust the iterator.
if (nextItem == itemToBeRemoved) {
QTreeWidgetItem *parent = nextItem;
- nextItem = 0;
+ nextItem = nullptr;
while (parent && !nextItem) {
nextItem = nextSibling(parent);
parent = parent->parent();
@@ -358,7 +358,7 @@ void QTreeWidgetItemIteratorPrivate::ensureValidIterator(const QTreeWidgetItem *
if (!(q->matchesFlags(nextItem))) ++(*q);
} else {
// set it to null.
- q->current = 0;
+ q->current = nullptr;
m_parentIndex.clear();
return;
}
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index 19ad65692b..64b0d69f6d 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -658,7 +658,7 @@ void QAction::setMenu(QMenu *menu)
{
Q_D(QAction);
if (d->menu)
- d->menu->d_func()->setOverrideMenuAction(0); //we reset the default action of any previous menu
+ d->menu->d_func()->setOverrideMenuAction(nullptr); //we reset the default action of any previous menu
d->menu = menu;
if (menu)
menu->d_func()->setOverrideMenuAction(this);
diff --git a/src/widgets/kernel/qaction.h b/src/widgets/kernel/qaction.h
index f7693f4dde..258a1ea0a0 100644
--- a/src/widgets/kernel/qaction.h
+++ b/src/widgets/kernel/qaction.h
@@ -63,7 +63,7 @@ class Q_WIDGETS_EXPORT QAction : public QObject
Q_DECLARE_PRIVATE(QAction)
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY changed)
- Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled)
+ Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY changed)
Q_PROPERTY(QIcon icon READ icon WRITE setIcon NOTIFY changed)
Q_PROPERTY(QString text READ text WRITE setText NOTIFY changed)
diff --git a/src/widgets/kernel/qactiongroup.cpp b/src/widgets/kernel/qactiongroup.cpp
index d359703db3..d51fb778c4 100644
--- a/src/widgets/kernel/qactiongroup.cpp
+++ b/src/widgets/kernel/qactiongroup.cpp
@@ -81,7 +81,7 @@ void QActionGroupPrivate::_q_actionChanged()
current = action;
}
} else if (action == current) {
- current = 0;
+ current = nullptr;
}
}
}
@@ -271,11 +271,11 @@ void QActionGroup::removeAction(QAction *action)
Q_D(QActionGroup);
if (d->actions.removeAll(action)) {
if (action == d->current)
- d->current = 0;
+ d->current = nullptr;
QObject::disconnect(action, SIGNAL(triggered()), this, SLOT(_q_actionTriggered()));
QObject::disconnect(action, SIGNAL(changed()), this, SLOT(_q_actionChanged()));
QObject::disconnect(action, SIGNAL(hovered()), this, SLOT(_q_actionHovered()));
- action->d_func()->group = 0;
+ action->d_func()->group = nullptr;
}
}
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index ce32fd39a8..129569a466 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -138,31 +138,7 @@ QT_BEGIN_NAMESPACE
Q_CORE_EXPORT void qt_call_post_routines();
Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text = QString(), bool autorep = false, ushort count = 1);
-QApplicationPrivate *QApplicationPrivate::self = 0;
-
-static void initSystemPalette()
-{
- if (QApplicationPrivate::sys_pal)
- return; // Already initialized
-
- QPalette defaultPalette;
- if (QApplicationPrivate::app_style)
- defaultPalette = QApplicationPrivate::app_style->standardPalette();
-
- auto *platformTheme = QGuiApplicationPrivate::platformTheme();
- if (const QPalette *themePalette = platformTheme ? platformTheme->palette() : nullptr) {
- QApplicationPrivate::setSystemPalette(themePalette->resolve(defaultPalette));
- QApplicationPrivate::initializeWidgetPaletteHash();
- } else {
- QApplicationPrivate::setSystemPalette(defaultPalette);
- }
-}
-
-static void clearSystemPalette()
-{
- delete QApplicationPrivate::sys_pal;
- QApplicationPrivate::sys_pal = 0;
-}
+QApplicationPrivate *QApplicationPrivate::self = nullptr;
bool QApplicationPrivate::autoSipEnabled = true;
@@ -172,8 +148,8 @@ QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, int flags)
application_type = QApplicationPrivate::Gui;
#ifndef QT_NO_GESTURES
- gestureManager = 0;
- gestureWidget = 0;
+ gestureManager = nullptr;
+ gestureWidget = nullptr;
#endif // QT_NO_GESTURES
if (!self)
@@ -183,7 +159,7 @@ QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, int flags)
QApplicationPrivate::~QApplicationPrivate()
{
if (self == this)
- self = 0;
+ self = nullptr;
}
void QApplicationPrivate::createEventDispatcher()
@@ -360,7 +336,7 @@ QWidget *QApplication::topLevelAt(const QPoint &pos)
if (const QWidgetWindow *widgetWindow = qobject_cast<const QWidgetWindow *>(window))
return widgetWindow->widget();
}
- return 0;
+ return nullptr;
}
/*!
@@ -375,21 +351,19 @@ QWidget *QApplication::topLevelAt(const QPoint &pos)
void qt_init_tooltip_palette();
void qt_cleanup();
-QStyle *QApplicationPrivate::app_style = 0; // default application style
+QStyle *QApplicationPrivate::app_style = nullptr; // default application style
#ifndef QT_NO_STYLE_STYLESHEET
QString QApplicationPrivate::styleSheet; // default application stylesheet
#endif
-QPointer<QWidget> QApplicationPrivate::leaveAfterRelease = 0;
-
-QPalette *QApplicationPrivate::sys_pal = 0; // default system palette
+QPointer<QWidget> QApplicationPrivate::leaveAfterRelease = nullptr;
-QFont *QApplicationPrivate::sys_font = 0; // default system font
-QFont *QApplicationPrivate::set_font = 0; // default font set by programmer
+QFont *QApplicationPrivate::sys_font = nullptr; // default system font
+QFont *QApplicationPrivate::set_font = nullptr; // default font set by programmer
-QWidget *QApplicationPrivate::main_widget = 0; // main application widget
-QWidget *QApplicationPrivate::focus_widget = 0; // has keyboard input focus
-QWidget *QApplicationPrivate::hidden_focus_widget = 0; // will get keyboard input focus after show()
-QWidget *QApplicationPrivate::active_window = 0; // toplevel with keyboard focus
+QWidget *QApplicationPrivate::main_widget = nullptr; // main application widget
+QWidget *QApplicationPrivate::focus_widget = nullptr; // has keyboard input focus
+QWidget *QApplicationPrivate::hidden_focus_widget = nullptr; // will get keyboard input focus after show()
+QWidget *QApplicationPrivate::active_window = nullptr; // toplevel with keyboard focus
#if QT_CONFIG(wheelevent)
QPointer<QWidget> QApplicationPrivate::wheel_widget;
#endif
@@ -419,9 +393,9 @@ Q_GLOBAL_STATIC(FontHash, app_fonts)
// Exported accessor for use outside of this file
FontHash *qt_app_fonts_hash() { return app_fonts(); }
-QWidgetList *QApplicationPrivate::popupWidgets = 0; // has keyboard input focus
+QWidgetList *QApplicationPrivate::popupWidgets = nullptr; // has keyboard input focus
-QDesktopWidget *qt_desktopWidget = 0; // root window widgets
+QDesktopWidget *qt_desktopWidget = nullptr; // root window widgets
/*!
\internal
@@ -466,7 +440,7 @@ void QApplicationPrivate::process_cmdline()
}
if(j < argc) {
- argv[j] = 0;
+ argv[j] = nullptr;
argc = j;
}
}
@@ -545,12 +519,7 @@ void QApplicationPrivate::init()
// Must be called before initialize()
QColormap::initialize();
- if (sys_pal) {
- // Now that we have a platform theme we need to reset
- // the system palette to pick up the theme colors.
- clearSystemPalette();
- initSystemPalette();
- }
+ initializeWidgetPalettesFromTheme();
qt_init_tooltip_palette();
QApplicationPrivate::initializeWidgetFontHash();
@@ -629,38 +598,6 @@ void QApplicationPrivate::initialize()
is_app_running = true; // no longer starting up
}
-static void setPossiblePalette(const QPalette *palette, const char *className)
-{
- if (palette == 0)
- return;
- QApplicationPrivate::setPalette_helper(*palette, className);
-}
-
-void QApplicationPrivate::initializeWidgetPaletteHash()
-{
- QPlatformTheme *platformTheme = QGuiApplicationPrivate::platformTheme();
- if (!platformTheme)
- return;
-
- widgetPalettes.clear();
-
- setPossiblePalette(platformTheme->palette(QPlatformTheme::ToolButtonPalette), "QToolButton");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::ButtonPalette), "QAbstractButton");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::CheckBoxPalette), "QCheckBox");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::RadioButtonPalette), "QRadioButton");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::HeaderPalette), "QHeaderView");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::ItemViewPalette), "QAbstractItemView");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::MessageBoxLabelPalette), "QMessageBoxLabel");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::TabBarPalette), "QTabBar");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::LabelPalette), "QLabel");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::GroupBoxPalette), "QGroupBox");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::MenuPalette), "QMenu");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::MenuBarPalette), "QMenuBar");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::TextEditPalette), "QTextEdit");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::TextEditPalette), "QTextControl");
- setPossiblePalette(platformTheme->palette(QPlatformTheme::TextLineEditPalette), "QLineEdit");
-}
-
void QApplicationPrivate::initializeWidgetFontHash()
{
const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme();
@@ -758,7 +695,7 @@ QWidget *QApplication::activePopupWidget()
QWidget *QApplication::activeModalWidget()
{
QWidgetWindow *widgetWindow = qobject_cast<QWidgetWindow *>(modalWindow());
- return widgetWindow ? widgetWindow->widget() : 0;
+ return widgetWindow ? widgetWindow->widget() : nullptr;
}
/*!
@@ -781,12 +718,12 @@ QApplication::~QApplication()
QApplicationPrivate::is_app_running = false;
delete QWidgetPrivate::mapper;
- QWidgetPrivate::mapper = 0;
+ QWidgetPrivate::mapper = nullptr;
// delete all widgets
if (QWidgetPrivate::allWidgets) {
QWidgetSet *mySet = QWidgetPrivate::allWidgets;
- QWidgetPrivate::allWidgets = 0;
+ QWidgetPrivate::allWidgets = nullptr;
for (QWidgetSet::ConstIterator it = mySet->constBegin(), cend = mySet->constEnd(); it != cend; ++it) {
QWidget *w = *it;
if (!w->parent()) // window
@@ -796,21 +733,18 @@ QApplication::~QApplication()
}
delete qt_desktopWidget;
- qt_desktopWidget = 0;
+ qt_desktopWidget = nullptr;
- delete QApplicationPrivate::app_pal;
- QApplicationPrivate::app_pal = 0;
- clearSystemPalette();
QApplicationPrivate::widgetPalettes.clear();
delete QApplicationPrivate::sys_font;
- QApplicationPrivate::sys_font = 0;
+ QApplicationPrivate::sys_font = nullptr;
delete QApplicationPrivate::set_font;
- QApplicationPrivate::set_font = 0;
+ QApplicationPrivate::set_font = nullptr;
app_fonts()->clear();
delete QApplicationPrivate::app_style;
- QApplicationPrivate::app_style = 0;
+ QApplicationPrivate::app_style = nullptr;
#if QT_CONFIG(draganddrop)
if (qt_is_gui_used)
@@ -856,7 +790,7 @@ void qt_cleanup()
QPixmapCache::clear();
QColormap::cleanup();
- QApplicationPrivate::active_window = 0; //### this should not be necessary
+ QApplicationPrivate::active_window = nullptr; //### this should not be necessary
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
if (displayDC) {
@@ -902,7 +836,7 @@ QWidget *QApplication::widgetAt(const QPoint &p)
QRegion newmask = (oldmask.isEmpty() ? QRegion(window->rect()) : oldmask)
- QRegion(wpoint.x(), wpoint.y(), 1, 1);
window->setMask(newmask);
- QWidget *recurse = 0;
+ QWidget *recurse = nullptr;
if (QApplication::topLevelAt(p) != window) // verify recursion will terminate
recurse = widgetAt(x, y);
if (oldmask.isEmpty())
@@ -935,7 +869,7 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis
|| event->type() == QEvent::LanguageChange)) {
for (QPostEventList::const_iterator it = postedEvents->constBegin(); it != postedEvents->constEnd(); ++it) {
const QPostEvent &cur = *it;
- if (cur.receiver != receiver || cur.event == 0 || cur.event->type() != event->type())
+ if (cur.receiver != receiver || cur.event == nullptr || cur.event->type() != event->type())
continue;
if (cur.event->type() == QEvent::LayoutRequest
|| cur.event->type() == QEvent::UpdateRequest) {
@@ -1045,16 +979,16 @@ QStyle *QApplication::style()
}
if (!defaultStyle) {
Q_ASSERT(!"No styles available!");
- return 0;
+ return nullptr;
}
// Take ownership of the style
defaultStyle->setParent(qApp);
- initSystemPalette();
-
if (testAttribute(Qt::AA_SetPalette))
defaultStyle->polish(*QGuiApplicationPrivate::app_pal);
+ else
+ QApplicationPrivate::initializeWidgetPalettesFromTheme();
#ifndef QT_NO_STYLE_STYLESHEET
if (!QApplicationPrivate::styleSheet.isEmpty()) {
@@ -1128,13 +1062,10 @@ void QApplication::setStyle(QStyle *style)
// take care of possible palette requirements of certain gui
// styles. Do it before polishing the application since the style
// might call QApplication::setPalette() itself
- if (testAttribute(Qt::AA_SetPalette)) {
+ if (testAttribute(Qt::AA_SetPalette))
QApplicationPrivate::app_style->polish(*QGuiApplicationPrivate::app_pal);
- } else {
- if (QApplicationPrivate::sys_pal)
- clearSystemPalette();
- initSystemPalette();
- }
+ else
+ QApplicationPrivate::initializeWidgetPalettesFromTheme();
// The default widget font hash is based on the platform theme,
// not the style, but the widget fonts could in theory have been
@@ -1206,7 +1137,7 @@ QStyle* QApplication::setStyle(const QString& style)
{
QStyle *s = QStyleFactory::create(style);
if (!s)
- return 0;
+ return nullptr;
setStyle(s);
return s;
@@ -1293,6 +1224,7 @@ void QApplication::setColorSpec(int spec)
\property QApplication::globalStrut
\brief the minimum size that any GUI element that the user can interact
with should have
+ \deprecated
For example, no button should be resized to be smaller than the global
strut size. The strut size should be considered when reimplementing GUI
@@ -1317,6 +1249,22 @@ void QApplication::setGlobalStrut(const QSize& strut)
// Widget specific palettes
QApplicationPrivate::PaletteHash QApplicationPrivate::widgetPalettes;
+QPalette QApplicationPrivate::basePalette() const
+{
+ // Start out with a palette based on the style, in case there's no theme
+ // available, or so that we can fill in missing roles in the theme.
+ QPalette palette = app_style ? app_style->standardPalette() : Qt::gray;
+
+ // Prefer theme palette if available, but fill in missing roles from style
+ // for compatibility. Note that the style's standard palette is not prioritized
+ // over the theme palette, as the documented way of applying the style's palette
+ // is to set it explicitly using QApplication::setPalette().
+ if (const QPalette *themePalette = platformTheme() ? platformTheme()->palette() : nullptr)
+ palette = themePalette->resolve(palette);
+
+ return palette;
+}
+
/*!
\fn QPalette QApplication::palette(const QWidget* widget)
@@ -1363,35 +1311,8 @@ QPalette QApplication::palette(const char *className)
return QGuiApplication::palette();
}
-void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* className)
-{
- QPalette pal = palette;
-
- if (QApplicationPrivate::app_style)
- QApplicationPrivate::app_style->polish(pal); // NB: non-const reference
-
- bool all = false;
- if (!className) {
- if (!QGuiApplicationPrivate::setPalette(pal))
- return;
-
- if (!QApplicationPrivate::sys_pal || !palette.isCopyOf(*QApplicationPrivate::sys_pal))
- QCoreApplication::setAttribute(Qt::AA_SetPalette);
-
- if (!widgetPalettes.isEmpty()) {
- all = true;
- widgetPalettes.clear();
- }
- } else {
- widgetPalettes.insert(className, pal);
- }
-
- if (qApp)
- qApp->d_func()->sendApplicationPaletteChange(all, className);
-}
-
/*!
- Changes the default application palette to \a palette.
+ Changes the application palette to \a palette.
If \a className is passed, the change applies only to widgets that inherit
\a className (as reported by QObject::inherits()). If \a className is left
@@ -1412,23 +1333,87 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
\sa QWidget::setPalette(), palette(), QStyle::polish()
*/
-
void QApplication::setPalette(const QPalette &palette, const char* className)
{
- QApplicationPrivate::setPalette_helper(palette, className);
+ QPalette polishedPalette = palette;
+
+ if (QApplicationPrivate::app_style)
+ QApplicationPrivate::app_style->polish(polishedPalette);
+
+ if (className) {
+ QApplicationPrivate::widgetPalettes.insert(className, polishedPalette);
+ if (qApp)
+ qApp->d_func()->handlePaletteChanged(className);
+ } else {
+ QGuiApplication::setPalette(polishedPalette);
+ }
}
+void QApplicationPrivate::handlePaletteChanged(const char *className)
+{
+ if (!is_app_running || is_app_closing)
+ return;
+
+ // Setting the global application palette is documented to
+ // reset any previously set class specific widget palettes.
+ bool sendPaletteChangeToAllWidgets = false;
+ if (!className && !widgetPalettes.isEmpty()) {
+ sendPaletteChangeToAllWidgets = true;
+ widgetPalettes.clear();
+ }
+ QGuiApplicationPrivate::handlePaletteChanged(className);
-void QApplicationPrivate::setSystemPalette(const QPalette &pal)
+ QEvent event(QEvent::ApplicationPaletteChange);
+ const QWidgetList widgets = QApplication::allWidgets();
+ for (auto widget : widgets) {
+ if (sendPaletteChangeToAllWidgets || (!className && widget->isWindow()) || (className && widget->inherits(className)))
+ QCoreApplication::sendEvent(widget, &event);
+ }
+
+#if QT_CONFIG(graphicsview)
+ for (auto scene : qAsConst(scene_list))
+ QCoreApplication::sendEvent(scene, &event);
+#endif
+
+ // Palette has been reset back to the default application palette,
+ // so we need to reinitialize the widget palettes from the theme.
+ if (!className && !testAttribute(Qt::AA_SetPalette))
+ initializeWidgetPalettesFromTheme();
+}
+
+void QApplicationPrivate::initializeWidgetPalettesFromTheme()
{
- if (!sys_pal)
- sys_pal = new QPalette(pal);
- else
- *sys_pal = pal;
+ QPlatformTheme *platformTheme = QGuiApplicationPrivate::platformTheme();
+ if (!platformTheme)
+ return;
+
+ widgetPalettes.clear();
- if (!testAttribute(Qt::AA_SetPalette))
- QApplication::setPalette(*sys_pal);
+ struct ThemedWidget { const char *className; QPlatformTheme::Palette palette; };
+
+ static const ThemedWidget themedWidgets[] = {
+ { "QToolButton", QPlatformTheme::ToolButtonPalette },
+ { "QAbstractButton", QPlatformTheme::ButtonPalette },
+ { "QCheckBox", QPlatformTheme::CheckBoxPalette },
+ { "QRadioButton", QPlatformTheme::RadioButtonPalette },
+ { "QHeaderView", QPlatformTheme::HeaderPalette },
+ { "QAbstractItemView", QPlatformTheme::ItemViewPalette },
+ { "QMessageBoxLabel", QPlatformTheme::MessageBoxLabelPalette },
+ { "QTabBar", QPlatformTheme::TabBarPalette },
+ { "QLabel", QPlatformTheme::LabelPalette },
+ { "QGroupBox", QPlatformTheme::GroupBoxPalette },
+ { "QMenu", QPlatformTheme::MenuPalette },
+ { "QMenuBar", QPlatformTheme::MenuBarPalette },
+ { "QTextEdit", QPlatformTheme::TextEditPalette },
+ { "QTextControl", QPlatformTheme::TextEditPalette },
+ { "QLineEdit", QPlatformTheme::TextLineEditPalette },
+ };
+
+ for (const auto themedWidget : themedWidgets) {
+ if (auto *palette = platformTheme->palette(themedWidget.palette))
+ QApplication::setPalette(*palette, themedWidget.className);
+ }
}
/*!
@@ -1686,7 +1671,7 @@ void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason)
return;
#endif
- hidden_focus_widget = 0;
+ hidden_focus_widget = nullptr;
if (focus != focus_widget) {
if (focus && focus->isHidden()) {
@@ -1884,7 +1869,7 @@ bool QApplication::event(QEvent *e)
#endif
} else if (e->type() == QEvent::Timer) {
QTimerEvent *te = static_cast<QTimerEvent*>(e);
- Q_ASSERT(te != 0);
+ Q_ASSERT(te != nullptr);
if (te->timerId() == d->toolTipWakeUp.timerId()) {
d->toolTipWakeUp.stop();
if (d->toolTipWidget) {
@@ -1896,14 +1881,14 @@ bool QApplication::event(QEvent *e)
while (w && !showToolTip) {
showToolTip = w->isActiveWindow();
w = w->parentWidget();
- w = w ? w->window() : 0;
+ w = w ? w->window() : nullptr;
}
if (showToolTip) {
QHelpEvent e(QEvent::ToolTip, d->toolTipPos, d->toolTipGlobalPos);
QCoreApplication::sendEvent(d->toolTipWidget, &e);
if (e.isAccepted()) {
QStyle *s = d->toolTipWidget->style();
- int sleepDelay = s->styleHint(QStyle::SH_ToolTip_FallAsleepDelay, 0, d->toolTipWidget, 0);
+ int sleepDelay = s->styleHint(QStyle::SH_ToolTip_FallAsleepDelay, nullptr, d->toolTipWidget, nullptr);
d->toolTipFallAsleep.start(sleepDelay, this);
}
}
@@ -1973,7 +1958,7 @@ void QApplicationPrivate::notifyLayoutDirectionChange()
*/
void QApplication::setActiveWindow(QWidget* act)
{
- QWidget* window = act?act->window():0;
+ QWidget* window = act?act->window():nullptr;
if (QApplicationPrivate::active_window == window)
return;
@@ -1989,7 +1974,7 @@ void QApplication::setActiveWindow(QWidget* act)
QWidgetList toBeDeactivated;
if (QApplicationPrivate::active_window) {
- if (style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, QApplicationPrivate::active_window)) {
+ if (style()->styleHint(QStyle::SH_Widget_ShareActivation, nullptr, QApplicationPrivate::active_window)) {
const QWidgetList list = topLevelWidgets();
for (auto *w : list) {
if (w->isVisible() && w->isActiveWindow())
@@ -2011,7 +1996,7 @@ void QApplication::setActiveWindow(QWidget* act)
QApplicationPrivate::active_window = window;
if (QApplicationPrivate::active_window) {
- if (style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, QApplicationPrivate::active_window)) {
+ if (style()->styleHint(QStyle::SH_Widget_ShareActivation, nullptr, QApplicationPrivate::active_window)) {
const QWidgetList list = topLevelWidgets();
for (auto *w : list) {
if (w->isVisible() && w->isActiveWindow())
@@ -2040,10 +2025,10 @@ void QApplication::setActiveWindow(QWidget* act)
sendSpontaneousEvent(w, &activationChange);
}
- if (QApplicationPrivate::popupWidgets == 0) { // !inPopupMode()
+ if (QApplicationPrivate::popupWidgets == nullptr) { // !inPopupMode()
// then focus events
if (!QApplicationPrivate::active_window && QApplicationPrivate::focus_widget) {
- QApplicationPrivate::setFocusWidget(0, Qt::ActiveWindowFocusReason);
+ QApplicationPrivate::setFocusWidget(nullptr, Qt::ActiveWindowFocusReason);
} else if (QApplicationPrivate::active_window) {
QWidget *w = QApplicationPrivate::active_window->focusWidget();
if (w && w->isVisible() /*&& w->focusPolicy() != QWidget::NoFocus*/)
@@ -2058,7 +2043,7 @@ void QApplication::setActiveWindow(QWidget* act)
if (!w && QApplicationPrivate::active_window->focusPolicy() != Qt::NoFocus)
QApplicationPrivate::setFocusWidget(QApplicationPrivate::active_window, Qt::ActiveWindowFocusReason);
else if (!QApplicationPrivate::active_window->isAncestorOf(w))
- QApplicationPrivate::setFocusWidget(0, Qt::ActiveWindowFocusReason);
+ QApplicationPrivate::setFocusWidget(nullptr, Qt::ActiveWindowFocusReason);
}
}
}
@@ -2086,7 +2071,7 @@ QWidget *qt_tlw_for_window(QWindow *wnd)
return tlw;
}
}
- return 0;
+ return nullptr;
}
void QApplicationPrivate::notifyActiveWindowChange(QWindow *previous)
@@ -2150,7 +2135,7 @@ QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool
test = test->d_func()->focus_next;
}
- if (wrappingOccurred != 0)
+ if (wrappingOccurred != nullptr)
*wrappingOccurred = next ? focusWidgetAfterWindow : !focusWidgetAfterWindow;
if (w == f) {
@@ -2158,7 +2143,7 @@ QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool
w->window()->setAttribute(Qt::WA_KeyboardFocusChange);
w->update();
}
- return 0;
+ return nullptr;
}
return w;
}
@@ -2240,7 +2225,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave, con
QEvent leaveEvent(QEvent::Leave);
for (int i = 0; i < leaveList.size(); ++i) {
auto *w = leaveList.at(i);
- if (!QApplication::activeModalWidget() || QApplicationPrivate::tryModalHelper(w, 0)) {
+ if (!QApplication::activeModalWidget() || QApplicationPrivate::tryModalHelper(w, nullptr)) {
QCoreApplication::sendEvent(w, &leaveEvent);
if (w->testAttribute(Qt::WA_Hover) &&
(!QApplication::activePopupWidget() || QApplication::activePopupWidget() == w->window())) {
@@ -2259,7 +2244,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave, con
const QPoint windowPos = qAsConst(enterList).back()->window()->mapFromGlobal(globalPos);
for (auto it = enterList.crbegin(), end = enterList.crend(); it != end; ++it) {
auto *w = *it;
- if (!QApplication::activeModalWidget() || QApplicationPrivate::tryModalHelper(w, 0)) {
+ if (!QApplication::activeModalWidget() || QApplicationPrivate::tryModalHelper(w, nullptr)) {
const QPointF localPos = w->mapFromGlobal(globalPos);
QEnterEvent enterEvent(localPos, windowPos, globalPosF);
QCoreApplication::sendEvent(w, &enterEvent);
@@ -2279,7 +2264,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave, con
const bool enterOnAlien = (enter && (isAlien(enter) || enter->testAttribute(Qt::WA_DontShowOnScreen)));
// Whenever we leave an alien widget on X11/QPA, we need to reset its nativeParentWidget()'s cursor.
// This is not required on Windows as the cursor is reset on every single mouse move.
- QWidget *parentOfLeavingCursor = 0;
+ QWidget *parentOfLeavingCursor = nullptr;
for (int i = 0; i < leaveList.size(); ++i) {
auto *w = leaveList.at(i);
if (!isAlien(w))
@@ -2345,7 +2330,7 @@ bool QApplicationPrivate::isBlockedByModal(QWidget *widget)
bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWindow) const
{
- QWindow *unused = 0;
+ QWindow *unused = nullptr;
if (Q_UNLIKELY(!window)) {
qWarning().nospace() << "window == 0 passed.";
return false;
@@ -2354,13 +2339,13 @@ bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWin
blockingWindow = &unused;
if (modalWindowList.isEmpty()) {
- *blockingWindow = 0;
+ *blockingWindow = nullptr;
return false;
}
QWidget *popupWidget = QApplication::activePopupWidget();
- QWindow *popupWindow = popupWidget ? popupWidget->windowHandle() : 0;
+ QWindow *popupWindow = popupWidget ? popupWidget->windowHandle() : nullptr;
if (popupWindow == window || (!popupWindow && QWindowPrivate::get(window)->isPopup())) {
- *blockingWindow = 0;
+ *blockingWindow = nullptr;
return false;
}
@@ -2370,7 +2355,7 @@ bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWin
// A window is not blocked by another modal window if the two are
// the same, or if the window is a child of the modal window.
if (window == modalWindow || modalWindow->isAncestorOf(window, QWindow::IncludeTransients)) {
- *blockingWindow = 0;
+ *blockingWindow = nullptr;
return false;
}
@@ -2381,7 +2366,7 @@ bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWin
// modalWindow's widget, this normally happens when waiting for a
// native dialog. use WindowModal if we are the child of a group
// leader; otherwise use ApplicationModal.
- QWidget *m = modalWidgetWindow ? modalWidgetWindow->widget() : 0;
+ QWidget *m = modalWidgetWindow ? modalWidgetWindow->widget() : nullptr;
while (m && !m->testAttribute(Qt::WA_GroupLeader)) {
m = m->parentWidget();
if (m)
@@ -2396,13 +2381,13 @@ bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWin
case Qt::ApplicationModal:
{
QWidgetWindow *widgetWindow = qobject_cast<QWidgetWindow *>(window);
- QWidget *groupLeaderForWidget = widgetWindow ? widgetWindow->widget() : 0;
+ QWidget *groupLeaderForWidget = widgetWindow ? widgetWindow->widget() : nullptr;
while (groupLeaderForWidget && !groupLeaderForWidget->testAttribute(Qt::WA_GroupLeader))
groupLeaderForWidget = groupLeaderForWidget->parentWidget();
if (groupLeaderForWidget) {
// if \a widget has WA_GroupLeader, it can only be blocked by ApplicationModal children
- QWidget *m = modalWidgetWindow ? modalWidgetWindow->widget() : 0;
+ QWidget *m = modalWidgetWindow ? modalWidgetWindow->widget() : nullptr;
while (m && m != groupLeaderForWidget && !m->testAttribute(Qt::WA_GroupLeader))
m = m->parentWidget();
if (m == groupLeaderForWidget) {
@@ -2442,7 +2427,7 @@ bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWin
break;
}
}
- *blockingWindow = 0;
+ *blockingWindow = nullptr;
return false;
}
@@ -2466,7 +2451,7 @@ bool QApplicationPrivate::tryModalHelper(QWidget *widget, QWidget **rettop)
bool qt_try_modal(QWidget *widget, QEvent::Type type)
{
- QWidget * top = 0;
+ QWidget * top = nullptr;
if (QApplicationPrivate::tryModalHelper(widget, &top))
return true;
@@ -2491,7 +2476,7 @@ bool qt_try_modal(QWidget *widget, QEvent::Type type)
break;
}
- if (block_event && top && top->parentWidget() == 0)
+ if (block_event && top && top->parentWidget() == nullptr)
top->raise();
return !block_event;
@@ -2515,11 +2500,11 @@ QWidget *QApplicationPrivate::pickMouseReceiver(QWidget *candidate, const QPoint
QWidget *mouseGrabber = QWidget::mouseGrabber();
if (((type == QEvent::MouseMove && buttons) || (type == QEvent::MouseButtonRelease))
&& !buttonDown && !mouseGrabber) {
- return 0;
+ return nullptr;
}
if (alienWidget && alienWidget->internalWinId())
- alienWidget = 0;
+ alienWidget = nullptr;
QWidget *receiver = candidate;
@@ -2552,7 +2537,7 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
Q_ASSERT(buttonDown);
if (alienWidget && !isAlien(alienWidget))
- alienWidget = 0;
+ alienWidget = nullptr;
QPointer<QWidget> receiverGuard = receiver;
QPointer<QWidget> nativeGuard = nativeWidget;
@@ -2567,7 +2552,7 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
// leaveAfterRelease has not been updated.
// This happens e.g. when modal dialog or popup is shown as a response to button click.
if (leaveAfterRelease && !*buttonDown && !event->buttons())
- leaveAfterRelease = 0;
+ leaveAfterRelease = nullptr;
if (*buttonDown) {
if (!graphicsWidget) {
@@ -2576,7 +2561,7 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
if ((alienWidget || !receiver->internalWinId()) && !leaveAfterRelease && !QWidget::mouseGrabber())
leaveAfterRelease = *buttonDown;
if (event->type() == QEvent::MouseButtonRelease && !event->buttons())
- *buttonDown = 0;
+ *buttonDown = nullptr;
}
} else if (lastMouseReceiver && widgetUnderMouse) {
// Dispatch enter/leave if we move:
@@ -2604,7 +2589,7 @@ 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;
+ const bool wasLeaveAfterRelease = leaveAfterRelease != nullptr;
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
@@ -2622,18 +2607,18 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
// Dispatch enter/leave if:
// 1) the mouse grabber is an alien widget
// 2) the button is released on an alien widget
- QWidget *enter = 0;
+ QWidget *enter = nullptr;
if (nativeGuard)
enter = alienGuard ? alienWidget : nativeWidget;
else // The receiver is typically deleted on mouse release with drag'n'drop.
enter = QApplication::widgetAt(event->globalPos());
dispatchEnterLeave(enter, leaveAfterRelease, event->screenPos());
- leaveAfterRelease = 0;
+ leaveAfterRelease = nullptr;
lastMouseReceiver = enter;
} else if (!wasLeaveAfterRelease) {
if (activePopupWidget) {
if (!QWidget::mouseGrabber())
- lastMouseReceiver = alienGuard ? alienWidget : (nativeGuard ? nativeWidget : 0);
+ lastMouseReceiver = alienGuard ? alienWidget : (nativeGuard ? nativeWidget : nullptr);
} else {
lastMouseReceiver = receiverGuard ? receiver : QApplication::widgetAt(event->globalPos());
}
@@ -2688,7 +2673,7 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
return; // Mouse cursor not inside the widget or any of its children.
if (widget->data->in_destructor && qt_button_down == widget)
- qt_button_down = 0;
+ qt_button_down = nullptr;
// A mouse move is not actually sent, but we utilize the sendMouseEvent() call to send the
// enter/leave events as appropriate
@@ -3040,9 +3025,9 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
key->accept();
else
key->ignore();
- QWidget *w = isWidget ? static_cast<QWidget *>(receiver) : 0;
+ QWidget *w = isWidget ? static_cast<QWidget *>(receiver) : nullptr;
#if QT_CONFIG(graphicsview)
- QGraphicsWidget *gw = isGraphicsWidget ? static_cast<QGraphicsWidget *>(receiver) : 0;
+ QGraphicsWidget *gw = isGraphicsWidget ? static_cast<QGraphicsWidget *>(receiver) : nullptr;
#endif
res = d->notify_helper(receiver, e);
@@ -3104,7 +3089,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
d->toolTipPos = relpos;
d->toolTipGlobalPos = mouse->globalPos();
QStyle *s = d->toolTipWidget->style();
- int wakeDelay = s->styleHint(QStyle::SH_ToolTip_WakeUpDelay, 0, d->toolTipWidget, 0);
+ int wakeDelay = s->styleHint(QStyle::SH_ToolTip_WakeUpDelay, nullptr, d->toolTipWidget, nullptr);
d->toolTipWakeUp.start(d->toolTipFallAsleep.isActive() ? 20 : wakeDelay, this);
}
}
@@ -3434,7 +3419,7 @@ QT_WARNING_POP
&& !isProxyWidget
#endif
)
- QDragManager::self()->setCurrentTarget(0, e->type() == QEvent::Drop);
+ QDragManager::self()->setCurrentTarget(nullptr, e->type() == QEvent::Drop);
}
break;
#endif
@@ -3465,7 +3450,7 @@ QT_WARNING_POP
eventAccepted = touchEvent->isAccepted();
if (p.isNull()) {
// widget was deleted
- widget = 0;
+ widget = nullptr;
} else {
widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, res && eventAccepted);
}
@@ -3652,7 +3637,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
// send to all application event filters
if (threadRequiresCoreApplication()
- && receiver->d_func()->threadData->thread.loadAcquire() == mainThread()
+ && receiver->d_func()->threadData.loadRelaxed()->thread.loadAcquire() == mainThread()
&& sendThroughApplicationEventFilters(receiver, e)) {
filtered = true;
return filtered;
@@ -3690,7 +3675,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
bool QApplicationPrivate::inPopupMode()
{
- return QApplicationPrivate::popupWidgets != 0;
+ return QApplicationPrivate::popupWidgets != nullptr;
}
static void ungrabKeyboardForPopup(QWidget *popup)
@@ -3734,13 +3719,13 @@ void QApplicationPrivate::closePopup(QWidget *popup)
popupWidgets->removeAll(popup);
if (popup == qt_popup_down) {
- qt_button_down = 0;
- qt_popup_down = 0;
+ qt_button_down = nullptr;
+ qt_popup_down = nullptr;
}
if (QApplicationPrivate::popupWidgets->count() == 0) { // this was the last popup
delete QApplicationPrivate::popupWidgets;
- QApplicationPrivate::popupWidgets = 0;
+ QApplicationPrivate::popupWidgets = nullptr;
if (popupGrabOk) {
popupGrabOk = false;
@@ -3778,7 +3763,9 @@ void QApplicationPrivate::closePopup(QWidget *popup)
if (QWidget *fw = aw->focusWidget())
fw->setFocus(Qt::PopupFocusReason);
- if (QApplicationPrivate::popupWidgets->count() == 1) // grab mouse/keyboard
+ // can become nullptr due to setFocus() above
+ if (QApplicationPrivate::popupWidgets &&
+ QApplicationPrivate::popupWidgets->count() == 1) // grab mouse/keyboard
grabForPopup(aw);
}
@@ -4108,7 +4095,7 @@ void QApplicationPrivate::giveFocusAccordingToFocusPolicy(QWidget *widget, QEven
{
const bool setFocusOnRelease = QGuiApplication::styleHints()->setFocusOnTouchRelease();
Qt::FocusPolicy focusPolicy = Qt::ClickFocus;
- static QPointer<QWidget> focusedWidgetOnTouchBegin = 0;
+ static QPointer<QWidget> focusedWidgetOnTouchBegin = nullptr;
switch (event->type()) {
case QEvent::MouseButtonPress:
@@ -4215,7 +4202,7 @@ QWidget *QApplicationPrivate::findClosestTouchPointTarget(QTouchDevice *device,
{
const QPointF screenPos = touchPoint.screenPos();
int closestTouchPointId = -1;
- QObject *closestTarget = 0;
+ QObject *closestTarget = nullptr;
qreal closestDistance = qreal(0.);
QHash<ActiveTouchPointsKey, ActiveTouchPointsValue>::const_iterator it = activeTouchPoints.constBegin(),
ite = activeTouchPoints.constEnd();
@@ -4301,7 +4288,7 @@ bool QApplicationPrivate::translateRawTouchEvent(QWidget *window,
if (!target)
continue;
}
- Q_ASSERT(target.data() != 0);
+ Q_ASSERT(target.data() != nullptr);
QWidget *targetWidget = static_cast<QWidget *>(target.data());
@@ -4327,7 +4314,7 @@ bool QApplicationPrivate::translateRawTouchEvent(QWidget *window,
const QHash<QWidget *, StatesAndTouchPoints>::ConstIterator end = widgetsNeedingEvents.constEnd();
for (; it != end; ++it) {
const QPointer<QWidget> widget = it.key();
- if (!QApplicationPrivate::tryModalHelper(widget, 0))
+ if (!QApplicationPrivate::tryModalHelper(widget, nullptr))
continue;
QEvent::Type eventType;
@@ -4414,29 +4401,8 @@ void QApplicationPrivate::translateTouchCancel(QTouchDevice *device, ulong times
void QApplicationPrivate::notifyThemeChanged()
{
QGuiApplicationPrivate::notifyThemeChanged();
- clearSystemPalette();
- initSystemPalette();
- qt_init_tooltip_palette();
-}
-
-void QApplicationPrivate::sendApplicationPaletteChange(bool toAllWidgets, const char *className)
-{
- if (!is_app_running || is_app_closing)
- return;
- QGuiApplicationPrivate::sendApplicationPaletteChange(toAllWidgets, className);
-
- QEvent event(QEvent::ApplicationPaletteChange);
- const QWidgetList widgets = QApplication::allWidgets();
- for (auto widget : widgets) {
- if (toAllWidgets || (!className && widget->isWindow()) || (className && widget->inherits(className)))
- QCoreApplication::sendEvent(widget, &event);
- }
-
-#if QT_CONFIG(graphicsview)
- for (auto scene : qAsConst(scene_list))
- QCoreApplication::sendEvent(scene, &event);
-#endif // QT_CONFIG(graphicsview)
+ qt_init_tooltip_palette();
}
#if QT_CONFIG(draganddrop)
@@ -4457,7 +4423,7 @@ QGestureManager* QGestureManager::instance(InstanceCreation ic)
{
QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
if (!qAppPriv)
- return 0;
+ return nullptr;
if (!qAppPriv->gestureManager && ic == ForceCreation)
qAppPriv->gestureManager = new QGestureManager(qApp);
return qAppPriv->gestureManager;
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index 27e743a28d..6de72899f1 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -79,7 +79,9 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
#if QT_CONFIG(wheelevent)
Q_PROPERTY(int wheelScrollLines READ wheelScrollLines WRITE setWheelScrollLines)
#endif
+#if QT_DEPRECATED_SINCE(5, 15)
Q_PROPERTY(QSize globalStrut READ globalStrut WRITE setGlobalStrut)
+#endif
Q_PROPERTY(int startDragTime READ startDragTime WRITE setStartDragTime)
Q_PROPERTY(int startDragDistance READ startDragDistance WRITE setStartDragDistance)
#ifndef QT_NO_STYLE_STYLESHEET
@@ -158,8 +160,10 @@ public:
static void setWheelScrollLines(int);
static int wheelScrollLines();
#endif
+#if QT_DEPRECATED_SINCE(5, 15)
static void setGlobalStrut(const QSize &);
static QSize globalStrut();
+#endif
static void setStartDragTime(int ms);
static int startDragTime();
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 71f695cc18..ab6d85aeb9 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -158,12 +158,12 @@ public:
static QSize app_strut;
static QWidgetList *popupWidgets;
static QStyle *app_style;
- static QPalette *sys_pal;
protected:
void notifyThemeChanged() override;
- void sendApplicationPaletteChange(bool toAllWidgets = false,
- const char *className = nullptr) override;
+
+ QPalette basePalette() const override;
+ void handlePaletteChanged(const char *className = nullptr) override;
#if QT_CONFIG(draganddrop)
void notifyDragStarted(const QDrag *) override;
@@ -184,9 +184,7 @@ public:
static int enabledAnimations; // Combination of QPlatformTheme::UiEffect
static bool widgetCount; // Coupled with -widgetcount switch
- static void setSystemPalette(const QPalette &pal);
- static void setPalette_helper(const QPalette &palette, const char* className);
- static void initializeWidgetPaletteHash();
+ static void initializeWidgetPalettesFromTheme();
static void initializeWidgetFontHash();
static void setSystemFont(const QFont &font);
diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp
index 76d8533271..7b09adfbf0 100644
--- a/src/widgets/kernel/qboxlayout.cpp
+++ b/src/widgets/kernel/qboxlayout.cpp
@@ -278,7 +278,7 @@ void QBoxLayoutPrivate::setupGeom()
int fixedSpacing = q->spacing();
int previousNonEmptyIndex = -1;
- QStyle *style = 0;
+ QStyle *style = nullptr;
if (fixedSpacing < 0) {
if (QWidget *parentWidget = q->parentWidget())
style = parentWidget->style();
@@ -318,7 +318,7 @@ void QBoxLayoutPrivate::setupGeom()
if (style) {
spacing = style->combinedLayoutSpacing(actual1, actual2,
horz(dir) ? Qt::Horizontal : Qt::Vertical,
- 0, q->parentWidget());
+ nullptr, q->parentWidget());
if (spacing < 0)
spacing = 0;
}
@@ -433,10 +433,10 @@ QLayoutItem* QBoxLayoutPrivate::replaceAt(int index, QLayoutItem *item)
{
Q_Q(QBoxLayout);
if (!item)
- return 0;
+ return nullptr;
QBoxLayoutItem *b = list.value(index);
if (!b)
- return 0;
+ return nullptr;
QLayoutItem *r = b->item;
b->item = item;
@@ -551,7 +551,7 @@ QLayoutItem* QBoxLayoutPrivate::replaceAt(int index, QLayoutItem *item)
\sa direction()
*/
QBoxLayout::QBoxLayout(Direction dir, QWidget *parent)
- : QLayout(*new QBoxLayoutPrivate, 0, parent)
+ : QLayout(*new QBoxLayoutPrivate, nullptr, parent)
{
Q_D(QBoxLayout);
d->dir = dir;
@@ -684,7 +684,7 @@ int QBoxLayout::minimumHeightForWidth(int w) const
Q_D(const QBoxLayout);
(void) heightForWidth(w);
int top, bottom;
- d->effectiveMargins(0, &top, 0, &bottom);
+ d->effectiveMargins(nullptr, &top, nullptr, &bottom);
return d->hasHfw ? (d->hfwMinHeight + top + bottom) : -1;
}
@@ -713,7 +713,7 @@ int QBoxLayout::count() const
QLayoutItem *QBoxLayout::itemAt(int index) const
{
Q_D(const QBoxLayout);
- return index >= 0 && index < d->list.count() ? d->list.at(index)->item : 0;
+ return index >= 0 && index < d->list.count() ? d->list.at(index)->item : nullptr;
}
/*!
@@ -723,16 +723,16 @@ QLayoutItem *QBoxLayout::takeAt(int index)
{
Q_D(QBoxLayout);
if (index < 0 || index >= d->list.count())
- return 0;
+ return nullptr;
QBoxLayoutItem *b = d->list.takeAt(index);
QLayoutItem *item = b->item;
- b->item = 0;
+ b->item = nullptr;
delete b;
if (QLayout *l = item->layout()) {
// sanity check in case the user passed something weird to QObject::setParent()
if (l->parent() == this)
- l->setParent(0);
+ l->setParent(nullptr);
}
invalidate();
@@ -1173,7 +1173,7 @@ void QBoxLayout::setDirection(Direction direction)
if (box->magic) {
QSpacerItem *sp = box->item->spacerItem();
if (sp) {
- if (sp->expandingDirections() == Qt::Orientations(0) /*No Direction*/) {
+ if (sp->expandingDirections() == Qt::Orientations{} /*No Direction*/) {
//spacing or strut
QSize s = sp->sizeHint();
sp->changeSize(s.height(), s.width(),
diff --git a/src/widgets/kernel/qdesktopwidget.cpp b/src/widgets/kernel/qdesktopwidget.cpp
index 9e90adec46..9f98af86e3 100644
--- a/src/widgets/kernel/qdesktopwidget.cpp
+++ b/src/widgets/kernel/qdesktopwidget.cpp
@@ -205,7 +205,7 @@ QT_WARNING_POP
}
QDesktopWidget::QDesktopWidget()
- : QWidget(*new QDesktopWidgetPrivate, 0, Qt::Desktop)
+ : QWidget(*new QDesktopWidgetPrivate, nullptr, Qt::Desktop)
{
Q_D(QDesktopWidget);
setObjectName(QLatin1String("desktop"));
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index 6f7527c013..4ffa226d7f 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -199,18 +199,17 @@ public:
ItemMatrix m_matrix;
QList<QFormLayoutItem *> m_things;
- int layoutWidth; // the last width that we called setupVerticalLayoutData on (for vLayouts)
+ int layoutWidth = -1; // the last width that we called setupVerticalLayoutData on (for vLayouts)
- int hfw_width; // the last width we calculated HFW for
- int hfw_height; // what that height was
- int hfw_minheight; // what that minheight was
+ int hfw_width = -1; // the last width we calculated HFW for
+ int hfw_height = -1; // what that height was
- int hfw_sh_height; // the hfw for sh_width
- int hfw_sh_minheight; // the minhfw for sh_width
+ int hfw_sh_height = -1; // the hfw for sh_width
+ int hfw_sh_minheight = -1; // the minhfw for sh_width
- int min_width; // the width that gets turned into minSize (from updateSizes)
- int sh_width; // the width that gets turned into prefSize (from updateSizes)
- int thresh_width; // the width that we start splitting label/field pairs at (from updateSizes)
+ int min_width = -1; // the width that gets turned into minSize (from updateSizes)
+ int sh_width = -1; // the width that gets turned into prefSize (from updateSizes)
+ int thresh_width = QLAYOUTSIZE_MAX; // the width that we start splitting label/field pairs at (from updateSizes)
QSize minSize;
QSize prefSize;
int formMaxWidth;
@@ -222,17 +221,15 @@ public:
QVector<QLayoutStruct> hfwLayouts;
- int hSpacing;
- int vSpacing;
+ int hSpacing = -1;
+ int vSpacing = -1;
QLayoutItem* replaceAt(int index, QLayoutItem*) override;
};
QFormLayoutPrivate::QFormLayoutPrivate()
: fieldGrowthPolicy(DefaultFieldGrowthPolicy),
rowWrapPolicy(DefaultRowWrapPolicy), has_hfw(false), dirty(true), sizesDirty(true),
- expandVertical(0), expandHorizontal(0), labelAlignment(0), formAlignment(0),
- layoutWidth(-1), hfw_width(-1), hfw_sh_height(-1), min_width(-1),
- sh_width(-1), thresh_width(QLAYOUTSIZE_MAX), hSpacing(-1), vSpacing(-1)
+ expandVertical(0), expandHorizontal(0)
{
}
@@ -298,11 +295,11 @@ void QFormLayoutPrivate::updateSizes()
bool expandH = false;
bool expandV = false;
- QFormLayoutItem *prevLbl = 0;
- QFormLayoutItem *prevFld = 0;
+ QFormLayoutItem *prevLbl = nullptr;
+ QFormLayoutItem *prevFld = nullptr;
QWidget *parent = q->parentWidget();
- QStyle *style = parent ? parent->style() : 0;
+ QStyle *style = parent ? parent->style() : nullptr;
int userVSpacing = q->verticalSpacing();
int userHSpacing = wrapAllRows ? 0 : q->horizontalSpacing();
@@ -367,9 +364,9 @@ void QFormLayoutPrivate::updateSizes()
QSizePolicy::ControlTypes fldtoptypes =
QSizePolicy::ControlTypes(fldtop ? fldtop->controlTypes() : QSizePolicy::DefaultType);
if (label && lbltop)
- label->vSpace = style->combinedLayoutSpacing(lbltoptypes, lbltypes, Qt::Vertical, 0, parent);
+ label->vSpace = style->combinedLayoutSpacing(lbltoptypes, lbltypes, Qt::Vertical, nullptr, parent);
if (field && fldtop)
- field->vSpace = style->combinedLayoutSpacing(fldtoptypes, fldtypes, Qt::Vertical, 0, parent);
+ field->vSpace = style->combinedLayoutSpacing(fldtoptypes, fldtypes, Qt::Vertical, nullptr, parent);
} else {
// Side by side.. we have to also consider the spacings to empty cells, which can strangely be more than
// non empty cells..
@@ -383,21 +380,21 @@ void QFormLayoutPrivate::updateSizes()
// To be compatible to QGridLayout, we have to compare solitary labels & fields with both predecessors
if (label) {
if (!field) {
- int lblspacing = style->combinedLayoutSpacing(lbltoptypes, lbltypes, Qt::Vertical, 0, parent);
- int fldspacing = style->combinedLayoutSpacing(fldtoptypes, lbltypes, Qt::Vertical, 0, parent);
+ int lblspacing = style->combinedLayoutSpacing(lbltoptypes, lbltypes, Qt::Vertical, nullptr, parent);
+ int fldspacing = style->combinedLayoutSpacing(fldtoptypes, lbltypes, Qt::Vertical, nullptr, parent);
label->vSpace = qMax(lblspacing, fldspacing);
} else
- label->vSpace = style->combinedLayoutSpacing(lbltoptypes, lbltypes, Qt::Vertical, 0, parent);
+ label->vSpace = style->combinedLayoutSpacing(lbltoptypes, lbltypes, Qt::Vertical, nullptr, parent);
}
if (field) {
// check spacing against both the previous label and field
if (!label) {
- int lblspacing = style->combinedLayoutSpacing(lbltoptypes, fldtypes, Qt::Vertical, 0, parent);
- int fldspacing = style->combinedLayoutSpacing(fldtoptypes, fldtypes, Qt::Vertical, 0, parent);
+ int lblspacing = style->combinedLayoutSpacing(lbltoptypes, fldtypes, Qt::Vertical, nullptr, parent);
+ int fldspacing = style->combinedLayoutSpacing(fldtoptypes, fldtypes, Qt::Vertical, nullptr, parent);
field->vSpace = qMax(lblspacing, fldspacing);
} else
- field->vSpace = style->combinedLayoutSpacing(fldtoptypes, fldtypes, Qt::Vertical, 0, parent);
+ field->vSpace = style->combinedLayoutSpacing(fldtoptypes, fldtypes, Qt::Vertical, nullptr, parent);
}
}
}
@@ -406,7 +403,7 @@ void QFormLayoutPrivate::updateSizes()
// hard-coded the left and right control types so that all the rows have the same
// inter-column spacing (otherwise the right column isn't always left aligned)
if (userHSpacing < 0 && !wrapAllRows && (label || !field->fullRow) && field)
- field->sbsHSpace = style->combinedLayoutSpacing(QSizePolicy::Label, QSizePolicy::LineEdit, Qt::Horizontal, 0, parent);
+ field->sbsHSpace = style->combinedLayoutSpacing(QSizePolicy::Label, QSizePolicy::LineEdit, Qt::Horizontal, nullptr, parent);
}
// Now update our min/sizehint widths
@@ -481,7 +478,6 @@ void QFormLayoutPrivate::recalcHFW(int w)
} else {
hfw_width = w;
hfw_height = qMin(QLAYOUTSIZE_MAX, h);
- hfw_minheight = qMin(QLAYOUTSIZE_MAX, mh);
}
}
@@ -598,13 +594,13 @@ static inline int spacingHelper(QWidget* parent, QStyle *style, int userVSpacing
QSizePolicy::ControlTypes(item1 ? item1->controlTypes() : QSizePolicy::DefaultType);
int spacing2 = 0;
- spacing = style->combinedLayoutSpacing(itemtypes, prevItem1->controlTypes(), Qt::Vertical, 0, parent);
+ spacing = style->combinedLayoutSpacing(itemtypes, prevItem1->controlTypes(), Qt::Vertical, nullptr, parent);
// At most of one of item2 and prevItem2 will be nonnull
if (item2)
- spacing2 = style->combinedLayoutSpacing(item2->controlTypes(), prevItem1->controlTypes(), Qt::Vertical, 0, parent);
+ spacing2 = style->combinedLayoutSpacing(item2->controlTypes(), prevItem1->controlTypes(), Qt::Vertical, nullptr, parent);
else if (prevItem2)
- spacing2 = style->combinedLayoutSpacing(itemtypes, prevItem2->controlTypes(), Qt::Vertical, 0, parent);
+ spacing2 = style->combinedLayoutSpacing(itemtypes, prevItem2->controlTypes(), Qt::Vertical, nullptr, parent);
spacing = qMax(spacing, spacing2);
}
@@ -652,7 +648,7 @@ void QFormLayoutPrivate::setupVerticalLayoutData(int width)
vLayouts.clear();
vLayouts.resize((2 * rr) + 2); // a max, some may be unused
- QStyle *style = 0;
+ QStyle *style = nullptr;
int userVSpacing = q->verticalSpacing();
@@ -680,8 +676,8 @@ void QFormLayoutPrivate::setupVerticalLayoutData(int width)
maxLabelWidth = width;
}
- QFormLayoutItem *prevItem1 = 0;
- QFormLayoutItem *prevItem2 = 0;
+ QFormLayoutItem *prevItem1 = nullptr;
+ QFormLayoutItem *prevItem2 = nullptr;
bool prevRowSplit = false;
for (int i = 0; i < rr; ++i) {
@@ -715,13 +711,13 @@ void QFormLayoutPrivate::setupVerticalLayoutData(int width)
initLayoutStruct(vLayouts[vidx], label);
if (vidx > 1)
- vLayouts[vidx - 1].spacing = spacingHelper(q->parentWidget(), style, userVSpacing, splitSideBySide || prevRowSplit, label, 0, prevItem1, prevItem2);
+ vLayouts[vidx - 1].spacing = spacingHelper(q->parentWidget(), style, userVSpacing, splitSideBySide || prevRowSplit, label, nullptr, prevItem1, prevItem2);
label->vLayoutIndex = vidx;
label->sideBySide = false;
prevItem1 = label;
- prevItem2 = 0;
+ prevItem2 = nullptr;
if (vLayouts[vidx].stretch > 0)
addTopBottomStretch = false;
@@ -733,13 +729,13 @@ void QFormLayoutPrivate::setupVerticalLayoutData(int width)
initLayoutStruct(vLayouts[vidx], field);
if (vidx > 1)
- vLayouts[vidx - 1].spacing = spacingHelper(q->parentWidget(), style, userVSpacing, splitSideBySide || prevRowSplit, field, 0, prevItem1, prevItem2);
+ vLayouts[vidx - 1].spacing = spacingHelper(q->parentWidget(), style, userVSpacing, splitSideBySide || prevRowSplit, field, nullptr, prevItem1, prevItem2);
field->vLayoutIndex = vidx;
field->sideBySide = false;
prevItem1 = field;
- prevItem2 = 0;
+ prevItem2 = nullptr;
if (vLayouts[vidx].stretch > 0)
addTopBottomStretch = false;
@@ -762,7 +758,7 @@ void QFormLayoutPrivate::setupVerticalLayoutData(int width)
if (label->expandingDirections() & Qt::Vertical)
expanding = true;
- label->sideBySide = (field != 0);
+ label->sideBySide = (field != nullptr);
label->vLayoutIndex = vidx;
stretch1 = label->vStretch();
}
@@ -794,7 +790,7 @@ void QFormLayoutPrivate::setupVerticalLayoutData(int width)
prevItem2 = field;
} else {
prevItem1 = field;
- prevItem2 = 0;
+ prevItem2 = nullptr;
}
prevRowSplit = false;
@@ -995,12 +991,12 @@ QLayoutItem* QFormLayoutPrivate::replaceAt(int index, QLayoutItem *newitem)
{
Q_Q(QFormLayout);
if (!newitem)
- return 0;
+ return nullptr;
const int storageIndex = storageIndexFromLayoutItem(m_matrix, m_things.value(index));
if (Q_UNLIKELY(storageIndex == -1)) {
// ### Qt6 - fix warning too when this class becomes public
qWarning("QFormLayoutPrivate::replaceAt: Invalid index %d", index);
- return 0;
+ return nullptr;
}
int row, col;
@@ -1196,7 +1192,7 @@ QLayoutItem* QFormLayoutPrivate::replaceAt(int index, QLayoutItem *newitem)
\sa QWidget::setLayout()
*/
QFormLayout::QFormLayout(QWidget *parent)
- : QLayout(*new QFormLayoutPrivate, 0, parent)
+ : QLayout(*new QFormLayoutPrivate, nullptr, parent)
{
}
@@ -1332,7 +1328,7 @@ void QFormLayout::insertRow(int row, const QString &labelText, QWidget *field)
if (field && !d->checkWidget(field))
return;
- QLabel *label = 0;
+ QLabel *label = nullptr;
if (!labelText.isEmpty()) {
label = new QLabel(labelText);
#ifndef QT_NO_SHORTCUT
@@ -1354,7 +1350,7 @@ void QFormLayout::insertRow(int row, const QString &labelText, QLayout *field)
if (field && !d->checkLayout(field))
return;
- insertRow(row, labelText.isEmpty() ? 0 : new QLabel(labelText), field);
+ insertRow(row, labelText.isEmpty() ? nullptr : new QLabel(labelText), field);
}
/*!
@@ -1657,7 +1653,7 @@ QLayoutItem *QFormLayout::itemAt(int index) const
Q_D(const QFormLayout);
if (QFormLayoutItem *formItem = d->m_things.value(index))
return formItem->item;
- return 0;
+ return nullptr;
}
/*!
@@ -1670,7 +1666,7 @@ QLayoutItem *QFormLayout::takeAt(int index)
const int storageIndex = storageIndexFromLayoutItem(d->m_matrix, d->m_things.value(index));
if (Q_UNLIKELY(storageIndex == -1)) {
qWarning("QFormLayout::takeAt: Invalid index %d", index);
- return 0;
+ return nullptr;
}
int row, col;
@@ -1696,7 +1692,7 @@ Qt::Orientations QFormLayout::expandingDirections() const
QFormLayoutPrivate *e = const_cast<QFormLayoutPrivate *>(d);
e->updateSizes();
- Qt::Orientations o = 0;
+ Qt::Orientations o;
if (e->expandHorizontal)
o = Qt::Horizontal;
if (e->expandVertical)
@@ -1835,7 +1831,7 @@ QLayoutItem *QFormLayout::itemAt(int row, ItemRole role) const
{
Q_D(const QFormLayout);
if (uint(row) >= uint(d->m_matrix.rowCount()))
- return 0;
+ return nullptr;
switch (role) {
case SpanningRole:
if (QFormLayoutItem *item = d->m_matrix(row, 1))
@@ -1848,7 +1844,7 @@ QLayoutItem *QFormLayout::itemAt(int row, ItemRole role) const
return item->item;
break;
}
- return 0;
+ return nullptr;
}
/*!
@@ -1932,7 +1928,7 @@ QWidget *QFormLayout::labelForField(QWidget *field) const
if (QFormLayoutItem *label = d->m_matrix(row, LabelRole))
return label->widget();
}
- return 0;
+ return nullptr;
}
/*!
@@ -1951,7 +1947,7 @@ QWidget *QFormLayout::labelForField(QLayout *field) const
if (QFormLayoutItem *label = d->m_matrix(row, LabelRole))
return label->widget();
}
- return 0;
+ return nullptr;
}
/*!
@@ -2326,7 +2322,7 @@ void QFormLayout::resetRowWrapPolicy()
void QFormLayout::resetFormAlignment()
{
Q_D(QFormLayout);
- d->formAlignment = 0;
+ d->formAlignment = { };
}
/*!
@@ -2336,7 +2332,7 @@ void QFormLayout::resetFormAlignment()
void QFormLayout::resetLabelAlignment()
{
Q_D(QFormLayout);
- d->labelAlignment = 0;
+ d->labelAlignment = { };
}
#if 0
diff --git a/src/widgets/kernel/qgesture.cpp b/src/widgets/kernel/qgesture.cpp
index fc715687c6..84dbed7043 100644
--- a/src/widgets/kernel/qgesture.cpp
+++ b/src/widgets/kernel/qgesture.cpp
@@ -879,7 +879,7 @@ int QTapAndHoldGesturePrivate::Timeout = 700; // in ms
Creates new QGestureEvent containing a list of \a gestures.
*/
QGestureEvent::QGestureEvent(const QList<QGesture *> &gestures)
- : QEvent(QEvent::Gesture), m_gestures(gestures), m_widget(0)
+ : QEvent(QEvent::Gesture), m_gestures(gestures), m_widget(nullptr)
{
}
@@ -907,7 +907,7 @@ QGesture *QGestureEvent::gesture(Qt::GestureType type) const
for (int i = 0; i < m_gestures.size(); ++i)
if (m_gestures.at(i)->gestureType() == type)
return m_gestures.at(i);
- return 0;
+ return nullptr;
}
/*!
diff --git a/src/widgets/kernel/qgesture_p.h b/src/widgets/kernel/qgesture_p.h
index cbf8d60892..057302bda1 100644
--- a/src/widgets/kernel/qgesture_p.h
+++ b/src/widgets/kernel/qgesture_p.h
@@ -111,8 +111,7 @@ class QPinchGesturePrivate : public QGesturePrivate
public:
QPinchGesturePrivate()
- : totalChangeFlags(nullptr), changeFlags(nullptr),
- totalScaleFactor(1), lastScaleFactor(1), scaleFactor(1),
+ : totalScaleFactor(1), lastScaleFactor(1), scaleFactor(1),
totalRotationAngle(0), lastRotationAngle(0), rotationAngle(0),
isNewSequence(true)
{
diff --git a/src/widgets/kernel/qgesturemanager.cpp b/src/widgets/kernel/qgesturemanager.cpp
index d0c6b882b5..541519245e 100644
--- a/src/widgets/kernel/qgesturemanager.cpp
+++ b/src/widgets/kernel/qgesturemanager.cpp
@@ -105,11 +105,10 @@ QGestureManager::QGestureManager(QObject *parent)
QGestureManager::~QGestureManager()
{
qDeleteAll(m_recognizers);
- foreach (QGestureRecognizer *recognizer, m_obsoleteGestures.keys()) {
- qDeleteAll(m_obsoleteGestures.value(recognizer));
- delete recognizer;
+ for (auto it = m_obsoleteGestures.cbegin(), end = m_obsoleteGestures.cend(); it != end; ++it) {
+ qDeleteAll(it.value());
+ delete it.key();
}
- m_obsoleteGestures.clear();
}
Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *recognizer)
@@ -188,7 +187,7 @@ QGesture *QGestureManager::getState(QObject *object, QGestureRecognizer *recogni
// from the destructor.
if (object->isWidgetType()) {
if (static_cast<QWidget *>(object)->d_func()->data.in_destructor)
- return 0;
+ return nullptr;
} else if (QGesture *g = qobject_cast<QGesture *>(object)) {
return g;
#if QT_CONFIG(graphicsview)
@@ -196,7 +195,7 @@ QGesture *QGestureManager::getState(QObject *object, QGestureRecognizer *recogni
Q_ASSERT(qobject_cast<QGraphicsObject *>(object));
QGraphicsObject *graphicsObject = static_cast<QGraphicsObject *>(object);
if (graphicsObject->QGraphicsItem::d_func()->inDestructor)
- return 0;
+ return nullptr;
#endif
}
@@ -210,7 +209,7 @@ QGesture *QGestureManager::getState(QObject *object, QGestureRecognizer *recogni
Q_ASSERT(recognizer);
QGesture *state = recognizer->create(object);
if (!state)
- return 0;
+ return nullptr;
state->setParent(this);
if (state->gestureType() == Qt::CustomGesture) {
// if the recognizer didn't fill in the gesture type, then this
@@ -454,13 +453,13 @@ void QGestureManager::cancelGesturesForChildren(QGesture *original)
// sort them per target widget by cherry picking from almostCanceledGestures and delivering
QSet<QGesture *> almostCanceledGestures = cancelledGestures;
while (!almostCanceledGestures.isEmpty()) {
- QWidget *target = 0;
+ QWidget *target = nullptr;
QSet<QGesture*> gestures;
iter = almostCanceledGestures.begin();
// sort per target widget
while (iter != almostCanceledGestures.end()) {
QWidget *widget = m_gestureTargets.value(*iter);
- if (target == 0)
+ if (target == nullptr)
target = widget;
if (target == widget) {
gestures << *iter;
@@ -508,7 +507,7 @@ bool QGestureManager::filterEvent(QWidget *receiver, QEvent *event)
}
}
// find all gesture contexts for the widget tree
- w = w->isWindow() ? 0 : w->parentWidget();
+ w = w->isWindow() ? nullptr : w->parentWidget();
while (w)
{
for (ContextIterator it = w->d_func()->gestureContext.constBegin(),
@@ -587,7 +586,7 @@ void QGestureManager::getGestureTargets(const QSet<QGesture*> &gestures,
// sort gestures by types
foreach (QGesture *gesture, gestures) {
- QWidget *receiver = m_gestureTargets.value(gesture, 0);
+ QWidget *receiver = m_gestureTargets.value(gesture, nullptr);
Q_ASSERT(receiver);
if (receiver)
gestureByTypes[gesture->gestureType()].insert(receiver, gesture);
@@ -611,7 +610,7 @@ void QGestureManager::getGestureTargets(const QSet<QGesture*> &gestures,
}
}
if (w->isWindow()) {
- w = 0;
+ w = nullptr;
break;
}
w = w->parentWidget();
@@ -637,7 +636,7 @@ void QGestureManager::deliverEvents(const QSet<QGesture *> &gestures,
for (QSet<QGesture *>::const_iterator it = gestures.begin(),
e = gestures.end(); it != e; ++it) {
QGesture *gesture = *it;
- QWidget *target = m_gestureTargets.value(gesture, 0);
+ QWidget *target = m_gestureTargets.value(gesture, nullptr);
if (!target) {
// the gesture has just started and doesn't have a target yet.
Q_ASSERT(gesture->state() == Qt::GestureStarted);
diff --git a/src/widgets/kernel/qgridlayout.cpp b/src/widgets/kernel/qgridlayout.cpp
index 4f2b505e32..b4ac263c2b 100644
--- a/src/widgets/kernel/qgridlayout.cpp
+++ b/src/widgets/kernel/qgridlayout.cpp
@@ -84,7 +84,7 @@ public:
Qt::Alignment alignment() const { return item_->alignment(); }
QLayoutItem *item() { return item_; }
void setItem(QLayoutItem *newitem) { item_ = newitem; }
- QLayoutItem *takeItem() { QLayoutItem *i = item_; item_ = 0; return i; }
+ QLayoutItem *takeItem() { QLayoutItem *i = item_; item_ = nullptr; return i; }
int hStretch() { return item_->widget() ?
item_->widget()->sizePolicy().horizontalStretch() : 0; }
@@ -152,7 +152,7 @@ public:
if (index < things.count())
return things.at(index)->item();
else
- return 0;
+ return nullptr;
}
inline QLayoutItem *takeAt(int index) {
Q_Q(QGridLayout);
@@ -162,19 +162,19 @@ public:
if (QLayout *l = item->layout()) {
// sanity check in case the user passed something weird to QObject::setParent()
if (l->parent() == q)
- l->setParent(0);
+ l->setParent(nullptr);
}
delete b;
return item;
}
}
- return 0;
+ return nullptr;
}
QLayoutItem* replaceAt(int index, QLayoutItem *newitem) override
{
if (!newitem)
- return 0;
- QLayoutItem *item = 0;
+ return nullptr;
+ QLayoutItem *item = nullptr;
QGridBox *b = things.value(index);
if (b) {
item = b->takeItem();
@@ -342,7 +342,7 @@ QGridLayoutPrivate::QGridLayoutPrivate()
setDirty();
rr = cc = 0;
nextR = nextC = 0;
- hfwData = 0;
+ hfwData = nullptr;
hReversed = false;
vReversed = false;
horizontalSpacing = -1;
@@ -429,7 +429,7 @@ int QGridLayoutPrivate::minimumHeightForWidth(int w, int hSpacing, int vSpacing)
if (!has_hfw)
return -1;
int top, bottom;
- effectiveMargins(0, &top, 0, &bottom);
+ effectiveMargins(nullptr, &top, nullptr, &bottom);
return hfw_minheight + top + bottom;
}
@@ -521,7 +521,7 @@ void QGridLayoutPrivate::setSize(int r, int c)
if (hfwData && (int)hfwData->size() < r) {
delete hfwData;
- hfwData = 0;
+ hfwData = nullptr;
hfw_width = -1;
}
rr = r;
@@ -710,14 +710,14 @@ void QGridLayoutPrivate::setupSpacings(QVector<QLayoutStruct> &chain,
qSwap(numRows, numColumns);
}
- QStyle *style = 0;
+ QStyle *style = nullptr;
if (fixedSpacing < 0) {
if (QWidget *parentWidget = q->parentWidget())
style = parentWidget->style();
}
for (int c = 0; c < numColumns; ++c) {
- QGridBox *previousBox = 0;
+ QGridBox *previousBox = nullptr;
int previousRow = -1; // previous *non-empty* row
for (int r = 0; r < numRows; ++r) {
@@ -741,7 +741,7 @@ void QGridLayoutPrivate::setupSpacings(QVector<QLayoutStruct> &chain,
if (style)
spacing = style->combinedLayoutSpacing(controlTypes1, controlTypes2,
- orientation, 0, q->parentWidget());
+ orientation, nullptr, q->parentWidget());
} else {
if (orientation == Qt::Vertical) {
QGridBox *sibling = vReversed ? previousBox : box;
@@ -1075,7 +1075,7 @@ QRect QGridLayoutPrivate::cellRect(int row, int col) const
new items are inserted.
*/
QGridLayout::QGridLayout(QWidget *parent)
- : QLayout(*new QGridLayoutPrivate, 0, parent)
+ : QLayout(*new QGridLayoutPrivate, nullptr, parent)
{
Q_D(QGridLayout);
d->expand(1, 1);
@@ -1089,7 +1089,7 @@ QGridLayout::QGridLayout(QWidget *parent)
will not be performed before this is inserted into another layout.
*/
QGridLayout::QGridLayout()
- : QLayout(*new QGridLayoutPrivate, 0, 0)
+ : QLayout(*new QGridLayoutPrivate, nullptr, nullptr)
{
Q_D(QGridLayout);
d->expand(1, 1);
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index 3ce81a390b..d4ff9083f1 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -130,7 +130,7 @@ QLayout::QLayout(QWidget *parent)
management will work.
*/
QLayout::QLayout()
- : QObject(*new QLayoutPrivate, 0)
+ : QObject(*new QLayoutPrivate, nullptr)
{
}
@@ -149,14 +149,14 @@ QLayout::QLayout(QLayoutPrivate &dd, QLayout *lay, QWidget *w)
" already has a layout",
qUtf16Printable(QObject::objectName()), w->metaObject()->className(),
qUtf16Printable(w->objectName()));
- setParent(0);
+ setParent(nullptr);
} else {
d->topLevel = true;
w->d_func()->layout = this;
QT_TRY {
invalidate();
} QT_CATCH(...) {
- w->d_func()->layout = 0;
+ w->d_func()->layout = nullptr;
QT_RETHROW;
}
}
@@ -166,7 +166,7 @@ QLayout::QLayout(QLayoutPrivate &dd, QLayout *lay, QWidget *w)
QLayoutPrivate::QLayoutPrivate()
: QObjectPrivate(), insideSpacing(-1), userLeftMargin(-1), userTopMargin(-1), userRightMargin(-1),
userBottomMargin(-1), topLevel(false), enabled(true), activated(true), autoNewChild(false),
- constraint(QLayout::SetDefaultConstraint), menubar(0)
+ constraint(QLayout::SetDefaultConstraint), menubar(nullptr)
{
}
@@ -181,7 +181,7 @@ void QLayoutPrivate::getMargin(int *result, int userMargin, QStyle::PixelMetric
} else if (!topLevel) {
*result = 0;
} else if (QWidget *pw = q->parentWidget()) {
- *result = pw->style()->pixelMetric(pm, 0, pw);
+ *result = pw->style()->pixelMetric(pm, nullptr, pw);
} else {
*result = 0;
}
@@ -189,8 +189,8 @@ void QLayoutPrivate::getMargin(int *result, int userMargin, QStyle::PixelMetric
// Static item factory functions that allow for hooking things in Designer
-QLayoutPrivate::QWidgetItemFactoryMethod QLayoutPrivate::widgetItemFactoryMethod = 0;
-QLayoutPrivate::QSpacerItemFactoryMethod QLayoutPrivate::spacerItemFactoryMethod = 0;
+QLayoutPrivate::QWidgetItemFactoryMethod QLayoutPrivate::widgetItemFactoryMethod = nullptr;
+QLayoutPrivate::QSpacerItemFactoryMethod QLayoutPrivate::spacerItemFactoryMethod = nullptr;
QWidgetItem *QLayoutPrivate::createWidgetItem(const QLayout *layout, QWidget *widget)
{
@@ -583,18 +583,18 @@ static bool removeWidgetRecursively(QLayoutItem *li, QObject *w)
}
-void QLayoutPrivate::doResize(const QSize &r)
+void QLayoutPrivate::doResize()
{
Q_Q(QLayout);
- int mbh = menuBarHeightForWidth(menubar, r.width());
QWidget *mw = q->parentWidget();
QRect rect = mw->testAttribute(Qt::WA_LayoutOnEntireRect) ? mw->rect() : mw->contentsRect();
+ const int mbh = menuBarHeightForWidth(menubar, rect.width());
const int mbTop = rect.top();
rect.setTop(mbTop + mbh);
q->setGeometry(rect);
#if QT_CONFIG(menubar)
if (menubar)
- menubar->setGeometry(rect.left(), mbTop, r.width(), mbh);
+ menubar->setGeometry(rect.left(), mbTop, rect.width(), mbh);
#endif
}
@@ -613,12 +613,10 @@ void QLayout::widgetEvent(QEvent *e)
switch (e->type()) {
case QEvent::Resize:
- if (d->activated) {
- QResizeEvent *r = (QResizeEvent *)e;
- d->doResize(r->size());
- } else {
+ if (d->activated)
+ d->doResize();
+ else
activate();
- }
break;
case QEvent::ChildRemoved:
{
@@ -626,7 +624,7 @@ void QLayout::widgetEvent(QEvent *e)
if (c->child()->isWidgetType()) {
#if QT_CONFIG(menubar)
if (c->child() == d->menubar)
- d->menubar = 0;
+ d->menubar = nullptr;
#endif
removeWidgetRecursively(this, c->child());
}
@@ -766,7 +764,7 @@ QLayout::~QLayout()
{
Q_D(QLayout);
if (d->topLevel && parent() && parent()->isWidgetType() && parentWidget()->layout() == this)
- parentWidget()->d_func()->layout = 0;
+ parentWidget()->d_func()->layout = nullptr;
else if (QLayout *parentLayout = qobject_cast<QLayout *>(parent()))
parentLayout->removeItem(this);
}
@@ -921,7 +919,7 @@ void QLayout::addChildWidget(QWidget *w)
qWarning("QLayout::addChildWidget: %s \"%ls\" in wrong parent; moved to correct parent",
w->metaObject()->className(), qUtf16Printable(w->objectName()));
#endif
- pw = 0;
+ pw = nullptr;
}
bool needShow = mw && mw->isVisible() && !(w->isHidden() && w->testAttribute(Qt::WA_WState_ExplicitShowHide));
if (!pw && mw)
@@ -1116,7 +1114,7 @@ bool QLayout::activate()
break;
}
- d->doResize(mw->size());
+ d->doResize();
if (md->extra) {
md->extra->explicitMinSize = explMin;
@@ -1155,12 +1153,12 @@ QLayoutItem *QLayout::replaceWidget(QWidget *from, QWidget *to, Qt::FindChildOpt
{
Q_D(QLayout);
if (!from || !to)
- return 0;
+ return nullptr;
if (from == to) // Do not return a QLayoutItem for \a from, since ownership still
return nullptr; // belongs to the layout (since nothing was changed)
int index = -1;
- QLayoutItem *item = 0;
+ QLayoutItem *item = nullptr;
for (int u = 0; u < count(); ++u) {
item = itemAt(u);
if (!item)
@@ -1178,7 +1176,7 @@ QLayoutItem *QLayout::replaceWidget(QWidget *from, QWidget *to, Qt::FindChildOpt
}
}
if (index == -1)
- return 0;
+ return nullptr;
addChildWidget(to);
QLayoutItem *newitem = new QWidgetItem(to);
@@ -1339,7 +1337,7 @@ QRect QLayout::alignmentRect(const QRect &r) const
returned by QLayoutItems that have an alignment.
*/
QLayout *that = const_cast<QLayout *>(this);
- that->setAlignment(0);
+ that->setAlignment({ });
QSize ms = that->maximumSize();
that->setAlignment(a);
diff --git a/src/widgets/kernel/qlayout_p.h b/src/widgets/kernel/qlayout_p.h
index 8e1d773355..2b19af48be 100644
--- a/src/widgets/kernel/qlayout_p.h
+++ b/src/widgets/kernel/qlayout_p.h
@@ -73,7 +73,7 @@ public:
QLayoutPrivate();
void getMargin(int *result, int userMargin, QStyle::PixelMetric pm) const;
- void doResize(const QSize &);
+ void doResize();
void reparentChildWidgets(QWidget *mw);
bool checkWidget(QWidget *widget) const;
bool checkLayout(QLayout *otherLayout) const;
diff --git a/src/widgets/kernel/qlayoutengine.cpp b/src/widgets/kernel/qlayoutengine.cpp
index 19a47075a6..83bbd69b55 100644
--- a/src/widgets/kernel/qlayoutengine.cpp
+++ b/src/widgets/kernel/qlayoutengine.cpp
@@ -376,7 +376,11 @@ Q_WIDGETS_EXPORT QSize qSmartMinSize(const QSize &sizeHint, const QSize &minSize
Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidgetItem *i)
{
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QWidget *w = const_cast<QWidgetItem *>(i)->widget();
+#else
+ QWidget *w = i->widget();
+#endif
return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(),
w->minimumSize(), w->maximumSize(),
w->sizePolicy());
@@ -414,8 +418,11 @@ Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QSize &sizeHint,
Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align)
{
- QWidget *w = const_cast<QWidgetItem*>(i)->widget();
-
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ QWidget *w = const_cast<QWidgetItem *>(i)->widget();
+#else
+ QWidget *w = i->widget();
+#endif
return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(),
w->sizePolicy(), align);
}
@@ -433,7 +440,7 @@ Q_WIDGETS_EXPORT int qSmartSpacing(const QLayout *layout, QStyle::PixelMetric pm
return -1;
} else if (parent->isWidgetType()) {
QWidget *pw = static_cast<QWidget *>(parent);
- return pw->style()->pixelMetric(pm, 0, pw);
+ return pw->style()->pixelMetric(pm, nullptr, pw);
} else {
return static_cast<QLayout *>(parent)->spacing();
}
diff --git a/src/widgets/kernel/qlayoutengine_p.h b/src/widgets/kernel/qlayoutengine_p.h
index 948c2424e6..2999bae646 100644
--- a/src/widgets/kernel/qlayoutengine_p.h
+++ b/src/widgets/kernel/qlayoutengine_p.h
@@ -105,9 +105,9 @@ Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidgetItem *i);
Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidget *w);
Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QSize &sizeHint,
const QSize &minSize, const QSize &maxSize,
- const QSizePolicy &sizePolicy, Qt::Alignment align = nullptr);
-Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align = nullptr);
-Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidget *w, Qt::Alignment align = nullptr);
+ const QSizePolicy &sizePolicy, Qt::Alignment align = { });
+Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align = { });
+Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidget *w, Qt::Alignment align = { });
Q_WIDGETS_EXPORT int qSmartSpacing(const QLayout *layout, QStyle::PixelMetric pm);
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp
index 0aab0bb06d..af5750771d 100644
--- a/src/widgets/kernel/qlayoutitem.cpp
+++ b/src/widgets/kernel/qlayoutitem.cpp
@@ -291,14 +291,12 @@ void QSpacerItem::changeSize(int w, int h, QSizePolicy::Policy hPolicy,
/*!
Destructor.
*/
-QWidgetItem::~QWidgetItem() {}
+QWidgetItem::~QWidgetItem() = default;
/*!
Destroys the QLayoutItem.
*/
-QLayoutItem::~QLayoutItem()
-{
-}
+QLayoutItem::~QLayoutItem() = default;
/*!
Invalidates any cached information in this layout item.
@@ -362,7 +360,11 @@ QSpacerItem * QSpacerItem::spacerItem()
\sa layout(), spacerItem()
*/
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QWidget *QLayoutItem::widget()
+#else
+QWidget *QLayoutItem::widget() const
+#endif
{
return nullptr;
}
@@ -370,7 +372,11 @@ QWidget *QLayoutItem::widget()
/*!
Returns the widget managed by this item.
*/
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QWidget *QWidgetItem::widget()
+#else
+QWidget *QWidgetItem::widget() const
+#endif
{
return wid;
}
@@ -591,7 +597,7 @@ Qt::Orientations QSpacerItem::expandingDirections() const
Qt::Orientations QWidgetItem::expandingDirections() const
{
if (isEmpty())
- return Qt::Orientations(0);
+ return {};
Qt::Orientations e = wid->sizePolicy().expandingDirections();
/*
@@ -772,7 +778,7 @@ QWidgetItemV2::QWidgetItemV2(QWidget *widget)
q_cachedMaximumSize(Dirty, Dirty),
q_firstCachedHfw(0),
q_hfwCacheSize(0),
- d(0)
+ d(nullptr)
{
QWidgetPrivate *wd = wid->d_func();
if (!wd->widgetItem)
@@ -784,7 +790,7 @@ QWidgetItemV2::~QWidgetItemV2()
if (wid) {
auto *wd = static_cast<QWidgetPrivate *>(QObjectPrivate::get(wid));
if (wd->widgetItem == this)
- wd->widgetItem = 0;
+ wd->widgetItem = nullptr;
}
}
diff --git a/src/widgets/kernel/qlayoutitem.h b/src/widgets/kernel/qlayoutitem.h
index 059ff2d470..8553e20adc 100644
--- a/src/widgets/kernel/qlayoutitem.h
+++ b/src/widgets/kernel/qlayoutitem.h
@@ -74,7 +74,11 @@ public:
virtual int minimumHeightForWidth(int) const;
virtual void invalidate();
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
virtual QWidget *widget();
+#else
+ virtual QWidget *widget() const;
+#endif
virtual QLayout *layout();
virtual QSpacerItem *spacerItem();
@@ -133,7 +137,11 @@ public:
bool isEmpty() const override;
void setGeometry(const QRect&) override;
QRect geometry() const override;
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QWidget *widget() override;
+#else
+ QWidget *widget() const override;
+#endif
bool hasHeightForWidth() const override;
int heightForWidth(int) const override;
diff --git a/src/widgets/kernel/qmacgesturerecognizer.cpp b/src/widgets/kernel/qmacgesturerecognizer.cpp
index d39b93e320..aac115a2cf 100644
--- a/src/widgets/kernel/qmacgesturerecognizer.cpp
+++ b/src/widgets/kernel/qmacgesturerecognizer.cpp
@@ -149,8 +149,8 @@ QMacPinchGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e
void QMacPinchGestureRecognizer::reset(QGesture *gesture)
{
QPinchGesture *g = static_cast<QPinchGesture *>(gesture);
- g->setChangeFlags(0);
- g->setTotalChangeFlags(0);
+ g->setChangeFlags({});
+ g->setTotalChangeFlags({});
g->setScaleFactor(1.0f);
g->setTotalScaleFactor(1.0f);
g->setLastScaleFactor(1.0f);
diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/widgets/kernel/qopenglwidget.cpp
index d244162ba3..9b4955320b 100644
--- a/src/widgets/kernel/qopenglwidget.cpp
+++ b/src/widgets/kernel/qopenglwidget.cpp
@@ -555,16 +555,16 @@ class QOpenGLWidgetPrivate : public QWidgetPrivate
Q_DECLARE_PUBLIC(QOpenGLWidget)
public:
QOpenGLWidgetPrivate()
- : context(0),
- fbo(0),
- resolvedFbo(0),
- surface(0),
+ : context(nullptr),
+ fbo(nullptr),
+ resolvedFbo(nullptr),
+ surface(nullptr),
initialized(false),
fakeHidden(false),
inBackingStorePaint(false),
hasBeenComposed(false),
flushPending(false),
- paintDevice(0),
+ paintDevice(nullptr),
updateBehavior(QOpenGLWidget::NoPartialUpdate),
requestedSamples(0),
inPaintGL(false),
@@ -704,11 +704,11 @@ void QOpenGLWidgetPrivate::reset()
q->makeCurrent();
delete paintDevice;
- paintDevice = 0;
+ paintDevice = nullptr;
delete fbo;
- fbo = 0;
+ fbo = nullptr;
delete resolvedFbo;
- resolvedFbo = 0;
+ resolvedFbo = nullptr;
if (initialized)
q->doneCurrent();
@@ -717,9 +717,9 @@ void QOpenGLWidgetPrivate::reset()
// the context's aboutToBeDestroyed() may still call makeCurrent()
// to perform some cleanup.
delete context;
- context = 0;
+ context = nullptr;
delete surface;
- surface = 0;
+ surface = nullptr;
initialized = fakeHidden = inBackingStorePaint = false;
}
@@ -732,9 +732,9 @@ void QOpenGLWidgetPrivate::recreateFbo()
context->makeCurrent(surface);
delete fbo;
- fbo = 0;
+ fbo = nullptr;
delete resolvedFbo;
- resolvedFbo = 0;
+ resolvedFbo = nullptr;
int samples = requestedSamples;
QOpenGLExtensions *extfuncs = static_cast<QOpenGLExtensions *>(context->functions());
@@ -1421,7 +1421,7 @@ QPaintEngine *QOpenGLWidget::paintEngine() const
return QWidget::paintEngine();
if (!d->initialized)
- return 0;
+ return nullptr;
return d->paintDevice->paintEngine();
}
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index eec65c8625..039699a004 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -419,6 +419,76 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
\sa activated()
*/
+/*!
+ \fn template<typename Functor>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ Functor functor,
+ Qt::ShortcutContext shortcutContext = Qt::WindowShortcut);
+ \since 5.15
+ \overload
+
+ This is a QShortcut convenience constructor which connects the shortcut's
+ \l{QShortcut::activated()}{activated()} signal to the \a functor.
+*/
+/*!
+ \fn template<typename Functor>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ const QObject *context, Functor functor,
+ Qt::ShortcutContext shortcutContext = Qt::WindowShortcut);
+ \since 5.15
+ \overload
+
+ This is a QShortcut convenience constructor which connects the shortcut's
+ \l{QShortcut::activated()}{activated()} signal to the \a functor.
+
+ The \a functor can be a pointer to a member function of the \a context object.
+
+ If the \a context object is destroyed, the \a functor will not be called.
+*/
+/*!
+ \fn template<typename Functor, typename FunctorAmbiguous>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ const QObject *context1, Functor functor,
+ FunctorAmbiguous functorAmbiguous,
+ Qt::ShortcutContext shortcutContext = Qt::WindowShortcut);
+ \since 5.15
+ \overload
+
+ This is a QShortcut convenience constructor which connects the shortcut's
+ \l{QShortcut::activated()}{activated()} signal to the \a functor and
+ \l{QShortcut::activatedAmbiguously()}{activatedAmbiguously()}
+ signal to the \a FunctorAmbiguous.
+
+ The \a functor and \a FunctorAmbiguous can be a pointer to a member
+ function of the \a context object.
+
+ If the \a context object is destroyed, the \a functor and
+ \a FunctorAmbiguous will not be called.
+*/
+/*!
+ \fn template<typename Functor, typename FunctorAmbiguous>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ const QObject *context1, Functor functor,
+ const QObject *context2, FunctorAmbiguous functorAmbiguous,
+ Qt::ShortcutContext shortcutContext = Qt::WindowShortcut);
+ \since 5.15
+ \overload
+
+ This is a QShortcut convenience constructor which connects the shortcut's
+ \l{QShortcut::activated()}{activated()} signal to the \a functor and
+ \l{QShortcut::activatedAmbiguously()}{activatedAmbiguously()}
+ signal to the \a FunctorAmbiguous.
+
+ The \a functor can be a pointer to a member function of the
+ \a context1 object.
+ The \a FunctorAmbiguous can be a pointer to a member function of the
+ \a context2 object.
+
+ If the \a context1 object is destroyed, the \a functor will not be called.
+ If the \a context2 object is destroyed, the \a FunctorAmbiguous
+ will not be called.
+*/
+
/*
\internal
Private data accessed through d-pointer.
@@ -475,17 +545,17 @@ QShortcut::QShortcut(QWidget *parent)
match the \a key sequence. Depending on the ambiguity of the
event, the shortcut will call the \a member function, or the \a
ambiguousMember function, if the key press was in the shortcut's
- \a context.
+ \a shortcutContext.
*/
QShortcut::QShortcut(const QKeySequence &key, QWidget *parent,
const char *member, const char *ambiguousMember,
- Qt::ShortcutContext context)
+ Qt::ShortcutContext shortcutContext)
: QShortcut(parent)
{
QAPP_CHECK("QShortcut");
Q_D(QShortcut);
- d->sc_context = context;
+ d->sc_context = shortcutContext;
d->sc_sequence = key;
d->redoGrab(QGuiApplicationPrivate::instance()->shortcutMap);
if (member)
diff --git a/src/widgets/kernel/qshortcut.h b/src/widgets/kernel/qshortcut.h
index 6dcf4971b2..4f9c5ba0f7 100644
--- a/src/widgets/kernel/qshortcut.h
+++ b/src/widgets/kernel/qshortcut.h
@@ -61,9 +61,65 @@ class Q_WIDGETS_EXPORT QShortcut : public QObject
Q_PROPERTY(Qt::ShortcutContext context READ context WRITE setContext)
public:
explicit QShortcut(QWidget *parent);
- QShortcut(const QKeySequence& key, QWidget *parent,
+ QShortcut(const QKeySequence &key, QWidget *parent,
const char *member = nullptr, const char *ambiguousMember = nullptr,
- Qt::ShortcutContext context = Qt::WindowShortcut);
+ Qt::ShortcutContext shortcutContext = Qt::WindowShortcut);
+#ifdef Q_CLANG_QDOC
+ template<typename Functor>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ Functor functor,
+ Qt::ShortcutContext shortcutContext = Qt::WindowShortcut);
+ template<typename Functor>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ const QObject *context, Functor functor,
+ Qt::ShortcutContext shortcutContext = Qt::WindowShortcut);
+ template<typename Functor, typename FunctorAmbiguous>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ const QObject *context1, Functor functor,
+ FunctorAmbiguous functorAmbiguous,
+ Qt::ShortcutContext shortcutContext = Qt::WindowShortcut);
+ template<typename Functor, typename FunctorAmbiguous>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ const QObject *context1, Functor functor,
+ const QObject *context2, FunctorAmbiguous functorAmbiguous,
+ Qt::ShortcutContext shortcutContext = Qt::WindowShortcut);
+#else
+ template<typename Func1>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ Func1 slot1,
+ Qt::ShortcutContext context = Qt::WindowShortcut)
+ : QShortcut(key, parent, static_cast<const char*>(nullptr), static_cast<const char*>(nullptr), context)
+ {
+ connect(this, &QShortcut::activated, std::move(slot1));
+ }
+ template<class Obj1, typename Func1>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ const Obj1 *object1, Func1 slot1,
+ Qt::ShortcutContext context = Qt::WindowShortcut)
+ : QShortcut(key, parent, static_cast<const char*>(nullptr), static_cast<const char*>(nullptr), context)
+ {
+ connect(this, &QShortcut::activated, object1, std::move(slot1));
+ }
+ template<class Obj1, typename Func1, typename Func2>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ const Obj1 *object1, Func1 slot1, Func2 slot2,
+ Qt::ShortcutContext context = Qt::WindowShortcut)
+ : QShortcut(key, parent, static_cast<const char*>(nullptr), static_cast<const char*>(nullptr), context)
+ {
+ connect(this, &QShortcut::activated, object1, std::move(slot1));
+ connect(this, &QShortcut::activatedAmbiguously, object1, std::move(slot2));
+ }
+ template<class Obj1, typename Func1, class Obj2, typename Func2>
+ QShortcut(const QKeySequence &key, QWidget *parent,
+ const Obj1 *object1, Func1 slot1,
+ const Obj2 *object2, Func2 slot2,
+ Qt::ShortcutContext context = Qt::WindowShortcut)
+ : QShortcut(key, parent, static_cast<const char*>(nullptr), static_cast<const char*>(nullptr), context)
+ {
+ connect(this, &QShortcut::activated, object1, std::move(slot1));
+ connect(this, &QShortcut::activatedAmbiguously, object2, std::move(slot2));
+ }
+#endif
~QShortcut();
void setKey(const QKeySequence& key);
diff --git a/src/widgets/kernel/qsizepolicy.cpp b/src/widgets/kernel/qsizepolicy.cpp
index 54bf8fe0dc..c4372a9fbc 100644
--- a/src/widgets/kernel/qsizepolicy.cpp
+++ b/src/widgets/kernel/qsizepolicy.cpp
@@ -439,7 +439,7 @@ void QSizePolicy::setControlType(ControlType type) noexcept
*/
QSizePolicy::operator QVariant() const
{
- return QVariant(QVariant::SizePolicy, this);
+ return QVariant(QMetaType::QSizePolicy, this);
}
#ifndef QT_NO_DATASTREAM
diff --git a/src/widgets/kernel/qstackedlayout.cpp b/src/widgets/kernel/qstackedlayout.cpp
index 0412dc188d..f87fe96cc0 100644
--- a/src/widgets/kernel/qstackedlayout.cpp
+++ b/src/widgets/kernel/qstackedlayout.cpp
@@ -61,11 +61,11 @@ QLayoutItem* QStackedLayoutPrivate::replaceAt(int idx, QLayoutItem *newitem)
{
Q_Q(QStackedLayout);
if (idx < 0 || idx >= list.size() || !newitem)
- return 0;
+ return nullptr;
QWidget *wdg = newitem->widget();
if (Q_UNLIKELY(!wdg)) {
qWarning("QStackedLayout::replaceAt: Only widgets can be added");
- return 0;
+ return nullptr;
}
QLayoutItem *orgitem = list.at(idx);
list.replace(idx, newitem);
@@ -154,7 +154,7 @@ QLayoutItem* QStackedLayoutPrivate::replaceAt(int idx, QLayoutItem *newitem)
\sa addWidget(), insertWidget()
*/
QStackedLayout::QStackedLayout()
- : QLayout(*new QStackedLayoutPrivate, 0, 0)
+ : QLayout(*new QStackedLayoutPrivate, nullptr, nullptr)
{
}
@@ -165,7 +165,7 @@ QStackedLayout::QStackedLayout()
manage the geometry of its children.
*/
QStackedLayout::QStackedLayout(QWidget *parent)
- : QLayout(*new QStackedLayoutPrivate, 0, parent)
+ : QLayout(*new QStackedLayoutPrivate, nullptr, parent)
{
}
@@ -174,7 +174,7 @@ QStackedLayout::QStackedLayout(QWidget *parent)
the given \a parentLayout.
*/
QStackedLayout::QStackedLayout(QLayout *parentLayout)
- : QLayout(*new QStackedLayoutPrivate, parentLayout, 0)
+ : QLayout(*new QStackedLayoutPrivate, parentLayout, nullptr)
{
}
@@ -264,7 +264,7 @@ QLayoutItem *QStackedLayout::takeAt(int index)
{
Q_D(QStackedLayout);
if (index <0 || index >= d->list.size())
- return 0;
+ return nullptr;
QLayoutItem *item = d->list.takeAt(index);
if (index == d->index) {
d->index = -1;
@@ -307,7 +307,7 @@ void QStackedLayout::setCurrentIndex(int index)
parent->setUpdatesEnabled(false);
}
- QPointer<QWidget> fw = parent ? parent->window()->focusWidget() : 0;
+ QPointer<QWidget> fw = parent ? parent->window()->focusWidget() : nullptr;
const bool focusWasOnOldPage = fw && (prev && prev->isAncestorOf(fw));
if (prev) {
diff --git a/src/widgets/kernel/qstandardgestures.cpp b/src/widgets/kernel/qstandardgestures.cpp
index 8a95b12d89..a5c204d59d 100644
--- a/src/widgets/kernel/qstandardgestures.cpp
+++ b/src/widgets/kernel/qstandardgestures.cpp
@@ -183,7 +183,7 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state,
}
case QEvent::TouchUpdate: {
const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
- d->changeFlags = 0;
+ d->changeFlags = { };
if (ev->touchPoints().size() == 2) {
QTouchEvent::TouchPoint p1 = ev->touchPoints().at(0);
QTouchEvent::TouchPoint p2 = ev->touchPoints().at(1);
@@ -256,7 +256,7 @@ void QPinchGestureRecognizer::reset(QGesture *state)
QPinchGesture *pinch = static_cast<QPinchGesture *>(state);
QPinchGesturePrivate *d = pinch->d_func();
- d->totalChangeFlags = d->changeFlags = 0;
+ d->totalChangeFlags = d->changeFlags = { };
d->startCenterPoint = d->lastCenterPoint = d->centerPoint = QPointF();
d->totalScaleFactor = d->lastScaleFactor = d->scaleFactor = 1;
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index 1ec3612457..33dd3e59b6 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -154,7 +154,7 @@ public slots:
*/
void styleSheetParentDestroyed() {
setProperty("_q_stylesheet_parent", QVariant());
- styleSheetParent = 0;
+ styleSheetParent = nullptr;
}
private:
@@ -166,11 +166,11 @@ private:
QRect rect;
};
-QTipLabel *QTipLabel::instance = 0;
+QTipLabel *QTipLabel::instance = nullptr;
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)
+ : QLabel(w, Qt::ToolTip | Qt::BypassGraphicsProxyWidget), styleSheetParent(nullptr), widget(nullptr)
#else
: QLabel(w, Qt::ToolTip | Qt::BypassGraphicsProxyWidget), widget(0)
#endif
@@ -181,12 +181,12 @@ QTipLabel::QTipLabel(const QString &text, const QPoint &pos, QWidget *w, int mse
setBackgroundRole(QPalette::ToolTipBase);
setPalette(QToolTip::palette());
ensurePolished();
- setMargin(1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, this));
+ setMargin(1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, nullptr, this));
setFrameStyle(QFrame::NoFrame);
setAlignment(Qt::AlignLeft);
setIndent(1);
qApp->installEventFilter(this);
- setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / 255.0);
+ setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, nullptr, this) / 255.0);
setMouseTracking(true);
fadingOut = false;
reuseTip(text, msecDisplayTime, pos);
@@ -207,7 +207,7 @@ void QTipLabel::reuseTip(const QString &text, int msecDisplayTime, const QPoint
if (styleSheetParent){
disconnect(styleSheetParent, SIGNAL(destroyed()),
QTipLabel::instance, SLOT(styleSheetParentDestroyed()));
- styleSheetParent = 0;
+ styleSheetParent = nullptr;
}
#endif
@@ -281,7 +281,7 @@ void QTipLabel::mouseMoveEvent(QMouseEvent *e)
QTipLabel::~QTipLabel()
{
- instance = 0;
+ instance = nullptr;
}
void QTipLabel::hideTip()
@@ -560,7 +560,7 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w)
*/
bool QToolTip::isVisible()
{
- return (QTipLabel::instance != 0 && QTipLabel::instance->isVisible());
+ return (QTipLabel::instance != nullptr && QTipLabel::instance->isVisible());
}
/*!
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index 228ca4d38a..8a632a395a 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -163,7 +163,7 @@ private:
QPixmap background;
};
-QWhatsThat *QWhatsThat::instance = 0;
+QWhatsThat *QWhatsThat::instance = nullptr;
// shadowWidth not const, for XP drop-shadow-fu turns it to 0
static int shadowWidth = 6; // also used as '5' and '6' and even '8' below
@@ -193,7 +193,7 @@ QWhatsThat::QWhatsThat(const QString& txt, QWidget* parent, QWidget *showTextFor
setCursor(Qt::ArrowCursor);
#endif
QRect r;
- doc = 0;
+ doc = nullptr;
ensurePolished(); // Ensures style sheet font before size calc
if (Qt::mightBeRichText(text)) {
doc = new QTextDocument();
@@ -229,7 +229,7 @@ QWhatsThat::QWhatsThat(const QString& txt, QWidget* parent, QWidget *showTextFor
QWhatsThat::~QWhatsThat()
{
- instance = 0;
+ instance = nullptr;
if (doc)
delete doc;
}
@@ -383,7 +383,7 @@ void QWhatsThisPrivate::notifyToplevels(QEvent *e)
QCoreApplication::sendEvent(w, e);
}
-QWhatsThisPrivate *QWhatsThisPrivate::instance = 0;
+QWhatsThisPrivate *QWhatsThisPrivate::instance = nullptr;
QWhatsThisPrivate::QWhatsThisPrivate()
: leaveOnMouseRelease(false)
@@ -423,7 +423,7 @@ QWhatsThisPrivate::~QWhatsThisPrivate()
QAccessibleEvent event(this, QAccessible::ContextHelpEnd);
QAccessible::updateAccessibility(&event);
#endif
- instance = 0;
+ instance = nullptr;
}
bool QWhatsThisPrivate::eventFilter(QObject *o, QEvent *e)
@@ -497,7 +497,7 @@ class QWhatsThisAction: public QAction
Q_OBJECT
public:
- explicit QWhatsThisAction(QObject* parent = 0);
+ explicit QWhatsThisAction(QObject* parent = nullptr);
private slots:
void actionTriggered();
@@ -553,7 +553,7 @@ void QWhatsThis::enterWhatsThisMode()
*/
bool QWhatsThis::inWhatsThisMode()
{
- return (QWhatsThisPrivate::instance != 0);
+ return (QWhatsThisPrivate::instance != nullptr);
}
/*!
@@ -577,7 +577,7 @@ void QWhatsThisPrivate::say(QWidget * widget, const QString &text, int x, int y)
if (text.size() == 0)
return;
// make a fresh widget, and set it up
- QWhatsThat *whatsThat = new QWhatsThat(text, 0, widget);
+ QWhatsThat *whatsThat = new QWhatsThat(text, nullptr, widget);
// okay, now to find a suitable location
int scr = (widget ?
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index e7f95ecf4d..fdad879209 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -132,16 +132,16 @@ extern QDesktopWidget *qt_desktopWidget; // qapplication.cpp
QWidgetPrivate::QWidgetPrivate(int version)
: QObjectPrivate(version)
- , focus_next(0)
- , focus_prev(0)
- , focus_child(0)
- , layout(0)
- , needsFlush(0)
- , redirectDev(0)
- , widgetItem(0)
- , extraPaintEngine(0)
- , polished(0)
- , graphicsEffect(0)
+ , focus_next(nullptr)
+ , focus_prev(nullptr)
+ , focus_child(nullptr)
+ , layout(nullptr)
+ , needsFlush(nullptr)
+ , redirectDev(nullptr)
+ , widgetItem(nullptr)
+ , extraPaintEngine(nullptr)
+ , polished(nullptr)
+ , graphicsEffect(nullptr)
#if !defined(QT_NO_IM)
, imHints(Qt::ImhNone)
#endif
@@ -159,7 +159,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
, topLayoutItemMargin(0)
, rightLayoutItemMargin(0)
, bottomLayoutItemMargin(0)
- , hd(0)
+ , hd(nullptr)
, size_policy(QSizePolicy::Preferred, QSizePolicy::Preferred)
, fg_role(QPalette::NoRole)
, bg_role(QPalette::NoRole)
@@ -214,7 +214,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
QWidgetPrivate::~QWidgetPrivate()
{
if (widgetItem)
- widgetItem->wid = 0;
+ widgetItem->wid = nullptr;
if (extra)
deleteExtra();
@@ -396,7 +396,7 @@ void QWidget::setAutoFillBackground(bool enabled)
If it is \nullptr (the default), the new widget will be a window.
If not, it will be a child of \e parent, and be constrained by
\e parent's geometry (unless you specify Qt::Window as window flag).
- \li \c{Qt::WindowFlags f = 0} (where available) sets the window flags;
+ \li \c{Qt::WindowFlags f = { }} (where available) sets the window flags;
the default is suitable for almost all widgets, but to get, for
example, a window without a window system frame, you must use
special flags.
@@ -819,8 +819,8 @@ void QWidget::setAutoFillBackground(bool enabled)
*/
-QWidgetMapper *QWidgetPrivate::mapper = 0; // widget with wid
-QWidgetSet *QWidgetPrivate::allWidgets = 0; // widgets with no wid
+QWidgetMapper *QWidgetPrivate::mapper = nullptr; // widget with wid
+QWidgetSet *QWidgetPrivate::allWidgets = nullptr; // widgets with no wid
/*****************************************************************************
@@ -890,7 +890,7 @@ struct QWidgetExceptionCleaner
\sa windowFlags
*/
QWidget::QWidget(QWidget *parent, Qt::WindowFlags f)
- : QObject(*new QWidgetPrivate, 0), QPaintDevice()
+ : QObject(*new QWidgetPrivate, nullptr), QPaintDevice()
{
QT_TRY {
d_func()->init(parent, f);
@@ -904,7 +904,7 @@ QWidget::QWidget(QWidget *parent, Qt::WindowFlags f)
/*! \internal
*/
QWidget::QWidget(QWidgetPrivate &dd, QWidget* parent, Qt::WindowFlags f)
- : QObject(dd, 0), QPaintDevice()
+ : QObject(dd, nullptr), QPaintDevice()
{
Q_D(QWidget);
QT_TRY {
@@ -996,7 +996,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
if (parentWidget && parentWidget->windowType() == Qt::Desktop) {
const QDesktopScreenWidget *sw = qobject_cast<const QDesktopScreenWidget *>(parentWidget);
targetScreen = sw ? sw->screenNumber() : 0;
- parentWidget = 0;
+ parentWidget = nullptr;
}
q->data = &data;
@@ -1072,7 +1072,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
QCoreApplication::sendEvent(q, &e);
QCoreApplication::postEvent(q, new QEvent(QEvent::PolishRequest));
- extraPaintEngine = 0;
+ extraPaintEngine = nullptr;
}
void QWidgetPrivate::createRecursively()
@@ -1307,9 +1307,9 @@ void QWidgetPrivate::create()
if (nativeParent->windowHandle()) {
if (flags & Qt::Window) {
win->setTransientParent(nativeParent->window()->windowHandle());
- win->setParent(0);
+ win->setParent(nullptr);
} else {
- win->setTransientParent(0);
+ win->setTransientParent(nullptr);
win->setParent(nativeParent->windowHandle());
}
}
@@ -1442,7 +1442,7 @@ QWidget::~QWidget()
// delete layout while we still are a valid widget
delete d->layout;
- d->layout = 0;
+ d->layout = nullptr;
// Remove myself from focus list
Q_ASSERT(d->focus_next->d_func()->focus_prev == this);
@@ -1451,7 +1451,7 @@ QWidget::~QWidget()
if (d->focus_next != this) {
d->focus_next->d_func()->focus_prev = d->focus_prev;
d->focus_prev->d_func()->focus_next = d->focus_next;
- d->focus_next = d->focus_prev = 0;
+ d->focus_next = d->focus_prev = nullptr;
}
@@ -1493,7 +1493,7 @@ QWidget::~QWidget()
}
delete d->needsFlush;
- d->needsFlush = 0;
+ d->needsFlush = nullptr;
// The next 20 lines are duplicated from QObject, but required here
// since QWidget deletes is children itself
@@ -1520,7 +1520,7 @@ QWidget::~QWidget()
if (QAbstractDeclarativeData::destroyed)
QAbstractDeclarativeData::destroyed(d->declarativeData, this);
}
- d->declarativeData = 0; // don't activate again in ~QObject
+ d->declarativeData = nullptr; // don't activate again in ~QObject
d->wasDeleted = false;
}
@@ -1564,7 +1564,7 @@ void QWidgetPrivate::setWinId(WId id) // set widget identifier
// will have the same windowid (the root window id) as the
// qt_desktopWidget. We should not add the second desktop widget
// to the mapper.
- bool userDesktopWidget = qt_desktopWidget != 0 && qt_desktopWidget != q && q->windowType() == Qt::Desktop;
+ bool userDesktopWidget = qt_desktopWidget != nullptr && qt_desktopWidget != q && q->windowType() == Qt::Desktop;
if (mapper && data.winid && !userDesktopWidget) {
mapper->remove(data.winid);
}
@@ -1589,19 +1589,19 @@ void QWidgetPrivate::createTLExtra()
if (!extra->topextra) {
extra->topextra = qt_make_unique<QTLWExtra>();
QTLWExtra* x = extra->topextra.get();
- x->backingStore = 0;
- x->sharedPainter = 0;
+ x->backingStore = nullptr;
+ x->sharedPainter = nullptr;
x->incw = x->inch = 0;
x->basew = x->baseh = 0;
x->frameStrut.setCoords(0, 0, 0, 0);
x->normalGeometry = QRect(0,0,-1,-1);
- x->savedFlags = 0;
+ x->savedFlags = { };
x->opacity = 255;
x->posIncludesFrame = 0;
x->sizeAdjusted = false;
x->inTopLevelResize = false;
x->embedded = 0;
- x->window = 0;
+ x->window = nullptr;
x->initialScreenIndex = -1;
#ifdef QWIDGET_EXTRA_DEBUG
@@ -1620,9 +1620,9 @@ void QWidgetPrivate::createExtra()
{
if (!extra) { // if not exists
extra = qt_make_unique<QWExtra>();
- extra->glContext = 0;
+ extra->glContext = nullptr;
#if QT_CONFIG(graphicsview)
- extra->proxyWidget = 0;
+ extra->proxyWidget = nullptr;
#endif
extra->minw = 0;
extra->minh = 0;
@@ -1681,7 +1681,7 @@ static void deleteBackingStore(QWidgetPrivate *d)
QTLWExtra *topData = d->topData();
delete topData->backingStore;
- topData->backingStore = 0;
+ topData->backingStore = nullptr;
}
void QWidgetPrivate::deleteTLSysExtra()
@@ -1705,7 +1705,7 @@ void QWidgetPrivate::deleteTLSysExtra()
extra->topextra->window->destroy();
}
delete extra->topextra->window;
- extra->topextra->window = 0;
+ extra->topextra->window = nullptr;
}
}
@@ -1805,7 +1805,7 @@ void QWidgetPrivate::paintOnScreen(const QRegion &rgn)
if (toBePainted.isEmpty())
return; // Nothing to repaint.
- drawWidget(q, toBePainted, QPoint(), QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawPaintOnScreen, 0);
+ drawWidget(q, toBePainted, QPoint(), QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawPaintOnScreen, nullptr);
if (Q_UNLIKELY(q->paintingActive()))
qWarning("QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent");
@@ -2302,10 +2302,10 @@ void QWidgetPrivate::deactivateWidgetCleanup()
Q_Q(QWidget);
// If this was the active application window, reset it
if (QApplication::activeWindow() == q)
- QApplication::setActiveWindow(0);
+ QApplication::setActiveWindow(nullptr);
// If the is the active mouse press widget, reset it
if (q == qt_button_down)
- qt_button_down = 0;
+ qt_button_down = nullptr;
}
@@ -2565,7 +2565,7 @@ void QWidget::setStyleSheet(const QString& styleSheet)
if (testAttribute(Qt::WA_SetStyle)) {
d->setStyle_helper(new QStyleSheetStyle(d->extra->style), true);
} else {
- d->setStyle_helper(new QStyleSheetStyle(0), true);
+ d->setStyle_helper(new QStyleSheetStyle(nullptr), true);
}
}
@@ -2608,7 +2608,7 @@ QStyle *QWidget::style() const
void QWidget::setStyle(QStyle *style)
{
Q_D(QWidget);
- setAttribute(Qt::WA_SetStyle, style != 0);
+ setAttribute(Qt::WA_SetStyle, style != nullptr);
d->createExtra();
#ifndef QT_NO_STYLE_STYLESHEET
if (QStyleSheetStyle *styleSheetStyle = qt_styleSheet(style)) {
@@ -2688,7 +2688,7 @@ void QWidgetPrivate::inheritStyle()
QStyle *origStyle = proxy ? proxy->base : extraStyle;
QWidget *parent = q->parentWidget();
- QStyle *parentStyle = (parent && parent->d_func()->extra) ? (QStyle*)parent->d_func()->extra->style : 0;
+ QStyle *parentStyle = (parent && parent->d_func()->extra) ? (QStyle*)parent->d_func()->extra->style : nullptr;
// If we have stylesheet on app or parent has stylesheet style, we need
// to be running a proxy
if (!qApp->styleSheet().isEmpty() || qt_styleSheet(parentStyle)) {
@@ -2711,7 +2711,7 @@ void QWidgetPrivate::inheritStyle()
// In such a case we need to start following the application style (i.e revert
// the propagation behavior of QStyleSheetStyle)
if (!q->testAttribute(Qt::WA_SetStyle))
- origStyle = 0;
+ origStyle = nullptr;
setStyle_helper(origStyle, true);
#endif // QT_NO_STYLE_STYLESHEET
@@ -3087,7 +3087,7 @@ bool QWidget::isEnabledTo(const QWidget *ancestor) const
*/
void QWidget::addAction(QAction *action)
{
- insertAction(0, action);
+ insertAction(nullptr, action);
}
/*!
@@ -3102,7 +3102,7 @@ void QWidget::addActions(QList<QAction*> actions)
#endif
{
for(int i = 0; i < actions.count(); i++)
- insertAction(0, actions.at(i));
+ insertAction(nullptr, actions.at(i));
}
/*!
@@ -3127,7 +3127,7 @@ void QWidget::insertAction(QAction *before, QAction *action)
int pos = d->actions.indexOf(before);
if (pos < 0) {
- before = 0;
+ before = nullptr;
pos = d->actions.size();
}
d->actions.insert(pos, action);
@@ -4608,7 +4608,7 @@ void QWidgetPrivate::updateFont(const QFont &font)
Q_Q(QWidget);
#ifndef QT_NO_STYLE_STYLESHEET
const QStyleSheetStyle* cssStyle;
- cssStyle = extra ? qt_styleSheet(extra->style) : 0;
+ cssStyle = extra ? qt_styleSheet(extra->style) : nullptr;
const bool useStyleSheetPropagationInWidgetStyles =
QCoreApplication::testAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles);
#endif
@@ -4844,7 +4844,7 @@ void qt_qpa_set_cursor(QWidget *w, bool force)
if (!w->testAttribute(Qt::WA_WState_Created))
return;
- static QPointer<QWidget> lastUnderMouse = 0;
+ static QPointer<QWidget> lastUnderMouse = nullptr;
if (force) {
lastUnderMouse = w;
} else if (lastUnderMouse) {
@@ -5121,7 +5121,7 @@ void QWidget::setGraphicsEffect(QGraphicsEffect *effect)
if (d->graphicsEffect) {
d->invalidateBackingStore(rect());
delete d->graphicsEffect;
- d->graphicsEffect = 0;
+ d->graphicsEffect = nullptr;
}
if (effect) {
@@ -5315,7 +5315,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
setSystemClip(sharedPainter->paintEngine(), 1, QRegion());
sharedPainter->restore();
}
- sourced->context = 0;
+ sourced->context = nullptr;
if (repaintManager)
repaintManager->markNeedsFlush(q, rgn, offset);
@@ -5433,7 +5433,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
if (!sharedPainter)
paintEngine->d_func()->systemRect = QRect();
else
- paintEngine->d_func()->currentClipDevice = 0;
+ paintEngine->d_func()->currentClipDevice = nullptr;
setSystemClip(pdev->paintEngine(), 1, QRegion());
}
@@ -5494,7 +5494,7 @@ void QWidgetPrivate::render(QPaintDevice *target, const QPoint &targetOffset,
if (paintRegion.isEmpty())
return;
- QPainter *oldSharedPainter = inRenderWithPainter ? sharedPainter() : 0;
+ QPainter *oldSharedPainter = inRenderWithPainter ? sharedPainter() : nullptr;
// Use the target's shared painter if set (typically set when doing
// "other->render(widget);" in the widget's paintEvent.
@@ -5555,7 +5555,7 @@ void QWidgetPrivate::paintSiblingsRecursive(QPaintDevice *pdev, const QObjectLis
const QPoint &offset, DrawWidgetFlags flags
, QPainter *sharedPainter, QWidgetRepaintManager *repaintManager)
{
- QWidget *w = 0;
+ QWidget *w = nullptr;
QRect boundingRect;
bool dirtyBoundingRect = true;
const bool exludeOpaqueChildren = (flags & DontDrawOpaqueChildren);
@@ -5849,7 +5849,7 @@ QString qt_setWindowTitle_helperHelper(const QString &title, const QWidget *widg
if (count%2) { // odd number of [*] -> replace last one
int lastIndex = cap.lastIndexOf(placeHolder, index - 1);
if (widget->isWindowModified()
- && widget->style()->styleHint(QStyle::SH_TitleBar_ModifyNotification, 0, widget))
+ && widget->style()->styleHint(QStyle::SH_TitleBar_ModifyNotification, nullptr, widget))
cap.replace(lastIndex, 3, QWidget::tr("*"));
else
cap.remove(lastIndex, 3);
@@ -5959,9 +5959,9 @@ void QWidget::setWindowTitle(const QString &title)
\note On \macos, window icons represent the active document,
and will not be displayed unless a file path has also been
- set using setFilePath.
+ set using setWindowFilePath.
- \sa windowTitle, setFilePath
+ \sa windowTitle, setWindowFilePath
*/
QIcon QWidget::windowIcon() const
{
@@ -6305,7 +6305,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
return;
#if QT_CONFIG(graphicsview)
- QWidget *previousProxyFocus = 0;
+ QWidget *previousProxyFocus = nullptr;
if (const auto &topData = window()->d_func()->extra) {
if (topData->proxyWidget && topData->proxyWidget->hasFocus()) {
previousProxyFocus = topData->proxyWidget->widget()->focusWidget();
@@ -6445,12 +6445,12 @@ void QWidgetPrivate::updateFocusChild()
if (q->isHidden()) {
while (w && w->isHidden()) {
w->d_func()->focus_child = q;
- w = w->isWindow() ? 0 : w->parentWidget();
+ w = w->isWindow() ? nullptr : w->parentWidget();
}
} else {
while (w) {
w->d_func()->focus_child = q;
- w = w->isWindow() ? 0 : w->parentWidget();
+ w = w->isWindow() ? nullptr : w->parentWidget();
}
}
@@ -6496,7 +6496,7 @@ void QWidget::clearFocus()
while (w) {
// Just like setFocus(), we update (clear) the focus_child of our parents
if (w->d_func()->focus_child == this)
- w->d_func()->focus_child = 0;
+ w->d_func()->focus_child = nullptr;
w = w->parentWidget();
}
@@ -6517,7 +6517,7 @@ void QWidget::clearFocus()
if (hasFocus()) {
// Update proxy state
- QApplicationPrivate::setFocusWidget(0, Qt::OtherFocusReason);
+ QApplicationPrivate::setFocusWidget(nullptr, Qt::OtherFocusReason);
#ifndef QT_NO_ACCESSIBILITY
QAccessibleEvent event(this, QAccessible::Focus);
QAccessible::updateAccessibility(&event);
@@ -6594,10 +6594,10 @@ bool QWidget::focusNextPrevChild(bool next)
*/
if (wrappingOccurred) {
QWindow *window = windowHandle();
- if (window != 0) {
+ if (window != nullptr) {
QWindowPrivate *winp = qt_window_private(window);
- if (winp->platformWindow != 0) {
+ if (winp->platformWindow != nullptr) {
QFocusEvent event(QEvent::FocusIn, reason);
event.ignore();
winp->platformWindow->windowEvent(&event);
@@ -6675,7 +6675,7 @@ bool QWidget::isActiveWindow() const
}
#endif
- if(style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, this)) {
+ if (style()->styleHint(QStyle::SH_Widget_ShareActivation, nullptr, this)) {
if(tlw->windowType() == Qt::Tool &&
!tlw->isModal() &&
(!tlw->parentWidget() || tlw->parentWidget()->isActiveWindow()))
@@ -6831,9 +6831,9 @@ void QWidgetPrivate::reparentFocusWidgets(QWidget * oldtlw)
focus_child->clearFocus();
// separate the focus chain into new (children of myself) and old (the rest)
- QWidget *firstOld = 0;
+ QWidget *firstOld = nullptr;
//QWidget *firstNew = q; //invariant
- QWidget *o = 0; // last in the old list
+ QWidget *o = nullptr; // last in the old list
QWidget *n = q; // last in the new list
bool prevWasNew = true;
@@ -7841,7 +7841,7 @@ void QWidgetPrivate::show_helper()
#endif
if (QApplicationPrivate::hidden_focus_widget == q) {
- QApplicationPrivate::hidden_focus_widget = 0;
+ QApplicationPrivate::hidden_focus_widget = nullptr;
q->setFocus(Qt::OtherFocusReason);
}
@@ -7940,7 +7940,7 @@ void QWidgetPrivate::hide_helper()
bool isEmbedded = false;
#if QT_CONFIG(graphicsview)
- isEmbedded = q->isWindow() && !bypassGraphicsProxyWidget(q) && nearestGraphicsProxyWidget(q->parentWidget()) != 0;
+ isEmbedded = q->isWindow() && !bypassGraphicsProxyWidget(q) && nearestGraphicsProxyWidget(q->parentWidget()) != nullptr;
#else
Q_UNUSED(isEmbedded);
#endif
@@ -8133,7 +8133,7 @@ void QWidgetPrivate::setVisible(bool visible)
QCoreApplication::sendEvent(q, &showToParentEvent);
} else { // hide
if (QApplicationPrivate::hidden_focus_widget == q)
- QApplicationPrivate::hidden_focus_widget = 0;
+ QApplicationPrivate::hidden_focus_widget = nullptr;
// hw: The test on getOpaqueRegion() needs to be more intelligent
// currently it doesn't work if the widget is hidden (the region will
@@ -8843,7 +8843,7 @@ bool QWidget::event(QEvent *event)
case Qt::ActionsContextMenu:
if (d->actions.count()) {
QMenu::exec(d->actions, static_cast<QContextMenuEvent *>(event)->globalPos(),
- 0, this);
+ nullptr, this);
break;
}
Q_FALLTHROUGH();
@@ -10035,9 +10035,9 @@ QLayout *QWidget::takeLayout()
Q_D(QWidget);
QLayout *l = layout();
if (!l)
- return 0;
- d->layout = 0;
- l->setParent(0);
+ return nullptr;
+ d->layout = nullptr;
+ l->setParent(nullptr);
return l;
}
@@ -10159,10 +10159,10 @@ QWidget *QWidget::childAt(const QPoint &p) const
QWidget *QWidgetPrivate::childAt_helper(const QPoint &p, bool ignoreChildrenInDestructor) const
{
if (children.isEmpty())
- return 0;
+ return nullptr;
if (!pointInsideRectAndMask(p))
- return 0;
+ return nullptr;
return childAtRecursiveHelper(p, ignoreChildrenInDestructor);
}
@@ -10190,7 +10190,7 @@ QWidget *QWidgetPrivate::childAtRecursiveHelper(const QPoint &p, bool ignoreChil
// We have found our target; namely the child at position 'p'.
return child;
}
- return 0;
+ return nullptr;
}
void QWidgetPrivate::updateGeometry_helper(bool forceUpdate)
@@ -10403,7 +10403,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
if (f & Qt::Window) // Frame geometry likely changes, refresh.
d->data.fstrut_dirty = true;
- QWidget *desktopWidget = 0;
+ QWidget *desktopWidget = nullptr;
if (parent && parent->windowType() == Qt::Desktop)
desktopWidget = parent;
bool newParent = (parent != parentWidget()) || !wasCreated || desktopWidget;
@@ -10431,7 +10431,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
d->setParent_sys(parent, f);
if (desktopWidget)
- parent = 0;
+ parent = nullptr;
#ifndef QT_NO_OPENGL
if (d->textureChildSeen && parent) {
@@ -10545,7 +10545,7 @@ void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f)
// programmer specified desktop widget
const QDesktopScreenWidget *sw = qobject_cast<const QDesktopScreenWidget *>(newparent);
targetScreen = sw ? sw->screenNumber() : 0;
- newparent = 0;
+ newparent = nullptr;
}
setWinId(0);
@@ -10555,19 +10555,19 @@ void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f)
if (q->windowHandle()) {
q->windowHandle()->setFlags(f);
QWidget *parentWithWindow =
- newparent ? (newparent->windowHandle() ? newparent : newparent->nativeParentWidget()) : 0;
+ newparent ? (newparent->windowHandle() ? newparent : newparent->nativeParentWidget()) : nullptr;
if (parentWithWindow) {
QWidget *topLevel = parentWithWindow->window();
if ((f & Qt::Window) && topLevel && topLevel->windowHandle()) {
q->windowHandle()->setTransientParent(topLevel->windowHandle());
- q->windowHandle()->setParent(0);
+ q->windowHandle()->setParent(nullptr);
} else {
- q->windowHandle()->setTransientParent(0);
+ q->windowHandle()->setTransientParent(nullptr);
q->windowHandle()->setParent(parentWithWindow->windowHandle());
}
} else {
- q->windowHandle()->setTransientParent(0);
- q->windowHandle()->setParent(0);
+ q->windowHandle()->setTransientParent(nullptr);
+ q->windowHandle()->setParent(nullptr);
}
}
}
@@ -10598,7 +10598,7 @@ void QWidgetPrivate::setParent_sys(QWidget *newparent, Qt::WindowFlags f)
continue;
QWidgetWindow *childWW = qobject_cast<QWidgetWindow *>(childWindow);
- QWidget *childWidget = childWW ? childWW->widget() : 0;
+ QWidget *childWidget = childWW ? childWW->widget() : nullptr;
if (!childWW || (childWidget && childWidget->testAttribute(Qt::WA_NativeWindow)))
childWindow->setParent(newParentWindow);
}
@@ -12004,7 +12004,7 @@ QOpenGLContext *QWidgetPrivate::shareContext() const
return 0;
#else
if (!extra || !extra->topextra || !extra->topextra->window)
- return 0;
+ return nullptr;
if (!extra->topextra->shareContext) {
auto ctx = qt_make_unique<QOpenGLContext>();
@@ -12063,7 +12063,7 @@ QGraphicsProxyWidget *QWidget::graphicsProxyWidget() const
if (d->extra) {
return d->extra->proxyWidget;
}
- return 0;
+ return nullptr;
}
#endif
@@ -12124,7 +12124,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
qApp->d_func()->closePopup(this);
if (this == QApplicationPrivate::active_window)
- QApplication::setActiveWindow(0);
+ QApplication::setActiveWindow(nullptr);
if (QWidget::mouseGrabber() == this)
releaseMouse();
if (QWidget::keyboardGrabber() == this)
@@ -12188,7 +12188,7 @@ QPaintEngine *QWidget::paintEngine() const
const_cast<QWidgetPrivate *>(d_func())->noPaintOnScreen = 1;
#endif
- return 0; //##### @@@
+ return nullptr; //##### @@@
}
// Do not call QWindow::mapToGlobal() until QPlatformWindow is properly showing.
@@ -12275,10 +12275,10 @@ QPoint QWidget::mapFromGlobal(const QPoint &pos) const
return t.transform.inverted().map(windowLocal);
}
-QWidget *qt_pressGrab = 0;
-QWidget *qt_mouseGrb = 0;
+QWidget *qt_pressGrab = nullptr;
+QWidget *qt_mouseGrb = nullptr;
static bool mouseGrabWithCursor = false;
-static QWidget *keyboardGrb = 0;
+static QWidget *keyboardGrb = nullptr;
static inline QWindow *grabberWindow(const QWidget *w)
{
@@ -12290,7 +12290,7 @@ static inline QWindow *grabberWindow(const QWidget *w)
}
#ifndef QT_NO_CURSOR
-static void grabMouseForWidget(QWidget *widget, const QCursor *cursor = 0)
+static void grabMouseForWidget(QWidget *widget, const QCursor *cursor = nullptr)
#else
static void grabMouseForWidget(QWidget *widget)
#endif
@@ -12310,7 +12310,7 @@ static void grabMouseForWidget(QWidget *widget)
}
qt_mouseGrb = widget;
- qt_pressGrab = 0;
+ qt_pressGrab = nullptr;
}
static void releaseMouseGrabOfWidget(QWidget *widget)
@@ -12326,7 +12326,7 @@ static void releaseMouseGrabOfWidget(QWidget *widget)
window->setMouseGrabEnabled(false);
}
}
- qt_mouseGrb = 0;
+ qt_mouseGrb = nullptr;
}
/*!
@@ -12455,7 +12455,7 @@ void QWidget::releaseKeyboard()
if (keyboardGrb == this) {
if (QWindow *window = grabberWindow(this))
window->setKeyboardGrabEnabled(false);
- keyboardGrb = 0;
+ keyboardGrb = nullptr;
}
}
@@ -12532,8 +12532,8 @@ void QWidget::activateWindow()
*/
int QWidget::metric(PaintDeviceMetric m) const
{
- QWindow *topLevelWindow = 0;
- QScreen *screen = 0;
+ QWindow *topLevelWindow = nullptr;
+ QScreen *screen = nullptr;
if (QWidget *topLevel = window()) {
topLevelWindow = topLevel->windowHandle();
if (topLevelWindow)
@@ -12619,14 +12619,14 @@ QPainter *QWidget::sharedPainter() const
{
// Someone sent a paint event directly to the widget
if (!d_func()->redirectDev)
- return 0;
+ return nullptr;
QPainter *sp = d_func()->sharedPainter();
if (!sp || !sp->isActive())
- return 0;
+ return nullptr;
if (sp->paintEngine()->paintDevice() != d_func()->redirectDev)
- return 0;
+ return nullptr;
return sp;
}
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index 83a6e6d4b3..415a738eb4 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -175,11 +175,11 @@ class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
Q_PROPERTY(QSize sizeHint READ sizeHint)
Q_PROPERTY(QSize minimumSizeHint READ minimumSizeHint)
Q_PROPERTY(bool acceptDrops READ acceptDrops WRITE setAcceptDrops)
- Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle NOTIFY windowTitleChanged DESIGNABLE isWindow)
- Q_PROPERTY(QIcon windowIcon READ windowIcon WRITE setWindowIcon NOTIFY windowIconChanged DESIGNABLE isWindow)
- Q_PROPERTY(QString windowIconText READ windowIconText WRITE setWindowIconText NOTIFY windowIconTextChanged DESIGNABLE isWindow) // deprecated
- Q_PROPERTY(double windowOpacity READ windowOpacity WRITE setWindowOpacity DESIGNABLE isWindow)
- Q_PROPERTY(bool windowModified READ isWindowModified WRITE setWindowModified DESIGNABLE isWindow)
+ Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle NOTIFY windowTitleChanged)
+ Q_PROPERTY(QIcon windowIcon READ windowIcon WRITE setWindowIcon NOTIFY windowIconChanged)
+ Q_PROPERTY(QString windowIconText READ windowIconText WRITE setWindowIconText NOTIFY windowIconTextChanged) // deprecated
+ Q_PROPERTY(double windowOpacity READ windowOpacity WRITE setWindowOpacity)
+ Q_PROPERTY(bool windowModified READ isWindowModified WRITE setWindowModified)
#ifndef QT_NO_TOOLTIP
Q_PROPERTY(QString toolTip READ toolTip WRITE setToolTip)
Q_PROPERTY(int toolTipDuration READ toolTipDuration WRITE setToolTipDuration)
@@ -201,7 +201,7 @@ class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
#endif
Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET unsetLocale)
- Q_PROPERTY(QString windowFilePath READ windowFilePath WRITE setWindowFilePath DESIGNABLE isWindow)
+ Q_PROPERTY(QString windowFilePath READ windowFilePath WRITE setWindowFilePath)
Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints)
public:
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index 698928b0b0..6915782cb3 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -420,7 +420,7 @@ public:
void setVisible(bool);
void setEnabled_helper(bool);
- static void adjustFlags(Qt::WindowFlags &flags, QWidget *w = 0);
+ static void adjustFlags(Qt::WindowFlags &flags, QWidget *w = nullptr);
void updateFrameStrut();
QRect frameStrut() const;
@@ -592,7 +592,7 @@ public:
Q_Q(QWidget);
return q->testAttribute(Qt::WA_AlwaysStackOnTop)
? QPlatformTextureList::StacksOnTop
- : QPlatformTextureList::Flags(nullptr);
+ : QPlatformTextureList::Flags();
}
virtual QImage grabFramebuffer() { return QImage(); }
virtual void beginBackingStorePainting() { }
diff --git a/src/widgets/kernel/qwidgetaction.cpp b/src/widgets/kernel/qwidgetaction.cpp
index 6eebaca42c..9649e51b92 100644
--- a/src/widgets/kernel/qwidgetaction.cpp
+++ b/src/widgets/kernel/qwidgetaction.cpp
@@ -146,7 +146,7 @@ void QWidgetAction::setDefaultWidget(QWidget *widget)
setVisible(!(widget->isHidden() && widget->testAttribute(Qt::WA_WState_ExplicitShowHide)));
d->defaultWidget->hide();
- d->defaultWidget->setParent(0);
+ d->defaultWidget->setParent(nullptr);
d->defaultWidgetInUse = false;
if (!isEnabled())
d->defaultWidget->setEnabled(false);
@@ -177,7 +177,7 @@ QWidget *QWidgetAction::requestWidget(QWidget *parent)
QWidget *w = createWidget(parent);
if (!w) {
if (d->defaultWidgetInUse || !d->defaultWidget)
- return 0;
+ return nullptr;
d->defaultWidget->setParent(parent);
d->defaultWidgetInUse = true;
return d->defaultWidget;
@@ -203,7 +203,7 @@ void QWidgetAction::releaseWidget(QWidget *widget)
if (widget == d->defaultWidget) {
d->defaultWidget->hide();
- d->defaultWidget->setParent(0);
+ d->defaultWidget->setParent(nullptr);
d->defaultWidgetInUse = false;
return;
}
@@ -251,7 +251,7 @@ bool QWidgetAction::eventFilter(QObject *obj, QEvent *event)
QWidget *QWidgetAction::createWidget(QWidget *parent)
{
Q_UNUSED(parent)
- return 0;
+ return nullptr;
}
/*!
diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp
index c3211e275f..135a1527ac 100644
--- a/src/widgets/kernel/qwidgetrepaintmanager.cpp
+++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp
@@ -695,7 +695,7 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget)
return qt_dummy_platformTextureList();
}
- return 0;
+ return nullptr;
}
#else
@@ -788,7 +788,7 @@ bool QWidgetRepaintManager::syncAllowed()
QTLWExtra *tlwExtra = tlw->d_func()->maybeTopData();
if (textureListWatcher && !textureListWatcher->isLocked()) {
textureListWatcher->deleteLater();
- textureListWatcher = 0;
+ textureListWatcher = nullptr;
} else if (!tlwExtra->widgetTextures.empty()) {
bool skipSync = false;
for (const auto &tl : tlwExtra->widgetTextures) {
@@ -822,7 +822,7 @@ void QWidgetRepaintManager::paintAndFlush()
if (hasStaticContents() && !store->size().isEmpty() ) {
// Repaint existing dirty area and newly visible area.
const QRect clipRect(0, 0, surfaceGeometry.width(), surfaceGeometry.height());
- const QRegion staticRegion(staticContents(0, clipRect));
+ const QRegion staticRegion(staticContents(nullptr, clipRect));
QRegion newVisible(0, 0, tlwRect.width(), tlwRect.height());
newVisible -= staticRegion;
dirty += newVisible;
@@ -1008,13 +1008,13 @@ void QWidgetRepaintManager::paintAndFlush()
QPoint offset;
if (w != tlw)
offset += w->mapTo(tlw, QPoint());
- wd->drawWidget(store->paintDevice(), toBePainted, offset, flags, 0, this);
+ wd->drawWidget(store->paintDevice(), toBePainted, offset, flags, nullptr, this);
}
// Paint the rest with composition.
if (repaintAllWidgets || !dirtyCopy.isEmpty()) {
QWidgetPrivate::DrawWidgetFlags flags = QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawRecursive;
- tlw->d_func()->drawWidget(store->paintDevice(), dirtyCopy, QPoint(), flags, 0, this);
+ tlw->d_func()->drawWidget(store->paintDevice(), dirtyCopy, QPoint(), flags, nullptr, this);
}
store->endPaint();
@@ -1108,7 +1108,7 @@ void QWidgetRepaintManager::flush()
for (QWidget *w : qExchange(needsFlushWidgets, {})) {
QWidgetPrivate *wd = w->d_func();
Q_ASSERT(wd->needsFlush);
- QPlatformTextureList *widgetTexturesForNative = wd->textureChildSeen ? widgetTexturesFor(tlw, w) : 0;
+ QPlatformTextureList *widgetTexturesForNative = wd->textureChildSeen ? widgetTexturesFor(tlw, w) : nullptr;
flush(w, *wd->needsFlush, widgetTexturesForNative);
*wd->needsFlush = QRegion();
}
@@ -1284,7 +1284,7 @@ QRegion QWidgetRepaintManager::staticContents(QWidget *parent, const QRect &with
wd->clipToEffectiveMask(visible);
if (visible.isEmpty())
continue;
- wd->subtractOpaqueSiblings(visible, 0, /*alsoNonOpaque=*/true);
+ wd->subtractOpaqueSiblings(visible, nullptr, /*alsoNonOpaque=*/true);
visible.translate(offset);
region += visible;
@@ -1331,7 +1331,7 @@ void QWidgetPrivate::invalidateBackingStore_resizeHelper(const QPoint &oldPos, c
if (!staticContents || graphicsEffect) {
QRegion staticChildren;
- QWidgetRepaintManager *bs = 0;
+ QWidgetRepaintManager *bs = nullptr;
if (offset.isNull() && (bs = maybeRepaintManager()))
staticChildren = bs->staticContents(q, oldWidgetRect);
const bool hasStaticChildren = !staticChildren.isEmpty();
diff --git a/src/widgets/kernel/qwidgetsvariant.cpp b/src/widgets/kernel/qwidgetsvariant.cpp
index 02b4ea20a7..edb166e8d5 100644
--- a/src/widgets/kernel/qwidgetsvariant.cpp
+++ b/src/widgets/kernel/qwidgetsvariant.cpp
@@ -51,12 +51,12 @@ namespace {
static void construct(QVariant::Private *x, const void *copy)
{
switch (x->type) {
- case QVariant::SizePolicy:
+ case QMetaType::QSizePolicy:
v_construct<QSizePolicy>(x, copy);
break;
default:
qWarning("Trying to construct an instance of an invalid type, type id: %i", x->type);
- x->type = QVariant::Invalid;
+ x->type = QMetaType::UnknownType;
return;
}
x->is_null = !copy;
@@ -65,7 +65,7 @@ static void construct(QVariant::Private *x, const void *copy)
static void clear(QVariant::Private *d)
{
switch (d->type) {
- case QVariant::SizePolicy:
+ case QMetaType::QSizePolicy:
v_clear<QSizePolicy>(d);
break;
default:
@@ -73,7 +73,7 @@ static void clear(QVariant::Private *d)
return;
}
- d->type = QVariant::Invalid;
+ d->type = QMetaType::UnknownType;
d->is_null = true;
d->is_shared = false;
}
@@ -88,7 +88,7 @@ static bool compare(const QVariant::Private *a, const QVariant::Private *b)
{
Q_ASSERT(a->type == b->type);
switch(a->type) {
- case QVariant::SizePolicy:
+ case QMetaType::QSizePolicy:
return *v_cast<QSizePolicy>(a) == *v_cast<QSizePolicy>(b);
default:
Q_ASSERT(false);
@@ -111,7 +111,7 @@ static void streamDebug(QDebug dbg, const QVariant &v)
{
QVariant::Private *d = const_cast<QVariant::Private *>(&v.data_ptr());
switch (d->type) {
- case QVariant::SizePolicy:
+ case QMetaType::QSizePolicy:
dbg.nospace() << *v_cast<QSizePolicy>(d);
break;
default:
@@ -125,12 +125,12 @@ static const QVariant::Handler widgets_handler = {
clear,
isNull,
#ifndef QT_NO_DATASTREAM
- 0,
- 0,
+ nullptr,
+ nullptr,
#endif
compare,
convert,
- 0,
+ nullptr,
#if !defined(QT_NO_DEBUG_STREAM)
streamDebug
#else
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 596343c52f..904067afda 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -57,10 +57,10 @@ QT_BEGIN_NAMESPACE
Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets();
-Q_WIDGETS_EXPORT QWidget *qt_button_down = 0; // widget got last button-down
+Q_WIDGETS_EXPORT QWidget *qt_button_down = nullptr; // widget got last button-down
// popup control
-QWidget *qt_popup_down = 0; // popup that contains the pressed widget
+QWidget *qt_popup_down = nullptr; // popup that contains the pressed widget
extern int openPopupCount;
bool qt_replay_popup_mouse_event = false;
extern bool qt_try_modal(QWidget *widget, QEvent::Type type);
@@ -156,7 +156,7 @@ QOpenGLContext *QWidgetWindowPrivate::shareContext() const
#endif // opengl
QWidgetWindow::QWidgetWindow(QWidget *widget)
- : QWindow(*new QWidgetWindowPrivate(), 0)
+ : QWindow(*new QWidgetWindowPrivate(), nullptr)
, m_widget(widget)
{
updateObjectName();
@@ -179,7 +179,7 @@ QAccessibleInterface *QWidgetWindow::accessibleRoot() const
{
if (m_widget)
return QAccessible::queryAccessibleInterface(m_widget);
- return 0;
+ return nullptr;
}
#endif
@@ -374,7 +374,7 @@ bool QWidgetWindow::event(QEvent *event)
#endif // QT_NO_CONTEXTMENU
case QEvent::WindowBlocked:
- qt_button_down = 0;
+ qt_button_down = nullptr;
break;
case QEvent::UpdateRequest:
@@ -393,7 +393,7 @@ bool QWidgetWindow::event(QEvent *event)
return QWindow::event(event);
}
-QPointer<QWidget> qt_last_mouse_receiver = 0;
+QPointer<QWidget> qt_last_mouse_receiver = nullptr;
void QWidgetWindow::handleEnterLeaveEvent(QEvent *event)
{
@@ -406,7 +406,7 @@ void QWidgetWindow::handleEnterLeaveEvent(QEvent *event)
return;
#endif
if (event->type() == QEvent::Leave) {
- QWidget *enter = 0;
+ QWidget *enter = nullptr;
// Check from window system event queue if the next queued enter targets a window
// in the same window hierarchy (e.g. enter a child of this window). If so,
// remove the enter event from queue and handle both in single dispatch.
@@ -484,13 +484,13 @@ QWidget *QWidgetWindow::getFocusWidget(FocusWidgets fw)
void QWidgetWindow::handleFocusInEvent(QFocusEvent *e)
{
- QWidget *focusWidget = 0;
+ QWidget *focusWidget = nullptr;
if (e->reason() == Qt::BacktabFocusReason)
focusWidget = getFocusWidget(LastFocusWidget);
else if (e->reason() == Qt::TabFocusReason)
focusWidget = getFocusWidget(FirstFocusWidget);
- if (focusWidget != 0)
+ if (focusWidget != nullptr)
focusWidget->setFocus();
}
@@ -513,8 +513,8 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
QWidget *popupChild = activePopupWidget->childAt(mapped);
if (activePopupWidget != qt_popup_down) {
- qt_button_down = 0;
- qt_popup_down = 0;
+ qt_button_down = nullptr;
+ qt_popup_down = nullptr;
}
switch (event->type()) {
@@ -589,7 +589,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
&& qt_replay_popup_mouse_event
&& QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ReplayMousePressOutsidePopup).toBool()) {
if (m_widget->windowType() != Qt::Popup)
- qt_button_down = 0;
+ qt_button_down = nullptr;
if (event->type() == QEvent::MouseButtonPress) {
// the popup disappeared, replay the mouse press event
QWidget *w = QApplication::widgetAt(event->globalPos());
@@ -636,8 +636,8 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
#endif
if (releaseAfter) {
- qt_button_down = 0;
- qt_popup_down = 0;
+ qt_button_down = nullptr;
+ qt_popup_down = nullptr;
}
return;
}
@@ -1050,7 +1050,7 @@ bool QWidgetWindow::nativeEvent(const QByteArray &eventType, void *message, long
#if QT_CONFIG(tabletevent)
void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
{
- static QPointer<QWidget> qt_tablet_target = 0;
+ static QPointer<QWidget> qt_tablet_target = nullptr;
QWidget *widget = qt_tablet_target;
@@ -1076,7 +1076,7 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
}
if (event->type() == QEvent::TabletRelease && event->buttons() == Qt::NoButton)
- qt_tablet_target = 0;
+ qt_tablet_target = nullptr;
}
#endif // QT_CONFIG(tabletevent)
@@ -1084,7 +1084,7 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
void QWidgetWindow::handleGestureEvent(QNativeGestureEvent *e)
{
// copy-pasted code to find correct widget follows:
- QObject *receiver = 0;
+ QObject *receiver = nullptr;
if (QApplicationPrivate::inPopupMode()) {
QWidget *popup = QApplication::activePopupWidget();
QWidget *popupFocusWidget = popup->focusWidget();
diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp
index fd8581edbb..b4d889fdfa 100644
--- a/src/widgets/kernel/qwindowcontainer.cpp
+++ b/src/widgets/kernel/qwindowcontainer.cpp
@@ -58,8 +58,8 @@ public:
Q_DECLARE_PUBLIC(QWindowContainer)
QWindowContainerPrivate()
- : window(0)
- , oldFocusWindow(0)
+ : window(nullptr)
+ , oldFocusWindow(nullptr)
, usesNativeWidgets(false)
{
}
@@ -70,7 +70,7 @@ public:
QWindowContainer *wc = qobject_cast<QWindowContainer *>(w);
if (wc)
return wc->d_func();
- return 0;
+ return nullptr;
}
void updateGeometry() {
@@ -90,7 +90,7 @@ public:
void updateUsesNativeWidgets()
{
- if (window->parent() == 0)
+ if (window->parent() == nullptr)
return;
Q_Q(QWindowContainer);
if (q->internalWinId()) {
@@ -295,7 +295,7 @@ bool QWindowContainer::event(QEvent *e)
case QEvent::ChildRemoved: {
QChildEvent *ce = static_cast<QChildEvent *>(e);
if (ce->child() == d->window)
- d->window = 0;
+ d->window = nullptr;
break;
}
// The only thing we are interested in is making sure our sizes stay
diff --git a/src/widgets/kernel/qwindowcontainer_p.h b/src/widgets/kernel/qwindowcontainer_p.h
index c6de168c10..72474077aa 100644
--- a/src/widgets/kernel/qwindowcontainer_p.h
+++ b/src/widgets/kernel/qwindowcontainer_p.h
@@ -64,7 +64,7 @@ class Q_WIDGETS_EXPORT QWindowContainer : public QWidget
Q_DECLARE_PRIVATE(QWindowContainer)
public:
- explicit QWindowContainer(QWindow *embeddedWindow, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
+ explicit QWindowContainer(QWindow *embeddedWindow, QWidget *parent = nullptr, Qt::WindowFlags f = { });
~QWindowContainer();
QWindow *containedWindow() const;
diff --git a/src/widgets/kernel/win.pri b/src/widgets/kernel/win.pri
index 3b3170beb1..eede987b4c 100644
--- a/src/widgets/kernel/win.pri
+++ b/src/widgets/kernel/win.pri
@@ -1,7 +1,6 @@
# Qt/Windows only configuration file
# --------------------------------------------------------------------
-INCLUDEPATH += ../3rdparty/wintab
!winrt {
LIBS_PRIVATE *= -luxtheme -ldwmapi
QMAKE_USE_PRIVATE += shell32
diff --git a/src/widgets/statemachine/qguistatemachine.cpp b/src/widgets/statemachine/qguistatemachine.cpp
index 42691d6b77..b310da5781 100644
--- a/src/widgets/statemachine/qguistatemachine.cpp
+++ b/src/widgets/statemachine/qguistatemachine.cpp
@@ -456,7 +456,7 @@ const QStateMachinePrivate::Handler qt_gui_statemachine_handler = {
cloneEvent
};
-static const QStateMachinePrivate::Handler *qt_guistatemachine_last_handler = 0;
+static const QStateMachinePrivate::Handler *qt_guistatemachine_last_handler = nullptr;
void qRegisterGuiStateMachine()
{
qt_guistatemachine_last_handler = QStateMachinePrivate::handler;
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 9fa00b8d3f..f4a53c9dfe 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -123,7 +123,7 @@ QT_BEGIN_NAMESPACE
static QWindow *qt_getWindow(const QWidget *widget)
{
- return widget ? widget->window()->windowHandle() : 0;
+ return widget ? widget->window()->windowHandle() : nullptr;
}
/*!
@@ -353,7 +353,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
p->fillRect(mid_h, opt->rect.y(), 1, bef_v - opt->rect.y(), brush);
break; }
case PE_FrameStatusBarItem:
- qDrawShadeRect(p, opt->rect, opt->palette, true, 1, 0, 0);
+ qDrawShadeRect(p, opt->rect, opt->palette, true, 1, 0, nullptr);
break;
case PE_IndicatorHeaderArrow:
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)) {
@@ -450,7 +450,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
#endif // QT_CONFIG(tabbar)
case PE_FrameTabWidget:
case PE_FrameWindow:
- qDrawWinPanel(p, opt->rect, opt->palette, false, 0);
+ qDrawWinPanel(p, opt->rect, opt->palette, false, nullptr);
break;
case PE_FrameLineEdit:
proxy()->drawPrimitive(PE_Frame, opt, p, widget);
@@ -493,17 +493,17 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
x -= 2;
if (opt->rect.height() > 4) {
qDrawShadePanel(p, x, 2, 3, opt->rect.height() - 4,
- opt->palette, false, 1, 0);
+ opt->palette, false, 1, nullptr);
qDrawShadePanel(p, x+3, 2, 3, opt->rect.height() - 4,
- opt->palette, false, 1, 0);
+ opt->palette, false, 1, nullptr);
}
} else {
if (opt->rect.width() > 4) {
int y = opt->rect.height() / 3;
qDrawShadePanel(p, 2, y, opt->rect.width() - 4, 3,
- opt->palette, false, 1, 0);
+ opt->palette, false, 1, nullptr);
qDrawShadePanel(p, 2, y+3, opt->rect.width() - 4, 3,
- opt->palette, false, 1, 0);
+ opt->palette, false, 1, nullptr);
}
}
p->restore();
@@ -818,7 +818,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
#if QT_CONFIG(toolbutton)
static void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbutton,
- const QRect &rect, QPainter *painter, const QWidget *widget = 0)
+ const QRect &rect, QPainter *painter, const QWidget *widget = nullptr)
{
QStyle::PrimitiveElement pe;
switch (toolbutton->arrowType) {
@@ -1016,7 +1016,7 @@ QSize QCommonStylePrivate::viewItemSize(const QStyleOptionViewItem *option, int
void QCommonStylePrivate::viewItemDrawText(QPainter *p, const QStyleOptionViewItem *option, const QRect &rect) const
{
const QWidget *widget = option->widget;
- const int textMargin = proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, widget) + 1;
+ const int textMargin = proxyStyle->pixelMetric(QStyle::PM_FocusFrameHMargin, nullptr, widget) + 1;
QRect textRect = rect.adjusted(textMargin, 0, -textMargin, 0); // remove width padding
const bool wrapText = option->features & QStyleOptionViewItem::WrapText;
@@ -1557,7 +1557,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
qint64 maximum = qint64(pb->maximum);
qint64 progress = qint64(pb->progress);
- QMatrix m;
+ QTransform m;
if (vertical) {
rect = QRect(rect.y(), rect.x(), rect.height(), rect.width()); // flip width and height
@@ -2466,6 +2466,12 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
r = visualRect(opt->direction, opt->rect, r);
}
break;
+ case SE_PushButtonBevel:
+ {
+ r = opt->rect;
+ r = visualRect(opt->direction, opt->rect, r);
+ }
+ break;
case SE_CheckBoxIndicator:
{
int h = proxy()->pixelMetric(PM_IndicatorHeight, opt, widget);
@@ -2932,8 +2938,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(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width());
- const int buttonOverlap = proxy()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget);
+ const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, nullptr, widget), QApplication::globalStrut().width());
+ const int buttonOverlap = proxy()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, nullptr, 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()));
@@ -2941,7 +2947,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(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width());
+ const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, nullptr, 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()));
@@ -3031,8 +3037,8 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
const QStyleOptionDockWidget *dwOpt
= qstyleoption_cast<const QStyleOptionDockWidget*>(opt);
- bool canClose = dwOpt == 0 ? true : dwOpt->closable;
- bool canFloat = dwOpt == 0 ? false : dwOpt->floatable;
+ bool canClose = dwOpt == nullptr ? true : dwOpt->closable;
+ bool canFloat = dwOpt == nullptr ? false : dwOpt->floatable;
const bool verticalTitleBar = dwOpt && dwOpt->verticalTitleBar;
@@ -3135,7 +3141,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
d->viewItemLayout(vopt, &d->checkRect, &d->decorationRect, &d->displayRect, false);
if (d->cachedOption) {
delete d->cachedOption;
- d->cachedOption = 0;
+ d->cachedOption = nullptr;
}
d->cachedOption = new QStyleOptionViewItem(*vopt);
}
@@ -5028,8 +5034,9 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
case CT_SpinBox:
if (const QStyleOptionSpinBox *vopt = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {
// Add button + frame widths
+ const qreal dpi = QStyleHelper::dpi(opt);
const bool hasButtons = (vopt->buttonSymbols != QAbstractSpinBox::NoButtons);
- const int buttonWidth = hasButtons ? proxy()->subControlRect(CC_SpinBox, vopt, SC_SpinBoxUp, widget).width() : 0;
+ const int buttonWidth = hasButtons ? qRound(QStyleHelper::dpiScaled(16, dpi)) : 0;
const int fw = vopt->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, vopt, widget) : 0;
sz += QSize(buttonWidth + 2*fw, 2*fw);
}
@@ -5144,7 +5151,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
case SH_Table_GridLineColor:
if (opt)
- ret = opt->palette.color(QPalette::Mid).rgb();
+ ret = opt->palette.color(QPalette::Mid).rgba();
else
ret = -1;
break;
diff --git a/src/widgets/styles/qcommonstyle_p.h b/src/widgets/styles/qcommonstyle_p.h
index 4860dfe4c9..6223a26a54 100644
--- a/src/widgets/styles/qcommonstyle_p.h
+++ b/src/widgets/styles/qcommonstyle_p.h
@@ -122,7 +122,7 @@ public:
mutable QIcon tabBarcloseButtonIcon;
#if QT_CONFIG(tabbar)
- void tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *pixmapRect) const;
+ virtual void tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *pixmapRect) const;
#endif
int animationFps;
diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp
index d30b43a679..66729e4dc7 100644
--- a/src/widgets/styles/qdrawutil.cpp
+++ b/src/widgets/styles/qdrawutil.cpp
@@ -214,7 +214,7 @@ void qDrawShadeLine(QPainter *p, int x1, int y1, int x2, int y2,
specifies the line width for each of the lines; it is not the
total line width. The \a midLineWidth specifies the width of a
middle line drawn in the QPalette::mid() color. The rectangle's
- interior is filled with the \a fill brush unless \a fill is 0.
+ interior is filled with the \a fill brush unless \a fill is \nullptr.
The rectangle appears sunken if \a sunken is true, otherwise
raised.
@@ -331,7 +331,7 @@ void qDrawShadeRect(QPainter *p, int x, int y, int w, int h,
The given \a palette specifies the shading colors (\l
{QPalette::light()}{light}, \l {QPalette::dark()}{dark} and \l
{QPalette::mid()}{middle} colors). The panel's interior is filled
- with the \a fill brush unless \a fill is 0.
+ with the \a fill brush unless \a fill is \nullptr.
The panel appears sunken if \a sunken is true, otherwise raised.
@@ -490,7 +490,7 @@ static void qDrawWinShades(QPainter *p,
Draws the Windows-style button specified by the given point (\a x,
\a y}, \a width and \a height using the provided \a painter with a
line width of 2 pixels. The button's interior is filled with the
- \a{fill} brush unless \a fill is 0.
+ \a{fill} brush unless \a fill is \nullptr.
The given \a palette specifies the shading colors (\l
{QPalette::light()}{light}, \l {QPalette::dark()}{dark} and \l
@@ -528,7 +528,7 @@ void qDrawWinButton(QPainter *p, int x, int y, int w, int h,
Draws the Windows-style panel specified by the given point(\a x,
\a y), \a width and \a height using the provided \a painter with a
line width of 2 pixels. The button's interior is filled with the
- \a fill brush unless \a fill is 0.
+ \a fill brush unless \a fill is \nullptr.
The given \a palette specifies the shading colors. The panel
appears sunken if \a sunken is true, otherwise raised.
@@ -567,7 +567,7 @@ void qDrawWinPanel(QPainter *p, int x, int y, int w, int h,
Draws the plain rectangle beginning at (\a x, \a y) with the given
\a width and \a height, using the specified \a painter, \a lineColor
and \a lineWidth. The rectangle's interior is filled with the \a
- fill brush unless \a fill is 0.
+ fill brush unless \a fill is \nullptr.
\warning This function does not look at QWidget::style() or
QApplication::style(). Use the drawing functions in QStyle to make
@@ -676,7 +676,7 @@ void qDrawShadeLine(QPainter *p, const QPoint &p1, const QPoint &p2,
specifies the line width for each of the lines; it is not the
total line width. The \a midLineWidth specifies the width of a
middle line drawn in the QPalette::mid() color. The rectangle's
- interior is filled with the \a fill brush unless \a fill is 0.
+ interior is filled with the \a fill brush unless \a fill is \nullptr.
The rectangle appears sunken if \a sunken is true, otherwise
raised.
@@ -714,7 +714,7 @@ void qDrawShadeRect(QPainter *p, const QRect &r,
The given \a palette specifies the shading colors (\l
{QPalette::light()}{light}, \l {QPalette::dark()}{dark} and \l
{QPalette::mid()}{middle} colors). The panel's interior is filled
- with the \a fill brush unless \a fill is 0.
+ with the \a fill brush unless \a fill is \nullptr.
The panel appears sunken if \a sunken is true, otherwise raised.
@@ -746,7 +746,7 @@ void qDrawShadePanel(QPainter *p, const QRect &r,
Draws the Windows-style button at the rectangle specified by \a rect using
the given \a painter with a line width of 2 pixels. The button's interior
- is filled with the \a{fill} brush unless \a fill is 0.
+ is filled with the \a{fill} brush unless \a fill is \nullptr.
The given \a palette specifies the shading colors (\l
{QPalette::light()}{light}, \l {QPalette::dark()}{dark} and \l
@@ -774,7 +774,7 @@ void qDrawWinButton(QPainter *p, const QRect &r,
Draws the Windows-style panel at the rectangle specified by \a rect using
the given \a painter with a line width of 2 pixels. The button's interior
- is filled with the \a fill brush unless \a fill is 0.
+ is filled with the \a fill brush unless \a fill is \nullptr.
The given \a palette specifies the shading colors. The panel
appears sunken if \a sunken is true, otherwise raised.
@@ -804,7 +804,7 @@ void qDrawWinPanel(QPainter *p, const QRect &r,
Draws the plain rectangle specified by \a rect using the given \a painter,
\a lineColor and \a lineWidth. The rectangle's interior is filled with the
- \a fill brush unless \a fill is 0.
+ \a fill brush unless \a fill is \nullptr.
\warning This function does not look at QWidget::style() or
QApplication::style(). Use the drawing functions in QStyle to make
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 1646ec7583..45154ee647 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -1590,7 +1590,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
(option->styleObject && option->styleObject->property("_q_isComboBoxPopupItem").toBool()))
ignoreCheckMark = true; //ignore the checkmarks provided by the QComboMenuDelegate
- if (!ignoreCheckMark) {
+ if (!ignoreCheckMark || menuItem->state & (State_On | State_Off)) {
// Check, using qreal and QRectF to avoid error accumulation
const qreal boxMargin = dpiScaled(3.5, option);
const qreal boxWidth = checkcol - 2 * boxMargin;
@@ -1601,7 +1601,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
if (checkable) {
if (menuItem->checkType & QStyleOptionMenuItem::Exclusive) {
// Radio button
- if (checked || sunken) {
+ if (menuItem->state & State_On || checked || sunken) {
painter->setRenderHint(QPainter::Antialiasing);
painter->setPen(Qt::NoPen);
@@ -1617,8 +1617,10 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
QStyleOptionButton box;
box.QStyleOption::operator=(*option);
box.rect = checkRect;
- if (checked)
+ if (checked || menuItem->state & State_On)
box.state |= State_On;
+ else
+ box.state |= State_Off;
proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, painter, widget);
}
}
@@ -2411,7 +2413,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
int oldMin = styleObject->property("_q_stylemin").toInt();
int oldMax = styleObject->property("_q_stylemax").toInt();
QRect oldRect = styleObject->property("_q_stylerect").toRect();
- QStyle::State oldState = static_cast<QStyle::State>(styleObject->property("_q_stylestate").value<QStyle::State::Int>());
+ QStyle::State oldState = static_cast<QStyle::State>(qvariant_cast<QStyle::State::Int>(styleObject->property("_q_stylestate")));
uint oldActiveControls = styleObject->property("_q_stylecontrols").toUInt();
// a scrollbar is transient when the scrollbar itself and
@@ -3684,7 +3686,7 @@ int QFusionStyle::styleHint(StyleHint hint, const QStyleOption *option, const QW
return 0;
case SH_Table_GridLineColor:
- return option ? option->palette.window().color().darker(120).rgb() : 0;
+ return option ? option->palette.window().color().darker(120).rgba() : 0;
case SH_MessageBox_TextInteractionFlags:
return Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse;
diff --git a/src/widgets/styles/qproxystyle.cpp b/src/widgets/styles/qproxystyle.cpp
index 5739678932..ecad637957 100644
--- a/src/widgets/styles/qproxystyle.cpp
+++ b/src/widgets/styles/qproxystyle.cpp
@@ -90,7 +90,7 @@ void QProxyStylePrivate::ensureBaseStyle() const
if (qstrcmp(baseStyle->metaObject()->className(),
q->metaObject()->className()) == 0) {
delete baseStyle;
- baseStyle = 0;
+ baseStyle = nullptr;
}
}
}
@@ -162,7 +162,7 @@ QStyle *QProxyStyle::baseStyle() const
Ownership of \a style is transferred to QProxyStyle.
- If style is zero, a desktop-dependant style will be
+ If style is \nullptr, a desktop-dependent style will be
assigned automatically.
*/
void QProxyStyle::setBaseStyle(QStyle *style)
@@ -403,7 +403,7 @@ QIcon QProxyStyle::standardIcon(StandardPixmap standardIcon,
orientation specifies whether the controls are laid out side by side
or stacked vertically. The \a option parameter can be used to pass
extra information about the parent widget. The \a widget parameter
- is optional and can also be used if \a option is 0.
+ is optional and can also be used if \a option is \nullptr.
The default implementation returns -1.
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 6cbed34c3a..987465efae 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1012,6 +1012,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value SE_PushButtonFocusRect Area for the focus rect (usually
larger than the contents rect).
\value SE_PushButtonLayoutItem Area that counts for the parent layout.
+ \value SE_PushButtonBevel Area used for the bevel of the button.
\value SE_CheckBoxIndicator Area for the state indicator (e.g., check mark).
\value SE_CheckBoxContents Area for the label (text or pixmap).
@@ -1120,6 +1121,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\header \li Sub Element \li QStyleOption Subclass
\row \li \l SE_PushButtonContents \li \l QStyleOptionButton
\row \li \l SE_PushButtonFocusRect \li \l QStyleOptionButton
+ \row \li \l SE_PushButtonBevel \li \l QStyleOptionButton
\row \li \l SE_CheckBoxIndicator \li \l QStyleOptionButton
\row \li \l SE_CheckBoxContents \li \l QStyleOptionButton
\row \li \l SE_CheckBoxFocusRect \li \l QStyleOptionButton
@@ -1835,7 +1837,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value SH_LineEdit_PasswordMaskDelay Determines the delay before visible character is masked
with password character, in milliseconds. This enum value was added in Qt 5.4.
- \value SH_Table_GridLineColor The RGB value of the grid for a table.
+ \value SH_Table_GridLineColor The RGBA value of the grid for a table.
\value SH_UnderlineShortcut Whether shortcuts are underlined.
@@ -2362,14 +2364,14 @@ QPalette QStyle::standardPalette() const
\fn int QStyle::layoutSpacing(QSizePolicy::ControlType control1,
QSizePolicy::ControlType control2, Qt::Orientation orientation,
- const QStyleOption *option = 0, const QWidget *widget = 0) const
+ const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const
Returns the spacing that should be used between \a control1 and
\a control2 in a layout. \a orientation specifies whether the
controls are laid out side by side or stacked vertically. The \a
option parameter can be used to pass extra information about the
parent widget. The \a widget parameter is optional and can also
- be used if \a option is 0.
+ be used if \a option is \nullptr.
This function is called by the layout system. It is used only if
PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a
@@ -2386,7 +2388,7 @@ QPalette QStyle::standardPalette() const
controls are laid out side by side or stacked vertically. The \a
option parameter can be used to pass extra information about the
parent widget. The \a widget parameter is optional and can also
- be used if \a option is 0.
+ be used if \a option is \nullptr.
\a controls1 and \a controls2 are OR-combination of zero or more
\l{QSizePolicy::ControlTypes}{control types}.
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index ee234457f5..04628e6ef9 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -361,6 +361,8 @@ public:
SE_TabBarScrollRightButton,
SE_TabBarTearIndicatorRight,
+ SE_PushButtonBevel,
+
// do not add any values below/greater than this
SE_CustomBase = 0xf0000000
};
diff --git a/src/widgets/styles/qstylefactory.cpp b/src/widgets/styles/qstylefactory.cpp
index b0ce5e52cf..2c4f6f83a1 100644
--- a/src/widgets/styles/qstylefactory.cpp
+++ b/src/widgets/styles/qstylefactory.cpp
@@ -88,7 +88,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
*/
QStyle *QStyleFactory::create(const QString& key)
{
- QStyle *ret = 0;
+ QStyle *ret = nullptr;
QString style = key.toLower();
#if QT_CONFIG(style_windows)
if (style == QLatin1String("windows"))
diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp
index 9477ca86da..61a59b03c1 100644
--- a/src/widgets/styles/qstylehelper.cpp
+++ b/src/widgets/styles/qstylehelper.cpp
@@ -132,7 +132,7 @@ bool isInstanceOf(QObject *obj, QAccessible::Role role)
bool hasAncestor(QObject *obj, QAccessible::Role role)
{
bool found = false;
- QObject *parent = obj ? obj->parent() : 0;
+ QObject *parent = obj ? obj->parent() : nullptr;
while (parent && !found) {
if (isInstanceOf(parent, role))
found = true;
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index be33069c07..95232dd97b 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -151,7 +151,7 @@ QT_BEGIN_NAMESPACE
QStyleOption::QStyleOption(int version, int type)
: version(version), type(type), state(QStyle::State_None),
- direction(QGuiApplication::layoutDirection()), fontMetrics(QFont()), styleObject(0)
+ direction(QGuiApplication::layoutDirection()), fontMetrics(QFont()), styleObject(nullptr)
{
}
@@ -1470,6 +1470,22 @@ QStyleOptionTab::QStyleOptionTab(int version)
The default value is QSize(-1, -1), i.e. an invalid size;
*/
+/*!
+ Constructs a QStyleOptionTabV4 object, initializing the members
+ variables to their default values.
+ */
+
+QStyleOptionTabV4::QStyleOptionTabV4() : QStyleOptionTab(QStyleOptionTabV4::Version)
+{
+}
+
+/*!
+ \variable QStyleOptionTabV4::tabIndex
+ \brief the index for the tab being represented.
+
+ The default value is -1, i.e. a tab not on a tabbar;
+ */
+
#endif // QT_CONFIG(tabbar)
/*!
@@ -2909,7 +2925,7 @@ QStyleOptionRubberBand::QStyleOptionRubberBand(int version)
*/
QStyleOptionTitleBar::QStyleOptionTitleBar()
- : QStyleOptionComplex(Version, SO_TitleBar), titleBarState(0), titleBarFlags(0)
+ : QStyleOptionComplex(Version, SO_TitleBar), titleBarState(0)
{
}
@@ -2954,7 +2970,7 @@ QStyleOptionTitleBar::QStyleOptionTitleBar()
\internal
*/
QStyleOptionTitleBar::QStyleOptionTitleBar(int version)
- : QStyleOptionComplex(version, SO_TitleBar), titleBarState(0), titleBarFlags(0)
+ : QStyleOptionComplex(version, SO_TitleBar), titleBarState(0)
{
}
@@ -3085,7 +3101,7 @@ QStyleOptionViewItem::QStyleOptionViewItem()
: QStyleOption(Version, SO_ViewItem),
displayAlignment(Qt::AlignLeft), decorationAlignment(Qt::AlignLeft),
textElideMode(Qt::ElideMiddle), decorationPosition(Left),
- showDecorationSelected(false), features(None), widget(0),
+ showDecorationSelected(false), features(None), widget(nullptr),
checkState(Qt::Unchecked), viewItemPosition(QStyleOptionViewItem::Invalid)
{
}
@@ -3097,7 +3113,7 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
: QStyleOption(version, SO_ViewItem),
displayAlignment(Qt::AlignLeft), decorationAlignment(Qt::AlignLeft),
textElideMode(Qt::ElideMiddle), decorationPosition(Left),
- showDecorationSelected(false), features(None), widget(0),
+ showDecorationSelected(false), features(None), widget(nullptr),
checkState(Qt::Unchecked), viewItemPosition(QStyleOptionViewItem::Invalid)
{
}
diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h
index 7f5edf4279..a8ce3b465e 100644
--- a/src/widgets/styles/qstyleoption.h
+++ b/src/widgets/styles/qstyleoption.h
@@ -296,6 +296,14 @@ protected:
QStyleOptionTab(int version);
};
+class Q_WIDGETS_EXPORT QStyleOptionTabV4 : public QStyleOptionTab
+{
+public:
+ enum StyleOptionVersion { Version = 4 };
+ QStyleOptionTabV4();
+ int tabIndex = -1;
+};
+
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionTab::CornerWidgets)
typedef Q_DECL_DEPRECATED QStyleOptionTab QStyleOptionTabV2;
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index c694e9db97..1e032b237a 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -133,7 +133,7 @@ public:
};
-static QStyleSheetStyleCaches *styleSheetCaches = 0;
+static QStyleSheetStyleCaches *styleSheetCaches = nullptr;
/* RECURSION_GUARD:
* the QStyleSheetStyle is a proxy. If used with others proxy style, we may end up with something like:
@@ -144,16 +144,16 @@ static QStyleSheetStyleCaches *styleSheetCaches = 0;
* The first instance of QStyleSheetStyle will set globalStyleSheetStyle to itself. The second one
* will notice the globalStyleSheetStyle is not istelf and call its base style directly.
*/
-static const QStyleSheetStyle *globalStyleSheetStyle = 0;
+static const QStyleSheetStyle *globalStyleSheetStyle = nullptr;
class QStyleSheetStyleRecursionGuard
{
public:
QStyleSheetStyleRecursionGuard(const QStyleSheetStyle *that)
- : guarded(globalStyleSheetStyle == 0)
+ : guarded(globalStyleSheetStyle == nullptr)
{
if (guarded) globalStyleSheetStyle = that;
}
- ~QStyleSheetStyleRecursionGuard() { if (guarded) globalStyleSheetStyle = 0; }
+ ~QStyleSheetStyleRecursionGuard() { if (guarded) globalStyleSheetStyle = nullptr; }
bool guarded;
};
#define RECURSION_GUARD(RETURN) \
@@ -371,7 +371,7 @@ struct QStyleSheetBackgroundData : public QSharedData
struct QStyleSheetBorderData : public QSharedData
{
- QStyleSheetBorderData() : bi(0)
+ QStyleSheetBorderData() : bi(nullptr)
{
for (int i = 0; i < 4; i++) {
borders[i] = 0;
@@ -379,7 +379,7 @@ struct QStyleSheetBorderData : public QSharedData
}
}
- QStyleSheetBorderData(int *b, QBrush *c, QCss::BorderStyle *s, QSize *r) : bi(0)
+ QStyleSheetBorderData(int *b, QBrush *c, QCss::BorderStyle *s, QSize *r) : bi(nullptr)
{
for (int i = 0; i < 4; i++) {
borders[i] = b[i];
@@ -396,7 +396,7 @@ struct QStyleSheetBorderData : public QSharedData
const QStyleSheetBorderImageData *borderImage() const
{ return bi; }
- bool hasBorderImage() const { return bi!=0; }
+ bool hasBorderImage() const { return bi!=nullptr; }
QSharedDataPointer<QStyleSheetBorderImageData> bi;
@@ -413,7 +413,7 @@ struct QStyleSheetBorderData : public QSharedData
if (!radii[i].isEmpty())
return false;
}
- if (bi != 0 && bi->pixmap.hasAlpha())
+ if (bi != nullptr && bi->pixmap.hasAlpha())
return false;
return true;
}
@@ -479,7 +479,7 @@ struct QStyleSheetGeometryData : public QSharedData
struct QStyleSheetPositionData : public QSharedData
{
- QStyleSheetPositionData(int l, int t, int r, int b, Origin o, Qt::Alignment p, QCss::PositionMode m, Qt::Alignment a = 0)
+ QStyleSheetPositionData(int l, int t, int r, int b, Origin o, Qt::Alignment p, QCss::PositionMode m, Qt::Alignment a = { })
: left(l), top(t), bottom(b), right(r), origin(o), position(p), mode(m), textAlignment(a) { }
int left, top, bottom, right;
@@ -502,7 +502,7 @@ struct QStyleSheetImageData : public QSharedData
class QRenderRule
{
public:
- QRenderRule() : features(0), hasFont(false), pal(0), b(0), bg(0), bd(0), ou(0), geo(0), p(0), img(0), clipset(0) { }
+ QRenderRule() : features(0), hasFont(false), pal(nullptr), b(nullptr), bg(nullptr), bd(nullptr), ou(nullptr), geo(nullptr), p(nullptr), img(nullptr), clipset(0) { }
QRenderRule(const QVector<QCss::Declaration> &, const QObject *);
QRect borderRect(const QRect &r) const;
@@ -534,21 +534,22 @@ public:
const QStyleSheetOutlineData *outline() const { return ou; }
const QStyleSheetGeometryData *geometry() const { return geo; }
const QStyleSheetPositionData *position() const { return p; }
+ const QStyleSheetImageData *icon() const { return iconPtr; }
bool hasModification() const;
- bool hasPalette() const { return pal != 0; }
- bool hasBackground() const { return bg != 0 && (!bg->pixmap.isNull() || bg->brush.style() != Qt::NoBrush); }
+ bool hasPalette() const { return pal != nullptr; }
+ bool hasBackground() const { return bg != nullptr && (!bg->pixmap.isNull() || bg->brush.style() != Qt::NoBrush); }
bool hasGradientBackground() const { return bg && bg->brush.style() >= Qt::LinearGradientPattern
&& bg->brush.style() <= Qt::ConicalGradientPattern; }
bool hasNativeBorder() const {
- return bd == 0
+ return bd == nullptr
|| (!bd->hasBorderImage() && bd->styles[0] == BorderStyle_Native);
}
bool hasNativeOutline() const {
- return (ou == 0
+ return (ou == nullptr
|| (!ou->hasBorderImage() && ou->styles[0] == BorderStyle_Native));
}
@@ -562,13 +563,14 @@ public:
return features & StyleFeature_BackgroundColor;
}
- bool hasBox() const { return b != 0; }
- bool hasBorder() const { return bd != 0; }
- bool hasOutline() const { return ou != 0; }
- bool hasPosition() const { return p != 0; }
- bool hasGeometry() const { return geo != 0; }
+ bool hasBox() const { return b != nullptr; }
+ bool hasBorder() const { return bd != nullptr; }
+ bool hasOutline() const { return ou != nullptr; }
+ bool hasPosition() const { return p != nullptr; }
+ bool hasGeometry() const { return geo != nullptr; }
bool hasDrawable() const { return !hasNativeBorder() || hasBackground() || hasImage(); }
- bool hasImage() const { return img != 0; }
+ bool hasImage() const { return img != nullptr; }
+ bool hasIcon() const { return iconPtr != nullptr; }
QSize minimumContentsSize() const
{ return geo ? QSize(geo->minWidth, geo->minHeight) : QSize(0, 0); }
@@ -628,6 +630,7 @@ public:
QSharedDataPointer<QStyleSheetGeometryData> geo;
QSharedDataPointer<QStyleSheetPositionData> p;
QSharedDataPointer<QStyleSheetImageData> img;
+ QSharedDataPointer<QStyleSheetImageData> iconPtr;
int clipset;
QPainterPath clipPath;
@@ -907,7 +910,7 @@ static QStyle::StandardPixmap subControlIcon(int pe)
}
QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject *object)
-: features(0), hasFont(false), pal(0), b(0), bg(0), bd(0), ou(0), geo(0), p(0), img(0), clipset(0)
+: features(0), hasFont(false), pal(nullptr), b(nullptr), bg(nullptr), bd(nullptr), ou(nullptr), geo(nullptr), p(nullptr), img(nullptr), clipset(0)
{
QPalette palette = QGuiApplication::palette(); // ###: ideally widget's palette
ValueExtractor v(declarations, palette);
@@ -919,9 +922,9 @@ QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject
int left = 0, top = 0, right = 0, bottom = 0;
Origin origin = Origin_Unknown;
- Qt::Alignment position = 0;
+ Qt::Alignment position;
QCss::PositionMode mode = PositionMode_Unknown;
- Qt::Alignment textAlignment = 0;
+ Qt::Alignment textAlignment;
if (v.extractPosition(&left, &top, &right, &bottom, &origin, &position, &mode, &textAlignment))
p = new QStyleSheetPositionData(left, top, right, bottom, origin, position, mode, textAlignment);
@@ -969,11 +972,16 @@ QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject
if (v.extractPalette(&fg, &sfg, &sbg, &abg))
pal = new QStyleSheetPaletteData(fg, sfg, sbg, abg);
- QIcon icon;
+ QIcon imgIcon;
alignment = Qt::AlignCenter;
+ QSize imgSize;
+ if (v.extractImage(&imgIcon, &alignment, &imgSize))
+ img = new QStyleSheetImageData(imgIcon, alignment, imgSize);
+
+ QIcon icon;
QSize size;
- if (v.extractImage(&icon, &alignment, &size))
- img = new QStyleSheetImageData(icon, alignment, size);
+ if (v.extractIcon(&icon, &size))
+ iconPtr = new QStyleSheetImageData(icon, Qt::AlignCenter, size);
int adj = -255;
hasFont = v.extractFont(&font, &adj);
@@ -1126,11 +1134,11 @@ QSize QRenderRule::boxSize(const QSize &cs, int flags) const
void QRenderRule::fixupBorder(int nativeWidth)
{
- if (bd == 0)
+ if (bd == nullptr)
return;
if (!bd->hasBorderImage() || bd->bi->pixmap.isNull()) {
- bd->bi = 0;
+ bd->bi = nullptr;
// ignore the color, border of edges that have none border-style
QBrush color = pal ? pal->foreground : QBrush();
const bool hasRadius = bd->radii[0].isValid() || bd->radii[1].isValid()
@@ -1507,7 +1515,7 @@ public:
do {
result += QString::fromLatin1(metaObject->className()).replace(QLatin1Char(':'), QLatin1Char('-'));
metaObject = metaObject->superClass();
- } while (metaObject != 0);
+ } while (metaObject != nullptr);
return result;
}
QString attribute(NodePtr node, const QString& name) const override
@@ -1531,7 +1539,7 @@ public:
return className;
} else if (name == QLatin1String("style")) {
QWidget *w = qobject_cast<QWidget *>(obj);
- QStyleSheetStyle *proxy = w ? qt_styleSheet(w->style()) : 0;
+ QStyleSheetStyle *proxy = w ? qt_styleSheet(w->style()) : nullptr;
if (proxy) {
QString styleName = QString::fromLatin1(proxy->baseStyle()->metaObject()->className());
cache[name] = styleName;
@@ -1539,11 +1547,10 @@ public:
}
}
}
- QString valueStr;
- if(value.type() == QVariant::StringList || value.type() == QVariant::List)
- valueStr = value.toStringList().join(QLatin1Char(' '));
- else
- valueStr = value.toString();
+ QString valueStr = (value.userType() == QMetaType::QStringList
+ || value.userType() == QMetaType::QVariantList)
+ ? value.toStringList().join(QLatin1Char(' '))
+ : value.toString();
cache[name] = valueStr;
return valueStr;
}
@@ -1567,7 +1574,7 @@ public:
if (uc == e && !*c)
return true;
metaObject = metaObject->superClass();
- } while (metaObject != 0);
+ } while (metaObject != nullptr);
return false;
}
bool hasAttributes(NodePtr) const override
@@ -1575,11 +1582,11 @@ public:
QStringList nodeIds(NodePtr node) const override
{ return isNullNode(node) ? QStringList() : QStringList(OBJECT_PTR(node)->objectName()); }
bool isNullNode(NodePtr node) const override
- { return node.ptr == 0; }
+ { return node.ptr == nullptr; }
NodePtr parentNode(NodePtr node) const override
- { NodePtr n; n.ptr = isNullNode(node) ? 0 : parentObject(OBJECT_PTR(node)); return n; }
+ { NodePtr n; n.ptr = isNullNode(node) ? nullptr : parentObject(OBJECT_PTR(node)); return n; }
NodePtr previousSiblingNode(NodePtr) const override
- { NodePtr n; n.ptr = 0; return n; }
+ { NodePtr n; n.ptr = nullptr; return n; }
NodePtr duplicateNode(NodePtr node) const override
{ return node; }
void freeNode(NodePtr) const override
@@ -1692,22 +1699,22 @@ int QStyleSheetStyle::nativeFrameWidth(const QWidget *w)
#if QT_CONFIG(spinbox)
if (qobject_cast<const QAbstractSpinBox *>(w))
- return base->pixelMetric(QStyle::PM_SpinBoxFrameWidth, 0, w);
+ return base->pixelMetric(QStyle::PM_SpinBoxFrameWidth, nullptr, w);
#endif
#if QT_CONFIG(combobox)
if (qobject_cast<const QComboBox *>(w))
- return base->pixelMetric(QStyle::PM_ComboBoxFrameWidth, 0, w);
+ return base->pixelMetric(QStyle::PM_ComboBoxFrameWidth, nullptr, w);
#endif
#if QT_CONFIG(menu)
if (qobject_cast<const QMenu *>(w))
- return base->pixelMetric(QStyle::PM_MenuPanelWidth, 0, w);
+ return base->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr, w);
#endif
#if QT_CONFIG(menubar)
if (qobject_cast<const QMenuBar *>(w))
- return base->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, w);
+ return base->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, w);
#endif
#ifndef QT_NO_FRAME
if (const QFrame *frame = qobject_cast<const QFrame *>(w)) {
@@ -1717,9 +1724,9 @@ int QStyleSheetStyle::nativeFrameWidth(const QWidget *w)
#endif
if (qstrcmp(w->metaObject()->className(), "QTipLabel") == 0)
- return base->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, w);
+ return base->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, nullptr, w);
- return base->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, w);
+ return base->pixelMetric(QStyle::PM_DefaultFrameWidth, nullptr, w);
}
static quint64 pseudoClass(QStyle::State state)
@@ -2223,7 +2230,7 @@ static Qt::Alignment defaultPosition(int pe)
return Qt::AlignRight | Qt::AlignVCenter;
default:
- return 0;
+ return { };
}
}
@@ -2235,21 +2242,21 @@ QSize QStyleSheetStyle::defaultSize(const QWidget *w, QSize sz, const QRect& rec
case PseudoElement_Indicator:
case PseudoElement_MenuCheckMark:
if (sz.width() == -1)
- sz.setWidth(base->pixelMetric(PM_IndicatorWidth, 0, w));
+ sz.setWidth(base->pixelMetric(PM_IndicatorWidth, nullptr, w));
if (sz.height() == -1)
- sz.setHeight(base->pixelMetric(PM_IndicatorHeight, 0, w));
+ sz.setHeight(base->pixelMetric(PM_IndicatorHeight, nullptr, w));
break;
case PseudoElement_ExclusiveIndicator:
case PseudoElement_GroupBoxIndicator:
if (sz.width() == -1)
- sz.setWidth(base->pixelMetric(PM_ExclusiveIndicatorWidth, 0, w));
+ sz.setWidth(base->pixelMetric(PM_ExclusiveIndicatorWidth, nullptr, w));
if (sz.height() == -1)
- sz.setHeight(base->pixelMetric(PM_ExclusiveIndicatorHeight, 0, w));
+ sz.setHeight(base->pixelMetric(PM_ExclusiveIndicatorHeight, nullptr, w));
break;
case PseudoElement_PushButtonMenuIndicator: {
- int pm = base->pixelMetric(PM_MenuButtonIndicator, 0, w);
+ int pm = base->pixelMetric(PM_MenuButtonIndicator, nullptr, w);
if (sz.width() == -1)
sz.setWidth(pm);
if (sz.height() == -1)
@@ -2283,12 +2290,12 @@ QSize QStyleSheetStyle::defaultSize(const QWidget *w, QSize sz, const QRect& rec
case PseudoElement_ToolButtonMenu:
if (sz.width() == -1)
- sz.setWidth(base->pixelMetric(PM_MenuButtonIndicator, 0, w));
+ sz.setWidth(base->pixelMetric(PM_MenuButtonIndicator, nullptr, w));
break;
case PseudoElement_HeaderViewUpArrow:
case PseudoElement_HeaderViewDownArrow: {
- int pm = base->pixelMetric(PM_HeaderMargin, 0, w);
+ int pm = base->pixelMetric(PM_HeaderMargin, nullptr, w);
if (sz.width() == -1)
sz.setWidth(pm);
if (sz.height() == 1)
@@ -2301,7 +2308,7 @@ QSize QStyleSheetStyle::defaultSize(const QWidget *w, QSize sz, const QRect& rec
case PseudoElement_ScrollBarAddLine:
case PseudoElement_ScrollBarSubLine:
case PseudoElement_ScrollBarSlider: {
- int pm = pixelMetric(QStyle::PM_ScrollBarExtent, 0, w);
+ int pm = pixelMetric(QStyle::PM_ScrollBarExtent, nullptr, w);
if (sz.width() == -1)
sz.setWidth(pm);
if (sz.height() == -1)
@@ -2311,7 +2318,7 @@ QSize QStyleSheetStyle::defaultSize(const QWidget *w, QSize sz, const QRect& rec
case PseudoElement_DockWidgetCloseButton:
case PseudoElement_DockWidgetFloatButton: {
- int iconSize = pixelMetric(PM_SmallIconSize, 0, w);
+ int iconSize = pixelMetric(PM_SmallIconSize, nullptr, w);
return QSize(iconSize, iconSize);
}
@@ -2603,16 +2610,16 @@ void QStyleSheetStyle::setProperties(QWidget *w)
QVariant v;
const QVariant value = w->property(property.toLatin1());
- switch (value.type()) {
- case QVariant::Icon: v = decl.iconValue(); break;
- case QVariant::Image: v = QImage(decl.uriValue()); break;
- case QVariant::Pixmap: v = QPixmap(decl.uriValue()); break;
- case QVariant::Rect: v = decl.rectValue(); break;
- case QVariant::Size: v = decl.sizeValue(); break;
- case QVariant::Color: v = decl.colorValue(); break;
- case QVariant::Brush: v = decl.brushValue(); break;
+ switch (value.userType()) {
+ case QMetaType::QIcon: v = decl.iconValue(); break;
+ case QMetaType::QImage: v = QImage(decl.uriValue()); break;
+ case QMetaType::QPixmap: v = QPixmap(decl.uriValue()); break;
+ case QMetaType::QRect: v = decl.rectValue(); break;
+ case QMetaType::QSize: v = decl.sizeValue(); break;
+ case QMetaType::QColor: v = decl.colorValue(); break;
+ case QMetaType::QBrush: v = decl.brushValue(); break;
#ifndef QT_NO_SHORTCUT
- case QVariant::KeySequence: v = QKeySequence(decl.d->values.at(0).variant.toString()); break;
+ case QMetaType::QKeySequence: v = QKeySequence(decl.d->values.at(0).variant.toString()); break;
#endif
default: v = decl.d->values.at(0).variant; break;
}
@@ -2948,7 +2955,7 @@ void QStyleSheetStyle::unpolish(QWidget *w)
setGeometry(w);
w->setAttribute(Qt::WA_StyleSheetTarget, false);
w->setAttribute(Qt::WA_StyleSheet, false);
- QObject::disconnect(w, 0, this, 0);
+ QObject::disconnect(w, nullptr, this, nullptr);
#if QT_CONFIG(scrollarea)
if (QAbstractScrollArea *sa = qobject_cast<QAbstractScrollArea *>(w)) {
QObject::disconnect(sa->horizontalScrollBar(), SIGNAL(valueChanged(int)),
@@ -3334,7 +3341,7 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC
layout = subControlLayout(QLatin1String("mNX"));
QStyleOptionComplex optCopy(*opt);
- optCopy.subControls = 0;
+ optCopy.subControls = { };
for (int i = 0; i < layout.count(); i++) {
int layoutButton = layout[i].toInt();
if (layoutButton < PseudoElement_MdiCloseButton
@@ -3388,7 +3395,7 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC
tb->icon.paint(p, ir);
} else {
int iconSize = pixelMetric(PM_SmallIconSize, tb, w);
- pm = standardIcon(SP_TitleBarMenuButton, 0, w).pixmap(iconSize, iconSize);
+ pm = standardIcon(SP_TitleBarMenuButton, nullptr, w).pixmap(iconSize, iconSize);
drawItemPixmap(p, ir, Qt::AlignCenter, pm);
}
}
@@ -3400,9 +3407,9 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC
QSize sz = subSubRule.contentsRect(ir).size();
if ((tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool)
- pm = standardIcon(SP_DockWidgetCloseButton, 0, w).pixmap(sz);
+ pm = standardIcon(SP_DockWidgetCloseButton, nullptr, w).pixmap(sz);
else
- pm = standardIcon(SP_TitleBarCloseButton, 0, w).pixmap(sz);
+ pm = standardIcon(SP_TitleBarCloseButton, nullptr, w).pixmap(sz);
drawItemPixmap(p, ir, Qt::AlignCenter, pm);
}
@@ -3423,7 +3430,7 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC
continue;
QRenderRule subSubRule = renderRule(w, opt, pe);
subSubRule.drawRule(p, ir);
- pm = standardIcon(subControlIcon(pe), 0, w).pixmap(subSubRule.contentsRect(ir).size());
+ pm = standardIcon(subControlIcon(pe), nullptr, w).pixmap(subSubRule.contentsRect(ir).size());
drawItemPixmap(p, ir, Qt::AlignCenter, pm);
}
@@ -3523,15 +3530,25 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
if (rule.hasFont)
p->setFont(rule.font.resolve(p->font()));
- if (rule.hasPosition() && rule.position()->textAlignment != 0) {
- Qt::Alignment textAlignment = rule.position()->textAlignment;
- QRect textRect = button->rect;
+ if (rule.hasPosition() || rule.hasIcon()) {
uint tf = Qt::TextShowMnemonic;
+ QRect textRect = button->rect;
+
+ const uint horizontalAlignMask = Qt::AlignHCenter | Qt::AlignLeft | Qt::AlignRight;
const uint verticalAlignMask = Qt::AlignVCenter | Qt::AlignTop | Qt::AlignLeft;
- tf |= (textAlignment & verticalAlignMask) ? (textAlignment & verticalAlignMask) : Qt::AlignVCenter;
- if (!styleHint(SH_UnderlineShortcut, button, w))
- tf |= Qt::TextHideMnemonic;
- if (!button->icon.isNull()) {
+
+ if (rule.hasPosition() && rule.position()->textAlignment != 0) {
+ Qt::Alignment textAlignment = rule.position()->textAlignment;
+ tf |= (textAlignment & verticalAlignMask) ? (textAlignment & verticalAlignMask) : Qt::AlignVCenter;
+ tf |= (textAlignment & horizontalAlignMask) ? (textAlignment & horizontalAlignMask) : Qt::AlignHCenter;
+ if (!styleHint(SH_UnderlineShortcut, button, w))
+ tf |= Qt::TextHideMnemonic;
+ } else {
+ tf |= Qt::AlignVCenter | Qt::AlignHCenter;
+ }
+
+ QIcon icon = rule.hasIcon() ? rule.icon()->icon : button->icon;
+ if (!icon.isNull()) {
//Group both icon and text
QRect iconRect;
QIcon::Mode mode = button->state & State_Enabled ? QIcon::Normal : QIcon::Disabled;
@@ -3541,7 +3558,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
if (button->state & State_On)
state = QIcon::On;
- QPixmap pixmap = button->icon.pixmap(button->iconSize, mode, state);
+ QPixmap pixmap = icon.pixmap(button->iconSize, mode, state);
int pixmapWidth = pixmap.width() / pixmap.devicePixelRatio();
int pixmapHeight = pixmap.height() / pixmap.devicePixelRatio();
int labelWidth = pixmapWidth;
@@ -3552,10 +3569,10 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
labelWidth += (textWidth + iconSpacing);
//Determine label alignment:
- if (textAlignment & Qt::AlignLeft) { /*left*/
+ if (tf & Qt::AlignLeft) { /*left*/
iconRect = QRect(textRect.x(), textRect.y() + (textRect.height() - labelHeight) / 2,
pixmapWidth, pixmapHeight);
- } else if (textAlignment & Qt::AlignHCenter) { /* center */
+ } else if (tf & Qt::AlignHCenter) { /* center */
iconRect = QRect(textRect.x() + (textRect.width() - labelWidth) / 2,
textRect.y() + (textRect.height() - labelHeight) / 2,
pixmapWidth, pixmapHeight);
@@ -3567,7 +3584,9 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
iconRect = visualRect(button->direction, textRect, iconRect);
- tf |= Qt::AlignLeft; //left align, we adjust the text-rect instead
+ // Left align, adjust the text-rect according to the icon instead
+ tf &= ~horizontalAlignMask;
+ tf |= Qt::AlignLeft;
if (button->direction == Qt::RightToLeft)
textRect.setRight(iconRect.left() - iconSpacing);
@@ -3578,9 +3597,8 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
iconRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w),
pixelMetric(PM_ButtonShiftVertical, opt, w));
p->drawPixmap(iconRect, pixmap);
- } else {
- tf |= textAlignment;
}
+
if (button->state & (State_On | State_Sunken))
textRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w),
pixelMetric(PM_ButtonShiftVertical, opt, w));
@@ -4228,7 +4246,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
}
r = subRule.contentsRect(r);
- Qt::Alignment alignment = 0;
+ Qt::Alignment alignment;
if (subRule.hasPosition())
alignment = subRule.position()->textAlignment;
if (alignment == 0)
@@ -4266,7 +4284,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
if (pe1 != PseudoElement_None) {
QRenderRule subRule = renderRule(w, opt, pe1);
- if (subRule.bg != 0 || subRule.hasDrawable()) {
+ if (subRule.bg != nullptr || subRule.hasDrawable()) {
//We test subRule.bg directly because hasBackground() would return false for background:none.
//But we still don't want the default drawning in that case (example for QScrollBar::add-page) (task 198926)
subRule.drawRule(p, opt->rect);
@@ -4629,7 +4647,7 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
}
if (baseStyle()->property("_q_styleSheetRealCloseButton").toBool())
- baseStyle()->setProperty("_q_styleSheetRealCloseButton", QVariant(QVariant::Invalid));
+ baseStyle()->setProperty("_q_styleSheetRealCloseButton", QVariant());
}
QPixmap QStyleSheetStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap,
@@ -5074,7 +5092,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
case CT_GroupBox:
case CT_LineEdit:
#if QT_CONFIG(spinbox)
- if (qobject_cast<QAbstractSpinBox *>(w ? w->parentWidget() : 0))
+ if (qobject_cast<QAbstractSpinBox *>(w ? w->parentWidget() : nullptr))
return csz; // we only care about the size hint of the line edit
#endif
if (rule.hasBox() || !rule.hasNativeBorder()) {
@@ -5715,7 +5733,7 @@ QRect QStyleSheetStyle::subControlRect(ComplexControl cc, const QStyleOptionComp
QRenderRule subRule = renderRule(w, opt, PseudoElement_SliderGroove);
if (!subRule.hasDrawable())
break;
- subRule.img = 0;
+ subRule.img = nullptr;
QRect gr = positionRect(w, rule, subRule, PseudoElement_SliderGroove, opt->rect, opt->direction);
switch (sc) {
case SC_SliderGroove:
@@ -5725,8 +5743,8 @@ QRect QStyleSheetStyle::subControlRect(ComplexControl cc, const QStyleOptionComp
QRect cr = subRule.contentsRect(gr);
QRenderRule subRule2 = renderRule(w, opt, PseudoElement_SliderHandle);
int len = horizontal ? subRule2.size().width() : subRule2.size().height();
- subRule2.img = 0;
- subRule2.geo = 0;
+ subRule2.img = nullptr;
+ subRule2.geo = nullptr;
cr = positionRect(w, subRule2, PseudoElement_SliderHandle, cr, opt->direction);
int thickness = horizontal ? cr.height() : cr.width();
int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderPosition,
@@ -5834,7 +5852,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
QRect ir = subElementRect(isRadio ? SE_RadioButtonIndicator : SE_CheckBoxIndicator,
opt, w);
ir = visualRect(opt->direction, opt->rect, ir);
- int spacing = pixelMetric(isRadio ? PM_RadioButtonLabelSpacing : PM_CheckBoxLabelSpacing, 0, w);
+ int spacing = pixelMetric(isRadio ? PM_RadioButtonLabelSpacing : PM_CheckBoxLabelSpacing, nullptr, w);
QRect cr = rule.contentsRect(opt->rect);
ir.setRect(ir.left() + ir.width() + spacing, cr.y(),
cr.width() - ir.width() - spacing, cr.height());
@@ -5991,6 +6009,16 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
case SE_TabBarTabRightButton: {
QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab);
if (subRule.hasBox() || !subRule.hasNativeBorder()) {
+ if (se == SE_TabBarTabText) {
+ if (const QStyleOptionTabV4 *tab = qstyleoption_cast<const QStyleOptionTabV4 *>(opt)) {
+ const QTabBar *bar = qobject_cast<const QTabBar *>(w);
+ const QRect optRect = bar && tab->tabIndex != -1 ? bar->tabRect(tab->tabIndex) : opt->rect;
+ const QRect r = positionRect(w, subRule, PseudoElement_TabBarTab, optRect, opt->direction);
+ QStyleOptionTabV4 tabCopy(*tab);
+ tabCopy.rect = subRule.contentsRect(r);
+ return ParentStyle::subElementRect(se, &tabCopy, w);
+ }
+ }
return ParentStyle::subElementRect(se, opt, w);
}
break;
@@ -6099,7 +6127,7 @@ void QStyleSheetStyle::saveWidgetFont(QWidget* w, const QFont& font) const
void QStyleSheetStyle::clearWidgetFont(QWidget* w) const
{
- w->setProperty("_q_styleSheetWidgetFont", QVariant(QVariant::Invalid));
+ w->setProperty("_q_styleSheetWidgetFont", QVariant());
}
// Polish palette that should be used for a particular widget, with particular states
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index 4f8cc56e05..8eb24d7557 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -84,6 +84,7 @@
#include <qpa/qplatformscreen.h>
#include <private/qguiapplication_p.h>
#include <private/qhighdpiscaling_p.h>
+#include <qpa/qplatformnativeinterface.h>
#include <private/qwidget_p.h>
#include <private/qstylehelper_p.h>
@@ -127,6 +128,22 @@ qreal QWindowsStylePrivate::appDevicePixelRatio()
return qApp->devicePixelRatio();
}
+bool QWindowsStylePrivate::isDarkMode()
+{
+ bool result = false;
+#ifdef Q_OS_WIN
+ // Windows only: Return whether dark mode style support is desired and
+ // dark mode is in effect.
+ if (auto ni = QGuiApplication::platformNativeInterface()) {
+ const QVariant darkModeStyleP = ni->property("darkModeStyle");
+ result = darkModeStyleP.type() == QVariant::Bool
+ && darkModeStyleP.value<bool>()
+ && ni->property("darkMode").value<bool>();
+ }
+#endif
+ return result;
+}
+
// Returns \c true if the toplevel parent of \a widget has seen the Alt-key
bool QWindowsStylePrivate::hasSeenAlt(const QWidget *widget) const
{
@@ -1675,7 +1692,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
const bool vertical = pb->orientation == Qt::Vertical;
const bool inverted = pb->invertedAppearance;
- QMatrix m;
+ QTransform m;
if (vertical) {
rect = QRect(rect.y(), rect.x(), rect.height(), rect.width()); // flip width and height
m.rotate(90);
diff --git a/src/widgets/styles/qwindowsstyle_p_p.h b/src/widgets/styles/qwindowsstyle_p_p.h
index 4f6ffcefc2..a25f5c4166 100644
--- a/src/widgets/styles/qwindowsstyle_p_p.h
+++ b/src/widgets/styles/qwindowsstyle_p_p.h
@@ -74,6 +74,7 @@ public:
static qreal devicePixelRatio(const QWidget *widget = nullptr)
{ return widget ? widget->devicePixelRatioF() : QWindowsStylePrivate::appDevicePixelRatio(); }
static qreal nativeMetricScaleFactor(const QWidget *widget = nullptr);
+ static bool isDarkMode();
bool hasSeenAlt(const QWidget *widget) const;
bool altDown() const { return alt_down; }
diff --git a/src/widgets/util/qcolormap.cpp b/src/widgets/util/qcolormap.cpp
index 6dacc97261..57e61690e9 100644
--- a/src/widgets/util/qcolormap.cpp
+++ b/src/widgets/util/qcolormap.cpp
@@ -59,7 +59,7 @@ public:
int numcolors;
};
-static QColormapPrivate *screenMap = 0;
+static QColormapPrivate *screenMap = nullptr;
void QColormap::initialize()
{
@@ -83,7 +83,7 @@ void QColormap::initialize()
void QColormap::cleanup()
{
delete screenMap;
- screenMap = 0;
+ screenMap = nullptr;
}
QColormap QColormap::instance(int /*screen*/)
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp
index 7b69eff30c..72fa557790 100644
--- a/src/widgets/util/qcompleter.cpp
+++ b/src/widgets/util/qcompleter.cpp
@@ -473,7 +473,7 @@ QMatchData QCompletionEngine::filterHistory()
if (curParts.count() <= 1 || c->proxy->showAll || !source)
return QMatchData();
-#if QT_CONFIG(dirmodel)
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
const bool isDirModel = (qobject_cast<QDirModel *>(source) != nullptr);
#else
const bool isDirModel = false;
@@ -903,7 +903,7 @@ void QCompleterPrivate::_q_complete(QModelIndex index, bool highlighted)
QModelIndex si = proxy->mapToSource(index);
si = si.sibling(si.row(), column); // for clicked()
completion = q->pathFromIndex(si);
-#if QT_CONFIG(dirmodel)
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
// add a trailing separator in inline
if (mode == QCompleter::InlineCompletion) {
if (qobject_cast<QDirModel *>(proxy->sourceModel()) && QFileInfo(completion).isDir())
@@ -1125,7 +1125,7 @@ void QCompleter::setModel(QAbstractItemModel *model)
setPopup(d->popup); // set the model and make new connections
if (oldModel && oldModel->QObject::parent() == this)
delete oldModel;
-#if QT_CONFIG(dirmodel)
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
if (qobject_cast<QDirModel *>(model)) {
#if defined(Q_OS_WIN)
setCaseSensitivity(Qt::CaseInsensitive);
@@ -1262,7 +1262,7 @@ Qt::MatchFlags QCompleter::filterMode() const
void QCompleter::setPopup(QAbstractItemView *popup)
{
Q_D(QCompleter);
- Q_ASSERT(popup != 0);
+ Q_ASSERT(popup != nullptr);
if (d->popup) {
QObject::disconnect(d->popup->selectionModel(), nullptr, this, nullptr);
QObject::disconnect(d->popup, nullptr, this, nullptr);
@@ -1846,7 +1846,7 @@ QString QCompleter::pathFromIndex(const QModelIndex& index) const
return QString();
bool isDirModel = false;
bool isFsModel = false;
-#if QT_CONFIG(dirmodel)
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
isDirModel = qobject_cast<QDirModel *>(d->proxy->sourceModel()) != nullptr;
#endif
#if QT_CONFIG(filesystemmodel)
@@ -1895,7 +1895,7 @@ QStringList QCompleter::splitPath(const QString& path) const
{
bool isDirModel = false;
bool isFsModel = false;
-#if QT_CONFIG(dirmodel)
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
Q_D(const QCompleter);
isDirModel = qobject_cast<QDirModel *>(d->proxy->sourceModel()) != nullptr;
#endif
diff --git a/src/widgets/util/qflickgesture.cpp b/src/widgets/util/qflickgesture.cpp
index 14a30ce7cf..064be873b9 100644
--- a/src/widgets/util/qflickgesture.cpp
+++ b/src/widgets/util/qflickgesture.cpp
@@ -114,19 +114,19 @@ static QMouseEvent *copyMouseEvent(QEvent *e)
}
#endif // QT_CONFIG(graphicsview)
default:
- return 0;
+ return nullptr;
}
}
class PressDelayHandler : public QObject
{
private:
- PressDelayHandler(QObject *parent = 0)
+ PressDelayHandler(QObject *parent = nullptr)
: QObject(parent)
, pressDelayTimer(0)
, sendingEvent(false)
, mouseButton(Qt::NoButton)
- , mouseTarget(0)
+ , mouseTarget(nullptr)
, mouseEventSource(Qt::MouseEventNotSynthesized)
{ }
@@ -138,7 +138,7 @@ public:
static PressDelayHandler *instance()
{
- static PressDelayHandler *inst = 0;
+ static PressDelayHandler *inst = nullptr;
if (!inst)
inst = new PressDelayHandler(QCoreApplication::instance());
return inst;
@@ -192,10 +192,10 @@ public:
result = true; // consume this event
} else if (mouseTarget && scrollerIsActive) {
// we grabbed the mouse expicitly when the scroller became active, so undo that now
- sendMouseEvent(0, UngrabMouseBefore);
+ sendMouseEvent(nullptr, UngrabMouseBefore);
}
- pressDelayEvent.reset(0);
- mouseTarget = 0;
+ pressDelayEvent.reset(nullptr);
+ mouseTarget = nullptr;
return result;
}
@@ -208,9 +208,9 @@ public:
killTimer(pressDelayTimer);
pressDelayTimer = 0;
}
- pressDelayEvent.reset(0);
+ pressDelayEvent.reset(nullptr);
}
- mouseTarget = 0;
+ mouseTarget = nullptr;
}
void scrollerBecameActive()
@@ -222,8 +222,8 @@ public:
killTimer(pressDelayTimer);
pressDelayTimer = 0;
}
- pressDelayEvent.reset(0);
- mouseTarget = 0;
+ pressDelayEvent.reset(nullptr);
+ mouseTarget = nullptr;
} else if (mouseTarget) {
// we did send a press, so we need to fake a release now
@@ -261,7 +261,7 @@ protected:
qFGDebug() << "QFG: timer event: re-sending mouse press to " << mouseTarget;
sendMouseEvent(pressDelayEvent.data(), UngrabMouseBefore);
}
- pressDelayEvent.reset(0);
+ pressDelayEvent.reset(nullptr);
if (pressDelayTimer) {
killTimer(pressDelayTimer);
@@ -276,7 +276,7 @@ protected:
sendingEvent = true;
#if QT_CONFIG(graphicsview)
- QGraphicsItem *grabber = 0;
+ QGraphicsItem *grabber = nullptr;
if (mouseTarget->parentWidget()) {
if (QGraphicsView *gv = qobject_cast<QGraphicsView *>(mouseTarget->parentWidget())) {
if (gv->scene())
@@ -350,7 +350,7 @@ QFlickGesture::QFlickGesture(QObject *receiver, Qt::MouseButton button, QObject
{
d_func()->q_ptr = this;
d_func()->receiver = receiver;
- d_func()->receiverScroller = (receiver && QScroller::hasScroller(receiver)) ? QScroller::scroller(receiver) : 0;
+ d_func()->receiverScroller = (receiver && QScroller::hasScroller(receiver)) ? QScroller::scroller(receiver) : nullptr;
d_func()->button = button;
}
@@ -358,7 +358,7 @@ QFlickGesture::~QFlickGesture()
{ }
QFlickGesturePrivate::QFlickGesturePrivate()
- : receiverScroller(0), button(Qt::NoButton), macIgnoreWheel(false)
+ : receiverScroller(nullptr), button(Qt::NoButton), macIgnoreWheel(false)
{ }
@@ -420,11 +420,11 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
return Ignore;
}
- const QMouseEvent *me = 0;
+ const QMouseEvent *me = nullptr;
#if QT_CONFIG(graphicsview)
- const QGraphicsSceneMouseEvent *gsme = 0;
+ const QGraphicsSceneMouseEvent *gsme = nullptr;
#endif
- const QTouchEvent *te = 0;
+ const QTouchEvent *te = nullptr;
QPoint globalPos;
// qFGDebug() << "FlickGesture "<<state<<"watched:"<<watched<<"receiver"<<d->receiver<<"event"<<event->type()<<"button"<<button;
@@ -610,7 +610,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
}
// depending on the scroller state return the gesture state
- Result result(0);
+ Result result;
bool scrollerIsActive = (scroller->state() == QScroller::Dragging ||
scroller->state() == QScroller::Scrolling);
diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp
index df05bbf71c..fec373d45c 100644
--- a/src/widgets/util/qscroller.cpp
+++ b/src/widgets/util/qscroller.cpp
@@ -300,7 +300,7 @@ QScroller *QScroller::scroller(QObject *target)
{
if (!target) {
qWarning("QScroller::scroller() was called with a null target.");
- return 0;
+ return nullptr;
}
if (qt_allScrollers()->contains(target))
@@ -476,7 +476,7 @@ void QScroller::ungrabGesture(QObject *target)
QGestureRecognizer::unregisterRecognizer(sp->recognizerType);
// do not delete the recognizer. The QGestureManager is doing this.
- sp->recognizer = 0;
+ sp->recognizer = nullptr;
}
#endif // QT_NO_GESTURES
@@ -502,7 +502,7 @@ QScroller::~QScroller()
#ifndef QT_NO_GESTURES
QGestureRecognizer::unregisterRecognizer(d->recognizerType);
// do not delete the recognizer. The QGestureManager is doing this.
- d->recognizer = 0;
+ d->recognizer = nullptr;
#endif
qt_allScrollers()->remove(d->target);
qt_activeScrollers()->removeOne(this);
@@ -879,7 +879,7 @@ void QScroller::setSnapPositionsY(qreal first, qreal interval)
QScrollerPrivate::QScrollerPrivate(QScroller *q, QObject *_target)
: target(_target)
#ifndef QT_NO_GESTURES
- , recognizer(0)
+ , recognizer(nullptr)
, recognizerType(Qt::CustomGesture)
#endif
, state(QScroller::Inactive)
@@ -900,7 +900,7 @@ QScrollerPrivate::QScrollerPrivate(QScroller *q, QObject *_target)
void QScrollerPrivate::init()
{
- setDpiFromWidget(0);
+ setDpiFromWidget(nullptr);
monotonicTimer.start();
}
diff --git a/src/widgets/util/qscrollerproperties.cpp b/src/widgets/util/qscrollerproperties.cpp
index df6b899fe4..be763f182e 100644
--- a/src/widgets/util/qscrollerproperties.cpp
+++ b/src/widgets/util/qscrollerproperties.cpp
@@ -46,8 +46,8 @@
QT_BEGIN_NAMESPACE
-static QScrollerPropertiesPrivate *userDefaults = 0;
-static QScrollerPropertiesPrivate *systemDefaults = 0;
+static QScrollerPropertiesPrivate *userDefaults = nullptr;
+static QScrollerPropertiesPrivate *systemDefaults = nullptr;
QScrollerPropertiesPrivate *QScrollerPropertiesPrivate::defaults()
{
@@ -200,7 +200,7 @@ void QScrollerProperties::setDefaultScrollerProperties(const QScrollerProperties
void QScrollerProperties::unsetDefaultScrollerProperties()
{
delete userDefaults;
- userDefaults = 0;
+ userDefaults = nullptr;
}
/*!
@@ -261,9 +261,9 @@ void QScrollerProperties::setScrollMetric(ScrollMetric metric, const QVariant &v
case OvershootDragDistanceFactor: d->overshootDragDistanceFactor = qBound(qreal(0), value.toReal(), qreal(1)); break;
case OvershootScrollDistanceFactor: d->overshootScrollDistanceFactor = qBound(qreal(0), value.toReal(), qreal(1)); break;
case OvershootScrollTime: d->overshootScrollTime = value.toReal(); break;
- case HorizontalOvershootPolicy: d->hOvershootPolicy = value.value<QScrollerProperties::OvershootPolicy>(); break;
- case VerticalOvershootPolicy: d->vOvershootPolicy = value.value<QScrollerProperties::OvershootPolicy>(); break;
- case FrameRate: d->frameRate = value.value<QScrollerProperties::FrameRates>(); break;
+ case HorizontalOvershootPolicy: d->hOvershootPolicy = qvariant_cast<QScrollerProperties::OvershootPolicy>(value); break;
+ case VerticalOvershootPolicy: d->vOvershootPolicy = qvariant_cast<QScrollerProperties::OvershootPolicy>(value); break;
+ case FrameRate: d->frameRate = qvariant_cast<QScrollerProperties::FrameRates>(value); break;
case ScrollMetricCount: break;
}
}
diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp
index fd18888870..ee52139913 100644
--- a/src/widgets/util/qsystemtrayicon.cpp
+++ b/src/widgets/util/qsystemtrayicon.cpp
@@ -367,8 +367,6 @@ bool QSystemTrayIcon::event(QEvent *e)
This signal is emitted when the message displayed using showMessage()
was clicked by the user.
- Currently this signal is not sent on \macos.
-
\note We follow Microsoft Windows behavior, so the
signal is also emitted when the user clicks on a tray icon with
a balloon message displayed.
@@ -455,7 +453,7 @@ void QSystemTrayIconPrivate::_q_emitActivated(QPlatformSystemTrayIcon::Activatio
}
//////////////////////////////////////////////////////////////////////
-static QBalloonTip *theSolitaryBalloonTip = 0;
+static QBalloonTip *theSolitaryBalloonTip = nullptr;
void QBalloonTip::showBalloon(const QIcon &icon, const QString &title,
const QString &message, QSystemTrayIcon *trayIcon,
@@ -477,7 +475,7 @@ void QBalloonTip::hideBalloon()
return;
theSolitaryBalloonTip->hide();
delete theSolitaryBalloonTip;
- theSolitaryBalloonTip = 0;
+ theSolitaryBalloonTip = nullptr;
}
void QBalloonTip::updateBalloonPosition(const QPoint& pos)
@@ -495,7 +493,7 @@ bool QBalloonTip::isBalloonVisible()
QBalloonTip::QBalloonTip(const QIcon &icon, const QString &title,
const QString &message, QSystemTrayIcon *ti)
- : QWidget(0, Qt::ToolTip),
+ : QWidget(nullptr, Qt::ToolTip),
trayIcon(ti),
timerId(-1),
showArrow(true)
@@ -585,7 +583,7 @@ QBalloonTip::QBalloonTip(const QIcon &icon, const QString &title,
QBalloonTip::~QBalloonTip()
{
- theSolitaryBalloonTip = 0;
+ theSolitaryBalloonTip = nullptr;
}
void QBalloonTip::paintEvent(QPaintEvent *)
diff --git a/src/widgets/util/qsystemtrayicon_x11.cpp b/src/widgets/util/qsystemtrayicon_x11.cpp
index 0c7bb94a91..86c11f98ed 100644
--- a/src/widgets/util/qsystemtrayicon_x11.cpp
+++ b/src/widgets/util/qsystemtrayicon_x11.cpp
@@ -97,7 +97,7 @@ private:
};
QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *qIn)
- : QWidget(0, Qt::Window | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint)
+ : QWidget(nullptr, Qt::Window | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint)
, q(qIn)
{
setObjectName(QStringLiteral("QSystemTrayIconSys"));
@@ -218,7 +218,7 @@ private:
////////////////////////////////////////////////////////////////////////////
QSystemTrayIconPrivate::QSystemTrayIconPrivate()
- : sys(0),
+ : sys(nullptr),
qpa_sys(QGuiApplicationPrivate::platformTheme()->createPlatformSystemTrayIcon()),
visible(false),
trayWatcher(nullptr)
diff --git a/src/widgets/util/qundogroup.cpp b/src/widgets/util/qundogroup.cpp
index 9bd63d4232..ae439743bc 100644
--- a/src/widgets/util/qundogroup.cpp
+++ b/src/widgets/util/qundogroup.cpp
@@ -47,7 +47,7 @@ class QUndoGroupPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QUndoGroup)
public:
- QUndoGroupPrivate() : active(0) {}
+ QUndoGroupPrivate() : active(nullptr) {}
QUndoStack *active;
QList<QUndoStack*> stack_list;
@@ -113,7 +113,7 @@ QUndoGroup::~QUndoGroup()
QList<QUndoStack *>::iterator it = d->stack_list.begin();
QList<QUndoStack *>::iterator end = d->stack_list.end();
while (it != end) {
- (*it)->d_func()->group = 0;
+ (*it)->d_func()->group = nullptr;
++it;
}
}
@@ -154,8 +154,8 @@ void QUndoGroup::removeStack(QUndoStack *stack)
if (d->stack_list.removeAll(stack) == 0)
return;
if (stack == d->active)
- setActiveStack(0);
- stack->d_func()->group = 0;
+ setActiveStack(nullptr);
+ stack->d_func()->group = nullptr;
}
/*!
@@ -190,7 +190,7 @@ void QUndoGroup::setActiveStack(QUndoStack *stack)
if (d->active == stack)
return;
- if (d->active != 0) {
+ if (d->active != nullptr) {
disconnect(d->active, SIGNAL(canUndoChanged(bool)),
this, SIGNAL(canUndoChanged(bool)));
disconnect(d->active, SIGNAL(undoTextChanged(QString)),
@@ -207,7 +207,7 @@ void QUndoGroup::setActiveStack(QUndoStack *stack)
d->active = stack;
- if (d->active == 0) {
+ if (d->active == nullptr) {
emit canUndoChanged(false);
emit undoTextChanged(QString());
emit canRedoChanged(false);
@@ -265,7 +265,7 @@ QUndoStack *QUndoGroup::activeStack() const
void QUndoGroup::undo()
{
Q_D(QUndoGroup);
- if (d->active != 0)
+ if (d->active != nullptr)
d->active->undo();
}
@@ -282,7 +282,7 @@ void QUndoGroup::undo()
void QUndoGroup::redo()
{
Q_D(QUndoGroup);
- if (d->active != 0)
+ if (d->active != nullptr)
d->active->redo();
}
@@ -298,7 +298,7 @@ void QUndoGroup::redo()
bool QUndoGroup::canUndo() const
{
Q_D(const QUndoGroup);
- return d->active != 0 && d->active->canUndo();
+ return d->active != nullptr && d->active->canUndo();
}
/*!
@@ -313,7 +313,7 @@ bool QUndoGroup::canUndo() const
bool QUndoGroup::canRedo() const
{
Q_D(const QUndoGroup);
- return d->active != 0 && d->active->canRedo();
+ return d->active != nullptr && d->active->canRedo();
}
/*!
@@ -328,7 +328,7 @@ bool QUndoGroup::canRedo() const
QString QUndoGroup::undoText() const
{
Q_D(const QUndoGroup);
- return d->active == 0 ? QString() : d->active->undoText();
+ return d->active == nullptr ? QString() : d->active->undoText();
}
/*!
@@ -343,7 +343,7 @@ QString QUndoGroup::undoText() const
QString QUndoGroup::redoText() const
{
Q_D(const QUndoGroup);
- return d->active == 0 ? QString() : d->active->redoText();
+ return d->active == nullptr ? QString() : d->active->redoText();
}
/*!
@@ -358,7 +358,7 @@ QString QUndoGroup::redoText() const
bool QUndoGroup::isClean() const
{
Q_D(const QUndoGroup);
- return d->active == 0 || d->active->isClean();
+ return d->active == nullptr || d->active->isClean();
}
#ifndef QT_NO_ACTION
diff --git a/src/widgets/util/qundostack.cpp b/src/widgets/util/qundostack.cpp
index 8788c42252..f188b8298a 100644
--- a/src/widgets/util/qundostack.cpp
+++ b/src/widgets/util/qundostack.cpp
@@ -128,7 +128,7 @@ QUndoCommand::QUndoCommand(const QString &text, QUndoCommand *parent)
QUndoCommand::QUndoCommand(QUndoCommand *parent)
{
d = new QUndoCommandPrivate;
- if (parent != 0)
+ if (parent != nullptr)
parent->d->child_list.append(this);
}
@@ -336,7 +336,7 @@ int QUndoCommand::childCount() const
const QUndoCommand *QUndoCommand::child(int index) const
{
if (index < 0 || index >= d->child_list.count())
- return 0;
+ return nullptr;
return d->child_list.at(index);
}
@@ -559,7 +559,7 @@ QUndoStack::~QUndoStack()
{
#if QT_CONFIG(undogroup)
Q_D(QUndoStack);
- if (d->group != 0)
+ if (d->group != nullptr)
d->group->removeStack(this);
#endif
clear();
@@ -640,7 +640,7 @@ void QUndoStack::push(QUndoCommand *cmd)
bool macro = !d->macro_stack.isEmpty();
- QUndoCommand *cur = 0;
+ QUndoCommand *cur = nullptr;
if (macro) {
QUndoCommand *macro_cmd = d->macro_stack.constLast();
if (!macro_cmd->d->child_list.isEmpty())
@@ -654,7 +654,7 @@ void QUndoStack::push(QUndoCommand *cmd)
d->clean_index = -1; // we've deleted the clean state
}
- bool try_merge = cur != 0
+ bool try_merge = cur != nullptr
&& cur->id() != -1
&& cur->id() == cmd->id()
&& (macro || d->index != d->clean_index);
@@ -1225,7 +1225,7 @@ const QUndoCommand *QUndoStack::command(int index) const
Q_D(const QUndoStack);
if (index < 0 || index >= d->command_list.count())
- return 0;
+ return nullptr;
return d->command_list.at(index);
}
@@ -1305,11 +1305,11 @@ void QUndoStack::setActive(bool active)
#else
Q_D(QUndoStack);
- if (d->group != 0) {
+ if (d->group != nullptr) {
if (active)
d->group->setActiveStack(this);
else if (d->group->activeStack() == this)
- d->group->setActiveStack(0);
+ d->group->setActiveStack(nullptr);
}
#endif
}
@@ -1320,7 +1320,7 @@ bool QUndoStack::isActive() const
return true;
#else
Q_D(const QUndoStack);
- return d->group == 0 || d->group->activeStack() == this;
+ return d->group == nullptr || d->group->activeStack() == this;
#endif
}
diff --git a/src/widgets/util/qundoview.cpp b/src/widgets/util/qundoview.cpp
index f59d87fb9d..a39276a2b8 100644
--- a/src/widgets/util/qundoview.cpp
+++ b/src/widgets/util/qundoview.cpp
@@ -54,7 +54,7 @@ class QUndoModel : public QAbstractItemModel
{
Q_OBJECT
public:
- QUndoModel(QObject *parent = 0);
+ QUndoModel(QObject *parent = nullptr);
QUndoStack *stack() const;
@@ -92,7 +92,7 @@ private:
QUndoModel::QUndoModel(QObject *parent)
: QAbstractItemModel(parent)
{
- m_stack = 0;
+ m_stack = nullptr;
m_sel_model = new QItemSelectionModel(this, this);
connect(m_sel_model, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(setStackCurrentIndex(QModelIndex)));
@@ -114,13 +114,13 @@ void QUndoModel::setStack(QUndoStack *stack)
if (m_stack == stack)
return;
- if (m_stack != 0) {
+ if (m_stack != nullptr) {
disconnect(m_stack, SIGNAL(cleanChanged(bool)), this, SLOT(stackChanged()));
disconnect(m_stack, SIGNAL(indexChanged(int)), this, SLOT(stackChanged()));
disconnect(m_stack, SIGNAL(destroyed(QObject*)), this, SLOT(stackDestroyed(QObject*)));
}
m_stack = stack;
- if (m_stack != 0) {
+ if (m_stack != nullptr) {
connect(m_stack, SIGNAL(cleanChanged(bool)), this, SLOT(stackChanged()));
connect(m_stack, SIGNAL(indexChanged(int)), this, SLOT(stackChanged()));
connect(m_stack, SIGNAL(destroyed(QObject*)), this, SLOT(stackDestroyed(QObject*)));
@@ -133,7 +133,7 @@ void QUndoModel::stackDestroyed(QObject *obj)
{
if (obj != m_stack)
return;
- m_stack = 0;
+ m_stack = nullptr;
stackChanged();
}
@@ -147,7 +147,7 @@ void QUndoModel::stackChanged()
void QUndoModel::setStackCurrentIndex(const QModelIndex &index)
{
- if (m_stack == 0)
+ if (m_stack == nullptr)
return;
if (index == selectedIndex())
@@ -161,12 +161,12 @@ void QUndoModel::setStackCurrentIndex(const QModelIndex &index)
QModelIndex QUndoModel::selectedIndex() const
{
- return m_stack == 0 ? QModelIndex() : createIndex(m_stack->index(), 0);
+ return m_stack == nullptr ? QModelIndex() : createIndex(m_stack->index(), 0);
}
QModelIndex QUndoModel::index(int row, int column, const QModelIndex &parent) const
{
- if (m_stack == 0)
+ if (m_stack == nullptr)
return QModelIndex();
if (parent.isValid())
@@ -188,7 +188,7 @@ QModelIndex QUndoModel::parent(const QModelIndex&) const
int QUndoModel::rowCount(const QModelIndex &parent) const
{
- if (m_stack == 0)
+ if (m_stack == nullptr)
return 0;
if (parent.isValid())
@@ -204,7 +204,7 @@ int QUndoModel::columnCount(const QModelIndex&) const
QVariant QUndoModel::data(const QModelIndex &index, int role) const
{
- if (m_stack == 0)
+ if (m_stack == nullptr)
return QVariant();
if (index.column() != 0)
@@ -274,9 +274,9 @@ class QUndoViewPrivate : public QListViewPrivate
public:
QUndoViewPrivate() :
#if QT_CONFIG(undogroup)
- group(0),
+ group(nullptr),
#endif
- model(0) {}
+ model(nullptr) {}
#if QT_CONFIG(undogroup)
QPointer<QUndoGroup> group;
@@ -358,8 +358,8 @@ QUndoStack *QUndoView::stack() const
}
/*!
- Sets the stack displayed by this view to \a stack. If \a stack is 0, the view
- will be empty.
+ Sets the stack displayed by this view to \a stack. If \a stack is \nullptr,
+ the view will be empty.
If the view was previously looking at a QUndoGroup, the group is set to \nullptr.
@@ -370,7 +370,7 @@ void QUndoView::setStack(QUndoStack *stack)
{
Q_D(QUndoView);
#if QT_CONFIG(undogroup)
- setGroup(0);
+ setGroup(nullptr);
#endif
d->model->setStack(stack);
}
@@ -378,10 +378,10 @@ void QUndoView::setStack(QUndoStack *stack)
#if QT_CONFIG(undogroup)
/*!
- Sets the group displayed by this view to \a group. If \a group is 0, the view will
- be empty.
+ Sets the group displayed by this view to \a group. If \a group is \nullptr,
+ the view will be empty.
- The view will update itself autmiatically whenever the active stack of the group changes.
+ The view will update itself automatically whenever the active stack of the group changes.
\sa group(), setStack()
*/
@@ -393,19 +393,19 @@ void QUndoView::setGroup(QUndoGroup *group)
if (d->group == group)
return;
- if (d->group != 0) {
+ if (d->group != nullptr) {
disconnect(d->group, SIGNAL(activeStackChanged(QUndoStack*)),
d->model, SLOT(setStack(QUndoStack*)));
}
d->group = group;
- if (d->group != 0) {
+ if (d->group != nullptr) {
connect(d->group, SIGNAL(activeStackChanged(QUndoStack*)),
d->model, SLOT(setStack(QUndoStack*)));
d->model->setStack(d->group->activeStack());
} else {
- d->model->setStack(0);
+ d->model->setStack(nullptr);
}
}
diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro
index 6f807e1696..2d5ba05d40 100644
--- a/src/widgets/widgets.pro
+++ b/src/widgets/widgets.pro
@@ -45,3 +45,5 @@ testcocoon {
MODULE_PLUGIN_TYPES += \
styles
load(qt_module)
+
+CONFIG += metatypes install_metatypes
diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp
index d956d2ba23..7961d0a21b 100644
--- a/src/widgets/widgets/qabstractbutton.cpp
+++ b/src/widgets/widgets/qabstractbutton.cpp
@@ -177,7 +177,7 @@ QAbstractButtonPrivate::QAbstractButtonPrivate(QSizePolicy::ControlType type)
checkable(false), checked(false), autoRepeat(false), autoExclusive(false),
down(false), blockRefresh(false), pressed(false),
#if QT_CONFIG(buttongroup)
- group(0),
+ group(nullptr),
#endif
autoRepeatDelay(AUTO_REPEAT_DELAY),
autoRepeatInterval(AUTO_REPEAT_INTERVAL),
@@ -217,14 +217,14 @@ QAbstractButton *QAbstractButtonPrivate::queryCheckedButton() const
Q_Q(const QAbstractButton);
QList<QAbstractButton *> buttonList = queryButtonList();
if (!autoExclusive || buttonList.count() == 1) // no group
- return 0;
+ return nullptr;
for (int i = 0; i < buttonList.count(); ++i) {
QAbstractButton *b = buttonList.at(i);
if (b->d_func()->checked && b != q)
return b;
}
- return checked ? const_cast<QAbstractButton *>(q) : 0;
+ return checked ? const_cast<QAbstractButton *>(q) : nullptr;
}
void QAbstractButtonPrivate::notifyChecked()
@@ -257,7 +257,7 @@ void QAbstractButtonPrivate::moveFocus(int key)
if (!fb || !buttonList.contains(fb))
return;
- QAbstractButton *candidate = 0;
+ QAbstractButton *candidate = nullptr;
int bestScore = -1;
QRect target = f->rect().translated(f->mapToGlobal(QPoint(0,0)));
QPoint goal = target.center();
@@ -415,8 +415,13 @@ void QAbstractButtonPrivate::emitClicked()
emit q->clicked(checked);
#if QT_CONFIG(buttongroup)
if (guard && group) {
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
emit group->buttonClicked(group->id(q));
if (guard && group)
+QT_WARNING_POP
+#endif
emit group->buttonClicked(q);
}
#endif
@@ -429,8 +434,13 @@ void QAbstractButtonPrivate::emitPressed()
emit q->pressed();
#if QT_CONFIG(buttongroup)
if (guard && group) {
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
emit group->buttonPressed(group->id(q));
if (guard && group)
+QT_WARNING_POP
+#endif
emit group->buttonPressed(q);
}
#endif
@@ -443,8 +453,13 @@ void QAbstractButtonPrivate::emitReleased()
emit q->released();
#if QT_CONFIG(buttongroup)
if (guard && group) {
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
emit group->buttonReleased(group->id(q));
if (guard && group)
+QT_WARNING_POP
+#endif
emit group->buttonReleased(q);
}
#endif
@@ -457,8 +472,13 @@ void QAbstractButtonPrivate::emitToggled(bool checked)
emit q->toggled(checked);
#if QT_CONFIG(buttongroup)
if (guard && group) {
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
emit group->buttonToggled(group->id(q), checked);
if (guard && group)
+QT_WARNING_POP
+#endif
emit group->buttonToggled(q, checked);
}
#endif
@@ -468,7 +488,7 @@ void QAbstractButtonPrivate::emitToggled(bool checked)
Constructs an abstract button with a \a parent.
*/
QAbstractButton::QAbstractButton(QWidget *parent)
- : QWidget(*new QAbstractButtonPrivate, parent, 0)
+ : QWidget(*new QAbstractButtonPrivate, parent, { })
{
Q_D(QAbstractButton);
d->init();
@@ -490,7 +510,7 @@ QAbstractButton::QAbstractButton(QWidget *parent)
/*! \internal
*/
QAbstractButton::QAbstractButton(QAbstractButtonPrivate &dd, QWidget *parent)
- : QWidget(dd, parent, 0)
+ : QWidget(dd, parent, { })
{
Q_D(QAbstractButton);
d->init();
@@ -1272,7 +1292,7 @@ QSize QAbstractButton::iconSize() const
Q_D(const QAbstractButton);
if (d->iconSize.isValid())
return d->iconSize;
- int e = style()->pixelMetric(QStyle::PM_ButtonIconSize, 0, this);
+ int e = style()->pixelMetric(QStyle::PM_ButtonIconSize, nullptr, this);
return QSize(e, e);
}
diff --git a/src/widgets/widgets/qabstractbutton.h b/src/widgets/widgets/qabstractbutton.h
index e8dee142f2..50c94654f3 100644
--- a/src/widgets/widgets/qabstractbutton.h
+++ b/src/widgets/widgets/qabstractbutton.h
@@ -64,7 +64,7 @@ class Q_WIDGETS_EXPORT QAbstractButton : public QWidget
Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut)
#endif
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
- Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled USER true)
+ Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled USER true)
Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat)
Q_PROPERTY(bool autoExclusive READ autoExclusive WRITE setAutoExclusive)
Q_PROPERTY(int autoRepeatDelay READ autoRepeatDelay WRITE setAutoRepeatDelay)
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index d2372a7be9..257cffda62 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -161,10 +161,10 @@ QT_BEGIN_NAMESPACE
*/
QAbstractScrollAreaPrivate::QAbstractScrollAreaPrivate()
- :hbar(0), vbar(0), vbarpolicy(Qt::ScrollBarAsNeeded), hbarpolicy(Qt::ScrollBarAsNeeded),
+ :hbar(nullptr), vbar(nullptr), vbarpolicy(Qt::ScrollBarAsNeeded), hbarpolicy(Qt::ScrollBarAsNeeded),
shownOnce(false), inResize(false), sizeAdjustPolicy(QAbstractScrollArea::AdjustIgnored),
- viewport(0), cornerWidget(0), left(0), top(0), right(0), bottom(0),
- xoffset(0), yoffset(0), viewportFilter(0)
+ viewport(nullptr), cornerWidget(nullptr), left(0), top(0), right(0), bottom(0),
+ xoffset(0), yoffset(0), viewportFilter(nullptr)
{
}
@@ -329,12 +329,12 @@ void QAbstractScrollAreaPrivate::layoutChildren()
void QAbstractScrollAreaPrivate::layoutChildren_helper(bool *needHorizontalScrollbar, bool *needVerticalScrollbar)
{
Q_Q(QAbstractScrollArea);
- bool htransient = hbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, hbar);
+ bool htransient = hbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, hbar);
bool needh = *needHorizontalScrollbar || ((hbarpolicy != Qt::ScrollBarAlwaysOff) && ((hbarpolicy == Qt::ScrollBarAlwaysOn && !htransient)
|| ((hbarpolicy == Qt::ScrollBarAsNeeded || htransient)
&& hbar->minimum() < hbar->maximum() && !hbar->sizeHint().isEmpty())));
- bool vtransient = vbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, vbar);
+ bool vtransient = vbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, vbar);
bool needv = *needVerticalScrollbar || ((vbarpolicy != Qt::ScrollBarAlwaysOff) && ((vbarpolicy == Qt::ScrollBarAlwaysOn && !vtransient)
|| ((vbarpolicy == Qt::ScrollBarAsNeeded || vtransient)
&& vbar->minimum() < vbar->maximum() && !vbar->sizeHint().isEmpty())));
@@ -352,7 +352,7 @@ void QAbstractScrollAreaPrivate::layoutChildren_helper(bool *needHorizontalScrol
const QRect widgetRect = q->rect();
- const bool hasCornerWidget = (cornerWidget != 0);
+ const bool hasCornerWidget = (cornerWidget != nullptr);
QPoint cornerOffset((needv && vscrollOverlap == 0) ? vsbExt : 0, (needh && hscrollOverlap == 0) ? hsbExt : 0);
QRect controlsRect;
@@ -512,8 +512,8 @@ QAbstractScrollArea::~QAbstractScrollArea()
Sets the viewport to be the given \a widget.
The QAbstractScrollArea will take ownership of the given \a widget.
- If \a widget is 0, QAbstractScrollArea will assign a new QWidget instance
- for the viewport.
+ If \a widget is \nullptr, QAbstractScrollArea will assign a new QWidget
+ instance for the viewport.
\sa viewport()
*/
@@ -720,7 +720,7 @@ QWidget *QAbstractScrollArea::cornerWidget() const
You will probably also want to set at least one of the scroll bar
modes to \c AlwaysOn.
- Passing 0 shows no widget in the corner.
+ Passing \nullptr shows no widget in the corner.
Any previous corner widget is hidden.
@@ -794,7 +794,7 @@ void QAbstractScrollArea::addScrollBarWidget(QWidget *widget, Qt::Alignment alig
{
Q_D(QAbstractScrollArea);
- if (widget == 0)
+ if (widget == nullptr)
return;
const Qt::Orientation scrollBarOrientation
@@ -894,8 +894,8 @@ bool QAbstractScrollArea::eventFilter(QObject *o, QEvent *e)
if (d->hbarpolicy == Qt::ScrollBarAsNeeded && d->vbarpolicy == Qt::ScrollBarAsNeeded) {
QScrollBar *sbar = static_cast<QScrollBar*>(o);
QScrollBar *sibling = sbar == d->hbar ? d->vbar : d->hbar;
- if (sbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, sbar) &&
- sibling->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, sibling))
+ if (sbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, sbar) &&
+ sibling->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, sibling))
d->setScrollBarTransient(sibling, e->type() == QEvent::HoverLeave);
}
}
@@ -1389,10 +1389,10 @@ bool QAbstractScrollAreaPrivate::canStartScrollingAt( const QPoint &startPos )
void QAbstractScrollAreaPrivate::flashScrollBars()
{
- bool htransient = hbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, hbar);
+ bool htransient = hbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, hbar);
if ((hbarpolicy != Qt::ScrollBarAlwaysOff) && (hbarpolicy == Qt::ScrollBarAsNeeded || htransient))
hbar->d_func()->flash();
- bool vtransient = vbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, vbar);
+ bool vtransient = vbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, vbar);
if ((vbarpolicy != Qt::ScrollBarAlwaysOff) && (vbarpolicy == Qt::ScrollBarAsNeeded || vtransient))
vbar->d_func()->flash();
}
diff --git a/src/widgets/widgets/qabstractslider.cpp b/src/widgets/widgets/qabstractslider.cpp
index dc325ab871..a0611565b8 100644
--- a/src/widgets/widgets/qabstractslider.cpp
+++ b/src/widgets/widgets/qabstractslider.cpp
@@ -273,13 +273,13 @@ void QAbstractSliderPrivate::setSteps(int single, int page)
\l value of 0.
*/
QAbstractSlider::QAbstractSlider(QWidget *parent)
- :QWidget(*new QAbstractSliderPrivate, parent, 0)
+ :QWidget(*new QAbstractSliderPrivate, parent, { })
{
}
/*! \internal */
QAbstractSlider::QAbstractSlider(QAbstractSliderPrivate &dd, QWidget *parent)
- :QWidget(dd, parent, 0)
+ :QWidget(dd, parent, { })
{
}
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp
index fc19e0793e..04176ab5e2 100644
--- a/src/widgets/widgets/qabstractspinbox.cpp
+++ b/src/widgets/widgets/qabstractspinbox.cpp
@@ -147,7 +147,7 @@ QT_BEGIN_NAMESPACE
*/
QAbstractSpinBox::QAbstractSpinBox(QWidget *parent)
- : QWidget(*new QAbstractSpinBoxPrivate, parent, 0)
+ : QWidget(*new QAbstractSpinBoxPrivate, parent, { })
{
Q_D(QAbstractSpinBox);
d->init();
@@ -157,7 +157,7 @@ QAbstractSpinBox::QAbstractSpinBox(QWidget *parent)
\internal
*/
QAbstractSpinBox::QAbstractSpinBox(QAbstractSpinBoxPrivate &dd, QWidget *parent)
- : QWidget(dd, parent, 0)
+ : QWidget(dd, parent, { })
{
Q_D(QAbstractSpinBox);
d->init();
@@ -570,7 +570,7 @@ void QAbstractSpinBox::clear()
QAbstractSpinBox::StepEnabled QAbstractSpinBox::stepEnabled() const
{
Q_D(const QAbstractSpinBox);
- if (d->readOnly || d->type == QVariant::Invalid)
+ if (d->readOnly || d->type == QMetaType::UnknownType)
return StepNone;
if (d->wrapping)
return StepEnabled(StepUpEnabled | StepDownEnabled);
@@ -723,7 +723,7 @@ void QAbstractSpinBox::setLineEdit(QLineEdit *lineEdit)
d->edit->setFocusProxy(this);
d->edit->setAcceptDrops(false);
- if (d->type != QVariant::Invalid) {
+ if (d->type != QMetaType::UnknownType) {
connect(d->edit, SIGNAL(textChanged(QString)),
this, SLOT(_q_editorTextChanged(QString)));
connect(d->edit, SIGNAL(cursorPositionChanged(int,int)),
@@ -848,9 +848,9 @@ void QAbstractSpinBox::changeEvent(QEvent *event)
switch (event->type()) {
case QEvent::StyleChange:
- d->spinClickTimerInterval = style()->styleHint(QStyle::SH_SpinBox_ClickAutoRepeatRate, 0, this);
+ d->spinClickTimerInterval = style()->styleHint(QStyle::SH_SpinBox_ClickAutoRepeatRate, nullptr, this);
d->spinClickThresholdTimerInterval =
- style()->styleHint(QStyle::SH_SpinBox_ClickAutoRepeatThreshold, 0, this);
+ style()->styleHint(QStyle::SH_SpinBox_ClickAutoRepeatThreshold, nullptr, 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));
@@ -1043,7 +1043,7 @@ void QAbstractSpinBox::keyPressEvent(QKeyEvent *event)
steps *= 10;
if (!up)
steps *= -1;
- if (style()->styleHint(QStyle::SH_SpinBox_AnimateButton, 0, this)) {
+ if (style()->styleHint(QStyle::SH_SpinBox_AnimateButton, nullptr, this)) {
d->buttonState = (Keyboard | (up ? Up : Down));
}
if (d->spinClickTimerId == -1)
@@ -1421,14 +1421,14 @@ void QAbstractSpinBox::mouseReleaseEvent(QMouseEvent *event)
*/
QAbstractSpinBoxPrivate::QAbstractSpinBoxPrivate()
- : edit(0), type(QVariant::Invalid), spinClickTimerId(-1),
+ : edit(nullptr), type(QMetaType::UnknownType), spinClickTimerId(-1),
spinClickTimerInterval(100), spinClickThresholdTimerId(-1), spinClickThresholdTimerInterval(-1),
effectiveSpinRepeatRate(1), buttonState(None), cachedText(QLatin1String("\x01")),
cachedState(QValidator::Invalid), pendingEmit(false), readOnly(false), wrapping(false),
ignoreCursorPositionChanged(false), frame(true), accelerate(false), keyboardTracking(true),
cleared(false), ignoreUpdateEdit(false), correctionMode(QAbstractSpinBox::CorrectToPreviousValue),
stepModifier(Qt::ControlModifier), acceleration(0), hoverControl(QStyle::SC_None),
- buttonSymbols(QAbstractSpinBox::UpDownArrows), validator(0), showGroupSeparator(0),
+ buttonSymbols(QAbstractSpinBox::UpDownArrows), validator(nullptr), showGroupSeparator(0),
wheelDeltaRemainder(0)
{
}
@@ -1805,7 +1805,7 @@ void QAbstractSpinBoxPrivate::setValue(const QVariant &val, EmitPolicy ep,
void QAbstractSpinBoxPrivate::updateEdit()
{
Q_Q(QAbstractSpinBox);
- if (type == QVariant::Invalid)
+ if (type == QMetaType::UnknownType)
return;
const QString newText = specialValue() ? specialValueText : prefix + textFromValue(value) + suffix;
if (newText == edit->displayText() || cleared)
@@ -1865,8 +1865,8 @@ QVariant QAbstractSpinBoxPrivate::getZeroVariant() const
{
QVariant ret;
switch (type) {
- case QVariant::Int: ret = QVariant((int)0); break;
- case QVariant::Double: ret = QVariant((double)0.0); break;
+ case QMetaType::Int: ret = QVariant(0); break;
+ case QMetaType::Double: ret = QVariant(0.0); break;
default: break;
}
return ret;
@@ -1913,7 +1913,7 @@ QVariant QAbstractSpinBoxPrivate::valueFromText(const QString &) const
void QAbstractSpinBoxPrivate::interpret(EmitPolicy ep)
{
Q_Q(QAbstractSpinBox);
- if (type == QVariant::Invalid || cleared)
+ if (type == QMetaType::UnknownType || cleared)
return;
QVariant v = getZeroVariant();
@@ -2013,11 +2013,11 @@ void QSpinBoxValidator::fixup(QString &input) const
QVariant operator+(const QVariant &arg1, const QVariant &arg2)
{
QVariant ret;
- if (Q_UNLIKELY(arg1.type() != arg2.type()))
+ if (Q_UNLIKELY(arg1.userType() != arg2.userType()))
qWarning("QAbstractSpinBox: Internal error: Different types (%s vs %s) (%s:%d)",
arg1.typeName(), arg2.typeName(), __FILE__, __LINE__);
- switch (arg1.type()) {
- case QVariant::Int: {
+ switch (arg1.userType()) {
+ case QMetaType::Int: {
const int int1 = arg1.toInt();
const int int2 = arg2.toInt();
if (int1 > 0 && (int2 >= INT_MAX - int1)) {
@@ -2031,9 +2031,9 @@ QVariant operator+(const QVariant &arg1, const QVariant &arg2)
}
break;
}
- case QVariant::Double: ret = QVariant(arg1.toDouble() + arg2.toDouble()); break;
+ case QMetaType::Double: ret = QVariant(arg1.toDouble() + arg2.toDouble()); break;
#if QT_CONFIG(datetimeparser)
- case QVariant::DateTime: {
+ case QMetaType::QDateTime: {
QDateTime a2 = arg2.toDateTime();
QDateTime a1 = arg1.toDateTime().addDays(QDATETIMEEDIT_DATE_MIN.daysTo(a2.date()));
a1.setTime(a1.time().addMSecs(a2.time().msecsSinceStartOfDay()));
@@ -2055,13 +2055,13 @@ QVariant operator+(const QVariant &arg1, const QVariant &arg2)
QVariant operator-(const QVariant &arg1, const QVariant &arg2)
{
QVariant ret;
- if (Q_UNLIKELY(arg1.type() != arg2.type()))
+ if (Q_UNLIKELY(arg1.userType() != arg2.userType()))
qWarning("QAbstractSpinBox: Internal error: Different types (%s vs %s) (%s:%d)",
arg1.typeName(), arg2.typeName(), __FILE__, __LINE__);
- switch (arg1.type()) {
- case QVariant::Int: ret = QVariant(arg1.toInt() - arg2.toInt()); break;
- case QVariant::Double: ret = QVariant(arg1.toDouble() - arg2.toDouble()); break;
- case QVariant::DateTime: {
+ switch (arg1.userType()) {
+ case QMetaType::Int: ret = QVariant(arg1.toInt() - arg2.toInt()); break;
+ case QMetaType::Double: ret = QVariant(arg1.toDouble() - arg2.toDouble()); break;
+ case QMetaType::QDateTime: {
QDateTime a1 = arg1.toDateTime();
QDateTime a2 = arg2.toDateTime();
int days = a2.daysTo(a1);
@@ -2090,13 +2090,13 @@ QVariant operator*(const QVariant &arg1, double multiplier)
{
QVariant ret;
- switch (arg1.type()) {
- case QVariant::Int:
+ switch (arg1.userType()) {
+ case QMetaType::Int:
ret = static_cast<int>(qBound<double>(INT_MIN, arg1.toInt() * multiplier, INT_MAX));
break;
- case QVariant::Double: ret = QVariant(arg1.toDouble() * multiplier); break;
+ case QMetaType::Double: ret = QVariant(arg1.toDouble() * multiplier); break;
#if QT_CONFIG(datetimeparser)
- case QVariant::DateTime: {
+ case QMetaType::QDateTime: {
double days = QDATETIMEEDIT_DATE_MIN.daysTo(arg1.toDateTime().date()) * multiplier;
const qint64 daysInt = qint64(days);
days -= daysInt;
@@ -2119,17 +2119,17 @@ double operator/(const QVariant &arg1, const QVariant &arg2)
double a1 = 0;
double a2 = 0;
- switch (arg1.type()) {
- case QVariant::Int:
+ switch (arg1.userType()) {
+ case QMetaType::Int:
a1 = (double)arg1.toInt();
a2 = (double)arg2.toInt();
break;
- case QVariant::Double:
+ case QMetaType::Double:
a1 = arg1.toDouble();
a2 = arg2.toDouble();
break;
#if QT_CONFIG(datetimeparser)
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
a1 = QDATETIMEEDIT_DATE_MIN.daysTo(arg1.toDate());
a2 = QDATETIMEEDIT_DATE_MIN.daysTo(arg2.toDate());
a1 += arg1.toDateTime().time().msecsSinceStartOfDay() / (36e5 * 24);
@@ -2144,9 +2144,9 @@ double operator/(const QVariant &arg1, const QVariant &arg2)
int QAbstractSpinBoxPrivate::variantCompare(const QVariant &arg1, const QVariant &arg2)
{
- switch (arg2.type()) {
- case QVariant::Date:
- Q_ASSERT_X(arg1.type() == QVariant::Date, "QAbstractSpinBoxPrivate::variantCompare",
+ switch (arg2.userType()) {
+ case QMetaType::QDate:
+ Q_ASSERT_X(arg1.userType() == QMetaType::QDate, "QAbstractSpinBoxPrivate::variantCompare",
qPrintable(QString::fromLatin1("Internal error 1 (%1)").
arg(QString::fromLatin1(arg1.typeName()))));
if (arg1.toDate() == arg2.toDate()) {
@@ -2156,8 +2156,8 @@ int QAbstractSpinBoxPrivate::variantCompare(const QVariant &arg1, const QVariant
} else {
return 1;
}
- case QVariant::Time:
- Q_ASSERT_X(arg1.type() == QVariant::Time, "QAbstractSpinBoxPrivate::variantCompare",
+ case QMetaType::QTime:
+ Q_ASSERT_X(arg1.userType() == QMetaType::QTime, "QAbstractSpinBoxPrivate::variantCompare",
qPrintable(QString::fromLatin1("Internal error 2 (%1)").
arg(QString::fromLatin1(arg1.typeName()))));
if (arg1.toTime() == arg2.toTime()) {
@@ -2169,7 +2169,7 @@ int QAbstractSpinBoxPrivate::variantCompare(const QVariant &arg1, const QVariant
}
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
if (arg1.toDateTime() == arg2.toDateTime()) {
return 0;
} else if (arg1.toDateTime() < arg2.toDateTime()) {
@@ -2177,7 +2177,7 @@ int QAbstractSpinBoxPrivate::variantCompare(const QVariant &arg1, const QVariant
} else {
return 1;
}
- case QVariant::Int:
+ case QMetaType::Int:
if (arg1.toInt() == arg2.toInt()) {
return 0;
} else if (arg1.toInt() < arg2.toInt()) {
@@ -2185,7 +2185,7 @@ int QAbstractSpinBoxPrivate::variantCompare(const QVariant &arg1, const QVariant
} else {
return 1;
}
- case QVariant::Double:
+ case QMetaType::Double:
if (arg1.toDouble() == arg2.toDouble()) {
return 0;
} else if (arg1.toDouble() < arg2.toDouble()) {
@@ -2193,8 +2193,8 @@ int QAbstractSpinBoxPrivate::variantCompare(const QVariant &arg1, const QVariant
} else {
return 1;
}
- case QVariant::Invalid:
- if (arg2.type() == QVariant::Invalid)
+ case QMetaType::UnknownType:
+ if (arg2.userType() == QMetaType::UnknownType)
return 0;
Q_FALLTHROUGH();
default:
diff --git a/src/widgets/widgets/qabstractspinbox_p.h b/src/widgets/widgets/qabstractspinbox_p.h
index ad169fde19..63b19c7317 100644
--- a/src/widgets/widgets/qabstractspinbox_p.h
+++ b/src/widgets/widgets/qabstractspinbox_p.h
@@ -127,7 +127,7 @@ public:
QLineEdit *edit;
QString prefix, suffix, specialValueText;
QVariant value, minimum, maximum, singleStep;
- QVariant::Type type;
+ QMetaType::Type type;
int spinClickTimerId, spinClickTimerInterval, spinClickThresholdTimerId, spinClickThresholdTimerInterval;
int effectiveSpinRepeatRate;
uint buttonState;
diff --git a/src/widgets/widgets/qbuttongroup.cpp b/src/widgets/widgets/qbuttongroup.cpp
index 669faa92c7..9162029cdb 100644
--- a/src/widgets/widgets/qbuttongroup.cpp
+++ b/src/widgets/widgets/qbuttongroup.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
void QButtonGroupPrivate::detectCheckedButton()
{
QAbstractButton *previous = checkedButton;
- checkedButton = 0;
+ checkedButton = nullptr;
if (exclusive)
return;
for (int i = 0; i < buttonList.count(); i++) {
@@ -119,7 +119,7 @@ QButtonGroup::~QButtonGroup()
{
Q_D(QButtonGroup);
for (int i = 0; i < d->buttonList.count(); ++i)
- d->buttonList.at(i)->d_func()->group = 0;
+ d->buttonList.at(i)->d_func()->group = nullptr;
}
/*!
@@ -164,6 +164,7 @@ void QButtonGroup::setExclusive(bool exclusive)
/*!
\fn void QButtonGroup::buttonClicked(int id)
+ \obsolete
This signal is emitted when a button with the given \a id is
clicked.
@@ -183,6 +184,7 @@ void QButtonGroup::setExclusive(bool exclusive)
/*!
\fn void QButtonGroup::buttonPressed(int id)
\since 4.2
+ \obsolete
This signal is emitted when a button with the given \a id is
pressed down.
@@ -202,6 +204,7 @@ void QButtonGroup::setExclusive(bool exclusive)
/*!
\fn void QButtonGroup::buttonReleased(int id)
\since 4.2
+ \obsolete
This signal is emitted when a button with the given \a id is
released.
@@ -222,6 +225,7 @@ void QButtonGroup::setExclusive(bool exclusive)
/*!
\fn void QButtonGroup::buttonToggled(int id, bool checked)
\since 5.2
+ \obsolete
This signal is emitted when a button with the given \a id is toggled.
\a checked is true if the button is checked, or false if the button is unchecked.
@@ -273,7 +277,7 @@ void QButtonGroup::removeButton(QAbstractButton *button)
d->detectCheckedButton();
}
if (button->d_func()->group == this) {
- button->d_func()->group = 0;
+ button->d_func()->group = nullptr;
d->buttonList.removeAll(button);
d->mapping.remove(button);
}
diff --git a/src/widgets/widgets/qbuttongroup.h b/src/widgets/widgets/qbuttongroup.h
index fec94ccb3e..2989dcb4ba 100644
--- a/src/widgets/widgets/qbuttongroup.h
+++ b/src/widgets/widgets/qbuttongroup.h
@@ -78,13 +78,19 @@ public:
Q_SIGNALS:
void buttonClicked(QAbstractButton *);
- void buttonClicked(int);
void buttonPressed(QAbstractButton *);
- void buttonPressed(int);
void buttonReleased(QAbstractButton *);
- void buttonReleased(int);
void buttonToggled(QAbstractButton *, bool);
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonClicked(QAbstractButton *) instead")
+ void buttonClicked(int);
+ QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonPressed(QAbstractButton *) instead")
+ void buttonPressed(int);
+ QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonReleased(QAbstractButton *) instead")
+ void buttonReleased(int);
+ QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonToggled(QAbstractButton *, bool) instead")
void buttonToggled(int, bool);
+#endif
private:
Q_DISABLE_COPY(QButtonGroup)
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp
index 8593001f8b..fe1133c6c7 100644
--- a/src/widgets/widgets/qcalendarwidget.cpp
+++ b/src/widgets/widgets/qcalendarwidget.cpp
@@ -559,7 +559,7 @@ void QCalendarDateValidator::setFormat(const QString &format)
separator += nextChar;
quoting = false;
} else {
- QCalendarDateSectionValidator *validator = 0;
+ QCalendarDateSectionValidator *validator = nullptr;
if (nextChar == QLatin1Char('d')) {
offset = qMin(4, countRepeat(format, pos));
validator = &m_dayValidator;
@@ -640,9 +640,9 @@ class QCalendarTextNavigator: public QObject
{
Q_OBJECT
public:
- QCalendarTextNavigator(QObject *parent = 0)
- : QObject(parent), m_dateText(0), m_dateFrame(0), m_dateValidator(0),
- m_widget(0), m_editDelay(1500), m_date(QDate::currentDate()) {}
+ QCalendarTextNavigator(QObject *parent = nullptr)
+ : QObject(parent), m_dateText(nullptr), m_dateFrame(nullptr), m_dateValidator(nullptr),
+ m_widget(nullptr), m_editDelay(1500), m_date(QDate::currentDate()) {}
QWidget *widget() const;
void setWidget(QWidget *widget);
@@ -752,9 +752,9 @@ void QCalendarTextNavigator::removeDateLabel()
m_dateFrame->hide();
m_dateFrame->deleteLater();
delete m_dateValidator;
- m_dateFrame = 0;
- m_dateText = 0;
- m_dateValidator = 0;
+ m_dateFrame = nullptr;
+ m_dateText = nullptr;
+ m_dateValidator = nullptr;
}
bool QCalendarTextNavigator::eventFilter(QObject *o, QEvent *e)
@@ -858,7 +858,7 @@ class QCalendarModel : public QAbstractTableModel
{
Q_OBJECT
public:
- QCalendarModel(QObject *parent = 0);
+ QCalendarModel(QObject *parent = nullptr);
int rowCount(const QModelIndex &) const override
{ return RowCount + m_firstRow; }
@@ -951,7 +951,7 @@ class QCalendarView : public QTableView
{
Q_OBJECT
public:
- QCalendarView(QWidget *parent = 0);
+ QCalendarView(QWidget *parent = nullptr);
void internalUpdate() { updateGeometries(); }
void setReadOnly(bool enable);
@@ -1207,9 +1207,9 @@ Qt::ItemFlags QCalendarModel::flags(const QModelIndex &index) const
if (!date.isValid())
return QAbstractTableModel::flags(index);
if (date < m_minimumDate)
- return 0;
+ return { };
if (date > m_maximumDate)
- return 0;
+ return { };
return QAbstractTableModel::flags(index);
}
@@ -1599,7 +1599,7 @@ class QCalendarDelegate : public QItemDelegate
{
Q_OBJECT
public:
- QCalendarDelegate(QCalendarWidgetPrivate *w, QObject *parent = 0)
+ QCalendarDelegate(QCalendarWidgetPrivate *w, QObject *parent = nullptr)
: QItemDelegate(parent), calendarWidgetPrivate(w)
{ }
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option,
@@ -1734,11 +1734,11 @@ void QCalendarDelegate::paintCell(QPainter *painter, const QRect &rect, QDate da
QCalendarWidgetPrivate::QCalendarWidgetPrivate()
: QWidgetPrivate()
{
- m_model = 0;
- m_view = 0;
- m_delegate = 0;
- m_selection = 0;
- m_navigator = 0;
+ m_model = nullptr;
+ m_view = nullptr;
+ m_delegate = nullptr;
+ m_selection = nullptr;
+ m_navigator = nullptr;
m_dateEditEnabled = false;
navBarVisible = true;
oldFocusPolicy = Qt::StrongFocus;
@@ -1748,7 +1748,7 @@ void QCalendarWidgetPrivate::setNavigatorEnabled(bool enable)
{
Q_Q(QCalendarWidget);
- bool navigatorEnabled = (m_navigator->widget() != 0);
+ bool navigatorEnabled = (m_navigator->widget() != nullptr);
if (enable == navigatorEnabled)
return;
@@ -1760,7 +1760,7 @@ void QCalendarWidgetPrivate::setNavigatorEnabled(bool enable)
q, SLOT(_q_editingFinished()));
m_view->installEventFilter(m_navigator);
} else {
- m_navigator->setWidget(0);
+ m_navigator->setWidget(nullptr);
q->disconnect(m_navigator, SIGNAL(dateChanged(QDate)),
q, SLOT(_q_slotChangeDate(QDate)));
q->disconnect(m_navigator, SIGNAL(editingFinished()),
@@ -1847,8 +1847,8 @@ void QCalendarWidgetPrivate::createNavigationBar(QWidget *widget)
void QCalendarWidgetPrivate::updateButtonIcons()
{
Q_Q(QCalendarWidget);
- prevMonth->setIcon(q->style()->standardIcon(q->isRightToLeft() ? QStyle::SP_ArrowRight : QStyle::SP_ArrowLeft, 0, q));
- nextMonth->setIcon(q->style()->standardIcon(q->isRightToLeft() ? QStyle::SP_ArrowLeft : QStyle::SP_ArrowRight, 0, q));
+ prevMonth->setIcon(q->style()->standardIcon(q->isRightToLeft() ? QStyle::SP_ArrowRight : QStyle::SP_ArrowLeft, nullptr, q));
+ nextMonth->setIcon(q->style()->standardIcon(q->isRightToLeft() ? QStyle::SP_ArrowLeft : QStyle::SP_ArrowRight, nullptr, q));
}
void QCalendarWidgetPrivate::updateMonthMenu()
@@ -2135,7 +2135,7 @@ void QCalendarWidgetPrivate::_q_editingFinished()
\sa setCurrentPage()
*/
QCalendarWidget::QCalendarWidget(QWidget *parent)
- : QWidget(*new QCalendarWidgetPrivate, parent, 0)
+ : QWidget(*new QCalendarWidgetPrivate, parent, { })
{
Q_D(QCalendarWidget);
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index fdf1a87bba..8c05c6de7a 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -91,30 +91,11 @@ QT_BEGIN_NAMESPACE
QComboBoxPrivate::QComboBoxPrivate()
: QWidgetPrivate(),
- model(0),
- lineEdit(0),
- container(0),
- insertPolicy(QComboBox::InsertAtBottom),
- sizeAdjustPolicy(QComboBox::AdjustToContentsOnFirstShow),
- minimumContentsLength(0),
shownOnce(false),
autoCompletion(true),
duplicatesEnabled(false),
frame(true),
- maxVisibleItems(10),
- maxCount(INT_MAX),
- modelColumn(0),
- inserting(false),
- arrowState(QStyle::State_None),
- hoverControl(QStyle::SC_None),
- autoCompletionCaseSensitivity(Qt::CaseInsensitive),
- indexBeforeChange(-1)
-#ifdef Q_OS_MAC
- , m_platformMenu(0)
-#endif
-#if QT_CONFIG(completer)
- , completer(0)
-#endif
+ inserting(false)
{
}
@@ -148,18 +129,26 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt
if (option.state & QStyle::State_Selected)
menuOption.state |= QStyle::State_Selected;
menuOption.checkType = QStyleOptionMenuItem::NonExclusive;
- menuOption.checked = mCombo->currentIndex() == index.row();
+ // a valid checkstate means that the model has checkable items
+ const QVariant checkState = index.data(Qt::CheckStateRole);
+ if (!checkState.isValid()) {
+ menuOption.checked = mCombo->currentIndex() == index.row();
+ } else {
+ menuOption.checked = qvariant_cast<int>(checkState) == Qt::Checked;
+ menuOption.state |= qvariant_cast<int>(checkState) == Qt::Checked
+ ? QStyle::State_On : QStyle::State_Off;
+ }
if (QComboBoxDelegate::isSeparator(index))
menuOption.menuItemType = QStyleOptionMenuItem::Separator;
else
menuOption.menuItemType = QStyleOptionMenuItem::Normal;
QVariant variant = index.model()->data(index, Qt::DecorationRole);
- switch (variant.type()) {
- case QVariant::Icon:
+ switch (variant.userType()) {
+ case QMetaType::QIcon:
menuOption.icon = qvariant_cast<QIcon>(variant);
break;
- case QVariant::Color: {
+ case QMetaType::QColor: {
static QPixmap pixmap(option.decorationSize);
pixmap.fill(qvariant_cast<QColor>(variant));
menuOption.icon = pixmap;
@@ -183,7 +172,7 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt
// that order, also override the font for the popup menu.
QVariant fontRoleData = index.data(Qt::FontRole);
if (fontRoleData.isValid()) {
- menuOption.font = fontRoleData.value<QFont>();
+ menuOption.font = qvariant_cast<QFont>(fontRoleData);
} else if (mCombo->testAttribute(Qt::WA_SetFont)
|| mCombo->testAttribute(Qt::WA_MacSmallSize)
|| mCombo->testAttribute(Qt::WA_MacMiniSize)
@@ -198,6 +187,55 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt
return menuOption;
}
+bool QComboMenuDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
+ const QStyleOptionViewItem &option, const QModelIndex &index)
+{
+ Q_ASSERT(event);
+ Q_ASSERT(model);
+
+ // make sure that the item is checkable
+ Qt::ItemFlags flags = model->flags(index);
+ if (!(flags & Qt::ItemIsUserCheckable) || !(option.state & QStyle::State_Enabled)
+ || !(flags & Qt::ItemIsEnabled))
+ return false;
+
+ // make sure that we have a check state
+ const QVariant checkState = index.data(Qt::CheckStateRole);
+ if (!checkState.isValid())
+ return false;
+
+ // make sure that we have the right event type
+ if ((event->type() == QEvent::MouseButtonRelease)
+ || (event->type() == QEvent::MouseButtonDblClick)
+ || (event->type() == QEvent::MouseButtonPress)) {
+ QMouseEvent *me = static_cast<QMouseEvent*>(event);
+ if (me->button() != Qt::LeftButton)
+ return false;
+
+ if ((event->type() == QEvent::MouseButtonPress)
+ || (event->type() == QEvent::MouseButtonDblClick)) {
+ pressedIndex = index.row();
+ return false;
+ }
+
+ if (index.row() != pressedIndex)
+ return false;
+ pressedIndex = -1;
+
+ } else if (event->type() == QEvent::KeyPress) {
+ if (static_cast<QKeyEvent*>(event)->key() != Qt::Key_Space
+ && static_cast<QKeyEvent*>(event)->key() != Qt::Key_Select)
+ return false;
+ } else {
+ return false;
+ }
+
+ // we don't support user-tristate items in QComboBox (not implemented in any style)
+ Qt::CheckState newState = (static_cast<Qt::CheckState>(checkState.toInt()) == Qt::Checked)
+ ? Qt::Unchecked : Qt::Checked;
+ return model->setData(index, newState, Qt::CheckStateRole);
+}
+
#if QT_CONFIG(completer)
void QComboBoxPrivate::_q_completerActivated(const QModelIndex &index)
{
@@ -255,8 +293,7 @@ void QComboBoxPrivate::_q_modelReset()
lineEdit->setText(QString());
updateLineEditGeometry();
}
- if (currentIndex.row() != indexBeforeChange)
- _q_emitCurrentIndexChanged(currentIndex);
+ trySetValidIndex();
modelChanged();
q->update();
}
@@ -266,6 +303,25 @@ void QComboBoxPrivate::_q_modelDestroyed()
model = QAbstractItemModelPrivate::staticEmptyModel();
}
+void QComboBoxPrivate::trySetValidIndex()
+{
+ Q_Q(QComboBox);
+ bool currentReset = false;
+
+ const int rowCount = q->count();
+ for (int pos = 0; pos < rowCount; ++pos) {
+ const QModelIndex idx(model->index(pos, modelColumn, root));
+ if (idx.flags() & Qt::ItemIsEnabled) {
+ setCurrentIndex(idx);
+ currentReset = true;
+ break;
+ }
+ }
+
+ if (!currentReset)
+ setCurrentIndex(QModelIndex());
+}
+
QRect QComboBoxPrivate::popupGeometry(int screen) const
{
return QStylePrivate::useFullScreenForPopup()
@@ -368,6 +424,8 @@ QSize QComboBoxPrivate::recomputeSizeHint(QSize &sh) const
}
if (minimumContentsLength > 0)
sh.setWidth(qMax(sh.width(), minimumContentsLength * fm.horizontalAdvance(QLatin1Char('X')) + (hasIcon ? iconSize.width() + 4 : 0)));
+ if (!placeholderText.isEmpty())
+ sh.setWidth(qMax(sh.width(), fm.boundingRect(placeholderText).width()));
// height
@@ -445,12 +503,8 @@ void QComboBoxPrivateContainer::paintEvent(QPaintEvent *e)
QFrame::paintEvent(e);
}
-void QComboBoxPrivateContainer::leaveEvent(QEvent *)
-{
-}
-
QComboBoxPrivateContainer::QComboBoxPrivateContainer(QAbstractItemView *itemView, QComboBox *parent)
- : QFrame(parent, Qt::Popup), combo(parent), view(0), top(0), bottom(0), maybeIgnoreMouseButtonRelease(false)
+ : QFrame(parent, Qt::Popup), combo(parent)
{
// we need the combobox and itemview
Q_ASSERT(parent);
@@ -555,7 +609,7 @@ void QComboBoxPrivateContainer::updateScrollers()
*/
void QComboBoxPrivateContainer::viewDestroyed()
{
- view = 0;
+ view = nullptr;
setItemView(new QComboBoxListView());
}
@@ -589,7 +643,7 @@ void QComboBoxPrivateContainer::setItemView(QAbstractItemView *itemView)
if (isAncestorOf(view))
delete view;
- view = 0;
+ view = nullptr;
}
// setup the item view
@@ -905,6 +959,8 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const
changes either through user interaction or programmatically. The
item's \a index is passed or -1 if the combobox becomes empty or the
currentIndex was reset.
+
+ \obsolete Use currentIndexChanged(int index, const QString &text) instead
*/
/*!
@@ -914,6 +970,18 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const
This signal is sent whenever the currentIndex in the combobox
changes either through user interaction or programmatically. The
item's \a text is passed.
+
+ \obsolete Use currentIndexChanged(int index, const QString &text) instead
+*/
+
+/*!
+ \fn void QComboBox::currentIndexChanged(int index, const QString &text)
+ \since 5.15
+
+ This signal is sent whenever the currentIndex in the combobox
+ changes either through user interaction or programmatically. The
+ item's \a index is passed or -1 if the combobox becomes empty or
+ the currentIndex was reset. The item's \a text is also passed.
*/
/*!
@@ -929,7 +997,7 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const
model QStandardItemModel.
*/
QComboBox::QComboBox(QWidget *parent)
- : QWidget(*new QComboBoxPrivate(), parent, 0)
+ : QWidget(*new QComboBoxPrivate(), parent, { })
{
Q_D(QComboBox);
d->init();
@@ -939,7 +1007,7 @@ QComboBox::QComboBox(QWidget *parent)
\internal
*/
QComboBox::QComboBox(QComboBoxPrivate &dd, QWidget *parent)
- : QWidget(dd, parent, 0)
+ : QWidget(dd, parent, { })
{
Q_D(QComboBox);
d->init();
@@ -1110,8 +1178,9 @@ void QComboBoxPrivate::_q_rowsInserted(const QModelIndex &parent, int start, int
q->updateGeometry();
}
- // set current index if combo was previously empty
- if (start == 0 && (end - start + 1) == q->count() && !currentIndex.isValid()) {
+ // set current index if combo was previously empty and there is no placeholderText
+ if (start == 0 && (end - start + 1) == q->count() && !currentIndex.isValid() &&
+ placeholderText.isEmpty()) {
q->setCurrentIndex(0);
// need to emit changed if model updated index "silently"
} else if (currentIndex.row() != indexBeforeChange) {
@@ -1214,10 +1283,9 @@ void QComboBox::initStyleOption(QStyleOptionComboBox *option) const
} else {
option->activeSubControls = d->hoverControl;
}
- if (d->currentIndex.isValid()) {
- option->currentText = currentText();
+ option->currentText = currentText();
+ if (d->currentIndex.isValid())
option->currentIcon = d->itemIcon(d->currentIndex);
- }
option->iconSize = iconSize();
if (d->container && d->container->isVisible())
option->state |= QStyle::State_On;
@@ -1398,13 +1466,14 @@ void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index)
{
Q_Q(QComboBox);
const QString text = itemText(index);
- emit q->currentIndexChanged(index.row());
-#if QT_DEPRECATED_SINCE(5, 13)
+#if QT_DEPRECATED_SINCE(5, 15)
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
+ emit q->currentIndexChanged(index.row());
emit q->currentIndexChanged(text);
QT_WARNING_POP
#endif
+ emit q->currentIndexChanged(index.row(), text);
// signal lineEdit.textChanged already connected to signal currentTextChanged, so don't emit double here
if (!lineEdit)
emit q->currentTextChanged(text);
@@ -1566,7 +1635,7 @@ void QComboBox::setAutoCompletion(bool enable)
d->lineEdit->setCompleter(d->completer);
d->completer->setWidget(this);
} else {
- d->lineEdit->setCompleter(0);
+ d->lineEdit->setCompleter(nullptr);
}
}
@@ -1755,7 +1824,7 @@ QSize QComboBox::iconSize() const
if (d->iconSize.isValid())
return d->iconSize;
- int iconWidth = style()->pixelMetric(QStyle::PM_SmallIconSize, 0, this);
+ int iconWidth = style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, this);
return QSize(iconWidth, iconWidth);
}
@@ -1772,6 +1841,45 @@ void QComboBox::setIconSize(const QSize &size)
}
/*!
+ \property QComboBox::placeholderText
+ \brief Sets a \a placeholderText text shown when no valid index is set
+
+ The \a placeholderText will be shown when an invalid index is set. The
+ text is not accessible in the dropdown list. When this function is called
+ before items are added the placeholder text will be shown, otherwise you
+ have to call setCurrentIndex(-1) programmatically if you want to show the
+ placeholder text.
+ Set an empty placeholder text to reset the setting.
+
+ When the QComboBox is editable, use QLineEdit::setPlaceholderText()
+ instead.
+
+ \since 5.15
+*/
+void QComboBox::setPlaceholderText(const QString &placeholderText)
+{
+ Q_D(QComboBox);
+ if (placeholderText == d->placeholderText)
+ return;
+
+ d->placeholderText = placeholderText;
+ if (currentIndex() == -1) {
+ if (d->placeholderText.isEmpty() && currentIndex() == -1)
+ setCurrentIndex(0);
+ else
+ update();
+ } else {
+ updateGeometry();
+ }
+}
+
+QString QComboBox::placeholderText() const
+{
+ Q_D(const QComboBox);
+ return d->placeholderText;
+}
+
+/*!
\property QComboBox::editable
\brief whether the combo box can be edited by the user
@@ -1786,7 +1894,7 @@ void QComboBox::setIconSize(const QSize &size)
bool QComboBox::isEditable() const
{
Q_D(const QComboBox);
- return d->lineEdit != 0;
+ return d->lineEdit != nullptr;
}
/*! \internal
@@ -1813,7 +1921,7 @@ void QComboBoxPrivate::updateDelegate(bool force)
QIcon QComboBoxPrivate::itemIcon(const QModelIndex &index) const
{
QVariant decoration = model->data(index, Qt::DecorationRole);
- if (decoration.type() == QVariant::Pixmap)
+ if (decoration.userType() == QMetaType::QPixmap)
return QIcon(qvariant_cast<QPixmap>(decoration));
else
return qvariant_cast<QIcon>(decoration);
@@ -1842,7 +1950,7 @@ void QComboBox::setEditable(bool editable)
setAttribute(Qt::WA_InputMethodEnabled, false);
d->lineEdit->hide();
d->lineEdit->deleteLater();
- d->lineEdit = 0;
+ d->lineEdit = nullptr;
}
d->updateDelegate();
@@ -1891,6 +1999,8 @@ void QComboBox::setLineEdit(QLineEdit *edit)
d->lineEdit->setFocusProxy(this);
d->lineEdit->setAttribute(Qt::WA_MacShowFocusRect, false);
#if QT_DEPRECATED_SINCE(5, 13)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
#if QT_CONFIG(completer)
setAutoCompletion(d->autoCompletion);
@@ -1907,6 +2017,7 @@ void QComboBox::setLineEdit(QLineEdit *edit)
}
#endif
#endif
+QT_WARNING_POP
#endif
setAttribute(Qt::WA_InputMethodEnabled);
@@ -1955,7 +2066,7 @@ void QComboBox::setValidator(const QValidator *v)
const QValidator *QComboBox::validator() const
{
Q_D(const QComboBox);
- return d->lineEdit ? d->lineEdit->validator() : 0;
+ return d->lineEdit ? d->lineEdit->validator() : nullptr;
}
#endif // QT_NO_VALIDATOR
@@ -1966,7 +2077,7 @@ const QValidator *QComboBox::validator() const
\since 4.2
Sets the \a completer to use instead of the current completer.
- If \a completer is 0, auto completion is disabled.
+ If \a completer is \nullptr, auto completion is disabled.
By default, for an editable combo box, a QCompleter that
performs case insensitive inline completion is automatically created.
@@ -1999,7 +2110,7 @@ void QComboBox::setCompleter(QCompleter *c)
QCompleter *QComboBox::completer() const
{
Q_D(const QComboBox);
- return d->lineEdit ? d->lineEdit->completer() : 0;
+ return d->lineEdit ? d->lineEdit->completer() : nullptr;
}
#endif // QT_CONFIG(completer)
@@ -2122,20 +2233,7 @@ void QComboBox::setModel(QAbstractItemModel *model)
setRootModelIndex(QModelIndex());
- bool currentReset = false;
-
- const int rowCount = count();
- for (int pos=0; pos < rowCount; pos++) {
- if (d->model->index(pos, d->modelColumn, d->root).flags() & Qt::ItemIsEnabled) {
- setCurrentIndex(pos);
- currentReset = true;
- break;
- }
- }
-
- if (!currentReset)
- setCurrentIndex(-1);
-
+ d->trySetValidIndex();
d->modelChanged();
}
@@ -2249,7 +2347,7 @@ QString QComboBox::currentText() const
else if (d->currentIndex.isValid())
return d->itemText(d->currentIndex);
else
- return QString();
+ return d->placeholderText;
}
/*!
@@ -2886,7 +2984,7 @@ void QComboBox::hidePopup()
QSignalBlocker containerBlocker(d->container);
// Flash selected/triggered item (if any).
if (style()->styleHint(QStyle::SH_Menu_FlashTriggeredItem)) {
- QItemSelectionModel *selectionModel = view() ? view()->selectionModel() : 0;
+ QItemSelectionModel *selectionModel = view() ? view()->selectionModel() : nullptr;
if (selectionModel && selectionModel->hasSelection()) {
QEventLoop eventLoop;
const QItemSelection selection = selectionModel->selection();
@@ -3081,6 +3179,9 @@ void QComboBox::paintEvent(QPaintEvent *)
initStyleOption(&opt);
painter.drawComplexControl(QStyle::CC_ComboBox, opt);
+ if (currentIndex() < 0)
+ opt.palette.setBrush(QPalette::ButtonText, opt.palette.brush(QPalette::ButtonText).color().lighter());
+
// draw the icon and text
painter.drawControl(QStyle::CE_ComboBoxLabel, opt);
}
diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h
index 286772c091..1f6e2fcdb3 100644
--- a/src/widgets/widgets/qcombobox.h
+++ b/src/widgets/widgets/qcombobox.h
@@ -71,6 +71,7 @@ class Q_WIDGETS_EXPORT QComboBox : public QWidget
Q_PROPERTY(SizeAdjustPolicy sizeAdjustPolicy READ sizeAdjustPolicy WRITE setSizeAdjustPolicy)
Q_PROPERTY(int minimumContentsLength READ minimumContentsLength WRITE setMinimumContentsLength)
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
+ Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText)
#if QT_CONFIG(completer)
#if QT_DEPRECATED_SINCE(5, 13)
@@ -148,6 +149,9 @@ public:
QSize iconSize() const;
void setIconSize(const QSize &size);
+ void setPlaceholderText(const QString &placeholderText);
+ QString placeholderText() const;
+
bool isEditable() const;
void setEditable(bool editable);
void setLineEdit(QLineEdit *edit);
@@ -226,8 +230,13 @@ Q_SIGNALS:
void textActivated(const QString &);
void highlighted(int index);
void textHighlighted(const QString &);
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X_5_15("Use currentIndexChanged(int, const QString &) instead")
void currentIndexChanged(int index);
+ QT_DEPRECATED_VERSION_X_5_15("Use currentIndexChanged(int, const QString &) instead")
void currentIndexChanged(const QString &);
+#endif
+ void currentIndexChanged(int index, const QString &text);
void currentTextChanged(const QString &);
#if QT_DEPRECATED_SINCE(5, 15)
QT_DEPRECATED_VERSION_X(5, 15, "Use textActivated() instead")
diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h
index 5967776a61..3e78e756a6 100644
--- a/src/widgets/widgets/qcombobox_p.h
+++ b/src/widgets/widgets/qcombobox_p.h
@@ -79,7 +79,6 @@ QT_REQUIRE_CONFIG(combobox);
QT_BEGIN_NAMESPACE
-class QAction;
class QPlatformMenu;
class QComboBoxListView : public QListView
@@ -131,9 +130,6 @@ private:
QComboBox *combo;
};
-
-class QStandardItemModel;
-
class Q_AUTOTEST_EXPORT QComboBoxPrivateScroller : public QWidget
{
Q_OBJECT
@@ -212,7 +208,7 @@ Q_SIGNALS:
private:
QAbstractSlider::SliderAction sliderAction;
QBasicTimer timer;
- bool fast;
+ bool fast = false;
};
class Q_WIDGETS_EXPORT QComboBoxPrivateContainer : public QFrame
@@ -246,7 +242,6 @@ protected:
void showEvent(QShowEvent *e) override;
void hideEvent(QHideEvent *e) override;
void timerEvent(QTimerEvent *timerEvent) override;
- void leaveEvent(QEvent *e) override;
void resizeEvent(QResizeEvent *e) override;
void paintEvent(QPaintEvent *e) override;
QStyleOptionComboBox comboStyleOption() const;
@@ -257,20 +252,23 @@ Q_SIGNALS:
private:
QComboBox *combo;
- QAbstractItemView *view;
- QComboBoxPrivateScroller *top;
- QComboBoxPrivateScroller *bottom;
- bool maybeIgnoreMouseButtonRelease;
+ QAbstractItemView *view = nullptr;
+ QComboBoxPrivateScroller *top = nullptr;
+ QComboBoxPrivateScroller *bottom = nullptr;
QElapsedTimer popupTimer;
+ bool maybeIgnoreMouseButtonRelease = false;
friend class QComboBox;
friend class QComboBoxPrivate;
};
class Q_AUTOTEST_EXPORT QComboMenuDelegate : public QAbstractItemDelegate
-{ Q_OBJECT
+{
+ Q_OBJECT
public:
- QComboMenuDelegate(QObject *parent, QComboBox *cmb) : QAbstractItemDelegate(parent), mCombo(cmb) {}
+ QComboMenuDelegate(QObject *parent, QComboBox *cmb)
+ : QAbstractItemDelegate(parent), mCombo(cmb), pressedIndex(-1)
+ {}
protected:
void paint(QPainter *painter,
@@ -286,11 +284,14 @@ protected:
return mCombo->style()->sizeFromContents(
QStyle::CT_MenuItem, &opt, option.rect.size(), mCombo);
}
+ bool editorEvent(QEvent *event, QAbstractItemModel *model,
+ const QStyleOptionViewItem &option, const QModelIndex &index) override;
private:
QStyleOptionMenuItem getStyleOption(const QStyleOptionViewItem &option,
const QModelIndex &index) const;
QComboBox *mCombo;
+ int pressedIndex;
};
// ### Qt6: QStyledItemDelegate ?
@@ -355,8 +356,8 @@ public:
void _q_complete();
void _q_itemSelected(const QModelIndex &item);
bool contains(const QString &text, int role);
- void emitActivated(const QModelIndex&);
- void _q_emitHighlighted(const QModelIndex&);
+ void emitActivated(const QModelIndex &index);
+ void _q_emitHighlighted(const QModelIndex &index);
void _q_emitCurrentIndexChanged(const QModelIndex &index);
void _q_modelDestroyed();
void _q_modelReset();
@@ -366,10 +367,11 @@ public:
void _q_resetButton();
void _q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
void _q_updateIndexBeforeChange();
- void _q_rowsInserted(const QModelIndex & parent, int start, int end);
- void _q_rowsRemoved(const QModelIndex & parent, int start, int end);
+ void _q_rowsInserted(const QModelIndex &parent, int start, int end);
+ void _q_rowsRemoved(const QModelIndex &parent, int start, int end);
void updateArrow(QStyle::StateFlag state);
bool updateHoverControl(const QPoint &pos);
+ void trySetValidIndex();
QRect popupGeometry(int screen = -1) const;
QStyle::SubControl newHoverControl(const QPoint &pos);
int computeWidthHint() const;
@@ -402,39 +404,38 @@ public:
};
#endif
- QAbstractItemModel *model;
- QLineEdit *lineEdit;
- QComboBoxPrivateContainer *container;
- QComboBox::InsertPolicy insertPolicy;
- QComboBox::SizeAdjustPolicy sizeAdjustPolicy;
- int minimumContentsLength;
- QSize iconSize;
- uint shownOnce : 1;
- uint autoCompletion : 1;
- uint duplicatesEnabled : 1;
- uint frame : 1;
- uint padding : 26;
- int maxVisibleItems;
- int maxCount;
- int modelColumn;
- bool inserting;
- mutable QSize minimumSizeHint;
- mutable QSize sizeHint;
- QStyle::StateFlag arrowState;
- QStyle::SubControl hoverControl;
- QRect hoverRect;
- QPersistentModelIndex currentIndex;
- QPersistentModelIndex root;
- Qt::CaseSensitivity autoCompletionCaseSensitivity;
- int indexBeforeChange;
+ QAbstractItemModel *model = nullptr;
+ QLineEdit *lineEdit = nullptr;
+ QComboBoxPrivateContainer *container = nullptr;
#ifdef Q_OS_MAC
- QPlatformMenu *m_platformMenu;
+ QPlatformMenu *m_platformMenu = nullptr;
#endif
#if QT_CONFIG(completer)
QPointer<QCompleter> completer;
#endif
- static QPalette viewContainerPalette(QComboBox *cmb)
- { return cmb->d_func()->viewContainer()->palette(); }
+ QPersistentModelIndex currentIndex;
+ QPersistentModelIndex root;
+ QString placeholderText;
+ QRect hoverRect;
+ QSize iconSize;
+ mutable QSize minimumSizeHint;
+ mutable QSize sizeHint;
+ QComboBox::InsertPolicy insertPolicy = QComboBox::InsertAtBottom;
+ QComboBox::SizeAdjustPolicy sizeAdjustPolicy = QComboBox::AdjustToContentsOnFirstShow;
+ QStyle::StateFlag arrowState = QStyle::State_None;
+ QStyle::SubControl hoverControl = QStyle::SC_None;
+ Qt::CaseSensitivity autoCompletionCaseSensitivity = Qt::CaseInsensitive;
+ int minimumContentsLength = 0;
+ int indexBeforeChange = -1;
+ int maxVisibleItems = 10;
+ int maxCount = std::numeric_limits<int>::max();
+ int modelColumn = 0;
+ int placeholderIndex = -1;
+ bool shownOnce : 1;
+ bool autoCompletion : 1;
+ bool duplicatesEnabled : 1;
+ bool frame : 1;
+ bool inserting : 1;
};
QT_END_NAMESPACE
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index 64795d7ccb..63d5ae268e 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -195,11 +195,19 @@ QDateTimeEdit::QDateTimeEdit(const QTime &time, QWidget *parent)
d->init(time.isValid() ? time : QDATETIMEEDIT_TIME_MIN);
}
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
/*!
\internal
*/
-
QDateTimeEdit::QDateTimeEdit(const QVariant &var, QVariant::Type parserType, QWidget *parent)
+ : QDateTimeEdit(var, QMetaType::Type(parserType), parent)
+{ }
+/*!
+ \internal
+*/
+#endif
+
+QDateTimeEdit::QDateTimeEdit(const QVariant &var, QMetaType::Type parserType, QWidget *parent)
: QAbstractSpinBox(*new QDateTimeEditPrivate, parent)
{
Q_D(QDateTimeEdit);
@@ -794,7 +802,7 @@ QCalendarWidget *QDateTimeEdit::calendarWidget() const
{
Q_D(const QDateTimeEdit);
if (!d->calendarPopup || !(d->sections & QDateTimeParser::DateSectionMask))
- return 0;
+ return nullptr;
if (!d->monthCalendar) {
const_cast<QDateTimeEditPrivate*>(d)->initCalendarPopup();
}
@@ -1251,7 +1259,7 @@ void QDateTimeEdit::focusInEvent(QFocusEvent *event)
{
Q_D(QDateTimeEdit);
QAbstractSpinBox::focusInEvent(event);
- QString *frm = 0;
+ QString *frm = nullptr;
const int oldPos = d->edit->cursorPosition();
if (!d->formatExplicitlySet) {
if (d->displayFormat == d->defaultTimeFormat) {
@@ -1446,12 +1454,12 @@ QDateTimeEdit::StepEnabled QDateTimeEdit::stepEnabled() const
{
Q_D(const QDateTimeEdit);
if (d->readOnly)
- return StepEnabled(0);
+ return {};
if (d->specialValue()) {
- return (d->minimum == d->maximum ? StepEnabled(0) : StepEnabled(StepUpEnabled));
+ return (d->minimum == d->maximum ? StepEnabled{} : StepEnabled(StepUpEnabled));
}
- QAbstractSpinBox::StepEnabled ret = 0;
+ QAbstractSpinBox::StepEnabled ret = { };
#ifdef QT_KEYPAD_NAVIGATION
if (QApplicationPrivate::keypadNavigationEnabled() && !hasEditFocus()) {
@@ -1486,7 +1494,7 @@ QDateTimeEdit::StepEnabled QDateTimeEdit::stepEnabled() const
switch (d->sectionType(d->currentSectionIndex)) {
case QDateTimeParser::NoSection:
case QDateTimeParser::FirstSection:
- case QDateTimeParser::LastSection: return 0;
+ case QDateTimeParser::LastSection: return { };
default: break;
}
if (d->wrapping)
@@ -1564,7 +1572,7 @@ void QDateTimeEdit::mousePressEvent(QMouseEvent *event)
QTimeEdit::QTimeEdit(QWidget *parent)
- : QDateTimeEdit(QDATETIMEEDIT_TIME_MIN, QVariant::Time, parent)
+ : QDateTimeEdit(QDATETIMEEDIT_TIME_MIN, QMetaType::QTime, parent)
{
connect(this, &QTimeEdit::timeChanged, this, &QTimeEdit::userTimeChanged);
}
@@ -1575,7 +1583,7 @@ QTimeEdit::QTimeEdit(QWidget *parent)
*/
QTimeEdit::QTimeEdit(const QTime &time, QWidget *parent)
- : QDateTimeEdit(time, QVariant::Time, parent)
+ : QDateTimeEdit(time, QMetaType::QTime, parent)
{
connect(this, &QTimeEdit::timeChanged, this, &QTimeEdit::userTimeChanged);
}
@@ -1634,7 +1642,7 @@ QTimeEdit::~QTimeEdit()
*/
QDateEdit::QDateEdit(QWidget *parent)
- : QDateTimeEdit(QDATETIMEEDIT_DATE_INITIAL, QVariant::Date, parent)
+ : QDateTimeEdit(QDATETIMEEDIT_DATE_INITIAL, QMetaType::QDate, parent)
{
connect(this, &QDateEdit::dateChanged, this, &QDateEdit::userDateChanged);
}
@@ -1645,7 +1653,7 @@ QDateEdit::QDateEdit(QWidget *parent)
*/
QDateEdit::QDateEdit(const QDate &date, QWidget *parent)
- : QDateTimeEdit(date, QVariant::Date, parent)
+ : QDateTimeEdit(date, QMetaType::QDate, parent)
{
connect(this, &QDateEdit::dateChanged, this, &QDateEdit::userDateChanged);
}
@@ -1682,24 +1690,23 @@ QDateEdit::~QDateEdit()
QDateTimeEditPrivate::QDateTimeEditPrivate()
- : QDateTimeParser(QVariant::DateTime, QDateTimeParser::DateTimeEdit, QCalendar())
+ : QDateTimeParser(QMetaType::QDateTime, QDateTimeParser::DateTimeEdit, QCalendar())
{
hasHadFocus = false;
formatExplicitlySet = false;
cacheGuard = false;
fixday = true;
- type = QVariant::DateTime;
- sections = 0;
+ type = QMetaType::QDateTime;
+ sections = { };
cachedDay = -1;
currentSectionIndex = FirstSectionIndex;
first.pos = 0;
- sections = 0;
calendarPopup = false;
minimum = QDATETIMEEDIT_COMPAT_DATE_MIN.startOfDay();
maximum = QDATETIMEEDIT_DATE_MAX.endOfDay();
arrowState = QStyle::State_None;
- monthCalendar = 0;
+ monthCalendar = nullptr;
readLocaleSettings();
#ifdef QT_KEYPAD_NAVIGATION
@@ -2286,7 +2293,7 @@ QDateTimeEdit::Section QDateTimeEditPrivate::convertToPublic(QDateTimeParser::Se
QDateTimeEdit::Sections QDateTimeEditPrivate::convertSections(QDateTimeParser::Sections s)
{
- QDateTimeEdit::Sections ret = 0;
+ QDateTimeEdit::Sections ret;
if (s & QDateTimeParser::MSecSection)
ret |= QDateTimeEdit::MSecSection;
if (s & QDateTimeParser::SecondSection)
@@ -2431,22 +2438,22 @@ void QDateTimeEdit::initStyleOption(QStyleOptionSpinBox *option) const
void QDateTimeEditPrivate::init(const QVariant &var)
{
Q_Q(QDateTimeEdit);
- switch (var.type()) {
- case QVariant::Date:
+ switch (var.userType()) {
+ case QMetaType::QDate:
value = var.toDate().startOfDay();
updateTimeSpec();
q->setDisplayFormat(defaultDateFormat);
if (sectionNodes.isEmpty()) // ### safeguard for broken locale
q->setDisplayFormat(QLatin1String("dd/MM/yyyy"));
break;
- case QVariant::DateTime:
+ case QMetaType::QDateTime:
value = var;
updateTimeSpec();
q->setDisplayFormat(defaultDateTimeFormat);
if (sectionNodes.isEmpty()) // ### safeguard for broken locale
q->setDisplayFormat(QLatin1String("dd/MM/yyyy hh:mm:ss"));
break;
- case QVariant::Time:
+ case QMetaType::QTime:
value = QDateTime(QDATETIMEEDIT_DATE_INITIAL, var.toTime());
updateTimeSpec();
q->setDisplayFormat(defaultTimeFormat);
@@ -2525,7 +2532,7 @@ void QDateTimeEditPrivate::updateEditFieldGeometry()
QVariant QDateTimeEditPrivate::getZeroVariant() const
{
- Q_ASSERT(type == QVariant::DateTime);
+ Q_ASSERT(type == QMetaType::QDateTime);
return QDateTime(QDATETIMEEDIT_DATE_INITIAL, QTime(), spec);
}
diff --git a/src/widgets/widgets/qdatetimeedit.h b/src/widgets/widgets/qdatetimeedit.h
index 03994675ae..8905ad4a9c 100644
--- a/src/widgets/widgets/qdatetimeedit.h
+++ b/src/widgets/widgets/qdatetimeedit.h
@@ -195,7 +195,10 @@ protected:
void paintEvent(QPaintEvent *event) override;
void initStyleOption(QStyleOptionSpinBox *option) const;
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QDateTimeEdit(const QVariant &val, QVariant::Type parserType, QWidget *parent = nullptr);
+#endif
+ QDateTimeEdit(const QVariant &val, QMetaType::Type parserType, QWidget *parent = nullptr);
private:
Q_DECLARE_PRIVATE(QDateTimeEdit)
Q_DISABLE_COPY(QDateTimeEdit)
diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp
index 7dba6df15c..28c4f59d0d 100644
--- a/src/widgets/widgets/qdialogbuttonbox.cpp
+++ b/src/widgets/widgets/qdialogbuttonbox.cpp
@@ -178,15 +178,15 @@ public:
};
QDialogButtonBoxPrivate::QDialogButtonBoxPrivate(Qt::Orientation orient)
- : orientation(orient), buttonLayout(0), internalRemove(false), center(false)
+ : orientation(orient), buttonLayout(nullptr), internalRemove(false), center(false)
{
}
void QDialogButtonBoxPrivate::initLayout()
{
Q_Q(QDialogButtonBox);
- layoutPolicy = QDialogButtonBox::ButtonLayout(q->style()->styleHint(QStyle::SH_DialogButtonLayout, 0, q));
- bool createNewLayout = buttonLayout == 0
+ layoutPolicy = QDialogButtonBox::ButtonLayout(q->style()->styleHint(QStyle::SH_DialogButtonLayout, nullptr, q));
+ bool createNewLayout = buttonLayout == nullptr
|| (orientation == Qt::Horizontal && qobject_cast<QVBoxLayout *>(buttonLayout) != 0)
|| (orientation == Qt::Vertical && qobject_cast<QHBoxLayout *>(buttonLayout) != 0);
if (createNewLayout) {
@@ -329,8 +329,8 @@ void QDialogButtonBoxPrivate::layoutButtons()
++currentLayout;
}
- QWidget *lastWidget = 0;
- q->setFocusProxy(0);
+ QWidget *lastWidget = nullptr;
+ q->setFocusProxy(nullptr);
for (int i = 0; i < buttonLayout->count(); ++i) {
QLayoutItem *item = buttonLayout->itemAt(i);
if (QWidget *widget = item->widget()) {
@@ -408,13 +408,13 @@ QPushButton *QDialogButtonBoxPrivate::createButton(QDialogButtonBox::StandardBut
icon = QStyle::SP_RestoreDefaultsButton;
break;
case QDialogButtonBox::NoButton:
- return 0;
+ return nullptr;
;
}
QPushButton *button = new QPushButton(QGuiApplicationPrivate::platformTheme()->standardButtonText(sbutton), q);
QStyle *style = q->style();
- if (style->styleHint(QStyle::SH_DialogButtonBox_ButtonsHaveIcons, 0, q) && icon != 0)
- button->setIcon(style->standardIcon(QStyle::StandardPixmap(icon), 0, q));
+ if (style->styleHint(QStyle::SH_DialogButtonBox_ButtonsHaveIcons, nullptr, q) && icon != 0)
+ button->setIcon(style->standardIcon(QStyle::StandardPixmap(icon), nullptr, q));
if (style != QApplication::style()) // Propagate style
button->setStyle(style);
standardButtonHash.insert(button, sbutton);
@@ -482,7 +482,7 @@ QDialogButtonBox::QDialogButtonBox(QWidget *parent)
\sa orientation, addButton()
*/
QDialogButtonBox::QDialogButtonBox(Qt::Orientation orientation, QWidget *parent)
- : QWidget(*new QDialogButtonBoxPrivate(orientation), parent, 0)
+ : QWidget(*new QDialogButtonBoxPrivate(orientation), parent, { })
{
d_func()->initLayout();
}
@@ -699,7 +699,7 @@ QList<QAbstractButton *> QDialogButtonBox::buttons() const
/*!
Returns the button role for the specified \a button. This function returns
- \l InvalidRole if \a button is 0 or has not been added to the button box.
+ \l InvalidRole if \a button is \nullptr or has not been added to the button box.
\sa buttons(), addButton()
*/
@@ -744,7 +744,7 @@ void QDialogButtonBox::removeButton(QAbstractButton *button)
}
}
if (!d->internalRemove)
- button->setParent(0);
+ button->setParent(nullptr);
}
/*!
@@ -782,7 +782,7 @@ QPushButton *QDialogButtonBox::addButton(const QString &text, ButtonRole role)
Q_D(QDialogButtonBox);
if (Q_UNLIKELY(role <= InvalidRole || role >= NRoles)) {
qWarning("QDialogButtonBox::addButton: Invalid ButtonRole, button not added");
- return 0;
+ return nullptr;
}
QPushButton *button = new QPushButton(text, this);
d->addButton(button, role);
@@ -964,7 +964,7 @@ bool QDialogButtonBox::event(QEvent *event)
QList<QAbstractButton *> acceptRoleList = d->buttonLists[AcceptRole];
QPushButton *firstAcceptButton = acceptRoleList.isEmpty() ? 0 : qobject_cast<QPushButton *>(acceptRoleList.at(0));
bool hasDefault = false;
- QWidget *dialog = 0;
+ QWidget *dialog = nullptr;
QWidget *p = this;
while (p && !p->isWindow()) {
p = p->parentWidget();
diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp
index 5900326087..87f4519dd6 100644
--- a/src/widgets/widgets/qdockarealayout.cpp
+++ b/src/widgets/widgets/qdockarealayout.cpp
@@ -85,27 +85,27 @@ QPlaceHolderItem::QPlaceHolderItem(QWidget *w)
*/
QDockAreaLayoutItem::QDockAreaLayoutItem(QLayoutItem *_widgetItem)
- : widgetItem(_widgetItem), subinfo(0), placeHolderItem(0), pos(0), size(-1), flags(NoFlags)
+ : widgetItem(_widgetItem), subinfo(nullptr), placeHolderItem(nullptr), pos(0), size(-1), flags(NoFlags)
{
}
QDockAreaLayoutItem::QDockAreaLayoutItem(QDockAreaLayoutInfo *_subinfo)
- : widgetItem(0), subinfo(_subinfo), placeHolderItem(0), pos(0), size(-1), flags(NoFlags)
+ : widgetItem(nullptr), subinfo(_subinfo), placeHolderItem(nullptr), pos(0), size(-1), flags(NoFlags)
{
}
QDockAreaLayoutItem::QDockAreaLayoutItem(QPlaceHolderItem *_placeHolderItem)
- : widgetItem(0), subinfo(0), placeHolderItem(_placeHolderItem), pos(0), size(-1), flags(NoFlags)
+ : widgetItem(nullptr), subinfo(nullptr), placeHolderItem(_placeHolderItem), pos(0), size(-1), flags(NoFlags)
{
}
QDockAreaLayoutItem::QDockAreaLayoutItem(const QDockAreaLayoutItem &other)
- : widgetItem(other.widgetItem), subinfo(0), placeHolderItem(0), pos(other.pos),
+ : widgetItem(other.widgetItem), subinfo(nullptr), placeHolderItem(nullptr), pos(other.pos),
size(other.size), flags(other.flags)
{
- if (other.subinfo != 0)
+ if (other.subinfo != nullptr)
subinfo = new QDockAreaLayoutInfo(*other.subinfo);
- else if (other.placeHolderItem != 0)
+ else if (other.placeHolderItem != nullptr)
placeHolderItem = new QPlaceHolderItem(*other.placeHolderItem);
}
@@ -117,16 +117,16 @@ QDockAreaLayoutItem::~QDockAreaLayoutItem()
bool QDockAreaLayoutItem::skip() const
{
- if (placeHolderItem != 0)
+ if (placeHolderItem != nullptr)
return true;
if (flags & GapItem)
return false;
- if (widgetItem != 0)
+ if (widgetItem != nullptr)
return widgetItem->isEmpty();
- if (subinfo != 0) {
+ if (subinfo != nullptr) {
for (int i = 0; i < subinfo->item_list.count(); ++i) {
if (!subinfo->item_list.at(i).skip())
return false;
@@ -140,7 +140,7 @@ QSize QDockAreaLayoutItem::minimumSize() const
{
if (widgetItem)
return widgetItem->minimumSize().grownBy(widgetItem->widget()->contentsMargins());
- if (subinfo != 0)
+ if (subinfo != nullptr)
return subinfo->minimumSize();
return QSize(0, 0);
}
@@ -149,7 +149,7 @@ QSize QDockAreaLayoutItem::maximumSize() const
{
if (widgetItem)
return widgetItem->maximumSize().grownBy(widgetItem->widget()->contentsMargins());
- if (subinfo != 0)
+ if (subinfo != nullptr)
return subinfo->maximumSize();
return QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
}
@@ -161,22 +161,22 @@ bool QDockAreaLayoutItem::hasFixedSize(Qt::Orientation o) const
bool QDockAreaLayoutItem::expansive(Qt::Orientation o) const
{
- if ((flags & GapItem) || placeHolderItem != 0)
+ if ((flags & GapItem) || placeHolderItem != nullptr)
return false;
- if (widgetItem != 0)
+ if (widgetItem != nullptr)
return ((widgetItem->expandingDirections() & o) == o);
- if (subinfo != 0)
+ if (subinfo != nullptr)
return subinfo->expansive(o);
return false;
}
QSize QDockAreaLayoutItem::sizeHint() const
{
- if (placeHolderItem != 0)
+ if (placeHolderItem != nullptr)
return QSize(0, 0);
if (widgetItem)
return widgetItem->sizeHint().grownBy(widgetItem->widget()->contentsMargins());
- if (subinfo != 0)
+ if (subinfo != nullptr)
return subinfo->sizeHint();
return QSize(-1, -1);
}
@@ -185,14 +185,14 @@ QDockAreaLayoutItem
&QDockAreaLayoutItem::operator = (const QDockAreaLayoutItem &other)
{
widgetItem = other.widgetItem;
- if (other.subinfo == 0)
- subinfo = 0;
+ if (other.subinfo == nullptr)
+ subinfo = nullptr;
else
subinfo = new QDockAreaLayoutInfo(*other.subinfo);
delete placeHolderItem;
- if (other.placeHolderItem == 0)
- placeHolderItem = 0;
+ if (other.placeHolderItem == nullptr)
+ placeHolderItem = nullptr;
else
placeHolderItem = new QPlaceHolderItem(*other.placeHolderItem);
@@ -210,7 +210,7 @@ QDockAreaLayoutItem
#if QT_CONFIG(tabbar)
static quintptr tabId(const QDockAreaLayoutItem &item)
{
- if (item.widgetItem == 0)
+ if (item.widgetItem == nullptr)
return 0;
return reinterpret_cast<quintptr>(item.widgetItem->widget());
}
@@ -219,9 +219,9 @@ static quintptr tabId(const QDockAreaLayoutItem &item)
static const int zero = 0;
QDockAreaLayoutInfo::QDockAreaLayoutInfo()
- : sep(&zero), dockPos(QInternal::LeftDock), o(Qt::Horizontal), mainWindow(0)
+ : sep(&zero), dockPos(QInternal::LeftDock), o(Qt::Horizontal), mainWindow(nullptr)
#if QT_CONFIG(tabbar)
- , tabbed(false), tabBar(0), tabBarShape(QTabBar::RoundedSouth)
+ , tabbed(false), tabBar(nullptr), tabBarShape(QTabBar::RoundedSouth)
#endif
{
}
@@ -231,7 +231,7 @@ QDockAreaLayoutInfo::QDockAreaLayoutInfo(const int *_sep, QInternal::DockPositio
QMainWindow *window)
: sep(_sep), dockPos(_dockPos), o(_o), mainWindow(window)
#if QT_CONFIG(tabbar)
- , tabbed(false), tabBar(0), tabBarShape(static_cast<QTabBar::Shape>(tbshape))
+ , tabbed(false), tabBar(nullptr), tabBarShape(static_cast<QTabBar::Shape>(tbshape))
#endif
{
#if !QT_CONFIG(tabbar)
@@ -250,7 +250,7 @@ void QDockAreaLayoutInfo::clear()
rect = QRect();
#if QT_CONFIG(tabbar)
tabbed = false;
- tabBar = 0;
+ tabBar = nullptr;
#endif
}
@@ -403,7 +403,7 @@ QSize QDockAreaLayoutInfo::sizeHint() const
int a = 0, b = 0;
int min_perp = 0;
int max_perp = QWIDGETSIZE_MAX;
- const QDockAreaLayoutItem *previous = 0;
+ const QDockAreaLayoutItem *previous = nullptr;
for (int i = 0; i < item_list.size(); ++i) {
const QDockAreaLayoutItem &item = item_list.at(i);
if (item.skip())
@@ -552,7 +552,7 @@ void QDockAreaLayoutInfo::fitItems()
int max_size = realMaxSize(*this);
int last_index = -1;
- const QDockAreaLayoutItem *previous = 0;
+ const QDockAreaLayoutItem *previous = nullptr;
for (int i = 0; i < item_list.size(); ++i) {
QDockAreaLayoutItem &item = item_list[i];
if (item.skip())
@@ -633,7 +633,7 @@ void QDockAreaLayoutInfo::fitItems()
item.size = ls.size;
item.pos = ls.pos;
- if (item.subinfo != 0) {
+ if (item.subinfo != nullptr) {
item.subinfo->rect = itemRect(i);
item.subinfo->fitItems();
}
@@ -771,7 +771,7 @@ QList<int> QDockAreaLayoutInfo::gapIndex(const QPoint& _pos,
if (item.pos + item.size < pos)
continue;
- if (item.subinfo != 0
+ if (item.subinfo != nullptr
#if QT_CONFIG(tabbar)
&& !item.subinfo->tabbed
#endif
@@ -967,7 +967,7 @@ int QDockAreaLayoutInfo::separatorMove(int index, int delta)
const int separatorSpace = item.hasFixedSize(o) ? 0 : *sep;
item.size = ls.size - separatorSpace;
item.pos = ls.pos;
- if (item.subinfo != 0) {
+ if (item.subinfo != nullptr) {
item.subinfo->rect = itemRect(i);
item.subinfo->fitItems();
}
@@ -979,7 +979,7 @@ int QDockAreaLayoutInfo::separatorMove(int index, int delta)
void QDockAreaLayoutInfo::unnest(int index)
{
QDockAreaLayoutItem &item = item_list[index];
- if (item.subinfo == 0)
+ if (item.subinfo == nullptr)
return;
if (item.subinfo->item_list.count() > 1)
return;
@@ -988,14 +988,14 @@ void QDockAreaLayoutInfo::unnest(int index)
item_list.removeAt(index);
} else if (item.subinfo->item_list.count() == 1) {
QDockAreaLayoutItem &child = item.subinfo->item_list.first();
- if (child.widgetItem != 0) {
+ if (child.widgetItem != nullptr) {
item.widgetItem = child.widgetItem;
delete item.subinfo;
- item.subinfo = 0;
- } else if (child.subinfo != 0) {
+ item.subinfo = nullptr;
+ } else if (child.subinfo != nullptr) {
QDockAreaLayoutInfo *tmp = item.subinfo;
item.subinfo = child.subinfo;
- child.subinfo = 0;
+ child.subinfo = nullptr;
tmp->item_list.clear();
delete tmp;
}
@@ -1009,7 +1009,7 @@ void QDockAreaLayoutInfo::remove(const QList<int> &path)
if (path.count() > 1) {
const int index = path.first();
QDockAreaLayoutItem &item = item_list[index];
- Q_ASSERT(item.subinfo != 0);
+ Q_ASSERT(item.subinfo != nullptr);
item.subinfo->remove(path.mid(1));
unnest(index);
} else {
@@ -1028,13 +1028,13 @@ QLayoutItem *QDockAreaLayoutInfo::plug(const QList<int> &path)
if (path.count() > 1) {
QDockAreaLayoutItem &item = item_list[index];
- Q_ASSERT(item.subinfo != 0);
+ Q_ASSERT(item.subinfo != nullptr);
return item.subinfo->plug(path.mid(1));
}
QDockAreaLayoutItem &item = item_list[index];
- Q_ASSERT(item.widgetItem != 0);
+ Q_ASSERT(item.widgetItem != nullptr);
Q_ASSERT(item.flags & QDockAreaLayoutItem::GapItem);
item.flags &= ~QDockAreaLayoutItem::GapItem;
return item.widgetItem;
@@ -1047,7 +1047,7 @@ QLayoutItem *QDockAreaLayoutInfo::unplug(const QList<int> &path)
const int index = path.first();
if (path.count() > 1) {
QDockAreaLayoutItem &item = item_list[index];
- Q_ASSERT(item.subinfo != 0);
+ Q_ASSERT(item.subinfo != nullptr);
return item.subinfo->unplug(path.mid(1));
}
@@ -1078,7 +1078,7 @@ QLayoutItem *QDockAreaLayoutInfo::unplug(const QList<int> &path)
quintptr QDockAreaLayoutInfo::currentTabId() const
{
- if (!tabbed || tabBar == 0)
+ if (!tabbed || tabBar == nullptr)
return 0;
int index = tabBar->currentIndex();
@@ -1095,7 +1095,7 @@ void QDockAreaLayoutInfo::setCurrentTab(QWidget *widget)
void QDockAreaLayoutInfo::setCurrentTabId(quintptr id)
{
- if (!tabbed || tabBar == 0)
+ if (!tabbed || tabBar == nullptr)
return;
for (int i = 0; i < tabBar->count(); ++i) {
@@ -1114,7 +1114,7 @@ static QRect dockedGeometry(QWidget *widget)
QDockWidgetLayout *layout
= qobject_cast<QDockWidgetLayout*>(widget->layout());
- if(layout != 0 && layout->nativeWindowDeco())
+ if (layout && layout->nativeWindowDeco())
titleHeight = layout->titleHeight();
QRect result = widget->geometry();
@@ -1138,7 +1138,7 @@ bool QDockAreaLayoutInfo::insertGap(const QList<int> &path, QLayoutItem *dockWid
if (path.count() > 1) {
QDockAreaLayoutItem &item = item_list[index];
- if (item.subinfo == 0
+ if (item.subinfo == nullptr
#if QT_CONFIG(tabbar)
|| (item.subinfo->tabbed && !insert_tabbed)
#endif
@@ -1149,7 +1149,7 @@ bool QDockAreaLayoutInfo::insertGap(const QList<int> &path, QLayoutItem *dockWid
QDockAreaLayoutInfo *subinfo = item.subinfo;
QLayoutItem *widgetItem = item.widgetItem;
QPlaceHolderItem *placeHolderItem = item.placeHolderItem;
- QRect r = subinfo == 0 ? widgetItem ? dockedGeometry(widgetItem->widget()) : placeHolderItem->topLevelRect : subinfo->rect;
+ QRect r = subinfo == nullptr ? widgetItem ? dockedGeometry(widgetItem->widget()) : placeHolderItem->topLevelRect : subinfo->rect;
Qt::Orientation opposite = o == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal;
#if !QT_CONFIG(tabbar)
@@ -1160,11 +1160,11 @@ bool QDockAreaLayoutInfo::insertGap(const QList<int> &path, QLayoutItem *dockWid
//item become a new top-level
item.subinfo = new_info;
- item.widgetItem = 0;
- item.placeHolderItem = 0;
+ item.widgetItem = nullptr;
+ item.placeHolderItem = nullptr;
QDockAreaLayoutItem new_item
- = widgetItem == 0
+ = widgetItem == nullptr
? QDockAreaLayoutItem(subinfo)
: widgetItem ? QDockAreaLayoutItem(widgetItem) : QDockAreaLayoutItem(placeHolderItem);
new_item.size = pick(opposite, r.size());
@@ -1265,16 +1265,16 @@ QDockAreaLayoutInfo *QDockAreaLayoutInfo::info(QWidget *widget)
return this;
#endif
- if (item.widgetItem != 0 && item.widgetItem->widget() == widget)
+ if (item.widgetItem != nullptr && item.widgetItem->widget() == widget)
return this;
- if (item.subinfo != 0) {
+ if (item.subinfo != nullptr) {
if (QDockAreaLayoutInfo *result = item.subinfo->info(widget))
return result;
}
}
- return 0;
+ return nullptr;
}
QDockAreaLayoutInfo *QDockAreaLayoutInfo::info(const QList<int> &path)
@@ -1284,7 +1284,7 @@ QDockAreaLayoutInfo *QDockAreaLayoutInfo::info(const QList<int> &path)
index = -index - 1;
if (index >= item_list.count())
return this;
- if (path.count() == 1 || item_list[index].subinfo == 0)
+ if (path.count() == 1 || item_list[index].subinfo == nullptr)
return this;
return item_list[index].subinfo->info(path.mid(1));
}
@@ -1341,7 +1341,7 @@ QRect QDockAreaLayoutInfo::itemRect(const QList<int> &path) const
const int index = path.first();
if (path.count() > 1) {
const QDockAreaLayoutItem &item = item_list.at(index);
- Q_ASSERT(item.subinfo != 0);
+ Q_ASSERT(item.subinfo != nullptr);
return item.subinfo->itemRect(path.mid(1));
}
@@ -1374,7 +1374,7 @@ QRect QDockAreaLayoutInfo::separatorRect(const QList<int> &path) const
const int index = path.first();
if (path.count() > 1) {
const QDockAreaLayoutItem &item = item_list.at(index);
- Q_ASSERT(item.subinfo != 0);
+ Q_ASSERT(item.subinfo != nullptr);
return item.subinfo->separatorRect(path.mid(1));
}
return separatorRect(index);
@@ -1395,7 +1395,7 @@ QList<int> QDockAreaLayoutInfo::findSeparator(const QPoint &_pos) const
continue;
if (item.pos + item.size > pos) {
- if (item.subinfo != 0) {
+ if (item.subinfo != nullptr) {
QList<int> result = item.subinfo->findSeparator(_pos);
if (!result.isEmpty()) {
result.prepend(i);
@@ -1428,7 +1428,7 @@ QList<int> QDockAreaLayoutInfo::indexOfPlaceHolder(const QString &objectName) co
for (int i = 0; i < item_list.size(); ++i) {
const QDockAreaLayoutItem &item = item_list.at(i);
- if (item.subinfo != 0) {
+ if (item.subinfo != nullptr) {
QList<int> result = item.subinfo->indexOfPlaceHolder(objectName);
if (!result.isEmpty()) {
result.prepend(i);
@@ -1437,7 +1437,7 @@ QList<int> QDockAreaLayoutInfo::indexOfPlaceHolder(const QString &objectName) co
continue;
}
- if (item.placeHolderItem != 0 && item.placeHolderItem->objectName == objectName) {
+ if (item.placeHolderItem != nullptr && item.placeHolderItem->objectName == objectName) {
QList<int> result;
result << i;
return result;
@@ -1452,10 +1452,10 @@ QList<int> QDockAreaLayoutInfo::indexOf(QWidget *widget) const
for (int i = 0; i < item_list.size(); ++i) {
const QDockAreaLayoutItem &item = item_list.at(i);
- if (item.placeHolderItem != 0)
+ if (item.placeHolderItem != nullptr)
continue;
- if (item.subinfo != 0) {
+ if (item.subinfo != nullptr) {
QList<int> result = item.subinfo->indexOf(widget);
if (!result.isEmpty()) {
result.prepend(i);
@@ -1477,7 +1477,7 @@ QList<int> QDockAreaLayoutInfo::indexOf(QWidget *widget) const
QMainWindowLayout *QDockAreaLayoutInfo::mainWindowLayout() const
{
QMainWindowLayout *result = qt_mainwindow_layout(mainWindow);
- Q_ASSERT(result != 0);
+ Q_ASSERT(result != nullptr);
return result;
}
@@ -1536,7 +1536,7 @@ QDockWidget *QDockAreaLayoutInfo::apply(bool animate)
if (item.flags & QDockAreaLayoutItem::GapItem)
continue;
- if (item.subinfo != 0) {
+ if (item.subinfo != nullptr) {
item.subinfo->apply(animate);
continue;
}
@@ -1681,7 +1681,7 @@ void QDockAreaLayoutInfo::tab(int index, QLayoutItem *dockWidgetItem)
= new QDockAreaLayoutInfo(sep, dockPos, o, tabBarShape, mainWindow);
item_list[index].subinfo = new_info;
new_info->item_list.append(QDockAreaLayoutItem(item_list.at(index).widgetItem));
- item_list[index].widgetItem = 0;
+ item_list[index].widgetItem = nullptr;
new_info->item_list.append(QDockAreaLayoutItem(dockWidgetItem));
new_info->tabbed = true;
new_info->updateTabBar();
@@ -1703,7 +1703,7 @@ void QDockAreaLayoutInfo::split(int index, Qt::Orientation orientation,
= new QDockAreaLayoutInfo(sep, dockPos, orientation, tabBarShape, mainWindow);
item_list[index].subinfo = new_info;
new_info->item_list.append(QDockAreaLayoutItem(item_list.at(index).widgetItem));
- item_list[index].widgetItem = 0;
+ item_list[index].widgetItem = nullptr;
new_info->item_list.append(QDockAreaLayoutItem(dockWidgetItem));
}
}
@@ -1714,7 +1714,7 @@ QDockAreaLayoutItem &QDockAreaLayoutInfo::item(const QList<int> &path)
const int index = path.first();
if (path.count() > 1) {
const QDockAreaLayoutItem &item = item_list[index];
- Q_ASSERT(item.subinfo != 0);
+ Q_ASSERT(item.subinfo != nullptr);
return item.subinfo->item(path.mid(1));
}
return item_list[index];
@@ -1724,7 +1724,7 @@ QLayoutItem *QDockAreaLayoutInfo::itemAt(int *x, int index) const
{
for (int i = 0; i < item_list.count(); ++i) {
const QDockAreaLayoutItem &item = item_list.at(i);
- if (item.placeHolderItem != 0)
+ if (item.placeHolderItem != nullptr)
continue;
if (item.subinfo) {
if (QLayoutItem *ret = item.subinfo->itemAt(x, index))
@@ -1734,14 +1734,14 @@ QLayoutItem *QDockAreaLayoutInfo::itemAt(int *x, int index) const
return item.widgetItem;
}
}
- return 0;
+ return nullptr;
}
QLayoutItem *QDockAreaLayoutInfo::takeAt(int *x, int index)
{
for (int i = 0; i < item_list.count(); ++i) {
QDockAreaLayoutItem &item = item_list[i];
- if (item.placeHolderItem != 0)
+ if (item.placeHolderItem != nullptr)
continue;
else if (item.subinfo) {
if (QLayoutItem *ret = item.subinfo->takeAt(x, index)) {
@@ -1752,14 +1752,14 @@ QLayoutItem *QDockAreaLayoutInfo::takeAt(int *x, int index)
if ((*x)++ == index) {
item.placeHolderItem = new QPlaceHolderItem(item.widgetItem->widget());
QLayoutItem *ret = item.widgetItem;
- item.widgetItem = 0;
+ item.widgetItem = nullptr;
if (item.size != -1)
item.flags |= QDockAreaLayoutItem::KeepSize;
return ret;
}
}
}
- return 0;
+ return nullptr;
}
void QDockAreaLayoutInfo::deleteAllLayoutItems()
@@ -1770,7 +1770,7 @@ void QDockAreaLayoutInfo::deleteAllLayoutItems()
item.subinfo->deleteAllLayoutItems();
} else {
delete item.widgetItem;
- item.widgetItem = 0;
+ item.widgetItem = nullptr;
}
}
}
@@ -1801,7 +1801,7 @@ void QDockAreaLayoutInfo::saveState(QDataStream &stream) const
for (int i = 0; i < item_list.count(); ++i) {
const QDockAreaLayoutItem &item = item_list.at(i);
- if (item.widgetItem != 0) {
+ if (item.widgetItem != nullptr) {
stream << (uchar) WidgetMarker;
QWidget *w = item.widgetItem->widget();
QString name = w->objectName();
@@ -1825,7 +1825,7 @@ void QDockAreaLayoutInfo::saveState(QDataStream &stream) const
stream << item.pos << item.size << pick(o, item.minimumSize())
<< pick(o, item.maximumSize());
}
- } else if (item.placeHolderItem != 0) {
+ } else if (item.placeHolderItem != nullptr) {
stream << (uchar) WidgetMarker;
stream << item.placeHolderItem->objectName;
uchar flags = 0;
@@ -1840,7 +1840,7 @@ void QDockAreaLayoutInfo::saveState(QDataStream &stream) const
} else {
stream << item.pos << item.size << (int)0 << (int)0;
}
- } else if (item.subinfo != 0) {
+ } else if (item.subinfo != nullptr) {
stream << (uchar) SequenceMarker << item.pos << item.size << pick(o, item.minimumSize()) << pick(o, item.maximumSize());
item.subinfo->saveState(stream);
}
@@ -1894,7 +1894,7 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
continue;
}
- QDockWidget *widget = 0;
+ QDockWidget *widget = nullptr;
for (int j = 0; j < widgets.count(); ++j) {
if (widgets.at(j)->objectName() == name) {
widget = widgets.takeAt(j);
@@ -1902,7 +1902,7 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
}
}
- if (widget == 0) {
+ if (widget == nullptr) {
QPlaceHolderItem *placeHolder = new QPlaceHolderItem;
QDockAreaLayoutItem item(placeHolder);
@@ -2081,7 +2081,7 @@ bool QDockAreaLayoutInfo::updateTabBar() const
QDockAreaLayoutInfo *that = const_cast<QDockAreaLayoutInfo*>(this);
- if (that->tabBar == 0) {
+ if (that->tabBar == nullptr) {
that->tabBar = mainWindowLayout()->getTabBar();
that->tabBar->setShape(static_cast<QTabBar::Shape>(tabBarShape));
that->tabBar->setDrawBase(true);
@@ -2101,7 +2101,7 @@ bool QDockAreaLayoutInfo::updateTabBar() const
gap = true;
continue;
}
- if (item.widgetItem == 0)
+ if (item.widgetItem == nullptr)
continue;
QDockWidget *dw = qobject_cast<QDockWidget*>(item.widgetItem->widget());
@@ -2155,12 +2155,12 @@ void QDockAreaLayoutInfo::setTabBarShape(int shape)
if (shape == tabBarShape)
return;
tabBarShape = shape;
- if (tabBar != 0)
+ if (tabBar != nullptr)
tabBar->setShape(static_cast<QTabBar::Shape>(shape));
for (int i = 0; i < item_list.count(); ++i) {
QDockAreaLayoutItem &item = item_list[i];
- if (item.subinfo != 0)
+ if (item.subinfo != nullptr)
item.subinfo->setTabBarShape(shape);
}
}
@@ -2192,7 +2192,7 @@ QSet<QTabBar*> QDockAreaLayoutInfo::usedTabBars() const
for (int i = 0; i < item_list.count(); ++i) {
const QDockAreaLayoutItem &item = item_list.at(i);
- if (item.subinfo != 0)
+ if (item.subinfo != nullptr)
result += item.subinfo->usedTabBars();
}
@@ -2212,7 +2212,7 @@ QSet<QWidget*> QDockAreaLayoutInfo::usedSeparatorWidgets() const
for (int i = 0; i < item_list.count(); ++i) {
const QDockAreaLayoutItem &item = item_list.at(i);
- if (item.subinfo != 0)
+ if (item.subinfo != nullptr)
result += item.subinfo->usedSeparatorWidgets();
}
@@ -2277,7 +2277,7 @@ void QDockAreaLayoutInfo::moveTab(int from, int to)
QDockAreaLayout::QDockAreaLayout(QMainWindow *win) : fallbackToSizeHints(true)
{
mainWindow = win;
- sep = win->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, 0, win);
+ sep = win->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, nullptr, win);
#if QT_CONFIG(tabbar)
const int tabShape = QTabBar::RoundedSouth;
#else
@@ -2291,7 +2291,7 @@ QDockAreaLayout::QDockAreaLayout(QMainWindow *win) : fallbackToSizeHints(true)
= QDockAreaLayoutInfo(&sep, QInternal::TopDock, Qt::Horizontal, tabShape, win);
docks[QInternal::BottomDock]
= QDockAreaLayoutInfo(&sep, QInternal::BottomDock, Qt::Horizontal, tabShape, win);
- centralWidgetItem = 0;
+ centralWidgetItem = nullptr;
corners[Qt::TopLeftCorner] = Qt::TopDockWidgetArea;
@@ -2491,7 +2491,7 @@ QDockAreaLayoutInfo *QDockAreaLayout::info(QWidget *widget)
return result;
}
- return 0;
+ return nullptr;
}
QDockAreaLayoutInfo *QDockAreaLayout::info(const QList<int> &path)
@@ -2623,7 +2623,7 @@ void QDockAreaLayout::getGrid(QVector<QLayoutStruct> *_ver_struct_list,
QSize center_hint(0, 0);
QSize center_min(0, 0);
QSize center_max(0, 0);
- const bool have_central = centralWidgetItem != 0 && !centralWidgetItem->isEmpty();
+ const bool have_central = centralWidgetItem != nullptr && !centralWidgetItem->isEmpty();
if (have_central) {
center_hint = centralWidgetRect.size();
if (!center_hint.isValid())
@@ -2670,7 +2670,7 @@ void QDockAreaLayout::getGrid(QVector<QLayoutStruct> *_ver_struct_list,
QSize bottom_max = docks[QInternal::BottomDock].maximumSize();
bottom_hint = bottom_hint.boundedTo(bottom_max).expandedTo(bottom_min);
- if (_ver_struct_list != 0) {
+ if (_ver_struct_list != nullptr) {
QVector<QLayoutStruct> &ver_struct_list = *_ver_struct_list;
ver_struct_list.resize(3);
@@ -2732,7 +2732,7 @@ void QDockAreaLayout::getGrid(QVector<QLayoutStruct> *_ver_struct_list,
ver_struct_list[1].maximumSize = QWIDGETSIZE_MAX;
}
- if (_hor_struct_list != 0) {
+ if (_hor_struct_list != nullptr) {
QVector<QLayoutStruct> &hor_struct_list = *_hor_struct_list;
hor_struct_list.resize(3);
@@ -2803,7 +2803,7 @@ void QDockAreaLayout::setGrid(QVector<QLayoutStruct> *ver_struct_list,
if (!docks[QInternal::TopDock].isEmpty()) {
QRect r = docks[QInternal::TopDock].rect;
- if (hor_struct_list != 0) {
+ if (hor_struct_list != nullptr) {
r.setLeft(corners[Qt::TopLeftCorner] == Qt::TopDockWidgetArea
|| docks[QInternal::LeftDock].isEmpty()
? rect.left() : hor_struct_list->at(1).pos);
@@ -2811,7 +2811,7 @@ void QDockAreaLayout::setGrid(QVector<QLayoutStruct> *ver_struct_list,
|| docks[QInternal::RightDock].isEmpty()
? rect.right() : hor_struct_list->at(2).pos - sep - 1);
}
- if (ver_struct_list != 0) {
+ if (ver_struct_list != nullptr) {
r.setTop(rect.top());
r.setBottom(ver_struct_list->at(1).pos - sep - 1);
}
@@ -2823,7 +2823,7 @@ void QDockAreaLayout::setGrid(QVector<QLayoutStruct> *ver_struct_list,
if (!docks[QInternal::BottomDock].isEmpty()) {
QRect r = docks[QInternal::BottomDock].rect;
- if (hor_struct_list != 0) {
+ if (hor_struct_list != nullptr) {
r.setLeft(corners[Qt::BottomLeftCorner] == Qt::BottomDockWidgetArea
|| docks[QInternal::LeftDock].isEmpty()
? rect.left() : hor_struct_list->at(1).pos);
@@ -2831,7 +2831,7 @@ void QDockAreaLayout::setGrid(QVector<QLayoutStruct> *ver_struct_list,
|| docks[QInternal::RightDock].isEmpty()
? rect.right() : hor_struct_list->at(2).pos - sep - 1);
}
- if (ver_struct_list != 0) {
+ if (ver_struct_list != nullptr) {
r.setTop(ver_struct_list->at(2).pos);
r.setBottom(rect.bottom());
}
@@ -2843,11 +2843,11 @@ void QDockAreaLayout::setGrid(QVector<QLayoutStruct> *ver_struct_list,
if (!docks[QInternal::LeftDock].isEmpty()) {
QRect r = docks[QInternal::LeftDock].rect;
- if (hor_struct_list != 0) {
+ if (hor_struct_list != nullptr) {
r.setLeft(rect.left());
r.setRight(hor_struct_list->at(1).pos - sep - 1);
}
- if (ver_struct_list != 0) {
+ if (ver_struct_list != nullptr) {
r.setTop(corners[Qt::TopLeftCorner] == Qt::LeftDockWidgetArea
|| docks[QInternal::TopDock].isEmpty()
? rect.top() : ver_struct_list->at(1).pos);
@@ -2863,11 +2863,11 @@ void QDockAreaLayout::setGrid(QVector<QLayoutStruct> *ver_struct_list,
if (!docks[QInternal::RightDock].isEmpty()) {
QRect r = docks[QInternal::RightDock].rect;
- if (hor_struct_list != 0) {
+ if (hor_struct_list != nullptr) {
r.setLeft(hor_struct_list->at(2).pos);
r.setRight(rect.right());
}
- if (ver_struct_list != 0) {
+ if (ver_struct_list != nullptr) {
r.setTop(corners[Qt::TopRightCorner] == Qt::RightDockWidgetArea
|| docks[QInternal::TopDock].isEmpty()
? rect.top() : ver_struct_list->at(1).pos);
@@ -2881,11 +2881,11 @@ void QDockAreaLayout::setGrid(QVector<QLayoutStruct> *ver_struct_list,
// center ---------------------------------------------------
- if (hor_struct_list != 0) {
+ if (hor_struct_list != nullptr) {
centralWidgetRect.setLeft(hor_struct_list->at(1).pos);
centralWidgetRect.setWidth(hor_struct_list->at(1).size);
}
- if (ver_struct_list != 0) {
+ if (ver_struct_list != nullptr) {
centralWidgetRect.setTop(ver_struct_list->at(1).pos);
centralWidgetRect.setHeight(ver_struct_list->at(1).size);
}
@@ -2919,7 +2919,7 @@ QSize QDockAreaLayout::sizeHint() const
int top_sep = 0;
int bottom_sep = 0;
- if (centralWidgetItem != 0) {
+ if (centralWidgetItem != nullptr) {
left_sep = docks[QInternal::LeftDock].isEmpty() ? 0 : sep;
right_sep = docks[QInternal::RightDock].isEmpty() ? 0 : sep;
top_sep = docks[QInternal::TopDock].isEmpty() ? 0 : sep;
@@ -2930,7 +2930,7 @@ QSize QDockAreaLayout::sizeHint() const
QSize right = docks[QInternal::RightDock].sizeHint() + QSize(right_sep, 0);
QSize top = docks[QInternal::TopDock].sizeHint() + QSize(0, top_sep);
QSize bottom = docks[QInternal::BottomDock].sizeHint() + QSize(0, bottom_sep);
- QSize center = centralWidgetItem == 0 ? QSize(0, 0) : centralWidgetItem->sizeHint();
+ QSize center = centralWidgetItem == nullptr ? QSize(0, 0) : centralWidgetItem->sizeHint();
int row1 = top.width();
int row2 = left.width() + center.width() + right.width();
@@ -2969,7 +2969,7 @@ QSize QDockAreaLayout::minimumSize() const
int top_sep = 0;
int bottom_sep = 0;
- if (centralWidgetItem != 0) {
+ if (centralWidgetItem != nullptr) {
left_sep = docks[QInternal::LeftDock].isEmpty() ? 0 : sep;
right_sep = docks[QInternal::RightDock].isEmpty() ? 0 : sep;
top_sep = docks[QInternal::TopDock].isEmpty() ? 0 : sep;
@@ -2980,7 +2980,7 @@ QSize QDockAreaLayout::minimumSize() const
QSize right = docks[QInternal::RightDock].minimumSize() + QSize(right_sep, 0);
QSize top = docks[QInternal::TopDock].minimumSize() + QSize(0, top_sep);
QSize bottom = docks[QInternal::BottomDock].minimumSize() + QSize(0, bottom_sep);
- QSize center = centralWidgetItem == 0 ? QSize(0, 0) : centralWidgetItem->minimumSize();
+ QSize center = centralWidgetItem == nullptr ? QSize(0, 0) : centralWidgetItem->minimumSize();
int row1 = top.width();
int row2 = left.width() + center.width() + right.width();
@@ -3040,7 +3040,7 @@ QRect QDockAreaLayout::constrainedRect(QRect rect, QWidget* widget)
bool QDockAreaLayout::restoreDockWidget(QDockWidget *dockWidget)
{
- QDockAreaLayoutItem *item = 0;
+ QDockAreaLayoutItem *item = nullptr;
const auto groups =
mainWindow->findChildren<QDockWidgetGroupWindow *>(QString(), Qt::FindDirectChildrenOnly);
for (QDockWidgetGroupWindow *dwgw : groups) {
@@ -3059,7 +3059,7 @@ bool QDockAreaLayout::restoreDockWidget(QDockWidget *dockWidget)
}
QPlaceHolderItem *placeHolder = item->placeHolderItem;
- Q_ASSERT(placeHolder != 0);
+ Q_ASSERT(placeHolder != nullptr);
item->widgetItem = new QDockWidgetItem(dockWidget);
@@ -3069,7 +3069,7 @@ bool QDockAreaLayout::restoreDockWidget(QDockWidget *dockWidget)
}
dockWidget->setVisible(!placeHolder->hidden);
- item->placeHolderItem = 0;
+ item->placeHolderItem = nullptr;
delete placeHolder;
return true;
@@ -3116,7 +3116,7 @@ void QDockAreaLayout::tabifyDockWidget(QDockWidget *first, QDockWidget *second)
return;
QDockAreaLayoutInfo *info = this->info(path);
- Q_ASSERT(info != 0);
+ Q_ASSERT(info != nullptr);
info->tab(path.last(), new QDockWidgetItem(second));
removePlaceHolder(second->objectName());
@@ -3181,7 +3181,7 @@ void QDockAreaLayout::splitDockWidget(QDockWidget *after,
return;
QDockAreaLayoutInfo *info = this->info(path);
- Q_ASSERT(info != 0);
+ Q_ASSERT(info != nullptr);
info->split(path.last(), orientation, new QDockWidgetItem(dockWidget));
removePlaceHolder(dockWidget->objectName());
@@ -3193,7 +3193,7 @@ void QDockAreaLayout::apply(bool animate)
for (int i = 0; i < QInternal::DockCount; ++i)
docks[i].apply(animate);
- if (centralWidgetItem != 0 && !centralWidgetItem->isEmpty()) {
+ if (centralWidgetItem != nullptr && !centralWidgetItem->isEmpty()) {
widgetAnimator.animate(centralWidgetItem->widget(), centralWidgetRect,
animate);
}
@@ -3255,9 +3255,9 @@ int QDockAreaLayout::separatorMove(const QList<int> &separator, const QPoint &or
QVector<QLayoutStruct> list;
if (index == QInternal::LeftDock || index == QInternal::RightDock)
- getGrid(0, &list);
+ getGrid(nullptr, &list);
else
- getGrid(&list, 0);
+ getGrid(&list, nullptr);
int sep_index = index == QInternal::LeftDock || index == QInternal::TopDock
? 0 : 1;
@@ -3271,9 +3271,9 @@ int QDockAreaLayout::separatorMove(const QList<int> &separator, const QPoint &or
fallbackToSizeHints = false;
if (index == QInternal::LeftDock || index == QInternal::RightDock)
- setGrid(0, &list);
+ setGrid(nullptr, &list);
else
- setGrid(&list, 0);
+ setGrid(&list, nullptr);
apply(false);
@@ -3330,7 +3330,7 @@ void QDockAreaLayout::updateSeparatorWidgets() const
QLayoutItem *QDockAreaLayout::itemAt(int *x, int index) const
{
- Q_ASSERT(x != 0);
+ Q_ASSERT(x != nullptr);
for (int i = 0; i < QInternal::DockCount; ++i) {
const QDockAreaLayoutInfo &dock = docks[i];
@@ -3341,12 +3341,12 @@ QLayoutItem *QDockAreaLayout::itemAt(int *x, int index) const
if (centralWidgetItem && (*x)++ == index)
return centralWidgetItem;
- return 0;
+ return nullptr;
}
QLayoutItem *QDockAreaLayout::takeAt(int *x, int index)
{
- Q_ASSERT(x != 0);
+ Q_ASSERT(x != nullptr);
for (int i = 0; i < QInternal::DockCount; ++i) {
QDockAreaLayoutInfo &dock = docks[i];
@@ -3356,11 +3356,11 @@ QLayoutItem *QDockAreaLayout::takeAt(int *x, int index)
if (centralWidgetItem && (*x)++ == index) {
QLayoutItem *ret = centralWidgetItem;
- centralWidgetItem = 0;
+ centralWidgetItem = nullptr;
return ret;
}
- return 0;
+ return nullptr;
}
void QDockAreaLayout::deleteAllLayoutItems()
@@ -3399,7 +3399,7 @@ QSet<QWidget*> QDockAreaLayout::usedSeparatorWidgets() const
QRect QDockAreaLayout::gapRect(const QList<int> &path) const
{
const QDockAreaLayoutInfo *info = this->info(path);
- if (info == 0)
+ if (info == nullptr)
return QRect();
int index = path.last();
if (index < 0 || index >= info->item_list.count())
@@ -3419,7 +3419,7 @@ void QDockAreaLayout::keepSize(QDockWidget *w)
void QDockAreaLayout::styleChangedEvent()
{
- sep = mainWindow->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, 0, mainWindow);
+ sep = mainWindow->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, nullptr, mainWindow);
if (isValid())
fitLayout();
}
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp
index 05ec3aface..1d358c493e 100644
--- a/src/widgets/widgets/qdockwidget.cpp
+++ b/src/widgets/widgets/qdockwidget.cpp
@@ -197,7 +197,7 @@ QSize QDockWidgetTitleButton::sizeHint() const
{
ensurePolished();
- int size = 2*style()->pixelMetric(QStyle::PM_DockWidgetTitleBarButtonMargin, 0, this);
+ int size = 2*style()->pixelMetric(QStyle::PM_DockWidgetTitleBarButtonMargin, nullptr, this);
if (!icon().isNull()) {
const QSize sz = icon().actualSize(dockButtonIconSize());
size += qMax(sz.width(), sz.height());
@@ -226,7 +226,7 @@ void QDockWidgetTitleButton::paintEvent(QPaintEvent *)
opt.init(this);
opt.state |= QStyle::State_AutoRaise;
- if (style()->styleHint(QStyle::SH_DockWidget_ButtonsHaveFrame, 0, this))
+ if (style()->styleHint(QStyle::SH_DockWidget_ButtonsHaveFrame, nullptr, this))
{
if (isEnabled() && underMouse() && !isChecked() && !isDown())
opt.state |= QStyle::State_Raised;
@@ -238,8 +238,8 @@ void QDockWidgetTitleButton::paintEvent(QPaintEvent *)
}
opt.icon = icon();
- opt.subControls = 0;
- opt.activeSubControls = 0;
+ opt.subControls = { };
+ opt.activeSubControls = { };
opt.features = QStyleOptionToolButton::None;
opt.arrowType = Qt::NoArrow;
opt.iconSize = dockButtonIconSize();
@@ -311,12 +311,12 @@ QLayoutItem *QDockWidgetLayout::itemAt(int index) const
int cnt = 0;
for (int i = 0; i < item_list.count(); ++i) {
QLayoutItem *item = item_list.at(i);
- if (item == 0)
+ if (item == nullptr)
continue;
if (index == cnt++)
return item;
}
- return 0;
+ return nullptr;
}
QLayoutItem *QDockWidgetLayout::takeAt(int index)
@@ -324,7 +324,7 @@ QLayoutItem *QDockWidgetLayout::takeAt(int index)
int j = 0;
for (int i = 0; i < item_list.count(); ++i) {
QLayoutItem *item = item_list.at(i);
- if (item == 0)
+ if (item == nullptr)
continue;
if (index == j) {
item_list[i] = 0;
@@ -333,7 +333,7 @@ QLayoutItem *QDockWidgetLayout::takeAt(int index)
}
++j;
}
- return 0;
+ return nullptr;
}
int QDockWidgetLayout::count() const
@@ -362,7 +362,7 @@ QSize QDockWidgetLayout::sizeFromContent(const QSize &content, bool floating) co
const bool nativeDeco = nativeWindowDeco(floating);
int fw = floating && !nativeDeco
- ? w->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, w)
+ ? w->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, nullptr, w)
: 0;
const int th = titleHeight();
@@ -394,7 +394,7 @@ QSize QDockWidgetLayout::sizeFromContent(const QSize &content, bool floating) co
uint explicitMin = 0;
uint explicitMax = 0;
- if (w->d_func()->extra != 0) {
+ if (w->d_func()->extra != nullptr) {
explicitMin = w->d_func()->extra->explicitMinSize;
explicitMax = w->d_func()->extra->explicitMaxSize;
}
@@ -448,7 +448,7 @@ QSize QDockWidgetLayout::minimumSize() const
QWidget *QDockWidgetLayout::widgetForRole(Role r) const
{
QLayoutItem *item = item_list.at(r);
- return item == 0 ? 0 : item->widget();
+ return item == nullptr ? nullptr : item->widget();
}
QLayoutItem *QDockWidgetLayout::itemForRole(Role r) const
@@ -459,12 +459,12 @@ QLayoutItem *QDockWidgetLayout::itemForRole(Role r) const
void QDockWidgetLayout::setWidgetForRole(Role r, QWidget *w)
{
QWidget *old = widgetForRole(r);
- if (old != 0) {
+ if (old != nullptr) {
old->hide();
removeWidget(old);
}
- if (w != 0) {
+ if (w != nullptr) {
addChildWidget(w);
item_list[r] = new QWidgetItemV2(w);
w->show();
@@ -505,8 +505,8 @@ int QDockWidgetLayout::minimumTitleWidth() const
int titleHeight = this->titleHeight();
- int mw = q->style()->pixelMetric(QStyle::PM_DockWidgetTitleMargin, 0, q);
- int fw = q->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, q);
+ int mw = q->style()->pixelMetric(QStyle::PM_DockWidgetTitleMargin, nullptr, q);
+ int fw = q->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, nullptr, q);
return pick(verticalTitleBar, closeSize)
+ pick(verticalTitleBar, floatSize)
@@ -531,7 +531,7 @@ int QDockWidgetLayout::titleHeight() const
perp(verticalTitleBar, floatSize));
QFontMetrics titleFontMetrics = q->fontMetrics();
- int mw = q->style()->pixelMetric(QStyle::PM_DockWidgetTitleMargin, 0, q);
+ int mw = q->style()->pixelMetric(QStyle::PM_DockWidgetTitleMargin, nullptr, q);
return qMax(buttonHeight + 2, titleFontMetrics.height() + 2*mw);
}
@@ -543,7 +543,7 @@ void QDockWidgetLayout::setGeometry(const QRect &geometry)
bool nativeDeco = nativeWindowDeco();
int fw = q->isFloating() && !nativeDeco
- ? q->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, q)
+ ? q->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, nullptr, q)
: 0;
if (nativeDeco) {
@@ -730,7 +730,7 @@ void QDockWidgetPrivate::updateButtons()
QStyleOptionDockWidget opt;
q->initStyleOption(&opt);
- bool customTitleBar = dwLayout->widgetForRole(QDockWidgetLayout::TitleBar) != 0;
+ bool customTitleBar = dwLayout->widgetForRole(QDockWidgetLayout::TitleBar) != nullptr;
bool nativeDeco = dwLayout->nativeWindowDeco();
bool hideButtons = nativeDeco || customTitleBar;
@@ -777,18 +777,18 @@ void QDockWidgetPrivate::initDrag(const QPoint &pos, bool nca)
{
Q_Q(QDockWidget);
- if (state != 0)
+ if (state != nullptr)
return;
QMainWindowLayout *layout = qt_mainwindow_layout_from_dock(q);
- Q_ASSERT(layout != 0);
- if (layout->pluggingWidget != 0) // the main window is animating a docking operation
+ Q_ASSERT(layout != nullptr);
+ if (layout->pluggingWidget != nullptr) // the main window is animating a docking operation
return;
state = new QDockWidgetPrivate::DragState;
state->pressPos = pos;
state->dragging = false;
- state->widgetItem = 0;
+ state->widgetItem = nullptr;
state->ownWidgetItem = false;
state->nca = nca;
state->ctrlDrag = false;
@@ -804,14 +804,14 @@ void QDockWidgetPrivate::startDrag(bool group)
{
Q_Q(QDockWidget);
- if (state == 0 || state->dragging)
+ if (state == nullptr || state->dragging)
return;
QMainWindowLayout *layout = qt_mainwindow_layout_from_dock(q);
- Q_ASSERT(layout != 0);
+ Q_ASSERT(layout != nullptr);
state->widgetItem = layout->unplug(q, group);
- if (state->widgetItem == 0) {
+ if (state->widgetItem == nullptr) {
/* I have a QMainWindow parent, but I was never inserted with
QMainWindow::addDockWidget, so the QMainWindowLayout has no
widget item for me. :( I have to create it myself, and then
@@ -838,7 +838,7 @@ void QDockWidgetPrivate::startDrag(bool group)
void QDockWidgetPrivate::endDrag(bool abort)
{
Q_Q(QDockWidget);
- Q_ASSERT(state != 0);
+ Q_ASSERT(state != nullptr);
q->releaseMouse();
@@ -881,7 +881,7 @@ void QDockWidgetPrivate::endDrag(bool abort)
}
}
delete state;
- state = 0;
+ state = nullptr;
}
void QDockWidgetPrivate::setResizerActive(bool active)
@@ -900,7 +900,7 @@ bool QDockWidgetPrivate::isAnimating() const
Q_Q(const QDockWidget);
QMainWindowLayout *mainWinLayout = qt_mainwindow_layout_from_dock(q);
- if (mainWinLayout == 0)
+ if (mainWinLayout == nullptr)
return false;
return (const void*)mainWinLayout->pluggingWidget == (const void*)q;
@@ -925,7 +925,7 @@ bool QDockWidgetPrivate::mousePressEvent(QMouseEvent *event)
// is not (but allow moving if the window is floating)
(!hasFeature(this, QDockWidget::DockWidgetMovable) && !q->isFloating()) ||
(qobject_cast<QMainWindow*>(parent) == 0 && !floatingTab) ||
- isAnimating() || state != 0) {
+ isAnimating() || state != nullptr) {
return false;
}
@@ -972,7 +972,7 @@ bool QDockWidgetPrivate::mouseMoveEvent(QMouseEvent *event)
QMainWindowLayout *mwlayout = qt_mainwindow_layout_from_dock(q);
if (!dwlayout->nativeWindowDeco()) {
if (!state->dragging
- && mwlayout->pluggingWidget == 0
+ && mwlayout->pluggingWidget == nullptr
&& (event->pos() - state->pressPos).manhattanLength()
> QApplication::startDragDistance()) {
startDrag();
@@ -1019,7 +1019,7 @@ void QDockWidgetPrivate::nonClientAreaMouseEvent(QMouseEvent *event)
{
Q_Q(QDockWidget);
- int fw = q->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, q);
+ int fw = q->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, nullptr, q);
QWidget *tl = q->topLevelWidget();
QRect geo = tl->geometry();
@@ -1035,21 +1035,21 @@ void QDockWidgetPrivate::nonClientAreaMouseEvent(QMouseEvent *event)
case QEvent::NonClientAreaMouseButtonPress:
if (!titleRect.contains(event->globalPos()))
break;
- if (state != 0)
+ if (state != nullptr)
break;
if (qobject_cast<QMainWindow*>(parent) == 0 && qobject_cast<QDockWidgetGroupWindow*>(parent) == 0)
break;
if (isAnimating())
break;
initDrag(event->pos(), true);
- if (state == 0)
+ if (state == nullptr)
break;
state->ctrlDrag = (event->modifiers() & Qt::ControlModifier) ||
(!hasFeature(this, QDockWidget::DockWidgetMovable) && q->isFloating());
startDrag();
break;
case QEvent::NonClientAreaMouseMove:
- if (state == 0 || !state->dragging)
+ if (state == nullptr || !state->dragging)
break;
#ifndef Q_OS_MAC
@@ -1085,7 +1085,7 @@ void QDockWidgetPrivate::moveEvent(QMoveEvent *event)
{
Q_Q(QDockWidget);
- if (state == 0 || !state->dragging || !state->nca)
+ if (state == nullptr || !state->dragging || !state->nca)
return;
if (!q->isWindow() && qobject_cast<QDockWidgetGroupWindow*>(parent) == 0)
@@ -1098,7 +1098,7 @@ void QDockWidgetPrivate::moveEvent(QMoveEvent *event)
return;
QMainWindowLayout *layout = qt_mainwindow_layout_from_dock(q);
- Q_ASSERT(layout != 0);
+ Q_ASSERT(layout != nullptr);
QPoint globalMousePos = event->pos() + state->pressPos;
layout->hover(state->widgetItem, globalMousePos);
@@ -1384,7 +1384,7 @@ void QDockWidget::setFloating(bool floating)
Q_D(QDockWidget);
// the initial click of a double-click may have started a drag...
- if (d->state != 0)
+ if (d->state != nullptr)
d->endDrag(true);
QRect r = d->undockedGeometry;
@@ -1479,7 +1479,7 @@ void QDockWidget::paintEvent(QPaintEvent *event)
QDockWidgetLayout *layout
= qobject_cast<QDockWidgetLayout*>(this->layout());
- bool customTitleBar = layout->widgetForRole(QDockWidgetLayout::TitleBar) != 0;
+ bool customTitleBar = layout->widgetForRole(QDockWidgetLayout::TitleBar) != nullptr;
bool nativeDeco = layout->nativeWindowDeco();
if (!nativeDeco && !customTitleBar) {
@@ -1516,7 +1516,7 @@ bool QDockWidget::event(QEvent *event)
switch (event->type()) {
#ifndef QT_NO_ACTION
case QEvent::Hide:
- if (layout != 0)
+ if (layout != nullptr)
layout->keepSize(this);
d->toggleViewAction->setChecked(false);
emit visibilityChanged(false);
@@ -1542,12 +1542,12 @@ bool QDockWidget::event(QEvent *event)
break;
case QEvent::ZOrderChange: {
bool onTop = false;
- if (win != 0) {
+ if (win != nullptr) {
const QObjectList &siblings = win->children();
onTop = siblings.count() > 0 && siblings.last() == (QObject*)this;
}
#if QT_CONFIG(tabbar)
- if (!isFloating() && layout != 0 && onTop)
+ if (!isFloating() && layout != nullptr && onTop)
layout->raise(this);
#endif
break;
@@ -1591,7 +1591,7 @@ bool QDockWidget::event(QEvent *event)
break;
case QEvent::Resize:
// if the mainwindow is plugging us, we don't want to update undocked geometry
- if (isFloating() && layout != 0 && layout->pluggingWidget != this)
+ if (isFloating() && layout != nullptr && layout->pluggingWidget != this)
d->undockedGeometry = geometry();
// Usually the window won't get resized while it's being moved, but it can happen,
@@ -1609,11 +1609,14 @@ bool QDockWidget::event(QEvent *event)
#ifndef QT_NO_ACTION
/*!
- Returns a checkable action that can be used to show or close this
- dock widget.
+ Returns a checkable action that can be added to menus and toolbars so that
+ the user can show or close this dock widget.
The action's text is set to the dock widget's window title.
+ \note The action can not be used to programmatically show or hide the dock
+ widget. Use the \l visible property for that.
+
\sa QAction::text, QWidget::windowTitle
*/
QAction * QDockWidget::toggleViewAction() const
@@ -1671,8 +1674,8 @@ QAction * QDockWidget::toggleViewAction() const
\since 4.3
Sets an arbitrary \a widget as the dock widget's title bar. If \a widget
- is 0, any custom title bar widget previously set on the dock widget is
- removed, but not deleted, and the default title bar will be used
+ is \nullptr, any custom title bar widget previously set on the dock widget
+ is removed, but not deleted, and the default title bar will be used
instead.
If a title bar widget is set, QDockWidget will not use native window
diff --git a/src/widgets/widgets/qdockwidget_p.h b/src/widgets/widgets/qdockwidget_p.h
index bc6ac86c45..e663ec4c2d 100644
--- a/src/widgets/widgets/qdockwidget_p.h
+++ b/src/widgets/widgets/qdockwidget_p.h
@@ -201,7 +201,11 @@ inline QLayoutItem *QDockWidgetItem::dockWidgetChildItem() const
inline QDockWidgetLayout *QDockWidgetItem::dockWidgetLayout() const
{
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QWidget *w = const_cast<QDockWidgetItem*>(this)->widget();
+#else
+ QWidget *w = widget();
+#endif
if (w != nullptr)
return qobject_cast<QDockWidgetLayout*>(w->layout());
return nullptr;
diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp
index 7069ef0368..ee4095cb36 100644
--- a/src/widgets/widgets/qeffects.cpp
+++ b/src/widgets/widgets/qeffects.cpp
@@ -65,7 +65,7 @@ class QAlphaWidget: public QWidget, private QEffects
{
Q_OBJECT
public:
- QAlphaWidget(QWidget* w, Qt::WindowFlags f = 0);
+ QAlphaWidget(QWidget* w, Qt::WindowFlags f = { });
~QAlphaWidget();
void run(int time);
@@ -93,7 +93,7 @@ private:
QElapsedTimer checkTime;
};
-static QAlphaWidget* q_blend = 0;
+static QAlphaWidget* q_blend = nullptr;
/*
Constructs a QAlphaWidget.
@@ -285,7 +285,7 @@ void QAlphaWidget::render()
lower();
}
}
- q_blend = 0;
+ q_blend = nullptr;
deleteLater();
} else {
alphaBlend();
@@ -377,13 +377,13 @@ private:
QPixmap pm;
};
-static QRollEffect* q_roll = 0;
+static QRollEffect* q_roll = nullptr;
/*
Construct a QRollEffect widget.
*/
QRollEffect::QRollEffect(QWidget* w, Qt::WindowFlags f, DirFlags orient)
- : QWidget(0, f), orientation(orient)
+ : QWidget(nullptr, f), orientation(orient)
{
#ifndef Q_OS_WIN
setEnabled(false);
@@ -550,7 +550,7 @@ void QRollEffect::scroll()
lower();
}
}
- q_roll = 0;
+ q_roll = nullptr;
deleteLater();
}
}
@@ -563,7 +563,7 @@ void qScrollEffect(QWidget* w, QEffects::DirFlags orient, int time)
{
if (q_roll) {
q_roll->deleteLater();
- q_roll = 0;
+ q_roll = nullptr;
}
if (!w)
@@ -585,7 +585,7 @@ void qFadeEffect(QWidget* w, int time)
{
if (q_blend) {
q_blend->deleteLater();
- q_blend = 0;
+ q_blend = nullptr;
}
if (!w)
diff --git a/src/widgets/widgets/qfocusframe.cpp b/src/widgets/widgets/qfocusframe.cpp
index 0992becdf0..4d64c24db3 100644
--- a/src/widgets/widgets/qfocusframe.cpp
+++ b/src/widgets/widgets/qfocusframe.cpp
@@ -55,8 +55,8 @@ class QFocusFramePrivate : public QWidgetPrivate
bool showFrameAboveWidget;
public:
QFocusFramePrivate() {
- widget = 0;
- frameParent = 0;
+ widget = nullptr;
+ frameParent = nullptr;
sendChildEvents = false;
showFrameAboveWidget = false;
}
@@ -154,12 +154,12 @@ void QFocusFrame::initStyleOption(QStyleOption *option) const
*/
QFocusFrame::QFocusFrame(QWidget *parent)
- : QWidget(*new QFocusFramePrivate, parent, 0)
+ : QWidget(*new QFocusFramePrivate, parent, { })
{
setAttribute(Qt::WA_TransparentForMouseEvents);
setFocusPolicy(Qt::NoFocus);
setAttribute(Qt::WA_NoChildEventsForParent, true);
- setAttribute(Qt::WA_AcceptDrops, style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, 0, this));
+ setAttribute(Qt::WA_AcceptDrops, style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, nullptr, this));
}
/*!
@@ -184,7 +184,7 @@ QFocusFrame::setWidget(QWidget *widget)
{
Q_D(QFocusFrame);
- if (style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, 0, this))
+ if (style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, nullptr, this))
d->showFrameAboveWidget = true;
else
d->showFrameAboveWidget = false;
@@ -205,7 +205,7 @@ QFocusFrame::setWidget(QWidget *widget)
d->widget = widget;
d->widget->installEventFilter(this);
QWidget *p = widget->parentWidget();
- QWidget *prev = 0;
+ QWidget *prev = nullptr;
if (d->showFrameAboveWidget) {
// Find the right parent for the focus frame.
while (p) {
@@ -231,7 +231,7 @@ QFocusFrame::setWidget(QWidget *widget)
}
d->update();
} else {
- d->widget = 0;
+ d->widget = nullptr;
hide();
}
}
@@ -290,7 +290,7 @@ QFocusFrame::eventFilter(QObject *o, QEvent *e)
case QEvent::ParentChange:
if (d->showFrameAboveWidget) {
QWidget *w = d->widget;
- setWidget(0);
+ setWidget(nullptr);
setWidget(w);
} else {
d->update();
@@ -304,13 +304,13 @@ QFocusFrame::eventFilter(QObject *o, QEvent *e)
setPalette(d->widget->palette());
break;
case QEvent::ZOrderChange:
- if (style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, 0, this))
+ if (style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, nullptr, this))
raise();
else
stackUnder(d->widget);
break;
case QEvent::Destroy:
- setWidget(0);
+ setWidget(nullptr);
break;
default:
break;
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index eec794562a..048fe42948 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -178,7 +178,7 @@ void QGroupBoxPrivate::click()
*/
QGroupBox::QGroupBox(QWidget *parent)
- : QWidget(*new QGroupBoxPrivate, parent, 0)
+ : QWidget(*new QGroupBoxPrivate, parent, { })
{
Q_D(QGroupBox);
d->init();
@@ -424,8 +424,8 @@ void QGroupBoxPrivate::_q_fixFocus(Qt::FocusReason reason)
Q_Q(QGroupBox);
QWidget *fw = q->focusWidget();
if (!fw || fw == q) {
- QWidget * best = 0;
- QWidget * candidate = 0;
+ QWidget * best = nullptr;
+ QWidget * candidate = nullptr;
QWidget * w = q;
while ((w = w->nextInFocusChain()) != q) {
if (q->isAncestorOf(w) && (w->focusPolicy() & Qt::TabFocus) == Qt::TabFocus && w->isVisibleTo(q)) {
diff --git a/src/widgets/widgets/qgroupbox.h b/src/widgets/widgets/qgroupbox.h
index deaeba4656..bd8394b43b 100644
--- a/src/widgets/widgets/qgroupbox.h
+++ b/src/widgets/widgets/qgroupbox.h
@@ -57,7 +57,7 @@ class Q_WIDGETS_EXPORT QGroupBox : public QWidget
Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
Q_PROPERTY(bool flat READ isFlat WRITE setFlat)
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable)
- Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled USER true)
+ Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY toggled USER true)
public:
explicit QGroupBox(QWidget *parent = nullptr);
explicit QGroupBox(const QString &title, QWidget *parent = nullptr);
diff --git a/src/widgets/widgets/qkeysequenceedit.cpp b/src/widgets/widgets/qkeysequenceedit.cpp
index 6f2a6b2d5a..b63b0b4d72 100644
--- a/src/widgets/widgets/qkeysequenceedit.cpp
+++ b/src/widgets/widgets/qkeysequenceedit.cpp
@@ -131,7 +131,7 @@ void QKeySequenceEditPrivate::finishEditing()
Constructs a QKeySequenceEdit widget with the given \a parent.
*/
QKeySequenceEdit::QKeySequenceEdit(QWidget *parent)
- : QKeySequenceEdit(*new QKeySequenceEditPrivate, parent, 0)
+ : QKeySequenceEdit(*new QKeySequenceEditPrivate, parent, { })
{
}
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 77d117775a..992e0cee97 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -188,8 +188,13 @@ QLabelPrivate::~QLabelPrivate()
*/
#ifndef QT_NO_PICTURE
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
- Returns the label's picture or nullptr if the label doesn't have a
+ \deprecated
+
+ New code should use the other overload which returns QPicture by-value.
+
+ This function returns the label's picture or \c nullptr if the label doesn't have a
picture.
*/
@@ -198,6 +203,37 @@ const QPicture *QLabel::picture() const
Q_D(const QLabel);
return d->picture;
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/*!
+ \since 5.15
+ Returns the label's picture.
+
+ Previously, Qt provided a version of \c picture() which returned the picture
+ by-pointer. That version is now deprecated. To maintain compatibility
+ with old code, you can explicitly differentiate between the by-pointer
+ function and the by-value function:
+
+ \code
+ const QPicture *picPtr = label->picture();
+ QPicture picVal = label->picture(Qt::ReturnByValue);
+ \endcode
+
+ If you disable the deprecated version using the QT_DISABLE_DEPRECATED_BEFORE
+ macro, then you can omit \c Qt::ReturnByValue as shown below:
+
+ \code
+ QPicture picVal = label->picture();
+ \endcode
+*/
+
+QPicture QLabel::picture(Qt::ReturnByValueConstant) const
+{
+ Q_D(const QLabel);
+ if (d->picture)
+ return *(d->picture);
+ return QPicture();
+}
#endif
@@ -352,9 +388,27 @@ void QLabel::clear()
/*!
\property QLabel::pixmap
- \brief the label's pixmap
+ \brief the label's pixmap.
- If no pixmap has been set this will return nullptr.
+ Previously, Qt provided a version of \c pixmap() which returned the pixmap
+ by-pointer. That version is now deprecated. To maintain compatibility
+ with old code, you can explicitly differentiate between the by-pointer
+ function and the by-value function:
+
+ \code
+ const QPixmap *pixmapPtr = label->pixmap();
+ QPixmap pixmapVal = label->pixmap(Qt::ReturnByValue);
+ \endcode
+
+ If you disable the deprecated version using the QT_DISABLE_DEPRECATED_BEFORE
+ macro, then you can omit \c Qt::ReturnByValue as shown below:
+
+ \code
+ QPixmap pixmapVal = label->pixmap();
+ \endcode
+
+ If no pixmap has been set, the deprecated getter function will return
+ \c nullptr.
Setting the pixmap clears any previous content. The buddy
shortcut, if any, is disabled.
@@ -373,11 +427,29 @@ void QLabel::setPixmap(const QPixmap &pixmap)
d->updateLabel();
}
+#if QT_DEPRECATED_SINCE(5, 15)
+/*!
+ \deprecated
+
+ New code should use the other overload which returns QPixmap by-value.
+*/
const QPixmap *QLabel::pixmap() const
{
Q_D(const QLabel);
return d->pixmap;
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/*!
+ \since 5.15
+*/
+QPixmap QLabel::pixmap(Qt::ReturnByValueConstant) const
+{
+ Q_D(const QLabel);
+ if (d->pixmap)
+ return *(d->pixmap);
+ return QPixmap();
+}
#ifndef QT_NO_PICTURE
/*!
diff --git a/src/widgets/widgets/qlabel.h b/src/widgets/widgets/qlabel.h
index 2f5db5a7d3..c9552efd8a 100644
--- a/src/widgets/widgets/qlabel.h
+++ b/src/widgets/widgets/qlabel.h
@@ -72,9 +72,25 @@ public:
~QLabel();
QString text() const;
- const QPixmap *pixmap() const;
+
+#if QT_DEPRECATED_SINCE(5,15)
+ QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QPixmap by-value")
+ const QPixmap *pixmap() const; // ### Qt 7: Remove function
+
+ QPixmap pixmap(Qt::ReturnByValueConstant) const;
+#else
+ QPixmap pixmap(Qt::ReturnByValueConstant = Qt::ReturnByValue) const; // ### Qt 7: Remove arg
+#endif // QT_DEPRECATED_SINCE(5,15)
+
#ifndef QT_NO_PICTURE
- const QPicture *picture() const;
+# if QT_DEPRECATED_SINCE(5,15)
+ QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QPicture by-value")
+ const QPicture *picture() const; // ### Qt 7: Remove function
+
+ QPicture picture(Qt::ReturnByValueConstant) const;
+# else
+ QPicture picture(Qt::ReturnByValueConstant = Qt::ReturnByValue) const; // ### Qt 7: Remove arg
+# endif // QT_DEPRECATED_SINCE(5,15)
#endif
#if QT_CONFIG(movie)
QMovie *movie() const;
diff --git a/src/widgets/widgets/qlcdnumber.cpp b/src/widgets/widgets/qlcdnumber.cpp
index 282714843c..3ddada4514 100644
--- a/src/widgets/widgets/qlcdnumber.cpp
+++ b/src/widgets/widgets/qlcdnumber.cpp
@@ -51,7 +51,7 @@ class QLCDNumberPrivate : public QFramePrivate
public:
void init();
void internalSetString(const QString& s);
- void drawString(const QString& s, QPainter &, QBitArray * = 0, bool = true);
+ void drawString(const QString& s, QPainter &, QBitArray * = nullptr, bool = true);
//void drawString(const QString &, QPainter &, QBitArray * = 0) const;
void drawDigit(const QPoint &, QPainter &, int, char, char = ' ');
void drawSegment(const QPoint &, char, QPainter &, int, bool = false);
@@ -212,7 +212,7 @@ static QString double2string(double num, int base, int ndigits, bool *oflow)
*oflow = true;
return s;
}
- s = int2string((int)num, base, ndigits, 0);
+ s = int2string((int)num, base, ndigits, nullptr);
} else { // decimal base
int nd = ndigits;
do {
@@ -706,7 +706,7 @@ void QLCDNumber::paintEvent(QPaintEvent *)
if (d->smallPoint)
d->drawString(d->digitStr, p, &d->points, false);
else
- d->drawString(d->digitStr, p, 0, false);
+ d->drawString(d->digitStr, p, nullptr, false);
}
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 658315028a..19a95be0ff 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -274,7 +274,7 @@ QLineEdit::QLineEdit(QWidget* parent)
\sa text(), setMaxLength()
*/
QLineEdit::QLineEdit(const QString& contents, QWidget* parent)
- : QWidget(*new QLineEditPrivate, parent, 0)
+ : QWidget(*new QLineEditPrivate, parent, { })
{
Q_D(QLineEdit);
d->init(contents);
@@ -446,7 +446,7 @@ void QLineEdit::addAction(QAction *action, ActionPosition position)
{
Q_D(QLineEdit);
QWidget::addAction(action);
- d->addAction(action, 0, position);
+ d->addAction(action, nullptr, position);
}
/*!
@@ -640,15 +640,15 @@ void QLineEdit::setCompleter(QCompleter *c)
if (c == d->control->completer())
return;
if (d->control->completer()) {
- disconnect(d->control->completer(), 0, this, 0);
- d->control->completer()->setWidget(0);
+ disconnect(d->control->completer(), nullptr, this, nullptr);
+ d->control->completer()->setWidget(nullptr);
if (d->control->completer()->parent() == this)
delete d->control->completer();
}
d->control->setCompleter(c);
if (!c)
return;
- if (c->widget() == 0)
+ if (c->widget() == nullptr)
c->setWidget(this);
if (hasFocus()) {
QObject::connect(d->control->completer(), SIGNAL(activated(QString)),
@@ -683,7 +683,7 @@ QSize QLineEdit::sizeHint() const
Q_D(const QLineEdit);
ensurePolished();
QFontMetrics fm(font());
- const int iconSize = style()->pixelMetric(QStyle::PM_SmallIconSize, 0, this);
+ const int iconSize = style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, this);
const QMargins tm = d->effectiveTextMargins();
int h = qMax(fm.height(), qMax(14, iconSize - 2)) + 2 * QLineEditPrivate::verticalMargin
+ tm.top() + tm.bottom()
@@ -1214,8 +1214,8 @@ QMargins QLineEdit::textMargins() const
\row \li \c a \li ASCII alphabetic character permitted but not required.
\row \li \c N \li ASCII alphanumeric character required. A-Z, a-z, 0-9.
\row \li \c n \li ASCII alphanumeric character permitted but not required.
- \row \li \c X \li Any character required.
- \row \li \c x \li Any character permitted but not required.
+ \row \li \c X \li Any non-blank character required.
+ \row \li \c x \li Any non-blank character permitted but not required.
\row \li \c 9 \li ASCII digit required. 0-9.
\row \li \c 0 \li ASCII digit permitted but not required.
\row \li \c D \li ASCII digit required. 1-9.
@@ -1951,7 +1951,7 @@ void QLineEdit::focusOutEvent(QFocusEvent *e)
#endif
#if QT_CONFIG(completer)
if (d->control->completer()) {
- QObject::disconnect(d->control->completer(), 0, this, 0);
+ QObject::disconnect(d->control->completer(), nullptr, this, nullptr);
}
#endif
QWidget::focusOutEvent(e);
@@ -2190,7 +2190,7 @@ QMenu *QLineEdit::createStandardContextMenu()
Q_D(QLineEdit);
QMenu *popup = new QMenu(this);
popup->setObjectName(QLatin1String("qt_edit_menu"));
- QAction *action = 0;
+ QAction *action = nullptr;
if (!isReadOnly()) {
action = popup->addAction(QLineEdit::tr("&Undo") + ACCEL_KEY(QKeySequence::Undo));
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index d2b5f87906..feb34ef403 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -487,7 +487,7 @@ QLineEditPrivate::SideWidgetParameters QLineEditPrivate::sideWidgetParameters()
{
Q_Q(const QLineEdit);
SideWidgetParameters result;
- result.iconSize = q->style()->pixelMetric(QStyle::PM_SmallIconSize, 0, q);
+ result.iconSize = q->style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, q);
result.margin = result.iconSize / 4;
result.widgetWidth = result.iconSize + 6;
result.widgetHeight = result.iconSize + 2;
@@ -566,12 +566,12 @@ QWidget *QLineEditPrivate::addAction(QAction *newAction, QAction *before, QLineE
{
Q_Q(QLineEdit);
if (!newAction)
- return 0;
+ return nullptr;
if (!hasSideWidgets()) { // initial setup.
QObject::connect(q, SIGNAL(textChanged(QString)), q, SLOT(_q_textChanged(QString)));
lastTextSize = q->text().size();
}
- QWidget *w = 0;
+ QWidget *w = nullptr;
// Store flags about QWidgetAction here since removeAction() may be called from ~QAction,
// in which a qobject_cast<> no longer works.
#if QT_CONFIG(action)
diff --git a/src/widgets/widgets/qlineedit_p.h b/src/widgets/widgets/qlineedit_p.h
index a11fea6bbe..5ae402b992 100644
--- a/src/widgets/widgets/qlineedit_p.h
+++ b/src/widgets/widgets/qlineedit_p.h
@@ -151,7 +151,7 @@ public:
};
QLineEditPrivate()
- : control(0), frame(1), contextMenuEnabled(1), cursorVisible(0),
+ : control(nullptr), frame(1), contextMenuEnabled(1), cursorVisible(0),
dragEnabled(0), clickCausedFocus(0), edited(0), hscroll(0), vscroll(0),
alignment(Qt::AlignLeading | Qt::AlignVCenter),
textMargins{0, 0, 0, 0},
diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
index 88baf0410b..f261314c64 100644
--- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
+++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
@@ -138,7 +138,7 @@ QMacCocoaViewContainerPrivate::~QMacCocoaViewContainerPrivate()
*/
QMacCocoaViewContainer::QMacCocoaViewContainer(NSView *view, QWidget *parent)
- : QWidget(*new QMacCocoaViewContainerPrivate, parent, 0)
+ : QWidget(*new QMacCocoaViewContainerPrivate, parent, {})
{
// Ensures that we have a QWindow, even if we're not a top level widget
setAttribute(Qt::WA_NativeWindow);
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index e3dbe763e5..4f94b81b19 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -78,7 +78,7 @@ class QMainWindowPrivate : public QWidgetPrivate
Q_DECLARE_PUBLIC(QMainWindow)
public:
inline QMainWindowPrivate()
- : layout(0), explicitIconSize(false), toolButtonStyle(Qt::ToolButtonIconOnly)
+ : layout(nullptr), explicitIconSize(false), toolButtonStyle(Qt::ToolButtonIconOnly)
#ifdef Q_OS_OSX
, useUnifiedToolBar(false)
#endif
@@ -94,7 +94,7 @@ public:
static inline QMainWindowLayout *mainWindowLayout(const QMainWindow *mainWindow)
{
- return mainWindow ? mainWindow->d_func()->layout : static_cast<QMainWindowLayout *>(0);
+ return mainWindow ? mainWindow->d_func()->layout : static_cast<QMainWindowLayout *>(nullptr);
}
};
@@ -152,10 +152,10 @@ void QMainWindowPrivate::init()
topLayout->addItem(layout, 1, 1);
#else
- layout = new QMainWindowLayout(q, 0);
+ layout = new QMainWindowLayout(q, nullptr);
#endif
- const int metric = q->style()->pixelMetric(QStyle::PM_ToolBarIconSize, 0, q);
+ const int metric = q->style()->pixelMetric(QStyle::PM_ToolBarIconSize, nullptr, q);
iconSize = QSize(metric, metric);
q->setAttribute(Qt::WA_Hover);
}
@@ -452,7 +452,7 @@ void QMainWindow::setIconSize(const QSize &iconSize)
Q_D(QMainWindow);
QSize sz = iconSize;
if (!sz.isValid()) {
- const int metric = style()->pixelMetric(QStyle::PM_ToolBarIconSize, 0, this);
+ const int metric = style()->pixelMetric(QStyle::PM_ToolBarIconSize, nullptr, this);
sz = QSize(metric, metric);
}
if (d->iconSize != sz) {
@@ -652,8 +652,8 @@ QWidget *QMainWindow::takeCentralWidget()
Q_D(QMainWindow);
QWidget *oldcentralwidget = d->layout->centralWidget();
if (oldcentralwidget) {
- oldcentralwidget->setParent(0);
- d->layout->setCentralWidget(0);
+ oldcentralwidget->setParent(nullptr);
+ d->layout->setCentralWidget(nullptr);
}
return oldcentralwidget;
}
@@ -1480,7 +1480,7 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event)
QMenu *QMainWindow::createPopupMenu()
{
Q_D(QMainWindow);
- QMenu *menu = 0;
+ QMenu *menu = nullptr;
#if QT_CONFIG(dockwidget)
QList<QDockWidget *> dockwidgets = findChildren<QDockWidget *>();
if (dockwidgets.size()) {
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index 0fb3a86cf8..30562d8270 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -101,14 +101,14 @@ static void dumpLayout(QTextStream &qout, const QDockAreaLayoutItem &item, QStri
<< " gap:" << (item.flags & QDockAreaLayoutItem::GapItem)
<< " keepSize:" << (item.flags & QDockAreaLayoutItem::KeepSize) << '\n';
indent += QLatin1String(" ");
- if (item.widgetItem != 0) {
+ if (item.widgetItem != nullptr) {
qout << indent << "widget: "
<< item.widgetItem->widget()->metaObject()->className()
<< " \"" << item.widgetItem->widget()->windowTitle() << "\"\n";
- } else if (item.subinfo != 0) {
+ } else if (item.subinfo != nullptr) {
qout << indent << "subinfo:\n";
dumpLayout(qout, *item.subinfo, indent + QLatin1String(" "));
- } else if (item.placeHolderItem != 0) {
+ } else if (item.placeHolderItem != nullptr) {
QRect r = item.placeHolderItem->topLevelRect;
qout << indent << "placeHolder: "
<< "pos: " << item.pos << " size:" << item.size
@@ -272,7 +272,7 @@ public:
int frameWidth() const
{
return nativeWindowDeco() ? 0 :
- parentWidget()->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, parentWidget());
+ parentWidget()->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, nullptr, parentWidget());
}
QDockWidgetGroupWindow *groupWindow() const
@@ -727,7 +727,7 @@ void QMainWindowLayoutState::deleteCentralWidgetItem()
{
#if QT_CONFIG(dockwidget)
delete dockAreaLayout.centralWidgetItem;
- dockAreaLayout.centralWidgetItem = 0;
+ dockAreaLayout.centralWidgetItem = nullptr;
#else
delete centralWidgetItem;
centralWidgetItem = 0;
@@ -749,7 +749,7 @@ QLayoutItem *QMainWindowLayoutState::itemAt(int index, int *x) const
return centralWidgetItem;
#endif
- return 0;
+ return nullptr;
}
QLayoutItem *QMainWindowLayoutState::takeAt(int index, int *x)
@@ -770,7 +770,7 @@ QLayoutItem *QMainWindowLayoutState::takeAt(int index, int *x)
}
#endif
- return 0;
+ return nullptr;
}
QList<int> QMainWindowLayoutState::indexOf(QWidget *widget) const
@@ -803,7 +803,7 @@ QList<int> QMainWindowLayoutState::indexOf(QWidget *widget) const
bool QMainWindowLayoutState::contains(QWidget *widget) const
{
#if QT_CONFIG(dockwidget)
- if (dockAreaLayout.centralWidgetItem != 0 && dockAreaLayout.centralWidgetItem->widget() == widget)
+ if (dockAreaLayout.centralWidgetItem != nullptr && dockAreaLayout.centralWidgetItem->widget() == widget)
return true;
if (!dockAreaLayout.indexOf(widget).isEmpty())
return true;
@@ -821,11 +821,11 @@ bool QMainWindowLayoutState::contains(QWidget *widget) const
void QMainWindowLayoutState::setCentralWidget(QWidget *widget)
{
- QLayoutItem *item = 0;
+ QLayoutItem *item = nullptr;
//make sure we remove the widget
deleteCentralWidgetItem();
- if (widget != 0)
+ if (widget != nullptr)
item = new QWidgetItemV2(widget);
#if QT_CONFIG(dockwidget)
@@ -837,7 +837,7 @@ void QMainWindowLayoutState::setCentralWidget(QWidget *widget)
QWidget *QMainWindowLayoutState::centralWidget() const
{
- QLayoutItem *item = 0;
+ QLayoutItem *item = nullptr;
#if QT_CONFIG(dockwidget)
item = dockAreaLayout.centralWidgetItem;
@@ -845,9 +845,9 @@ QWidget *QMainWindowLayoutState::centralWidget() const
item = centralWidgetItem;
#endif
- if (item != 0)
+ if (item != nullptr)
return item->widget();
- return 0;
+ return nullptr;
}
QList<int> QMainWindowLayoutState::gapIndex(QWidget *widget,
@@ -978,7 +978,7 @@ QLayoutItem *QMainWindowLayoutState::item(const QList<int> &path)
return dockAreaLayout.item(path.mid(1)).widgetItem;
#endif // QT_CONFIG(dockwidget)
- return 0;
+ return nullptr;
}
QRect QMainWindowLayoutState::itemRect(const QList<int> &path) const
@@ -1029,7 +1029,7 @@ QLayoutItem *QMainWindowLayoutState::plug(const QList<int> &path)
return dockAreaLayout.plug(path.mid(1));
#endif // QT_CONFIG(dockwidget)
- return 0;
+ return nullptr;
}
QLayoutItem *QMainWindowLayoutState::unplug(const QList<int> &path, QMainWindowLayoutState *other)
@@ -1040,7 +1040,7 @@ QLayoutItem *QMainWindowLayoutState::unplug(const QList<int> &path, QMainWindowL
Q_UNUSED(other);
#else
if (i == 0)
- return toolBarAreaLayout.unplug(path.mid(1), other ? &other->toolBarAreaLayout : 0);
+ return toolBarAreaLayout.unplug(path.mid(1), other ? &other->toolBarAreaLayout : nullptr);
#endif
#if QT_CONFIG(dockwidget)
@@ -1048,7 +1048,7 @@ QLayoutItem *QMainWindowLayoutState::unplug(const QList<int> &path, QMainWindowL
return dockAreaLayout.unplug(path.mid(1));
#endif // QT_CONFIG(dockwidget)
- return 0;
+ return nullptr;
}
void QMainWindowLayoutState::saveState(QDataStream &stream) const
@@ -1198,7 +1198,7 @@ bool QMainWindowLayoutState::restoreState(QDataStream &_stream,
continue;
}
QDockAreaLayoutInfo *info = dockAreaLayout.info(oldPath);
- if (info == 0) {
+ if (info == nullptr) {
continue;
}
info->item_list.append(QDockAreaLayoutItem(new QDockWidgetItem(w)));
@@ -1249,7 +1249,7 @@ bool QMainWindowLayoutState::restoreState(QDataStream &_stream,
if (oldPath.isEmpty()) {
continue;
}
- toolBarAreaLayout.docks[oldPath.at(0)].insertToolBar(0, w);
+ toolBarAreaLayout.docks[oldPath.at(0)].insertToolBar(nullptr, w);
}
}
}
@@ -1755,7 +1755,7 @@ void QMainWindowTabBar::mouseReleaseEvent(QMouseEvent *e)
if (dockPriv->state && dockPriv->state->dragging) {
dockPriv->endDrag();
}
- draggingDock = 0;
+ draggingDock = nullptr;
}
QTabBar::mouseReleaseEvent(e);
}
@@ -1780,7 +1780,7 @@ bool QMainWindowTabBar::event(QEvent *e)
QTabBar *QMainWindowLayout::getTabBar()
{
- QTabBar *result = 0;
+ QTabBar *result = nullptr;
if (!unusedTabBars.isEmpty()) {
result = unusedTabBars.takeLast();
} else {
@@ -1800,7 +1800,7 @@ QTabBar *QMainWindowLayout::getTabBar()
// Allocates a new separator widget if needed
QWidget *QMainWindowLayout::getSeparatorWidget()
{
- QWidget *result = 0;
+ QWidget *result = nullptr;
if (!unusedSeparatorWidgets.isEmpty()) {
result = unusedSeparatorWidgets.takeLast();
} else {
@@ -1829,16 +1829,16 @@ QDockAreaLayoutInfo *QMainWindowLayout::dockInfo(QWidget *widget)
if (info)
return info;
}
- return 0;
+ return nullptr;
}
void QMainWindowLayout::tabChanged()
{
QTabBar *tb = qobject_cast<QTabBar*>(sender());
- if (tb == 0)
+ if (tb == nullptr)
return;
QDockAreaLayoutInfo *info = dockInfo(tb);
- if (info == 0)
+ if (info == nullptr)
return;
QDockWidget *activated = info->apply(false);
@@ -1866,7 +1866,7 @@ void QMainWindowLayout::tabMoved(int from, int to)
void QMainWindowLayout::raise(QDockWidget *widget)
{
QDockAreaLayoutInfo *info = dockInfo(widget);
- if (info == 0)
+ if (info == nullptr)
return;
if (!info->tabbed)
return;
@@ -1897,7 +1897,7 @@ QLayoutItem *QMainWindowLayout::itemAt(int index) const
if (statusbar && x++ == index)
return statusbar;
- return 0;
+ return nullptr;
}
QLayoutItem *QMainWindowLayout::takeAt(int index)
@@ -1909,7 +1909,7 @@ QLayoutItem *QMainWindowLayout::takeAt(int index)
if (QWidget *w = ret->widget()) {
widgetAnimator.abort(w);
if (w == pluggingWidget)
- pluggingWidget = 0;
+ pluggingWidget = nullptr;
}
if (savedState.isValid() ) {
@@ -1934,11 +1934,11 @@ QLayoutItem *QMainWindowLayout::takeAt(int index)
if (statusbar && x++ == index) {
QLayoutItem *ret = statusbar;
- statusbar = 0;
+ statusbar = nullptr;
return ret;
}
- return 0;
+ return nullptr;
}
void QMainWindowLayout::setGeometry(const QRect &_r)
@@ -2033,7 +2033,7 @@ static void fixToolBarOrientation(QLayoutItem *item, int dockPos)
{
#if QT_CONFIG(toolbar)
QToolBar *toolBar = qobject_cast<QToolBar*>(item->widget());
- if (toolBar == 0)
+ if (toolBar == nullptr)
return;
QRect oldGeo = toolBar->geometry();
@@ -2146,7 +2146,7 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem)
if (layout->nativeWindowDeco()) {
globalRect.adjust(0, layout->titleHeight(), 0, 0);
} else {
- int fw = widget->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, widget);
+ int fw = widget->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, nullptr, widget);
globalRect.adjust(-fw, -fw, fw, fw);
}
}
@@ -2214,7 +2214,7 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
QDockAreaLayoutItem &item = dstParentInfo->item_list[idx];
Q_ASSERT(item.widgetItem->widget() == dwgw);
delete item.widgetItem;
- item.widgetItem = 0;
+ item.widgetItem = nullptr;
item.subinfo = new QDockAreaLayoutInfo(std::move(*srcInfo));
*srcInfo = QDockAreaLayoutInfo();
item.subinfo->reparentWidgets(currentHoveredFloat ? currentHoveredFloat.data()
@@ -2238,7 +2238,7 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
savedState.clear();
currentGapPos.clear();
- pluggingWidget = 0;
+ pluggingWidget = nullptr;
#if QT_CONFIG(dockwidget)
setCurrentHoveredFloat(nullptr);
#endif
@@ -2283,16 +2283,16 @@ void QMainWindowLayout::restore(bool keepSavedState)
if (!keepSavedState)
savedState.clear();
currentGapPos.clear();
- pluggingWidget = 0;
+ pluggingWidget = nullptr;
updateGapIndicator();
}
QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLayout)
- : QLayout(parentLayout ? static_cast<QWidget *>(0) : mainwindow)
+ : QLayout(parentLayout ? static_cast<QWidget *>(nullptr) : mainwindow)
, layoutState(mainwindow)
, savedState(mainwindow)
, dockOptions(QMainWindow::AnimatedDocks | QMainWindow::AllowTabbedDocks)
- , statusbar(0)
+ , statusbar(nullptr)
#if QT_CONFIG(dockwidget)
#if QT_CONFIG(tabbar)
, _documentMode(false)
@@ -2303,14 +2303,14 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLay
#endif
#endif // QT_CONFIG(dockwidget)
, widgetAnimator(this)
- , pluggingWidget(0)
+ , pluggingWidget(nullptr)
{
if (parentLayout)
setParent(parentLayout);
#if QT_CONFIG(dockwidget)
#if QT_CONFIG(tabbar)
- sep = mainwindow->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, 0, mainwindow);
+ sep = mainwindow->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, nullptr, mainwindow);
#endif
#if QT_CONFIG(tabwidget)
@@ -2318,7 +2318,7 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLay
tabPositions[i] = QTabWidget::South;
#endif
#endif // QT_CONFIG(dockwidget)
- pluggingWidget = 0;
+ pluggingWidget = nullptr;
setObjectName(mainwindow->objectName() + QLatin1String("_layout"));
}
@@ -2354,7 +2354,7 @@ void QMainWindowLayout::setStatusBar(QStatusBar *sb)
if (sb)
addChildWidget(sb);
delete statusbar;
- statusbar = sb ? new QWidgetItemV2(sb) : 0;
+ statusbar = sb ? new QWidgetItemV2(sb) : nullptr;
invalidate();
}
#endif // QT_CONFIG(statusbar)
@@ -2366,7 +2366,7 @@ QWidget *QMainWindowLayout::centralWidget() const
void QMainWindowLayout::setCentralWidget(QWidget *widget)
{
- if (widget != 0)
+ if (widget != nullptr)
addChildWidget(widget);
layoutState.setCentralWidget(widget);
if (savedState.isValid()) {
@@ -2453,7 +2453,7 @@ QLayoutItem *QMainWindowLayout::unplug(QWidget *widget, bool group)
#endif
QList<int> path = layoutState.indexOf(widget);
if (path.isEmpty())
- return 0;
+ return nullptr;
QLayoutItem *item = layoutState.item(path);
if (widget->isWindow())
@@ -2561,7 +2561,7 @@ static QTabBar::Shape tabwidgetPositionToTabBarShape(QWidget *w)
void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
{
if (!parentWidget()->isVisible() || parentWidget()->isMinimized()
- || pluggingWidget != 0 || widgetItem == 0)
+ || pluggingWidget != nullptr || widgetItem == nullptr)
return;
QWidget *widget = widgetItem->widget();
diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h
index f882908708..d4f0bd4517 100644
--- a/src/widgets/widgets/qmainwindowlayout_p.h
+++ b/src/widgets/widgets/qmainwindowlayout_p.h
@@ -338,7 +338,7 @@ class QDockWidgetGroupWindow : public QWidget
{
Q_OBJECT
public:
- explicit QDockWidgetGroupWindow(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr)
+ explicit QDockWidgetGroupWindow(QWidget* parent = nullptr, Qt::WindowFlags f = { })
: QWidget(parent, f) {}
QDockAreaLayoutInfo *layoutInfo() const;
#if QT_CONFIG(tabbar)
diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp
index 6e3de1b1ff..da6eb47372 100644
--- a/src/widgets/widgets/qmdiarea.cpp
+++ b/src/widgets/widgets/qmdiarea.cpp
@@ -103,8 +103,8 @@
\fn void QMdiArea::subWindowActivated(QMdiSubWindow *window)
QMdiArea emits this signal after \a window has been activated. When \a
- window is 0, QMdiArea has just deactivated its last active window, and
- there are no active windows on the workspace.
+ window is \nullptr, QMdiArea has just deactivated its last active window,
+ and there are no active windows on the workspace.
\sa QMdiArea::activeSubWindow()
*/
@@ -245,7 +245,7 @@ static inline bool useScrollBar(const QRect &childrenRect, const QSize &maxViewp
static inline QMdiArea *mdiAreaParent(QWidget *widget)
{
if (!widget)
- return 0;
+ return nullptr;
QWidget *parent = widget->parentWidget();
while (parent) {
@@ -253,7 +253,7 @@ static inline QMdiArea *mdiAreaParent(QWidget *widget)
return area;
parent = parent->parentWidget();
}
- return 0;
+ return nullptr;
}
#if QT_CONFIG(tabwidget)
@@ -352,7 +352,7 @@ void SimpleCascader::rearrange(QList<QWidget *> &widgets, const QRect &domain) c
int titleBarHeight = widgets.at(0)->style()->pixelMetric(QStyle::PM_TitleBarHeight, &options, widgets.at(0));
const QFontMetrics fontMetrics = QFontMetrics(QApplication::font("QMdiSubWindowTitleBar"));
const int dy = qMax(titleBarHeight - (titleBarHeight - fontMetrics.height()) / 2, 1)
- + widgets.at(0)->style()->pixelMetric(QStyle::PM_FocusFrameVMargin, 0, widgets.at(0));
+ + widgets.at(0)->style()->pixelMetric(QStyle::PM_FocusFrameVMargin, nullptr, widgets.at(0));
const int n = widgets.size();
const int nrows = qMax((domain.height() - (topOffset + bottomOffset)) / dy, 1);
@@ -648,7 +648,7 @@ void QMdiAreaTabBar::contextMenuEvent(QContextMenuEvent *event)
QMdiSubWindow *QMdiAreaTabBar::subWindowFromIndex(int index) const
{
if (index < 0 || index >= count())
- return 0;
+ return nullptr;
QMdiArea *mdiArea = qobject_cast<QMdiArea *>(parentWidget());
Q_ASSERT(mdiArea);
@@ -667,15 +667,15 @@ QMdiSubWindow *QMdiAreaTabBar::subWindowFromIndex(int index) const
\internal
*/
QMdiAreaPrivate::QMdiAreaPrivate()
- : cascader(0),
- regularTiler(0),
- iconTiler(0),
- placer(0),
+ : cascader(nullptr),
+ regularTiler(nullptr),
+ iconTiler(nullptr),
+ placer(nullptr),
#if QT_CONFIG(rubberband)
- rubberBand(0),
+ rubberBand(nullptr),
#endif
#if QT_CONFIG(tabbar)
- tabBar(0),
+ tabBar(nullptr),
#endif
activationOrder(QMdiArea::CreationOrder),
viewMode(QMdiArea::SubWindowView),
@@ -1070,7 +1070,7 @@ void QMdiAreaPrivate::emitWindowActivated(QMdiSubWindow *activeWindow)
Q_ASSERT(aboutToBecomeActive == activeWindow);
active = activeWindow;
- aboutToBecomeActive = 0;
+ aboutToBecomeActive = nullptr;
Q_ASSERT(active->d_func()->isActive);
#if QT_CONFIG(tabbar)
@@ -1093,20 +1093,20 @@ void QMdiAreaPrivate::resetActiveWindow(QMdiSubWindow *deactivatedWindow)
if (deactivatedWindow) {
if (deactivatedWindow != active)
return;
- active = 0;
+ active = nullptr;
if ((aboutToBecomeActive || isActivated || lastWindowAboutToBeDestroyed())
&& !isExplicitlyDeactivated(deactivatedWindow) && !q->window()->isMinimized()) {
return;
}
- emit q->subWindowActivated(0);
+ emit q->subWindowActivated(nullptr);
return;
}
if (aboutToBecomeActive)
return;
- active = 0;
- emit q->subWindowActivated(0);
+ active = nullptr;
+ emit q->subWindowActivated(nullptr);
}
/*!
@@ -1171,7 +1171,7 @@ void QMdiAreaPrivate::updateScrollBars()
QSize hbarExtent = hbar->sizeHint();
QSize vbarExtent = vbar->sizeHint();
- if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, 0, q)) {
+ if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, nullptr, q)) {
const int doubleFrameWidth = frameWidth * 2;
if (hbarpolicy == Qt::ScrollBarAlwaysOn)
maxSize.rheight() -= doubleFrameWidth;
@@ -1232,7 +1232,7 @@ void QMdiAreaPrivate::internalRaise(QMdiSubWindow *mdiChild) const
if (!sanityCheck(mdiChild, "QMdiArea::internalRaise") || childWindows.size() < 2)
return;
- QMdiSubWindow *stackUnderChild = 0;
+ QMdiSubWindow *stackUnderChild = nullptr;
if (!windowStaysOnTop(mdiChild)) {
const auto children = viewport->children(); // take a copy, as raising/stacking under changes the order
for (QObject *object : children) {
@@ -1282,8 +1282,8 @@ QRect QMdiAreaPrivate::resizeToMinimumTileSize(const QSize &minSubWindowSize, in
minAreaHeight += hbar->height();
if (vbar->isVisible())
minAreaWidth += vbar->width();
- if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, 0, q)) {
- const int frame = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, q);
+ if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, nullptr, q)) {
+ const int frame = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, nullptr, q);
minAreaWidth += 2 * frame;
minAreaHeight += 2 * frame;
}
@@ -1427,7 +1427,7 @@ void QMdiAreaPrivate::disconnectSubWindow(QObject *subWindow)
return;
Q_Q(QMdiArea);
- QObject::disconnect(subWindow, 0, q, 0);
+ QObject::disconnect(subWindow, nullptr, q, nullptr);
subWindow->removeEventFilter(q);
}
@@ -1438,11 +1438,11 @@ QMdiSubWindow *QMdiAreaPrivate::nextVisibleSubWindow(int increaseFactor, QMdiAre
int removedIndex, int fromIndex) const
{
if (childWindows.isEmpty())
- return 0;
+ return nullptr;
Q_Q(const QMdiArea);
const QList<QMdiSubWindow *> subWindows = q->subWindowList(order);
- QMdiSubWindow *current = 0;
+ QMdiSubWindow *current = nullptr;
if (removedIndex < 0) {
if (fromIndex >= 0 && fromIndex < subWindows.size())
@@ -1482,7 +1482,7 @@ QMdiSubWindow *QMdiAreaPrivate::nextVisibleSubWindow(int increaseFactor, QMdiAre
if (!subWindows.at(index)->isHidden())
return subWindows.at(index);
- return 0;
+ return nullptr;
}
/*!
@@ -1603,7 +1603,7 @@ void QMdiAreaPrivate::setViewMode(QMdiArea::ViewMode mode)
{ // SubWindowView
#if QT_CONFIG(tabbar)
delete tabBar;
- tabBar = 0;
+ tabBar = nullptr;
#endif // QT_CONFIG(tabbar)
viewMode = mode;
@@ -1704,7 +1704,7 @@ QMdiArea::QMdiArea(QWidget *parent)
setFrameStyle(QFrame::NoFrame);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- setViewport(0);
+ setViewport(nullptr);
setFocusPolicy(Qt::NoFocus);
QApplication::instance()->installEventFilter(this);
}
@@ -1716,16 +1716,16 @@ QMdiArea::~QMdiArea()
{
Q_D(QMdiArea);
delete d->cascader;
- d->cascader = 0;
+ d->cascader = nullptr;
delete d->regularTiler;
- d->regularTiler = 0;
+ d->regularTiler = nullptr;
delete d->iconTiler;
- d->iconTiler = 0;
+ d->iconTiler = nullptr;
delete d->placer;
- d->placer = 0;
+ d->placer = nullptr;
}
/*!
@@ -1760,8 +1760,8 @@ QSize QMdiArea::sizeHint() const
QSize QMdiArea::minimumSizeHint() const
{
Q_D(const QMdiArea);
- QSize size(style()->pixelMetric(QStyle::PM_MdiSubWindowMinimizedWidth, 0, this),
- style()->pixelMetric(QStyle::PM_TitleBarHeight, 0, this));
+ QSize size(style()->pixelMetric(QStyle::PM_MdiSubWindowMinimizedWidth, nullptr, this),
+ style()->pixelMetric(QStyle::PM_TitleBarHeight, nullptr, this));
size = size.expandedTo(QAbstractScrollArea::minimumSizeHint());
if (!d->scrollBarsEnabled()) {
for (QMdiSubWindow *child : d->childWindows) {
@@ -1965,7 +1965,7 @@ QMdiSubWindow *QMdiArea::addSubWindow(QWidget *widget, Qt::WindowFlags windowFla
{
if (Q_UNLIKELY(!widget)) {
qWarning("QMdiArea::addSubWindow: null pointer to widget");
- return 0;
+ return nullptr;
}
Q_D(QMdiArea);
@@ -2027,7 +2027,7 @@ void QMdiArea::removeSubWindow(QWidget *widget)
d->childWindows.removeAll(child);
d->indicesToActivatedChildren.removeAll(index);
d->updateActiveWindow(index, d->active == child);
- child->setParent(0);
+ child->setParent(nullptr);
return;
}
@@ -2036,7 +2036,7 @@ void QMdiArea::removeSubWindow(QWidget *widget)
if (!sanityCheck(child, "QMdiArea::removeSubWindow"))
continue;
if (child->widget() == widget) {
- child->setWidget(0);
+ child->setWidget(nullptr);
Q_ASSERT(!child->widget());
found = true;
break;
diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp
index d58a1d06db..84568c35db 100644
--- a/src/widgets/widgets/qmdisubwindow.cpp
+++ b/src/widgets/widgets/qmdisubwindow.cpp
@@ -253,7 +253,7 @@ static inline ControlElement<T> *ptr(QWidget *widget)
&& strcmp(widget->metaObject()->className(), T::staticMetaObject.className()) == 0) {
return static_cast<ControlElement<T> *>(widget);
}
- return 0;
+ return nullptr;
}
QString QMdiSubWindowPrivate::originalWindowTitle()
@@ -364,7 +364,7 @@ class ControlLabel : public QWidget
{
Q_OBJECT
public:
- ControlLabel(QMdiSubWindow *subWindow, QWidget *parent = 0);
+ ControlLabel(QMdiSubWindow *subWindow, QWidget *parent = nullptr);
QSize sizeHint() const override;
@@ -481,8 +481,8 @@ void ControlLabel::updateWindowIcon()
{
QIcon menuIcon = windowIcon();
if (menuIcon.isNull())
- menuIcon = style()->standardIcon(QStyle::SP_TitleBarMenuButton, 0, parentWidget());
- const int iconSize = style()->pixelMetric(QStyle::PM_TitleBarButtonIconSize, 0, parentWidget());
+ menuIcon = style()->standardIcon(QStyle::SP_TitleBarMenuButton, nullptr, parentWidget());
+ const int iconSize = style()->pixelMetric(QStyle::PM_TitleBarButtonIconSize, nullptr, parentWidget());
label = menuIcon.pixmap(iconSize);
update();
}
@@ -496,7 +496,7 @@ class ControllerWidget : public QWidget
{
Q_OBJECT
public:
- ControllerWidget(QMdiSubWindow *subWindow, QWidget *parent = 0);
+ ControllerWidget(QMdiSubWindow *subWindow, QWidget *parent = nullptr);
QSize sizeHint() const override;
void setControlVisible(QMdiSubWindowPrivate::WindowStateAction action, bool visible);
inline bool hasVisibleControls() const
@@ -542,7 +542,7 @@ ControllerWidget::ControllerWidget(QMdiSubWindow *subWindow, QWidget *parent)
activeControl(QStyle::SC_None),
hoverControl(QStyle::SC_None),
visibleControls(QStyle::SC_None),
- mdiArea(0)
+ mdiArea(nullptr)
{
if (subWindow->parentWidget())
mdiArea = qobject_cast<QMdiArea *>(subWindow->parentWidget()->parentWidget());
@@ -697,10 +697,10 @@ void ControllerWidget::initStyleOption(QStyleOptionComplex *option) const
*/
ControlContainer::ControlContainer(QMdiSubWindow *mdiChild)
: QObject(mdiChild),
- previousLeft(0),
- previousRight(0),
+ previousLeft(nullptr),
+ previousRight(nullptr),
#if QT_CONFIG(menubar)
- m_menuBar(0),
+ m_menuBar(nullptr),
#endif
mdiChild(mdiChild)
{
@@ -725,9 +725,9 @@ ControlContainer::~ControlContainer()
removeButtonsFromMenuBar();
#endif
delete m_menuLabel;
- m_menuLabel = 0;
+ m_menuLabel = nullptr;
delete m_controllerWidget;
- m_controllerWidget = 0;
+ m_controllerWidget = nullptr;
}
#if QT_CONFIG(menubar)
@@ -741,12 +741,12 @@ QMenuBar *QMdiSubWindowPrivate::menuBar() const
#else
Q_Q(const QMdiSubWindow);
if (!q->isMaximized() || drawTitleBarWhenMaximized() || isChildOfTabbedQMdiArea(q))
- return 0;
+ return nullptr;
if (QMainWindow *mainWindow = qobject_cast<QMainWindow *>(q->window()))
return mainWindow->menuBar();
- return 0;
+ return nullptr;
#endif
}
@@ -790,50 +790,50 @@ void ControlContainer::removeButtonsFromMenuBar(QMenuBar *menuBar)
{
if (menuBar && menuBar != m_menuBar) {
// m_menubar was deleted while sub-window was maximized
- previousRight = 0;
- previousLeft = 0;
+ previousRight = nullptr;
+ previousLeft = nullptr;
m_menuBar = menuBar;
}
if (!m_menuBar || !mdiChild || qt_widget_private(mdiChild->window())->data.in_destructor)
return;
- QMdiSubWindow *child = 0;
+ QMdiSubWindow *child = nullptr;
if (m_controllerWidget) {
QWidget *currentRight = m_menuBar->cornerWidget(Qt::TopRightCorner);
if (currentRight == m_controllerWidget) {
if (ControlElement<ControllerWidget> *ce = ptr<ControllerWidget>(previousRight)) {
if (!ce->mdiChild || !ce->mdiChild->isMaximized())
- previousRight = 0;
+ previousRight = nullptr;
else
child = ce->mdiChild;
}
m_menuBar->setCornerWidget(previousRight, Qt::TopRightCorner);
if (previousRight) {
previousRight->show();
- previousRight = 0;
+ previousRight = nullptr;
}
}
m_controllerWidget->hide();
- m_controllerWidget->setParent(0);
+ m_controllerWidget->setParent(nullptr);
}
if (m_menuLabel) {
QWidget *currentLeft = m_menuBar->cornerWidget(Qt::TopLeftCorner);
if (currentLeft == m_menuLabel) {
if (ControlElement<ControlLabel> *ce = ptr<ControlLabel>(previousLeft)) {
if (!ce->mdiChild || !ce->mdiChild->isMaximized())
- previousLeft = 0;
+ previousLeft = nullptr;
else if (!child)
child = mdiChild;
}
m_menuBar->setCornerWidget(previousLeft, Qt::TopLeftCorner);
if (previousLeft) {
previousLeft->show();
- previousLeft = 0;
+ previousLeft = nullptr;
}
}
m_menuLabel->hide();
- m_menuLabel->setParent(0);
+ m_menuLabel->setParent(nullptr);
}
m_menuBar->update();
if (child)
@@ -854,14 +854,14 @@ void ControlContainer::updateWindowIcon(const QIcon &windowIcon)
\internal
*/
QMdiSubWindowPrivate::QMdiSubWindowPrivate()
- : baseWidget(0),
- restoreFocusWidget(0),
- controlContainer(0),
+ : baseWidget(nullptr),
+ restoreFocusWidget(nullptr),
+ controlContainer(nullptr),
#if QT_CONFIG(sizegrip)
- sizeGrip(0),
+ sizeGrip(nullptr),
#endif
#if QT_CONFIG(rubberband)
- rubberBand(0),
+ rubberBand(nullptr),
#endif
userMinimumSize(0,0),
resizeEnabled(true),
@@ -926,7 +926,7 @@ void QMdiSubWindowPrivate::_q_enterInteractiveMode()
pressPos = QPoint(q->width() / 2, titleBarHeight() - 1);
} else if (actions[ResizeAction] && actions[ResizeAction] == action) {
currentOperation = q->isLeftToRight() ? BottomRightResize : BottomLeftResize;
- int offset = q->style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, q) / 2;
+ int offset = q->style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, nullptr, q) / 2;
int x = q->isLeftToRight() ? q->width() - offset : offset;
pressPos = QPoint(x, q->height() - offset);
} else {
@@ -1009,8 +1009,8 @@ void QMdiSubWindowPrivate::removeBaseWidget()
lastChildWindowTitle.clear();
// QTBUG-47993: parent widget can be reset before this call
if (baseWidget->parentWidget() == q)
- baseWidget->setParent(0);
- baseWidget = 0;
+ baseWidget->setParent(nullptr);
+ baseWidget = nullptr;
isWidgetHiddenByUs = false;
}
@@ -1047,19 +1047,19 @@ void QMdiSubWindowPrivate::createSystemMenu()
systemMenu->installEventFilter(q);
const QStyle *style = q->style();
addToSystemMenu(RestoreAction, QMdiSubWindow::tr("&Restore"), SLOT(showNormal()));
- actions[RestoreAction]->setIcon(style->standardIcon(QStyle::SP_TitleBarNormalButton, 0, q));
+ actions[RestoreAction]->setIcon(style->standardIcon(QStyle::SP_TitleBarNormalButton, nullptr, q));
actions[RestoreAction]->setEnabled(false);
addToSystemMenu(MoveAction, QMdiSubWindow::tr("&Move"), SLOT(_q_enterInteractiveMode()));
addToSystemMenu(ResizeAction, QMdiSubWindow::tr("&Size"), SLOT(_q_enterInteractiveMode()));
addToSystemMenu(MinimizeAction, QMdiSubWindow::tr("Mi&nimize"), SLOT(showMinimized()));
- actions[MinimizeAction]->setIcon(style->standardIcon(QStyle::SP_TitleBarMinButton, 0, q));
+ actions[MinimizeAction]->setIcon(style->standardIcon(QStyle::SP_TitleBarMinButton, nullptr, q));
addToSystemMenu(MaximizeAction, QMdiSubWindow::tr("Ma&ximize"), SLOT(showMaximized()));
- actions[MaximizeAction]->setIcon(style->standardIcon(QStyle::SP_TitleBarMaxButton, 0, q));
+ actions[MaximizeAction]->setIcon(style->standardIcon(QStyle::SP_TitleBarMaxButton, nullptr, q));
addToSystemMenu(StayOnTopAction, QMdiSubWindow::tr("Stay on &Top"), SLOT(_q_updateStaysOnTopHint()));
actions[StayOnTopAction]->setCheckable(true);
systemMenu->addSeparator();
addToSystemMenu(CloseAction, QMdiSubWindow::tr("&Close"), SLOT(close()));
- actions[CloseAction]->setIcon(style->standardIcon(QStyle::SP_TitleBarCloseButton, 0, q));
+ actions[CloseAction]->setIcon(style->standardIcon(QStyle::SP_TitleBarCloseButton, nullptr, q));
#if !defined(QT_NO_SHORTCUT)
actions[CloseAction]->setShortcuts(QKeySequence::Close);
#endif
@@ -1461,7 +1461,7 @@ void QMdiSubWindowPrivate::setActive(bool activate, bool changeFocus)
ensureWindowState(Qt::WindowActive);
}
- int frameWidth = q->style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, q);
+ int frameWidth = q->style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, nullptr, q);
int titleBarHeight = this->titleBarHeight();
QRegion windowDecoration = QRegion(0, 0, q->width(), q->height());
windowDecoration -= QRegion(frameWidth, titleBarHeight, q->width() - 2 * frameWidth,
@@ -1543,7 +1543,7 @@ QRegion QMdiSubWindowPrivate::getRegion(Operation operation) const
int width = q->width();
int height = q->height();
int titleBarHeight = this->titleBarHeight();
- int frameWidth = q->style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, q);
+ int frameWidth = q->style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, nullptr, q);
int cornerConst = titleBarHeight - frameWidth;
int titleBarConst = 2 * titleBarHeight;
@@ -1738,7 +1738,7 @@ void QMdiSubWindowPrivate::sizeParameters(int *margin, int *minWidth) const
if (q->isMaximized() && !drawTitleBarWhenMaximized())
*margin = 0;
else
- *margin = q->style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, q);
+ *margin = q->style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, nullptr, q);
QStyleOptionTitleBar opt = this->titleBarOptions();
int tempWidth = 0;
@@ -1767,7 +1767,7 @@ bool QMdiSubWindowPrivate::drawTitleBarWhenMaximized() const
if (isChildOfTabbedQMdiArea(q))
return false;
- if (q->style()->styleHint(QStyle::SH_Workspace_FillSpaceOnMaximize, 0, q))
+ if (q->style()->styleHint(QStyle::SH_Workspace_FillSpaceOnMaximize, nullptr, q))
return true;
#if !QT_CONFIG(menubar) || !QT_CONFIG(mainwindow)
Q_UNUSED(isChildOfQMdiSubWindow);
@@ -1833,7 +1833,7 @@ void QMdiSubWindowPrivate::removeButtonsFromMenuBar()
if (!controlContainer || isChildOfTabbedQMdiArea(q))
return;
- QMenuBar *currentMenuBar = 0;
+ QMenuBar *currentMenuBar = nullptr;
#if QT_CONFIG(mainwindow)
if (QMainWindow *mainWindow = qobject_cast<QMainWindow *>(q->window())) {
// NB! We can't use menuBar() here because that one will actually create
@@ -1863,7 +1863,7 @@ void QMdiSubWindowPrivate::updateWindowTitle(bool isRequestFromChild)
return;
}
- QWidget *titleWidget = 0;
+ QWidget *titleWidget = nullptr;
if (isRequestFromChild)
titleWidget = baseWidget;
else
@@ -2131,7 +2131,7 @@ QSize QMdiSubWindowPrivate::iconSize() const
Q_Q(const QMdiSubWindow);
if (!parent || q->windowFlags() & Qt::FramelessWindowHint)
return QSize(-1, -1);
- return QSize(q->style()->pixelMetric(QStyle::PM_MdiSubWindowMinimizedWidth, 0, q), titleBarHeight());
+ return QSize(q->style()->pixelMetric(QStyle::PM_MdiSubWindowMinimizedWidth, nullptr, q), titleBarHeight());
}
#if QT_CONFIG(sizegrip)
@@ -2212,7 +2212,7 @@ void QMdiSubWindowPrivate::updateInternalWindowTitle()
\sa QMdiArea::addSubWindow()
*/
QMdiSubWindow::QMdiSubWindow(QWidget *parent, Qt::WindowFlags flags)
- : QWidget(*new QMdiSubWindowPrivate, parent, 0)
+ : QWidget(*new QMdiSubWindowPrivate, parent, { })
{
Q_D(QMdiSubWindow);
#if QT_CONFIG(menu)
@@ -2233,7 +2233,7 @@ QMdiSubWindow::QMdiSubWindow(QWidget *parent, Qt::WindowFlags flags)
// We don't want the menu icon by default on mac.
#ifndef Q_OS_MAC
if (windowIcon().isNull())
- d->menuIcon = style()->standardIcon(QStyle::SP_TitleBarMenuButton, 0, this);
+ d->menuIcon = style()->standardIcon(QStyle::SP_TitleBarMenuButton, nullptr, this);
else
d->menuIcon = windowIcon();
#endif
@@ -2340,7 +2340,7 @@ QWidget *QMdiSubWindow::maximizedButtonsWidget() const
&& !isChildOfTabbedQMdiArea(this)) {
return d->controlContainer->controllerWidget();
}
- return 0;
+ return nullptr;
}
/*!
@@ -2353,7 +2353,7 @@ QWidget *QMdiSubWindow::maximizedSystemMenuIconWidget() const
&& !isChildOfTabbedQMdiArea(this)) {
return d->controlContainer->systemMenuLabel();
}
- return 0;
+ return nullptr;
}
/*!
@@ -2476,7 +2476,7 @@ void QMdiSubWindow::setSystemMenu(QMenu *systemMenu)
if (d->systemMenu) {
delete d->systemMenu;
- d->systemMenu = 0;
+ d->systemMenu = nullptr;
}
if (!systemMenu)
@@ -2860,7 +2860,7 @@ bool QMdiSubWindow::event(QEvent *event)
case QEvent::WindowIconChange:
d->menuIcon = windowIcon();
if (d->menuIcon.isNull())
- d->menuIcon = style()->standardIcon(QStyle::SP_TitleBarMenuButton, 0, this);
+ d->menuIcon = style()->standardIcon(QStyle::SP_TitleBarMenuButton, nullptr, this);
if (d->controlContainer)
d->controlContainer->updateWindowIcon(d->menuIcon);
if (!maximizedSystemMenuIconWidget())
@@ -3135,7 +3135,7 @@ void QMdiSubWindow::paintEvent(QPaintEvent *paintEvent)
if (isMinimized() && !d->hasBorder(d->cachedStyleOptions))
return;
- frameOptions.lineWidth = style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, this);
+ frameOptions.lineWidth = style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, nullptr, this);
// ### Ensure that we do not require setting the cliprect for 4.4
if (!isMinimized() && !d->hasBorder(d->cachedStyleOptions))
@@ -3510,7 +3510,7 @@ QSize QMdiSubWindow::minimumSizeHint() const
if (d->sizeGrip && d->sizeGrip->isVisibleTo(const_cast<QMdiSubWindow *>(this)))
sizeGripHeight = d->sizeGrip->height();
else if (parent() && isMacStyle(style()) && !d->sizeGrip)
- sizeGripHeight = style()->pixelMetric(QStyle::PM_SizeGripSize, 0, this);
+ sizeGripHeight = style()->pixelMetric(QStyle::PM_SizeGripSize, nullptr, this);
minHeight = qMax(minHeight, decorationHeight + sizeGripHeight);
#endif
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 57ef7905d9..701035fc32 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -83,7 +83,7 @@
QT_BEGIN_NAMESPACE
-QMenu *QMenuPrivate::mouseDown = 0;
+QMenu *QMenuPrivate::mouseDown = nullptr;
/* QMenu code */
// internal class used for the torn off popup
@@ -96,7 +96,7 @@ class QTornOffMenu : public QMenu
public:
QTornOffMenuPrivate(QMenu *p) : causedMenu(p), initialized(false) {
tornoff = 1;
- causedPopup.widget = 0;
+ causedPopup.widget = nullptr;
causedPopup.action = p->d_func()->causedPopup.action;
causedStack = p->d_func()->calcCausedStack();
}
@@ -106,11 +106,11 @@ class QTornOffMenu : public QMenu
QSize size = menuSize;
const QPoint p = (!initialized) ? causedMenu->pos() : q->pos();
QRect screen = popupGeometry(QDesktopWidgetPrivate::screenNumber(p));
- const int desktopFrame = q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, 0, q);
- const int titleBarHeight = q->style()->pixelMetric(QStyle::PM_TitleBarHeight, 0, q);
+ const int desktopFrame = q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, nullptr, q);
+ const int titleBarHeight = q->style()->pixelMetric(QStyle::PM_TitleBarHeight, nullptr, q);
if (scroll && (size.height() > screen.height() - titleBarHeight || size.width() > screen.width())) {
- const int fw = q->style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, q);
- const int hmargin = q->style()->pixelMetric(QStyle::PM_MenuHMargin, 0, q);
+ const int fw = q->style()->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr, q);
+ const int hmargin = q->style()->pixelMetric(QStyle::PM_MenuHMargin, nullptr, q);
scroll->scrollFlags |= uint(QMenuPrivate::QMenuScroller::ScrollDown);
size.setWidth(qMin(actionRects.at(getLastVisibleAction()).right() + fw + hmargin + rightmargin + 1, screen.width()));
size.setHeight(screen.height() - desktopFrame * 2 - titleBarHeight);
@@ -202,15 +202,15 @@ void QMenuPrivate::init()
if (!tornPopup.isNull())
tornPopup->updateWindowTitle();
});
- q->setMouseTracking(q->style()->styleHint(QStyle::SH_Menu_MouseTracking, 0, q));
- if (q->style()->styleHint(QStyle::SH_Menu_Scrollable, 0, q)) {
+ q->setMouseTracking(q->style()->styleHint(QStyle::SH_Menu_MouseTracking, nullptr, q));
+ if (q->style()->styleHint(QStyle::SH_Menu_Scrollable, nullptr, q)) {
scroll = new QMenuPrivate::QMenuScroller;
scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
}
sloppyState.initialize(q);
delayState.initialize(q);
- mousePopupDelay = q->style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, q);
+ mousePopupDelay = q->style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, nullptr, q);
}
QPlatformMenu *QMenuPrivate::createPlatformMenu()
@@ -262,7 +262,7 @@ void QMenuPrivate::copyActionToPlatformItem(const QAction *action, QPlatformMenu
item->setIconSize(w->style()->pixelMetric(QStyle::PM_SmallIconSize, &opt, w));
} else {
QStyleOption opt;
- item->setIconSize(QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize, &opt, 0));
+ item->setIconSize(QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize, &opt, nullptr));
}
} else {
item->setIcon(QIcon());
@@ -283,7 +283,7 @@ void QMenuPrivate::copyActionToPlatformItem(const QAction *action, QPlatformMenu
action->menu()->setPlatformMenu(platformMenu->createSubMenu());
item->setMenu(action->menu()->platformMenu());
} else {
- item->setMenu(0);
+ item->setMenu(nullptr);
}
}
@@ -304,7 +304,7 @@ QPlatformMenuItem * QMenuPrivate::insertActionInPlatformMenu(const QAction *acti
int QMenuPrivate::scrollerHeight() const
{
Q_Q(const QMenu);
- return qMax(QApplication::globalStrut().height(), q->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, 0, q));
+ return qMax(QApplication::globalStrut().height(), q->style()->pixelMetric(QStyle::PM_MenuScrollerHeight, nullptr, q));
}
// Windows and KDE allow menus to cover the taskbar, while GNOME and macOS
@@ -541,9 +541,9 @@ void QMenuPrivate::hideUpToMenuBar()
while(caused) {
#if QT_CONFIG(menubar)
if (QMenuBar *mb = qobject_cast<QMenuBar*>(caused)) {
- mb->d_func()->setCurrentAction(0);
+ mb->d_func()->setCurrentAction(nullptr);
mb->d_func()->setKeyboardMode(false);
- caused = 0;
+ caused = nullptr;
} else
#endif
if (QMenu *m = qobject_cast<QMenu*>(caused)) {
@@ -551,12 +551,12 @@ void QMenuPrivate::hideUpToMenuBar()
if (!m->d_func()->tornoff)
hideMenu(m);
if (!fadeMenus) // Mac doesn't clear the action until after hidden.
- m->d_func()->setCurrentAction(0);
- } else { caused = 0;
+ m->d_func()->setCurrentAction(nullptr);
+ } else { caused = nullptr;
}
}
}
- setCurrentAction(0);
+ setCurrentAction(nullptr);
}
void QMenuPrivate::hideMenu(QMenu *menu)
@@ -573,7 +573,7 @@ void QMenuPrivate::hideMenu(QMenu *menu)
QEventLoop eventLoop;
QAction *activeAction = currentAction;
- menu->setActiveAction(0);
+ menu->setActiveAction(nullptr);
QTimer::singleShot(60, &eventLoop, SLOT(quit()));
eventLoop.exec();
@@ -587,10 +587,10 @@ void QMenuPrivate::hideMenu(QMenu *menu)
blocker.unblock();
#endif // QT_CONFIG(effects)
if (activeMenu == menu)
- activeMenu = 0;
- menu->d_func()->causedPopup.action = 0;
+ activeMenu = nullptr;
+ menu->d_func()->causedPopup.action = nullptr;
menu->close();
- menu->d_func()->causedPopup.widget = 0;
+ menu->d_func()->causedPopup.widget = nullptr;
}
void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst)
@@ -617,7 +617,7 @@ void QMenuPrivate::setSyncAction()
Q_Q(QMenu);
QAction *current = currentAction;
if(current && (!current->isEnabled() || current->menu() || current->isSeparator()))
- current = 0;
+ current = nullptr;
for(QWidget *caused = q; caused;) {
if (QMenu *m = qobject_cast<QMenu*>(caused)) {
caused = m->d_func()->causedPopup.widget;
@@ -645,7 +645,7 @@ void QMenuPrivate::setFirstActionActive()
}
QAction *act = actions.at(i);
if (!act->isSeparator() &&
- (q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, q)
+ (q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, nullptr, q)
|| act->isEnabled())) {
setCurrentAction(act);
break;
@@ -661,7 +661,7 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason
if (action
&& (action->isSeparator()
- || (!action->isEnabled() && !q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, q))))
+ || (!action->isEnabled() && !q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, nullptr, q))))
action = nullptr;
// Reselect the currently active action in case mouse moved over other menu items when
@@ -718,8 +718,8 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason
if (popup == -1) {
#if QT_CONFIG(effects)
// kill any running effect
- qFadeEffect(0);
- qScrollEffect(0);
+ qFadeEffect(nullptr);
+ qScrollEffect(nullptr);
#endif
hideMenu(hideActiveMenu);
} else if (!currentAction || !currentAction->menu()) {
@@ -869,13 +869,13 @@ QWidget *QMenuPrivate::topCausedWidget() const
QAction *QMenuPrivate::actionAt(QPoint p) const
{
if (!rect().contains(p)) //sanity check
- return 0;
+ return nullptr;
for(int i = 0; i < actionRects.count(); i++) {
if (actionRects.at(i).contains(p))
return actions.at(i);
}
- return 0;
+ return nullptr;
}
void QMenuPrivate::setOverrideMenuAction(QAction *a)
@@ -978,7 +978,7 @@ QMenuPrivate::ScrollerTearOffItem::ScrollerTearOffItem(QMenuPrivate::ScrollerTea
: QWidget(parent, f), menuPrivate(mPrivate), scrollType(type)
{
if (parent)
- setMouseTracking(parent->style()->styleHint(QStyle::SH_Menu_MouseTracking, 0, parent));
+ setMouseTracking(parent->style()->styleHint(QStyle::SH_Menu_MouseTracking, nullptr, parent));
}
void QMenuPrivate::ScrollerTearOffItem::paintEvent(QPaintEvent *e)
@@ -993,7 +993,7 @@ void QMenuPrivate::ScrollerTearOffItem::paintEvent(QPaintEvent *e)
menuPrivate->drawScroller(&p, scrollType, QRect(0, 0, width(), menuPrivate->scrollerHeight()));
//paint the tear off
if (scrollType == QMenuPrivate::ScrollerTearOffItem::ScrollUp) {
- QRect rect(0, 0, width(), parent->style()->pixelMetric(QStyle::PM_MenuTearoffHeight, 0, parent));
+ QRect rect(0, 0, width(), parent->style()->pixelMetric(QStyle::PM_MenuTearoffHeight, nullptr, parent));
if (menuPrivate->scroll && menuPrivate->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp)
rect.translate(0, menuPrivate->scrollerHeight());
menuPrivate->drawTearOff(&p, rect);
@@ -1068,8 +1068,8 @@ void QMenuPrivate::scrollMenu(QAction *action, QMenuScroller::ScrollLocation loc
int newOffset = 0;
const int topScroll = (scroll->scrollFlags & QMenuScroller::ScrollUp) ? scrollerHeight() : 0;
const int botScroll = (scroll->scrollFlags & QMenuScroller::ScrollDown) ? scrollerHeight() : 0;
- const int vmargin = q->style()->pixelMetric(QStyle::PM_MenuVMargin, 0, q);
- const int fw = q->style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, q);
+ const int vmargin = q->style()->pixelMetric(QStyle::PM_MenuVMargin, nullptr, q);
+ const int fw = q->style()->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr, q);
if (location == QMenuScroller::ScrollTop) {
for(int i = 0, saccum = 0; i < actions.count(); i++) {
@@ -1110,7 +1110,7 @@ void QMenuPrivate::scrollMenu(QAction *action, QMenuScroller::ScrollLocation loc
if (!(newScrollFlags & QMenuScroller::ScrollDown) && (scroll->scrollFlags & QMenuScroller::ScrollDown)) {
newOffset = q->height() - (saccum - newOffset) - fw*2 - vmargin - topmargin - bottommargin; //last item at bottom
if (tearoff)
- newOffset -= q->style()->pixelMetric(QStyle::PM_MenuTearoffHeight, 0, q);
+ newOffset -= q->style()->pixelMetric(QStyle::PM_MenuTearoffHeight, nullptr, q);
}
if (!(newScrollFlags & QMenuScroller::ScrollUp) && (scroll->scrollFlags & QMenuScroller::ScrollUp)) {
@@ -1121,7 +1121,7 @@ void QMenuPrivate::scrollMenu(QAction *action, QMenuScroller::ScrollLocation loc
newOffset -= vmargin;
QRect screen = popupGeometry();
- const int desktopFrame = q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, 0, q);
+ const int desktopFrame = q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, nullptr, q);
if (q->height() < screen.height()-(desktopFrame*2)-1) {
QRect geom = q->geometry();
if (newOffset > scroll->scrollOffset && (scroll->scrollFlags & newScrollFlags & QMenuScroller::ScrollUp)) { //scroll up
@@ -1183,7 +1183,7 @@ void QMenuPrivate::scrollMenu(QMenuScroller::ScrollLocation location, bool activ
if (actionRects.at(i).isNull())
continue;
if (!act->isSeparator() &&
- (q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, q)
+ (q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, nullptr, q)
|| act->isEnabled())) {
if(scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollDown)
scrollMenu(act, QMenuPrivate::QMenuScroller::ScrollBottom, active);
@@ -1198,7 +1198,7 @@ void QMenuPrivate::scrollMenu(QMenuScroller::ScrollLocation location, bool activ
if (actionRects.at(i).isNull())
continue;
if (!act->isSeparator() &&
- (q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, q)
+ (q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, nullptr, q)
|| act->isEnabled())) {
if(scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp)
scrollMenu(act, QMenuPrivate::QMenuScroller::ScrollTop, active);
@@ -1219,8 +1219,8 @@ void QMenuPrivate::scrollMenu(QMenuScroller::ScrollDirection direction, bool pag
updateActionRects();
const int topScroll = (scroll->scrollFlags & QMenuScroller::ScrollUp) ? scrollerHeight() : 0;
const int botScroll = (scroll->scrollFlags & QMenuScroller::ScrollDown) ? scrollerHeight() : 0;
- const int vmargin = q->style()->pixelMetric(QStyle::PM_MenuVMargin, 0, q);
- const int fw = q->style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, q);
+ const int vmargin = q->style()->pixelMetric(QStyle::PM_MenuVMargin, nullptr, q);
+ const int fw = q->style()->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr, q);
const int offset = topScroll ? topScroll-vmargin : 0;
if (direction == QMenuScroller::ScrollUp) {
for(int i = 0, saccum = 0; i < actions.count(); i++) {
@@ -1301,7 +1301,7 @@ bool QMenuPrivate::mouseEventTaken(QMouseEvent *e)
tearRect.translate(0, scrollerHeight());
q->update(tearRect);
if (tearRect.contains(pos) && hasMouseMoved(e->globalPos())) {
- setCurrentAction(0);
+ setCurrentAction(nullptr);
tearoffHighlighted = 1;
if (e->type() == QEvent::MouseButtonRelease) {
if (!tornPopup)
@@ -1320,7 +1320,7 @@ bool QMenuPrivate::mouseEventTaken(QMouseEvent *e)
for(QWidget *caused = causedPopup.widget; caused;) {
bool passOnEvent = false;
- QWidget *next_widget = 0;
+ QWidget *next_widget = nullptr;
QPoint cpos = caused->mapFromGlobal(e->globalPos());
#if QT_CONFIG(menubar)
if (QMenuBar *mb = qobject_cast<QMenuBar*>(caused)) {
@@ -1441,7 +1441,7 @@ void QMenuPrivate::activateAction(QAction *action, QAction::ActionEvent action_e
#endif
action->showStatusText(topCausedWidget());
} else {
- actionAboutToTrigger = 0;
+ actionAboutToTrigger = nullptr;
}
}
@@ -2260,7 +2260,7 @@ QAction *QMenu::actionAt(const QPoint &pt) const
{
if (QAction *ret = d_func()->actionAt(pt))
return ret;
- return 0;
+ return nullptr;
}
/*!
@@ -2319,76 +2319,86 @@ QSize QMenu::sizeHint() const
void QMenu::popup(const QPoint &p, QAction *atAction)
{
Q_D(QMenu);
- if (d->scroll) { // reset scroll state from last popup
- if (d->scroll->scrollOffset)
- d->itemsDirty = 1; // sizeHint will be incorrect if there is previous scroll
- d->scroll->scrollOffset = 0;
- d->scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
+ d->popup(p, atAction);
+}
+
+void QMenuPrivate::popup(const QPoint &p, QAction *atAction, PositionFunction positionFunction)
+{
+ Q_Q(QMenu);
+ if (scroll) { // reset scroll state from last popup
+ if (scroll->scrollOffset)
+ itemsDirty = 1; // sizeHint will be incorrect if there is previous scroll
+ scroll->scrollOffset = 0;
+ scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
}
- d->tearoffHighlighted = 0;
- d->motions = 0;
- d->doChildEffects = true;
- d->updateLayoutDirection();
+ tearoffHighlighted = 0;
+ motions = 0;
+ doChildEffects = true;
+ updateLayoutDirection();
// Ensure that we get correct sizeHints by placing this window on the correct screen.
// However if the QMenu was constructed with a QDesktopScreenWidget as its parent,
// then initialScreenIndex was set, so we should respect that for the lifetime of this menu.
// Use d->popupScreen to remember, because initialScreenIndex will be reset after the first showing.
// However if eventLoop exists, then exec() already did this by calling createWinId(); so leave it alone. (QTBUG-76162)
- if (!d->eventLoop) {
- const int screenIndex = d->topData()->initialScreenIndex;
+ if (!eventLoop) {
+ const int screenIndex = topData()->initialScreenIndex;
if (screenIndex >= 0)
- d->popupScreen = screenIndex;
- if (auto s = QGuiApplication::screens().value(d->popupScreen)) {
- if (d->setScreen(s))
- d->itemsDirty = true;
- } else if (d->setScreenForPoint(p)) {
- d->itemsDirty = true;
+ popupScreen = screenIndex;
+ if (auto s = QGuiApplication::screens().value(popupScreen)) {
+ if (setScreen(s))
+ itemsDirty = true;
+ } else if (setScreenForPoint(p)) {
+ itemsDirty = true;
}
}
- const bool contextMenu = d->isContextMenu();
- if (d->lastContextMenu != contextMenu) {
- d->itemsDirty = true;
- d->lastContextMenu = contextMenu;
+ const bool contextMenu = isContextMenu();
+ if (lastContextMenu != contextMenu) {
+ itemsDirty = true;
+ lastContextMenu = contextMenu;
}
#if QT_CONFIG(menubar)
// if this menu is part of a chain attached to a QMenuBar, set the
// _NET_WM_WINDOW_TYPE_DROPDOWN_MENU X11 window type
- setAttribute(Qt::WA_X11NetWmWindowTypeDropDownMenu, qobject_cast<QMenuBar *>(d->topCausedWidget()) != 0);
+ q->setAttribute(Qt::WA_X11NetWmWindowTypeDropDownMenu, qobject_cast<QMenuBar *>(topCausedWidget()) != nullptr);
#endif
- ensurePolished(); // Get the right font
- emit aboutToShow();
- const bool actionListChanged = d->itemsDirty;
+ q->ensurePolished(); // Get the right font
+ emit q->aboutToShow();
+ const bool actionListChanged = itemsDirty;
QRect screen;
#if QT_CONFIG(graphicsview)
- bool isEmbedded = !bypassGraphicsProxyWidget(this) && QMenuPrivate::nearestGraphicsProxyWidget(this);
+ bool isEmbedded = !bypassGraphicsProxyWidget(q) && QMenuPrivate::nearestGraphicsProxyWidget(q);
if (isEmbedded)
- screen = d->popupGeometry();
+ screen = popupGeometry();
else
#endif
- screen = d->popupGeometry(QDesktopWidgetPrivate::screenNumber(p));
- d->updateActionRects(screen);
+ screen = popupGeometry(QDesktopWidgetPrivate::screenNumber(p));
+ updateActionRects(screen);
QPoint pos;
- QPushButton *causedButton = qobject_cast<QPushButton*>(d->causedPopup.widget);
+ QPushButton *causedButton = qobject_cast<QPushButton*>(causedPopup.widget);
if (actionListChanged && causedButton)
pos = QPushButtonPrivate::get(causedButton)->adjustedMenuPosition();
else
pos = p;
- const QSize menuSizeHint(sizeHint());
+ const QSize menuSizeHint(q->sizeHint());
QSize size = menuSizeHint;
- const int desktopFrame = style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, 0, this);
- bool adjustToDesktop = !window()->testAttribute(Qt::WA_DontShowOnScreen);
+
+ if (positionFunction)
+ pos = positionFunction(menuSizeHint);
+
+ const int desktopFrame = q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, nullptr, q);
+ bool adjustToDesktop = !q->window()->testAttribute(Qt::WA_DontShowOnScreen);
// if the screens have very different geometries and the menu is too big, we have to recalculate
if ((size.height() > screen.height() || size.width() > screen.width()) ||
// Layout is not right, we might be able to save horizontal space
- (d->ncols >1 && size.height() < screen.height())) {
+ (ncols >1 && size.height() < screen.height())) {
size.setWidth(qMin(menuSizeHint.width(), screen.width() - desktopFrame * 2));
size.setHeight(qMin(menuSizeHint.height(), screen.height() - desktopFrame * 2));
adjustToDesktop = true;
@@ -2397,61 +2407,61 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
#ifdef QT_KEYPAD_NAVIGATION
if (!atAction && QApplicationPrivate::keypadNavigationEnabled()) {
// Try to have one item activated
- if (d->defaultAction && d->defaultAction->isEnabled()) {
- atAction = d->defaultAction;
+ if (defaultAction && defaultAction->isEnabled()) {
+ atAction = defaultAction;
// TODO: This works for first level menus, not yet sub menus
} else {
- for (QAction *action : qAsConst(d->actions))
+ for (QAction *action : qAsConst(actions))
if (action->isEnabled()) {
atAction = action;
break;
}
}
- d->currentAction = atAction;
+ currentAction = atAction;
}
#endif
- if (d->ncols > 1) {
+ if (ncols > 1) {
pos.setY(screen.top() + desktopFrame);
} else if (atAction) {
- for (int i = 0, above_height = 0; i < d->actions.count(); i++) {
- QAction *action = d->actions.at(i);
+ for (int i = 0, above_height = 0; i < actions.count(); i++) {
+ QAction *action = actions.at(i);
if (action == atAction) {
int newY = pos.y() - above_height;
- if (d->scroll && newY < desktopFrame) {
- d->scroll->scrollFlags = d->scroll->scrollFlags
+ if (scroll && newY < desktopFrame) {
+ scroll->scrollFlags = scroll->scrollFlags
| QMenuPrivate::QMenuScroller::ScrollUp;
- d->scroll->scrollOffset = newY;
+ scroll->scrollOffset = newY;
newY = desktopFrame;
}
pos.setY(newY);
- if (d->scroll && d->scroll->scrollFlags != QMenuPrivate::QMenuScroller::ScrollNone
- && !style()->styleHint(QStyle::SH_Menu_FillScreenWithScroll, 0, this)) {
- int below_height = above_height + d->scroll->scrollOffset;
- for (int i2 = i; i2 < d->actionRects.count(); i2++)
- below_height += d->actionRects.at(i2).height();
+ if (scroll && scroll->scrollFlags != QMenuPrivate::QMenuScroller::ScrollNone
+ && !q->style()->styleHint(QStyle::SH_Menu_FillScreenWithScroll, nullptr, q)) {
+ int below_height = above_height + scroll->scrollOffset;
+ for (int i2 = i; i2 < actionRects.count(); i2++)
+ below_height += actionRects.at(i2).height();
size.setHeight(below_height);
}
break;
} else {
- above_height += d->actionRects.at(i).height();
+ above_height += actionRects.at(i).height();
}
}
}
QPoint mouse = QCursor::pos();
- d->mousePopupPos = mouse;
- const bool snapToMouse = !d->causedPopup.widget && (QRect(p.x() - 3, p.y() - 3, 6, 6).contains(mouse));
+ mousePopupPos = mouse;
+ const bool snapToMouse = !causedPopup.widget && (QRect(p.x() - 3, p.y() - 3, 6, 6).contains(mouse));
if (adjustToDesktop) {
// handle popup falling "off screen"
- if (isRightToLeft()) {
+ if (q->isRightToLeft()) {
if (snapToMouse) // position flowing left from the mouse
pos.setX(mouse.x() - size.width());
#if QT_CONFIG(menubar)
// if the menu is in a menubar or is a submenu, it should be right-aligned
- if (qobject_cast<QMenuBar*>(d->causedPopup.widget) || qobject_cast<QMenu*>(d->causedPopup.widget))
+ if (qobject_cast<QMenuBar*>(causedPopup.widget) || qobject_cast<QMenu*>(causedPopup.widget))
pos.rx() -= size.width();
#endif // QT_CONFIG(menubar)
@@ -2475,8 +2485,8 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
if (pos.y() < screen.top() + desktopFrame)
pos.setY(screen.top() + desktopFrame);
if (pos.y() + menuSizeHint.height() - 1 > screen.bottom() - desktopFrame) {
- if (d->scroll) {
- d->scroll->scrollFlags |= uint(QMenuPrivate::QMenuScroller::ScrollDown);
+ if (scroll) {
+ scroll->scrollFlags |= uint(QMenuPrivate::QMenuScroller::ScrollDown);
int y = qMax(screen.y(),pos.y());
size.setHeight(screen.bottom() - (desktopFrame * 2) - y);
} else {
@@ -2485,13 +2495,13 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
}
}
}
- const int subMenuOffset = style()->pixelMetric(QStyle::PM_SubMenuOverlap, 0, this);
- QMenu *caused = qobject_cast<QMenu*>(d_func()->causedPopup.widget);
+ const int subMenuOffset = q->style()->pixelMetric(QStyle::PM_SubMenuOverlap, nullptr, q);
+ QMenu *caused = qobject_cast<QMenu*>(causedPopup.widget);
if (caused && caused->geometry().width() + menuSizeHint.width() + subMenuOffset < screen.width()) {
QRect parentActionRect(caused->d_func()->actionRect(caused->d_func()->currentAction));
const QPoint actionTopLeft = caused->mapToGlobal(parentActionRect.topLeft());
parentActionRect.moveTopLeft(actionTopLeft);
- if (isRightToLeft()) {
+ if (q->isRightToLeft()) {
if ((pos.x() + menuSizeHint.width() > parentActionRect.left() - subMenuOffset)
&& (pos.x() < parentActionRect.right()))
{
@@ -2513,61 +2523,61 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
}
}
}
- setGeometry(QRect(pos, size));
+ q->setGeometry(QRect(pos, size));
#if QT_CONFIG(effects)
- int hGuess = isRightToLeft() ? QEffects::LeftScroll : QEffects::RightScroll;
+ int hGuess = q->isRightToLeft() ? QEffects::LeftScroll : QEffects::RightScroll;
int vGuess = QEffects::DownScroll;
- if (isRightToLeft()) {
+ if (q->isRightToLeft()) {
if ((snapToMouse && (pos.x() + size.width() / 2 > mouse.x())) ||
- (qobject_cast<QMenu*>(d->causedPopup.widget) && pos.x() + size.width() / 2 > d->causedPopup.widget->x()))
+ (qobject_cast<QMenu*>(causedPopup.widget) && pos.x() + size.width() / 2 > causedPopup.widget->x()))
hGuess = QEffects::RightScroll;
} else {
if ((snapToMouse && (pos.x() + size.width() / 2 < mouse.x())) ||
- (qobject_cast<QMenu*>(d->causedPopup.widget) && pos.x() + size.width() / 2 < d->causedPopup.widget->x()))
+ (qobject_cast<QMenu*>(causedPopup.widget) && pos.x() + size.width() / 2 < causedPopup.widget->x()))
hGuess = QEffects::LeftScroll;
}
#if QT_CONFIG(menubar)
if ((snapToMouse && (pos.y() + size.height() / 2 < mouse.y())) ||
- (qobject_cast<QMenuBar*>(d->causedPopup.widget) &&
- pos.y() + size.width() / 2 < d->causedPopup.widget->mapToGlobal(d->causedPopup.widget->pos()).y()))
+ (qobject_cast<QMenuBar*>(causedPopup.widget) &&
+ pos.y() + size.width() / 2 < causedPopup.widget->mapToGlobal(causedPopup.widget->pos()).y()))
vGuess = QEffects::UpScroll;
#endif
if (QApplication::isEffectEnabled(Qt::UI_AnimateMenu)) {
bool doChildEffects = true;
#if QT_CONFIG(menubar)
- if (QMenuBar *mb = qobject_cast<QMenuBar*>(d->causedPopup.widget)) {
+ if (QMenuBar *mb = qobject_cast<QMenuBar*>(causedPopup.widget)) {
doChildEffects = mb->d_func()->doChildEffects;
mb->d_func()->doChildEffects = false;
} else
#endif
- if (QMenu *m = qobject_cast<QMenu*>(d->causedPopup.widget)) {
+ if (QMenu *m = qobject_cast<QMenu*>(causedPopup.widget)) {
doChildEffects = m->d_func()->doChildEffects;
m->d_func()->doChildEffects = false;
}
if (doChildEffects) {
if (QApplication::isEffectEnabled(Qt::UI_FadeMenu))
- qFadeEffect(this);
- else if (d->causedPopup.widget)
- qScrollEffect(this, qobject_cast<QMenu*>(d->causedPopup.widget) ? hGuess : vGuess);
+ qFadeEffect(q);
+ else if (causedPopup.widget)
+ qScrollEffect(q, qobject_cast<QMenu*>(causedPopup.widget) ? hGuess : vGuess);
else
- qScrollEffect(this, hGuess | vGuess);
+ qScrollEffect(q, hGuess | vGuess);
} else {
// kill any running effect
- qFadeEffect(0);
- qScrollEffect(0);
+ qFadeEffect(nullptr);
+ qScrollEffect(nullptr);
- show();
+ q->show();
}
} else
#endif
{
- show();
+ q->show();
}
#ifndef QT_NO_ACCESSIBILITY
- QAccessibleEvent event(this, QAccessible::PopupMenuStart);
+ QAccessibleEvent event(q, QAccessible::PopupMenuStart);
QAccessible::updateAccessibility(&event);
#endif
}
@@ -2633,20 +2643,26 @@ QAction *QMenu::exec()
QAction *QMenu::exec(const QPoint &p, QAction *action)
{
Q_D(QMenu);
- ensurePolished();
- createWinId();
- QEventLoop eventLoop;
- d->eventLoop = &eventLoop;
- popup(p, action);
-
- QPointer<QObject> guard = this;
- (void) eventLoop.exec();
+ return d->exec(p, action);
+}
+
+QAction *QMenuPrivate::exec(const QPoint &p, QAction *action, PositionFunction positionFunction)
+{
+ Q_Q(QMenu);
+ q->ensurePolished();
+ q->createWinId();
+ QEventLoop evtLoop;
+ eventLoop = &evtLoop;
+ popup(p, action, positionFunction);
+
+ QPointer<QObject> guard = q;
+ (void) evtLoop.exec();
if (guard.isNull())
return nullptr;
- action = d->syncAction;
- d->syncAction = nullptr;
- d->eventLoop = nullptr;
+ action = syncAction;
+ syncAction = nullptr;
+ eventLoop = nullptr;
return action;
}
@@ -2692,22 +2708,22 @@ void QMenu::hideEvent(QHideEvent *)
emit aboutToHide();
if (d->eventLoop)
d->eventLoop->exit();
- d->setCurrentAction(0);
+ d->setCurrentAction(nullptr);
#ifndef QT_NO_ACCESSIBILITY
QAccessibleEvent event(this, QAccessible::PopupMenuEnd);
QAccessible::updateAccessibility(&event);
#endif
#if QT_CONFIG(menubar)
if (QMenuBar *mb = qobject_cast<QMenuBar*>(d->causedPopup.widget))
- mb->d_func()->setCurrentAction(0);
+ mb->d_func()->setCurrentAction(nullptr);
#endif
if (QMenuPrivate::mouseDown == this)
QMenuPrivate::mouseDown = nullptr;
d->hasHadMouse = false;
if (d->activeMenu)
d->hideMenu(d->activeMenu);
- d->causedPopup.widget = 0;
- d->causedPopup.action = 0;
+ d->causedPopup.widget = nullptr;
+ d->causedPopup.action = nullptr;
if (d->scroll)
d->scroll->scrollTimer.stop(); //make sure the timer stops
}
@@ -2731,9 +2747,9 @@ void QMenu::paintEvent(QPaintEvent *e)
style()->drawPrimitive(QStyle::PE_PanelMenu, &menuOpt, &p, this);
//calculate the scroll up / down rect
- const int fw = style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, this);
- const int hmargin = style()->pixelMetric(QStyle::PM_MenuHMargin,0, this);
- const int vmargin = style()->pixelMetric(QStyle::PM_MenuVMargin, 0, this);
+ const int fw = style()->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr, this);
+ const int hmargin = style()->pixelMetric(QStyle::PM_MenuHMargin,nullptr, this);
+ const int vmargin = style()->pixelMetric(QStyle::PM_MenuVMargin, nullptr, this);
QRect scrollUpRect, scrollDownRect;
const int leftmargin = fw + hmargin + d->leftmargin;
@@ -2753,7 +2769,7 @@ void QMenu::paintEvent(QPaintEvent *e)
QRect tearOffRect;
if (d->tearoff) {
tearOffRect.setRect(leftmargin, topmargin, contentWidth,
- style()->pixelMetric(QStyle::PM_MenuTearoffHeight, 0, this));
+ style()->pixelMetric(QStyle::PM_MenuTearoffHeight, nullptr, this));
if (d->scroll && d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp)
tearOffRect.translate(0, d->scrollerHeight());
}
@@ -2873,7 +2889,7 @@ void QMenu::mousePressEvent(QMouseEvent *e)
&& QRect(d->noReplayFor->mapToGlobal(QPoint()), d->noReplayFor->size()).contains(e->globalPos()))
setAttribute(Qt::WA_NoMouseReplay);
if (d->eventLoop) // synchronous operation
- d->syncAction = 0;
+ d->syncAction = nullptr;
d->hideUpToMenuBar();
return;
}
@@ -2923,12 +2939,12 @@ void QMenu::changeEvent(QEvent *e)
if (e->type() == QEvent::StyleChange || e->type() == QEvent::FontChange ||
e->type() == QEvent::LayoutDirectionChange) {
d->itemsDirty = 1;
- setMouseTracking(style()->styleHint(QStyle::SH_Menu_MouseTracking, 0, this));
+ setMouseTracking(style()->styleHint(QStyle::SH_Menu_MouseTracking, nullptr, this));
if (isVisible())
resize(sizeHint());
- if (!style()->styleHint(QStyle::SH_Menu_Scrollable, 0, this)) {
+ if (!style()->styleHint(QStyle::SH_Menu_Scrollable, nullptr, this)) {
delete d->scroll;
- d->scroll = 0;
+ d->scroll = nullptr;
} else if (!d->scroll) {
d->scroll = new QMenuPrivate::QMenuScroller;
d->scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
@@ -3097,7 +3113,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
case Qt::Key_Up:
case Qt::Key_Down: {
key_consumed = true;
- QAction *nextAction = 0;
+ QAction *nextAction = nullptr;
QMenuPrivate::QMenuScroller::ScrollLocation scroll_loc = QMenuPrivate::QMenuScroller::ScrollStay;
if (!d->currentAction) {
if(key == Qt::Key_Down) {
@@ -3106,7 +3122,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
if (d->actionRects.at(i).isNull())
continue;
if (!act->isSeparator() &&
- (style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, this)
+ (style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, nullptr, this)
|| act->isEnabled())) {
nextAction = act;
break;
@@ -3118,7 +3134,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
if (d->actionRects.at(i).isNull())
continue;
if (!act->isSeparator() &&
- (style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, this)
+ (style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, nullptr, this)
|| act->isEnabled())) {
nextAction = act;
break;
@@ -3132,7 +3148,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
if (key == Qt::Key_Up) {
for(int next_i = i-1; true; next_i--) {
if (next_i == -1) {
- if(!style()->styleHint(QStyle::SH_Menu_SelectionWrap, 0, this))
+ if (!style()->styleHint(QStyle::SH_Menu_SelectionWrap, nullptr, this))
break;
if (d->scroll)
scroll_loc = QMenuPrivate::QMenuScroller::ScrollBottom;
@@ -3145,13 +3161,13 @@ void QMenu::keyPressEvent(QKeyEvent *e)
continue;
if (next->isSeparator() ||
(!next->isEnabled() &&
- !style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, this)))
+ !style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, nullptr, this)))
continue;
nextAction = next;
if (d->scroll && (d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp)) {
int topVisible = d->scrollerHeight();
if (d->tearoff)
- topVisible += style()->pixelMetric(QStyle::PM_MenuTearoffHeight, 0, this);
+ topVisible += style()->pixelMetric(QStyle::PM_MenuTearoffHeight, nullptr, this);
if (((y + d->scroll->scrollOffset) - topVisible) <= d->actionRects.at(next_i).height())
scroll_loc = QMenuPrivate::QMenuScroller::ScrollTop;
}
@@ -3163,7 +3179,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
y += d->actionRects.at(i).height();
for(int next_i = i+1; true; next_i++) {
if (next_i == d->actionRects.count()) {
- if(!style()->styleHint(QStyle::SH_Menu_SelectionWrap, 0, this))
+ if (!style()->styleHint(QStyle::SH_Menu_SelectionWrap, nullptr, this))
break;
if (d->scroll)
scroll_loc = QMenuPrivate::QMenuScroller::ScrollTop;
@@ -3176,7 +3192,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
continue;
if (next->isSeparator() ||
(!next->isEnabled() &&
- !style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, this)))
+ !style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, nullptr, this)))
continue;
nextAction = next;
if (d->scroll && (d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollDown)) {
@@ -3184,7 +3200,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
if (d->scroll->scrollFlags & QMenuPrivate::QMenuScroller::ScrollUp)
bottomVisible -= d->scrollerHeight();
if (d->tearoff)
- bottomVisible -= style()->pixelMetric(QStyle::PM_MenuTearoffHeight, 0, this);
+ bottomVisible -= style()->pixelMetric(QStyle::PM_MenuTearoffHeight, nullptr, this);
if ((y + d->scroll->scrollOffset + d->actionRects.at(next_i).height()) > bottomVisible)
scroll_loc = QMenuPrivate::QMenuScroller::ScrollBottom;
}
@@ -3214,7 +3230,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
Q_FALLTHROUGH();
case Qt::Key_Left: {
if (d->currentAction && !d->scroll) {
- QAction *nextAction = 0;
+ QAction *nextAction = nullptr;
if (key == Qt::Key_Left) {
QRect actionR = d->actionRect(d->currentAction);
for(int x = actionR.left()-1; !nextAction && x >= 0; x--)
@@ -3243,7 +3259,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
break;
key_consumed = true;
- if (style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, 0, this))
+ if (style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, nullptr, this))
{
d->hideMenu(this);
#if QT_CONFIG(menubar)
@@ -3255,7 +3271,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
break;
case Qt::Key_Space:
- if (!style()->styleHint(QStyle::SH_Menu_SpaceActivatesItem, 0, this))
+ if (!style()->styleHint(QStyle::SH_Menu_SpaceActivatesItem, nullptr, this))
break;
// for motif, fall through
Q_FALLTHROUGH();
@@ -3321,8 +3337,8 @@ void QMenu::keyPressEvent(QKeyEvent *e)
if ((!e->modifiers() || e->modifiers() == Qt::AltModifier || e->modifiers() == Qt::ShiftModifier) &&
e->text().length()==1) {
bool activateAction = false;
- QAction *nextAction = 0;
- if (style()->styleHint(QStyle::SH_Menu_KeyboardSearch, 0, this) && !e->modifiers()) {
+ QAction *nextAction = nullptr;
+ if (style()->styleHint(QStyle::SH_Menu_KeyboardSearch, nullptr, this) && !e->modifiers()) {
int best_match_count = 0;
d->searchBufferTimer.start(2000, this);
d->searchBuffer += e->text();
@@ -3345,7 +3361,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
#ifndef QT_NO_SHORTCUT
else {
int clashCount = 0;
- QAction *first = 0, *currentSelected = 0, *firstAfterCurrent = 0;
+ QAction *first = nullptr, *currentSelected = nullptr, *firstAfterCurrent = nullptr;
QChar c = e->text().at(0).toUpper();
for(int i = 0; i < d->actions.size(); ++i) {
if (d->actionRects.at(i).isNull())
@@ -3434,7 +3450,7 @@ void QMenu::mouseMoveEvent(QMouseEvent *e)
QMenuPrivate::mouseDown = this;
if (d->activeMenu)
- d->activeMenu->d_func()->setCurrentAction(0);
+ d->activeMenu->d_func()->setCurrentAction(nullptr);
QMenuSloppyState::MouseEventResult sloppyEventResult = d->sloppyState.processMouseEvent(e->localPos(), action, d->currentAction);
if (sloppyEventResult == QMenuSloppyState::EventShouldBePropagated) {
@@ -3464,7 +3480,7 @@ void QMenu::leaveEvent(QEvent *)
Q_D(QMenu);
d->hasReceievedEnter = false;
if (!d->activeMenu && d->currentAction)
- setActiveAction(0);
+ setActiveAction(nullptr);
}
/*!
@@ -3527,7 +3543,7 @@ void QMenu::actionEvent(QActionEvent *e)
} else if (e->type() == QEvent::ActionRemoved) {
e->action()->disconnect(this);
if (e->action() == d->currentAction)
- d->currentAction = 0;
+ d->currentAction = nullptr;
if (QWidgetAction *wa = qobject_cast<QWidgetAction *>(e->action())) {
if (QWidget *widget = d->widgetItems.value(wa)) {
#ifdef Q_OS_OSX
@@ -3603,7 +3619,7 @@ void QMenu::internalDelayedPopup()
#endif
screen = d->popupGeometry(QDesktopWidgetPrivate::screenNumber(pos()));
- int subMenuOffset = style()->pixelMetric(QStyle::PM_SubMenuOverlap, 0, this);
+ int subMenuOffset = style()->pixelMetric(QStyle::PM_SubMenuOverlap, nullptr, this);
const QRect actionRect(d->actionRect(d->currentAction));
QPoint subMenuPos(mapToGlobal(QPoint(actionRect.right() + subMenuOffset + 1, actionRect.top())));
if (subMenuPos.x() > screen.right())
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h
index efbbc099a1..02fe9f31a1 100644
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
@@ -64,6 +64,8 @@
#include <qpa/qplatformmenu.h>
+#include <functional>
+
QT_REQUIRE_CONFIG(menu);
QT_BEGIN_NAMESPACE
@@ -302,6 +304,8 @@ class QMenuPrivate : public QWidgetPrivate
{
Q_DECLARE_PUBLIC(QMenu)
public:
+ using PositionFunction = std::function<QPoint(const QSize &)>;
+
QMenuPrivate() :
itemsDirty(false),
hasCheckableItems(false),
@@ -351,6 +355,8 @@ public:
QRect popupGeometry(int screen) const;
bool useFullScreenForPopup() const;
int getLastVisibleAction() const;
+ void popup(const QPoint &p, QAction *atAction, PositionFunction positionFunction = {});
+ QAction *exec(const QPoint &p, QAction *action, PositionFunction positionFunction = {});
//selection
static QMenu *mouseDown;
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 7a751597bc..ccd91ebee1 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -90,7 +90,7 @@ QMenuBarExtension::QMenuBarExtension(QWidget *parent)
#if QT_CONFIG(menu)
setPopupMode(QToolButton::InstantPopup);
#endif
- setIcon(style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton, 0, parentWidget()));
+ setIcon(style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton, nullptr, parentWidget()));
}
void QMenuBarExtension::paintEvent(QPaintEvent *)
@@ -106,7 +106,7 @@ void QMenuBarExtension::paintEvent(QPaintEvent *)
QSize QMenuBarExtension::sizeHint() const
{
- int ext = style()->pixelMetric(QStyle::PM_ToolBarExtensionExtent, 0, parentWidget());
+ int ext = style()->pixelMetric(QStyle::PM_ToolBarExtensionExtent, nullptr, parentWidget());
return QSize(ext, ext);
}
@@ -120,14 +120,14 @@ QAction *QMenuBarPrivate::actionAt(QPoint p) const
if(actionRect(actions.at(i)).contains(p))
return actions.at(i);
}
- return 0;
+ return nullptr;
}
QRect QMenuBarPrivate::menuRect(bool extVisible) const
{
Q_Q(const QMenuBar);
- int hmargin = q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, q);
+ int hmargin = q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, q);
QRect result = q->rect();
result.adjust(hmargin, 0, -hmargin, 0);
@@ -167,13 +167,13 @@ void QMenuBarPrivate::updateGeometries()
Q_Q(QMenuBar);
if(!itemsDirty)
return;
- int q_width = q->width()-(q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, q)*2);
+ int q_width = q->width()-(q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, q)*2);
int q_start = -1;
if(leftWidget || rightWidget) {
- int vmargin = q->style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, q)
- + q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, q);
- int hmargin = q->style()->pixelMetric(QStyle::PM_MenuBarHMargin, 0, q)
- + q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, q);
+ int vmargin = q->style()->pixelMetric(QStyle::PM_MenuBarVMargin, nullptr, q)
+ + q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, q);
+ int hmargin = q->style()->pixelMetric(QStyle::PM_MenuBarHMargin, nullptr, q)
+ + q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, q);
if (leftWidget && leftWidget->isVisible()) {
QSize sz = leftWidget->sizeHint();
q_width -= sz.width();
@@ -198,7 +198,7 @@ void QMenuBarPrivate::updateGeometries()
}
#endif
calcActionRects(q_width, q_start);
- currentAction = 0;
+ currentAction = nullptr;
#ifndef QT_NO_SHORTCUT
if(itemsDirty) {
for(int j = 0; j < shortcutIndexMap.size(); ++j)
@@ -246,7 +246,7 @@ void QMenuBarPrivate::updateGeometries()
pop->clear();
pop->addActions(hiddenActions);
- int vmargin = q->style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, q);
+ int vmargin = q->style()->pixelMetric(QStyle::PM_MenuBarVMargin, nullptr, q);
int x = q->isRightToLeft()
? menuRect.left() - extension->sizeHint().width() + 1
: menuRect.right();
@@ -285,8 +285,8 @@ void QMenuBarPrivate::focusFirstAction()
void QMenuBarPrivate::setKeyboardMode(bool b)
{
Q_Q(QMenuBar);
- if (b && !q->style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, 0, q)) {
- setCurrentAction(0);
+ if (b && !q->style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, nullptr, q)) {
+ setCurrentAction(nullptr);
return;
}
keyboardState = b;
@@ -298,11 +298,11 @@ void QMenuBarPrivate::setKeyboardMode(bool b)
q->setFocus(Qt::MenuBarFocusReason);
} else {
if(!popupState)
- setCurrentAction(0);
+ setCurrentAction(nullptr);
if(keyboardFocusWidget) {
if (QApplication::focusWidget() == q)
keyboardFocusWidget->setFocus(Qt::MenuBarFocusReason);
- keyboardFocusWidget = 0;
+ keyboardFocusWidget = nullptr;
}
}
q->update();
@@ -324,15 +324,10 @@ void QMenuBarPrivate::popupAction(QAction *action, bool activateFirst)
QPoint pos(q->mapToGlobal(QPoint(adjustedActionRect.left(), adjustedActionRect.bottom() + 1)));
QSize popup_size = activeMenu->sizeHint();
//we put the popup menu on the screen containing the bottom-center of the action rect
- QScreen *popupScreen = q->window()->windowHandle()->screen();
- QPoint bottomMiddlePos = pos + QPoint(adjustedActionRect.width() / 2, 0);
- const auto &siblings = popupScreen->virtualSiblings();
- for (QScreen *sibling : siblings) {
- if (sibling->geometry().contains(bottomMiddlePos)) {
- popupScreen = sibling;
- break;
- }
- }
+ QScreen *menubarScreen = q->window()->windowHandle()->screen();
+ QScreen *popupScreen = menubarScreen->virtualSiblingAt(pos + QPoint(adjustedActionRect.width() / 2, 0));
+ if (!popupScreen)
+ popupScreen = menubarScreen;
QRect screenRect = popupScreen->geometry();
pos = QPoint(qMax(pos.x(), screenRect.x()), qMax(pos.y(), screenRect.y()));
const bool fitUp = (pos.y() - popup_size.height() >= screenRect.top());
@@ -377,9 +372,9 @@ void QMenuBarPrivate::setCurrentAction(QAction *action, bool popup, bool activat
doChildEffects = (popup && !activeMenu);
Q_Q(QMenuBar);
- QWidget *fw = 0;
+ QWidget *fw = nullptr;
if(QMenu *menu = activeMenu) {
- activeMenu = 0;
+ activeMenu = nullptr;
if (popup) {
fw = q->window()->focusWidget();
q->setFocus(Qt::NoFocusReason);
@@ -424,14 +419,14 @@ void QMenuBarPrivate::calcActionRects(int max_width, int start) const
const QStyle *style = q->style();
- const int itemSpacing = style->pixelMetric(QStyle::PM_MenuBarItemSpacing, 0, q);
+ const int itemSpacing = style->pixelMetric(QStyle::PM_MenuBarItemSpacing, nullptr, q);
int max_item_height = 0, separator = -1, separator_start = 0, separator_len = 0;
//calculate size
const QFontMetrics fm = q->fontMetrics();
- const int hmargin = style->pixelMetric(QStyle::PM_MenuBarHMargin, 0, q),
- vmargin = style->pixelMetric(QStyle::PM_MenuBarVMargin, 0, q),
- icone = style->pixelMetric(QStyle::PM_SmallIconSize, 0, q);
+ const int hmargin = style->pixelMetric(QStyle::PM_MenuBarHMargin, nullptr, q),
+ vmargin = style->pixelMetric(QStyle::PM_MenuBarVMargin, nullptr, q),
+ icone = style->pixelMetric(QStyle::PM_SmallIconSize, nullptr, q);
for(int i = 0; i < actions.count(); i++) {
QAction *action = actions.at(i);
if(!action->isVisible())
@@ -441,7 +436,7 @@ void QMenuBarPrivate::calcActionRects(int max_width, int start) const
//calc what I think the size is..
if(action->isSeparator()) {
- if (style->styleHint(QStyle::SH_DrawMenuBarSeparator, 0, q))
+ if (style->styleHint(QStyle::SH_DrawMenuBarSeparator, nullptr, q))
separator = i;
continue; //we don't really position these!
} else {
@@ -475,7 +470,7 @@ void QMenuBarPrivate::calcActionRects(int max_width, int start) const
}
//calculate position
- const int fw = q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, q);
+ const int fw = q->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, q);
int x = fw + ((start == -1) ? hmargin : start) + itemSpacing;
int y = fw + vmargin;
for(int i = 0; i < actions.count(); i++) {
@@ -708,7 +703,7 @@ void QMenuBarPrivate::init()
q->hide();
q->setBackgroundRole(QPalette::Button);
handleReparent();
- q->setMouseTracking(q->style()->styleHint(QStyle::SH_MenuBar_MouseTracking, 0, q));
+ q->setMouseTracking(q->style()->styleHint(QStyle::SH_MenuBar_MouseTracking, nullptr, q));
extension = new QMenuBarExtension(q);
extension->setFocusPolicy(Qt::NoFocus);
@@ -720,7 +715,7 @@ QAction *QMenuBarPrivate::getNextAction(const int _start, const int increment) c
{
Q_Q(const QMenuBar);
const_cast<QMenuBarPrivate*>(this)->updateGeometries();
- bool allowActiveAndDisabled = q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, 0, q);
+ bool allowActiveAndDisabled = q->style()->styleHint(QStyle::SH_Menu_AllowActiveAndDisabled, nullptr, q);
const int start = (_start == -1 && increment == -1) ? actions.count() : _start;
const int end = increment == -1 ? 0 : actions.count() - 1;
@@ -734,13 +729,13 @@ QAction *QMenuBarPrivate::getNextAction(const int _start, const int increment) c
if (_start != -1) //let's try from the beginning or the end
return getNextAction(-1, increment);
- return 0;
+ return nullptr;
}
/*!
Constructs a menu bar with parent \a parent.
*/
-QMenuBar::QMenuBar(QWidget *parent) : QWidget(*new QMenuBarPrivate, parent, 0)
+QMenuBar::QMenuBar(QWidget *parent) : QWidget(*new QMenuBarPrivate, parent, { })
{
Q_D(QMenuBar);
d->init();
@@ -754,7 +749,7 @@ QMenuBar::~QMenuBar()
{
Q_D(QMenuBar);
delete d->platformMenuBar;
- d->platformMenuBar = 0;
+ d->platformMenuBar = nullptr;
}
/*!
@@ -1007,7 +1002,7 @@ void QMenuBar::paintEvent(QPaintEvent *e)
style()->drawControl(QStyle::CE_MenuBarItem, &opt, &p, this);
}
//draw border
- if(int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, this)) {
+ if (int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, this)) {
QRegion borderReg;
borderReg += QRect(0, 0, fw, height()); //left
borderReg += QRect(width()-fw, 0, fw, height()); //right
@@ -1060,7 +1055,7 @@ void QMenuBar::mousePressEvent(QMouseEvent *e)
QAction *action = d->actionAt(e->pos());
if (!action || !d->isVisible(action) || !action->isEnabled()) {
- d->setCurrentAction(0);
+ d->setCurrentAction(nullptr);
#if QT_CONFIG(whatsthis)
if (QWhatsThis::inWhatsThisMode())
QWhatsThis::showText(e->globalPos(), d->whatsThis, this);
@@ -1070,7 +1065,7 @@ void QMenuBar::mousePressEvent(QMouseEvent *e)
if(d->currentAction == action && d->popupState) {
if(QMenu *menu = d->activeMenu) {
- d->activeMenu = 0;
+ d->activeMenu = nullptr;
menu->setAttribute(Qt::WA_NoMouseReplay);
menu->hide();
}
@@ -1130,7 +1125,7 @@ void QMenuBar::keyPressEvent(QKeyEvent *e)
case Qt::Key_Enter:
case Qt::Key_Space:
case Qt::Key_Return: {
- if(!style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, 0, this) || !d->currentAction)
+ if (!style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, nullptr, this) || !d->currentAction)
break;
if(d->currentAction->menu()) {
d->popupAction(d->currentAction, true);
@@ -1159,7 +1154,7 @@ void QMenuBar::keyPressEvent(QKeyEvent *e)
#ifndef QT_NO_SHORTCUT
if (!key_consumed && e->matches(QKeySequence::Cancel)) {
- d->setCurrentAction(0);
+ d->setCurrentAction(nullptr);
d->setKeyboardMode(false);
key_consumed = true;
}
@@ -1169,7 +1164,7 @@ void QMenuBar::keyPressEvent(QKeyEvent *e)
(!e->modifiers() ||
(e->modifiers()&(Qt::MetaModifier|Qt::AltModifier))) && e->text().length()==1 && !d->popupState) {
int clashCount = 0;
- QAction *first = 0, *currentSelected = 0, *firstAfterCurrent = 0;
+ QAction *first = nullptr, *currentSelected = nullptr, *firstAfterCurrent = nullptr;
{
const QChar c = e->text().at(0).toUpper();
for(int i = 0; i < d->actions.size(); ++i) {
@@ -1193,7 +1188,7 @@ void QMenuBar::keyPressEvent(QKeyEvent *e)
}
}
}
- QAction *next_action = 0;
+ QAction *next_action = nullptr;
if(clashCount >= 1) {
if(clashCount == 1 || !d->currentAction || (currentSelected && !firstAfterCurrent))
next_action = first;
@@ -1239,14 +1234,14 @@ void QMenuBar::leaveEvent(QEvent *)
{
Q_D(QMenuBar);
if((!hasFocus() && !d->popupState) ||
- (d->currentAction && d->currentAction->menu() == 0))
- d->setCurrentAction(0);
+ (d->currentAction && d->currentAction->menu() == nullptr))
+ d->setCurrentAction(nullptr);
}
QPlatformMenu *QMenuBarPrivate::getPlatformMenu(const QAction *action)
{
if (!action || !action->menu())
- return 0;
+ return nullptr;
QPlatformMenu *platformMenu = action->menu()->platformMenu();
if (!platformMenu && platformMenuBar) {
@@ -1359,7 +1354,7 @@ void QMenuBar::focusOutEvent(QFocusEvent *)
{
Q_D(QMenuBar);
if(!d->popupState) {
- d->setCurrentAction(0);
+ d->setCurrentAction(nullptr);
d->setKeyboardMode(false);
}
}
@@ -1372,7 +1367,7 @@ void QMenuBar::timerEvent (QTimerEvent *e)
Q_D(QMenuBar);
if (e->timerId() == d->autoReleaseTimer.timerId()) {
d->autoReleaseTimer.stop();
- d->setCurrentAction(0);
+ d->setCurrentAction(nullptr);
}
QWidget::timerEvent(e);
}
@@ -1426,7 +1421,7 @@ void QMenuBarPrivate::handleReparent()
newWindow->createWinId();
platformMenuBar->handleReparent(newWindow->windowHandle());
} else {
- platformMenuBar->handleReparent(0);
+ platformMenuBar->handleReparent(nullptr);
}
}
}
@@ -1439,7 +1434,7 @@ void QMenuBar::changeEvent(QEvent *e)
Q_D(QMenuBar);
if(e->type() == QEvent::StyleChange) {
d->itemsDirty = true;
- setMouseTracking(style()->styleHint(QStyle::SH_MenuBar_MouseTracking, 0, this));
+ setMouseTracking(style()->styleHint(QStyle::SH_MenuBar_MouseTracking, nullptr, this));
if(parentWidget())
resize(parentWidget()->width(), heightForWidth(parentWidget()->width()));
d->updateGeometries();
@@ -1548,7 +1543,7 @@ bool QMenuBar::eventFilter(QObject *object, QEvent *event)
d->platformMenuBar->handleReparent(handle);
}
- if (style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, 0, this)) {
+ if (style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, nullptr, this)) {
if (d->altPressed) {
switch (event->type()) {
case QEvent::KeyPress:
@@ -1624,10 +1619,10 @@ QSize QMenuBar::minimumSizeHint() const
ensurePolished();
QSize ret(0, 0);
const_cast<QMenuBarPrivate*>(d)->updateGeometries();
- const int hmargin = style()->pixelMetric(QStyle::PM_MenuBarHMargin, 0, this);
- const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, this);
- int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, this);
- int spaceBelowMenuBar = style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, 0, this);
+ const int hmargin = style()->pixelMetric(QStyle::PM_MenuBarHMargin, nullptr, this);
+ const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, nullptr, this);
+ int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, this);
+ int spaceBelowMenuBar = style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, nullptr, this);
if(as_gui_menubar) {
int w = parentWidget() ? parentWidget()->width() : QDesktopWidgetPrivate::width();
d->calcActionRects(w - (2 * fw), 0);
@@ -1676,10 +1671,10 @@ QSize QMenuBar::sizeHint() const
ensurePolished();
QSize ret(0, 0);
const_cast<QMenuBarPrivate*>(d)->updateGeometries();
- const int hmargin = style()->pixelMetric(QStyle::PM_MenuBarHMargin, 0, this);
- const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, this);
- int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, this);
- int spaceBelowMenuBar = style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, 0, this);
+ const int hmargin = style()->pixelMetric(QStyle::PM_MenuBarHMargin, nullptr, this);
+ const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, nullptr, this);
+ int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, this);
+ int spaceBelowMenuBar = style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, nullptr, this);
if(as_gui_menubar) {
const int w = parentWidget() ? parentWidget()->width() : QDesktopWidgetPrivate::width();
d->calcActionRects(w - (2 * fw), 0);
@@ -1728,9 +1723,9 @@ int QMenuBar::heightForWidth(int) const
const_cast<QMenuBarPrivate*>(d)->updateGeometries();
int height = 0;
- const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0, this);
- int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0, this);
- int spaceBelowMenuBar = style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, 0, this);
+ const int vmargin = style()->pixelMetric(QStyle::PM_MenuBarVMargin, nullptr, this);
+ int fw = style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr, this);
+ int spaceBelowMenuBar = style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, nullptr, this);
if(as_gui_menubar) {
for (int i = 0; i < d->actionRects.count(); ++i)
height = qMax(height, d->actionRects.at(i).height());
@@ -1776,7 +1771,7 @@ void QMenuBarPrivate::_q_internalShortcutActivated(int id)
activateAction(act, QAction::Trigger);
//100 is the same as the default value in QPushButton::animateClick
autoReleaseTimer.start(100, q);
- } else if (act && q->style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, 0, q)) {
+ } else if (act && q->style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation, nullptr, q)) {
// When we open a menu using a shortcut, we should end up in keyboard state
setKeyboardMode(true);
}
@@ -1842,7 +1837,7 @@ void QMenuBar::setCornerWidget(QWidget *w, Qt::Corner corner)
QWidget *QMenuBar::cornerWidget(Qt::Corner corner) const
{
Q_D(const QMenuBar);
- QWidget *w = 0;
+ QWidget *w = nullptr;
switch(corner) {
case Qt::TopLeftCorner:
w = d->leftWidget;
@@ -1881,7 +1876,7 @@ void QMenuBar::setNativeMenuBar(bool nativeMenuBar)
if (nativeMenuBar != bool(d->platformMenuBar)) {
if (!nativeMenuBar) {
delete d->platformMenuBar;
- d->platformMenuBar = 0;
+ d->platformMenuBar = nullptr;
} else {
if (!d->platformMenuBar)
d->platformMenuBar = QGuiApplicationPrivate::platformTheme()->createPlatformMenuBar();
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index 7e9e0fabe9..87e8af1382 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -81,7 +81,7 @@ class QPlainTextDocumentLayoutPrivate : public QAbstractTextDocumentLayoutPrivat
Q_DECLARE_PUBLIC(QPlainTextDocumentLayout)
public:
QPlainTextDocumentLayoutPrivate() {
- mainViewPrivate = 0;
+ mainViewPrivate = nullptr;
width = 0;
maximumWidth = 0;
maximumWidthBlockNumber = 0;
@@ -755,7 +755,7 @@ void QPlainTextEditPrivate::updateViewport()
}
QPlainTextEditPrivate::QPlainTextEditPrivate()
- : control(0),
+ : control(nullptr),
tabChangesFocus(false),
lineWrap(QPlainTextEdit::WidgetWidth),
wordWrap(QTextOption::WrapAtWordBoundaryOrAnywhere),
@@ -1303,7 +1303,7 @@ QPlainTextEdit::~QPlainTextEdit()
Q_D(QPlainTextEdit);
if (d->documentLayoutPtr) {
if (d->documentLayoutPtr->priv()->mainViewPrivate == d)
- d->documentLayoutPtr->priv()->mainViewPrivate = 0;
+ d->documentLayoutPtr->priv()->mainViewPrivate = nullptr;
}
}
@@ -1322,7 +1322,7 @@ QPlainTextEdit::~QPlainTextEdit()
void QPlainTextEdit::setDocument(QTextDocument *document)
{
Q_D(QPlainTextEdit);
- QPlainTextDocumentLayout *documentLayout = 0;
+ QPlainTextDocumentLayout *documentLayout = nullptr;
if (!document) {
document = new QTextDocument(d->control);
@@ -1892,7 +1892,7 @@ void QPlainTextEditPrivate::relayoutDocument()
int width = viewport->width();
- if (documentLayout->priv()->mainViewPrivate == 0
+ if (documentLayout->priv()->mainViewPrivate == nullptr
|| documentLayout->priv()->mainViewPrivate == this
|| width > documentLayout->textWidth()) {
documentLayout->priv()->mainViewPrivate = this;
@@ -2250,17 +2250,17 @@ QVariant QPlainTextEdit::inputMethodQuery(Qt::InputMethodQuery query, QVariant a
}
const QPointF offset = contentOffset();
- switch (argument.type()) {
- case QVariant::RectF:
+ switch (argument.userType()) {
+ case QMetaType::QRectF:
argument = argument.toRectF().translated(-offset);
break;
- case QVariant::PointF:
+ case QMetaType::QPointF:
argument = argument.toPointF() - offset;
break;
- case QVariant::Rect:
+ case QMetaType::QRect:
argument = argument.toRect().translated(-offset.toPoint());
break;
- case QVariant::Point:
+ case QMetaType::QPoint:
argument = argument.toPoint() - offset;
break;
default:
@@ -2268,14 +2268,14 @@ QVariant QPlainTextEdit::inputMethodQuery(Qt::InputMethodQuery query, QVariant a
}
const QVariant v = d->control->inputMethodQuery(query, argument);
- switch (v.type()) {
- case QVariant::RectF:
+ switch (v.userType()) {
+ case QMetaType::QRectF:
return v.toRectF().translated(offset);
- case QVariant::PointF:
+ case QMetaType::QPointF:
return v.toPointF() + offset;
- case QVariant::Rect:
+ case QMetaType::QRect:
return v.toRect().translated(offset.toPoint());
- case QVariant::Point:
+ case QMetaType::QPoint:
return v.toPoint() + offset.toPoint();
default:
break;
diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp
index 56253b8e44..04241fda09 100644
--- a/src/widgets/widgets/qprogressbar.cpp
+++ b/src/widgets/widgets/qprogressbar.cpp
@@ -234,7 +234,7 @@ bool QProgressBarPrivate::repaintRequired() const
*/
QProgressBar::QProgressBar(QWidget *parent)
- : QWidget(*(new QProgressBarPrivate), parent, 0)
+ : QWidget(*(new QProgressBarPrivate), parent, { })
{
d_func()->init();
}
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index f48b5706f7..3d075bf92f 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -297,7 +297,7 @@ QDialog *QPushButtonPrivate::dialogParent() const
if (const QDialog *dialog = qobject_cast<const QDialog *>(p))
return const_cast<QDialog *>(dialog);
}
- return 0;
+ return nullptr;
}
#endif
@@ -353,7 +353,7 @@ bool QPushButton::autoDefault() const
{
Q_D(const QPushButton);
if(d->autoDefault == QPushButtonPrivate::Auto)
- return ( d->dialogParent() != 0 );
+ return ( d->dialogParent() != nullptr );
return d->autoDefault;
}
@@ -496,7 +496,7 @@ void QPushButton::focusOutEvent(QFocusEvent *e)
#if QT_CONFIG(dialog)
QDialog *dlg = qobject_cast<QDialog*>(window());
if (dlg)
- dlg->d_func()->setDefault(0);
+ dlg->d_func()->setDefault(nullptr);
else
d->defaultButton = false;
#endif
@@ -509,6 +509,17 @@ void QPushButton::focusOutEvent(QFocusEvent *e)
#endif
}
+/*!
+ \reimp
+*/
+bool QPushButton::hitButton(const QPoint &pos) const
+{
+ QStyleOptionButton option;
+ initStyleOption(&option);
+ const QRect bevel = style()->subElementRect(QStyle::SE_PushButtonBevel, &option, this);
+ return bevel.contains(pos);
+}
+
#if QT_CONFIG(menu)
/*!
Associates the popup menu \a menu with this push button. This
diff --git a/src/widgets/widgets/qpushbutton.h b/src/widgets/widgets/qpushbutton.h
index b02ba63d07..283dfe2c61 100644
--- a/src/widgets/widgets/qpushbutton.h
+++ b/src/widgets/widgets/qpushbutton.h
@@ -94,6 +94,7 @@ protected:
void focusInEvent(QFocusEvent *) override;
void focusOutEvent(QFocusEvent *) override;
void initStyleOption(QStyleOptionButton *option) const;
+ bool hitButton(const QPoint &pos) const override;
QPushButton(QPushButtonPrivate &dd, QWidget* parent = nullptr);
public:
diff --git a/src/widgets/widgets/qscrollarea.cpp b/src/widgets/widgets/qscrollarea.cpp
index c36ec98f9a..f7a4f8e446 100644
--- a/src/widgets/widgets/qscrollarea.cpp
+++ b/src/widgets/widgets/qscrollarea.cpp
@@ -259,7 +259,7 @@ void QScrollArea::setWidget(QWidget *widget)
return;
delete d->widget;
- d->widget = 0;
+ d->widget = nullptr;
d->hbar->setValue(0);
d->vbar->setValue(0);
if (widget->parentWidget() != d->viewport)
@@ -285,9 +285,9 @@ QWidget *QScrollArea::takeWidget()
{
Q_D(QScrollArea);
QWidget *w = d->widget;
- d->widget = 0;
+ d->widget = nullptr;
if (w)
- w->setParent(0);
+ w->setParent(nullptr);
return w;
}
diff --git a/src/widgets/widgets/qscrollarea_p.h b/src/widgets/widgets/qscrollarea_p.h
index 2bdf9ed596..26335285a4 100644
--- a/src/widgets/widgets/qscrollarea_p.h
+++ b/src/widgets/widgets/qscrollarea_p.h
@@ -65,7 +65,7 @@ class QScrollAreaPrivate: public QAbstractScrollAreaPrivate
Q_DECLARE_PUBLIC(QScrollArea)
public:
- QScrollAreaPrivate(): resizable(false), alignment(nullptr){}
+ QScrollAreaPrivate(): resizable(false) {}
void updateScrollBars();
void updateWidgetPosition();
QPointer<QWidget> widget;
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index 4606f57fb8..2ce1d50c86 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -224,7 +224,7 @@ void QScrollBarPrivate::setTransient(bool value)
if (transient != value) {
transient = value;
if (q->isVisible()) {
- if (q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, q))
+ if (q->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, q))
q->update();
} else if (!transient) {
q->show();
@@ -235,7 +235,7 @@ void QScrollBarPrivate::setTransient(bool value)
void QScrollBarPrivate::flash()
{
Q_Q(QScrollBar);
- if (!flashed && q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, q)) {
+ if (!flashed && q->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, q)) {
flashed = true;
if (!q->isVisible())
q->show();
@@ -319,7 +319,7 @@ void QScrollBar::initStyleOption(QStyleOptionSlider *option) const
option->upsideDown = d->invertedAppearance;
if (d->orientation == Qt::Horizontal)
option->state |= QStyle::State_Horizontal;
- if ((d->flashed || !d->transient) && style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this))
+ if ((d->flashed || !d->transient) && style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, this))
option->state |= QStyle::State_On;
}
@@ -376,7 +376,7 @@ void QScrollBarPrivate::init()
invertedControls = true;
pressedControl = hoverControl = QStyle::SC_None;
pointerOutsidePressedControl = false;
- transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, q);
+ transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, q);
flashed = false;
flashTimer = 0;
q->setFocusPolicy(Qt::NoFocus);
@@ -392,7 +392,7 @@ void QScrollBarPrivate::init()
/*! \reimp */
void QScrollBar::contextMenuEvent(QContextMenuEvent *event)
{
- if (!style()->styleHint(QStyle::SH_ScrollBar_ContextMenu, 0, this)) {
+ if (!style()->styleHint(QStyle::SH_ScrollBar_ContextMenu, nullptr, this)) {
QAbstractSlider::contextMenuEvent(event);
return ;
}
@@ -412,7 +412,7 @@ void QScrollBar::contextMenuEvent(QContextMenuEvent *event)
QAction *actScrollDn = menu->addAction(horiz ? tr("Scroll right") : tr("Scroll down"));
QAction *actionSelected = menu->exec(event->globalPos());
delete menu;
- if (actionSelected == 0)
+ if (actionSelected == nullptr)
/* do nothing */ ;
else if (actionSelected == actScrollHere)
setValue(d_func()->pixelPosToRangeValue(horiz ? event->pos().x() : event->pos().y()));
@@ -472,11 +472,11 @@ bool QScrollBar::event(QEvent *event)
d_func()->updateHoverControl(he->pos());
break;
case QEvent::StyleChange:
- d_func()->setTransient(style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this));
+ d_func()->setTransient(style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, this));
break;
case QEvent::Timer:
if (static_cast<QTimerEvent *>(event)->timerId() == d->flashTimer) {
- if (d->flashed && style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this)) {
+ if (d->flashed && style()->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, this)) {
d->flashed = false;
update();
}
@@ -551,7 +551,7 @@ void QScrollBar::mousePressEvent(QMouseEvent *e)
d->stopRepeatAction();
bool midButtonAbsPos = style()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition,
- 0, this);
+ nullptr, this);
QStyleOptionSlider opt;
initStyleOption(&opt);
diff --git a/src/widgets/widgets/qsizegrip.cpp b/src/widgets/widgets/qsizegrip.cpp
index 835af9c7b8..95a4beeb57 100644
--- a/src/widgets/widgets/qsizegrip.cpp
+++ b/src/widgets/widgets/qsizegrip.cpp
@@ -128,7 +128,7 @@ QSizeGripPrivate::QSizeGripPrivate()
: dxMax(0)
, dyMax(0)
, gotMousePress(false)
- , tlw(0)
+ , tlw(nullptr)
, m_platformSizeGrip(false)
{
}
@@ -195,7 +195,7 @@ Qt::Corner QSizeGripPrivate::corner() const
parent.
*/
QSizeGrip::QSizeGrip(QWidget * parent)
- : QWidget(*new QSizeGripPrivate, parent, 0)
+ : QWidget(*new QSizeGripPrivate, parent, { })
{
Q_D(QSizeGrip);
d->init();
@@ -260,6 +260,17 @@ void QSizeGrip::paintEvent(QPaintEvent *event)
parameter.
*/
+static Qt::Edges edgesFromCorner(Qt::Corner corner)
+{
+ switch (corner) {
+ case Qt::TopLeftCorner: return Qt::TopEdge | Qt::LeftEdge;
+ case Qt::TopRightCorner: return Qt::TopEdge | Qt::RightEdge;
+ case Qt::BottomLeftCorner: return Qt::BottomEdge | Qt::LeftEdge;
+ case Qt::BottomRightCorner: return Qt::BottomEdge | Qt::RightEdge;
+ }
+ return Qt::Edges{};
+}
+
void QSizeGrip::mousePressEvent(QMouseEvent * e)
{
if (e->button() != Qt::LeftButton) {
@@ -281,8 +292,9 @@ void QSizeGrip::mousePressEvent(QMouseEvent * e)
&& !tlw->testAttribute(Qt::WA_DontShowOnScreen)
&& !tlw->hasHeightForWidth()) {
QPlatformWindow *platformWindow = tlw->windowHandle()->handle();
- const QPoint topLevelPos = mapTo(tlw, e->pos());
- d->m_platformSizeGrip = platformWindow && platformWindow->startSystemResize(topLevelPos, d->m_corner);
+ const Qt::Edges edges = edgesFromCorner(d->m_corner);
+ if (!QGuiApplication::platformName().contains(QStringLiteral("xcb"))) // ### FIXME QTBUG-69716
+ d->m_platformSizeGrip = platformWindow && platformWindow->startSystemResize(edges);
}
if (d->m_platformSizeGrip)
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index ae4394dc97..cbd600ec6c 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -1081,7 +1081,7 @@ QSpinBoxPrivate::QSpinBoxPrivate()
value = minimum;
displayIntegerBase = 10;
singleStep = QVariant((int)1);
- type = QVariant::Int;
+ type = QMetaType::Int;
}
/*!
@@ -1238,7 +1238,7 @@ QDoubleSpinBoxPrivate::QDoubleSpinBoxPrivate()
value = minimum;
singleStep = QVariant(1.0);
decimals = 2;
- type = QVariant::Double;
+ type = QMetaType::Double;
}
/*!
diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp
index e39ef6d1cd..70f05033ea 100644
--- a/src/widgets/widgets/qsplashscreen.cpp
+++ b/src/widgets/widgets/qsplashscreen.cpp
@@ -123,6 +123,11 @@ public:
wish to do your own drawing you can get a pointer to the pixmap
used in the splash screen with pixmap(). Alternatively, you can
subclass QSplashScreen and reimplement drawContents().
+
+ In case of having multiple screens, it is also possible to show the
+ splash screen on a different screen than the primary one. For example:
+
+ \snippet qsplashscreen/main.cpp 2
*/
/*!
@@ -132,13 +137,30 @@ public:
perhaps Qt::WindowStaysOnTopHint.
*/
QSplashScreen::QSplashScreen(const QPixmap &pixmap, Qt::WindowFlags f)
- : QWidget(*(new QSplashScreenPrivate()), 0, Qt::SplashScreen | Qt::FramelessWindowHint | f)
+ : QWidget(*(new QSplashScreenPrivate()), nullptr, Qt::SplashScreen | Qt::FramelessWindowHint | f)
{
setPixmap(pixmap); // Does an implicit repaint
}
/*!
\overload
+ \since 5.15
+
+ This function allows you to specify the screen for your splashscreen. The
+ typical use for this constructor is if you have multiple screens and
+ prefer to have the splash screen on a different screen than your primary
+ one. In that case pass the proper \a screen.
+*/
+QSplashScreen::QSplashScreen(QScreen *screen, const QPixmap &pixmap, Qt::WindowFlags f)
+ : QWidget(*(new QSplashScreenPrivate()), nullptr, Qt::SplashScreen | Qt::FramelessWindowHint | f)
+{
+ d_func()->setPixmap(pixmap, screen);
+}
+
+#if QT_DEPRECATED_SINCE(5, 15)
+/*!
+ \overload
+ \obsolete
This function allows you to specify a parent for your splashscreen. The
typical use for this constructor is if you have a multiple screens and
@@ -152,6 +174,7 @@ QSplashScreen::QSplashScreen(QWidget *parent, const QPixmap &pixmap, Qt::WindowF
// is still 0 here due to QWidget's special handling.
d_func()->setPixmap(pixmap, QSplashScreenPrivate::screenFor(parent));
}
+#endif
/*!
Destructor.
@@ -248,14 +271,14 @@ inline static bool waitForWindowExposed(QWindow *window, int timeout = 1000)
if (remaining <= 0)
break;
QCoreApplication::processEvents(QEventLoop::AllEvents, remaining);
- QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
#if defined(Q_OS_WINRT)
WaitForSingleObjectEx(GetCurrentThread(), TimeOutMs, false);
#elif defined(Q_OS_WIN)
Sleep(uint(TimeOutMs));
#else
struct timespec ts = { TimeOutMs / 1000, (TimeOutMs % 1000) * 1000 * 1000 };
- nanosleep(&ts, NULL);
+ nanosleep(&ts, nullptr);
#endif
}
return window->isExposed();
@@ -286,26 +309,35 @@ void QSplashScreen::setPixmap(const QPixmap &pixmap)
}
// In setPixmap(), resize and try to position on a screen according to:
-// 1) If a QDesktopScreenWidget is found in the parent hierarchy, use that (see docs on
+// 1) If the screen for the given widget is available, use that
+// 2) If a QDesktopScreenWidget is found in the parent hierarchy, use that (see docs on
// QSplashScreen(QWidget *, QPixmap).
-// 2) If a widget with associated QWindow is found, use that
-// 3) When nothing can be found, try to center it over the cursor
+// 3) If a widget with associated QWindow is found, use that
+// 4) When nothing can be found, try to center it over the cursor
+#if QT_DEPRECATED_SINCE(5, 15)
static inline int screenNumberOf(const QDesktopScreenWidget *dsw)
{
auto desktopWidgetPrivate =
static_cast<QDesktopWidgetPrivate *>(qt_widget_private(QApplication::desktop()));
return desktopWidgetPrivate->screens.indexOf(const_cast<QDesktopScreenWidget *>(dsw));
}
+#endif
const QScreen *QSplashScreenPrivate::screenFor(const QWidget *w)
{
+ if (w && w->screen())
+ return w->screen();
+
for (const QWidget *p = w; p !=nullptr ; p = p->parentWidget()) {
+#if QT_DEPRECATED_SINCE(5, 15)
if (auto dsw = qobject_cast<const QDesktopScreenWidget *>(p))
return QGuiApplication::screens().value(screenNumberOf(dsw));
+#endif
if (QWindow *window = p->windowHandle())
return window->screen();
}
+
#if QT_CONFIG(cursor)
// Note: We could rely on QPlatformWindow::initialGeometry() to center it
// over the cursor, but not all platforms (namely Android) use that.
diff --git a/src/widgets/widgets/qsplashscreen.h b/src/widgets/widgets/qsplashscreen.h
index 8bdf4e7749..1877493fcf 100644
--- a/src/widgets/widgets/qsplashscreen.h
+++ b/src/widgets/widgets/qsplashscreen.h
@@ -55,7 +55,11 @@ class Q_WIDGETS_EXPORT QSplashScreen : public QWidget
Q_OBJECT
public:
explicit QSplashScreen(const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags());
+ QSplashScreen(QScreen *screen, const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags());
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X_5_15("Use the constructor taking a QScreen *")
QSplashScreen(QWidget *parent, const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags());
+#endif
virtual ~QSplashScreen();
void setPixmap(const QPixmap &pixmap);
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index e7a4889996..090aa5cc8b 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -119,7 +119,7 @@ QSplitterPrivate::~QSplitterPrivate()
\a parent.
*/
QSplitterHandle::QSplitterHandle(Qt::Orientation orientation, QSplitter *parent)
- : QWidget(*new QSplitterHandlePrivate, parent, 0)
+ : QWidget(*new QSplitterHandlePrivate, parent, { })
{
Q_D(QSplitterHandle);
d->s = parent;
@@ -1494,7 +1494,7 @@ int QSplitter::closestLegalPosition(int pos, int index)
bool QSplitter::opaqueResize() const
{
Q_D(const QSplitter);
- return d->opaqueResizeSet ? d->opaque : style()->styleHint(QStyle::SH_Splitter_OpaqueResize, 0, this);
+ return d->opaqueResizeSet ? d->opaque : style()->styleHint(QStyle::SH_Splitter_OpaqueResize, nullptr, this);
}
@@ -1639,7 +1639,7 @@ int QSplitter::handleWidth() const
if (d->handleWidth >= 0) {
return d->handleWidth;
} else {
- return style()->pixelMetric(QStyle::PM_SplitterWidth, 0, this);
+ return style()->pixelMetric(QStyle::PM_SplitterWidth, nullptr, this);
}
}
diff --git a/src/widgets/widgets/qstackedwidget.cpp b/src/widgets/widgets/qstackedwidget.cpp
index f863964c58..a565d4ab4c 100644
--- a/src/widgets/widgets/qstackedwidget.cpp
+++ b/src/widgets/widgets/qstackedwidget.cpp
@@ -49,7 +49,7 @@ class QStackedWidgetPrivate : public QFramePrivate
{
Q_DECLARE_PUBLIC(QStackedWidget)
public:
- QStackedWidgetPrivate():layout(0){}
+ QStackedWidgetPrivate():layout(nullptr){}
QStackedLayout *layout;
bool blockChildAdd;
};
diff --git a/src/widgets/widgets/qstatusbar.cpp b/src/widgets/widgets/qstatusbar.cpp
index 39f0f11daf..4a1fef8b65 100644
--- a/src/widgets/widgets/qstatusbar.cpp
+++ b/src/widgets/widgets/qstatusbar.cpp
@@ -226,14 +226,14 @@ QRect QStatusBarPrivate::messageRect() const
\sa setSizeGripEnabled()
*/
QStatusBar::QStatusBar(QWidget * parent)
- : QWidget(*new QStatusBarPrivate, parent, 0)
+ : QWidget(*new QStatusBarPrivate, parent, { })
{
Q_D(QStatusBar);
- d->box = 0;
- d->timer = 0;
+ d->box = nullptr;
+ d->timer = nullptr;
#if QT_CONFIG(sizegrip)
- d->resizer = 0;
+ d->resizer = nullptr;
setSizeGripEnabled(true); // causes reformat()
#else
reformat();
@@ -451,7 +451,7 @@ void QStatusBar::setSizeGripEnabled(bool enabled)
d->showSizeGrip = true;
} else {
delete d->resizer;
- d->resizer = 0;
+ d->resizer = nullptr;
d->showSizeGrip = false;
}
reformat();
@@ -497,7 +497,7 @@ void QStatusBar::reformat()
int i;
QStatusBarPrivate::SBItem* item;
- for (i=0,item=0; i<d->items.size(); ++i) {
+ for (i=0,item=nullptr; i<d->items.size(); ++i) {
item = d->items.at(i);
if (!item || item->p)
break;
@@ -508,7 +508,7 @@ void QStatusBar::reformat()
l->addStretch(0);
- for (item=0; i<d->items.size(); ++i) {
+ for (item=nullptr; i<d->items.size(); ++i) {
item = d->items.at(i);
if (!item)
break;
@@ -556,7 +556,7 @@ void QStatusBar::showMessage(const QString &message, int timeout)
d->timer->start(timeout);
} else if (d->timer) {
delete d->timer;
- d->timer = 0;
+ d->timer = nullptr;
}
if (d->tempItem == message)
return;
@@ -578,7 +578,7 @@ void QStatusBar::clearMessage()
return;
if (d->timer) {
qDeleteInEventHandler(d->timer);
- d->timer = 0;
+ d->timer = nullptr;
}
d->tempItem.clear();
hideOrShow();
@@ -617,7 +617,7 @@ void QStatusBar::hideOrShow()
Q_D(QStatusBar);
bool haveMessage = !d->tempItem.isEmpty();
- QStatusBarPrivate::SBItem* item = 0;
+ QStatusBarPrivate::SBItem* item = nullptr;
for (int i=0; i<d->items.size(); ++i) {
item = d->items.at(i);
if (!item || item->p)
@@ -711,7 +711,7 @@ bool QStatusBar::event(QEvent *e)
// Calculate new strut height and call reformat() if it has changed
int maxH = fontMetrics().height();
- QStatusBarPrivate::SBItem* item = 0;
+ QStatusBarPrivate::SBItem* item = nullptr;
for (int i=0; i<d->items.size(); ++i) {
item = d->items.at(i);
if (!item)
@@ -731,7 +731,7 @@ bool QStatusBar::event(QEvent *e)
update();
}
if (e->type() == QEvent::ChildRemoved) {
- QStatusBarPrivate::SBItem* item = 0;
+ QStatusBarPrivate::SBItem* item = nullptr;
for (int i=0; i<d->items.size(); ++i) {
item = d->items.at(i);
if (!item)
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 7e1794efef..df480629da 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -76,7 +76,7 @@ class CloseButton : public QAbstractButton
Q_OBJECT
public:
- explicit CloseButton(QWidget *parent = 0);
+ explicit CloseButton(QWidget *parent = nullptr);
QSize sizeHint() const override;
QSize minimumSizeHint() const override
@@ -207,8 +207,8 @@ void QTabBarPrivate::initBasicStyleOption(QStyleOptionTab *option, int tabIndex)
else
option->selectedPosition = QStyleOptionTab::NotAdjacent;
- const bool paintBeginning = (tabIndex == 0) || (dragInProgress && tabIndex == pressedIndex + 1);
- const bool paintEnd = (tabIndex == totalTabs - 1) || (dragInProgress && tabIndex == pressedIndex - 1);
+ const bool paintBeginning = (tabIndex == firstVisible) || (dragInProgress && tabIndex == pressedIndex + 1);
+ const bool paintEnd = (tabIndex == lastVisible) || (dragInProgress && tabIndex == pressedIndex - 1);
if (paintBeginning) {
if (paintEnd)
option->position = QStyleOptionTab::OnlyOneTab;
@@ -229,6 +229,8 @@ void QTabBarPrivate::initBasicStyleOption(QStyleOptionTab *option, int tabIndex)
option->cornerWidgets |= QStyleOptionTab::RightCornerWidget;
}
#endif
+ if (QStyleOptionTabV4 *optv4 = qstyleoption_cast<QStyleOptionTabV4 *>(option))
+ optv4->tabIndex = tabIndex;
}
/*!
@@ -424,18 +426,18 @@ void QTabBarPrivate::init()
rightB->setAccessibleName(QTabBar::tr("Scroll Right"));
#endif
q->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
- elideMode = Qt::TextElideMode(q->style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, q));
- useScrollButtons = !q->style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, q);
+ elideMode = Qt::TextElideMode(q->style()->styleHint(QStyle::SH_TabBar_ElideMode, nullptr, q));
+ useScrollButtons = !q->style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, nullptr, q);
}
QTabBarPrivate::Tab *QTabBarPrivate::at(int index)
{
- return validIndex(index)?&tabList[index]:0;
+ return validIndex(index)?&tabList[index]:nullptr;
}
const QTabBarPrivate::Tab *QTabBarPrivate::at(int index) const
{
- return validIndex(index)?&tabList[index]:0;
+ return validIndex(index)?&tabList[index]:nullptr;
}
int QTabBarPrivate::indexAtPos(const QPoint &p) const
@@ -459,8 +461,9 @@ void QTabBarPrivate::layoutTabs()
int i;
bool vertTabs = verticalTabs(shape);
int tabChainIndex = 0;
+ int hiddenTabs = 0;
- Qt::Alignment tabAlignment = Qt::Alignment(q->style()->styleHint(QStyle::SH_TabBar_Alignment, 0, q));
+ Qt::Alignment tabAlignment = Qt::Alignment(q->style()->styleHint(QStyle::SH_TabBar_Alignment, nullptr, q));
QVector<QLayoutStruct> tabChain(tabList.count() + 2);
// We put an empty item at the front and back and set its expansive attribute
@@ -484,7 +487,11 @@ void QTabBarPrivate::layoutTabs()
int minx = 0;
int x = 0;
int maxHeight = 0;
- for (i = 0; i < tabList.count(); ++i, ++tabChainIndex) {
+ for (i = 0; i < tabList.count(); ++i) {
+ if (!tabList.at(i).visible) {
+ ++hiddenTabs;
+ continue;
+ }
QSize sz = q->tabSizeHint(i);
tabList[i].maxRect = QRect(x, 0, sz.width(), sz.height());
x += sz.width();
@@ -500,6 +507,7 @@ void QTabBarPrivate::layoutTabs()
if (!expanding)
tabChain[tabChainIndex].maximumSize = tabChain[tabChainIndex].sizeHint;
+ ++tabChainIndex;
}
last = minx;
@@ -509,7 +517,11 @@ void QTabBarPrivate::layoutTabs()
int miny = 0;
int y = 0;
int maxWidth = 0;
- for (i = 0; i < tabList.count(); ++i, ++tabChainIndex) {
+ for (i = 0; i < tabList.count(); ++i) {
+ if (!tabList.at(i).visible) {
+ ++hiddenTabs;
+ continue;
+ }
QSize sz = q->tabSizeHint(i);
tabList[i].maxRect = QRect(0, y, sz.width(), sz.height());
y += sz.height();
@@ -525,6 +537,7 @@ void QTabBarPrivate::layoutTabs()
if (!expanding)
tabChain[tabChainIndex].maximumSize = tabChain[tabChainIndex].sizeHint;
+ ++tabChainIndex;
}
last = miny;
@@ -538,14 +551,20 @@ void QTabBarPrivate::layoutTabs()
&& (tabAlignment != Qt::AlignRight)
&& (tabAlignment != Qt::AlignJustify);
tabChain[tabChainIndex].empty = true;
- Q_ASSERT(tabChainIndex == tabChain.count() - 1); // add an assert just to make sure.
+ Q_ASSERT(tabChainIndex == tabChain.count() - 1 - hiddenTabs); // add an assert just to make sure.
// Do the calculation
qGeomCalc(tabChain, 0, tabChain.count(), 0, qMax(available, last), 0);
// Use the results
+ hiddenTabs = 0;
for (i = 0; i < tabList.count(); ++i) {
- const QLayoutStruct &lstruct = tabChain.at(i + 1);
+ if (!tabList.at(i).visible) {
+ tabList[i].rect = QRect();
+ ++hiddenTabs;
+ continue;
+ }
+ const QLayoutStruct &lstruct = tabChain.at(i + 1 - hiddenTabs);
if (!vertTabs)
tabList[i].rect.setRect(lstruct.pos, 0, lstruct.size, maxExtent);
else
@@ -611,7 +630,7 @@ QRect QTabBarPrivate::normalizedScrollRect(int index)
// tab bar itself is in a different orientation.
Q_Q(QTabBar);
- QStyleOptionTab opt;
+ QStyleOptionTabV4 opt;
q->initStyleOption(&opt, currentIndex);
opt.rect = q->rect();
@@ -740,7 +759,7 @@ void QTabBarPrivate::layoutTab(int index)
if (!(tab.leftWidget || tab.rightWidget))
return;
- QStyleOptionTab opt;
+ QStyleOptionTabV4 opt;
q->initStyleOption(&opt, index);
if (tab.leftWidget) {
QRect rect = q->style()->subElementRect(QStyle::SE_TabBarTabLeftButton, &opt, q);
@@ -787,7 +806,7 @@ void QTabBarPrivate::_q_closeTab()
Q_Q(QTabBar);
QObject *object = q->sender();
int tabToClose = -1;
- QTabBar::ButtonPosition closeSide = (QTabBar::ButtonPosition)q->style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, q);
+ QTabBar::ButtonPosition closeSide = (QTabBar::ButtonPosition)q->style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, nullptr, q);
for (int i = 0; i < tabList.count(); ++i) {
if (closeSide == QTabBar::LeftSide) {
if (tabList.at(i).leftWidget == object) {
@@ -859,7 +878,7 @@ void QTabBarPrivate::refresh()
Creates a new tab bar with the given \a parent.
*/
QTabBar::QTabBar(QWidget* parent)
- :QWidget(*new QTabBarPrivate, parent, 0)
+ :QWidget(*new QTabBarPrivate, parent, { })
{
Q_D(QTabBar);
d->init();
@@ -975,16 +994,20 @@ int QTabBar::insertTab(int index, const QIcon& icon, const QString &text)
#ifndef QT_NO_SHORTCUT
d->tabList[index].shortcutId = grabShortcut(QKeySequence::mnemonic(text));
#endif
+ d->firstVisible = qMax(qMin(index, d->firstVisible), 0);
+ d->lastVisible = qMax(index, d->lastVisible);
d->refresh();
if (d->tabList.count() == 1)
setCurrentIndex(index);
- else if (index <= d->currentIndex)
+ else if (index <= d->currentIndex) {
++d->currentIndex;
+ ++d->lastVisible;
+ }
if (d->closeButtonOnTabs) {
- QStyleOptionTab opt;
+ QStyleOptionTabV4 opt;
initStyleOption(&opt, index);
- ButtonPosition closeSide = (ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, this);
+ ButtonPosition closeSide = (ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, nullptr, this);
QAbstractButton *closeButton = new CloseButton(this);
connect(closeButton, SIGNAL(clicked()), this, SLOT(_q_closeTab()));
setTabButton(index, closeSide, closeButton);
@@ -1019,12 +1042,12 @@ void QTabBar::removeTab(int index)
if (d->tabList[index].leftWidget) {
d->tabList[index].leftWidget->hide();
d->tabList[index].leftWidget->deleteLater();
- d->tabList[index].leftWidget = 0;
+ d->tabList[index].leftWidget = nullptr;
}
if (d->tabList[index].rightWidget) {
d->tabList[index].rightWidget->hide();
d->tabList[index].rightWidget->deleteLater();
- d->tabList[index].rightWidget = 0;
+ d->tabList[index].rightWidget = nullptr;
}
int newIndex = d->tabList[index].lastTab;
@@ -1035,6 +1058,9 @@ void QTabBar::removeTab(int index)
if (d->tabList[i].lastTab > index)
--d->tabList[i].lastTab;
}
+
+ d->calculateFirstLastVisible(index, false, true);
+
if (index == d->currentIndex) {
// The current tab is going away, in order to make sure
// we emit that "current has changed", we need to reset this
@@ -1045,16 +1071,14 @@ void QTabBar::removeTab(int index)
case SelectPreviousTab:
if (newIndex > index)
newIndex--;
- if (d->validIndex(newIndex))
+ if (d->validIndex(newIndex) && d->tabList.at(newIndex).visible)
break;
Q_FALLTHROUGH();
case SelectRightTab:
- newIndex = index;
- if (newIndex >= d->tabList.size())
- newIndex = d->tabList.size() - 1;
+ newIndex = qBound(d->firstVisible, index, d->lastVisible);
break;
case SelectLeftTab:
- newIndex = index - 1;
+ newIndex = qBound(d->firstVisible, index-1, d->lastVisible);
if (newIndex < 0)
newIndex = 0;
break;
@@ -1118,9 +1142,52 @@ void QTabBar::setTabEnabled(int index, bool enabled)
#endif
update();
if (!enabled && index == d->currentIndex)
- setCurrentIndex(d->validIndex(index+1)?index+1:0);
- else if (enabled && !d->validIndex(d->currentIndex))
- setCurrentIndex(index);
+ setCurrentIndex(d->selectNewCurrentIndexFrom(index+1));
+ else if (enabled && !isTabVisible(d->currentIndex))
+ setCurrentIndex(d->selectNewCurrentIndexFrom(index));
+ }
+}
+
+
+/*!
+ Returns true if the tab at position \a index is visible; otherwise
+ returns false.
+ \since 5.15
+*/
+bool QTabBar::isTabVisible(int index) const
+{
+ Q_D(const QTabBar);
+ if (d->validIndex(index))
+ return d->tabList.at(index).visible;
+ return false;
+}
+
+/*!
+ If \a visible is true, make the tab at position \a index visible,
+ otherwise make it hidden.
+ \since 5.15
+*/
+void QTabBar::setTabVisible(int index, bool visible)
+{
+ Q_D(QTabBar);
+ if (QTabBarPrivate::Tab *tab = d->at(index)) {
+ d->layoutDirty = (visible != tab->visible);
+ if (!d->layoutDirty)
+ return;
+ tab->visible = visible;
+ if (tab->leftWidget)
+ tab->leftWidget->setVisible(visible);
+ if (tab->rightWidget)
+ tab->rightWidget->setVisible(visible);
+#ifndef QT_NO_SHORTCUT
+ setShortcutEnabled(tab->shortcutId, visible);
+#endif
+ d->calculateFirstLastVisible(index, visible, false);
+ if (!visible && index == d->currentIndex) {
+ const int newindex = d->selectNewCurrentIndexFrom(index+1);
+ setCurrentIndex(newindex);
+ }
+ update();
}
}
@@ -1291,7 +1358,7 @@ QVariant QTabBar::tabData(int index) const
/*!
Returns the visual rectangle of the tab at position \a
- index, or a null rectangle if \a index is out of range.
+ index, or a null rectangle if \a index is hidden, or out of range.
*/
QRect QTabBar::tabRect(int index) const
{
@@ -1299,6 +1366,8 @@ QRect QTabBar::tabRect(int index) const
if (const QTabBarPrivate::Tab *tab = d->at(index)) {
if (d->layoutDirty)
const_cast<QTabBarPrivate*>(d)->layoutTabs();
+ if (!tab->visible)
+ return QRect();
QRect r = tab->rect;
if (verticalTabs(d->shape))
r.translate(0, -d->scrollOffset);
@@ -1395,7 +1464,7 @@ QSize QTabBar::iconSize() const
Q_D(const QTabBar);
if (d->iconSize.isValid())
return d->iconSize;
- int iconExtent = style()->pixelMetric(QStyle::PM_TabBarIconSize, 0, this);
+ int iconExtent = style()->pixelMetric(QStyle::PM_TabBarIconSize, nullptr, this);
return QSize(iconExtent, iconExtent);
}
@@ -1429,8 +1498,10 @@ QSize QTabBar::sizeHint() const
if (d->layoutDirty)
const_cast<QTabBarPrivate*>(d)->layoutTabs();
QRect r;
- for (int i = 0; i < d->tabList.count(); ++i)
- r = r.united(d->tabList.at(i).maxRect);
+ for (int i = 0; i < d->tabList.count(); ++i) {
+ if (d->tabList.at(i).visible)
+ r = r.united(d->tabList.at(i).maxRect);
+ }
QSize sz = QApplication::globalStrut();
return r.size().expandedTo(sz);
}
@@ -1444,8 +1515,10 @@ QSize QTabBar::minimumSizeHint() const
const_cast<QTabBarPrivate*>(d)->layoutTabs();
if (!d->useScrollButtons) {
QRect r;
- for (int i = 0; i < d->tabList.count(); ++i)
- r = r.united(d->tabList.at(i).minRect);
+ for (int i = 0; i < d->tabList.count(); ++i) {
+ if (d->tabList.at(i).visible)
+ r = r.united(d->tabList.at(i).minRect);
+ }
return r.size().expandedTo(QApplication::globalStrut());
}
if (verticalTabs(d->shape))
@@ -1503,7 +1576,7 @@ QSize QTabBar::tabSizeHint(int index) const
//Note: this must match with the computations in QCommonStylePrivate::tabLayout
Q_D(const QTabBar);
if (const QTabBarPrivate::Tab *tab = d->at(index)) {
- QStyleOptionTab opt;
+ QStyleOptionTabV4 opt;
d->initBasicStyleOption(&opt, index);
opt.text = d->tabList.at(index).text;
QSize iconSize = tab->icon.isNull() ? QSize(0, 0) : opt.iconSize;
@@ -1746,7 +1819,9 @@ void QTabBar::paintEvent(QPaintEvent *)
p.drawPrimitive(QStyle::PE_FrameTabBarBase, optTabBase);
for (int i = 0; i < d->tabList.count(); ++i) {
- QStyleOptionTab tab;
+ if (!d->at(i)->visible)
+ continue;
+ QStyleOptionTabV4 tab;
initStyleOption(&tab, i);
if (d->paintWithOffsets && d->tabList[i].dragOffset != 0) {
if (vertical) {
@@ -1786,7 +1861,7 @@ void QTabBar::paintEvent(QPaintEvent *)
// Draw the selected tab last to get it "on top"
if (selected >= 0) {
- QStyleOptionTab tab;
+ QStyleOptionTabV4 tab;
initStyleOption(&tab, selected);
if (d->paintWithOffsets && d->tabList[selected].dragOffset != 0) {
if (vertical)
@@ -1797,7 +1872,7 @@ void QTabBar::paintEvent(QPaintEvent *)
if (!d->dragInProgress)
p.drawControl(QStyle::CE_TabBarTab, tab);
else {
- int taboverlap = style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0, this);
+ int taboverlap = style()->pixelMetric(QStyle::PM_TabBarTabOverlap, nullptr, this);
if (verticalTabs(d->shape))
d->movingTab->setGeometry(tab.rect.adjusted(0, -taboverlap, 0, taboverlap));
else
@@ -1820,6 +1895,65 @@ void QTabBar::paintEvent(QPaintEvent *)
}
/*
+ When index changes visibility, we have to find first & last visible indexes.
+ If remove is set, we force both
+ */
+void QTabBarPrivate::calculateFirstLastVisible(int index, bool visible, bool remove)
+{
+ if (visible) {
+ firstVisible = qMin(index, firstVisible);
+ lastVisible = qMax(index, lastVisible);
+ } else {
+ if (remove || (index == firstVisible)) {
+ firstVisible = -1;
+ for (int i = 0; i < tabList.count(); ++i) {
+ if (tabList.at(i).visible) {
+ firstVisible = i;
+ break;
+ }
+ }
+ if (firstVisible < 0)
+ firstVisible = 0;
+ }
+ if (remove || (index == lastVisible)) {
+ lastVisible = -1;
+ for (int i = tabList.count() - 1; i >= 0; --i) {
+ if (tabList.at(i).visible) {
+ lastVisible = i;
+ break;
+ }
+ }
+ }
+ }
+}
+
+/*
+ Selects the new current index starting at "fromIndex". If "fromIndex" is visible we're done.
+ Else it tries any index AFTER fromIndex, then any BEFORE fromIndex and, if everything fails,
+ it returns -1 indicating that no index is available
+ */
+int QTabBarPrivate::selectNewCurrentIndexFrom(int fromIndex)
+{
+ int newindex = -1;
+ for (int i = fromIndex; i < tabList.count(); ++i) {
+ if (at(i)->visible && at(i)->enabled) {
+ newindex = i;
+ break;
+ }
+ }
+ if (newindex < 0) {
+ for (int i = fromIndex-1; i > -1; --i) {
+ if (at(i)->visible && at(i)->enabled) {
+ newindex = i;
+ break;
+ }
+ }
+ }
+
+ return newindex;
+}
+
+/*
Given that index at position from moved to position to where return where index goes.
*/
int QTabBarPrivate::calculateNewPosition(int from, int to, int index) const
@@ -2065,7 +2199,7 @@ void QTabBarPrivate::setupMovableTab()
if (!movingTab)
movingTab = new QMovableTabWidget(q);
- int taboverlap = q->style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0 ,q);
+ int taboverlap = q->style()->pixelMetric(QStyle::PM_TabBarTabOverlap, nullptr ,q);
QRect grabRect = q->tabRect(pressedIndex);
if (verticalTabs(shape))
grabRect.adjust(0, -taboverlap, 0, taboverlap);
@@ -2077,7 +2211,7 @@ void QTabBarPrivate::setupMovableTab()
grabImage.fill(Qt::transparent);
QStylePainter p(&grabImage, q);
- QStyleOptionTab tab;
+ QStyleOptionTabV4 tab;
q->initStyleOption(&tab, pressedIndex);
tab.position = QStyleOptionTab::OnlyOneTab;
if (verticalTabs(shape))
@@ -2221,9 +2355,9 @@ void QTabBar::changeEvent(QEvent *event)
switch (event->type()) {
case QEvent::StyleChange:
if (!d->elideModeSetByUser)
- d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, this));
+ d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, nullptr, this));
if (!d->useScrollButtonsSetByUser)
- d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this);
+ d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, nullptr, this);
Q_FALLTHROUGH();
case QEvent::FontChange:
d->textSizes.clear();
@@ -2333,16 +2467,16 @@ void QTabBar::setTabsClosable(bool closable)
if (d->closeButtonOnTabs == closable)
return;
d->closeButtonOnTabs = closable;
- ButtonPosition closeSide = (ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, this);
+ ButtonPosition closeSide = (ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, nullptr, this);
if (!closable) {
for (int i = 0; i < d->tabList.count(); ++i) {
if (closeSide == LeftSide && d->tabList[i].leftWidget) {
d->tabList[i].leftWidget->deleteLater();
- d->tabList[i].leftWidget = 0;
+ d->tabList[i].leftWidget = nullptr;
}
if (closeSide == RightSide && d->tabList[i].rightWidget) {
d->tabList[i].rightWidget->deleteLater();
- d->tabList[i].rightWidget = 0;
+ d->tabList[i].rightWidget = nullptr;
}
}
} else {
@@ -2637,8 +2771,8 @@ CloseButton::CloseButton(QWidget *parent)
QSize CloseButton::sizeHint() const
{
ensurePolished();
- int width = style()->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, 0, this);
- int height = style()->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, 0, this);
+ int width = style()->pixelMetric(QStyle::PM_TabCloseIndicatorWidth, nullptr, this);
+ int height = style()->pixelMetric(QStyle::PM_TabCloseIndicatorHeight, nullptr, this);
return QSize(width, height);
}
@@ -2671,7 +2805,7 @@ void CloseButton::paintEvent(QPaintEvent *)
if (const QTabBar *tb = qobject_cast<const QTabBar *>(parent())) {
int index = tb->currentIndex();
- QTabBar::ButtonPosition position = (QTabBar::ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, 0, tb);
+ QTabBar::ButtonPosition position = (QTabBar::ButtonPosition)style()->styleHint(QStyle::SH_TabBar_CloseButtonPosition, nullptr, tb);
if (tb->tabButton(index, position) == this)
opt.state |= QStyle::State_Selected;
}
diff --git a/src/widgets/widgets/qtabbar.h b/src/widgets/widgets/qtabbar.h
index fc619355f0..c49c12f38c 100644
--- a/src/widgets/widgets/qtabbar.h
+++ b/src/widgets/widgets/qtabbar.h
@@ -105,6 +105,9 @@ public:
bool isTabEnabled(int index) const;
void setTabEnabled(int index, bool);
+ bool isTabVisible(int index) const;
+ void setTabVisible(int index, bool);
+
QString tabText(int index) const;
void setTabText(int index, const QString &text);
diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h
index 5552c43548..ac4cbd32a8 100644
--- a/src/widgets/widgets/qtabbar_p.h
+++ b/src/widgets/widgets/qtabbar_p.h
@@ -88,7 +88,7 @@ class Q_WIDGETS_EXPORT QTabBarPrivate : public QWidgetPrivate
Q_DECLARE_PUBLIC(QTabBar)
public:
QTabBarPrivate()
- :currentIndex(-1), pressedIndex(-1), shape(QTabBar::RoundedNorth), layoutDirty(false),
+ :currentIndex(-1), pressedIndex(-1), firstVisible(0), lastVisible(-1), shape(QTabBar::RoundedNorth), layoutDirty(false),
drawBase(true), scrollOffset(0), hoverIndex(-1), elideModeSetByUser(false), useScrollButtonsSetByUser(false), expanding(true), closeButtonOnTabs(false),
selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false),
dragInProgress(false), documentMode(false), autoHide(false), changeCurrentOnDrag(false),
@@ -97,6 +97,8 @@ public:
int currentIndex;
int pressedIndex;
+ int firstVisible;
+ int lastVisible;
QTabBar::Shape shape;
bool layoutDirty;
bool drawBase;
@@ -104,14 +106,15 @@ public:
struct Tab {
inline Tab(const QIcon &ico, const QString &txt)
- : enabled(true) , shortcutId(0), text(txt), icon(ico),
- leftWidget(0), rightWidget(0), lastTab(-1), dragOffset(0)
+ : enabled(true) , visible(true), shortcutId(0), text(txt), icon(ico),
+ leftWidget(nullptr), rightWidget(nullptr), lastTab(-1), dragOffset(0)
#if QT_CONFIG(animation)
- , animation(0)
+ , animation(nullptr)
#endif // animation
{}
bool operator==(const Tab &other) const { return &other == this; }
bool enabled;
+ bool visible;
int shortcutId;
QString text;
#ifndef QT_NO_TOOLTIP
@@ -170,6 +173,8 @@ public:
QList<Tab> tabList;
mutable QHash<QString, QSize> textSizes;
+ void calculateFirstLastVisible(int index, bool visible, bool remove);
+ int selectNewCurrentIndexFrom(int currentIndex);
int calculateNewPosition(int from, int to, int index) const;
void slide(int from, int to);
void init();
diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp
index 4d7b39ae01..a19dacda52 100644
--- a/src/widgets/widgets/qtabwidget.cpp
+++ b/src/widgets/widgets/qtabwidget.cpp
@@ -215,9 +215,9 @@ public:
};
QTabWidgetPrivate::QTabWidgetPrivate()
- : tabs(0), stack(0), dirty(true),
+ : tabs(nullptr), stack(nullptr), dirty(true),
pos(QTabWidget::North), shape(QTabWidget::Rounded),
- leftCornerWidget(0), rightCornerWidget(0)
+ leftCornerWidget(nullptr), rightCornerWidget(nullptr)
{}
QTabWidgetPrivate::~QTabWidgetPrivate()
@@ -249,7 +249,7 @@ void QTabWidgetPrivate::init()
q->setFocusPolicy(Qt::TabFocus);
q->setFocusProxy(tabs);
q->setTabPosition(static_cast<QTabWidget::TabPosition> (q->style()->styleHint(
- QStyle::SH_TabWidget_DefaultTabPosition, 0, q )));
+ QStyle::SH_TabWidget_DefaultTabPosition, nullptr, q )));
}
@@ -280,7 +280,7 @@ void QTabWidgetPrivate::initBasicStyleOption(QStyleOptionTabWidgetFrame *option)
if (q->documentMode())
option->lineWidth = 0;
else
- option->lineWidth = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, q);
+ option->lineWidth = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, nullptr, q);
switch (pos) {
case QTabWidget::North:
@@ -319,7 +319,7 @@ void QTabWidget::initStyleOption(QStyleOptionTabWidgetFrame *option) const
Q_D(const QTabWidget);
d->initBasicStyleOption(option);
- int exth = style()->pixelMetric(QStyle::PM_TabBarBaseHeight, 0, this);
+ int exth = style()->pixelMetric(QStyle::PM_TabBarBaseHeight, nullptr, this);
QSize t(0, d->stack->frameWidth());
if (d->tabs->isVisibleTo(const_cast<QTabWidget *>(this))) {
t = d->tabs->sizeHint();
@@ -359,7 +359,7 @@ void QTabWidget::initStyleOption(QStyleOptionTabWidgetFrame *option) const
Constructs a tabbed widget with parent \a parent.
*/
QTabWidget::QTabWidget(QWidget *parent)
- : QWidget(*new QTabWidgetPrivate, parent, 0)
+ : QWidget(*new QTabWidgetPrivate, parent, { })
{
Q_D(QTabWidget);
d->init();
@@ -544,8 +544,8 @@ bool QTabWidget::isTabEnabled(int index) const
}
/*!
- If \a enable is true, the page at position \a index is enabled; otherwise the page at position \a index is
- disabled. The page's tab is redrawn appropriately.
+ If \a enable is true, the page at position \a index is enabled; otherwise the page at
+ position \a index is disabled. The page's tab is redrawn appropriately.
QTabWidget uses QWidget::setEnabled() internally, rather than
keeping a separate flag.
@@ -566,6 +566,44 @@ void QTabWidget::setTabEnabled(int index, bool enable)
}
/*!
+ Returns true if the page at position \a index is visible; otherwise returns false.
+
+ \sa setTabVisible()
+ \since 5.15
+*/
+
+bool QTabWidget::isTabVisible(int index) const
+{
+ Q_D(const QTabWidget);
+ return d->tabs->isTabVisible(index);
+}
+
+/*!
+ If \a visible is true, the page at position \a index is visible; otherwise the page at
+ position \a index is hidden. The page's tab is redrawn appropriately.
+
+ \sa isTabVisible()
+ \since 5.15
+*/
+
+void QTabWidget::setTabVisible(int index, bool visible)
+{
+ Q_D(QTabWidget);
+ QWidget *widget = d->stack->widget(index);
+ bool currentVisible = d->tabs->isTabVisible(d->tabs->currentIndex());
+ d->tabs->setTabVisible(index, visible);
+ if (!visible) {
+ if (widget)
+ widget->setVisible(false);
+ } else if (!currentVisible) {
+ setCurrentIndex(index);
+ if (widget)
+ widget->setVisible(true);
+ }
+ setUpLayout();
+}
+
+/*!
\fn void QTabWidget::setCornerWidget(QWidget *widget, Qt::Corner corner)
Sets the given \a widget to be shown in the specified \a corner of the
@@ -574,7 +612,7 @@ void QTabWidget::setTabEnabled(int index, bool enable)
Only the horizontal element of the \a corner will be used.
- Passing 0 shows no widget in the corner.
+ Passing \nullptr shows no widget in the corner.
Any previously set corner widget is hidden.
@@ -848,7 +886,13 @@ QSize QTabWidget::sizeHint() const
QTabWidget *that = const_cast<QTabWidget*>(this);
that->setUpLayout(true);
}
- QSize s(d->stack->sizeHint());
+ QSize s;
+ for (int i=0; i< d->stack->count(); ++i) {
+ if (const QWidget* w = d->stack->widget(i)) {
+ if (d->tabs->isTabVisible(i))
+ s = s.expandedTo(w->sizeHint());
+ }
+ }
QSize t;
if (!d->isAutoHidden()) {
t = d->tabs->sizeHint();
diff --git a/src/widgets/widgets/qtabwidget.h b/src/widgets/widgets/qtabwidget.h
index f55e71488b..e6b3f93303 100644
--- a/src/widgets/widgets/qtabwidget.h
+++ b/src/widgets/widgets/qtabwidget.h
@@ -82,6 +82,9 @@ public:
bool isTabEnabled(int index) const;
void setTabEnabled(int index, bool);
+ bool isTabVisible(int index) const;
+ void setTabVisible(int index, bool);
+
QString tabText(int index) const;
void setTabText(int index, const QString &);
diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp
index d0ccd435b3..78fde94fad 100644
--- a/src/widgets/widgets/qtextbrowser.cpp
+++ b/src/widgets/widgets/qtextbrowser.cpp
@@ -152,6 +152,16 @@ public:
QTextCursor prevFocus;
int lastKeypadScrollValue;
#endif
+ void emitHighlighted(const QUrl &url)
+ {
+ Q_Q(QTextBrowser);
+ emit q->highlighted(url);
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+ emit q->highlighted(url.toString());
+#endif
+ }
};
Q_DECLARE_TYPEINFO(QTextBrowserPrivate::HistoryEntry, Q_MOVABLE_TYPE);
@@ -256,24 +266,20 @@ void QTextBrowserPrivate::_q_activateAnchor(const QString &href)
void QTextBrowserPrivate::_q_highlightLink(const QString &anchor)
{
- Q_Q(QTextBrowser);
if (anchor.isEmpty()) {
#ifndef QT_NO_CURSOR
if (viewport->cursor().shape() != Qt::PointingHandCursor)
oldCursor = viewport->cursor();
viewport->setCursor(oldCursor);
#endif
- emit q->highlighted(QUrl());
- emit q->highlighted(QString());
+ emitHighlighted(QUrl());
} else {
#ifndef QT_NO_CURSOR
viewport->setCursor(Qt::PointingHandCursor);
#endif
const QUrl url = resolveUrl(anchor);
- emit q->highlighted(url);
- // convenience to ease connecting to QStatusBar::showMessage(const QString &)
- emit q->highlighted(url.toString());
+ emitHighlighted(url);
}
}
@@ -310,9 +316,9 @@ void QTextBrowserPrivate::setSource(const QUrl &url, QTextDocument::ResourceType
if (url.isValid()
&& (newUrlWithoutFragment != currentUrlWithoutFragment || forceLoadOnSourceChange)) {
QVariant data = q->loadResource(type, resolveUrl(url));
- if (data.type() == QVariant::String) {
+ if (data.userType() == QMetaType::QString) {
txt = data.toString();
- } else if (data.type() == QVariant::ByteArray) {
+ } else if (data.userType() == QMetaType::QByteArray) {
if (type == QTextDocument::HtmlResource) {
#if QT_CONFIG(textcodec)
QByteArray ba = data.toByteArray();
@@ -383,8 +389,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url, QTextDocument::ResourceType
}
#ifdef QT_KEYPAD_NAVIGATION
lastKeypadScrollValue = vbar->value();
- emit q->highlighted(QUrl());
- emit q->highlighted(QString());
+ emitHighlighted(QUrl());
#endif
#ifndef QT_NO_CURSOR
@@ -559,8 +564,7 @@ void QTextBrowserPrivate::keypadMove(bool next)
// Ensure that the new selection is highlighted.
const QString href = control->anchorAtCursor();
QUrl url = resolveUrl(href);
- emit q->highlighted(url);
- emit q->highlighted(url.toString());
+ emitHighlighted(url);
} else {
// Scroll
vbar->setValue(scrollYOffset);
@@ -575,8 +579,7 @@ void QTextBrowserPrivate::keypadMove(bool next)
hbar->setValue(savedXOffset);
vbar->setValue(scrollYOffset);
- emit q->highlighted(QUrl());
- emit q->highlighted(QString());
+ emitHighlighted(QUrl());
}
}
#endif
@@ -619,8 +622,7 @@ void QTextBrowserPrivate::restoreHistoryEntry(const HistoryEntry &entry)
Q_Q(QTextBrowser);
const QString href = prevFocus.charFormat().anchorHref();
QUrl url = resolveUrl(href);
- emit q->highlighted(url);
- emit q->highlighted(url.toString());
+ emitHighlighted(url);
#endif
}
@@ -927,6 +929,7 @@ void QTextBrowser::doSetSource(const QUrl &url, QTextDocument::ResourceType type
/*! \fn void QTextBrowser::highlighted(const QString &link)
\overload
+ \obsolete
Convenience signal that allows connecting to a slot
that takes just a QString, like for example QStatusBar's
@@ -1127,8 +1130,7 @@ bool QTextBrowser::focusNextPrevChild(bool next)
if (d->prevFocus != d->control->textCursor() && d->control->textCursor().hasSelection()) {
const QString href = d->control->anchorAtCursor();
QUrl url = d->resolveUrl(href);
- emit highlighted(url);
- emit highlighted(url.toString());
+ emitHighlighted(url);
}
d->prevFocus = d->control->textCursor();
#endif
@@ -1136,8 +1138,7 @@ bool QTextBrowser::focusNextPrevChild(bool next)
} else {
#ifdef QT_KEYPAD_NAVIGATION
// We assume we have no highlight now.
- emit highlighted(QUrl());
- emit highlighted(QString());
+ emitHighlighted(QUrl());
#endif
}
return QTextEdit::focusNextPrevChild(next);
diff --git a/src/widgets/widgets/qtextbrowser.h b/src/widgets/widgets/qtextbrowser.h
index 33e5b3980c..4b3ec491ee 100644
--- a/src/widgets/widgets/qtextbrowser.h
+++ b/src/widgets/widgets/qtextbrowser.h
@@ -107,7 +107,10 @@ Q_SIGNALS:
void historyChanged();
void sourceChanged(const QUrl &);
void highlighted(const QUrl &);
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X_5_15("Use QTextBrowser::highlighted(QUrl) instead")
void highlighted(const QString &);
+#endif
void anchorClicked(const QUrl &);
protected:
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index ed6ffaee44..8ddda78f7d 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -117,7 +117,7 @@ public:
};
QTextEditPrivate::QTextEditPrivate()
- : control(0),
+ : control(nullptr),
autoFormatting(QTextEdit::AutoNone), tabChangesFocus(false),
lineWrap(QTextEdit::WidgetWidth), lineWrapColumnOrWidth(0),
wordWrap(QTextOption::WrapAtWordBoundaryOrAnywhere), clickCausedFocus(0),
@@ -1503,7 +1503,7 @@ void QTextEdit::resizeEvent(QResizeEvent *e)
QVariant alignmentProperty = doc->documentLayout()->property("contentHasAlignment");
if (!doc->pageSize().isNull()
- && alignmentProperty.type() == QVariant::Bool
+ && alignmentProperty.userType() == QMetaType::Bool
&& !alignmentProperty.toBool()) {
d->_q_adjustScrollbars();
@@ -1548,7 +1548,7 @@ void QTextEditPrivate::relayoutDocument()
width = lineWrapColumnOrWidth;
else if (lineWrap == QTextEdit::NoWrap) {
QVariant alignmentProperty = doc->documentLayout()->property("contentHasAlignment");
- if (alignmentProperty.type() == QVariant::Bool && !alignmentProperty.toBool()) {
+ if (alignmentProperty.userType() == QMetaType::Bool && !alignmentProperty.toBool()) {
width = 0;
}
@@ -1836,17 +1836,17 @@ QVariant QTextEdit::inputMethodQuery(Qt::InputMethodQuery query, QVariant argume
}
const QPointF offset(-d->horizontalOffset(), -d->verticalOffset());
- switch (argument.type()) {
- case QVariant::RectF:
+ switch (argument.userType()) {
+ case QMetaType::QRectF:
argument = argument.toRectF().translated(-offset);
break;
- case QVariant::PointF:
+ case QMetaType::QPointF:
argument = argument.toPointF() - offset;
break;
- case QVariant::Rect:
+ case QMetaType::QRect:
argument = argument.toRect().translated(-offset.toPoint());
break;
- case QVariant::Point:
+ case QMetaType::QPoint:
argument = argument.toPoint() - offset;
break;
default:
@@ -1854,14 +1854,14 @@ QVariant QTextEdit::inputMethodQuery(Qt::InputMethodQuery query, QVariant argume
}
const QVariant v = d->control->inputMethodQuery(query, argument);
- switch (v.type()) {
- case QVariant::RectF:
+ switch (v.userType()) {
+ case QMetaType::QRectF:
return v.toRectF().translated(offset);
- case QVariant::PointF:
+ case QMetaType::QPointF:
return v.toPointF() + offset;
- case QVariant::Rect:
+ case QMetaType::QRect:
return v.toRect().translated(offset.toPoint());
- case QVariant::Point:
+ case QMetaType::QPoint:
return v.toPoint() + offset.toPoint();
default:
break;
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 58e9c4fd87..b4e90c7d71 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -91,7 +91,7 @@ void QToolBarPrivate::init()
q->setAttribute(Qt::WA_X11NetWmWindowTypeToolBar);
QStyle *style = q->style();
- int e = style->pixelMetric(QStyle::PM_ToolBarIconSize, 0, q);
+ int e = style->pixelMetric(QStyle::PM_ToolBarIconSize, nullptr, q);
iconSize = QSize(e, e);
layout = new QToolBarLayout(q);
@@ -99,7 +99,7 @@ void QToolBarPrivate::init()
toggleViewAction = new QAction(q);
toggleViewAction->setCheckable(true);
- q->setMovable(q->style()->styleHint(QStyle::SH_ToolBar_Movable, 0, q ));
+ q->setMovable(q->style()->styleHint(QStyle::SH_ToolBar_Movable, nullptr, q ));
QObject::connect(toggleViewAction, SIGNAL(triggered(bool)), q, SLOT(_q_toggleView(bool)));
}
@@ -173,21 +173,21 @@ void QToolBarPrivate::initDrag(const QPoint &pos)
{
Q_Q(QToolBar);
- if (state != 0)
+ if (state != nullptr)
return;
QMainWindow *win = qobject_cast<QMainWindow*>(parent);
- Q_ASSERT(win != 0);
+ Q_ASSERT(win != nullptr);
QMainWindowLayout *layout = qt_mainwindow_layout(win);
- Q_ASSERT(layout != 0);
- if (layout->pluggingWidget != 0) // the main window is animating a docking operation
+ Q_ASSERT(layout != nullptr);
+ if (layout->pluggingWidget != nullptr) // the main window is animating a docking operation
return;
state = new DragState;
state->pressPos = pos;
state->dragging = false;
state->moving = false;
- state->widgetItem = 0;
+ state->widgetItem = nullptr;
if (q->isRightToLeft())
state->pressPos = QPoint(q->width() - state->pressPos.x(), state->pressPos.y());
@@ -197,19 +197,19 @@ void QToolBarPrivate::startDrag(bool moving)
{
Q_Q(QToolBar);
- Q_ASSERT(state != 0);
+ Q_ASSERT(state != nullptr);
if ((moving && state->moving) || state->dragging)
return;
QMainWindow *win = qobject_cast<QMainWindow*>(parent);
- Q_ASSERT(win != 0);
+ Q_ASSERT(win != nullptr);
QMainWindowLayout *layout = qt_mainwindow_layout(win);
- Q_ASSERT(layout != 0);
+ Q_ASSERT(layout != nullptr);
if (!moving) {
state->widgetItem = layout->unplug(q);
- Q_ASSERT(state->widgetItem != 0);
+ Q_ASSERT(state->widgetItem != nullptr);
}
state->dragging = !moving;
state->moving = moving;
@@ -218,13 +218,13 @@ void QToolBarPrivate::startDrag(bool moving)
void QToolBarPrivate::endDrag()
{
Q_Q(QToolBar);
- Q_ASSERT(state != 0);
+ Q_ASSERT(state != nullptr);
q->releaseMouse();
if (state->dragging) {
QMainWindowLayout *layout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q->parentWidget()));
- Q_ASSERT(layout != 0);
+ Q_ASSERT(layout != nullptr);
if (!layout->plug(state->widgetItem)) {
if (q->isFloatable()) {
@@ -239,7 +239,7 @@ void QToolBarPrivate::endDrag()
}
delete state;
- state = 0;
+ state = nullptr;
}
bool QToolBarPrivate::mousePressEvent(QMouseEvent *event)
@@ -278,7 +278,7 @@ bool QToolBarPrivate::mousePressEvent(QMouseEvent *event)
bool QToolBarPrivate::mouseReleaseEvent(QMouseEvent*)
{
- if (state != 0) {
+ if (state != nullptr) {
endDrag();
return true;
} else {
@@ -310,13 +310,13 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event)
}
QMainWindow *win = qobject_cast<QMainWindow*>(parent);
- if (win == 0)
+ if (win == nullptr)
return true;
QMainWindowLayout *layout = qt_mainwindow_layout(win);
- Q_ASSERT(layout != 0);
+ Q_ASSERT(layout != nullptr);
- if (layout->pluggingWidget == 0
+ if (layout->pluggingWidget == nullptr
&& (event->pos() - state->pressPos).manhattanLength() > QApplication::startDragDistance()) {
const bool wasDragging = state->dragging;
const bool moving = !q->isWindow() && (orientation == Qt::Vertical ?
@@ -503,7 +503,7 @@ void QToolBarPrivate::plug(const QRect &r)
Constructs a QToolBar with the given \a parent.
*/
QToolBar::QToolBar(QWidget *parent)
- : QWidget(*new QToolBarPrivate, parent, 0)
+ : QWidget(*new QToolBarPrivate, parent, { })
{
Q_D(QToolBar);
d->init();
@@ -673,16 +673,16 @@ void QToolBar::setIconSize(const QSize &iconSize)
if (mw && mw->layout()) {
QLayout *layout = mw->layout();
int i = 0;
- QLayoutItem *item = 0;
+ QLayoutItem *item = nullptr;
do {
item = layout->itemAt(i++);
if (item && (item->widget() == this))
sz = mw->iconSize();
- } while (!sz.isValid() && item != 0);
+ } while (!sz.isValid() && item != nullptr);
}
}
if (!sz.isValid()) {
- const int metric = style()->pixelMetric(QStyle::PM_ToolBarIconSize, 0, this);
+ const int metric = style()->pixelMetric(QStyle::PM_ToolBarIconSize, nullptr, this);
sz = QSize(metric, metric);
}
if (d->iconSize != sz) {
@@ -945,7 +945,7 @@ QAction *QToolBar::actionAt(const QPoint &p) const
QWidget *widget = childAt(p);
int index = d->layout->indexOf(widget);
if (index == -1)
- return 0;
+ return nullptr;
QLayoutItem *item = d->layout->itemAt(index);
return static_cast<QToolBarItem*>(item)->action;
}
@@ -966,7 +966,7 @@ void QToolBar::actionEvent(QActionEvent *event)
switch (event->type()) {
case QEvent::ActionAdded: {
- Q_ASSERT_X(widgetAction == 0 || d->layout->indexOf(widgetAction) == -1,
+ Q_ASSERT_X(widgetAction == nullptr || d->layout->indexOf(widgetAction) == -1,
"QToolBar", "widgets cannot be inserted multiple times");
// reparent the action to this toolbar if it has been created
@@ -974,7 +974,7 @@ void QToolBar::actionEvent(QActionEvent *event)
// preserve Qt 4.1.x behavior. The widget is already
// reparented to us due to the createWidget call inside
// createItem()
- if (widgetAction != 0 && widgetAction->d_func()->autoCreated)
+ if (widgetAction != nullptr && widgetAction->d_func()->autoCreated)
widgetAction->setParent(this);
int index = d->layout->count();
@@ -1059,18 +1059,18 @@ void QToolBar::paintEvent(QPaintEvent *)
*/
static bool waitForPopup(QToolBar *tb, QWidget *popup)
{
- if (popup == 0 || popup->isHidden())
+ if (popup == nullptr || popup->isHidden())
return false;
QWidget *w = popup;
- while (w != 0) {
+ while (w != nullptr) {
if (w == tb)
return true;
w = w->parentWidget();
}
QMenu *menu = qobject_cast<QMenu*>(popup);
- if (menu == 0)
+ if (menu == nullptr)
return false;
QAction *action = menu->menuAction();
@@ -1161,7 +1161,7 @@ bool QToolBar::event(QEvent *event)
return true;
break;
case QEvent::Leave:
- if (d->state != 0 && d->state->dragging) {
+ if (d->state != nullptr && d->state->dragging) {
#ifdef Q_OS_WIN
// This is a workaround for loosing the mouse on Vista.
QPoint pos = QCursor::pos();
@@ -1213,7 +1213,7 @@ QWidget *QToolBar::widgetForAction(QAction *action) const
int index = d->layout->indexOf(action);
if (index == -1)
- return 0;
+ return nullptr;
return d->layout->itemAt(index)->widget();
}
@@ -1233,7 +1233,7 @@ void QToolBar::initStyleOption(QStyleOptionToolBar *option) const
option->initFrom(this);
if (orientation() == Qt::Horizontal)
option->state |= QStyle::State_Horizontal;
- option->lineWidth = style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, 0, this);
+ option->lineWidth = style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, nullptr, this);
option->features = d->layout->movable()
? QStyleOptionToolBar::Movable
: QStyleOptionToolBar::None;
@@ -1247,7 +1247,7 @@ void QToolBar::initStyleOption(QStyleOptionToolBar *option) const
return;
QMainWindowLayout *layout = qt_mainwindow_layout(mainWindow);
- Q_ASSERT_X(layout != 0, "QToolBar::initStyleOption()",
+ Q_ASSERT_X(layout != nullptr, "QToolBar::initStyleOption()",
"QMainWindow->layout() != QMainWindowLayout");
layout->getStyleOptionInfo(option, const_cast<QToolBar *>(this));
diff --git a/src/widgets/widgets/qtoolbar.h b/src/widgets/widgets/qtoolbar.h
index 0c434e8d1d..6aaf59cafd 100644
--- a/src/widgets/widgets/qtoolbar.h
+++ b/src/widgets/widgets/qtoolbar.h
@@ -59,15 +59,9 @@ class Q_WIDGETS_EXPORT QToolBar : public QWidget
{
Q_OBJECT
- Q_PROPERTY(bool movable READ isMovable WRITE setMovable
- DESIGNABLE (qobject_cast<QMainWindow *>(parentWidget()) != 0)
- NOTIFY movableChanged)
- Q_PROPERTY(Qt::ToolBarAreas allowedAreas READ allowedAreas WRITE setAllowedAreas
- DESIGNABLE (qobject_cast<QMainWindow *>(parentWidget()) != 0)
- NOTIFY allowedAreasChanged)
- Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation
- DESIGNABLE (qobject_cast<QMainWindow *>(parentWidget()) == 0)
- NOTIFY orientationChanged)
+ Q_PROPERTY(bool movable READ isMovable WRITE setMovable NOTIFY movableChanged)
+ Q_PROPERTY(Qt::ToolBarAreas allowedAreas READ allowedAreas WRITE setAllowedAreas NOTIFY allowedAreasChanged)
+ Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize NOTIFY iconSizeChanged)
Q_PROPERTY(Qt::ToolButtonStyle toolButtonStyle READ toolButtonStyle WRITE setToolButtonStyle
NOTIFY toolButtonStyleChanged)
diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp
index adc329131c..493c094cc1 100644
--- a/src/widgets/widgets/qtoolbararealayout.cpp
+++ b/src/widgets/widgets/qtoolbararealayout.cpp
@@ -91,7 +91,7 @@ bool QToolBarAreaLayoutItem::skip() const
{
if (gap)
return false;
- return widgetItem == 0 || widgetItem->isEmpty();
+ return widgetItem == nullptr || widgetItem->isEmpty();
}
/******************************************************************************
@@ -302,7 +302,7 @@ QLayoutItem *QToolBarAreaLayoutInfo::insertToolBar(QToolBar *before, QToolBar *t
void QToolBarAreaLayoutInfo::insertItem(QToolBar *before, QLayoutItem *item)
{
- if (before == 0) {
+ if (before == nullptr) {
if (lines.isEmpty())
lines.append(QToolBarAreaLayoutLine(o));
lines.last().toolBarItems.append(item);
@@ -330,7 +330,7 @@ void QToolBarAreaLayoutInfo::removeToolBar(QToolBar *toolBar)
QToolBarAreaLayoutItem &item = line.toolBarItems[k];
if (item.widgetItem->widget() == toolBar) {
delete item.widgetItem;
- item.widgetItem = 0;
+ item.widgetItem = nullptr;
line.toolBarItems.removeAt(k);
if (line.toolBarItems.isEmpty() && j < lines.count() - 1)
@@ -344,7 +344,7 @@ void QToolBarAreaLayoutInfo::removeToolBar(QToolBar *toolBar)
void QToolBarAreaLayoutInfo::insertToolBarBreak(QToolBar *before)
{
- if (before == 0) {
+ if (before == nullptr) {
if (!lines.isEmpty() && lines.constLast().toolBarItems.isEmpty())
return;
lines.append(QToolBarAreaLayoutLine(o));
@@ -729,7 +729,7 @@ QRect QToolBarAreaLayout::rectHint(const QRect &r) const
QLayoutItem *QToolBarAreaLayout::itemAt(int *x, int index) const
{
- Q_ASSERT(x != 0);
+ Q_ASSERT(x != nullptr);
for (int i = 0; i < QInternal::DockCount; ++i) {
const QToolBarAreaLayoutInfo &dock = docks[i];
@@ -744,12 +744,12 @@ QLayoutItem *QToolBarAreaLayout::itemAt(int *x, int index) const
}
}
- return 0;
+ return nullptr;
}
QLayoutItem *QToolBarAreaLayout::takeAt(int *x, int index)
{
- Q_ASSERT(x != 0);
+ Q_ASSERT(x != nullptr);
for (int i = 0; i < QInternal::DockCount; ++i) {
QToolBarAreaLayoutInfo &dock = docks[i];
@@ -768,7 +768,7 @@ QLayoutItem *QToolBarAreaLayout::takeAt(int *x, int index)
}
}
- return 0;
+ return nullptr;
}
void QToolBarAreaLayout::deleteAllLayoutItems()
@@ -783,7 +783,7 @@ void QToolBarAreaLayout::deleteAllLayoutItems()
QToolBarAreaLayoutItem &item = line.toolBarItems[k];
if (!item.gap)
delete item.widgetItem;
- item.widgetItem = 0;
+ item.widgetItem = nullptr;
}
}
}
@@ -811,7 +811,7 @@ QLayoutItem *QToolBarAreaLayout::insertToolBar(QToolBar *before, QToolBar *toolB
{
QInternal::DockPosition pos = findToolBar(before);
if (pos == QInternal::DockCount)
- return 0;
+ return nullptr;
return docks[pos].insertToolBar(before, toolBar);
}
@@ -826,7 +826,7 @@ void QToolBarAreaLayout::removeToolBar(QToolBar *toolBar)
QLayoutItem *QToolBarAreaLayout::addToolBar(QInternal::DockPosition pos, QToolBar *toolBar)
{
- return docks[pos].insertToolBar(0, toolBar);
+ return docks[pos].insertToolBar(nullptr, toolBar);
}
void QToolBarAreaLayout::insertToolBarBreak(QToolBar *before)
@@ -847,7 +847,7 @@ void QToolBarAreaLayout::removeToolBarBreak(QToolBar *before)
void QToolBarAreaLayout::addToolBarBreak(QInternal::DockPosition pos)
{
- docks[pos].insertToolBarBreak(0);
+ docks[pos].insertToolBarBreak(nullptr);
}
void QToolBarAreaLayout::moveToolBar(QToolBar *toolbar, int p)
@@ -878,7 +878,7 @@ void QToolBarAreaLayout::insertItem(QToolBar *before, QLayoutItem *item)
void QToolBarAreaLayout::apply(bool animate)
{
QMainWindowLayout *layout = qt_mainwindow_layout(mainWindow);
- Q_ASSERT(layout != 0);
+ Q_ASSERT(layout != nullptr);
Qt::LayoutDirection dir = mainWindow->layoutDirection();
@@ -1117,13 +1117,13 @@ QToolBarAreaLayoutItem *QToolBarAreaLayout::item(const QList<int> &path)
Q_ASSERT(path.count() == 3);
if (path.at(0) < 0 || path.at(0) >= QInternal::DockCount)
- return 0;
+ return nullptr;
QToolBarAreaLayoutInfo &info = docks[path.at(0)];
if (path.at(1) < 0 || path.at(1) >= info.lines.count())
- return 0;
+ return nullptr;
QToolBarAreaLayoutLine &line = info.lines[path.at(1)];
if (path.at(2) < 0 || path.at(2) >= line.toolBarItems.count())
- return 0;
+ return nullptr;
return &(line.toolBarItems[path.at(2)]);
}
@@ -1143,10 +1143,10 @@ QLayoutItem *QToolBarAreaLayout::plug(const QList<int> &path)
QToolBarAreaLayoutItem *item = this->item(path);
if (Q_UNLIKELY(!item)) {
qWarning() << "No item at" << path;
- return 0;
+ return nullptr;
}
Q_ASSERT(item->gap);
- Q_ASSERT(item->widgetItem != 0);
+ Q_ASSERT(item->widgetItem != nullptr);
item->gap = false;
return item->widgetItem;
}
@@ -1352,14 +1352,14 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar*
rect = unpackRect(geom0, geom1, &floating);
}
- QToolBar *toolBar = 0;
+ QToolBar *toolBar = nullptr;
for (int x = 0; x < toolBars.count(); ++x) {
if (toolBars.at(x)->objectName() == objectName) {
toolBar = toolBars.takeAt(x);
break;
}
}
- if (toolBar == 0) {
+ if (toolBar == nullptr) {
continue;
}
diff --git a/src/widgets/widgets/qtoolbarlayout.cpp b/src/widgets/widgets/qtoolbarlayout.cpp
index 92094a38fb..d77ba3c13e 100644
--- a/src/widgets/widgets/qtoolbarlayout.cpp
+++ b/src/widgets/widgets/qtoolbarlayout.cpp
@@ -69,13 +69,13 @@ extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window);
*/
QToolBarItem::QToolBarItem(QWidget *widget)
- : QWidgetItem(widget), action(0), customWidget(false)
+ : QWidgetItem(widget), action(nullptr), customWidget(false)
{
}
bool QToolBarItem::isEmpty() const
{
- return action == 0 || !action->isVisible();
+ return action == nullptr || !action->isVisible();
}
/******************************************************************************
@@ -84,7 +84,7 @@ bool QToolBarItem::isEmpty() const
QToolBarLayout::QToolBarLayout(QWidget *parent)
: QLayout(parent), expanded(false), animating(false), dirty(true),
- expanding(false), empty(true), expandFlag(false), popupMenu(0)
+ expanding(false), empty(true), expandFlag(false), popupMenu(nullptr)
{
QToolBar *tb = qobject_cast<QToolBar*>(parent);
if (!tb)
@@ -132,15 +132,15 @@ bool QToolBarLayout::hasExpandFlag() const
void QToolBarLayout::setUsePopupMenu(bool set)
{
- if (!dirty && ((popupMenu == 0) == set))
+ if (!dirty && ((popupMenu == nullptr) == set))
invalidate();
if (!set) {
QObject::connect(extension, SIGNAL(clicked(bool)),
this, SLOT(setExpanded(bool)), Qt::UniqueConnection);
extension->setPopupMode(QToolButton::DelayedPopup);
- extension->setMenu(0);
+ extension->setMenu(nullptr);
delete popupMenu;
- popupMenu = 0;
+ popupMenu = nullptr;
} else {
QObject::disconnect(extension, SIGNAL(clicked(bool)),
this, SLOT(setExpanded(bool)));
@@ -169,21 +169,21 @@ void QToolBarLayout::addItem(QLayoutItem*)
QLayoutItem *QToolBarLayout::itemAt(int index) const
{
if (index < 0 || index >= items.count())
- return 0;
+ return nullptr;
return items.at(index);
}
QLayoutItem *QToolBarLayout::takeAt(int index)
{
if (index < 0 || index >= items.count())
- return 0;
+ return nullptr;
QToolBarItem *item = items.takeAt(index);
if (popupMenu)
popupMenu->removeAction(item->action);
QWidgetAction *widgetAction = qobject_cast<QWidgetAction*>(item->action);
- if (widgetAction != 0 && item->customWidget) {
+ if (widgetAction != nullptr && item->customWidget) {
widgetAction->releaseWidget(item->widget());
} else {
// destroy the QToolButton/QToolBarSeparator
@@ -240,9 +240,9 @@ Qt::Orientations QToolBarLayout::expandingDirections() const
updateGeomArray();
QToolBar *tb = qobject_cast<QToolBar*>(parentWidget());
if (!tb)
- return Qt::Orientations(0);
+ return {};
Qt::Orientation o = tb->orientation();
- return expanding ? Qt::Orientations(o) : Qt::Orientations(0);
+ return expanding ? Qt::Orientations(o) : Qt::Orientations{};
}
bool QToolBarLayout::movable() const
@@ -251,7 +251,7 @@ bool QToolBarLayout::movable() const
if (!tb)
return false;
QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget());
- return tb->isMovable() && win != 0;
+ return tb->isMovable() && win != nullptr;
}
void QToolBarLayout::updateGeomArray() const
@@ -343,7 +343,7 @@ void QToolBarLayout::updateGeomArray() const
static bool defaultWidgetAction(QToolBarItem *item)
{
QWidgetAction *a = qobject_cast<QWidgetAction*>(item->action);
- return a != 0 && a->defaultWidget() == item->widget();
+ return a != nullptr && a->defaultWidget() == item->widget();
}
void QToolBarLayout::updateMacBorderMetrics()
@@ -570,7 +570,7 @@ bool QToolBarLayout::layoutActions(const QSize &size)
// widgets into the menu. If only custom widget actions are chopped off, the popup menu
// is empty. So we show the little extension button to show something is chopped off,
// but we make it disabled.
- extension->setEnabled(popupMenu == 0 || !extensionMenuContainsOnlyWidgetActions);
+ extension->setEnabled(popupMenu == nullptr || !extensionMenuContainsOnlyWidgetActions);
// we have to do the show/hide here, because it triggers more calls to setGeometry :(
for (int i = 0; i < showWidgets.count(); ++i)
@@ -617,7 +617,7 @@ QSize QToolBarLayout::expandedSize(const QSize &size) const
++rows; // we want to expand to at least two rows
int space = total_w/rows + spacing + extensionExtent;
space = qMax(space, min_w - pick(o, margins) - handleExtent);
- if (win != 0)
+ if (win != nullptr)
space = qMin(space, pick(o, win->size()) - pick(o, margins) - handleExtent);
int w = 0;
@@ -653,7 +653,7 @@ QSize QToolBarLayout::expandedSize(const QSize &size) const
w += pick(Qt::Horizontal, margins) + handleExtent + spacing + extensionExtent;
w = qMax(w, min_w);
- if (win != 0)
+ if (win != nullptr)
w = qMin(w, pick(o, win->size()));
h += pick(Qt::Vertical, margins) - spacing; //there is no spacing before the first row
@@ -712,14 +712,14 @@ QToolBarItem *QToolBarLayout::createItem(QAction *action)
{
bool customWidget = false;
bool standardButtonWidget = false;
- QWidget *widget = 0;
+ QWidget *widget = nullptr;
QToolBar *tb = qobject_cast<QToolBar*>(parentWidget());
if (!tb)
- return (QToolBarItem *)0;
+ return (QToolBarItem *)nullptr;
if (QWidgetAction *widgetAction = qobject_cast<QWidgetAction *>(action)) {
widget = widgetAction->requestWidget(tb);
- if (widget != 0) {
+ if (widget != nullptr) {
widget->setAttribute(Qt::WA_LayoutUsesWidgetRect);
customWidget = true;
}
diff --git a/src/widgets/widgets/qtoolbox.cpp b/src/widgets/widgets/qtoolbox.cpp
index 4d7f543a99..4767394842 100644
--- a/src/widgets/widgets/qtoolbox.cpp
+++ b/src/widgets/widgets/qtoolbox.cpp
@@ -111,7 +111,7 @@ public:
typedef std::vector<std::unique_ptr<Page>> PageList;
inline QToolBoxPrivate()
- : currentPage(0)
+ : currentPage(nullptr)
{
}
void _q_buttonClicked();
@@ -157,7 +157,7 @@ const QToolBoxPrivate::Page *QToolBoxPrivate::page(int index) const
void QToolBoxPrivate::updateTabs()
{
- QToolBoxButton *lastButton = currentPage ? currentPage->button : 0;
+ QToolBoxButton *lastButton = currentPage ? currentPage->button : nullptr;
bool after = false;
int index = 0;
for (const auto &page : pageList) {
@@ -184,7 +184,7 @@ QSize QToolBoxButton::sizeHint() const
{
QSize iconSize(8, 8);
if (!icon().isNull()) {
- int icone = style()->pixelMetric(QStyle::PM_SmallIconSize, 0, parentWidget() /* QToolBox */);
+ int icone = style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, parentWidget() /* QToolBox */);
iconSize += QSize(icone + 2, icone);
}
QSize textSize = fontMetrics().size(Qt::TextShowMnemonic, text()) + QSize(0, 8);
@@ -197,7 +197,7 @@ QSize QToolBoxButton::minimumSizeHint() const
{
if (icon().isNull())
return QSize();
- int icone = style()->pixelMetric(QStyle::PM_SmallIconSize, 0, parentWidget() /* QToolBox */);
+ int icone = style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, parentWidget() /* QToolBox */);
return QSize(icone + 8, icone + 8);
}
@@ -378,7 +378,7 @@ int QToolBox::insertItem(int index, QWidget *widget, const QIcon &icon, const QS
QWidget *current = d->currentPage->widget;
int oldindex = indexOf(current);
if (index <= oldindex) {
- d->currentPage = 0; // trigger change
+ d->currentPage = nullptr; // trigger change
setCurrentIndex(oldindex);
}
}
@@ -472,10 +472,10 @@ void QToolBoxPrivate::_q_widgetDestroyed(QObject *object)
pageList.erase(std::remove_if(pageList.begin(), pageList.end(), pageEquals(c)), pageList.end());
if (pageList.empty()) {
- currentPage = 0;
+ currentPage = nullptr;
emit q->currentChanged(-1);
} else if (removeCurrent) {
- currentPage = 0;
+ currentPage = nullptr;
q->setCurrentIndex(0);
}
}
@@ -562,7 +562,7 @@ QWidget *QToolBox::widget(int index) const
int QToolBox::indexOf(QWidget *widget) const
{
Q_D(const QToolBox);
- const QToolBoxPrivate::Page *c = (widget ? d->page(widget) : 0);
+ const QToolBoxPrivate::Page *c = (widget ? d->page(widget) : nullptr);
if (!c)
return -1;
const auto it = std::find_if(d->pageList.cbegin(), d->pageList.cend(), pageEquals(c));
diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
index b00b219386..314c6ab40c 100644
--- a/src/widgets/widgets/qtoolbutton.cpp
+++ b/src/widgets/widgets/qtoolbutton.cpp
@@ -202,7 +202,7 @@ QToolButton::QToolButton(QWidget * parent)
void QToolButtonPrivate::init()
{
Q_Q(QToolButton);
- defaultAction = 0;
+ defaultAction = nullptr;
#if QT_CONFIG(toolbar)
if (qobject_cast<QToolBar*>(parent))
autoRaise = true;
@@ -227,7 +227,7 @@ void QToolButtonPrivate::init()
#endif
setLayoutItemMargins(QStyle::SE_ToolButtonLayoutItem);
- delay = q->style()->styleHint(QStyle::SH_ToolButton_PopupDelay, 0, q);
+ delay = q->style()->styleHint(QStyle::SH_ToolButton_PopupDelay, nullptr, q);
}
/*!
@@ -477,10 +477,10 @@ void QToolButton::actionEvent(QActionEvent *event)
break;
case QEvent::ActionRemoved:
if (d->defaultAction == action)
- d->defaultAction = 0;
+ d->defaultAction = nullptr;
#if QT_CONFIG(menu)
if (action == d->menuAction)
- d->menuAction = 0;
+ d->menuAction = nullptr;
#endif
action->disconnect(this);
break;
@@ -583,7 +583,7 @@ void QToolButton::changeEvent(QEvent *e)
|| e->type() == QEvent::MacSizeChange
#endif
) {
- d->delay = style()->styleHint(QStyle::SH_ToolButton_PopupDelay, 0, this);
+ d->delay = style()->styleHint(QStyle::SH_ToolButton_PopupDelay, nullptr, this);
d->setLayoutItemMargins(QStyle::SE_ToolButtonLayoutItem);
}
#endif
@@ -649,7 +649,7 @@ void QToolButton::setMenu(QMenu* menu)
{
Q_D(QToolButton);
- if (d->menuAction == (menu ? menu->menuAction() : 0))
+ if (d->menuAction == (menu ? menu->menuAction() : nullptr))
return;
if (d->menuAction)
@@ -659,7 +659,7 @@ void QToolButton::setMenu(QMenu* menu)
d->menuAction = menu->menuAction();
addAction(d->menuAction);
} else {
- d->menuAction = 0;
+ d->menuAction = nullptr;
}
// changing the menu set may change the size hint, so reset it
@@ -723,38 +723,12 @@ void QToolButtonPrivate::_q_buttonReleased()
popupTimer.stop();
}
-void QToolButtonPrivate::popupTimerDone()
+static QPoint positionMenu(const QToolButton *q, bool horizontal,
+ const QSize &sh)
{
- Q_Q(QToolButton);
- popupTimer.stop();
- if (!menuButtonDown && !down)
- return;
-
- menuButtonDown = true;
- QPointer<QMenu> actualMenu;
- bool mustDeleteActualMenu = false;
- if(menuAction) {
- actualMenu = menuAction->menu();
- } else if (defaultAction && defaultAction->menu()) {
- actualMenu = defaultAction->menu();
- } else {
- actualMenu = new QMenu(q);
- mustDeleteActualMenu = true;
- for(int i = 0; i < actions.size(); i++)
- actualMenu->addAction(actions.at(i));
- }
- repeat = q->autoRepeat();
- q->setAutoRepeat(false);
- bool horizontal = true;
-#if QT_CONFIG(toolbar)
- QToolBar *tb = qobject_cast<QToolBar*>(parent);
- if (tb && tb->orientation() == Qt::Vertical)
- horizontal = false;
-#endif
QPoint p;
const QRect rect = q->rect(); // Find screen via point in case of QGraphicsProxyWidget.
QRect screen = QDesktopWidgetPrivate::availableGeometry(q->mapToGlobal(rect.center()));
- QSize sh = ((QToolButton*)(QMenu*)actualMenu)->receivers(SIGNAL(aboutToShow()))? QSize() : actualMenu->sizeHint();
if (horizontal) {
if (q->isRightToLeft()) {
if (q->mapToGlobal(QPoint(0, rect.bottom())).y() + sh.height() <= screen.bottom()) {
@@ -788,6 +762,37 @@ void QToolButtonPrivate::popupTimerDone()
}
p.rx() = qMax(screen.left(), qMin(p.x(), screen.right() - sh.width()));
p.ry() += 1;
+ return p;
+}
+
+void QToolButtonPrivate::popupTimerDone()
+{
+ Q_Q(QToolButton);
+ popupTimer.stop();
+ if (!menuButtonDown && !down)
+ return;
+
+ menuButtonDown = true;
+ QPointer<QMenu> actualMenu;
+ bool mustDeleteActualMenu = false;
+ if (menuAction) {
+ actualMenu = menuAction->menu();
+ } else if (defaultAction && defaultAction->menu()) {
+ actualMenu = defaultAction->menu();
+ } else {
+ actualMenu = new QMenu(q);
+ mustDeleteActualMenu = true;
+ for (int i = 0; i < actions.size(); i++)
+ actualMenu->addAction(actions.at(i));
+ }
+ repeat = q->autoRepeat();
+ q->setAutoRepeat(false);
+ bool horizontal = true;
+#if QT_CONFIG(toolbar)
+ QToolBar *tb = qobject_cast<QToolBar*>(parent);
+ if (tb && tb->orientation() == Qt::Vertical)
+ horizontal = false;
+#endif
QPointer<QToolButton> that = q;
actualMenu->setNoReplayFor(q);
if (!mustDeleteActualMenu) //only if action are not in this widget
@@ -796,7 +801,11 @@ void QToolButtonPrivate::popupTimerDone()
actualMenu->d_func()->causedPopup.widget = q;
actualMenu->d_func()->causedPopup.action = defaultAction;
actionsCopy = q->actions(); //(the list of action may be modified in slots)
- actualMenu->exec(p);
+
+ // QTBUG-78966, Delay positioning until after aboutToShow().
+ auto positionFunction = [q, horizontal](const QSize &sizeHint) {
+ return positionMenu(q, horizontal, sizeHint); };
+ actualMenu->d_func()->exec({}, nullptr, positionFunction);
if (!that)
return;
diff --git a/src/widgets/widgets/qwidgetanimator.cpp b/src/widgets/widgets/qwidgetanimator.cpp
index 486d65d92c..cec6ba1dea 100644
--- a/src/widgets/widgets/qwidgetanimator.cpp
+++ b/src/widgets/widgets/qwidgetanimator.cpp
@@ -99,7 +99,7 @@ void QWidgetAnimator::animate(QWidget *widget, const QRect &_final_geometry, boo
#if QT_CONFIG(animation)
//If the QStyle has animations, animate
- if (const int animationDuration = widget->style()->styleHint(QStyle::SH_Widget_Animation_Duration, 0, widget)) {
+ if (const int animationDuration = widget->style()->styleHint(QStyle::SH_Widget_Animation_Duration, nullptr, widget)) {
AnimationMap::const_iterator it = m_animation_map.constFind(widget);
if (it != m_animation_map.constEnd() && (*it)->endValue().toRect() == final_geometry)
return;
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index 9cdae4f28f..9dd61c2c6a 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -964,7 +964,7 @@ void QWidgetLineControl::parseInputMask(const QString &maskFields)
if (maskFields.isEmpty() || delimiter == 0) {
if (m_maskData) {
delete [] m_maskData;
- m_maskData = 0;
+ m_maskData = nullptr;
m_maxLength = 32767;
internalSetText(QString(), -1, false);
}
@@ -1090,7 +1090,7 @@ bool QWidgetLineControl::isValidInput(QChar key, QChar mask) const
return true;
break;
case 'X':
- if (key.isPrint())
+ if (key.isPrint() && key != m_blank)
return true;
break;
case 'x':
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index 83e2315c36..edd4885450 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -125,7 +125,7 @@ static QTextLine currentTextLine(const QTextCursor &cursor)
}
QWidgetTextControlPrivate::QWidgetTextControlPrivate()
- : doc(0), cursorOn(false), cursorVisible(false), cursorIsFocusIndicator(false),
+ : doc(nullptr), cursorOn(false), cursorVisible(false), cursorIsFocusIndicator(false),
#ifndef Q_OS_ANDROID
interactionFlags(Qt::TextEditorInteraction),
#else
@@ -683,7 +683,7 @@ void QWidgetTextControlPrivate::_q_contentsChanged(int from, int charsRemoved, i
// always report the right number of removed chars, but in lack of the real string use spaces
QString oldText = QString(charsRemoved, QLatin1Char(' '));
- QAccessibleEvent *ev = 0;
+ QAccessibleEvent *ev = nullptr;
if (charsRemoved == 0) {
ev = new QAccessibleTextInsertEvent(q->parent(), from, newText);
} else if (charsAdded == 0) {
@@ -906,12 +906,12 @@ void QWidgetTextControl::setDocument(QTextDocument *document)
d->doc->disconnect(this);
d->doc->documentLayout()->disconnect(this);
- d->doc->documentLayout()->setPaintDevice(0);
+ d->doc->documentLayout()->setPaintDevice(nullptr);
if (d->doc->parent() == this)
delete d->doc;
- d->doc = 0;
+ d->doc = nullptr;
d->setContent(Qt::RichText, QString(), document);
}
@@ -992,12 +992,12 @@ void QWidgetTextControl::selectAll()
void QWidgetTextControl::processEvent(QEvent *e, const QPointF &coordinateOffset, QWidget *contextWidget)
{
- QMatrix m;
- m.translate(coordinateOffset.x(), coordinateOffset.y());
- processEvent(e, m, contextWidget);
+ QTransform t;
+ t.translate(coordinateOffset.x(), coordinateOffset.y());
+ processEvent(e, t, contextWidget);
}
-void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget *contextWidget)
+void QWidgetTextControl::processEvent(QEvent *e, const QTransform &transform, QWidget *contextWidget)
{
Q_D(QWidgetTextControl);
if (d->interactionFlags == Qt::NoTextInteraction) {
@@ -1038,22 +1038,22 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
break;
case QEvent::MouseButtonPress: {
QMouseEvent *ev = static_cast<QMouseEvent *>(e);
- d->mousePressEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(),
+ d->mousePressEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(),
ev->buttons(), ev->globalPos());
break; }
case QEvent::MouseMove: {
QMouseEvent *ev = static_cast<QMouseEvent *>(e);
- d->mouseMoveEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(),
+ d->mouseMoveEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(),
ev->buttons(), ev->globalPos());
break; }
case QEvent::MouseButtonRelease: {
QMouseEvent *ev = static_cast<QMouseEvent *>(e);
- d->mouseReleaseEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(),
+ d->mouseReleaseEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(),
ev->buttons(), ev->globalPos());
break; }
case QEvent::MouseButtonDblClick: {
QMouseEvent *ev = static_cast<QMouseEvent *>(e);
- d->mouseDoubleClickEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(),
+ d->mouseDoubleClickEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(),
ev->buttons(), ev->globalPos());
break; }
case QEvent::InputMethod:
@@ -1062,7 +1062,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
#ifndef QT_NO_CONTEXTMENU
case QEvent::ContextMenu: {
QContextMenuEvent *ev = static_cast<QContextMenuEvent *>(e);
- d->contextMenuEvent(ev->globalPos(), matrix.map(ev->pos()), contextWidget);
+ d->contextMenuEvent(ev->globalPos(), transform.map(ev->pos()), contextWidget);
break; }
#endif // QT_NO_CONTEXTMENU
case QEvent::FocusIn:
@@ -1077,7 +1077,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
#ifndef QT_NO_TOOLTIP
case QEvent::ToolTip: {
QHelpEvent *ev = static_cast<QHelpEvent *>(e);
- d->showToolTip(ev->globalPos(), matrix.map(ev->pos()), contextWidget);
+ d->showToolTip(ev->globalPos(), transform.map(ev->pos()), contextWidget);
break;
}
#endif // QT_NO_TOOLTIP
@@ -1094,13 +1094,13 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
break;
case QEvent::DragMove: {
QDragMoveEvent *ev = static_cast<QDragMoveEvent *>(e);
- if (d->dragMoveEvent(e, ev->mimeData(), matrix.map(ev->pos())))
+ if (d->dragMoveEvent(e, ev->mimeData(), transform.map(ev->pos())))
ev->acceptProposedAction();
break;
}
case QEvent::Drop: {
QDropEvent *ev = static_cast<QDropEvent *>(e);
- if (d->dropEvent(ev->mimeData(), matrix.map(ev->pos()), ev->dropAction(), ev->source()))
+ if (d->dropEvent(ev->mimeData(), transform.map(ev->pos()), ev->dropAction(), ev->source()))
ev->acceptProposedAction();
break;
}
@@ -1109,32 +1109,32 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
#if QT_CONFIG(graphicsview)
case QEvent::GraphicsSceneMousePress: {
QGraphicsSceneMouseEvent *ev = static_cast<QGraphicsSceneMouseEvent *>(e);
- d->mousePressEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(),
+ d->mousePressEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(),
ev->screenPos());
break; }
case QEvent::GraphicsSceneMouseMove: {
QGraphicsSceneMouseEvent *ev = static_cast<QGraphicsSceneMouseEvent *>(e);
- d->mouseMoveEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(),
+ d->mouseMoveEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(),
ev->screenPos());
break; }
case QEvent::GraphicsSceneMouseRelease: {
QGraphicsSceneMouseEvent *ev = static_cast<QGraphicsSceneMouseEvent *>(e);
- d->mouseReleaseEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(),
+ d->mouseReleaseEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(),
ev->screenPos());
break; }
case QEvent::GraphicsSceneMouseDoubleClick: {
QGraphicsSceneMouseEvent *ev = static_cast<QGraphicsSceneMouseEvent *>(e);
- d->mouseDoubleClickEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(),
+ d->mouseDoubleClickEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(),
ev->screenPos());
break; }
case QEvent::GraphicsSceneContextMenu: {
QGraphicsSceneContextMenuEvent *ev = static_cast<QGraphicsSceneContextMenuEvent *>(e);
- d->contextMenuEvent(ev->screenPos(), matrix.map(ev->pos()), contextWidget);
+ d->contextMenuEvent(ev->screenPos(), transform.map(ev->pos()), contextWidget);
break; }
case QEvent::GraphicsSceneHoverMove: {
QGraphicsSceneHoverEvent *ev = static_cast<QGraphicsSceneHoverEvent *>(e);
- d->mouseMoveEvent(ev, Qt::NoButton, matrix.map(ev->pos()), ev->modifiers(),Qt::NoButton,
+ d->mouseMoveEvent(ev, Qt::NoButton, transform.map(ev->pos()), ev->modifiers(),Qt::NoButton,
ev->screenPos());
break; }
@@ -1148,12 +1148,12 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
break;
case QEvent::GraphicsSceneDragMove: {
QGraphicsSceneDragDropEvent *ev = static_cast<QGraphicsSceneDragDropEvent *>(e);
- if (d->dragMoveEvent(e, ev->mimeData(), matrix.map(ev->pos())))
+ if (d->dragMoveEvent(e, ev->mimeData(), transform.map(ev->pos())))
ev->acceptProposedAction();
break; }
case QEvent::GraphicsSceneDrop: {
QGraphicsSceneDragDropEvent *ev = static_cast<QGraphicsSceneDragDropEvent *>(e);
- if (d->dropEvent(ev->mimeData(), matrix.map(ev->pos()), ev->dropAction(), ev->source()))
+ if (d->dropEvent(ev->mimeData(), transform.map(ev->pos()), ev->dropAction(), ev->source()))
ev->accept();
break; }
#endif // QT_CONFIG(graphicsview)
@@ -2308,7 +2308,7 @@ QMenu *QWidgetTextControl::createStandardContextMenu(const QPointF &pos, QWidget
d->linkToCopy = anchorAt(pos);
if (d->linkToCopy.isEmpty() && !showTextSelectionActions)
- return 0;
+ return nullptr;
QMenu *menu = new QMenu(parent);
QAction *a;
@@ -2662,7 +2662,7 @@ void QWidgetTextControl::print(QPagedPaintDevice *printer) const
Q_D(const QWidgetTextControl);
if (!printer)
return;
- QTextDocument *tempDoc = 0;
+ QTextDocument *tempDoc = nullptr;
const QTextDocument *doc = d->doc;
if (QPagedPaintDevicePrivate::get(printer)->printSelectionOnly) {
if (!d->cursor.hasSelection())
diff --git a/src/widgets/widgets/qwidgettextcontrol_p.h b/src/widgets/widgets/qwidgettextcontrol_p.h
index 59bf5466e6..c445ecaf80 100644
--- a/src/widgets/widgets/qwidgettextcontrol_p.h
+++ b/src/widgets/widgets/qwidgettextcontrol_p.h
@@ -116,12 +116,12 @@ public:
void setCurrentCharFormat(const QTextCharFormat &format);
QTextCharFormat currentCharFormat() const;
- bool find(const QString &exp, QTextDocument::FindFlags options = nullptr);
+ bool find(const QString &exp, QTextDocument::FindFlags options = { });
#ifndef QT_NO_REGEXP
- bool find(const QRegExp &exp, QTextDocument::FindFlags options = nullptr);
+ bool find(const QRegExp &exp, QTextDocument::FindFlags options = { });
#endif
#if QT_CONFIG(regularexpression)
- bool find(const QRegularExpression &exp, QTextDocument::FindFlags options = nullptr);
+ bool find(const QRegularExpression &exp, QTextDocument::FindFlags options = { });
#endif
QString toPlainText() const;
@@ -252,7 +252,7 @@ public:
QPalette palette() const;
void setPalette(const QPalette &pal);
- virtual void processEvent(QEvent *e, const QMatrix &matrix, QWidget *contextWidget = nullptr);
+ virtual void processEvent(QEvent *e, const QTransform &transform, QWidget *contextWidget = nullptr);
void processEvent(QEvent *e, const QPointF &coordinateOffset = QPointF(), QWidget *contextWidget = nullptr);
// control methods
diff --git a/src/xml/dom/dom.pri b/src/xml/dom/dom.pri
index d86071e84e..36b6087ede 100644
--- a/src/xml/dom/dom.pri
+++ b/src/xml/dom/dom.pri
@@ -1,2 +1,5 @@
-HEADERS += $$PWD/qdom.h
-SOURCES += $$PWD/qdom.cpp
+HEADERS += $$PWD/qdom.h \
+ $$PWD/qdom_p.h \
+ $$PWD/qdomhelpers_p.h
+SOURCES += $$PWD/qdom.cpp \
+ $$PWD/qdomhelpers.cpp
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 04151c3f31..26c1a2122b 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -39,15 +39,15 @@
#include <qplatformdefs.h>
#include <qdom.h>
+#include "qdom_p.h"
+#include "qdomhelpers_p.h"
#include "private/qxmlutils_p.h"
#ifndef QT_NO_DOM
#include <qatomic.h>
#include <qbuffer.h>
-#include <qhash.h>
#include <qiodevice.h>
-#include <qlist.h>
#if QT_CONFIG(regularexpression)
#include <qregularexpression.h>
#endif
@@ -56,11 +56,13 @@
#endif
#include <qtextstream.h>
#include <qxml.h>
-#include "private/qxml_p.h"
#include <qvariant.h>
-#include <qmap.h>
#include <qshareddata.h>
#include <qdebug.h>
+#include <qxmlstream.h>
+#include <private/qduplicatetracker_p.h>
+
+
#include <stdio.h>
QT_BEGIN_NAMESPACE
@@ -119,510 +121,6 @@ static void qt_split_namespace(QString& prefix, QString& name, const QString& qN
/**************************************************************
*
- * Private class declerations
- *
- **************************************************************/
-
-class QDomImplementationPrivate
-{
-public:
- inline QDomImplementationPrivate() {}
-
- QDomImplementationPrivate* clone();
- QAtomicInt ref;
- static QDomImplementation::InvalidDataPolicy invalidDataPolicy;
-};
-
-class QDomNodePrivate
-{
-public:
- QDomNodePrivate(QDomDocumentPrivate*, QDomNodePrivate* parent = nullptr);
- QDomNodePrivate(QDomNodePrivate* n, bool deep);
- virtual ~QDomNodePrivate();
-
- QString nodeName() const { return name; }
- QString nodeValue() const { return value; }
- virtual void setNodeValue(const QString& v) { value = v; }
-
- QDomDocumentPrivate* ownerDocument();
- void setOwnerDocument(QDomDocumentPrivate* doc);
-
- virtual QDomNodePrivate* insertBefore(QDomNodePrivate* newChild, QDomNodePrivate* refChild);
- virtual QDomNodePrivate* insertAfter(QDomNodePrivate* newChild, QDomNodePrivate* refChild);
- virtual QDomNodePrivate* replaceChild(QDomNodePrivate* newChild, QDomNodePrivate* oldChild);
- virtual QDomNodePrivate* removeChild(QDomNodePrivate* oldChild);
- virtual QDomNodePrivate* appendChild(QDomNodePrivate* newChild);
-
- QDomNodePrivate* namedItem(const QString& name);
-
- virtual QDomNodePrivate* cloneNode(bool deep = true);
- virtual void normalize();
- virtual void clear();
-
- inline QDomNodePrivate* parent() const { return hasParent ? ownerNode : nullptr; }
- inline void setParent(QDomNodePrivate *p) { ownerNode = p; hasParent = true; }
-
- void setNoParent() {
- ownerNode = hasParent ? (QDomNodePrivate*)ownerDocument() : nullptr;
- hasParent = false;
- }
-
- // Dynamic cast
- bool isAttr() const { return nodeType() == QDomNode::AttributeNode; }
- bool isCDATASection() const { return nodeType() == QDomNode::CDATASectionNode; }
- bool isDocumentFragment() const { return nodeType() == QDomNode::DocumentFragmentNode; }
- bool isDocument() const { return nodeType() == QDomNode::DocumentNode; }
- bool isDocumentType() const { return nodeType() == QDomNode::DocumentTypeNode; }
- bool isElement() const { return nodeType() == QDomNode::ElementNode; }
- bool isEntityReference() const { return nodeType() == QDomNode::EntityReferenceNode; }
- bool isText() const { const QDomNode::NodeType nt = nodeType();
- return (nt == QDomNode::TextNode)
- || (nt == QDomNode::CDATASectionNode); }
- bool isEntity() const { return nodeType() == QDomNode::EntityNode; }
- bool isNotation() const { return nodeType() == QDomNode::NotationNode; }
- bool isProcessingInstruction() const { return nodeType() == QDomNode::ProcessingInstructionNode; }
- bool isCharacterData() const { const QDomNode::NodeType nt = nodeType();
- return (nt == QDomNode::CharacterDataNode)
- || (nt == QDomNode::TextNode)
- || (nt == QDomNode::CommentNode); }
- bool isComment() const { return nodeType() == QDomNode::CommentNode; }
-
- virtual QDomNode::NodeType nodeType() const { return QDomNode::BaseNode; }
-
- virtual void save(QTextStream&, int, int) const;
-
- void setLocation(int lineNumber, int columnNumber);
-
- // Variables
- QAtomicInt ref;
- QDomNodePrivate* prev;
- QDomNodePrivate* next;
- QDomNodePrivate* ownerNode; // either the node's parent or the node's owner document
- QDomNodePrivate* first;
- QDomNodePrivate* last;
-
- QString name; // this is the local name if prefix != null
- QString value;
- QString prefix; // set this only for ElementNode and AttributeNode
- QString namespaceURI; // set this only for ElementNode and AttributeNode
- bool createdWithDom1Interface : 1;
- bool hasParent : 1;
-
- int lineNumber;
- int columnNumber;
-};
-
-class QDomNodeListPrivate
-{
-public:
- QDomNodeListPrivate(QDomNodePrivate*);
- QDomNodeListPrivate(QDomNodePrivate*, const QString& );
- QDomNodeListPrivate(QDomNodePrivate*, const QString&, const QString& );
- ~QDomNodeListPrivate();
-
- bool operator== (const QDomNodeListPrivate&) const;
- bool operator!= (const QDomNodeListPrivate&) const;
-
- void createList();
- QDomNodePrivate* item(int index);
- int length() const;
-
- QAtomicInt ref;
- /*
- This list contains the children of this node.
- */
- QDomNodePrivate* node_impl;
- QString tagname;
- QString nsURI;
- QList<QDomNodePrivate*> list;
- long timestamp;
-};
-
-class QDomNamedNodeMapPrivate
-{
-public:
- QDomNamedNodeMapPrivate(QDomNodePrivate*);
- ~QDomNamedNodeMapPrivate();
-
- QDomNodePrivate* namedItem(const QString& name) const;
- QDomNodePrivate* namedItemNS(const QString& nsURI, const QString& localName) const;
- QDomNodePrivate* setNamedItem(QDomNodePrivate* arg);
- QDomNodePrivate* setNamedItemNS(QDomNodePrivate* arg);
- QDomNodePrivate* removeNamedItem(const QString& name);
- QDomNodePrivate* item(int index) const;
- int length() const;
- bool contains(const QString& name) const;
- bool containsNS(const QString& nsURI, const QString & localName) const;
-
- /**
- * Remove all children from the map.
- */
- void clearMap();
- bool isReadOnly() { return readonly; }
- void setReadOnly(bool r) { readonly = r; }
- bool isAppendToParent() { return appendToParent; }
- /**
- * If true, then the node will redirect insert/remove calls
- * to its parent by calling QDomNodePrivate::appendChild or removeChild.
- * In addition the map won't increase or decrease the reference count
- * of the nodes it contains.
- *
- * By default this value is false and the map will handle reference counting
- * by itself.
- */
- void setAppendToParent(bool b) { appendToParent = b; }
-
- /**
- * Creates a copy of the map. It is a deep copy
- * that means that all children are cloned.
- */
- QDomNamedNodeMapPrivate* clone(QDomNodePrivate* parent);
-
- // Variables
- QAtomicInt ref;
- QHash<QString, QDomNodePrivate *> map;
- QDomNodePrivate* parent;
- bool readonly;
- bool appendToParent;
-};
-
-class QDomDocumentTypePrivate : public QDomNodePrivate
-{
-public:
- QDomDocumentTypePrivate(QDomDocumentPrivate*, QDomNodePrivate* parent = nullptr);
- QDomDocumentTypePrivate(QDomDocumentTypePrivate* n, bool deep);
- ~QDomDocumentTypePrivate();
- void init();
-
- // Reimplemented from QDomNodePrivate
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNodePrivate* insertBefore(QDomNodePrivate* newChild, QDomNodePrivate* refChild) override;
- QDomNodePrivate* insertAfter(QDomNodePrivate* newChild, QDomNodePrivate* refChild) override;
- QDomNodePrivate* replaceChild(QDomNodePrivate* newChild, QDomNodePrivate* oldChild) override;
- QDomNodePrivate* removeChild(QDomNodePrivate* oldChild) override;
- QDomNodePrivate* appendChild(QDomNodePrivate* newChild) override;
-
- QDomNode::NodeType nodeType() const override { return QDomNode::DocumentTypeNode; }
-
- void save(QTextStream& s, int, int) const override;
-
- // Variables
- QDomNamedNodeMapPrivate* entities;
- QDomNamedNodeMapPrivate* notations;
- QString publicId;
- QString systemId;
- QString internalSubset;
-};
-
-class QDomDocumentFragmentPrivate : public QDomNodePrivate
-{
-public:
- QDomDocumentFragmentPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent = nullptr);
- QDomDocumentFragmentPrivate(QDomNodePrivate* n, bool deep);
-
- // Reimplemented from QDomNodePrivate
- virtual QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::DocumentFragmentNode; }
-};
-
-class QDomCharacterDataPrivate : public QDomNodePrivate
-{
-public:
- QDomCharacterDataPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& data);
- QDomCharacterDataPrivate(QDomCharacterDataPrivate* n, bool deep);
-
- int dataLength() const;
- QString substringData(unsigned long offset, unsigned long count) const;
- void appendData(const QString& arg);
- void insertData(unsigned long offset, const QString& arg);
- void deleteData(unsigned long offset, unsigned long count);
- void replaceData(unsigned long offset, unsigned long count, const QString& arg);
-
- // Reimplemented from QDomNodePrivate
- QDomNode::NodeType nodeType() const override { return QDomNode::CharacterDataNode; }
- QDomNodePrivate* cloneNode(bool deep = true) override;
-};
-
-class QDomTextPrivate : public QDomCharacterDataPrivate
-{
-public:
- QDomTextPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& val);
- QDomTextPrivate(QDomTextPrivate* n, bool deep);
-
- QDomTextPrivate* splitText(int offset);
-
- // Reimplemented from QDomNodePrivate
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::TextNode; }
- virtual void save(QTextStream& s, int, int) const override;
-};
-
-class QDomAttrPrivate : public QDomNodePrivate
-{
-public:
- QDomAttrPrivate(QDomDocumentPrivate*, QDomNodePrivate*, const QString& name);
- QDomAttrPrivate(QDomDocumentPrivate*, QDomNodePrivate*, const QString& nsURI, const QString& qName);
- QDomAttrPrivate(QDomAttrPrivate* n, bool deep);
-
- bool specified() const;
-
- // Reimplemented from QDomNodePrivate
- void setNodeValue(const QString& v) override;
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::AttributeNode; }
- virtual void save(QTextStream& s, int, int) const override;
-
- // Variables
- bool m_specified;
-};
-
-class QDomElementPrivate : public QDomNodePrivate
-{
-public:
- QDomElementPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& name);
- QDomElementPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& nsURI, const QString& qName);
- QDomElementPrivate(QDomElementPrivate* n, bool deep);
- ~QDomElementPrivate();
-
- QString attribute(const QString& name, const QString& defValue) const;
- QString attributeNS(const QString& nsURI, const QString& localName, const QString& defValue) const;
- void setAttribute(const QString& name, const QString& value);
- void setAttributeNS(const QString& nsURI, const QString& qName, const QString& newValue);
- void removeAttribute(const QString& name);
- QDomAttrPrivate* attributeNode(const QString& name);
- QDomAttrPrivate* attributeNodeNS(const QString& nsURI, const QString& localName);
- QDomAttrPrivate* setAttributeNode(QDomAttrPrivate* newAttr);
- QDomAttrPrivate* setAttributeNodeNS(QDomAttrPrivate* newAttr);
- QDomAttrPrivate* removeAttributeNode(QDomAttrPrivate* oldAttr);
- bool hasAttribute(const QString& name);
- bool hasAttributeNS(const QString& nsURI, const QString& localName);
-
- QString text();
-
- // Reimplemented from QDomNodePrivate
- QDomNamedNodeMapPrivate* attributes() { return m_attr; }
- bool hasAttributes() { return (m_attr->length() > 0); }
- QDomNode::NodeType nodeType() const override { return QDomNode::ElementNode; }
- QDomNodePrivate* cloneNode(bool deep = true) override;
- virtual void save(QTextStream& s, int, int) const override;
-
- // Variables
- QDomNamedNodeMapPrivate* m_attr;
-};
-
-
-class QDomCommentPrivate : public QDomCharacterDataPrivate
-{
-public:
- QDomCommentPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& val);
- QDomCommentPrivate(QDomCommentPrivate* n, bool deep);
-
- // Reimplemented from QDomNodePrivate
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::CommentNode; }
- virtual void save(QTextStream& s, int, int) const override;
-};
-
-class QDomCDATASectionPrivate : public QDomTextPrivate
-{
-public:
- QDomCDATASectionPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& val);
- QDomCDATASectionPrivate(QDomCDATASectionPrivate* n, bool deep);
-
- // Reimplemented from QDomNodePrivate
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::CDATASectionNode; }
- virtual void save(QTextStream& s, int, int) const override;
-};
-
-class QDomNotationPrivate : public QDomNodePrivate
-{
-public:
- QDomNotationPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& name,
- const QString& pub, const QString& sys);
- QDomNotationPrivate(QDomNotationPrivate* n, bool deep);
-
- // Reimplemented from QDomNodePrivate
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::NotationNode; }
- virtual void save(QTextStream& s, int, int) const override;
-
- // Variables
- QString m_sys;
- QString m_pub;
-};
-
-class QDomEntityPrivate : public QDomNodePrivate
-{
-public:
- QDomEntityPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& name,
- const QString& pub, const QString& sys, const QString& notation);
- QDomEntityPrivate(QDomEntityPrivate* n, bool deep);
-
- // Reimplemented from QDomNodePrivate
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::EntityNode; }
- virtual void save(QTextStream& s, int, int) const override;
-
- // Variables
- QString m_sys;
- QString m_pub;
- QString m_notationName;
-};
-
-class QDomEntityReferencePrivate : public QDomNodePrivate
-{
-public:
- QDomEntityReferencePrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& name);
- QDomEntityReferencePrivate(QDomNodePrivate* n, bool deep);
-
- // Reimplemented from QDomNodePrivate
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::EntityReferenceNode; }
- virtual void save(QTextStream& s, int, int) const override;
-};
-
-class QDomProcessingInstructionPrivate : public QDomNodePrivate
-{
-public:
- QDomProcessingInstructionPrivate(QDomDocumentPrivate*, QDomNodePrivate* parent, const QString& target,
- const QString& data);
- QDomProcessingInstructionPrivate(QDomProcessingInstructionPrivate* n, bool deep);
-
- // Reimplemented from QDomNodePrivate
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::ProcessingInstructionNode; }
- virtual void save(QTextStream& s, int, int) const override;
-};
-
-class QDomDocumentPrivate : public QDomNodePrivate
-{
-public:
- QDomDocumentPrivate();
- QDomDocumentPrivate(const QString& name);
- QDomDocumentPrivate(QDomDocumentTypePrivate* dt);
- QDomDocumentPrivate(QDomDocumentPrivate* n, bool deep);
- ~QDomDocumentPrivate();
-
- bool setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn);
- bool setContent(QXmlInputSource *source, QXmlReader *reader, QXmlSimpleReader *simpleReader, QString *errorMsg, int *errorLine, int *errorColumn);
-
- // Attributes
- QDomDocumentTypePrivate* doctype() { return type.data(); }
- QDomImplementationPrivate* implementation() { return impl.data(); }
- QDomElementPrivate* documentElement();
-
- // Factories
- QDomElementPrivate* createElement(const QString& tagName);
- QDomElementPrivate* createElementNS(const QString& nsURI, const QString& qName);
- QDomDocumentFragmentPrivate* createDocumentFragment();
- QDomTextPrivate* createTextNode(const QString& data);
- QDomCommentPrivate* createComment(const QString& data);
- QDomCDATASectionPrivate* createCDATASection(const QString& data);
- QDomProcessingInstructionPrivate* createProcessingInstruction(const QString& target, const QString& data);
- QDomAttrPrivate* createAttribute(const QString& name);
- QDomAttrPrivate* createAttributeNS(const QString& nsURI, const QString& qName);
- QDomEntityReferencePrivate* createEntityReference(const QString& name);
-
- QDomNodePrivate* importNode(QDomNodePrivate* importedNode, bool deep);
-
- // Reimplemented from QDomNodePrivate
- QDomNodePrivate* cloneNode(bool deep = true) override;
- QDomNode::NodeType nodeType() const override { return QDomNode::DocumentNode; }
- void clear() override;
-
- // Variables
- QExplicitlySharedDataPointer<QDomImplementationPrivate> impl;
- QExplicitlySharedDataPointer<QDomDocumentTypePrivate> type;
-
- void saveDocument(QTextStream& stream, const int indent, QDomNode::EncodingPolicy encUsed) const;
-
- /* \internal
- Counter for the QDomNodeListPrivate timestamps.
-
- This is a cache optimization, that might in some cases be effective. The
- dilemma is that QDomNode::childNodes() returns a list, but the
- implementation stores the children in a linked list. Hence, in order to
- get the children out through childNodes(), a list must be populated each
- time, which is O(N).
-
- DOM has the requirement of node references being live, see DOM Core
- Level 3, 1.1.1 The DOM Structure Model, which means that changes to the
- underlying documents must be reflected in node lists.
-
- This mechanism, nodeListTime, is a caching optimization that reduces the
- amount of times the node list is rebuilt, by only doing so when the
- document actually changes. However, a change to anywhere in any document
- invalidate all lists, since no dependency tracking is done.
-
- It functions by that all modifying functions(insertBefore() and so on)
- increment the count; each QDomNodeListPrivate copies nodeListTime on
- construction, and compares its own value to nodeListTime in order to
- determine whether it needs to rebuild.
-
- This is reentrant. The nodeListTime may overflow, but that's ok since we
- check for equalness, not whether nodeListTime is smaller than the list's
- stored timestamp.
- */
- long nodeListTime;
-};
-
-/**************************************************************
- *
- * QDomHandler
- *
- **************************************************************/
-
-class QDomHandler : public QXmlDefaultHandler
-{
-public:
- QDomHandler(QDomDocumentPrivate* d, QXmlSimpleReader *reader, bool namespaceProcessing);
- ~QDomHandler();
-
- // content handler
- bool endDocument() override;
- bool startElement(const QString& nsURI, const QString& localName, const QString& qName, const QXmlAttributes& atts) override;
- bool endElement(const QString& nsURI, const QString& localName, const QString& qName) override;
- bool characters(const QString& ch) override;
- bool processingInstruction(const QString& target, const QString& data) override;
- bool skippedEntity(const QString& name) override;
-
- // error handler
- bool fatalError(const QXmlParseException& exception) override;
-
- // lexical handler
- bool startCDATA() override;
- bool endCDATA() override;
- bool startEntity(const QString &) override;
- bool endEntity(const QString &) override;
- bool startDTD(const QString& name, const QString& publicId, const QString& systemId) override;
- bool comment(const QString& ch) override;
-
- // decl handler
- bool externalEntityDecl(const QString &name, const QString &publicId, const QString &systemId) override ;
-
- // DTD handler
- bool notationDecl(const QString & name, const QString & publicId, const QString & systemId) override;
- bool unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString &notationName) override ;
-
- void setDocumentLocator(QXmlLocator *locator) override;
-
- QString errorMsg;
- int errorLine;
- int errorColumn;
-
-private:
- QDomDocumentPrivate *doc;
- QDomNodePrivate *node;
- QString entityName;
- bool cdata;
- bool nsProcessing;
- QXmlLocator *locator;
- QXmlSimpleReader *reader;
-};
-
-/**************************************************************
- *
* Functions for verifying legal data
*
**************************************************************/
@@ -3078,8 +2576,8 @@ void QDomNamedNodeMapPrivate::clearMap()
QDomNodePrivate* QDomNamedNodeMapPrivate::namedItem(const QString& name) const
{
- QDomNodePrivate* p = map[name];
- return p;
+ auto it = map.constFind(name);
+ return it == map.cend() ? nullptr : *it;
}
QDomNodePrivate* QDomNamedNodeMapPrivate::namedItemNS(const QString& nsURI, const QString& localName) const
@@ -3108,7 +2606,7 @@ QDomNodePrivate* QDomNamedNodeMapPrivate::setNamedItem(QDomNodePrivate* arg)
QDomNodePrivate *n = map.value(arg->nodeName());
// We take a reference
arg->ref.ref();
- map.insertMulti(arg->nodeName(), arg);
+ map.insert(arg->nodeName(), arg);
return n;
}
@@ -3125,7 +2623,7 @@ QDomNodePrivate* QDomNamedNodeMapPrivate::setNamedItemNS(QDomNodePrivate* arg)
QDomNodePrivate *n = namedItemNS(arg->namespaceURI, arg->name);
// We take a reference
arg->ref.ref();
- map.insertMulti(arg->nodeName(), arg);
+ map.insert(arg->nodeName(), arg);
return n;
} else {
// ### check the following code if it is ok
@@ -3154,7 +2652,7 @@ QDomNodePrivate* QDomNamedNodeMapPrivate::item(int index) const
{
if (index >= length() || index < 0)
return nullptr;
- return *(map.constBegin() + index);
+ return *std::next(map.cbegin(), index);
}
int QDomNamedNodeMapPrivate::length() const
@@ -3468,10 +2966,10 @@ QDomDocumentTypePrivate::QDomDocumentTypePrivate(QDomDocumentTypePrivate* n, boo
while (p) {
if (p->isEntity())
// Don't use normal insert function since we would create infinite recursion
- entities->map.insertMulti(p->nodeName(), p);
+ entities->map.insert(p->nodeName(), p);
if (p->isNotation())
// Don't use normal insert function since we would create infinite recursion
- notations->map.insertMulti(p->nodeName(), p);
+ notations->map.insert(p->nodeName(), p);
p = p->next;
}
}
@@ -3515,9 +3013,9 @@ QDomNodePrivate* QDomDocumentTypePrivate::insertBefore(QDomNodePrivate* newChild
QDomNodePrivate* p = QDomNodePrivate::insertBefore(newChild, refChild);
// Update the maps
if (p && p->isEntity())
- entities->map.insertMulti(p->nodeName(), p);
+ entities->map.insert(p->nodeName(), p);
else if (p && p->isNotation())
- notations->map.insertMulti(p->nodeName(), p);
+ notations->map.insert(p->nodeName(), p);
return p;
}
@@ -3528,9 +3026,9 @@ QDomNodePrivate* QDomDocumentTypePrivate::insertAfter(QDomNodePrivate* newChild,
QDomNodePrivate* p = QDomNodePrivate::insertAfter(newChild, refChild);
// Update the maps
if (p && p->isEntity())
- entities->map.insertMulti(p->nodeName(), p);
+ entities->map.insert(p->nodeName(), p);
else if (p && p->isNotation())
- notations->map.insertMulti(p->nodeName(), p);
+ notations->map.insert(p->nodeName(), p);
return p;
}
@@ -3547,9 +3045,9 @@ QDomNodePrivate* QDomDocumentTypePrivate::replaceChild(QDomNodePrivate* newChild
notations->map.remove(oldChild->nodeName());
if (p->isEntity())
- entities->map.insertMulti(p->nodeName(), p);
+ entities->map.insert(p->nodeName(), p);
else if (p->isNotation())
- notations->map.insertMulti(p->nodeName(), p);
+ notations->map.insert(p->nodeName(), p);
}
return p;
@@ -4586,10 +4084,10 @@ void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const
}
s << '<' << qName << nsDecl;
- QSet<QString> outputtedPrefixes;
/* Write out attributes. */
if (!m_attr->map.isEmpty()) {
+ QDuplicateTracker<QString> outputtedPrefixes;
QHash<QString, QDomNodePrivate *>::const_iterator it = m_attr->map.constBegin();
for (; it != m_attr->map.constEnd(); ++it) {
s << ' ';
@@ -4610,9 +4108,8 @@ void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const
* arrive in those situations. */
if((!it.value()->ownerNode ||
it.value()->ownerNode->prefix != it.value()->prefix) &&
- !outputtedPrefixes.contains(it.value()->prefix)) {
+ !outputtedPrefixes.hasSeen(it.value()->prefix)) {
s << " xmlns:" << it.value()->prefix << "=\"" << encodeText(it.value()->namespaceURI, s, true, true) << '\"';
- outputtedPrefixes.insert(it.value()->prefix);
}
}
}
@@ -6196,6 +5693,10 @@ void QDomDocumentPrivate::clear()
QDomNodePrivate::clear();
}
+#if QT_DEPRECATED_SINCE(5, 15)
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
static void initializeReader(QXmlSimpleReader &reader, bool namespaceProcessing)
{
reader.setFeature(QLatin1String("http://xml.org/sax/features/namespaces"), namespaceProcessing);
@@ -6229,11 +5730,42 @@ bool QDomDocumentPrivate::setContent(QXmlInputSource *source, QXmlReader *reader
if (!reader->parse(source)) {
if (errorMsg)
- *errorMsg = hnd.errorMsg;
+ *errorMsg = std::get<0>(hnd.errorInfo());
if (errorLine)
- *errorLine = hnd.errorLine;
+ *errorLine = std::get<1>(hnd.errorInfo());
if (errorColumn)
- *errorColumn = hnd.errorColumn;
+ *errorColumn = std::get<2>(hnd.errorInfo());
+ return false;
+ }
+
+ return true;
+}
+QT_WARNING_POP
+
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+bool QDomDocumentPrivate::setContent(QXmlStreamReader *reader, bool namespaceProcessing,
+ QString *errorMsg, int *errorLine, int *errorColumn)
+{
+ clear();
+ impl = new QDomImplementationPrivate;
+ type = new QDomDocumentTypePrivate(this, this);
+ type->ref.deref();
+
+ if (!reader) {
+ qWarning("Failed to set content, XML reader is not initialized");
+ return false;
+ }
+
+ QDomParser domParser(this, reader, namespaceProcessing);
+
+ if (!domParser.parse()) {
+ if (errorMsg)
+ *errorMsg = std::get<0>(domParser.errorInfo());
+ if (errorLine)
+ *errorLine = std::get<1>(domParser.errorInfo());
+ if (errorColumn)
+ *errorColumn = std::get<2>(domParser.errorInfo());
return false;
}
@@ -6659,9 +6191,19 @@ bool QDomDocument::setContent(const QString& text, bool namespaceProcessing, QSt
{
if (!impl)
impl = new QDomDocumentPrivate();
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QXmlInputSource source;
+QT_WARNING_POP
source.setData(text);
return IMPL->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
+#else
+ QXmlStreamReader streamReader(text);
+ streamReader.setNamespaceProcessing(namespaceProcessing);
+ return IMPL->setContent(&streamReader, namespaceProcessing, errorMsg, errorLine, errorColumn);
+#endif
}
/*!
@@ -6721,10 +6263,20 @@ bool QDomDocument::setContent(const QByteArray &data, bool namespaceProcessing,
{
if (!impl)
impl = new QDomDocumentPrivate();
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_DEPRECATED_SINCE(5, 15)
QBuffer buf;
buf.setData(data);
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QXmlInputSource source(&buf);
+QT_WARNING_POP
return IMPL->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
+#else
+ QXmlStreamReader streamReader(data);
+ streamReader.setNamespaceProcessing(namespaceProcessing);
+ return IMPL->setContent(&streamReader, namespaceProcessing, errorMsg, errorLine, errorColumn);
+#endif
}
/*!
@@ -6737,18 +6289,32 @@ bool QDomDocument::setContent(QIODevice* dev, bool namespaceProcessing, QString
{
if (!impl)
impl = new QDomDocumentPrivate();
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QXmlInputSource source(dev);
+QT_WARNING_POP
return IMPL->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
+#else
+ QXmlStreamReader streamReader(dev);
+ streamReader.setNamespaceProcessing(namespaceProcessing);
+ return IMPL->setContent(&streamReader, namespaceProcessing, errorMsg, errorLine, errorColumn);
+#endif
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\overload
+ \obsolete
\since 4.5
This function reads the XML document from the QXmlInputSource \a source,
returning true if the content was successfully parsed; otherwise returns \c false.
*/
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
bool QDomDocument::setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn )
{
if (!impl)
@@ -6757,6 +6323,9 @@ bool QDomDocument::setContent(QXmlInputSource *source, bool namespaceProcessing,
initializeReader(reader, namespaceProcessing);
return IMPL->setContent(source, &reader, &reader, errorMsg, errorLine, errorColumn);
}
+QT_WARNING_POP
+
+#endif
/*!
\overload
@@ -6789,6 +6358,7 @@ bool QDomDocument::setContent(const QByteArray& buffer, QString *errorMsg, int *
/*!
\overload
+ \obsolete
This function reads the XML document from the IO device \a dev, returning
true if the content was successfully parsed; otherwise returns \c false.
@@ -6800,8 +6370,10 @@ bool QDomDocument::setContent(QIODevice* dev, QString *errorMsg, int *errorLine,
return setContent(dev, false, errorMsg, errorLine, errorColumn);
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\overload
+ \obsolete
This function reads the XML document from the QXmlInputSource \a source and
parses it with the QXmlReader \a reader, returning true if the content was
@@ -6813,12 +6385,44 @@ bool QDomDocument::setContent(QIODevice* dev, QString *errorMsg, int *errorLine,
\sa QXmlSimpleReader
*/
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
bool QDomDocument::setContent(QXmlInputSource *source, QXmlReader *reader, QString *errorMsg, int *errorLine, int *errorColumn )
{
if (!impl)
impl = new QDomDocumentPrivate();
return IMPL->setContent(source, reader, nullptr, errorMsg, errorLine, errorColumn);
}
+QT_WARNING_POP
+
+#endif
+
+/*!
+ \overload
+ \since 5.15
+
+ This function reads the XML document from the QXmlStreamReader \a reader
+ and parses it. Returns \c true if the content was successfully parsed;
+ otherwise returns \c false.
+
+ If \a namespaceProcessing is \c true, the parser recognizes namespaces in the XML
+ file and sets the prefix name, local name and namespace URI to appropriate values.
+ If \a namespaceProcessing is \c false, the parser does no namespace processing when
+ it reads the XML file.
+
+ If a parse error occurs, the error message is placed in \c{*}\a{errorMsg}, the line
+ number in \c{*}\a{errorLine} and the column number in \c{*}\a{errorColumn} (unless
+ the associated pointer is set to 0).
+
+ \sa QXmlStreamReader
+*/
+bool QDomDocument::setContent(QXmlStreamReader *reader, bool namespaceProcessing, QString *errorMsg,
+ int *errorLine, int *errorColumn)
+{
+ if (!impl)
+ impl = new QDomDocumentPrivate();
+ return IMPL->setContent(reader, namespaceProcessing, errorMsg, errorLine, errorColumn);
+}
/*!
Converts the parsed document back to its textual representation.
@@ -7356,200 +6960,6 @@ QDomComment QDomNode::toComment() const
return QDomComment();
}
-/**************************************************************
- *
- * QDomHandler
- *
- **************************************************************/
-
-QDomHandler::QDomHandler(QDomDocumentPrivate* adoc, QXmlSimpleReader* areader, bool namespaceProcessing)
- : errorLine(0), errorColumn(0), doc(adoc), node(adoc), cdata(false),
- nsProcessing(namespaceProcessing), locator(nullptr), reader(areader)
-{
-}
-
-QDomHandler::~QDomHandler()
-{
-}
-
-bool QDomHandler::endDocument()
-{
- // ### is this really necessary? (rms)
- if (node != doc)
- return false;
- return true;
-}
-
-bool QDomHandler::startDTD(const QString& name, const QString& publicId, const QString& systemId)
-{
- doc->doctype()->name = name;
- doc->doctype()->publicId = publicId;
- doc->doctype()->systemId = systemId;
- return true;
-}
-
-bool QDomHandler::startElement(const QString& nsURI, const QString&, const QString& qName, const QXmlAttributes& atts)
-{
- // tag name
- QDomNodePrivate* n;
- if (nsProcessing) {
- n = doc->createElementNS(nsURI, qName);
- } else {
- n = doc->createElement(qName);
- }
-
- if (!n)
- return false;
-
- n->setLocation(locator->lineNumber(), locator->columnNumber());
-
- node->appendChild(n);
- node = n;
-
- // attributes
- for (int i=0; i<atts.length(); i++)
- {
- if (nsProcessing) {
- ((QDomElementPrivate*)node)->setAttributeNS(atts.uri(i), atts.qName(i), atts.value(i));
- } else {
- ((QDomElementPrivate*)node)->setAttribute(atts.qName(i), atts.value(i));
- }
- }
-
- return true;
-}
-
-bool QDomHandler::endElement(const QString&, const QString&, const QString&)
-{
- if (!node || node == doc)
- return false;
- node = node->parent();
-
- return true;
-}
-
-bool QDomHandler::characters(const QString& ch)
-{
- // No text as child of some document
- if (node == doc)
- return false;
-
- QScopedPointer<QDomNodePrivate> n;
- if (cdata) {
- n.reset(doc->createCDATASection(ch));
- } else if (!entityName.isEmpty()) {
- QScopedPointer<QDomEntityPrivate> e(new QDomEntityPrivate(doc, nullptr, entityName,
- QString(), QString(), QString()));
- e->value = ch;
- e->ref.deref();
- doc->doctype()->appendChild(e.data());
- e.take();
- n.reset(doc->createEntityReference(entityName));
- } else {
- n.reset(doc->createTextNode(ch));
- }
- n->setLocation(locator->lineNumber(), locator->columnNumber());
- node->appendChild(n.data());
- n.take();
-
- return true;
-}
-
-bool QDomHandler::processingInstruction(const QString& target, const QString& data)
-{
- QDomNodePrivate *n;
- n = doc->createProcessingInstruction(target, data);
- if (n) {
- n->setLocation(locator->lineNumber(), locator->columnNumber());
- node->appendChild(n);
- return true;
- }
- else
- return false;
-}
-
-bool QDomHandler::skippedEntity(const QString& name)
-{
- // we can only handle inserting entity references into content
- if (reader && !reader->d_ptr->skipped_entity_in_content)
- return true;
-
- QDomNodePrivate *n = doc->createEntityReference(name);
- n->setLocation(locator->lineNumber(), locator->columnNumber());
- node->appendChild(n);
- return true;
-}
-
-bool QDomHandler::fatalError(const QXmlParseException& exception)
-{
- errorMsg = exception.message();
- errorLine = exception.lineNumber();
- errorColumn = exception.columnNumber();
- return QXmlDefaultHandler::fatalError(exception);
-}
-
-bool QDomHandler::startCDATA()
-{
- cdata = true;
- return true;
-}
-
-bool QDomHandler::endCDATA()
-{
- cdata = false;
- return true;
-}
-
-bool QDomHandler::startEntity(const QString &name)
-{
- entityName = name;
- return true;
-}
-
-bool QDomHandler::endEntity(const QString &)
-{
- entityName.clear();
- return true;
-}
-
-bool QDomHandler::comment(const QString& ch)
-{
- QDomNodePrivate *n;
- n = doc->createComment(ch);
- n->setLocation(locator->lineNumber(), locator->columnNumber());
- node->appendChild(n);
- return true;
-}
-
-bool QDomHandler::unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString &notationName)
-{
- QDomEntityPrivate* e = new QDomEntityPrivate(doc, nullptr, name,
- publicId, systemId, notationName);
- // keep the refcount balanced: appendChild() does a ref anyway.
- e->ref.deref();
- doc->doctype()->appendChild(e);
- return true;
-}
-
-bool QDomHandler::externalEntityDecl(const QString &name, const QString &publicId, const QString &systemId)
-{
- return unparsedEntityDecl(name, publicId, systemId, QString());
-}
-
-bool QDomHandler::notationDecl(const QString & name, const QString & publicId, const QString & systemId)
-{
- QDomNotationPrivate* n = new QDomNotationPrivate(doc, nullptr, name, publicId, systemId);
- // keep the refcount balanced: appendChild() does a ref anyway.
- n->ref.deref();
- doc->doctype()->appendChild(n);
- return true;
-}
-
-void QDomHandler::setDocumentLocator(QXmlLocator *locator)
-{
- this->locator = locator;
-}
-
QT_END_NAMESPACE
#endif // QT_NO_DOM
diff --git a/src/xml/dom/qdom.h b/src/xml/dom/qdom.h
index 0a7db7dcd7..d50c5e8394 100644
--- a/src/xml/dom/qdom.h
+++ b/src/xml/dom/qdom.h
@@ -91,6 +91,7 @@ class QDomNode;
class QDomEntity;
class QDomNotation;
class QDomCharacterData;
+class QXmlStreamReader;
class Q_XML_EXPORT QDomImplementation
{
@@ -338,11 +339,25 @@ public:
bool setContent(const QByteArray& text, bool namespaceProcessing, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
bool setContent(const QString& text, bool namespaceProcessing, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
bool setContent(QIODevice* dev, bool namespaceProcessing, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+ QT_DEPRECATED_X("Use other overloads instead")
bool setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
+QT_WARNING_POP
+#endif
bool setContent(const QByteArray& text, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
bool setContent(const QString& text, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
bool setContent(QIODevice* dev, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+ QT_DEPRECATED_X("Use other overloads instead")
bool setContent(QXmlInputSource *source, QXmlReader *reader, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
+QT_WARNING_POP
+#endif
+ bool setContent(QXmlStreamReader *reader, bool namespaceProcessing, QString *errorMsg = nullptr,
+ int *errorLine = nullptr, int *errorColumn = nullptr);
// Qt extensions
QString toString(int = 1) const;
diff --git a/src/xml/dom/qdom_p.h b/src/xml/dom/qdom_p.h
new file mode 100644
index 0000000000..a9399d9901
--- /dev/null
+++ b/src/xml/dom/qdom_p.h
@@ -0,0 +1,540 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtXml 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 QDOM_P_H
+#define QDOM_P_H
+
+#include "qdom.h"
+
+#include <qglobal.h>
+#include <qhash.h>
+#include <qstring.h>
+#include <qlist.h>
+#include <qxml.h>
+
+QT_BEGIN_NAMESPACE
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience of
+// qxml.cpp and qdom.cpp. This header file may change from version to version without
+// notice, or even be removed.
+//
+// We mean it.
+//
+
+/**************************************************************
+ *
+ * Private class declerations
+ *
+ **************************************************************/
+
+class QDomImplementationPrivate
+{
+public:
+ inline QDomImplementationPrivate() {}
+
+ QDomImplementationPrivate *clone();
+ QAtomicInt ref;
+ static QDomImplementation::InvalidDataPolicy invalidDataPolicy;
+};
+
+class QDomNodePrivate
+{
+public:
+ QDomNodePrivate(QDomDocumentPrivate *, QDomNodePrivate *parent = nullptr);
+ QDomNodePrivate(QDomNodePrivate *n, bool deep);
+ virtual ~QDomNodePrivate();
+
+ QString nodeName() const { return name; }
+ QString nodeValue() const { return value; }
+ virtual void setNodeValue(const QString &v) { value = v; }
+
+ QDomDocumentPrivate *ownerDocument();
+ void setOwnerDocument(QDomDocumentPrivate *doc);
+
+ virtual QDomNodePrivate *insertBefore(QDomNodePrivate *newChild, QDomNodePrivate *refChild);
+ virtual QDomNodePrivate *insertAfter(QDomNodePrivate *newChild, QDomNodePrivate *refChild);
+ virtual QDomNodePrivate *replaceChild(QDomNodePrivate *newChild, QDomNodePrivate *oldChild);
+ virtual QDomNodePrivate *removeChild(QDomNodePrivate *oldChild);
+ virtual QDomNodePrivate *appendChild(QDomNodePrivate *newChild);
+
+ QDomNodePrivate *namedItem(const QString &name);
+
+ virtual QDomNodePrivate *cloneNode(bool deep = true);
+ virtual void normalize();
+ virtual void clear();
+
+ inline QDomNodePrivate *parent() const { return hasParent ? ownerNode : nullptr; }
+ inline void setParent(QDomNodePrivate *p)
+ {
+ ownerNode = p;
+ hasParent = true;
+ }
+
+ void setNoParent()
+ {
+ ownerNode = hasParent ? (QDomNodePrivate *)ownerDocument() : nullptr;
+ hasParent = false;
+ }
+
+ // Dynamic cast
+ bool isAttr() const { return nodeType() == QDomNode::AttributeNode; }
+ bool isCDATASection() const { return nodeType() == QDomNode::CDATASectionNode; }
+ bool isDocumentFragment() const { return nodeType() == QDomNode::DocumentFragmentNode; }
+ bool isDocument() const { return nodeType() == QDomNode::DocumentNode; }
+ bool isDocumentType() const { return nodeType() == QDomNode::DocumentTypeNode; }
+ bool isElement() const { return nodeType() == QDomNode::ElementNode; }
+ bool isEntityReference() const { return nodeType() == QDomNode::EntityReferenceNode; }
+ bool isText() const
+ {
+ const QDomNode::NodeType nt = nodeType();
+ return (nt == QDomNode::TextNode) || (nt == QDomNode::CDATASectionNode);
+ }
+ bool isEntity() const { return nodeType() == QDomNode::EntityNode; }
+ bool isNotation() const { return nodeType() == QDomNode::NotationNode; }
+ bool isProcessingInstruction() const
+ {
+ return nodeType() == QDomNode::ProcessingInstructionNode;
+ }
+ bool isCharacterData() const
+ {
+ const QDomNode::NodeType nt = nodeType();
+ return (nt == QDomNode::CharacterDataNode) || (nt == QDomNode::TextNode)
+ || (nt == QDomNode::CommentNode);
+ }
+ bool isComment() const { return nodeType() == QDomNode::CommentNode; }
+
+ virtual QDomNode::NodeType nodeType() const { return QDomNode::BaseNode; }
+
+ virtual void save(QTextStream &, int, int) const;
+
+ void setLocation(int lineNumber, int columnNumber);
+
+ // Variables
+ QAtomicInt ref;
+ QDomNodePrivate *prev;
+ QDomNodePrivate *next;
+ QDomNodePrivate *ownerNode; // either the node's parent or the node's owner document
+ QDomNodePrivate *first;
+ QDomNodePrivate *last;
+
+ QString name; // this is the local name if prefix != null
+ QString value;
+ QString prefix; // set this only for ElementNode and AttributeNode
+ QString namespaceURI; // set this only for ElementNode and AttributeNode
+ bool createdWithDom1Interface : 1;
+ bool hasParent : 1;
+
+ int lineNumber;
+ int columnNumber;
+};
+
+class QDomNodeListPrivate
+{
+public:
+ QDomNodeListPrivate(QDomNodePrivate *);
+ QDomNodeListPrivate(QDomNodePrivate *, const QString &);
+ QDomNodeListPrivate(QDomNodePrivate *, const QString &, const QString &);
+ ~QDomNodeListPrivate();
+
+ bool operator==(const QDomNodeListPrivate &) const;
+ bool operator!=(const QDomNodeListPrivate &) const;
+
+ void createList();
+ QDomNodePrivate *item(int index);
+ int length() const;
+
+ QAtomicInt ref;
+ /*
+ This list contains the children of this node.
+ */
+ QDomNodePrivate *node_impl;
+ QString tagname;
+ QString nsURI;
+ QList<QDomNodePrivate *> list;
+ long timestamp;
+};
+
+class QDomNamedNodeMapPrivate
+{
+public:
+ QDomNamedNodeMapPrivate(QDomNodePrivate *);
+ ~QDomNamedNodeMapPrivate();
+
+ QDomNodePrivate *namedItem(const QString &name) const;
+ QDomNodePrivate *namedItemNS(const QString &nsURI, const QString &localName) const;
+ QDomNodePrivate *setNamedItem(QDomNodePrivate *arg);
+ QDomNodePrivate *setNamedItemNS(QDomNodePrivate *arg);
+ QDomNodePrivate *removeNamedItem(const QString &name);
+ QDomNodePrivate *item(int index) const;
+ int length() const;
+ bool contains(const QString &name) const;
+ bool containsNS(const QString &nsURI, const QString &localName) const;
+
+ /**
+ * Remove all children from the map.
+ */
+ void clearMap();
+ bool isReadOnly() { return readonly; }
+ void setReadOnly(bool r) { readonly = r; }
+ bool isAppendToParent() { return appendToParent; }
+ /**
+ * If true, then the node will redirect insert/remove calls
+ * to its parent by calling QDomNodePrivate::appendChild or removeChild.
+ * In addition the map won't increase or decrease the reference count
+ * of the nodes it contains.
+ *
+ * By default this value is false and the map will handle reference counting
+ * by itself.
+ */
+ void setAppendToParent(bool b) { appendToParent = b; }
+
+ /**
+ * Creates a copy of the map. It is a deep copy
+ * that means that all children are cloned.
+ */
+ QDomNamedNodeMapPrivate *clone(QDomNodePrivate *parent);
+
+ // Variables
+ QAtomicInt ref;
+ QMultiHash<QString, QDomNodePrivate *> map;
+ QDomNodePrivate *parent;
+ bool readonly;
+ bool appendToParent;
+};
+
+class QDomDocumentTypePrivate : public QDomNodePrivate
+{
+public:
+ QDomDocumentTypePrivate(QDomDocumentPrivate *, QDomNodePrivate *parent = nullptr);
+ QDomDocumentTypePrivate(QDomDocumentTypePrivate *n, bool deep);
+ ~QDomDocumentTypePrivate();
+ void init();
+
+ // Reimplemented from QDomNodePrivate
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNodePrivate *insertBefore(QDomNodePrivate *newChild, QDomNodePrivate *refChild) override;
+ QDomNodePrivate *insertAfter(QDomNodePrivate *newChild, QDomNodePrivate *refChild) override;
+ QDomNodePrivate *replaceChild(QDomNodePrivate *newChild, QDomNodePrivate *oldChild) override;
+ QDomNodePrivate *removeChild(QDomNodePrivate *oldChild) override;
+ QDomNodePrivate *appendChild(QDomNodePrivate *newChild) override;
+
+ QDomNode::NodeType nodeType() const override { return QDomNode::DocumentTypeNode; }
+
+ void save(QTextStream &s, int, int) const override;
+
+ // Variables
+ QDomNamedNodeMapPrivate *entities;
+ QDomNamedNodeMapPrivate *notations;
+ QString publicId;
+ QString systemId;
+ QString internalSubset;
+};
+
+class QDomDocumentFragmentPrivate : public QDomNodePrivate
+{
+public:
+ QDomDocumentFragmentPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent = nullptr);
+ QDomDocumentFragmentPrivate(QDomNodePrivate *n, bool deep);
+
+ // Reimplemented from QDomNodePrivate
+ virtual QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::DocumentFragmentNode; }
+};
+
+class QDomCharacterDataPrivate : public QDomNodePrivate
+{
+public:
+ QDomCharacterDataPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &data);
+ QDomCharacterDataPrivate(QDomCharacterDataPrivate *n, bool deep);
+
+ int dataLength() const;
+ QString substringData(unsigned long offset, unsigned long count) const;
+ void appendData(const QString &arg);
+ void insertData(unsigned long offset, const QString &arg);
+ void deleteData(unsigned long offset, unsigned long count);
+ void replaceData(unsigned long offset, unsigned long count, const QString &arg);
+
+ // Reimplemented from QDomNodePrivate
+ QDomNode::NodeType nodeType() const override { return QDomNode::CharacterDataNode; }
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+};
+
+class QDomTextPrivate : public QDomCharacterDataPrivate
+{
+public:
+ QDomTextPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val);
+ QDomTextPrivate(QDomTextPrivate *n, bool deep);
+
+ QDomTextPrivate *splitText(int offset);
+
+ // Reimplemented from QDomNodePrivate
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::TextNode; }
+ virtual void save(QTextStream &s, int, int) const override;
+};
+
+class QDomAttrPrivate : public QDomNodePrivate
+{
+public:
+ QDomAttrPrivate(QDomDocumentPrivate *, QDomNodePrivate *, const QString &name);
+ QDomAttrPrivate(QDomDocumentPrivate *, QDomNodePrivate *, const QString &nsURI,
+ const QString &qName);
+ QDomAttrPrivate(QDomAttrPrivate *n, bool deep);
+
+ bool specified() const;
+
+ // Reimplemented from QDomNodePrivate
+ void setNodeValue(const QString &v) override;
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::AttributeNode; }
+ virtual void save(QTextStream &s, int, int) const override;
+
+ // Variables
+ bool m_specified;
+};
+
+class QDomElementPrivate : public QDomNodePrivate
+{
+public:
+ QDomElementPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &name);
+ QDomElementPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &nsURI,
+ const QString &qName);
+ QDomElementPrivate(QDomElementPrivate *n, bool deep);
+ ~QDomElementPrivate();
+
+ QString attribute(const QString &name, const QString &defValue) const;
+ QString attributeNS(const QString &nsURI, const QString &localName,
+ const QString &defValue) const;
+ void setAttribute(const QString &name, const QString &value);
+ void setAttributeNS(const QString &nsURI, const QString &qName, const QString &newValue);
+ void removeAttribute(const QString &name);
+ QDomAttrPrivate *attributeNode(const QString &name);
+ QDomAttrPrivate *attributeNodeNS(const QString &nsURI, const QString &localName);
+ QDomAttrPrivate *setAttributeNode(QDomAttrPrivate *newAttr);
+ QDomAttrPrivate *setAttributeNodeNS(QDomAttrPrivate *newAttr);
+ QDomAttrPrivate *removeAttributeNode(QDomAttrPrivate *oldAttr);
+ bool hasAttribute(const QString &name);
+ bool hasAttributeNS(const QString &nsURI, const QString &localName);
+
+ QString text();
+
+ // Reimplemented from QDomNodePrivate
+ QDomNamedNodeMapPrivate *attributes() { return m_attr; }
+ bool hasAttributes() { return (m_attr->length() > 0); }
+ QDomNode::NodeType nodeType() const override { return QDomNode::ElementNode; }
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ virtual void save(QTextStream &s, int, int) const override;
+
+ // Variables
+ QDomNamedNodeMapPrivate *m_attr;
+};
+
+class QDomCommentPrivate : public QDomCharacterDataPrivate
+{
+public:
+ QDomCommentPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val);
+ QDomCommentPrivate(QDomCommentPrivate *n, bool deep);
+
+ // Reimplemented from QDomNodePrivate
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::CommentNode; }
+ virtual void save(QTextStream &s, int, int) const override;
+};
+
+class QDomCDATASectionPrivate : public QDomTextPrivate
+{
+public:
+ QDomCDATASectionPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val);
+ QDomCDATASectionPrivate(QDomCDATASectionPrivate *n, bool deep);
+
+ // Reimplemented from QDomNodePrivate
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::CDATASectionNode; }
+ virtual void save(QTextStream &s, int, int) const override;
+};
+
+class QDomNotationPrivate : public QDomNodePrivate
+{
+public:
+ QDomNotationPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &name,
+ const QString &pub, const QString &sys);
+ QDomNotationPrivate(QDomNotationPrivate *n, bool deep);
+
+ // Reimplemented from QDomNodePrivate
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::NotationNode; }
+ virtual void save(QTextStream &s, int, int) const override;
+
+ // Variables
+ QString m_sys;
+ QString m_pub;
+};
+
+class QDomEntityPrivate : public QDomNodePrivate
+{
+public:
+ QDomEntityPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &name,
+ const QString &pub, const QString &sys, const QString &notation);
+ QDomEntityPrivate(QDomEntityPrivate *n, bool deep);
+
+ // Reimplemented from QDomNodePrivate
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::EntityNode; }
+ virtual void save(QTextStream &s, int, int) const override;
+
+ // Variables
+ QString m_sys;
+ QString m_pub;
+ QString m_notationName;
+};
+
+class QDomEntityReferencePrivate : public QDomNodePrivate
+{
+public:
+ QDomEntityReferencePrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &name);
+ QDomEntityReferencePrivate(QDomNodePrivate *n, bool deep);
+
+ // Reimplemented from QDomNodePrivate
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::EntityReferenceNode; }
+ virtual void save(QTextStream &s, int, int) const override;
+};
+
+class QDomProcessingInstructionPrivate : public QDomNodePrivate
+{
+public:
+ QDomProcessingInstructionPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent,
+ const QString &target, const QString &data);
+ QDomProcessingInstructionPrivate(QDomProcessingInstructionPrivate *n, bool deep);
+
+ // Reimplemented from QDomNodePrivate
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::ProcessingInstructionNode; }
+ virtual void save(QTextStream &s, int, int) const override;
+};
+
+class QDomDocumentPrivate : public QDomNodePrivate
+{
+public:
+ QDomDocumentPrivate();
+ QDomDocumentPrivate(const QString &name);
+ QDomDocumentPrivate(QDomDocumentTypePrivate *dt);
+ QDomDocumentPrivate(QDomDocumentPrivate *n, bool deep);
+ ~QDomDocumentPrivate();
+
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+ bool setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg,
+ int *errorLine, int *errorColumn);
+ bool setContent(QXmlInputSource *source, QXmlReader *reader, QXmlSimpleReader *simpleReader,
+ QString *errorMsg, int *errorLine, int *errorColumn);
+QT_WARNING_POP
+#endif
+ bool setContent(QXmlStreamReader *reader, bool namespaceProcessing, QString *errorMsg,
+ int *errorLine, int *errorColumn);
+
+ // Attributes
+ QDomDocumentTypePrivate *doctype() { return type.data(); }
+ QDomImplementationPrivate *implementation() { return impl.data(); }
+ QDomElementPrivate *documentElement();
+
+ // Factories
+ QDomElementPrivate *createElement(const QString &tagName);
+ QDomElementPrivate *createElementNS(const QString &nsURI, const QString &qName);
+ QDomDocumentFragmentPrivate *createDocumentFragment();
+ QDomTextPrivate *createTextNode(const QString &data);
+ QDomCommentPrivate *createComment(const QString &data);
+ QDomCDATASectionPrivate *createCDATASection(const QString &data);
+ QDomProcessingInstructionPrivate *createProcessingInstruction(const QString &target,
+ const QString &data);
+ QDomAttrPrivate *createAttribute(const QString &name);
+ QDomAttrPrivate *createAttributeNS(const QString &nsURI, const QString &qName);
+ QDomEntityReferencePrivate *createEntityReference(const QString &name);
+
+ QDomNodePrivate *importNode(QDomNodePrivate *importedNode, bool deep);
+
+ // Reimplemented from QDomNodePrivate
+ QDomNodePrivate *cloneNode(bool deep = true) override;
+ QDomNode::NodeType nodeType() const override { return QDomNode::DocumentNode; }
+ void clear() override;
+
+ // Variables
+ QExplicitlySharedDataPointer<QDomImplementationPrivate> impl;
+ QExplicitlySharedDataPointer<QDomDocumentTypePrivate> type;
+
+ void saveDocument(QTextStream &stream, const int indent,
+ QDomNode::EncodingPolicy encUsed) const;
+
+ /* \internal
+ Counter for the QDomNodeListPrivate timestamps.
+
+ This is a cache optimization, that might in some cases be effective. The
+ dilemma is that QDomNode::childNodes() returns a list, but the
+ implementation stores the children in a linked list. Hence, in order to
+ get the children out through childNodes(), a list must be populated each
+ time, which is O(N).
+
+ DOM has the requirement of node references being live, see DOM Core
+ Level 3, 1.1.1 The DOM Structure Model, which means that changes to the
+ underlying documents must be reflected in node lists.
+
+ This mechanism, nodeListTime, is a caching optimization that reduces the
+ amount of times the node list is rebuilt, by only doing so when the
+ document actually changes. However, a change to anywhere in any document
+ invalidate all lists, since no dependency tracking is done.
+
+ It functions by that all modifying functions(insertBefore() and so on)
+ increment the count; each QDomNodeListPrivate copies nodeListTime on
+ construction, and compares its own value to nodeListTime in order to
+ determine whether it needs to rebuild.
+
+ This is reentrant. The nodeListTime may overflow, but that's ok since we
+ check for equalness, not whether nodeListTime is smaller than the list's
+ stored timestamp.
+ */
+ long nodeListTime;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDOMHELPERS_P_H
diff --git a/src/xml/dom/qdomhelpers.cpp b/src/xml/dom/qdomhelpers.cpp
new file mode 100644
index 0000000000..10e37f7c0f
--- /dev/null
+++ b/src/xml/dom/qdomhelpers.cpp
@@ -0,0 +1,663 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtXml 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 "qdomhelpers_p.h"
+#include "qdom_p.h"
+#include "qxmlstream.h"
+#include "private/qxml_p.h"
+
+QT_BEGIN_NAMESPACE
+
+#if QT_DEPRECATED_SINCE(5, 15)
+
+/**************************************************************
+ *
+ * QDomHandler
+ *
+ **************************************************************/
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+QDomHandler::QDomHandler(QDomDocumentPrivate *adoc, QXmlSimpleReader *areader,
+ bool namespaceProcessing)
+ : cdata(false), reader(areader), domBuilder(adoc, &locator, namespaceProcessing)
+{
+}
+
+QDomHandler::~QDomHandler() {}
+
+bool QDomHandler::endDocument()
+{
+ return domBuilder.endDocument();
+}
+
+bool QDomHandler::startDTD(const QString &name, const QString &publicId, const QString &systemId)
+{
+ return domBuilder.startDTD(name, publicId, systemId);
+}
+
+bool QDomHandler::startElement(const QString &nsURI, const QString &, const QString &qName,
+ const QXmlAttributes &atts)
+{
+ return domBuilder.startElement(nsURI, qName, atts);
+}
+
+bool QDomHandler::endElement(const QString &, const QString &, const QString &)
+{
+ return domBuilder.endElement();
+}
+
+bool QDomHandler::characters(const QString &ch)
+{
+ return domBuilder.characters(ch, cdata);
+}
+
+bool QDomHandler::processingInstruction(const QString &target, const QString &data)
+{
+ return domBuilder.processingInstruction(target, data);
+}
+
+bool QDomHandler::skippedEntity(const QString &name)
+{
+ // we can only handle inserting entity references into content
+ if (reader && !reader->d_ptr->skipped_entity_in_content)
+ return true;
+
+ return domBuilder.skippedEntity(name);
+}
+
+bool QDomHandler::fatalError(const QXmlParseException &exception)
+{
+ domBuilder.errorMsg = exception.message();
+ domBuilder.errorLine = exception.lineNumber();
+ domBuilder.errorColumn = exception.columnNumber();
+ return QXmlDefaultHandler::fatalError(exception);
+}
+
+bool QDomHandler::startCDATA()
+{
+ cdata = true;
+ return true;
+}
+
+bool QDomHandler::endCDATA()
+{
+ cdata = false;
+ return true;
+}
+
+bool QDomHandler::startEntity(const QString &name)
+{
+ return domBuilder.startEntity(name);
+}
+
+bool QDomHandler::endEntity(const QString &)
+{
+ return domBuilder.endEntity();
+}
+
+bool QDomHandler::comment(const QString &ch)
+{
+ return domBuilder.comment(ch);
+}
+
+bool QDomHandler::unparsedEntityDecl(const QString &name, const QString &publicId,
+ const QString &systemId, const QString &notationName)
+{
+ return domBuilder.unparsedEntityDecl(name, publicId, systemId, notationName);
+}
+
+bool QDomHandler::externalEntityDecl(const QString &name, const QString &publicId,
+ const QString &systemId)
+{
+ return unparsedEntityDecl(name, publicId, systemId, QString());
+}
+
+bool QDomHandler::notationDecl(const QString &name, const QString &publicId,
+ const QString &systemId)
+{
+ return domBuilder.notationDecl(name, publicId, systemId);
+}
+
+void QDomHandler::setDocumentLocator(QXmlLocator *locator)
+{
+ this->locator.setLocator(locator);
+}
+
+QDomBuilder::ErrorInfo QDomHandler::errorInfo() const
+{
+ return domBuilder.error();
+}
+QT_WARNING_POP
+
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/**************************************************************
+ *
+ * QXmlDocumentLocators
+ *
+ **************************************************************/
+
+int QDomDocumentLocator::column() const
+{
+ Q_ASSERT(reader);
+ return static_cast<int>(reader->columnNumber());
+}
+
+int QDomDocumentLocator::line() const
+{
+ Q_ASSERT(reader);
+ return static_cast<int>(reader->lineNumber());
+}
+
+#if QT_DEPRECATED_SINCE(5, 15)
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+void QSAXDocumentLocator::setLocator(QXmlLocator *l)
+{
+ locator = l;
+}
+QT_WARNING_POP
+
+int QSAXDocumentLocator::column() const
+{
+ if (!locator)
+ return 0;
+
+ return static_cast<int>(locator->columnNumber());
+}
+
+int QSAXDocumentLocator::line() const
+{
+ if (!locator)
+ return 0;
+
+ return static_cast<int>(locator->lineNumber());
+}
+
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/**************************************************************
+ *
+ * QDomBuilder
+ *
+ **************************************************************/
+
+QDomBuilder::QDomBuilder(QDomDocumentPrivate *d, QXmlDocumentLocator *l, bool namespaceProcessing)
+ : errorLine(0),
+ errorColumn(0),
+ doc(d),
+ node(d),
+ locator(l),
+ nsProcessing(namespaceProcessing)
+{
+}
+
+QDomBuilder::~QDomBuilder() {}
+
+bool QDomBuilder::endDocument()
+{
+ // ### is this really necessary? (rms)
+ if (node != doc)
+ return false;
+ return true;
+}
+
+bool QDomBuilder::startDTD(const QString &name, const QString &publicId, const QString &systemId)
+{
+ doc->doctype()->name = name;
+ doc->doctype()->publicId = publicId;
+ doc->doctype()->systemId = systemId;
+ return true;
+}
+
+#if QT_DEPRECATED_SINCE(5, 15)
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+bool QDomBuilder::startElement(const QString &nsURI, const QString &qName,
+ const QXmlAttributes &atts)
+{
+ // tag name
+ QDomNodePrivate *n;
+ if (nsProcessing) {
+ n = doc->createElementNS(nsURI, qName);
+ } else {
+ n = doc->createElement(qName);
+ }
+
+ if (!n)
+ return false;
+
+ n->setLocation(locator->line(), locator->column());
+
+ node->appendChild(n);
+ node = n;
+
+ // attributes
+ for (int i = 0; i < atts.length(); i++) {
+ auto domElement = static_cast<QDomElementPrivate *>(node);
+ if (nsProcessing)
+ domElement->setAttributeNS(atts.uri(i), atts.qName(i), atts.value(i));
+ else
+ domElement->setAttribute(atts.qName(i), atts.value(i));
+ }
+
+ return true;
+}
+QT_WARNING_POP
+
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+inline QString stringRefToString(const QStringRef &stringRef)
+{
+ // Calling QStringRef::toString() on a NULL QStringRef in some cases returns
+ // an empty string (i.e. QString("")) instead of a NULL string (i.e. QString()).
+ // QDom implementation differentiates between NULL and empty strings, so
+ // we need this as workaround to keep the current behavior unchanged.
+ return stringRef.isNull() ? QString() : stringRef.toString();
+}
+
+bool QDomBuilder::startElement(const QString &nsURI, const QString &qName,
+ const QXmlStreamAttributes &atts)
+{
+ QDomNodePrivate *n =
+ nsProcessing ? doc->createElementNS(nsURI, qName) : doc->createElement(qName);
+ if (!n)
+ return false;
+
+ n->setLocation(locator->line(), locator->column());
+
+ node->appendChild(n);
+ node = n;
+
+ // attributes
+ for (const auto &attr : atts) {
+ auto domElement = static_cast<QDomElementPrivate *>(node);
+ if (nsProcessing) {
+ domElement->setAttributeNS(stringRefToString(attr.namespaceUri()),
+ stringRefToString(attr.qualifiedName()),
+ stringRefToString(attr.value()));
+ } else {
+ domElement->setAttribute(stringRefToString(attr.qualifiedName()),
+ stringRefToString(attr.value()));
+ }
+ }
+
+ return true;
+}
+
+bool QDomBuilder::endElement()
+{
+ if (!node || node == doc)
+ return false;
+ node = node->parent();
+
+ return true;
+}
+
+bool QDomBuilder::characters(const QString &characters, bool cdata)
+{
+ // No text as child of some document
+ if (node == doc)
+ return false;
+
+ QScopedPointer<QDomNodePrivate> n;
+ if (cdata) {
+ n.reset(doc->createCDATASection(characters));
+ } else if (!entityName.isEmpty()) {
+ QScopedPointer<QDomEntityPrivate> e(
+ new QDomEntityPrivate(doc, nullptr, entityName, QString(), QString(), QString()));
+ e->value = characters;
+ e->ref.deref();
+ doc->doctype()->appendChild(e.data());
+ e.take();
+ n.reset(doc->createEntityReference(entityName));
+ } else {
+ n.reset(doc->createTextNode(characters));
+ }
+ n->setLocation(locator->line(), locator->column());
+ node->appendChild(n.data());
+ n.take();
+
+ return true;
+}
+
+bool QDomBuilder::processingInstruction(const QString &target, const QString &data)
+{
+ QDomNodePrivate *n;
+ n = doc->createProcessingInstruction(target, data);
+ if (n) {
+ n->setLocation(locator->line(), locator->column());
+ node->appendChild(n);
+ return true;
+ } else
+ return false;
+}
+
+bool QDomBuilder::skippedEntity(const QString &name)
+{
+ QDomNodePrivate *n = doc->createEntityReference(name);
+ n->setLocation(locator->line(), locator->column());
+ node->appendChild(n);
+ return true;
+}
+
+void QDomBuilder::fatalError(const QString &message)
+{
+ errorMsg = message;
+ errorLine = static_cast<int>(locator->line());
+ errorColumn = static_cast<int>(locator->column());
+}
+
+QDomBuilder::ErrorInfo QDomBuilder::error() const
+{
+ return ErrorInfo(errorMsg, errorLine, errorColumn);
+}
+
+bool QDomBuilder::startEntity(const QString &name)
+{
+ entityName = name;
+ return true;
+}
+
+bool QDomBuilder::endEntity()
+{
+ entityName.clear();
+ return true;
+}
+
+bool QDomBuilder::comment(const QString &characters)
+{
+ QDomNodePrivate *n;
+ n = doc->createComment(characters);
+ n->setLocation(locator->line(), locator->column());
+ node->appendChild(n);
+ return true;
+}
+
+bool QDomBuilder::unparsedEntityDecl(const QString &name, const QString &publicId,
+ const QString &systemId, const QString &notationName)
+{
+ QDomEntityPrivate *e =
+ new QDomEntityPrivate(doc, nullptr, name, publicId, systemId, notationName);
+ // keep the refcount balanced: appendChild() does a ref anyway.
+ e->ref.deref();
+ doc->doctype()->appendChild(e);
+ return true;
+}
+
+bool QDomBuilder::externalEntityDecl(const QString &name, const QString &publicId,
+ const QString &systemId)
+{
+ return unparsedEntityDecl(name, publicId, systemId, QString());
+}
+
+bool QDomBuilder::notationDecl(const QString &name, const QString &publicId,
+ const QString &systemId)
+{
+ QDomNotationPrivate *n = new QDomNotationPrivate(doc, nullptr, name, publicId, systemId);
+ // keep the refcount balanced: appendChild() does a ref anyway.
+ n->ref.deref();
+ doc->doctype()->appendChild(n);
+ return true;
+}
+
+/**************************************************************
+ *
+ * QDomParser
+ *
+ **************************************************************/
+
+QDomParser::QDomParser(QDomDocumentPrivate *d, QXmlStreamReader *r, bool namespaceProcessing)
+ : reader(r), locator(r), domBuilder(d, &locator, namespaceProcessing)
+{
+}
+
+bool QDomParser::parse()
+{
+ return parseProlog() && parseBody();
+}
+
+QDomBuilder::ErrorInfo QDomParser::errorInfo() const
+{
+ return domBuilder.error();
+}
+
+bool QDomParser::parseProlog()
+{
+ Q_ASSERT(reader);
+
+ bool foundDtd = false;
+
+ while (!reader->atEnd()) {
+ reader->readNext();
+
+ if (reader->hasError()) {
+ domBuilder.fatalError(reader->errorString());
+ return false;
+ }
+
+ switch (reader->tokenType()) {
+ case QXmlStreamReader::StartDocument:
+ if (!reader->documentVersion().isEmpty()) {
+ QString value(QLatin1String("version='"));
+ value += reader->documentVersion();
+ value += QLatin1Char('\'');
+ if (!reader->documentEncoding().isEmpty()) {
+ value += QLatin1String(" encoding='");
+ value += reader->documentEncoding();
+ value += QLatin1Char('\'');
+ }
+ if (reader->isStandaloneDocument()) {
+ value += QLatin1String(" standalone='yes'");
+ } else {
+ // TODO: Add standalone='no', if 'standalone' is specified. With the current
+ // QXmlStreamReader there is no way to figure out if it was specified or not.
+ // QXmlStreamReader needs to be modified for handling that case correctly.
+ }
+
+ if (!domBuilder.processingInstruction(QLatin1String("xml"), value)) {
+ domBuilder.fatalError(
+ QDomParser::tr("Error occurred while processing XML declaration"));
+ return false;
+ }
+ }
+ break;
+ case QXmlStreamReader::DTD:
+ if (foundDtd) {
+ domBuilder.fatalError(QDomParser::tr("Multiple DTD sections are not allowed"));
+ return false;
+ }
+ foundDtd = true;
+
+ if (!domBuilder.startDTD(stringRefToString(reader->dtdName()),
+ stringRefToString(reader->dtdPublicId()),
+ stringRefToString(reader->dtdSystemId()))) {
+ domBuilder.fatalError(
+ QDomParser::tr("Error occurred while processing document type declaration"));
+ return false;
+ }
+ if (!parseMarkupDecl())
+ return false;
+ break;
+ case QXmlStreamReader::Comment:
+ if (!domBuilder.comment(reader->text().toString())) {
+ domBuilder.fatalError(QDomParser::tr("Error occurred while processing comment"));
+ return false;
+ }
+ break;
+ case QXmlStreamReader::ProcessingInstruction:
+ if (!domBuilder.processingInstruction(reader->processingInstructionTarget().toString(),
+ reader->processingInstructionData().toString())) {
+ domBuilder.fatalError(
+ QDomParser::tr("Error occurred while processing a processing instruction"));
+ return false;
+ }
+ break;
+ default:
+ // If the token is none of the above, prolog processing is done.
+ return true;
+ }
+ }
+
+ return true;
+}
+
+bool QDomParser::parseBody()
+{
+ Q_ASSERT(reader);
+
+ std::stack<QStringRef> tagStack;
+ while (!reader->atEnd() && !reader->hasError()) {
+ switch (reader->tokenType()) {
+ case QXmlStreamReader::StartElement:
+ tagStack.push(reader->qualifiedName());
+ if (!domBuilder.startElement(stringRefToString(reader->namespaceUri()),
+ stringRefToString(reader->qualifiedName()),
+ reader->attributes())) {
+ domBuilder.fatalError(
+ QDomParser::tr("Error occurred while processing a start element"));
+ return false;
+ }
+ break;
+ case QXmlStreamReader::EndElement:
+ if (tagStack.empty() || reader->qualifiedName() != tagStack.top()) {
+ domBuilder.fatalError(
+ QDomParser::tr("Unexpected end element '%1'").arg(reader->name()));
+ return false;
+ }
+ tagStack.pop();
+ if (!domBuilder.endElement()) {
+ domBuilder.fatalError(
+ QDomParser::tr("Error occurred while processing an end element"));
+ return false;
+ }
+ break;
+ case QXmlStreamReader::Characters:
+ if (!reader->isWhitespace()) { // Skip the content consisting of only whitespaces
+ if (!reader->text().toString().trimmed().isEmpty()) {
+ if (!domBuilder.characters(reader->text().toString(), reader->isCDATA())) {
+ domBuilder.fatalError(QDomParser::tr(
+ "Error occurred while processing the element content"));
+ return false;
+ }
+ }
+ }
+ break;
+ case QXmlStreamReader::Comment:
+ if (!domBuilder.comment(reader->text().toString())) {
+ domBuilder.fatalError(QDomParser::tr("Error occurred while processing comments"));
+ return false;
+ }
+ break;
+ case QXmlStreamReader::ProcessingInstruction:
+ if (!domBuilder.processingInstruction(reader->processingInstructionTarget().toString(),
+ reader->processingInstructionData().toString())) {
+ domBuilder.fatalError(
+ QDomParser::tr("Error occurred while processing a processing instruction"));
+ return false;
+ }
+ break;
+ case QXmlStreamReader::EntityReference:
+ if (!domBuilder.skippedEntity(reader->name().toString())) {
+ domBuilder.fatalError(
+ QDomParser::tr("Error occurred while processing an entity reference"));
+ return false;
+ }
+ break;
+ default:
+ domBuilder.fatalError(QDomParser::tr("Unexpected token"));
+ return false;
+ }
+
+ reader->readNext();
+ }
+
+ if (reader->hasError()) {
+ domBuilder.fatalError(reader->errorString());
+ reader->readNext();
+ return false;
+ }
+
+ if (!tagStack.empty()) {
+ domBuilder.fatalError(QDomParser::tr("Tag mismatch"));
+ return false;
+ }
+
+ return true;
+}
+
+bool QDomParser::parseMarkupDecl()
+{
+ Q_ASSERT(reader);
+
+ const auto entities = reader->entityDeclarations();
+ for (const auto &entityDecl : entities) {
+ // Entity declarations are created only for Extrenal Entities. Internal Entities
+ // are parsed, and QXmlStreamReader handles the parsing itself and returns the
+ // parsed result. So we don't need to do anything for the Internal Entities.
+ if (!entityDecl.publicId().isEmpty() || !entityDecl.systemId().isEmpty()) {
+ // External Entity
+ if (!domBuilder.unparsedEntityDecl(stringRefToString(entityDecl.name()),
+ stringRefToString(entityDecl.publicId()),
+ stringRefToString(entityDecl.systemId()),
+ stringRefToString(entityDecl.notationName()))) {
+ domBuilder.fatalError(
+ QDomParser::tr("Error occurred while processing entity declaration"));
+ return false;
+ }
+ }
+ }
+
+ const auto notations = reader->notationDeclarations();
+ for (const auto &notationDecl : notations) {
+ if (!domBuilder.notationDecl(stringRefToString(notationDecl.name()),
+ stringRefToString(notationDecl.publicId()),
+ stringRefToString(notationDecl.systemId()))) {
+ domBuilder.fatalError(
+ QDomParser::tr("Error occurred while processing notation declaration"));
+ return false;
+ }
+ }
+
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/src/xml/dom/qdomhelpers_p.h b/src/xml/dom/qdomhelpers_p.h
new file mode 100644
index 0000000000..4de18f7d4d
--- /dev/null
+++ b/src/xml/dom/qdomhelpers_p.h
@@ -0,0 +1,258 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtXml 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 QDOMHELPERS_P_H
+#define QDOMHELPERS_P_H
+
+#include <qcoreapplication.h>
+#include <qglobal.h>
+#include <qxml.h>
+
+QT_BEGIN_NAMESPACE
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience of
+// qxml.cpp and qdom.cpp. This header file may change from version to version without
+// notice, or even be removed.
+//
+// We mean it.
+//
+
+class QDomDocumentPrivate;
+class QDomNodePrivate;
+class QXmlStreamReader;
+class QXmlStreamAttributes;
+
+/**************************************************************
+ *
+ * QXmlDocumentLocators
+ *
+ **************************************************************/
+
+/* TODO: QXmlDocumentLocator can be removed when the SAX-based
+ * implementation is removed. Right now it is needed for QDomBuilder
+ * to work with both QXmlStreamReader and QXmlInputSource (SAX)
+ * based implementations.
+ */
+class QXmlDocumentLocator
+{
+public:
+ virtual ~QXmlDocumentLocator() = default;
+ virtual int column() const = 0;
+ virtual int line() const = 0;
+};
+
+class QDomDocumentLocator : public QXmlDocumentLocator
+{
+public:
+ QDomDocumentLocator(QXmlStreamReader *r) : reader(r) {}
+ ~QDomDocumentLocator() override = default;
+
+ int column() const override;
+ int line() const override;
+
+private:
+ QXmlStreamReader *reader;
+};
+
+#if QT_DEPRECATED_SINCE(5, 15)
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+
+class QSAXDocumentLocator : public QXmlDocumentLocator
+{
+public:
+ ~QSAXDocumentLocator() override = default;
+
+ int column() const override;
+ int line() const override;
+
+ void setLocator(QXmlLocator *l);
+
+private:
+ QXmlLocator *locator = nullptr;
+};
+
+QT_WARNING_POP
+
+#endif
+
+/**************************************************************
+ *
+ * QDomBuilder
+ *
+ **************************************************************/
+
+class QDomBuilder
+{
+public:
+ QDomBuilder(QDomDocumentPrivate *d, QXmlDocumentLocator *l, bool namespaceProcessing);
+ ~QDomBuilder();
+
+ bool endDocument();
+#if QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+ bool startElement(const QString &nsURI, const QString &qName, const QXmlAttributes &atts);
+QT_WARNING_POP
+#endif
+ bool startElement(const QString &nsURI, const QString &qName, const QXmlStreamAttributes &atts);
+ bool endElement();
+ bool characters(const QString &characters, bool cdata = false);
+ bool processingInstruction(const QString &target, const QString &data);
+ bool skippedEntity(const QString &name);
+ bool startEntity(const QString &name);
+ bool endEntity();
+ bool startDTD(const QString &name, const QString &publicId, const QString &systemId);
+ bool comment(const QString &characters);
+ bool externalEntityDecl(const QString &name, const QString &publicId, const QString &systemId);
+ bool notationDecl(const QString &name, const QString &publicId, const QString &systemId);
+ bool unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId,
+ const QString &notationName);
+
+ void fatalError(const QString &message);
+
+ using ErrorInfo = std::tuple<QString, int, int>;
+ ErrorInfo error() const;
+
+ QString errorMsg;
+ int errorLine;
+ int errorColumn;
+
+private:
+ QDomDocumentPrivate *doc;
+ QDomNodePrivate *node;
+ QXmlDocumentLocator *locator;
+ QString entityName;
+ bool nsProcessing;
+};
+
+#if QT_DEPRECATED_SINCE(5, 15)
+
+/**************************************************************
+ *
+ * QDomHandler
+ *
+ **************************************************************/
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+
+class QDomHandler : public QXmlDefaultHandler
+{
+public:
+ QDomHandler(QDomDocumentPrivate *d, QXmlSimpleReader *reader, bool namespaceProcessing);
+ ~QDomHandler() override;
+
+ // content handler
+ bool endDocument() override;
+ bool startElement(const QString &nsURI, const QString &localName, const QString &qName,
+ const QXmlAttributes &atts) override;
+ bool endElement(const QString &nsURI, const QString &localName, const QString &qName) override;
+ bool characters(const QString &ch) override;
+ bool processingInstruction(const QString &target, const QString &data) override;
+ bool skippedEntity(const QString &name) override;
+
+ // error handler
+ bool fatalError(const QXmlParseException &exception) override;
+
+ // lexical handler
+ bool startCDATA() override;
+ bool endCDATA() override;
+ bool startEntity(const QString &) override;
+ bool endEntity(const QString &) override;
+ bool startDTD(const QString &name, const QString &publicId, const QString &systemId) override;
+ bool comment(const QString &ch) override;
+
+ // decl handler
+ bool externalEntityDecl(const QString &name, const QString &publicId,
+ const QString &systemId) override;
+
+ // DTD handler
+ bool notationDecl(const QString &name, const QString &publicId,
+ const QString &systemId) override;
+ bool unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId,
+ const QString &notationName) override;
+
+ void setDocumentLocator(QXmlLocator *locator) override;
+
+ QDomBuilder::ErrorInfo errorInfo() const;
+
+private:
+ bool cdata;
+ QXmlSimpleReader *reader;
+ QSAXDocumentLocator locator;
+ QDomBuilder domBuilder;
+};
+
+QT_WARNING_POP
+
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/**************************************************************
+ *
+ * QDomParser
+ *
+ **************************************************************/
+
+class QDomParser
+{
+ Q_DECLARE_TR_FUNCTIONS(QDomParser)
+public:
+ QDomParser(QDomDocumentPrivate *d, QXmlStreamReader *r, bool namespaceProcessing);
+
+ bool parse();
+ QDomBuilder::ErrorInfo errorInfo() const;
+
+private:
+ bool parseProlog();
+ bool parseBody();
+ bool parseMarkupDecl();
+
+ QXmlStreamReader *reader;
+ QDomDocumentLocator locator;
+ QDomBuilder domBuilder;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDOMHELPERS_P_H
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 1993073cce..0033d042d4 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -51,6 +51,7 @@
#include "qstack.h"
#include <qdebug.h>
+#if QT_DEPRECATED_SINCE(5, 15)
#ifdef Q_CC_BOR // borland 6 finds bogus warnings when building this file in uic3
# pragma warn -8080
@@ -284,6 +285,7 @@ class QXmlDefaultHandlerPrivate
/*!
\class QXmlParseException
+ \obsolete
\reentrant
\brief The QXmlParseException class is used to report errors with
the QXmlErrorHandler interface.
@@ -403,6 +405,7 @@ QString QXmlParseException::systemId() const
/*!
\class QXmlLocator
+ \obsolete
\reentrant
\brief The QXmlLocator class provides the XML handler classes with
information about the parsing position within a file.
@@ -445,6 +448,9 @@ QXmlLocator::~QXmlLocator()
number available.
*/
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+
class QXmlSimpleReaderLocator : public QXmlLocator
{
public:
@@ -497,6 +503,7 @@ public:
/*!
\class QXmlNamespaceSupport
+ \obsolete
\since 4.4
\reentrant
\brief The QXmlNamespaceSupport class is a helper class for XML
@@ -745,6 +752,7 @@ void QXmlNamespaceSupport::reset()
/*!
\class QXmlAttributes
+ \obsolete
\reentrant
\brief The QXmlAttributes class provides XML attributes.
@@ -1028,6 +1036,7 @@ void QXmlAttributes::append(const QString &qName, const QString &uri, const QStr
/*!
\class QXmlInputSource
+ \obsolete
\reentrant
\brief The QXmlInputSource class provides the input data for the
QXmlReader subclasses.
@@ -1446,6 +1455,7 @@ QString QXmlInputSource::fromRawData(const QByteArray &data, bool beginning)
/*!
\class QXmlContentHandler
+ \obsolete
\reentrant
\brief The QXmlContentHandler class provides an interface to
report the logical content of XML data.
@@ -1688,6 +1698,7 @@ QString QXmlInputSource::fromRawData(const QByteArray &data, bool beginning)
/*!
\class QXmlErrorHandler
+ \obsolete
\reentrant
\brief The QXmlErrorHandler class provides an interface to report
errors in XML data.
@@ -1763,6 +1774,7 @@ events are reported.
/*!
\class QXmlDTDHandler
+ \obsolete
\reentrant
\brief The QXmlDTDHandler class provides an interface to report
DTD content of XML data.
@@ -1830,6 +1842,7 @@ events are reported.
/*!
\class QXmlEntityResolver
+ \obsolete
\reentrant
\brief The QXmlEntityResolver class provides an interface to
resolve external entities contained in XML data.
@@ -1886,6 +1899,7 @@ events are reported.
/*!
\class QXmlLexicalHandler
+ \obsolete
\reentrant
\brief The QXmlLexicalHandler class provides an interface to
report the lexical content of XML data.
@@ -2037,6 +2051,7 @@ events are reported.
/*!
\class QXmlDeclHandler
+ \obsolete
\reentrant
\brief The QXmlDeclHandler class provides an interface to report declaration
content of XML data.
@@ -2124,6 +2139,7 @@ events are reported.
/*!
\class QXmlDefaultHandler
+ \obsolete
\reentrant
\brief The QXmlDefaultHandler class provides a default implementation of all
the XML handler classes.
@@ -2558,6 +2574,7 @@ void QXmlSimpleReaderPrivate::initIncrementalParsing()
/*!
\class QXmlReader
+ \obsolete
\reentrant
\brief The QXmlReader class provides an interface for XML readers (i.e.
parsers).
@@ -2597,6 +2614,9 @@ void QXmlSimpleReaderPrivate::initIncrementalParsing()
setDeclHandler(). The parse itself is started with a call to
parse().
+ Note that this class is now deprecated, please use QXmlStreamReader or
+ QDomDocument for reading XML files.
+
\sa QXmlSimpleReader
*/
@@ -2783,6 +2803,7 @@ void QXmlSimpleReaderPrivate::initIncrementalParsing()
/*!
\class QXmlSimpleReader
+ \obsolete
\nonreentrant
\brief The QXmlSimpleReader class provides an implementation of a
simple XML parser.
@@ -2845,6 +2866,9 @@ void QXmlSimpleReaderPrivate::initIncrementalParsing()
QXmlSimpleReader is not reentrant. If you want to use the class
in threaded code, lock the code using QXmlSimpleReader with a
locking mechanism, such as a QMutex.
+
+ Note that this class is now deprecated, please use QXmlStreamReader or
+ QDomDocument for reading XML files.
*/
static inline bool is_S(QChar ch)
@@ -5255,7 +5279,10 @@ bool QXmlSimpleReaderPrivate::parsePEReference()
} else if (entityRes) {
QMap<QString,QXmlSimpleReaderPrivate::ExternParameterEntity>::Iterator it2;
it2 = externParameterEntities.find(ref());
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QXmlInputSource *ret = nullptr;
+QT_WARNING_POP
if (it2 != externParameterEntities.end()) {
if (!entityRes->resolveEntity((*it2).publicId, (*it2).systemId, ret)) {
delete ret;
@@ -7610,7 +7637,10 @@ bool QXmlSimpleReaderPrivate::processReference()
// Included if validating
bool skipIt = true;
if (entityRes) {
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QXmlInputSource *ret = nullptr;
+QT_WARNING_POP
if (!entityRes->resolveEntity((*itExtern).publicId, (*itExtern).systemId, ret)) {
delete ret;
reportParseError(entityRes->errorString());
@@ -7850,6 +7880,8 @@ bool QXmlSimpleReaderPrivate::next_eat_ws()
This private function initializes the reader. \a i is the input source to
read the data from.
*/
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
void QXmlSimpleReaderPrivate::init(const QXmlInputSource *i)
{
lineNr = 0;
@@ -7870,6 +7902,7 @@ void QXmlSimpleReaderPrivate::init(const QXmlInputSource *i)
standalone = QXmlSimpleReaderPrivate::Unknown;
error.clear();
}
+QT_WARNING_POP
/*
This private function initializes the XML data related variables. Especially,
@@ -7898,6 +7931,8 @@ bool QXmlSimpleReaderPrivate::entityExist(const QString& e) const
}
}
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
void QXmlSimpleReaderPrivate::reportParseError(const QString& error)
{
this->error = error;
@@ -7913,6 +7948,7 @@ void QXmlSimpleReaderPrivate::reportParseError(const QString& error)
}
}
}
+QT_WARNING_POP
/*
This private function is called when a parsing function encounters an
@@ -8006,3 +8042,5 @@ void QXmlSimpleReaderPrivate::refAddC(QChar ch)
refArray[refArrayPos++] = ch;
}
QT_END_NAMESPACE
+
+#endif // QT_DEPRECATED_SINCE(5, 15)
diff --git a/src/xml/sax/qxml.h b/src/xml/sax/qxml.h
index 9be14bd7a9..e19a398ca7 100644
--- a/src/xml/sax/qxml.h
+++ b/src/xml/sax/qxml.h
@@ -40,6 +40,26 @@
#ifndef QXML_H
#define QXML_H
+#if 0
+// This is needed because of QTBUG-80347
+#pragma qt_class(QXmlNamespaceSupport)
+#pragma qt_class(QXmlAttributes)
+#pragma qt_class(QXmlInputSource)
+#pragma qt_class(QXmlParseException)
+#pragma qt_class(QXmlReader)
+#pragma qt_class(QXmlSimpleReader)
+#pragma qt_class(QXmlLocator)
+#pragma qt_class(QXmlContentHandler)
+#pragma qt_class(QXmlErrorHandler)
+#pragma qt_class(QXmlDTDHandler)
+#pragma qt_class(QXmlEntityResolver)
+#pragma qt_class(QXmlLexicalHandler)
+#pragma qt_class(QXmlDeclHandler)
+#pragma qt_class(QXmlDefaultHandler)
+#endif
+
+#include <QtCore/qglobal.h>
+
#include <QtXml/qtxmlglobal.h>
#include <QtCore/qtextstream.h>
#include <QtCore/qfile.h>
@@ -48,8 +68,12 @@
#include <QtCore/qlist.h>
#include <QtCore/qscopedpointer.h>
+#if QT_DEPRECATED_SINCE(5, 15)
+
QT_BEGIN_NAMESPACE
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
class QXmlNamespaceSupport;
class QXmlAttributes;
@@ -76,12 +100,11 @@ class QXmlParseExceptionPrivate;
class QXmlLocatorPrivate;
class QXmlDefaultHandlerPrivate;
-
//
// SAX Namespace Support
//
-class Q_XML_EXPORT QXmlNamespaceSupport
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlNamespaceSupport
{
public:
QXmlNamespaceSupport();
@@ -112,10 +135,15 @@ private:
// SAX Attributes
//
+// Although deprecated warnings are disabled, the intel icc 18 compiler
+// still complains during the instantiation of the templated qSwap() call below
+// (with the parameter QXmlAttributes::AttributeList) when QXmlAttributes is
+// deprecated. This makes the build fail when warnings are treated as errors.
+// To workaround this, deprecated only the constructor.
class Q_XML_EXPORT QXmlAttributes
{
public:
- QXmlAttributes();
+ QT_DEPRECATED_VERSION(5, 15) QXmlAttributes();
QXmlAttributes(const QXmlAttributes &) = default;
QXmlAttributes(QXmlAttributes &&) noexcept = default;
QXmlAttributes &operator=(const QXmlAttributes &) = default;
@@ -158,6 +186,7 @@ private:
QXmlAttributesPrivate *d;
};
+
Q_DECLARE_TYPEINFO(QXmlAttributes::Attribute, Q_MOVABLE_TYPE);
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QXmlAttributes)
@@ -165,7 +194,7 @@ Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QXmlAttributes)
// SAX Input Source
//
-class Q_XML_EXPORT QXmlInputSource
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlInputSource
{
public:
QXmlInputSource();
@@ -194,7 +223,7 @@ private:
// SAX Exception Classes
//
-class Q_XML_EXPORT QXmlParseException
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlParseException
{
public:
explicit QXmlParseException(const QString &name = QString(), int c = -1, int l = -1,
@@ -217,7 +246,7 @@ private:
// XML Reader
//
-class Q_XML_EXPORT QXmlReader
+class QT_DEPRECATED_VERSION_X(5, 15, "Use QXmlStreamReader") Q_XML_EXPORT QXmlReader
{
public:
virtual ~QXmlReader() {}
@@ -243,7 +272,8 @@ public:
virtual bool parse(const QXmlInputSource* input) = 0;
};
-class Q_XML_EXPORT QXmlSimpleReader : public QXmlReader
+class QT_DEPRECATED_VERSION_X(5, 15, "Use QXmlStreamReader") Q_XML_EXPORT QXmlSimpleReader
+ : public QXmlReader
{
public:
QXmlSimpleReader();
@@ -288,7 +318,7 @@ private:
// SAX Locator
//
-class Q_XML_EXPORT QXmlLocator
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlLocator
{
public:
QXmlLocator();
@@ -304,7 +334,7 @@ public:
// SAX handler classes
//
-class Q_XML_EXPORT QXmlContentHandler
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlContentHandler
{
public:
virtual ~QXmlContentHandler() {}
@@ -322,7 +352,7 @@ public:
virtual QString errorString() const = 0;
};
-class Q_XML_EXPORT QXmlErrorHandler
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlErrorHandler
{
public:
virtual ~QXmlErrorHandler() {}
@@ -332,7 +362,7 @@ public:
virtual QString errorString() const = 0;
};
-class Q_XML_EXPORT QXmlDTDHandler
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlDTDHandler
{
public:
virtual ~QXmlDTDHandler() {}
@@ -341,7 +371,7 @@ public:
virtual QString errorString() const = 0;
};
-class Q_XML_EXPORT QXmlEntityResolver
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlEntityResolver
{
public:
virtual ~QXmlEntityResolver() {}
@@ -349,7 +379,7 @@ public:
virtual QString errorString() const = 0;
};
-class Q_XML_EXPORT QXmlLexicalHandler
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlLexicalHandler
{
public:
virtual ~QXmlLexicalHandler() {}
@@ -363,7 +393,7 @@ public:
virtual QString errorString() const = 0;
};
-class Q_XML_EXPORT QXmlDeclHandler
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlDeclHandler
{
public:
virtual ~QXmlDeclHandler() {}
@@ -374,8 +404,12 @@ public:
// ### Conform to SAX by adding elementDecl
};
-
-class Q_XML_EXPORT QXmlDefaultHandler : public QXmlContentHandler, public QXmlErrorHandler, public QXmlDTDHandler, public QXmlEntityResolver, public QXmlLexicalHandler, public QXmlDeclHandler
+class QT_DEPRECATED_VERSION(5, 15) Q_XML_EXPORT QXmlDefaultHandler : public QXmlContentHandler,
+ public QXmlErrorHandler,
+ public QXmlDTDHandler,
+ public QXmlEntityResolver,
+ public QXmlLexicalHandler,
+ public QXmlDeclHandler
{
public:
QXmlDefaultHandler();
@@ -426,6 +460,10 @@ private:
inline int QXmlAttributes::count() const
{ return length(); }
+QT_WARNING_POP
+
QT_END_NAMESPACE
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
#endif // QXML_H
diff --git a/src/xml/sax/qxml_p.h b/src/xml/sax/qxml_p.h
index eb6135db04..1b614dd886 100644
--- a/src/xml/sax/qxml_p.h
+++ b/src/xml/sax/qxml_p.h
@@ -46,6 +46,8 @@
#include <stack>
+#if QT_DEPRECATED_SINCE(5, 15)
+
QT_BEGIN_NAMESPACE
//
@@ -59,6 +61,9 @@ QT_BEGIN_NAMESPACE
// We mean it.
//
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+
class QXmlSimpleReaderPrivate
{
public:
@@ -313,6 +318,10 @@ Q_DECLARE_TYPEINFO(QXmlSimpleReaderPrivate::XmlRef, Q_MOVABLE_TYPE);
Q_DECLARE_TYPEINFO(QXmlSimpleReaderPrivate::ExternParameterEntity, Q_MOVABLE_TYPE);
Q_DECLARE_TYPEINFO(QXmlSimpleReaderPrivate::ExternEntity, Q_MOVABLE_TYPE);
+QT_WARNING_POP
+
QT_END_NAMESPACE
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
#endif // QXML_P_H