4#ifndef QGUIAPPLICATION_PLATFORM_H
5#define QGUIAPPLICATION_PLATFORM_H
16#include <QtGui/qtguiglobal.h>
18#include <QtCore/qnativeinterface.h>
19#include <QtGui/qguiapplication.h>
22typedef struct _XDisplay Display;
23struct xcb_connection_t;
35#if defined(Q_OS_VISIONOS) || defined(Q_QDOC)
37Q_FORWARD_DECLARE_OBJC_CLASS(CP_OBJECT_cp_layer_renderer_capabilities);
38typedef CP_OBJECT_cp_layer_renderer_capabilities *cp_layer_renderer_capabilities_t;
39Q_FORWARD_DECLARE_OBJC_CLASS(CP_OBJECT_cp_layer_renderer_configuration);
40typedef CP_OBJECT_cp_layer_renderer_configuration *cp_layer_renderer_configuration_t;
41Q_FORWARD_DECLARE_OBJC_CLASS(CP_OBJECT_cp_layer_renderer);
42typedef CP_OBJECT_cp_layer_renderer *cp_layer_renderer_t;
44typedef struct cp_layer_renderer_capabilities_s *cp_layer_renderer_capabilities_t;
45typedef struct cp_layer_renderer_configuration_s *cp_layer_renderer_configuration_t;
46typedef struct cp_layer_renderer_s *cp_layer_renderer_t;
53namespace QNativeInterface
56#if QT_CONFIG(xcb) || defined(Q_QDOC)
57struct Q_GUI_EXPORT QX11Application
59 QT_DECLARE_NATIVE_INTERFACE(QX11Application, 1, QGuiApplication)
60 virtual Display *display()
const = 0;
61 virtual xcb_connection_t *connection()
const = 0;
65#if QT_CONFIG(wayland) || defined(Q_QDOC)
66struct Q_GUI_EXPORT QWaylandApplication
68 QT_DECLARE_NATIVE_INTERFACE(QWaylandApplication, 1, QGuiApplication)
69 virtual wl_display *display()
const = 0;
70 virtual wl_compositor *compositor()
const = 0;
71 virtual wl_seat *seat()
const = 0;
72 virtual wl_keyboard *keyboard()
const = 0;
73 virtual wl_pointer *pointer()
const = 0;
74 virtual wl_touch *touch()
const = 0;
75 virtual uint lastInputSerial()
const = 0;
76 virtual wl_seat *lastInputSeat()
const = 0;
80#if defined(Q_OS_VISIONOS) || defined(Q_QDOC)
81struct Q_GUI_EXPORT QVisionOSApplication
83 QT_DECLARE_NATIVE_INTERFACE(QVisionOSApplication, 1, QGuiApplication)
84 struct ImmersiveSpaceCompositorLayer {
85 virtual void configure(cp_layer_renderer_capabilities_t, cp_layer_renderer_configuration_t)
const {}
86 virtual void render(cp_layer_renderer_t) = 0;
87 virtual void handleSpatialEvents(
const QJsonObject &) {};
89 virtual void setImmersiveSpaceCompositorLayer(ImmersiveSpaceCompositorLayer *layer) = 0;
90 virtual void openImmersiveSpace() = 0;
91 virtual void dismissImmersiveSpace() = 0;