Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:20:33

0001 // Copyright (C) 2021 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QGUIAPPLICATION_PLATFORM_H
0005 #define QGUIAPPLICATION_PLATFORM_H
0006 
0007 //
0008 //  W A R N I N G
0009 //  -------------
0010 //
0011 // This file is part of the native interface APIs. Usage of
0012 // this API may make your code source and binary incompatible
0013 // with future versions of Qt.
0014 //
0015 
0016 #include <QtGui/qtguiglobal.h>
0017 
0018 #include <QtCore/qnativeinterface.h>
0019 #include <QtGui/qguiapplication.h>
0020 
0021 #if QT_CONFIG(xcb)
0022 typedef struct _XDisplay Display;
0023 struct xcb_connection_t;
0024 #endif
0025 
0026 #if QT_CONFIG(wayland)
0027 struct wl_display;
0028 struct wl_compositor;
0029 struct wl_seat;
0030 struct wl_keyboard;
0031 struct wl_pointer;
0032 struct wl_touch;
0033 
0034 #if QT_CONFIG(xkbcommon)
0035 struct xkb_context;
0036 #endif
0037 
0038 #endif
0039 
0040 #if defined(Q_OS_VISIONOS) || defined(Q_QDOC)
0041 #  ifdef __OBJC__
0042 Q_FORWARD_DECLARE_OBJC_CLASS(CP_OBJECT_cp_layer_renderer_capabilities);
0043 typedef CP_OBJECT_cp_layer_renderer_capabilities *cp_layer_renderer_capabilities_t;
0044 Q_FORWARD_DECLARE_OBJC_CLASS(CP_OBJECT_cp_layer_renderer_configuration);
0045 typedef CP_OBJECT_cp_layer_renderer_configuration *cp_layer_renderer_configuration_t;
0046 Q_FORWARD_DECLARE_OBJC_CLASS(CP_OBJECT_cp_layer_renderer);
0047 typedef CP_OBJECT_cp_layer_renderer *cp_layer_renderer_t;
0048 #  else
0049 typedef struct cp_layer_renderer_capabilities_s *cp_layer_renderer_capabilities_t;
0050 typedef struct cp_layer_renderer_configuration_s *cp_layer_renderer_configuration_t;
0051 typedef struct cp_layer_renderer_s *cp_layer_renderer_t;
0052 #  endif
0053 #endif
0054 
0055 
0056 QT_BEGIN_NAMESPACE
0057 
0058 namespace QNativeInterface
0059 {
0060 
0061 #if QT_CONFIG(xcb) || defined(Q_QDOC)
0062 struct Q_GUI_EXPORT QX11Application
0063 {
0064     QT_DECLARE_NATIVE_INTERFACE(QX11Application, 1, QGuiApplication)
0065     virtual Display *display() const = 0;
0066     virtual xcb_connection_t *connection() const = 0;
0067 };
0068 #endif
0069 
0070 #if QT_CONFIG(wayland) || defined(Q_QDOC)
0071 struct Q_GUI_EXPORT QWaylandApplication
0072 {
0073     QT_DECLARE_NATIVE_INTERFACE(QWaylandApplication, 2, QGuiApplication)
0074     virtual wl_display *display() const = 0;
0075     virtual wl_compositor *compositor() const = 0;
0076     virtual wl_seat *seat() const = 0;
0077     virtual wl_keyboard *keyboard() const = 0;
0078     virtual wl_pointer *pointer() const = 0;
0079     virtual wl_touch *touch() const = 0;
0080     virtual uint lastInputSerial() const = 0;
0081     virtual wl_seat *lastInputSeat() const = 0;
0082 #if QT_CONFIG(xkbcommon)
0083     virtual xkb_context *xkbContext() const = 0;
0084 #endif
0085 };
0086 #endif
0087 
0088 #if defined(Q_OS_VISIONOS) || defined(Q_QDOC)
0089 struct Q_GUI_EXPORT QVisionOSApplication
0090 {
0091     QT_DECLARE_NATIVE_INTERFACE(QVisionOSApplication, 1, QGuiApplication)
0092     struct ImmersiveSpaceCompositorLayer {
0093         virtual void configure(cp_layer_renderer_capabilities_t, cp_layer_renderer_configuration_t) const {}
0094         virtual void render(cp_layer_renderer_t) = 0;
0095         virtual void handleSpatialEvents(const QJsonObject &) {};
0096     };
0097     virtual void setImmersiveSpaceCompositorLayer(ImmersiveSpaceCompositorLayer *layer) = 0;
0098     virtual void openImmersiveSpace() = 0;
0099     virtual void dismissImmersiveSpace() = 0;
0100 };
0101 #endif
0102 
0103 } // QNativeInterface
0104 
0105 QT_END_NAMESPACE
0106 
0107 #endif // QGUIAPPLICATION_PLATFORM_H