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
4#ifndef QSCREEN_PLATFORM_H
5#define QSCREEN_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 defined(Q_OS_WIN32)
22#include <QtGui/qwindowdefs_win.h>
23#endif
24
25#if QT_CONFIG(wayland)
26struct wl_output;
27#endif
28
29#if defined(Q_OS_MACOS)
30Q_FORWARD_DECLARE_OBJC_CLASS(NSScreen);
31#endif
32
33QT_BEGIN_NAMESPACE
34
35namespace QNativeInterface {
36
37#if defined(Q_OS_WIN32) || defined(Q_QDOC)
38struct Q_GUI_EXPORT QWindowsScreen
39{
40 QT_DECLARE_NATIVE_INTERFACE(QWindowsScreen, 1, QScreen)
41 virtual HMONITOR handle() const = 0;
42};
43#endif
44
45#if QT_CONFIG(wayland) || defined(Q_QDOC)
46struct Q_GUI_EXPORT QWaylandScreen
47{
48 QT_DECLARE_NATIVE_INTERFACE(QWaylandScreen, 1, QScreen)
49 virtual wl_output *output() const = 0;
50};
51#endif
52
53#if defined(Q_OS_ANDROID) || defined(Q_QDOC)
54struct Q_GUI_EXPORT QAndroidScreen
55{
56 QT_DECLARE_NATIVE_INTERFACE(QAndroidScreen, 1, QScreen)
57 virtual int displayId() const = 0;
58};
59#endif
60
61#if defined(Q_OS_MACOS) || defined(Q_QDOC)
62struct Q_GUI_EXPORT QCocoaScreen
63{
64 QT_DECLARE_NATIVE_INTERFACE(QCocoaScreen, 1, QScreen)
65 virtual NSScreen *nativeScreen() const = 0;
66};
67#endif
68
69} // namespace QNativeInterface
70
71QT_END_NAMESPACE
72
73#endif