summaryrefslogtreecommitdiffstats
path: root/src/gui/platform
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-07 12:11:46 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-07 13:03:27 +0200
commit0efe79f80d6f249040f47162ebbfc82289ca073d (patch)
treeb2326e1c7392367e438a16370f4cfb0ad63b09a0 /src/gui/platform
parent4ef79853528dcc908ad3737f7bebf38b059de959 (diff)
Rename the new platform APIs from QPlatformInterface to QNativeInterface
We were already using the 'native' nomenclature when referring to these kinds of APIs, e.g. when talking about native handles, or the existing QPlatformNativeInterface on a QPA level. Using 'native' for the user facing APIs also distinguishes them from the 'platform' backend layer in QPA and elsewhere. Change-Id: I0f3273265904f0f19c0b6d62471f8820d3c3232e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/platform')
-rw-r--r--src/gui/platform/android/qandroidplatforminterface.cpp8
-rw-r--r--src/gui/platform/macos/qcocoaplatforminterface.mm14
-rw-r--r--src/gui/platform/unix/qunixplatforminterface.cpp26
-rw-r--r--src/gui/platform/windows/qwindowsmime_p.h4
-rw-r--r--src/gui/platform/windows/qwindowsplatforminterface.cpp14
5 files changed, 33 insertions, 33 deletions
diff --git a/src/gui/platform/android/qandroidplatforminterface.cpp b/src/gui/platform/android/qandroidplatforminterface.cpp
index 0a2c708d7a..bdb322add0 100644
--- a/src/gui/platform/android/qandroidplatforminterface.cpp
+++ b/src/gui/platform/android/qandroidplatforminterface.cpp
@@ -45,13 +45,13 @@
QT_BEGIN_NAMESPACE
-using namespace QPlatformInterface::Private;
+using namespace QNativeInterface::Private;
#if defined(Q_OS_ANDROID)
-QT_DEFINE_PLATFORM_INTERFACE(QAndroidOffscreenSurface, QOffscreenSurface);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QAndroidOffScreenIntegration);
+QT_DEFINE_NATIVE_INTERFACE(QAndroidOffscreenSurface, QOffscreenSurface);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QAndroidOffScreenIntegration);
-QOffscreenSurface *QPlatformInterface::QAndroidOffscreenSurface::fromNative(ANativeWindow *nativeSurface)
+QOffscreenSurface *QNativeInterface::QAndroidOffscreenSurface::fromNative(ANativeWindow *nativeSurface)
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QAndroidOffScreenIntegration::createOffscreenSurface>(nativeSurface);
diff --git a/src/gui/platform/macos/qcocoaplatforminterface.mm b/src/gui/platform/macos/qcocoaplatforminterface.mm
index be9e8d18bf..c075a07e66 100644
--- a/src/gui/platform/macos/qcocoaplatforminterface.mm
+++ b/src/gui/platform/macos/qcocoaplatforminterface.mm
@@ -48,17 +48,17 @@
QT_BEGIN_NAMESPACE
-using namespace QPlatformInterface::Private;
+using namespace QNativeInterface::Private;
#ifndef QT_NO_OPENGL
-QT_DEFINE_PLATFORM_INTERFACE(QCocoaGLContext, QOpenGLContext);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QCocoaGLIntegration);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QCocoaWindow);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QCocoaMenu);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QCocoaMenuBar);
+QT_DEFINE_NATIVE_INTERFACE(QCocoaGLContext, QOpenGLContext);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QCocoaGLIntegration);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QCocoaWindow);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QCocoaMenu);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QCocoaMenuBar);
-QOpenGLContext *QPlatformInterface::QCocoaGLContext::fromNative(NSOpenGLContext *nativeContext, QOpenGLContext *shareContext)
+QOpenGLContext *QNativeInterface::QCocoaGLContext::fromNative(NSOpenGLContext *nativeContext, QOpenGLContext *shareContext)
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QCocoaGLIntegration::createOpenGLContext>(nativeContext, shareContext);
diff --git a/src/gui/platform/unix/qunixplatforminterface.cpp b/src/gui/platform/unix/qunixplatforminterface.cpp
index 55650e3efc..378282936e 100644
--- a/src/gui/platform/unix/qunixplatforminterface.cpp
+++ b/src/gui/platform/unix/qunixplatforminterface.cpp
@@ -51,21 +51,21 @@
QT_BEGIN_NAMESPACE
-using namespace QPlatformInterface::Private;
+using namespace QNativeInterface::Private;
#ifndef QT_NO_OPENGL
#if defined(Q_OS_LINUX)
-QT_DEFINE_PLATFORM_INTERFACE(QGLXContext, QOpenGLContext);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QGLXIntegration);
+QT_DEFINE_NATIVE_INTERFACE(QGLXContext, QOpenGLContext);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QGLXIntegration);
-QOpenGLContext *QPlatformInterface::QGLXContext::fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext)
+QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext)
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QGLXIntegration::createOpenGLContext>(configBasedContext, nullptr, shareContext);
}
-QOpenGLContext *QPlatformInterface::QGLXContext::fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext)
+QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext)
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QGLXIntegration::createOpenGLContext>(visualBasedContext, visualInfo, shareContext);
@@ -73,10 +73,10 @@ QOpenGLContext *QPlatformInterface::QGLXContext::fromNative(GLXContext visualBas
#endif
#if QT_CONFIG(egl)
-QT_DEFINE_PLATFORM_INTERFACE(QEGLContext, QOpenGLContext);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QEGLIntegration);
+QT_DEFINE_NATIVE_INTERFACE(QEGLContext, QOpenGLContext);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEGLIntegration);
-QOpenGLContext *QPlatformInterface::QEGLContext::fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext)
+QOpenGLContext *QNativeInterface::QEGLContext::fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext)
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QEGLIntegration::createOpenGLContext>(context, display, shareContext);
@@ -86,19 +86,19 @@ QOpenGLContext *QPlatformInterface::QEGLContext::fromNative(EGLContext context,
#endif // QT_NO_OPENGL
#if QT_CONFIG(xcb)
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QXcbScreen);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QXcbWindow);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QXcbScreen);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QXcbWindow);
#endif
#if QT_CONFIG(vsp2)
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QVsp2Screen);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QVsp2Screen);
#endif
#if QT_CONFIG(evdev)
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QEvdevKeyMapper);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEvdevKeyMapper);
template <>
-QEvdevKeyMapper *QKeyMapper::platformInterface<QEvdevKeyMapper>() const
+QEvdevKeyMapper *QKeyMapper::nativeInterface<QEvdevKeyMapper>() const
{
return dynamic_cast<QEvdevKeyMapper*>(QGuiApplicationPrivate::platformIntegration());
}
diff --git a/src/gui/platform/windows/qwindowsmime_p.h b/src/gui/platform/windows/qwindowsmime_p.h
index 5d71b9ee94..71b1c8a87f 100644
--- a/src/gui/platform/windows/qwindowsmime_p.h
+++ b/src/gui/platform/windows/qwindowsmime_p.h
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
class QMimeData;
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
class Q_GUI_EXPORT QWindowsMime
{
@@ -78,7 +78,7 @@ public:
virtual QString mimeForFormat(const FORMATETC &formatetc) const = 0;
};
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
QT_END_NAMESPACE
diff --git a/src/gui/platform/windows/qwindowsplatforminterface.cpp b/src/gui/platform/windows/qwindowsplatforminterface.cpp
index e1aa3b6970..950c86d7fb 100644
--- a/src/gui/platform/windows/qwindowsplatforminterface.cpp
+++ b/src/gui/platform/windows/qwindowsplatforminterface.cpp
@@ -47,20 +47,20 @@
QT_BEGIN_NAMESPACE
-using namespace QPlatformInterface::Private;
+using namespace QNativeInterface::Private;
#ifndef QT_NO_OPENGL
-QT_DEFINE_PLATFORM_INTERFACE(QWGLContext, QOpenGLContext);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QWindowsGLIntegration);
+QT_DEFINE_NATIVE_INTERFACE(QWGLContext, QOpenGLContext);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWindowsGLIntegration);
-HMODULE QPlatformInterface::QWGLContext::openGLModuleHandle()
+HMODULE QNativeInterface::QWGLContext::openGLModuleHandle()
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QWindowsGLIntegration::openGLModuleHandle>();
}
-QOpenGLContext *QPlatformInterface::QWGLContext::fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext)
+QOpenGLContext *QNativeInterface::QWGLContext::fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext)
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QWindowsGLIntegration::createOpenGLContext>(context, window, shareContext);
@@ -68,7 +68,7 @@ QOpenGLContext *QPlatformInterface::QWGLContext::fromNative(HGLRC context, HWND
#endif // QT_NO_OPENGL
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QWindowsApplication);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QWindowsWindow);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWindowsApplication);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWindowsWindow);
QT_END_NAMESPACE