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#include "qplatformnativeinterface.h"
5#include <QtCore/qvariant.h>
6#include <QtCore/qmap.h>
7#include <QtGui/qcursor.h>
8
9QT_BEGIN_NAMESPACE
10
11/*!
12 \class QPlatformNativeInterface
13 \since 5.0
14 \internal
15 \preliminary
16 \ingroup qpa
17
18 \brief The QPlatformNativeInterface class provides an abstraction for retrieving native
19 resource handles.
20 */
21
22void *QPlatformNativeInterface::nativeResourceForIntegration(const QByteArray &resource)
23{
24 Q_UNUSED(resource);
25 return nullptr;
26}
27
28void *QPlatformNativeInterface::nativeResourceForScreen(const QByteArray &resource, QScreen *screen)
29{
30 Q_UNUSED(resource);
31 Q_UNUSED(screen);
32 return nullptr;
33}
34
35void *QPlatformNativeInterface::nativeResourceForWindow(const QByteArray &resource, QWindow *window)
36{
37 Q_UNUSED(resource);
38 Q_UNUSED(window);
39 return nullptr;
40}
41
42void *QPlatformNativeInterface::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
43{
44 Q_UNUSED(resource);
45 Q_UNUSED(context);
46 return nullptr;
47}
48
49void * QPlatformNativeInterface::nativeResourceForBackingStore(const QByteArray &resource, QBackingStore *backingStore)
50{
51 Q_UNUSED(resource);
52 Q_UNUSED(backingStore);
53 return nullptr;
54}
55
56#ifndef QT_NO_CURSOR
57void *QPlatformNativeInterface::nativeResourceForCursor(const QByteArray &resource, const QCursor &cursor)
58{
59 Q_UNUSED(resource);
60 Q_UNUSED(cursor);
61 return nullptr;
62}
63#endif // !QT_NO_CURSOR
64
65QPlatformNativeInterface::NativeResourceForIntegrationFunction QPlatformNativeInterface::nativeResourceFunctionForIntegration(const QByteArray &resource)
66{
67 Q_UNUSED(resource);
68 return nullptr;
69}
70
71QPlatformNativeInterface::NativeResourceForContextFunction QPlatformNativeInterface::nativeResourceFunctionForContext(const QByteArray &resource)
72{
73 Q_UNUSED(resource);
74 return nullptr;
75}
76
77QPlatformNativeInterface::NativeResourceForScreenFunction QPlatformNativeInterface::nativeResourceFunctionForScreen(const QByteArray &resource)
78{
79 Q_UNUSED(resource);
80 return nullptr;
81}
82
83QPlatformNativeInterface::NativeResourceForWindowFunction QPlatformNativeInterface::nativeResourceFunctionForWindow(const QByteArray &resource)
84{
85 Q_UNUSED(resource);
86 return nullptr;
87}
88
89QPlatformNativeInterface::NativeResourceForBackingStoreFunction QPlatformNativeInterface::nativeResourceFunctionForBackingStore(const QByteArray &resource)
90{
91 Q_UNUSED(resource);
92 return nullptr;
93}
94
95QFunctionPointer QPlatformNativeInterface::platformFunction(const QByteArray &function) const
96{
97 Q_UNUSED(function);
98 return nullptr;
99}
100
101/*!
102 Contains generic window properties that the platform may utilize.
103*/
104QVariantMap QPlatformNativeInterface::windowProperties(QPlatformWindow *window) const
105{
106 Q_UNUSED(window);
107 return QVariantMap();
108}
109
110/*!
111 Returns a window property with \a name.
112
113 If the property does not exist, returns a default-constructed value.
114*/
115QVariant QPlatformNativeInterface::windowProperty(QPlatformWindow *window, const QString &name) const
116{
117 Q_UNUSED(window);
118 Q_UNUSED(name);
119 return QVariant();
120}
121
122/*!
123 Returns a window property with \a name. If the value does not exist, defaultValue is returned.
124*/
125QVariant QPlatformNativeInterface::windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const
126{
127 Q_UNUSED(window);
128 Q_UNUSED(name);
129 Q_UNUSED(defaultValue);
130 return QVariant();
131}
132
133/*!
134 Sets a window property with \a name to \a value.
135*/
136void QPlatformNativeInterface::setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value)
137{
138 Q_UNUSED(window);
139 Q_UNUSED(name);
140 Q_UNUSED(value);
141}
142
143QT_END_NAMESPACE
144
145#include "moc_qplatformnativeinterface.cpp"
146

source code of qtbase/src/gui/kernel/qplatformnativeinterface.cpp