summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-11-12 16:30:05 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-12-14 16:33:34 +0000
commit1d03ed3f2b6cdad2719b66b056c4c6be2018c460 (patch)
treeba80ac855faa9cf765ba98d11d58201b841f17cd /src/gui
parent3c8cf550740746a0b6e8ed77569c8c57c9c14f6b (diff)
Make native cursor handles accessible.
Add QWindowsNativeInterface::nativeResourceForCursor() and implement for Windows (returning the HCURSOR) and XCB (returning the xcb_cursor). Task-number: QTBUG-49386 Change-Id: I963869f6e8741449822ecbe6489f9c42a786c7a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatformnativeinterface.cpp9
-rw-r--r--src/gui/kernel/qplatformnativeinterface.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformnativeinterface.cpp b/src/gui/kernel/qplatformnativeinterface.cpp
index 8fa8debcb9..48e6091571 100644
--- a/src/gui/kernel/qplatformnativeinterface.cpp
+++ b/src/gui/kernel/qplatformnativeinterface.cpp
@@ -80,6 +80,15 @@ void * QPlatformNativeInterface::nativeResourceForBackingStore(const QByteArray
return 0;
}
+#ifndef QT_NO_CURSOR
+void *QPlatformNativeInterface::nativeResourceForCursor(const QByteArray &resource, const QCursor &cursor)
+{
+ Q_UNUSED(resource);
+ Q_UNUSED(cursor);
+ return Q_NULLPTR;
+}
+#endif // !QT_NO_CURSOR
+
QPlatformNativeInterface::NativeResourceForIntegrationFunction QPlatformNativeInterface::nativeResourceFunctionForIntegration(const QByteArray &resource)
{
Q_UNUSED(resource);
diff --git a/src/gui/kernel/qplatformnativeinterface.h b/src/gui/kernel/qplatformnativeinterface.h
index 71a4e9c768..c8d868a41d 100644
--- a/src/gui/kernel/qplatformnativeinterface.h
+++ b/src/gui/kernel/qplatformnativeinterface.h
@@ -65,6 +65,9 @@ public:
virtual void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen);
virtual void *nativeResourceForWindow(const QByteArray &resource, QWindow *window);
virtual void *nativeResourceForBackingStore(const QByteArray &resource, QBackingStore *backingStore);
+#ifndef QT_NO_CURSOR
+ virtual void *nativeResourceForCursor(const QByteArray &resource, const QCursor &cursor);
+#endif
typedef void * (*NativeResourceForIntegrationFunction)();
typedef void * (*NativeResourceForContextFunction)(QOpenGLContext *context);