summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--config_help.txt5
-rw-r--r--configure.json19
-rw-r--r--examples/embedded/flickable/flickable.cpp10
-rw-r--r--examples/embedded/raycasting/raycasting.cpp8
-rw-r--r--examples/gui/openglwindow/main.cpp49
-rw-r--r--examples/gui/openglwindow/openglwindow.cpp11
-rw-r--r--examples/gui/openglwindow/openglwindow.h12
-rw-r--r--examples/opengl/computegles31/glwindow.cpp39
-rw-r--r--examples/opengl/computegles31/glwindow.h22
-rw-r--r--examples/opengl/contextinfo/renderwindow.cpp4
-rw-r--r--examples/opengl/contextinfo/widget.h2
-rw-r--r--examples/opengl/cube/geometryengine.cpp2
-rw-r--r--examples/opengl/cube/mainwidget.cpp10
-rw-r--r--examples/opengl/cube/mainwidget.h8
-rw-r--r--examples/opengl/hellogl2/glwidget.cpp14
-rw-r--r--examples/opengl/hellogl2/glwidget.h18
-rw-r--r--examples/opengl/hellogl2/logo.cpp1
-rw-r--r--examples/opengl/hellogl2/logo.h2
-rw-r--r--examples/opengl/hellogl2/mainwindow.cpp3
-rw-r--r--examples/opengl/hellogl2/window.cpp8
-rw-r--r--examples/opengl/hellogles3/glwindow.cpp32
-rw-r--r--examples/opengl/hellogles3/glwindow.h26
-rw-r--r--examples/opengl/qopenglwidget/bubble.cpp7
-rw-r--r--examples/opengl/qopenglwidget/bubble.h2
-rw-r--r--examples/opengl/qopenglwidget/glwidget.cpp8
-rw-r--r--examples/opengl/qopenglwidget/glwidget.h46
-rw-r--r--examples/opengl/textures/glwidget.cpp11
-rw-r--r--examples/opengl/textures/glwidget.h14
-rw-r--r--examples/opengl/threadedqopenglwidget/glwidget.cpp7
-rw-r--r--examples/opengl/threadedqopenglwidget/glwidget.h18
-rw-r--r--examples/widgets/doc/dropsite.qdoc12
-rw-r--r--examples/widgets/draganddrop/dropsite/dropsitewindow.cpp21
-rw-r--r--examples/widgets/draganddrop/dropsite/dropsitewindow.h2
-rw-r--r--mkspecs/features/metatypes.prf34
-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/kernel/qvariant.cpp4
-rw-r--r--src/corelib/kernel/qvariant.h8
-rw-r--r--src/corelib/serialization/qdatastream.cpp1
-rw-r--r--src/corelib/text/qbytearray.cpp11
-rw-r--r--src/corelib/text/qlocale_tools_p.h16
-rw-r--r--src/corelib/thread/qsemaphore.h7
-rw-r--r--src/corelib/thread/qwaitcondition_p.h153
-rw-r--r--src/corelib/thread/thread.pri1
-rw-r--r--src/corelib/time/qtimezone.cpp23
-rw-r--r--src/corelib/time/qtimezoneprivate.cpp48
-rw-r--r--src/corelib/time/qtimezoneprivate_p.h3
-rw-r--r--src/corelib/tools/qarraydata.cpp2
-rw-r--r--src/gui/configure.json86
-rw-r--r--src/gui/kernel/qguiapplication.cpp4
-rw-r--r--src/gui/kernel/qhighdpiscaling_p.h2
-rw-r--r--src/gui/kernel/qscreen.cpp19
-rw-r--r--src/gui/kernel/qscreen.h1
-rw-r--r--src/gui/rhi/qrhivulkan.cpp4
-rw-r--r--src/gui/vulkan/qplatformvulkaninstance.cpp5
-rw-r--r--src/gui/vulkan/qplatformvulkaninstance.h1
-rw-r--r--src/gui/vulkan/qvulkaninstance.cpp14
-rw-r--r--src/gui/vulkan/qvulkaninstance.h1
-rw-r--r--src/gui/vulkan/qvulkanwindow.cpp113
-rw-r--r--src/gui/vulkan/qvulkanwindow.h7
-rw-r--r--src/gui/vulkan/qvulkanwindow_p.h1
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp2
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp8
-rw-r--r--src/network/access/qnetworkrequest.cpp15
-rw-r--r--src/network/access/qnetworkrequest.h12
-rw-r--r--src/network/ssl/qsslconfiguration.cpp78
-rw-r--r--src/network/ssl/qsslconfiguration.h5
-rw-r--r--src/network/ssl/qsslsocket.cpp47
-rw-r--r--src/network/ssl/qsslsocket.h16
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemtrayicon.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm9
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp12
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp26
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h8
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_basic.cpp21
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_basic.h6
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp25
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.h20
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp26
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h2
-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/sqldrivers/ibase/qsql_ibase.cpp5
-rw-r--r--src/plugins/sqldrivers/psql/qsql_psql.cpp5
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp5
-rw-r--r--src/sql/kernel/qsqldriver.cpp3
-rw-r--r--src/sql/kernel/qsqldriver.h3
-rw-r--r--src/testlib/qtestcase.cpp85
-rw-r--r--src/tools/moc/collectjson.cpp103
-rw-r--r--src/tools/moc/collectjson.h42
-rw-r--r--src/tools/moc/main.cpp41
-rw-r--r--src/tools/moc/moc.cpp200
-rw-r--r--src/tools/moc/moc.h12
-rw-r--r--src/tools/moc/moc.pri7
-rw-r--r--src/widgets/doc/snippets/qsplashscreen/main.cpp7
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.cpp42
-rw-r--r--src/widgets/itemviews/qdirmodel.cpp4
-rw-r--r--src/widgets/itemviews/qdirmodel.h11
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp6
-rw-r--r--src/widgets/itemviews/qtablewidget.h5
-rw-r--r--src/widgets/util/qcompleter.cpp10
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp2
-rw-r--r--src/widgets/widgets/qmenubar.cpp13
-rw-r--r--src/widgets/widgets/qsplashscreen.cpp38
-rw-r--r--src/widgets/widgets/qsplashscreen.h4
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp18
-rw-r--r--tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp169
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp104
-rw-r--r--tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp70
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp18
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp52
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp50
-rw-r--r--tests/auto/tools/moc/.gitignore1
-rw-r--r--tests/auto/tools/moc/allmocs_baseline_in.json2608
-rw-r--r--tests/auto/tools/moc/moc.pro49
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp53
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp1845
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp260
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp687
-rw-r--r--tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp141
-rw-r--r--tests/auto/widgets/itemviews/qitemview/viewstotest.cpp21
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp860
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp444
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp262
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp407
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp15
-rw-r--r--tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp12
173 files changed, 6927 insertions, 73715 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 5c64c10981..8cc650fc21 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -6,4 +6,4 @@ DEFINES += QT_NO_JAVA_STYLE_ITERATORS
QT_SOURCE_TREE = $$PWD
QT_BUILD_TREE = $$shadowed($$PWD)
-MODULE_VERSION = 5.14.0
+MODULE_VERSION = 5.15.0
diff --git a/config_help.txt b/config_help.txt
index 94471d27cf..2c46592c31 100644
--- a/config_help.txt
+++ b/config_help.txt
@@ -297,8 +297,7 @@ Gui, printing, widget options:
-gbm ............... Enable backends for GBM [auto] (Linux only)
-kms ............... Enable backends for KMS [auto] (Linux only)
-linuxfb ........... Enable Linux Framebuffer support [auto] (Linux only)
- -xcb ............... Enable X11 support. Select used xcb-* libraries [system/qt/no]
- (-qt-xcb still uses system version of libxcb itself)
+ -xcb ............... Enable X11 support [auto] (Linux only)
Input backends:
-libudev............ Enable udev support [auto]
@@ -307,7 +306,7 @@ Gui, printing, widget options:
-libinput .......... Enable libinput support [auto]
-mtdev ............. Enable mtdev support [auto]
-tslib ............. Enable tslib support [auto]
- -xcb-xinput ........ Enable XInput2 support [auto]
+ -bundled-xcb-xinput Use bundled XInput2 support [auto]
-xkbcommon ......... Enable key mapping support [auto]
Image formats:
diff --git a/configure.json b/configure.json
index 159fdf12fa..8ebb3c841f 100644
--- a/configure.json
+++ b/configure.json
@@ -336,13 +336,13 @@
"qmake": "CONFIG += c++11 c++14"
}
},
- "c++1z": {
+ "c++17": {
"label": "C++17 support",
"type": "compile",
"test": {
"head": [
"#if __cplusplus > 201402L",
- "// Compiler claims to support experimental C++1z, trust it",
+ "// Compiler claims to support C++17, trust it",
"#else",
"# error __cplusplus must be > 201402L (the value for C++14)",
"#endif",
@@ -354,7 +354,7 @@
"int i = std::get<int>(v);",
"std::visit([](const auto &) { return 1; }, v);"
],
- "qmake": "CONFIG += c++11 c++14 c++1z"
+ "qmake": "CONFIG += c++11 c++14 c++17"
}
},
"c++2a": {
@@ -368,7 +368,7 @@
"# error __cplusplus must be > 201703L (the value for C++17)",
"#endif"
],
- "qmake": "CONFIG += c++11 c++14 c++1z c++2a"
+ "qmake": "CONFIG += c++11 c++14 c++17 c++2a"
}
},
"precompile_header": {
@@ -951,15 +951,20 @@
"condition": "features.c++11 && tests.c++14",
"output": [ "publicFeature", "publicQtConfig" ]
},
+ "c++17": {
+ "label": "C++17",
+ "condition": "features.c++14 && tests.c++17",
+ "output": [ "publicFeature", "publicQtConfig" ]
+ },
"c++1z": {
"label": "C++17",
- "condition": "features.c++14 && tests.c++1z",
+ "condition": "features.c++17",
"output": [ "publicFeature", "publicQtConfig" ]
},
"c++2a": {
"label": "C++2a",
"autoDetect": false,
- "condition": "features.c++1z && tests.c++2a",
+ "condition": "features.c++17 && tests.c++2a",
"output": [ "publicFeature", "publicQtConfig" ]
},
"c89": {
@@ -1486,7 +1491,7 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5
{
"message": "Using C++ standard",
"type": "firstAvailableFeature",
- "args": "c++2a c++1z c++14 c++11"
+ "args": "c++2a c++17 c++14 c++11"
},
{
"type": "feature",
diff --git a/examples/embedded/flickable/flickable.cpp b/examples/embedded/flickable/flickable.cpp
index fff4bac0e6..c57ec3d111 100644
--- a/examples/embedded/flickable/flickable.cpp
+++ b/examples/embedded/flickable/flickable.cpp
@@ -98,7 +98,7 @@ public:
QPoint delta;
QPoint speed;
FlickableTicker *ticker;
- QTime timeStamp;
+ QElapsedTimer timeStamp;
QWidget *target;
QList<QEvent*> ignoreList;
};
@@ -109,7 +109,7 @@ Flickable::Flickable()
d->state = FlickablePrivate::Steady;
d->threshold = 10;
d->ticker = new FlickableTicker(this);
- d->timeStamp = QTime::currentTime();
+ d->timeStamp.start();
d->target = 0;
}
@@ -208,7 +208,7 @@ void Flickable::handleMouseRelease(QMouseEvent *event)
event->accept();
delta = event->pos() - d->pressPos;
if (d->timeStamp.elapsed() > 100) {
- d->timeStamp = QTime::currentTime();
+ d->timeStamp.start();
d->speed = delta - d->delta;
d->delta = delta;
}
@@ -253,7 +253,7 @@ void Flickable::handleMouseMove(QMouseEvent *event)
delta = event->pos() - d->pressPos;
if (delta.x() > d->threshold || delta.x() < -d->threshold ||
delta.y() > d->threshold || delta.y() < -d->threshold) {
- d->timeStamp = QTime::currentTime();
+ d->timeStamp.start();
d->state = FlickablePrivate::ManualScroll;
d->delta = QPoint(0, 0);
d->pressPos = event->pos();
@@ -266,7 +266,7 @@ void Flickable::handleMouseMove(QMouseEvent *event)
delta = event->pos() - d->pressPos;
setScrollOffset(d->offset - delta);
if (d->timeStamp.elapsed() > 100) {
- d->timeStamp = QTime::currentTime();
+ d->timeStamp.start();
d->speed = delta - d->delta;
d->delta = delta;
}
diff --git a/examples/embedded/raycasting/raycasting.cpp b/examples/embedded/raycasting/raycasting.cpp
index 7213811213..c0a1e48fa6 100644
--- a/examples/embedded/raycasting/raycasting.cpp
+++ b/examples/embedded/raycasting/raycasting.cpp
@@ -92,7 +92,7 @@ public:
}
void updatePlayer() {
- int interval = qBound(20, watch.elapsed(), 250);
+ int interval = qBound(20ll, watch.elapsed(), 250ll);
watch.start();
angle += angleDelta * interval / 1000;
qreal step = moveDelta * interval / 1000;
@@ -106,10 +106,10 @@ public:
}
void showFps() {
- static QTime frameTick;
+ static QElapsedTimer frameTick;
static int totalFrame = 0;
if (!(totalFrame & 31)) {
- int elapsed = frameTick.elapsed();
+ const qint64 elapsed = frameTick.elapsed();
frameTick.start();
int fps = 32 * 1000 / (1 + elapsed);
setWindowTitle(QString("Raycasting (%1 FPS)").arg(fps));
@@ -355,7 +355,7 @@ protected:
}
private:
- QTime watch;
+ QElapsedTimer watch;
QBasicTimer ticker;
QImage buffer;
qreal angle;
diff --git a/examples/gui/openglwindow/main.cpp b/examples/gui/openglwindow/main.cpp
index 90c93f0d37..03a6ece06f 100644
--- a/examples/gui/openglwindow/main.cpp
+++ b/examples/gui/openglwindow/main.cpp
@@ -50,36 +50,30 @@
#include "openglwindow.h"
-#include <QtGui/QGuiApplication>
-#include <QtGui/QMatrix4x4>
-#include <QtGui/QOpenGLShaderProgram>
-#include <QtGui/QScreen>
+#include <QGuiApplication>
+#include <QMatrix4x4>
+#include <QOpenGLShaderProgram>
+#include <QScreen>
+#include <QtMath>
-#include <QtCore/qmath.h>
//! [1]
class TriangleWindow : public OpenGLWindow
{
public:
- TriangleWindow();
+ using OpenGLWindow::OpenGLWindow;
void initialize() override;
void render() override;
private:
- GLuint m_posAttr;
- GLuint m_colAttr;
- GLuint m_matrixUniform;
+ GLint m_posAttr = 0;
+ GLint m_colAttr = 0;
+ GLint m_matrixUniform = 0;
- QOpenGLShaderProgram *m_program;
- int m_frame;
+ QOpenGLShaderProgram *m_program = nullptr;
+ int m_frame = 0;
};
-
-TriangleWindow::TriangleWindow()
- : m_program(0)
- , m_frame(0)
-{
-}
//! [1]
//! [2]
@@ -128,8 +122,11 @@ void TriangleWindow::initialize()
m_program->addShaderFromSourceCode(QOpenGLShader::Fragment, fragmentShaderSource);
m_program->link();
m_posAttr = m_program->attributeLocation("posAttr");
+ Q_ASSERT(m_posAttr != -1);
m_colAttr = m_program->attributeLocation("colAttr");
+ Q_ASSERT(m_colAttr != -1);
m_matrixUniform = m_program->uniformLocation("matrix");
+ Q_ASSERT(m_matrixUniform != -1);
}
//! [4]
@@ -144,19 +141,19 @@ void TriangleWindow::render()
m_program->bind();
QMatrix4x4 matrix;
- matrix.perspective(60.0f, 4.0f/3.0f, 0.1f, 100.0f);
+ matrix.perspective(60.0f, 4.0f / 3.0f, 0.1f, 100.0f);
matrix.translate(0, 0, -2);
matrix.rotate(100.0f * m_frame / screen()->refreshRate(), 0, 1, 0);
m_program->setUniformValue(m_matrixUniform, matrix);
- GLfloat vertices[] = {
- 0.0f, 0.707f,
+ static const GLfloat vertices[] = {
+ 0.0f, 0.707f,
-0.5f, -0.5f,
- 0.5f, -0.5f
+ 0.5f, -0.5f
};
- GLfloat colors[] = {
+ static const GLfloat colors[] = {
1.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 1.0f
@@ -165,13 +162,13 @@ void TriangleWindow::render()
glVertexAttribPointer(m_posAttr, 2, GL_FLOAT, GL_FALSE, 0, vertices);
glVertexAttribPointer(m_colAttr, 3, GL_FLOAT, GL_FALSE, 0, colors);
- glEnableVertexAttribArray(0);
- glEnableVertexAttribArray(1);
+ glEnableVertexAttribArray(m_posAttr);
+ glEnableVertexAttribArray(m_colAttr);
glDrawArrays(GL_TRIANGLES, 0, 3);
- glDisableVertexAttribArray(1);
- glDisableVertexAttribArray(0);
+ glDisableVertexAttribArray(m_colAttr);
+ glDisableVertexAttribArray(m_posAttr);
m_program->release();
diff --git a/examples/gui/openglwindow/openglwindow.cpp b/examples/gui/openglwindow/openglwindow.cpp
index a0c85006bd..bac887dca0 100644
--- a/examples/gui/openglwindow/openglwindow.cpp
+++ b/examples/gui/openglwindow/openglwindow.cpp
@@ -50,18 +50,13 @@
#include "openglwindow.h"
-#include <QtCore/QCoreApplication>
-
-#include <QtGui/QOpenGLContext>
-#include <QtGui/QOpenGLPaintDevice>
-#include <QtGui/QPainter>
+#include <QOpenGLContext>
+#include <QOpenGLPaintDevice>
+#include <QPainter>
//! [1]
OpenGLWindow::OpenGLWindow(QWindow *parent)
: QWindow(parent)
- , m_animating(false)
- , m_context(0)
- , m_device(0)
{
setSurfaceType(QWindow::OpenGLSurface);
}
diff --git a/examples/gui/openglwindow/openglwindow.h b/examples/gui/openglwindow/openglwindow.h
index 6e6c1d7449..8db943ddde 100644
--- a/examples/gui/openglwindow/openglwindow.h
+++ b/examples/gui/openglwindow/openglwindow.h
@@ -48,8 +48,8 @@
**
****************************************************************************/
-#include <QtGui/QWindow>
-#include <QtGui/QOpenGLFunctions>
+#include <QWindow>
+#include <QOpenGLFunctions>
QT_BEGIN_NAMESPACE
class QPainter;
@@ -62,7 +62,7 @@ class OpenGLWindow : public QWindow, protected QOpenGLFunctions
{
Q_OBJECT
public:
- explicit OpenGLWindow(QWindow *parent = 0);
+ explicit OpenGLWindow(QWindow *parent = nullptr);
~OpenGLWindow();
virtual void render(QPainter *painter);
@@ -82,10 +82,10 @@ protected:
void exposeEvent(QExposeEvent *event) override;
private:
- bool m_animating;
+ bool m_animating = false;
- QOpenGLContext *m_context;
- QOpenGLPaintDevice *m_device;
+ QOpenGLContext *m_context = nullptr;
+ QOpenGLPaintDevice *m_device = nullptr;
};
//! [1]
diff --git a/examples/opengl/computegles31/glwindow.cpp b/examples/opengl/computegles31/glwindow.cpp
index 7a14cba66d..2194137cfd 100644
--- a/examples/opengl/computegles31/glwindow.cpp
+++ b/examples/opengl/computegles31/glwindow.cpp
@@ -73,15 +73,6 @@
#endif
GLWindow::GLWindow()
- : m_texImageInput(0),
- m_texImageTmp(0),
- m_texImageProcessed(0),
- m_shaderDisplay(0),
- m_shaderComputeV(0),
- m_shaderComputeH(0),
- m_blurRadius(0.0f),
- m_animate(true),
- m_vao(0)
{
const float animationStart = 0.0;
const float animationEnd = 10.0;
@@ -324,27 +315,18 @@ void GLWindow::initializeGL()
<< ((ctx->format().renderableType() == QSurfaceFormat::OpenGLES) ? (" GLES") : (" GL"))
<< " context";
- if (m_texImageInput) {
- delete m_texImageInput;
- m_texImageInput = 0;
- }
QImage img(":/Qt-logo-medium.png");
Q_ASSERT(!img.isNull());
+ delete m_texImageInput;
m_texImageInput = new QOpenGLTexture(img.convertToFormat(QImage::Format_RGBA8888).mirrored());
- if (m_texImageTmp) {
- delete m_texImageTmp;
- m_texImageTmp = 0;
- }
+ delete m_texImageTmp;
m_texImageTmp = new QOpenGLTexture(QOpenGLTexture::Target2D);
m_texImageTmp->setFormat(m_texImageInput->format());
m_texImageTmp->setSize(m_texImageInput->width(),m_texImageInput->height());
m_texImageTmp->allocateStorage(QOpenGLTexture::RGBA,QOpenGLTexture::UInt8); // WTF?
- if (m_texImageProcessed) {
- delete m_texImageProcessed;
- m_texImageProcessed = 0;
- }
+ delete m_texImageProcessed;
m_texImageProcessed = new QOpenGLTexture(QOpenGLTexture::Target2D);
m_texImageProcessed->setFormat(m_texImageInput->format());
m_texImageProcessed->setSize(m_texImageInput->width(),m_texImageInput->height());
@@ -354,10 +336,7 @@ void GLWindow::initializeGL()
m_texImageProcessed->setMinificationFilter(QOpenGLTexture::Linear);
m_texImageProcessed->setWrapMode(QOpenGLTexture::ClampToEdge);
- if (m_shaderDisplay) {
- delete m_shaderDisplay;
- m_shaderDisplay = 0;
- }
+ delete m_shaderDisplay;
m_shaderDisplay = new QOpenGLShaderProgram;
// Prepend the correct version directive to the sources. The rest is the
// same, thanks to the common GLSL syntax.
@@ -365,18 +344,12 @@ void GLWindow::initializeGL()
m_shaderDisplay->addShaderFromSourceCode(QOpenGLShader::Fragment, versionedShaderCode(fsDisplaySource));
m_shaderDisplay->link();
- if (m_shaderComputeV) {
- delete m_shaderComputeV;
- m_shaderComputeV = 0;
- }
+ delete m_shaderComputeV;
m_shaderComputeV = new QOpenGLShaderProgram;
m_shaderComputeV->addShaderFromSourceCode(QOpenGLShader::Compute, versionedShaderCode(csComputeSourceV));
m_shaderComputeV->link();
- if (m_shaderComputeH) {
- delete m_shaderComputeH;
- m_shaderComputeH = 0;
- }
+ delete m_shaderComputeH;
m_shaderComputeH = new QOpenGLShaderProgram;
m_shaderComputeH->addShaderFromSourceCode(QOpenGLShader::Compute, versionedShaderCode(csComputeSourceH));
m_shaderComputeH->link();
diff --git a/examples/opengl/computegles31/glwindow.h b/examples/opengl/computegles31/glwindow.h
index f243858a45..5375fbb488 100644
--- a/examples/opengl/computegles31/glwindow.h
+++ b/examples/opengl/computegles31/glwindow.h
@@ -90,21 +90,21 @@ protected:
void setAnimating(bool animate);
private:
- QPropertyAnimation *m_animationForward;
- QPropertyAnimation *m_animationBackward;
+ QPropertyAnimation *m_animationForward = nullptr;
+ QPropertyAnimation *m_animationBackward = nullptr;
QSequentialAnimationGroup *m_animationGroup;
- QOpenGLTexture *m_texImageInput;
- QOpenGLTexture *m_texImageTmp;
- QOpenGLTexture *m_texImageProcessed;
- QOpenGLShaderProgram *m_shaderDisplay;
- QOpenGLShaderProgram *m_shaderComputeV;
- QOpenGLShaderProgram *m_shaderComputeH;
+ QOpenGLTexture *m_texImageInput = nullptr;
+ QOpenGLTexture *m_texImageTmp = nullptr;
+ QOpenGLTexture *m_texImageProcessed = nullptr;
+ QOpenGLShaderProgram *m_shaderDisplay = nullptr;
+ QOpenGLShaderProgram *m_shaderComputeV = nullptr;
+ QOpenGLShaderProgram *m_shaderComputeH = nullptr;
QMatrix4x4 m_proj;
QSizeF m_quadSize;
- int m_blurRadius;
- bool m_animate;
- QOpenGLVertexArrayObject *m_vao;
+ int m_blurRadius = 0;
+ bool m_animate = true;
+ QOpenGLVertexArrayObject *m_vao = nullptr;
};
#endif
diff --git a/examples/opengl/contextinfo/renderwindow.cpp b/examples/opengl/contextinfo/renderwindow.cpp
index 21b7434be6..ea9a7a24cb 100644
--- a/examples/opengl/contextinfo/renderwindow.cpp
+++ b/examples/opengl/contextinfo/renderwindow.cpp
@@ -56,7 +56,7 @@
#include <QOpenGLFunctions>
RenderWindow::RenderWindow(const QSurfaceFormat &format)
- : m_context(0),
+ : m_context(nullptr),
m_initialized(false),
m_forceGLSL110(false),
m_angle(0.0f)
@@ -67,7 +67,7 @@ RenderWindow::RenderWindow(const QSurfaceFormat &format)
m_context->setFormat(requestedFormat());
if (!m_context->create()) {
delete m_context;
- m_context = 0;
+ m_context = nullptr;
}
}
diff --git a/examples/opengl/contextinfo/widget.h b/examples/opengl/contextinfo/widget.h
index 72abe0e647..85d181a229 100644
--- a/examples/opengl/contextinfo/widget.h
+++ b/examples/opengl/contextinfo/widget.h
@@ -64,7 +64,7 @@ class Widget : public QWidget
Q_OBJECT
public:
- explicit Widget(QWidget *parent = 0);
+ explicit Widget(QWidget *parent = nullptr);
private slots:
void start();
diff --git a/examples/opengl/cube/geometryengine.cpp b/examples/opengl/cube/geometryengine.cpp
index 1f9e16a935..24e014201e 100644
--- a/examples/opengl/cube/geometryengine.cpp
+++ b/examples/opengl/cube/geometryengine.cpp
@@ -174,6 +174,6 @@ void GeometryEngine::drawCubeGeometry(QOpenGLShaderProgram *program)
program->setAttributeBuffer(texcoordLocation, GL_FLOAT, offset, 2, sizeof(VertexData));
// Draw cube geometry using indices from VBO 1
- glDrawElements(GL_TRIANGLE_STRIP, 34, GL_UNSIGNED_SHORT, 0);
+ glDrawElements(GL_TRIANGLE_STRIP, 34, GL_UNSIGNED_SHORT, nullptr);
}
//! [2]
diff --git a/examples/opengl/cube/mainwidget.cpp b/examples/opengl/cube/mainwidget.cpp
index 292a4245fa..558ecd1299 100644
--- a/examples/opengl/cube/mainwidget.cpp
+++ b/examples/opengl/cube/mainwidget.cpp
@@ -52,15 +52,7 @@
#include <QMouseEvent>
-#include <math.h>
-
-MainWidget::MainWidget(QWidget *parent) :
- QOpenGLWidget(parent),
- geometries(0),
- texture(0),
- angularSpeed(0)
-{
-}
+#include <cmath>
MainWidget::~MainWidget()
{
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h
index cd2f8098ad..b6a03d454a 100644
--- a/examples/opengl/cube/mainwidget.h
+++ b/examples/opengl/cube/mainwidget.h
@@ -69,7 +69,7 @@ class MainWidget : public QOpenGLWidget, protected QOpenGLFunctions
Q_OBJECT
public:
- explicit MainWidget(QWidget *parent = 0);
+ using QOpenGLWidget::QOpenGLWidget;
~MainWidget();
protected:
@@ -87,15 +87,15 @@ protected:
private:
QBasicTimer timer;
QOpenGLShaderProgram program;
- GeometryEngine *geometries;
+ GeometryEngine *geometries = nullptr;
- QOpenGLTexture *texture;
+ QOpenGLTexture *texture = nullptr;
QMatrix4x4 projection;
QVector2D mousePressPosition;
QVector3D rotationAxis;
- qreal angularSpeed;
+ qreal angularSpeed = 0;
QQuaternion rotation;
};
diff --git a/examples/opengl/hellogl2/glwidget.cpp b/examples/opengl/hellogl2/glwidget.cpp
index 318adb5043..543e70f8ac 100644
--- a/examples/opengl/hellogl2/glwidget.cpp
+++ b/examples/opengl/hellogl2/glwidget.cpp
@@ -57,11 +57,7 @@
bool GLWidget::m_transparent = false;
GLWidget::GLWidget(QWidget *parent)
- : QOpenGLWidget(parent),
- m_xRot(0),
- m_yRot(0),
- m_zRot(0),
- m_program(0)
+ : QOpenGLWidget(parent)
{
m_core = QSurfaceFormat::defaultFormat().profile() == QSurfaceFormat::CoreProfile;
// --transparent causes the clear color to be transparent. Therefore, on systems that
@@ -133,7 +129,7 @@ void GLWidget::cleanup()
makeCurrent();
m_logoVbo.destroy();
delete m_program;
- m_program = 0;
+ m_program = nullptr;
doneCurrent();
}
@@ -250,8 +246,10 @@ void GLWidget::setupVertexAttribs()
QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
f->glEnableVertexAttribArray(0);
f->glEnableVertexAttribArray(1);
- f->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), 0);
- f->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), reinterpret_cast<void *>(3 * sizeof(GLfloat)));
+ f->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat),
+ nullptr);
+ f->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat),
+ reinterpret_cast<void *>(3 * sizeof(GLfloat)));
m_logoVbo.release();
}
diff --git a/examples/opengl/hellogl2/glwidget.h b/examples/opengl/hellogl2/glwidget.h
index 21dd200dc7..f8526fb7ae 100644
--- a/examples/opengl/hellogl2/glwidget.h
+++ b/examples/opengl/hellogl2/glwidget.h
@@ -65,7 +65,7 @@ class GLWidget : public QOpenGLWidget, protected QOpenGLFunctions
Q_OBJECT
public:
- GLWidget(QWidget *parent = 0);
+ GLWidget(QWidget *parent = nullptr);
~GLWidget();
static bool isTransparent() { return m_transparent; }
@@ -96,18 +96,18 @@ private:
void setupVertexAttribs();
bool m_core;
- int m_xRot;
- int m_yRot;
- int m_zRot;
+ int m_xRot = 0;
+ int m_yRot = 0;
+ int m_zRot = 0;
QPoint m_lastPos;
Logo m_logo;
QOpenGLVertexArrayObject m_vao;
QOpenGLBuffer m_logoVbo;
- QOpenGLShaderProgram *m_program;
- int m_projMatrixLoc;
- int m_mvMatrixLoc;
- int m_normalMatrixLoc;
- int m_lightPosLoc;
+ QOpenGLShaderProgram *m_program = nullptr;
+ int m_projMatrixLoc = 0;
+ int m_mvMatrixLoc = 0;
+ int m_normalMatrixLoc = 0;
+ int m_lightPosLoc = 0;
QMatrix4x4 m_proj;
QMatrix4x4 m_camera;
QMatrix4x4 m_world;
diff --git a/examples/opengl/hellogl2/logo.cpp b/examples/opengl/hellogl2/logo.cpp
index a1ec8eaebe..6fcece16d4 100644
--- a/examples/opengl/hellogl2/logo.cpp
+++ b/examples/opengl/hellogl2/logo.cpp
@@ -52,7 +52,6 @@
#include <qmath.h>
Logo::Logo()
- : m_count(0)
{
m_data.resize(2500 * 6);
diff --git a/examples/opengl/hellogl2/logo.h b/examples/opengl/hellogl2/logo.h
index 9e04a57e86..2f3dc7e649 100644
--- a/examples/opengl/hellogl2/logo.h
+++ b/examples/opengl/hellogl2/logo.h
@@ -69,7 +69,7 @@ private:
void add(const QVector3D &v, const QVector3D &n);
QVector<GLfloat> m_data;
- int m_count;
+ int m_count = 0;
};
#endif // LOGO_H
diff --git a/examples/opengl/hellogl2/mainwindow.cpp b/examples/opengl/hellogl2/mainwindow.cpp
index 6bfdee7785..aa20cd678c 100644
--- a/examples/opengl/hellogl2/mainwindow.cpp
+++ b/examples/opengl/hellogl2/mainwindow.cpp
@@ -72,5 +72,6 @@ void MainWindow::onAddNew()
if (!centralWidget())
setCentralWidget(new Window(this));
else
- QMessageBox::information(0, tr("Cannot add new window"), tr("Already occupied. Undock first."));
+ QMessageBox::information(nullptr, tr("Cannot add new window"),
+ tr("Already occupied. Undock first."));
}
diff --git a/examples/opengl/hellogl2/window.cpp b/examples/opengl/hellogl2/window.cpp
index c3cd10cbfd..5534f2edea 100644
--- a/examples/opengl/hellogl2/window.cpp
+++ b/examples/opengl/hellogl2/window.cpp
@@ -121,7 +121,7 @@ void Window::keyPressEvent(QKeyEvent *e)
void Window::dockUndock()
{
if (parent()) {
- setParent(0);
+ setParent(nullptr);
setAttribute(Qt::WA_DeleteOnClose);
move(QApplication::desktop()->width() / 2 - width() / 2,
QApplication::desktop()->height() / 2 - height() / 2);
@@ -134,10 +134,12 @@ void Window::dockUndock()
dockBtn->setText(tr("Undock"));
mainWindow->setCentralWidget(this);
} else {
- QMessageBox::information(0, tr("Cannot dock"), tr("Main window already closed"));
+ QMessageBox::information(nullptr, tr("Cannot dock"),
+ tr("Main window already closed"));
}
} else {
- QMessageBox::information(0, tr("Cannot dock"), tr("Main window already occupied"));
+ QMessageBox::information(nullptr, tr("Cannot dock"),
+ tr("Main window already occupied"));
}
}
}
diff --git a/examples/opengl/hellogles3/glwindow.cpp b/examples/opengl/hellogles3/glwindow.cpp
index 9458b74810..c644faa9a6 100644
--- a/examples/opengl/hellogles3/glwindow.cpp
+++ b/examples/opengl/hellogles3/glwindow.cpp
@@ -57,19 +57,10 @@
#include <QOpenGLVertexArrayObject>
#include <QOpenGLExtraFunctions>
#include <QPropertyAnimation>
-#include <QPauseAnimation>
#include <QSequentialAnimationGroup>
#include <QTimer>
GLWindow::GLWindow()
- : m_texture(0),
- m_program(0),
- m_vbo(0),
- m_vao(0),
- m_target(0, 0, -1),
- m_uniformsDirty(true),
- m_r(0),
- m_r2(0)
{
m_world.setToIdentity();
m_world.translate(0, 0, -1);
@@ -197,18 +188,12 @@ void GLWindow::initializeGL()
{
QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
- if (m_texture) {
- delete m_texture;
- m_texture = 0;
- }
QImage img(":/qtlogo.png");
Q_ASSERT(!img.isNull());
+ delete m_texture;
m_texture = new QOpenGLTexture(img.scaled(32, 36).mirrored());
- if (m_program) {
- delete m_program;
- m_program = 0;
- }
+ delete m_program;
m_program = new QOpenGLShaderProgram;
// Prepend the correct version directive to the sources. The rest is the
// same, thanks to the common GLSL syntax.
@@ -223,26 +208,21 @@ void GLWindow::initializeGL()
m_lightPosLoc = m_program->uniformLocation("lightPos");
// Create a VAO. Not strictly required for ES 3, but it is for plain OpenGL.
- if (m_vao) {
- delete m_vao;
- m_vao = 0;
- }
+ delete m_vao;
m_vao = new QOpenGLVertexArrayObject;
if (m_vao->create())
m_vao->bind();
- if (m_vbo) {
- delete m_vbo;
- m_vbo = 0;
- }
m_program->bind();
+ delete m_vbo;
m_vbo = new QOpenGLBuffer;
m_vbo->create();
m_vbo->bind();
m_vbo->allocate(m_logo.constData(), m_logo.count() * sizeof(GLfloat));
f->glEnableVertexAttribArray(0);
f->glEnableVertexAttribArray(1);
- f->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), 0);
+ f->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat),
+ nullptr);
f->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat),
reinterpret_cast<void *>(3 * sizeof(GLfloat)));
m_vbo->release();
diff --git a/examples/opengl/hellogles3/glwindow.h b/examples/opengl/hellogles3/glwindow.h
index fba997bee4..dfa0680714 100644
--- a/examples/opengl/hellogles3/glwindow.h
+++ b/examples/opengl/hellogles3/glwindow.h
@@ -90,23 +90,23 @@ public:
private slots:
void startSecondStage();
private:
- QOpenGLTexture *m_texture;
- QOpenGLShaderProgram *m_program;
- QOpenGLBuffer *m_vbo;
- QOpenGLVertexArrayObject *m_vao;
+ QOpenGLTexture *m_texture = nullptr;
+ QOpenGLShaderProgram *m_program = nullptr;
+ QOpenGLBuffer *m_vbo = nullptr;
+ QOpenGLVertexArrayObject *m_vao = nullptr;
Logo m_logo;
- int m_projMatrixLoc;
- int m_camMatrixLoc;
- int m_worldMatrixLoc;
- int m_myMatrixLoc;
- int m_lightPosLoc;
+ int m_projMatrixLoc = 0;
+ int m_camMatrixLoc = 0;
+ int m_worldMatrixLoc = 0;
+ int m_myMatrixLoc = 0;
+ int m_lightPosLoc = 0;
QMatrix4x4 m_proj;
QMatrix4x4 m_world;
QVector3D m_eye;
- QVector3D m_target;
- bool m_uniformsDirty;
- float m_r;
- float m_r2;
+ QVector3D m_target = {0, 0, -1};
+ bool m_uniformsDirty = true;
+ float m_r = 0;
+ float m_r2 = 0;
};
#endif
diff --git a/examples/opengl/qopenglwidget/bubble.cpp b/examples/opengl/qopenglwidget/bubble.cpp
index dbaf460f6f..7e69aac3e7 100644
--- a/examples/opengl/qopenglwidget/bubble.cpp
+++ b/examples/opengl/qopenglwidget/bubble.cpp
@@ -57,15 +57,13 @@ Bubble::Bubble(const QPointF &position, qreal radius, const QPointF &velocity)
{
innerColor = randomColor();
outerColor = randomColor();
- cache = 0;
updateBrush();
}
//! [0]
void Bubble::updateCache()
{
- if (cache)
- delete cache;
+ delete cache;
cache = new QImage(qRound(radius * 2 + 2), qRound(radius * 2 + 2), QImage::Format_ARGB32_Premultiplied);
cache->fill(0x00000000);
QPainter p(cache);
@@ -80,8 +78,7 @@ void Bubble::updateCache()
Bubble::~Bubble()
{
- if (cache)
- delete cache;
+ delete cache;
}
void Bubble::updateBrush()
diff --git a/examples/opengl/qopenglwidget/bubble.h b/examples/opengl/qopenglwidget/bubble.h
index 7170803b40..833ea02288 100644
--- a/examples/opengl/qopenglwidget/bubble.h
+++ b/examples/opengl/qopenglwidget/bubble.h
@@ -80,7 +80,7 @@ private:
qreal radius;
QColor innerColor;
QColor outerColor;
- QImage *cache;
+ QImage *cache = nullptr;
};
#endif
diff --git a/examples/opengl/qopenglwidget/glwidget.cpp b/examples/opengl/qopenglwidget/glwidget.cpp
index 5057291f12..89c8469662 100644
--- a/examples/opengl/qopenglwidget/glwidget.cpp
+++ b/examples/opengl/qopenglwidget/glwidget.cpp
@@ -68,14 +68,6 @@ const int bubbleNum = 8;
GLWidget::GLWidget(MainWindow *mw, bool button, const QColor &background)
: m_mainWindow(mw),
- m_showBubbles(true),
- m_qtLogo(true),
- m_frames(0),
- m_program1(0),
- m_program2(0),
- m_texture(0),
- m_transparent(false),
- m_btn(0),
m_hasButton(button),
m_background(background)
{
diff --git a/examples/opengl/qopenglwidget/glwidget.h b/examples/opengl/qopenglwidget/glwidget.h
index 0ad2581cb8..99288261c0 100644
--- a/examples/opengl/qopenglwidget/glwidget.h
+++ b/examples/opengl/qopenglwidget/glwidget.h
@@ -98,34 +98,34 @@ private:
void extrude(qreal x1, qreal y1, qreal x2, qreal y2);
MainWindow *m_mainWindow;
- qreal m_fAngle;
- qreal m_fScale;
- bool m_showBubbles;
+ qreal m_fAngle = 0;
+ qreal m_fScale = 1;
+ bool m_showBubbles = true;
QVector<QVector3D> m_vertices;
QVector<QVector3D> m_normals;
- bool m_qtLogo;
- QList<Bubble *> m_bubbles;
- int m_frames;
+ bool m_qtLogo = true;
+ QVector<Bubble *> m_bubbles;
+ int m_frames = 0;
QElapsedTimer m_time;
- QOpenGLShader *m_vshader1;
- QOpenGLShader *m_fshader1;
- QOpenGLShader *m_vshader2;
- QOpenGLShader *m_fshader2;
- QOpenGLShaderProgram *m_program1;
- QOpenGLShaderProgram *m_program2;
- QOpenGLTexture *m_texture;
+ QOpenGLShader *m_vshader1 = nullptr;
+ QOpenGLShader *m_fshader1 = nullptr;
+ QOpenGLShader *m_vshader2 = nullptr;
+ QOpenGLShader *m_fshader2 = nullptr;
+ QOpenGLShaderProgram *m_program1 = nullptr;
+ QOpenGLShaderProgram *m_program2 = nullptr;
+ QOpenGLTexture *m_texture = nullptr;
QOpenGLBuffer m_vbo1;
QOpenGLBuffer m_vbo2;
- int m_vertexAttr1;
- int m_normalAttr1;
- int m_matrixUniform1;
- int m_vertexAttr2;
- int m_normalAttr2;
- int m_texCoordAttr2;
- int m_matrixUniform2;
- int m_textureUniform2;
- bool m_transparent;
- QPushButton *m_btn;
+ int m_vertexAttr1 = 0;
+ int m_normalAttr1 = 0;
+ int m_matrixUniform1 = 0;
+ int m_vertexAttr2 = 0;
+ int m_normalAttr2 = 0;
+ int m_texCoordAttr2 = 0;
+ int m_matrixUniform2 = 0;
+ int m_textureUniform2 = 0;
+ bool m_transparent = false;
+ QPushButton *m_btn = nullptr;
bool m_hasButton;
QColor m_background;
};
diff --git a/examples/opengl/textures/glwidget.cpp b/examples/opengl/textures/glwidget.cpp
index 1644233614..307190f308 100644
--- a/examples/opengl/textures/glwidget.cpp
+++ b/examples/opengl/textures/glwidget.cpp
@@ -53,17 +53,6 @@
#include <QOpenGLTexture>
#include <QMouseEvent>
-GLWidget::GLWidget(QWidget *parent)
- : QOpenGLWidget(parent),
- clearColor(Qt::black),
- xRot(0),
- yRot(0),
- zRot(0),
- program(0)
-{
- memset(textures, 0, sizeof(textures));
-}
-
GLWidget::~GLWidget()
{
makeCurrent();
diff --git a/examples/opengl/textures/glwidget.h b/examples/opengl/textures/glwidget.h
index 0db2695c6a..585d44dbfe 100644
--- a/examples/opengl/textures/glwidget.h
+++ b/examples/opengl/textures/glwidget.h
@@ -63,7 +63,7 @@ class GLWidget : public QOpenGLWidget, protected QOpenGLFunctions
Q_OBJECT
public:
- explicit GLWidget(QWidget *parent = 0);
+ using QOpenGLWidget::QOpenGLWidget;
~GLWidget();
QSize minimumSizeHint() const override;
@@ -85,13 +85,13 @@ protected:
private:
void makeObject();
- QColor clearColor;
+ QColor clearColor = Qt::black;
QPoint lastPos;
- int xRot;
- int yRot;
- int zRot;
- QOpenGLTexture *textures[6];
- QOpenGLShaderProgram *program;
+ int xRot = 0;
+ int yRot = 0;
+ int zRot = 0;
+ QOpenGLTexture *textures[6] = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
+ QOpenGLShaderProgram *program = nullptr;
QOpenGLBuffer vbo;
};
diff --git a/examples/opengl/threadedqopenglwidget/glwidget.cpp b/examples/opengl/threadedqopenglwidget/glwidget.cpp
index cc528a734a..2101575fd4 100644
--- a/examples/opengl/threadedqopenglwidget/glwidget.cpp
+++ b/examples/opengl/threadedqopenglwidget/glwidget.cpp
@@ -115,12 +115,7 @@ void GLWidget::grabContext()
m_renderer->unlockRenderer();
}
-Renderer::Renderer(GLWidget *w)
- : m_inited(false),
- m_glwidget(w),
- m_exiting(false)
-{
-}
+Renderer::Renderer(GLWidget *w) : m_glwidget(w) {}
void Renderer::paintQtLogo()
{
diff --git a/examples/opengl/threadedqopenglwidget/glwidget.h b/examples/opengl/threadedqopenglwidget/glwidget.h
index c33f7e51a7..8dc84dd0b1 100644
--- a/examples/opengl/threadedqopenglwidget/glwidget.h
+++ b/examples/opengl/threadedqopenglwidget/glwidget.h
@@ -88,29 +88,29 @@ private:
void quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4);
void extrude(qreal x1, qreal y1, qreal x2, qreal y2);
- bool m_inited;
- qreal m_fAngle;
- qreal m_fScale;
+ bool m_inited = false;
+ qreal m_fAngle = 0;
+ qreal m_fScale = 1;
QVector<QVector3D> vertices;
QVector<QVector3D> normals;
QOpenGLShaderProgram program;
QOpenGLBuffer vbo;
- int vertexAttr;
- int normalAttr;
- int matrixUniform;
- GLWidget *m_glwidget;
+ int vertexAttr = 0;
+ int normalAttr = 0;
+ int matrixUniform = 0;
+ GLWidget *m_glwidget = nullptr;
QMutex m_renderMutex;
QElapsedTimer m_elapsed;
QMutex m_grabMutex;
QWaitCondition m_grabCond;
- bool m_exiting;
+ bool m_exiting = false;
};
class GLWidget : public QOpenGLWidget
{
Q_OBJECT
public:
- explicit GLWidget(QWidget *parent = 0);
+ explicit GLWidget(QWidget *parent = nullptr);
~GLWidget();
protected:
diff --git a/examples/widgets/doc/dropsite.qdoc b/examples/widgets/doc/dropsite.qdoc
index af8766a308..d8d09612f6 100644
--- a/examples/widgets/doc/dropsite.qdoc
+++ b/examples/widgets/doc/dropsite.qdoc
@@ -176,16 +176,16 @@
\snippet draganddrop/dropsite/dropsitewindow.cpp constructor part3
- Two QPushButton objects, \c clearButton and \c quitButton, are instantiated
- and added to \c buttonBox - a QDialogButtonBox object. We use
- QDialogButtonBox here to ensure that the push buttons are presented in a
+ Three QPushButton objects, \c clearButton, \c copyButton, and \c quitButton,
+ are instantiated and added to \c buttonBox - a QDialogButtonBox object. We
+ use QDialogButtonBox here to ensure that the push buttons are presented in a
layout that conforms to the platform's style.
\snippet draganddrop/dropsite/dropsitewindow.cpp constructor part4
- The \l{QPushButton::clicked()}{clicked()} signals for \c quitButton and
- \c clearButton are connected to \l{QWidget::close()}{close()} and
- \c clear(), respectively.
+ The \l{QPushButton::clicked()}{clicked()} signals for \c copyButton,
+ \c clearButton, and \c quitButton are connected to \c copy(),
+ \c clear() and \l{QWidget::close()}{close()}, respectively.
For the layout, we use a QVBoxLayout, \c mainLayout, to arrange our widgets
vertically. We also set the window title to "Drop Site" and the minimum
diff --git a/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp b/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp
index 2dae83bb22..a937e24a4c 100644
--- a/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp
+++ b/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp
@@ -82,14 +82,21 @@ DropSiteWindow::DropSiteWindow()
//! [constructor part4]
clearButton = new QPushButton(tr("Clear"));
+ copyButton = new QPushButton(tr("Copy"));
quitButton = new QPushButton(tr("Quit"));
buttonBox = new QDialogButtonBox;
buttonBox->addButton(clearButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(copyButton, QDialogButtonBox::ActionRole);
+#if !QT_CONFIG(clipboard)
+ copyButton->setVisible(false);
+#endif
+
buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
connect(quitButton, &QAbstractButton::clicked, this, &QWidget::close);
connect(clearButton, &QAbstractButton::clicked, dropArea, &DropArea::clear);
+ connect(copyButton, &QAbstractButton::clicked, this, &DropSiteWindow::copy);
//! [constructor part4]
//! [constructor part5]
@@ -108,6 +115,7 @@ DropSiteWindow::DropSiteWindow()
void DropSiteWindow::updateFormatsTable(const QMimeData *mimeData)
{
formatsTable->setRowCount(0);
+ copyButton->setEnabled(false);
if (!mimeData)
return;
//! [updateFormatsTable() part1]
@@ -145,5 +153,18 @@ void DropSiteWindow::updateFormatsTable(const QMimeData *mimeData)
}
formatsTable->resizeColumnToContents(0);
+#if QT_CONFIG(clipboard)
+ copyButton->setEnabled(formatsTable->rowCount() > 0);
+#endif
}
//! [updateFormatsTable() part4]
+
+void DropSiteWindow::copy()
+{
+#if QT_CONFIG(clipboard)
+ QString text;
+ for (int row = 0, rowCount = formatsTable->rowCount(); row < rowCount; ++row)
+ text += formatsTable->item(row, 0)->text() + ": " + formatsTable->item(row, 1)->text() + '\n';
+ QGuiApplication::clipboard()->setText(text);
+#endif
+}
diff --git a/examples/widgets/draganddrop/dropsite/dropsitewindow.h b/examples/widgets/draganddrop/dropsite/dropsitewindow.h
index d80476f369..a40b481637 100644
--- a/examples/widgets/draganddrop/dropsite/dropsitewindow.h
+++ b/examples/widgets/draganddrop/dropsite/dropsitewindow.h
@@ -72,6 +72,7 @@ public:
public slots:
void updateFormatsTable(const QMimeData *mimeData);
+ void copy();
private:
DropArea *dropArea;
@@ -79,6 +80,7 @@ private:
QTableWidget *formatsTable;
QPushButton *clearButton;
+ QPushButton *copyButton;
QPushButton *quitButton;
QDialogButtonBox *buttonBox;
};
diff --git a/mkspecs/features/metatypes.prf b/mkspecs/features/metatypes.prf
new file mode 100644
index 0000000000..a0a548eeb2
--- /dev/null
+++ b/mkspecs/features/metatypes.prf
@@ -0,0 +1,34 @@
+qtPrepareTool(MOC_COLLECT_JSON, moc)
+
+QMAKE_MOC_OPTIONS += --output-json
+
+moc_json_header.input = HEADERS
+moc_json_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}.json
+moc_json_header.CONFIG = no_link moc_verify
+moc_json_header.depends = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
+moc_json_header.commands = $$escape_expand(\\n) # force creation of rule
+moc_json_header.variable_out = MOC_JSON_FILES
+
+moc_json_source.input = SOURCES
+moc_json_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}.json
+moc_json_source.CONFIG = no_link moc_verify
+moc_json_source.depends = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}
+moc_json_source.commands = $$escape_expand(\\n) # force creation of rule
+moc_json_source.variable_out = MOC_JSON_FILES
+
+MOC_COLLECT_JSON_OUTPUT = $$lower($$basename(TARGET))_metatypes.json
+
+moc_collect_json.CONFIG += no_link combine
+moc_collect_json.commands = $$MOC_COLLECT_JSON --collect-json -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+moc_collect_json.input = MOC_JSON_FILES
+moc_collect_json.output = $$MOC_COLLECT_JSON_OUTPUT
+moc_collect_json.name = Collect moc JSON output into central file
+
+install_metatypes {
+ do_install.path = $$[QT_INSTALL_LIBS]/metatypes
+ do_install.files = $$OUT_PWD/$$MOC_COLLECT_JSON_OUTPUT
+ prefix_build: INSTALLS += do_install
+ else: COPIES += do_install
+}
+
+QMAKE_EXTRA_COMPILERS += moc_collect_json moc_json_header moc_json_source
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/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 43a3fb1db0..705cae6cf4 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -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); }
@@ -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
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index e7d3d9c835..86c7414704 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;
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/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp
index c50e087c10..444980e9c0 100644
--- a/src/corelib/text/qbytearray.cpp
+++ b/src/corelib/text/qbytearray.cpp
@@ -1775,12 +1775,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 +1790,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;
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/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/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/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/qtimezone.cpp b/src/corelib/time/qtimezone.cpp
index ef323de14a..410a16e3c5 100644
--- a/src/corelib/time/qtimezone.cpp
+++ b/src/corelib/time/qtimezone.cpp
@@ -325,20 +325,33 @@ QTimeZone::QTimeZone() noexcept
/*!
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 569b343187..72a0e3c24e 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/
**
@@ -761,6 +762,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)
{
@@ -874,22 +908,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;
}
@@ -904,13 +941,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_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/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp
index 234a44f6b6..36a221f728 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;
}
diff --git a/src/gui/configure.json b/src/gui/configure.json
index c2793bf236..39b8d0c2b8 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"
}
},
@@ -573,18 +572,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"
]
},
@@ -691,21 +694,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"
@@ -769,7 +761,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": [
@@ -1056,6 +1048,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",
@@ -1068,7 +1065,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;",
@@ -1082,10 +1080,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",
@@ -1514,16 +1515,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": {
@@ -1562,12 +1554,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",
@@ -1579,10 +1565,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": {
@@ -1590,6 +1578,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",
@@ -1831,7 +1824,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."
}
],
@@ -1953,7 +1946,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"
]
}
]
@@ -1986,7 +1980,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/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 13de8af8b5..b4c4231910 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1040,7 +1040,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
*/
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/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index 7adf3db1b8..80de561297 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -700,6 +700,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/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp
index 36a6557e04..d07777d63a 100644
--- a/src/gui/rhi/qrhivulkan.cpp
+++ b/src/gui/rhi/qrhivulkan.cpp
@@ -1705,6 +1705,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) {
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..daf37e3dc8 100644
--- a/src/gui/vulkan/qvulkaninstance.cpp
+++ b/src/gui/vulkan/qvulkaninstance.cpp
@@ -775,6 +775,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..790bef9e14 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
@@ -676,8 +698,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 +1568,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.
@@ -1950,6 +2018,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 +2283,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..777be237a8 100644
--- a/src/gui/vulkan/qvulkanwindow_p.h
+++ b/src/gui/vulkan/qvulkanwindow_p.h
@@ -102,6 +102,7 @@ public:
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/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 76b95b5823..98c82c81ae 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -1240,7 +1240,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);
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index 8ac81d1780..44c1d3e422 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -777,7 +777,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()) {
@@ -1280,15 +1280,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
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 118fb6b1fb..7899bce32b 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.)
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index e09ff8aaae..72a6555d91 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,
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index 7e92d3a526..a2e694ec92 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,72 @@ void QSslConfiguration::setCaCertificates(const QList<QSslCertificate> &certific
}
/*!
+ 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,
+ QRegExp::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 +733,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()
{
diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h
index c25c2686de..247f3aecc9 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,
+ QRegExp::PatternSyntax syntax = QRegExp::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/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index e302aa1761..690251727d 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
@@ -1384,6 +1395,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
@@ -1411,6 +1426,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 +1446,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 +1512,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 +1525,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::addDefaultCaCertificate()
*/
bool QSslSocket::addDefaultCaCertificates(const QString &path, QSsl::EncodingFormat encoding,
QRegExp::PatternSyntax syntax)
@@ -1508,11 +1535,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 QSslConfiguration::caCertificates(), addCaCertificates()
+ \sa QSslConfiguration::caCertificates(), QSslConfiguration::addCaCertificates()
*/
void QSslSocket::addDefaultCaCertificate(const QSslCertificate &certificate)
{
@@ -1520,11 +1551,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)
{
diff --git a/src/network/ssl/qsslsocket.h b/src/network/ssl/qsslsocket.h
index 35943c7d7e..843e2d15f5 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();
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 db64702b8d..1390ace632 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
@@ -264,7 +264,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;
@@ -282,6 +282,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
@@ -434,8 +438,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/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 8bf88300e9..f2d31d5783 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;
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h
index 8b0c33f7d5..e5f6fefd5a 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.h
+++ b/src/plugins/platforms/windows/qwindowsglcontext.h
@@ -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/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index cac6345b66..e51c3d0502 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);
@@ -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
}
@@ -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);
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 7cf25d41a6..a894944096 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; }
};
@@ -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);
@@ -236,7 +233,6 @@ public:
bool startSystemMoveResizeForTouchBegin(xcb_window_t window, const QPoint &point, int corner);
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 {
@@ -341,7 +336,6 @@ private:
uint32_t pointid;
int corner;
} m_startSystemMoveResizeInfo;
-#endif // QT_CONFIG(xcb_xinput)
const bool m_canGrabServer;
const xcb_visualid_t m_defaultVisualId;
@@ -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..1ba4b4a1b9 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 */
@@ -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, 0
};
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/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index d0e02ecdd1..3caee3f409 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 |
@@ -604,12 +586,10 @@ void QXcbKeyboard::selectEvents()
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));
@@ -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/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 97da420798..76d3545d35 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>
@@ -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());
@@ -1895,9 +1891,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);
@@ -1910,9 +1904,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;
}
@@ -1948,13 +1940,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;
}
@@ -1986,10 +1973,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);
@@ -2064,7 +2050,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);
@@ -2165,7 +2150,6 @@ void QXcbWindow::handleXIEnterLeave(xcb_ge_event_t *event)
break;
}
}
-#endif
QXcbWindow *QXcbWindow::toWindow() { return this; }
@@ -2301,14 +2285,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);
@@ -2376,7 +2358,7 @@ bool QXcbWindow::startSystemMoveResize(const QPoint &pos, int corner)
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);
if (startedByTouch) {
@@ -2386,9 +2368,7 @@ bool QXcbWindow::startSystemMoveResize(const QPoint &pos, int corner)
return false;
}
// KWin, Openbox, AwesomeWM have been tested to work with _NET_WM_MOVERESIZE.
- } else
-#endif
- { // Started by mouse press.
+ } else { // Started by mouse press.
if (connection()->isUnity())
return false; // _NET_WM_MOVERESIZE on this WM is bouncy (WM bug?).
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index 5de5974ca7..13b37db028 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -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;
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/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
index 0f39f6aa0d..d0928fe6ab 100644
--- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
+++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
@@ -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/psql/qsql_psql.cpp b/src/plugins/sqldrivers/psql/qsql_psql.cpp
index 3803f05b9f..b85a1ac4c7 100644
--- a/src/plugins/sqldrivers/psql/qsql_psql.cpp
+++ b/src/plugins/sqldrivers/psql/qsql_psql.cpp
@@ -1694,7 +1694,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..65d3f0a580 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -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/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index 7f7b81b05b..e0ddc4ca84 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -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
*/
/*!
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/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 908155e8b5..fdc909e7e9 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>
@@ -406,7 +409,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 +418,7 @@ static int defaultTimeout()
if (!ok || timeout <= 0)
timeout = 5*60*1000;
}
- return timeout;
+ return std::chrono::milliseconds{timeout};
}
#endif
@@ -1008,53 +1011,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)
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/main.cpp b/src/tools/moc/main.cpp
index ba559b572f..4aa040a9bb 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()); }
@@ -293,10 +300,20 @@ 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);
+
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 +322,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 +334,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;
@@ -485,6 +505,8 @@ int runMoc(int argc, char **argv)
// 3. and output meta object code
+ QScopedPointer<FILE, ScopedPointerFileCloser> jsonOutput;
+
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,6 +518,21 @@ 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;
}
@@ -506,7 +543,7 @@ 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())
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 50946443be..8cc605fd8a 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>
@@ -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)
@@ -1784,6 +1802,186 @@ 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;
+
+ 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..687ea2552f 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,8 @@ struct PropertyDef
int revision = 0;
bool constant = false;
bool final = false;
+
+ QJsonObject toJson() const;
};
Q_DECLARE_TYPEINFO(PropertyDef, Q_MOVABLE_TYPE);
@@ -183,6 +192,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);
@@ -215,7 +225,7 @@ public:
QMap<QString, QJsonArray> metaArgs;
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/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/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
index 31dde8832b..eecc18e5c7 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp
@@ -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();
}
/*!
diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp
index 13a1bbd8eb..ba7ee15314 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>
@@ -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/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index a25a582881..b1dbafa997 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -923,10 +923,8 @@ QTableWidgetSelectionRange::QTableWidgetSelectionRange(int top, int left, int bo
Constructs a the table selection range by copying the given \a
other table selection range.
*/
-QTableWidgetSelectionRange::QTableWidgetSelectionRange(const QTableWidgetSelectionRange &other)
- : top(other.top), left(other.left), bottom(other.bottom), right(other.right)
-{
-}
+QTableWidgetSelectionRange::QTableWidgetSelectionRange(const QTableWidgetSelectionRange &other) = default;
+QTableWidgetSelectionRange &QTableWidgetSelectionRange::operator=(const QTableWidgetSelectionRange &other) = default;
/*!
Destroys the table selection range.
diff --git a/src/widgets/itemviews/qtablewidget.h b/src/widgets/itemviews/qtablewidget.h
index d93032f3f0..0d93a0a075 100644
--- a/src/widgets/itemviews/qtablewidget.h
+++ b/src/widgets/itemviews/qtablewidget.h
@@ -49,14 +49,17 @@ QT_REQUIRE_CONFIG(tablewidget);
QT_BEGIN_NAMESPACE
+// ### Qt6 unexport the class, remove the user-defined special 3 and make it a literal type.
class Q_WIDGETS_EXPORT QTableWidgetSelectionRange
{
public:
QTableWidgetSelectionRange();
QTableWidgetSelectionRange(int top, int left, int bottom, int right);
- QTableWidgetSelectionRange(const QTableWidgetSelectionRange &other);
~QTableWidgetSelectionRange();
+ QTableWidgetSelectionRange(const QTableWidgetSelectionRange &other);
+ QTableWidgetSelectionRange &operator=(const QTableWidgetSelectionRange &other);
+
inline int topRow() const { return top; }
inline int bottomRow() const { return bottom; }
inline int leftColumn() const { return left; }
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp
index 7b69eff30c..3c0271e7c2 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);
@@ -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/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp
index fd18888870..ae81cc5661 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.
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 3d31a3b73a..69b1c5896f 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -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());
diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp
index e39ef6d1cd..b7c3426e08 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
*/
/*!
@@ -139,6 +144,23 @@ QSplashScreen::QSplashScreen(const QPixmap &pixmap, Qt::WindowFlags f)
/*!
\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.
@@ -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/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
index 354190e754..d61d45bc52 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
@@ -90,7 +90,9 @@ ModelsToTest::ModelsToTest()
{
setupDatabase();
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
tests.append(test("QDirModel", ReadOnly, HasData));
+#endif
tests.append(test("QStringListModel", ReadWrite, HasData));
tests.append(test("QStringListModelEmpty", ReadWrite, Empty));
@@ -165,11 +167,16 @@ QAbstractItemModel *ModelsToTest::createModel(const QString &modelType)
return model;
}
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
if (modelType == "QDirModel") {
QDirModel *model = new QDirModel();
model->setReadOnly(false);
return model;
}
+QT_WARNING_POP
+#endif
if (modelType == "QSqlQueryModel") {
QSqlQueryModel *model = new QSqlQueryModel();
@@ -287,6 +294,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
return returnIndex;
}
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
if (QDirModel *dirModel = qobject_cast<QDirModel *>(model)) {
m_dirModelTempDir.reset(new QTemporaryDir);
if (!m_dirModelTempDir->isValid())
@@ -303,6 +311,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
}
return dirModel->index(tempDir.path());
}
+#endif // QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
if (QSqlQueryModel *queryModel = qobject_cast<QSqlQueryModel *>(model)) {
QSqlQuery q;
@@ -359,11 +368,12 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
*/
void ModelsToTest::cleanupTestArea(QAbstractItemModel *model)
{
- if (qobject_cast<QDirModel *>(model)) {
- m_dirModelTempDir.reset();
- } else if (qobject_cast<QSqlQueryModel *>(model)) {
+ if (qobject_cast<QSqlQueryModel *>(model))
QSqlQuery q("DROP TABLE test");
- }
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
+ if (qobject_cast<QDirModel *>(model))
+ m_dirModelTempDir.reset();
+#endif
}
void ModelsToTest::setupDatabase()
diff --git a/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp
index 9904719f7c..5b1bde8ea3 100644
--- a/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp
+++ b/tests/auto/corelib/time/qtimezone/tst_qtimezone.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 test suite of the Qt Toolkit.
@@ -49,6 +49,8 @@ private slots:
void dataStreamTest();
void isTimeZoneIdAvailable();
void availableTimeZoneIds();
+ void utcOffsetId_data();
+ void utcOffsetId();
void specificTransition_data();
void specificTransition();
void transitionEachZone_data();
@@ -375,33 +377,121 @@ void tst_QTimeZone::dataStreamTest()
void tst_QTimeZone::isTimeZoneIdAvailable()
{
QList<QByteArray> available = QTimeZone::availableTimeZoneIds();
- foreach (const QByteArray &id, available)
+ foreach (const QByteArray &id, available) {
QVERIFY(QTimeZone::isTimeZoneIdAvailable(id));
+ QVERIFY(QTimeZone(id).isValid());
+ }
+}
-#ifdef QT_BUILD_INTERNAL
- // a-z, A-Z, 0-9, '.', '-', '_' are valid chars
- // Can't start with '-'
- // Parts separated by '/', each part min 1 and max of 14 chars
- QCOMPARE(QTimeZonePrivate::isValidId("az"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("AZ"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("09"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("a/z"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("a.z"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("a-z"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("a_z"), true);
- QCOMPARE(QTimeZonePrivate::isValidId(".z"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("_z"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("12345678901234"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("12345678901234/12345678901234"), true);
- QCOMPARE(QTimeZonePrivate::isValidId("a z"), false);
- QCOMPARE(QTimeZonePrivate::isValidId("a\\z"), false);
- QCOMPARE(QTimeZonePrivate::isValidId("a,z"), false);
- QCOMPARE(QTimeZonePrivate::isValidId("/z"), false);
- QCOMPARE(QTimeZonePrivate::isValidId("-z"), false);
- QCOMPARE(QTimeZonePrivate::isValidId("123456789012345"), false);
- QCOMPARE(QTimeZonePrivate::isValidId("123456789012345/12345678901234"), false);
- QCOMPARE(QTimeZonePrivate::isValidId("12345678901234/123456789012345"), false);
-#endif // QT_BUILD_INTERNAL
+void tst_QTimeZone::utcOffsetId_data()
+{
+ QTest::addColumn<QByteArray>("id");
+ QTest::addColumn<bool>("valid");
+ QTest::addColumn<int>("offset"); // ignored unless valid
+
+ // Some of these are actual CLDR zone IDs, some are known Windows IDs; the
+ // rest rely on parsing the offset. Since CLDR and Windows may add to their
+ // known IDs, which fall in which category may vary. Only the CLDR and
+ // Windows ones are known to isTimeZoneAvailable() or listed in
+ // availableTimeZoneIds().
+#define ROW(name, valid, offset) \
+ QTest::newRow(name) << QByteArray(name) << valid << offset
+
+ // See qtbase/util/locale_database/cldr2qtimezone.py for source
+ // CLDR v35.1 IDs:
+ ROW("UTC", true, 0);
+ ROW("UTC-14:00", true, -50400);
+ ROW("UTC-13:00", true, -46800);
+ ROW("UTC-12:00", true, -43200);
+ ROW("UTC-11:00", true, -39600);
+ ROW("UTC-10:00", true, -36000);
+ ROW("UTC-09:00", true, -32400);
+ ROW("UTC-08:00", true, -28800);
+ ROW("UTC-07:00", true, -25200);
+ ROW("UTC-06:00", true, -21600);
+ ROW("UTC-05:00", true, -18000);
+ ROW("UTC-04:30", true, -16200);
+ ROW("UTC-04:00", true, -14400);
+ ROW("UTC-03:30", true, -12600);
+ ROW("UTC-03:00", true, -10800);
+ ROW("UTC-02:00", true, -7200);
+ ROW("UTC-01:00", true, -3600);
+ ROW("UTC-00:00", true, 0);
+ ROW("UTC+00:00", true, 0);
+ ROW("UTC+01:00", true, 3600);
+ ROW("UTC+02:00", true, 7200);
+ ROW("UTC+03:00", true, 10800);
+ ROW("UTC+03:30", true, 12600);
+ ROW("UTC+04:00", true, 14400);
+ ROW("UTC+04:30", true, 16200);
+ ROW("UTC+05:00", true, 18000);
+ ROW("UTC+05:30", true, 19800);
+ ROW("UTC+05:45", true, 20700);
+ ROW("UTC+06:00", true, 21600);
+ ROW("UTC+06:30", true, 23400);
+ ROW("UTC+07:00", true, 25200);
+ ROW("UTC+08:00", true, 28800);
+ ROW("UTC+08:30", true, 30600);
+ ROW("UTC+09:00", true, 32400);
+ ROW("UTC+09:30", true, 34200);
+ ROW("UTC+10:00", true, 36000);
+ ROW("UTC+11:00", true, 39600);
+ ROW("UTC+12:00", true, 43200);
+ ROW("UTC+13:00", true, 46800);
+ ROW("UTC+14:00", true, 50400);
+ // Windows IDs known to CLDR v35.1:
+ ROW("UTC-11", true, -39600);
+ ROW("UTC-09", true, -32400);
+ ROW("UTC-08", true, -28800);
+ ROW("UTC-02", true, -7200);
+ ROW("UTC+12", true, 43200);
+ ROW("UTC+13", true, 46800);
+ // Encountered in bug reports:
+ ROW("UTC+10", true, 36000); // QTBUG-77738
+
+ // Bounds:
+ ROW("UTC+23", true, 82800);
+ ROW("UTC-23", true, -82800);
+ ROW("UTC+23:59", true, 86340);
+ ROW("UTC-23:59", true, -86340);
+ ROW("UTC+23:59:59", true, 86399);
+ ROW("UTC-23:59:59", true, -86399);
+
+ // Out of range
+ ROW("UTC+24:0:0", false, 0);
+ ROW("UTC-24:0:0", false, 0);
+ ROW("UTC+0:60:0", false, 0);
+ ROW("UTC-0:60:0", false, 0);
+ ROW("UTC+0:0:60", false, 0);
+ ROW("UTC-0:0:60", false, 0);
+
+ // Malformed
+ ROW("UTC+", false, 0);
+ ROW("UTC-", false, 0);
+ ROW("UTC10", false, 0);
+ ROW("UTC:10", false, 0);
+ ROW("UTC+cabbage", false, 0);
+ ROW("UTC+10:rice", false, 0);
+ ROW("UTC+9:3:oat", false, 0);
+ ROW("UTC+9+3", false, 0);
+ ROW("UTC+9-3", false, 0);
+ ROW("UTC+9:3-4", false, 0);
+ ROW("UTC+9:3:4:more", false, 0);
+ ROW("UTC+9:3:4:5", false, 0);
+}
+
+void tst_QTimeZone::utcOffsetId()
+{
+ QFETCH(QByteArray, id);
+ QFETCH(bool, valid);
+ QTimeZone zone(id);
+ QCOMPARE(zone.isValid(), valid);
+ if (valid) {
+ QDateTime epoch(QDate(1970, 1, 1), QTime(0, 0, 0), Qt::UTC);
+ QFETCH(int, offset);
+ QCOMPARE(zone.offsetFromUtc(epoch), offset);
+ QVERIFY(!zone.hasDaylightTime());
+ }
}
void tst_QTimeZone::specificTransition_data()
@@ -733,10 +823,16 @@ void tst_QTimeZone::isValidId_data()
QTest::newRow(name " middle") << QByteArray("xyz/" section "/xyz") << valid; \
QTest::newRow(name " back") << QByteArray("xyz/xyz/" section) << valid
+ // a-z, A-Z, 0-9, '.', '-', '_' are valid chars
+ // Can't start with '-'
+ // Parts separated by '/', each part min 1 and max of 14 chars
TESTSET("empty", "", false);
TESTSET("minimal", "m", true);
TESTSET("maximal", "12345678901234", true);
+ TESTSET("maximal twice", "12345678901234/12345678901234", true);
TESTSET("too long", "123456789012345", false);
+ TESTSET("too-long/maximal", "123456789012345/12345678901234", false);
+ TESTSET("maximal/too-long", "12345678901234/123456789012345", false);
TESTSET("bad hyphen", "-hyphen", false);
TESTSET("good hyphen", "hy-phen", true);
@@ -752,6 +848,22 @@ void tst_QTimeZone::isValidId_data()
TESTSET("valid char 0", "0", true);
TESTSET("valid char 9", "9", true);
+ TESTSET("valid pair az", "az", true);
+ TESTSET("valid pair AZ", "AZ", true);
+ TESTSET("valid pair 09", "09", true);
+ TESTSET("valid pair .z", ".z", true);
+ TESTSET("valid pair _z", "_z", true);
+ TESTSET("invalid pair -z", "-z", false);
+
+ TESTSET("valid triple a/z", "a/z", true);
+ TESTSET("valid triple a.z", "a.z", true);
+ TESTSET("valid triple a-z", "a-z", true);
+ TESTSET("valid triple a_z", "a_z", true);
+ TESTSET("invalid triple a z", "a z", false);
+ TESTSET("invalid triple a\\z", "a\\z", false);
+ TESTSET("invalid triple a,z", "a,z", false);
+
+ TESTSET("invalid space", " ", false);
TESTSET("invalid char ^", "^", false);
TESTSET("invalid char \"", "\"", false);
TESTSET("invalid char $", "$", false);
@@ -760,6 +872,7 @@ void tst_QTimeZone::isValidId_data()
TESTSET("invalid char (", "(", false);
TESTSET("invalid char )", ")", false);
TESTSET("invalid char =", "=", false);
+ TESTSET("invalid char -", "-", false);
TESTSET("invalid char ?", "?", false);
TESTSET("invalid char ß", "ß", false);
TESTSET("invalid char \\x01", "\x01", false);
@@ -824,10 +937,6 @@ void tst_QTimeZone::utcTest()
QCOMPARE(tz.standardTimeOffset(now), 36000);
QCOMPARE(tz.daylightTimeOffset(now), 0);
- // Test invalid UTC ID, must be in available list
- tz = QTimeZone("UTC+00:01");
- QCOMPARE(tz.isValid(), false);
-
// Test create custom zone
tz = QTimeZone("QST", 123456, "Qt Standard Time", "QST", QLocale::Norway, "Qt Testing");
QCOMPARE(tz.isValid(), true);
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 60f89fcb4e..34de756ab5 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -1031,6 +1031,23 @@ public:
Qt::MouseButtons buttonStateInGeneratedMove;
};
+static void simulateMouseClick(QWindow *target, const QPointF &local, const QPointF &global)
+{
+ QWindowSystemInterface::handleMouseEvent(target, local, global,
+ {}, Qt::LeftButton, QEvent::MouseButtonPress);
+ QWindowSystemInterface::handleMouseEvent(target, local, global,
+ Qt::LeftButton, Qt::LeftButton, QEvent::MouseButtonRelease);
+}
+
+static void simulateMouseClick(QWindow *target, ulong &timeStamp,
+ const QPointF &local, const QPointF &global)
+{
+ QWindowSystemInterface::handleMouseEvent(target, timeStamp++, local, global,
+ {}, Qt::LeftButton, QEvent::MouseButtonPress);
+ QWindowSystemInterface::handleMouseEvent(target, timeStamp++, local, global,
+ Qt::LeftButton, Qt::LeftButton, QEvent::MouseButtonRelease);
+}
+
void tst_QWindow::testInputEvents()
{
InputTestWindow window;
@@ -1072,15 +1089,13 @@ void tst_QWindow::testInputEvents()
window.mousePressButton = window.mouseReleaseButton = 0;
const QPointF nonWindowGlobal(window.geometry().topRight() + QPoint(200, 50)); // not inside the window
const QPointF deviceNonWindowGlobal = QHighDpi::toNativePixels(nonWindowGlobal, window.screen());
- QWindowSystemInterface::handleMouseEvent(nullptr, deviceNonWindowGlobal, deviceNonWindowGlobal, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(nullptr, deviceNonWindowGlobal, deviceNonWindowGlobal, Qt::NoButton);
+ simulateMouseClick(nullptr, deviceNonWindowGlobal, deviceNonWindowGlobal);
QCoreApplication::processEvents();
QCOMPARE(window.mousePressButton, 0);
QCOMPARE(window.mouseReleaseButton, 0);
const QPointF windowGlobal = window.mapToGlobal(local.toPoint());
const QPointF deviceWindowGlobal = QHighDpi::toNativePixels(windowGlobal, window.screen());
- QWindowSystemInterface::handleMouseEvent(nullptr, deviceWindowGlobal, deviceWindowGlobal, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(nullptr, deviceWindowGlobal, deviceWindowGlobal, Qt::NoButton);
+ simulateMouseClick(nullptr, deviceWindowGlobal, deviceWindowGlobal);
QCoreApplication::processEvents();
QCOMPARE(window.mousePressButton, int(Qt::LeftButton));
QCOMPARE(window.mouseReleaseButton, int(Qt::LeftButton));
@@ -1204,8 +1219,7 @@ void tst_QWindow::mouseToTouchTranslation()
window.show();
QVERIFY(QTest::qWaitForWindowExposed(&window));
- QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton);
+ QTest::mouseClick(&window, Qt::LeftButton, {}, QPoint(10, 10));
QCoreApplication::processEvents();
QCoreApplication::setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false);
@@ -1217,8 +1231,7 @@ void tst_QWindow::mouseToTouchTranslation()
window.ignoreMouse = false;
- QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton);
+ QTest::mouseClick(&window, Qt::LeftButton, {}, QPoint(10, 10));
QCoreApplication::processEvents();
QCoreApplication::setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false);
@@ -1229,8 +1242,7 @@ void tst_QWindow::mouseToTouchTranslation()
window.ignoreMouse = true;
- QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton);
+ QTest::mouseClick(&window, Qt::LeftButton, {}, QPoint(10, 10));
QCoreApplication::processEvents();
// touch event synthesis disabled
@@ -1255,8 +1267,7 @@ void tst_QWindow::mouseToTouchLoop()
window.show();
QVERIFY(QTest::qWaitForWindowExposed(&window));
- QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton);
+ QTest::mouseClick(&window, Qt::LeftButton, {}, QPoint(10, 10));
QCoreApplication::processEvents();
QCoreApplication::setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false);
@@ -1551,8 +1562,8 @@ void tst_QWindow::mouseEventSequence()
ulong timestamp = 0;
QPointF local(12, 34);
const QPointF deviceLocal = QHighDpi::toNativePixels(local, &window);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, deviceLocal, deviceLocal, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, deviceLocal, deviceLocal, Qt::NoButton);
+
+ simulateMouseClick(&window, timestamp, deviceLocal, deviceLocal);
QCoreApplication::processEvents();
QCOMPARE(window.mousePressedCount, 1);
QCOMPARE(window.mouseReleasedCount, 1);
@@ -1564,10 +1575,8 @@ void tst_QWindow::mouseEventSequence()
// A double click must result in press, release, press, doubleclick, release.
// Check that no unexpected event suppression occurs and that the order is correct.
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
+ simulateMouseClick(&window, timestamp, local, local);
+ simulateMouseClick(&window, timestamp, local, local);
QCoreApplication::processEvents();
QCOMPARE(window.mousePressedCount, 2);
QCOMPARE(window.mouseReleasedCount, 2);
@@ -1578,12 +1587,9 @@ void tst_QWindow::mouseEventSequence()
window.resetCounters();
// Triple click = double + single click
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
+ simulateMouseClick(&window, timestamp, local, local);
+ simulateMouseClick(&window, timestamp, local, local);
+ simulateMouseClick(&window, timestamp, local, local);
QCoreApplication::processEvents();
QCOMPARE(window.mousePressedCount, 3);
QCOMPARE(window.mouseReleasedCount, 3);
@@ -1594,14 +1600,10 @@ void tst_QWindow::mouseEventSequence()
window.resetCounters();
// Two double clicks.
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
+ simulateMouseClick(&window, timestamp, local, local);
+ simulateMouseClick(&window, timestamp, local, local);
+ simulateMouseClick(&window, timestamp, local, local);
+ simulateMouseClick(&window, timestamp, local, local);
QCoreApplication::processEvents();
QCOMPARE(window.mousePressedCount, 4);
QCOMPARE(window.mouseReleasedCount, 4);
@@ -1612,17 +1614,13 @@ void tst_QWindow::mouseEventSequence()
window.resetCounters();
// Four clicks, none of which qualifies as a double click.
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
+ simulateMouseClick(&window, timestamp, local, local);
timestamp += doubleClickInterval;
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
+ simulateMouseClick(&window, timestamp, local, local);
timestamp += doubleClickInterval;
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
+ simulateMouseClick(&window, timestamp, local, local);
timestamp += doubleClickInterval;
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, timestamp++, local, local, Qt::NoButton);
+ simulateMouseClick(&window, timestamp, local, local);
timestamp += doubleClickInterval;
QCoreApplication::processEvents();
QCOMPARE(window.mousePressedCount, 4);
@@ -1674,10 +1672,13 @@ void tst_QWindow::inputReentrancy()
// Queue three events.
QPointF local(12, 34);
- QWindowSystemInterface::handleMouseEvent(&window, local, local, Qt::LeftButton);
+ QWindowSystemInterface::handleMouseEvent(&window, local, local, {},
+ Qt::LeftButton, QEvent::MouseButtonPress);
local += QPointF(2, 2);
- QWindowSystemInterface::handleMouseEvent(&window, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&window, local, local, Qt::NoButton);
+ QWindowSystemInterface::handleMouseEvent(&window, local, local,
+ Qt::LeftButton, Qt::LeftButton, QEvent::MouseMove);
+ QWindowSystemInterface::handleMouseEvent(&window, local, local, Qt::LeftButton,
+ Qt::LeftButton, QEvent::MouseButtonRelease);
// Process them. However, the event handler for the press will also call
// processEvents() so the move and release will be delivered before returning
// from mousePressEvent(). The point is that no events should get lost.
@@ -1747,12 +1748,14 @@ void tst_QWindow::tabletEvents()
const QPoint global = window.mapToGlobal(local);
const QPoint deviceLocal = QHighDpi::toNativeLocalPosition(local, &window);
const QPoint deviceGlobal = QHighDpi::toNativePixels(global, window.screen());
- QWindowSystemInterface::handleTabletEvent(&window, true, deviceLocal, deviceGlobal, 1, 2, 0.5, 1, 2, 0.1, 0, 0, 0);
+ QWindowSystemInterface::handleTabletEvent(&window, deviceLocal, deviceGlobal,
+ 1, 2, Qt::LeftButton, 0.5, 1, 2, 0.1, 0, 0, 0);
QCoreApplication::processEvents();
QTRY_VERIFY(window.eventType == QEvent::TabletPress);
QTRY_COMPARE(window.eventGlobal.toPoint(), global);
QTRY_COMPARE(window.eventLocal.toPoint(), local);
- QWindowSystemInterface::handleTabletEvent(&window, false, deviceLocal, deviceGlobal, 1, 2, 0.5, 1, 2, 0.1, 0, 0, 0);
+ QWindowSystemInterface::handleTabletEvent(&window, deviceLocal, deviceGlobal, 1, 2,
+ {}, 0.5, 1, 2, 0.1, 0, 0, 0);
QCoreApplication::processEvents();
QTRY_COMPARE(window.eventType, QEvent::TabletRelease);
@@ -1788,11 +1791,9 @@ void tst_QWindow::windowModality_QTBUG27039()
modalB.setModality(Qt::ApplicationModal);
modalB.show();
- QPointF local(5, 5);
- QWindowSystemInterface::handleMouseEvent(&modalA, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&modalA, local, local, Qt::NoButton);
- QWindowSystemInterface::handleMouseEvent(&modalB, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&modalB, local, local, Qt::NoButton);
+ QPoint local(5, 5);
+ QTest::mouseClick(&modalA, Qt::LeftButton, {}, local);
+ QTest::mouseClick(&modalB, Qt::LeftButton, {}, local);
QCoreApplication::processEvents();
// modal A should be blocked since it was shown first, but modal B should not be blocked
@@ -1800,8 +1801,7 @@ void tst_QWindow::windowModality_QTBUG27039()
QCOMPARE(modalA.mousePressedCount, 0);
modalB.hide();
- QWindowSystemInterface::handleMouseEvent(&modalA, local, local, Qt::LeftButton);
- QWindowSystemInterface::handleMouseEvent(&modalA, local, local, Qt::NoButton);
+ QTest::mouseClick(&modalA, Qt::LeftButton, {}, local);
QCoreApplication::processEvents();
// modal B has been hidden, modal A should be unblocked again
diff --git a/tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp b/tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp
index 9e9b0db366..b2b2b685ae 100644
--- a/tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp
+++ b/tests/auto/gui/painting/qpdfwriter/tst_qpdfwriter.cpp
@@ -73,12 +73,12 @@ void tst_QPdfWriter::basics()
QCOMPARE(writer.pageSize(), QPdfWriter::A5);
QCOMPARE(writer.pageSizeMM(), QSizeF(148, 210));
- writer.setPageSize(QPdfWriter::A3);
+ writer.setPageSize(QPageSize(QPageSize::A3));
QCOMPARE(writer.pageLayout().pageSize().id(), QPageSize::A3);
QCOMPARE(writer.pageSize(), QPdfWriter::A3);
QCOMPARE(writer.pageSizeMM(), QSizeF(297, 420));
- writer.setPageSizeMM(QSize(210, 297));
+ writer.setPageSize(QPageSize(QSize(210, 297), QPageSize::Millimeter));
QCOMPARE(writer.pageLayout().pageSize().id(), QPageSize::A4);
QCOMPARE(writer.pageSize(), QPdfWriter::A4);
QCOMPARE(writer.pageSizeMM(), QSizeF(210, 297));
@@ -101,9 +101,9 @@ void tst_QPdfWriter::basics()
QCOMPARE(writer.margins().right, 20.0);
QCOMPARE(writer.margins().top, 20.0);
QCOMPARE(writer.margins().bottom, 20.0);
- QPdfWriter::Margins margins = {50, 50, 50, 50};
- writer.setMargins(margins);
- QCOMPARE(writer.pageLayout().margins(), QMarginsF(50, 50, 50, 50));
+ const QMarginsF margins = {50, 50, 50, 50};
+ writer.setPageMargins(margins, QPageLayout::Millimeter);
+ QCOMPARE(writer.pageLayout().margins(), margins);
QCOMPARE(writer.pageLayout().units(), QPageLayout::Millimeter);
QCOMPARE(writer.margins().left, 50.0);
QCOMPARE(writer.margins().right, 50.0);
@@ -117,7 +117,7 @@ void tst_QPdfWriter::basics()
// Test the old page metrics methods, see also QPrinter tests for the same.
void tst_QPdfWriter::testPageMetrics_data()
{
- QTest::addColumn<int>("pageSize");
+ QTest::addColumn<QPageSize::PageSizeId>("pageSizeId");
QTest::addColumn<qreal>("widthMMf");
QTest::addColumn<qreal>("heightMMf");
QTest::addColumn<bool>("setMargins");
@@ -126,17 +126,24 @@ void tst_QPdfWriter::testPageMetrics_data()
QTest::addColumn<qreal>("topMMf");
QTest::addColumn<qreal>("bottomMMf");
- QTest::newRow("A4") << int(QPdfWriter::A4) << 210.0 << 297.0 << false << 3.53 << 3.53 << 3.53 << 3.53;
- QTest::newRow("A4 Margins") << int(QPdfWriter::A4) << 210.0 << 297.0 << true << 20.0 << 30.0 << 40.0 << 50.0;
- QTest::newRow("Portrait") << -1 << 345.0 << 678.0 << false << 3.53 << 3.53 << 3.53 << 3.53;
- QTest::newRow("Portrait Margins") << -1 << 345.0 << 678.0 << true << 20.0 << 30.0 << 40.0 << 50.0;
- QTest::newRow("Landscape") << -1 << 678.0 << 345.0 << false << 3.53 << 3.53 << 3.53 << 3.53;
- QTest::newRow("Landscape Margins") << -1 << 678.0 << 345.0 << true << 20.0 << 30.0 << 40.0 << 50.0;
+ QTest::newRow("A4") << QPageSize::A4 << 210.0 << 297.0 << false
+ << 3.53 << 3.53 << 3.53 << 3.53;
+ QTest::newRow("A4 Margins") << QPageSize::A4 << 210.0 << 297.0 << true
+ << 20.0 << 30.0 << 40.0 << 50.0;
+
+ QTest::newRow("Portrait") << QPageSize::Custom << 345.0 << 678.0 << false
+ << 3.53 << 3.53 << 3.53 << 3.53;
+ QTest::newRow("Portrait Margins") << QPageSize::Custom << 345.0 << 678.0 << true
+ << 20.0 << 30.0 << 40.0 << 50.0;
+ QTest::newRow("Landscape") << QPageSize::Custom << 678.0 << 345.0 << false
+ << 3.53 << 3.53 << 3.53 << 3.53;
+ QTest::newRow("Landscape Margins") << QPageSize::Custom << 678.0 << 345.0 << true
+ << 20.0 << 30.0 << 40.0 << 50.0;
}
void tst_QPdfWriter::testPageMetrics()
{
- QFETCH(int, pageSize);
+ QFETCH(QPageSize::PageSizeId, pageSizeId);
QFETCH(qreal, widthMMf);
QFETCH(qreal, heightMMf);
QFETCH(bool, setMargins);
@@ -161,17 +168,13 @@ void tst_QPdfWriter::testPageMetrics()
QCOMPARE(writer.margins().bottom, bottomMMf);
}
-
// Set the given size, in Portrait mode
- if (pageSize < 0) {
- writer.setPageSize(QPageSize(sizeMMf, QPageSize::Millimeter));
- QCOMPARE(writer.pageSize(), QPdfWriter::Custom);
- QCOMPARE(writer.pageLayout().pageSize().id(), QPageSize::Custom);
- } else {
- writer.setPageSize(QPdfWriter::PageSize(pageSize));
- QCOMPARE(writer.pageSize(), QPdfWriter::PageSize(pageSize));
- QCOMPARE(writer.pageLayout().pageSize().id(), QPageSize::PageSizeId(pageSize));
- }
+ const QPageSize pageSize = pageSizeId == QPageSize::Custom
+ ? QPageSize(sizeMMf, QPageSize::Millimeter) : QPageSize(pageSizeId);
+ writer.setPageSize(pageSize);
+ QCOMPARE(writer.pageLayout().pageSize().id(), pageSizeId);
+ QCOMPARE(int(writer.pageSize()), int(pageSizeId));
+
QCOMPARE(writer.pageLayout().orientation(), QPageLayout::Portrait);
QCOMPARE(writer.margins().left, leftMMf);
QCOMPARE(writer.margins().right, rightMMf);
@@ -187,13 +190,8 @@ void tst_QPdfWriter::testPageMetrics()
// Now switch to Landscape mode, size should be unchanged, but rect and metrics should change
writer.setPageOrientation(QPageLayout::Landscape);
- if (pageSize < 0) {
- QCOMPARE(writer.pageSize(), QPdfWriter::Custom);
- QCOMPARE(writer.pageLayout().pageSize().id(), QPageSize::Custom);
- } else {
- QCOMPARE(writer.pageSize(), QPdfWriter::PageSize(pageSize));
- QCOMPARE(writer.pageLayout().pageSize().id(), QPageSize::PageSizeId(pageSize));
- }
+ QCOMPARE(writer.pageLayout().pageSize().id(), pageSizeId);
+ QCOMPARE(int(writer.pageSize()), int(pageSizeId));
QCOMPARE(writer.pageLayout().orientation(), QPageLayout::Landscape);
QCOMPARE(writer.margins().left, leftMMf);
QCOMPARE(writer.margins().right, rightMMf);
@@ -215,15 +213,9 @@ void tst_QPdfWriter::testPageMetrics()
// Now while in Landscape mode, set the size again, results should be the same
- if (pageSize < 0) {
- writer.setPageSize(QPageSize(sizeMMf, QPageSize::Millimeter));
- QCOMPARE(writer.pageSize(), QPdfWriter::Custom);
- QCOMPARE(writer.pageLayout().pageSize().id(), QPageSize::Custom);
- } else {
- writer.setPageSize(QPdfWriter::PageSize(pageSize));
- QCOMPARE(writer.pageSize(), QPdfWriter::PageSize(pageSize));
- QCOMPARE(writer.pageLayout().pageSize().id(), QPageSize::PageSizeId(pageSize));
- }
+ writer.setPageSize(pageSize);
+ QCOMPARE(writer.pageLayout().pageSize().id(), pageSizeId);
+ QCOMPARE(int(writer.pageSize()), int(pageSizeId));
QCOMPARE(writer.pageLayout().orientation(), QPageLayout::Landscape);
QCOMPARE(writer.margins().left, leftMMf);
QCOMPARE(writer.margins().right, rightMMf);
diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp
index c264956d7b..6f94692cb1 100644
--- a/tests/auto/network/access/http2/tst_http2.cpp
+++ b/tests/auto/network/access/http2/tst_http2.cpp
@@ -219,12 +219,12 @@ void tst_Http2::singleRequest_data()
// 'Clear text' that should always work, either via the protocol upgrade
// or as direct.
- QTest::addRow("h2c-upgrade") << QNetworkRequest::HTTP2AllowedAttribute << H2Type::h2c;
+ QTest::addRow("h2c-upgrade") << QNetworkRequest::Http2AllowedAttribute << H2Type::h2c;
QTest::addRow("h2c-direct") << QNetworkRequest::Http2DirectAttribute << H2Type::h2cDirect;
if (!clearTextHTTP2) {
// Qt with TLS where TLS-backend supports ALPN.
- QTest::addRow("h2-ALPN") << QNetworkRequest::HTTP2AllowedAttribute << H2Type::h2Alpn;
+ QTest::addRow("h2-ALPN") << QNetworkRequest::Http2AllowedAttribute << H2Type::h2Alpn;
}
#if QT_CONFIG(ssl)
@@ -429,7 +429,7 @@ void tst_Http2::pushPromise()
url.setPath("/index.html");
QNetworkRequest request(url);
- request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, QVariant(true));
+ request.setAttribute(QNetworkRequest::Http2AllowedAttribute, QVariant(true));
request.setHttp2Configuration(params);
auto reply = manager->get(request);
@@ -455,7 +455,7 @@ void tst_Http2::pushPromise()
url.setPath("/script.js");
QNetworkRequest promisedRequest(url);
- promisedRequest.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, QVariant(true));
+ promisedRequest.setAttribute(QNetworkRequest::Http2AllowedAttribute, QVariant(true));
reply = manager->get(promisedRequest);
connect(reply, &QNetworkReply::finished, this, &tst_Http2::replyFinished);
reply->ignoreSslErrors();
@@ -509,7 +509,7 @@ void tst_Http2::goaway()
for (int i = 0; i < nRequests; ++i) {
url.setPath(QString("/%1").arg(i));
QNetworkRequest request(url);
- request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, QVariant(true));
+ request.setAttribute(QNetworkRequest::Http2AllowedAttribute, QVariant(true));
replies[i] = manager->get(request);
QCOMPARE(replies[i]->error(), QNetworkReply::NoError);
void (QNetworkReply::*errorSignal)(QNetworkReply::NetworkError) =
@@ -582,7 +582,7 @@ void tst_Http2::connectToHost_data()
#if QT_CONFIG(ssl)
QTest::addRow("encrypted-h2-direct") << QNetworkRequest::Http2DirectAttribute << H2Type::h2Direct;
if (!clearTextHTTP2)
- QTest::addRow("encrypted-h2-ALPN") << QNetworkRequest::HTTP2AllowedAttribute << H2Type::h2Alpn;
+ QTest::addRow("encrypted-h2-ALPN") << QNetworkRequest::Http2AllowedAttribute << H2Type::h2Alpn;
#endif // QT_CONFIG(ssl)
// This works for all configurations, tests 'preconnect-http' scheme:
// h2 with protocol upgrade is not working for now (the logic is a bit
@@ -725,7 +725,7 @@ void tst_Http2::maxFrameSize()
#endif // QT_CONFIG(securetransport)
auto connectionType = H2Type::h2Alpn;
- auto attribute = QNetworkRequest::HTTP2AllowedAttribute;
+ auto attribute = QNetworkRequest::Http2AllowedAttribute;
if (clearTextHTTP2) {
connectionType = H2Type::h2Direct;
attribute = QNetworkRequest::Http2DirectAttribute;
@@ -825,7 +825,7 @@ void tst_Http2::sendRequest(int streamNumber,
url.setPath(QString("/stream%1.html").arg(streamNumber));
QNetworkRequest request(url);
- request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, QVariant(true));
+ request.setAttribute(QNetworkRequest::Http2AllowedAttribute, QVariant(true));
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, QVariant(true));
request.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("text/plain"));
request.setPriority(priority);
@@ -932,7 +932,7 @@ void tst_Http2::replyFinished()
QCOMPARE(reply->error(), QNetworkReply::NoError);
- const QVariant http2Used(reply->attribute(QNetworkRequest::HTTP2WasUsedAttribute));
+ const QVariant http2Used(reply->attribute(QNetworkRequest::Http2WasUsedAttribute));
if (!http2Used.isValid() || !http2Used.toBool())
stopEventLoop();
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 4e02320362..2fef31cdc2 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -823,7 +823,9 @@ void tst_QSslSocket::connectToHostEncrypted()
socket->setProtocol(QSsl::SslProtocol::TlsV1_1);
#endif
this->socket = socket.data();
- QVERIFY(socket->addCaCertificates(httpServerCertChainPath()));
+ auto config = socket->sslConfiguration();
+ QVERIFY(config.addCaCertificates(httpServerCertChainPath()));
+ socket->setSslConfiguration(config);
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
connect(socket.data(), SIGNAL(sslErrors(QList<QSslError>)),
this, SLOT(untrustedWorkaroundSlot(QList<QSslError>)));
@@ -860,7 +862,9 @@ void tst_QSslSocket::connectToHostEncryptedWithVerificationPeerName()
#endif
this->socket = socket.data();
- socket->addCaCertificates(httpServerCertChainPath());
+ auto config = socket->sslConfiguration();
+ config.addCaCertificates(httpServerCertChainPath());
+ socket->setSslConfiguration(config);
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
connect(socket.data(), SIGNAL(sslErrors(QList<QSslError>)),
this, SLOT(untrustedWorkaroundSlot(QList<QSslError>)));
@@ -965,7 +969,9 @@ void tst_QSslSocket::peerCertificateChain()
this->socket = socket.data();
QList<QSslCertificate> caCertificates = QSslCertificate::fromPath(httpServerCertChainPath());
QCOMPARE(caCertificates.count(), 1);
- socket->addCaCertificates(caCertificates);
+ auto config = socket->sslConfiguration();
+ config.addCaCertificates(caCertificates);
+ socket->setSslConfiguration(config);
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
connect(socket.data(), SIGNAL(sslErrors(QList<QSslError>)),
this, SLOT(untrustedWorkaroundSlot(QList<QSslError>)));
@@ -1224,10 +1230,10 @@ signals:
protected:
void incomingConnection(qintptr socketDescriptor)
{
+ QSslConfiguration configuration = config;
socket = new QSslSocket(this);
- socket->setSslConfiguration(config);
- socket->setPeerVerifyMode(peerVerifyMode);
- socket->setProtocol(protocol);
+ configuration.setPeerVerifyMode(peerVerifyMode);
+ configuration.setProtocol(protocol);
if (ignoreSslErrors)
connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SIGNAL(socketError(QAbstractSocket::SocketError)));
@@ -1236,14 +1242,14 @@ protected:
QVERIFY(file.open(QIODevice::ReadOnly));
QSslKey key(file.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey);
QVERIFY(!key.isNull());
- socket->setPrivateKey(key);
+ configuration.setPrivateKey(key);
// Add CA certificates to verify client certificate
if (!addCaCertificates.isEmpty()) {
QList<QSslCertificate> caCert = QSslCertificate::fromPath(addCaCertificates);
QVERIFY(!caCert.isEmpty());
QVERIFY(!caCert.first().isNull());
- socket->addCaCertificates(caCert);
+ configuration.addCaCertificates(caCert);
}
// If we have a cert issued directly from the CA
@@ -1251,9 +1257,8 @@ protected:
QList<QSslCertificate> localCert = QSslCertificate::fromPath(m_certFile);
QVERIFY(!localCert.isEmpty());
QVERIFY(!localCert.first().isNull());
- socket->setLocalCertificate(localCert.first());
- }
- else {
+ configuration.setLocalCertificate(localCert.first());
+ } else {
QList<QSslCertificate> localCert = QSslCertificate::fromPath(m_certFile);
QVERIFY(!localCert.isEmpty());
QVERIFY(!localCert.first().isNull());
@@ -1262,14 +1267,12 @@ protected:
QVERIFY(!interCert.isEmpty());
QVERIFY(!interCert.first().isNull());
- socket->setLocalCertificateChain(localCert + interCert);
+ configuration.setLocalCertificateChain(localCert + interCert);
}
- if (!ciphers.isEmpty()) {
- auto sslConfig = socket->sslConfiguration();
- sslConfig.setCiphers(ciphers);
- socket->setSslConfiguration(sslConfig);
- }
+ if (!ciphers.isEmpty())
+ configuration.setCiphers(ciphers);
+ socket->setSslConfiguration(configuration);
QVERIFY(socket->setSocketDescriptor(socketDescriptor, QAbstractSocket::ConnectedState));
QVERIFY(!socket->peerAddress().isNull());
@@ -1748,7 +1751,8 @@ void tst_QSslSocket::addDefaultCaCertificate()
QCOMPARE(flukeCerts.size(), 1);
QList<QSslCertificate> globalCerts = QSslConfiguration::defaultConfiguration().caCertificates();
QVERIFY(!globalCerts.contains(flukeCerts.first()));
- QSslSocket::addDefaultCaCertificate(flukeCerts.first());
+ sslConfig.addCaCertificate(flukeCerts.first());
+ QSslConfiguration::setDefaultConfiguration(sslConfig);
QCOMPARE(QSslConfiguration::defaultConfiguration().caCertificates().size(),
globalCerts.size() + 1);
QVERIFY(QSslConfiguration::defaultConfiguration().caCertificates()
@@ -1941,7 +1945,9 @@ void tst_QSslSocket::wildcard()
// responds with the wildcard, and QSslSocket should accept that as a
// valid connection. This was broken in 4.3.0.
QSslSocketPtr socket = newSocket();
- socket->addCaCertificates(QLatin1String("certs/aspiriniks.ca.crt"));
+ auto config = socket->sslConfiguration();
+ config.addCaCertificates(QLatin1String("certs/aspiriniks.ca.crt"));
+ socket->setSslConfiguration(config);
this->socket = socket.data();
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
connect(socket, SIGNAL(sslErrors(QList<QSslError>)),
@@ -2572,7 +2578,9 @@ void tst_QSslSocket::resetProxy()
// make sure the connection works, and then set a nonsense proxy, and then
// make sure it does not work anymore
QSslSocket socket;
- socket.addCaCertificates(httpServerCertChainPath());
+ auto config = socket.sslConfiguration();
+ config.addCaCertificates(httpServerCertChainPath());
+ socket.setSslConfiguration(config);
socket.setProxy(goodProxy);
socket.connectToHostEncrypted(QtNetworkSettings::httpServerName(), 443);
QVERIFY2(socket.waitForConnected(10000), qPrintable(socket.errorString()));
@@ -2591,7 +2599,9 @@ void tst_QSslSocket::resetProxy()
// set the nonsense proxy and make sure the connection does not work,
// and then set the right proxy and make sure it works
QSslSocket socket2;
- socket2.addCaCertificates(httpServerCertChainPath());
+ auto config2 = socket.sslConfiguration();
+ config2.addCaCertificates(httpServerCertChainPath());
+ socket2.setSslConfiguration(config2);
socket2.setProxy(badProxy);
socket2.connectToHostEncrypted(QtNetworkSettings::httpServerName(), 443);
QVERIFY(! socket2.waitForConnected(10000));
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
index c59250e36e..6a1f46582e 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
@@ -2135,6 +2135,8 @@ void tst_QSqlDatabase::eventNotificationIBase()
{
QFETCH(QString, dbName);
QSqlDatabase db = QSqlDatabase::database(dbName);
+ if (db.driverName().compare(QLatin1String("QIBASE"), Qt::CaseInsensitive))
+ QSKIP("QIBASE specific test");
CHECK_DATABASE(db);
const QString procedureName(qTableName("posteventProc", __FILE__, db));
@@ -2147,13 +2149,12 @@ void tst_QSqlDatabase::eventNotificationIBase()
q.exec(QString("DROP PROCEDURE %1").arg(procedureName));
q.exec(QString("CREATE PROCEDURE %1\nAS BEGIN\nPOST_EVENT '%1';\nEND;").arg(procedureName));
q.exec(QString("EXECUTE PROCEDURE %1").arg(procedureName));
- QSignalSpy spy(driver, SIGNAL(notification(QString)));
+ QSignalSpy spy(driver, QOverload<const QString &, QSqlDriver::NotificationSource, const QVariant &>::of(&QSqlDriver::notification));
db.commit(); // No notifications are posted until the transaction is committed.
- QTest::qWait(300); // Interbase needs some time to post the notification and call the driver callback.
- // This happends from another thread, and we have to process events in order for the
- // event handler in the driver to be executed and emit the notification signal.
-
- QCOMPARE(spy.count(), 1);
+ // Interbase needs some time to post the notification and call the driver callback.
+ // This happends from another thread, and we have to process events in order for the
+ // event handler in the driver to be executed and emit the notification signal.
+ QTRY_COMPARE(spy.count(), 1);
QList<QVariant> arguments = spy.takeFirst();
QCOMPARE(arguments.at(0).toString(), procedureName);
QVERIFY_SQL(*driver, unsubscribeFromNotification(procedureName));
@@ -2164,52 +2165,49 @@ void tst_QSqlDatabase::eventNotificationPSQL()
{
QFETCH(QString, dbName);
QSqlDatabase db = QSqlDatabase::database(dbName);
+ if (db.driverName().compare(QLatin1String("QPSQL"), Qt::CaseInsensitive))
+ QSKIP("QPSQL specific test");
CHECK_DATABASE(db);
QSqlQuery query(db);
const auto procedureName = qTableName("posteventProc", __FILE__, db, false);
QString payload = "payload";
- QSqlDriver &driver=*(db.driver());
- QVERIFY_SQL(driver, subscribeToNotification(procedureName));
- QSignalSpy spy(db.driver(), SIGNAL(notification(QString,QSqlDriver::NotificationSource,QVariant)));
+ QSqlDriver *driver = db.driver();
+ QVERIFY_SQL(*driver, subscribeToNotification(procedureName));
+ QSignalSpy spy(driver, QOverload<const QString &, QSqlDriver::NotificationSource, const QVariant &>::of(&QSqlDriver::notification));
query.exec(QString("NOTIFY \"%1\", '%2'").arg(procedureName).arg(payload));
- QCoreApplication::processEvents();
- QCOMPARE(spy.count(), 1);
+ QTRY_COMPARE(spy.count(), 1);
QList<QVariant> arguments = spy.takeFirst();
QCOMPARE(arguments.at(0).toString(), procedureName);
QCOMPARE(qvariant_cast<QSqlDriver::NotificationSource>(arguments.at(1)), QSqlDriver::SelfSource);
QCOMPARE(qvariant_cast<QVariant>(arguments.at(2)).toString(), payload);
- QVERIFY_SQL(driver, unsubscribeFromNotification(procedureName));
+ QVERIFY_SQL(*driver, unsubscribeFromNotification(procedureName));
}
void tst_QSqlDatabase::eventNotificationSQLite()
{
QFETCH(QString, dbName);
QSqlDatabase db = QSqlDatabase::database(dbName);
- CHECK_DATABASE(db);
- if (db.driverName().compare(QLatin1String("QSQLITE"), Qt::CaseInsensitive)) {
+ if (db.driverName().compare(QLatin1String("QSQLITE"), Qt::CaseInsensitive))
QSKIP("QSQLITE specific test");
- }
+ CHECK_DATABASE(db);
+
const QString tableName(qTableName("sqlitnotifytest", __FILE__, db));
const auto noEscapeTableName(qTableName("sqlitnotifytest", __FILE__, db, false));
tst_Databases::safeDropTable(db, tableName);
- QSignalSpy notificationSpy(db.driver(), SIGNAL(notification(QString)));
- QSignalSpy notificationSpyExt(db.driver(), SIGNAL(notification(QString,QSqlDriver::NotificationSource,QVariant)));
+ QSqlDriver *driver = db.driver();
+ QSignalSpy spy(driver, QOverload<const QString &, QSqlDriver::NotificationSource, const QVariant &>::of(&QSqlDriver::notification));
QSqlQuery q(db);
QVERIFY_SQL(q, exec("CREATE TABLE " + tableName + " (id INTEGER, realVal REAL)"));
- db.driver()->subscribeToNotification(noEscapeTableName);
+ driver->subscribeToNotification(noEscapeTableName);
QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id, realVal) VALUES (1, 2.3)"));
- QTRY_COMPARE(notificationSpy.count(), 1);
- QTRY_COMPARE(notificationSpyExt.count(), 1);
- QList<QVariant> arguments = notificationSpy.takeFirst();
- QCOMPARE(arguments.at(0).toString(), noEscapeTableName);
- arguments = notificationSpyExt.takeFirst();
+ QTRY_COMPARE(spy.count(), 1);
+ QList<QVariant> arguments = spy.takeFirst();
QCOMPARE(arguments.at(0).toString(), noEscapeTableName);
- db.driver()->unsubscribeFromNotification(noEscapeTableName);
+ driver->unsubscribeFromNotification(noEscapeTableName);
QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id, realVal) VALUES (1, 2.3)"));
- QTRY_COMPARE(notificationSpy.count(), 0);
- QTRY_COMPARE(notificationSpyExt.count(), 0);
+ QTRY_COMPARE(spy.count(), 0);
}
void tst_QSqlDatabase::sqlite_bindAndFetchUInt()
diff --git a/tests/auto/tools/moc/.gitignore b/tests/auto/tools/moc/.gitignore
index 86a604a776..59a275bc62 100644
--- a/tests/auto/tools/moc/.gitignore
+++ b/tests/auto/tools/moc/.gitignore
@@ -1 +1,2 @@
tst_moc
+allmocs.json
diff --git a/tests/auto/tools/moc/allmocs_baseline_in.json b/tests/auto/tools/moc/allmocs_baseline_in.json
new file mode 100644
index 0000000000..bde5a1c52b
--- /dev/null
+++ b/tests/auto/tools/moc/allmocs_baseline_in.json
@@ -0,0 +1,2608 @@
+[
+ {
+ "classes": [
+ {
+ "className": "MyBooooooostishClass",
+ "qualifiedClassName": "MyBooooooostishClass",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
+ {
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "no-keywords.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Task87883",
+ "qualifiedClassName": "Task87883",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "task87883.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "IfdefedClass",
+ "qualifiedClassName": "IfdefedClass",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "c-comments.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "BackslashNewlines",
+ "qualifiedClassName": "BackslashNewlines",
+ "slots": [
+ {
+ "access": "public",
+ "name": "works",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "backslash-newlines.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "OldStyleCast",
+ "qualifiedClassName": "OldStyleCast",
+ "slots": [
+ {
+ "access": "public",
+ "name": "foo",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ },
+ {
+ "type": "int*"
+ },
+ {
+ "type": "const int*"
+ },
+ {
+ "type": "volatile int*"
+ },
+ {
+ "type": "const int*volatile*"
+ }
+ ],
+ "name": "bar",
+ "returnType": "int"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ },
+ {
+ "type": "QObject*const"
+ }
+ ],
+ "name": "slot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "oldstyle-casts.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "SlotsWithVoidTemplateTest",
+ "qualifiedClassName": "SlotsWithVoidTemplateTest",
+ "signals": [
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "TestTemplate<void>"
+ }
+ ],
+ "name": "mySignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "myVoidSignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "myVoidSignal2",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
+ {
+ "access": "public",
+ "name": "dummySlot",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "dummySlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "TestTemplate<void>"
+ }
+ ],
+ "name": "anotherSlot",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "TestTemplate<void>"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "slots-with-void-template.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "InvokableBeforeReturnType",
+ "methods": [
+ {
+ "access": "public",
+ "name": "foo",
+ "returnType": "const char*"
+ }
+ ],
+ "qualifiedClassName": "InvokableBeforeReturnType",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "InvokableBeforeInline",
+ "methods": [
+ {
+ "access": "public",
+ "name": "foo",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "bar",
+ "returnType": "void"
+ }
+ ],
+ "qualifiedClassName": "InvokableBeforeInline",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "qinvokable.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Bar",
+ "enums": [
+ {
+ "alias": "Flag",
+ "isClass": false,
+ "isFlag": true,
+ "name": "Flags",
+ "values": [
+ "Read",
+ "Write"
+ ]
+ }
+ ],
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "flags",
+ "read": "flags",
+ "scriptable": true,
+ "stored": true,
+ "type": "Flags",
+ "user": false,
+ "write": "setFlags"
+ }
+ ],
+ "qualifiedClassName": "Foo::Bar",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "Baz",
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "flags",
+ "read": "flags",
+ "scriptable": true,
+ "stored": true,
+ "type": "Foo::Bar::Flags",
+ "user": false,
+ "write": "setFlags"
+ },
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "flagsList",
+ "read": "flagsList",
+ "scriptable": true,
+ "stored": true,
+ "type": "QList<Foo::Bar::Flags>",
+ "user": false,
+ "write": "setFlagsList"
+ }
+ ],
+ "qualifiedClassName": "Foo::Baz",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "namespaced-flags.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Foo",
+ "qualifiedClassName": "BBB::Foo",
+ "signals": [
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QList<QList<int> >"
+ }
+ ],
+ "name": "foo",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QList<QList<int> >"
+ }
+ ],
+ "name": "foo2",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QList< ::AAA::BaseA*>"
+ }
+ ],
+ "name": "bar",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QList< ::AAA::BaseA*>"
+ }
+ ],
+ "name": "bar2",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QList<const ::AAA::BaseA*>"
+ }
+ ],
+ "name": "bar3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ },
+ {
+ "access": "public",
+ "name": "::AAA::BaseA"
+ }
+ ]
+ }
+ ],
+ "inputFile": "trigraphs.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "classInfos": [
+ {
+ "name": "Test",
+ "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\x53"
+ },
+ {
+ "name": "Test2",
+ "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\123"
+ },
+ {
+ "name": "Test3",
+ "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\nb"
+ }
+ ],
+ "className": "StringLiterals",
+ "qualifiedClassName": "StringLiterals",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "escapes-in-string-literals.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "CStyleEnums",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "Baz",
+ "values": [
+ "Foo",
+ "Bar"
+ ]
+ },
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "Baz2",
+ "values": [
+ "Foo2",
+ "Bar2"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "CStyleEnums"
+ }
+ ],
+ "inputFile": "cstyle-enums.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "TestQPrivateSlots",
+ "methods": [
+ {
+ "access": "private",
+ "name": "method1",
+ "returnType": "void"
+ }
+ ],
+ "qualifiedClassName": "TestQPrivateSlots",
+ "slots": [
+ {
+ "access": "private",
+ "name": "_q_privateslot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "qprivateslots.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "GadgetWithNoEnums",
+ "gadget": true,
+ "qualifiedClassName": "GadgetWithNoEnums"
+ },
+ {
+ "className": "DerivedGadgetWithEnums",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "FooEnum",
+ "values": [
+ "FooValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "DerivedGadgetWithEnums",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "GadgetWithNoEnums"
+ }
+ ]
+ }
+ ],
+ "inputFile": "gadgetwithnoenums.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "DirInIncludePath",
+ "interfaces": [
+ [
+ {
+ "className": "MyInterface",
+ "id": "\"MyInterface\""
+ }
+ ]
+ ],
+ "qualifiedClassName": "DirInIncludePath",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ },
+ {
+ "access": "public",
+ "name": "MyInterface"
+ }
+ ]
+ }
+ ],
+ "inputFile": "dir-in-include-path.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "SingleFunctionKeywordBeforeReturnType",
+ "qualifiedClassName": "SingleFunctionKeywordBeforeReturnType",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
+ {
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "SingleFunctionKeywordBeforeInline",
+ "qualifiedClassName": "SingleFunctionKeywordBeforeInline",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
+ {
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "SingleFunctionKeywordAfterInline",
+ "qualifiedClassName": "SingleFunctionKeywordAfterInline",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
+ {
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "single_function_keyword.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Task192552",
+ "qualifiedClassName": "Task192552",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "task192552.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "InlineSlotsWithThrowDeclaration",
+ "qualifiedClassName": "InlineSlotsWithThrowDeclaration",
+ "slots": [
+ {
+ "access": "public",
+ "name": "a",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "b",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "c",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "d",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "e",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "task189996.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "TestObject",
+ "qualifiedClassName": "NS_A::NS_B::TestObject",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "TestMain",
+ "qualifiedClassName": "NS_A::NS_Main::TestMain",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "task234909.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "TypenameWithUnsigned",
+ "qualifiedClassName": "TypenameWithUnsigned",
+ "slots": [
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "uint"
+ }
+ ],
+ "name": "a",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "u",
+ "type": "uint"
+ }
+ ],
+ "name": "b",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "uint*"
+ }
+ ],
+ "name": "c",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "p",
+ "type": "uint*"
+ }
+ ],
+ "name": "d",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "uint&"
+ }
+ ],
+ "name": "e",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "r",
+ "type": "uint&"
+ }
+ ],
+ "name": "f",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "unsigned1"
+ }
+ ],
+ "name": "g",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "u1",
+ "type": "unsigned1"
+ }
+ ],
+ "name": "h",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "uint"
+ },
+ {
+ "type": "unsigned1"
+ }
+ ],
+ "name": "i",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "unsigned1"
+ },
+ {
+ "type": "uint"
+ }
+ ],
+ "name": "j",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "unsignedQImage"
+ }
+ ],
+ "name": "k",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "uqi",
+ "type": "unsignedQImage"
+ }
+ ],
+ "name": "l",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "task240368.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "PureVirtualSignalsTest",
+ "qualifiedClassName": "PureVirtualSignalsTest",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "myOtherSignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "foo",
+ "type": "int"
+ }
+ ],
+ "name": "mySignal2",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "PureVirtualSignalsImpl",
+ "qualifiedClassName": "PureVirtualSignalsImpl",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "foo",
+ "type": "int"
+ }
+ ],
+ "name": "mySignal2",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "PureVirtualSignalsTest"
+ }
+ ]
+ }
+ ],
+ "inputFile": "pure-virtual-signals.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "CXX11Enums",
+ "enums": [
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "EnumClass",
+ "values": [
+ "A0",
+ "A1",
+ "A2",
+ "A3"
+ ]
+ },
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "TypedEnum",
+ "values": [
+ "B0",
+ "B1",
+ "B2",
+ "B3"
+ ]
+ },
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "TypedEnumClass",
+ "values": [
+ "C0",
+ "C1",
+ "C2",
+ "C3"
+ ]
+ },
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "NormalEnum",
+ "values": [
+ "D2",
+ "D3",
+ "D0",
+ "D1"
+ ]
+ },
+ {
+ "alias": "ClassFlag",
+ "isClass": true,
+ "isFlag": true,
+ "name": "ClassFlags",
+ "values": [
+ "F0",
+ "F1",
+ "F2",
+ "F3"
+ ]
+ },
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "EnumStruct",
+ "values": [
+ "G0",
+ "G1",
+ "G2",
+ "G3"
+ ]
+ },
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "TypedEnumStruct",
+ "values": [
+ "H0",
+ "H1",
+ "H2",
+ "H3"
+ ]
+ },
+ {
+ "alias": "StructFlag",
+ "isClass": true,
+ "isFlag": true,
+ "name": "StructFlags",
+ "values": [
+ "I0",
+ "I1",
+ "I2",
+ "I3"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "CXX11Enums"
+ },
+ {
+ "className": "CXX11Enums2",
+ "enums": [
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "EnumClass",
+ "values": [
+ "A0",
+ "A1",
+ "A2",
+ "A3"
+ ]
+ },
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "TypedEnum",
+ "values": [
+ "B0",
+ "B1",
+ "B2",
+ "B3"
+ ]
+ },
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "TypedEnumClass",
+ "values": [
+ "C0",
+ "C1",
+ "C2",
+ "C3"
+ ]
+ },
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "NormalEnum",
+ "values": [
+ "D2",
+ "D3",
+ "D0",
+ "D1"
+ ]
+ },
+ {
+ "alias": "ClassFlag",
+ "isClass": true,
+ "isFlag": true,
+ "name": "ClassFlags",
+ "values": [
+ "F0",
+ "F1",
+ "F2",
+ "F3"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "CXX11Enums2"
+ }
+ ],
+ "inputFile": "cxx11-enums.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "FinalTestClassQt",
+ "qualifiedClassName": "FinalTestClassQt",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedFinalTestClassQt",
+ "qualifiedClassName": "ExportedFinalTestClassQt",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedFinalTestClassQtX",
+ "qualifiedClassName": "ExportedFinalTestClassQtX",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "FinalTestClassCpp11",
+ "qualifiedClassName": "FinalTestClassCpp11",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedFinalTestClassCpp11",
+ "qualifiedClassName": "ExportedFinalTestClassCpp11",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedFinalTestClassCpp11X",
+ "qualifiedClassName": "ExportedFinalTestClassCpp11X",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "SealedTestClass",
+ "qualifiedClassName": "SealedTestClass",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedSealedTestClass",
+ "qualifiedClassName": "ExportedSealedTestClass",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedSealedTestClassX",
+ "qualifiedClassName": "ExportedSealedTestClassX",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "cxx11-final-classes.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "ExplicitOverrideControlBase",
+ "qualifiedClassName": "ExplicitOverrideControlBase",
+ "slots": [
+ {
+ "access": "private",
+ "name": "pureSlot0",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot1",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExplicitOverrideControlFinalQt",
+ "qualifiedClassName": "ExplicitOverrideControlFinalQt",
+ "slots": [
+ {
+ "access": "private",
+ "name": "pureSlot0",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot1",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "ExplicitOverrideControlBase"
+ }
+ ]
+ },
+ {
+ "className": "ExplicitOverrideControlFinalCxx11",
+ "qualifiedClassName": "ExplicitOverrideControlFinalCxx11",
+ "slots": [
+ {
+ "access": "private",
+ "name": "pureSlot0",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot1",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "ExplicitOverrideControlBase"
+ }
+ ]
+ },
+ {
+ "className": "ExplicitOverrideControlSealed",
+ "qualifiedClassName": "ExplicitOverrideControlSealed",
+ "slots": [
+ {
+ "access": "private",
+ "name": "pureSlot0",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot1",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "ExplicitOverrideControlBase"
+ }
+ ]
+ },
+ {
+ "className": "ExplicitOverrideControlOverrideQt",
+ "qualifiedClassName": "ExplicitOverrideControlOverrideQt",
+ "slots": [
+ {
+ "access": "private",
+ "name": "pureSlot0",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot1",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "ExplicitOverrideControlBase"
+ }
+ ]
+ },
+ {
+ "className": "ExplicitOverrideControlOverrideCxx11",
+ "qualifiedClassName": "ExplicitOverrideControlOverrideCxx11",
+ "slots": [
+ {
+ "access": "private",
+ "name": "pureSlot0",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot1",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "ExplicitOverrideControlBase"
+ }
+ ]
+ },
+ {
+ "className": "ExplicitOverrideControlFinalQtOverrideQt",
+ "qualifiedClassName": "ExplicitOverrideControlFinalQtOverrideQt",
+ "slots": [
+ {
+ "access": "private",
+ "name": "pureSlot0",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot1",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "ExplicitOverrideControlBase"
+ }
+ ]
+ },
+ {
+ "className": "ExplicitOverrideControlFinalCxx11OverrideCxx11",
+ "qualifiedClassName": "ExplicitOverrideControlFinalCxx11OverrideCxx11",
+ "slots": [
+ {
+ "access": "private",
+ "name": "pureSlot0",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot1",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "ExplicitOverrideControlBase"
+ }
+ ]
+ },
+ {
+ "className": "ExplicitOverrideControlSealedOverride",
+ "qualifiedClassName": "ExplicitOverrideControlSealedOverride",
+ "slots": [
+ {
+ "access": "private",
+ "name": "pureSlot0",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot1",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "private",
+ "name": "pureSlot3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "ExplicitOverrideControlBase"
+ }
+ ]
+ }
+ ],
+ "inputFile": "cxx11-explicit-override-control.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "ForwardDeclaredParamClass",
+ "qualifiedClassName": "ForwardDeclaredParamClass",
+ "signals": [
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredParam"
+ }
+ ],
+ "name": "signalNaked",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredContainer<ForwardDeclaredParam>"
+ }
+ ],
+ "name": "signalFDC",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredContainer<int>"
+ }
+ ],
+ "name": "signalFDC",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredContainer<QString>"
+ }
+ ],
+ "name": "signalFDC",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredContainer<FullyDefined>"
+ }
+ ],
+ "name": "signalFDC",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QSet<ForwardDeclaredParam>"
+ }
+ ],
+ "name": "signalQSet",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QSet<int>"
+ }
+ ],
+ "name": "signalQSet",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QSet<QString>"
+ }
+ ],
+ "name": "signalQSet",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QSet<FullyDefined>"
+ }
+ ],
+ "name": "signalQSet",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredParam"
+ }
+ ],
+ "name": "slotNaked",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredContainer<ForwardDeclaredParam>"
+ }
+ ],
+ "name": "slotFDC",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredContainer<int>"
+ }
+ ],
+ "name": "slotFDC",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredContainer<QString>"
+ }
+ ],
+ "name": "slotFDC",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "ForwardDeclaredContainer<FullyDefined>"
+ }
+ ],
+ "name": "slotFDC",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QSet<ForwardDeclaredParam>"
+ }
+ ],
+ "name": "slotQSet",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QSet<int>"
+ }
+ ],
+ "name": "slotQSet",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QSet<QString>"
+ }
+ ],
+ "name": "slotQSet",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QSet<FullyDefined>"
+ }
+ ],
+ "name": "slotQSet",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "forward-declared-param.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "classInfos": [
+ {
+ "name": "TestString",
+ "value": "PD_CLASSNAME"
+ },
+ {
+ "name": "TestString2",
+ "value": "ParseDefine"
+ },
+ {
+ "name": "TestString3",
+ "value": "TestValue"
+ }
+ ],
+ "className": "ParseDefine",
+ "qualifiedClassName": "PD::ParseDefine",
+ "signals": [
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "i",
+ "type": "QMap<int,int>"
+ }
+ ],
+ "name": "cmdlineSignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "signalQTBUG55853",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
+ {
+ "access": "public",
+ "name": "voidFunction",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "stringMethod",
+ "returnType": "QString"
+ },
+ {
+ "access": "public",
+ "name": "combined1",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "combined2",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "combined3",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ },
+ {
+ "type": "int"
+ }
+ ],
+ "name": "combined4",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "combined5",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "combined6",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "vararg1",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ }
+ ],
+ "name": "vararg2",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ },
+ {
+ "type": "int"
+ }
+ ],
+ "name": "vararg3",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "vararg4",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ }
+ ],
+ "name": "vararg5",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ },
+ {
+ "type": "int"
+ }
+ ],
+ "name": "vararg6",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ }
+ ],
+ "name": "INNERFUNCTION",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ }
+ ],
+ "name": "inner_expanded",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ }
+ ],
+ "name": "expanded_method",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "conditionSlot",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ }
+ ],
+ "name": "PD_DEFINE_ITSELF_SUFFIX",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "parse-defines.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "FunctionWithAttributes",
+ "qualifiedClassName": "FunctionWithAttributes",
+ "slots": [
+ {
+ "access": "public",
+ "name": "test1",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "test2",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "function-with-attributes.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "TestPluginMetaData",
+ "qualifiedClassName": "TestPluginMetaData",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "plugin_metadata.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "KDAB",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "Salaries",
+ "values": [
+ "Steve"
+ ]
+ }
+ ],
+ "qualifiedClassName": "KDAB",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "single-quote-digit-separator-n3781.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "A",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "qualifiedClassName": "QTBUG_2151::A",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "B",
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "blah",
+ "read": "blah",
+ "scriptable": true,
+ "stored": true,
+ "type": "A::SomeEnum",
+ "user": false
+ }
+ ],
+ "qualifiedClassName": "QTBUG_2151::B",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "related-metaobjects-in-namespaces.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "A",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "QTBUG_35657::A"
+ }
+ ],
+ "inputFile": "qtbug-35657-gadget.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Derived",
+ "gadget": true,
+ "qualifiedClassName": "NonGadgetParent::Derived",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "Base"
+ }
+ ]
+ }
+ ],
+ "inputFile": "non-gadget-parent-class.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "BaseGadget",
+ "gadget": true,
+ "qualifiedClassName": "GrandParentGadget::BaseGadget"
+ },
+ {
+ "className": "DerivedGadget",
+ "gadget": true,
+ "qualifiedClassName": "GrandParentGadget::DerivedGadget",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "Derived"
+ }
+ ]
+ }
+ ],
+ "inputFile": "grand-parent-gadget-class.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "B",
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "blah",
+ "read": "blah",
+ "scriptable": true,
+ "stored": true,
+ "type": "A::SomeEnum",
+ "user": false
+ }
+ ],
+ "qualifiedClassName": "QTBUG_35657::B",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "related-metaobjects-in-gadget.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Gadget",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "Unsused::Gadget"
+ },
+ {
+ "className": "Object",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "qualifiedClassName": "Unsused::Object",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "Gadget",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "NS1::Nested::Gadget"
+ },
+ {
+ "className": "Object",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "qualifiedClassName": "NS1::Nested::Object",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "Gadget",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "NS1::NestedUnsused::Gadget"
+ },
+ {
+ "className": "Object",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "qualifiedClassName": "NS1::NestedUnsused::Object",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "Gadget",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "NS1::Gadget"
+ },
+ {
+ "className": "Object",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "qualifiedClassName": "NS1::Object",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "DependingObject",
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "gadgetPoperty",
+ "read": "gadgetPoperty",
+ "scriptable": true,
+ "stored": true,
+ "type": "Gadget::SomeEnum",
+ "user": false
+ },
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "objectPoperty",
+ "read": "objectPoperty",
+ "scriptable": true,
+ "stored": true,
+ "type": "Object::SomeEnum",
+ "user": false
+ }
+ ],
+ "qualifiedClassName": "NS1::DependingObject",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "DependingNestedGadget",
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "nestedGadgetPoperty",
+ "read": "nestedGadgetPoperty",
+ "scriptable": true,
+ "stored": true,
+ "type": "Nested::Gadget::SomeEnum",
+ "user": false
+ }
+ ],
+ "qualifiedClassName": "NS1::DependingNestedGadget",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "DependingNestedObject",
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "nestedObjectPoperty",
+ "read": "nestedObjectPoperty",
+ "scriptable": true,
+ "stored": true,
+ "type": "Nested::Object::SomeEnum",
+ "user": false
+ }
+ ],
+ "qualifiedClassName": "NS1::DependingNestedObject",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "Gadget",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "NS2::Nested::Gadget"
+ },
+ {
+ "className": "Object",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "qualifiedClassName": "NS2::Nested::Object",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "Gadget",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "NS2::NestedUnsused::Gadget"
+ },
+ {
+ "className": "Object",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "qualifiedClassName": "NS2::NestedUnsused::Object",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "Gadget",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "NS2::Gadget"
+ },
+ {
+ "className": "Object",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "SomeEnum",
+ "values": [
+ "SomeEnumValue"
+ ]
+ }
+ ],
+ "qualifiedClassName": "NS2::Object",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "DependingObject",
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "gadgetPoperty",
+ "read": "gadgetPoperty",
+ "scriptable": true,
+ "stored": true,
+ "type": "Gadget::SomeEnum",
+ "user": false
+ },
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "objectPoperty",
+ "read": "objectPoperty",
+ "scriptable": true,
+ "stored": true,
+ "type": "Object::SomeEnum",
+ "user": false
+ }
+ ],
+ "qualifiedClassName": "NS2::DependingObject",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "DependingNestedGadget",
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "nestedGadgetPoperty",
+ "read": "nestedGadgetPoperty",
+ "scriptable": true,
+ "stored": true,
+ "type": "Nested::Gadget::SomeEnum",
+ "user": false
+ }
+ ],
+ "qualifiedClassName": "NS2::DependingNestedGadget",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "DependingNestedObject",
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "nestedObjectPoperty",
+ "read": "nestedObjectPoperty",
+ "scriptable": true,
+ "stored": true,
+ "type": "Nested::Object::SomeEnum",
+ "user": false
+ }
+ ],
+ "qualifiedClassName": "NS2::DependingNestedObject",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "related-metaobjects-name-conflict.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "FooNamespace",
+ "enums": [
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "Enum1",
+ "values": [
+ "Key1",
+ "Key2"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "FooNamespace"
+ },
+ {
+ "className": "FooNestedNamespace",
+ "enums": [
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "Enum2",
+ "values": [
+ "Key3",
+ "Key4"
+ ]
+ },
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "Enum3",
+ "values": [
+ "Key5",
+ "Key6"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "FooNamespace::FooNestedNamespace"
+ },
+ {
+ "className": "FooMoreNestedNamespace",
+ "enums": [
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "Enum4",
+ "values": [
+ "Key7",
+ "Key8"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "FooNamespace::FooNestedNamespace::FooMoreNestedNamespace"
+ }
+ ],
+ "inputFile": "namespace.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "ClassInNamespace",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "GadEn",
+ "values": [
+ "Value"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "CXX17Namespace::A::B::C::D::ClassInNamespace"
+ },
+ {
+ "className": "D",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "NamEn",
+ "values": [
+ "Value"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "CXX17Namespace::A::B::C::D"
+ }
+ ],
+ "inputFile": "cxx17-namespaces.h",
+ "outputRevision": 67
+ }
+]
diff --git a/tests/auto/tools/moc/moc.pro b/tests/auto/tools/moc/moc.pro
index ad8c093add..1794bafd2c 100644
--- a/tests/auto/tools/moc/moc.pro
+++ b/tests/auto/tools/moc/moc.pro
@@ -32,6 +32,9 @@ HEADERS += using-namespaces.h no-keywords.h task87883.h c-comments.h backslash-n
namespace.h cxx17-namespaces.h \
cxx-attributes.h
+# No platform specifics in the JSON files, so that we can compare them
+JSON_HEADERS = $$HEADERS
+JSON_HEADERS -= cxx-attributes.h
if(*-g++*|*-icc*|*-clang*|*-llvm):!win32-*: HEADERS += os9-newlines.h win-newlines.h
if(*-g++*|*-clang*): HEADERS += dollars.h
@@ -50,3 +53,49 @@ QMAKE_MOC_OPTIONS += -Muri=com.company.app -Muri=com.company.app.private
# Define macro on the command lines used in parse-defines.h
QMAKE_MOC_OPTIONS += "-DDEFINE_CMDLINE_EMPTY=" "\"-DDEFINE_CMDLINE_SIGNAL=void cmdlineSignal(const QMap<int, int> &i)\""
+QMAKE_MOC_OPTIONS += --output-json
+
+debug_and_release {
+ CONFIG(debug, debug|release) {
+ MOC_CPP_DIR = $$MOC_DIR/debug
+ } else {
+ MOC_CPP_DIR = $$MOC_DIR/release
+ }
+} else {
+ MOC_CPP_DIR = $$MOC_DIR
+}
+
+moc_json_header.input = JSON_HEADERS
+moc_json_header.output = $$MOC_CPP_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}.json
+moc_json_header.CONFIG = no_link moc_verify
+moc_json_header.depends = $$MOC_CPP_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
+moc_json_header.commands = $$escape_expand(\\n) # force creation of rule
+moc_json_header.variable_out = MOC_JSON_HEADERS
+
+BASELINE_IN = allmocs_baseline_in.json
+copy_baseline.commands = $${QMAKE_COPY} $$shell_path(${QMAKE_FILE_NAME}) ${QMAKE_FILE_OUT}
+copy_baseline.input = BASELINE_IN
+copy_baseline.output = $$OUT_PWD/allmocs_baseline.json
+copy_baseline.CONFIG = no_link
+
+qtPrepareTool(MOC_COLLECT_JSON, moc)
+jsoncollector.CONFIG += combine
+jsoncollector.commands = $$MOC_COLLECT_JSON --collect-json -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+jsoncollector.input = MOC_JSON_HEADERS
+jsoncollector.output = $$OUT_PWD/allmocs.json
+jsoncollector.variable_out = GENERATED_FILES
+
+allmocs_contents = \
+ "<!DOCTYPE RCC><RCC version=\"1.0\">"\
+ "<qresource prefix=\"/\">"\
+ "<file>allmocs.json</file>"\
+ "<file>allmocs_baseline.json</file>"\
+ "</qresource>"\
+ "</RCC>"
+
+allmocs_file = $$OUT_PWD/allmocs.qrc
+
+!write_file($$allmocs_file, allmocs_contents): error()
+RESOURCES += $$allmocs_file
+
+QMAKE_EXTRA_COMPILERS += moc_json_header copy_baseline jsoncollector
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 89f563f11d..9fc00288fe 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -33,6 +33,7 @@
#include <stdio.h>
#include <qobject.h>
#include <qmetaobject.h>
+#include <qjsondocument.h>
#include "using-namespaces.h"
#include "assign-namespace.h"
@@ -717,6 +718,7 @@ private slots:
void testQNamespace();
void cxx17Namespaces();
void cxxAttributes();
+ void mocJsonOutput();
signals:
void sigWithUnsignedArg(unsigned foo);
@@ -3971,6 +3973,57 @@ void tst_Moc::cxxAttributes()
QCOMPARE(meta.keyCount(), 7);
}
+void tst_Moc::mocJsonOutput()
+{
+ const auto readFile = [](const QString &fileName) {
+ QFile f(fileName);
+ f.open(QIODevice::ReadOnly);
+ return QJsonDocument::fromJson(f.readAll());
+ };
+
+ const QString actualFile = QStringLiteral(":/allmocs.json");
+ const QString expectedFile = QStringLiteral(":/allmocs_baseline.json");
+
+ QVERIFY2(QFile::exists(actualFile), qPrintable(actualFile));
+ QVERIFY2(QFile::exists(expectedFile), qPrintable(expectedFile));
+
+ QJsonDocument actualOutput = readFile(QLatin1String(":/allmocs.json"));
+ QJsonDocument expectedOutput = readFile(QLatin1String(":/allmocs_baseline.json"));
+
+ const auto showPotentialDiff = [](const QJsonDocument &actual, const QJsonDocument &expected) -> QByteArray {
+#if defined(Q_OS_UNIX)
+ QByteArray actualStr = actual.toJson();
+ QByteArray expectedStr = expected.toJson();
+
+ QTemporaryFile actualFile;
+ if (!actualFile.open())
+ return "Error opening actual temp file";
+ actualFile.write(actualStr);
+ actualFile.flush();
+
+ QTemporaryFile expectedFile;
+ if (!expectedFile.open())
+ return "Error opening expected temp file";
+ expectedFile.write(expectedStr);
+ expectedFile.flush();
+
+ QProcess diffProc;
+ diffProc.setProgram("diff");
+ diffProc.setArguments(QStringList() << "-ub" << expectedFile.fileName() << actualFile.fileName());
+ diffProc.start();
+ if (!diffProc.waitForStarted())
+ return "Error waiting for diff process to start.";
+ if (!diffProc.waitForFinished())
+ return "Error waiting for diff process to finish.";
+ return diffProc.readAllStandardOutput();
+#else
+ return "Cannot launch diff. Please check allmocs.json and allmocs_baseline.json on disk.";
+#endif
+ };
+
+ QVERIFY2(actualOutput == expectedOutput, showPotentialDiff(actualOutput, expectedOutput).constData());
+}
+
QTEST_MAIN(tst_Moc)
// the generated code must compile with QT_NO_KEYWORDS
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index 0b08586f7d..5d380c899b 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -56,9 +56,16 @@
#include <QLineEdit>
#include <QGraphicsLinearLayout>
#include <QTransform>
+#include <QSharedPointer>
#include <float.h>
#include <QStyleHints>
+using AbstractGraphicsShapeItemPtr = QSharedPointer<QAbstractGraphicsShapeItem>;
+using GraphicsItems = QVector<QGraphicsItem *>;
+using GraphicsItemsList = QList<QGraphicsItem *>;
+
+Q_DECLARE_METATYPE(AbstractGraphicsShapeItemPtr)
+Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemFlags)
Q_DECLARE_METATYPE(QPainterPath)
Q_DECLARE_METATYPE(QSizeF)
Q_DECLARE_METATYPE(QTransform)
@@ -88,17 +95,17 @@ static void sendMousePress(QGraphicsScene *scene, const QPointF &point, Qt::Mous
event.setScenePos(point);
event.setButton(button);
event.setButtons(button);
- QApplication::sendEvent(scene, &event);
+ QCoreApplication::sendEvent(scene, &event);
}
static void sendMouseMove(QGraphicsScene *scene, const QPointF &point,
- Qt::MouseButton button = Qt::NoButton, Qt::MouseButtons /* buttons */ = 0)
+ Qt::MouseButton button = Qt::NoButton, Qt::MouseButtons /* buttons */ = {})
{
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseMove);
event.setScenePos(point);
event.setButton(button);
event.setButtons(button);
- QApplication::sendEvent(scene, &event);
+ QCoreApplication::sendEvent(scene, &event);
}
static void sendMouseRelease(QGraphicsScene *scene, const QPointF &point, Qt::MouseButton button = Qt::LeftButton)
@@ -106,7 +113,7 @@ static void sendMouseRelease(QGraphicsScene *scene, const QPointF &point, Qt::Mo
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseRelease);
event.setScenePos(point);
event.setButton(button);
- QApplication::sendEvent(scene, &event);
+ QCoreApplication::sendEvent(scene, &event);
}
static void sendMouseClick(QGraphicsScene *scene, const QPointF &point, Qt::MouseButton button = Qt::LeftButton)
@@ -118,13 +125,13 @@ static void sendMouseClick(QGraphicsScene *scene, const QPointF &point, Qt::Mous
static void sendKeyPress(QGraphicsScene *scene, Qt::Key key)
{
QKeyEvent keyEvent(QEvent::KeyPress, key, Qt::NoModifier);
- QApplication::sendEvent(scene, &keyEvent);
+ QCoreApplication::sendEvent(scene, &keyEvent);
}
static void sendKeyRelease(QGraphicsScene *scene, Qt::Key key)
{
QKeyEvent keyEvent(QEvent::KeyRelease, key, Qt::NoModifier);
- QApplication::sendEvent(scene, &keyEvent);
+ QCoreApplication::sendEvent(scene, &keyEvent);
}
static void sendKeyClick(QGraphicsScene *scene, Qt::Key key)
@@ -138,13 +145,13 @@ class EventSpy : public QGraphicsWidget
Q_OBJECT
public:
EventSpy(QObject *watched, QEvent::Type type)
- : _count(0), spied(type)
+ : spied(type)
{
watched->installEventFilter(this);
}
EventSpy(QGraphicsScene *scene, QGraphicsItem *watched, QEvent::Type type)
- : _count(0), spied(type)
+ : spied(type)
{
scene->addItem(this);
watched->installSceneEventFilter(this);
@@ -153,7 +160,7 @@ public:
int count() const { return _count; }
protected:
- bool eventFilter(QObject *watched, QEvent *event)
+ bool eventFilter(QObject *watched, QEvent *event) override
{
Q_UNUSED(watched);
if (event->type() == spied)
@@ -161,7 +168,7 @@ protected:
return false;
}
- bool sceneEventFilter(QGraphicsItem *watched, QEvent *event)
+ bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override
{
Q_UNUSED(watched);
if (event->type() == spied)
@@ -169,8 +176,8 @@ protected:
return false;
}
- int _count;
- QEvent::Type spied;
+ int _count = 0;
+ const QEvent::Type spied;
};
class EventSpy2 : public QGraphicsWidget
@@ -191,14 +198,14 @@ public:
QMap<QEvent::Type, int> counts;
protected:
- bool eventFilter(QObject *watched, QEvent *event)
+ bool eventFilter(QObject *watched, QEvent *event) override
{
Q_UNUSED(watched);
++counts[event->type()];
return false;
}
- bool sceneEventFilter(QGraphicsItem *watched, QEvent *event)
+ bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override
{
Q_UNUSED(watched);
++counts[event->type()];
@@ -209,8 +216,7 @@ protected:
class EventTester : public QGraphicsItem
{
public:
- EventTester(QGraphicsItem *parent = 0) : QGraphicsItem(parent), repaints(0)
- { br = QRectF(-10, -10, 20, 20); }
+ using QGraphicsItem::QGraphicsItem;
void setGeometry(const QRectF &rect)
{
@@ -219,10 +225,10 @@ public:
update();
}
- QRectF boundingRect() const
+ QRectF boundingRect() const override
{ return br; }
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *o, QWidget *)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *o, QWidget *) override
{
hints = painter->renderHints();
painter->setBrush(brush);
@@ -231,7 +237,7 @@ public:
++repaints;
}
- bool sceneEvent(QEvent *event)
+ bool sceneEvent(QEvent *event) override
{
events << event->type();
return QGraphicsItem::sceneEvent(event);
@@ -240,32 +246,39 @@ public:
void reset()
{
events.clear();
- hints = QPainter::RenderHints(0);
+ hints = QPainter::RenderHints{};
repaints = 0;
lastExposedRect = QRectF();
}
- QList<QEvent::Type> events;
+ QVector<QEvent::Type> events;
QPainter::RenderHints hints;
- int repaints;
- QRectF br;
+ int repaints = 0;
+ QRectF br = QRectF(-10, -10, 20, 20);
QRectF lastExposedRect;
QBrush brush;
};
class MyGraphicsView : public QGraphicsView
{
+ Q_OBJECT
public:
- int repaints;
QRegion paintedRegion;
- MyGraphicsView(QGraphicsScene *scene, QWidget *parent=0) : QGraphicsView(scene,parent), repaints(0) {}
- void paintEvent(QPaintEvent *e)
+ int repaints = 0;
+
+ using QGraphicsView::QGraphicsView;
+
+ void paintEvent(QPaintEvent *e) override
{
paintedRegion += e->region();
++repaints;
QGraphicsView::paintEvent(e);
}
- void reset() { repaints = 0; paintedRegion = QRegion(); }
+ void reset()
+ {
+ repaints = 0;
+ paintedRegion = QRegion();
+ }
};
class tst_QGraphicsItem : public QObject
@@ -276,6 +289,7 @@ public:
static void initMain();
private slots:
+ void cleanup();
void construction();
void constructionWithParent();
void destruction();
@@ -473,7 +487,7 @@ private slots:
void QTBUG_21618_untransformable_sceneTransform();
private:
- QList<QGraphicsItem *> paintedItems;
+ GraphicsItems paintedItems;
QTouchDevice *m_touchDevice = nullptr;
};
@@ -485,69 +499,76 @@ void tst_QGraphicsItem::initMain()
#endif
}
+void tst_QGraphicsItem::cleanup()
+{
+ QVERIFY(QApplication::topLevelWidgets().isEmpty());
+}
+
+template <class I>
+static inline I *createBlackShapeItem()
+{
+ auto result = new I;
+ result->setPen(QPen(Qt::black, 0));
+ return result;
+}
+
void tst_QGraphicsItem::construction()
{
for (int i = 0; i < 7; ++i) {
QGraphicsItem *item = nullptr;
switch (i) {
case 0:
- item = new QGraphicsEllipseItem;
- ((QGraphicsEllipseItem *)item)->setPen(QPen(Qt::black, 0));
- QCOMPARE(int(item->type()), int(QGraphicsEllipseItem::Type));
- QCOMPARE(qgraphicsitem_cast<QGraphicsEllipseItem *>(item), (QGraphicsEllipseItem *)item);
+ item = createBlackShapeItem<QGraphicsEllipseItem>();
+ QCOMPARE(item->type(), int(QGraphicsEllipseItem::Type));
+ QCOMPARE(qgraphicsitem_cast<QGraphicsEllipseItem *>(item), item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), nullptr);
QCOMPARE(item->flags(), 0);
break;
case 1:
- item = new QGraphicsLineItem;
- ((QGraphicsLineItem *)item)->setPen(QPen(Qt::black, 0));
+ item = createBlackShapeItem<QGraphicsLineItem>();
QCOMPARE(int(item->type()), int(QGraphicsLineItem::Type));
- QCOMPARE(qgraphicsitem_cast<QGraphicsLineItem *>(item), (QGraphicsLineItem *)item);
+ QCOMPARE(qgraphicsitem_cast<QGraphicsLineItem *>(item), item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), nullptr);
QCOMPARE(item->flags(), 0);
break;
case 2:
- item = new QGraphicsPathItem;
- ((QGraphicsPathItem *)item)->setPen(QPen(Qt::black, 0));
+ item = createBlackShapeItem<QGraphicsPathItem>();
QCOMPARE(int(item->type()), int(QGraphicsPathItem::Type));
- QCOMPARE(qgraphicsitem_cast<QGraphicsPathItem *>(item), (QGraphicsPathItem *)item);
+ QCOMPARE(qgraphicsitem_cast<QGraphicsPathItem *>(item), item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), nullptr);
QCOMPARE(item->flags(), 0);
break;
case 3:
item = new QGraphicsPixmapItem;
QCOMPARE(int(item->type()), int(QGraphicsPixmapItem::Type));
- QCOMPARE(qgraphicsitem_cast<QGraphicsPixmapItem *>(item), (QGraphicsPixmapItem *)item);
+ QCOMPARE(qgraphicsitem_cast<QGraphicsPixmapItem *>(item), item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), nullptr);
QCOMPARE(item->flags(), 0);
break;
case 4:
- item = new QGraphicsPolygonItem;
- ((QGraphicsPolygonItem *)item)->setPen(QPen(Qt::black, 0));
+ item = createBlackShapeItem<QGraphicsPolygonItem>();
QCOMPARE(int(item->type()), int(QGraphicsPolygonItem::Type));
- QCOMPARE(qgraphicsitem_cast<QGraphicsPolygonItem *>(item), (QGraphicsPolygonItem *)item);
+ QCOMPARE(qgraphicsitem_cast<QGraphicsPolygonItem *>(item), item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), nullptr);
QCOMPARE(item->flags(), 0);
break;
case 5:
- item = new QGraphicsRectItem;
- ((QGraphicsRectItem *)item)->setPen(QPen(Qt::black, 0));
+ item = createBlackShapeItem<QGraphicsRectItem>();
QCOMPARE(int(item->type()), int(QGraphicsRectItem::Type));
- QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), (QGraphicsRectItem *)item);
+ QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), item);
QCOMPARE(qgraphicsitem_cast<QGraphicsLineItem *>(item), nullptr);
QCOMPARE(item->flags(), 0);
break;
case 6:
item = new QGraphicsTextItem;
QCOMPARE(int(item->type()), int(QGraphicsTextItem::Type));
- QCOMPARE(qgraphicsitem_cast<QGraphicsTextItem *>(item), (QGraphicsTextItem *)item);
+ QCOMPARE(qgraphicsitem_cast<QGraphicsTextItem *>(item), item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), nullptr);
// This is the only item that uses an extended style option.
QCOMPARE(item->flags(), QGraphicsItem::GraphicsItemFlags(QGraphicsItem::ItemUsesExtendedStyleOption));
break;
default:
qFatal("You broke the logic, please fix!");
- break;
}
QCOMPARE(item->scene(), nullptr);
@@ -569,10 +590,10 @@ void tst_QGraphicsItem::construction()
QCOMPARE(item->sceneBoundingRect(), QRectF());
QCOMPARE(item->shape(), QPainterPath());
QVERIFY(!item->contains(QPointF(0, 0)));
- QVERIFY(!item->collidesWithItem(0));
+ QVERIFY(!item->collidesWithItem(nullptr));
QVERIFY(item->collidesWithItem(item));
QVERIFY(!item->collidesWithPath(QPainterPath()));
- QVERIFY(!item->isAncestorOf(0));
+ QVERIFY(!item->isAncestorOf(nullptr));
QVERIFY(!item->isAncestorOf(item));
QCOMPARE(item->data(0), QVariant());
delete item;
@@ -582,17 +603,18 @@ void tst_QGraphicsItem::construction()
class BoundingRectItem : public QGraphicsRectItem
{
public:
- BoundingRectItem(QGraphicsItem *parent = 0)
+ BoundingRectItem(QGraphicsItem *parent = nullptr)
: QGraphicsRectItem(0, 0, parent ? 200 : 100, parent ? 200 : 100,
parent)
{
setPen(QPen(Qt::black, 0));
}
- QRectF boundingRect() const
+ QRectF boundingRect() const override
{
QRectF tmp = QGraphicsRectItem::boundingRect();
- foreach (QGraphicsItem *child, childItems())
+ const auto children = childItems();
+ for (QGraphicsItem *child : children)
tmp |= child->boundingRect(); // <- might be pure virtual
return tmp;
}
@@ -608,11 +630,11 @@ void tst_QGraphicsItem::constructionWithParent()
scene.addItem(item0);
scene.addItem(item1);
QGraphicsItem *item2 = new BoundingRectItem(item1);
- QCOMPARE(item1->childItems(), QList<QGraphicsItem *>() << item2);
+ QCOMPARE(item1->childItems(), GraphicsItemsList{item2});
QCOMPARE(item1->boundingRect(), QRectF(0, 0, 200, 200));
item2->setParentItem(item0);
- QCOMPARE(item0->childItems(), QList<QGraphicsItem *>() << item2);
+ QCOMPARE(item0->childItems(), GraphicsItemsList{item2});
QCOMPARE(item0->boundingRect(), QRectF(0, 0, 200, 200));
}
@@ -760,7 +782,7 @@ void tst_QGraphicsItem::destruction()
QGraphicsScene scene;
QGraphicsItem *root = new QGraphicsRectItem;
QGraphicsItem *parent = root;
- QGraphicsItem *middleItem = 0;
+ QGraphicsItem *middleItem = nullptr;
for (int i = 0; i < 99; ++i) {
Item *child = new Item;
child->setParentItem(parent);
@@ -801,7 +823,7 @@ void tst_QGraphicsItem::deleteChildItem()
QGraphicsItem *child3 = new QGraphicsRectItem(rect);
Q_UNUSED(child3);
delete child1;
- child2->setParentItem(0);
+ child2->setParentItem(nullptr);
delete child2;
}
@@ -812,11 +834,11 @@ void tst_QGraphicsItem::scene()
QGraphicsScene scene;
scene.addItem(item);
- QCOMPARE(item->scene(), (QGraphicsScene *)&scene);
+ QCOMPARE(item->scene(), &scene);
QGraphicsScene scene2;
scene2.addItem(item);
- QCOMPARE(item->scene(), (QGraphicsScene *)&scene2);
+ QCOMPARE(item->scene(), &scene2);
scene2.removeItem(item);
QCOMPARE(item->scene(), nullptr);
@@ -830,10 +852,10 @@ void tst_QGraphicsItem::parentItem()
QCOMPARE(item.parentItem(), nullptr);
QGraphicsRectItem *item2 = new QGraphicsRectItem(QRectF(), &item);
- QCOMPARE(item2->parentItem(), (QGraphicsItem *)&item);
+ QCOMPARE(item2->parentItem(), &item);
item2->setParentItem(&item);
- QCOMPARE(item2->parentItem(), (QGraphicsItem *)&item);
- item2->setParentItem(0);
+ QCOMPARE(item2->parentItem(), &item);
+ item2->setParentItem(nullptr);
QCOMPARE(item2->parentItem(), nullptr);
delete item2;
@@ -853,7 +875,7 @@ void tst_QGraphicsItem::setParentItem()
QCOMPARE(child->scene(), &scene);
// This just makes it a toplevel
- child->setParentItem(0);
+ child->setParentItem(nullptr);
QCOMPARE(child->scene(), &scene);
// Add the child back to the parent, then remove the parent from the scene
@@ -869,7 +891,7 @@ void tst_QGraphicsItem::children()
QGraphicsRectItem *item2 = new QGraphicsRectItem(QRectF(), &item);
QCOMPARE(item.childItems().size(), 1);
- QCOMPARE(item.childItems().first(), (QGraphicsItem *)item2);
+ QCOMPARE(item.childItems().constFirst(), item2);
QVERIFY(item2->childItems().isEmpty());
delete item2;
@@ -883,7 +905,7 @@ void tst_QGraphicsItem::flags()
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
scene.addItem(item);
@@ -925,20 +947,20 @@ void tst_QGraphicsItem::flags()
event.setScenePos(QPointF(0, 0));
event.setButton(Qt::LeftButton);
event.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(scene.mouseGrabberItem(), nullptr); // mouse grabber is reset
QGraphicsSceneMouseEvent event2(QEvent::GraphicsSceneMouseMove);
event2.setScenePos(QPointF(10, 10));
event2.setButton(Qt::LeftButton);
event2.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event2);
+ QCoreApplication::sendEvent(&scene, &event2);
QCOMPARE(item->pos(), QPointF());
QGraphicsSceneMouseEvent event3(QEvent::GraphicsSceneMouseRelease);
event3.setScenePos(QPointF(10, 10));
- event3.setButtons(0);
- QApplication::sendEvent(&scene, &event3);
+ event3.setButtons({});
+ QCoreApplication::sendEvent(&scene, &event3);
QCOMPARE(scene.mouseGrabberItem(), nullptr);
item->setFlag(QGraphicsItem::ItemIsMovable, true);
@@ -946,13 +968,13 @@ void tst_QGraphicsItem::flags()
event4.setScenePos(QPointF(0, 0));
event4.setButton(Qt::LeftButton);
event4.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event4);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)item);
+ QCoreApplication::sendEvent(&scene, &event4);
+ QCOMPARE(scene.mouseGrabberItem(), item);
QGraphicsSceneMouseEvent event5(QEvent::GraphicsSceneMouseMove);
event5.setScenePos(QPointF(10, 10));
event5.setButton(Qt::LeftButton);
event5.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event5);
+ QCoreApplication::sendEvent(&scene, &event5);
QCOMPARE(item->pos(), QPointF(10, 10));
}
{
@@ -975,8 +997,8 @@ void tst_QGraphicsItem::flags()
class ImhTester : public QGraphicsItem
{
- QRectF boundingRect() const { return QRectF(); }
- void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) {}
+ QRectF boundingRect() const override { return QRectF(); }
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override {}
};
void tst_QGraphicsItem::inputMethodHints()
@@ -996,6 +1018,7 @@ void tst_QGraphicsItem::inputMethodHints()
scene.addItem(item2);
QGraphicsView view(&scene);
QApplication::setActiveWindow(&view);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(QTest::qWaitForWindowActive(&view));
@@ -1045,6 +1068,7 @@ void tst_QGraphicsItem::toolTip()
scene.addItem(item);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.setFixedSize(200, 200);
view.show();
QApplication::setActiveWindow(&view);
@@ -1053,12 +1077,13 @@ void tst_QGraphicsItem::toolTip()
{
QHelpEvent helpEvent(QEvent::ToolTip, view.viewport()->rect().topLeft(),
view.viewport()->mapToGlobal(view.viewport()->rect().topLeft()));
- QApplication::sendEvent(view.viewport(), &helpEvent);
+ QCoreApplication::sendEvent(view.viewport(), &helpEvent);
QTest::qWait(250);
bool foundView = false;
bool foundTipLabel = false;
- foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ const auto topLevels = QApplication::topLevelWidgets();
+ for (auto widget : topLevels) {
if (widget == &view)
foundView = true;
if (widget->inherits("QTipLabel"))
@@ -1071,12 +1096,13 @@ void tst_QGraphicsItem::toolTip()
{
QHelpEvent helpEvent(QEvent::ToolTip, view.viewport()->rect().center(),
view.viewport()->mapToGlobal(view.viewport()->rect().center()));
- QApplication::sendEvent(view.viewport(), &helpEvent);
+ QCoreApplication::sendEvent(view.viewport(), &helpEvent);
QTest::qWait(250);
bool foundView = false;
bool foundTipLabel = false;
- foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ const auto topLevels = QApplication::topLevelWidgets();
+ for (auto widget : topLevels) {
if (widget == &view)
foundView = true;
if (widget->inherits("QTipLabel"))
@@ -1089,12 +1115,13 @@ void tst_QGraphicsItem::toolTip()
{
QHelpEvent helpEvent(QEvent::ToolTip, view.viewport()->rect().topLeft(),
view.viewport()->mapToGlobal(view.viewport()->rect().topLeft()));
- QApplication::sendEvent(view.viewport(), &helpEvent);
+ QCoreApplication::sendEvent(view.viewport(), &helpEvent);
QTest::qWait(1000);
bool foundView = false;
bool foundTipLabel = false;
- foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ const auto topLevels = QApplication::topLevelWidgets();
+ for (auto widget : topLevels) {
if (widget == &view)
foundView = true;
if (widget->inherits("QTipLabel") && widget->isVisible())
@@ -1117,7 +1144,7 @@ void tst_QGraphicsItem::visible()
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
scene.addItem(item);
QVERIFY(item->isVisible());
@@ -1130,7 +1157,7 @@ void tst_QGraphicsItem::visible()
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
event.setButton(Qt::LeftButton);
event.setScenePos(QPointF(0, 0));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(scene.mouseGrabberItem(), item);
item->setVisible(false);
QCOMPARE(scene.mouseGrabberItem(), nullptr);
@@ -1161,14 +1188,14 @@ void tst_QGraphicsItem::isVisibleTo()
QVERIFY(grandChild->isVisibleTo(grandChild));
QVERIFY(grandChild->isVisibleTo(child));
QVERIFY(grandChild->isVisibleTo(parent));
- QVERIFY(grandChild->isVisibleTo(0));
+ QVERIFY(grandChild->isVisibleTo(nullptr));
QVERIFY(child->isVisible());
QVERIFY(child->isVisibleTo(child));
QVERIFY(child->isVisibleTo(parent));
- QVERIFY(child->isVisibleTo(0));
+ QVERIFY(child->isVisibleTo(nullptr));
QVERIFY(parent->isVisible());
QVERIFY(parent->isVisibleTo(parent));
- QVERIFY(parent->isVisibleTo(0));
+ QVERIFY(parent->isVisibleTo(nullptr));
QVERIFY(!parent->isVisibleTo(child));
QVERIFY(!child->isVisibleTo(grandChild));
QVERIFY(!grandChild->isVisibleTo(stranger));
@@ -1185,14 +1212,14 @@ void tst_QGraphicsItem::isVisibleTo()
QVERIFY(grandChild->isVisibleTo(grandChild));
QVERIFY(grandChild->isVisibleTo(child));
QVERIFY(grandChild->isVisibleTo(parent));
- QVERIFY(!grandChild->isVisibleTo(0));
+ QVERIFY(!grandChild->isVisibleTo(nullptr));
QVERIFY(!child->isVisible());
QVERIFY(child->isVisibleTo(child));
QVERIFY(child->isVisibleTo(parent));
- QVERIFY(!child->isVisibleTo(0));
+ QVERIFY(!child->isVisibleTo(nullptr));
QVERIFY(!parent->isVisible());
QVERIFY(!parent->isVisibleTo(parent));
- QVERIFY(!parent->isVisibleTo(0));
+ QVERIFY(!parent->isVisibleTo(nullptr));
QVERIFY(!parent->isVisibleTo(child));
QVERIFY(!child->isVisibleTo(grandChild));
QVERIFY(!grandChild->isVisibleTo(stranger));
@@ -1210,14 +1237,14 @@ void tst_QGraphicsItem::isVisibleTo()
QVERIFY(grandChild->isVisibleTo(grandChild));
QVERIFY(grandChild->isVisibleTo(child));
QVERIFY(!grandChild->isVisibleTo(parent));
- QVERIFY(!grandChild->isVisibleTo(0));
+ QVERIFY(!grandChild->isVisibleTo(nullptr));
QVERIFY(!child->isVisible());
QVERIFY(!child->isVisibleTo(child));
QVERIFY(!child->isVisibleTo(parent));
- QVERIFY(!child->isVisibleTo(0));
+ QVERIFY(!child->isVisibleTo(nullptr));
QVERIFY(parent->isVisible());
QVERIFY(parent->isVisibleTo(parent));
- QVERIFY(parent->isVisibleTo(0));
+ QVERIFY(parent->isVisibleTo(nullptr));
QVERIFY(!parent->isVisibleTo(child));
QVERIFY(!child->isVisibleTo(grandChild));
QVERIFY(!grandChild->isVisibleTo(stranger));
@@ -1235,14 +1262,14 @@ void tst_QGraphicsItem::isVisibleTo()
QVERIFY(!grandChild->isVisibleTo(grandChild));
QVERIFY(!grandChild->isVisibleTo(child));
QVERIFY(!grandChild->isVisibleTo(parent));
- QVERIFY(!grandChild->isVisibleTo(0));
+ QVERIFY(!grandChild->isVisibleTo(nullptr));
QVERIFY(child->isVisible());
QVERIFY(child->isVisibleTo(child));
QVERIFY(child->isVisibleTo(parent));
- QVERIFY(child->isVisibleTo(0));
+ QVERIFY(child->isVisibleTo(nullptr));
QVERIFY(parent->isVisible());
QVERIFY(parent->isVisibleTo(parent));
- QVERIFY(parent->isVisibleTo(0));
+ QVERIFY(parent->isVisibleTo(nullptr));
QVERIFY(!parent->isVisibleTo(child));
QVERIFY(!child->isVisibleTo(grandChild));
QVERIFY(!grandChild->isVisibleTo(stranger));
@@ -1349,7 +1376,7 @@ void tst_QGraphicsItem::explicitlyVisible()
// Reparent implicitly hidden child to root.
parent2->hide();
QVERIFY(!child->isVisible());
- child->setParentItem(0);
+ child->setParentItem(nullptr);
QVERIFY(child->isVisible());
// Reparent an explicitly hidden child to root.
@@ -1357,7 +1384,7 @@ void tst_QGraphicsItem::explicitlyVisible()
child->setParentItem(parent2);
parent2->show();
QVERIFY(!child->isVisible());
- child->setParentItem(0);
+ child->setParentItem(nullptr);
QVERIFY(!child->isVisible());
}
@@ -1374,7 +1401,7 @@ void tst_QGraphicsItem::enabled()
item->setFlag(QGraphicsItem::ItemIsFocusable);
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
scene.addItem(item);
item->setFocus();
@@ -1388,11 +1415,11 @@ void tst_QGraphicsItem::enabled()
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
event.setButton(Qt::LeftButton);
event.setScenePos(QPointF(0, 0));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(scene.mouseGrabberItem(), nullptr);
item->setEnabled(true);
- QApplication::sendEvent(&scene, &event);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)item);
+ QCoreApplication::sendEvent(&scene, &event);
+ QCOMPARE(scene.mouseGrabberItem(), item);
item->setEnabled(false);
QCOMPARE(scene.mouseGrabberItem(), nullptr);
}
@@ -1493,7 +1520,7 @@ void tst_QGraphicsItem::explicitlyEnabled()
// Reparent implicitly hidden child to root.
parent2->setEnabled(false);
QVERIFY(!child->isEnabled());
- child->setParentItem(0);
+ child->setParentItem(nullptr);
QVERIFY(child->isEnabled());
// Reparent an explicitly hidden child to root.
@@ -1501,7 +1528,7 @@ void tst_QGraphicsItem::explicitlyEnabled()
child->setParentItem(parent2);
parent2->setEnabled(true);
QVERIFY(!child->isEnabled());
- child->setParentItem(0);
+ child->setParentItem(nullptr);
QVERIFY(!child->isEnabled());
}
@@ -1509,10 +1536,10 @@ class SelectChangeItem : public QGraphicsRectItem
{
public:
SelectChangeItem() : QGraphicsRectItem(-50, -50, 100, 100) { setBrush(Qt::blue); }
- QList<bool> values;
+ QVector<bool> values;
protected:
- QVariant itemChange(GraphicsItemChange change, const QVariant &value)
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
{
if (change == ItemSelectedChange)
values << value.toBool();
@@ -1528,70 +1555,71 @@ void tst_QGraphicsItem::selected()
QVERIFY(item->values.isEmpty());
item->setSelected(true);
QCOMPARE(item->values.size(), 1);
- QCOMPARE(item->values.last(), true);
+ QCOMPARE(item->values.constLast(), true);
QVERIFY(item->isSelected());
item->setSelected(false);
QCOMPARE(item->values.size(), 2);
- QCOMPARE(item->values.last(), false);
+ QCOMPARE(item->values.constLast(), false);
QVERIFY(!item->isSelected());
item->setSelected(true);
QCOMPARE(item->values.size(), 3);
item->setEnabled(false);
QCOMPARE(item->values.size(), 4);
- QCOMPARE(item->values.last(), false);
+ QCOMPARE(item->values.constLast(), false);
QVERIFY(!item->isSelected());
item->setEnabled(true);
QCOMPARE(item->values.size(), 4);
item->setSelected(true);
QCOMPARE(item->values.size(), 5);
- QCOMPARE(item->values.last(), true);
+ QCOMPARE(item->values.constLast(), true);
QVERIFY(item->isSelected());
item->setVisible(false);
QCOMPARE(item->values.size(), 6);
- QCOMPARE(item->values.last(), false);
+ QCOMPARE(item->values.constLast(), false);
QVERIFY(!item->isSelected());
item->setVisible(true);
QCOMPARE(item->values.size(), 6);
item->setSelected(true);
QCOMPARE(item->values.size(), 7);
- QCOMPARE(item->values.last(), true);
+ QCOMPARE(item->values.constLast(), true);
QVERIFY(item->isSelected());
QGraphicsScene scene(-100, -100, 200, 200);
scene.addItem(item);
- QCOMPARE(scene.selectedItems(), QList<QGraphicsItem *>() << item);
+ QCOMPARE(scene.selectedItems(), GraphicsItemsList{item});
item->setSelected(false);
QVERIFY(scene.selectedItems().isEmpty());
item->setSelected(true);
- QCOMPARE(scene.selectedItems(), QList<QGraphicsItem *>() << item);
+ QCOMPARE(scene.selectedItems(), GraphicsItemsList{item});
item->setSelected(false);
QVERIFY(scene.selectedItems().isEmpty());
// Interactive selection
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.setFixedSize(250, 250);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
- qApp->processEvents();
- qApp->processEvents();
+ QCoreApplication::processEvents();
+ QCoreApplication::processEvents();
scene.clearSelection();
QCOMPARE(item->values.size(), 10);
- QCOMPARE(item->values.last(), false);
+ QCOMPARE(item->values.constLast(), false);
QVERIFY(!item->isSelected());
// Click inside and check that it's selected
QTest::mouseMove(view.viewport());
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item->scenePos()));
QCOMPARE(item->values.size(), 11);
- QCOMPARE(item->values.last(), true);
+ QCOMPARE(item->values.constLast(), true);
QVERIFY(item->isSelected());
// Click outside and check that it's not selected
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos() + QPointF(item->boundingRect().width(), item->boundingRect().height())));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item->scenePos() + QPointF(item->boundingRect().width(), item->boundingRect().height())));
QCOMPARE(item->values.size(), 12);
- QCOMPARE(item->values.last(), false);
+ QCOMPARE(item->values.constLast(), false);
QVERIFY(!item->isSelected());
SelectChangeItem *item2 = new SelectChangeItem;
@@ -1600,18 +1628,18 @@ void tst_QGraphicsItem::selected()
scene.addItem(item2);
// Click inside and check that it's selected
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item->scenePos()));
QCOMPARE(item->values.size(), 13);
- QCOMPARE(item->values.last(), true);
+ QCOMPARE(item->values.constLast(), true);
QVERIFY(item->isSelected());
// Click inside item2 and check that it's selected, and item is not
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item2->scenePos()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item2->scenePos()));
QCOMPARE(item->values.size(), 14);
- QCOMPARE(item->values.last(), false);
+ QCOMPARE(item->values.constLast(), false);
QVERIFY(!item->isSelected());
QCOMPARE(item2->values.size(), 1);
- QCOMPARE(item2->values.last(), true);
+ QCOMPARE(item2->values.constLast(), true);
QVERIFY(item2->isSelected());
}
@@ -1632,7 +1660,7 @@ void tst_QGraphicsItem::selected2()
QGraphicsSceneMouseEvent mousePress(QEvent::GraphicsSceneMousePress);
mousePress.setScenePos(QPointF(50, 50));
mousePress.setButton(Qt::LeftButton);
- QApplication::sendEvent(&scene, &mousePress);
+ QCoreApplication::sendEvent(&scene, &mousePress);
QVERIFY(mousePress.isAccepted());
}
{
@@ -1640,7 +1668,7 @@ void tst_QGraphicsItem::selected2()
mouseMove.setScenePos(QPointF(60, 60));
mouseMove.setButton(Qt::LeftButton);
mouseMove.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &mouseMove);
+ QCoreApplication::sendEvent(&scene, &mouseMove);
QVERIFY(mouseMove.isAccepted());
}
}
@@ -1657,10 +1685,11 @@ void tst_QGraphicsItem::selected_group()
leaf->setFlag(QGraphicsItem::ItemIsSelectable);
leaf->setParentItem(item2);
- QGraphicsItemGroup *group = scene.createItemGroup(QList<QGraphicsItem *>() << item1 << item2);
+ QGraphicsItemGroup *group = scene.createItemGroup(GraphicsItemsList{item1, item2});
QCOMPARE(group->scene(), &scene);
group->setFlag(QGraphicsItem::ItemIsSelectable);
- foreach (QGraphicsItem *item, scene.items()) {
+ const auto items = scene.items();
+ for (QGraphicsItem *item : items) {
if (item == group)
QVERIFY(!item->group());
else
@@ -1673,18 +1702,16 @@ void tst_QGraphicsItem::selected_group()
QVERIFY(!group->isSelected());
group->setSelected(true);
QVERIFY(group->isSelected());
- foreach (QGraphicsItem *item, scene.items())
- QVERIFY(item->isSelected());
+
+ const auto itemIsSelected = [](const QGraphicsItem *item) { return item->isSelected(); };
+ QVERIFY(std::all_of(items.cbegin(), items.cend(), itemIsSelected));
group->setSelected(false);
QVERIFY(!group->isSelected());
- foreach (QGraphicsItem *item, scene.items())
- QVERIFY(!item->isSelected());
+ QVERIFY(std::none_of(items.cbegin(), items.cend(), itemIsSelected));
leaf->setSelected(true);
- foreach (QGraphicsItem *item, scene.items())
- QVERIFY(item->isSelected());
+ QVERIFY(std::all_of(items.cbegin(), items.cend(), itemIsSelected));
leaf->setSelected(false);
- foreach (QGraphicsItem *item, scene.items())
- QVERIFY(!item->isSelected());
+ QVERIFY(std::none_of(items.cbegin(), items.cend(), itemIsSelected));
leaf->setSelected(true);
QGraphicsScene scene2;
@@ -1700,18 +1727,19 @@ void tst_QGraphicsItem::selected_textItem()
text->setFlag(QGraphicsItem::ItemIsSelectable);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QTRY_VERIFY(!text->isSelected());
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0,
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {},
view.mapFromScene(text->mapToScene(0, 0)));
QTRY_VERIFY(text->isSelected());
text->setSelected(false);
text->setTextInteractionFlags(Qt::TextEditorInteraction);
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0,
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {},
view.mapFromScene(text->mapToScene(0, 0)));
QTRY_VERIFY(text->isSelected());
}
@@ -1733,6 +1761,7 @@ void tst_QGraphicsItem::selected_multi()
// Create and show a view
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
view.fitInView(scene.sceneRect());
QVERIFY(QTest::qWaitForWindowActive(&view));
@@ -1741,12 +1770,12 @@ void tst_QGraphicsItem::selected_multi()
QVERIFY(!item2->isSelected());
// Click on item1
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item1->scenePos()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item1->scenePos()));
QVERIFY(item1->isSelected());
QVERIFY(!item2->isSelected());
// Click on item2
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item2->scenePos()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item2->scenePos()));
QVERIFY(item2->isSelected());
QVERIFY(!item1->isSelected());
@@ -1766,17 +1795,17 @@ void tst_QGraphicsItem::selected_multi()
QVERIFY(!item1->isSelected());
// Click on item1
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item1->scenePos()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item1->scenePos()));
QVERIFY(item1->isSelected());
QVERIFY(!item2->isSelected());
// Click on scene
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(0, 0));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(0, 0));
QVERIFY(!item1->isSelected());
QVERIFY(!item2->isSelected());
// Click on item1
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item1->scenePos()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item1->scenePos()));
QVERIFY(item1->isSelected());
QVERIFY(!item2->isSelected());
@@ -1786,27 +1815,27 @@ void tst_QGraphicsItem::selected_multi()
QVERIFY(!item2->isSelected());
// Click on scene
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(0, 0));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(0, 0));
QVERIFY(!item1->isSelected());
QVERIFY(!item2->isSelected());
// Click on item1
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item1->scenePos()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item1->scenePos()));
QVERIFY(item1->isSelected());
QVERIFY(!item2->isSelected());
// Press on item2
- QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item2->scenePos()));
+ QTest::mousePress(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item2->scenePos()));
QVERIFY(!item1->isSelected());
QVERIFY(item2->isSelected());
// Release on item2
- QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item2->scenePos()));
+ QTest::mouseRelease(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item2->scenePos()));
QVERIFY(!item1->isSelected());
QVERIFY(item2->isSelected());
// Click on item1
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item1->scenePos()));
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item1->scenePos()));
QVERIFY(item1->isSelected());
QVERIFY(!item2->isSelected());
@@ -1824,7 +1853,7 @@ void tst_QGraphicsItem::selected_multi()
// Ctrl-move on item1
const QPoint item1Point = view.mapFromScene(item1->scenePos()) + QPoint(1, 0);
QMouseEvent event(QEvent::MouseMove, item1Point, view.viewport()->mapToGlobal(item1Point), Qt::LeftButton, Qt::LeftButton, Qt::ControlModifier);
- QApplication::sendEvent(view.viewport(), &event);
+ QCoreApplication::sendEvent(view.viewport(), &event);
QVERIFY(!item1->isSelected());
QVERIFY(!item2->isSelected());
}
@@ -1846,7 +1875,7 @@ void tst_QGraphicsItem::selected_multi()
// Ctrl-move on item1
const QPoint item1Point = view.mapFromScene(item1->scenePos()) + QPoint(1, 0);
QMouseEvent event(QEvent::MouseMove, item1Point, view.viewport()->mapToGlobal(item1Point), Qt::LeftButton, Qt::LeftButton, Qt::ControlModifier);
- QApplication::sendEvent(view.viewport(), &event);
+ QCoreApplication::sendEvent(view.viewport(), &event);
QVERIFY(item1->isSelected());
QVERIFY(!item2->isSelected());
}
@@ -1873,33 +1902,30 @@ void tst_QGraphicsItem::acceptedMouseButtons()
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
event.setButton(Qt::LeftButton);
event.setScenePos(QPointF(0, 0));
- QApplication::sendEvent(&scene, &event);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)item2);
- item2->setAcceptedMouseButtons(0);
+ QCoreApplication::sendEvent(&scene, &event);
+ QCOMPARE(scene.mouseGrabberItem(), item2);
+ item2->setAcceptedMouseButtons(nullptr);
QCOMPARE(scene.mouseGrabberItem(), nullptr);
- QApplication::sendEvent(&scene, &event);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)item1);
+ QCoreApplication::sendEvent(&scene, &event);
+ QCOMPARE(scene.mouseGrabberItem(), item1);
}
class HoverItem : public QGraphicsRectItem
{
public:
- HoverItem(const QRectF &rect)
- : QGraphicsRectItem(rect), hoverInCount(0),
- hoverMoveCount(0), hoverOutCount(0)
- { }
+ HoverItem(const QRectF &rect) : QGraphicsRectItem(rect) { }
- int hoverInCount;
- int hoverMoveCount;
- int hoverOutCount;
+ int hoverInCount = 0;
+ int hoverMoveCount = 0;
+ int hoverOutCount = 0;
protected:
- void hoverEnterEvent(QGraphicsSceneHoverEvent *)
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *) override
{ ++hoverInCount; }
- void hoverMoveEvent(QGraphicsSceneHoverEvent *)
+ void hoverMoveEvent(QGraphicsSceneHoverEvent *) override
{ ++hoverMoveCount; }
- void hoverLeaveEvent(QGraphicsSceneHoverEvent *)
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override
{ ++hoverOutCount; }
};
@@ -1919,9 +1945,9 @@ void tst_QGraphicsItem::acceptHoverEvents()
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseMove);
event.setScenePos(QPointF(-100, -100));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
event.setScenePos(QPointF(-2.5, -2.5));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(item1->hoverInCount, 0);
QCOMPARE(item2->hoverInCount, 1);
@@ -1930,9 +1956,9 @@ void tst_QGraphicsItem::acceptHoverEvents()
item2->setAcceptHoverEvents(false);
event.setScenePos(QPointF(-100, -100));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
event.setScenePos(QPointF(-2.5, -2.5));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(item1->hoverInCount, 0);
QCOMPARE(item2->hoverInCount, 1);
@@ -1941,9 +1967,9 @@ void tst_QGraphicsItem::acceptHoverEvents()
item2->setAcceptHoverEvents(false);
event.setScenePos(QPointF(-100, -100));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
event.setScenePos(QPointF(-2.5, -2.5));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(item1->hoverInCount, 1);
QCOMPARE(item2->hoverInCount, 1);
@@ -1962,7 +1988,7 @@ void tst_QGraphicsItem::childAcceptsHoverEvents()
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseMove);
event.setScenePos(QPointF(-100, -100));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(item2->hoverInCount, 0);
QCOMPARE(item2->hoverMoveCount, 0);
QCOMPARE(item2->hoverOutCount, 0);
@@ -1971,7 +1997,7 @@ void tst_QGraphicsItem::childAcceptsHoverEvents()
QCOMPARE(item1->hoverOutCount, 0);
event.setScenePos(QPointF(-2.5, -2.5));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(item2->hoverInCount, 1);
QCOMPARE(item2->hoverMoveCount, 1);
@@ -1981,7 +2007,7 @@ void tst_QGraphicsItem::childAcceptsHoverEvents()
QCOMPARE(item1->hoverOutCount, 0);
event.setScenePos(QPointF(0, 0));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(item2->hoverInCount, 1);
QCOMPARE(item2->hoverMoveCount, 2);
@@ -1991,7 +2017,7 @@ void tst_QGraphicsItem::childAcceptsHoverEvents()
QCOMPARE(item1->hoverOutCount, 0);
event.setScenePos(QPointF(-7, -7));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(item2->hoverInCount, 1);
QCOMPARE(item2->hoverMoveCount, 2);
@@ -2001,7 +2027,7 @@ void tst_QGraphicsItem::childAcceptsHoverEvents()
QCOMPARE(item1->hoverOutCount, 0);
event.setScenePos(QPointF(0, 0));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(item2->hoverInCount, 2);
QCOMPARE(item2->hoverMoveCount, 3);
@@ -2016,10 +2042,10 @@ void tst_QGraphicsItem::childAcceptsHoverEvents()
item0->setAcceptHoverEvents(true);
event.setScenePos(QPointF(-100, -100));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
event.setScenePos(QPointF(-15, -15));
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(item2->hoverInCount, 2);
QCOMPARE(item2->hoverMoveCount, 3);
@@ -2041,7 +2067,7 @@ void tst_QGraphicsItem::hasFocus()
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
scene.addItem(line);
@@ -2052,7 +2078,7 @@ void tst_QGraphicsItem::hasFocus()
QVERIFY(line->hasFocus());
QGraphicsScene scene2;
- QApplication::sendEvent(&scene2, &activate);
+ QCoreApplication::sendEvent(&scene2, &activate);
scene2.addItem(line);
QVERIFY(!line->hasFocus());
@@ -2193,13 +2219,13 @@ void tst_QGraphicsItem::sceneTransform()
void tst_QGraphicsItem::setTransform()
{
QGraphicsScene scene;
- QSignalSpy spy(&scene, SIGNAL(changed(QList<QRectF>)));
+ QSignalSpy spy(&scene, &QGraphicsScene::changed);
QRectF unrotatedRect(-12, -34, 56, 78);
- QGraphicsRectItem item(unrotatedRect, 0);
+ QGraphicsRectItem item(unrotatedRect, nullptr);
item.setPen(QPen(Qt::black, 0));
scene.addItem(&item);
scene.update(scene.sceneRect());
- QApplication::instance()->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(spy.count(), 1);
@@ -2207,14 +2233,14 @@ void tst_QGraphicsItem::setTransform()
QRectF rotatedRect = scene.sceneRect();
QVERIFY(unrotatedRect != rotatedRect);
scene.update(scene.sceneRect());
- QApplication::instance()->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(spy.count(), 2);
item.setTransform(QTransform());
scene.update(scene.sceneRect());
- QApplication::instance()->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(spy.count(), 3);
QList<QRectF> rlist = qvariant_cast<QList<QRectF> >(spy.last().at(0));
@@ -2226,15 +2252,18 @@ void tst_QGraphicsItem::setTransform()
QCOMPARE(rlist.at(1), unrotatedRect); // From post-update (update current state)
}
-static QList<QGraphicsItem *> _paintedItems;
+static GraphicsItems _paintedItems;
class PainterItem : public QGraphicsItem
{
protected:
- QRectF boundingRect() const
+ QRectF boundingRect() const override
{ return QRectF(-10, -10, 20, 20); }
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
- { _paintedItems << this; painter->fillRect(boundingRect(), Qt::red); }
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
+ {
+ _paintedItems << this;
+ painter->fillRect(boundingRect(), Qt::red);
+ }
};
void tst_QGraphicsItem::zValue()
@@ -2257,6 +2286,7 @@ void tst_QGraphicsItem::zValue()
item3->setZValue(0);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -2467,12 +2497,12 @@ void tst_QGraphicsItem::collidesWith_item()
{
QGraphicsScene scene;
- QGraphicsRectItem rect(20, 20, 100, 100, 0);
+ QGraphicsRectItem rect(20, 20, 100, 100, nullptr);
scene.addItem(&rect);
- QGraphicsRectItem rect2(40, 40, 50, 50, 0);
+ QGraphicsRectItem rect2(40, 40, 50, 50, nullptr);
scene.addItem(&rect2);
rect2.setZValue(1);
- QGraphicsLineItem line(0, 0, 200, 200, 0);
+ QGraphicsLineItem line(0, 0, 200, 200, nullptr);
scene.addItem(&line);
line.setZValue(2);
@@ -2480,18 +2510,18 @@ void tst_QGraphicsItem::collidesWith_item()
QList<QGraphicsItem *> col1 = rect.collidingItems();
QCOMPARE(col1.size(), 2);
- QCOMPARE(col1.first(), static_cast<QGraphicsItem *>(&line));
- QCOMPARE(col1.last(), static_cast<QGraphicsItem *>(&rect2));
+ QCOMPARE(col1.constFirst(), &line);
+ QCOMPARE(col1.constLast(), &rect2);
QList<QGraphicsItem *> col2 = rect2.collidingItems();
QCOMPARE(col2.size(), 2);
- QCOMPARE(col2.first(), static_cast<QGraphicsItem *>(&line));
- QCOMPARE(col2.last(), static_cast<QGraphicsItem *>(&rect));
+ QCOMPARE(col2.constFirst(), &line);
+ QCOMPARE(col2.constLast(), &rect);
QList<QGraphicsItem *> col3 = line.collidingItems();
QCOMPARE(col3.size(), 2);
- QCOMPARE(col3.first(), static_cast<QGraphicsItem *>(&rect2));
- QCOMPARE(col3.last(), static_cast<QGraphicsItem *>(&rect));
+ QCOMPARE(col3.constFirst(), &rect2);
+ QCOMPARE(col3.constLast(), &rect);
}
}
@@ -2574,42 +2604,35 @@ void tst_QGraphicsItem::collidesWithItemWithClip()
class MyItem : public QGraphicsEllipseItem
{
public:
- bool isObscuredBy(const QGraphicsItem *item) const
- {
- const MyItem *myItem = qgraphicsitem_cast<const MyItem *>(item);
- if (myItem) {
- if (item->zValue() > zValue()) {
- QRectF r = rect();
- QPointF topMid = (r.topRight()+r.topLeft())/2;
- QPointF botMid = (r.bottomRight()+r.bottomLeft())/2;
- QPointF leftMid = (r.topLeft()+r.bottomLeft())/2;
- QPointF rightMid = (r.topRight()+r.bottomRight())/2;
-
- QPainterPath mappedShape = item->mapToItem(this, item->opaqueArea());
-
- if (mappedShape.contains(topMid) &&
- mappedShape.contains(botMid) &&
- mappedShape.contains(leftMid) &&
- mappedShape.contains(rightMid))
- return true;
- else
- return false;
- }
- else return false;
- }
- else
- return QGraphicsItem::isObscuredBy(item);
+ bool isObscuredBy(const QGraphicsItem *item) const override
+ {
+ auto myItem = qgraphicsitem_cast<const MyItem *>(item);
+ if (!myItem)
+ return QGraphicsEllipseItem::isObscuredBy(item);
+
+ if (item->zValue() <= zValue())
+ return false;
+
+ QRectF r = rect();
+ QPointF topMid = (r.topRight() + r.topLeft()) / 2;
+ QPointF botMid = (r.bottomRight() + r.bottomLeft()) / 2;
+ QPointF leftMid = (r.topLeft() + r.bottomLeft()) / 2;
+ QPointF rightMid = (r.topRight() + r.bottomRight()) / 2;
+
+ QPainterPath mappedShape = item->mapToItem(this, item->opaqueArea());
+
+ return mappedShape.contains(topMid) && mappedShape.contains(botMid)
+ && mappedShape.contains(leftMid) && mappedShape.contains(rightMid);
}
- QPainterPath opaqueArea() const
+ QPainterPath opaqueArea() const override
{
return shape();
}
- enum {
- Type = UserType+1
- };
- int type() const { return Type; }
+ enum { Type = UserType + 1 };
+
+ int type() const override { return Type; }
};
void tst_QGraphicsItem::isObscuredBy()
@@ -2662,7 +2685,7 @@ void tst_QGraphicsItem::isObscuredBy()
class OpaqueItem : public QGraphicsRectItem
{
protected:
- QPainterPath opaqueArea() const
+ QPainterPath opaqueArea() const override
{
return shape();
}
@@ -2977,14 +3000,14 @@ void tst_QGraphicsItem::mapFromToItem()
QCOMPARE(item3->mapFromItem(item2, 10, -5), QPointF(-190, -5));
QCOMPARE(item4->mapFromItem(item3, 10, -5), QPointF(10, -205));
- QCOMPARE(item1->mapFromItem(0, 10, -5), item1->mapFromScene(10, -5));
- QCOMPARE(item2->mapFromItem(0, 10, -5), item2->mapFromScene(10, -5));
- QCOMPARE(item3->mapFromItem(0, 10, -5), item3->mapFromScene(10, -5));
- QCOMPARE(item4->mapFromItem(0, 10, -5), item4->mapFromScene(10, -5));
- QCOMPARE(item1->mapToItem(0, 10, -5), item1->mapToScene(10, -5));
- QCOMPARE(item2->mapToItem(0, 10, -5), item2->mapToScene(10, -5));
- QCOMPARE(item3->mapToItem(0, 10, -5), item3->mapToScene(10, -5));
- QCOMPARE(item4->mapToItem(0, 10, -5), item4->mapToScene(10, -5));
+ QCOMPARE(item1->mapFromItem(nullptr, 10, -5), item1->mapFromScene(10, -5));
+ QCOMPARE(item2->mapFromItem(nullptr, 10, -5), item2->mapFromScene(10, -5));
+ QCOMPARE(item3->mapFromItem(nullptr, 10, -5), item3->mapFromScene(10, -5));
+ QCOMPARE(item4->mapFromItem(nullptr, 10, -5), item4->mapFromScene(10, -5));
+ QCOMPARE(item1->mapToItem(nullptr, 10, -5), item1->mapToScene(10, -5));
+ QCOMPARE(item2->mapToItem(nullptr, 10, -5), item2->mapToScene(10, -5));
+ QCOMPARE(item3->mapToItem(nullptr, 10, -5), item3->mapToScene(10, -5));
+ QCOMPARE(item4->mapToItem(nullptr, 10, -5), item4->mapToScene(10, -5));
delete item1;
delete item2;
@@ -3079,8 +3102,8 @@ void tst_QGraphicsItem::isAncestorOf()
QGraphicsItem *parent = new QGraphicsRectItem;
QGraphicsItem *child = new QGraphicsRectItem;
- QVERIFY(!parent->isAncestorOf(0));
- QVERIFY(!child->isAncestorOf(0));
+ QVERIFY(!parent->isAncestorOf(nullptr));
+ QVERIFY(!child->isAncestorOf(nullptr));
QVERIFY(!parent->isAncestorOf(child));
QVERIFY(!child->isAncestorOf(parent));
QVERIFY(!parent->isAncestorOf(parent));
@@ -3098,7 +3121,7 @@ void tst_QGraphicsItem::isAncestorOf()
QVERIFY(!parent->isAncestorOf(parent));
QVERIFY(!grandPa->isAncestorOf(grandPa));
- parent->setParentItem(0);
+ parent->setParentItem(nullptr);
delete child;
delete parent;
@@ -3126,7 +3149,7 @@ void tst_QGraphicsItem::commonAncestorItem()
grandPa->setParentItem(ancestor);
QCOMPARE(grandMa->commonAncestorItem(grandMa), grandMa);
- QCOMPARE(grandMa->commonAncestorItem(0), nullptr);
+ QCOMPARE(grandMa->commonAncestorItem(nullptr), nullptr);
QCOMPARE(grandMa->commonAncestorItem(grandPa), ancestor);
QCOMPARE(grandPa->commonAncestorItem(grandMa), ancestor);
QCOMPARE(grandPa->commonAncestorItem(husband), grandPa);
@@ -3230,7 +3253,7 @@ void tst_QGraphicsItem::graphicsitem_cast()
QVERIFY(!qgraphicsitem_cast<const QGraphicsTextItem *>(pPolygonItem));
// and this shouldn't crash
- QGraphicsItem *ptr = 0;
+ QGraphicsItem *ptr = nullptr;
QVERIFY(!qgraphicsitem_cast<QGraphicsTextItem *>(ptr));
QVERIFY(!qgraphicsitem_cast<QGraphicsItem *>(ptr));
}
@@ -3241,6 +3264,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints()
QGraphicsScene scene;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(QTest::qWaitForWindowActive(&view));
@@ -3256,48 +3280,48 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints()
QGraphicsSceneHoverEvent hoverEnterEvent(QEvent::GraphicsSceneHoverEnter);
hoverEnterEvent.setScenePos(QPointF(0, 0));
hoverEnterEvent.setPos(QPointF(0, 0));
- QApplication::sendEvent(&scene, &hoverEnterEvent);
+ QCoreApplication::sendEvent(&scene, &hoverEnterEvent);
// Check that we get a repaint
int npaints = tester->repaints;
- qApp->processEvents();
- qApp->processEvents();
+ QCoreApplication::processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(tester->events.size(), 2); // enter + move
QCOMPARE(tester->repaints, npaints + 1);
- QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverMove);
+ QCOMPARE(tester->events.constLast(), QEvent::GraphicsSceneHoverMove);
// Send a hover move event
QGraphicsSceneHoverEvent hoverMoveEvent(QEvent::GraphicsSceneHoverMove);
hoverMoveEvent.setScenePos(QPointF(0, 0));
hoverMoveEvent.setPos(QPointF(0, 0));
- QApplication::sendEvent(&scene, &hoverMoveEvent);
+ QCoreApplication::sendEvent(&scene, &hoverMoveEvent);
// Check that we don't get a repaint
- qApp->processEvents();
- qApp->processEvents();
+ QCoreApplication::processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(tester->events.size(), 3);
QCOMPARE(tester->repaints, npaints + 1);
- QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverMove);
+ QCOMPARE(tester->events.constLast(), QEvent::GraphicsSceneHoverMove);
// Send a hover leave event
QGraphicsSceneHoverEvent hoverLeaveEvent(QEvent::GraphicsSceneHoverLeave);
hoverLeaveEvent.setScenePos(QPointF(-100, -100));
hoverLeaveEvent.setPos(QPointF(0, 0));
- QApplication::sendEvent(&scene, &hoverLeaveEvent);
+ QCoreApplication::sendEvent(&scene, &hoverLeaveEvent);
// Check that we get a repaint
- qApp->processEvents();
- qApp->processEvents();
+ QCoreApplication::processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(tester->events.size(), 4);
QCOMPARE(tester->repaints, npaints + 2);
- QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverLeave);
+ QCOMPARE(tester->events.constLast(), QEvent::GraphicsSceneHoverLeave);
}
void tst_QGraphicsItem::boundingRects_data()
{
- QTest::addColumn<QGraphicsItem *>("item");
+ QTest::addColumn<AbstractGraphicsShapeItemPtr>("item");
QTest::addColumn<QRectF>("boundingRect");
QRectF rect(0, 0, 100, 100);
@@ -3306,18 +3330,18 @@ void tst_QGraphicsItem::boundingRects_data()
QRectF adjustedRect(-0.5, -0.5, 101, 101);
- QTest::newRow("path") << (QGraphicsItem *)new QGraphicsPathItem(path) << adjustedRect;
- QTest::newRow("rect") << (QGraphicsItem *)new QGraphicsRectItem(rect) << adjustedRect;
- QTest::newRow("ellipse") << (QGraphicsItem *)new QGraphicsEllipseItem(rect) << adjustedRect;
- QTest::newRow("polygon") << (QGraphicsItem *)new QGraphicsPolygonItem(rect) << adjustedRect;
+ QTest::newRow("path") << AbstractGraphicsShapeItemPtr(new QGraphicsPathItem(path)) << adjustedRect;
+ QTest::newRow("rect") << AbstractGraphicsShapeItemPtr(new QGraphicsRectItem(rect)) << adjustedRect;
+ QTest::newRow("ellipse") << AbstractGraphicsShapeItemPtr(new QGraphicsEllipseItem(rect)) << adjustedRect;
+ QTest::newRow("polygon") << AbstractGraphicsShapeItemPtr(new QGraphicsPolygonItem(rect)) << adjustedRect;
}
void tst_QGraphicsItem::boundingRects()
{
- QFETCH(QGraphicsItem *, item);
+ QFETCH(AbstractGraphicsShapeItemPtr, item);
QFETCH(QRectF, boundingRect);
- ((QAbstractGraphicsShapeItem *)item)->setPen(QPen(Qt::black, 1));
+ item->setPen(QPen(Qt::black, 1));
QCOMPARE(item->boundingRect(), boundingRect);
}
@@ -3373,6 +3397,7 @@ void tst_QGraphicsItem::childrenBoundingRect()
scene.addPolygon(parent->mapToScene(parent->boundingRect() | parent->childrenBoundingRect()))->setPen(QPen(Qt::red));;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -3488,6 +3513,7 @@ void tst_QGraphicsItem::childrenBoundingRect4()
rect3->setParentItem(rect);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -3515,6 +3541,7 @@ void tst_QGraphicsItem::childrenBoundingRect5()
child->setPen(QPen(Qt::black, 0));
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -3551,6 +3578,7 @@ void tst_QGraphicsItem::group()
QCOMPARE(child->group(), nullptr);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -3563,7 +3591,7 @@ void tst_QGraphicsItem::group()
QCOMPARE(parent->group(), group);
QCOMPARE(parent->sceneBoundingRect(), parentSceneBoundingRect);
- QCOMPARE(parent->parentItem(), (QGraphicsItem *)group);
+ QCOMPARE(parent->parentItem(), group);
QCOMPARE(group->childItems().size(), 1);
QCOMPARE(scene.items().size(), 4);
QCOMPARE(scene.items(group->sceneBoundingRect()).size(), 3);
@@ -3574,12 +3602,13 @@ void tst_QGraphicsItem::group()
QCOMPARE(parent2->group(), group);
QCOMPARE(parent2->sceneBoundingRect(), parent2SceneBoundingRect);
- QCOMPARE(parent2->parentItem(), (QGraphicsItem *)group);
+ QCOMPARE(parent2->parentItem(), group);
QCOMPARE(group->childItems().size(), 2);
QCOMPARE(scene.items().size(), 4);
QCOMPARE(scene.items(group->sceneBoundingRect()).size(), 4);
- QList<QGraphicsItem *> newItems;
+ GraphicsItems newItems;
+ newItems.reserve(100);
for (int i = 0; i < 100; ++i) {
QGraphicsItem *item = scene.addRect(QRectF(-25, -25, 50, 50), QPen(Qt::black, 0),
QBrush(QColor(QRandomGenerator::global()->bounded(255), QRandomGenerator::global()->bounded(255),
@@ -3592,7 +3621,7 @@ void tst_QGraphicsItem::group()
view.fitInView(scene.itemsBoundingRect());
- foreach (QGraphicsItem *item, newItems) {
+ for (QGraphicsItem *item : qAsConst(newItems)) {
group->addToGroup(item);
QCOMPARE(item->group(), group);
}
@@ -3608,11 +3637,11 @@ void tst_QGraphicsItem::setGroup()
QCOMPARE(rect->parentItem(), nullptr);
rect->setGroup(&group1);
QCOMPARE(rect->group(), &group1);
- QCOMPARE(rect->parentItem(), (QGraphicsItem *)&group1);
+ QCOMPARE(rect->parentItem(), &group1);
rect->setGroup(&group2);
QCOMPARE(rect->group(), &group2);
- QCOMPARE(rect->parentItem(), (QGraphicsItem *)&group2);
- rect->setGroup(0);
+ QCOMPARE(rect->parentItem(), &group2);
+ rect->setGroup(nullptr);
QCOMPARE(rect->group(), nullptr);
QCOMPARE(rect->parentItem(), nullptr);
}
@@ -3642,7 +3671,7 @@ void tst_QGraphicsItem::setGroup2()
rect->setScale(0.8);
oldSceneTransform = rect->sceneTransform();
- rect->setGroup(0);
+ rect->setGroup(nullptr);
qFuzzyCompare(rect->sceneTransform(), oldSceneTransform);
}
@@ -3715,21 +3744,22 @@ void tst_QGraphicsItem::removeFromGroup()
rect2->setSelected(true);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
- qApp->processEvents(); // index items
- qApp->processEvents(); // emit changed
+ QCoreApplication::processEvents(); // index items
+ QCoreApplication::processEvents(); // emit changed
QGraphicsItemGroup *group = scene.createItemGroup(scene.selectedItems());
QVERIFY(group);
QCOMPARE(group->childItems().size(), 2);
- qApp->processEvents(); // index items
- qApp->processEvents(); // emit changed
+ QCoreApplication::processEvents(); // index items
+ QCoreApplication::processEvents(); // emit changed
scene.destroyItemGroup(group); // calls removeFromGroup.
- qApp->processEvents(); // index items
- qApp->processEvents(); // emit changed
+ QCoreApplication::processEvents(); // index items
+ QCoreApplication::processEvents(); // emit changed
QCOMPARE(scene.items().size(), 2);
QVERIFY(!rect1->group());
@@ -3739,20 +3769,18 @@ void tst_QGraphicsItem::removeFromGroup()
class ChildEventTester : public QGraphicsRectItem
{
public:
- ChildEventTester(const QRectF &rect, QGraphicsItem *parent = 0)
- : QGraphicsRectItem(rect, parent), counter(0)
- { }
+ using QGraphicsRectItem::QGraphicsRectItem;
- int counter;
+ int counter = 0;
protected:
- void focusInEvent(QFocusEvent *event)
+ void focusInEvent(QFocusEvent *event) override
{ ++counter; QGraphicsRectItem::focusInEvent(event); }
- void mousePressEvent(QGraphicsSceneMouseEvent *)
+ void mousePressEvent(QGraphicsSceneMouseEvent *) override
{ ++counter; }
- void mouseMoveEvent(QGraphicsSceneMouseEvent *)
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *) override
{ ++counter; }
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override
{ ++counter; }
};
@@ -3782,16 +3810,17 @@ void tst_QGraphicsItem::handlesChildEvents()
scene.addItem(blue);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
// Pull out the items, closest item first
QList<QGraphicsItem *> items = scene.items(scene.itemsBoundingRect());
- QCOMPARE(items.at(0), (QGraphicsItem *)yellow);
- QCOMPARE(items.at(1), (QGraphicsItem *)gray);
- QCOMPARE(items.at(2), (QGraphicsItem *)green);
- QCOMPARE(items.at(3), (QGraphicsItem *)red);
- QCOMPARE(items.at(4), (QGraphicsItem *)blue);
+ QCOMPARE(items.at(0), yellow);
+ QCOMPARE(items.at(1), gray);
+ QCOMPARE(items.at(2), green);
+ QCOMPARE(items.at(3), red);
+ QCOMPARE(items.at(4), blue);
QCOMPARE(blue->counter, 0);
@@ -3805,8 +3834,8 @@ void tst_QGraphicsItem::handlesChildEvents()
releaseEvent.setButton(Qt::LeftButton);
releaseEvent.setScenePos(blue->mapToScene(5, 5));
releaseEvent.setScreenPos(view.mapFromScene(pressEvent.scenePos()));
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QCOMPARE(blue->counter, 2);
@@ -3815,8 +3844,8 @@ void tst_QGraphicsItem::handlesChildEvents()
pressEvent.setScreenPos(view.mapFromScene(pressEvent.scenePos()));
releaseEvent.setScenePos(red->mapToScene(5, 5));
releaseEvent.setScreenPos(view.mapFromScene(releaseEvent.scenePos()));
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QCOMPARE(blue->counter, 2);
QCOMPARE(red->counter, 2);
@@ -3826,8 +3855,8 @@ void tst_QGraphicsItem::handlesChildEvents()
pressEvent.setScreenPos(view.mapFromScene(pressEvent.scenePos()));
releaseEvent.setScenePos(green->mapToScene(5, 5));
releaseEvent.setScreenPos(view.mapFromScene(releaseEvent.scenePos()));
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QCOMPARE(blue->counter, 2);
QCOMPARE(red->counter, 2);
@@ -3840,8 +3869,8 @@ void tst_QGraphicsItem::handlesChildEvents()
pressEvent.setScreenPos(view.mapFromScene(pressEvent.scenePos()));
releaseEvent.setScenePos(red->mapToScene(5, 5));
releaseEvent.setScreenPos(view.mapFromScene(releaseEvent.scenePos()));
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QCOMPARE(blue->counter, 4);
QCOMPARE(red->counter, 2);
@@ -3851,8 +3880,8 @@ void tst_QGraphicsItem::handlesChildEvents()
pressEvent.setScreenPos(view.mapFromScene(pressEvent.scenePos()));
releaseEvent.setScenePos(green->mapToScene(5, 5));
releaseEvent.setScreenPos(view.mapFromScene(releaseEvent.scenePos()));
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QCOMPARE(blue->counter, 6);
QCOMPARE(red->counter, 2);
@@ -3865,8 +3894,8 @@ void tst_QGraphicsItem::handlesChildEvents()
pressEvent.setScreenPos(view.mapFromScene(pressEvent.scenePos()));
releaseEvent.setScenePos(red->mapToScene(5, 5));
releaseEvent.setScreenPos(view.mapFromScene(releaseEvent.scenePos()));
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QCOMPARE(blue->counter, 6);
QCOMPARE(red->counter, 4);
@@ -3876,8 +3905,8 @@ void tst_QGraphicsItem::handlesChildEvents()
pressEvent.setScreenPos(view.mapFromScene(pressEvent.scenePos()));
releaseEvent.setScenePos(green->mapToScene(5, 5));
releaseEvent.setScreenPos(view.mapFromScene(releaseEvent.scenePos()));
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QCOMPARE(blue->counter, 6);
QCOMPARE(red->counter, 4);
@@ -3905,13 +3934,14 @@ void tst_QGraphicsItem::handlesChildEvents2()
scene.addItem(root);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QApplication::processEvents();
QMouseEvent event(QEvent::MouseButtonPress, view.mapFromScene(5, 5),
- view.viewport()->mapToGlobal(view.mapFromScene(5, 5)), Qt::LeftButton, 0, 0);
- QApplication::sendEvent(view.viewport(), &event);
+ view.viewport()->mapToGlobal(view.mapFromScene(5, 5)), Qt::LeftButton, {}, {});
+ QCoreApplication::sendEvent(view.viewport(), &event);
QTRY_COMPARE(root->counter, 1);
}
@@ -3920,9 +3950,9 @@ void tst_QGraphicsItem::handlesChildEvents3()
{
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
- ChildEventTester *group2 = new ChildEventTester(QRectF(), 0);
+ ChildEventTester *group2 = new ChildEventTester(QRectF(), nullptr);
ChildEventTester *group1 = new ChildEventTester(QRectF(), group2);
ChildEventTester *leaf = new ChildEventTester(QRectF(), group1);
scene.addItem(group2);
@@ -3962,14 +3992,14 @@ void tst_QGraphicsItem::handlesChildEvents3()
class ChildEventFilterTester : public ChildEventTester
{
public:
- ChildEventFilterTester(const QRectF &rect, QGraphicsItem *parent = 0)
- : ChildEventTester(rect, parent), filter(QEvent::None)
+ ChildEventFilterTester(const QRectF &rect, QGraphicsItem *parent = nullptr)
+ : ChildEventTester(rect, parent)
{ }
- QEvent::Type filter;
+ QEvent::Type filter = QEvent::None;
protected:
- bool sceneEventFilter(QGraphicsItem *item, QEvent *event)
+ bool sceneEventFilter(QGraphicsItem *item, QEvent *event) override
{
Q_UNUSED(item);
if (event->type() == filter) {
@@ -3994,6 +4024,7 @@ void tst_QGraphicsItem::filtersChildEvents()
scene.addItem(root);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -4007,8 +4038,8 @@ void tst_QGraphicsItem::filtersChildEvents()
releaseEvent.setButton(Qt::LeftButton);
releaseEvent.setScenePos(QPointF(25, 25));//child->mapToScene(5, 5));
releaseEvent.setScreenPos(view.mapFromScene(pressEvent.scenePos()));
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QTRY_COMPARE(child->counter, 1); // mouse release is not filtered
QCOMPARE(filter->counter, 1); // mouse press is filtered
@@ -4019,8 +4050,8 @@ void tst_QGraphicsItem::filtersChildEvents()
root->filter = QEvent::GraphicsSceneMouseRelease;
// send event to child
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QCOMPARE(child->counter, 1);
QCOMPARE(filter->counter, 2); // mouse press is filtered
@@ -4031,8 +4062,8 @@ void tst_QGraphicsItem::filtersChildEvents()
child->setParentItem(parent);
// send event to child
- QApplication::sendEvent(&scene, &pressEvent);
- QApplication::sendEvent(&scene, &releaseEvent);
+ QCoreApplication::sendEvent(&scene, &pressEvent);
+ QCoreApplication::sendEvent(&scene, &releaseEvent);
QCOMPARE(child->counter, 2); // mouse press is _not_ filtered
QCOMPARE(parent->counter, 0);
@@ -4063,14 +4094,15 @@ void tst_QGraphicsItem::filtersChildEvents2()
scene.addItem(root);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QApplication::processEvents();
QMouseEvent event(QEvent::MouseButtonPress, view.mapFromScene(5, 5),
- view.viewport()->mapToGlobal(view.mapFromScene(5, 5)), Qt::LeftButton, 0, 0);
- QApplication::sendEvent(view.viewport(), &event);
+ view.viewport()->mapToGlobal(view.mapFromScene(5, 5)), Qt::LeftButton, {}, {});
+ QCoreApplication::sendEvent(view.viewport(), &event);
QTRY_COMPARE(root->counter, 1);
QCOMPARE(child->counter, 0);
@@ -4082,10 +4114,10 @@ void tst_QGraphicsItem::filtersChildEvents2()
class CustomItem : public QGraphicsItem
{
public:
- QRectF boundingRect() const
+ QRectF boundingRect() const override
{ return QRectF(-110, -110, 220, 220); }
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
{
for (int x = -100; x <= 100; x += 25)
painter->drawLine(x, -100, x, 100);
@@ -4111,6 +4143,7 @@ void tst_QGraphicsItem::ensureVisible()
scene.addItem(item);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.setFixedSize(300, 300);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -4198,37 +4231,37 @@ void tst_QGraphicsItem::cursor()
QPoint item2Center = view.mapFromScene(item2->sceneBoundingRect().center());
{
- QMouseEvent event(QEvent::MouseMove, viewCenter, view.viewport()->mapToGlobal(viewCenter), Qt::NoButton, 0, 0);
- QApplication::sendEvent(view.viewport(), &event);
+ QMouseEvent event(QEvent::MouseMove, viewCenter, view.viewport()->mapToGlobal(viewCenter), Qt::NoButton, {}, {});
+ QCoreApplication::sendEvent(view.viewport(), &event);
}
QCOMPARE(view.viewport()->cursor().shape(), viewportShape);
{
- QMouseEvent event(QEvent::MouseMove, item1Center, view.viewport()->mapToGlobal(item1Center), Qt::NoButton, 0, 0);
- QApplication::sendEvent(view.viewport(), &event);
+ QMouseEvent event(QEvent::MouseMove, item1Center, view.viewport()->mapToGlobal(item1Center), Qt::NoButton, {}, {});
+ QCoreApplication::sendEvent(view.viewport(), &event);
}
QCOMPARE(view.viewport()->cursor().shape(), item1->cursor().shape());
{
- QMouseEvent event(QEvent::MouseMove, item2Center, view.viewport()->mapToGlobal(item2Center), Qt::NoButton, 0, 0);
- QApplication::sendEvent(view.viewport(), &event);
+ QMouseEvent event(QEvent::MouseMove, item2Center, view.viewport()->mapToGlobal(item2Center), Qt::NoButton, {}, {});
+ QCoreApplication::sendEvent(view.viewport(), &event);
}
QCOMPARE(view.viewport()->cursor().shape(), item2->cursor().shape());
{
- QMouseEvent event(QEvent::MouseMove, viewCenter, view.viewport()->mapToGlobal(viewCenter), Qt::NoButton, 0, 0);
- QApplication::sendEvent(view.viewport(), &event);
+ QMouseEvent event(QEvent::MouseMove, viewCenter, view.viewport()->mapToGlobal(viewCenter), Qt::NoButton, {}, {});
+ QCoreApplication::sendEvent(view.viewport(), &event);
}
QCOMPARE(view.viewport()->cursor().shape(), viewportShape);
item1->setEnabled(false);
{
- QMouseEvent event(QEvent::MouseMove, item1Center, view.viewport()->mapToGlobal(item1Center), Qt::NoButton, 0, 0);
- QApplication::sendEvent(view.viewport(), &event);
+ QMouseEvent event(QEvent::MouseMove, item1Center, view.viewport()->mapToGlobal(item1Center), Qt::NoButton, {}, {});
+ QCoreApplication::sendEvent(view.viewport(), &event);
}
QCOMPARE(view.viewport()->cursor().shape(), viewportShape);
@@ -4342,7 +4375,7 @@ void tst_QGraphicsItem::defaultItemTest_QGraphicsTextItem()
QVERIFY(!text->openExternalLinks());
QVERIFY(text->textCursor().isNull());
QCOMPARE(text->defaultTextColor(), QPalette().color(QPalette::Text));
- QVERIFY(text->document() != 0);
+ QVERIFY(text->document() != nullptr);
QCOMPARE(text->font(), QApplication::font());
QCOMPARE(text->textInteractionFlags(), Qt::TextInteractionFlags(Qt::NoTextInteraction));
QCOMPARE(text->textWidth(), -1.0);
@@ -4358,12 +4391,12 @@ void tst_QGraphicsItem::defaultItemTest_QGraphicsTextItem()
event.setScenePos(QPointF(1, 1));
event.setButton(Qt::LeftButton);
event.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QGraphicsSceneMouseEvent event2(QEvent::GraphicsSceneMouseMove);
event2.setScenePos(QPointF(11, 11));
event2.setButton(Qt::LeftButton);
event2.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event2);
+ QCoreApplication::sendEvent(&scene, &event2);
}
QCOMPARE(text->pos(), QPointF(10, 10));
@@ -4379,7 +4412,7 @@ void tst_QGraphicsItem::defaultItemTest_QGraphicsTextItem()
event2.setScenePos(QPointF(21, 21));
event2.setButton(Qt::LeftButton);
event2.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event2);
+ QCoreApplication::sendEvent(&scene, &event2);
}
QCOMPARE(text->pos(), QPointF(20, 20)); // clicked on edge, item moved
@@ -4420,15 +4453,16 @@ void tst_QGraphicsItem::defaultItemTest_QGraphicsEllipseItem()
class ItemChangeTester : public QGraphicsRectItem
{
public:
- ItemChangeTester()
- { setFlag(ItemSendsGeometryChanges); clear(); }
- ItemChangeTester(QGraphicsItem *parent) : QGraphicsRectItem(parent)
- { setFlag(ItemSendsGeometryChanges); clear(); }
+ ItemChangeTester(QGraphicsItem *parent = nullptr) : QGraphicsRectItem(parent)
+ {
+ setFlag(ItemSendsGeometryChanges);
+ clear();
+ }
void clear()
{
itemChangeReturnValue = QVariant();
- itemSceneChangeTargetScene = 0;
+ itemSceneChangeTargetScene = nullptr;
changes.clear();
values.clear();
oldValues.clear();
@@ -4437,11 +4471,11 @@ public:
QVariant itemChangeReturnValue;
QGraphicsScene *itemSceneChangeTargetScene;
- QList<GraphicsItemChange> changes;
- QList<QVariant> values;
- QList<QVariant> oldValues;
+ QVector<GraphicsItemChange> changes;
+ QVariantList values;
+ QVariantList oldValues;
protected:
- QVariant itemChange(GraphicsItemChange change, const QVariant &value)
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
{
changes << change;
values << value;
@@ -4560,7 +4594,7 @@ QT_WARNING_POP
void tst_QGraphicsItem::itemChange()
{
ItemChangeTester tester;
- tester.itemSceneChangeTargetScene = 0;
+ tester.itemSceneChangeTargetScene = nullptr;
ItemChangeTester testerHelper;
QVERIFY(tester.changes.isEmpty());
@@ -4578,7 +4612,7 @@ void tst_QGraphicsItem::itemChange()
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemEnabledHasChanged);
QCOMPARE(tester.values.at(tester.values.size() - 2), QVariant(false));
QCOMPARE(tester.values.at(tester.values.size() - 1), QVariant(true));
- QCOMPARE(tester.oldValues.last(), QVariant(true));
+ QCOMPARE(tester.oldValues.constLast(), QVariant(true));
QCOMPARE(tester.isEnabled(), true);
}
#if QT_DEPRECATED_SINCE(5, 13)
@@ -4594,10 +4628,10 @@ QT_WARNING_DISABLE_DEPRECATED // QDesktopWidget::screen()
QCOMPARE(int(tester.changes.last()), int(QGraphicsItem::ItemTransformHasChanged));
QCOMPARE(qvariant_cast<QMatrix>(tester.values.at(tester.values.size() - 2)),
QMatrix().translate(50, 0));
- QCOMPARE(tester.values.last(), QVariant(QTransform(QMatrix().rotate(90))));
+ QCOMPARE(tester.values.constLast(), QVariant(QTransform(QMatrix().rotate(90))));
QVariant variant;
variant.setValue<QMatrix>(QMatrix());
- QCOMPARE(tester.oldValues.last(), variant);
+ QCOMPARE(tester.oldValues.constLast(), variant);
QCOMPARE(tester.matrix(), QMatrix().rotate(90));
QT_WARNING_POP
}
@@ -4621,7 +4655,7 @@ QT_WARNING_POP
QTransform().rotate(90));
QVariant variant;
variant.setValue<QTransform>(QTransform());
- QCOMPARE(tester.oldValues.last(), variant);
+ QCOMPARE(tester.oldValues.constLast(), variant);
QCOMPARE(tester.transform(), QTransform().rotate(90));
}
{
@@ -4635,7 +4669,7 @@ QT_WARNING_POP
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemPositionHasChanged);
QCOMPARE(tester.values.at(tester.changes.size() - 2), QVariant(QPointF(0, 42)));
QCOMPARE(tester.values.at(tester.changes.size() - 1), QVariant(QPointF(42, 0)));
- QCOMPARE(tester.oldValues.last(), QVariant(QPointF()));
+ QCOMPARE(tester.oldValues.constLast(), QVariant(QPointF()));
QCOMPARE(tester.pos(), QPointF(42, 0));
}
{
@@ -4649,7 +4683,7 @@ QT_WARNING_POP
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemZValueHasChanged);
QCOMPARE(tester.values.at(tester.changes.size() - 2), QVariant(qreal(1.0)));
QCOMPARE(tester.values.at(tester.changes.size() - 1), QVariant(qreal(2.0)));
- QCOMPARE(tester.oldValues.last(), QVariant(qreal(0.0)));
+ QCOMPARE(tester.oldValues.constLast(), QVariant(qreal(0.0)));
QCOMPARE(tester.zValue(), qreal(2.0));
}
{
@@ -4663,7 +4697,7 @@ QT_WARNING_POP
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemRotationHasChanged);
QCOMPARE(tester.values.at(tester.changes.size() - 2), QVariant(qreal(10.0)));
QCOMPARE(tester.values.at(tester.changes.size() - 1), QVariant(qreal(15.0)));
- QCOMPARE(tester.oldValues.last(), QVariant(qreal(0.0)));
+ QCOMPARE(tester.oldValues.constLast(), QVariant(qreal(0.0)));
QCOMPARE(tester.rotation(), qreal(15.0));
}
{
@@ -4677,7 +4711,7 @@ QT_WARNING_POP
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemScaleHasChanged);
QCOMPARE(tester.values.at(tester.changes.size() - 2), QVariant(qreal(1.5)));
QCOMPARE(tester.values.at(tester.changes.size() - 1), QVariant(qreal(2.0)));
- QCOMPARE(tester.oldValues.last(), QVariant(qreal(1.0)));
+ QCOMPARE(tester.oldValues.constLast(), QVariant(qreal(1.0)));
QCOMPARE(tester.scale(), qreal(2.0));
}
{
@@ -4691,7 +4725,7 @@ QT_WARNING_POP
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemTransformOriginPointHasChanged);
QCOMPARE(tester.values.at(tester.changes.size() - 2), QVariant(QPointF(1.0, 1.0)));
QCOMPARE(tester.values.at(tester.changes.size() - 1), QVariant(QPointF(2.0, 2.0)));
- QCOMPARE(tester.oldValues.last(), QVariant(QPointF(0.0, 0.0)));
+ QCOMPARE(tester.oldValues.constLast(), QVariant(QPointF(0.0, 0.0)));
QCOMPARE(tester.transformOriginPoint(), QPointF(2.0, 2.0));
}
{
@@ -4707,7 +4741,8 @@ QT_WARNING_POP
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemFlagsHaveChanged);
QVariant expectedFlags = QVariant::fromValue<quint32>(QGraphicsItem::GraphicsItemFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemSendsGeometryChanges));
QCOMPARE(tester.values.at(tester.values.size() - 2), expectedFlags);
- QCOMPARE(tester.values.at(tester.values.size() - 1), QVariant::fromValue<quint32>((quint32)QGraphicsItem::ItemIsSelectable));
+ QCOMPARE(tester.values.at(tester.values.size() - 1),
+ QVariant::fromValue<quint32>(quint32(QGraphicsItem::ItemIsSelectable)));
}
{
// ItemSelectedChange
@@ -4722,7 +4757,7 @@ QT_WARNING_POP
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemSelectedHasChanged);
QCOMPARE(tester.values.at(tester.values.size() - 2), QVariant(true));
QCOMPARE(tester.values.at(tester.values.size() - 1), QVariant(true));
- QCOMPARE(tester.oldValues.last(), QVariant(false));
+ QCOMPARE(tester.oldValues.constLast(), QVariant(false));
QCOMPARE(tester.isSelected(), true);
tester.itemChangeReturnValue = false;
@@ -4754,11 +4789,11 @@ QT_WARNING_POP
}
{
// ItemParentChange
- tester.itemChangeReturnValue.setValue<QGraphicsItem *>(0);
+ tester.itemChangeReturnValue.setValue<QGraphicsItem *>(nullptr);
tester.setParentItem(&testerHelper);
QCOMPARE(tester.changes.size(), ++changeCount);
- QCOMPARE(tester.changes.last(), QGraphicsItem::ItemParentChange);
- QCOMPARE(qvariant_cast<QGraphicsItem *>(tester.values.last()), (QGraphicsItem *)&testerHelper);
+ QCOMPARE(tester.changes.constLast(), QGraphicsItem::ItemParentChange);
+ QCOMPARE(qvariant_cast<QGraphicsItem *>(tester.values.last()), &testerHelper);
QCOMPARE(qvariant_cast<QGraphicsItem *>(tester.oldValues.last()), nullptr);
QCOMPARE(tester.parentItem(), nullptr);
}
@@ -4767,7 +4802,7 @@ QT_WARNING_POP
tester.itemChangeReturnValue = 1.0;
tester.setOpacity(0.7);
QCOMPARE(tester.changes.size(), ++changeCount);
- QCOMPARE(tester.changes.last(), QGraphicsItem::ItemOpacityChange);
+ QCOMPARE(tester.changes.constLast(), QGraphicsItem::ItemOpacityChange);
QVERIFY(qFuzzyCompare(qreal(tester.values.last().toDouble()), qreal(0.7)));
QCOMPARE(tester.oldValues.last().toDouble(), double(1.0));
QCOMPARE(tester.opacity(), qreal(1.0));
@@ -4785,19 +4820,19 @@ QT_WARNING_POP
tester.itemChangeReturnValue.clear();
testerHelper.setParentItem(&tester);
QCOMPARE(tester.changes.size(), ++changeCount);
- QCOMPARE(tester.changes.last(), QGraphicsItem::ItemChildAddedChange);
- QCOMPARE(qvariant_cast<QGraphicsItem *>(tester.values.last()), (QGraphicsItem *)&testerHelper);
+ QCOMPARE(tester.changes.constLast(), QGraphicsItem::ItemChildAddedChange);
+ QCOMPARE(qvariant_cast<QGraphicsItem *>(tester.values.last()), &testerHelper);
}
{
// ItemChildRemovedChange 1
- testerHelper.setParentItem(0);
+ testerHelper.setParentItem(nullptr);
QCOMPARE(tester.changes.size(), ++changeCount);
- QCOMPARE(tester.changes.last(), QGraphicsItem::ItemChildRemovedChange);
- QCOMPARE(qvariant_cast<QGraphicsItem *>(tester.values.last()), (QGraphicsItem *)&testerHelper);
+ QCOMPARE(tester.changes.constLast(), QGraphicsItem::ItemChildRemovedChange);
+ QCOMPARE(qvariant_cast<QGraphicsItem *>(tester.values.last()), &testerHelper);
// ItemChildRemovedChange 1
ItemChangeTester *test = new ItemChangeTester;
- test->itemSceneChangeTargetScene = 0;
+ test->itemSceneChangeTargetScene = nullptr;
int count = 0;
QGraphicsScene *scene = new QGraphicsScene;
scene->addItem(test);
@@ -4806,11 +4841,11 @@ QT_WARNING_POP
QGraphicsRectItem *child = new QGraphicsRectItem(test);
//We received ItemChildAddedChange
QCOMPARE(test->changes.size(), ++count);
- QCOMPARE(test->changes.last(), QGraphicsItem::ItemChildAddedChange);
+ QCOMPARE(test->changes.constLast(), QGraphicsItem::ItemChildAddedChange);
delete child;
- child = 0;
+ child = nullptr;
QCOMPARE(test->changes.size(), ++count);
- QCOMPARE(test->changes.last(), QGraphicsItem::ItemChildRemovedChange);
+ QCOMPARE(test->changes.constLast(), QGraphicsItem::ItemChildRemovedChange);
ItemChangeTester *childTester = new ItemChangeTester(test);
//Changes contains all sceneHasChanged and so on, we don't want to test that
@@ -4820,12 +4855,12 @@ QT_WARNING_POP
child = new QGraphicsRectItem(childTester);
//We received ItemChildAddedChange
QCOMPARE(childTester->changes.size(), ++childCount);
- QCOMPARE(childTester->changes.last(), QGraphicsItem::ItemChildAddedChange);
+ QCOMPARE(childTester->changes.constLast(), QGraphicsItem::ItemChildAddedChange);
//Delete the child of the top level with all its children
delete childTester;
//Only one removal
QCOMPARE(test->changes.size(), ++count);
- QCOMPARE(test->changes.last(), QGraphicsItem::ItemChildRemovedChange);
+ QCOMPARE(test->changes.constLast(), QGraphicsItem::ItemChildRemovedChange);
delete scene;
}
{
@@ -4833,11 +4868,11 @@ QT_WARNING_POP
ItemChangeTester parent;
ItemChangeTester *child = new ItemChangeTester;
child->setParentItem(&parent);
- QCOMPARE(parent.changes.last(), QGraphicsItem::ItemChildAddedChange);
- QCOMPARE(qvariant_cast<QGraphicsItem *>(parent.values.last()), (QGraphicsItem *)child);
+ QCOMPARE(parent.changes.constLast(), QGraphicsItem::ItemChildAddedChange);
+ QCOMPARE(qvariant_cast<QGraphicsItem *>(parent.values.last()), child);
delete child;
- QCOMPARE(parent.changes.last(), QGraphicsItem::ItemChildRemovedChange);
- QCOMPARE(qvariant_cast<QGraphicsItem *>(parent.values.last()), (QGraphicsItem *)child);
+ QCOMPARE(parent.changes.constLast(), QGraphicsItem::ItemChildRemovedChange);
+ QCOMPARE(qvariant_cast<QGraphicsItem *>(parent.values.last()), child);
}
{
// !!! Note: If this test crashes because of double-deletion, there's
@@ -4857,7 +4892,7 @@ QT_WARNING_POP
// Item's old value was 0
// Item's current value is scene
QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.oldValues.last()), nullptr);
- QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.last()), (QGraphicsScene *)&scene);
+ QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.last()), &scene);
scene2.addItem(&tester);
++changeCount; // ItemSceneChange (0) was: (scene)
++changeCount; // ItemSceneHasChanged (0)
@@ -4873,16 +4908,16 @@ QT_WARNING_POP
// Item's last old value was scene
// Item's last current value is 0
- QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.oldValues.at(tester.oldValues.size() - 2)), (QGraphicsScene *)&scene);
+ QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.oldValues.at(tester.oldValues.size() - 2)), &scene);
QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.oldValues.at(tester.oldValues.size() - 1)), nullptr);
QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 4)), nullptr);
QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 3)), nullptr);
- QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 2)), (QGraphicsScene *)&scene2);
- QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 1)), (QGraphicsScene *)&scene2);
+ QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 2)), &scene2);
+ QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 1)), &scene2);
// Item's last old value was 0
// Item's last current value is scene2
QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.oldValues.last()), nullptr);
- QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.last()), (QGraphicsScene *)&scene2);
+ QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.last()), &scene2);
scene2.removeItem(&tester);
++changeCount; // ItemSceneChange (0) was: (scene2)
@@ -4894,7 +4929,7 @@ QT_WARNING_POP
QCOMPARE(tester.changes.at(tester.changes.size() - 1), QGraphicsItem::ItemSceneHasChanged);
// Item's last old value was scene2
// Item's last current value is 0
- QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.oldValues.last()), (QGraphicsScene *)&scene2);
+ QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.oldValues.last()), &scene2);
QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 2)), nullptr);
QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 1)), nullptr);
@@ -4905,12 +4940,12 @@ QT_WARNING_POP
++changeCount; // ItemSceneHasChanged (scene)
QCOMPARE(tester.values.size(), changeCount);
- QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 3)), (QGraphicsScene *)&scene2);
- QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 2)), (QGraphicsScene *)&scene);
- QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 1)), (QGraphicsScene *)&scene);
+ QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 3)), &scene2);
+ QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 2)), &scene);
+ QCOMPARE(qvariant_cast<QGraphicsScene *>(tester.values.at(tester.values.size() - 1)), &scene);
QCOMPARE(tester.scene(), &scene);
- tester.itemSceneChangeTargetScene = 0;
+ tester.itemSceneChangeTargetScene = nullptr;
tester.itemChangeReturnValue = QVariant();
scene.removeItem(&tester);
++changeCount; // ItemSceneChange
@@ -4938,23 +4973,20 @@ QT_WARNING_POP
class EventFilterTesterItem : public QGraphicsLineItem
{
public:
- QList<QEvent::Type> filteredEvents;
- QList<QGraphicsItem *> filteredEventReceivers;
- bool handlesSceneEvents;
-
- QList<QEvent::Type> receivedEvents;
-
- EventFilterTesterItem() : handlesSceneEvents(false) {}
+ QVector<QEvent::Type> filteredEvents;
+ GraphicsItems filteredEventReceivers;
+ QVector<QEvent::Type> receivedEvents;
+ bool handlesSceneEvents = false;
protected:
- bool sceneEventFilter(QGraphicsItem *watched, QEvent *event)
+ bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override
{
filteredEvents << event->type();
filteredEventReceivers << watched;
return handlesSceneEvents;
}
- bool sceneEvent(QEvent *event)
+ bool sceneEvent(QEvent *event) override
{
return QGraphicsLineItem::sceneEvent(event);
}
@@ -4965,6 +4997,7 @@ void tst_QGraphicsItem::sceneEventFilter()
QGraphicsScene scene;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QApplication::setActiveWindow(&view);
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -5066,16 +5099,16 @@ void tst_QGraphicsItem::prepareGeometryChange()
class PaintTester : public QGraphicsRectItem
{
public:
- PaintTester() : widget(NULL), painted(0) { setRect(QRectF(10, 10, 20, 20));}
+ PaintTester() { setRect(QRectF(10, 10, 20, 20));}
- void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *w)
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *w) override
{
widget = w;
painted++;
}
- QWidget* widget;
- int painted;
+ QWidget *widget = nullptr;
+ int painted = 0;
};
void tst_QGraphicsItem::paint()
@@ -5086,6 +5119,7 @@ void tst_QGraphicsItem::paint()
scene.addItem(&paintTester);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QApplication::processEvents();
@@ -5102,6 +5136,7 @@ void tst_QGraphicsItem::paint()
QGraphicsScene scene2;
QGraphicsView view2(&scene2);
+ view2.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view2.show();
QVERIFY(QTest::qWaitForWindowExposed(&view2));
QCoreApplication::processEvents(); // Process all queued paint events
@@ -5135,194 +5170,194 @@ class HarakiriItem : public QGraphicsRectItem
public:
HarakiriItem(int harakiriPoint)
: QGraphicsRectItem(QRectF(0, 0, 100, 100)), harakiri(harakiriPoint)
- { dead = 0; }
+ { dead = false; }
- static int dead;
+ static bool dead;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
{
QGraphicsRectItem::paint(painter, option, widget);
if (harakiri == 0) {
// delete unsupported since 4.5
/*
- dead = 1;
+ dead = true;
delete this;
*/
}
}
- void advance(int n)
+ void advance(int n) override
{
if (harakiri == 1 && n == 0) {
// delete unsupported
/*
- dead = 1;
+ dead = true;
delete this;
*/
}
if (harakiri == 2 && n == 1) {
- dead = 1;
+ dead = true;
delete this;
}
}
protected:
#ifndef QT_NO_CONTEXTMENU
- void contextMenuEvent(QGraphicsSceneContextMenuEvent *)
+ void contextMenuEvent(QGraphicsSceneContextMenuEvent *) override
{
if (harakiri == 3) {
- dead = 1;
+ dead = true;
delete this;
}
}
#endif // QT_NO_CONTEXTMENU
- void dragEnterEvent(QGraphicsSceneDragDropEvent *event)
+ void dragEnterEvent(QGraphicsSceneDragDropEvent *event) override
{
// ??
QGraphicsRectItem::dragEnterEvent(event);
}
- void dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
+ void dragLeaveEvent(QGraphicsSceneDragDropEvent *event) override
{
// ??
QGraphicsRectItem::dragLeaveEvent(event);
}
- void dragMoveEvent(QGraphicsSceneDragDropEvent *event)
+ void dragMoveEvent(QGraphicsSceneDragDropEvent *event) override
{
// ??
QGraphicsRectItem::dragMoveEvent(event);
}
- void dropEvent(QGraphicsSceneDragDropEvent *event)
+ void dropEvent(QGraphicsSceneDragDropEvent *event) override
{
// ??
QGraphicsRectItem::dropEvent(event);
}
- void focusInEvent(QFocusEvent *)
+ void focusInEvent(QFocusEvent *) override
{
if (harakiri == 4) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void focusOutEvent(QFocusEvent *)
+ void focusOutEvent(QFocusEvent *) override
{
if (harakiri == 5) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void hoverEnterEvent(QGraphicsSceneHoverEvent *)
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *) override
{
if (harakiri == 6) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void hoverLeaveEvent(QGraphicsSceneHoverEvent *)
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override
{
if (harakiri == 7) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void hoverMoveEvent(QGraphicsSceneHoverEvent *)
+ void hoverMoveEvent(QGraphicsSceneHoverEvent *) override
{
if (harakiri == 8) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void inputMethodEvent(QInputMethodEvent *event)
+ void inputMethodEvent(QInputMethodEvent *event) override
{
// ??
QGraphicsRectItem::inputMethodEvent(event);
}
- QVariant inputMethodQuery(Qt::InputMethodQuery query) const
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override
{
// ??
return QGraphicsRectItem::inputMethodQuery(query);
}
- QVariant itemChange(GraphicsItemChange change, const QVariant &value)
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
{
// deletion not supported
return QGraphicsRectItem::itemChange(change, value);
}
- void keyPressEvent(QKeyEvent *)
+ void keyPressEvent(QKeyEvent *) override
{
if (harakiri == 9) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void keyReleaseEvent(QKeyEvent *)
+ void keyReleaseEvent(QKeyEvent *) override
{
if (harakiri == 10) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *)
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) override
{
if (harakiri == 11) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void mouseMoveEvent(QGraphicsSceneMouseEvent *)
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *) override
{
if (harakiri == 12) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void mousePressEvent(QGraphicsSceneMouseEvent *)
+ void mousePressEvent(QGraphicsSceneMouseEvent *) override
{
if (harakiri == 13) {
- dead = 1;
+ dead = true;
delete this;
}
}
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override
{
if (harakiri == 14) {
- dead = 1;
+ dead = true;
delete this;
}
}
- bool sceneEvent(QEvent *event)
+ bool sceneEvent(QEvent *event) override
{
// deletion not supported
return QGraphicsRectItem::sceneEvent(event);
}
- bool sceneEventFilter(QGraphicsItem *watched, QEvent *event)
+ bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override
{
// deletion not supported
return QGraphicsRectItem::sceneEventFilter(watched, event);
}
- void wheelEvent(QGraphicsSceneWheelEvent *)
+ void wheelEvent(QGraphicsSceneWheelEvent *) override
{
if (harakiri == 16) {
- dead = 1;
+ dead = true;
delete this;
}
}
@@ -5331,7 +5366,7 @@ private:
int harakiri;
};
-int HarakiriItem::dead;
+bool HarakiriItem::dead;
void tst_QGraphicsItem::deleteItemInEventHandlers()
{
@@ -5346,44 +5381,45 @@ void tst_QGraphicsItem::deleteItemInEventHandlers()
item->installSceneEventFilter(item); // <- ehey!
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
- qApp->processEvents();
- qApp->processEvents();
+ QCoreApplication::processEvents();
+ QCoreApplication::processEvents();
- if (!item->dead)
+ if (!HarakiriItem::dead)
scene.advance();
#ifndef QT_NO_CONTEXTMENU
- if (!item->dead) {
+ if (!HarakiriItem::dead) {
QContextMenuEvent event(QContextMenuEvent::Other,
view.mapFromScene(item->scenePos()));
QCoreApplication::sendEvent(view.viewport(), &event);
}
#endif // QT_NO_CONTEXTMENU
- if (!item->dead)
+ if (!HarakiriItem::dead)
QTest::mouseMove(view.viewport(), view.mapFromScene(item->scenePos()));
- if (!item->dead)
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos()));
- if (!item->dead)
- QTest::mouseDClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos()));
- if (!item->dead)
- QTest::mouseClick(view.viewport(), Qt::RightButton, 0, view.mapFromScene(item->scenePos()));
- if (!item->dead)
+ if (!HarakiriItem::dead)
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item->scenePos()));
+ if (!HarakiriItem::dead)
+ QTest::mouseDClick(view.viewport(), Qt::LeftButton, {}, view.mapFromScene(item->scenePos()));
+ if (!HarakiriItem::dead)
+ QTest::mouseClick(view.viewport(), Qt::RightButton, {}, view.mapFromScene(item->scenePos()));
+ if (!HarakiriItem::dead)
QTest::mouseMove(view.viewport(), view.mapFromScene(item->scenePos() + QPointF(20, -20)));
- if (!item->dead)
+ if (!HarakiriItem::dead)
item->setFocus();
- if (!item->dead)
+ if (!HarakiriItem::dead)
item->clearFocus();
- if (!item->dead)
+ if (!HarakiriItem::dead)
item->setFocus();
- if (!item->dead)
+ if (!HarakiriItem::dead)
QTest::keyPress(view.viewport(), Qt::Key_A);
- if (!item->dead)
+ if (!HarakiriItem::dead)
QTest::keyRelease(view.viewport(), Qt::Key_A);
- if (!item->dead)
+ if (!HarakiriItem::dead)
QTest::keyPress(view.viewport(), Qt::Key_A);
- if (!item->dead)
+ if (!HarakiriItem::dead)
QTest::keyRelease(view.viewport(), Qt::Key_A);
}
}
@@ -5391,12 +5427,12 @@ void tst_QGraphicsItem::deleteItemInEventHandlers()
class ItemPaintsOutsideShape : public QGraphicsItem
{
public:
- QRectF boundingRect() const
+ QRectF boundingRect() const override
{
return QRectF(0, 0, 100, 100);
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
{
painter->fillRect(-50, -50, 200, 200, Qt::red);
painter->fillRect(0, 0, 100, 100, Qt::blue);
@@ -5492,16 +5528,16 @@ void tst_QGraphicsItem::itemClipsChildrenToShape2()
QGraphicsScene scene;
scene.addItem(parent);
- QCOMPARE(scene.items(QPointF(5, 5)).value(0, nullptr), (QGraphicsItem *)parent);
+ QCOMPARE(scene.items(QPointF(5, 5)).value(0, nullptr), parent);
QVERIFY(scene.items(QPointF(15, 5)).isEmpty());
QVERIFY(scene.items(QPointF(5, 15)).isEmpty());
QVERIFY(scene.items(QPointF(60, 60)).isEmpty());
QVERIFY(scene.items(QPointF(140, 60)).isEmpty());
QVERIFY(scene.items(QPointF(60, 140)).isEmpty());
QVERIFY(scene.items(QPointF(140, 140)).isEmpty());
- QCOMPARE(scene.items(QPointF(75, 75)).value(0, nullptr), (QGraphicsItem *)child2);
- QCOMPARE(scene.items(QPointF(75, 100)).value(0, nullptr), (QGraphicsItem *)child1);
- QCOMPARE(scene.items(QPointF(100, 75)).value(0, nullptr), (QGraphicsItem *)child1);
+ QCOMPARE(scene.items(QPointF(75, 75)).value(0, nullptr), child2);
+ QCOMPARE(scene.items(QPointF(75, 100)).value(0, nullptr), child1);
+ QCOMPARE(scene.items(QPointF(100, 75)).value(0, nullptr), child1);
QImage image(100, 100, QImage::Format_ARGB32_Premultiplied);
image.fill(0);
@@ -5536,9 +5572,9 @@ void tst_QGraphicsItem::itemClipsChildrenToShape3()
grandchild->setPos( 50, 50 );
parent->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
- QCOMPARE(scene.items(QPointF(25, 25)).value(0, nullptr), (QGraphicsItem *)parent);
- QCOMPARE(scene.items(QPointF(75, 75)).value(0, nullptr), (QGraphicsItem *)child);
- QCOMPARE(scene.items(QPointF(125, 125)).value(0, nullptr), (QGraphicsItem *)grandchild);
+ QCOMPARE(scene.items(QPointF(25, 25)).value(0, nullptr), parent);
+ QCOMPARE(scene.items(QPointF(75, 75)).value(0, nullptr), child);
+ QCOMPARE(scene.items(QPointF(125, 125)).value(0, nullptr), grandchild);
QVERIFY(scene.items(QPointF(175, 175)).isEmpty());
// Move child to fully overlap the parent. The grandchild should
@@ -5546,26 +5582,24 @@ void tst_QGraphicsItem::itemClipsChildrenToShape3()
child->prepareGeometryChange();
child->setPos( 0, 0 );
- QCOMPARE(scene.items(QPointF(25, 25)).value(0, nullptr), (QGraphicsItem *)child);
- QCOMPARE(scene.items(QPointF(75, 75)).value(0, nullptr), (QGraphicsItem *)grandchild);
- QCOMPARE(scene.items(QPointF(125, 125)).value(0, nullptr), (QGraphicsItem *)grandchild);
+ QCOMPARE(scene.items(QPointF(25, 25)).value(0, nullptr), child);
+ QCOMPARE(scene.items(QPointF(75, 75)).value(0, nullptr), grandchild);
+ QCOMPARE(scene.items(QPointF(125, 125)).value(0, nullptr), grandchild);
QVERIFY(scene.items(QPointF(175, 175)).isEmpty());
}
class MyProxyWidget : public QGraphicsProxyWidget
{
public:
- MyProxyWidget(QGraphicsItem *parent) : QGraphicsProxyWidget(parent)
- {
- painted = false;
- }
+ using QGraphicsProxyWidget::QGraphicsProxyWidget;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
{
QGraphicsProxyWidget::paint(painter, option, widget);
painted = true;
}
- bool painted;
+
+ bool painted = false;
};
void tst_QGraphicsItem::itemClipsChildrenToShape4()
@@ -5586,8 +5620,9 @@ void tst_QGraphicsItem::itemClipsChildrenToShape4()
//now the label is shown
outerWidget->setFlag(QGraphicsItem::ItemClipsChildrenToShape, false );
QApplication::setActiveWindow(&view);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
- QTRY_COMPARE(QApplication::activeWindow(), (QWidget *)&view);
+ QTRY_COMPARE(QApplication::activeWindow(), &view);
QTRY_COMPARE(innerWidget->painted, true);
}
@@ -5610,10 +5645,9 @@ void tst_QGraphicsItem::itemClipsChildrenToShape5()
class ParentItem : public QGraphicsRectItem
{
public:
- ParentItem(qreal x, qreal y, qreal width, qreal height)
- : QGraphicsRectItem(x, y, width, height) {}
+ using QGraphicsRectItem::QGraphicsRectItem;
- QPainterPath shape() const
+ QPainterPath shape() const override
{
QPainterPath path;
path.addRect(50, 50, 200, 200);
@@ -5668,12 +5702,12 @@ void tst_QGraphicsItem::itemClipsChildrenToShape5()
bottomRightChild->setPos(200, 200);
childRegion += QRect(200, 200, 100, 100);
- QPoint controlPoints[17] = {
- QPoint(5, 5) , QPoint(95, 5) , QPoint(205, 5) , QPoint(295, 5) ,
- QPoint(5, 95) , QPoint(95, 95) , QPoint(205, 95) , QPoint(295, 95) ,
- QPoint(150, 150),
- QPoint(5, 205), QPoint(95, 205), QPoint(205, 205), QPoint(295, 205),
- QPoint(5, 295), QPoint(95, 295), QPoint(205, 295), QPoint(295, 295),
+ const QPoint controlPoints[17] = {
+ {5, 5}, {95, 5}, {205, 5}, {295, 5},
+ {5, 95}, {95, 95}, {205, 95}, {295, 95},
+ {150, 150},
+ {5, 205}, {95, 205}, {205, 205}, {295, 205},
+ {5, 295}, {95, 295}, {205, 295}, {295, 295},
};
const QRegion clippedChildRegion = childRegion & QRect(50, 50, 200, 200);
@@ -5684,8 +5718,7 @@ void tst_QGraphicsItem::itemClipsChildrenToShape5()
QImage sceneImage(300, 300, QImage::Format_ARGB32);
#define VERIFY_CONTROL_POINTS(pRegion, cRegion, gRegion) \
- for (int i = 0; i < 17; ++i) { \
- QPoint controlPoint = controlPoints[i]; \
+ for (const QPoint &controlPoint : controlPoints) { \
QRgb pixel = sceneImage.pixel(controlPoint.x(), controlPoint.y()); \
if (pRegion.contains(controlPoint)) \
QVERIFY(qBlue(pixel) != 0); \
@@ -5711,13 +5744,13 @@ void tst_QGraphicsItem::itemClipsChildrenToShape5()
case 0:
// All children stacked in front.
childString = QLatin1String("ChildrenInFront.png");
- foreach (QGraphicsItem *child, children)
+ for (QGraphicsItem *child : children)
child->setFlag(QGraphicsItem::ItemStacksBehindParent, false);
break;
case 1:
// All children stacked behind.
childString = QLatin1String("ChildrenBehind.png");
- foreach (QGraphicsItem *child, children)
+ for (QGraphicsItem *child : children)
child->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
break;
case 2:
@@ -5821,8 +5854,8 @@ void tst_QGraphicsItem::itemClippingDiscovery()
rightRectItem->setParentItem(clipItem);
// The rects item are both visible at these points.
- QCOMPARE(scene.items(QPointF(10, 10)).value(0, nullptr), (QGraphicsItem *)leftRectItem);
- QCOMPARE(scene.items(QPointF(90, 90)).value(0, nullptr), (QGraphicsItem *)rightRectItem);
+ QCOMPARE(scene.items(QPointF(10, 10)).value(0, nullptr), leftRectItem);
+ QCOMPARE(scene.items(QPointF(90, 90)).value(0, nullptr), rightRectItem);
// The ellipse clips the rects now.
clipItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
@@ -5837,13 +5870,15 @@ void tst_QGraphicsItem::itemClippingDiscovery()
class ItemCountsBoundingRectCalls : public QGraphicsRectItem
{
public:
- ItemCountsBoundingRectCalls(const QRectF & rect, QGraphicsItem *parent = 0)
- : QGraphicsRectItem(rect, parent), boundingRectCalls(0) {}
- QRectF boundingRect () const {
+ using QGraphicsRectItem::QGraphicsRectItem;
+
+ QRectF boundingRect () const override
+ {
++boundingRectCalls;
return QGraphicsRectItem::boundingRect();
}
- mutable int boundingRectCalls;
+
+ mutable int boundingRectCalls = 0;
};
void tst_QGraphicsItem::itemContainsChildrenInShape()
@@ -6006,7 +6041,7 @@ void tst_QGraphicsItem::ancestorFlags()
QCOMPARE(int(level32->d_ptr->ancestorFlags), 1);
// Reparent the child to root
- level21->setParentItem(0);
+ level21->setParentItem(nullptr);
QCOMPARE(int(level21->d_ptr->ancestorFlags), 0);
QCOMPARE(int(level22->d_ptr->ancestorFlags), 0);
QCOMPARE(int(level31->d_ptr->ancestorFlags), 1);
@@ -6030,7 +6065,7 @@ void tst_QGraphicsItem::ancestorFlags()
QCOMPARE(int(level32->d_ptr->ancestorFlags), 1);
// Reparenting level31 back to level21.
- level31->setParentItem(0);
+ level31->setParentItem(nullptr);
QCOMPARE(int(level31->d_ptr->ancestorFlags), 0);
level31->setParentItem(level21);
QCOMPARE(int(level1->d_ptr->ancestorFlags), 0);
@@ -6069,7 +6104,6 @@ void tst_QGraphicsItem::ancestorFlags()
break;
default:
qFatal("Unknown ancestor flag, please fix!");
- break;
}
QCOMPARE(int(level1->d_ptr->ancestorFlags), 0);
@@ -6136,7 +6170,7 @@ void tst_QGraphicsItem::ancestorFlags()
QCOMPARE(int(level32->d_ptr->ancestorFlags), ancestorFlag);
// Reparent the child to root
- level21->setParentItem(0);
+ level21->setParentItem(nullptr);
QCOMPARE(int(level21->d_ptr->ancestorFlags), 0);
QCOMPARE(int(level22->d_ptr->ancestorFlags), 0);
QCOMPARE(int(level31->d_ptr->ancestorFlags), ancestorFlag);
@@ -6160,7 +6194,7 @@ void tst_QGraphicsItem::ancestorFlags()
QCOMPARE(int(level32->d_ptr->ancestorFlags), ancestorFlag);
// Reparenting level31 back to level21.
- level31->setParentItem(0);
+ level31->setParentItem(nullptr);
QCOMPARE(int(level31->d_ptr->ancestorFlags), 0);
level31->setParentItem(level21);
QCOMPARE(int(level1->d_ptr->ancestorFlags), 0);
@@ -6191,28 +6225,29 @@ void tst_QGraphicsItem::ancestorFlags()
void tst_QGraphicsItem::untransformable()
{
- QGraphicsItem *item1 = new QGraphicsEllipseItem(QRectF(-50, -50, 100, 100));
+ auto item1 = new QGraphicsEllipseItem(QRectF(-50, -50, 100, 100));
item1->setZValue(1);
item1->setFlag(QGraphicsItem::ItemIgnoresTransformations);
item1->setTransform(QTransform().rotate(45), true);
- ((QGraphicsEllipseItem *)item1)->setBrush(Qt::red);
+ item1->setBrush(Qt::red);
- QGraphicsItem *item2 = new QGraphicsEllipseItem(QRectF(-50, -50, 100, 100));
+ auto item2 = new QGraphicsEllipseItem(QRectF(-50, -50, 100, 100));
item2->setParentItem(item1);
item2->setTransform(QTransform().rotate(45), true);
item2->setPos(100, 0);
- ((QGraphicsEllipseItem *)item2)->setBrush(Qt::green);
+ item2->setBrush(Qt::green);
- QGraphicsItem *item3 = new QGraphicsEllipseItem(QRectF(-50, -50, 100, 100));
+ auto item3 = new QGraphicsEllipseItem(QRectF(-50, -50, 100, 100));
item3->setParentItem(item2);
item3->setPos(100, 0);
- ((QGraphicsEllipseItem *)item3)->setBrush(Qt::blue);
+ item3->setBrush(Qt::blue);
QGraphicsScene scene(-500, -500, 1000, 1000);
scene.addItem(item1);
QWidget topLevel;
QGraphicsView view(&scene,&topLevel);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.resize(300, 300);
topLevel.show();
view.scale(8, 8);
@@ -6257,14 +6292,14 @@ void tst_QGraphicsItem::untransformable()
class ContextMenuItem : public QGraphicsRectItem
{
public:
- ContextMenuItem()
- : ignoreEvent(true), gotEvent(false), eventWasAccepted(false)
- { }
- bool ignoreEvent;
- bool gotEvent;
- bool eventWasAccepted;
+ using QGraphicsRectItem::QGraphicsRectItem;
+
+ bool ignoreEvent = true;
+ bool gotEvent = false;
+ bool eventWasAccepted = false;
+
protected:
- void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
+ void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override
{
gotEvent = true;
eventWasAccepted = event->isAccepted();
@@ -6284,6 +6319,7 @@ void tst_QGraphicsItem::contextMenuEventPropagation()
QGraphicsScene scene;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.setAlignment(Qt::AlignLeft | Qt::AlignTop);
view.show();
view.resize(200, 200);
@@ -6292,14 +6328,14 @@ void tst_QGraphicsItem::contextMenuEventPropagation()
QContextMenuEvent event(QContextMenuEvent::Mouse, QPoint(10, 10),
view.viewport()->mapToGlobal(QPoint(10, 10)));
event.ignore();
- QApplication::sendEvent(view.viewport(), &event);
+ QCoreApplication::sendEvent(view.viewport(), &event);
QVERIFY(!event.isAccepted());
scene.addItem(bottomItem);
topItem->ignoreEvent = true;
bottomItem->ignoreEvent = true;
- QApplication::sendEvent(view.viewport(), &event);
+ QCoreApplication::sendEvent(view.viewport(), &event);
QVERIFY(!event.isAccepted());
QCOMPARE(topItem->gotEvent, true);
QCOMPARE(topItem->eventWasAccepted, true);
@@ -6310,7 +6346,7 @@ void tst_QGraphicsItem::contextMenuEventPropagation()
topItem->gotEvent = false;
bottomItem->gotEvent = false;
- QApplication::sendEvent(view.viewport(), &event);
+ QCoreApplication::sendEvent(view.viewport(), &event);
QVERIFY(event.isAccepted());
QCOMPARE(topItem->gotEvent, true);
QCOMPARE(bottomItem->gotEvent, false);
@@ -6330,34 +6366,34 @@ void tst_QGraphicsItem::itemIsMovable()
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
event.setButton(Qt::LeftButton);
event.setButtons(Qt::LeftButton);
- qApp->sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
}
{
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseMove);
event.setButton(Qt::LeftButton);
event.setButtons(Qt::LeftButton);
- qApp->sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
}
QCOMPARE(rect->pos(), QPointF(0, 0));
{
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseMove);
event.setButtons(Qt::LeftButton);
event.setScenePos(QPointF(10, 10));
- qApp->sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
}
QCOMPARE(rect->pos(), QPointF(10, 10));
{
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseMove);
event.setButtons(Qt::RightButton);
event.setScenePos(QPointF(20, 20));
- qApp->sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
}
QCOMPARE(rect->pos(), QPointF(10, 10));
{
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseMove);
event.setButtons(Qt::LeftButton);
event.setScenePos(QPointF(30, 30));
- qApp->sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
}
QCOMPARE(rect->pos(), QPointF(30, 30));
}
@@ -6368,14 +6404,14 @@ class ItemAddScene : public QGraphicsScene
public:
ItemAddScene()
{
- QTimer::singleShot(500, this, SLOT(newTextItem()));
+ QTimer::singleShot(500, this, &ItemAddScene::newTextItem);
}
public slots:
void newTextItem()
{
// Add a text item
- QGraphicsItem *item = new QGraphicsTextItem("This item will not ensure that it's visible", 0);
+ QGraphicsItem *item = addText("This item will not ensure that it's visible");
item->setPos(.0, .0);
item->show();
}
@@ -6387,6 +6423,7 @@ void tst_QGraphicsItem::task141694_textItemEnsureVisible()
scene.setSceneRect(-1000, -1000, 2000, 2000);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.setFixedSize(200, 200);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -6414,6 +6451,7 @@ void tst_QGraphicsItem::task128696_textItemEnsureMovable()
scene.addItem(item);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.setFixedSize(200, 200);
view.show();
@@ -6421,14 +6459,14 @@ void tst_QGraphicsItem::task128696_textItemEnsureMovable()
event1.setScenePos(QPointF(0, 0));
event1.setButton(Qt::LeftButton);
event1.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event1);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)item);
+ QCoreApplication::sendEvent(&scene, &event1);
+ QCOMPARE(scene.mouseGrabberItem(), item);
QGraphicsSceneMouseEvent event2(QEvent::GraphicsSceneMouseMove);
event2.setScenePos(QPointF(10, 10));
event2.setButton(Qt::LeftButton);
event2.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event2);
+ QCoreApplication::sendEvent(&scene, &event2);
QCOMPARE(item->pos(), QPointF(10, 10));
}
@@ -6447,33 +6485,45 @@ void tst_QGraphicsItem::task177918_lineItemUndetected()
void tst_QGraphicsItem::task240400_clickOnTextItem_data()
{
- QTest::addColumn<int>("flags");
- QTest::addColumn<int>("textFlags");
- QTest::newRow("editor, noflags") << 0 << int(Qt::TextEditorInteraction);
- QTest::newRow("editor, movable") << int(QGraphicsItem::ItemIsMovable) << int(Qt::TextEditorInteraction);
- QTest::newRow("editor, selectable") << int(QGraphicsItem::ItemIsSelectable) << int(Qt::TextEditorInteraction);
- QTest::newRow("editor, movable | selectable") << int(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable)
- << int(Qt::TextEditorInteraction);
- QTest::newRow("noninteractive, noflags") << 0 << int(Qt::NoTextInteraction);
- QTest::newRow("noninteractive, movable") << int(QGraphicsItem::ItemIsMovable) << int(Qt::NoTextInteraction);
- QTest::newRow("noninteractive, selectable") << int(QGraphicsItem::ItemIsSelectable) << int(Qt::NoTextInteraction);
- QTest::newRow("noninteractive, movable | selectable") << int(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable)
- << int(Qt::NoTextInteraction);
+ using Flags = QGraphicsItem::GraphicsItemFlags;
+ QTest::addColumn<Flags>("flags");
+ QTest::addColumn<Qt::TextInteractionFlags>("textFlags");
+ QTest::newRow("editor, noflags")
+ << Flags{}
+ << Qt::TextInteractionFlags(Qt::TextEditorInteraction);
+ QTest::newRow("editor, movable")
+ << Flags(QGraphicsItem::ItemIsMovable)
+ << Qt::TextInteractionFlags(Qt::TextEditorInteraction);
+ QTest::newRow("editor, selectable")
+ << Flags(QGraphicsItem::ItemIsSelectable)
+ << Qt::TextInteractionFlags(Qt::TextEditorInteraction);
+ QTest::newRow("editor, movable | selectable")
+ << Flags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable)
+ << Qt::TextInteractionFlags(Qt::TextEditorInteraction);
+ QTest::newRow("noninteractive, noflags")
+ << Flags{} << Qt::TextInteractionFlags(Qt::NoTextInteraction);
+ QTest::newRow("noninteractive, movable")
+ << Flags(QGraphicsItem::ItemIsMovable) << Qt::TextInteractionFlags(Qt::NoTextInteraction);
+ QTest::newRow("noninteractive, selectable")
+ << Flags(QGraphicsItem::ItemIsSelectable) << Qt::TextInteractionFlags(Qt::NoTextInteraction);
+ QTest::newRow("noninteractive, movable | selectable")
+ << Flags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable)
+ << Qt::TextInteractionFlags(Qt::NoTextInteraction);
}
void tst_QGraphicsItem::task240400_clickOnTextItem()
{
- QFETCH(int, flags);
- QFETCH(int, textFlags);
+ QFETCH(QGraphicsItem::GraphicsItemFlags, flags);
+ QFETCH(Qt::TextInteractionFlags, textFlags);
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
QGraphicsTextItem *item = scene.addText("Hello");
- item->setFlags(QGraphicsItem::GraphicsItemFlags(flags));
- item->setTextInteractionFlags(Qt::TextInteractionFlags(textFlags));
- bool focusable = (item->flags() & QGraphicsItem::ItemIsFocusable);
+ item->setFlags(flags);
+ item->setTextInteractionFlags(textFlags);
+ const bool focusable = item->flags().testFlag(QGraphicsItem::ItemIsFocusable);
QVERIFY(textFlags ? focusable : !focusable);
int column = item->textCursor().columnNumber();
@@ -6487,25 +6537,25 @@ void tst_QGraphicsItem::task240400_clickOnTextItem()
event.setScenePos(item->sceneBoundingRect().topLeft() + QPointF(0.1, 0.1));
event.setButton(Qt::LeftButton);
event.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
}
if (flags || textFlags)
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)item);
+ QCOMPARE(scene.mouseGrabberItem(), item);
else
QCOMPARE(scene.mouseGrabberItem(), nullptr);
{
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseRelease);
event.setScenePos(item->sceneBoundingRect().topLeft() + QPointF(0.1, 0.1));
event.setButton(Qt::LeftButton);
- event.setButtons(0);
- QApplication::sendEvent(&scene, &event);
+ event.setButtons({});
+ QCoreApplication::sendEvent(&scene, &event);
}
if (textFlags)
QVERIFY(item->hasFocus());
else
QVERIFY(!item->hasFocus());
QVERIFY(!scene.mouseGrabberItem());
- bool selectable = (flags & QGraphicsItem::ItemIsSelectable);
+ bool selectable = flags.testFlag(QGraphicsItem::ItemIsSelectable);
QVERIFY(selectable ? item->isSelected() : !item->isSelected());
// Now click in the middle and check that the cursor moved.
@@ -6514,18 +6564,18 @@ void tst_QGraphicsItem::task240400_clickOnTextItem()
event.setScenePos(item->sceneBoundingRect().center());
event.setButton(Qt::LeftButton);
event.setButtons(Qt::LeftButton);
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
}
if (flags || textFlags)
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)item);
+ QCOMPARE(scene.mouseGrabberItem(), item);
else
QCOMPARE(scene.mouseGrabberItem(), nullptr);
{
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseRelease);
event.setScenePos(item->sceneBoundingRect().center());
event.setButton(Qt::LeftButton);
- event.setButtons(0);
- QApplication::sendEvent(&scene, &event);
+ event.setButtons({});
+ QCoreApplication::sendEvent(&scene, &event);
}
if (textFlags)
QVERIFY(item->hasFocus());
@@ -6536,7 +6586,7 @@ void tst_QGraphicsItem::task240400_clickOnTextItem()
QVERIFY(selectable ? item->isSelected() : !item->isSelected());
//
- if (textFlags & Qt::TextEditorInteraction)
+ if (textFlags.testFlag(Qt::TextEditorInteraction))
QVERIFY(item->textCursor().columnNumber() > column);
else
QCOMPARE(item->textCursor().columnNumber(), 0);
@@ -6545,24 +6595,22 @@ void tst_QGraphicsItem::task240400_clickOnTextItem()
class TextItem : public QGraphicsSimpleTextItem
{
public:
- TextItem(const QString& text) : QGraphicsSimpleTextItem(text)
- {
- updates = 0;
- }
+ using QGraphicsSimpleTextItem::QGraphicsSimpleTextItem;
- void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget)
+ void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) override
{
updates++;
QGraphicsSimpleTextItem::paint(painter, option, widget);
}
- int updates;
+ int updates = 0;
};
void tst_QGraphicsItem::ensureUpdateOnTextItem()
{
QGraphicsScene scene;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QCoreApplication::processEvents(); // Process all queued paint events
@@ -6836,6 +6884,7 @@ void tst_QGraphicsItem::opacity2()
scene.addItem(parent);
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(QTest::qWaitForWindowActive(&view));
@@ -6910,6 +6959,7 @@ void tst_QGraphicsItem::opacityZeroUpdates()
scene.addItem(parent);
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(QTest::qWaitForWindowActive(&view));
@@ -6939,18 +6989,18 @@ void tst_QGraphicsItem::opacityZeroUpdates()
class StacksBehindParentHelper : public QGraphicsRectItem
{
public:
- StacksBehindParentHelper(QList<QGraphicsItem *> *paintedItems, const QRectF &rect, QGraphicsItem *parent = 0)
- : QGraphicsRectItem(rect, parent), paintedItems(paintedItems)
+ StacksBehindParentHelper(GraphicsItems *paintedItems, const QRectF &rect, QGraphicsItem *parent = nullptr)
+ : QGraphicsRectItem(rect, parent), m_paintedItems(paintedItems)
{ }
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
{
QGraphicsRectItem::paint(painter, option, widget);
- paintedItems->append(this);
+ m_paintedItems->append(this);
}
private:
- QList<QGraphicsItem *> *paintedItems;
+ GraphicsItems *m_paintedItems;
};
void tst_QGraphicsItem::itemStacksBehindParent()
@@ -6988,6 +7038,7 @@ void tst_QGraphicsItem::itemStacksBehindParent()
scene.addItem(parent2);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QTRY_VERIFY(!paintedItems.isEmpty());
@@ -6995,55 +7046,47 @@ void tst_QGraphicsItem::itemStacksBehindParent()
view.viewport()->update();
QApplication::processEvents();
QRectF rect(0, 0, 100, 100);
- QTRY_COMPARE(scene.items(rect), (QList<QGraphicsItem *>()
- << grandChild111 << child11
- << grandChild121 << child12 << parent1
- << grandChild211 << child21
- << grandChild221 << child22 << parent2));
- QTRY_COMPARE(paintedItems, QList<QGraphicsItem *>()
- << parent2 << child22 << grandChild221
- << child21 << grandChild211
- << parent1 << child12 << grandChild121
- << child11 << grandChild111);
+ const GraphicsItemsList expected1{grandChild111, child11, grandChild121, child12, parent1,
+ grandChild211, child21, grandChild221, child22, parent2};
+ QTRY_COMPARE(scene.items(rect), expected1);
+
+ const GraphicsItems expected2{parent2, child22, grandChild221, child21, grandChild211,
+ parent1, child12, grandChild121, child11, grandChild111};
+ QTRY_COMPARE(paintedItems, expected2);
child11->setFlag(QGraphicsItem::ItemStacksBehindParent);
scene.update();
paintedItems.clear();
- QTRY_COMPARE(scene.items(rect), (QList<QGraphicsItem *>()
- << grandChild121 << child12 << parent1
- << grandChild111 << child11
- << grandChild211 << child21
- << grandChild221 << child22 << parent2));
- QTRY_COMPARE(paintedItems, QList<QGraphicsItem *>()
- << parent2 << child22 << grandChild221
- << child21 << grandChild211
- << child11 << grandChild111
- << parent1 << child12 << grandChild121);
+ const GraphicsItemsList expected3{grandChild121, child12, parent1, grandChild111, child11,
+ grandChild211, child21, grandChild221, child22, parent2};
+
+ QTRY_COMPARE(scene.items(rect), expected3);
+ const GraphicsItems expected4{parent2, child22, grandChild221, child21, grandChild211, child11, grandChild111,
+ parent1, child12, grandChild121};
+ QTRY_COMPARE(paintedItems, expected4);
child12->setFlag(QGraphicsItem::ItemStacksBehindParent);
paintedItems.clear();
scene.update();
- QTRY_COMPARE(scene.items(rect), (QList<QGraphicsItem *>()
- << parent1 << grandChild111 << child11
- << grandChild121 << child12
- << grandChild211 << child21
- << grandChild221 << child22 << parent2));
- QTRY_COMPARE(paintedItems, QList<QGraphicsItem *>()
- << parent2 << child22 << grandChild221
- << child21 << grandChild211
- << child12 << grandChild121
- << child11 << grandChild111 << parent1);
+ const GraphicsItemsList expected5{parent1, grandChild111, child11, grandChild121, child12,
+ grandChild211, child21, grandChild221, child22, parent2};
+ QTRY_COMPARE(scene.items(rect), expected5);
+
+ const GraphicsItems expected6{parent2, child22, grandChild221, child21, grandChild211,
+ child12, grandChild121, child11, grandChild111, parent1};
+ QTRY_COMPARE(paintedItems, expected6);
}
class ClippingAndTransformsScene : public QGraphicsScene
{
+ Q_OBJECT
public:
- QList<QGraphicsItem *> drawnItems;
+ GraphicsItems drawnItems;
protected:
void drawItems(QPainter *painter, int numItems, QGraphicsItem *items[],
- const QStyleOptionGraphicsItem options[], QWidget *widget = 0)
+ const QStyleOptionGraphicsItem options[], QWidget *widget = nullptr) override
{
drawnItems.clear();
for (int i = 0; i < numItems; ++i)
@@ -7084,11 +7127,11 @@ void tst_QGraphicsItem::nestedClipping()
QGraphicsView view(&scene);
view.setOptimizationFlag(QGraphicsView::IndirectPainting);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
- QList<QGraphicsItem *> expected;
- expected << root << l1 << l2 << l3;
+ GraphicsItems expected{root, l1, l2, l3};
QTRY_COMPARE(scene.drawnItems, expected);
QImage image(200, 200, QImage::Format_ARGB32_Premultiplied);
@@ -7126,7 +7169,7 @@ public:
QTransform x;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
- QWidget *widget = 0)
+ QWidget *widget = nullptr) override
{
x = painter->worldTransform();
QGraphicsRectItem::paint(painter, option, widget);
@@ -7195,6 +7238,7 @@ void tst_QGraphicsItem::sceneTransformCache()
rect2->setTransform(QTransform().rotate(90), true);
rect->setTransform(QTransform::fromTranslate(0, 50), true);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
rect->setTransform(QTransform::fromTranslate(0, 100), true);
@@ -7271,6 +7315,7 @@ void tst_QGraphicsItem::tabChangesFocus()
layout->addWidget(dial2);
QWidget widget;
+ widget.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
widget.setLayout(layout);
widget.show();
QVERIFY(QTest::qWaitForWindowActive(&widget));
@@ -7301,6 +7346,7 @@ void tst_QGraphicsItem::cacheMode()
{
QGraphicsScene scene(0, 0, 100, 100);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.resize(150, 150);
view.show();
QApplication::setActiveWindow(&view);
@@ -7481,6 +7527,7 @@ void tst_QGraphicsItem::cacheMode2()
{
QGraphicsScene scene(0, 0, 100, 100);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.resize(150, 150);
view.show();
QApplication::setActiveWindow(&view);
@@ -7552,6 +7599,7 @@ void tst_QGraphicsItem::updateCachedItemAfterMove()
QGraphicsScene scene;
scene.addItem(tester);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -7589,7 +7637,7 @@ public:
setAcceptHoverEvents(true);
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override
{
QGraphicsRectItem::paint(painter, option, widget);
const QString text = QString::number(p.x()) + QLatin1Char('x') + QString::number(p.y())
@@ -7598,7 +7646,7 @@ public:
}
protected:
- void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
+ void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override
{
p = event->pos();
sp = event->widget()->mapFromGlobal(event->screenPos());
@@ -7695,6 +7743,7 @@ void tst_QGraphicsItem::update()
QGraphicsScene scene;
scene.setSceneRect(-100, -100, 200, 200);
QWidget topLevel;
+ topLevel.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
MyGraphicsView view(&scene,&topLevel);
topLevel.resize(300, 300);
@@ -7732,7 +7781,7 @@ void tst_QGraphicsItem::update()
view.reset();
item->repaints = 0;
item->update(-15, -15, 5, 5); // Item's brect: (-10, -10, 20, 20)
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(item->repaints, 0);
QCOMPARE(view.repaints, 0);
@@ -7741,7 +7790,7 @@ void tst_QGraphicsItem::update()
item->repaints = 0;
item->update(); // Full update; all sub-sequent update requests are discarded.
item->hide(); // visible set to 0. ignoreVisible must be set to 1; the item won't be processed otherwise.
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(item->repaints, 0);
QCOMPARE(view.repaints, 1);
// The entire item's bounding rect (adjusted for antialiasing) should have been painted.
@@ -7751,7 +7800,7 @@ void tst_QGraphicsItem::update()
view.reset();
item->repaints = 0;
item->show();
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(item->repaints, 1);
QCOMPARE(view.repaints, 1);
// The entire item's bounding rect (adjusted for antialiasing) should have been painted.
@@ -7759,21 +7808,21 @@ void tst_QGraphicsItem::update()
item->repaints = 0;
item->hide();
- qApp->processEvents();
+ QCoreApplication::processEvents();
view.reset();
const QPointF originalPos = item->pos();
item->setPos(5000, 5000);
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(item->repaints, 0);
QCOMPARE(view.repaints, 0);
- qApp->processEvents();
+ QCoreApplication::processEvents();
item->setPos(originalPos);
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(item->repaints, 0);
QCOMPARE(view.repaints, 0);
item->show();
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(item->repaints, 1);
QCOMPARE(view.repaints, 1);
// The entire item's bounding rect (adjusted for antialiasing) should have been painted.
@@ -7804,14 +7853,14 @@ void tst_QGraphicsItem::update()
view.reset();
item->repaints = 0;
parent->setTransform(QTransform::fromTranslate(-400, 0), true);
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(item->repaints, 0);
QCOMPARE(view.repaints, 1);
QCOMPARE(view.paintedRegion, expectedRegion);
view.reset();
item->repaints = 0;
parent->setTransform(QTransform::fromTranslate(400, 0), true);
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(item->repaints, 1);
QCOMPARE(view.repaints, 1);
QCOMPARE(view.paintedRegion, expectedRegion);
@@ -7933,11 +7982,9 @@ void tst_QGraphicsItem::setTransformProperties()
class MyStyleOptionTester : public QGraphicsRectItem
{
public:
- MyStyleOptionTester(const QRectF &rect)
- : QGraphicsRectItem(rect), startTrack(false)
- {}
+ using QGraphicsRectItem::QGraphicsRectItem;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override
{
++repaints;
if (startTrack) {
@@ -7953,7 +8000,7 @@ public:
}
QGraphicsRectItem::paint(painter, option, widget);
}
- bool startTrack;
+ bool startTrack = false;
int repaints = 0;
};
@@ -7971,6 +8018,7 @@ void tst_QGraphicsItem::itemUsesExtendedStyleOption()
scene.addItem(rect);
rect->setPos(200, 200);
QWidget topLevel;
+ topLevel.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
topLevel.resize(200, 200);
QGraphicsView view(&scene, &topLevel);
topLevel.setWindowFlags(Qt::X11BypassWindowManagerHint);
@@ -7998,7 +8046,7 @@ void tst_QGraphicsItem::itemUsesExtendedStyleOption()
void tst_QGraphicsItem::itemSendsGeometryChanges()
{
ItemChangeTester item;
- item.setFlags(0);
+ item.setFlags(nullptr);
item.clear();
QTransform x = QTransform().rotate(45);
@@ -8038,21 +8086,21 @@ void tst_QGraphicsItem::itemSendsGeometryChanges()
QCOMPARE(item.scale(), qreal(1.0));
QCOMPARE(item.transformOriginPoint(), QPointF(0.0, 0.0));
- QCOMPARE(item.changes, QList<QGraphicsItem::GraphicsItemChange>()
- << QGraphicsItem::ItemOpacityChange
- << QGraphicsItem::ItemOpacityHasChanged
- << QGraphicsItem::ItemFlagsChange
- << QGraphicsItem::ItemFlagsHaveChanged
- << QGraphicsItem::ItemTransformChange
- << QGraphicsItem::ItemTransformHasChanged
- << QGraphicsItem::ItemPositionChange
- << QGraphicsItem::ItemPositionHasChanged
- << QGraphicsItem::ItemRotationChange
- << QGraphicsItem::ItemRotationHasChanged
- << QGraphicsItem::ItemScaleChange
- << QGraphicsItem::ItemScaleHasChanged
- << QGraphicsItem::ItemTransformOriginPointChange
- << QGraphicsItem::ItemTransformOriginPointHasChanged);
+ const QVector<QGraphicsItem::GraphicsItemChange> expected{QGraphicsItem::ItemOpacityChange,
+ QGraphicsItem::ItemOpacityHasChanged,
+ QGraphicsItem::ItemFlagsChange,
+ QGraphicsItem::ItemFlagsHaveChanged,
+ QGraphicsItem::ItemTransformChange,
+ QGraphicsItem::ItemTransformHasChanged,
+ QGraphicsItem::ItemPositionChange,
+ QGraphicsItem::ItemPositionHasChanged,
+ QGraphicsItem::ItemRotationChange,
+ QGraphicsItem::ItemRotationHasChanged,
+ QGraphicsItem::ItemScaleChange,
+ QGraphicsItem::ItemScaleHasChanged,
+ QGraphicsItem::ItemTransformOriginPointChange,
+ QGraphicsItem::ItemTransformOriginPointHasChanged};
+ QCOMPARE(item.changes, expected);
}
// Make sure we update moved items correctly.
@@ -8062,6 +8110,7 @@ void tst_QGraphicsItem::moveItem()
scene.setSceneRect(-50, -50, 200, 200);
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QCoreApplication::processEvents(); // Process all queued paint events
@@ -8088,7 +8137,7 @@ void tst_QGraphicsItem::moveItem()
.adjusted(-2, -2, 2, 2); // Adjusted for antialiasing.
parent->setPos(20, 20);
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(parent->repaints, 1);
QCOMPARE(view.repaints, 1);
QRegion expectedParentRegion = parentDeviceBoundingRect; // old position
@@ -8099,7 +8148,7 @@ void tst_QGraphicsItem::moveItem()
RESET_COUNTERS
child->setPos(20, 20);
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(parent->repaints, 1);
QCOMPARE(child->repaints, 1);
QCOMPARE(view.repaints, 1);
@@ -8109,7 +8158,7 @@ void tst_QGraphicsItem::moveItem()
RESET_COUNTERS
grandChild->setPos(20, 20);
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(parent->repaints, 1);
QCOMPARE(child->repaints, 1);
QCOMPARE(grandChild->repaints, 1);
@@ -8120,7 +8169,7 @@ void tst_QGraphicsItem::moveItem()
RESET_COUNTERS
parent->setTransform(QTransform::fromTranslate(20, 20), true);
- qApp->processEvents();
+ QCoreApplication::processEvents();
QCOMPARE(parent->repaints, 1);
QCOMPARE(child->repaints, 1);
QCOMPARE(grandChild->repaints, 1);
@@ -8140,6 +8189,7 @@ void tst_QGraphicsItem::moveLineItem()
scene.addItem(item);
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(QTest::qWaitForWindowActive(&view));
@@ -8148,9 +8198,9 @@ void tst_QGraphicsItem::moveLineItem()
QRectF brect = item->boundingRect();
// Do same adjustments as in qgraphicsscene.cpp
- if (!brect.width())
+ if (qFuzzyIsNull(brect.width()))
brect.adjust(qreal(-0.00001), 0, qreal(0.00001), 0);
- if (!brect.height())
+ if (qFuzzyIsNull(brect.height()))
brect.adjust(0, qreal(-0.00001), 0, qreal(0.00001));
const QRect itemDeviceBoundingRect = item->deviceTransform(view.viewportTransform())
.mapRect(brect).toAlignedRect();
@@ -8206,6 +8256,7 @@ void tst_QGraphicsItem::sorting()
scene.addItem(item2);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
// Use Qt::Tool as fully decorated windows have a minimum width of 160 on Windows.
view.setWindowFlags(view.windowFlags() | Qt::Tool);
view.setResizeAnchor(QGraphicsView::NoAnchor);
@@ -8227,13 +8278,13 @@ void tst_QGraphicsItem::sorting()
QTest::qWait(100);
#endif
- QCOMPARE(_paintedItems, QList<QGraphicsItem *>()
- << grid[0][0] << grid[0][1] << grid[0][2] << grid[0][3]
- << grid[1][0] << grid[1][1] << grid[1][2] << grid[1][3]
- << grid[2][0] << grid[2][1] << grid[2][2] << grid[2][3]
- << grid[3][0] << grid[3][1] << grid[3][2] << grid[3][3]
- << grid[4][0] << grid[4][1] << grid[4][2] << grid[4][3]
- << item1 << item2);
+ const GraphicsItems expected{grid[0][0], grid[0][1], grid[0][2], grid[0][3],
+ grid[1][0], grid[1][1], grid[1][2], grid[1][3],
+ grid[2][0], grid[2][1], grid[2][2], grid[2][3],
+ grid[3][0], grid[3][1], grid[3][2], grid[3][3],
+ grid[4][0], grid[4][1], grid[4][2], grid[4][3],
+ item1, item2};
+ QCOMPARE(_paintedItems, expected);
}
void tst_QGraphicsItem::itemHasNoContents()
@@ -8249,6 +8300,7 @@ void tst_QGraphicsItem::itemHasNoContents()
scene.addItem(item1);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
qApp->setActiveWindow(&view);
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -8264,7 +8316,7 @@ void tst_QGraphicsItem::itemHasNoContents()
QTest::qWait(10);
#endif
- QTRY_COMPARE(_paintedItems, QList<QGraphicsItem *>() << item2);
+ QTRY_COMPARE(_paintedItems, GraphicsItems{item2});
}
void tst_QGraphicsItem::hitTestUntransformableItem()
@@ -8273,6 +8325,7 @@ void tst_QGraphicsItem::hitTestUntransformableItem()
scene.setSceneRect(-100, -100, 200, 200);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -8303,7 +8356,7 @@ void tst_QGraphicsItem::hitTestUntransformableItem()
QList<QGraphicsItem *> items = scene.items(QPointF(80, 80));
QCOMPARE(items.size(), 1);
- QCOMPARE(items.at(0), static_cast<QGraphicsItem*>(item3));
+ QCOMPARE(items.at(0), item3);
scene.setItemIndexMethod(QGraphicsScene::NoIndex);
QTest::qWait(100);
@@ -8319,6 +8372,7 @@ void tst_QGraphicsItem::hitTestGraphicsEffectItem()
scene.setSceneRect(-100, -100, 200, 200);
QWidget toplevel;
+ toplevel.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
QGraphicsView view(&scene, &toplevel);
toplevel.resize(300, 300);
@@ -8379,7 +8433,7 @@ void tst_QGraphicsItem::hitTestGraphicsEffectItem()
QVERIFY(items.isEmpty());
items = scene.items(QPointF(80, 80));
QCOMPARE(items.size(), 1);
- QCOMPARE(items.at(0), static_cast<QGraphicsItem *>(item3));
+ QCOMPARE(items.at(0), item3);
scene.setItemIndexMethod(QGraphicsScene::NoIndex);
QTest::qWait(100);
@@ -8395,7 +8449,7 @@ void tst_QGraphicsItem::focusProxy()
{
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
QGraphicsItem *item = scene.addRect(0, 0, 10, 10);
item->setFlag(QGraphicsItem::ItemIsFocusable);
@@ -8414,27 +8468,27 @@ void tst_QGraphicsItem::focusProxy()
QString err;
QTextStream stream(&err);
stream << "QGraphicsItem::setFocusProxy: "
- << (void*)item << " is already in the focus proxy chain" << Qt::flush;
+ << static_cast<const void*>(item) << " is already in the focus proxy chain" << Qt::flush;
QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData());
item2->setFocusProxy(item); // fails
- QCOMPARE(item->focusProxy(), (QGraphicsItem *)item2);
+ QCOMPARE(item->focusProxy(), item2);
QCOMPARE(item2->focusProxy(), nullptr);
// Try to assign self as focus proxy
QTest::ignoreMessage(QtWarningMsg, "QGraphicsItem::setFocusProxy: cannot assign self as focus proxy");
item->setFocusProxy(item); // fails
- QCOMPARE(item->focusProxy(), (QGraphicsItem *)item2);
+ QCOMPARE(item->focusProxy(), item2);
QCOMPARE(item2->focusProxy(), nullptr);
// Reset the focus proxy
- item->setFocusProxy(0);
+ item->setFocusProxy(nullptr);
QCOMPARE(item->focusProxy(), nullptr);
QVERIFY(!item->hasFocus());
QVERIFY(item2->hasFocus());
// Test deletion
item->setFocusProxy(item2);
- QCOMPARE(item->focusProxy(), (QGraphicsItem *)item2);
+ QCOMPARE(item->focusProxy(), item2);
delete item2;
QCOMPARE(item->focusProxy(), nullptr);
@@ -8485,7 +8539,7 @@ void tst_QGraphicsItem::subFocus()
QVERIFY(!text->hasFocus());
text->setFocus();
QVERIFY(!text->hasFocus());
- QCOMPARE(text->focusItem(), (QGraphicsItem *)text);
+ QCOMPARE(text->focusItem(), text);
// Add a sibling.
QGraphicsTextItem *text2 = new QGraphicsTextItem("Hi");
@@ -8496,7 +8550,7 @@ void tst_QGraphicsItem::subFocus()
// got input focus.
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
scene.addItem(text);
scene.addItem(text2);
@@ -8510,10 +8564,10 @@ void tst_QGraphicsItem::subFocus()
scene.removeItem(text2);
text2->setFocus();
scene.addItem(text2);
- QCOMPARE(text2->focusItem(), (QGraphicsItem *)text2);
+ QCOMPARE(text2->focusItem(), text2);
text2->setParentItem(text);
- QCOMPARE(text->focusItem(), (QGraphicsItem *)text2);
- QCOMPARE(text2->focusItem(), (QGraphicsItem *)text2);
+ QCOMPARE(text->focusItem(), text2);
+ QCOMPARE(text2->focusItem(), text2);
QVERIFY(!text->hasFocus());
QVERIFY(text2->hasFocus());
@@ -8524,12 +8578,12 @@ void tst_QGraphicsItem::subFocus()
QCOMPARE(text->focusItem(), nullptr);
QCOMPARE(text2->focusItem(), nullptr);
text2->setFocus();
- QCOMPARE(text->focusItem(), (QGraphicsItem *)text2);
- QCOMPARE(text2->focusItem(), (QGraphicsItem *)text2);
+ QCOMPARE(text->focusItem(), text2);
+ QCOMPARE(text2->focusItem(), text2);
scene.addItem(text);
// Hiding and showing text should pass focus to text2.
- QCOMPARE(text->focusItem(), (QGraphicsItem *)text2);
+ QCOMPARE(text->focusItem(), text2);
QVERIFY(text2->hasFocus());
// Subfocus should repropagate to root when reparenting.
@@ -8546,15 +8600,15 @@ void tst_QGraphicsItem::subFocus()
rect3->setFocus();
QVERIFY(!rect3->hasFocus());
- QCOMPARE(rect->focusItem(), (QGraphicsItem *)rect3);
- QCOMPARE(rect2->focusItem(), (QGraphicsItem *)rect3);
- QCOMPARE(rect3->focusItem(), (QGraphicsItem *)rect3);
+ QCOMPARE(rect->focusItem(), rect3);
+ QCOMPARE(rect2->focusItem(), rect3);
+ QCOMPARE(rect3->focusItem(), rect3);
rect->setParentItem(text2);
- QCOMPARE(text->focusItem(), (QGraphicsItem *)rect3);
- QCOMPARE(text2->focusItem(), (QGraphicsItem *)rect3);
- QCOMPARE(rect->focusItem(), (QGraphicsItem *)rect3);
- QCOMPARE(rect2->focusItem(), (QGraphicsItem *)rect3);
- QCOMPARE(rect3->focusItem(), (QGraphicsItem *)rect3);
+ QCOMPARE(text->focusItem(), rect3);
+ QCOMPARE(text2->focusItem(), rect3);
+ QCOMPARE(rect->focusItem(), rect3);
+ QCOMPARE(rect2->focusItem(), rect3);
+ QCOMPARE(rect3->focusItem(), rect3);
QVERIFY(!rect->hasFocus());
QVERIFY(!rect2->hasFocus());
QVERIFY(rect3->hasFocus());
@@ -8570,7 +8624,7 @@ void tst_QGraphicsItem::focusProxyDeletion()
QGraphicsRectItem *rect = new QGraphicsRectItem;
QGraphicsRectItem *rect2 = new QGraphicsRectItem;
rect->setFocusProxy(rect2);
- QCOMPARE(rect->focusProxy(), (QGraphicsItem *)rect2);
+ QCOMPARE(rect->focusProxy(), rect2);
delete rect2;
QCOMPARE(rect->focusProxy(), nullptr);
@@ -8595,13 +8649,13 @@ void tst_QGraphicsItem::focusProxyDeletion()
QCOMPARE(rect->focusProxy(), nullptr);
scene->addItem(rect2);
rect->setFocusProxy(rect2);
- QCOMPARE(rect->focusProxy(), (QGraphicsItem *)rect2);
+ QCOMPARE(rect->focusProxy(), rect2);
delete rect; // don't crash
rect = new QGraphicsRectItem;
rect2 = new QGraphicsRectItem;
rect->setFocusProxy(rect2);
- QCOMPARE(rect->focusProxy(), (QGraphicsItem *)rect2);
+ QCOMPARE(rect->focusProxy(), rect2);
scene->addItem(rect);
scene->addItem(rect2);
rect->setFocusProxy(rect2);
@@ -8673,7 +8727,7 @@ void tst_QGraphicsItem::setGraphicsEffect()
// Ensure the existing effect is uninstalled and deleted when setting a null effect
blurEffect = new QGraphicsBlurEffect;
item->setGraphicsEffect(blurEffect);
- item->setGraphicsEffect(0);
+ item->setGraphicsEffect(nullptr);
QVERIFY(!item->graphicsEffect());
QVERIFY(!blurEffect);
@@ -8733,11 +8787,11 @@ void tst_QGraphicsItem::panel()
QEvent activate(QEvent::WindowActivate);
QEvent deactivate(QEvent::WindowDeactivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
// No previous activation, so the scene is active.
QVERIFY(scene.isActive());
- QCOMPARE(scene.activePanel(), (QGraphicsItem *)panel1);
+ QCOMPARE(scene.activePanel(), panel1);
QVERIFY(panel1->isActive());
QVERIFY(!panel2->isActive());
QVERIFY(!panel3->isActive());
@@ -8752,7 +8806,7 @@ void tst_QGraphicsItem::panel()
QCOMPARE(spy_activate_panel4.count(), 0);
// Switch back to scene.
- scene.setActivePanel(0);
+ scene.setActivePanel(nullptr);
QVERIFY(!scene.activePanel());
QVERIFY(!panel1->isActive());
QVERIFY(!panel2->isActive());
@@ -8764,7 +8818,7 @@ void tst_QGraphicsItem::panel()
QCOMPARE(spy_activate_notPanel2.count(), 1);
// Deactivate the scene
- QApplication::sendEvent(&scene, &deactivate);
+ QCoreApplication::sendEvent(&scene, &deactivate);
QVERIFY(!scene.activePanel());
QVERIFY(!panel1->isActive());
QVERIFY(!panel2->isActive());
@@ -8776,7 +8830,7 @@ void tst_QGraphicsItem::panel()
QCOMPARE(spy_deactivate_notPanel2.count(), 1);
// Reactivate the scene
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
QVERIFY(!scene.activePanel());
QVERIFY(!panel1->isActive());
QVERIFY(!panel2->isActive());
@@ -8795,23 +8849,23 @@ void tst_QGraphicsItem::panel()
QCOMPARE(spy_activate_panel1.count(), 2);
// Deactivate the scene
- QApplication::sendEvent(&scene, &deactivate);
+ QCoreApplication::sendEvent(&scene, &deactivate);
QVERIFY(!panel1->isActive());
QCOMPARE(spy_deactivate_panel1.count(), 2);
// Reactivate the scene
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
QVERIFY(panel1->isActive());
QCOMPARE(spy_activate_panel1.count(), 3);
// Deactivate the scene
- QApplication::sendEvent(&scene, &deactivate);
+ QCoreApplication::sendEvent(&scene, &deactivate);
QVERIFY(!panel1->isActive());
QVERIFY(!scene.activePanel());
- scene.setActivePanel(0);
+ scene.setActivePanel(nullptr);
// Reactivate the scene
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
QVERIFY(!panel1->isActive());
}
@@ -8821,12 +8875,18 @@ void tst_QGraphicsItem::panelWithFocusItems()
{
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
bool widget = (i == 1);
- QGraphicsItem *parentPanel = widget ? (QGraphicsItem *)new QGraphicsWidget : (QGraphicsItem *)new QGraphicsRectItem;
- QGraphicsItem *parentPanelFocusItem = widget ? (QGraphicsItem *)new QGraphicsWidget : (QGraphicsItem *)new QGraphicsRectItem;
- QGraphicsItem *parentPanelFocusItemSibling = widget ? (QGraphicsItem *)new QGraphicsWidget : (QGraphicsItem *)new QGraphicsRectItem;
+ auto parentPanel = widget
+ ? static_cast<QGraphicsItem *>(new QGraphicsWidget)
+ : static_cast<QGraphicsItem *>(new QGraphicsRectItem);
+ auto parentPanelFocusItem = widget
+ ? static_cast<QGraphicsItem *>(new QGraphicsWidget)
+ : static_cast<QGraphicsItem *>(new QGraphicsRectItem);
+ auto parentPanelFocusItemSibling = widget
+ ? static_cast<QGraphicsItem *>(new QGraphicsWidget)
+ : static_cast<QGraphicsItem *>(new QGraphicsRectItem);
parentPanel->setFlag(QGraphicsItem::ItemIsPanel);
parentPanelFocusItem->setFlag(QGraphicsItem::ItemIsFocusable);
parentPanelFocusItemSibling->setFlag(QGraphicsItem::ItemIsFocusable);
@@ -8841,21 +8901,28 @@ void tst_QGraphicsItem::panelWithFocusItems()
QVERIFY(parentPanel->isActive());
QVERIFY(parentPanelFocusItem->hasFocus());
- QCOMPARE(parentPanel->focusItem(), (QGraphicsItem *)parentPanelFocusItem);
- QCOMPARE(parentPanelFocusItem->focusItem(), (QGraphicsItem *)parentPanelFocusItem);
-
- QGraphicsItem *childPanel = widget ? (QGraphicsItem *)new QGraphicsWidget : (QGraphicsItem *)new QGraphicsRectItem;
- QGraphicsItem *childPanelFocusItem = widget ? (QGraphicsItem *)new QGraphicsWidget : (QGraphicsItem *)new QGraphicsRectItem;
- QGraphicsItem *grandChildPanelFocusItem = widget ? (QGraphicsItem *)new QGraphicsWidget : (QGraphicsItem *)new QGraphicsRectItem;
- QGraphicsItem *grandChildPanelFocusItem2 = widget ? (QGraphicsItem *)new QGraphicsWidget : (QGraphicsItem *)new QGraphicsRectItem;
+ QCOMPARE(parentPanel->focusItem(), parentPanelFocusItem);
+ QCOMPARE(parentPanelFocusItem->focusItem(), parentPanelFocusItem);
+
+ auto childPanel = widget
+ ? static_cast<QGraphicsItem *>(new QGraphicsWidget)
+ : static_cast<QGraphicsItem *>(new QGraphicsRectItem);
+ auto childPanelFocusItem = widget
+ ? static_cast<QGraphicsItem *>(new QGraphicsWidget)
+ : static_cast<QGraphicsItem *>(new QGraphicsRectItem);
+ auto grandChildPanelFocusItem = widget
+ ? static_cast<QGraphicsItem *>(new QGraphicsWidget)
+ : static_cast<QGraphicsItem *>(new QGraphicsRectItem);
+ auto grandChildPanelFocusItem2 = widget
+ ? static_cast<QGraphicsItem *>(new QGraphicsWidget)
+ : static_cast<QGraphicsItem *>(new QGraphicsRectItem);
childPanel->setFlag(QGraphicsItem::ItemIsPanel);
childPanelFocusItem->setFlag(QGraphicsItem::ItemIsFocusable);
grandChildPanelFocusItem->setFlag(QGraphicsItem::ItemIsFocusable);
grandChildPanelFocusItem2->setFlag(QGraphicsItem::ItemIsFocusable);
- if (widget)
- {
+ if (widget) {
static_cast<QGraphicsWidget *>(childPanelFocusItem)->setFocusPolicy(Qt::StrongFocus);
static_cast<QGraphicsWidget *>(grandChildPanelFocusItem)->setFocusPolicy(Qt::StrongFocus);
static_cast<QGraphicsWidget *>(grandChildPanelFocusItem2)->setFocusPolicy(Qt::StrongFocus);
@@ -8866,45 +8933,45 @@ void tst_QGraphicsItem::panelWithFocusItems()
grandChildPanelFocusItem->setFocus();
QVERIFY(!grandChildPanelFocusItem->hasFocus());
- QCOMPARE(childPanel->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
- QCOMPARE(childPanelFocusItem->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
- QCOMPARE(grandChildPanelFocusItem->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
+ QCOMPARE(childPanel->focusItem(), grandChildPanelFocusItem);
+ QCOMPARE(childPanelFocusItem->focusItem(), grandChildPanelFocusItem);
+ QCOMPARE(grandChildPanelFocusItem->focusItem(), grandChildPanelFocusItem);
childPanel->setParentItem(parentPanel);
QVERIFY(!parentPanel->isActive());
QVERIFY(!parentPanelFocusItem->hasFocus());
- QCOMPARE(parentPanel->focusItem(), (QGraphicsItem *)parentPanelFocusItem);
- QCOMPARE(parentPanelFocusItem->focusItem(), (QGraphicsItem *)parentPanelFocusItem);
+ QCOMPARE(parentPanel->focusItem(), parentPanelFocusItem);
+ QCOMPARE(parentPanelFocusItem->focusItem(), parentPanelFocusItem);
QVERIFY(childPanel->isActive());
QVERIFY(!childPanelFocusItem->hasFocus());
QVERIFY(grandChildPanelFocusItem->hasFocus());
- QCOMPARE(childPanel->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
- QCOMPARE(childPanelFocusItem->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
+ QCOMPARE(childPanel->focusItem(), grandChildPanelFocusItem);
+ QCOMPARE(childPanelFocusItem->focusItem(), grandChildPanelFocusItem);
childPanel->hide();
- QCOMPARE(childPanel->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
+ QCOMPARE(childPanel->focusItem(), grandChildPanelFocusItem);
QVERIFY(!childPanel->focusItem()->hasFocus());
QVERIFY(parentPanel->isActive());
QVERIFY(parentPanelFocusItem->hasFocus());
- QCOMPARE(parentPanel->focusItem(), (QGraphicsItem *)parentPanelFocusItem);
- QCOMPARE(parentPanelFocusItem->focusItem(), (QGraphicsItem *)parentPanelFocusItem);
- QCOMPARE(grandChildPanelFocusItem->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
+ QCOMPARE(parentPanel->focusItem(), parentPanelFocusItem);
+ QCOMPARE(parentPanelFocusItem->focusItem(), parentPanelFocusItem);
+ QCOMPARE(grandChildPanelFocusItem->focusItem(), grandChildPanelFocusItem);
childPanel->show();
QVERIFY(childPanel->isActive());
QVERIFY(grandChildPanelFocusItem->hasFocus());
- QCOMPARE(childPanel->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
- QCOMPARE(childPanelFocusItem->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
- QCOMPARE(grandChildPanelFocusItem->focusItem(), (QGraphicsItem *)grandChildPanelFocusItem);
+ QCOMPARE(childPanel->focusItem(), grandChildPanelFocusItem);
+ QCOMPARE(childPanelFocusItem->focusItem(), grandChildPanelFocusItem);
+ QCOMPARE(grandChildPanelFocusItem->focusItem(), grandChildPanelFocusItem);
childPanel->hide();
QVERIFY(parentPanel->isActive());
QVERIFY(parentPanelFocusItem->hasFocus());
- QCOMPARE(parentPanel->focusItem(), (QGraphicsItem *)parentPanelFocusItem);
- QCOMPARE(parentPanelFocusItem->focusItem(), (QGraphicsItem *)parentPanelFocusItem);
+ QCOMPARE(parentPanel->focusItem(), parentPanelFocusItem);
+ QCOMPARE(parentPanelFocusItem->focusItem(), parentPanelFocusItem);
}
}
@@ -8921,7 +8988,7 @@ void tst_QGraphicsItem::addPanelToActiveScene()
QEvent activate(QEvent::WindowActivate);
QEvent deactivate(QEvent::WindowDeactivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
QVERIFY(scene.isActive());
scene.addItem(rect);
QVERIFY(rect->isActive());
@@ -8930,12 +8997,12 @@ void tst_QGraphicsItem::addPanelToActiveScene()
rect->setFlag(QGraphicsItem::ItemIsPanel);
scene.addItem(rect);
QVERIFY(rect->isActive());
- QCOMPARE(scene.activePanel(), (QGraphicsItem *)rect);
+ QCOMPARE(scene.activePanel(), rect);
QGraphicsRectItem *rect2 = new QGraphicsRectItem;
scene.addItem(rect2);
QVERIFY(rect->isActive());
- QCOMPARE(scene.activePanel(), (QGraphicsItem *)rect);
+ QCOMPARE(scene.activePanel(), rect);
}
void tst_QGraphicsItem::activate()
@@ -8947,7 +9014,7 @@ void tst_QGraphicsItem::activate()
QEvent activate(QEvent::WindowActivate);
QEvent deactivate(QEvent::WindowDeactivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
// Non-panel item (active when scene is active).
QVERIFY(rect->isActive());
@@ -8993,14 +9060,14 @@ void tst_QGraphicsItem::activate()
QGraphicsRectItem *rect5 = new QGraphicsRectItem(rect4);
QGraphicsRectItem *rect6 = new QGraphicsRectItem(rect5);
scene.addItem(rect4);
- QCOMPARE(scene.activePanel(), (QGraphicsItem *)rect3);
+ QCOMPARE(scene.activePanel(), rect3);
scene.removeItem(rect4);
rect6->setActive(true);
scene.addItem(rect4);
QVERIFY(rect4->isActive());
QVERIFY(rect5->isActive());
QVERIFY(rect6->isActive());
- QCOMPARE(scene.activePanel(), (QGraphicsItem *)rect4);
+ QCOMPARE(scene.activePanel(), rect4);
scene.removeItem(rect4); // no active panel
rect6->setActive(false);
scene.addItem(rect4);
@@ -9011,11 +9078,11 @@ void tst_QGraphicsItem::activate()
// Controlling auto-activation when the scene changes activation.
rect4->setActive(true);
- QApplication::sendEvent(&scene, &deactivate);
+ QCoreApplication::sendEvent(&scene, &deactivate);
QVERIFY(!scene.isActive());
QVERIFY(!rect4->isActive());
rect4->setActive(false);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
QVERIFY(scene.isActive());
QVERIFY(!scene.activePanel());
QVERIFY(!rect4->isActive());
@@ -9047,7 +9114,7 @@ void tst_QGraphicsItem::activationOnShowHide()
{
QGraphicsScene scene;
QEvent activate(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &activate);
+ QCoreApplication::sendEvent(&scene, &activate);
QGraphicsRectItem *rootPanel = scene.addRect(QRectF());
rootPanel->setFlag(QGraphicsItem::ItemIsPanel);
@@ -9109,18 +9176,19 @@ void tst_QGraphicsItem::activationOnShowHide()
class MoveWhileDying : public QGraphicsRectItem
{
public:
- MoveWhileDying(QGraphicsItem *parent = 0)
- : QGraphicsRectItem(parent)
- { }
+ using QGraphicsRectItem::QGraphicsRectItem;
+
~MoveWhileDying()
{
- foreach (QGraphicsItem *c, childItems()) {
- foreach (QGraphicsItem *cc, c->childItems()) {
+ const auto children = childItems();
+ for (QGraphicsItem *c : children) {
+ const auto grandChildren = c->childItems();
+ for (QGraphicsItem *cc : grandChildren)
cc->moveBy(10, 10);
- }
c->moveBy(10, 10);
}
- if (QGraphicsItem *p = parentItem()) { p->moveBy(10, 10); }
+ if (QGraphicsItem *p = parentItem())
+ p->moveBy(10, 10);
}
};
@@ -9134,7 +9202,7 @@ void tst_QGraphicsItem::deactivateInactivePanel()
panel2->setFlag(QGraphicsItem::ItemIsPanel);
QEvent event(QEvent::WindowActivate);
- qApp->sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
panel1->setActive(true);
QVERIFY(scene.isActive());
@@ -9172,6 +9240,7 @@ void tst_QGraphicsItem::moveWhileDeleting()
child = new QGraphicsRectItem(silly);
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -9200,12 +9269,9 @@ class MyRectItem : public QGraphicsWidget
{
Q_OBJECT
public:
- MyRectItem(QGraphicsItem *parent = 0) : QGraphicsWidget(parent)
- {
+ using QGraphicsWidget::QGraphicsWidget;
- }
-
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
{
painter->setBrush(brush);
painter->drawRect(boundingRect());
@@ -9216,7 +9282,7 @@ public:
topLevel->collidingItems(Qt::IntersectsItemBoundingRect);
}
public:
- QGraphicsItem *topLevel;
+ QGraphicsItem *topLevel = nullptr;
QBrush brush;
};
@@ -9258,6 +9324,7 @@ void tst_QGraphicsItem::ensureDirtySceneTransform()
child3->brush = QBrush(QColor(Qt::gray));
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QApplication::setActiveWindow(&view);
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -9292,7 +9359,7 @@ void tst_QGraphicsItem::focusScope()
scope3->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemIsFocusScope);
scope3->setFocus();
QVERIFY(!scope3->focusScopeItem());
- QCOMPARE(scope3->focusItem(), (QGraphicsItem *)scope3);
+ QCOMPARE(scope3->focusItem(), scope3);
QGraphicsRectItem *scope2 = new QGraphicsRectItem;
scope2->setData(0, "scope2");
@@ -9300,8 +9367,8 @@ void tst_QGraphicsItem::focusScope()
scope2->setFocus();
QVERIFY(!scope2->focusScopeItem());
scope3->setParentItem(scope2);
- QCOMPARE(scope2->focusScopeItem(), (QGraphicsItem *)scope3);
- QCOMPARE(scope2->focusItem(), (QGraphicsItem *)scope3);
+ QCOMPARE(scope2->focusScopeItem(), scope3);
+ QCOMPARE(scope2->focusItem(), scope3);
QGraphicsRectItem *scope1 = new QGraphicsRectItem;
scope1->setData(0, "scope1");
@@ -9310,11 +9377,11 @@ void tst_QGraphicsItem::focusScope()
QVERIFY(!scope1->focusScopeItem());
scope2->setParentItem(scope1);
- QCOMPARE(scope1->focusItem(), (QGraphicsItem *)scope3);
- QCOMPARE(scope2->focusItem(), (QGraphicsItem *)scope3);
- QCOMPARE(scope3->focusItem(), (QGraphicsItem *)scope3);
- QCOMPARE(scope1->focusScopeItem(), (QGraphicsItem *)scope2);
- QCOMPARE(scope2->focusScopeItem(), (QGraphicsItem *)scope3);
+ QCOMPARE(scope1->focusItem(), scope3);
+ QCOMPARE(scope2->focusItem(), scope3);
+ QCOMPARE(scope3->focusItem(), scope3);
+ QCOMPARE(scope1->focusScopeItem(), scope2);
+ QCOMPARE(scope2->focusScopeItem(), scope3);
QCOMPARE(scope3->focusScopeItem(), nullptr);
scene.addItem(scope1);
@@ -9323,11 +9390,11 @@ void tst_QGraphicsItem::focusScope()
qApp->sendEvent(&scene, &windowActivate);
scene.setFocus();
- QCOMPARE(scope1->focusItem(), (QGraphicsItem *)scope3);
- QCOMPARE(scope2->focusItem(), (QGraphicsItem *)scope3);
- QCOMPARE(scope3->focusItem(), (QGraphicsItem *)scope3);
- QCOMPARE(scope1->focusScopeItem(), (QGraphicsItem *)scope2);
- QCOMPARE(scope2->focusScopeItem(), (QGraphicsItem *)scope3);
+ QCOMPARE(scope1->focusItem(), scope3);
+ QCOMPARE(scope2->focusItem(), scope3);
+ QCOMPARE(scope3->focusItem(), scope3);
+ QCOMPARE(scope1->focusScopeItem(), scope2);
+ QCOMPARE(scope2->focusScopeItem(), scope3);
QCOMPARE(scope3->focusScopeItem(), nullptr);
QVERIFY(scope3->hasFocus());
@@ -9405,10 +9472,10 @@ void tst_QGraphicsItem::focusScope()
rect5->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemIsFocusScope);
rect5->setFocus();
rect5->setParentItem(rect4);
- QCOMPARE(scope3->focusScopeItem(), (QGraphicsItem *)rect5);
+ QCOMPARE(scope3->focusScopeItem(), rect5);
QVERIFY(rect5->hasFocus());
- rect4->setParentItem(0);
+ rect4->setParentItem(nullptr);
QVERIFY(rect5->hasFocus());
QCOMPARE(scope3->focusScopeItem(), nullptr);
QCOMPARE(scope3->focusItem(), nullptr);
@@ -9428,7 +9495,7 @@ void tst_QGraphicsItem::focusScope()
scopeA->setFocus();
QVERIFY(scopeB->hasFocus());
- QCOMPARE(scopeB->focusItem(), (QGraphicsItem *)scopeB);
+ QCOMPARE(scopeB->focusItem(), scopeB);
}
void tst_QGraphicsItem::focusScope2()
@@ -9436,7 +9503,7 @@ void tst_QGraphicsItem::focusScope2()
QGraphicsRectItem *child1 = new QGraphicsRectItem;
child1->setFlags(QGraphicsItem::ItemIsFocusable);
child1->setFocus();
- QCOMPARE(child1->focusItem(), (QGraphicsItem *)child1);
+ QCOMPARE(child1->focusItem(), child1);
QGraphicsRectItem *child2 = new QGraphicsRectItem;
child2->setFlags(QGraphicsItem::ItemIsFocusable);
@@ -9444,13 +9511,13 @@ void tst_QGraphicsItem::focusScope2()
QGraphicsRectItem *rootFocusScope = new QGraphicsRectItem;
rootFocusScope->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemIsFocusScope);
rootFocusScope->setFocus();
- QCOMPARE(rootFocusScope->focusItem(), (QGraphicsItem *)rootFocusScope);
+ QCOMPARE(rootFocusScope->focusItem(), rootFocusScope);
child1->setParentItem(rootFocusScope);
child2->setParentItem(rootFocusScope);
- QCOMPARE(rootFocusScope->focusScopeItem(), (QGraphicsItem *)child1);
- QCOMPARE(rootFocusScope->focusItem(), (QGraphicsItem *)child1);
+ QCOMPARE(rootFocusScope->focusScopeItem(), child1);
+ QCOMPARE(rootFocusScope->focusItem(), child1);
QGraphicsRectItem *siblingChild1 = new QGraphicsRectItem;
siblingChild1->setFlags(QGraphicsItem::ItemIsFocusable);
@@ -9465,14 +9532,14 @@ void tst_QGraphicsItem::focusScope2()
siblingChild1->setParentItem(siblingFocusScope);
siblingChild2->setParentItem(siblingFocusScope);
- QCOMPARE(siblingFocusScope->focusScopeItem(), (QGraphicsItem *)siblingChild1);
+ QCOMPARE(siblingFocusScope->focusScopeItem(), siblingChild1);
QCOMPARE(siblingFocusScope->focusItem(), nullptr);
QGraphicsItem *root = new QGraphicsRectItem;
rootFocusScope->setParentItem(root);
siblingFocusScope->setParentItem(root);
- QCOMPARE(root->focusItem(), (QGraphicsItem *)child1);
+ QCOMPARE(root->focusItem(), child1);
QGraphicsScene scene;
scene.addItem(root);
@@ -9481,7 +9548,7 @@ void tst_QGraphicsItem::focusScope2()
qApp->sendEvent(&scene, &activate);
scene.setFocus();
- QCOMPARE(scene.focusItem(), (QGraphicsItem *)child1);
+ QCOMPARE(scene.focusItem(), child1);
// You cannot set focus on a descendant of a focus scope directly;
// this will only change the scope's focus scope item pointer. If
@@ -9490,15 +9557,15 @@ void tst_QGraphicsItem::focusScope2()
siblingChild2->setFocus();
QVERIFY(!siblingChild2->hasFocus());
QVERIFY(!siblingChild2->focusItem());
- QCOMPARE(siblingFocusScope->focusScopeItem(), (QGraphicsItem *)siblingChild2);
+ QCOMPARE(siblingFocusScope->focusScopeItem(), siblingChild2);
QCOMPARE(siblingFocusScope->focusItem(), nullptr);
// Set focus on the scope; focus is forwarded to the focus scope item.
siblingFocusScope->setFocus();
QVERIFY(siblingChild2->hasFocus());
QVERIFY(siblingChild2->focusItem());
- QCOMPARE(siblingFocusScope->focusScopeItem(), (QGraphicsItem *)siblingChild2);
- QCOMPARE(siblingFocusScope->focusItem(), (QGraphicsItem *)siblingChild2);
+ QCOMPARE(siblingFocusScope->focusScopeItem(), siblingChild2);
+ QCOMPARE(siblingFocusScope->focusItem(), siblingChild2);
}
class FocusScopeItemPrivate;
@@ -9506,11 +9573,11 @@ class FocusScopeItem : public QGraphicsItem
{
Q_DECLARE_PRIVATE(FocusScopeItem)
public:
- FocusScopeItem(QGraphicsItem *parent = 0);
- QRectF boundingRect() const { return QRectF(); }
- void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) { }
+ FocusScopeItem(QGraphicsItem *parent = nullptr);
+ QRectF boundingRect() const override { return QRectF(); }
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override { }
- int focusScopeChanged;
+ int focusScopeChanged = 0;
FocusScopeItemPrivate *d_ptr;
};
@@ -9518,12 +9585,12 @@ class FocusScopeItemPrivate : QGraphicsItemPrivate
{
Q_DECLARE_PUBLIC(FocusScopeItem)
public:
- void focusScopeItemChange(bool)
+ void focusScopeItemChange(bool) override
{ ++q_func()->focusScopeChanged; }
};
FocusScopeItem::FocusScopeItem(QGraphicsItem *parent)
- : QGraphicsItem(*new FocusScopeItemPrivate, parent), focusScopeChanged(0)
+ : QGraphicsItem(*new FocusScopeItemPrivate, parent)
{
setFlag(ItemIsFocusable);
}
@@ -9540,15 +9607,15 @@ void tst_QGraphicsItem::focusScopeItemChangedWhileScopeDoesntHaveFocus()
QCOMPARE(child1->focusScopeChanged, 0);
QCOMPARE(child2->focusScopeChanged, 0);
child1->setFocus();
- QCOMPARE(rect.focusScopeItem(), (QGraphicsItem *)child1);
+ QCOMPARE(rect.focusScopeItem(), child1);
QCOMPARE(child1->focusScopeChanged, 1);
QCOMPARE(child2->focusScopeChanged, 0);
child2->setFocus();
- QCOMPARE(rect.focusScopeItem(), (QGraphicsItem *)child2);
+ QCOMPARE(rect.focusScopeItem(), child2);
QCOMPARE(child1->focusScopeChanged, 2);
QCOMPARE(child2->focusScopeChanged, 1);
child1->setFocus();
- QCOMPARE(rect.focusScopeItem(), (QGraphicsItem *)child1);
+ QCOMPARE(rect.focusScopeItem(), child1);
QCOMPARE(child1->focusScopeChanged, 3);
QCOMPARE(child2->focusScopeChanged, 2);
child1->clearFocus();
@@ -9564,75 +9631,81 @@ void tst_QGraphicsItem::stackBefore()
QGraphicsRectItem *child2 = new QGraphicsRectItem(QRectF(0, 0, 5, 5), &parent);
QGraphicsRectItem *child3 = new QGraphicsRectItem(QRectF(0, 0, 5, 5), &parent);
QGraphicsRectItem *child4 = new QGraphicsRectItem(QRectF(0, 0, 5, 5), &parent);
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child1 << child2 << child3 << child4));
+ const GraphicsItemsList expected1234{child1, child2, child3, child4};
+ QCOMPARE(parent.childItems(), expected1234);
child1->setData(0, "child1");
child2->setData(0, "child2");
child3->setData(0, "child3");
child4->setData(0, "child4");
// Remove and append
- child2->setParentItem(0);
+ child2->setParentItem(nullptr);
child2->setParentItem(&parent);
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child1 << child3 << child4 << child2));
+ const GraphicsItemsList expected1342{child1, child3, child4, child2};
+ QCOMPARE(parent.childItems(), expected1342);
// Move child2 before child1
child2->stackBefore(child1); // 2134
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ const GraphicsItemsList expected2134{child2, child1, child3, child4};
+ QCOMPARE(parent.childItems(), expected2134);
child2->stackBefore(child2); // 2134
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ QCOMPARE(parent.childItems(), expected2134);
child1->setZValue(1); // 2341
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child3 << child4 << child1));
+ const GraphicsItemsList expected2341{child2, child3, child4, child1};
+ QCOMPARE(parent.childItems(), expected2341);
child1->stackBefore(child2); // 2341
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child3 << child4 << child1));
+ QCOMPARE(parent.childItems(), expected2341);
child1->setZValue(0); // 1234
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child1 << child2 << child3 << child4));
+ QCOMPARE(parent.childItems(), expected1234);
child4->stackBefore(child1); // 4123
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child4 << child1 << child2 << child3));
+ const GraphicsItemsList expected4123{child4, child1, child2, child3};
+ QCOMPARE(parent.childItems(), expected4123);
child4->setZValue(1); // 1234 (4123)
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child1 << child2 << child3 << child4));
+ QCOMPARE(parent.childItems(), expected1234);
child3->stackBefore(child1); // 3124 (4312)
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child3 << child1 << child2 << child4));
+ const GraphicsItemsList expected3124{child3, child1, child2, child4};
+ QCOMPARE(parent.childItems(), expected3124);
child4->setZValue(0); // 4312
- QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child4 << child3 << child1 << child2));
+ const GraphicsItemsList expected4312{child4, child3, child1, child2};
+ QCOMPARE(parent.childItems(), expected4312);
// Make them all toplevels
- child1->setParentItem(0);
- child2->setParentItem(0);
- child3->setParentItem(0);
- child4->setParentItem(0);
+ child1->setParentItem(nullptr);
+ child2->setParentItem(nullptr);
+ child3->setParentItem(nullptr);
+ child4->setParentItem(nullptr);
QGraphicsScene scene;
scene.addItem(child1);
scene.addItem(child2);
scene.addItem(child3);
scene.addItem(child4);
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder),
- (QList<QGraphicsItem *>() << child1 << child2 << child3 << child4));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected1234);
// Remove and append
scene.removeItem(child2);
scene.addItem(child2);
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child1 << child3 << child4 << child2));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected1342);
// Move child2 before child1
child2->stackBefore(child1); // 2134
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected2134);
child2->stackBefore(child2); // 2134
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected2134);
child1->setZValue(1); // 2341
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child3 << child4 << child1));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected2341);
child1->stackBefore(child2); // 2341
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child3 << child4 << child1));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected2341);
child1->setZValue(0); // 1234
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child1 << child2 << child3 << child4));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected1234);
child4->stackBefore(child1); // 4123
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child4 << child1 << child2 << child3));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected4123);
child4->setZValue(1); // 1234 (4123)
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child1 << child2 << child3 << child4));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected1234);
child3->stackBefore(child1); // 3124 (4312)
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child3 << child1 << child2 << child4));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected3124);
child4->setZValue(0); // 4312
- QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child4 << child3 << child1 << child2));
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), expected4312);
}
void tst_QGraphicsItem::QTBUG_4233_updateCachedWithSceneRect()
@@ -9645,24 +9718,25 @@ void tst_QGraphicsItem::QTBUG_4233_updateCachedWithSceneRect()
scene.setSceneRect(-100, -100, 200, 200); // contains the tester item
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QApplication::setActiveWindow(&view);
QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(QTest::qWaitForWindowActive(&view));
- QCOMPARE(QApplication::activeWindow(), (QWidget *)&view);
+ QCOMPARE(QApplication::activeWindow(), &view);
QTRY_COMPARE(tester->repaints, 1);
scene.update(); // triggers "updateAll" optimization
- qApp->processEvents();
- qApp->processEvents(); // in 4.6 only one processEvents is necessary
+ QCoreApplication::processEvents();
+ QCoreApplication::processEvents(); // in 4.6 only one processEvents is necessary
QCOMPARE(tester->repaints, 1);
scene.update(); // triggers "updateAll" optimization
tester->update();
- qApp->processEvents();
- qApp->processEvents(); // in 4.6 only one processEvents is necessary
+ QCoreApplication::processEvents();
+ QCoreApplication::processEvents(); // in 4.6 only one processEvents is necessary
QCOMPARE(tester->repaints, 2);
}
@@ -10203,7 +10277,7 @@ void tst_QGraphicsItem::modality_mouseGrabber()
QCOMPARE(rect1Spy.counts[QEvent::UngrabMouse], 0);
QCOMPARE(rect2Spy.counts[QEvent::GrabMouse], 0);
QCOMPARE(rect2Spy.counts[QEvent::UngrabMouse], 0);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *) rect1);
+ QCOMPARE(scene.mouseGrabberItem(), rect1);
// grab lost when rect1 is modally shadowed
rect2->setPanelModality(QGraphicsItem::SceneModal);
@@ -10243,7 +10317,7 @@ void tst_QGraphicsItem::modality_mouseGrabber()
QCOMPARE(rect1Spy.counts[QEvent::UngrabMouse], 1);
QCOMPARE(rect2Spy.counts[QEvent::GrabMouse], 1);
QCOMPARE(rect2Spy.counts[QEvent::UngrabMouse], 1);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *) rect1);
+ QCOMPARE(scene.mouseGrabberItem(), rect1);
// grab lost to rect2 when rect1 is modally shadowed
rect2->setPanelModality(QGraphicsItem::SceneModal);
@@ -10283,7 +10357,7 @@ void tst_QGraphicsItem::modality_mouseGrabber()
QCOMPARE(rect1Spy.counts[QEvent::UngrabMouse], 0);
QCOMPARE(rect2Spy.counts[QEvent::GrabMouse], 0);
QCOMPARE(rect2Spy.counts[QEvent::UngrabMouse], 0);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *) rect1);
+ QCOMPARE(scene.mouseGrabberItem(), rect1);
// grab lost when rect1 is modally shadowed
rect2->setPanelModality(QGraphicsItem::PanelModal);
@@ -10323,7 +10397,7 @@ void tst_QGraphicsItem::modality_mouseGrabber()
QCOMPARE(rect1Spy.counts[QEvent::UngrabMouse], 1);
QCOMPARE(rect2Spy.counts[QEvent::GrabMouse], 1);
QCOMPARE(rect2Spy.counts[QEvent::UngrabMouse], 1);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *) rect1);
+ QCOMPARE(scene.mouseGrabberItem(), rect1);
// grab lost to rect2 when rect1 is modally shadowed
rect2->setPanelModality(QGraphicsItem::PanelModal);
@@ -10375,7 +10449,7 @@ void tst_QGraphicsItem::modality_mouseGrabber()
QCOMPARE(rect3Spy.counts[QEvent::GrabMouse], 1);
QCOMPARE(rect3Spy.counts[QEvent::GraphicsSceneMousePress], 1);
QCOMPARE(rect3Spy.counts[QEvent::UngrabMouse], 0);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *) rect3);
+ QCOMPARE(scene.mouseGrabberItem(), rect3);
// grab is *not* lost when rect1 is modally shadowed by rect2
rect2->setPanelModality(QGraphicsItem::PanelModal);
@@ -10385,7 +10459,7 @@ void tst_QGraphicsItem::modality_mouseGrabber()
QCOMPARE(rect2Spy.counts[QEvent::UngrabMouse], 0);
QCOMPARE(rect3Spy.counts[QEvent::GrabMouse], 1);
QCOMPARE(rect3Spy.counts[QEvent::UngrabMouse], 0);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *) rect3);
+ QCOMPARE(scene.mouseGrabberItem(), rect3);
// releasing goes to rect3
sendMouseRelease(&scene, QPoint(150, 50));
@@ -10408,7 +10482,7 @@ void tst_QGraphicsItem::modality_mouseGrabber()
QCOMPARE(rect2Spy.counts[QEvent::UngrabMouse], 0);
QCOMPARE(rect3Spy.counts[QEvent::GrabMouse], 2);
QCOMPARE(rect3Spy.counts[QEvent::UngrabMouse], 1);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *) rect3);
+ QCOMPARE(scene.mouseGrabberItem(), rect3);
// grab is not lost
rect2->setPanelModality(QGraphicsItem::PanelModal);
@@ -10418,7 +10492,7 @@ void tst_QGraphicsItem::modality_mouseGrabber()
QCOMPARE(rect2Spy.counts[QEvent::UngrabMouse], 0);
QCOMPARE(rect3Spy.counts[QEvent::GrabMouse], 2);
QCOMPARE(rect3Spy.counts[QEvent::UngrabMouse], 1);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *) rect3);
+ QCOMPARE(scene.mouseGrabberItem(), rect3);
// grab stays on rect3
rect2->setPanelModality(QGraphicsItem::NonModal);
@@ -10428,7 +10502,7 @@ void tst_QGraphicsItem::modality_mouseGrabber()
QCOMPARE(rect2Spy.counts[QEvent::UngrabMouse], 0);
QCOMPARE(rect3Spy.counts[QEvent::GrabMouse], 2);
QCOMPARE(rect3Spy.counts[QEvent::UngrabMouse], 1);
- QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *) rect3);
+ QCOMPARE(scene.mouseGrabberItem(), rect3);
// release goes to rect3
sendMouseRelease(&scene, QPoint(150, 50));
@@ -10458,18 +10532,18 @@ void tst_QGraphicsItem::modality_clickFocus()
rect2->setData(0, "rect2");
QEvent windowActivateEvent(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &windowActivateEvent);
+ QCoreApplication::sendEvent(&scene, &windowActivateEvent);
EventSpy2 rect1Spy(&scene, rect1);
EventSpy2 rect2Spy(&scene, rect2);
// activate rect1, it should get focus
rect1->setActive(true);
- QCOMPARE(scene.focusItem(), (QGraphicsItem *) rect1);
+ QCOMPARE(scene.focusItem(), rect1);
// focus stays when rect2 becomes modal
rect2->setPanelModality(QGraphicsItem::SceneModal);
- QCOMPARE(scene.focusItem(), (QGraphicsItem *) rect1);
+ QCOMPARE(scene.focusItem(), rect1);
QCOMPARE(rect1Spy.counts[QEvent::FocusIn], 1);
QCOMPARE(rect1Spy.counts[QEvent::FocusOut], 0);
QCOMPARE(rect2Spy.counts[QEvent::FocusIn], 0);
@@ -10487,7 +10561,7 @@ void tst_QGraphicsItem::modality_clickFocus()
// clicking on rect2 gives it focus
rect2->setActive(true);
sendMouseClick(&scene, QPointF(75, 75));
- QCOMPARE(scene.focusItem(), (QGraphicsItem *) rect2);
+ QCOMPARE(scene.focusItem(), rect2);
QCOMPARE(rect1Spy.counts[QEvent::FocusIn], 1);
QCOMPARE(rect1Spy.counts[QEvent::FocusOut], 1);
QCOMPARE(rect2Spy.counts[QEvent::FocusIn], 1);
@@ -10513,7 +10587,7 @@ void tst_QGraphicsItem::modality_clickFocus()
// click on rect1, it should get focus now
sendMouseClick(&scene, QPointF(-25, -25));
- QCOMPARE(scene.focusItem(), (QGraphicsItem *) rect1);
+ QCOMPARE(scene.focusItem(), rect1);
QCOMPARE(rect1Spy.counts[QEvent::FocusIn], 3);
QCOMPARE(rect1Spy.counts[QEvent::FocusOut], 2);
QCOMPARE(rect2Spy.counts[QEvent::FocusIn], 1);
@@ -10546,7 +10620,7 @@ void tst_QGraphicsItem::modality_keyEvents()
rect2child->setData(0, "rect2child1");
QEvent windowActivateEvent(QEvent::WindowActivate);
- QApplication::sendEvent(&scene, &windowActivateEvent);
+ QCoreApplication::sendEvent(&scene, &windowActivateEvent);
EventSpy2 rect1Spy(&scene, rect1);
EventSpy2 rect1childSpy(&scene, rect1child);
@@ -10556,11 +10630,11 @@ void tst_QGraphicsItem::modality_keyEvents()
// activate rect1 and give it rect1child focus
rect1->setActive(true);
rect1child->setFocus();
- QCOMPARE(scene.focusItem(), (QGraphicsItem *) rect1child);
+ QCOMPARE(scene.focusItem(), rect1child);
// focus stays on rect1child when rect2 becomes modal
rect2->setPanelModality(QGraphicsItem::SceneModal);
- QCOMPARE(scene.focusItem(), (QGraphicsItem *) rect1child);
+ QCOMPARE(scene.focusItem(), rect1child);
// but key events to rect1child should be neither delivered nor propagated
sendKeyClick(&scene, Qt::Key_A);
@@ -10574,7 +10648,7 @@ void tst_QGraphicsItem::modality_keyEvents()
// change to panel modality, rect1child1 keeps focus
rect2->setPanelModality(QGraphicsItem::PanelModal);
- QCOMPARE(scene.focusItem(), (QGraphicsItem *) rect1child);
+ QCOMPARE(scene.focusItem(), rect1child);
// still no key events
sendKeyClick(&scene, Qt::Key_J);
@@ -10629,14 +10703,7 @@ void tst_QGraphicsItem::itemIsInFront()
QCOMPARE(qt_closestItemFirst(rect1child1_2, rect2child1), false);
}
-class ScenePosChangeTester : public ItemChangeTester
-{
-public:
- ScenePosChangeTester()
- { }
- ScenePosChangeTester(QGraphicsItem *parent) : ItemChangeTester(parent)
- { }
-};
+using ScenePosChangeTester = ItemChangeTester;
void tst_QGraphicsItem::scenePosChange()
{
@@ -10695,7 +10762,7 @@ void tst_QGraphicsItem::scenePosChange()
// remove
scene.removeItem(grandChild1.data());
- delete grandChild2; grandChild2 = 0;
+ delete grandChild2; grandChild2 = nullptr;
QCoreApplication::processEvents(); // QGraphicsScenePrivate::_q_updateScenePosDescendants()
root->moveBy(1.0, 1.0);
QCOMPARE(child1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 4);
@@ -10716,13 +10783,13 @@ void tst_QGraphicsItem::scenePosChange()
void tst_QGraphicsItem::textItem_shortcuts()
{
QWidget w;
- QVBoxLayout l;
- w.setLayout(&l);
+ w.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
+ auto l = new QVBoxLayout(&w);
QGraphicsScene scene;
QGraphicsView view(&scene);
- l.addWidget(&view);
+ l->addWidget(&view);
QPushButton b("Push Me");
- l.addWidget(&b);
+ l->addWidget(&b);
QGraphicsTextItem *item = scene.addText("Troll Text");
item->setFlag(QGraphicsItem::ItemIsFocusable);
@@ -10776,6 +10843,7 @@ void tst_QGraphicsItem::scroll()
scene.addItem(item2);
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.setFrameStyle(0);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -10859,7 +10927,7 @@ void tst_QGraphicsItem::focusHandling()
{
public:
MyItem() : QGraphicsRectItem(0, 0, 100, 100) {}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
{
painter->fillRect(boundingRect(), hasFocus() ? QBrush(Qt::red) : brush());
}
@@ -10924,6 +10992,8 @@ void tst_QGraphicsItem::focusHandling()
class TouchEventTestee : public QGraphicsRectItem
{
public:
+ using TouchPoints = QVector<QTouchEvent::TouchPoint>;
+
TouchEventTestee(const QSizeF &size = QSizeF(100, 100)) :
QGraphicsRectItem(QRectF(QPointF(), size))
{
@@ -10931,10 +11001,10 @@ public:
setFlag(QGraphicsItem::ItemIsFocusable, false);
}
- QList<QTouchEvent::TouchPoint> touchBeginPoints() const { return m_touchBeginPoints; }
+ TouchPoints touchBeginPoints() const { return m_touchBeginPoints; }
int touchBeginEventCount() const { return m_touchBeginPoints.size(); }
- QList<QTouchEvent::TouchPoint> touchUpdatePoints() const { return m_touchUpdatePoints; }
+ TouchPoints touchUpdatePoints() const { return m_touchUpdatePoints; }
int touchUpdateEventCount() const { return m_touchUpdatePoints.size(); }
protected:
@@ -10957,8 +11027,8 @@ protected:
}
private:
- QList<QTouchEvent::TouchPoint> m_touchBeginPoints;
- QList<QTouchEvent::TouchPoint> m_touchUpdatePoints;
+ TouchPoints m_touchBeginPoints;
+ TouchPoints m_touchUpdatePoints;
};
static QList<QTouchEvent::TouchPoint>
@@ -11157,6 +11227,7 @@ void tst_QGraphicsItem::deviceCoordinateCache_simpleRotations()
scene.addItem(item);
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QTRY_VERIFY(view.repaints > 0);
@@ -11224,7 +11295,7 @@ void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor()
struct Item : public QGraphicsTextItem
{
int painted;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *opt, QWidget *wid)
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *opt, QWidget *wid) override
{
painted++;
QGraphicsTextItem::paint(painter, opt, wid);
@@ -11237,6 +11308,7 @@ void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor()
QGraphicsScene scene;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
scene.addItem(i);
@@ -11264,9 +11336,9 @@ void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor()
for (int x = 0; x < image.width(); ++x) {
// Because of antialiasing we allow a certain range of errors here.
QRgb pixel = image.pixel(x, y);
- if (qAbs((int)(pixel & 0xff) - (int)(rgb & 0xff)) +
- qAbs((int)((pixel & 0xff00) >> 8) - (int)((rgb & 0xff00) >> 8)) +
- qAbs((int)((pixel & 0xff0000) >> 16) - (int)((rgb & 0xff0000) >> 16)) <= 50) {
+ if (qAbs(int(pixel & 0xff) - int(rgb & 0xff)) +
+ qAbs(int((pixel & 0xff00) >> 8) - int((rgb & 0xff00) >> 8)) +
+ qAbs(int((pixel & 0xff0000) >> 16) - int((rgb & 0xff0000) >> 16)) <= 50) {
if (++numRedPixel >= 10) {
return;
}
@@ -11299,6 +11371,7 @@ void tst_QGraphicsItem::QTBUG_6738_missingUpdateWithSetParent()
scene.addItem(parent);
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
view.show();
qApp->setActiveWindow(&view);
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -11332,6 +11405,7 @@ void tst_QGraphicsItem::QT_2653_fullUpdateDiscardingOpacityUpdate()
{
QGraphicsScene scene(0, 0, 200, 200);
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
EventTester *parentGreen = new EventTester();
parentGreen->setGeometry(QRectF(20, 20, 100, 100));
@@ -11373,6 +11447,7 @@ void tst_QGraphicsItem::QTBUG_7714_fullUpdateDiscardingOpacityUpdate2()
{
QGraphicsScene scene(0, 0, 200, 200);
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
MyGraphicsView origView(&scene);
EventTester *parentGreen = new EventTester();
@@ -11423,26 +11498,26 @@ void tst_QGraphicsItem::QT_2649_focusScope()
QGraphicsRectItem *subFocusItem = new QGraphicsRectItem;
subFocusItem->setFlags(QGraphicsItem::ItemIsFocusable);
subFocusItem->setFocus();
- QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusItem(), subFocusItem);
QGraphicsRectItem *scope = new QGraphicsRectItem;
scope->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemIsFocusScope);
scope->setFocus();
subFocusItem->setParentItem(scope);
- QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusItem(), subFocusItem);
QCOMPARE(subFocusItem->focusScopeItem(), nullptr);
- QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem);
- QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(scope->focusItem(), subFocusItem);
+ QCOMPARE(scope->focusScopeItem(), subFocusItem);
QGraphicsRectItem *rootItem = new QGraphicsRectItem;
rootItem->setFlags(QGraphicsItem::ItemIsFocusable);
scope->setParentItem(rootItem);
- QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(rootItem->focusItem(), subFocusItem);
QCOMPARE(rootItem->focusScopeItem(), nullptr);
- QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusItem(), subFocusItem);
QCOMPARE(subFocusItem->focusScopeItem(), nullptr);
- QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem);
- QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(scope->focusItem(), subFocusItem);
+ QCOMPARE(scope->focusScopeItem(), subFocusItem);
scene->addItem(rootItem);
@@ -11450,11 +11525,11 @@ void tst_QGraphicsItem::QT_2649_focusScope()
qApp->sendEvent(scene, &windowActivate);
scene->setFocus();
- QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem);
- QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem);
- QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(rootItem->focusItem(), subFocusItem);
+ QCOMPARE(scope->focusItem(), subFocusItem);
+ QCOMPARE(subFocusItem->focusItem(), subFocusItem);
QCOMPARE(rootItem->focusScopeItem(), nullptr);
- QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(scope->focusScopeItem(), subFocusItem);
QCOMPARE(subFocusItem->focusScopeItem(), nullptr);
QVERIFY(subFocusItem->hasFocus());
@@ -11464,17 +11539,17 @@ void tst_QGraphicsItem::QT_2649_focusScope()
QCOMPARE(scope->focusItem(), nullptr);
QCOMPARE(subFocusItem->focusItem(), nullptr);
QCOMPARE(rootItem->focusScopeItem(), nullptr);
- QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(scope->focusScopeItem(), subFocusItem);
QCOMPARE(subFocusItem->focusScopeItem(), nullptr);
QVERIFY(!subFocusItem->hasFocus());
scope->show();
- QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem);
- QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem);
- QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(rootItem->focusItem(), subFocusItem);
+ QCOMPARE(scope->focusItem(), subFocusItem);
+ QCOMPARE(subFocusItem->focusItem(), subFocusItem);
QCOMPARE(rootItem->focusScopeItem(), nullptr);
- QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(scope->focusScopeItem(), subFocusItem);
QCOMPARE(subFocusItem->focusScopeItem(), nullptr);
QVERIFY(subFocusItem->hasFocus());
@@ -11486,16 +11561,14 @@ void tst_QGraphicsItem::QT_2649_focusScope()
class MyGraphicsItemWithItemChange : public QGraphicsWidget
{
public:
- MyGraphicsItemWithItemChange(QGraphicsItem *parent = 0) : QGraphicsWidget(parent)
- {}
+ using QGraphicsWidget::QGraphicsWidget;
- QVariant itemChange(GraphicsItemChange change, const QVariant &value)
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
{
if (change == QGraphicsItem::ItemSceneHasChanged) {
- foreach (QGraphicsView *view, scene()->views()) {
- //We trigger a sort of unindexed items in the BSP
+ const auto views = scene()->views();
+ for (QGraphicsView *view : views) // We trigger a sort of unindexed items in the BSP
view->sceneRect();
- }
}
return QGraphicsWidget::itemChange(change, value);
}
@@ -11520,8 +11593,8 @@ void tst_QGraphicsItem::doNotMarkFullUpdateIfNotInScene()
{
struct Item : public QGraphicsTextItem
{
- int painted;
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *opt, QWidget *wid)
+ int painted = 0;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *opt, QWidget *wid) override
{
painted++;
QGraphicsTextItem::paint(painter, opt, wid);
@@ -11529,15 +11602,13 @@ void tst_QGraphicsItem::doNotMarkFullUpdateIfNotInScene()
};
QGraphicsScene scene;
MyGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
Item *item = new Item;
- item->painted = 0;
item->setPlainText("Grandparent");
Item *item2 = new Item;
item2->setPlainText("parent");
- item2->painted = 0;
Item *item3 = new Item;
item3->setPlainText("child");
- item3->painted = 0;
QGraphicsOpacityEffect *effect = new QGraphicsOpacityEffect;
effect->setOpacity(0.5);
item2->setGraphicsEffect(effect);
@@ -11572,6 +11643,7 @@ void tst_QGraphicsItem::itemDiesDuringDraggingOperation()
{
QGraphicsScene scene;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
QGraphicsRectItem *item = new QGraphicsRectItem(QRectF(0, 0, 100, 100));
item->setFlag(QGraphicsItem::ItemIsMovable);
item->setAcceptDrops(true);
@@ -11580,13 +11652,13 @@ void tst_QGraphicsItem::itemDiesDuringDraggingOperation()
QApplication::setActiveWindow(&view);
QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(QTest::qWaitForWindowActive(&view));
- QCOMPARE(QApplication::activeWindow(), (QWidget *)&view);
+ QCOMPARE(QApplication::activeWindow(), &view);
QGraphicsSceneDragDropEvent dragEnter(QEvent::GraphicsSceneDragEnter);
dragEnter.setScenePos(item->boundingRect().center());
- QApplication::sendEvent(&scene, &dragEnter);
+ QCoreApplication::sendEvent(&scene, &dragEnter);
QGraphicsSceneDragDropEvent event(QEvent::GraphicsSceneDragMove);
event.setScenePos(item->boundingRect().center());
- QApplication::sendEvent(&scene, &event);
+ QCoreApplication::sendEvent(&scene, &event);
QCOMPARE(QGraphicsScenePrivate::get(&scene)->dragDropItem, item);
delete item;
QVERIFY(!QGraphicsScenePrivate::get(&scene)->dragDropItem);
@@ -11596,6 +11668,7 @@ void tst_QGraphicsItem::QTBUG_12112_focusItem()
{
QGraphicsScene scene;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
QGraphicsRectItem *item1 = new QGraphicsRectItem(0, 0, 20, 20);
item1->setFlag(QGraphicsItem::ItemIsFocusable);
QGraphicsRectItem *item2 = new QGraphicsRectItem(20, 20, 20, 20);
@@ -11608,7 +11681,7 @@ void tst_QGraphicsItem::QTBUG_12112_focusItem()
QApplication::setActiveWindow(&view);
QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(QTest::qWaitForWindowActive(&view));
- QCOMPARE(QApplication::activeWindow(), (QWidget *)&view);
+ QCOMPARE(QApplication::activeWindow(), &view);
QVERIFY(item1->focusItem());
QVERIFY(!item2->focusItem());
@@ -11644,11 +11717,11 @@ void tst_QGraphicsItem::QTBUG_13473_sceneposchange()
QCOMPARE(child->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 2);
}
-class MyGraphicsWidget : public QGraphicsWidget {
-Q_OBJECT
+class MyGraphicsWidget : public QGraphicsWidget
+{
+ Q_OBJECT
public:
- MyGraphicsWidget()
- : QGraphicsWidget(0)
+ MyGraphicsWidget() : QGraphicsWidget(nullptr)
{
QGraphicsLinearLayout *lay = new QGraphicsLinearLayout(Qt::Vertical);
QLatin1String wiseWords("AZ BUKI VEDI");
@@ -11660,21 +11733,19 @@ public:
proxy->setWidget(label);
proxy->setFocusPolicy(Qt::StrongFocus);
proxy->setFlag(QGraphicsItem::ItemAcceptsInputMethod, true);
- if (i%2 == 0)
+ if (i % 2 == 0)
proxy->setVisible(false);
proxy->setFocus();
lay->addItem(proxy);
}
setLayout(lay);
}
-
};
class MyWidgetWindow : public QGraphicsWidget
{
public:
- MyWidgetWindow()
- : QGraphicsWidget(0, Qt::Window)
+ MyWidgetWindow() : QGraphicsWidget(nullptr, Qt::Window)
{
QGraphicsLinearLayout *lay = new QGraphicsLinearLayout(Qt::Vertical);
MyGraphicsWidget *widget = new MyGraphicsWidget();
@@ -11687,6 +11758,7 @@ void tst_QGraphicsItem::QTBUG_16374_crashInDestructor()
{
QGraphicsScene scene;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
MyWidgetWindow win;
scene.addItem(&win);
@@ -11699,6 +11771,7 @@ void tst_QGraphicsItem::QTBUG_20699_focusScopeCrash()
{
QGraphicsScene scene;
QGraphicsView view(&scene);
+ view.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
QGraphicsPixmapItem fs;
fs.setFlags(QGraphicsItem::ItemIsFocusScope | QGraphicsItem::ItemIsFocusable);
scene.addItem(&fs);
diff --git a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
index c58dbf599c..8264d71e83 100644
--- a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
+++ b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
@@ -26,25 +26,21 @@
**
****************************************************************************/
-#include "../../../../shared/fakedirmodel.h"
-#include <QtTest/QtTest>
+#include <QColumnView>
+#include <QScrollBar>
+#include <QSignalSpy>
+#include <QStringListModel>
+#include <QStyledItemDelegate>
+#include <QTest>
#include <QtTest/private/qtesthelpers_p.h>
-#include <qitemdelegate.h>
-#include <qcolumnview.h>
-#include <private/qcolumnviewgrip_p.h>
-#include <private/qfilesystemmodel_p.h>
-#include <qstringlistmodel.h>
-#include <qdebug.h>
-#include <qitemdelegate.h>
-#include <qscrollbar.h>
-#include <private/qcolumnview_p.h>
-#include <qscreen.h>
+#include <QtWidgets/private/qcolumnviewgrip_p.h>
+#include "../../../../shared/fakedirmodel.h"
#define ANIMATION_DELAY 300
-class tst_QColumnView : public QObject {
- Q_OBJECT
-
+class tst_QColumnView : public QObject
+{
+ Q_OBJECT
public:
tst_QColumnView();
@@ -98,6 +94,7 @@ private:
class TreeModel : public QStandardItemModel
{
+ Q_OBJECT
public:
TreeModel()
{
@@ -122,51 +119,31 @@ public:
inline QModelIndex thirdLevel() { return index(0, 0, secondLevel()); }
};
-class ColumnView : public QColumnView {
-
+class ColumnView : public QColumnView
+{
+ Q_OBJECT
public:
- ColumnView(QWidget *parent = 0) : QColumnView(parent){}
-
- QList<QPointer<QAbstractItemView> > createdColumns;
- void ScrollContentsBy(int x, int y) {scrollContentsBy(x,y); }
- int HorizontalOffset() const { return horizontalOffset(); }
- void emitClicked() { emit clicked(QModelIndex()); }
-
- enum PublicCursorAction {
- MoveUp = QAbstractItemView::MoveUp,
- MoveDown = QAbstractItemView::MoveDown,
- MoveLeft = QAbstractItemView::MoveLeft,
- MoveRight = QAbstractItemView::MoveRight,
- MoveHome = QAbstractItemView::MoveHome,
- MoveEnd = QAbstractItemView::MoveEnd,
- MovePageUp = QAbstractItemView::MovePageUp,
- MovePageDown = QAbstractItemView::MovePageDown,
- MoveNext = QAbstractItemView::MoveNext,
- MovePrevious = QAbstractItemView::MovePrevious
- };
-
- inline QModelIndex MoveCursor(PublicCursorAction ca, Qt::KeyboardModifiers kbm)
- { return QColumnView::moveCursor((CursorAction)ca, kbm); }
- bool IsIndexHidden(const QModelIndex&index) const
- { return isIndexHidden(index); }
-
- void setSelection(const QRect & rect, QItemSelectionModel::SelectionFlags command )
- {
- QColumnView::setSelection(rect, command);
- }
+ using QColumnView::QColumnView;
+ using QColumnView::horizontalOffset;
+ using QColumnView::clicked;
+ using QColumnView::isIndexHidden;
+ using QColumnView::moveCursor;
+ using QColumnView::scrollContentsBy;
+ using QColumnView::setSelection;
+ using QColumnView::visualRegionForSelection;
+
+ friend class tst_QColumnView;
+
+ QVector<QPointer<QAbstractItemView>> createdColumns;
- // visualRegionForSelection() is protected in QColumnView.
- QRegion getVisualRegionForSelection(const QItemSelection &selection){
- return QColumnView::visualRegionForSelection(selection);
- }
protected:
- QAbstractItemView *createColumn(const QModelIndex &index) {
+ QAbstractItemView *createColumn(const QModelIndex &index) override
+ {
QAbstractItemView *view = QColumnView::createColumn(index);
QPointer<QAbstractItemView> savedView = view;
createdColumns.append(savedView);
return view;
}
-
};
tst_QColumnView::tst_QColumnView()
@@ -183,7 +160,7 @@ void tst_QColumnView::initTestCase()
void tst_QColumnView::init()
{
- qApp->setLayoutDirection(Qt::LeftToRight);
+ QGuiApplication::setLayoutDirection(Qt::LeftToRight);
}
void tst_QColumnView::rootIndex()
@@ -199,7 +176,7 @@ void tst_QColumnView::rootIndex()
QModelIndex drive = model.firstLevel();
QVERIFY(view.visualRect(drive).isValid());
view.setRootIndex(QModelIndex());
- QCOMPARE(view.HorizontalOffset(), 0);
+ QCOMPARE(view.horizontalOffset(), 0);
QCOMPARE(view.rootIndex(), QModelIndex());
QVERIFY(view.visualRect(drive).isValid());
@@ -210,7 +187,7 @@ void tst_QColumnView::rootIndex()
while (i < model.rowCount(home) - 1 && !model.hasChildren(homeFile))
homeFile = model.index(++i, 0, home);
view.setRootIndex(home);
- QCOMPARE(view.HorizontalOffset(), 0);
+ QCOMPARE(view.horizontalOffset(), 0);
QCOMPARE(view.rootIndex(), home);
QVERIFY(!view.visualRect(drive).isValid());
QVERIFY(!view.visualRect(home).isValid());
@@ -221,7 +198,7 @@ void tst_QColumnView::rootIndex()
view.setRootIndex(home);
view.setCurrentIndex(homeFile);
view.scrollTo(model.index(0,0, homeFile));
- QCOMPARE(view.HorizontalOffset(), 0);
+ QCOMPARE(view.horizontalOffset(), 0);
QCOMPARE(view.rootIndex(), home);
QVERIFY(!view.visualRect(drive).isValid());
QVERIFY(!view.visualRect(home).isValid());
@@ -238,17 +215,15 @@ void tst_QColumnView::rootIndex()
QModelIndex two = model.index(0, 0, homeFile);
while (i < model.rowCount(homeFile) - 1 && !model.hasChildren(two))
two = model.index(++i, 0, homeFile);
- qApp->processEvents();
QTest::qWait(ANIMATION_DELAY);
view.setCurrentIndex(two);
view.scrollTo(two);
QTest::qWait(ANIMATION_DELAY);
- qApp->processEvents();
QVERIFY(two.isValid());
- QVERIFY(view.HorizontalOffset() != 0);
+ QVERIFY(view.horizontalOffset() != 0);
view.setRootIndex(homeFile);
- QCOMPARE(view.HorizontalOffset(), 0);
+ QCOMPARE(view.horizontalOffset(), 0);
}
void tst_QColumnView::grips()
@@ -262,9 +237,9 @@ void tst_QColumnView::grips()
{
const QObjectList list = view.viewport()->children();
- for (int i = 0 ; i < list.count(); ++i) {
- if (QAbstractItemView *view = qobject_cast<QAbstractItemView*>(list.at(i)))
- QVERIFY(view->cornerWidget() != 0);
+ for (QObject *obj : list) {
+ if (QAbstractItemView *view = qobject_cast<QAbstractItemView*>(obj))
+ QVERIFY(view->cornerWidget() != nullptr);
}
}
view.setResizeGripsVisible(false);
@@ -272,8 +247,8 @@ void tst_QColumnView::grips()
{
const QObjectList list = view.viewport()->children();
- for (int i = 0 ; i < list.count(); ++i) {
- if (QAbstractItemView *view = qobject_cast<QAbstractItemView*>(list.at(i))) {
+ for (QObject *obj : list) {
+ if (QAbstractItemView *view = qobject_cast<QAbstractItemView*>(obj)) {
if (view->isVisible())
QVERIFY(!view->cornerWidget());
}
@@ -288,9 +263,9 @@ void tst_QColumnView::isIndexHidden()
{
ColumnView view;
QModelIndex idx;
- QCOMPARE(view.IsIndexHidden(idx), false);
+ QCOMPARE(view.isIndexHidden(idx), false);
view.setModel(&m_fakeDirModel);
- QCOMPARE(view.IsIndexHidden(idx), false);
+ QCOMPARE(view.isIndexHidden(idx), false);
}
void tst_QColumnView::indexAt()
@@ -319,7 +294,6 @@ void tst_QColumnView::indexAt()
view.selectionModel()->select(child, QItemSelectionModel::SelectCurrent);
view.setCurrentIndex(child);
- qApp->processEvents();
QTest::qWait(200);
// test that the second row doesn't start at 0
@@ -348,17 +322,17 @@ void tst_QColumnView::scrollContentsBy()
ColumnView view;
if (reverse)
view.setLayoutDirection(Qt::RightToLeft);
- view.ScrollContentsBy(-1, -1);
- view.ScrollContentsBy(0, 0);
+ view.scrollContentsBy(-1, -1);
+ view.scrollContentsBy(0, 0);
TreeModel model;
view.setModel(&model);
- view.ScrollContentsBy(0, 0);
+ view.scrollContentsBy(0, 0);
QModelIndex home = model.thirdLevel();
view.setCurrentIndex(home);
QTest::qWait(ANIMATION_DELAY);
- view.ScrollContentsBy(0, 0);
+ view.scrollContentsBy(0, 0);
}
void tst_QColumnView::scrollTo_data()
@@ -385,7 +359,7 @@ void tst_QColumnView::scrollTo()
QVERIFY(QTest::qWaitForWindowActive(&topLevel));
view.scrollTo(QModelIndex(), QAbstractItemView::EnsureVisible);
- QCOMPARE(view.HorizontalOffset(), 0);
+ QCOMPARE(view.horizontalOffset(), 0);
TreeModel model;
view.setModel(&model);
@@ -400,45 +374,44 @@ void tst_QColumnView::scrollTo()
QModelIndex index = model.index(0, 0, home);
view.scrollTo(index, QAbstractItemView::EnsureVisible);
- QCOMPARE(view.HorizontalOffset(), 0);
+ QCOMPARE(view.horizontalOffset(), 0);
// Embedded requires that at least one widget have focus
QWidget w;
w.show();
- QCOMPARE(view.HorizontalOffset(), 0);
+ QCOMPARE(view.horizontalOffset(), 0);
if (giveFocus)
view.setFocus(Qt::OtherFocusReason);
else
view.clearFocus();
- QCOMPARE(view.HorizontalOffset(), 0);
- qApp->processEvents();
- QCOMPARE(view.HorizontalOffset(), 0);
+ QCOMPARE(view.horizontalOffset(), 0);
+ QCoreApplication::processEvents();
+ QCOMPARE(view.horizontalOffset(), 0);
QTRY_COMPARE(view.hasFocus(), giveFocus);
// scroll to the right
int level = 0;
- int last = view.HorizontalOffset();
- while(model.hasChildren(index) && level < 5) {
+ int last = view.horizontalOffset();
+ while (model.hasChildren(index) && level < 5) {
view.setCurrentIndex(index);
QTest::qWait(ANIMATION_DELAY);
view.scrollTo(index, QAbstractItemView::EnsureVisible);
QTest::qWait(ANIMATION_DELAY);
- qApp->processEvents();
index = model.index(0, 0, index);
level++;
if (level >= 2) {
if (!reverse) {
- QTRY_VERIFY(view.HorizontalOffset() < 0);
+ QTRY_VERIFY(view.horizontalOffset() < 0);
qDebug() << "last=" << last
- << " ; HorizontalOffset= " << view.HorizontalOffset();
- QTRY_VERIFY(last > view.HorizontalOffset());
+ << " ; horizontalOffset= " << view.horizontalOffset();
+ QTRY_VERIFY(last > view.horizontalOffset());
} else {
- QTRY_VERIFY(view.HorizontalOffset() > 0);
- QTRY_VERIFY(last < view.HorizontalOffset());
+ QTRY_VERIFY(view.horizontalOffset() > 0);
+ QTRY_VERIFY(last < view.horizontalOffset());
}
}
- last = view.HorizontalOffset();
+ last = view.horizontalOffset();
}
// scroll to the left
@@ -450,17 +423,17 @@ void tst_QColumnView::scrollTo()
index = index.parent();
if (start != level) {
if (!reverse) {
- QTRY_VERIFY(last < view.HorizontalOffset());
+ QTRY_VERIFY(last < view.horizontalOffset());
} else {
- if (last <= view.HorizontalOffset()) {
+ if (last <= view.horizontalOffset()) {
qDebug() << "Test failure. last=" << last
- << " ; HorizontalOffset= " << view.HorizontalOffset();
+ << " ; horizontalOffset= " << view.horizontalOffset();
}
- QTRY_VERIFY(last > view.HorizontalOffset());
+ QTRY_VERIFY(last > view.horizontalOffset());
}
}
level--;
- last = view.HorizontalOffset();
+ last = view.horizontalOffset();
}
// It shouldn't automatically steal focus if it doesn't have it
QTRY_COMPARE(view.hasFocus(), giveFocus);
@@ -490,20 +463,20 @@ void tst_QColumnView::moveCursor()
if (reverse)
view.setLayoutDirection(Qt::RightToLeft);
// don't crash
- view.MoveCursor(ColumnView::MoveUp, Qt::NoModifier);
+ view.moveCursor(ColumnView::MoveUp, Qt::NoModifier);
// don't do anything
- QCOMPARE(view.MoveCursor(ColumnView::MoveEnd, Qt::NoModifier), QModelIndex());
+ QCOMPARE(view.moveCursor(ColumnView::MoveEnd, Qt::NoModifier), QModelIndex());
view.setModel(&m_fakeDirModel);
QModelIndex ci = view.currentIndex();
- QCOMPARE(view.MoveCursor(ColumnView::MoveUp, Qt::NoModifier), QModelIndex());
- QCOMPARE(view.MoveCursor(ColumnView::MoveDown, Qt::NoModifier), QModelIndex());
+ QCOMPARE(view.moveCursor(ColumnView::MoveUp, Qt::NoModifier), QModelIndex());
+ QCOMPARE(view.moveCursor(ColumnView::MoveDown, Qt::NoModifier), QModelIndex());
// left at root
view.setCurrentIndex(m_fakeDirModel.index(0,0));
- ColumnView::PublicCursorAction action = reverse ? ColumnView::MoveRight : ColumnView::MoveLeft;
- QCOMPARE(view.MoveCursor(action, Qt::NoModifier), m_fakeDirModel.index(0,0));
+ ColumnView::CursorAction action = reverse ? ColumnView::MoveRight : ColumnView::MoveLeft;
+ QCOMPARE(view.moveCursor(action, Qt::NoModifier), m_fakeDirModel.index(0,0));
// left shouldn't move up
int i = 0;
@@ -513,30 +486,29 @@ void tst_QColumnView::moveCursor()
QVERIFY(m_fakeDirModel.hasChildren(ci));
view.setCurrentIndex(ci);
action = reverse ? ColumnView::MoveRight : ColumnView::MoveLeft;
- QCOMPARE(view.MoveCursor(action, Qt::NoModifier), ci);
+ QCOMPARE(view.moveCursor(action, Qt::NoModifier), ci);
// now move to the left (i.e. move over one column)
view.setCurrentIndex(m_fakeDirHomeIndex);
- QCOMPARE(view.MoveCursor(action, Qt::NoModifier), m_fakeDirHomeIndex.parent());
+ QCOMPARE(view.moveCursor(action, Qt::NoModifier), m_fakeDirHomeIndex.parent());
// right
action = reverse ? ColumnView::MoveLeft : ColumnView::MoveRight;
view.setCurrentIndex(ci);
- QModelIndex mc = view.MoveCursor(action, Qt::NoModifier);
+ QModelIndex mc = view.moveCursor(action, Qt::NoModifier);
QCOMPARE(mc, m_fakeDirModel.index(0,0, ci));
// for empty directories (no way to go 'right'), next one should move down
QModelIndex idx = m_fakeDirModel.index(0, 0, ci);
const int rowCount = m_fakeDirModel.rowCount(ci);
- while (m_fakeDirModel.hasChildren(idx) && rowCount > idx.row() + 1) {
+ while (m_fakeDirModel.hasChildren(idx) && rowCount > idx.row() + 1)
idx = idx.sibling(idx.row() + 1, idx.column());
- }
static const char error[] = "This test requires an empty directory followed by another directory.";
QVERIFY2(idx.isValid(), error);
QVERIFY2(!m_fakeDirModel.hasChildren(idx), error);
QVERIFY2(idx.row() + 1 < rowCount, error);
view.setCurrentIndex(idx);
- mc = view.MoveCursor(action, Qt::NoModifier);
+ mc = view.moveCursor(action, Qt::NoModifier);
QCOMPARE(mc, idx.sibling(idx.row() + 1, idx.column()));
}
@@ -554,11 +526,12 @@ void tst_QColumnView::selectAll()
QVERIFY(view.selectionModel()->selectedIndexes().count() > 0);
QModelIndex file;
- for (int i = 0; i < m_fakeDirModel.rowCount(m_fakeDirHomeIndex); ++i)
+ for (int i = 0; i < m_fakeDirModel.rowCount(m_fakeDirHomeIndex); ++i) {
if (!m_fakeDirModel.hasChildren(m_fakeDirModel.index(i, 0, m_fakeDirHomeIndex))) {
file = m_fakeDirModel.index(i, 0, m_fakeDirHomeIndex);
break;
}
+ }
view.setCurrentIndex(file);
view.selectAll();
QVERIFY(view.selectionModel()->selectedIndexes().count() > 0);
@@ -572,7 +545,7 @@ void tst_QColumnView::clicked()
ColumnView view;
view.setModel(&m_fakeDirModel);
- view.resize(800,300);
+ view.resize(800, 300);
view.show();
view.setCurrentIndex(m_fakeDirHomeIndex);
@@ -581,12 +554,12 @@ void tst_QColumnView::clicked()
QModelIndex parent = m_fakeDirHomeIndex.parent();
QVERIFY(parent.isValid());
- QSignalSpy clickedSpy(&view, SIGNAL(clicked(QModelIndex)));
+ QSignalSpy clickedSpy(&view, &QAbstractItemView::clicked);
QPoint localPoint = view.visualRect(m_fakeDirHomeIndex).center();
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, localPoint);
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, localPoint);
QCOMPARE(clickedSpy.count(), 1);
- qApp->processEvents();
+ QCoreApplication::processEvents();
if (sizeof(qreal) != sizeof(double))
QSKIP("Skipped due to rounding errors");
@@ -653,21 +626,21 @@ void tst_QColumnView::visualRegionForSelection()
{
ColumnView view;
QItemSelection emptyItemSelection;
- QCOMPARE(QRegion(), view.getVisualRegionForSelection(emptyItemSelection));
+ QCOMPARE(QRegion(), view.visualRegionForSelection(emptyItemSelection));
// a region that isn't empty
view.setModel(&m_fakeDirModel);
QItemSelection itemSelection(m_fakeDirModel.index(0, 0, m_fakeDirHomeIndex), m_fakeDirModel.index(m_fakeDirModel.rowCount(m_fakeDirHomeIndex) - 1, 0, m_fakeDirHomeIndex));
- QVERIFY(QRegion() != view.getVisualRegionForSelection(itemSelection));
+ QVERIFY(QRegion() != view.visualRegionForSelection(itemSelection));
}
void tst_QColumnView::moveGrip_basic()
{
QColumnView view;
QColumnViewGrip *grip = new QColumnViewGrip(&view);
- QSignalSpy spy(grip, SIGNAL(gripMoved(int)));
+ QSignalSpy spy(grip, &QColumnViewGrip::gripMoved);
view.setCornerWidget(grip);
int oldX = view.width();
grip->moveGrip(10);
@@ -707,12 +680,11 @@ void tst_QColumnView::moveGrip()
int columnNum = view.createdColumns.count() - 2;
QVERIFY(columnNum >= 0);
- QObjectList list = view.createdColumns[columnNum]->children();
- QColumnViewGrip *grip = 0;
- for (int i = 0; i < list.count(); ++i) {
- if ((grip = qobject_cast<QColumnViewGrip *>(list[i]))) {
+ const QObjectList list = view.createdColumns[columnNum]->children();
+ QColumnViewGrip *grip = nullptr;
+ for (QObject *obj : list) {
+ if ((grip = qobject_cast<QColumnViewGrip *>(obj)))
break;
- }
}
if (!grip)
return;
@@ -728,7 +700,7 @@ void tst_QColumnView::doubleClick()
{
QColumnView view;
QColumnViewGrip *grip = new QColumnViewGrip(&view);
- QSignalSpy spy(grip, SIGNAL(gripMoved(int)));
+ QSignalSpy spy(grip, &QColumnViewGrip::gripMoved);
view.setCornerWidget(grip);
view.resize(200, 200);
QCOMPARE(view.width(), 200);
@@ -741,24 +713,24 @@ void tst_QColumnView::gripMoved()
{
QColumnView view;
QColumnViewGrip *grip = new QColumnViewGrip(&view);
- QSignalSpy spy(grip, SIGNAL(gripMoved(int)));
+ QSignalSpy spy(grip, &QColumnViewGrip::gripMoved);
view.setCornerWidget(grip);
view.move(300, 300);
view.resize(200, 200);
- qApp->processEvents();
+ QCoreApplication::processEvents();
int oldWidth = view.width();
- QTest::mousePress(grip, Qt::LeftButton, 0, QPoint(1,1));
+ QTest::mousePress(grip, Qt::LeftButton, {}, QPoint(1, 1));
//QTest::mouseMove(grip, QPoint(grip->globalX()+50, y));
- QPoint posNew = QPoint(grip->mapToGlobal(QPoint(1,1)).x() + 65, 0);
+ QPoint posNew = QPoint(grip->mapToGlobal(QPoint(1, 1)).x() + 65, 0);
QMouseEvent *event = new QMouseEvent(QEvent::MouseMove, posNew, posNew, Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
QCoreApplication::postEvent(grip, event);
QCoreApplication::processEvents();
QTest::mouseRelease(grip, Qt::LeftButton);
- QCOMPARE(spy.count(), 1);
+ QTRY_COMPARE(spy.count(), 1);
QCOMPARE(view.width(), oldWidth + 65);
}
@@ -785,12 +757,12 @@ void tst_QColumnView::preview()
}
QVERIFY(file.isValid());
view.setCurrentIndex(file);
- QVERIFY(view.previewWidget() != (QWidget*)0);
+ QVERIFY(view.previewWidget() != nullptr);
QWidget *previewWidget = new QWidget(&view);
view.setPreviewWidget(previewWidget);
QCOMPARE(view.previewWidget(), previewWidget);
- QVERIFY(previewWidget->parent() != ((QWidget*)&view));
+ QVERIFY(previewWidget->parent() != &view);
view.setCurrentIndex(home);
// previewWidget should be marked for deletion
@@ -803,21 +775,21 @@ void tst_QColumnView::swapPreview()
{
// swap the preview widget in updatePreviewWidget
QColumnView view;
- QStringList sl;
- sl << QLatin1String("test");
- QStringListModel model(sl);
+ QStringListModel model({ QLatin1String("test") });
view.setModel(&model);
view.setCurrentIndex(view.indexAt(QPoint(1, 1)));
- connect(&view, SIGNAL(updatePreviewWidget(QModelIndex)),
- this, SLOT(setPreviewWidget()));
+ connect(&view, &QColumnView::updatePreviewWidget,
+ this, &tst_QColumnView::setPreviewWidget);
view.setCurrentIndex(view.indexAt(QPoint(1, 1)));
QTest::qWait(ANIMATION_DELAY);
- qApp->processEvents();
+ QCoreApplication::processEvents();
}
void tst_QColumnView::setPreviewWidget()
{
- ((QColumnView*)sender())->setPreviewWidget(new QWidget);
+ auto ptr = qobject_cast<QColumnView *>(sender());
+ QVERIFY(ptr);
+ ptr->setPreviewWidget(new QWidget);
}
void tst_QColumnView::sizes()
@@ -825,8 +797,7 @@ void tst_QColumnView::sizes()
QColumnView view;
QCOMPARE(view.columnWidths().count(), 0);
- QList<int> newSizes;
- newSizes << 10 << 4 << 50 << 6;
+ const QList<int> newSizes{ 10, 4, 50, 6 };
QList<int> visibleSizes;
view.setColumnWidths(newSizes);
@@ -839,8 +810,7 @@ void tst_QColumnView::sizes()
QCOMPARE(postSizes, newSizes.mid(0, postSizes.count()));
QVERIFY(view.columnWidths().count() > 1);
- QList<int> smallerSizes;
- smallerSizes << 6;
+ QList<int> smallerSizes{ 6 };
view.setColumnWidths(smallerSizes);
QList<int> expectedSizes = newSizes;
expectedSizes[0] = 6;
@@ -851,13 +821,13 @@ void tst_QColumnView::sizes()
void tst_QColumnView::rowDelegate()
{
ColumnView view;
- QItemDelegate *d = new QItemDelegate;
+ QStyledItemDelegate *d = new QStyledItemDelegate;
view.setItemDelegateForRow(3, d);
view.setModel(&m_fakeDirModel);
for (int i = 0; i < view.createdColumns.count(); ++i) {
QAbstractItemView *column = view.createdColumns.at(i);
- QCOMPARE(column->itemDelegateForRow(3), (QAbstractItemDelegate*)d);
+ QCOMPARE(column->itemDelegateForRow(3), d);
}
delete d;
}
@@ -900,7 +870,7 @@ void tst_QColumnView::changeSameColumn()
}
QVERIFY(second.isValid());
- QList<QPointer<QAbstractItemView> > old = view.createdColumns;
+ const auto old = view.createdColumns;
view.setCurrentIndex(second);
QCOMPARE(old, view.createdColumns);
@@ -973,7 +943,7 @@ void tst_QColumnView::pullRug()
QModelIndex home = model.thirdLevel();
view.setCurrentIndex(home);
if (removeModel)
- view.setModel(0);
+ view.setModel(nullptr);
else
view.setCurrentIndex(QModelIndex());
QTest::qWait(ANIMATION_DELAY);
@@ -982,19 +952,19 @@ void tst_QColumnView::pullRug()
void tst_QColumnView::dynamicModelChanges()
{
- struct MyItemDelegate : public QItemDelegate
+ struct MyItemDelegate : public QStyledItemDelegate
{
void paint(QPainter *painter,
const QStyleOptionViewItem &option,
- const QModelIndex &index) const
+ const QModelIndex &index) const override
{
paintedIndexes += index;
- QItemDelegate::paint(painter, option, index);
+ QStyledItemDelegate::paint(painter, option, index);
}
mutable QSet<QModelIndex> paintedIndexes;
- } delegate;;
+ } delegate;
QStandardItemModel model;
ColumnView view;
view.setModel(&model);
@@ -1008,8 +978,6 @@ void tst_QColumnView::dynamicModelChanges()
QVERIFY(QTest::qWaitForWindowExposed(&view)); //let the time for painting to occur
QTRY_COMPARE(delegate.paintedIndexes.count(), 1);
QCOMPARE(*delegate.paintedIndexes.begin(), model.index(0,0));
-
-
}
diff --git a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
index d401154228..5097f2e356 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
+++ b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
@@ -34,6 +34,8 @@
#include <qdebug.h>
#include "emulationdetector.h"
+QT_WARNING_DISABLE_DEPRECATED
+
class tst_QDirModel : public QObject
{
Q_OBJECT
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index df02815eb2..3a71b1818b 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -27,32 +27,28 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
+#include <QDesktopWidget>
+#include <QHeaderView>
+#include <QProxyStyle>
+#include <QSignalSpy>
+#include <QSortFilterProxyModel>
#include <QStandardItemModel>
#include <QStringListModel>
-#include <QSortFilterProxyModel>
#include <QTableView>
-#include <QProxyStyle>
+#include <QTest>
+#include <QTreeWidget>
+#include <QtWidgets/private/qheaderview_p.h>
-#include <qabstractitemmodel.h>
-#include <qapplication.h>
-#include <qheaderview.h>
-#include <private/qheaderview_p.h>
-#include <qitemdelegate.h>
-#include <qtreewidget.h>
-#include <qdebug.h>
-#include <qscreen.h>
-#include <qdesktopwidget.h>
-
-typedef QList<int> IntList;
-
-typedef QList<bool> BoolList;
+using BoolList = QVector<bool>;
+using IntList = QVector<int>;
+using ResizeVec = QVector<QHeaderView::ResizeMode>;
class TestStyle : public QProxyStyle
{
+ Q_OBJECT
public:
- void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
+ void drawControl(ControlElement element, const QStyleOption *option,
+ QPainter *painter, const QWidget *widget) const override
{
if (element == CE_HeaderSection) {
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option))
@@ -60,16 +56,17 @@ public:
}
QProxyStyle::drawControl(element, option, painter, widget);
}
- mutable QStyleOptionHeader::SectionPosition lastPosition;
+ mutable QStyleOptionHeader::SectionPosition lastPosition = QStyleOptionHeader::Beginning;
};
class protected_QHeaderView : public QHeaderView
{
Q_OBJECT
public:
- protected_QHeaderView(Qt::Orientation orientation) : QHeaderView(orientation) {
+ protected_QHeaderView(Qt::Orientation orientation) : QHeaderView(orientation)
+ {
resizeSections();
- };
+ }
void testEvent();
void testhorizontalOffset();
@@ -80,7 +77,9 @@ public:
class XResetModel : public QStandardItemModel
{
- virtual bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex())
+ Q_OBJECT
+public:
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override
{
blockSignals(true);
bool r = QStandardItemModel::removeRows(row, count, parent);
@@ -89,7 +88,7 @@ class XResetModel : public QStandardItemModel
endResetModel();
return r;
}
- virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex())
+ bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override
{
blockSignals(true);
bool r = QStandardItemModel::insertRows(row, count, parent);
@@ -276,16 +275,14 @@ void tst_QHeaderView::initMain()
class QtTestModel: public QAbstractTableModel
{
-
-Q_OBJECT
-
+ Q_OBJECT
public:
- QtTestModel(QObject *parent = 0): QAbstractTableModel(parent),
- cols(0), rows(0), wrongIndex(false), m_bMultiLine(false) {}
- int rowCount(const QModelIndex&) const override { return rows; }
- int columnCount(const QModelIndex&) const override { return cols; }
+ QtTestModel(int rc, int cc, QObject *parent = nullptr)
+ : QAbstractTableModel(parent), rows(rc), cols(cc) {}
+ int rowCount(const QModelIndex &) const override { return rows; }
+ int columnCount(const QModelIndex &) const override { return cols; }
bool isEditable(const QModelIndex &) const { return true; }
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override
{
if (section < 0 || (role != Qt::DisplayRole && role != Qt::StatusTipRole))
return QVariant();
@@ -394,9 +391,10 @@ public:
endResetModel();
}
- int cols, rows;
- mutable bool wrongIndex;
- bool m_bMultiLine;
+ int rows = 0;
+ int cols = 0;
+ mutable bool wrongIndex = false;
+ bool m_bMultiLine = false;
};
// Testing get/set functions
@@ -442,16 +440,16 @@ void tst_QHeaderView::getSetCheck()
// void QHeaderView::setOffset(int)
obj1.setOffset(0);
QCOMPARE(0, obj1.offset());
- obj1.setOffset(INT_MIN);
- QCOMPARE(INT_MIN, obj1.offset());
- obj1.setOffset(INT_MAX);
- QCOMPARE(INT_MAX, obj1.offset());
+ obj1.setOffset(std::numeric_limits<int>::min());
+ QCOMPARE(std::numeric_limits<int>::min(), obj1.offset());
+ obj1.setOffset(std::numeric_limits<int>::max());
+ QCOMPARE(std::numeric_limits<int>::max(), obj1.offset());
}
tst_QHeaderView::tst_QHeaderView()
{
- qRegisterMetaType<int>("Qt::SortOrder");
+ qRegisterMetaType<Qt::SortOrder>("Qt::SortOrder");
}
void tst_QHeaderView::initTestCase()
@@ -472,8 +470,8 @@ void tst_QHeaderView::cleanupTestCase()
void tst_QHeaderView::init()
{
- topLevel = new QWidget();
- view = new QHeaderView(Qt::Vertical,topLevel);
+ topLevel = new QWidget;
+ view = new QHeaderView(Qt::Vertical, topLevel);
// Some initial value tests before a model is added
QCOMPARE(view->length(), 0);
QCOMPARE(view->sizeHint(), QSize(0,0));
@@ -499,7 +497,7 @@ void tst_QHeaderView::init()
}
*/
- QSignalSpy spy(view, SIGNAL(sectionCountChanged(int,int)));
+ QSignalSpy spy(view, &QHeaderView::sectionCountChanged);
view->setModel(model);
QCOMPARE(spy.count(), 1);
view->resize(200,200);
@@ -510,11 +508,11 @@ void tst_QHeaderView::cleanup()
m_tableview->setUpdatesEnabled(true);
if (view && view->parent() != m_tableview)
delete view;
- view = 0;
+ view = nullptr;
delete model;
- model = 0;
+ model = nullptr;
delete topLevel;
- topLevel = 0;
+ topLevel = nullptr;
}
void tst_QHeaderView::noModel()
@@ -525,7 +523,7 @@ void tst_QHeaderView::noModel()
void tst_QHeaderView::emptyModel()
{
- QtTestModel testmodel;
+ QtTestModel testmodel(0, 0);
view->setModel(&testmodel);
QVERIFY(!testmodel.wrongIndex);
QCOMPARE(view->count(), testmodel.rows);
@@ -534,8 +532,7 @@ void tst_QHeaderView::emptyModel()
void tst_QHeaderView::removeRows()
{
- QtTestModel model;
- model.rows = model.cols = 10;
+ QtTestModel model(10, 10);
QHeaderView vertical(Qt::Vertical);
QHeaderView horizontal(Qt::Horizontal);
@@ -561,8 +558,7 @@ void tst_QHeaderView::removeRows()
void tst_QHeaderView::removeCols()
{
- QtTestModel model;
- model.rows = model.cols = 10;
+ QtTestModel model(10, 10);
QHeaderView vertical(Qt::Vertical);
QHeaderView horizontal(Qt::Horizontal);
@@ -644,14 +640,12 @@ void tst_QHeaderView::hidden()
view->setSectionHidden(i, true);
view->setModel(&model2);
QVERIFY(view->sectionsHidden());
- for (int i = 0; i < model2.rowCount(); ++i) {
+ for (int i = 0; i < model2.rowCount(); ++i)
QVERIFY(view->isSectionHidden(i));
- }
view->setModel(model);
- for (int i = 0; i < model2.rowCount(); ++i) {
+ for (int i = 0; i < model2.rowCount(); ++i)
QVERIFY(view->isSectionHidden(i));
- }
QCOMPARE(view->isSectionHidden(model->rowCount() - 1), false);
for (int i = 0; i < model->rowCount(); ++i)
view->setSectionHidden(i, false);
@@ -680,14 +674,12 @@ void tst_QHeaderView::oneSectionSize()
{
//this ensures that if there is only one section, it gets a correct width (more than 0)
QHeaderView view (Qt::Vertical);
- QtTestModel model;
- model.cols = 1;
- model.rows = 1;
+ QtTestModel model(1, 1);
view.setSectionResizeMode(QHeaderView::Interactive);
view.setModel(&model);
-
view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
QVERIFY(view.sectionSize(0) > 0);
}
@@ -695,15 +687,15 @@ void tst_QHeaderView::oneSectionSize()
void tst_QHeaderView::sectionSize_data()
{
- QTest::addColumn<QList<int> >("boundsCheck");
- QTest::addColumn<QList<int> >("defaultSizes");
+ QTest::addColumn<IntList>("boundsCheck");
+ QTest::addColumn<IntList>("defaultSizes");
QTest::addColumn<int>("initialDefaultSize");
QTest::addColumn<int>("lastVisibleSectionSize");
QTest::addColumn<int>("persistentSectionSize");
QTest::newRow("data set one")
- << (QList<int>() << -1 << 0 << 4 << 9999)
- << (QList<int>() << 10 << 30 << 30)
+ << (IntList{ -1, 0, 4, 9999 })
+ << (IntList{ 10, 30, 30 })
<< 30
<< 300
<< 20;
@@ -716,19 +708,19 @@ void tst_QHeaderView::sectionSize()
#elif defined Q_OS_WINRT
QSKIP("Fails on WinRT - QTBUG-68297");
#endif
- QFETCH(QList<int>, boundsCheck);
- QFETCH(QList<int>, defaultSizes);
+ QFETCH(const IntList, boundsCheck);
+ QFETCH(const IntList, defaultSizes);
QFETCH(int, initialDefaultSize);
QFETCH(int, lastVisibleSectionSize);
QFETCH(int, persistentSectionSize);
// bounds check
- foreach (int val, boundsCheck)
+ for (int val : boundsCheck)
view->sectionSize(val);
// default size
QCOMPARE(view->defaultSectionSize(), initialDefaultSize);
- foreach (int def, defaultSizes) {
+ for (int def : defaultSizes) {
view->setDefaultSectionSize(def);
QCOMPARE(view->defaultSectionSize(), def);
}
@@ -757,9 +749,7 @@ void tst_QHeaderView::sectionSize()
int sectionCount = view->count();
for (int i = 0; i < sectionCount; ++i)
view->resizeSection(i, persistentSectionSize);
- QtTestModel model;
- model.cols = sectionCount * 2;
- model.rows = sectionCount * 2;
+ QtTestModel model(sectionCount * 2, sectionCount * 2);
view->setModel(&model);
for (int j = 0; j < sectionCount; ++j)
QCOMPARE(view->sectionSize(j), persistentSectionSize);
@@ -784,35 +774,34 @@ void tst_QHeaderView::visualIndex()
void tst_QHeaderView::visualIndexAt_data()
{
- QTest::addColumn<QList<int> >("hidden");
- QTest::addColumn<QList<int> >("from");
- QTest::addColumn<QList<int> >("to");
- QTest::addColumn<QList<int> >("coordinate");
- QTest::addColumn<QList<int> >("visual");
+ QTest::addColumn<IntList>("hidden");
+ QTest::addColumn<IntList>("from");
+ QTest::addColumn<IntList>("to");
+ QTest::addColumn<IntList>("coordinate");
+ QTest::addColumn<IntList>("visual");
- QList<int> coordinateList;
- coordinateList << -1 << 0 << 31 << 91 << 99999;
+ const IntList coordinateList{ -1, 0, 31, 91, 99999 };
QTest::newRow("no hidden, no moved sections")
- << QList<int>()
- << QList<int>()
- << QList<int>()
+ << IntList()
+ << IntList()
+ << IntList()
<< coordinateList
- << (QList<int>() << -1 << 0 << 1 << 3 << -1);
+ << (IntList{ -1, 0, 1, 3, -1 });
QTest::newRow("no hidden, moved sections")
- << QList<int>()
- << (QList<int>() << 0)
- << (QList<int>() << 1)
+ << IntList()
+ << (IntList{ 0 })
+ << (IntList{ 1 })
<< coordinateList
- << (QList<int>() << -1 << 0 << 1 << 3 << -1);
+ << (IntList{ -1, 0, 1, 3, -1 });
QTest::newRow("hidden, no moved sections")
- << (QList<int>() << 0)
- << QList<int>()
- << QList<int>()
+ << (IntList{ 0 })
+ << IntList()
+ << IntList()
<< coordinateList
- << (QList<int>() << -1 << 1 << 2 << 3 << -1);
+ << (IntList{ -1, 1, 2, 3, -1 });
}
void tst_QHeaderView::visualIndexAt()
@@ -822,26 +811,24 @@ void tst_QHeaderView::visualIndexAt()
#elif defined Q_OS_WINRT
QSKIP("Fails on WinRT - QTBUG-68297");
#endif
- QFETCH(QList<int>, hidden);
- QFETCH(QList<int>, from);
- QFETCH(QList<int>, to);
- QFETCH(QList<int>, coordinate);
- QFETCH(QList<int>, visual);
+ QFETCH(const IntList, hidden);
+ QFETCH(const IntList, from);
+ QFETCH(const IntList, to);
+ QFETCH(const IntList, coordinate);
+ QFETCH(const IntList, visual);
view->setStretchLastSection(true);
topLevel->show();
QVERIFY(QTest::qWaitForWindowExposed(topLevel));
- for (int i = 0; i < hidden.count(); ++i)
- view->setSectionHidden(hidden.at(i), true);
+ for (int i : hidden)
+ view->setSectionHidden(i, true);
for (int j = 0; j < from.count(); ++j)
view->moveSection(from.at(j), to.at(j));
- QTest::qWait(100);
-
for (int k = 0; k < coordinate.count(); ++k)
- QCOMPARE(view->visualIndexAt(coordinate.at(k)), visual.at(k));
+ QTRY_COMPARE(view->visualIndexAt(coordinate.at(k)), visual.at(k));
}
void tst_QHeaderView::length()
@@ -852,9 +839,8 @@ void tst_QHeaderView::length()
//minimumSectionSize should be the size of the last section of the widget is not tall enough
int length = view->minimumSectionSize();
- for (int i=0; i < view->count()-1; i++) {
+ for (int i = 0; i < view->count() - 1; i++)
length += view->sectionSize(i);
- }
length = qMax(length, view->viewport()->height());
QCOMPARE(length, view->length());
@@ -866,9 +852,7 @@ void tst_QHeaderView::length()
QVERIFY(length != view->length());
// layoutChanged might mean rows have been removed
- QtTestModel model;
- model.cols = 10;
- model.rows = 10;
+ QtTestModel model(10, 10);
view->setModel(&model);
int oldLength = view->length();
model.cleanup();
@@ -942,9 +926,9 @@ void tst_QHeaderView::swapSections()
view->swapSections(1, -1);
view->swapSections(1, 99999);
- QVector<int> logical = (QVector<int>() << 0 << 1 << 2 << 3);
+ IntList logical{ 0, 1, 2, 3 };
- QSignalSpy spy1(view, SIGNAL(sectionMoved(int,int,int)));
+ QSignalSpy spy1(view, &QHeaderView::sectionMoved);
QCOMPARE(view->sectionsMoved(), false);
view->swapSections(1, 1);
@@ -957,7 +941,7 @@ void tst_QHeaderView::swapSections()
QCOMPARE(view->logicalIndex(i), logical.at(i));
QCOMPARE(spy1.count(), 4);
- logical = (QVector<int>() << 3 << 1 << 2 << 0);
+ logical = { 3, 1, 2, 0 };
view->swapSections(3, 0);
QCOMPARE(view->sectionsMoved(), true);
for (int j = 0; j < view->count(); ++j)
@@ -967,56 +951,56 @@ void tst_QHeaderView::swapSections()
void tst_QHeaderView::moveSection_data()
{
- QTest::addColumn<QList<int> >("hidden");
- QTest::addColumn<QList<int> >("from");
- QTest::addColumn<QList<int> >("to");
- QTest::addColumn<QList<bool> >("moved");
- QTest::addColumn<QList<int> >("logical");
+ QTest::addColumn<IntList>("hidden");
+ QTest::addColumn<IntList>("from");
+ QTest::addColumn<IntList>("to");
+ QTest::addColumn<BoolList>("moved");
+ QTest::addColumn<IntList>("logical");
QTest::addColumn<int>("count");
QTest::newRow("bad args, no hidden")
- << QList<int>()
- << (QList<int>() << -1 << 1 << 99999 << 1)
- << (QList<int>() << 1 << -1 << 1 << 99999)
- << (QList<bool>() << false << false << false << false)
- << (QList<int>() << 0 << 1 << 2 << 3)
+ << IntList()
+ << (IntList{ -1, 1, 99999, 1 })
+ << (IntList{ 1, -1, 1, 99999 })
+ << (BoolList{ false, false, false, false })
+ << (IntList{ 0, 1, 2, 3 })
<< 0;
QTest::newRow("good args, no hidden")
- << QList<int>()
- << (QList<int>() << 1 << 1 << 2 << 1)
- << (QList<int>() << 1 << 2 << 1 << 2)
- << (QList<bool>() << false << true << true << true)
- << (QList<int>() << 0 << 2 << 1 << 3)
+ << IntList()
+ << (IntList{ 1, 1, 2, 1 })
+ << (IntList{ 1, 2, 1, 2 })
+ << (BoolList{ false, true, true, true })
+ << (IntList{ 0, 2, 1, 3 })
<< 3;
QTest::newRow("hidden sections")
- << (QList<int>() << 0 << 3)
- << (QList<int>() << 1 << 1 << 2 << 1)
- << (QList<int>() << 1 << 2 << 1 << 2)
- << (QList<bool>() << false << true << true << true)
- << (QList<int>() << 0 << 2 << 1 << 3)
+ << (IntList{ 0, 3 })
+ << (IntList{ 1, 1, 2, 1 })
+ << (IntList{ 1, 2, 1, 2 })
+ << (BoolList{ false, true, true, true })
+ << (IntList{ 0, 2, 1, 3 })
<< 3;
}
void tst_QHeaderView::moveSection()
{
- QFETCH(QList<int>, hidden);
- QFETCH(QList<int>, from);
- QFETCH(QList<int>, to);
- QFETCH(QList<bool>, moved);
- QFETCH(QList<int>, logical);
+ QFETCH(const IntList, hidden);
+ QFETCH(const IntList, from);
+ QFETCH(const IntList, to);
+ QFETCH(const BoolList, moved);
+ QFETCH(const IntList, logical);
QFETCH(int, count);
QCOMPARE(from.count(), to.count());
QCOMPARE(from.count(), moved.count());
QCOMPARE(view->count(), logical.count());
- QSignalSpy spy1(view, SIGNAL(sectionMoved(int,int,int)));
+ QSignalSpy spy1(view, &QHeaderView::sectionMoved);
QCOMPARE(view->sectionsMoved(), false);
- for (int h = 0; h < hidden.count(); ++h)
- view->setSectionHidden(hidden.at(h), true);
+ for (int h : hidden)
+ view->setSectionHidden(h, true);
for (int i = 0; i < from.count(); ++i) {
view->moveSection(from.at(i), to.at(i));
@@ -1037,42 +1021,42 @@ void tst_QHeaderView::resizeAndMoveSection_data()
QTest::addColumn<int>("logicalTo");
QTest::newRow("resizeAndMove-1")
- << (IntList() << 0 << 1)
- << (IntList() << 20 << 40)
+ << (IntList{ 0, 1 })
+ << (IntList{ 20, 40 })
<< 0 << 1;
QTest::newRow("resizeAndMove-2")
- << (IntList() << 0 << 1 << 2 << 3)
- << (IntList() << 20 << 60 << 10 << 80)
+ << (IntList{ 0, 1, 2, 3 })
+ << (IntList{ 20, 60, 10, 80 })
<< 0 << 2;
QTest::newRow("resizeAndMove-3")
- << (IntList() << 0 << 1 << 2 << 3)
- << (IntList() << 100 << 60 << 40 << 10)
+ << (IntList{ 0, 1, 2, 3 })
+ << (IntList{ 100, 60, 40, 10 })
<< 0 << 3;
QTest::newRow("resizeAndMove-4")
- << (IntList() << 0 << 1 << 2 << 3)
- << (IntList() << 10 << 40 << 80 << 30)
+ << (IntList{ 0, 1, 2, 3 })
+ << (IntList{ 10, 40, 80, 30 })
<< 1 << 2;
QTest::newRow("resizeAndMove-5")
- << (IntList() << 2 << 3)
- << (IntList() << 100 << 200)
+ << (IntList{ 2, 3 })
+ << (IntList{ 100, 200})
<< 3 << 2;
}
void tst_QHeaderView::resizeAndMoveSection()
{
- QFETCH(IntList, logicalIndexes);
- QFETCH(IntList, sizes);
+ QFETCH(const IntList, logicalIndexes);
+ QFETCH(const IntList, sizes);
QFETCH(int, logicalFrom);
QFETCH(int, logicalTo);
// Save old visual indexes and sizes
IntList oldVisualIndexes;
IntList oldSizes;
- foreach (int logical, logicalIndexes) {
+ for (int logical : logicalIndexes) {
oldVisualIndexes.append(view->visualIndex(logical));
oldSizes.append(view->sectionSize(logical));
}
@@ -1188,31 +1172,32 @@ void tst_QHeaderView::resizeAndInsertSection()
void tst_QHeaderView::resizeWithResizeModes_data()
{
QTest::addColumn<int>("size");
- QTest::addColumn<QList<int> >("sections");
- QTest::addColumn<QList<int> >("modes");
- QTest::addColumn<QList<int> >("expected");
+ QTest::addColumn<IntList>("sections");
+ QTest::addColumn<ResizeVec>("modes");
+ QTest::addColumn<IntList>("expected");
QTest::newRow("stretch first section")
<< 600
- << (QList<int>() << 100 << 100 << 100 << 100)
- << (QList<int>() << ((int)QHeaderView::Stretch)
- << ((int)QHeaderView::Interactive)
- << ((int)QHeaderView::Interactive)
- << ((int)QHeaderView::Interactive))
- << (QList<int>() << 300 << 100 << 100 << 100);
+ << (IntList{ 100, 100, 100, 100 })
+ << (ResizeVec
+ { QHeaderView::Stretch,
+ QHeaderView::Interactive,
+ QHeaderView::Interactive,
+ QHeaderView::Interactive })
+ << (IntList{ 300, 100, 100, 100 });
}
void tst_QHeaderView::resizeWithResizeModes()
{
QFETCH(int, size);
- QFETCH(QList<int>, sections);
- QFETCH(QList<int>, modes);
- QFETCH(QList<int>, expected);
+ QFETCH(const IntList, sections);
+ QFETCH(const ResizeVec, modes);
+ QFETCH(const IntList, expected);
view->setStretchLastSection(false);
for (int i = 0; i < sections.count(); ++i) {
view->resizeSection(i, sections.at(i));
- view->setSectionResizeMode(i, (QHeaderView::ResizeMode)modes.at(i));
+ view->setSectionResizeMode(i, modes.at(i));
}
topLevel->show();
QVERIFY(QTest::qWaitForWindowExposed(topLevel));
@@ -1226,10 +1211,10 @@ void tst_QHeaderView::moveAndInsertSection_data()
QTest::addColumn<int>("from");
QTest::addColumn<int>("to");
QTest::addColumn<int>("insert");
- QTest::addColumn<QList<int> >("mapping");
+ QTest::addColumn<IntList>("mapping");
QTest::newRow("move from 1 to 3, insert 0")
- << 1 << 3 << 0 <<(QList<int>() << 0 << 1 << 3 << 4 << 2);
+ << 1 << 3 << 0 <<(IntList{ 0, 1, 3, 4, 2 });
}
@@ -1238,12 +1223,10 @@ void tst_QHeaderView::moveAndInsertSection()
QFETCH(int, from);
QFETCH(int, to);
QFETCH(int, insert);
- QFETCH(QList<int>, mapping);
+ QFETCH(IntList, mapping);
view->setStretchLastSection(false);
-
view->moveSection(from, to);
-
model->insertRow(insert);
for (int i = 0; i < mapping.count(); ++i)
@@ -1266,12 +1249,12 @@ void tst_QHeaderView::resizeMode()
// test when sections have been moved
view->setStretchLastSection(false);
- for (int i=0; i < (view->count() - 1); ++i)
+ for (int i = 0; i < (view->count() - 1); ++i)
view->setSectionResizeMode(i, QHeaderView::Interactive);
int logicalIndex = view->count() / 2;
view->setSectionResizeMode(logicalIndex, QHeaderView::Stretch);
view->moveSection(view->visualIndex(logicalIndex), 0);
- for (int i=0; i < (view->count() - 1); ++i) {
+ for (int i = 0; i < (view->count() - 1); ++i) {
if (i == logicalIndex)
QCOMPARE(view->sectionResizeMode(i), QHeaderView::Stretch);
else
@@ -1282,34 +1265,33 @@ void tst_QHeaderView::resizeMode()
void tst_QHeaderView::resizeSection_data()
{
QTest::addColumn<int>("initial");
- QTest::addColumn<QList<int> >("logical");
- QTest::addColumn<QList<int> >("size");
- QTest::addColumn<QList<int> >("mode");
+ QTest::addColumn<IntList>("logical");
+ QTest::addColumn<IntList>("size");
+ QTest::addColumn<ResizeVec>("mode");
QTest::addColumn<int>("resized");
- QTest::addColumn<QList<int> >("expected");
+ QTest::addColumn<IntList>("expected");
QTest::newRow("bad args")
<< 100
- << (QList<int>() << -1 << -1 << 99999 << 99999 << 4)
- << (QList<int>() << -1 << 0 << 99999 << -1 << -1)
- << (QList<int>()
- << int(QHeaderView::Interactive)
- << int(QHeaderView::Interactive)
- << int(QHeaderView::Interactive)
- << int(QHeaderView::Interactive))
+ << (IntList{ -1, -1, 99999, 99999, 4 })
+ << (IntList{ -1, 0, 99999, -1, -1 })
+ << (ResizeVec{
+ QHeaderView::Interactive,
+ QHeaderView::Interactive,
+ QHeaderView::Interactive,
+ QHeaderView::Interactive })
<< 0
- << (QList<int>() << 0 << 0 << 0 << 0 << 0);
+ << (IntList{ 0, 0, 0, 0, 0 });
}
void tst_QHeaderView::resizeSection()
{
-
QFETCH(int, initial);
- QFETCH(QList<int>, logical);
- QFETCH(QList<int>, size);
- QFETCH(QList<int>, mode);
+ QFETCH(const IntList, logical);
+ QFETCH(const IntList, size);
+ QFETCH(const ResizeVec, mode);
QFETCH(int, resized);
- QFETCH(QList<int>, expected);
+ QFETCH(const IntList, expected);
view->resize(400, 400);
@@ -1320,12 +1302,12 @@ void tst_QHeaderView::resizeSection()
for (int i = 0; i < logical.count(); ++i)
if (logical.at(i) > -1 && logical.at(i) < view->count()) // for now
- view->setSectionResizeMode(logical.at(i), (QHeaderView::ResizeMode)mode.at(i));
+ view->setSectionResizeMode(logical.at(i), mode.at(i));
for (int j = 0; j < logical.count(); ++j)
view->resizeSection(logical.at(j), initial);
- QSignalSpy spy(view, SIGNAL(sectionResized(int,int,int)));
+ QSignalSpy spy(view, &QHeaderView::sectionResized);
for (int k = 0; k < logical.count(); ++k)
view->resizeSection(logical.at(k), size.at(k));
@@ -1366,9 +1348,7 @@ void tst_QHeaderView::showSortIndicator()
void tst_QHeaderView::sortIndicatorTracking()
{
- QtTestModel model;
- model.rows = model.cols = 10;
-
+ QtTestModel model(10, 10);
QHeaderView hv(Qt::Horizontal);
hv.setModel(&model);
@@ -1399,51 +1379,44 @@ void tst_QHeaderView::removeAndInsertRow()
{
// Check if logicalIndex returns the correct value after we have removed a row
// we might as well te
- for (int i = 0; i < model->rowCount(); ++i) {
+ for (int i = 0; i < model->rowCount(); ++i)
QCOMPARE(i, view->logicalIndex(i));
- }
while (model->removeRow(0)) {
- for (int i = 0; i < model->rowCount(); ++i) {
+ for (int i = 0; i < model->rowCount(); ++i)
QCOMPARE(i, view->logicalIndex(i));
- }
}
- int pass = 0;
- for (pass = 0; pass < 5; pass++) {
- for (int i = 0; i < model->rowCount(); ++i) {
+ for (int pass = 0; pass < 5; pass++) {
+ for (int i = 0; i < model->rowCount(); ++i)
QCOMPARE(i, view->logicalIndex(i));
- }
model->insertRow(0);
}
while (model->removeRows(0, 2)) {
- for (int i = 0; i < model->rowCount(); ++i) {
+ for (int i = 0; i < model->rowCount(); ++i)
QCOMPARE(i, view->logicalIndex(i));
- }
}
- for (pass = 0; pass < 3; pass++) {
+ for (int pass = 0; pass < 3; pass++) {
model->insertRows(0, 2);
for (int i = 0; i < model->rowCount(); ++i) {
QCOMPARE(i, view->logicalIndex(i));
}
}
- for (pass = 0; pass < 3; pass++) {
+ for (int pass = 0; pass < 3; pass++) {
model->insertRows(3, 2);
- for (int i = 0; i < model->rowCount(); ++i) {
+ for (int i = 0; i < model->rowCount(); ++i)
QCOMPARE(i, view->logicalIndex(i));
- }
}
// Insert at end
- for (pass = 0; pass < 3; pass++) {
+ for (int pass = 0; pass < 3; pass++) {
int rowCount = model->rowCount();
model->insertRows(rowCount, 1);
- for (int i = 0; i < rowCount; ++i) {
+ for (int i = 0; i < rowCount; ++i)
QCOMPARE(i, view->logicalIndex(i));
- }
}
}
@@ -1490,7 +1463,7 @@ void protected_QHeaderView::testEvent()
void tst_QHeaderView::headerDataChanged()
{
- // This shouldn't asserver because view is Vertical
+ // This shouldn't assert because view is Vertical
view->headerDataChanged(Qt::Horizontal, -1, -1);
#if 0
// This will assert
@@ -1525,19 +1498,18 @@ void tst_QHeaderView::verticalOffset()
void protected_QHeaderView::testhorizontalOffset()
{
- if(orientation() == Qt::Horizontal){
+ if (orientation() == Qt::Horizontal) {
QCOMPARE(horizontalOffset(), 0);
setOffset(10);
QCOMPARE(horizontalOffset(), 10);
}
else
QCOMPARE(horizontalOffset(), 0);
-
}
void protected_QHeaderView::testverticalOffset()
{
- if(orientation() == Qt::Vertical){
+ if (orientation() == Qt::Vertical) {
QCOMPARE(verticalOffset(), 0);
setOffset(10);
QCOMPARE(verticalOffset(), 10);
@@ -1562,7 +1534,7 @@ void tst_QHeaderView::hiddenSectionCount()
model->clear();
model->insertRows(0, 10);
// Hide every other one
- for (int i=0; i<10; i++)
+ for (int i = 0; i < 10; i++)
view->setSectionHidden(i, (i & 1) == 0);
QCOMPARE(view->hiddenSectionCount(), 5);
@@ -1577,7 +1549,7 @@ void tst_QHeaderView::hiddenSectionCount()
model->removeRow(6);
QCOMPARE(view->count(), 6);
QCOMPARE(view->hiddenSectionCount(), 3);
- model->removeRows(0,5);
+ model->removeRows(0, 5);
QCOMPARE(view->count(), 1);
QCOMPARE(view->hiddenSectionCount(), 0);
QVERIFY(view->count() >= view->hiddenSectionCount());
@@ -1610,8 +1582,8 @@ void tst_QHeaderView::focusPolicy()
QTest::keyPress(&widget, Qt::Key_Tab);
- qApp->processEvents();
- qApp->processEvents();
+ QCoreApplication::processEvents();
+ QCoreApplication::processEvents();
QVERIFY(!widget.hasFocus());
QVERIFY(!widget.header()->hasFocus());
@@ -1621,47 +1593,37 @@ class SimpleModel : public QAbstractItemModel
{
Q_OBJECT
public:
-
- SimpleModel( QObject* parent=0)
- : QAbstractItemModel(parent),
- m_col_count(3) {}
-
- QModelIndex parent(const QModelIndex &/*child*/) const
+ using QAbstractItemModel::QAbstractItemModel;
+ QModelIndex parent(const QModelIndex &/*child*/) const override
{
return QModelIndex();
}
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override
{
return hasIndex(row, column, parent) ? createIndex(row, column) : QModelIndex();
}
- int rowCount(const QModelIndex & /*parent*/ = QModelIndex()) const
+ int rowCount(const QModelIndex & /*parent*/ = QModelIndex()) const override
{
return 8;
}
- int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const
+ int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const override
{
return m_col_count;
}
-
- QVariant data(const QModelIndex &index, int role) const
+ QVariant data(const QModelIndex &index, int role) const override
{
if (!index.isValid())
- {
return QVariant();
- }
- if (role == Qt::DisplayRole) {
+ if (role == Qt::DisplayRole)
return QString::number(index.row()) + QLatin1Char(',') + QString::number(index.column());
- }
return QVariant();
}
-
- void setColumnCount( int c )
+ void setColumnCount(int c)
{
m_col_count = c;
}
-
private:
- int m_col_count;
+ int m_col_count = 3;
};
void tst_QHeaderView::moveSectionAndReset()
@@ -1678,9 +1640,8 @@ void tst_QHeaderView::moveSectionAndReset()
v.moveSection(movefrom, moveto);
m.setColumnCount(cc - 1);
v.reset();
- for (int i = 0; i < cc - 1; ++i) {
+ for (int i = 0; i < cc - 1; ++i)
QCOMPARE(v.logicalIndex(v.visualIndex(i)), i);
- }
}
}
}
@@ -1719,7 +1680,7 @@ void tst_QHeaderView::saveRestore()
const QByteArray s1 = savedState();
QHeaderView h2(Qt::Vertical);
- QSignalSpy spy(&h2, SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)));
+ QSignalSpy spy(&h2, &QHeaderView::sortIndicatorChanged);
h2.setModel(&m);
QVERIFY(h2.restoreState(s1));
@@ -1745,6 +1706,7 @@ void tst_QHeaderView::saveRestore()
void tst_QHeaderView::restoreQt4State()
{
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// QTBUG-40462
// Setting from Qt4, where information about multiple sections were grouped together in one
// sectionItem object
@@ -1777,6 +1739,9 @@ void tst_QHeaderView::restoreQt4State()
// Check nothing has been actually restored
QCOMPARE(h2.length(), old_length);
QCOMPARE(h2.saveState(), old_state);
+#else
+ QSKIP("Qt4 compatibility no longer needed in Qt6")
+#endif
}
void tst_QHeaderView::restoreToMoreColumns()
@@ -1910,16 +1875,18 @@ void tst_QHeaderView::defaultSectionSizeTest()
class TestHeaderViewStyle : public QProxyStyle
{
+ Q_OBJECT
public:
- TestHeaderViewStyle() : horizontalSectionSize(100) {}
- int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const override
+ using QProxyStyle::QProxyStyle;
+ int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr,
+ const QWidget *widget = nullptr) const override
{
if (metric == QStyle::PM_HeaderDefaultSectionSizeHorizontal)
return horizontalSectionSize;
else
return QProxyStyle::pixelMetric(metric, option, widget);
}
- int horizontalSectionSize;
+ int horizontalSectionSize = 100;
};
void tst_QHeaderView::defaultSectionSizeTestStyles()
@@ -1946,107 +1913,107 @@ void tst_QHeaderView::defaultSectionSizeTestStyles()
void tst_QHeaderView::defaultAlignment_data()
{
- QTest::addColumn<int>("direction");
- QTest::addColumn<int>("initial");
- QTest::addColumn<int>("alignment");
+ QTest::addColumn<Qt::Orientation>("direction");
+ QTest::addColumn<Qt::Alignment>("initial");
+ QTest::addColumn<Qt::Alignment>("alignment");
QTest::newRow("horizontal right aligned")
- << int(Qt::Horizontal)
- << int(Qt::AlignCenter)
- << int(Qt::AlignRight);
+ << Qt::Horizontal
+ << Qt::Alignment(Qt::AlignCenter)
+ << Qt::Alignment(Qt::AlignRight);
QTest::newRow("horizontal left aligned")
- << int(Qt::Horizontal)
- << int(Qt::AlignCenter)
- << int(Qt::AlignLeft);
+ << Qt::Horizontal
+ << Qt::Alignment(Qt::AlignCenter)
+ << Qt::Alignment(Qt::AlignLeft);
QTest::newRow("vertical right aligned")
- << int(Qt::Vertical)
- << int(Qt::AlignLeft|Qt::AlignVCenter)
- << int(Qt::AlignRight);
+ << Qt::Vertical
+ << Qt::Alignment(Qt::AlignLeft|Qt::AlignVCenter)
+ << Qt::Alignment(Qt::AlignRight);
QTest::newRow("vertical left aligned")
- << int(Qt::Vertical)
- << int(Qt::AlignLeft|Qt::AlignVCenter)
- << int(Qt::AlignLeft);
+ << Qt::Vertical
+ << Qt::Alignment(Qt::AlignLeft|Qt::AlignVCenter)
+ << Qt::Alignment(Qt::AlignLeft);
}
void tst_QHeaderView::defaultAlignment()
{
- QFETCH(int, direction);
- QFETCH(int, initial);
- QFETCH(int, alignment);
+ QFETCH(Qt::Orientation, direction);
+ QFETCH(Qt::Alignment, initial);
+ QFETCH(Qt::Alignment, alignment);
SimpleModel m;
- QHeaderView header((Qt::Orientation)direction);
+ QHeaderView header(direction);
header.setModel(&m);
- QCOMPARE(header.defaultAlignment(), (Qt::Alignment)initial);
- header.setDefaultAlignment((Qt::Alignment)alignment);
- QCOMPARE(header.defaultAlignment(), (Qt::Alignment)alignment);
+ QCOMPARE(header.defaultAlignment(), initial);
+ header.setDefaultAlignment(alignment);
+ QCOMPARE(header.defaultAlignment(), alignment);
}
void tst_QHeaderView::globalResizeMode_data()
{
- QTest::addColumn<int>("direction");
- QTest::addColumn<int>("mode");
+ QTest::addColumn<Qt::Orientation>("direction");
+ QTest::addColumn<QHeaderView::ResizeMode>("mode");
QTest::addColumn<int>("insert");
QTest::newRow("horizontal ResizeToContents 0")
- << int(Qt::Horizontal)
- << int(QHeaderView::ResizeToContents)
+ << Qt::Horizontal
+ << QHeaderView::ResizeToContents
<< 0;
}
void tst_QHeaderView::globalResizeMode()
{
- QFETCH(int, direction);
- QFETCH(int, mode);
+ QFETCH(Qt::Orientation, direction);
+ QFETCH(QHeaderView::ResizeMode, mode);
QFETCH(int, insert);
QStandardItemModel m(4, 4);
- QHeaderView h((Qt::Orientation)direction);
+ QHeaderView h(direction);
h.setModel(&m);
- h.setSectionResizeMode((QHeaderView::ResizeMode)mode);
+ h.setSectionResizeMode(mode);
m.insertRow(insert);
for (int i = 0; i < h.count(); ++i)
- QCOMPARE(h.sectionResizeMode(i), (QHeaderView::ResizeMode)mode);
+ QCOMPARE(h.sectionResizeMode(i), mode);
}
void tst_QHeaderView::sectionPressedSignal_data()
{
- QTest::addColumn<int>("direction");
+ QTest::addColumn<Qt::Orientation>("direction");
QTest::addColumn<bool>("clickable");
QTest::addColumn<int>("count");
QTest::newRow("horizontal unclickable 0")
- << int(Qt::Horizontal)
+ << Qt::Horizontal
<< false
<< 0;
QTest::newRow("horizontal clickable 1")
- << int(Qt::Horizontal)
+ << Qt::Horizontal
<< true
<< 1;
}
void tst_QHeaderView::sectionPressedSignal()
{
- QFETCH(int, direction);
+ QFETCH(Qt::Orientation, direction);
QFETCH(bool, clickable);
QFETCH(int, count);
QStandardItemModel m(4, 4);
- QHeaderView h((Qt::Orientation)direction);
+ QHeaderView h(direction);
h.setModel(&m);
h.show();
h.setSectionsClickable(clickable);
- QSignalSpy spy(&h, SIGNAL(sectionPressed(int)));
+ QSignalSpy spy(&h, &QHeaderView::sectionPressed);
QCOMPARE(spy.count(), 0);
QTest::mousePress(h.viewport(), Qt::LeftButton, Qt::NoModifier, QPoint(5, 5));
@@ -2055,20 +2022,20 @@ void tst_QHeaderView::sectionPressedSignal()
void tst_QHeaderView::sectionClickedSignal()
{
- QFETCH(int, direction);
+ QFETCH(Qt::Orientation, direction);
QFETCH(bool, clickable);
QFETCH(int, count);
QStandardItemModel m(4, 4);
- QHeaderView h((Qt::Orientation)direction);
+ QHeaderView h(direction);
h.setModel(&m);
h.show();
h.setSectionsClickable(clickable);
h.setSortIndicatorShown(true);
- QSignalSpy spy(&h, SIGNAL(sectionClicked(int)));
- QSignalSpy spy2(&h, SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)));
+ QSignalSpy spy(&h, &QHeaderView::sectionClicked);
+ QSignalSpy spy2(&h, &QHeaderView::sortIndicatorChanged);
QCOMPARE(spy.count(), 0);
QCOMPARE(spy2.count(), 0);
@@ -2087,24 +2054,24 @@ void tst_QHeaderView::sectionClickedSignal()
void tst_QHeaderView::defaultSectionSize_data()
{
- QTest::addColumn<int>("direction");
+ QTest::addColumn<Qt::Orientation>("direction");
QTest::addColumn<int>("oldDefaultSize");
QTest::addColumn<int>("newDefaultSize");
//QTest::newRow("horizontal,-5") << int(Qt::Horizontal) << 100 << -5;
- QTest::newRow("horizontal, 0") << int(Qt::Horizontal) << 100 << 0;
- QTest::newRow("horizontal, 5") << int(Qt::Horizontal) << 100 << 5;
- QTest::newRow("horizontal,25") << int(Qt::Horizontal) << 100 << 5;
+ QTest::newRow("horizontal, 0") << Qt::Horizontal << 100 << 0;
+ QTest::newRow("horizontal, 5") << Qt::Horizontal << 100 << 5;
+ QTest::newRow("horizontal,25") << Qt::Horizontal << 100 << 5;
}
void tst_QHeaderView::defaultSectionSize()
{
- QFETCH(int, direction);
+ QFETCH(Qt::Orientation, direction);
QFETCH(int, oldDefaultSize);
QFETCH(int, newDefaultSize);
QStandardItemModel m(4, 4);
- QHeaderView h((Qt::Orientation)direction);
+ QHeaderView h(direction);
h.setModel(&m);
h.setMinimumSectionSize(0);
@@ -2119,26 +2086,24 @@ void tst_QHeaderView::defaultSectionSize()
void tst_QHeaderView::hideAndInsert_data()
{
- QTest::addColumn<int>("direction");
+ QTest::addColumn<Qt::Orientation>("direction");
QTest::addColumn<int>("hide");
QTest::addColumn<int>("insert");
QTest::addColumn<int>("hidden");
- QTest::newRow("horizontal, 0, 0") << int(Qt::Horizontal) << 0 << 0 << 1;
+ QTest::newRow("horizontal, 0, 0") << Qt::Horizontal << 0 << 0 << 1;
}
void tst_QHeaderView::hideAndInsert()
{
- QFETCH(int, direction);
+ QFETCH(Qt::Orientation, direction);
QFETCH(int, hide);
QFETCH(int, insert);
QFETCH(int, hidden);
QStandardItemModel m(4, 4);
- QHeaderView h((Qt::Orientation)direction);
-
+ QHeaderView h(direction);
h.setModel(&m);
-
h.setSectionHidden(hide, true);
if (direction == Qt::Vertical)
@@ -2147,20 +2112,14 @@ void tst_QHeaderView::hideAndInsert()
m.insertColumn(insert);
for (int i = 0; i < h.count(); ++i)
- if (i != hidden)
- QCOMPARE(h.isSectionHidden(i), false);
- else
- QCOMPARE(h.isSectionHidden(i), true);
+ QCOMPARE(h.isSectionHidden(i), i == hidden);
}
void tst_QHeaderView::removeSection()
{
-//test that removing a hidden section gives the expected result: the next row should be hidden
-//(see task
const int hidden = 3; //section that will be hidden
- const QStringList list = QStringList() << "0" << "1" << "2" << "3" << "4" << "5" << "6";
- QStringListModel model( list );
+ QStringListModel model({ "0", "1", "2", "3", "4", "5", "6" });
QHeaderView view(Qt::Vertical);
view.setModel(&model);
view.hideSection(hidden);
@@ -2169,7 +2128,7 @@ void tst_QHeaderView::removeSection()
view.show();
for(int i = 0; i < view.count(); i++) {
- if (i == (hidden-1)) { //-1 because we removed a row in the meantime
+ if (i == (hidden - 1)) { //-1 because we removed a row in the meantime
QCOMPARE(view.sectionSize(i), 0);
QVERIFY(view.isSectionHidden(i));
} else {
@@ -2181,9 +2140,7 @@ void tst_QHeaderView::removeSection()
void tst_QHeaderView::preserveHiddenSectionWidth()
{
- const QStringList list = QStringList() << "0" << "1" << "2" << "3";
-
- QStringListModel model( list );
+ QStringListModel model({ "0", "1", "2", "3" });
QHeaderView view(Qt::Vertical);
view.setModel(&model);
view.resizeSection(0, 100);
@@ -2249,38 +2206,36 @@ void tst_QHeaderView::emptySectionSpan()
void tst_QHeaderView::task236450_hidden_data()
{
- QTest::addColumn<QList<int> >("hide1");
- QTest::addColumn<QList<int> >("hide2");
+ QTest::addColumn<IntList>("hide1");
+ QTest::addColumn<IntList>("hide2");
- QTest::newRow("set 1") << (QList<int>() << 1 << 3)
- << (QList<int>() << 1 << 5);
+ QTest::newRow("set 1") << (IntList{ 1, 3 })
+ << (IntList{ 1, 5 });
- QTest::newRow("set 2") << (QList<int>() << 2 << 3)
- << (QList<int>() << 1 << 5);
+ QTest::newRow("set 2") << (IntList{ 2, 3 })
+ << (IntList{ 1, 5 });
- QTest::newRow("set 3") << (QList<int>() << 0 << 2 << 4)
- << (QList<int>() << 2 << 3 << 5);
+ QTest::newRow("set 3") << (IntList{ 0, 2, 4 })
+ << (IntList{ 2, 3, 5 });
}
void tst_QHeaderView::task236450_hidden()
{
- QFETCH(QList<int>, hide1);
- QFETCH(QList<int>, hide2);
- const QStringList list = QStringList() << "0" << "1" << "2" << "3" << "4" << "5";
+ QFETCH(const IntList, hide1);
+ QFETCH(const IntList, hide2);
- QStringListModel model( list );
+ QStringListModel model({ "0", "1", "2", "3", "4", "5" });
protected_QHeaderView view(Qt::Vertical);
view.setModel(&model);
view.show();
- foreach (int i, hide1)
+ for (int i : hide1)
view.hideSection(i);
QCOMPARE(view.hiddenSectionCount(), hide1.count());
- for (int i = 0; i < 6; i++) {
+ for (int i = 0; i < 6; i++)
QCOMPARE(!view.isSectionHidden(i), !hide1.contains(i));
- }
view.setDefaultSectionSize(2);
view.scheduleDelayedItemsLayout();
@@ -2293,10 +2248,8 @@ void tst_QHeaderView::task236450_hidden()
}
QCOMPARE(view.hiddenSectionCount(), hide2.count());
- for (int i = 0; i < 6; i++) {
+ for (int i = 0; i < 6; i++)
QCOMPARE(!view.isSectionHidden(i), !hide2.contains(i));
- }
-
}
void tst_QHeaderView::task248050_hideRow()
@@ -2324,7 +2277,7 @@ void tst_QHeaderView::task248050_hideRow()
//returns 0 if everything is fine.
-static int checkHeaderViewOrder(QHeaderView *view, const QVector<int> &expected)
+static int checkHeaderViewOrder(const QHeaderView *view, const IntList &expected)
{
if (view->count() != expected.count())
return 1;
@@ -2341,8 +2294,8 @@ static int checkHeaderViewOrder(QHeaderView *view, const QVector<int> &expected)
void tst_QHeaderView::QTBUG6058_reset()
{
- QStringListModel model1( QStringList() << "0" << "1" << "2" << "3" << "4" << "5" );
- QStringListModel model2( QStringList() << "a" << "b" << "c" );
+ QStringListModel model1({ "0", "1", "2", "3", "4", "5" });
+ QStringListModel model2({ "a", "b", "c" });
QSortFilterProxyModel proxy;
QHeaderView view(Qt::Vertical);
@@ -2352,9 +2305,9 @@ void tst_QHeaderView::QTBUG6058_reset()
QVERIFY(QTest::qWaitForWindowActive(&view));
proxy.setSourceModel(&model1);
- view.swapSections(0,2);
- view.swapSections(1,4);
- QVector<int> expectedOrder{2, 4, 0, 3, 1, 5};
+ view.swapSections(0, 2);
+ view.swapSections(1, 4);
+ IntList expectedOrder{2, 4, 0, 3, 1, 5};
QTRY_COMPARE(checkHeaderViewOrder(&view, expectedOrder) , 0);
proxy.setSourceModel(&model2);
@@ -2376,11 +2329,11 @@ void tst_QHeaderView::QTBUG7833_sectionClicked()
proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
QList<QStandardItem *> row;
- for (int i = 0; i < 12; i++)
+ for (char i = 0; i < 12; i++)
row.append(new QStandardItem(QString(QLatin1Char('A' + i))));
sim->appendRow(row);
row.clear();
- for (int i = 12; i > 0; i--)
+ for (char i = 12; i > 0; i--)
row.append(new QStandardItem(QString(QLatin1Char('A' + i))));
sim->appendRow(row);
@@ -2410,19 +2363,21 @@ void tst_QHeaderView::QTBUG7833_sectionClicked()
QCOMPARE(tv.horizontalHeader()->sectionSize(5), section5Size);
tv.setColumnHidden(5, true);
- QSignalSpy clickedSpy(tv.horizontalHeader(), SIGNAL(sectionClicked(int)));
- QSignalSpy pressedSpy(tv.horizontalHeader(), SIGNAL(sectionPressed(int)));
+ QSignalSpy clickedSpy(tv.horizontalHeader(), &QHeaderView::sectionClicked);
+ QSignalSpy pressedSpy(tv.horizontalHeader(), &QHeaderView::sectionPressed);
QTest::mouseClick(tv.horizontalHeader()->viewport(), Qt::LeftButton, Qt::NoModifier,
- QPoint(tv.horizontalHeader()->sectionViewportPosition(11) + tv.horizontalHeader()->sectionSize(11)/2, 5));
+ QPoint(tv.horizontalHeader()->sectionViewportPosition(11) +
+ tv.horizontalHeader()->sectionSize(11) / 2, 5));
QCOMPARE(clickedSpy.count(), 1);
QCOMPARE(pressedSpy.count(), 1);
QCOMPARE(clickedSpy.at(0).at(0).toInt(), 11);
QCOMPARE(pressedSpy.at(0).at(0).toInt(), 11);
QTest::mouseClick(tv.horizontalHeader()->viewport(), Qt::LeftButton, Qt::NoModifier,
- QPoint(tv.horizontalHeader()->sectionViewportPosition(8) + tv.horizontalHeader()->sectionSize(0)/2, 5));
+ QPoint(tv.horizontalHeader()->sectionViewportPosition(8) +
+ tv.horizontalHeader()->sectionSize(0) / 2, 5));
QCOMPARE(clickedSpy.count(), 2);
QCOMPARE(pressedSpy.count(), 2);
@@ -2430,7 +2385,8 @@ void tst_QHeaderView::QTBUG7833_sectionClicked()
QCOMPARE(pressedSpy.at(1).at(0).toInt(), 8);
QTest::mouseClick(tv.horizontalHeader()->viewport(), Qt::LeftButton, Qt::NoModifier,
- QPoint(tv.horizontalHeader()->sectionViewportPosition(0) + tv.horizontalHeader()->sectionSize(0)/2, 5));
+ QPoint(tv.horizontalHeader()->sectionViewportPosition(0) +
+ tv.horizontalHeader()->sectionSize(0) / 2, 5));
QCOMPARE(clickedSpy.count(), 3);
QCOMPARE(pressedSpy.count(), 3);
@@ -2440,8 +2396,7 @@ void tst_QHeaderView::QTBUG7833_sectionClicked()
void tst_QHeaderView::checkLayoutChangeEmptyModel()
{
- QtTestModel tm;
- tm.cols = 11;
+ QtTestModel tm(0, 11);
QTableView tv;
tv.verticalHeader()->setStretchLastSection(true);
tv.setModel(&tm);
@@ -2488,14 +2443,12 @@ void tst_QHeaderView::QTBUG8650_crashOnInsertSections()
{
QStringList headerLabels;
QHeaderView view(Qt::Horizontal);
- QStandardItemModel model(2,2);
+ QStandardItemModel model(2, 2);
view.setModel(&model);
view.moveSection(1, 0);
view.hideSection(0);
- QList<QStandardItem *> items;
- items << new QStandardItem("c");
- model.insertColumn(0, items);
+ model.insertColumn(0, { new QStandardItem("c") });
}
static void setModelTexts(QStandardItemModel *model)
@@ -2511,9 +2464,9 @@ static void setModelTexts(QStandardItemModel *model)
void tst_QHeaderView::QTBUG12268_hiddenMovedSectionSorting()
{
QTableView view; // ### this test fails on QTableView &view = *m_tableview; !? + shadowing view member
- QStandardItemModel *model = new QStandardItemModel(4,3, &view);
- setModelTexts(model);
- view.setModel(model);
+ QStandardItemModel model(4, 3);
+ setModelTexts(&model);
+ view.setModel(&model);
view.horizontalHeader()->setSectionsMovable(true);
view.setSortingEnabled(true);
view.sortByColumn(1, Qt::AscendingOrder);
@@ -2549,9 +2502,7 @@ void tst_QHeaderView::QTBUG14242_hideSectionAutoSize()
void tst_QHeaderView::QTBUG50171_visualRegionForSwappedItems()
{
protected_QHeaderView headerView(Qt::Horizontal);
- QtTestModel model;
- model.rows = 2;
- model.cols = 3;
+ QtTestModel model(2, 3);
headerView.setModel(&model);
headerView.swapSections(1, 2);
headerView.hideSection(0);
@@ -2560,17 +2511,17 @@ void tst_QHeaderView::QTBUG50171_visualRegionForSwappedItems()
class QTBUG53221_Model : public QAbstractItemModel
{
+ Q_OBJECT
public:
void insertRowAtBeginning()
{
Q_EMIT layoutAboutToBeChanged();
m_displayNames.insert(0, QStringLiteral("Item %1").arg(m_displayNames.count()));
// Rows are always inserted at the beginning, so move all others.
- foreach (const QModelIndex &persIndex, persistentIndexList())
- {
- // The vertical header view will have a persistent index stored here on the second call to insertRowAtBeginning.
+ const auto pl = persistentIndexList();
+ // The vertical header view will have a persistent index stored here on the second call to insertRowAtBeginning.
+ for (const QModelIndex &persIndex : pl)
changePersistentIndex(persIndex, index(persIndex.row() + 1, persIndex.column(), persIndex.parent()));
- }
Q_EMIT layoutChanged();
}
@@ -2653,15 +2604,15 @@ void tst_QHeaderView::offsetConsistent()
void tst_QHeaderView::initialSortOrderRole()
{
QTableView view; // ### Shadowing member view (of type QHeaderView)
- QStandardItemModel *model = new QStandardItemModel(4, 3, &view);
- setModelTexts(model);
+ QStandardItemModel model(4, 3);
+ setModelTexts(&model);
QStandardItem *ascendingItem = new QStandardItem();
QStandardItem *descendingItem = new QStandardItem();
ascendingItem->setData(Qt::AscendingOrder, Qt::InitialSortOrderRole);
descendingItem->setData(Qt::DescendingOrder, Qt::InitialSortOrderRole);
- model->setHorizontalHeaderItem(1, ascendingItem);
- model->setHorizontalHeaderItem(2, descendingItem);
- view.setModel(model);
+ model.setHorizontalHeaderItem(1, ascendingItem);
+ model.setHorizontalHeaderItem(2, descendingItem);
+ view.setModel(&model);
view.setSortingEnabled(true);
view.sortByColumn(0, Qt::AscendingOrder);
view.show();
@@ -2687,7 +2638,7 @@ const bool block_some_signals = true; // The test should also work with this set
const int rowcount = 500;
const int colcount = 10;
-QString istr(int n, bool comma = true)
+static inline QString istr(int n, bool comma = true)
{
QString s;
s.setNum(n);
@@ -3433,9 +3384,7 @@ void tst_QHeaderView::testMinMaxSectionSize()
void tst_QHeaderView::testResetCachedSizeHint()
{
- QtTestModel model;
- model.rows = model.cols = 10;
-
+ QtTestModel model(10, 10);
QTableView tv;
tv.setModel(&model);
tv.show();
@@ -3453,13 +3402,13 @@ void tst_QHeaderView::testResetCachedSizeHint()
class StatusTipHeaderView : public QHeaderView
{
+ Q_OBJECT
public:
- StatusTipHeaderView(Qt::Orientation orientation = Qt::Horizontal, QWidget *parent = 0) :
- QHeaderView(orientation, parent), gotStatusTipEvent(false) {}
- bool gotStatusTipEvent;
+ using QHeaderView::QHeaderView;
QString statusTipText;
+ bool gotStatusTipEvent = false;
protected:
- bool event(QEvent *e)
+ bool event(QEvent *e) override
{
if (e->type() == QEvent::StatusTip) {
gotStatusTipEvent = true;
@@ -3471,15 +3420,14 @@ protected:
void tst_QHeaderView::statusTips()
{
- StatusTipHeaderView headerView;
- QtTestModel model;
- model.rows = model.cols = 5;
+ StatusTipHeaderView headerView(Qt::Horizontal);
+ QtTestModel model(5, 5);
headerView.setModel(&model);
headerView.viewport()->setMouseTracking(true);
headerView.setGeometry(QRect(QPoint(QApplication::desktop()->geometry().center() - QPoint(250, 250)),
QSize(500, 500)));
headerView.show();
- qApp->setActiveWindow(&headerView);
+ QApplication::setActiveWindow(&headerView);
QVERIFY(QTest::qWaitForWindowActive(&headerView));
// Ensure it is moved away first and then moved to the relevant section
@@ -3504,8 +3452,7 @@ void tst_QHeaderView::testRemovingColumnsViaLayoutChanged()
{
const int persistentSectionSize = 101;
- QtTestModel model;
- model.rows = model.cols = 5;
+ QtTestModel model(5, 5);
view->setModel(&model);
for (int i = 0; i < model.cols; ++i)
view->resizeSection(i, persistentSectionSize + i);
diff --git a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
index 071665a5e3..10beacbe75 100644
--- a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
+++ b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
@@ -26,9 +26,10 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtCore/QtCore>
+#include <QRandomGenerator>
+#include <QStack>
+#include <QStandardItemModel>
+#include <QTest>
#include "viewstotest.cpp"
/*!
@@ -89,17 +90,19 @@ class CheckerModel : public QStandardItemModel
Q_OBJECT
public:
- CheckerModel() : QStandardItemModel() {};
+ using QStandardItemModel::QStandardItemModel;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole ) const {
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
+ {
if (!index.isValid()) {
qWarning("%s: index is not valid", Q_FUNC_INFO);
return QVariant();
}
return QStandardItemModel::data(index, role);
- };
+ }
- Qt::ItemFlags flags(const QModelIndex & index) const {
+ Qt::ItemFlags flags(const QModelIndex &index) const override
+ {
if (!index.isValid()) {
qWarning("%s: index is not valid", Q_FUNC_INFO);
return Qt::ItemFlags();
@@ -107,21 +110,24 @@ public:
if (index.row() == 2 || index.row() == rowCount() - 3
|| index.column() == 2 || index.column() == columnCount() - 3) {
Qt::ItemFlags f = QStandardItemModel::flags(index);
- f &= ~Qt::ItemIsEnabled;
+ f.setFlag(Qt::ItemIsEnabled, false);
return f;
}
return QStandardItemModel::flags(index);
- };
+ }
- QModelIndex parent ( const QModelIndex & child ) const {
+ QModelIndex parent(const QModelIndex &child) const override
+ {
if (!child.isValid()) {
qWarning("%s: child index is not valid", Q_FUNC_INFO);
return QModelIndex();
}
return QStandardItemModel::parent(child);
- };
+ }
- QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const {
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const override
+ {
if (orientation == Qt::Horizontal
&& (section < 0 || section > columnCount())) {
qWarning("%s: invalid section %d, must be in range 0..%d",
@@ -137,11 +143,9 @@ public:
return QStandardItemModel::headerData(section, orientation, role);
}
- QModelIndex index( int row, int column, const QModelIndex & parent = QModelIndex() ) const {
- return QStandardItemModel::index(row, column, parent);
- };
-
- bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) {
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole) override
+ {
if (!index.isValid()) {
qWarning("%s: index is not valid", Q_FUNC_INFO);
return false;
@@ -149,15 +153,19 @@ public:
return QStandardItemModel::setData(index, value, role);
}
- void sort( int column, Qt::SortOrder order = Qt::AscendingOrder ) {
+ void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override
+ {
if (column < 0 || column > columnCount())
qWarning("%s: invalid column %d, must be in range 0..%d",
Q_FUNC_INFO, column, columnCount());
else
QStandardItemModel::sort(column, order);
- };
+ }
- QModelIndexList match ( const QModelIndex & start, int role, const QVariant & value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags( Qt::MatchStartsWith | Qt::MatchWrap ) ) const {
+ QModelIndexList match(const QModelIndex &start, int role,
+ const QVariant &value, int hits = 1,
+ Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith | Qt::MatchWrap)) const override
+ {
if (hits <= 0) {
qWarning("%s: hits must be greater than zero", Q_FUNC_INFO);
return QModelIndexList();
@@ -167,9 +175,11 @@ public:
return QModelIndexList();
}
return QAbstractItemModel::match(start, role, value, hits, flags);
- };
+ }
- bool setHeaderData ( int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole ) {
+ bool setHeaderData(int section, Qt::Orientation orientation,
+ const QVariant &value, int role = Qt::EditRole) override
+ {
if (orientation == Qt::Horizontal
&& (section < 0 || section > columnCount())) {
qWarning("%s: invalid section %d, must be in range 0..%d",
@@ -183,7 +193,7 @@ public:
return false;
}
return QAbstractItemModel::setHeaderData(section, orientation, value, role);
- };
+ }
};
void tst_QItemView::init()
@@ -197,9 +207,9 @@ void tst_QItemView::cleanup()
delete testViews;
delete view;
delete treeModel;
- view = 0;
- testViews = 0;
- treeModel = 0;
+ view = nullptr;
+ testViews = nullptr;
+ treeModel = nullptr;
}
void tst_QItemView::setupWithNoTestData()
@@ -207,15 +217,15 @@ void tst_QItemView::setupWithNoTestData()
ViewsToTest testViews;
QTest::addColumn<QString>("viewType");
QTest::addColumn<bool>("displays");
- QTest::addColumn<int>("vscroll");
- QTest::addColumn<int>("hscroll");
+ QTest::addColumn<QAbstractItemView::ScrollMode>("vscroll");
+ QTest::addColumn<QAbstractItemView::ScrollMode>("hscroll");
for (int i = 0; i < testViews.tests.size(); ++i) {
QString view = testViews.tests.at(i).viewType;
QString test = view + " ScrollPerPixel";
bool displayIndexes = (testViews.tests.at(i).display == ViewsToTest::DisplayRoot);
QTest::newRow(test.toLatin1().data()) << view << displayIndexes
- << (int)QAbstractItemView::ScrollPerPixel
- << (int)QAbstractItemView::ScrollPerPixel
+ << QAbstractItemView::ScrollPerPixel
+ << QAbstractItemView::ScrollPerPixel
;
}
for (int i = 0; i < testViews.tests.size(); ++i) {
@@ -223,8 +233,8 @@ void tst_QItemView::setupWithNoTestData()
QString test = view + " ScrollPerItem";
bool displayIndexes = (testViews.tests.at(i).display == ViewsToTest::DisplayRoot);
QTest::newRow(test.toLatin1().data()) << view << displayIndexes
- << (int)QAbstractItemView::ScrollPerItem
- << (int)QAbstractItemView::ScrollPerItem
+ << QAbstractItemView::ScrollPerItem
+ << QAbstractItemView::ScrollPerItem
;
}
}
@@ -267,13 +277,13 @@ void tst_QItemView::nonDestructiveBasicTest_data()
void tst_QItemView::nonDestructiveBasicTest()
{
QFETCH(QString, viewType);
- QFETCH(int, vscroll);
- QFETCH(int, hscroll);
+ QFETCH(QAbstractItemView::ScrollMode, vscroll);
+ QFETCH(QAbstractItemView::ScrollMode, hscroll);
view = testViews->createView(viewType);
QVERIFY(view);
- view->setVerticalScrollMode((QAbstractItemView::ScrollMode)vscroll);
- view->setHorizontalScrollMode((QAbstractItemView::ScrollMode)hscroll);
+ view->setVerticalScrollMode(vscroll);
+ view->setHorizontalScrollMode(hscroll);
// setSelectionModel() will assert
//view->setSelectionModel(0);
@@ -396,7 +406,8 @@ void tst_QItemView::spider_data()
setupWithNoTestData();
}
-void touch(QWidget *widget, Qt::KeyboardModifier modifier, Qt::Key keyPress){
+void touch(QWidget *widget, Qt::KeyboardModifier modifier, Qt::Key keyPress)
+{
int width = widget->width();
int height = widget->height();
for (int i = 0; i < 5; ++i) {
@@ -409,7 +420,7 @@ void touch(QWidget *widget, Qt::KeyboardModifier modifier, Qt::Key keyPress){
QTest::mousePress(widget, Qt::LeftButton, modifier, press);
QTest::mouseMove(widget, releasePoint);
if (QRandomGenerator::global()->bounded(1) == 0)
- QTest::mouseRelease(widget, Qt::LeftButton, 0, releasePoint);
+ QTest::mouseRelease(widget, Qt::LeftButton, {}, releasePoint);
else
QTest::mouseRelease(widget, Qt::LeftButton, modifier, releasePoint);
QTest::keyClick(widget, keyPress);
@@ -425,13 +436,13 @@ void touch(QWidget *widget, Qt::KeyboardModifier modifier, Qt::Key keyPress){
void tst_QItemView::spider()
{
QFETCH(QString, viewType);
- QFETCH(int, vscroll);
- QFETCH(int, hscroll);
+ QFETCH(QAbstractItemView::ScrollMode, vscroll);
+ QFETCH(QAbstractItemView::ScrollMode, hscroll);
view = testViews->createView(viewType);
QVERIFY(view);
- view->setVerticalScrollMode((QAbstractItemView::ScrollMode)vscroll);
- view->setHorizontalScrollMode((QAbstractItemView::ScrollMode)hscroll);
+ view->setVerticalScrollMode(vscroll);
+ view->setHorizontalScrollMode(hscroll);
view->setModel(treeModel);
view->show();
QVERIFY(QTest::qWaitForWindowActive(view));
@@ -454,21 +465,21 @@ void tst_QItemView::resize()
QSKIP("This test needs to be re-thought out, it takes too long and doesn't really catch the problem.");
QFETCH(QString, viewType);
- QFETCH(int, vscroll);
- QFETCH(int, hscroll);
+ QFETCH(QAbstractItemView::ScrollMode, vscroll);
+ QFETCH(QAbstractItemView::ScrollMode, hscroll);
view = testViews->createView(viewType);
QVERIFY(view);
- view->setVerticalScrollMode((QAbstractItemView::ScrollMode)vscroll);
- view->setHorizontalScrollMode((QAbstractItemView::ScrollMode)hscroll);
+ view->setVerticalScrollMode(vscroll);
+ view->setHorizontalScrollMode(hscroll);
view->setModel(treeModel);
view->show();
- for (int w = 100; w < 400; w+=10) {
- for (int h = 100; h < 400; h+=10) {
+ for (int w = 100; w < 400; w += 10) {
+ for (int h = 100; h < 400; h += 10) {
view->resize(w, h);
QTest::qWait(1);
- qApp->processEvents();
+ QCoreApplication::processEvents();
}
}
}
@@ -481,13 +492,13 @@ void tst_QItemView::visualRect_data()
void tst_QItemView::visualRect()
{
QFETCH(QString, viewType);
- QFETCH(int, vscroll);
- QFETCH(int, hscroll);
+ QFETCH(QAbstractItemView::ScrollMode, vscroll);
+ QFETCH(QAbstractItemView::ScrollMode, hscroll);
view = testViews->createView(viewType);
QVERIFY(view);
- view->setVerticalScrollMode((QAbstractItemView::ScrollMode)vscroll);
- view->setHorizontalScrollMode((QAbstractItemView::ScrollMode)hscroll);
+ view->setVerticalScrollMode(vscroll);
+ view->setHorizontalScrollMode(hscroll);
QCOMPARE(view->visualRect(QModelIndex()), QRect());
// Add model
@@ -617,13 +628,13 @@ void tst_QItemView::indexAt_data()
void tst_QItemView::indexAt()
{
QFETCH(QString, viewType);
- QFETCH(int, vscroll);
- QFETCH(int, hscroll);
+ QFETCH(QAbstractItemView::ScrollMode, vscroll);
+ QFETCH(QAbstractItemView::ScrollMode, hscroll);
view = testViews->createView(viewType);
QVERIFY(view);
- view->setVerticalScrollMode((QAbstractItemView::ScrollMode)vscroll);
- view->setHorizontalScrollMode((QAbstractItemView::ScrollMode)hscroll);
+ view->setVerticalScrollMode(vscroll);
+ view->setHorizontalScrollMode(hscroll);
view->show();
view->setModel(treeModel);
checkChildren(view);
@@ -648,13 +659,13 @@ void tst_QItemView::scrollTo_data()
void tst_QItemView::scrollTo()
{
QFETCH(QString, viewType);
- QFETCH(int, vscroll);
- QFETCH(int, hscroll);
+ QFETCH(QAbstractItemView::ScrollMode, vscroll);
+ QFETCH(QAbstractItemView::ScrollMode, hscroll);
view = testViews->createView(viewType);
QVERIFY(view);
- view->setVerticalScrollMode((QAbstractItemView::ScrollMode)vscroll);
- view->setHorizontalScrollMode((QAbstractItemView::ScrollMode)hscroll);
+ view->setVerticalScrollMode(vscroll);
+ view->setHorizontalScrollMode(hscroll);
view->setModel(treeModel);
view->show();
@@ -682,10 +693,10 @@ void tst_QItemView::moveCursor_data()
setupWithNoTestData();
}
-class Event {
-public:
- Event(){}
- Event(Qt::Key k, QModelIndex s, QModelIndex e, QString n) : key(k), start(s), end(e), name(n){}
+struct Event
+{
+ Event(Qt::Key k, const QModelIndex &s, const QModelIndex &e, const QString &n)
+ : key(k), start(s), end(e), name(n){}
Qt::Key key;
QModelIndex start;
QModelIndex end;
diff --git a/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp b/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp
index f1da2f4fe7..c55cc865fc 100644
--- a/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp
+++ b/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp
@@ -26,11 +26,10 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtCore/QtCore>
-#include <QtGui/QtGui>
-#include <QtWidgets/QtWidgets>
+#include <QHeaderView>
+#include <QListView>
+#include <QTableView>
+#include <QTreeView>
/*
To add a view to be tested add the header file to the includes
@@ -54,12 +53,12 @@ public:
enum Display { DisplayNone, DisplayRoot };
struct test {
- test(QString m, Display d) : viewType(m), display(d){};
+ test(const QString &m, Display d) : viewType(m), display(d) {}
QString viewType;
Display display;
};
- QList<test> tests;
+ QVector<test> tests;
};
@@ -84,7 +83,7 @@ ViewsToTest::ViewsToTest()
*/
QAbstractItemView *ViewsToTest::createView(const QString &viewType)
{
- QAbstractItemView *view = 0;
+ QAbstractItemView *view = nullptr;
if (viewType == "QListView_ScrollPerItem") {
view = new QListView();
view->setObjectName("QListView");
@@ -137,16 +136,16 @@ void ViewsToTest::hideIndexes(QAbstractItemView *view)
if (QTableView *tableView = qobject_cast<QTableView *>(view)) {
tableView->setColumnHidden(1, true);
tableView->setRowHidden(1, true);
- tableView->setRowHidden(tableView->model()->rowCount()-2, true);
+ tableView->setRowHidden(tableView->model()->rowCount() - 2, true);
}
if (QTreeView *treeView = qobject_cast<QTreeView *>(view)) {
treeView->setColumnHidden(1, true);
treeView->setRowHidden(1, QModelIndex(), true);
- treeView->setRowHidden(treeView->model()->rowCount()-2, QModelIndex(), true);
+ treeView->setRowHidden(treeView->model()->rowCount() - 2, QModelIndex(), true);
}
if (QListView *listView = qobject_cast<QListView *>(view)) {
listView->setRowHidden(1, true);
- listView->setRowHidden(listView->model()->rowCount()-2, true);
+ listView->setRowHidden(listView->model()->rowCount() - 2, true);
}
}
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 3a60b3b7c6..aef2d26137 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -27,32 +27,27 @@
****************************************************************************/
-#include <QtTest/QtTest>
-
-#include <qabstractitemmodel.h>
-#include <qapplication.h>
-#include <qlistview.h>
-#include <private/qlistview_p.h>
-#include <private/qcoreapplication_p.h>
-#include <qlistwidget.h>
-#include <qitemdelegate.h>
-#include <qstandarditemmodel.h>
-#include <qstringlistmodel.h>
-#include <cmath>
-#include <math.h>
-#include <QtWidgets/QScrollBar>
-#include <QtWidgets/QDialog>
-#include <QtWidgets/QStyledItemDelegate>
-#include <QtWidgets/QStyleFactory>
-#include <QtWidgets/QVBoxLayout>
+#include <QListWidget>
+#include <QScrollBar>
+#include <QSignalSpy>
+#include <QStandardItemModel>
+#include <QStringListModel>
+#include <QStyledItemDelegate>
+#include <QStyleFactory>
+#include <QTest>
+#include <QTimer>
+#include <QtMath>
#include <QtTest/private/qtesthelpers_p.h>
+#include <QtWidgets/private/qlistview_p.h>
using namespace QTestPrivate;
#if defined(Q_OS_WIN)
# include <windows.h>
-# include <QtGui/QGuiApplication>
+# include <QDialog>
+# include <QGuiApplication>
+# include <QVBoxLayout>
#include <qpa/qplatformnativeinterface.h>
#endif // Q_OS_WIN
@@ -67,6 +62,7 @@ static inline HWND getHWNDForWidget(const QWidget *widget)
Q_DECLARE_METATYPE(QAbstractItemView::ScrollMode)
Q_DECLARE_METATYPE(QMargins)
Q_DECLARE_METATYPE(QSize)
+using IntList = QVector<int>;
static QStringList generateList(const QString &prefix, int size)
{
@@ -77,6 +73,26 @@ static QStringList generateList(const QString &prefix, int size)
return result;
}
+class PublicListView : public QListView
+{
+public:
+ using QListView::QListView;
+ using QListView::contentsSize;
+ using QListView::moveCursor;
+ using QListView::selectedIndexes;
+ using QListView::setPositionForIndex;
+ using QListView::setSelection;
+ using QListView::setViewportMargins;
+ using QListView::startDrag;
+ using QListView::viewOptions;
+ QRegion getVisualRegionForSelection() const
+ {
+ return QListView::visualRegionForSelection(selectionModel()->selection());
+ }
+
+ friend class tst_QListView;
+};
+
class tst_QListView : public QObject
{
Q_OBJECT
@@ -160,57 +176,57 @@ void tst_QListView::getSetCheck()
QListView obj1;
// Movement QListView::movement()
// void QListView::setMovement(Movement)
- obj1.setMovement(QListView::Movement(QListView::Static));
- QCOMPARE(QListView::Movement(QListView::Static), obj1.movement());
- obj1.setMovement(QListView::Movement(QListView::Free));
- QCOMPARE(QListView::Movement(QListView::Free), obj1.movement());
- obj1.setMovement(QListView::Movement(QListView::Snap));
- QCOMPARE(QListView::Movement(QListView::Snap), obj1.movement());
+ obj1.setMovement(QListView::Static);
+ QCOMPARE(QListView::Static, obj1.movement());
+ obj1.setMovement(QListView::Free);
+ QCOMPARE(QListView::Free, obj1.movement());
+ obj1.setMovement(QListView::Snap);
+ QCOMPARE(QListView::Snap, obj1.movement());
// Flow QListView::flow()
// void QListView::setFlow(Flow)
- obj1.setFlow(QListView::Flow(QListView::LeftToRight));
- QCOMPARE(QListView::Flow(QListView::LeftToRight), obj1.flow());
- obj1.setFlow(QListView::Flow(QListView::TopToBottom));
- QCOMPARE(QListView::Flow(QListView::TopToBottom), obj1.flow());
+ obj1.setFlow(QListView::LeftToRight);
+ QCOMPARE(QListView::LeftToRight, obj1.flow());
+ obj1.setFlow(QListView::TopToBottom);
+ QCOMPARE(QListView::TopToBottom, obj1.flow());
// ResizeMode QListView::resizeMode()
// void QListView::setResizeMode(ResizeMode)
- obj1.setResizeMode(QListView::ResizeMode(QListView::Fixed));
- QCOMPARE(QListView::ResizeMode(QListView::Fixed), obj1.resizeMode());
- obj1.setResizeMode(QListView::ResizeMode(QListView::Adjust));
- QCOMPARE(QListView::ResizeMode(QListView::Adjust), obj1.resizeMode());
+ obj1.setResizeMode(QListView::Fixed);
+ QCOMPARE(QListView::Fixed, obj1.resizeMode());
+ obj1.setResizeMode(QListView::Adjust);
+ QCOMPARE(QListView::Adjust, obj1.resizeMode());
// LayoutMode QListView::layoutMode()
// void QListView::setLayoutMode(LayoutMode)
- obj1.setLayoutMode(QListView::LayoutMode(QListView::SinglePass));
- QCOMPARE(QListView::LayoutMode(QListView::SinglePass), obj1.layoutMode());
- obj1.setLayoutMode(QListView::LayoutMode(QListView::Batched));
- QCOMPARE(QListView::LayoutMode(QListView::Batched), obj1.layoutMode());
+ obj1.setLayoutMode(QListView::SinglePass);
+ QCOMPARE(QListView::SinglePass, obj1.layoutMode());
+ obj1.setLayoutMode(QListView::Batched);
+ QCOMPARE(QListView::Batched, obj1.layoutMode());
// int QListView::spacing()
// void QListView::setSpacing(int)
obj1.setSpacing(0);
QCOMPARE(0, obj1.spacing());
- obj1.setSpacing(INT_MIN);
- QCOMPARE(INT_MIN, obj1.spacing());
- obj1.setSpacing(INT_MAX);
- QCOMPARE(INT_MAX, obj1.spacing());
+ obj1.setSpacing(std::numeric_limits<int>::min());
+ QCOMPARE(std::numeric_limits<int>::min(), obj1.spacing());
+ obj1.setSpacing(std::numeric_limits<int>::max());
+ QCOMPARE(std::numeric_limits<int>::max(), obj1.spacing());
// ViewMode QListView::viewMode()
// void QListView::setViewMode(ViewMode)
- obj1.setViewMode(QListView::ViewMode(QListView::ListMode));
- QCOMPARE(QListView::ViewMode(QListView::ListMode), obj1.viewMode());
- obj1.setViewMode(QListView::ViewMode(QListView::IconMode));
- QCOMPARE(QListView::ViewMode(QListView::IconMode), obj1.viewMode());
+ obj1.setViewMode(QListView::ListMode);
+ QCOMPARE(QListView::ListMode, obj1.viewMode());
+ obj1.setViewMode(QListView::IconMode);
+ QCOMPARE(QListView::IconMode, obj1.viewMode());
// int QListView::modelColumn()
// void QListView::setModelColumn(int)
obj1.setModelColumn(0);
QCOMPARE(0, obj1.modelColumn());
- obj1.setModelColumn(INT_MIN);
+ obj1.setModelColumn(std::numeric_limits<int>::min());
QCOMPARE(0, obj1.modelColumn()); // Less than 0 => 0
- obj1.setModelColumn(INT_MAX);
+ obj1.setModelColumn(std::numeric_limits<int>::max());
QCOMPARE(0, obj1.modelColumn()); // No model => 0
// bool QListView::uniformItemSizes()
@@ -234,23 +250,21 @@ void tst_QListView::getSetCheck()
class QtTestModel: public QAbstractListModel
{
+ Q_OBJECT
public:
- QtTestModel(QObject *parent = 0): QAbstractListModel(parent),
- colCount(0), rCount(0), wrongIndex(false) {}
- int rowCount(const QModelIndex&) const { return rCount; }
- int columnCount(const QModelIndex&) const { return colCount; }
- bool isEditable(const QModelIndex &) const { return true; }
+ QtTestModel(int rc, int cc, QObject *parent = nullptr)
+ : QAbstractListModel(parent), rCount(rc), cCount(cc) {}
+ int rowCount(const QModelIndex &) const override { return rCount; }
+ int columnCount(const QModelIndex &) const override { return cCount; }
- QVariant data(const QModelIndex &idx, int role) const
+ QVariant data(const QModelIndex &idx, int role) const override
{
-
- if (!m_icon.isNull() && role == Qt::DecorationRole) {
+ if (!m_icon.isNull() && role == Qt::DecorationRole)
return m_icon;
- }
if (role != Qt::DisplayRole)
return QVariant();
- if (idx.row() < 0 || idx.column() < 0 || idx.column() >= colCount
+ if (idx.row() < 0 || idx.column() < 0 || idx.column() >= cCount
|| idx.row() >= rCount) {
wrongIndex = true;
qWarning("got invalid modelIndex %d/%d", idx.row(), idx.column());
@@ -277,13 +291,14 @@ public:
m_icon = icon;
}
- int colCount, rCount;
QIcon m_icon;
- mutable bool wrongIndex;
+ int rCount, cCount;
+ mutable bool wrongIndex = false;
};
class ScrollPerItemListView : public QListView
{
+ Q_OBJECT
public:
explicit ScrollPerItemListView(QWidget *parent = nullptr)
: QListView(parent)
@@ -301,12 +316,12 @@ void tst_QListView::cleanup()
void tst_QListView::noDelegate()
{
- QtTestModel model(0);
- model.rCount = model.colCount = 10;
+ QtTestModel model(10, 10);
QListView view;
view.setModel(&model);
- view.setItemDelegate(0);
+ view.setItemDelegate(nullptr);
view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
}
void tst_QListView::noModel()
@@ -314,11 +329,13 @@ void tst_QListView::noModel()
QListView view;
view.show();
view.setRowHidden(0, true);
+ // no model -> not able to hide a row
+ QVERIFY(!view.isRowHidden(0));
}
void tst_QListView::emptyModel()
{
- QtTestModel model(0);
+ QtTestModel model(0, 0);
QListView view;
view.setModel(&model);
view.show();
@@ -327,9 +344,7 @@ void tst_QListView::emptyModel()
void tst_QListView::removeRows()
{
- QtTestModel model(0);
- model.rCount = model.colCount = 10;
-
+ QtTestModel model(10, 10);
QListView view;
view.setModel(&model);
view.show();
@@ -358,8 +373,7 @@ void tst_QListView::cursorMove()
QModelIndex index = model.index(i, j);
model.setData(index, QLatin1Char('[') + QString::number(i) + postfix);
view.setCurrentIndex(index);
- QApplication::processEvents();
- QCOMPARE(view.currentIndex(), index);
+ QTRY_COMPARE(view.currentIndex(), index);
}
}
@@ -375,11 +389,12 @@ void tst_QListView::cursorMove()
view.doItemsLayout();
topLevel.show();
- QVector<Qt::Key> keymoves;
- keymoves << Qt::Key_Up << Qt::Key_Up << Qt::Key_Right << Qt::Key_Right << Qt::Key_Up
- << Qt::Key_Left << Qt::Key_Left << Qt::Key_Up << Qt::Key_Down << Qt::Key_Up
- << Qt::Key_Up << Qt::Key_Up << Qt::Key_Up << Qt::Key_Up << Qt::Key_Up
- << Qt::Key_Left << Qt::Key_Left << Qt::Key_Up << Qt::Key_Down;
+ static const Qt::Key keymoves[] {
+ Qt::Key_Up, Qt::Key_Up, Qt::Key_Right, Qt::Key_Right, Qt::Key_Up,
+ Qt::Key_Left, Qt::Key_Left, Qt::Key_Up, Qt::Key_Down, Qt::Key_Up,
+ Qt::Key_Up, Qt::Key_Up, Qt::Key_Up, Qt::Key_Up, Qt::Key_Up,
+ Qt::Key_Left, Qt::Key_Left, Qt::Key_Up, Qt::Key_Down
+ };
int lastRow = rows / displayColumns - 1;
int lastColumn = displayColumns - 1;
@@ -387,9 +402,8 @@ void tst_QListView::cursorMove()
int displayRow = lastRow;
int displayColumn = lastColumn - (rows % displayColumns);
- QApplication::instance()->processEvents();
- for (int i = 0; i < keymoves.size(); ++i) {
- Qt::Key key = keymoves.at(i);
+ QCoreApplication::processEvents();
+ for (Qt::Key key : keymoves) {
QTest::keyClick(&view, key);
switch (key) {
case Qt::Key_Up:
@@ -422,7 +436,7 @@ void tst_QListView::cursorMove()
QVERIFY(false);
}
- QApplication::instance()->processEvents();
+ QCoreApplication::processEvents();
int row = displayRow * displayColumns + displayColumn;
int column = columns - 1;
@@ -435,9 +449,7 @@ void tst_QListView::cursorMove()
void tst_QListView::hideRows()
{
- QtTestModel model(0);
- model.rCount = model.colCount = 10;
-
+ QtTestModel model(10, 10);
QListView view;
view.setModel(&model);
view.show();
@@ -471,9 +483,9 @@ void tst_QListView::hideRows()
view.setRowHidden(0, false);
QVERIFY(!view.isRowHidden(0));
- QStandardItemModel sim(0);
+ QStandardItemModel sim;
QStandardItem *root = new QStandardItem("Root row");
- for (int i=0;i<5;i++)
+ for (int i = 0;i < 5; i++)
root->appendRow(new QStandardItem(QLatin1String("Row ") + QString::number(i)));
sim.appendRow(root);
view.setModel(&sim);
@@ -488,15 +500,13 @@ void tst_QListView::hideRows()
void tst_QListView::moveCursor()
{
- QtTestModel model(0);
- model.rCount = model.colCount = 10;
-
+ QtTestModel model(10, 10);
QListView view;
view.setModel(&model);
QTest::keyClick(&view, Qt::Key_Down);
- view.setModel(0);
+ view.setModel(nullptr);
view.setModel(&model);
view.setRowHidden(0, true);
@@ -504,38 +514,20 @@ void tst_QListView::moveCursor()
QCOMPARE(view.selectionModel()->currentIndex(), model.index(1, 0));
}
-class QMoveCursorListView : public QListView
-{
-public:
- QMoveCursorListView() : QListView() {}
-
- // enum CursorAction and moveCursor() are protected in QListView.
- enum CursorAction { MoveUp, MoveDown, MoveLeft, MoveRight,
- MoveHome, MoveEnd, MovePageUp, MovePageDown,
- MoveNext, MovePrevious };
-
- QModelIndex doMoveCursor(QMoveCursorListView::CursorAction action, Qt::KeyboardModifiers modifiers)
- {
- return QListView::moveCursor((QListView::CursorAction)action, modifiers);
- }
-};
-
void tst_QListView::moveCursor2()
{
- QtTestModel model(0);
- model.colCount = 1;
- model.rCount = 100;
+ QtTestModel model(100, 1);
QPixmap pm(32, 32);
pm.fill(Qt::green);
model.setDataIcon(QIcon(pm));
- QMoveCursorListView vu;
+ PublicListView vu;
vu.setModel(&model);
vu.setIconSize(QSize(36,48));
vu.setGridSize(QSize(34,56));
//Standard framesize is 1. If Framesize > 2 increase size
int frameSize = qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
- vu.resize(300 + frameSize * 2,300);
+ vu.resize(300 + frameSize * 2, 300);
vu.setFlow(QListView::LeftToRight);
vu.setMovement(QListView::Static);
vu.setWrapping(true);
@@ -545,10 +537,10 @@ void tst_QListView::moveCursor2()
vu.selectionModel()->setCurrentIndex(model.index(0,0), QItemSelectionModel::SelectCurrent);
QCoreApplication::processEvents();
- QModelIndex idx = vu.doMoveCursor(QMoveCursorListView::MoveHome, Qt::NoModifier);
- QCOMPARE(idx, model.index(0,0));
- idx = vu.doMoveCursor(QMoveCursorListView::MoveDown, Qt::NoModifier);
- QCOMPARE(idx, model.index(8,0));
+ QModelIndex idx = vu.moveCursor(PublicListView::MoveHome, Qt::NoModifier);
+ QCOMPARE(idx, model.index(0, 0));
+ idx = vu.moveCursor(PublicListView::MoveDown, Qt::NoModifier);
+ QCOMPARE(idx, model.index(8, 0));
}
void tst_QListView::moveCursor3()
@@ -560,7 +552,7 @@ void tst_QListView::moveCursor3()
QStandardItem *i1 = new QStandardItem("First item, long name");
QStandardItem *i2 = new QStandardItem("2nd item");
QStandardItem *i3 = new QStandardItem("Third item, long name");
- i1->setSizeHint(QSize(200,32));
+ i1->setSizeHint(QSize(200, 32));
model.appendRow(i1);
model.appendRow(i2);
model.appendRow(i3);
@@ -582,46 +574,44 @@ void tst_QListView::moveCursor3()
class QListViewShowEventListener : public QListView
{
+ Q_OBJECT
public:
- QListViewShowEventListener() : QListView() { m_shown = false;}
-
- virtual void showEvent(QShowEvent * /*e*/)
+ using QListView::QListView;
+ void showEvent(QShowEvent *e) override
{
+ QListView::showEvent(e);
int columnwidth = sizeHintForColumn(0);
- QSize sz = sizeHintForIndex(model()->index(0,0));
+ QSize sz = sizeHintForIndex(model()->index(0, 0));
// This should retrieve a model index in the 2nd section
- m_index = indexAt(QPoint(columnwidth +2, sz.height()/2));
+ m_index = indexAt(QPoint(columnwidth +2, sz.height() / 2));
m_shown = true;
}
QModelIndex m_index;
- bool m_shown;
+ bool m_shown = false;
};
void tst_QListView::indexAt()
{
- QtTestModel model(0);
- model.rCount = 2;
- model.colCount = 1;
-
+ QtTestModel model(2, 1);
QListView view;
view.setModel(&model);
view.setViewMode(QListView::ListMode);
view.setFlow(QListView::TopToBottom);
- QSize sz = view.sizeHintForIndex(model.index(0,0));
+ QSize sz = view.sizeHintForIndex(model.index(0, 0));
QModelIndex index;
- index = view.indexAt(QPoint(20,0));
+ index = view.indexAt(QPoint(20, 0));
QVERIFY(index.isValid());
QCOMPARE(index.row(), 0);
- index = view.indexAt(QPoint(20,sz.height()));
+ index = view.indexAt(QPoint(20, sz.height()));
QVERIFY(index.isValid());
QCOMPARE(index.row(), 1);
- index = view.indexAt(QPoint(20,2 * sz.height()));
+ index = view.indexAt(QPoint(20, 2 * sz.height()));
QVERIFY(!index.isValid());
// Check when peeking out of the viewport bounds
@@ -637,7 +627,7 @@ void tst_QListView::indexAt()
model.rCount = 30;
QListViewShowEventListener view2;
// Set the height to a small enough value so that it wraps to a new section.
- view2.resize(300,100);
+ view2.resize(300, 100);
view2.setModel(&model);
view2.setFlow(QListView::TopToBottom);
view2.setViewMode(QListView::ListMode);
@@ -653,15 +643,11 @@ void tst_QListView::indexAt()
void tst_QListView::clicked()
{
- QtTestModel model;
- model.rCount = 10;
- model.colCount = 2;
-
+ QtTestModel model(10, 2);
QListView view;
view.setModel(&model);
-
view.show();
- QApplication::processEvents();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
QModelIndex firstIndex = model.index(0, 0, QModelIndex());
QVERIFY(firstIndex.isValid());
@@ -673,7 +659,7 @@ void tst_QListView::clicked()
QModelIndex index = view.indexAt(p);
if (!index.isValid())
continue;
- QSignalSpy spy(&view, SIGNAL(clicked(QModelIndex)));
+ QSignalSpy spy(&view, &QListView::clicked);
QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::NoModifier, p);
QCOMPARE(spy.count(), 1);
}
@@ -681,10 +667,7 @@ void tst_QListView::clicked()
void tst_QListView::singleSelectionRemoveRow()
{
- QStringList items;
- items << "item1" << "item2" << "item3" << "item4";
- QStringListModel model(items);
-
+ QStringListModel model({"item1", "item2", "item3", "item4"});
QListView view;
view.setModel(&model);
view.show();
@@ -764,7 +747,7 @@ void tst_QListView::modelColumn()
// Out of bound cases should not modify the modelColumn
view.setModelColumn(-1);
QCOMPARE(view.modelColumn(), 2);
- view.setModelColumn(INT_MAX);
+ view.setModelColumn(std::numeric_limits<int>::max());
QCOMPARE(view.modelColumn(), 2);
@@ -788,15 +771,12 @@ void tst_QListView::modelColumn()
void tst_QListView::hideFirstRow()
{
- QStringList items;
- for (int i=0; i <100; ++i)
- items << "item";
- QStringListModel model(items);
+ QStringListModel model(generateList(QLatin1String("item"), 100));
QListView view;
view.setModel(&model);
view.setUniformItemSizes(true);
- view.setRowHidden(0,true);
+ view.setRowHidden(0, true);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
}
@@ -828,7 +808,7 @@ void tst_QListView::batchedMode()
view.setViewMode(QListView::ListMode);
view.setLayoutMode(QListView::Batched);
view.setBatchSize(2);
- view.resize(200,400);
+ view.resize(200, 400);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -849,21 +829,18 @@ void tst_QListView::setCurrentIndex()
ScrollPerItemListView view;
view.setModel(&model);
-
view.resize(220,182);
view.show();
for (int pass = 0; pass < 2; ++pass) {
view.setFlow(pass == 0 ? QListView::TopToBottom : QListView::LeftToRight);
QScrollBar *sb = pass == 0 ? view.verticalScrollBar() : view.horizontalScrollBar();
- QList<QSize> gridsizes;
- gridsizes << QSize() << QSize(200,38);
- for (int ig = 0; ig < gridsizes.count(); ++ig) {
- if (pass == 1 && !gridsizes.at(ig).isValid()) // the width of an item varies, so it might jump two times
+ for (const QSize &gridSize : {QSize(), QSize(200, 38)}) {
+ if (pass == 1 && !gridSize.isValid()) // the width of an item varies, so it might jump two times
continue;
- view.setGridSize(gridsizes.at(ig));
+ view.setGridSize(gridSize);
- qApp->processEvents();
+ QCoreApplication::processEvents();
int offset = sb->value();
// first "scroll" down, verify that we scroll one step at a time
@@ -897,44 +874,21 @@ void tst_QListView::setCurrentIndex()
}
}
-class PublicListView : public QListView
-{
- public:
- PublicListView(QWidget *parent = 0) : QListView(parent)
- {
-
- }
- void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags flags) {
- QListView::setSelection(rect, flags);
- }
- QSize contentsSize() const { return QListView::contentsSize(); }
-
- void setPositionForIndex(const QPoint &pos, const QModelIndex &index) {
- QListView::setPositionForIndex(pos, index);
- }
-
- QStyleOptionViewItem viewOptions() const {
- return QListView::viewOptions();
- }
-};
-
-class TestDelegate : public QItemDelegate
+class TestDelegate : public QStyledItemDelegate
{
public:
- explicit TestDelegate(QObject *parent, const QSize &sizeHint = QSize(50,50))
- : QItemDelegate(parent), m_sizeHint(sizeHint) {}
- QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const { return m_sizeHint; }
+ explicit TestDelegate(QObject *parent, const QSize &sizeHint = QSize(50, 50))
+ : QStyledItemDelegate(parent), m_sizeHint(sizeHint) {}
+ QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const override { return m_sizeHint; }
const QSize m_sizeHint;
};
-typedef QList<int> IntList;
-
void tst_QListView::selection_data()
{
QTest::addColumn<int>("itemCount");
- QTest::addColumn<int>("viewMode");
- QTest::addColumn<int>("flow");
+ QTest::addColumn<QListView::ViewMode>("viewMode");
+ QTest::addColumn<QListView::Flow>("flow");
QTest::addColumn<bool>("wrapping");
QTest::addColumn<int>("spacing");
QTest::addColumn<QSize>("gridSize");
@@ -944,8 +898,8 @@ void tst_QListView::selection_data()
QTest::newRow("select all")
<< 4 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
+ << QListView::ListMode
+ << QListView::TopToBottom
<< false // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -955,8 +909,8 @@ void tst_QListView::selection_data()
QTest::newRow("select below, (on viewport)")
<< 4 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
+ << QListView::ListMode
+ << QListView::TopToBottom
<< false // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -966,8 +920,8 @@ void tst_QListView::selection_data()
QTest::newRow("select below 2, (on viewport)")
<< 4 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
+ << QListView::ListMode
+ << QListView::TopToBottom
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -977,8 +931,8 @@ void tst_QListView::selection_data()
QTest::newRow("select to the right, (on viewport)")
<< 40 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
+ << QListView::ListMode
+ << QListView::TopToBottom
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -988,8 +942,8 @@ void tst_QListView::selection_data()
QTest::newRow("select to the right 2, (on viewport)")
<< 40 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
+ << QListView::ListMode
+ << QListView::TopToBottom
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -999,8 +953,8 @@ void tst_QListView::selection_data()
QTest::newRow("select inside contents, (on viewport)")
<< 35 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
+ << QListView::ListMode
+ << QListView::TopToBottom
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -1010,8 +964,8 @@ void tst_QListView::selection_data()
QTest::newRow("select a tall rect in LeftToRight flow, wrap items")
<< 70 // itemCount
- << int(QListView::ListMode)
- << int(QListView::LeftToRight)
+ << QListView::ListMode
+ << QListView::LeftToRight
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -1024,8 +978,8 @@ void tst_QListView::selection_data()
QTest::newRow("select a wide rect in LeftToRight, wrap items")
<< 70 // itemCount
- << int(QListView::ListMode)
- << int(QListView::LeftToRight)
+ << QListView::ListMode
+ << QListView::LeftToRight
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -1036,8 +990,8 @@ void tst_QListView::selection_data()
QTest::newRow("select a wide negative rect in LeftToRight flow, wrap items")
<< 70 // itemCount
- << int(QListView::ListMode)
- << int(QListView::LeftToRight)
+ << QListView::ListMode
+ << QListView::LeftToRight
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -1048,8 +1002,8 @@ void tst_QListView::selection_data()
QTest::newRow("select a tall rect in TopToBottom flow, wrap items")
<< 70 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
+ << QListView::ListMode
+ << QListView::TopToBottom
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -1062,8 +1016,8 @@ void tst_QListView::selection_data()
QTest::newRow("select a tall negative rect in TopToBottom flow, wrap items")
<< 70 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
+ << QListView::ListMode
+ << QListView::TopToBottom
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -1076,8 +1030,8 @@ void tst_QListView::selection_data()
QTest::newRow("select a wide rect in TopToBottom, wrap items")
<< 70 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
+ << QListView::ListMode
+ << QListView::TopToBottom
<< true // wrapping
<< 0 // spacing
<< QSize() // gridSize
@@ -1099,20 +1053,18 @@ void tst_QListView::selection_data()
void tst_QListView::selection()
{
QFETCH(int, itemCount);
- QFETCH(int, viewMode);
- QFETCH(int, flow);
+ QFETCH(QListView::ViewMode, viewMode);
+ QFETCH(QListView::Flow, flow);
QFETCH(bool, wrapping);
QFETCH(int, spacing);
QFETCH(QSize, gridSize);
- QFETCH(IntList, hiddenRows);
+ QFETCH(const IntList, hiddenRows);
QFETCH(QRect, selectionRect);
- QFETCH(IntList, expectedItems);
+ QFETCH(const IntList, expectedItems);
QWidget topLevel;
PublicListView v(&topLevel);
- QtTestModel model;
- model.colCount = 1;
- model.rCount = itemCount;
+ QtTestModel model(itemCount, 1);
// avoid scrollbar size mismatches among different styles
v.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
@@ -1120,30 +1072,27 @@ void tst_QListView::selection()
v.setItemDelegate(new TestDelegate(&v));
v.setModel(&model);
- v.setViewMode(QListView::ViewMode(viewMode));
- v.setFlow(QListView::Flow(flow));
+ v.setViewMode(viewMode);
+ v.setFlow(flow);
v.setWrapping(wrapping);
v.setResizeMode(QListView::Adjust);
v.setSpacing(spacing);
if (gridSize.isValid())
v.setGridSize(gridSize);
- for (int j = 0; j < hiddenRows.count(); ++j) {
- v.setRowHidden(hiddenRows.at(j), true);
- }
+ for (int row : hiddenRows)
+ v.setRowHidden(row, true);
- v.resize(525,525);
+ v.resize(525, 525);
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
v.setSelection(selectionRect, QItemSelectionModel::ClearAndSelect);
- QModelIndexList selected = v.selectionModel()->selectedIndexes();
-
+ const QModelIndexList selected = v.selectionModel()->selectedIndexes();
QCOMPARE(selected.count(), expectedItems.count());
- for (int i = 0; i < selected.count(); ++i) {
- QVERIFY(expectedItems.contains(selected.at(i).row()));
- }
+ for (const auto &idx : selected)
+ QVERIFY(expectedItems.contains(idx.row()));
}
void tst_QListView::scrollTo()
@@ -1191,7 +1140,7 @@ void tst_QListView::scrollTo()
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
//by default, the list view scrolls per item and has no wrapping
- QModelIndex index = model.index(6,0);
+ QModelIndex index = model.index(6, 0);
//we save the size of the item for later comparisons
const QSize itemsize = lv.visualRect(index).size();
@@ -1202,15 +1151,14 @@ void tst_QListView::scrollTo()
QPoint p = lv.visualRect(index).center();
QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p);
//let's wait because the scrolling is delayed
- QTest::qWait(QApplication::doubleClickInterval() + 150);
- QTRY_COMPARE(lv.visualRect(index).y(),0);
+ QTRY_COMPARE(lv.visualRect(index).y(), 0);
//we scroll down. As the item is to tall for the view, it will disappear
QTest::keyClick(lv.viewport(), Qt::Key_Down, Qt::NoModifier);
- QCOMPARE(lv.visualRect(index).y(), -itemsize.height());
+ QTRY_COMPARE(lv.visualRect(index).y(), -itemsize.height());
QTest::keyClick(lv.viewport(), Qt::Key_Up, Qt::NoModifier);
- QCOMPARE(lv.visualRect(index).y(), 0);
+ QTRY_COMPARE(lv.visualRect(index).y(), 0);
//Let's enable wrapping
@@ -1220,22 +1168,20 @@ void tst_QListView::scrollTo()
//we click the item
p = lv.visualRect(index).center();
QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p);
- //let's wait because the scrolling is delayed
- QTest::qWait(QApplication::doubleClickInterval() + 150);
- QTRY_COMPARE(lv.visualRect(index).x(),0);
+ QTRY_COMPARE(lv.visualRect(index).x(), 0);
//we scroll right. As the item is too wide for the view, it will disappear
QTest::keyClick(lv.viewport(), Qt::Key_Right, Qt::NoModifier);
- QCOMPARE(lv.visualRect(index).x(), -itemsize.width());
+ QTRY_COMPARE(lv.visualRect(index).x(), -itemsize.width());
QTest::keyClick(lv.viewport(), Qt::Key_Left, Qt::NoModifier);
- QCOMPARE(lv.visualRect(index).x(), 0);
+ QTRY_COMPARE(lv.visualRect(index).x(), 0);
lv.setWrapping(false);
- qApp->processEvents(); //let the layout happen
+ QCoreApplication::processEvents(); //let the layout happen
//Let's try with scrolling per pixel
- lv.setHorizontalScrollMode( QListView::ScrollPerPixel);
+ lv.setHorizontalScrollMode(QListView::ScrollPerPixel);
lv.verticalScrollBar()->setValue(0); //scrolls back to the first item
//we click the item
@@ -1243,11 +1189,11 @@ void tst_QListView::scrollTo()
QTest::mouseClick(lv.viewport(), Qt::LeftButton, Qt::NoModifier, p);
//let's wait because the scrolling is delayed
QTest::qWait(QApplication::doubleClickInterval() + 150);
- QTRY_COMPARE(lv.visualRect(index).y(),0);
+ QTRY_COMPARE(lv.visualRect(index).y(), 0);
//we scroll down. As the item is too tall for the view, it will partially disappear
QTest::keyClick(lv.viewport(), Qt::Key_Down, Qt::NoModifier);
- QVERIFY(lv.visualRect(index).y()<0);
+ QVERIFY(lv.visualRect(index).y() < 0);
QTest::keyClick(lv.viewport(), Qt::Key_Up, Qt::NoModifier);
QCOMPARE(lv.visualRect(index).y(), 0);
@@ -1262,11 +1208,7 @@ void tst_QListView::scrollBarRanges()
QWidget topLevel;
ScrollPerItemListView lv(&topLevel);
QStringListModel model(&lv);
- QStringList list;
- for (int i = 0; i < rowCount; ++i)
- list << QLatin1String("Item ") + QString::number(i);
-
- model.setStringList(list);
+ model.setStringList(generateList(QLatin1String("Item "), rowCount));
lv.setModel(&model);
lv.resize(250, 130);
@@ -1275,10 +1217,9 @@ void tst_QListView::scrollBarRanges()
for (int h = 30; h <= 210; ++h) {
lv.resize(250, h);
- QApplication::processEvents(); // wait for the layout to be done
int visibleRowCount = lv.viewport()->size().height() / rowHeight;
int invisibleRowCount = rowCount - visibleRowCount;
- QCOMPARE(lv.verticalScrollBar()->maximum(), invisibleRowCount);
+ QTRY_COMPARE(lv.verticalScrollBar()->maximum(), invisibleRowCount);
}
}
@@ -1289,7 +1230,7 @@ void tst_QListView::scrollBarAsNeeded_data()
QTest::addColumn<QAbstractItemView::ScrollMode>("verticalScrollMode");
QTest::addColumn<QMargins>("viewportMargins");
QTest::addColumn<QSize>("delegateSize");
- QTest::addColumn<int>("flow");
+ QTest::addColumn<QListView::Flow>("flow");
QTest::addColumn<bool>("horizontalScrollBarVisible");
QTest::addColumn<bool>("verticalScrollBarVisible");
@@ -1298,7 +1239,7 @@ void tst_QListView::scrollBarAsNeeded_data()
<< 0
<< QListView::ScrollPerItem
<< QMargins() << QSize()
- << int(QListView::TopToBottom)
+ << QListView::TopToBottom
<< false
<< false;
@@ -1307,7 +1248,7 @@ void tst_QListView::scrollBarAsNeeded_data()
<< 1
<< QListView::ScrollPerItem
<< QMargins() << QSize()
- << int(QListView::TopToBottom)
+ << QListView::TopToBottom
<< false
<< false;
@@ -1316,7 +1257,7 @@ void tst_QListView::scrollBarAsNeeded_data()
<< 20
<< QListView::ScrollPerItem
<< QMargins() << QSize()
- << int(QListView::TopToBottom)
+ << QListView::TopToBottom
<< false
<< true;
@@ -1325,7 +1266,7 @@ void tst_QListView::scrollBarAsNeeded_data()
<< 4
<< QListView::ScrollPerPixel
<< QMargins() << QSize(40, 40)
- << int(QListView::TopToBottom)
+ << QListView::TopToBottom
<< false
<< false;
@@ -1335,7 +1276,7 @@ void tst_QListView::scrollBarAsNeeded_data()
<< 4
<< QListView::ScrollPerPixel
<< QMargins(0, 50, 0, 50) << QSize(40, 40)
- << int(QListView::TopToBottom)
+ << QListView::TopToBottom
<< false
<< true;
@@ -1345,7 +1286,7 @@ void tst_QListView::scrollBarAsNeeded_data()
<< 4
<< QListView::ScrollPerPixel
<< QMargins(50, 0, 50, 0) << QSize(120, 40)
- << int(QListView::TopToBottom)
+ << QListView::TopToBottom
<< true
<< false;
@@ -1354,7 +1295,7 @@ void tst_QListView::scrollBarAsNeeded_data()
<< 0
<< QListView::ScrollPerItem
<< QMargins() << QSize()
- << int(QListView::LeftToRight)
+ << QListView::LeftToRight
<< false
<< false;
@@ -1363,7 +1304,7 @@ void tst_QListView::scrollBarAsNeeded_data()
<< 1
<< QListView::ScrollPerItem
<< QMargins() << QSize()
- << int(QListView::LeftToRight)
+ << QListView::LeftToRight
<< false
<< false;
@@ -1372,45 +1313,36 @@ void tst_QListView::scrollBarAsNeeded_data()
<< 20
<< QListView::ScrollPerItem
<< QMargins() << QSize()
- << int(QListView::LeftToRight)
+ << QListView::LeftToRight
<< true
<< false;
}
-class ScrollBarTestListView : public QListView
-{
- public:
- explicit ScrollBarTestListView(QWidget *p) : QListView(p) {}
-
- using QAbstractScrollArea::setViewportMargins;
-};
-
void tst_QListView::scrollBarAsNeeded()
{
-
QFETCH(QSize, size);
QFETCH(int, itemCount);
QFETCH(QAbstractItemView::ScrollMode, verticalScrollMode);
QFETCH(QMargins, viewportMargins);
QFETCH(QSize, delegateSize);
- QFETCH(int, flow);
+ QFETCH(QListView::Flow, flow);
QFETCH(bool, horizontalScrollBarVisible);
QFETCH(bool, verticalScrollBarVisible);
- const int rowCounts[3] = {0, 1, 20};
+ constexpr int rowCounts[3] = {0, 1, 20};
QWidget topLevel;
topLevel.setWindowTitle(QLatin1String(QTest::currentTestFunction()) + QStringLiteral("::")
+ QLatin1String(QTest::currentDataTag()));
- ScrollBarTestListView lv(&topLevel);
+ PublicListView lv(&topLevel);
lv.setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
lv.setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
lv.setVerticalScrollMode(verticalScrollMode);
lv.setViewportMargins(viewportMargins);
- lv.setFlow((QListView::Flow)flow);
+ lv.setFlow(flow);
if (!delegateSize.isEmpty())
lv.setItemDelegate(new TestDelegate(&lv, delegateSize));
@@ -1420,13 +1352,8 @@ void tst_QListView::scrollBarAsNeeded()
topLevel.show();
QVERIFY(QTest::qWaitForWindowActive(&topLevel));
- for (uint r = 0; r < sizeof(rowCounts)/sizeof(int); ++r) {
- QStringList list;
- for (int i = 0; i < rowCounts[r]; ++i)
- list << QLatin1String("Item ") + QString::number(i);
-
- model.setStringList(list);
-
+ for (uint r = 0; r < sizeof(rowCounts) / sizeof(int); ++r) {
+ model.setStringList(generateList(QLatin1String("Item "), rowCounts[r]));
model.setStringList(generateList(QLatin1String("Item "), itemCount));
QTRY_COMPARE(lv.horizontalScrollBar()->isVisible(), horizontalScrollBarVisible);
@@ -1483,7 +1410,6 @@ void tst_QListView::wordWrap()
lv.setWordWrap(true);
lv.setFixedSize(400, 150);
lv.showNormal();
- QApplication::processEvents();
QTRY_COMPARE(lv.horizontalScrollBar()->isVisible(), false);
#ifdef Q_OS_WINRT
@@ -1509,7 +1435,8 @@ public:
listView->setModel(model);
timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), this, SLOT(buttonClicked()));
+ connect(timer, &QTimer::timeout,
+ this, &SetCurrentIndexAfterAppendRowCrashDialog::buttonClicked);
timer->start(1000);
}
@@ -1519,7 +1446,7 @@ protected:
QDialog::showEvent(event);
DWORD lParam = 0xFFFFFFFC/*OBJID_CLIENT*/;
DWORD wParam = 0;
- if (const HWND hwnd =getHWNDForWidget(this))
+ if (const HWND hwnd = getHWNDForWidget(this))
SendMessage(hwnd, WM_GETOBJECT, wParam, lParam);
}
@@ -1567,7 +1494,7 @@ void tst_QListView::task203585_selectAll()
//we make sure that "select all" doesn't select the hidden items
QListView view;
view.setSelectionMode(QAbstractItemView::ExtendedSelection);
- view.setModel(new QStringListModel(QStringList() << "foo", &view));
+ view.setModel(new QStringListModel({"foo"}, &view));
view.setRowHidden(0, true);
view.selectAll();
QVERIFY(view.selectionModel()->selectedIndexes().isEmpty());
@@ -1581,12 +1508,11 @@ void tst_QListView::task228566_infiniteRelayout()
QListView view;
QStringList list;
- for (int i = 0; i < 10; ++i) {
+ for (int i = 0; i < 10; ++i)
list << "small";
- }
- list << "BIGBIGBIGBIGBIGBIGBIGBIGBIGBIGBIGBIG";
- list << "BIGBIGBIGBIGBIGBIGBIGBIGBIGBIGBIGBIG";
+ list << "BIGBIGBIGBIGBIGBIGBIGBIGBIGBIGBIGBIG"
+ << "BIGBIGBIGBIGBIGBIGBIGBIGBIGBIGBIGBIG";
QStringListModel model(list);
view.setModel(&model);
@@ -1600,7 +1526,7 @@ void tst_QListView::task228566_infiniteRelayout()
QVERIFY(QTest::qWaitForWindowActive(&view));
QTest::qWait(100); //make sure the layout is done once
- QSignalSpy spy(view.horizontalScrollBar(), SIGNAL(rangeChanged(int,int)));
+ QSignalSpy spy(view.horizontalScrollBar(), &QScrollBar::rangeChanged);
//the layout should already have been done
//so there should be no change made to the scrollbar
@@ -1611,7 +1537,7 @@ void tst_QListView::task248430_crashWith0SizedItem()
{
QListView view;
view.setViewMode(QListView::IconMode);
- QStringListModel model(QStringList() << QLatin1String("item1") << QString());
+ QStringListModel model({QLatin1String("item1"), QString()});
view.setModel(&model);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
@@ -1630,11 +1556,10 @@ void tst_QListView::task250446_scrollChanged()
QVERIFY(QTest::qWaitForWindowExposed(&view));
const int scrollValue = view.verticalScrollBar()->maximum();
view.verticalScrollBar()->setValue(scrollValue);
- QCOMPARE(view.verticalScrollBar()->value(), scrollValue);
- QCOMPARE(view.currentIndex(), index);
+ QTRY_COMPARE(view.verticalScrollBar()->value(), scrollValue);
+ QTRY_COMPARE(view.currentIndex(), index);
view.showMinimized();
- QTest::qWait(50);
QTRY_COMPARE(view.verticalScrollBar()->value(), scrollValue);
QTRY_COMPARE(view.currentIndex(), index);
@@ -1646,18 +1571,12 @@ void tst_QListView::task250446_scrollChanged()
void tst_QListView::task196118_visualRegionForSelection()
{
- class MyListView : public QListView
- {
- public:
- QRegion getVisualRegionForSelection() const
- { return QListView::visualRegionForSelection( selectionModel()->selection()); }
- } view;
-
+ PublicListView view;
QStandardItemModel model;
QStandardItem top1("top1");
QStandardItem sub1("sub1");
- top1.appendRow(QList<QStandardItem*>() << &sub1);
- model.appendColumn(QList<QStandardItem*>() << &top1);
+ top1.appendRow(&sub1);
+ model.appendColumn({&top1});
view.setModel(&model);
view.setRootIndex(top1.index());
@@ -1670,16 +1589,9 @@ void tst_QListView::task196118_visualRegionForSelection()
void tst_QListView::task254449_draggingItemToNegativeCoordinates()
{
//we'll check that the items are painted correctly
- class MyListView : public QListView
- {
- public:
- void setPositionForIndex(const QPoint &position, const QModelIndex &index)
- { QListView::setPositionForIndex(position, index); }
-
- } list;
-
- QStandardItemModel model(1,1);
- QModelIndex index = model.index(0,0);
+ PublicListView list;
+ QStandardItemModel model(1, 1);
+ QModelIndex index = model.index(0, 0);
model.setData(index, QLatin1String("foo"));
list.setModel(&model);
list.setViewMode(QListView::IconMode);
@@ -1691,27 +1603,23 @@ void tst_QListView::task254449_draggingItemToNegativeCoordinates()
class MyItemDelegate : public QStyledItemDelegate
{
public:
- MyItemDelegate() : numPaints(0) { }
- void paint(QPainter *painter,
- const QStyleOptionViewItem &option, const QModelIndex &index) const
+ using QStyledItemDelegate::QStyledItemDelegate;
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const override
{
numPaints++;
QStyledItemDelegate::paint(painter, option, index);
}
- mutable int numPaints;
+ mutable int numPaints = 0;
} delegate;
- delegate.numPaints = 0;
list.setItemDelegate(&delegate);
- QApplication::processEvents();
QTRY_VERIFY(delegate.numPaints > 0); //makes sure the layout is done
- const QPoint topLeft(-6, 0);
- list.setPositionForIndex(topLeft, index);
-
//we'll make sure the item is repainted
delegate.numPaints = 0;
- QApplication::processEvents();
+ const QPoint topLeft(-6, 0);
+ list.setPositionForIndex(topLeft, index);
QTRY_COMPARE(delegate.numPaints, 1);
QCOMPARE(list.visualRect(index).topLeft(), topLeft);
}
@@ -1719,24 +1627,23 @@ void tst_QListView::task254449_draggingItemToNegativeCoordinates()
void tst_QListView::keyboardSearch()
{
- QStringList items;
- items << "AB" << "AC" << "BA" << "BB" << "BD" << "KAFEINE" << "KONQUEROR" << "KOPETE" << "KOOKA" << "OKULAR";
- QStringListModel model(items);
+ QStringListModel model({"AB", "AC", "BA", "BB", "BD", "KAFEINE",
+ "KONQUEROR", "KOPETE", "KOOKA", "OKULAR"});
QListView view;
view.setModel(&model);
view.show();
- qApp->setActiveWindow(&view);
+ QApplication::setActiveWindow(&view);
QVERIFY(QTest::qWaitForWindowActive(&view));
QTest::keyClick(&view, Qt::Key_K);
- QTRY_COMPARE(view.currentIndex() , model.index(5,0)); //KAFEINE
+ QTRY_COMPARE(view.currentIndex() , model.index(5, 0)); //KAFEINE
QTest::keyClick(&view, Qt::Key_O);
- QTRY_COMPARE(view.currentIndex() , model.index(6,0)); //KONQUEROR
+ QTRY_COMPARE(view.currentIndex() , model.index(6, 0)); //KONQUEROR
QTest::keyClick(&view, Qt::Key_N);
- QTRY_COMPARE(view.currentIndex() , model.index(6,0)); //KONQUEROR
+ QTRY_COMPARE(view.currentIndex() , model.index(6, 0)); //KONQUEROR
}
void tst_QListView::shiftSelectionWithNonUniformItemSizes()
@@ -1744,9 +1651,7 @@ void tst_QListView::shiftSelectionWithNonUniformItemSizes()
// This checks that no items are selected unexpectedly by Shift-Arrow
// when items with non-uniform sizes are laid out in a grid
{ // First test: QListView::LeftToRight flow
- QStringList items;
- items << "Long\nText" << "Text" << "Text" << "Text";
- QStringListModel model(items);
+ QStringListModel model({"Long\nText", "Text", "Text","Text"});
QListView view;
view.setFixedSize(250, 250);
@@ -1773,9 +1678,7 @@ void tst_QListView::shiftSelectionWithNonUniformItemSizes()
QVERIFY(!selected.contains(model.index(0, 0)));
}
{ // Second test: QListView::TopToBottom flow
- QStringList items;
- items << "ab" << "a" << "a" << "a";
- QStringListModel model(items);
+ QStringListModel model({"ab", "a", "a", "a"});
QListView view;
view.setFixedSize(250, 250);
@@ -1836,7 +1739,7 @@ void tst_QListView::shiftSelectionWithItemAlignment()
QModelIndex index1 = view.model()->index(items.size() / 4, 0);
QPoint p = view.visualRect(index1).center();
QVERIFY(view.viewport()->rect().contains(p));
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, p);
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, p);
QCOMPARE(view.currentIndex(), index1);
QCOMPARE(view.selectionModel()->selectedIndexes().size(), 1);
@@ -1850,9 +1753,7 @@ void tst_QListView::shiftSelectionWithItemAlignment()
void tst_QListView::clickOnViewportClearsSelection()
{
- QStringList items;
- items << "Text1";
- QStringListModel model(items);
+ QStringListModel model({"Text1"});
QListView view;
view.setModel(&model);
view.setSelectionMode(QListView::ExtendedSelection);
@@ -1865,12 +1766,12 @@ void tst_QListView::clickOnViewportClearsSelection()
//we try to click outside of the index
const QPoint point = view.visualRect(index).bottomRight() + QPoint(10,10);
- QTest::mousePress(view.viewport(), Qt::LeftButton, 0, point);
+ QTest::mousePress(view.viewport(), Qt::LeftButton, {}, point);
//at this point, the selection shouldn't have changed
QCOMPARE(view.selectionModel()->selectedIndexes().count(), 1);
QVERIFY(view.selectionModel()->isSelected(index));
- QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, point);
+ QTest::mouseRelease(view.viewport(), Qt::LeftButton, {}, point);
//now the selection should be cleared
QVERIFY(!view.selectionModel()->hasSelection());
}
@@ -1879,9 +1780,9 @@ void tst_QListView::task262152_setModelColumnNavigate()
{
QListView view;
QStandardItemModel model(3,2);
- model.setItem(0,1,new QStandardItem("[0,1]"));
- model.setItem(1,1,new QStandardItem("[1,1]"));
- model.setItem(2,1,new QStandardItem("[2,1]"));
+ model.setItem(0, 1, new QStandardItem("[0,1]"));
+ model.setItem(1, 1, new QStandardItem("[1,1]"));
+ model.setItem(2, 1, new QStandardItem("[2,1]"));
view.setModel(&model);
view.setModelColumn(1);
@@ -1889,48 +1790,44 @@ void tst_QListView::task262152_setModelColumnNavigate()
view.show();
QApplication::setActiveWindow(&view);
QVERIFY(QTest::qWaitForWindowActive(&view));
- QCOMPARE(static_cast<QWidget *>(&view), QApplication::activeWindow());
+ QCOMPARE(&view, QApplication::activeWindow());
QTest::keyClick(&view, Qt::Key_Down);
- QTRY_COMPARE(view.currentIndex(), model.index(1,1));
+ QTRY_COMPARE(view.currentIndex(), model.index(1, 1));
QTest::keyClick(&view, Qt::Key_Down);
- QTRY_COMPARE(view.currentIndex(), model.index(2,1));
+ QTRY_COMPARE(view.currentIndex(), model.index(2, 1));
}
void tst_QListView::taskQTBUG_2233_scrollHiddenItems_data()
{
- QTest::addColumn<int>("flow");
+ QTest::addColumn<QListView::Flow>("flow");
- QTest::newRow("TopToBottom") << static_cast<int>(QListView::TopToBottom);
- QTest::newRow("LeftToRight") << static_cast<int>(QListView::LeftToRight);
+ QTest::newRow("TopToBottom") << QListView::TopToBottom;
+ QTest::newRow("LeftToRight") << QListView::LeftToRight;
}
void tst_QListView::taskQTBUG_2233_scrollHiddenItems()
{
- QFETCH(int, flow);
+ QFETCH(QListView::Flow, flow);
const int rowCount = 200;
QWidget topLevel;
setFrameless(&topLevel);
ScrollPerItemListView view(&topLevel);
QStringListModel model(&view);
- QStringList list;
- for (int i = 0; i < rowCount; ++i)
- list << QString::number(i);
-
- model.setStringList(list);
+ model.setStringList(generateList(QString(), rowCount));
view.setModel(&model);
view.setUniformItemSizes(true);
view.setViewMode(QListView::ListMode);
for (int i = 0; i < rowCount / 2; ++i)
view.setRowHidden(2 * i, true);
- view.setFlow(static_cast<QListView::Flow>(flow));
+ view.setFlow(flow);
view.resize(130, 130);
for (int i = 0; i < 10; ++i) {
(view.flow() == QListView::TopToBottom
? view.verticalScrollBar()
: view.horizontalScrollBar())->setValue(i);
- QModelIndex index = view.indexAt(QPoint(0,0));
+ QModelIndex index = view.indexAt(QPoint(0, 0));
QVERIFY(index.isValid());
QCOMPARE(index.row(), 2 * i + 1);
}
@@ -1944,10 +1841,9 @@ void tst_QListView::taskQTBUG_2233_scrollHiddenItems()
int nbVisibleItem = rowCount / 2 - bar->maximum();
bar->setValue(bar->maximum());
- for (int i = rowCount; i > rowCount / 2; i--) {
+ for (int i = rowCount; i > rowCount / 2; i--)
view.setRowHidden(i, true);
- }
- QTRY_COMPARE(bar->maximum(), rowCount/4 - nbVisibleItem);
+ QTRY_COMPARE(bar->maximum(), rowCount / 4 - nbVisibleItem);
QCOMPARE(bar->value(), bar->maximum());
}
@@ -1956,9 +1852,8 @@ void tst_QListView::taskQTBUG_633_changeModelData()
QListView view;
view.setFlow(QListView::LeftToRight);
QStandardItemModel model(5,1);
- for (int i = 0; i < model.rowCount(); ++i) {
- model.setData( model.index(i, 0), QString::number(i));
- }
+ for (int i = 0; i < model.rowCount(); ++i)
+ model.setData(model.index(i, 0), QString::number(i));
view.setModel(&model);
view.show();
@@ -1975,7 +1870,7 @@ void tst_QListView::taskQTBUG_633_changeModelData()
void tst_QListView::taskQTBUG_435_deselectOnViewportClick()
{
QListView view;
- QStringListModel model( QStringList() << "1" << "2" << "3" << "4");
+ QStringListModel model({"1", "2", "3", "4"});
view.setModel(&model);
view.setSelectionMode(QAbstractItemView::ExtendedSelection);
view.selectAll();
@@ -1985,21 +1880,21 @@ void tst_QListView::taskQTBUG_435_deselectOnViewportClick()
const QRect itemRect = view.visualRect(model.index(model.rowCount() - 1));
QPoint p = view.visualRect(model.index(model.rowCount() - 1)).center() + QPoint(0, itemRect.height());
//first the left button
- QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, p);
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, p);
QVERIFY(!view.selectionModel()->hasSelection());
view.selectAll();
QCOMPARE(view.selectionModel()->selectedIndexes().count(), model.rowCount());
//and now the right button
- QTest::mouseClick(view.viewport(), Qt::RightButton, 0, p);
+ QTest::mouseClick(view.viewport(), Qt::RightButton, {}, p);
QVERIFY(!view.selectionModel()->hasSelection());
}
void tst_QListView::taskQTBUG_2678_spacingAndWrappedText()
{
static const QString lorem("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.");
- QStringListModel model(QStringList() << lorem << lorem << "foo" << lorem << "bar" << lorem << lorem);
+ QStringListModel model({lorem, lorem, "foo", lorem, "bar", lorem, lorem});
QListView w;
w.setModel(&model);
w.setViewMode(QListView::ListMode);
@@ -2012,14 +1907,11 @@ void tst_QListView::taskQTBUG_2678_spacingAndWrappedText()
void tst_QListView::taskQTBUG_5877_skippingItemInPageDownUp()
{
- QList<int> currentItemIndexes;
- QtTestModel model(0);
- model.colCount = 1;
- model.rCount = 100;
+ QtTestModel model(100, 1);
- currentItemIndexes << 0 << 6 << 16 << 25 << 34 << 42 << 57 << 68 << 77
- << 83 << 91 << 94;
- QMoveCursorListView vu;
+ static const int currentItemIndexes[] =
+ {0, 6, 16, 25, 34, 42, 57, 68, 77, 83, 91, 94};
+ PublicListView vu;
vu.setModel(&model);
vu.show();
@@ -2029,43 +1921,34 @@ void tst_QListView::taskQTBUG_5877_skippingItemInPageDownUp()
int visibleRowCount = vu.viewport()->height() / itemHeight;
int scrolledRowCount = visibleRowCount - 1;
- for (int i = 0; i < currentItemIndexes.size(); ++i) {
- vu.selectionModel()->setCurrentIndex(model.index(currentItemIndexes[i], 0),
+ for (int currentItemIndex : currentItemIndexes) {
+ vu.selectionModel()->setCurrentIndex(model.index(currentItemIndex, 0),
QItemSelectionModel::SelectCurrent);
- QModelIndex idx = vu.doMoveCursor(QMoveCursorListView::MovePageDown, Qt::NoModifier);
- int newCurrent = qMin(currentItemIndexes[i] + scrolledRowCount, 99);
+ QModelIndex idx = vu.moveCursor(PublicListView::MovePageDown, Qt::NoModifier);
+ int newCurrent = qMin(currentItemIndex + scrolledRowCount, 99);
QCOMPARE(idx, model.index(newCurrent, 0));
- idx = vu.doMoveCursor(QMoveCursorListView::MovePageUp, Qt::NoModifier);
- newCurrent = qMax(currentItemIndexes[i] - scrolledRowCount, 0);
+ idx = vu.moveCursor(PublicListView::MovePageUp, Qt::NoModifier);
+ newCurrent = qMax(currentItemIndex - scrolledRowCount, 0);
QCOMPARE(idx, model.index(newCurrent, 0));
}
}
-class ListView_9455 : public QListView
-{
-public:
- QSize contentsSize() const
- {
- return QListView::contentsSize();
- }
-};
-
void tst_QListView::taskQTBUG_9455_wrongScrollbarRanges()
{
QStringListModel model(generateList("item ", 8));
- ListView_9455 w;
+ PublicListView w;
setFrameless(&w);
w.setModel(&model);
w.setViewMode(QListView::IconMode);
w.resize(116, 132);
w.setMovement(QListView::Static);
- const int spacing = 200;
- w.setSpacing(spacing);
+ w.setSpacing(200);
w.showNormal();
QVERIFY(QTest::qWaitForWindowExposed(&w));
- QCOMPARE(w.verticalScrollBar()->maximum(), w.contentsSize().height() - w.viewport()->geometry().height());
+ QCOMPARE(w.verticalScrollBar()->maximum(),
+ w.contentsSize().height() - w.viewport()->geometry().height());
}
void tst_QListView::styleOptionViewItem()
@@ -2073,7 +1956,8 @@ void tst_QListView::styleOptionViewItem()
class MyDelegate : public QStyledItemDelegate
{
public:
- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const override
{
QStyleOptionViewItem opt(option);
initStyleOption(&opt, index);
@@ -2089,12 +1973,14 @@ void tst_QListView::styleOptionViewItem()
view.setModel(&model);
MyDelegate delegate;
view.setItemDelegate(&delegate);
- model.appendRow(QList<QStandardItem*>()
- << new QStandardItem("Beginning") << new QStandardItem("Middle") << new QStandardItem("Middle") << new QStandardItem("End") );
+ model.appendRow({new QStandardItem("Beginning"),
+ new QStandardItem("Middle"),
+ new QStandardItem("Middle"),
+ new QStandardItem("End")});
// Run test
view.showMaximized();
- QApplication::processEvents();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
}
void tst_QListView::taskQTBUG_12308_artihmeticException()
@@ -2103,8 +1989,8 @@ void tst_QListView::taskQTBUG_12308_artihmeticException()
lw.setLayoutMode(QListView::Batched);
lw.setViewMode(QListView::IconMode);
for (int i = 0; i < lw.batchSize() + 1; i++) {
- QListWidgetItem *item = new QListWidgetItem();
- item->setText(QString("Item %L1").arg(i));
+ QListWidgetItem *item = new QListWidgetItem(
+ QLatin1String("Item ") + QString::number(i));
lw.addItem(item);
item->setHidden(true);
}
@@ -2117,10 +2003,9 @@ class Delegate12308 : public QStyledItemDelegate
{
Q_OBJECT
public:
- Delegate12308(QObject *parent = 0) : QStyledItemDelegate(parent)
- { }
-
- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
+ using QStyledItemDelegate::QStyledItemDelegate;
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const override
{
QVERIFY(option.rect.topLeft() != QPoint(-1, -1));
QStyledItemDelegate::paint(painter, option, index);
@@ -2135,8 +2020,8 @@ void tst_QListView::taskQTBUG_12308_wrongFlowLayout()
lw.setViewMode(QListView::IconMode);
lw.setItemDelegate(&delegate);
for (int i = 0; i < lw.batchSize() + 1; i++) {
- QListWidgetItem *item = new QListWidgetItem();
- item->setText(QString("Item %L1").arg(i));
+ QListWidgetItem *item = new QListWidgetItem(
+ QLatin1String("Item ") + QString::number(i));
lw.addItem(item);
if (!item->text().contains(QLatin1Char('1')))
item->setHidden(true);
@@ -2147,27 +2032,24 @@ void tst_QListView::taskQTBUG_12308_wrongFlowLayout()
void tst_QListView::taskQTBUG_21115_scrollToAndHiddenItems_data()
{
- QTest::addColumn<int>("flow");
- QTest::newRow("flow TopToBottom") << static_cast<int>(QListView::TopToBottom);
- QTest::newRow("flow LeftToRight") << static_cast<int>(QListView::LeftToRight);
+ QTest::addColumn<QListView::Flow>("flow");
+ QTest::newRow("flow TopToBottom") << QListView::TopToBottom;
+ QTest::newRow("flow LeftToRight") << QListView::LeftToRight;
}
void tst_QListView::taskQTBUG_21115_scrollToAndHiddenItems()
{
- QFETCH(int, flow);
+ QFETCH(QListView::Flow, flow);
#ifdef Q_OS_WINRT
QSKIP("Fails on WinRT - QTBUG-68297");
#endif
ScrollPerItemListView lv;
lv.setUniformItemSizes(true);
- lv.setFlow(static_cast<QListView::Flow>(flow));
+ lv.setFlow(flow);
QStringListModel model;
- QStringList list;
- for (int i = 0; i < 30; i++)
- list << QString::number(i);
- model.setStringList(list);
+ model.setStringList(generateList(QString(), 30));
lv.setModel(&model);
lv.showNormal();
QVERIFY(QTest::qWaitForWindowExposed(&lv));
@@ -2179,8 +2061,7 @@ void tst_QListView::taskQTBUG_21115_scrollToAndHiddenItems()
QModelIndex index = model.index(2, 0);
lv.setCurrentIndex(index);
lv.scrollTo(index, QAbstractItemView::PositionAtTop);
- QApplication::processEvents();
- QCOMPARE(lv.visualRect(index), firstItemRect);
+ QTRY_COMPARE(lv.visualRect(index), firstItemRect);
// Hide some rows and scroll to selection
for (int i = 0; i < 5; i++) {
@@ -2189,8 +2070,7 @@ void tst_QListView::taskQTBUG_21115_scrollToAndHiddenItems()
lv.setRowHidden(i, true);
}
lv.scrollTo(index, QAbstractItemView::PositionAtTop);
- QApplication::processEvents();
- QCOMPARE(lv.visualRect(index), firstItemRect);
+ QTRY_COMPARE(lv.visualRect(index), firstItemRect);
}
void tst_QListView::draggablePaintPairs_data()
@@ -2208,10 +2088,7 @@ void tst_QListView::draggablePaintPairs()
QListView view;
QStringListModel model;
- QStringList list;
- for (int i = 0; i < 30; i++)
- list << QString::number(i);
- model.setStringList(list);
+ model.setStringList(generateList(QString(), 30));
view.setModel(&model);
view.show();
@@ -2220,12 +2097,11 @@ void tst_QListView::draggablePaintPairs()
QModelIndex expectedIndex = model.index(row, 0);
QListViewPrivate *privateClass = static_cast<QListViewPrivate *>(QListViewPrivate::get(&view));
QRect rect;
- QModelIndexList indexList;
- indexList << expectedIndex;
+ const QModelIndexList indexList{ expectedIndex };
view.scrollTo(expectedIndex);
- QItemViewPaintPairs pairs = privateClass->draggablePaintPairs(indexList, &rect);
+ const QItemViewPaintPairs pairs = privateClass->draggablePaintPairs(indexList, &rect);
QCOMPARE(indexList.size(), pairs.size());
- foreach (const QItemViewPaintPair &pair, pairs) {
+ for (const QItemViewPaintPair &pair : pairs) {
QCOMPARE(rect, pair.rect);
QCOMPARE(expectedIndex, pair.index);
}
@@ -2233,29 +2109,26 @@ void tst_QListView::draggablePaintPairs()
void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys_data()
{
- QTest::addColumn<int>("flow");
+ QTest::addColumn<QListView::Flow>("flow");
QTest::addColumn<int>("spacing");
- QTest::newRow("flow TopToBottom no spacing") << static_cast<int>(QListView::TopToBottom) << 0;
- QTest::newRow("flow TopToBottom with spacing") << static_cast<int>(QListView::TopToBottom) << 5;
- QTest::newRow("flow LeftToRight no spacing") << static_cast<int>(QListView::LeftToRight) << 0;
- QTest::newRow("flow LeftToRight with spacing") << static_cast<int>(QListView::LeftToRight) << 5;
+ QTest::newRow("flow TopToBottom no spacing") << QListView::TopToBottom << 0;
+ QTest::newRow("flow TopToBottom with spacing") << QListView::TopToBottom << 5;
+ QTest::newRow("flow LeftToRight no spacing") << QListView::LeftToRight << 0;
+ QTest::newRow("flow LeftToRight with spacing") << QListView::LeftToRight << 5;
}
void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
{
- QFETCH(int, flow);
+ QFETCH(QListView::Flow, flow);
QFETCH(int, spacing);
// create some items to show
QStringListModel model;
- QStringList list;
- for (int i = 0; i < 60; i++)
- list << QString::number(i);
- model.setStringList(list);
+ model.setStringList(generateList(QString(), 60));
// create listview
ScrollPerItemListView lv;
- lv.setFlow(static_cast<QListView::Flow>(flow));
+ lv.setFlow(flow);
lv.setSpacing(spacing);
lv.setModel(&model);
lv.show();
@@ -2266,7 +2139,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
lv.setRowHidden(i, true);
// scroll forward and check that selected item is visible always
- int visibleItemCount = model.rowCount()/2;
+ int visibleItemCount = model.rowCount() / 2;
for (int i = 0; i < visibleItemCount; i++) {
if (flow == QListView::TopToBottom)
QTest::keyClick(&lv, Qt::Key_Down);
@@ -2285,7 +2158,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
}
// scroll forward only half way
- for (int i = 0; i < visibleItemCount/2; i++) {
+ for (int i = 0; i < visibleItemCount / 2; i++) {
if (flow == QListView::TopToBottom)
QTest::keyClick(&lv, Qt::Key_Down);
else
@@ -2294,7 +2167,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
}
// scroll backward again
- for (int i = 0; i < visibleItemCount/2; i++) {
+ for (int i = 0; i < visibleItemCount / 2; i++) {
if (flow == QListView::TopToBottom)
QTest::keyClick(&lv, Qt::Key_Up);
else
@@ -2305,29 +2178,26 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
void tst_QListView::spacing_data()
{
- QTest::addColumn<int>("flow");
+ QTest::addColumn<QListView::Flow>("flow");
QTest::addColumn<int>("spacing");
- QTest::newRow("flow=TopToBottom spacing=0") << static_cast<int>(QListView::TopToBottom) << 0;
- QTest::newRow("flow=TopToBottom spacing=10") << static_cast<int>(QListView::TopToBottom) << 10;
- QTest::newRow("flow=LeftToRight spacing=0") << static_cast<int>(QListView::LeftToRight) << 0;
- QTest::newRow("flow=LeftToRight spacing=10") << static_cast<int>(QListView::LeftToRight) << 10;
+ QTest::newRow("flow=TopToBottom spacing=0") << QListView::TopToBottom << 0;
+ QTest::newRow("flow=TopToBottom spacing=10") << QListView::TopToBottom << 10;
+ QTest::newRow("flow=LeftToRight spacing=0") << QListView::LeftToRight << 0;
+ QTest::newRow("flow=LeftToRight spacing=10") << QListView::LeftToRight << 10;
}
void tst_QListView::spacing()
{
- QFETCH(int, flow);
+ QFETCH(QListView::Flow, flow);
QFETCH(int, spacing);
// create some items to show
QStringListModel model;
- QStringList list;
- for (int i = 0; i < 60; i++)
- list << QString::number(i);
- model.setStringList(list);
+ model.setStringList(generateList(QString(), 60));
// create listview
ScrollPerItemListView lv;
- lv.setFlow(static_cast<QListView::Flow>(flow));
+ lv.setFlow(flow);
lv.setModel(&model);
lv.setSpacing(spacing);
lv.show();
@@ -2352,10 +2222,7 @@ void tst_QListView::testScrollToWithHidden()
QListView lv;
QStringListModel model;
- QStringList list;
- for (int i = 0; i < 30; i++)
- list << QString::number(i);
- model.setStringList(list);
+ model.setStringList(generateList(QString(), 30));
lv.setModel(&model);
lv.setRowHidden(1, true);
@@ -2394,11 +2261,12 @@ class TempStyleSetter
{
public:
TempStyleSetter()
- : m_oldStyle(qApp->style())
+ : m_oldStyle(QApplication::style())
{
- m_oldStyle->setParent(0);
+ m_oldStyle->setParent(nullptr);
QListView tempView;
- if (QApplication::style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, tempView.horizontalScrollBar()))
+ if (QApplication::style()->styleHint(QStyle::SH_ScrollBar_Transient,
+ nullptr, tempView.horizontalScrollBar()))
QApplication::setStyle(QStyleFactory::create("Fusion"));
}
@@ -2407,17 +2275,21 @@ public:
QApplication::setStyle(m_oldStyle);
}
private:
- QStyle* m_oldStyle;
+ QStyle *m_oldStyle;
};
void tst_QListView::taskQTBUG_39902_mutualScrollBars_data()
{
QTest::addColumn<QAbstractItemView::ScrollMode>("horizontalScrollMode");
QTest::addColumn<QAbstractItemView::ScrollMode>("verticalScrollMode");
- QTest::newRow("per item / per item") << QAbstractItemView::ScrollPerItem << QAbstractItemView::ScrollPerItem;
- QTest::newRow("per pixel / per item") << QAbstractItemView::ScrollPerPixel << QAbstractItemView::ScrollPerItem;
- QTest::newRow("per item / per pixel") << QAbstractItemView::ScrollPerItem << QAbstractItemView::ScrollPerPixel;
- QTest::newRow("per pixel / per pixel") << QAbstractItemView::ScrollPerPixel << QAbstractItemView::ScrollPerPixel;
+ QTest::newRow("per item / per item") << QAbstractItemView::ScrollPerItem
+ << QAbstractItemView::ScrollPerItem;
+ QTest::newRow("per pixel / per item") << QAbstractItemView::ScrollPerPixel
+ << QAbstractItemView::ScrollPerItem;
+ QTest::newRow("per item / per pixel") << QAbstractItemView::ScrollPerItem
+ << QAbstractItemView::ScrollPerPixel;
+ QTest::newRow("per pixel / per pixel") << QAbstractItemView::ScrollPerPixel
+ << QAbstractItemView::ScrollPerPixel;
}
void tst_QListView::taskQTBUG_39902_mutualScrollBars()
@@ -2447,50 +2319,60 @@ void tst_QListView::taskQTBUG_39902_mutualScrollBars()
model.setRowCount(2);
for (int i = 0; i < model.rowCount(); ++i)
model.setData(model.index(i, 0), itemSize, Qt::SizeHintRole);
- view->resize(itemSize.width() + view->frameWidth() * 2, model.rowCount() * itemSize.height() + view->frameWidth() * 2);
+ view->resize(itemSize.width() + view->frameWidth() * 2,
+ model.rowCount() * itemSize.height() + view->frameWidth() * 2);
// this will end up in a stack overflow, if QTBUG-39902 is not fixed
QTest::qWait(100);
// these tests do not apply with transient scroll bars enabled
- QVERIFY (!view->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, view->horizontalScrollBar()));
+ QVERIFY (!view->style()->styleHint(QStyle::SH_ScrollBar_Transient,
+ nullptr, view->horizontalScrollBar()));
// make it double as large, no scroll bars should be visible
- view->resize((itemSize.width() + view->frameWidth() * 2) * 2, (model.rowCount() * itemSize.height() + view->frameWidth() * 2) * 2);
+ view->resize((itemSize.width() + view->frameWidth() * 2) * 2,
+ (model.rowCount() * itemSize.height() + view->frameWidth() * 2) * 2);
QTRY_VERIFY(!view->horizontalScrollBar()->isVisible());
QTRY_VERIFY(!view->verticalScrollBar()->isVisible());
// make it half the size, both scroll bars should be visible
- view->resize((itemSize.width() + view->frameWidth() * 2) / 2, (model.rowCount() * itemSize.height() + view->frameWidth() * 2) / 2);
+ view->resize((itemSize.width() + view->frameWidth() * 2) / 2,
+ (model.rowCount() * itemSize.height() + view->frameWidth() * 2) / 2);
QTRY_VERIFY(view->horizontalScrollBar()->isVisible());
QTRY_VERIFY(view->verticalScrollBar()->isVisible());
// make it double as large, no scroll bars should be visible
- view->resize((itemSize.width() + view->frameWidth() * 2) * 2, (model.rowCount() * itemSize.height() + view->frameWidth() * 2) * 2);
+ view->resize((itemSize.width() + view->frameWidth() * 2) * 2,
+ (model.rowCount() * itemSize.height() + view->frameWidth() * 2) * 2);
QTRY_VERIFY(!view->horizontalScrollBar()->isVisible());
QTRY_VERIFY(!view->verticalScrollBar()->isVisible());
// now, coming from the double size, resize it to the exactly matching size, still no scroll bars should be visible again
- view->resize(itemSize.width() + view->frameWidth() * 2, model.rowCount() * itemSize.height() + view->frameWidth() * 2);
+ view->resize(itemSize.width() + view->frameWidth() * 2,
+ model.rowCount() * itemSize.height() + view->frameWidth() * 2);
QTRY_VERIFY(!view->horizontalScrollBar()->isVisible());
QTRY_VERIFY(!view->verticalScrollBar()->isVisible());
// now remove just one single pixel in height -> both scroll bars will show up since they depend on each other
- view->resize(itemSize.width() + view->frameWidth() * 2, model.rowCount() * itemSize.height() + view->frameWidth() * 2 - 1);
+ view->resize(itemSize.width() + view->frameWidth() * 2,
+ model.rowCount() * itemSize.height() + view->frameWidth() * 2 - 1);
QTRY_VERIFY(view->horizontalScrollBar()->isVisible());
QTRY_VERIFY(view->verticalScrollBar()->isVisible());
// now remove just one single pixel in width -> both scroll bars will show up since they depend on each other
- view->resize(itemSize.width() + view->frameWidth() * 2 - 1, model.rowCount() * itemSize.height() + view->frameWidth() * 2);
+ view->resize(itemSize.width() + view->frameWidth() * 2 - 1,
+ model.rowCount() * itemSize.height() + view->frameWidth() * 2);
QTRY_VERIFY(view->horizontalScrollBar()->isVisible());
QTRY_VERIFY(view->verticalScrollBar()->isVisible());
// finally, coming from a size being to small, resize back to the exactly matching size -> both scroll bars should disappear again
- view->resize(itemSize.width() + view->frameWidth() * 2, model.rowCount() * itemSize.height() + view->frameWidth() * 2);
+ view->resize(itemSize.width() + view->frameWidth() * 2,
+ model.rowCount() * itemSize.height() + view->frameWidth() * 2);
QTRY_VERIFY(!view->horizontalScrollBar()->isVisible());
QTRY_VERIFY(!view->verticalScrollBar()->isVisible());
// now remove just one single pixel in height -> both scroll bars will show up since they depend on each other
- view->resize(itemSize.width() + view->frameWidth() * 2, model.rowCount() * itemSize.height() + view->frameWidth() * 2 - 1);
+ view->resize(itemSize.width() + view->frameWidth() * 2,
+ model.rowCount() * itemSize.height() + view->frameWidth() * 2 - 1);
QTRY_VERIFY(view->horizontalScrollBar()->isVisible());
QTRY_VERIFY(view->verticalScrollBar()->isVisible());
}
@@ -2503,12 +2385,8 @@ void tst_QListView::horizontalScrollingByVerticalWheelEvents()
lv.setItemDelegate(new TestDelegate(&lv, QSize(100, 100)));
- QtTestModel model;
- model.colCount = 1;
- model.rCount = 100;
-
+ QtTestModel model(100, 1);
lv.setModel(&model);
-
lv.resize(300, 300);
lv.show();
QVERIFY(QTest::qWaitForWindowExposed(&lv));
@@ -2521,23 +2399,23 @@ void tst_QListView::horizontalScrollingByVerticalWheelEvents()
QWheelEvent wheelLeftDownEvent(pos, globalPos, QPoint(0, 0), QPoint(120, -120), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false);
int hValue = lv.horizontalScrollBar()->value();
- QApplication::sendEvent(lv.viewport(), &wheelDownEvent);
+ QCoreApplication::sendEvent(lv.viewport(), &wheelDownEvent);
QVERIFY(lv.horizontalScrollBar()->value() > hValue);
- QApplication::sendEvent(lv.viewport(), &wheelUpEvent);
+ QCoreApplication::sendEvent(lv.viewport(), &wheelUpEvent);
QCOMPARE(lv.horizontalScrollBar()->value(), hValue);
- QApplication::sendEvent(lv.viewport(), &wheelLeftDownEvent);
+ QCoreApplication::sendEvent(lv.viewport(), &wheelLeftDownEvent);
QCOMPARE(lv.horizontalScrollBar()->value(), hValue);
// ensure that vertical wheel events are not converted when vertical
// scroll bar is not visible but vertical scrolling is possible
lv.setWrapping(false);
lv.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- QApplication::processEvents();
+ QCoreApplication::processEvents();
int vValue = lv.verticalScrollBar()->value();
- QApplication::sendEvent(lv.viewport(), &wheelDownEvent);
+ QCoreApplication::sendEvent(lv.viewport(), &wheelDownEvent);
QVERIFY(lv.verticalScrollBar()->value() > vValue);
#else
QSKIP("Built with --no-feature-wheelevent");
@@ -2584,16 +2462,9 @@ void tst_QListView::taskQTBUG_7232_AllowUserToControlSingleStep()
void tst_QListView::taskQTBUG_51086_skippingIndexesInSelectedIndexes()
{
- // simple way to get access to selectedIndexes()
- class QListViewWithPublicSelectedIndexes : public QListView
- {
- public:
- using QListView::selectedIndexes;
- };
-
QStandardItemModel data(10, 1);
QItemSelectionModel selections(&data);
- QListViewWithPublicSelectedIndexes list;
+ PublicListView list;
list.setModel(&data);
list.setSelectionModel(&selections);
@@ -2640,7 +2511,7 @@ void tst_QListView::itemAlignment()
QVERIFY(w.visualRect(item1->index()).width() == w.visualRect(item2->index()).width());
w.setItemAlignment(Qt::AlignLeft);
- QApplication::processEvents();
+ QCoreApplication::processEvents();
QVERIFY(w.visualRect(item1->index()).width() < w.visualRect(item2->index()).width());
}
@@ -2653,11 +2524,6 @@ void tst_QListView::internalDragDropMove()
// on an internal move, the item was deleted which should not happen
// see QTBUG-67440
- class QListViewWithPublicStartDrag : public QListView
- {
- public:
- using QListView::startDrag;
- };
QStandardItemModel data(0, 1);
QPixmap pixmap(32, 32);
@@ -2666,7 +2532,7 @@ void tst_QListView::internalDragDropMove()
data.appendRow(new QStandardItem(QIcon(pixmap), QString::number(i)));
}
QItemSelectionModel selections(&data);
- QListViewWithPublicStartDrag list;
+ PublicListView list;
list.setWindowTitle(QTest::currentTestFunction());
list.setViewMode(QListView::IconMode);
list.setDefaultDropAction(Qt::MoveAction);
@@ -2682,10 +2548,10 @@ void tst_QListView::internalDragDropMove()
QTimer::singleShot(0, [&list]()
{
const QPoint pos = list.rect().center();
- QMouseEvent mouseMove(QEvent::MouseMove, pos, list.mapToGlobal(pos), Qt::NoButton, 0, 0);
- QApplication::sendEvent(&list, &mouseMove);
- QMouseEvent mouseRelease(QEvent::MouseButtonRelease, pos, list.mapToGlobal(pos), Qt::LeftButton, 0, 0);
- QApplication::sendEvent(&list, &mouseRelease);
+ QMouseEvent mouseMove(QEvent::MouseMove, pos, list.mapToGlobal(pos), Qt::NoButton, {}, {});
+ QCoreApplication::sendEvent(&list, &mouseMove);
+ QMouseEvent mouseRelease(QEvent::MouseButtonRelease, pos, list.mapToGlobal(pos), Qt::LeftButton, {}, {});
+ QCoreApplication::sendEvent(&list, &mouseRelease);
});
const int expectedCount = data.rowCount();
list.startDrag(Qt::MoveAction|Qt::CopyAction);
diff --git a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
index fe2ede4183..befb45e683 100644
--- a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
+++ b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
@@ -26,22 +26,23 @@
**
****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtGui/QtGui>
-#include <QtWidgets/QtWidgets>
-#include <qlist.h>
+#include <QCompleter>
+#include <QHBoxLayout>
+#include <QLineEdit>
+#include <QListWidget>
#include <QSignalSpy>
-
-#include <qlistwidget.h>
+#include <QStyledItemDelegate>
+#include <QTest>
#include <private/qlistwidget_p.h>
+using IntList = QVector<int>;
+
class tst_QListWidget : public QObject
{
Q_OBJECT
public:
- tst_QListWidget();
+ tst_QListWidget() = default;
enum ModelChanged {
RowsAboutToBeInserted,
@@ -144,13 +145,18 @@ protected slots:
void columnsRemoved(const QModelIndex &parent, int first, int last)
{ modelChanged(ColumnsRemoved, parent, first, last); }
- void modelChanged(ModelChanged change, const QModelIndex &parent, int first, int last);
+ void modelChanged(ModelChanged change, const QModelIndex &parent, int first, int last)
+ {
+ rcParent[change] = parent;
+ rcFirst[change] = first;
+ rcLast[change] = last;
+ }
private:
- QListWidget *testWidget;
- QVector<QModelIndex> rcParent;
- QVector<int> rcFirst;
- QVector<int> rcLast;
+ QListWidget *testWidget = nullptr;
+ QVector<QModelIndex> rcParent{8};
+ QVector<int> rcFirst = QVector<int>(8, 0);
+ QVector<int> rcLast = QVector<int>(8, 0);
void populate();
void checkDefaultValues();
@@ -168,7 +174,7 @@ void tst_QListWidget::moveRowsInvalid_data()
const auto createWidget = []() -> QListWidget* {
QListWidget* result = new QListWidget;
- result->addItems(QStringList{"A", "B", "C", "D", "E", "F"});
+ result->addItems({"A", "B", "C", "D", "E", "F"});
return result;
};
@@ -259,35 +265,32 @@ void tst_QListWidget::moveRows()
}
-typedef QList<int> IntList;
-
-tst_QListWidget::tst_QListWidget(): testWidget(0), rcParent(8), rcFirst(8,0), rcLast(8,0)
-{
-}
-
void tst_QListWidget::initTestCase()
{
qRegisterMetaType<QListWidgetItem*>("QListWidgetItem*");
- testWidget = new QListWidget();
+ qRegisterMetaType<QList<QPersistentModelIndex>>("QList<QPersistentModelIndex>");
+ qRegisterMetaType<QAbstractItemModel::LayoutChangeHint>("QAbstractItemModel::LayoutChangeHint");
+
+ testWidget = new QListWidget;
testWidget->show();
- connect(testWidget->model(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
- this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)));
- connect(testWidget->model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
- this, SLOT(rowsInserted(QModelIndex,int,int)));
- connect(testWidget->model(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
- this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
- connect(testWidget->model(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
- this, SLOT(rowsRemoved(QModelIndex,int,int)));
-
- connect(testWidget->model(), SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
- this, SLOT(columnsAboutToBeInserted(QModelIndex,int,int)));
- connect(testWidget->model(), SIGNAL(columnsInserted(QModelIndex,int,int)),
- this, SLOT(columnsInserted(QModelIndex,int,int)));
- connect(testWidget->model(), SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
- this, SLOT(columnsAboutToBeRemoved(QModelIndex,int,int)));
- connect(testWidget->model(), SIGNAL(columnsRemoved(QModelIndex,int,int)),
- this, SLOT(columnsRemoved(QModelIndex,int,int)));
+ connect(testWidget->model(), &QAbstractItemModel::rowsAboutToBeInserted,
+ this, &tst_QListWidget::rowsAboutToBeInserted);
+ connect(testWidget->model(), &QAbstractItemModel::rowsInserted,
+ this, &tst_QListWidget::rowsInserted);
+ connect(testWidget->model(), &QAbstractItemModel::rowsAboutToBeRemoved,
+ this, &tst_QListWidget::rowsAboutToBeRemoved);
+ connect(testWidget->model(), &QAbstractItemModel::rowsRemoved,
+ this, &tst_QListWidget::rowsRemoved);
+
+ connect(testWidget->model(), &QAbstractItemModel::columnsAboutToBeInserted,
+ this, &tst_QListWidget::columnsAboutToBeInserted);
+ connect(testWidget->model(), &QAbstractItemModel::columnsInserted,
+ this, &tst_QListWidget::columnsInserted);
+ connect(testWidget->model(), &QAbstractItemModel::columnsAboutToBeRemoved,
+ this, &tst_QListWidget::columnsAboutToBeRemoved);
+ connect(testWidget->model(), &QAbstractItemModel::columnsRemoved,
+ this, &tst_QListWidget::columnsRemoved);
checkDefaultValues();
}
@@ -300,7 +303,7 @@ void tst_QListWidget::cleanupTestCase()
void tst_QListWidget::init()
{
testWidget->clear();
- QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
}
void tst_QListWidget::checkDefaultValues()
@@ -317,7 +320,7 @@ void tst_QListWidget::populate()
addItems();
setItemHidden();
- testWidget->setCurrentIndex(testWidget->model()->index(0,0));
+ testWidget->setCurrentIndex(testWidget->model()->index(0, 0));
// setCurrentItem();
// setCurrentRow();
@@ -329,7 +332,7 @@ void tst_QListWidget::addItem()
const QString label = QString::number(count);
testWidget->addItem(label);
QCOMPARE(testWidget->count(), ++count);
- QCOMPARE(testWidget->item(testWidget->count()-1)->text(), label);
+ QCOMPARE(testWidget->item(testWidget->count() - 1)->text(), label);
}
void tst_QListWidget::addItem2()
@@ -337,7 +340,7 @@ void tst_QListWidget::addItem2()
int count = testWidget->count();
// Boundary Checking
- testWidget->addItem(0);
+ testWidget->addItem(nullptr);
QCOMPARE(testWidget->count(), count);
QListWidgetItem *item = new QListWidgetItem(QString::number(count));
@@ -356,12 +359,11 @@ void tst_QListWidget::addItems()
testWidget->addItems(QStringList());
QCOMPARE(testWidget->count(), count);
- QStringList stringList;
QString label = QString::number(count);
- stringList << QString::number(testWidget->count() + 1)
- << QString::number(testWidget->count() + 2)
- << QString::number(testWidget->count() + 3)
- << label;
+ const QStringList stringList{QString::number(testWidget->count() + 1),
+ QString::number(testWidget->count() + 2),
+ QString::number(testWidget->count() + 3),
+ label};
testWidget->addItems(stringList);
QCOMPARE(testWidget->count(), count + stringList.count());
QCOMPARE(testWidget->item(testWidget->count()-1)->text(), label);
@@ -371,7 +373,7 @@ void tst_QListWidget::addItems()
void tst_QListWidget::openPersistentEditor()
{
// Boundary checking
- testWidget->openPersistentEditor(0);
+ testWidget->openPersistentEditor(nullptr);
QListWidgetItem *item = new QListWidgetItem(QString::number(testWidget->count()));
testWidget->openPersistentEditor(item);
@@ -385,7 +387,7 @@ void tst_QListWidget::closePersistentEditor()
{
// Boundary checking
int childCount = testWidget->viewport()->children().count();
- testWidget->closePersistentEditor(0);
+ testWidget->closePersistentEditor(nullptr);
QListWidgetItem *item = new QListWidgetItem(QString::number(testWidget->count()));
testWidget->closePersistentEditor(item);
QCOMPARE(childCount, testWidget->viewport()->children().count());
@@ -397,7 +399,7 @@ void tst_QListWidget::closePersistentEditor()
// actual test
childCount = testWidget->viewport()->children().count();
testWidget->closePersistentEditor(item);
- QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete);
QCOMPARE(testWidget->viewport()->children().count(), childCount - 1);
}
@@ -412,40 +414,33 @@ QT_WARNING_DISABLE_DEPRECATED
QT_WARNING_POP
#endif
- int totalHidden = 0;
- for (int i = 0; i < testWidget->model()->rowCount(); ++i)
- if (testWidget->item(i)->isHidden())
- totalHidden++;
-
+ auto countHidden = [](QListWidget *testWidget)
+ {
+ int totalHidden = 0;
+ for (int i = 0; i < testWidget->model()->rowCount(); ++i) {
+ if (testWidget->item(i)->isHidden())
+ totalHidden++;
+ }
+ return totalHidden;
+ };
+ const int totalHidden = countHidden(testWidget);
QListWidgetItem *item = new QListWidgetItem(QString::number(testWidget->count()));
testWidget->addItem(item);
// Check that nothing else changed
- int newTotal = 0;
- for (int i = 0; i < testWidget->model()->rowCount(); ++i)
- if (testWidget->item(i)->isHidden())
- newTotal++;
- QCOMPARE(newTotal, totalHidden);
+ QCOMPARE(countHidden(testWidget), totalHidden);
item->setHidden(true);
QCOMPARE(item->isHidden(), true);
// Check that nothing else changed
- newTotal = 0;
- for (int i = 0; i < testWidget->model()->rowCount(); ++i)
- if (testWidget->item(i)->isHidden())
- newTotal++;
- QCOMPARE(newTotal, totalHidden + 1);
+ QCOMPARE(countHidden(testWidget), totalHidden + 1);
item->setHidden(false);
QCOMPARE(item->isHidden(), false);
// Check that nothing else changed
- newTotal = 0;
- for (int i = 0; i < testWidget->model()->rowCount(); ++i)
- if (testWidget->item(i)->isHidden())
- newTotal++;
- QCOMPARE(newTotal, totalHidden);
+ QCOMPARE(countHidden(testWidget), totalHidden);
item->setHidden(true);
}
@@ -466,11 +461,11 @@ void tst_QListWidget::setCurrentItem()
testWidget->addItem(QString::number(i));
// Boundary checking
- testWidget->setCurrentItem((QListWidgetItem *)0);
- QCOMPARE((QListWidgetItem *)0, testWidget->currentItem());
+ testWidget->setCurrentItem(nullptr);
+ QVERIFY(!testWidget->currentItem());
QListWidgetItem item;
testWidget->setCurrentItem(&item);
- QCOMPARE((QListWidgetItem *)0, testWidget->currentItem());
+ QVERIFY(!testWidget->currentItem());
// Make sure that currentItem changes to what is passed into setCurrentItem
for (int i = 0; i < testWidget->count(); ++i) {
@@ -555,7 +550,7 @@ void tst_QListWidget::editItem_data()
void tst_QListWidget::editItem()
{
// Boundary checking
- testWidget->editItem(0);
+ testWidget->editItem(nullptr);
QListWidgetItem *item = new QListWidgetItem(QString::number(testWidget->count()));
testWidget->editItem(item);
@@ -593,8 +588,8 @@ void tst_QListWidget::findItems()
populate();
- for (int i=0; i < testWidget->count(); ++i)
- QCOMPARE(testWidget->findItems( (testWidget->item(i)->text()), Qt::MatchExactly).count(), 1);
+ for (int i = 0; i < testWidget->count(); ++i)
+ QCOMPARE(testWidget->findItems(testWidget->item(i)->text(), Qt::MatchExactly).count(), 1);
}
@@ -605,8 +600,7 @@ void tst_QListWidget::insertItem_data()
QTest::addColumn<QString>("itemLabel");
QTest::addColumn<int>("expectedIndex");
- QStringList initialItems;
- initialItems << "foo" << "bar";
+ const QStringList initialItems{"foo", "bar"};
QTest::newRow("Insert less then 0") << initialItems << -1 << "inserted" << 0;
QTest::newRow("Insert at 0") << initialItems << 0 << "inserted" << 0;
@@ -669,7 +663,7 @@ void tst_QListWidget::insertItems()
if (insertType == 3) {
QStringList strings;
- for (int i=0; i<rowCount; ++i)
+ for (int i = 0; i < rowCount; ++i)
strings << QString::number(i);
testWidget->insertItems(0, strings);
} else {
@@ -685,7 +679,7 @@ void tst_QListWidget::insertItems()
testWidget->insertItem(r, QString::number(r));
} else if (insertType == 3) {
QStringList strings;
- for (int i=0; i<rowCount; ++i)
+ for (int i = 0; i < rowCount; ++i)
strings << QString::number(i);
testWidget->insertItems(0, strings);
break;
@@ -702,7 +696,7 @@ void tst_QListWidget::insertItems()
QCOMPARE(testWidget->item(r)->text(), QString::number(r));
// make sure all items have view set correctly
- for (int i=0; i<testWidget->count(); ++i)
+ for (int i = 0; i < testWidget->count(); ++i)
QCOMPARE(testWidget->item(i)->listWidget(), testWidget);
QCOMPARE(itemChangedSpy.count(), 0);
@@ -845,19 +839,19 @@ void tst_QListWidget::selectedItems_data()
void tst_QListWidget::selectedItems()
{
QFETCH(int, itemCount);
- QFETCH(IntList, hiddenRows);
- QFETCH(IntList, selectedRows);
- QFETCH(IntList, expectedRows);
+ QFETCH(const IntList, hiddenRows);
+ QFETCH(const IntList, selectedRows);
+ QFETCH(const IntList, expectedRows);
QCOMPARE(testWidget->count(), 0);
//insert items
- for (int i=0; i<itemCount; ++i)
+ for (int i = 0; i < itemCount; ++i)
new QListWidgetItem(QStringLiteral("Item") + QString::number(i), testWidget);
//test the selection
testWidget->setSelectionMode(QListWidget::SingleSelection);
- for (int i=0; i<itemCount; ++i) {
+ for (int i = 0; i < itemCount; ++i) {
QListWidgetItem *item = testWidget->item(i);
item->setSelected(true);
QVERIFY(item->isSelected());
@@ -871,20 +865,20 @@ void tst_QListWidget::selectedItems()
//verify items are inserted
QCOMPARE(testWidget->count(), itemCount);
// hide items
- foreach (int row, hiddenRows)
+ for (int row : hiddenRows)
testWidget->item(row)->setHidden(true);
// select items
- foreach (int row, selectedRows)
+ for (int row : selectedRows)
testWidget->item(row)->setSelected(true);
// check that the correct number of items and the expected items are there
QList<QListWidgetItem *> selectedItems = testWidget->selectedItems();
QCOMPARE(selectedItems.count(), expectedRows.count());
- foreach (int row, expectedRows)
+ for (int row : expectedRows)
QVERIFY(selectedItems.contains(testWidget->item(row)));
//check that isSelected agrees with selectedItems
- for (int i=0; i<itemCount; ++i) {
+ for (int i = 0; i < itemCount; ++i) {
QListWidgetItem *item = testWidget->item(i);
if (item->isSelected())
QVERIFY(selectedItems.contains(item));
@@ -927,8 +921,6 @@ void tst_QListWidget::removeItems()
QCOMPARE(testWidget->item(r)->text(), QString::number(r));
else
QCOMPARE(testWidget->item(r)->text(), QString::number(r + removeRows));
-
-
}
void tst_QListWidget::moveItemsPriv_data()
@@ -967,8 +959,8 @@ void tst_QListWidget::moveItemsPriv()
QListModel *model = qobject_cast<QListModel *>(testWidget->model());
QVERIFY(model);
- QSignalSpy beginMoveSpy(model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
- QSignalSpy movedSpy(model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
+ QSignalSpy beginMoveSpy(model, &QAbstractItemModel::rowsAboutToBeMoved);
+ QSignalSpy movedSpy(model, &QAbstractItemModel::rowsMoved);
model->move(srcRow, dstRow);
if (shouldHaveSignaled) {
@@ -1034,31 +1026,31 @@ void tst_QListWidget::itemStreaming()
void tst_QListWidget::sortItems_data()
{
- QTest::addColumn<int>("order");
+ QTest::addColumn<Qt::SortOrder>("order");
QTest::addColumn<QVariantList>("initialList");
QTest::addColumn<QVariantList>("expectedList");
QTest::addColumn<IntList>("expectedRows");
QTest::newRow("ascending strings")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QVariantList() << QString("c") << QString("d") << QString("a") << QString("b"))
<< (QVariantList() << QString("a") << QString("b") << QString("c") << QString("d"))
<< (IntList() << 2 << 3 << 0 << 1);
QTest::newRow("descending strings")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< (QVariantList() << QString("c") << QString("d") << QString("a") << QString("b"))
<< (QVariantList() << QString("d") << QString("c") << QString("b") << QString("a"))
<< (IntList() << 1 << 0 << 3 << 2);
QTest::newRow("ascending numbers")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QVariantList() << 1 << 11 << 2 << 22)
<< (QVariantList() << 1 << 2 << 11 << 22)
<< (IntList() << 0 << 2 << 1 << 3);
QTest::newRow("descending numbers")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< (QVariantList() << 1 << 11 << 2 << 22)
<< (QVariantList() << 22 << 11 << 2 << 1)
<< (IntList() << 3 << 1 << 2 << 0);
@@ -1066,22 +1058,22 @@ void tst_QListWidget::sortItems_data()
void tst_QListWidget::sortItems()
{
- QFETCH(int, order);
- QFETCH(QVariantList, initialList);
- QFETCH(QVariantList, expectedList);
- QFETCH(IntList, expectedRows);
+ QFETCH(Qt::SortOrder, order);
+ QFETCH(const QVariantList, initialList);
+ QFETCH(const QVariantList, expectedList);
+ QFETCH(const IntList, expectedRows);
- foreach (const QVariant &data, initialList) {
+ for (const QVariant &data : initialList) {
QListWidgetItem *item = new QListWidgetItem(testWidget);
item->setData(Qt::DisplayRole, data);
}
QAbstractItemModel *model = testWidget->model();
- QList<QPersistentModelIndex> persistent;
+ QVector<QPersistentModelIndex> persistent;
for (int j = 0; j < model->rowCount(QModelIndex()); ++j)
persistent << model->index(j, 0, QModelIndex());
- testWidget->sortItems(static_cast<Qt::SortOrder>(order));
+ testWidget->sortItems(order);
QCOMPARE(testWidget->count(), expectedList.count());
for (int i = 0; i < testWidget->count(); ++i)
@@ -1093,7 +1085,7 @@ void tst_QListWidget::sortItems()
void tst_QListWidget::sortHiddenItems_data()
{
- QTest::addColumn<int>("order");
+ QTest::addColumn<Qt::SortOrder>("order");
QTest::addColumn<QStringList>("initialList");
QTest::addColumn<QStringList>("expectedList");
QTest::addColumn<IntList>("expectedRows");
@@ -1110,21 +1102,21 @@ void tst_QListWidget::sortHiddenItems_data()
}
QTest::newRow("descending order, 20 items")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< initial
<< expected
<< rowOrder
<< visible;
QTest::newRow("ascending order")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QStringList() << "c" << "d" << "a" << "b")
<< (QStringList() << "a" << "b" << "c" << "d")
<< (IntList() << 2 << 3 << 0 << 1)
<< (IntList() << 1 << 0 << 1 << 0);
QTest::newRow("descending order")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< (QStringList() << "c" << "d" << "a" << "b")
<< (QStringList() << "d" << "c" << "b" << "a")
<< (IntList() << 1 << 0 << 3 << 2)
@@ -1133,7 +1125,7 @@ void tst_QListWidget::sortHiddenItems_data()
void tst_QListWidget::sortHiddenItems()
{
- QFETCH(int, order);
+ QFETCH(Qt::SortOrder, order);
QFETCH(QStringList, initialList);
QFETCH(QStringList, expectedList);
QFETCH(IntList, expectedRows);
@@ -1144,14 +1136,14 @@ void tst_QListWidget::sortHiddenItems()
tw->addItems(initialList);
QAbstractItemModel *model = tw->model();
- QList<QPersistentModelIndex> persistent;
+ QVector<QPersistentModelIndex> persistent;
for (int j = 0; j < model->rowCount(QModelIndex()); ++j) {
persistent << model->index(j, 0, QModelIndex());
tw->setRowHidden(j, j & 1); // every odd is hidden
}
tw->setSortingEnabled(true);
- tw->sortItems(static_cast<Qt::SortOrder>(order));
+ tw->sortItems(order);
QCOMPARE(tw->count(), expectedList.count());
for (int i = 0; i < tw->count(); ++i) {
@@ -1165,50 +1157,35 @@ void tst_QListWidget::sortHiddenItems()
delete tw;
}
-void tst_QListWidget::modelChanged(ModelChanged change, const QModelIndex &parent,
- int first, int last)
+class TestListWidget : public QListWidget
{
- rcParent[change] = parent;
- rcFirst[change] = first;
- rcLast[change] = last;
-}
-
-class TestListWidget : public QListWidget {
+ Q_OBJECT
public:
- TestListWidget() : QListWidget()
- {
-
- }
- State getState() {return QListWidget::state();}
-
- void closeEditor(QWidget *w, QAbstractItemDelegate::EndEditHint hint) {
- QListWidget::closeEditor(w, hint);
- }
+ using QListWidget::QListWidget;
+ using QListWidget::state;
+ using QListWidget::closeEditor;
+ using QListWidget::mimeData;
+ using QListWidget::indexFromItem;
- bool isEditingState(QListWidgetItem *item) {
- Q_UNUSED(item);
+ bool isEditingState() const {
return QListWidget::state() == QListWidget::EditingState;
}
-
- using QListWidget::mimeData;
- using QListWidget::indexFromItem;
};
void tst_QListWidget::closeEditor()
{
TestListWidget w;
- QStringList labels = (QStringList() << "a" << "b" << "c" << "d");
- w.addItems(labels);
+ w.addItems({"a", "b", "c", "d"});
QListWidgetItem *item = w.item(0);
item->setFlags(item->flags() | Qt::ItemIsEditable);
QVERIFY(item);
w.editItem(item);
- QVERIFY(w.isEditingState(item));
+ QVERIFY(w.isEditingState());
w.reset();
- QVERIFY(!w.isEditingState(item));
+ QVERIFY(!w.isEditingState());
}
void tst_QListWidget::setData_data()
@@ -1267,15 +1244,15 @@ void tst_QListWidget::setData()
QCOMPARE(roles.count(), values.count());
- for (int manipulateModel=0; manipulateModel<2; ++manipulateModel) {
+ for (int manipulateModel = 0; manipulateModel < 2; ++manipulateModel) {
testWidget->clear();
testWidget->insertItems(0, initialItems);
QCOMPARE(testWidget->count(), initialItems.count());
- QSignalSpy itemChanged(testWidget, SIGNAL(itemChanged(QListWidgetItem*)));
- QSignalSpy dataChanged(testWidget->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)));
+ QSignalSpy itemChanged(testWidget, &QListWidget::itemChanged);
+ QSignalSpy dataChanged(testWidget->model(), &QAbstractItemModel::dataChanged);
- for (int i=0; i < roles.count(); ++i) {
+ for (int i = 0; i < roles.count(); ++i) {
if (manipulateModel)
testWidget->model()->setData(
testWidget->model()->index(itemIndex, 0, testWidget->rootIndex()),
@@ -1286,7 +1263,7 @@ void tst_QListWidget::setData()
}
// make sure the data is actually set
- for (int i=0; i < roles.count(); ++i)
+ for (int i = 0; i < roles.count(); ++i)
QCOMPARE(testWidget->item(itemIndex)->data(roles.at(i)), values.at(i));
// make sure we get the right number of emits
@@ -1297,50 +1274,50 @@ void tst_QListWidget::setData()
void tst_QListWidget::insertItemsWithSorting_data()
{
- QTest::addColumn<int>("sortOrder");
+ QTest::addColumn<Qt::SortOrder>("sortOrder");
QTest::addColumn<QStringList>("initialItems");
QTest::addColumn<QStringList>("insertItems");
QTest::addColumn<QStringList>("expectedItems");
QTest::addColumn<IntList>("expectedRows");
QTest::newRow("() + (a) = (a)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< QStringList()
<< (QStringList() << "a")
<< (QStringList() << "a")
<< IntList();
QTest::newRow("() + (c, b, a) = (a, b, c)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< QStringList()
<< (QStringList() << "c" << "b" << "a")
<< (QStringList() << "a" << "b" << "c")
<< IntList();
QTest::newRow("() + (a, b, c) = (c, b, a)")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< QStringList()
<< (QStringList() << "a" << "b" << "c")
<< (QStringList() << "c" << "b" << "a")
<< IntList();
QTest::newRow("(a) + (b) = (a, b)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< QStringList("a")
<< (QStringList() << "b")
<< (QStringList() << "a" << "b")
<< (IntList() << 0);
QTest::newRow("(a) + (b) = (b, a)")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< QStringList("a")
<< (QStringList() << "b")
<< (QStringList() << "b" << "a")
<< (IntList() << 1);
QTest::newRow("(a, c, b) + (d) = (a, b, c, d)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QStringList() << "a" << "c" << "b")
<< (QStringList() << "d")
<< (QStringList() << "a" << "b" << "c" << "d")
<< (IntList() << 0 << 1 << 2);
QTest::newRow("(b, c, a) + (d) = (d, c, b, a)")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< (QStringList() << "b" << "c" << "a")
<< (QStringList() << "d")
<< (QStringList() << "d" << "c" << "b" << "a")
@@ -1350,38 +1327,38 @@ void tst_QListWidget::insertItemsWithSorting_data()
IntList reverseRows;
QStringList ascendingItems;
QStringList reverseItems;
- for (int i = 'a'; i <= 'z'; ++i) {
+ for (char i = 'a'; i <= 'z'; ++i) {
ascendingItems << QString(1, QLatin1Char(i));
reverseItems << QString(1, QLatin1Char('z' - i + 'a'));
ascendingRows << i - 'a';
reverseRows << 'z' - i + 'a';
}
QTest::newRow("() + (sorted items) = (sorted items)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< QStringList()
<< ascendingItems
<< ascendingItems
<< IntList();
QTest::newRow("(sorted items) + () = (sorted items)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< ascendingItems
<< QStringList()
<< ascendingItems
<< ascendingRows;
QTest::newRow("() + (ascending items) = (reverse items)")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< QStringList()
<< ascendingItems
<< reverseItems
<< IntList();
QTest::newRow("(reverse items) + () = (ascending items)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< reverseItems
<< QStringList()
<< ascendingItems
<< ascendingRows;
QTest::newRow("(reverse items) + () = (reverse items)")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< reverseItems
<< QStringList()
<< reverseItems
@@ -1391,16 +1368,16 @@ void tst_QListWidget::insertItemsWithSorting_data()
void tst_QListWidget::insertItemsWithSorting()
{
- QFETCH(int, sortOrder);
- QFETCH(QStringList, initialItems);
- QFETCH(QStringList, insertItems);
- QFETCH(QStringList, expectedItems);
- QFETCH(IntList, expectedRows);
+ QFETCH(Qt::SortOrder, sortOrder);
+ QFETCH(const QStringList, initialItems);
+ QFETCH(const QStringList, insertItems);
+ QFETCH(const QStringList, expectedItems);
+ QFETCH(const IntList, expectedRows);
for (int method = 0; method < 5; ++method) {
QListWidget w;
w.setSortingEnabled(true);
- w.sortItems(static_cast<Qt::SortOrder>(sortOrder));
+ w.sortItems(sortOrder);
w.addItems(initialItems);
QAbstractItemModel *model = w.model();
@@ -1411,8 +1388,8 @@ void tst_QListWidget::insertItemsWithSorting()
switch (method) {
case 0:
// insert using item constructor
- for (int i = 0; i < insertItems.size(); ++i)
- new QListWidgetItem(insertItems.at(i), &w);
+ for (const QString &str : insertItems)
+ new QListWidgetItem(str, &w);
break;
case 1:
// insert using insertItems()
@@ -1420,8 +1397,8 @@ void tst_QListWidget::insertItemsWithSorting()
break;
case 2:
// insert using insertItem()
- for (int i = 0; i < insertItems.size(); ++i)
- w.insertItem(0, insertItems.at(i));
+ for (const QString &str : insertItems)
+ w.insertItem(0, str);
break;
case 3:
// insert using addItems()
@@ -1429,8 +1406,8 @@ void tst_QListWidget::insertItemsWithSorting()
break;
case 4:
// insert using addItem()
- for (int i = 0; i < insertItems.size(); ++i)
- w.addItem(insertItems.at(i));
+ for (const QString &str : insertItems)
+ w.addItem(str);
break;
}
QCOMPARE(w.count(), expectedItems.count());
@@ -1444,7 +1421,7 @@ void tst_QListWidget::insertItemsWithSorting()
void tst_QListWidget::changeDataWithSorting_data()
{
- QTest::addColumn<int>("sortOrder");
+ QTest::addColumn<Qt::SortOrder>("sortOrder");
QTest::addColumn<QStringList>("initialItems");
QTest::addColumn<int>("itemIndex");
QTest::addColumn<QString>("newValue");
@@ -1453,49 +1430,49 @@ void tst_QListWidget::changeDataWithSorting_data()
QTest::addColumn<bool>("reorderingExpected");
QTest::newRow("change a to b in (a)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QStringList() << "a")
<< 0 << "b"
<< (QStringList() << "b")
<< (IntList() << 0)
<< false;
QTest::newRow("change a to b in (a, c)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QStringList() << "a" << "c")
<< 0 << "b"
<< (QStringList() << "b" << "c")
<< (IntList() << 0 << 1)
<< false;
QTest::newRow("change a to c in (a, b)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QStringList() << "a" << "b")
<< 0 << "c"
<< (QStringList() << "b" << "c")
<< (IntList() << 1 << 0)
<< true;
QTest::newRow("change c to a in (c, b)")
- << static_cast<int>(Qt::DescendingOrder)
+ << Qt::DescendingOrder
<< (QStringList() << "c" << "b")
<< 0 << "a"
<< (QStringList() << "b" << "a")
<< (IntList() << 1 << 0)
<< true;
QTest::newRow("change e to i in (a, c, e, g)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QStringList() << "a" << "c" << "e" << "g")
<< 2 << "i"
<< (QStringList() << "a" << "c" << "g" << "i")
<< (IntList() << 0 << 1 << 3 << 2)
<< true;
QTest::newRow("change e to a in (c, e, g, i)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QStringList() << "c" << "e" << "g" << "i")
<< 1 << "a"
<< (QStringList() << "a" << "c" << "g" << "i")
<< (IntList() << 1 << 0 << 2 << 3)
<< true;
QTest::newRow("change e to f in (c, e, g, i)")
- << static_cast<int>(Qt::AscendingOrder)
+ << Qt::AscendingOrder
<< (QStringList() << "c" << "e" << "g" << "i")
<< 1 << "f"
<< (QStringList() << "c" << "f" << "g" << "i")
@@ -1539,7 +1516,7 @@ void tst_QListWidget::itemData()
void tst_QListWidget::changeDataWithSorting()
{
- QFETCH(int, sortOrder);
+ QFETCH(Qt::SortOrder, sortOrder);
QFETCH(QStringList, initialItems);
QFETCH(int, itemIndex);
QFETCH(QString, newValue);
@@ -1549,16 +1526,16 @@ void tst_QListWidget::changeDataWithSorting()
QListWidget w;
w.setSortingEnabled(true);
- w.sortItems(static_cast<Qt::SortOrder>(sortOrder));
+ w.sortItems(sortOrder);
w.addItems(initialItems);
QAbstractItemModel *model = w.model();
- QList<QPersistentModelIndex> persistent;
+ QVector<QPersistentModelIndex> persistent;
for (int j = 0; j < model->rowCount(QModelIndex()); ++j)
persistent << model->index(j, 0, QModelIndex());
- QSignalSpy dataChangedSpy(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
- QSignalSpy layoutChangedSpy(model, SIGNAL(layoutChanged()));
+ QSignalSpy dataChangedSpy(model, &QAbstractItemModel::dataChanged);
+ QSignalSpy layoutChangedSpy(model, &QAbstractItemModel::layoutChanged);
QListWidgetItem *item = w.item(itemIndex);
item->setText(newValue);
@@ -1566,7 +1543,7 @@ void tst_QListWidget::changeDataWithSorting()
QCOMPARE(w.item(i)->text(), expectedItems.at(i));
for (int j = 0; j < persistent.count(); ++j) {
if (persistent.at(j).row() == i) // the same toplevel row
- QCOMPARE(persistent.at(j).internalPointer(), (void *)w.item(i));
+ QCOMPARE(persistent.at(j).internalPointer(), static_cast<void *>(w.item(i)));
}
}
@@ -1595,13 +1572,12 @@ void tst_QListWidget::itemWidget()
#ifndef Q_OS_MAC
class MyListWidget : public QListWidget
{
+ Q_OBJECT
public:
- MyListWidget(QWidget *parent=0)
- : QListWidget(parent)
- {
- }
+ using QListWidget::QListWidget;
- void paintEvent(QPaintEvent *e) {
+ void paintEvent(QPaintEvent *e) override
+ {
painted += e->region();
QListWidget::paintEvent(e);
}
@@ -1649,7 +1625,7 @@ void tst_QListWidget::fastScroll()
void tst_QListWidget::insertUnchanged()
{
QListWidget w;
- QSignalSpy itemChangedSpy(&w, SIGNAL(itemChanged(QListWidgetItem*)));
+ QSignalSpy itemChangedSpy(&w, &QListWidget::itemChanged);
QListWidgetItem item("foo", &w);
QCOMPARE(itemChangedSpy.count(), 0);
}
@@ -1670,9 +1646,9 @@ void tst_QListWidget::task199503_crashWhenCleared()
{
//we test here for a crash that would occur if you clear the items in the currentItemChanged signal
QListWidget w;
- w.addItems( QStringList() << "item1" << "item2" << "item3");
+ w.addItems({"item1", "item2", "item3"});
w.setCurrentRow(0);
- w.connect(&w, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(clear()));
+ w.connect(&w, &QListWidget::currentItemChanged, &w, &QListWidget::clear);
w.setCurrentRow(1);
}
@@ -1680,21 +1656,22 @@ void tst_QListWidget::task217070_scrollbarsAdjusted()
{
//This task was mailing for style using SH_ScrollView_FrameOnlyAroundContents such as QMotifStyle
QListWidget v;
- for (int i = 0; i<200;i++)
+ for (int i = 0; i < 200;i++)
v.addItem(QString::number(i));
v.show();
v.setViewMode(QListView::IconMode);
v.setResizeMode(QListView::Adjust);
v.setUniformItemSizes(true);
- v.resize(160,100);
+ v.resize(160, 100);
QVERIFY(QTest::qWaitForWindowActive(&v));
QScrollBar *hbar = v.horizontalScrollBar();
QScrollBar *vbar = v.verticalScrollBar();
QVERIFY(hbar && vbar);
- for(int f=150; f>90 ; f--) {
- v.resize(f,100);
- QTest::qWait(30);
- QVERIFY(vbar->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, vbar) || vbar->isVisible());
+ const auto style = vbar->style();
+ for (int f = 150; f > 90 ; f--) {
+ v.resize(f, 100);
+ QTRY_VERIFY(style->styleHint(QStyle::SH_ScrollBar_Transient, nullptr, vbar) ||
+ vbar->isVisible());
//the horizontal scrollbar must not be visible.
QVERIFY(!hbar->isVisible());
}
@@ -1711,12 +1688,11 @@ void tst_QListWidget::task258949_keypressHangup()
}
lw.show();
- lw.setCurrentIndex(lw.model()->index(0,0));
- QCOMPARE(lw.currentIndex(), lw.model()->index(0,0));
+ lw.setCurrentIndex(lw.model()->index(0, 0));
+ QCOMPARE(lw.currentIndex(), lw.model()->index(0, 0));
QTest::qWait(30);
QTest::keyPress(&lw, '1'); //this used to freeze
- QTest::qWait(30);
- QCOMPARE(lw.currentIndex(), lw.model()->index(0,0));
+ QTRY_COMPARE(lw.currentIndex(), lw.model()->index(0, 0));
}
void tst_QListWidget::QTBUG8086_currentItemChangedOnClick()
@@ -1735,25 +1711,26 @@ void tst_QListWidget::QTBUG8086_currentItemChangedOnClick()
edit.setFocus();
win.show();
- QSignalSpy spy(&list, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)));
+ QSignalSpy spy(&list, &QListWidget::currentItemChanged);
QVERIFY(QTest::qWaitForWindowExposed(&win));
QCOMPARE(spy.count(), 0);
- QTest::mouseClick(list.viewport(), Qt::LeftButton, 0, list.visualItemRect(list.item(2)).center());
+ QTest::mouseClick(list.viewport(), Qt::LeftButton, {},
+ list.visualItemRect(list.item(2)).center());
QCOMPARE(spy.count(), 1);
-
}
-class ItemDelegate : public QItemDelegate
+class ItemDelegate : public QStyledItemDelegate
{
+ Q_OBJECT
public:
- ItemDelegate(QObject *parent = 0) : QItemDelegate(parent)
- {}
- virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) const
+ using QStyledItemDelegate::QStyledItemDelegate;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &,
+ const QModelIndex &) const override
{
QLineEdit *lineEdit = new QLineEdit(parent);
lineEdit->setFrame(false);
@@ -1775,10 +1752,10 @@ void tst_QListWidget::QTBUG14363_completerWithAnyKeyPressedEditTriggers()
new QListWidgetItem(QLatin1String("completer"), &listWidget);
listWidget.show();
listWidget.setCurrentItem(item);
- qApp->setActiveWindow(&listWidget);
+ QApplication::setActiveWindow(&listWidget);
QVERIFY(QTest::qWaitForWindowActive(&listWidget));
listWidget.setFocus();
- QCOMPARE(qApp->focusWidget(), &listWidget);
+ QCOMPARE(QApplication::focusWidget(), &listWidget);
QTest::keyClick(listWidget.viewport(), Qt::Key_C);
@@ -1792,41 +1769,27 @@ void tst_QListWidget::mimeData()
{
TestListWidget list;
- for (int x = 0; x < 10; ++x) {
- QListWidgetItem *item = new QListWidgetItem(QStringLiteral("123"));
- list.addItem(item);
- }
+ for (int x = 0; x < 10; ++x)
+ list.addItem(new QListWidgetItem(QStringLiteral("123")));
- QList<QListWidgetItem *> tableWidgetItemList;
- QModelIndexList modelIndexList;
+ const QList<QListWidgetItem *> tableWidgetItemList{list.item(1)};
+ const QModelIndexList modelIndexList{list.indexFromItem(list.item(1))};
// do these checks more than once to ensure that the "cached indexes" work as expected
- QVERIFY(!list.mimeData(tableWidgetItemList));
- QVERIFY(!list.model()->mimeData(modelIndexList));
- QVERIFY(!list.model()->mimeData(modelIndexList));
- QVERIFY(!list.mimeData(tableWidgetItemList));
-
- tableWidgetItemList << list.item(1);
- modelIndexList << list.indexFromItem(list.item(1));
-
QMimeData *data;
+ for (int i = 0; i < 2; ++i) {
+ QVERIFY(!list.mimeData({}));
+ QVERIFY(!list.model()->mimeData({}));
- QVERIFY((data = list.mimeData(tableWidgetItemList)));
- delete data;
-
- QVERIFY((data = list.model()->mimeData(modelIndexList)));
- delete data;
-
- QVERIFY((data = list.model()->mimeData(modelIndexList)));
- delete data;
+ QVERIFY((data = list.mimeData(tableWidgetItemList)));
+ delete data;
- QVERIFY((data = list.mimeData(tableWidgetItemList)));
- delete data;
+ QVERIFY((data = list.model()->mimeData(modelIndexList)));
+ delete data;
+ }
// check the saved data is actually the same
-
QMimeData *data2;
-
data = list.mimeData(tableWidgetItemList);
data2 = list.model()->mimeData(modelIndexList);
@@ -1850,13 +1813,14 @@ void tst_QListWidget::QTBUG50891_ensureSelectionModelSignalConnectionsAreSet()
list.show();
QVERIFY(QTest::qWaitForWindowExposed(&list));
- QSignalSpy currentItemChangedSpy(&list, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)));
- QSignalSpy itemSelectionChangedSpy(&list, SIGNAL(itemSelectionChanged()));
+ QSignalSpy currentItemChangedSpy(&list, &QListWidget::currentItemChanged);
+ QSignalSpy itemSelectionChangedSpy(&list, &QListWidget::itemSelectionChanged);
QCOMPARE(currentItemChangedSpy.count(), 0);
QCOMPARE(itemSelectionChangedSpy.count(), 0);
- QTest::mouseClick(list.viewport(), Qt::LeftButton, 0, list.visualItemRect(list.item(2)).center());
+ QTest::mouseClick(list.viewport(), Qt::LeftButton, {},
+ list.visualItemRect(list.item(2)).center());
QCOMPARE(currentItemChangedSpy.count(), 1);
QCOMPARE(itemSelectionChangedSpy.count(), 1);
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index ae084310b1..4cec54856f 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.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 test suite of the Qt Toolkit.
@@ -67,15 +67,9 @@ using namespace QTestPrivate;
class tst_QStyle : public QObject
{
Q_OBJECT
-public:
- tst_QStyle();
-private:
- bool testAllFunctions(QStyle *);
- bool testScrollBarSubControls();
private slots:
void drawItemPixmap();
- void init();
void cleanup();
#ifndef QT_NO_STYLE_FUSION
void testFusionStyle();
@@ -100,38 +94,29 @@ private slots:
void testProxyCalled();
void testStyleOptionInit();
private:
+ bool testAllFunctions(QStyle *);
+ bool testScrollBarSubControls(const QStyle *style);
+ void testPainting(QStyle *style, const QString &platform);
void lineUpLayoutTest(QStyle *);
- QWidget *testWidget;
};
-
-tst_QStyle::tst_QStyle()
-{
- testWidget = 0;
-}
-
class MyWidget : public QWidget
{
public:
- MyWidget( QWidget* QWidget=0, const char* name=0 );
+ using QWidget::QWidget;
+
protected:
- void paintEvent( QPaintEvent* );
+ void paintEvent(QPaintEvent *) override;
};
-void tst_QStyle::init()
-{
- testWidget = new MyWidget( 0, "testObject");
-}
-
void tst_QStyle::cleanup()
{
- delete testWidget;
- testWidget = 0;
+ QVERIFY(QApplication::topLevelWidgets().isEmpty());
}
void tst_QStyle::testStyleFactory()
{
- QStringList keys = QStyleFactory::keys();
+ const QStringList keys = QStyleFactory::keys();
#ifndef QT_NO_STYLE_FUSION
QVERIFY(keys.contains("Fusion"));
#endif
@@ -139,17 +124,17 @@ void tst_QStyle::testStyleFactory()
QVERIFY(keys.contains("Windows"));
#endif
- foreach (QString styleName , keys) {
- QStyle *style = QStyleFactory::create(styleName);
- QVERIFY2(style != 0, qPrintable(QString::fromLatin1("Fail to load style '%1'").arg(styleName)));
- delete style;
+ for (const QString &styleName : keys) {
+ QScopedPointer<QStyle> style(QStyleFactory::create(styleName));
+ QVERIFY2(!style.isNull(),
+ qPrintable(QString::fromLatin1("Fail to load style '%1'").arg(styleName)));
}
}
class CustomProxy : public QProxyStyle
{
- virtual int pixelMetric(PixelMetric metric, const QStyleOption *option = 0,
- const QWidget *widget = 0) const
+ int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr,
+ const QWidget *widget = nullptr) const override
{
if (metric == QStyle::PM_ButtonIconSize)
return 13;
@@ -170,9 +155,9 @@ void tst_QStyle::testProxyStyle()
QCOMPARE(proxyStyle->baseStyle(), style);
QVERIFY(testAllFunctions(proxyStyle));
- proxyStyle->setBaseStyle(0);
+ proxyStyle->setBaseStyle(nullptr);
QVERIFY(proxyStyle->baseStyle());
- qApp->setStyle(proxyStyle);
+ QApplication::setStyle(proxyStyle);
QProxyStyle* baseStyle = new QProxyStyle("Windows");
QCOMPARE(baseStyle->baseStyle()->objectName(), style->objectName());
@@ -189,10 +174,12 @@ void tst_QStyle::testProxyStyle()
void tst_QStyle::drawItemPixmap()
{
- testWidget->resize(300, 300);
- testWidget->showNormal();
+ MyWidget testWidget;
+ testWidget.setObjectName("testObject");
+ testWidget.resize(300, 300);
+ testWidget.showNormal();
- QImage image = testWidget->grab().toImage();
+ QImage image = testWidget.grab().toImage();
const QRgb green = QColor(Qt::green).rgb();
QVERIFY(image.reinterpretAsFormat(QImage::Format_RGB32));
const QRgb *bits = reinterpret_cast<const QRgb *>(image.constBits());
@@ -201,33 +188,33 @@ void tst_QStyle::drawItemPixmap()
QEXPECT_FAIL("", "QWidget::resize does not work on WinRT", Continue);
#endif
QVERIFY(std::all_of(bits, end, [green] (QRgb r) { return r == green; }));
- testWidget->hide();
}
bool tst_QStyle::testAllFunctions(QStyle *style)
{
QStyleOption opt;
- opt.init(testWidget);
+ QWidget testWidget;
+ opt.init(&testWidget);
- testWidget->setStyle(style);
+ testWidget.setStyle(style);
//Tests styleHint with default arguments for potential crashes
for ( int hint = 0 ; hint < int(QStyle::SH_Menu_Mask); ++hint) {
style->styleHint(QStyle::StyleHint(hint));
- style->styleHint(QStyle::StyleHint(hint), &opt, testWidget);
+ style->styleHint(QStyle::StyleHint(hint), &opt, &testWidget);
}
//Tests pixelMetric with default arguments for potential crashes
for ( int pm = 0 ; pm < int(QStyle::PM_LayoutVerticalSpacing); ++pm) {
style->pixelMetric(QStyle::PixelMetric(pm));
- style->pixelMetric(QStyle::PixelMetric(pm), &opt, testWidget);
+ style->pixelMetric(QStyle::PixelMetric(pm), &opt, &testWidget);
}
//Tests drawControl with default arguments for potential crashes
for ( int control = 0 ; control < int(QStyle::CE_ColumnViewGrip); ++control) {
QPixmap surface(QSize(200, 200));
QPainter painter(&surface);
- style->drawControl(QStyle::ControlElement(control), &opt, &painter, 0);
+ style->drawControl(QStyle::ControlElement(control), &opt, &painter, nullptr);
}
//Tests drawComplexControl with default arguments for potential crashes
@@ -235,35 +222,35 @@ bool tst_QStyle::testAllFunctions(QStyle *style)
QPixmap surface(QSize(200, 200));
QPainter painter(&surface);
QStyleOptionComboBox copt1;
- copt1.init(testWidget);
+ copt1.init(&testWidget);
QStyleOptionGroupBox copt2;
- copt2.init(testWidget);
+ copt2.init(&testWidget);
QStyleOptionSizeGrip copt3;
- copt3.init(testWidget);
+ copt3.init(&testWidget);
QStyleOptionSlider copt4;
- copt4.init(testWidget);
+ copt4.init(&testWidget);
copt4.minimum = 0;
copt4.maximum = 100;
copt4.tickInterval = 25;
copt4.sliderValue = 50;
QStyleOptionSpinBox copt5;
- copt5.init(testWidget);
+ copt5.init(&testWidget);
QStyleOptionTitleBar copt6;
- copt6.init(testWidget);
+ copt6.init(&testWidget);
QStyleOptionToolButton copt7;
- copt7.init(testWidget);
+ copt7.init(&testWidget);
QStyleOptionComplex copt9;
- copt9.initFrom(testWidget);
-
- style->drawComplexControl(QStyle::CC_SpinBox, &copt5, &painter, 0);
- style->drawComplexControl(QStyle::CC_ComboBox, &copt1, &painter, 0);
- style->drawComplexControl(QStyle::CC_ScrollBar, &copt4, &painter, 0);
- style->drawComplexControl(QStyle::CC_Slider, &copt4, &painter, 0);
- style->drawComplexControl(QStyle::CC_ToolButton, &copt7, &painter, 0);
- style->drawComplexControl(QStyle::CC_TitleBar, &copt6, &painter, 0);
- style->drawComplexControl(QStyle::CC_GroupBox, &copt2, &painter, 0);
- style->drawComplexControl(QStyle::CC_Dial, &copt4, &painter, 0);
+ copt9.initFrom(&testWidget);
+
+ style->drawComplexControl(QStyle::CC_SpinBox, &copt5, &painter, nullptr);
+ style->drawComplexControl(QStyle::CC_ComboBox, &copt1, &painter, nullptr);
+ style->drawComplexControl(QStyle::CC_ScrollBar, &copt4, &painter, nullptr);
+ style->drawComplexControl(QStyle::CC_Slider, &copt4, &painter, nullptr);
+ style->drawComplexControl(QStyle::CC_ToolButton, &copt7, &painter, nullptr);
+ style->drawComplexControl(QStyle::CC_TitleBar, &copt6, &painter, nullptr);
+ style->drawComplexControl(QStyle::CC_GroupBox, &copt2, &painter, nullptr);
+ style->drawComplexControl(QStyle::CC_Dial, &copt4, &painter, nullptr);
}
//Check standard pixmaps/icons
@@ -279,20 +266,21 @@ bool tst_QStyle::testAllFunctions(QStyle *style)
}
style->itemPixmapRect(QRect(0, 0, 100, 100), Qt::AlignHCenter, QPixmap(200, 200));
- style->itemTextRect(QFontMetrics(qApp->font()), QRect(0, 0, 100, 100), Qt::AlignHCenter, true, QString("Test"));
+ style->itemTextRect(QFontMetrics(QApplication::font()), QRect(0, 0, 100, 100),
+ Qt::AlignHCenter, true, QLatin1String("Test"));
- return testScrollBarSubControls();
+ return testScrollBarSubControls(style);
}
-bool tst_QStyle::testScrollBarSubControls()
+bool tst_QStyle::testScrollBarSubControls(const QStyle *style)
{
- const auto *style = testWidget->style();
- const bool isMacStyle = style->objectName().toLower() == "macintosh";
+ const bool isMacStyle = style->objectName().compare(QLatin1String("macintosh"),
+ Qt::CaseInsensitive) == 0;
QScrollBar scrollBar;
setFrameless(&scrollBar);
scrollBar.show();
const QStyleOptionSlider opt = qt_qscrollbarStyleOption(&scrollBar);
- foreach (int sc, QList<int>() << 1 << 2 << 4 << 8) {
+ for (int sc : {1, 2, 4, 8}) {
const auto subControl = static_cast<QStyle::SubControl>(sc);
const QRect sr = style->subControlRect(QStyle::CC_ScrollBar, &opt, subControl, &scrollBar);
if (sr.isNull()) {
@@ -310,34 +298,34 @@ bool tst_QStyle::testScrollBarSubControls()
#ifndef QT_NO_STYLE_FUSION
void tst_QStyle::testFusionStyle()
{
- QStyle *fstyle = QStyleFactory::create("Fusion");
- QVERIFY(testAllFunctions(fstyle));
- lineUpLayoutTest(fstyle);
- delete fstyle;
+ QScopedPointer<QStyle> fstyle(QStyleFactory::create("Fusion"));
+ QVERIFY(!fstyle.isNull());
+ QVERIFY(testAllFunctions(fstyle.data()));
+ lineUpLayoutTest(fstyle.data());
}
#endif
void tst_QStyle::testWindowsStyle()
{
- QStyle *wstyle = QStyleFactory::create("Windows");
- QVERIFY(testAllFunctions(wstyle));
- lineUpLayoutTest(wstyle);
+ QScopedPointer<QStyle> wstyle(QStyleFactory::create("Windows"));
+ QVERIFY(!wstyle.isNull());
+ QVERIFY(testAllFunctions(wstyle.data()));
+ lineUpLayoutTest(wstyle.data());
// Tests drawing indeterminate progress with 0 size: QTBUG-15973
QStyleOptionProgressBar pb;
pb.rect = QRect(0,0,-9,0);
QPixmap surface(QSize(200, 200));
QPainter painter(&surface);
- wstyle->drawControl(QStyle::CE_ProgressBar, &pb, &painter, 0);
- delete wstyle;
+ wstyle->drawControl(QStyle::CE_ProgressBar, &pb, &painter, nullptr);
}
#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) && !defined(Q_OS_WINRT)
void tst_QStyle::testWindowsVistaStyle()
{
- QStyle *vistastyle = QStyleFactory::create("WindowsVista");
- QVERIFY(testAllFunctions(vistastyle));
- delete vistastyle;
+ QScopedPointer<QStyle> vistastyle(QStyleFactory::create("WindowsVista"));
+ QVERIFY(!vistastyle.isNull());
+ QVERIFY(testAllFunctions(vistastyle.data()));
}
#endif
@@ -351,14 +339,7 @@ void tst_QStyle::testMacStyle()
#endif
// Helper class...
-
-MyWidget::MyWidget( QWidget* parent, const char* name )
- : QWidget( parent )
-{
- setObjectName(name);
-}
-
-void MyWidget::paintEvent( QPaintEvent* )
+void MyWidget::paintEvent(QPaintEvent *)
{
QPainter p(this);
QPixmap big(400,400);
@@ -371,20 +352,12 @@ class Qt42Style : public QCommonStyle
{
Q_OBJECT
public:
- Qt42Style() : QCommonStyle()
- {
- margin_toplevel = 10;
- margin = 5;
- spacing = 0;
- }
-
- virtual int pixelMetric(PixelMetric metric, const QStyleOption * option = 0,
- const QWidget * widget = 0 ) const;
-
- int margin_toplevel;
- int margin;
- int spacing;
+ int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr,
+ const QWidget *widget = nullptr) const override;
+ int margin_toplevel = 10;
+ int margin = 5;
+ int spacing = 0;
};
int Qt42Style::pixelMetric(PixelMetric metric, const QStyleOption * /* option = 0*/,
@@ -393,13 +366,10 @@ int Qt42Style::pixelMetric(PixelMetric metric, const QStyleOption * /* option =
switch (metric) {
case QStyle::PM_DefaultTopLevelMargin:
return margin_toplevel;
- break;
case QStyle::PM_DefaultChildMargin:
return margin;
- break;
case QStyle::PM_DefaultLayoutSpacing:
return spacing;
- break;
default:
break;
}
@@ -409,7 +379,7 @@ int Qt42Style::pixelMetric(PixelMetric metric, const QStyleOption * /* option =
void tst_QStyle::pixelMetric()
{
- Qt42Style *style = new Qt42Style();
+ QScopedPointer<Qt42Style> style(new Qt42Style);
QCOMPARE(style->pixelMetric(QStyle::PM_DefaultTopLevelMargin), 10);
QCOMPARE(style->pixelMetric(QStyle::PM_DefaultChildMargin), 5);
QCOMPARE(style->pixelMetric(QStyle::PM_DefaultLayoutSpacing), 0);
@@ -427,8 +397,6 @@ void tst_QStyle::pixelMetric()
QCOMPARE(style->pixelMetric(QStyle::PM_DefaultTopLevelMargin), -1);
QCOMPARE(style->pixelMetric(QStyle::PM_DefaultChildMargin), -1);
QCOMPARE(style->pixelMetric(QStyle::PM_DefaultLayoutSpacing), -1);
-
- delete style;
}
#if !defined(QT_NO_STYLE_WINDOWS) && !defined(QT_NO_STYLE_FUSION)
@@ -474,10 +442,11 @@ void tst_QStyle::lineUpLayoutTest(QStyle *style)
layout.addWidget(&lineedit);
layout.addWidget(&combo);
widget.setLayout(&layout);
- widget.setStyle(style);
- // propagate the style.
- foreach (QWidget *w, widget.findChildren<QWidget *>())
- w->setStyle(style);
+ widget.setStyle(style);
+ // propagate the style.
+ const auto children = widget.findChildren<QWidget *>();
+ for (QWidget *w : children)
+ w->setStyle(style);
widget.show();
QVERIFY(QTest::qWaitForWindowExposed(&widget));
@@ -498,31 +467,32 @@ void tst_QStyle::lineUpLayoutTest(QStyle *style)
void tst_QStyle::defaultFont()
{
- QFont defaultFont = qApp->font();
+ QFont defaultFont = QApplication::font();
QFont pointFont = defaultFont;
pointFont.setPixelSize(9);
- qApp->setFont(pointFont);
+ QApplication::setFont(pointFont);
QPushButton button;
setFrameless(&button);
button.show();
- qApp->processEvents();
- qApp->setFont(defaultFont);
+ QCoreApplication::processEvents();
+ QApplication::setFont(defaultFont);
}
class DrawTextStyle : public QProxyStyle
{
Q_OBJECT
public:
- DrawTextStyle(QStyle *base = 0) : QProxyStyle(), alignment(0) { setBaseStyle(base); }
+ using QProxyStyle::QProxyStyle;
+
void drawItemText(QPainter *painter, const QRect &rect,
- int flags, const QPalette &pal, bool enabled,
- const QString &text, QPalette::ColorRole textRole = QPalette::NoRole) const
+ int flags, const QPalette &pal, bool enabled,
+ const QString &text, QPalette::ColorRole textRole = QPalette::NoRole) const override
{
- DrawTextStyle *that = (DrawTextStyle *)this;
- that->alignment = flags;
+ alignment = flags;
QProxyStyle::drawItemText(painter, rect, flags, pal, enabled, text, textRole);
}
- int alignment;
+
+ mutable int alignment = 0;
};
@@ -533,46 +503,48 @@ void tst_QStyle::testDrawingShortcuts()
setFrameless(&w);
QToolButton *tb = new QToolButton(&w);
tb->setText("&abc");
- DrawTextStyle *dts = new DrawTextStyle;
+ QScopedPointer<DrawTextStyle> dts(new DrawTextStyle);
w.show();
- tb->setStyle(dts);
+ tb->setStyle(dts.data());
tb->grab();
QStyleOptionToolButton sotb;
sotb.initFrom(tb);
bool showMnemonic = dts->styleHint(QStyle::SH_UnderlineShortcut, &sotb, tb);
QVERIFY(dts->alignment & (showMnemonic ? Qt::TextShowMnemonic : Qt::TextHideMnemonic));
- delete dts;
}
{
QToolBar w;
setFrameless(&w);
QToolButton *tb = new QToolButton(&w);
tb->setText("&abc");
- DrawTextStyle *dts = new DrawTextStyle;
+ QScopedPointer<DrawTextStyle> dts(new DrawTextStyle);
w.addWidget(tb);
w.show();
- tb->setStyle(dts);
+ tb->setStyle(dts.data());
tb->grab();
QStyleOptionToolButton sotb;
sotb.initFrom(tb);
bool showMnemonic = dts->styleHint(QStyle::SH_UnderlineShortcut, &sotb, tb);
QVERIFY(dts->alignment & (showMnemonic ? Qt::TextShowMnemonic : Qt::TextHideMnemonic));
- delete dts;
}
}
-#define SCROLLBAR_SPACING 33
+static const int SCROLLBAR_SPACING = 33;
class FrameTestStyle : public QProxyStyle {
public:
FrameTestStyle() : QProxyStyle("Windows") { }
- int styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *widget, QStyleHintReturn *returnData) const {
+
+ int styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *widget,
+ QStyleHintReturn *returnData) const override
+ {
if (hint == QStyle::SH_ScrollView_FrameOnlyAroundContents)
return 1;
return QProxyStyle ::styleHint(hint, opt, widget, returnData);
}
- int pixelMetric(PixelMetric pm, const QStyleOption *option, const QWidget *widget) const {
+ int pixelMetric(PixelMetric pm, const QStyleOption *option, const QWidget *widget) const override
+ {
if (pm == QStyle::PM_ScrollView_ScrollBarSpacing)
return SCROLLBAR_SPACING;
return QProxyStyle ::pixelMetric(pm, option ,widget);
@@ -583,12 +555,12 @@ void tst_QStyle::testFrameOnlyAroundContents()
{
QScrollArea area;
area.setGeometry(0, 0, 200, 200);
- QStyle *winStyle = QStyleFactory::create("Windows");
+ QScopedPointer<QStyle> winStyle(QStyleFactory::create("Windows"));
FrameTestStyle frameStyle;
QWidget *widget = new QWidget(&area);
widget->setGeometry(0, 0, 400, 400);
- area.setStyle(winStyle);
- area.verticalScrollBar()->setStyle(winStyle);
+ area.setStyle(winStyle.data());
+ area.verticalScrollBar()->setStyle(winStyle.data());
area.setWidget(widget);
area.setVisible(true);
int viewPortWidth = area.viewport()->width();
@@ -598,8 +570,7 @@ void tst_QStyle::testFrameOnlyAroundContents()
#ifdef Q_OS_WINRT
QEXPECT_FAIL("", "QWidget::setGeometry does not work on WinRT", Continue);
#endif
- QVERIFY(viewPortWidth == area.viewport()->width() + SCROLLBAR_SPACING);
- delete winStyle;
+ QCOMPARE(viewPortWidth, area.viewport()->width() + SCROLLBAR_SPACING);
}
@@ -607,16 +578,16 @@ class ProxyTest: public QProxyStyle
{
Q_OBJECT
public:
- ProxyTest(QStyle *style = 0)
- :QProxyStyle(style)
- , called(false)
- {}
+ using QProxyStyle::QProxyStyle;
- void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const override {
+ void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,
+ const QWidget *w) const override
+ {
called = true;
return QProxyStyle::drawPrimitive(pe, opt, p, w);
}
- mutable bool called;
+
+ mutable bool called = false;
};
@@ -630,17 +601,16 @@ void tst_QStyle::testProxyCalled()
QPixmap surface(QSize(200, 200));
QPainter painter(&surface);
- QStringList keys = QStyleFactory::keys();
+ const QStringList keys = QStyleFactory::keys();
QVector<QStyle*> styles;
styles.reserve(keys.size() + 1);
styles << new QCommonStyle();
- Q_FOREACH (const QString &key, keys) {
+ for (const QString &key : keys)
styles << QStyleFactory::create(key);
- }
- Q_FOREACH (QStyle *style, styles) {
+ for (QStyle *style : styles) {
ProxyTest testStyle;
testStyle.setBaseStyle(style);
style->drawControl(QStyle::CE_ToolButtonLabel, &opt, &painter, &b);
@@ -654,11 +624,9 @@ class TestStyleOptionInitProxy: public QProxyStyle
{
Q_OBJECT
public:
- mutable bool invalidOptionsDetected;
- explicit TestStyleOptionInitProxy(QStyle *style = nullptr)
- : QProxyStyle(style),
- invalidOptionsDetected(false)
- {}
+ mutable bool invalidOptionsDetected = false;
+
+ using QProxyStyle::QProxyStyle;
void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const override {
checkStyleEnum<QStyle::PrimitiveElement>(pe, opt);
@@ -743,7 +711,7 @@ void tst_QStyle::testStyleOptionInit()
QStringList keys = QStyleFactory::keys();
keys.prepend(QString()); // QCommonStyle marker
- Q_FOREACH (const QString &key, keys) {
+ for (const QString &key : qAsConst(keys)) {
QStyle* style = key.isEmpty() ? new QCommonStyle : QStyleFactory::create(key);
TestStyleOptionInitProxy testStyle;
testStyle.setBaseStyle(style);
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index a671a6c4d8..400e46cb97 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.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 test suite of the Qt Toolkit.
@@ -25,12 +25,40 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtCore>
-#include <QtGui>
-#include <QtWidgets>
+
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QCheckBox>
+#include <QtWidgets/QComboBox>
+#include <QtWidgets/QDateEdit>
+#include <QtWidgets/QDialog>
+#include <QtWidgets/QDialogButtonBox>
+#include <QtWidgets/QGridLayout>
+#include <QtWidgets/QGroupBox>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QHeaderView>
+#include <QtWidgets/QLineEdit>
+#include <QtWidgets/QMainWindow>
+#include <QtWidgets/QMenu>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QProgressBar>
+#include <QtWidgets/QSpinBox>
+#include <QtWidgets/QSplitter>
+#include <QtWidgets/QStyle>
+#include <QtWidgets/QStyleFactory>
+#include <QtWidgets/QTableWidget>
+#include <QtWidgets/QToolButton>
+#include <QtWidgets/QToolTip>
+#include <QtWidgets/QTreeView>
+#include <QtWidgets/QVBoxLayout>
+
+#include <QtGui/QPainter>
+#include <QtGui/QScreen>
+
#include <QtTest/QtTest>
-#include <QtDebug>
-#include <QMetaObject>
+
+#include <QtCore/QDebug>
+#include <QtCore/QMetaObject>
+#include <QtCore/QScopedPointer>
#include <private/qstylesheetstyle_p.h>
#include <private/qhighdpiscaling_p.h>
@@ -43,10 +71,12 @@ class tst_QStyleSheetStyle : public QObject
Q_OBJECT
public:
tst_QStyleSheetStyle();
- ~tst_QStyleSheetStyle();
+
+ static void initMain();
private slots:
void init();
+ void cleanup();
void repolish();
void repolish_without_crashing();
void numinstances();
@@ -77,7 +107,7 @@ private slots:
void hoverColors();
#endif
void background();
- void tabAlignement();
+ void tabAlignment();
void attributesList();
void minmaxSizes();
void task206238_twice();
@@ -107,37 +137,53 @@ private slots:
void highdpiImages();
private:
- QColor COLOR(const QWidget& w) {
+ static QColor COLOR(const QWidget &w)
+ {
w.ensurePolished();
return w.palette().color(w.foregroundRole());
}
- QColor APPCOLOR(const QWidget& w) {
+
+ static QColor APPCOLOR(const QWidget &w)
+ {
w.ensurePolished();
- return qApp->palette(&w).color(w.foregroundRole());
+ return QApplication::palette(&w).color(w.foregroundRole());
}
- QColor BACKGROUND(const QWidget& w) {
+
+ static QColor BACKGROUND(const QWidget &w)
+ {
w.ensurePolished();
return w.palette().color(w.backgroundRole());
}
- QColor APPBACKGROUND(const QWidget& w) {
+
+ static QColor APPBACKGROUND(const QWidget &w)
+ {
w.ensurePolished();
- return qApp->palette(&w).color(w.backgroundRole());
+ return QApplication::palette(&w).color(w.backgroundRole());
}
- int FONTSIZE(const QWidget &w) {
+
+ static int FONTSIZE(const QWidget &w)
+ {
w.ensurePolished();
return w.font().pointSize();
}
- int APPFONTSIZE(const QWidget &w) {
- return qApp->font(&w).pointSize();
- }
+
+ static int APPFONTSIZE(const QWidget &w) { return QApplication::font(&w).pointSize(); }
+
+ const QRect m_availableGeometry = QGuiApplication::primaryScreen()->availableGeometry();
+ QSize m_testSize;
};
-tst_QStyleSheetStyle::tst_QStyleSheetStyle()
+// highdpiImages() tests HighDPI scaling; disable initially.
+void tst_QStyleSheetStyle::initMain()
{
+ QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
}
-tst_QStyleSheetStyle::~tst_QStyleSheetStyle()
+tst_QStyleSheetStyle::tst_QStyleSheetStyle()
{
+ const int testSize = qMax(200, m_availableGeometry.width() / 10);
+ m_testSize.setWidth(testSize);
+ m_testSize.setHeight(testSize);
}
void tst_QStyleSheetStyle::init()
@@ -146,10 +192,16 @@ void tst_QStyleSheetStyle::init()
QCoreApplication::setAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles, false);
}
+void tst_QStyleSheetStyle::cleanup()
+{
+ QTRY_VERIFY(QApplication::topLevelWidgets().isEmpty());
+}
+
void tst_QStyleSheetStyle::numinstances()
{
QWidget w;
- w.resize(200, 200);
+ w.setWindowTitle(QTest::currentTestFunction());
+ w.resize(m_testSize);
centerOnScreen(&w);
QCommonStyle *style = new QCommonStyle;
style->setParent(&w);
@@ -175,7 +227,7 @@ void tst_QStyleSheetStyle::numinstances()
QCOMPARE(QStyleSheetStyle::numinstances, 0);
// set and unset widget stylesheet
- w.setStyle(0);
+ w.setStyle(nullptr);
w.setStyleSheet("color: red");
QCOMPARE(QStyleSheetStyle::numinstances, 1);
c.setStyle(style);
@@ -325,7 +377,7 @@ void tst_QStyleSheetStyle::reparentWithNoChildStyleSheet()
QCOMPARE(COLOR(c1), red);
qApp->setStyleSheet("* { color: blue }");
- c1.setParent(0);
+ c1.setParent(nullptr);
QCOMPARE(COLOR(c1), blue);
delete pb;
}
@@ -372,6 +424,8 @@ void tst_QStyleSheetStyle::repolish_without_crashing()
{
// This used to crash, QTBUG-69204
QMainWindow w;
+ w.resize(m_testSize);
+ w.setWindowTitle(QTest::currentTestFunction());
QScopedPointer<QSplitter> splitter1(new QSplitter(w.centralWidget()));
QScopedPointer<QSplitter> splitter2(new QSplitter);
QScopedPointer<QSplitter> splitter3(new QSplitter);
@@ -408,7 +462,7 @@ void tst_QStyleSheetStyle::widgetStyle()
QPointer<QStyle> style1 = QStyleFactory::create("Windows");
QPointer<QStyle> style2 = QStyleFactory::create("Windows");
- QStyle *appStyle = qApp->style();
+ QStyle *appStyle = QApplication::style();
// Sanity: By default, a window inherits the application style
QCOMPARE(appStyle, window1->style());
@@ -423,7 +477,7 @@ void tst_QStyleSheetStyle::widgetStyle()
QVERIFY(!style1.isNull()); // case we have not already crashed
// Setting null style must make it follow the qApp style
- window1->setStyle(0);
+ window1->setStyle(nullptr);
QCOMPARE(window1->style(), appStyle);
QVERIFY(!style2.isNull()); // case we have not already crashed
QVERIFY(!style2.isNull()); // case we have not already crashed
@@ -431,16 +485,15 @@ void tst_QStyleSheetStyle::widgetStyle()
// Sanity: Set the stylesheet
window1->setStyleSheet(":x { }");
- QPointer<QStyleSheetStyle> proxy = (QStyleSheetStyle *)window1->style();
+ QPointer<QStyleSheetStyle> proxy = qobject_cast<QStyleSheetStyle *>(window1->style());
QVERIFY(!proxy.isNull());
- QCOMPARE(proxy->metaObject()->className(), "QStyleSheetStyle"); // must be our proxy
- QVERIFY(proxy->base == 0); // and follows the application
+ QCOMPARE(proxy->base, nullptr); // and follows the application
// Set the stylesheet
window1->setStyle(style1);
QVERIFY(proxy.isNull()); // we create a new one each time
- proxy = (QStyleSheetStyle *)window1->style();
- QCOMPARE(proxy->metaObject()->className(), "QStyleSheetStyle"); // it is a proxy
+ proxy = qobject_cast<QStyleSheetStyle *>(window1->style());
+ QVERIFY(!proxy.isNull()); // it is a proxy
QCOMPARE(proxy->baseStyle(), style1.data()); // must have been replaced with the new one
// Update the stylesheet and check nothing changes
@@ -449,15 +502,15 @@ void tst_QStyleSheetStyle::widgetStyle()
QCOMPARE(proxy->baseStyle(), style1.data()); // the same guy
// Remove the stylesheet
- proxy = (QStyleSheetStyle *)window1->style();
+ proxy = qobject_cast<QStyleSheetStyle *>(window1->style());
window1->setStyleSheet(QString());
QVERIFY(proxy.isNull()); // should have disappeared
QCOMPARE(window1->style(), style1.data()); // its restored
// Style Sheet existing children propagation
window1->setStyleSheet(":z { }");
- proxy = (QStyleSheetStyle *)window1->style();
- QCOMPARE(proxy->metaObject()->className(), "QStyleSheetStyle");
+ proxy = qobject_cast<QStyleSheetStyle *>(window1->style());
+ QVERIFY(!proxy.isNull()); // it is a proxy
QCOMPARE(window1->style(), widget1->style()); // proxy must have propagated
QCOMPARE(widget2->style(), appStyle); // widget2 is following the app style
@@ -473,55 +526,57 @@ void tst_QStyleSheetStyle::widgetStyle()
// Style Sheet propagation on a child widget with a custom style
widget2->setStyle(style1);
window2->setStyleSheet(":x { }");
- proxy = (QStyleSheetStyle *)widget2->style();
- QCOMPARE(proxy->metaObject()->className(), "QStyleSheetStyle");
+ proxy = qobject_cast<QStyleSheetStyle *>(widget2->style());
+ QVERIFY(!proxy.isNull()); // it is a proxy
QCOMPARE(proxy->baseStyle(), style1.data());
// Style Sheet propagation on a child widget with a custom style already set
window2->setStyleSheet(QString());
QCOMPARE(window2->style(), style2.data());
QCOMPARE(widget2->style(), style1.data());
- widget2->setStyle(0);
+ widget2->setStyle(nullptr);
window2->setStyleSheet(":x { }");
widget2->setStyle(style1);
- proxy = (QStyleSheetStyle *)widget2->style();
- QCOMPARE(proxy->metaObject()->className(), "QStyleSheetStyle");
+ proxy = qobject_cast<QStyleSheetStyle *>(widget2->style());
+ QVERIFY(!proxy.isNull()); // it is a proxy
// QApplication, QWidget both having a style sheet
// clean everything out
- window1->setStyle(0);
+ window1->setStyle(nullptr);
window1->setStyleSheet(QString());
- window2->setStyle(0);
+ window2->setStyle(nullptr);
window2->setStyleSheet(QString());
- qApp->setStyle(0);
+ QApplication::setStyle(nullptr);
qApp->setStyleSheet("may_insanity_prevail { }"); // app has stylesheet
- QCOMPARE(window1->style(), qApp->style());
+ QCOMPARE(window1->style(), QApplication::style());
QCOMPARE(window1->style()->metaObject()->className(), "QStyleSheetStyle");
QCOMPARE(widget1->style()->metaObject()->className(), "QStyleSheetStyle"); // check the child
window1->setStyleSheet("may_more_insanity_prevail { }"); // window has stylesheet
QCOMPARE(window1->style()->metaObject()->className(), "QStyleSheetStyle"); // a new one
QCOMPARE(widget1->style(), window1->style()); // child follows...
- proxy = (QStyleSheetStyle *) window1->style();
+ proxy = qobject_cast<QStyleSheetStyle *>(window1->style());
+ QVERIFY(!proxy.isNull());
QStyle *newStyle = QStyleFactory::create("Windows");
- qApp->setStyle(newStyle); // set a custom style on app
- proxy = (QStyleSheetStyle *) window1->style();
+ QApplication::setStyle(newStyle); // set a custom style on app
+ proxy = qobject_cast<QStyleSheetStyle *>(window1->style());
+ QVERIFY(!proxy.isNull()); // it is a proxy
QCOMPARE(proxy->baseStyle(), newStyle); // magic ;) the widget still follows the application
QCOMPARE(static_cast<QStyle *>(proxy), widget1->style()); // child still follows...
window1->setStyleSheet(QString()); // remove stylesheet
- QCOMPARE(window1->style(), qApp->style()); // is this cool or what
- QCOMPARE(widget1->style(), qApp->style()); // annoying child follows...
+ QCOMPARE(window1->style(), QApplication::style()); // is this cool or what
+ QCOMPARE(widget1->style(), QApplication::style()); // annoying child follows...
QScopedPointer<QStyle> wndStyle(QStyleFactory::create("Windows"));
window1->setStyle(wndStyle.data());
QCOMPARE(window1->style()->metaObject()->className(), "QStyleSheetStyle"); // auto wraps it
QCOMPARE(widget1->style(), window1->style()); // and auto propagates to child
qApp->setStyleSheet(QString()); // remove the app stylesheet
QCOMPARE(window1->style(), wndStyle.data()); // auto dewrap
- QCOMPARE(widget1->style(), qApp->style()); // and child state is restored
- window1->setStyle(0); // let sanity prevail
- qApp->setStyle(0);
+ QCOMPARE(widget1->style(), QApplication::style()); // and child state is restored
+ window1->setStyle(nullptr); // let sanity prevail
+ QApplication::setStyle(nullptr);
delete window1;
delete widget2;
@@ -534,32 +589,32 @@ void tst_QStyleSheetStyle::appStyle()
{
qApp->setStyleSheet(QString());
// qApp style can never be 0
- QVERIFY(QApplication::style() != 0);
+ QVERIFY(QApplication::style() != nullptr);
QPointer<QStyle> style1 = QStyleFactory::create("Windows");
QPointer<QStyle> style2 = QStyleFactory::create("Windows");
- qApp->setStyle(style1);
+ QApplication::setStyle(style1);
// Basic sanity
QCOMPARE(QApplication::style(), style1.data());
- qApp->setStyle(style2);
+ QApplication::setStyle(style2);
QVERIFY(style1.isNull()); // qApp must have taken ownership and deleted it
// Setting null should not crash
- qApp->setStyle(0);
+ QApplication::setStyle(nullptr);
QCOMPARE(QApplication::style(), style2.data());
// Set the stylesheet
qApp->setStyleSheet("whatever");
- QPointer<QStyleSheetStyle> sss = (QStyleSheetStyle *)qApp->style();
+ QPointer<QStyleSheetStyle> sss = static_cast<QStyleSheetStyle *>(QApplication::style());
QVERIFY(!sss.isNull());
QCOMPARE(sss->metaObject()->className(), "QStyleSheetStyle"); // must be our proxy now
QVERIFY(!style2.isNull()); // this should exist as it is the base of the proxy
QCOMPARE(sss->baseStyle(), style2.data());
style1 = QStyleFactory::create("Windows");
- qApp->setStyle(style1);
+ QApplication::setStyle(style1);
QVERIFY(style2.isNull()); // should disappear automatically
QVERIFY(sss.isNull()); // should disappear automatically
// Update the stylesheet and check nothing changes
- sss = (QStyleSheetStyle *)qApp->style();
+ sss = static_cast<QStyleSheetStyle *>(QApplication::style());
qApp->setStyleSheet("whatever2");
QCOMPARE(QApplication::style(), sss.data());
QCOMPARE(sss->baseStyle(), style1.data());
@@ -577,14 +632,15 @@ void tst_QStyleSheetStyle::dynamicProperty()
{
qApp->setStyleSheet(QString());
- QString appStyle = qApp->style()->metaObject()->className();
+ QString appStyle = QApplication::style()->metaObject()->className();
QPushButton pb1(QStringLiteral("dynamicProperty_pb1"));
- pb1.setMinimumWidth(160);
- pb1.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(20, 100));
+ pb1.setMinimumWidth(m_testSize.width());
+ pb1.move(m_availableGeometry.topLeft() + QPoint(20, 100));
QPushButton pb2(QStringLiteral("dynamicProperty_pb2"));
- pb2.setMinimumWidth(160);
- pb2.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(20, 200));
+ pb2.setWindowTitle(QTest::currentTestFunction());
+ pb2.setMinimumWidth(m_testSize.width());
+ pb2.move(m_availableGeometry.topLeft() + QPoint(20, m_testSize.width() + 40));
pb1.setProperty("type", "critical");
qApp->setStyleSheet("*[class~=\"QPushButton\"] { color: red; } *[type=\"critical\"] { background: white; }");
@@ -625,7 +681,7 @@ namespace ns {
class PushButton1 : public QPushButton {
Q_OBJECT
public:
- PushButton1() { }
+ using QPushButton::QPushButton;
};
class PushButton2 : public PushButton1 {
Q_OBJECT
@@ -781,7 +837,7 @@ void tst_QStyleSheetStyle::onWidgetDestroyed()
qApp->setStyleSheet(QString());
QLabel *l = new QLabel;
l->setStyleSheet("QLabel { color: red }");
- QPointer<QStyleSheetStyle> ss = (QStyleSheetStyle *) l->style();
+ QPointer<QStyleSheetStyle> ss = static_cast<QStyleSheetStyle *>(l->style());
delete l;
QVERIFY(ss.isNull());
}
@@ -789,7 +845,8 @@ void tst_QStyleSheetStyle::onWidgetDestroyed()
void tst_QStyleSheetStyle::fontPrecedence()
{
QLineEdit edit;
- edit.setMinimumWidth(200);
+ edit.setWindowTitle(QTest::currentTestFunction());
+ edit.setMinimumWidth(m_testSize.width());
centerOnScreen(&edit);
edit.show();
QFont font;
@@ -817,23 +874,23 @@ void tst_QStyleSheetStyle::fontPrecedence()
}
// Ensure primary will only return true if the color covers more than 50% of pixels
-static bool testForColors(const QImage& image, const QColor& color, bool ensurePrimary=false)
+static bool testForColors(const QImage& image, const QColor &color, bool ensurePrimary = false)
{
int count = 0;
QRgb rgb = color.rgba();
- int totalCount = image.height()*image.width();
+ int totalCount = image.height() * image.width();
for (int y = 0; y < image.height(); ++y) {
for (int x = 0; x < image.width(); ++x) {
// Because of antialiasing we allow a certain range of errors here.
QRgb pixel = image.pixel(x, y);
- if (qAbs((int)(pixel & 0xff) - (int)(rgb & 0xff)) +
- qAbs((int)((pixel & 0xff00) >> 8) - (int)((rgb & 0xff00) >> 8)) +
- qAbs((int)((pixel & 0xff0000) >> 16) - (int)((rgb & 0xff0000) >> 16)) <= 50) {
+ if (qAbs(int(pixel & 0xff) - int(rgb & 0xff)) +
+ qAbs(int((pixel & 0xff00) >> 8) - int((rgb & 0xff00) >> 8)) +
+ qAbs(int((pixel & 0xff0000) >> 16) - int((rgb & 0xff0000) >> 16)) <= 50) {
count++;
if (!ensurePrimary && count >=10 )
return true;
- else if (count > totalCount/2)
+ if (count > totalCount / 2)
return true;
}
}
@@ -842,7 +899,8 @@ static bool testForColors(const QImage& image, const QColor& color, bool ensureP
return false;
}
-class TestDialog : public QDialog {
+class TestDialog : public QDialog
+{
public:
explicit TestDialog(const QString &styleSheet);
@@ -878,8 +936,8 @@ TestDialog::TestDialog(const QString &styleSheet) :
addWidget(spinbox);
QComboBox *combobox = new QComboBox;
combobox->setEditable(true);
- combobox->addItems(QStringList() << "TESTING TESTING");
- addWidget(spinbox);
+ combobox->addItems(QStringList{"TESTING TESTING"});
+ addWidget(combobox);
addWidget(new QLabel("<b>TESTING TESTING</b>"));
}
@@ -921,12 +979,12 @@ void tst_QStyleSheetStyle::focusColors()
QVERIFY2(testForColors(image, QColor(0xe8, 0xff, 0x66)),
(QString::fromLatin1(widget->metaObject()->className())
+ " did not contain background color #e8ff66, using style "
- + QString::fromLatin1(qApp->style()->metaObject()->className()))
+ + QString::fromLatin1(QApplication::style()->metaObject()->className()))
.toLocal8Bit().constData());
QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)),
(QString::fromLatin1(widget->metaObject()->className())
+ " did not contain text color #ff0084, using style "
- + QString::fromLatin1(qApp->style()->metaObject()->className()))
+ + QString::fromLatin1(QApplication::style()->metaObject()->className()))
.toLocal8Bit().constData());
}
}
@@ -1007,20 +1065,14 @@ class SingleInheritanceDialog : public QDialog
{
Q_OBJECT
public:
- SingleInheritanceDialog(QWidget *w = 0) :
- QDialog(w)
- {
- }
+ using QDialog::QDialog;
};
class DoubleInheritanceDialog : public SingleInheritanceDialog
{
Q_OBJECT
public:
- DoubleInheritanceDialog(QWidget *w = 0) :
- SingleInheritanceDialog(w)
- {
- }
+ using SingleInheritanceDialog::SingleInheritanceDialog;
};
void tst_QStyleSheetStyle::background()
@@ -1029,24 +1081,25 @@ void tst_QStyleSheetStyle::background()
const QString styleSheet = QStringLiteral("* { background-color: #e8ff66; }");
QVector<WidgetPtr> widgets;
- const QPoint topLeft = QGuiApplication::primaryScreen()->availableGeometry().topLeft();
+ const QPoint topLeft = m_availableGeometry.topLeft();
// Testing inheritance styling of QDialog.
WidgetPtr toplevel(new SingleInheritanceDialog);
- toplevel->resize(200, 200);
+ toplevel->resize(m_testSize);
toplevel->move(topLeft + QPoint(20, 20));
toplevel->setStyleSheet(styleSheet);
widgets.append(toplevel);
toplevel = WidgetPtr(new DoubleInheritanceDialog);
- toplevel->resize(200, 200);
- toplevel->move(topLeft + QPoint(20, 320));
+ toplevel->resize(m_testSize);
+ toplevel->move(topLeft + QPoint(20, m_testSize.height() + 120));
toplevel->setStyleSheet(styleSheet);
widgets.append(toplevel);
// Testing gradients in QComboBox.
// First color
toplevel = WidgetPtr(new QDialog);
- toplevel->move(topLeft + QPoint(320, 20));
+ toplevel->resize(m_testSize);
+ toplevel->move(topLeft + QPoint(m_testSize.width() + 120, 20));
QGridLayout *layout = new QGridLayout(toplevel.data());
QComboBox* cb = new QComboBox;
cb->setMinimumWidth(160);
@@ -1055,7 +1108,8 @@ void tst_QStyleSheetStyle::background()
widgets.append(toplevel);
// Second color
toplevel = WidgetPtr(new QDialog);
- toplevel->move(topLeft + QPoint(320, 320));
+ toplevel->resize(m_testSize);
+ toplevel->move(topLeft + QPoint(m_testSize.width() + 120, m_testSize.height() + 120));
layout = new QGridLayout(toplevel.data());
cb = new QComboBox;
cb->setMinimumWidth(160);
@@ -1086,9 +1140,10 @@ void tst_QStyleSheetStyle::background()
}
}
-void tst_QStyleSheetStyle::tabAlignement()
+void tst_QStyleSheetStyle::tabAlignment()
{
QWidget topLevel;
+ topLevel.setWindowTitle(QTest::currentTestFunction());
QTabWidget tabWidget(&topLevel);
tabWidget.addTab(new QLabel("tab1"),"tab1");
tabWidget.resize(QSize(400,400));
@@ -1148,6 +1203,8 @@ void tst_QStyleSheetStyle::attributesList()
void tst_QStyleSheetStyle::minmaxSizes()
{
QTabWidget tabWidget;
+ tabWidget.resize(m_testSize);
+ tabWidget.setWindowTitle(QTest::currentTestFunction());
tabWidget.setObjectName("tabWidget");
int index1 = tabWidget.addTab(new QLabel("Tab1"),"a");
@@ -1187,6 +1244,8 @@ void tst_QStyleSheetStyle::task206238_twice()
{
const QColor red(Qt::red);
QMainWindow w;
+ w.resize(m_testSize);
+ w.setWindowTitle(QTest::currentTestFunction());
QTabWidget* tw = new QTabWidget;
tw->addTab(new QLabel("foo"), "test");
w.setCentralWidget(tw);
@@ -1220,6 +1279,8 @@ void tst_QStyleSheetStyle::transparent()
class ProxyStyle : public QStyle
{
+ Q_OBJECT
+
public:
ProxyStyle(QStyle *s)
{
@@ -1227,19 +1288,19 @@ class ProxyStyle : public QStyle
}
void drawControl(ControlElement ce, const QStyleOption *opt,
- QPainter *painter, const QWidget *widget = 0) const;
+ QPainter *painter, const QWidget *widget = nullptr) const override;
void drawPrimitive(QStyle::PrimitiveElement pe,
const QStyleOption* opt,
- QPainter* p ,
- const QWidget* w) const
+ QPainter *p,
+ const QWidget *w) const override
{
style->drawPrimitive(pe, opt, p, w);
}
QRect subElementRect(QStyle::SubElement se,
- const QStyleOption* opt,
- const QWidget* w) const
+ const QStyleOption *opt,
+ const QWidget *w) const override
{
Q_UNUSED(se);
Q_UNUSED(opt);
@@ -1248,64 +1309,64 @@ class ProxyStyle : public QStyle
}
void drawComplexControl(QStyle::ComplexControl cc,
- const QStyleOptionComplex* opt,
- QPainter* p,
- const QWidget* w) const
+ const QStyleOptionComplex *opt,
+ QPainter *p,
+ const QWidget *w) const override
{
style->drawComplexControl(cc, opt, p, w);
}
SubControl hitTestComplexControl(QStyle::ComplexControl cc,
- const QStyleOptionComplex* opt,
- const QPoint& pt,
- const QWidget* w) const
+ const QStyleOptionComplex *opt,
+ const QPoint &pt,
+ const QWidget *w) const override
{
return style->hitTestComplexControl(cc, opt, pt, w);
}
QRect subControlRect(QStyle::ComplexControl cc,
- const QStyleOptionComplex* opt,
+ const QStyleOptionComplex *opt,
QStyle::SubControl sc,
- const QWidget* w) const
+ const QWidget *w) const override
{
return style->subControlRect(cc, opt, sc, w);
}
int pixelMetric(QStyle::PixelMetric pm,
- const QStyleOption* opt,
- const QWidget* w) const
+ const QStyleOption *opt,
+ const QWidget *w) const override
{
return style->pixelMetric(pm, opt, w);
}
QSize sizeFromContents(QStyle::ContentsType ct,
- const QStyleOption* opt,
- const QSize& size,
- const QWidget* w) const
+ const QStyleOption *opt,
+ const QSize &size,
+ const QWidget *w) const override
{
return style->sizeFromContents(ct, opt, size, w);
}
int styleHint(QStyle::StyleHint sh,
- const QStyleOption* opt,
- const QWidget* w,
- QStyleHintReturn* shr) const
+ const QStyleOption *opt,
+ const QWidget *w,
+ QStyleHintReturn *shr) const override
{
return style->styleHint(sh, opt, w, shr);
}
QPixmap standardPixmap(QStyle::StandardPixmap spix,
- const QStyleOption* opt,
- const QWidget* w) const
+ const QStyleOption *opt,
+ const QWidget *w) const override
{
return style->standardPixmap(spix, opt, w);
}
QPixmap generatedIconPixmap(QIcon::Mode mode,
- const QPixmap& pix,
- const QStyleOption* opt) const
+ const QPixmap &pix,
+ const QStyleOption *opt) const override
{
return style->generatedIconPixmap(mode, pix, opt);
}
@@ -1314,14 +1375,14 @@ class ProxyStyle : public QStyle
QSizePolicy::ControlType c2,
Qt::Orientation ori,
const QStyleOption *opt,
- const QWidget *w) const
+ const QWidget *w) const override
{
return style->layoutSpacing(c1, c2, ori, opt, w);
}
QIcon standardIcon(StandardPixmap si,
const QStyleOption *opt,
- const QWidget *w) const
+ const QWidget *w) const override
{
return style->standardIcon(si, opt, w);
}
@@ -1357,15 +1418,15 @@ void tst_QStyleSheetStyle::proxyStyle()
{
//Should not crash; task 158984
- ProxyStyle *proxy = new ProxyStyle(qApp->style());
+ ProxyStyle *proxy = new ProxyStyle(QApplication::style());
QString styleSheet("QPushButton {background-color: red; }");
QWidget *w = new QWidget;
- w->setMinimumWidth(160);
+ w->setMinimumWidth(m_testSize.width());
centerOnScreen(w);
QVBoxLayout *layout = new QVBoxLayout(w);
- QPushButton *pb1 = new QPushButton(qApp->style()->objectName(), w);
+ QPushButton *pb1 = new QPushButton(QApplication::style()->objectName(), w);
layout->addWidget(pb1);
QPushButton *pb2 = new QPushButton("ProxyStyle", w);
@@ -1383,7 +1444,7 @@ void tst_QStyleSheetStyle::proxyStyle()
// In this case it would be the QStyleSheetStyle that is deleted
// later on. We need to get access to the "real" QStyle to be able to
// draw correctly.
- ProxyStyle* newProxy = new ProxyStyle(qApp->style());
+ ProxyStyle *newProxy = new ProxyStyle(QApplication::style());
pb4->setStyle(newProxy);
layout->addWidget(pb4);
@@ -1421,6 +1482,7 @@ void tst_QStyleSheetStyle::emptyStyleSheet()
//empty stylesheet should not change anything
qApp->setStyleSheet(QString());
QWidget w;
+ w.setWindowTitle(QTest::currentTestFunction());
QHBoxLayout layout(&w);
w.setLayout(&layout);
layout.addWidget(new QPushButton("push", &w));
@@ -1479,6 +1541,8 @@ void tst_QStyleSheetStyle::toolTip()
{
qApp->setStyleSheet(QString());
QWidget w;
+ w.resize(m_testSize);
+ w.setWindowTitle(QTest::currentTestFunction());
// Use "Fusion" to prevent the Vista style from clobbering the tooltip palette in polish().
QStyle *fusionStyle = QStyleFactory::create(QLatin1String("Fusion"));
QVERIFY(fusionStyle);
@@ -1512,28 +1576,27 @@ void tst_QStyleSheetStyle::toolTip()
centerOnScreen(&w);
w.show();
- qApp->setActiveWindow(&w);
+ QApplication::setActiveWindow(&w);
QVERIFY(QTest::qWaitForWindowActive(&w));
const QColor normalToolTip = QToolTip::palette().color(QPalette::Inactive, QPalette::ToolTipBase);
- QList<QWidget *> widgets;
- QList<QColor> colors;
-
-
- //tooltip on the widget without stylesheet, then to othes widget, including one without stylesheet
- //(the tooltip will be reused but his colour must change)
- widgets << wid4 << wid1 << wid2 << wid3 << wid4;
- colors << normalToolTip << "#ae2" << "#f81" << "#0b8" << normalToolTip;
-
- for (int i = 0; i < widgets.count() ; i++)
- {
+ // Tooltip on the widget without stylesheet, then to other widget,
+ // including one without stylesheet (the tooltip will be reused,
+ // but its color must change)
+ const QWidgetList widgets{wid4, wid1, wid2, wid3, wid4};
+ const QVector<QColor> colors{normalToolTip, QColor("#ae2"), QColor("#f81"),
+ QColor("#0b8"), normalToolTip};
+
+ QWidgetList topLevels;
+ for (int i = 0; i < widgets.count() ; ++i) {
QWidget *wid = widgets.at(i);
QColor col = colors.at(i);
QToolTip::showText( QPoint(0,0) , "This is " + wid->objectName(), wid);
- QWidget *tooltip = 0;
- foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ topLevels = QApplication::topLevelWidgets();
+ QWidget *tooltip = nullptr;
+ for (QWidget *widget : qAsConst(topLevels)) {
if (widget->inherits("QTipLabel")) {
tooltip = widget;
break;
@@ -1548,17 +1611,18 @@ void tst_QStyleSheetStyle::toolTip()
QTest::qWait(100);
delete wid3; //should not crash;
QTest::qWait(10);
- foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ topLevels = QApplication::topLevelWidgets();
+ for (QWidget *widget : qAsConst(topLevels))
widget->update(); //should not crash either
- }
}
void tst_QStyleSheetStyle::embeddedFonts()
{
//task 235622 and 210551
QSpinBox spin;
- spin.setMinimumWidth(160);
- spin.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(20, 20));
+ spin.setWindowTitle(QTest::currentTestFunction());
+ spin.setMinimumWidth(m_testSize.width());
+ spin.move(m_availableGeometry.topLeft() + QPoint(20, 20));
spin.show();
spin.setStyleSheet("QSpinBox { font-size: 32px; }");
QTest::qWait(20);
@@ -1579,7 +1643,7 @@ void tst_QStyleSheetStyle::embeddedFonts()
//task 242556
QComboBox box;
box.setMinimumWidth(160);
- box.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(20, 120));
+ box.move(m_availableGeometry.topLeft() + QPoint(20, 120));
box.setEditable(true);
box.addItems(QStringList() << "First" << "Second" << "Third");
box.setStyleSheet("QComboBox { font-size: 32px; }");
@@ -1636,19 +1700,17 @@ void tst_QStyleSheetStyle::complexWidgetFocus()
// For this reason, we use unusual and extremely ugly colors! :-)
QDialog frame;
+ frame.setWindowTitle(QTest::currentTestFunction());
frame.setStyleSheet("*:focus { background: black; color: black } "
"QSpinBox::up-arrow:focus, QSpinBox::down-arrow:focus { width: 7px; height: 7px; background: #ff0084 } "
"QComboBox::down-arrow:focus { width: 7px; height: 7px; background: #ff0084 }"
"QSlider::handle:horizontal:focus { width: 7px; height: 7px; background: #ff0084 } ");
- QList<QWidget *> widgets;
- widgets << new QSpinBox;
- widgets << new QComboBox;
- widgets << new QSlider(Qt::Horizontal);
+ const QWidgetList widgets{new QSpinBox, new QComboBox, new QSlider(Qt::Horizontal)};
QLayout* layout = new QGridLayout;
layout->addWidget(new QLineEdit); // Avoids initial focus.
- foreach (QWidget *widget, widgets)
+ for (QWidget *widget : widgets)
layout->addWidget(widget);
frame.setLayout(layout);
@@ -1656,7 +1718,7 @@ void tst_QStyleSheetStyle::complexWidgetFocus()
frame.show();
QApplication::setActiveWindow(&frame);
QVERIFY(QTest::qWaitForWindowActive(&frame));
- foreach (QWidget *widget, widgets) {
+ for (QWidget *widget : widgets) {
widget->setFocus();
QApplication::processEvents();
@@ -1668,7 +1730,7 @@ void tst_QStyleSheetStyle::complexWidgetFocus()
QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)),
(QString::fromLatin1(widget->metaObject()->className())
+ " did not contain text color #ff0084, using style "
- + QString::fromLatin1(qApp->style()->metaObject()->className()))
+ + QString::fromLatin1(QApplication::style()->metaObject()->className()))
.toLocal8Bit().constData());
}
}
@@ -1676,8 +1738,9 @@ void tst_QStyleSheetStyle::complexWidgetFocus()
void tst_QStyleSheetStyle::task188195_baseBackground()
{
QTreeView tree;
+ tree.setWindowTitle(QTest::currentTestFunction());
tree.setStyleSheet( "QTreeView:disabled { background-color:#ab1251; }" );
- tree.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(20, 100));
+ tree.setGeometry(QRect(m_availableGeometry.topLeft() + QPoint(20, 100), m_testSize));
tree.show();
QVERIFY(QTest::qWaitForWindowActive(&tree));
QImage image(tree.width(), tree.height(), QImage::Format_ARGB32);
@@ -1698,7 +1761,8 @@ void tst_QStyleSheetStyle::task188195_baseBackground()
QTableWidget table(12, 12);
table.setItem(0, 0, new QTableWidgetItem());
table.setStyleSheet( "QTableView {background-color: #ff0000}" );
- table.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(300, 100));
+ // This needs to be large so that >50% (excluding header rows/columns) are red.
+ table.setGeometry(QRect(m_availableGeometry.topLeft() + QPoint(300, 100), m_testSize * 2));
table.show();
QVERIFY(QTest::qWaitForWindowActive(&table));
image = QImage(table.width(), table.height(), QImage::Format_ARGB32);
@@ -1720,6 +1784,7 @@ void tst_QStyleSheetStyle::task232085_spinBoxLineEditBg()
spinbox->setValue(8888);
QDialog frame;
+ frame.setWindowTitle(QTest::currentTestFunction());
QLayout* layout = new QGridLayout;
QLineEdit* dummy = new QLineEdit; // Avoids initial focus.
@@ -1746,18 +1811,19 @@ void tst_QStyleSheetStyle::task232085_spinBoxLineEditBg()
QVERIFY2(testForColors(image, QColor(0xe8, 0xff, 0x66)),
(QString::fromLatin1(spinbox->metaObject()->className())
+ " did not contain background color #e8ff66, using style "
- + QString::fromLatin1(qApp->style()->metaObject()->className()))
+ + QString::fromLatin1(QApplication::style()->metaObject()->className()))
.toLocal8Bit().constData());
QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)),
(QString::fromLatin1(spinbox->metaObject()->className())
+ " did not contain text color #ff0084, using style "
- + QString::fromLatin1(qApp->style()->metaObject()->className()))
+ + QString::fromLatin1(QApplication::style()->metaObject()->className()))
.toLocal8Bit().constData());
}
class ChangeEventWidget : public QWidget
-{ public:
- void changeEvent(QEvent * event)
+{
+protected:
+ void changeEvent(QEvent *event) override
{
if(event->type() == QEvent::StyleChange) {
static bool recurse = false;
@@ -1789,10 +1855,10 @@ void tst_QStyleSheetStyle::QTBUG11658_cachecrash()
class Widget : public QWidget
{
public:
- Widget(QWidget *parent = 0)
+ Widget(int minimumWidth, QWidget *parent = nullptr)
: QWidget(parent)
{
- setMinimumWidth(160);
+ setMinimumWidth(minimumWidth);
QVBoxLayout* pLayout = new QVBoxLayout(this);
QCheckBox* pCheckBox = new QCheckBox(this);
pLayout->addWidget(pCheckBox);
@@ -1800,13 +1866,14 @@ void tst_QStyleSheetStyle::QTBUG11658_cachecrash()
QString szStyleSheet = QLatin1String("* { color: red; }");
qApp->setStyleSheet(szStyleSheet);
- qApp->setStyle(QStyleFactory::create(QLatin1String("Windows")));
+ QApplication::setStyle(QStyleFactory::create(QLatin1String("Windows")));
}
};
- Widget *w = new Widget();
+ Widget *w = new Widget(m_testSize.width());
delete w;
- w = new Widget();
+ w = new Widget(m_testSize.width());
+ w->setWindowTitle(QTest::currentTestFunction());
centerOnScreen(w);
w->show();
@@ -1818,15 +1885,17 @@ void tst_QStyleSheetStyle::QTBUG11658_cachecrash()
void tst_QStyleSheetStyle::QTBUG15910_crashNullWidget()
{
struct Widget : QWidget {
- virtual void paintEvent(QPaintEvent* ) {
+ void paintEvent(QPaintEvent *) override
+ {
QStyleOption opt;
opt.init(this);
QPainter p(this);
- style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, 0);
- style()->drawPrimitive(QStyle::PE_Frame, &opt, &p, 0);
- style()->drawControl(QStyle::CE_PushButton, &opt, &p, 0);
+ style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, nullptr);
+ style()->drawPrimitive(QStyle::PE_Frame, &opt, &p, nullptr);
+ style()->drawControl(QStyle::CE_PushButton, &opt, &p, nullptr);
}
} w;
+ w.setWindowTitle(QTest::currentTestFunction());
w.setStyleSheet("* { background-color: white; color:black; border 3px solid yellow }");
w.setMinimumWidth(160);
centerOnScreen(&w);
@@ -1840,10 +1909,13 @@ void tst_QStyleSheetStyle::QTBUG36933_brokenPseudoClassLookup()
const int columnCount = 10;
QTableWidget widget(rowCount, columnCount);
+ widget.resize(m_testSize);
+ widget.setWindowTitle(QTest::currentTestFunction());
for (int row = 0; row < rowCount; ++row) {
+ const QString rowNumber = QLatin1String("row ") + QString::number(row + 1);
for (int column = 0; column < columnCount; ++column) {
- const QString t = QLatin1String("row ") + QString::number(row + 1)
+ const QString t = rowNumber
+ QLatin1String(" column ") + QString::number(column + 1);
widget.setItem(row, column, new QTableWidgetItem(t));
}
@@ -1874,14 +1946,15 @@ void tst_QStyleSheetStyle::QTBUG36933_brokenPseudoClassLookup()
void tst_QStyleSheetStyle::styleSheetChangeBeforePolish()
{
QWidget widget;
+ widget.setWindowTitle(QTest::currentTestFunction());
QVBoxLayout *vbox = new QVBoxLayout(&widget);
QFrame *frame = new QFrame(&widget);
- frame->setFixedSize(200, 200);
+ frame->setFixedSize(m_testSize);
frame->setStyleSheet("background-color: #FF0000;");
frame->setStyleSheet("background-color: #00FF00;");
vbox->addWidget(frame);
QFrame *frame2 = new QFrame(&widget);
- frame2->setFixedSize(200, 200);
+ frame2->setFixedSize(m_testSize);
frame2->setStyleSheet("background-color: #FF0000;");
frame2->setStyleSheet("background-color: #00FF00;");
vbox->addWidget(frame);
@@ -2106,6 +2179,8 @@ void tst_QStyleSheetStyle::highdpiImages()
QFETCH(QColor, color);
QWidget w;
+ w.setWindowTitle(QLatin1String(QTest::currentTestFunction()) + QLatin1String("::")
+ + QLatin1String(QTest::currentDataTag()));
QScreen *screen = QGuiApplication::primaryScreen();
w.move(screen->availableGeometry().topLeft());
QHighDpiScaling::setScreenFactor(screen, screenFactor);
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index 5a51f15008..4ccbe42353 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -107,8 +107,10 @@ private slots:
void csMatchingOnCiSortedModel_data();
void csMatchingOnCiSortedModel();
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
void directoryModel_data();
void directoryModel();
+#endif
void fileSystemModel_data();
void fileSystemModel();
@@ -224,9 +226,14 @@ void tst_QCompleter::setSourceModel(ModelType type)
parent->setText(completionColumn, QLatin1String("p2,c4p2"));
break;
case DIRECTORY_MODEL:
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
completer->setCsvCompletion(false);
completer->setModel(new QDirModel(completer));
completer->setCompletionColumn(0);
+QT_WARNING_POP
+#endif // QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
break;
case FILESYSTEM_MODEL:
completer->setCsvCompletion(false);
@@ -590,6 +597,7 @@ void tst_QCompleter::csMatchingOnCiSortedModel()
filter();
}
+#if QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
void tst_QCompleter::directoryModel_data()
{
delete completer;
@@ -639,6 +647,7 @@ void tst_QCompleter::directoryModel()
#endif
filter();
}
+#endif // QT_CONFIG(dirmodel) && QT_DEPRECATED_SINCE(5, 15)
void tst_QCompleter::fileSystemModel_data()
{
@@ -1057,15 +1066,15 @@ void tst_QCompleter::setters()
delete completer;
completer = new CsvCompleter;
QVERIFY(completer->popup() != nullptr);
- QPointer<QDirModel> dirModel = new QDirModel(completer);
+ QPointer<QStandardItemModel> itemModel(new QStandardItemModel(1, 0, completer));
QAbstractItemModel *oldModel = completer->model();
- completer->setModel(dirModel);
+ completer->setModel(itemModel.data());
QVERIFY(completer->popup()->model() != oldModel);
QCOMPARE(completer->popup()->model(), completer->completionModel());
completer->setPopup(new QListView);
QCOMPARE(completer->popup()->model(), completer->completionModel());
completer->setModel(new QStringListModel(completer));
- QVERIFY(dirModel == nullptr); // must have been deleted
+ QVERIFY(itemModel.isNull()); // must have been deleted
completer->setModel(nullptr);
completer->setWidget(nullptr);
diff --git a/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp b/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp
index 91a9c49b00..64e4582366 100644
--- a/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp
+++ b/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp
@@ -36,6 +36,7 @@ class tst_QSplashScreen : public QObject
private slots:
void checkCloseTime();
+ void checkScreenConstructor();
};
class CloseEventSplash : public QSplashScreen
@@ -69,5 +70,16 @@ void tst_QSplashScreen::checkCloseTime()
QVERIFY(w.windowHandle()->isExposed());
}
+void tst_QSplashScreen::checkScreenConstructor()
+{
+ for (const auto screen : QGuiApplication::screens()) {
+ QSplashScreen splash(screen);
+ splash.show();
+ QCOMPARE(splash.screen(), screen);
+ QVERIFY(splash.windowHandle());
+ QCOMPARE(splash.windowHandle()->screen(), screen);
+ }
+}
+
QTEST_MAIN(tst_QSplashScreen)
#include "tst_qsplashscreen.moc"