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
qscreen_platform.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QSCREEN_PLATFORM_H
6#define QSCREEN_PLATFORM_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is part of the native interface APIs. Usage of
13// this API may make your code source and binary incompatible
14// with future versions of Qt.
15//
16
17#include <QtGui/qtguiglobal.h>
18
19#include <QtCore/qnativeinterface.h>
20#include <QtGui/qguiapplication.h>
21
22#if defined(Q_OS_WIN32)
23#include <QtGui/qwindowdefs_win.h>
24#endif
25
26#if QT_CONFIG(wayland)
27struct wl_output;
28#endif
29
30#if defined(Q_OS_MACOS)
31Q_FORWARD_DECLARE_OBJC_CLASS(NSScreen);
32#endif
33
34QT_BEGIN_NAMESPACE
35
36namespace QNativeInterface {
37
38#if defined(Q_OS_WIN32) || defined(Q_QDOC)
39struct Q_GUI_EXPORT QWindowsScreen
40{
41 QT_DECLARE_NATIVE_INTERFACE(QWindowsScreen, 1, QScreen)
42 virtual HMONITOR handle() const = 0;
43};
44#endif
45
46#if QT_CONFIG(wayland) || defined(Q_QDOC)
47struct Q_GUI_EXPORT QWaylandScreen
48{
49 QT_DECLARE_NATIVE_INTERFACE(QWaylandScreen, 1, QScreen)
50 virtual wl_output *output() const = 0;
51};
52#endif
53
54#if defined(Q_OS_ANDROID) || defined(Q_QDOC)
55struct Q_GUI_EXPORT QAndroidScreen
56{
57 QT_DECLARE_NATIVE_INTERFACE(QAndroidScreen, 1, QScreen)
58 virtual int displayId() const = 0;
59};
60#endif
61
62#if defined(Q_OS_MACOS) || defined(Q_QDOC)
63struct Q_GUI_EXPORT QCocoaScreen
64{
65 QT_DECLARE_NATIVE_INTERFACE(QCocoaScreen, 1, QScreen)
66 virtual NSScreen *nativeScreen() const = 0;
67};
68#endif
69
70} // namespace QNativeInterface
71
72QT_END_NAMESPACE
73
74#endif