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
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// Qt-Security score:significant reason:default
4
5#ifndef QPLATFORMNATIVEINTERFACE_H
6#define QPLATFORMNATIVEINTERFACE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is part of the QPA API and is not meant to be used
13// in applications. Usage of this API may make your code
14// source and binary incompatible with future versions of Qt.
15//
16
17#include <QtGui/qtguiglobal.h>
18#include <QtGui/qwindowdefs.h>
19#include <QtCore/QObject>
20#include <QtCore/QVariant>
21
22QT_BEGIN_NAMESPACE
23
24
25class QOpenGLContext;
26class QScreen;
27class QWindow;
28class QPlatformWindow;
29class QBackingStore;
30
31class Q_GUI_EXPORT QPlatformNativeInterface : public QObject
32{
33 Q_OBJECT
34 Q_MOC_INCLUDE(<qpa/qplatformwindow.h>)
35public:
36 virtual void *nativeResourceForIntegration(const QByteArray &resource);
37 virtual void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context);
38 virtual void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen);
39 virtual void *nativeResourceForWindow(const QByteArray &resource, QWindow *window);
40 virtual void *nativeResourceForBackingStore(const QByteArray &resource, QBackingStore *backingStore);
41#ifndef QT_NO_CURSOR
42 virtual void *nativeResourceForCursor(const QByteArray &resource, const QCursor &cursor);
43#endif
44
45 typedef void * (*NativeResourceForIntegrationFunction)();
46 typedef void * (*NativeResourceForContextFunction)(QOpenGLContext *context);
47 typedef void * (*NativeResourceForScreenFunction)(QScreen *screen);
48 typedef void * (*NativeResourceForWindowFunction)(QWindow *window);
49 typedef void * (*NativeResourceForBackingStoreFunction)(QBackingStore *backingStore);
50 virtual NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource);
51 virtual NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource);
52 virtual NativeResourceForScreenFunction nativeResourceFunctionForScreen(const QByteArray &resource);
53 virtual NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource);
54 virtual NativeResourceForBackingStoreFunction nativeResourceFunctionForBackingStore(const QByteArray &resource);
55
56 virtual QFunctionPointer platformFunction(const QByteArray &function) const;
57
58 virtual QVariantMap windowProperties(QPlatformWindow *window) const;
59 virtual QVariant windowProperty(QPlatformWindow *window, const QString &name) const;
60 virtual QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const;
61 virtual void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value);
62
63Q_SIGNALS:
64 void windowPropertyChanged(QPlatformWindow *window, const QString &propertyName);
65};
66
67QT_END_NAMESPACE
68
69#endif // QPLATFORMNATIVEINTERFACE_H
The QPlatformNativeInterface class provides an abstraction for retrieving native resource handles.
Combined button and popup list for selecting options.