1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QGUIAPPLICATION_PLATFORM_H
5#define QGUIAPPLICATION_PLATFORM_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is part of the native interface APIs. Usage of
12// this API may make your code source and binary incompatible
13// with future versions of Qt.
14//
15
16#include <QtGui/qtguiglobal.h>
17
18#include <QtCore/qnativeinterface.h>
19#include <QtGui/qguiapplication.h>
20
21#if QT_CONFIG(xcb)
22typedef struct _XDisplay Display;
23struct xcb_connection_t;
24#endif
25
26#if defined(Q_OS_UNIX)
27struct wl_display;
28struct wl_compositor;
29struct wl_seat;
30struct wl_keyboard;
31struct wl_pointer;
32struct wl_touch;
33#endif
34
35QT_BEGIN_NAMESPACE
36
37namespace QNativeInterface
38{
39
40#if QT_CONFIG(xcb) || defined(Q_QDOC)
41struct Q_GUI_EXPORT QX11Application
42{
43 QT_DECLARE_NATIVE_INTERFACE(QX11Application, 1, QGuiApplication)
44 virtual Display *display() const = 0;
45 virtual xcb_connection_t *connection() const = 0;
46};
47#endif
48
49#if defined(Q_OS_UNIX) || defined(Q_CLANG_QDOC)
50struct Q_GUI_EXPORT QWaylandApplication
51{
52 QT_DECLARE_NATIVE_INTERFACE(QWaylandApplication, 1, QGuiApplication)
53 virtual wl_display *display() const = 0;
54 virtual wl_compositor *compositor() const = 0;
55 virtual wl_seat *seat() const = 0;
56 virtual wl_keyboard *keyboard() const = 0;
57 virtual wl_pointer *pointer() const = 0;
58 virtual wl_touch *touch() const = 0;
59 virtual uint lastInputSerial() const = 0;
60 virtual wl_seat *lastInputSeat() const = 0;
61};
62#endif
63
64} // QNativeInterface
65
66QT_END_NAMESPACE
67
68#endif // QGUIAPPLICATION_PLATFORM_H
69

source code of qtbase/src/gui/kernel/qguiapplication_platform.h