<?xml version="1.0" encoding="UTF-8"?>
<!--
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt for Python.
**
** $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$
**
****************************************************************************/
-->
<typesystem package="PySide2.QtGui">
  <load-typesystem name="typesystem_core.xml" generate="no"/>
  <load-typesystem name="core_common.xml" generate="no"/>
  <load-typesystem name="gui_common.xml" generate="no"/>
  <load-typesystem name="openglfunctions_common.xml" generate="no"/>


  <rejection class="^Q.*$" argument-type="^QPlatform.*$"/>
  <function signature="qAlpha(uint)"/>
  <function signature="qBlue(uint)"/>
  <function signature="qGray(int,int,int)"/>
  <function signature="qGray(uint)"/>
  <function signature="qGreen(uint)"/>
  <function signature="qIsGray(uint)"/>
  <function signature="qRed(uint)"/>
  <function signature="qRgb(int,int,int)"/>
  <function signature="qRgba(int,int,int,int)"/>
  <function signature="qFuzzyCompare(QMatrix,QMatrix)"/>
  <function signature="qFuzzyCompare(QTransform,QTransform)"/>
  <function signature="qFuzzyCompare(QQuaternion,QQuaternion)"/>
  <function signature="qFuzzyCompare(QMatrix4x4,QMatrix4x4)"/>
  <function signature="qFuzzyCompare(QVector2D,QVector2D)"/>
  <function signature="qFuzzyCompare(QVector3D,QVector3D)"/>
  <function signature="qFuzzyCompare(QVector4D,QVector4D)"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QStyleFactoryInterface*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QAccessibleFactoryInterface*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QInputContextFactoryInterface*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QGraphicsItem*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QGraphicsLayout*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QAccessibleBridgeFactoryInterface*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QImageIOHandlerFactoryInterface*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QAccessibleInterface*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QTextObjectInterface*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QGraphicsLayoutItem*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QIconEngineFactoryInterface*&gt;"/>
  <rejection class="*" function-name="qobject_interface_iid&lt;QPictureFormatInterface*&gt;"/>

  <rejection class="*" function-name="qobject_cast&lt;QGraphicsLayout*&gt;"/>
  <rejection class="*" function-name="qobject_cast&lt;QGraphicsItem*&gt;"/>
  <rejection class="*" function-name="qobject_cast&lt;QGraphicsLayoutItem*&gt;"/>
  <rejection class="*" function-name="qobject_cast&lt;QGraphicsLayoutItem*&gt;"/>

  <rejection class="*" function-name="qGenericMatrixFromMatrix4x4"/>
  <rejection class="*" function-name="qDrawBorderPixmap"/>
  <rejection class="*" function-name="qDrawPixmaps"/>
  <rejection class="*" function-name="qGenericMatrixToMatrix4x4"/>

  <rejection class="*" function-name="d_func"/>
  <rejection class="*" field-name="d_ptr"/>
  <rejection class="*" field-name="d"/>
  <rejection class="^QOpenGL.*$" argument-type="^(const )?GLboolean ?\*$"/>
  <rejection class="^QOpenGL.*$" argument-type="^GLchar\*$"/>
  <rejection class="^QOpenGL.*$" argument-type="^(const )?GLchar ?\*(const)?\*$"/>
  <rejection class="^QOpenGL.*$" argument-type="^char\*$"/>
  <rejection class="^QOpenGL.*$" argument-type="^(const )?char ?\*\*$"/>
  <rejection class="^QOpenGL.*$" argument-type="GLintptr"/>
  <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/>
  <rejection class="^QOpenGL.*$" argument-type="GLsync"/>
  <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/>
  <rejection class="^QOpenGL.*$" argument-type="^(const )?QMatrix.x. ?\*$"/>
  <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/>
  <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/>
  <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/>
  <rejection class="^QOpenGL.*$" argument-type="^(const )?QVector.D ?\*$"/>
  <rejection class="^QOpenGL.*$" argument-type="^(const )?void ?\*\*$"/>

  <!--
    Event classes have a lot of non-documented protected fields, those fields
    are removed from PySide because they are Qt implementation details,
    besides the fact they are accessible by ordinary event methods.
    -->

  <rejection class="^QAccessible.*Event$" field-name="^m_.*$"/>

  <rejection class="QEnterEvent" field-name="l"/>
  <rejection class="QEnterEvent" field-name="w"/>
  <rejection class="QEnterEvent" field-name="s"/>

  <rejection class="QInputEvent" field-name="modState"/>
  <rejection class="QInputEvent" field-name="modState"/>

  <rejection class="QMouseEvent" field-name="p"/>
  <rejection class="QMouseEvent" field-name="g"/>
  <rejection class="QMouseEvent" field-name="b"/>
  <rejection class="QMouseEvent" field-name="mouseState"/>
  <rejection class="QNativeGestureEvent" field-name="^m.*$"/>

  <rejection class="QHoverEvent" field-name="p"/>
  <rejection class="QHoverEvent" field-name="op"/>

  <rejection class="QWheelEvent" field-name="p"/>
  <rejection class="QWheelEvent" field-name="g"/>
  <rejection class="QWheelEvent" field-name="mouseState"/>
  <rejection class="QWheelEvent" field-name="o"/>

  <rejection class="QTabletEvent" field-name="mPos"/>
  <rejection class="QTabletEvent" field-name="mGPos"/>
  <rejection class="QTabletEvent" field-name="mHiResGlobalPos"/>
  <rejection class="QTabletEvent" field-name="mDev"/>
  <rejection class="QTabletEvent" field-name="mPointerType"/>
  <rejection class="QTabletEvent" field-name="mXT"/>
  <rejection class="QTabletEvent" field-name="mYT"/>
  <rejection class="QTabletEvent" field-name="mZ"/>
  <rejection class="QTabletEvent" field-name="mPress"/>
  <rejection class="QTabletEvent" field-name="mTangential"/>
  <rejection class="QTabletEvent" field-name="mRot"/>
  <rejection class="QTabletEvent" field-name="mUnique"/>
  <rejection class="QTabletEvent" field-name="mExtra"/>

  <rejection class="QKeyEvent" field-name="txt"/>
  <rejection class="QKeyEvent" field-name="k"/>
  <rejection class="QKeyEvent" field-name="c"/>
  <rejection class="QKeyEvent" field-name="auto"/>

  <rejection class="QPaintEvent" field-name="m_rect"/>
  <rejection class="QPaintEvent" field-name="m_region"/>
  <rejection class="QPaintEvent" field-name="m_erased"/>

  <rejection class="QMoveEvent" field-name="p"/>
  <rejection class="QMoveEvent" field-name="oldp"/>

  <rejection class="QResizeEvent" field-name="s"/>
  <rejection class="QResizeEvent" field-name="olds"/>

  <rejection class="QContextMenuEvent" field-name="p"/>
  <rejection class="QContextMenuEvent" field-name="gp"/>
  <rejection class="QContextMenuEvent" field-name="reas"/>

  <rejection class="QDropEvent" field-name="p"/>
  <rejection class="QDropEvent" field-name="mouseState"/>
  <rejection class="QDropEvent" field-name="modState"/>
  <rejection class="QDropEvent" field-name="act"/>
  <rejection class="QDropEvent" field-name="drop_action"/>
  <rejection class="QDropEvent" field-name="default_action"/>
  <rejection class="QDropEvent" field-name="mdata"/>
  <rejection class="QDropEvent" field-name="fmts"/>

  <rejection class="QDragMoveEvent" field-name="rect"/>

  <rejection class="QShortcutEvent" field-name="sequence"/>
  <rejection class="QShortcutEvent" field-name="ambig"/>
  <rejection class="QShortcutEvent" field-name="sid"/>

  <rejection class="QTouchEvent" field-name="_device"/>
  <rejection class="QTouchEvent" field-name="_widget"/>
  <rejection class="QTouchEvent" field-name="_window"/>
  <rejection class="QTouchEvent" field-name="_deviceType"/>
  <rejection class="QTouchEvent" field-name="_touchPointStates"/>
  <rejection class="QTouchEvent" field-name="_touchPoints"/>

  <rejection class="QAbstractTextDocumentLayout::PaintContext" field-name="selections"/>
  <rejection class="QBrush" function-name="cleanUp"/>
  <rejection class="QFont" enum-name="ResolveProperties"/>
  <rejection class="QMotifStyle" field-name="focus"/>
  <rejection class="QPictureIO" function-name="defineIOHandler"/>
  <rejection class="QPolygon" function-name="putPoints"/>
  <rejection class="QPolygon" function-name="setPoints"/>
  <rejection class="QPolygon" function-name="setPoint"/>
  <rejection class="QPolygon" function-name="points"/>
  <rejection class="QPolygon" function-name="point"/>
  <rejection class="QActionGroup" function-name="selected"/>
  <rejection class="QPaintEngine" function-name="fix_neg_rect"/>

  <!-- For Qt::mightBeRichText(QString), Qt::convertFromPlainText(QString,Qt::WhiteSpaceMode)
       Match on files from '/QtGui/' (shadow build) or '/gui/' (developer build)
       or '/QtGui.framework' (macOS) -->
  <namespace-type name="Qt" files="^.*/(gui|QtGui)[/.].*\.h$" extends="PySide2.QtCore"/>

  <primitive-type name="WId" target-lang-api-name="PyLong">
    <conversion-rule>
      <native-to-target file="../glue/qtgui.cpp" snippet="return-pylong-voidptr"/>
      <target-to-native>
        <add-conversion type="PyLong" file="../glue/qtgui.cpp" snippet="conversion-pylong"/>
      </target-to-native>
    </conversion-rule>
  </primitive-type>

  <value-type name="QAccessible">
      <value-type name="State"/>
      <enum-type name="Event"/>
      <enum-type name="Role"/>
      <enum-type name="Text"/>
      <enum-type name="RelationFlag" flags="Relation"/>
      <enum-type name="InterfaceType"/>
      <enum-type name="TextBoundaryType"/>
  </value-type>

  <object-type name="QAccessibleEditableTextInterface"/>
  <object-type name="QAccessibleInterface"/>
  <object-type name="QAccessibleObject"/>
  <object-type name="QAccessibleTableCellInterface"/>
  <object-type name="QAccessibleTextInterface"/>
  <object-type name="QAccessibleValueInterface"/>

  <object-type name="QAccessibleEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::InvalidEvent"/>
  <object-type name="QAccessibleStateChangeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::StateChanged"/>
  <object-type name="QAccessibleTableModelChangeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TableModelChanged">
      <enum-type name="ModelChangeType"/>
  </object-type>
  <object-type name="QAccessibleTextCursorEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextCaretMoved"/>
  <object-type name="QAccessibleTextInsertEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextInserted"/>
  <object-type name="QAccessibleTextRemoveEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextRemoved"/>
  <object-type name="QAccessibleTextSelectionEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextSelectionChanged"/>
  <object-type name="QAccessibleTextUpdateEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::TextUpdated"/>
  <object-type name="QAccessibleValueChangeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QAccessible::ValueChanged"/>

  <value-type name="QTransform">
    <enum-type name="TransformationType"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f, %f, %f, %f, %f, %f, %f, %f"/>
               <replace from="%REPR_ARGS"
                        to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m13(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.m23(), %CPPSELF.m31(), %CPPSELF.m32(), %CPPSELF.m33()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="ddddddddd"/>
              <replace from="%REDUCE_ARGS"
                       to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m13(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.m23(), %CPPSELF.m31(), %CPPSELF.m32(), %CPPSELF.m33()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <modify-function signature="map(qreal,qreal,qreal*,qreal*)const">
        <modify-argument index="0">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_args,number*,number*">
                <replace from="$TYPE" to="qreal"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <!-- ### This is just an overload to "map(qreal,qreal,qreal*,qreal*)const" and can be discarded in Python -->
    <modify-function signature="map(int,int,int*,int*)const" remove="all"/>
    <!-- ### -->

    <modify-function signature="inverted(bool*)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="PyTuple"/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*"/>
      </inject-code>
    </modify-function>
    <add-function signature="quadToQuad(QPolygonF&amp;,QPolygonF&amp;)" return-type="PyObject*" static="true">
      <inject-code file="../glue/qtgui.cpp" snippet="qtransform-quadtoquad"/>
    </add-function>
    <add-function signature="quadToSquare(QPolygonF &amp;)" return-type="PyObject*" static="true">
      <inject-code file="../glue/qtgui.cpp" snippet="qtransform-quadtosquare"/>
    </add-function>

    <add-function signature="squareToQuad(QPolygonF &amp;)" return-type="PyObject*" static="true">
      <inject-code file="../glue/qtgui.cpp" snippet="qtransform-squaretoquad"/>
    </add-function>
    <!-- Disambiguate from Qt3DCore/qtransform.h -->
    <include file-name="QtGui/qtransform.h" location="global"/>
  </value-type>

  <value-type name="QStaticText">
      <enum-type name="PerformanceHint"/>
  </value-type>
  <value-type name="QTextFragment"/>
  <value-type name="QBitmap" >
    <modify-function signature="fromData(QSize,const uchar*,QImage::Format)">
      <modify-argument index="2">
        <replace-type modified-type="PyBuffer"/>
      </modify-argument>
      <inject-code file="../glue/qtgui.cpp" snippet="qbitmap-fromdata"/>
    </modify-function>
  </value-type>
  <value-type name="QTextInlineObject"/>
  <value-type name="QTextDocumentFragment"/>
  <value-type name="QTextOption">
      <enum-type name="Flag" flags="Flags"/>
      <enum-type name="TabType"/>
      <enum-type name="WrapMode"/>
      <value-type name="Tab"/>
  </value-type>
  <value-type name="QTextLine" >
    <enum-type name="CursorPosition"/>
    <enum-type name="Edge"/>
    <modify-function signature="cursorToX(int*,QTextLine::Edge)const" remove="all"/>
    <modify-function signature="cursorToX(int,QTextLine::Edge)const">
        <modify-argument index="0">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
        <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qtextline-cursortox"/>
    </modify-function>
    <modify-function signature="xToCursor(qreal,QTextLine::CursorPosition)const">
      <modify-argument index="2">
        <rename to="edge"/>
      </modify-argument>
    </modify-function>
  </value-type>
  <value-type name="QTextTableFormat"/>
  <value-type name="QTextImageFormat"/>
  <value-type name="QTextFrameFormat" >
    <enum-type name="BorderStyle"/>
    <enum-type name="Position"/>
  </value-type>
  <value-type name="QTextLength">
      <enum-type name="Type"/>
  </value-type>
  <value-type name="QPainterPath">
    <enum-type name="ElementType"/>
    <value-type name="Element">
      <include file-name="QPainterPath" location="global"/>
    </value-type>
  </value-type>
  <value-type name="QPalette">
    <enum-type name="ColorGroup"/>
    <enum-type name="ColorRole"/>
  </value-type>
  <object-type name="QInputMethod">
      <enum-type name="Action"/>
  </object-type>
  <value-type name="QKeySequence">
    <enum-type name="SequenceFormat"/>
    <enum-type name="SequenceMatch"/>
    <enum-type name="StandardKey"/>

    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
               <replace from="%REPR_ARGS"
                        to="(*%CPPSELF)[0], (*%CPPSELF)[1], (*%CPPSELF)[2], (*%CPPSELF)[3]"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="iiii"/>
              <replace from="%REDUCE_ARGS" to="(*%CPPSELF)[0], (*%CPPSELF)[1], (*%CPPSELF)[2], (*%CPPSELF)[3]"/>
            </insert-template>
        </inject-code>
    </add-function>

    <modify-function signature="operator[](uint)const" remove="all"/>
    <add-function signature="__getitem__">
        <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qkeysequence-getitem"/>
    </add-function>

    <!-- ### Not necessary due the PySide QVariant conversion rules -->
    <modify-function signature="operator QVariant()const" remove="all"/>
  </value-type>
  <value-type name="QPicture" >
    <modify-function signature="load(QIODevice*,const char*)" allow-thread="yes"/>
    <modify-function signature="load(const QString&amp;,const char*)" allow-thread="yes"/>
    <modify-function signature="save(QIODevice*,const char*)" allow-thread="yes"/>
    <modify-function signature="save(const QString&amp;,const char*)" allow-thread="yes"/>
    <!-- See bug 759 -->
    <modify-function signature="data()const">
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
        <inject-code file="../glue/qtgui.cpp" snippet="qpicture-data"/>
    </modify-function>
    <modify-function signature="setData(const char*,uint)">
        <modify-argument index="1">
            <replace-type modified-type="PyBuffer"/>
            <conversion-rule class="target">
                <insert-template name="const_char_pybuffer"/>
            </conversion-rule>
            <conversion-rule class="native">
                <insert-template name="pybuffer_const_char"/>
            </conversion-rule>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
            <conversion-rule class="native">
                <insert-template name="uint_remove"/>
            </conversion-rule>
        </modify-argument>
    </modify-function>
  </value-type>
  <value-type name="QRegion" >
    <enum-type name="RegionType"/>
    <!-- ### This operator does not make sense in Python. -->
    <modify-function signature="operator&amp;=(QRegion)" remove="all"/>
    <modify-function signature="operator&amp;=(QRect)" remove="all"/>
    <!-- ### -->
  </value-type>

  <value-type name="QTextBlock">
    <value-type name="iterator" >
      <include file-name="QTextBlock" location="global"/>
      <!-- ### These operators where removed because they don't make sense in Python.
           The iterator methods (__iter__, next) replace this functionality. -->
      <modify-function signature="operator++()" remove="all"/>
      <modify-function signature="operator--()" remove="all"/>
      <!-- ### -->
      <add-function signature="__iter__()" return-type="PyObject*">
        <inject-code class="target" position="beginning">
          <insert-template name="__iter__"/>
        </inject-code>
      </add-function>
      <add-function signature="__next__()" return-type="PyObject*">
        <inject-code class="target" position="beginning">
          <insert-template name="__next__">
            <replace from="%CPPSELF_TYPE" to="QTextBlock::iterator"/>
          </insert-template>
        </inject-code>
      </add-function>
    </value-type>
    <add-function signature="__iter__()" return-type="PyObject*">
        <inject-code class="target" position="beginning">
          <insert-template name="__iter_parent__">
            <replace from="%CPPSELF_TYPE" to="QTextBlock::iterator"/>
          </insert-template>
        </inject-code>
    </add-function>
    <modify-function signature="setUserData(QTextBlockUserData*)">
        <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qtextblock-setuserdata"/>
    </modify-function>
    <modify-function signature="userData()const">
        <modify-argument index="return">
            <define-ownership class="target" owner="default"/>
        </modify-argument>
        <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qtextblock-userdata"/>
    </modify-function>
  </value-type>
  <value-type name="QTextBlockFormat">
    <enum-type name="LineHeightTypes" since="4.8" revision="4800"/>
    <enum-type name="MarkerType" since="5.14"/>
  </value-type>
  <value-type name="QTextTableCellFormat"/>
  <value-type name="QTextCharFormat" >
    <enum-type name="FontPropertiesInheritanceBehavior"/>
    <enum-type name="UnderlineStyle"/>
    <enum-type name="VerticalAlignment"/>
  </value-type>
  <value-type name="QTextFormat" >
    <enum-type name="FormatType"/>
    <enum-type name="ObjectTypes"/>
    <enum-type name="PageBreakFlag" flags="PageBreakFlags"/>
    <enum-type name="Property"/>
  </value-type>
  <value-type name="QTextListFormat">
      <enum-type name="Style"/>
  </value-type>
  <value-type name="QPolygon">
    <extra-includes>
      <include file-name="QMatrix" location="global"/>
      <include file-name="QTransform" location="global"/>
    </extra-includes>
    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qpolygon-reduce">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="N"/>
              <replace from="%REDUCE_ARGS" to="points"/>
            </insert-template>
        </inject-code>
    </add-function>

    <!-- ### "QPolygon(int, const int*)" is an internal constructor. -->
    <modify-function signature="QPolygon(int,const int*)" remove="all"/>
    <!-- ### A QVector parameter, for no defined type, will generate wrong code. -->
    <modify-function signature="operator+=(QVector&lt;QPoint&gt;)" remove="all"/>
    <modify-function signature="operator&lt;&lt;(QPoint)">
        <inject-code file="../glue/qtgui.cpp" snippet="qpolygon-operatorlowerlower"/>
    </modify-function>
    <modify-function signature="operator&lt;&lt;(QVector&lt;QPoint&gt;)">
        <inject-code file="../glue/qtgui.cpp" snippet="qpolygon-operatorlowerlower"/>
    </modify-function>
    <!-- ### -->
  </value-type>
  <value-type name="QPolygonF">
    <extra-includes>
      <include file-name="QMatrix" location="global"/>
      <include file-name="QTransform" location="global"/>
    </extra-includes>
    <!-- ### A QVector parameter, for no defined type, will generate wrong code. -->
    <modify-function signature="operator+=(QVector&lt;QPointF&gt;)" remove="all"/>
    <!-- ### See bug 776 -->
    <modify-function signature="operator&lt;&lt;(QPointF)" remove="all"/>
    <!-- ### See bug 777 -->
    <modify-function signature="operator&lt;&lt;(QVector&lt;QPointF&gt;)" remove="all"/>
    <!-- ### -->
  </value-type>
  <value-type name="QIcon" >
    <enum-type name="Mode"/>
    <enum-type name="State"/>
    <modify-function signature="QIcon(QIconEngine*)">
      <modify-argument index="1">
        <no-null-pointer/>
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
  </value-type>

  <value-type name="QPixmap" >
    <!--<conversion-rule>-->
        <!--<target-to-native replace="no">-->
            <!--<add-conversion type="QVariant" check="%CHECKTYPE[QVariant](%in)">-->
            <!--QVariant in = %CONVERTTOCPP[QVariant](%in);-->
            <!--%out = in.value&lt;%OUTTYPE&gt;();-->
            <!--</add-conversion>-->
        <!--</target-to-native>-->
    <!--</conversion-rule>-->
    <add-function signature="QPixmap(const QImage&amp;)">
        <modify-argument index="1">
            <rename to="image"/>
        </modify-argument>
        <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qpixmap"/>
    </add-function>
    <modify-function signature="QPixmap(const char*const[])">
        <modify-argument index="1">
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="load_xpm"/>
        </inject-code>
    </modify-function>

    <!-- ### Operator ! doesn't make sense in Python. -->
    <modify-function signature="operator!()const" remove="all"/>

    <modify-function signature="loadFromData(const uchar*,uint,const char*,QFlags&lt;Qt::ImageConversionFlag&gt;)">
        <inject-documentation format="target" mode="append">
        This method must be used with an QPixmap object, not the class:

        ::

            # Wrong
            pixmap = QPixmap.loadFromData(...)

            # Right
            pixmap = QPixmap().loadFromData(...)

        </inject-documentation>
      <modify-argument index="1">
        <replace-type modified-type="PyBytes"/>
        <conversion-rule class="native">
            <insert-template name="pybytes_const_uchar"/>
        </conversion-rule>
      </modify-argument>
      <modify-argument index="2">
        <remove-argument/>
        <conversion-rule class="native">
            <insert-template name="pybytes_uint"/>
        </conversion-rule>
      </modify-argument>
    </modify-function>
  </value-type>
  <value-type name="QTextCursor" >
    <extra-includes>
      <include file-name="QTextBlock" location="global"/>
      <include file-name="QTextDocumentFragment" location="global"/>
    </extra-includes>
    <enum-type name="MoveMode"/>
    <enum-type name="MoveOperation"/>
    <enum-type name="SelectionType"/>
    <modify-function signature="selectedTableCells(int*,int*,int*,int*)const">
        <modify-argument index="0">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="int"/>
            </insert-template>
        </inject-code>
        <inject-code class="native" position="end">
            <insert-template name="fix_native_return_number*,number*,number*,number*">
                <replace from="$TYPE" to="int"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="currentFrame()const">
      <modify-argument index="return">
        <define-ownership class="target" owner="default"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="insertTable(int,int,const QTextTableFormat &amp;)">
      <modify-argument index="return">
        <define-ownership class="target" owner="default"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="insertTable(int,int)">
      <modify-argument index="return">
        <define-ownership class="target" owner="default"/>
      </modify-argument>
    </modify-function>
  </value-type>

  <!-- Qt5: this _should_ be obsolete, but QImage is still using it... -->
  <value-type name="QMatrix">
    <extra-includes>
      <include file-name="QPainterPath" location="global"/>
    </extra-includes>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f, %f, %f, %f, %f"/>
               <replace from="%REPR_ARGS"
                        to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.dx(), %CPPSELF.dy()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="dddddd"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.dx(), %CPPSELF.dy()"/>
            </insert-template>
        </inject-code>
    </add-function>
    <modify-function signature="map(int,int,int*,int*)const">
        <modify-argument index="3">
            <remove-argument />
        </modify-argument>
        <modify-argument index="4">
            <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="qmatrix_map"/>
        </inject-code>
    </modify-function>
    <modify-function signature="map(qreal,qreal,qreal*,qreal*)const">
        <modify-argument index="3">
            <remove-argument />
        </modify-argument>
        <modify-argument index="4">
            <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="qmatrix_map"/>
        </inject-code>
    </modify-function>
    <modify-function signature="map(const QPoint&amp;)const">
        <modify-argument index="return">
          <replace-type modified-type="QPoint"/>
        </modify-argument>
        <inject-code file="../glue/qtgui.cpp" snippet="qmatrix-map-point" />
    </modify-function>
    <modify-function signature="inverted(bool*)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="PyTuple"/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*"/>
      </inject-code>
    </modify-function>
  </value-type>

  <value-type name="QConicalGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::ConicalGradient"/>
  <value-type name="QFontInfo"/>
  <value-type name="QRadialGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::RadialGradient"/>
  <value-type name="QFont" >
    <enum-type name="Capitalization"/>
    <enum-type name="SpacingType"/>
    <enum-type name="Stretch"/>
    <enum-type name="Style"/>
    <enum-type name="StyleHint"/>
    <enum-type name="StyleStrategy"/>
    <enum-type name="Weight"/>
    <enum-type name="HintingPreference" since="4.8" revision="4800"/>
    <extra-includes>
      <include file-name="QStringList" location="global"/>
    </extra-includes>
    <modify-function signature="setStyleHint(QFont::StyleHint,QFont::StyleStrategy)">
      <modify-argument index="2">
        <rename to="strategy"/>
      </modify-argument>
    </modify-function>
  </value-type>
  <value-type name="QTextTableCell" >
    <extra-includes>
      <include file-name="QTextCursor" location="global"/>
    </extra-includes>
  </value-type> <!--
  <function signature="QImageCleanupFunction(void*)">
    <extra-includes>
      <include file-name="QImage" location="global"/>
    </extra-includes>
  </function> -->
  <primitive-type name="QImageCleanupFunction"/>
  <value-type name="QImage">
    <enum-type name="Format"/>
    <enum-type name="InvertMode"/>
    <extra-includes>
      <include file-name="QStringList" location="global"/>
      <include file-name="QMatrix" location="global"/>
    </extra-includes>

    <modify-function signature="load(const QString&amp;, const char*)" allow-thread="yes"/>
    <modify-function signature="load(QIODevice*,const char*)" allow-thread="yes"/>
    <modify-function signature="save(const QString&amp;,const char*,int)const" allow-thread="yes"/>
    <modify-function signature="save(QIODevice*,const char*,int)const" allow-thread="yes"/>

    <modify-function signature="QImage(uchar*,int,int,int,QImage::Format,QImageCleanupFunction,void*)">
        <modify-argument index="1">
            <replace-type modified-type="PyBuffer"/>
        </modify-argument>
        <inject-code>
            <insert-template name="qimage_buffer_constructor">
                <replace from="%ARGS" to="%2, %3, %4, %5"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="QImage(uchar*,int,int,QImage::Format,QImageCleanupFunction,void*)">
        <modify-argument index="1">
            <replace-type modified-type="PyBuffer"/>
        </modify-argument>
        <inject-code>
            <insert-template name="qimage_buffer_constructor">
                <replace from="%ARGS" to="%2, %3, %4"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <add-function signature="QImage(QString&amp;,int,int,int,QImage::Format)">
        <inject-code>
            <insert-template name="qimage_buffer_constructor">
                <replace from="%ARGS" to="%2, %3, %4, %5"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="QImage(QString&amp;,int,int,QImage::Format)">
        <inject-code>
            <insert-template name="qimage_buffer_constructor">
                <replace from="%ARGS" to="%2, %3, %4"/>
            </insert-template>
        </inject-code>
    </add-function>

    <!-- The non-const versions are already used -->
    <modify-function signature="QImage(const uchar*,int,int,int,QImage::Format,QImageCleanupFunction,void*)" remove="all"/>
    <modify-function signature="QImage(const uchar*,int,int,QImage::Format,QImageCleanupFunction,void*)" remove="all"/>
    <!-- ### -->

    <modify-function signature="QImage(const char*const[])">
        <modify-argument index="1">
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="load_xpm"/>
        </inject-code>
    </modify-function>
    <!-- ### There is already an fromData with a QByteArray type (that is convertible from Python's str) as the first type. -->
    <modify-function signature="fromData(const uchar*,int,const char*)" remove="all"/>
    <!-- ### There is already an loadFromData with a QByteArray type (that is convertible from Python's str) as the first type. -->
    <modify-function signature="loadFromData(const uchar*,int,const char*)" remove="all"/>

    <modify-function signature="constBits()const" since="4.7">
        <inject-code file="../glue/qtgui.cpp" snippet="qimage-constbits"/>
    </modify-function>
    <modify-function signature="bits()">
        <inject-code file="../glue/qtgui.cpp" snippet="qimage-bits"/>
    </modify-function>
    <modify-function signature="constScanLine(int)const" since="4.7">
        <inject-code file="../glue/qtgui.cpp" snippet="qimage-constscanline"/>
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
    </modify-function>
    <modify-function signature="scanLine(int)">
        <inject-code file="../glue/qtgui.cpp" snippet="qimage-scanline"/>
        <modify-argument index="return">
            <replace-type modified-type="PyObject"/>
        </modify-argument>
    </modify-function>
    <!--
        Only the non-const version of bits() and scanLine() is exported to Python
        If the user don't want to detach the QImage data he must use constBits or constScanLine
        as Python doesn't have the concept of constness.
    -->
    <modify-function signature="bits()const" remove="all"/>
    <modify-function signature="scanLine(int)const" remove="all"/>

    <modify-function signature="invertPixels(QImage::InvertMode)">
      <modify-argument index="1">
        <rename to="mode"/>
      </modify-argument>
    </modify-function>
  </value-type>
  <value-type name="QCursor" >
    <extra-includes>
      <include file-name="QPixmap" location="global"/>
      <include file-name="Qt" location="global"/>
    </extra-includes>
  </value-type>
  <value-type name="QFontDatabase" >
    <extra-includes>
      <include file-name="QStringList" location="global"/>
    </extra-includes>
    <enum-type name="SystemFont"/>
    <enum-type name="WritingSystem"/>
  </value-type>
  <value-type name="QPen">
    <extra-includes>
      <include file-name="QBrush" location="global"/>
    </extra-includes>
  </value-type>
  <value-type name="QBrush">
    <extra-includes>
      <include file-name="QPixmap" location="global"/>
    </extra-includes>
  </value-type>

  <value-type name="QColor">
    <enum-type name="NameFormat"/>
    <enum-type name="Spec"/>
    <extra-includes>
      <include file-name="QVariant" location="global"/>
    </extra-includes>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="qcolor_repr"/>
        </inject-code>
    </add-function>
    <add-function signature="__str__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="qcolor_repr"/>
        </inject-code>
    </add-function>
    <add-function signature="__setstate__(PyObject*)" return-type="PyObject">
        <inject-code file="../glue/qtgui.cpp" snippet="qcolor-setstate"/>
    </add-function>
    <add-function signature="__reduce__" return-type="PyObject">
        <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qcolor-reduce"/>
    </add-function>

    <add-function signature="toTuple" return-type="PyObject">
        <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qcolor-totuple"/>
    </add-function>
    <!-- ### "QColor(QColor::Spec)" is an internal method. -->
    <modify-function signature="QColor(QColor::Spec)" remove="all"/>
    <!-- ### Constructor removed because we already have an overload using QString. -->
    <modify-function signature="QColor(const char*)" remove="all"/>
    <!-- ### -->
    <add-function signature="QColor(QVariant)">
        <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qcolor"/>
    </add-function>
    <!-- get* methods. Inject code -->
    <modify-function signature="getCmyk(int*,int*,int*,int*,int*)">
        <modify-argument index="0">
            <replace-type modified-type="PyObject*"/>
        </modify-argument>
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="5">
            <remove-argument/>
            <remove-default-expression/>
        </modify-argument>

        <inject-code class="target" position="beginning">
            <insert-template name="fix_number*,number*,number*,number*,number*">
                <replace from="$TYPE" to="int"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="getCmykF(qreal*,qreal*,qreal*,qreal*,qreal*)">
        <modify-argument index="0">
            <replace-type modified-type="PyObject*"/>
        </modify-argument>
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="5">
            <remove-argument/>
            <remove-default-expression/>
        </modify-argument>

        <inject-code class="target" position="beginning">
            <insert-template name="fix_number*,number*,number*,number*,number*">
                <replace from="$TYPE" to="qreal"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="getHsl(int*,int*,int*,int*)const" since="4.6">
        <modify-argument index="0">
            <replace-type modified-type="PyObject*"/>
        </modify-argument>
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
            <remove-default-expression/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="int"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="getHslF(qreal*,qreal*,qreal*,qreal*)const" since="4.6">
        <modify-argument index="0">
            <replace-type modified-type="PyObject*"/>
        </modify-argument>
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
            <remove-default-expression/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="qreal"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="getHsv(int*,int*,int*,int*)const">
        <modify-argument index="0">
            <replace-type modified-type="PyObject*"/>
        </modify-argument>
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
            <remove-default-expression/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="int"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="getHsvF(qreal*,qreal*,qreal*,qreal*)const">
        <modify-argument index="0">
            <replace-type modified-type="PyObject*"/>
        </modify-argument>
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
            <remove-default-expression/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="qreal"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="getRgb(int*,int*,int*,int*)const">
        <modify-argument index="0">
            <replace-type modified-type="PyObject*"/>
        </modify-argument>
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
            <remove-default-expression/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="int"/>
            </insert-template>
        </inject-code>
    </modify-function>
    <modify-function signature="getRgbF(qreal*,qreal*,qreal*,qreal*)const">
        <modify-argument index="0">
            <replace-type modified-type="PyObject*"/>
        </modify-argument>
        <modify-argument index="1">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="2">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="3">
            <remove-argument/>
        </modify-argument>
        <modify-argument index="4">
            <remove-argument/>
            <remove-default-expression/>
        </modify-argument>
        <inject-code class="target" position="beginning">
            <insert-template name="fix_number*,number*,number*,number*">
                <replace from="$TYPE" to="qreal"/>
            </insert-template>
        </inject-code>
    </modify-function>
  </value-type>

  <value-type name="QColorSpace" since="5.14">
      <enum-type name="NamedColorSpace"/>
      <enum-type name="Primaries"/>
      <enum-type name="TransferFunction"/>
  </value-type>

  <value-type name="QFontMetricsF" >

    <modify-function signature="boundingRect(QChar)const" rename="boundingRectChar">
      <modify-argument index="1">
        <replace-type modified-type="char"/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="QFontCharFix"/>
     </inject-code>
    </modify-function>

    <modify-function signature="width(QChar)const" rename="widthChar">
      <modify-argument index="1">
        <replace-type modified-type="char"/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="QFontCharFix"/>
     </inject-code>
    </modify-function>

    <modify-function signature="boundingRect(QRectF,int,QString,int,int*)const">
      <modify-argument index="5">
          <replace-type modified-type="PyObject"/>
          <array/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetricsf-boundingrect"/>
    </modify-function>

    <modify-function signature="size(int,QString,int,int*)const">
      <modify-argument index="4">
          <replace-type modified-type="PyObject"/>
          <array/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetricsf-size"/>
    </modify-function>
  </value-type>
  <value-type name="QFontMetrics" >

    <modify-function signature="boundingRect(QChar)const" rename="boundingRectChar">
      <modify-argument index="1">
        <replace-type modified-type="char"/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="QFontCharFix"/>
     </inject-code>
    </modify-function>

    <modify-function signature="width(QChar)const" rename="widthChar">
      <modify-argument index="1">
        <replace-type modified-type="char"/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="QFontCharFix"/>
     </inject-code>
    </modify-function>

    <modify-function signature="boundingRect(int,int,int,int,int,QString,int,int*)const">
      <modify-argument index="8">
          <replace-type modified-type="PyObject"/>
          <array/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetrics-boundingrect-1"/>
    </modify-function>

    <modify-function signature="boundingRect(QRect,int,QString,int,int*)const">
      <modify-argument index="5">
          <replace-type modified-type="PyObject"/>
          <array/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetrics-boundingrect-2"/>
    </modify-function>

    <modify-function signature="size(int,QString,int,int*)const">
      <modify-argument index="4">
          <replace-type modified-type="PyObject"/>
          <array/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetrics-size"/>
    </modify-function>
  </value-type>
  <value-type name="QGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::NoGradient">
      <enum-type name="CoordinateMode"/>
      <enum-type name="InterpolationMode"/>
      <enum-type name="Preset" since="5.12"/>
      <enum-type name="Spread"/>
      <enum-type name="Type"/>
  </value-type>
  <value-type name="QLinearGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::LinearGradient"/>
  <object-type name="QPaintDevice">
      <enum-type name="PaintDeviceMetric"/>
  </object-type>
  <object-type name="QPagedPaintDevice">
    <value-type name="Margins"/>
    <enum-type name="PageSize"/>
    <enum-type name="PdfVersion" since="5.10"/>
  </object-type>
  <object-type name="QAbstractTextDocumentLayout">
    <value-type name="PaintContext" >
      <include file-name="QAbstractTextDocumentLayout" location="global"/>
    </value-type>
    <value-type name="Selection"/>
    <modify-function signature="setPaintDevice(QPaintDevice*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="draw(QPainter*,QAbstractTextDocumentLayout::PaintContext)">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="drawInlineObject(QPainter*,QRectF,QTextInlineObject,int,QTextFormat)">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="update(const QRectF &amp;)" allow-thread="yes"/>
  </object-type>
  <object-type name="QPyTextObject"/>

  <object-type name="QDesktopServices" since="4.2">
    <modify-function signature="openUrl(const QUrl&amp;)" allow-thread="yes"/>
  </object-type>
  <object-type name="QDoubleValidator">
      <enum-type name="Notation"/>
  </object-type>
  <object-type name="QIconEngine">
    <object-type name="AvailableSizesArgument"/>
    <enum-type name="IconEngineHook"/>
    <modify-function signature="paint(QPainter*,QRect,QIcon::Mode,QIcon::State)">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="read(QDataStream&amp;)">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="write(QDataStream&amp;)const">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <!-- ### This makes little sense in Python. Could be reassessed later. -->
    <modify-function signature="virtual_hook(int,void*)" remove="all"/>
  </object-type>
  <object-type name="QImageWriter">
    <enum-type name="ImageWriterError"/>
    <modify-function signature="setDevice(QIODevice*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="write(const QImage&amp;)" allow-thread="yes"/>
  </object-type>
  <object-type name="QIntValidator"/>

  <object-type name="QPainterPathStroker" copyable="false"/>
  <object-type name="QPictureIO">
    <modify-function signature="setIODevice(QIODevice*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="read()" allow-thread="yes"/>
    <modify-function signature="write()" allow-thread="yes"/>
  </object-type>
  <object-type name="QPixmapCache">
    <value-type name="Key"/>
    <add-function signature="find(QPixmapCache::Key&amp;)">
        <inject-code file="../glue/qtgui.cpp" snippet="qpixmapcache-find"/>
    </add-function>
  </object-type>

  <object-type name="QRegExpValidator"/>

  <object-type name="QStandardItem">
    <enum-type name="ItemType"/>
    <modify-function signature="operator&lt;(QStandardItem)const">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="read(QDataStream&amp;)">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="write(QDataStream&amp;)const">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>

    <modify-function signature="appendColumn(const QList&lt;QStandardItem*&gt; &amp;)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="appendRow(const QList&lt;QStandardItem*&gt; &amp;)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="appendRow(QStandardItem*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="appendRows(const QList&lt;QStandardItem*&gt; &amp;)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="insertColumn(int,const QList&lt;QStandardItem*&gt; &amp;)">
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="insertRow(int,const QList&lt;QStandardItem*&gt; &amp;)">
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="insertRows(int,const QList&lt;QStandardItem*&gt; &amp;)">
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="setChild(int,int,QStandardItem*)">
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditem-setchild-1"/>
      <modify-argument index="3">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="setChild(int,QStandardItem*)">
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditem-setchild-2"/>
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

     <modify-function signature="takeChild(int,int)">
      <modify-argument index="return">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="clone()const">
      <modify-argument index="return">
        <define-ownership class="native" owner="c++"/>
        <define-ownership class="target" owner="target"/>
      </modify-argument>
    </modify-function>

    <!-- ??? -->
    <modify-function signature="operator&lt;(QStandardItem)const" remove="all"/>
  </object-type>
  <object-type name="QSyntaxHighlighter">
    <modify-function signature="setCurrentBlockUserData(QTextBlockUserData*)">
      <modify-argument index="1">
        <define-ownership class="target" owner="c++"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="setDocument(QTextDocument*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="document()const">
      <modify-argument index="this">
        <parent index="return" action="add"/>
      </modify-argument>
    </modify-function>
  </object-type>
  <object-type name="QTextBlockGroup"/>
  <object-type name="QTextBlockUserData"/>
  <object-type name="QTextItem">
      <enum-type name="RenderFlag" flags="RenderFlags"/>
  </object-type>
  <object-type name="QTextList" >
    <!--### Obsolete in 4.3-->
    <modify-function signature="isEmpty()const" remove="all"/>
  </object-type>
  <object-type name="QTextObject"/>
  <object-type name="QTextObjectInterface" >
    <modify-function signature="drawObject(QPainter*,QRectF,QTextDocument*,int,QTextFormat)">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
  </object-type>

  <object-type name="QValidator">
    <enum-type name="State"/>
    <modify-function signature="fixup(QString &amp;)const">
      <modify-argument index="return">
        <replace-type modified-type="QString"/>
      </modify-argument>
      <inject-code class="native" position="end">
        <insert-template name="return_QString_native"/>
      </inject-code>
      <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qstring-return"/>
    </modify-function>
    <modify-function signature="validate(QString &amp;,int &amp;)const">
      <modify-argument index="return">
        <replace-type modified-type="PyObject"/>
        <conversion-rule class="native">
            <insert-template name="validator_conversionrule"/>
        </conversion-rule>
      </modify-argument>
      <inject-code class="target" position="end">
        <insert-template name="return_tuple_QValidator_QString_int"/>
      </inject-code>
    </modify-function>
  </object-type>

  <object-type name="QActionEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ActionAdded || %1-&gt;type() == QEvent::ActionRemoved || %1-&gt;type() == QEvent::ActionChanged"/>
  <object-type name="QCloseEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Close"/>
  <object-type name="QContextMenuEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ContextMenu">
      <enum-type name="Reason"/>
  </object-type>

  <object-type name="QDragEnterEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragEnter"/>
  <object-type name="QDragLeaveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragLeave"/>
  <object-type name="QDragMoveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragMove"/>
  <object-type name="QDropEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Drop">
    <modify-function signature="source()const">
      <modify-argument index="return">
        <define-ownership class="target" owner="default"/>
      </modify-argument>
    </modify-function>
  </object-type>
  <object-type name="QEnterEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::Enter"/>
  <object-type name="QExposeEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Expose"/>
  <object-type name="QFileOpenEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::FileOpen"/>
  <object-type name="QFocusEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::FocusIn || %1-&gt;type() == QEvent::FocusOut"/>
  <object-type name="QHelpEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::ToolTip || %1-&gt;type() == QEvent::WhatsThis"/>
  <object-type name="QHideEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::Hide"/>
  <object-type name="QHoverEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::HoverEnter || %1-&gt;type() == QEvent::HoverLeave || %1-&gt;type() == QEvent::HoverMove"/>
  <object-type name="QIconDragEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::IconDrag"/>

  <object-type name="QInputMethodEvent" copyable="no" polymorphic-id-expression="%1-&gt;type() == QEvent::InputMethod">
    <!-- only declare this if ndef QT_NO_INPUTMETHOD -->
    <enum-type name="AttributeType"/>
    <value-type name="Attribute">
      <include file-name="QInputMethodEvent" location="global"/>
    </value-type>
    <!-- endif ndef QT_NO_INPUTMETHOD -->
  </object-type>
  <object-type name="QInputMethodQueryEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::InputMethodQuery"/>

  <object-type name="QMoveEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Move"/>
  <object-type name="QNativeGestureEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::NativeGesture"/>
  <object-type name="QResizeEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Resize"/>
  <object-type name="QShortcutEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Shortcut">
  </object-type>
  <object-type name="QShowEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Show"/>
  <object-type name="QStatusTipEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::StatusTip"/>
  <object-type name="QTabletEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::TabletMove || %1-&gt;type() == QEvent::TabletPress || %1-&gt;type() == QEvent::TabletRelease">
      <enum-type name="PointerType"/>
      <enum-type name="TabletDevice"/>
  </object-type>
  <object-type name="QToolBarChangeEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ToolBarChange"/>
  <object-type name="QWhatsThisClickedEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::WhatsThisClicked"/>
  <object-type name="QWheelEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Wheel"/>
  <!-- Qt5.5: suppress this nameless enum -->
  <suppress-warning text="enum 'QWheelEvent::DefaultDeltasPerStep' does not have a type entry or is not an enum"/>

  <object-type name="QWindowStateChangeEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::WindowStateChange"/>
  <object-type name="QInputEvent" copyable="false"/>
  <object-type name="QKeyEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::KeyPress || %1-&gt;type() == QEvent::KeyRelease || %1-&gt;type() == QEvent::ShortcutOverride">
      <add-function signature="operator!=(QKeySequence::StandardKey)">
          <inject-code class="target" file="../glue/qtgui.cpp" snippet="qkeyevent-operatornotequal"/>
      </add-function>
  </object-type>
  <object-type name="QMouseEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::MouseButtonDblClick || %1-&gt;type() == QEvent::MouseButtonPress || %1-&gt;type() == QEvent::MouseButtonRelease || %1-&gt;type() == QEvent::MouseMove"/>
  <object-type name="QPaintEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Paint"/>
  <object-type name="QScrollEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::Scroll">
      <enum-type name="ScrollState"/>
  </object-type>
  <object-type name="QScrollPrepareEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::ScrollPrepare"/>

  <object-type name="QTextFrame" >
    <extra-includes>
      <include file-name="QTextCursor" location="global"/>
    </extra-includes>
    <value-type name="iterator" >
      <include file-name="QTextFrame" location="global"/>
      <!-- ### These operators where removed because they don't make sense in Python.
           Instead iterator methods (__iter__, next) should be implemented.
           See bug 688 -->
      <modify-function signature="operator++()" remove="all"/>
      <modify-function signature="operator--()" remove="all"/>
      <!-- ### -->
      <add-function signature="__iter__()" return-type="PyObject*">
        <inject-code class="target" position="beginning">
          <insert-template name="__iter__"/>
        </inject-code>
      </add-function>
      <add-function signature="__next__()" return-type="PyObject*">
        <inject-code class="target" position="beginning">
          <insert-template name="__next__">
            <replace from="%CPPSELF_TYPE" to="QTextFrame::iterator"/>
          </insert-template>
        </inject-code>
      </add-function>
    </value-type>
    <add-function signature="__iter__()" return-type="PyObject*">
        <inject-code class="target" position="beginning">
          <insert-template name="__iter_parent__">
            <replace from="%CPPSELF_TYPE" to="QTextFrame::iterator"/>
          </insert-template>
        </inject-code>
    </add-function>
  </object-type>
  <object-type name="QImageIOHandler">
    <extra-includes>
      <include file-name="QRect" location="global"/>
    </extra-includes>
    <enum-type name="ImageOption"/>
    <enum-type name="Transformation" flags="Transformations" since="5.5"/>
    <modify-function signature="setDevice(QIODevice*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
  </object-type>

  <object-type name="QImageReader">
    <extra-includes>
      <include file-name="QColor" location="global"/>
      <include file-name="QRect" location="global"/>
      <include file-name="QSize" location="global"/>
      <include file-name="QStringList" location="global"/>
      <include file-name="QImage" location="global"/>
    </extra-includes>
    <enum-type name="ImageReaderError"/>
    <!-- ### This method does not make sense in Python.
         Update: perhaps it does, but no one is missing it. -->
    <modify-function signature="read(QImage*)" remove="all"/>
    <modify-function signature="read()" allow-thread="yes"/>
    <modify-function signature="setDevice(QIODevice*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
  </object-type>
  <object-type name="QMovie">
    <extra-includes>
      <include file-name="QColor" location="global"/>
      <include file-name="QImage" location="global"/>
      <include file-name="QPixmap" location="global"/>
      <include file-name="QRect" location="global"/>
      <include file-name="QSize" location="global"/>
    </extra-includes>
    <enum-type name="CacheMode"/>
    <enum-type name="MovieState"/>
    <!-- ### "cacheMode()" is an internal method. -->
    <modify-function signature="setDevice(QIODevice*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
  </object-type>
  <object-type name="QDrag">
    <extra-includes>
      <include file-name="QPoint" location="global"/>
      <include file-name="QPixmap" location="global"/>
    </extra-includes>
    <modify-function signature="QDrag(QObject*)">
      <modify-argument index="this">
        <parent index="1" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="source()const">
      <modify-argument index="return">
        <define-ownership owner="target"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="target()const">
      <modify-argument index="return">
        <define-ownership owner="target"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="setMimeData(QMimeData*)">
      <modify-argument index="1">
        <!-- TODO: maybe this is not the best solution -->
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="exec(QFlags&lt;Qt::DropAction&gt;)" rename="exec_" allow-thread="yes"/>
    <modify-function signature="exec(QFlags&lt;Qt::DropAction&gt;,Qt::DropAction)" rename="exec_" allow-thread="yes"/>
  </object-type>

  <object-type name="QStandardItemModel" polymorphic-id-expression="qobject_cast&lt;QStandardItemModel*&gt;(%1)">
    <extra-includes>
      <include file-name="QStringList" location="global"/>
      <include file-name="QSize" location="global"/>
    </extra-includes>
    <modify-function signature="takeItem(int,int)">
      <modify-argument index="return">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="takeHorizontalHeaderItem(int)">
      <modify-argument index="return">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="takeVerticalHeaderItem(int)">
      <modify-argument index="return">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="verticalHeaderItem(int)const">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="horizontalHeaderItem(int)const">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="invisibleRootItem()const">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="item(int,int)const">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="itemFromIndex(const QModelIndex&amp;)const">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="itemPrototype()const">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="appendRow(const QList&lt;QStandardItem*&gt;&amp;)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="appendRow(QStandardItem*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="insertRow(int,QStandardItem*)">
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="setHorizontalHeaderItem(int,QStandardItem*)">
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="setItem(int,int,QStandardItem*)">
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-setitem-1"/>
      <modify-argument index="3">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="setItem(int,QStandardItem*)">
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-setitem-2"/>
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="setItemPrototype(const QStandardItem*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="setVerticalHeaderItem(int,QStandardItem*)">
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-setverticalheaderitem"/>
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="takeColumn(int)">
      <modify-argument index="return">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="takeRow(int)">
      <modify-argument index="return">
        <parent index="this" action="remove"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="findItems(const QString&amp;,QFlags&lt;Qt::MatchFlag&gt;,int)const">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="insertColumn(int,const QList&lt;QStandardItem*&gt;&amp;)">
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="insertRow(int,const QList&lt;QStandardItem*&gt;&amp;)">
      <modify-argument index="2">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="appendColumn(const QList&lt;QStandardItem*&gt;&amp;)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>

    <modify-function signature="clear()">
        <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-clear"/>
    </modify-function>
  </object-type>
  <object-type name="QClipboard">
    <extra-includes>
      <include file-name="QImage" location="global"/>
      <include file-name="QPixmap" location="global"/>
    </extra-includes>
    <enum-type name="Mode"/>
    <modify-function signature="setMimeData(QMimeData*,QClipboard::Mode)" allow-thread="yes">
      <modify-argument index="1">
        <!-- TODO: maybe this is not the best solution -->
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="text(QString&amp;,QClipboard::Mode)const">
      <modify-argument index="2">
        <replace-default-expression with="QClipboard::Clipboard"/>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="(retval, subtype)"/>
      </modify-argument>
      <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qclipboard-text"/>
    </modify-function>
  </object-type>
  <object-type name="QPaintEngineState">
    <extra-includes>
      <include file-name="QPainterPath" location="global"/>
    </extra-includes>
  </object-type>
  <object-type name="QTextLayout">
    <extra-includes>
      <include file-name="QTextOption" location="global"/>
    </extra-includes>
    <enum-type name="CursorMode"/>
    <value-type name="FormatRange">
      <include file-name="QTextLayout" location="global"/>
    </value-type>
  </object-type>
  <object-type name="QTextDocument">
    <extra-includes>
      <include file-name="QTextBlock" location="global"/>
      <include file-name="QTextFormat" location="global"/>
      <include file-name="QTextCursor" location="global"/>
    </extra-includes>
    <enum-type name="FindFlag" flags="FindFlags"/>
    <enum-type name="MarkdownFeature" flags="MarkdownFeatures" since="5.14"/>
    <enum-type name="MetaInformation"/>
    <enum-type name="ResourceType"/>
    <enum-type name="Stacks" since="4.7"/>
    <modify-function signature="setDocumentLayout(QAbstractTextDocumentLayout*)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="object(int)const">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="objectForFormat(const QTextFormat&amp;)const">
      <modify-argument index="return">
        <parent index="this" action="add"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="createObject(const QTextFormat&amp;)">
      <modify-argument index="return">
        <define-ownership class="native" owner="c++"/>
        <define-ownership class="target" owner="target"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="print(QPagedPaintDevice*)const" rename="print_"/>
  </object-type>
  <object-type name="QTextDocumentWriter" since="4.5"/>
  <object-type name="QTextTable">
    <extra-includes>
      <include file-name="QTextCursor" location="global"/>
    </extra-includes>
  </object-type>
  <object-type name="QPaintEngine">
    <enum-type name="DirtyFlag" flags="DirtyFlags"/>
    <enum-type name="PaintEngineFeature" flags="PaintEngineFeatures"/>
    <enum-type name="PolygonDrawMode"/>
    <enum-type name="Type"/>
    <modify-function signature="begin(QPaintDevice*)">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="updateState(QPaintEngineState)">
      <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="drawTextItem(QPointF,QTextItem)">
      <modify-argument index="2" invalidate-after-use="yes"/>
    </modify-function>
    <extra-includes>
      <include file-name="QVarLengthArray" location="global"/>
    </extra-includes>
    <!-- ### "setPaintDevice(QPaintDevice*)" is an internal method. -->
    <modify-function signature="setPaintDevice(QPaintDevice*)" remove="all"/>
  </object-type>
  <object-type name="QPainter">
    <extra-includes>
      <include file-name="QPainterPath" location="global"/>
      <include file-name="QPixmap" location="global"/>
    </extra-includes>
    <enum-type name="CompositionMode"/>
    <enum-type name="PixmapFragmentHint" flags="PixmapFragmentHints" since="4.7"/>
    <enum-type name="RenderHint" flags="RenderHints"/>
    <value-type name="PixmapFragment" since="4.7">
        <include file-name="QPainter" location="global"/>
    </value-type>

    <!-- ### "drawText(...)" is an internal method. -->
    <modify-function signature="drawText(const QPointF&amp;,const QString&amp;,int,int)" remove="all"/>


    <modify-function signature="drawConvexPolygon(const QPoint*,int)" remove="all"/>
    <add-function signature="drawConvexPolygon(QVector&lt;QPoint>)">
        <inject-code>
            <insert-template name="qpainter_drawlist"/>
        </inject-code>
    </add-function>
    <modify-function signature="drawConvexPolygon(const QPointF*,int)" remove="all"/>
    <add-function signature="drawConvexPolygon(QVector&lt;QPointF>)">
        <inject-code>
            <insert-template name="qpainter_drawlist"/>
        </inject-code>
    </add-function>
    <!-- ### Overloads using QVector<T> does the job of these methods -->
    <modify-function signature="drawLines(const QLine*,int)" remove="all"/>
    <modify-function signature="drawLines(const QLineF*,int)" remove="all"/>
    <modify-function signature="drawLines(const QPoint*,int)" remove="all"/>
    <modify-function signature="drawLines(const QPointF*,int)" remove="all"/>
    <modify-function signature="drawRects(const QRect*,int)" remove="all"/>
    <modify-function signature="drawRects(const QRectF*,int)" remove="all"/>
    <!-- ### -->
    <modify-function signature="drawPoints(const QPoint*,int)" remove="all"/>
    <add-function signature="drawPoints(QVector&lt;QPoint>)">
        <inject-code>
            <insert-template name="qpainter_drawlist"/>
        </inject-code>
    </add-function>
    <modify-function signature="drawPoints(const QPointF*,int)" remove="all"/>
    <add-function signature="drawPoints(QVector&lt;QPointF>)">
        <inject-code>
            <insert-template name="qpainter_drawlist"/>
        </inject-code>
    </add-function>
    <modify-function signature="drawPolygon(const QPoint*,int,Qt::FillRule)" remove="all"/>
    <add-function signature="drawPolygon(QVector&lt;QPoint>,Qt::FillRule)">
        <inject-code file="../glue/qtgui.cpp" snippet="qpainter-drawpolygon"/>
    </add-function>
    <modify-function signature="drawPolygon(const QPointF*,int,Qt::FillRule)" remove="all"/>
    <add-function signature="drawPolygon(QVector&lt;QPointF>,Qt::FillRule)">
        <inject-code file="../glue/qtgui.cpp" snippet="qpainter-drawpolygon"/>
    </add-function>
    <modify-function signature="drawPolyline(const QPoint*,int)" remove="all"/>
    <add-function signature="drawPolyline(QVector&lt;QPoint>)">
        <inject-code>
            <insert-template name="qpainter_drawlist"/>
        </inject-code>
    </add-function>
    <modify-function signature="drawPolyline(const QPointF*,int)" remove="all"/>
    <add-function signature="drawPolyline(QVector&lt;QPointF>)">
        <inject-code>
            <insert-template name="qpainter_drawlist"/>
        </inject-code>
    </add-function>
    <modify-function signature="drawRoundRect(int,int,int,int,int,int)">
      <modify-argument index="5">
        <rename to="xRound"/>
      </modify-argument>
      <modify-argument index="6">
        <rename to="yRound"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="drawTiledPixmap(const QRect&amp;,const QPixmap&amp;,const QPoint&amp;)">
      <modify-argument index="3">
        <rename to="pos"/>
      </modify-argument>
    </modify-function>
    <modify-function signature="QPainter(QPaintDevice*)">
      <modify-argument index="1">
        <no-null-pointer/>
      </modify-argument>
    </modify-function>
    <modify-function signature="begin(QPaintDevice*)">
      <modify-argument index="1">
        <no-null-pointer/>
      </modify-argument>
    </modify-function>
    <modify-function signature="setRedirected(const QPaintDevice*,QPaintDevice*,const QPoint&amp;)">
      <modify-argument index="1">
        <no-null-pointer/>
      </modify-argument>
    </modify-function>
    <modify-function signature="restoreRedirected(const QPaintDevice*)">
      <modify-argument index="1">
        <no-null-pointer/>
      </modify-argument>
    </modify-function>
    <modify-function signature="drawText(QRectF,int,QString,QRectF*)">
      <modify-argument index="4">
        <remove-argument/>
        <remove-default-expression/>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="QRectF"/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_args,QRectF*"/>
      </inject-code>
    </modify-function>
    <modify-function signature="drawText(QRect,int,QString,QRect*)">
      <modify-argument index="4">
        <remove-argument/>
        <remove-default-expression/>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="QRect"/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_args,QRect*"/>
      </inject-code>
    </modify-function>
    <modify-function signature="drawText(int,int,int,int,int,QString,QRect*)">
      <modify-argument index="7">
        <remove-argument/>
        <remove-default-expression/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_args,QRect*"/>
      </inject-code>
    </modify-function>
  </object-type>

  <value-type name="QGenericMatrix" generate="no"/>
  <value-type name="QMatrix2x2" since="4.6">
    <modify-function signature="QMatrix2x2(const float*)" remove="all"/>
    <modify-function signature="copyDataTo(float*) const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code_matrix">
               <replace from="%MATRIX_SIZE" to="4"/>
               <replace from="%MATRIX_TYPE" to="float"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code_matrix">
              <replace from="%MATRIX_TYPE" to="float"/>
              <replace from="%MATRIX_SIZE" to="4"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="QMatrix2x2(PySequence*)">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_constructor">
          <replace from="%SIZE" to="4"/>
        </insert-template>
      </inject-code>
    </add-function>
    <add-function signature="data()" return-type="float">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_data_function">
          <replace from="%MATRIX_SIZE" to="4"/>
        </insert-template>
      </inject-code>
    </add-function>
  </value-type>

  <value-type name="QMatrix2x3" since="4.6">
    <modify-function signature="QMatrix2x3(const float*)" remove="all"/>
    <modify-function signature="copyDataTo(float*) const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code_matrix">
               <replace from="%MATRIX_SIZE" to="6"/>
               <replace from="%MATRIX_TYPE" to="float"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code_matrix">
              <replace from="%MATRIX_TYPE" to="float"/>
              <replace from="%MATRIX_SIZE" to="6"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="QMatrix2x3(PySequence*)">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_constructor">
          <replace from="%SIZE" to="6"/>
        </insert-template>
      </inject-code>
    </add-function>
    <add-function signature="data()" return-type="float">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_data_function">
          <replace from="%MATRIX_SIZE" to="6"/>
        </insert-template>
      </inject-code>
    </add-function>
  </value-type>

  <value-type name="QMatrix2x4" since="4.6">
    <modify-function signature="QMatrix2x4(const float*)" remove="all"/>
    <modify-function signature="copyDataTo(float*) const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code_matrix">
               <replace from="%MATRIX_SIZE" to="8"/>
               <replace from="%MATRIX_TYPE" to="float"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code_matrix">
              <replace from="%MATRIX_TYPE" to="float"/>
              <replace from="%MATRIX_SIZE" to="8"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="QMatrix2x4(PySequence*)">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_constructor">
          <replace from="%SIZE" to="8"/>
        </insert-template>
      </inject-code>
    </add-function>
    <add-function signature="data()" return-type="float">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_data_function">
          <replace from="%MATRIX_SIZE" to="8"/>
        </insert-template>
      </inject-code>
    </add-function>
  </value-type>

  <value-type name="QMatrix3x2" since="4.6">
    <modify-function signature="QMatrix3x2(const float*)" remove="all"/>
    <modify-function signature="copyDataTo(float*) const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code_matrix">
               <replace from="%MATRIX_SIZE" to="6"/>
               <replace from="%MATRIX_TYPE" to="float"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code_matrix">
              <replace from="%MATRIX_TYPE" to="float"/>
              <replace from="%MATRIX_SIZE" to="6"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="QMatrix3x2(PySequence*)">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_constructor">
          <replace from="%SIZE" to="6"/>
        </insert-template>
      </inject-code>
    </add-function>
    <add-function signature="data()" return-type="float">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_data_function">
          <replace from="%MATRIX_SIZE" to="6"/>
        </insert-template>
      </inject-code>
    </add-function>
  </value-type>

  <value-type name="QMatrix3x3" since="4.6">
    <modify-function signature="QMatrix3x3(const float*)" remove="all"/>
    <modify-function signature="copyDataTo(float*) const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code_matrix">
               <replace from="%MATRIX_SIZE" to="9"/>
               <replace from="%MATRIX_TYPE" to="float"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code_matrix">
              <replace from="%MATRIX_TYPE" to="float"/>
              <replace from="%MATRIX_SIZE" to="9"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="QMatrix3x3(PySequence*)">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_constructor">
          <replace from="%SIZE" to="9"/>
        </insert-template>
      </inject-code>
    </add-function>
    <add-function signature="data()" return-type="float">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_data_function">
          <replace from="%MATRIX_SIZE" to="9"/>
        </insert-template>
      </inject-code>
    </add-function>
  </value-type>

  <value-type name="QMatrix3x4" since="4.6">
    <modify-function signature="QMatrix3x4(const float*)" remove="all"/>
    <modify-function signature="copyDataTo(float*) const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code_matrix">
               <replace from="%MATRIX_SIZE" to="12"/>
               <replace from="%MATRIX_TYPE" to="float"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code_matrix">
              <replace from="%MATRIX_TYPE" to="float"/>
              <replace from="%MATRIX_SIZE" to="12"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="QMatrix3x4(PySequence*)">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_constructor">
          <replace from="%SIZE" to="12"/>
        </insert-template>
      </inject-code>
    </add-function>
    <add-function signature="data()" return-type="float">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_data_function">
          <replace from="%MATRIX_SIZE" to="12"/>
        </insert-template>
      </inject-code>
    </add-function>
  </value-type>

  <value-type name="QMatrix4x2" since="4.6">
    <modify-function signature="QMatrix4x2(const float*)" remove="all"/>
    <modify-function signature="copyDataTo(float*) const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code_matrix">
               <replace from="%MATRIX_SIZE" to="8"/>
               <replace from="%MATRIX_TYPE" to="float"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code_matrix">
              <replace from="%MATRIX_TYPE" to="float"/>
              <replace from="%MATRIX_SIZE" to="8"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="QMatrix4x2(PySequence*)">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_constructor">
          <replace from="%SIZE" to="8"/>
        </insert-template>
      </inject-code>
    </add-function>
    <add-function signature="data()" return-type="float">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_data_function">
          <replace from="%MATRIX_SIZE" to="8"/>
        </insert-template>
      </inject-code>
    </add-function>
  </value-type>

  <value-type name="QMatrix4x3" since="4.6">
    <modify-function signature="QMatrix4x3(const float*)" remove="all"/>
    <modify-function signature="copyDataTo(float*) const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code_matrix">
               <replace from="%MATRIX_SIZE" to="12"/>
               <replace from="%MATRIX_TYPE" to="float"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code_matrix">
              <replace from="%MATRIX_TYPE" to="float"/>
              <replace from="%MATRIX_SIZE" to="12"/>
            </insert-template>
        </inject-code>
    </add-function>
    <add-function signature="QMatrix4x3(PySequence*)">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_constructor">
          <replace from="%SIZE" to="12"/>
        </insert-template>
      </inject-code>
    </add-function>
    <add-function signature="data()" return-type="float">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_data_function">
          <replace from="%MATRIX_SIZE" to="12"/>
        </insert-template>
      </inject-code>
    </add-function>
  </value-type>

  <value-type name="QMatrix4x4" since="4.6">

    <!-- Qt5: HAIRY TRICK ALERT ahead!
        Qt5 partially replaced 'qreal' by float.
        That had the side effect that all matrix types did not work any longer.

        Reason (I guess):

        The signature "QList<qreal>" is needed by the __reduce__ methods,
        but created by some other object used elsewhere.
        After the matrix type was changed, "QList<float>" was created nowhere.

        I don't know an explicit way to produce the right conversion function, so what I did
        was to create a dummy function and immediately delete it again.
        This has the desired effect of creating the implicitly needed "QList<float>"
        conversion, although the dummy function goes away.

        Q: Do you know a better solution?
    -->
    <add-function signature="__dummy(const QList&lt;float &gt; &amp;)"/>
    <modify-function signature="__dummy(const QList&lt;float &gt; &amp;)" remove="all"/>
    <!-- that was the trick ^^^^^^^^^^^^^^^^^^^^^^ -->

    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code_matrix">
               <replace from="%MATRIX_SIZE" to="16"/>
               <replace from="%MATRIX_TYPE" to="float"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code_matrix">
              <replace from="%MATRIX_TYPE" to="float"/>
              <replace from="%MATRIX_SIZE" to="16"/>
            </insert-template>
        </inject-code>
    </add-function>

    <!-- ### "QMatrix4x4(const float*,int,int)" is an internal constructor. -->
    <modify-function signature="QMatrix4x4(const float*,int,int)" remove="all"/>

    <modify-function signature="QMatrix4x4(const float*)">
      <modify-argument index="1">
        <replace-type modified-type="PySequence"/>
        <array/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qmatrix4x4"/>
    </modify-function>
    <modify-function signature="data()">
      <inject-code class="target" position="beginning">
        <insert-template name="matrix_data_function">
          <replace from="%MATRIX_SIZE" to="16"/>
        </insert-template>
      </inject-code>
    </modify-function>
    <modify-function signature="copyDataTo(float*)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="PyTupleObject*"/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qmatrix4x4-copydatato"/>
    </modify-function>

    <modify-function signature="inverted(bool*)const">
      <modify-argument index="1">
        <remove-argument/>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="PyTuple"/>
      </modify-argument>
      <inject-code class="target" position="beginning">
        <insert-template name="fix_bool*"/>
      </inject-code>
    </modify-function>

    <!-- ### "constData() const" and "data() const" are unnecessary in Python and their function is performed by "data()". -->
    <modify-function signature="data()const" remove="all"/>
    <modify-function signature="constData()const" remove="all"/>
    <!-- ### -->
    <modify-function signature="operator()(int,int)const" remove="all"/>
    <modify-function signature="operator()(int,int)" remove="all"/>
    <add-function signature="__mgetitem__" return-type="PyObject*">
       <inject-code file="../glue/qtgui.cpp" snippet="qmatrix4x4-mgetitem"/>
    </add-function>
  </value-type>

    _______ end of matrix block _______ -->

  <value-type name="QQuaternion" since="4.6">
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.scalar(), %CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="dddd"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.scalar(), %CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <!-- Qt5.5: XXX support the output variables! For now, I just suppressed the new methods. -->
    <modify-function signature="getAxisAndAngle(float*,float*,float*,float*)const" since="5.5" remove="all"/>
    <modify-function signature="getAxisAndAngle(QVector3D*,float*)const" since="5.5" remove="all"/>
    <modify-function signature="getEulerAngles(float*,float*,float*)const" since="5.5" remove="all"/>
  </value-type>

  <object-type name="QTouchEvent" since="4.6">
      <value-type name="TouchPoint" since="4.6">
        <enum-type name="InfoFlag" flags="InfoFlags"/>
      </value-type>
  </object-type>

  <object-type name="QTouchDevice">
    <enum-type name="CapabilityFlag" flags="Capabilities"/>
    <enum-type name="DeviceType"/>
  </object-type>

  <value-type name="QVector2D" since="4.6">
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="dd"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="toTuple" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="to_tuple">
                <replace from="%TT_FORMAT" to="dd"/>
                <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
            </insert-template>
        </inject-code>
    </add-function>

  </value-type>
  <value-type name="QVector3D" since="4.6">
    <extra-includes>
      <include file-name="QMatrix4x4" location="global"/>
    </extra-includes>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f, %f"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="ddd"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="toTuple" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="to_tuple">
                <replace from="%TT_FORMAT" to="ddd"/>
                <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
            </insert-template>
        </inject-code>
    </add-function>

  </value-type>
  <value-type name="QVector4D" since="4.6">
    <extra-includes>
      <include file-name="QMatrix4x4" location="global"/>
    </extra-includes>
    <add-function signature="__repr__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="repr_code">
               <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
               <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z(), %CPPSELF.w()"/>
             </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="__reduce__" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="reduce_code">
              <replace from="%REDUCE_FORMAT" to="dddd"/>
              <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z(), %CPPSELF.w()"/>
            </insert-template>
        </inject-code>
    </add-function>

    <add-function signature="toTuple" return-type="PyObject*">
        <inject-code class="target" position="beginning">
            <insert-template name="to_tuple">
                <replace from="%TT_FORMAT" to="dddd"/>
                <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z(), %CPPSELF.w()"/>
            </insert-template>
        </inject-code>
    </add-function>
  </value-type>

  <suppress-warning text="template baseclass 'QListSpecialMethods&lt;T&gt;' of 'QList' is not known"/>
  <suppress-warning text="template baseclass 'QGenericMatrix&lt;float&gt;' of '*' is not known"/>

  <!-- Qt5: note: the unnamed enum cannot be rejected by
    <rejection class="QMatrix4x4" enum-name="enum_1"/>
    Instead, we have to suppress the warning. Why that?

    Compare also the note at the beginning of typesystem_widgets_common.xml .
    This seems to be a related problem with unnamed structures in shiboken.
  -->
  <suppress-warning text="enum 'QMatrix4x4::enum_1' is specified in typesystem, but not declared"/>

  <object-type name="QSessionManager">
    <extra-includes>
    </extra-includes>
    <enum-type name="RestartHint"/>
     <!-- ### -->
  </object-type>

  <!-- This enum is present on QtCore -->
  <suppress-warning text="enum 'QCoreApplication::ApplicationFlags' is specified in typesystem, but not declared"/>

  <!-- Qt5: here the new QWindow stuff and what it pulls in -->
  <object-type name="QBackingStore"/>
  <object-type name="QSurface">
    <enum-type name="SurfaceClass"/>
    <enum-type name="SurfaceType"/>
  </object-type>
  <rejection class="QSurface" field-name="m_reserved"/>
  <value-type name="QSurfaceFormat">
    <enum-type name="ColorSpace" since="5.10"/>
    <enum-type name="FormatOption" flags="FormatOptions"/>
    <enum-type name="OpenGLContextProfile"/>
    <enum-type name="RenderableType"/>
    <enum-type name="SwapBehavior"/>
  </value-type>
  <object-type name="QOffscreenSurface" since="5.1"/>
  <primitive-type name="QPlatformSurface">
    <extra-includes>
      <include file-name="QtGui/qpa/qplatformsurface.h" location="global"/>
    </extra-includes>
  </primitive-type>

  <object-type name="QWindow" delete-in-main-thread="true">
    <enum-type name="AncestorMode"/>
    <enum-type name="Visibility"/>
    <modify-function signature="raise()" rename="raise_"/>
    <!-- see QWidget::nativeEvent(), QAbstractNativeEventFilter::nativeEventFilter() -->
    <modify-function signature="nativeEvent(const QByteArray &amp;,void*,long*)">
      <modify-argument index="3">
        <remove-argument/>
        <conversion-rule class="native">
            <insert-template name="return_native_eventfilter_conversion_variables"/>
        </conversion-rule>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="PyObject"/>
        <conversion-rule class="native">
            <insert-template name="return_native_eventfilter_conversion"/>
        </conversion-rule>
      </modify-argument>
      <inject-code position="end">
          <insert-template name="return_native_eventfilter"/>
      </inject-code>
    </modify-function>
    <modify-function signature="fromWinId(WId)">
      <modify-argument index="1">
          <replace-type modified-type="long"/>
      </modify-argument>
      <inject-code file="../glue/qtgui.cpp" snippet="qwindow-fromWinId"/>
    </modify-function>
    <modify-function signature="show()" allow-thread="yes"/>
    <modify-function signature="showFullScreen()" allow-thread="yes"/>
    <modify-function signature="showMaximized()" allow-thread="yes"/>
    <modify-function signature="showMinimized()" allow-thread="yes"/>
    <modify-function signature="showNormal()" allow-thread="yes"/>
  </object-type>

  <object-type name="QGuiApplication">
    <extra-includes>
      <include file-name="QBasicTimer" location="global"/>
      <include file-name="QFont" location="global"/>
      <include file-name="QFontMetrics" location="global"/>
      <include file-name="QPalette" location="global"/>
      <include file-name="QIcon" location="global"/>
      <include file-name="QLocale" location="global"/>
    </extra-includes>
    <modify-function signature="QGuiApplication(int&amp;,char**,int)" access="private"/>
    <add-function signature="QGuiApplication(QStringList)">
        <inject-code file="../glue/qtgui.cpp" snippet="qguiapplication-1"/>
    </add-function>
    <add-function signature="QGuiApplication()">
        <inject-code file="../glue/qtgui.cpp" snippet="qguiapplication-2"/>
    </add-function>
    <inject-code class="native" position="beginning" file="../glue/qtgui.cpp" snippet="qguiapplication-init"/>
    <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>

  </object-type>

  <object-type name="QOpenGLBuffer" since="5.0">
    <enum-type name="Access"/>
    <enum-type name="RangeAccessFlag" flags="RangeAccessFlags"/>
    <enum-type name="Type"/>
    <enum-type name="UsagePattern"/>
  </object-type>
  <object-type name="QOpenGLContext">
    <enum-type name="OpenGLModuleType"/>
  </object-type>
  <object-type name="QOpenGLContextGroup" since="5.0"/>
  <object-type name="QOpenGLDebugLogger" since="5.1">
      <enum-type name="LoggingMode"/>
  </object-type>
  <value-type name="QOpenGLDebugMessage" since="5.1">
      <enum-type name="Source" flags="Sources"/>
      <enum-type name="Type" flags="Types"/>
      <enum-type name="Severity" flags="Severities"/>
  </value-type>
  <object-type name="QOpenGLFramebufferObject" since="5.0">
    <enum-type name="Attachment"/>
    <enum-type name="FramebufferRestorePolicy" since="5.7"/>
  </object-type>
  <value-type name="QOpenGLFramebufferObjectFormat"/>
  <!-- Compile error on Windows: QOpenGLPaintDevice::QOpenGLPaintDevice(const QOpenGLPaintDevice &)': attempting to reference a deleted function
  <object-type name="QOpenGLPaintDevice" since="5.0"/>
  -->
  <object-type name="QOpenGLExtraFunctions" since="5.6">
      <!-- Exlusions due to compile errors -->
      <modify-function signature="glEndTransformFeedback()" remove="all"/>
      <modify-function signature="glPauseTransformFeedback()" remove="all"/>
      <modify-function signature="glResumeTransformFeedback()" remove="all"/>
      <modify-function signature="^glClearBuffer.*\(.*\*.*$">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glDebugMessageControl(unsigned int,unsigned int,unsigned int,int,const unsigned int*,unsigned char)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glDeleteProgramPipelines(int,const unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glDeleteQueries(int,const unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glDeleteSamplers(int,const unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glDeleteTransformFeedbacks(int,const unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glDeleteVertexArrays(int,const unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glDrawBuffers(int,const unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGenProgramPipelines(int,unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGenQueries(int,unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGenSamplers(int,unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGenTransformFeedbacks(int,unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGenVertexArrays(int,unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetActiveUniformBlockiv(unsigned int,unsigned int,unsigned int,int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetActiveUniformsiv(unsigned int,int,const unsigned int*,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetFramebufferParameteriv(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetIntegeri_v(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetInternalformativ(unsigned int,unsigned int,unsigned int,int,int*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetMultisamplefv(unsigned int,unsigned int,float*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetProgramInterfaceiv(unsigned int,unsigned int,unsigned int,int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetProgramPipelineiv(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetProgramResourceiv(unsigned int,unsigned int,unsigned int,int,const unsigned int*,int,int*,int*)">
          <modify-argument index="5"><array/></modify-argument>
          <modify-argument index="7"><array/></modify-argument>
          <modify-argument index="8"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetQueryObjectuiv(unsigned int,unsigned int,unsigned int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetQueryiv(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetSamplerParameterfv(unsigned int,unsigned int,float*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetSamplerParameteriv(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetTexLevelParameteriv(unsigned int,int,unsigned int,int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetTexLevelParameterfv(unsigned int,int,unsigned int,float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetUniformuiv(unsigned int,int,unsigned int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetVertexAttribIiv(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetVertexAttribIuiv(unsigned int,unsigned int,unsigned int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glInvalidateFramebuffer(unsigned int,int,const unsigned int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glInvalidateSubFramebuffer(unsigned int,int,const unsigned int*,int,int,int,int)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform1fv(unsigned int,int,int,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform1iv(unsigned int,int,int,const int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform1uiv(unsigned int,int,int,const unsigned int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform2fv(unsigned int,int,int,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform2iv(unsigned int,int,int,const int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform2uiv(unsigned int,int,int,const unsigned int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform3fv(unsigned int,int,int,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform3iv(unsigned int,int,int,const int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform3uiv(unsigned int,int,int,const unsigned int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform4fv(unsigned int,int,int,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform4iv(unsigned int,int,int,const int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniform4uiv(unsigned int,int,int,const unsigned int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniformMatrix2fv(unsigned int,int,int,unsigned char,const float*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniformMatrix2x3fv(unsigned int,int,int,unsigned char,const float*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniformMatrix2x4fv(unsigned int,int,int,unsigned char,const float*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniformMatrix3fv(unsigned int,int,int,unsigned char,const float*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniformMatrix3x2fv(unsigned int,int,int,unsigned char,const float*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniformMatrix3x4fv(unsigned int,int,int,unsigned char,const float*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniformMatrix4fv(unsigned int,int,int,unsigned char,const float*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniformMatrix4x2fv(unsigned int,int,int,unsigned char,const float*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glProgramUniformMatrix4x3fv(unsigned int,int,int,unsigned char,const float*)">
          <modify-argument index="5"><array/></modify-argument>
      </modify-function>
      <modify-function signature="^glSamplerParameterI?u?[fi]v\(.*$">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="^glTexParameterI?u?[fi]v\(.*$">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniform1uiv(int,int,const unsigned int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniform2uiv(int,int,const unsigned int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniform3uiv(int,int,const unsigned int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniform4uiv(int,int,const unsigned int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniformMatrix2x3fv(int,int,unsigned char,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniformMatrix2x4fv(int,int,unsigned char,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniformMatrix3x2fv(int,int,unsigned char,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniformMatrix3x4fv(int,int,unsigned char,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniformMatrix4x2fv(int,int,unsigned char,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glUniformMatrix4x3fv(int,int,unsigned char,const float*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glVertexAttribI4iv(unsigned int,const int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glVertexAttribI4uiv(unsigned int,const unsigned int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetStringi(unsigned int,unsigned int)">
          <modify-argument index="return">
              <replace-type modified-type="QString"/>
          </modify-argument>
          <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qstring-return"/>
      </modify-function>
  </object-type>
  <object-type name="QOpenGLFunctions" since="5.0">
      <enum-type name="OpenGLFeature" flags="OpenGLFeatures"/>
      <modify-function signature="glGetAttachedShaders(unsigned int,int,int*,unsigned int*)">
          <modify-argument index="3"><array/></modify-argument>
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetBufferParameteriv(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetFloatv(unsigned int,float*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetFramebufferAttachmentParameteriv(unsigned int,unsigned int,unsigned int,int*)">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetIntegerv(unsigned int,int*)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetProgramiv(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetRenderbufferParameteriv(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetShaderiv(unsigned int,unsigned int,int*)">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetShaderPrecisionFormat(unsigned int,unsigned int,int*,int*)">
          <modify-argument index="3"><array/></modify-argument>
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="^glDelete.*s\(.*$">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="^glGen[A-Z].*s\(.*$">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="^gl(Get)?TexParameterI?u?[fi]v\(.*$">
         <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="^glUniformMatrix\dfv\(.*$">
          <modify-argument index="4"><array/></modify-argument>
      </modify-function>
      <modify-function signature="^gl(Get)?Uniform\d?.v\(.*$">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="^glVertexAttrib\dfv\(.*$">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="^glGetVertexAttrib[fi]v\(.*$">
          <modify-argument index="3"><array/></modify-argument>
      </modify-function>
      <modify-function signature="glGetString(unsigned int)">
          <modify-argument index="return">
              <replace-type modified-type="QString"/>
          </modify-argument>
          <inject-code class="target" position="beginning">
            <insert-template name="glGetString_return_QString"/>
          </inject-code>
      </modify-function>
      <modify-function signature="glShaderBinary(int,const unsigned int*,unsigned int,const void *,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
  </object-type>
  <object-type name="QAbstractOpenGLFunctions" since="5.1"/>
  <!-- Classes are result of a macro expansion in src/gui/opengl/qopenglversionfunctions.h
  <object-type name="QOpenGLFunctions_1_0" since="5.1"/>
  <object-type name="QOpenGLFunctions_1_1" since="5.1"/>
  <object-type name="QOpenGLFunctions_1_2" since="5.1"/>
  <object-type name="QOpenGLFunctions_1_3" since="5.1"/>
  <object-type name="QOpenGLFunctions_1_4" since="5.1"/>
  <object-type name="QOpenGLFunctions_1_5" since="5.1"/>
  <object-type name="QOpenGLFunctions_2_0" since="5.1">
  <object-type name="QOpenGLFunctions_2_1" since="5.1"/>
  <object-type name="QOpenGLFunctions_3_0" since="5.1"/>
  <object-type name="QOpenGLFunctions_3_1" since="5.1"/>
  <object-type name="QOpenGLFunctions_3_2_Compatibility" since="5.1"/>
  <object-type name="QOpenGLFunctions_3_2_Core" since="5.1"/>
  <object-type name="QOpenGLFunctions_3_3_Compatibility" since="5.1"/>
  <object-type name="QOpenGLFunctions_3_3_Core" since="5.1"/>
  <object-type name="QOpenGLFunctions_4_0_Compatibility" since="5.1"/>
  <object-type name="QOpenGLFunctions_4_0_Core" since="5.1"/>
  <object-type name="QOpenGLFunctions_4_1_Compatibility" since="5.1"/>
  <object-type name="QOpenGLFunctions_4_1_Core" since="5.1"/>
  <object-type name="QOpenGLFunctions_4_2_Compatibility" since="5.1"/>
  <object-type name="QOpenGLFunctions_4_2_Core" since="5.1"/>
  <object-type name="QOpenGLFunctions_4_3_Compatibility" since="5.1"/>
  <object-type name="QOpenGLFunctions_4_3_Core" since="5.1"/>
  <object-type name="QOpenGLFunctions_4_4_Compatibility" since="5.5/>
  <object-type name="QOpenGLFunctions_4_4_Core" since="5.5"/>
  <object-type name="QOpenGLFunctions_4_5_Compatibility since="5.5""/>
  <object-type name="QOpenGLFunctions_4_5_Core" since="5.5"/>
  <object-type name="QOpenGLFunctions_ES2" since="5.1"/>
  -->
  <value-type  name="QOpenGLPixelTransferOptions"/>
  <object-type name="QOpenGLShader" since="5.0">
    <enum-type name="ShaderTypeBit" flags="ShaderType"/>
  </object-type>
  <object-type name="QOpenGLShaderProgram" since="5.0">
      <modify-function signature="setAttributeArray(int,const float*,int,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setAttributeArray(const char*,const float*,int,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setAttributeArray(int,const float*,int,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setAttributeValue(int,const float*,int,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setAttributeValue(const char*,const float*,int,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setUniformValueArray(int,const float*,int,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setUniformValueArray(int,const int*,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setUniformValueArray(int,const unsigned int*,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setUniformValueArray(const char*,const float*,int,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setUniformValueArray(const char*,const int*,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <modify-function signature="setUniformValueArray(const char*,const unsigned int*,int)">
          <modify-argument index="2"><array/></modify-argument>
      </modify-function>
      <!-- Add explicit signatures for the setUniformValue functions -->
      <modify-function signature="^setUniformValue\(const char\*,(float|int|uint)\)$" remove="all"/>
      <!-- No need for a signature for GLuint, since Qt (internally) calls the same function: glUniform1i -->
      <add-function signature="setUniformValue1f(const char*, float)" return-type="void">
          <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_float"/>
      </add-function>
      <add-function signature="setUniformValue1i(const char*, int)" return-type="void">
          <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_int"/>
      </add-function>
      <add-function signature="setUniformValue1f(int, float)" return-type="void">
          <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_float"/>
      </add-function>
      <add-function signature="setUniformValue1i(int, int)" return-type="void">
          <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_int"/>
      </add-function>
  </object-type>
  <object-type name="QOpenGLTexture" since="5.2">
      <enum-type name="BindingTarget"/>
      <enum-type name="CoordinateDirection"/>
      <enum-type name="ComparisonFunction"/>
      <enum-type name="ComparisonMode"/>
      <enum-type name="CubeMapFace"/>
      <enum-type name="DepthStencilMode"/>
      <enum-type name="Feature" flags="Features"/>
      <enum-type name="Filter"/>
      <enum-type name="MipMapGeneration"/>
      <enum-type name="PixelFormat"/>
      <enum-type name="PixelType"/>
      <enum-type name="SwizzleComponent"/>
      <enum-type name="SwizzleValue"/>
      <enum-type name="Target"/>
      <enum-type name="TextureFormat"/>
      <enum-type name="TextureFormatClass"/>
      <enum-type name="TextureUnitReset"/>
      <enum-type name="WrapMode"/>
      <modify-function signature="borderColor(unsigned int*)const" remove="all"/>
      <modify-function signature="borderColor(int*)const" remove="all"/>
      <modify-function signature="borderColor(float*)const" remove="all"/>
      <!-- Work around link error introduced by qtbase/d15b02ff291e3124d9bb8ac3b06b704c292f52ab, can be removed once
           qtbase/1bfabe35d8178c93e66acef21c01e08980f9ed0d has landed -->
      <modify-function signature="setData(int,int,int,int,int,int,int,QOpenGLTexture::PixelFormat,QOpenGLTexture::PixelType,const void*,QOpenGLPixelTransferOptions*const)" remove="all"/>
  </object-type>
  <object-type name="QOpenGLTextureBlitter">
      <enum-type name="Origin"/>
  </object-type>
  <object-type name="QOpenGLTimeMonitor" since="5.1"/>
  <object-type name="QOpenGLTimerQuery" since="5.1"/>
  <object-type name="QOpenGLWindow" since="5.4">
      <enum-type name="UpdateBehavior"/>
  </object-type>
  <value-type name="QOpenGLVersionProfile" since="5.1"/>
  <object-type name="QOpenGLVertexArrayObject">
      <object-type name="Binder"/>
  </object-type>
  <value-type name="QPageLayout">
      <enum-type name="Mode"/>
      <enum-type name="Orientation"/>
      <enum-type name="Unit"/>
  </value-type>
  <value-type name="QPageSize">
      <enum-type name="PageSizeId"/>
      <enum-type name="Unit"/>
      <enum-type name="SizeMatchPolicy"/>
  </value-type>
  <object-type name="QPaintDeviceWindow"/>
  <value-type name="QPixelFormat">
      <enum-type name="AlphaUsage"/>
      <enum-type name="AlphaPosition"/>
      <enum-type name="AlphaPremultiplied"/>
      <enum-type name="ByteOrder"/>
      <enum-type name="ColorModel"/>
      <enum-type name="TypeInterpretation"/>
      <enum-type name="YUVLayout"/>
  </value-type>
  <object-type name="QPdfWriter"/>
  <value-type name="QPointingDeviceUniqueId"/>
  <value-type name="QRawFont">
      <enum-type name="AntialiasingType"/>
      <enum-type name="LayoutFlag" flags="LayoutFlags"/>
      <modify-function signature="advancesForGlyphIndexes(const quint32*,QPointF*,int)const" remove="all"/>
      <modify-function signature="advancesForGlyphIndexes(const quint32*,QPointF*,int,QFlags&lt;QRawFont::LayoutFlag&gt;)const" remove="all"/>
      <modify-function signature="glyphIndexesForChars(const QChar*,int,quint32*,int*)const" remove="all"/>
      <modify-function signature="loadFromData(const QByteArray&amp;,qreal, QFont::HintingPreference)" allow-thread="yes"/>
      <modify-function signature="loadFromFile(const QString&amp;,qreal, QFont::HintingPreference)" allow-thread="yes"/>
  </value-type>
  <object-type name="QRasterWindow"/>
  <object-type name="QScreen">
      <modify-function signature="grabWindow(WId,int,int,int,int)">
        <modify-argument index="1">
            <replace-type modified-type="long"/>
        </modify-argument>
        <inject-code file="../glue/qtgui.cpp" snippet="qscreen-grabWindow"/>
      </modify-function>
  </object-type>
  <object-type name="QStyleHints"/>

</typesystem>
