1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the QtGui module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#ifndef QPLATFORMWINDOW_P_H
41#define QPLATFORMWINDOW_P_H
42
43//
44// W A R N I N G
45// -------------
46//
47// This file is not part of the Qt API. It exists purely as an
48// implementation detail. This header file may change from version to
49// version without notice, or even be removed.
50//
51// We mean it.
52//
53
54#include <QtGui/private/qtguiglobal_p.h>
55#include <QtCore/qbasictimer.h>
56#include <QtCore/qrect.h>
57
58QT_BEGIN_NAMESPACE
59
60class QMargins;
61
62class QPlatformWindowPrivate
63{
64public:
65 QRect rect;
66 QBasicTimer updateTimer;
67};
68
69// ----------------- QNativeInterface -----------------
70
71namespace QNativeInterface::Private {
72
73#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC)
74struct Q_GUI_EXPORT QCocoaWindow
75{
76 QT_DECLARE_NATIVE_INTERFACE(QCocoaWindow)
77 virtual void setContentBorderEnabled(bool enable) = 0;
78 virtual QPoint bottomLeftClippedByNSWindowOffset() const = 0;
79};
80#endif
81
82#if QT_CONFIG(xcb) || defined(Q_CLANG_QDOC)
83struct Q_GUI_EXPORT QXcbWindow
84{
85 QT_DECLARE_NATIVE_INTERFACE(QXcbWindow)
86
87 enum WindowType {
88 None = 0x000000,
89 Normal = 0x000001,
90 Desktop = 0x000002,
91 Dock = 0x000004,
92 Toolbar = 0x000008,
93 Menu = 0x000010,
94 Utility = 0x000020,
95 Splash = 0x000040,
96 Dialog = 0x000080,
97 DropDownMenu = 0x000100,
98 PopupMenu = 0x000200,
99 Tooltip = 0x000400,
100 Notification = 0x000800,
101 Combo = 0x001000,
102 Dnd = 0x002000,
103 KdeOverride = 0x004000
104 };
105 Q_DECLARE_FLAGS(WindowTypes, WindowType)
106
107 virtual void setWindowType(WindowTypes type) = 0;
108 virtual void setWindowRole(const QString &role) = 0;
109 virtual void setWindowIconText(const QString &text) = 0;
110 virtual uint visualId() const = 0;
111};
112#endif // xcb
113
114#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
115struct Q_GUI_EXPORT QWindowsWindow
116{
117 QT_DECLARE_NATIVE_INTERFACE(QWindowsWindow)
118
119 virtual void setHasBorderInFullScreen(bool border) = 0;
120 virtual bool hasBorderInFullScreen() const = 0;
121
122 virtual QMargins customMargins() const = 0;
123 virtual void setCustomMargins(const QMargins &margins) = 0;
124};
125#endif // Q_OS_WIN
126
127} // QNativeInterface::Private
128
129QT_END_NAMESPACE
130
131#endif // QPLATFORMWINDOW_P_H
132