Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplatformwindow_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QPLATFORMWINDOW_P_H
5#define QPLATFORMWINDOW_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/private/qtguiglobal_p.h>
19#include <QtCore/qbasictimer.h>
20#include <QtCore/qrect.h>
21#include <QtCore/qnativeinterface.h>
22#include <QtGui/qwindow.h>
23
24#if QT_CONFIG(wayland)
25#include <any>
26#include <QtCore/qobject.h>
27
28struct wl_surface;
29#endif
30
32
33class QMargins;
34
41
42// ----------------- QNativeInterface -----------------
43
44namespace QNativeInterface::Private {
45
46#if defined(Q_OS_WASM) || defined(Q_QDOC)
48{
50 virtual emscripten::val document() const = 0;
51 virtual emscripten::val clientArea() const = 0;
52};
53#endif
54
55#if defined(Q_OS_MACOS) || defined(Q_QDOC)
57{
59 virtual void setContentBorderEnabled(bool enable) = 0;
60 virtual QPoint bottomLeftClippedByNSWindowOffset() const = 0;
61};
62#endif
63
64#if QT_CONFIG(xcb) || defined(Q_QDOC)
66{
68
69 enum WindowType {
70 None = 0x000000,
71 Normal = 0x000001,
72 Desktop = 0x000002,
73 Dock = 0x000004,
74 Toolbar = 0x000008,
75 Menu = 0x000010,
76 Utility = 0x000020,
77 Splash = 0x000040,
78 Dialog = 0x000080,
79 DropDownMenu = 0x000100,
80 PopupMenu = 0x000200,
81 Tooltip = 0x000400,
82 Notification = 0x000800,
83 Combo = 0x001000,
84 Dnd = 0x002000,
85 KdeOverride = 0x004000
86 };
88
89 virtual void setWindowType(WindowTypes type) = 0;
90 virtual void setWindowRole(const QString &role) = 0;
91 virtual void setWindowIconText(const QString &text) = 0;
92 virtual uint visualId() const = 0;
93};
94#endif // xcb
95
96#if defined(Q_OS_WIN) || defined(Q_QDOC)
98{
100
101 virtual void setHasBorderInFullScreen(bool border) = 0;
102 virtual bool hasBorderInFullScreen() const = 0;
103
104 virtual QMargins customMargins() const = 0;
105 virtual void setCustomMargins(const QMargins &margins) = 0;
106};
107#endif // Q_OS_WIN
108
109#if QT_CONFIG(wayland)
110struct Q_GUI_EXPORT QWaylandWindow : public QObject
111{
113public:
115
116 virtual wl_surface *surface() const = 0;
117 virtual void setCustomMargins(const QMargins &margins) = 0;
118 virtual void requestXdgActivationToken(uint serial) = 0;
119 template<typename T>
120 T *surfaceRole() const
121 {
123 auto role = std::any_cast<T *>(&anyRole);
124 return role ? *role : nullptr;
125 }
127 void surfaceCreated();
128 void surfaceDestroyed();
129 void surfaceRoleCreated();
132
133protected:
134 virtual std::any _surfaceRole() const = 0;
135};
136#endif
137
138} // QNativeInterface::Private
139
140QT_END_NAMESPACE
141
142#endif // QPLATFORMWINDOW_P_H
\inmodule QtCore
Definition qmargins.h:26
Combined button and popup list for selecting options.
static QSize fixInitialSize(QSize size, const QWindow *w, int deviceIndependentDefaultWidth, int deviceIndependentDefaultHeight)
static const QScreen * effectiveScreen(const QWindow *window)
#define QWINDOWSIZE_MAX