<?xml version="1.0" encoding="UTF-8"?>
<!--
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

It is not possible to split this per platform since all type entries need to be
known for the code snippets of QGuiApplication::nativeInterface() and similar.
-->

<typesystem package="PySide6.QtGui">
    <namespace-type name="QNativeInterface" private="yes" since="6.7">
        <object-type name="QWaylandApplication" private="yes" disable-wrapper="yes">
            <configuration condition="QT_CONFIG(wayland)"/>
            <modify-function signature="^(compositor|display|keyboard|pointer|seat|touch|lastInputSeat)\(\)const$">
                <modify-argument index="return">
                    <replace-type modified-type="int"/>
                </modify-argument>
                <inject-code class="target" position="end" file="../glue/qtgui.cpp"
                             snippet="native-resource-ptr"/>
            </modify-function>
        </object-type>
        <object-type name="QX11Application" private="yes" disable-wrapper="yes"
                     force-abstract="yes">
            <configuration condition="QT_CONFIG(xcb)"/>
            <modify-function signature="display()const">
                <modify-argument index="return">
                    <replace-type modified-type="int"/>
                </modify-argument>
                <inject-code class="target" position="end" file="../glue/qtgui.cpp"
                             snippet="native-resource-ptr"/>
            </modify-function>
            <modify-function signature="connection()const">
                <modify-argument index="return">
                    <replace-type modified-type="int"/>
                </modify-argument>
                <inject-code class="target" position="end" file="../glue/qtgui.cpp"
                             snippet="native-resource-ptr"/>
            </modify-function>
        </object-type>
        <object-type name="QWindowsScreen" private="yes" disable-wrapper="yes"
                     force-abstract="yes">
            <configuration condition="#ifdef Q_OS_WIN"/>
        </object-type>
    </namespace-type>
</typesystem>
