Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qplatformnativeinterface.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 QPLATFORMNATIVEINTERFACE_H
5#define QPLATFORMNATIVEINTERFACE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is part of the QPA API and is not meant to be used
12// in applications. Usage of this API may make your code
13// source and binary incompatible with future versions of Qt.
14//
15
16#include <QtGui/qtguiglobal.h>
17#include <QtGui/qwindowdefs.h>
18#include <QtCore/QObject>
19#include <QtCore/QVariant>
20
22
23
24class QOpenGLContext;
25class QScreen;
26class QWindow;
27class QPlatformWindow;
28class QBackingStore;
29
30class Q_GUI_EXPORT QPlatformNativeInterface : public QObject
31{
33 Q_MOC_INCLUDE(<qpa/qplatformwindow.h>)
34public:
35 virtual void *nativeResourceForIntegration(const QByteArray &resource);
36 virtual void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context);
37 virtual void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen);
38 virtual void *nativeResourceForWindow(const QByteArray &resource, QWindow *window);
39 virtual void *nativeResourceForBackingStore(const QByteArray &resource, QBackingStore *backingStore);
40#ifndef QT_NO_CURSOR
41 virtual void *nativeResourceForCursor(const QByteArray &resource, const QCursor &cursor);
42#endif
43
44 typedef void * (*NativeResourceForIntegrationFunction)();
45 typedef void * (*NativeResourceForContextFunction)(QOpenGLContext *context);
46 typedef void * (*NativeResourceForScreenFunction)(QScreen *screen);
47 typedef void * (*NativeResourceForWindowFunction)(QWindow *window);
48 typedef void * (*NativeResourceForBackingStoreFunction)(QBackingStore *backingStore);
49 virtual NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource);
50 virtual NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource);
51 virtual NativeResourceForScreenFunction nativeResourceFunctionForScreen(const QByteArray &resource);
52 virtual NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource);
53 virtual NativeResourceForBackingStoreFunction nativeResourceFunctionForBackingStore(const QByteArray &resource);
54
55 virtual QFunctionPointer platformFunction(const QByteArray &function) const;
56
57 virtual QVariantMap windowProperties(QPlatformWindow *window) const;
58 virtual QVariant windowProperty(QPlatformWindow *window, const QString &name) const;
59 virtual QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const;
60 virtual void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value);
61
64};
65
67
68#endif // QPLATFORMNATIVEINTERFACE_H
The QBackingStore class provides a drawing area for QWindow.
\inmodule QtCore
Definition qbytearray.h:57
The QCursor class provides a mouse cursor with an arbitrary shape.
Definition qcursor.h:45
\inmodule QtCore
Definition qobject.h:103
\inmodule QtGui
The QPlatformNativeInterface class provides an abstraction for retrieving native resource handles.
void windowPropertyChanged(QPlatformWindow *window, const QString &propertyName)
The QPlatformWindow class provides an abstraction for top-level windows.
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
\inmodule QtGui
Definition qwindow.h:63
QCursor cursor
Combined button and popup list for selecting options.
static void * context
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint name
QScreen * screen
[1]
Definition main.cpp:29
#define Q_OBJECT
#define Q_MOC_INCLUDE(...)
#define Q_SIGNALS
aWidget window() -> setWindowTitle("New Window Title")
[2]