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>
This commit is contained in:
parent
4ef7985352
commit
0efe79f80d
@ -382,7 +382,7 @@ void Widget::renderWindowReady()
|
||||
m_output->append(tr("Qt OpenGL configuration: %1")
|
||||
.arg(QString::fromLatin1(gltype[QOpenGLContext::openGLModuleType()])));
|
||||
#if defined(Q_OS_WIN)
|
||||
using namespace QPlatformInterface;
|
||||
using namespace QNativeInterface;
|
||||
m_output->append(tr("Qt OpenGL library handle: %1")
|
||||
.arg(QString::number(qintptr(QWGLContext::openGLModuleHandle()), 16)));
|
||||
#endif
|
||||
|
@ -1284,21 +1284,26 @@ inline int qIntCast(float f) { return int(f); }
|
||||
// Ensures that the interface's typeinfo is exported so that
|
||||
// dynamic casts work reliably, and protects the destructor
|
||||
// so that pointers to the interface can't be deleted.
|
||||
#define QT_DECLARE_PLATFORM_INTERFACE(InterfaceClass) \
|
||||
#define QT_DECLARE_NATIVE_INTERFACE(InterfaceClass) \
|
||||
protected: virtual ~InterfaceClass(); public:
|
||||
|
||||
// Declares an accessor for the native interface
|
||||
#define QT_DECLARE_NATIVE_INTERFACE_ACCESSOR \
|
||||
template <typename NativeInterface> \
|
||||
NativeInterface *nativeInterface() const;
|
||||
|
||||
// Provides a definition for the interface destructor
|
||||
#define QT_DEFINE_PLATFORM_INTERFACE2(Namespace, InterfaceClass) \
|
||||
#define QT_DEFINE_NATIVE_INTERFACE2(Namespace, InterfaceClass) \
|
||||
QT_PREPEND_NAMESPACE(Namespace)::InterfaceClass::~InterfaceClass() = default
|
||||
|
||||
// Provides a definition for the destructor, and an explicit
|
||||
// template instantiation of the platform interface accessor.
|
||||
#define QT_DEFINE_PLATFORM_INTERFACE3(Namespace, InterfaceClass, PublicClass) \
|
||||
QT_DEFINE_PLATFORM_INTERFACE2(Namespace, InterfaceClass); \
|
||||
template Q_DECL_EXPORT QT_PREPEND_NAMESPACE(Namespace)::InterfaceClass *PublicClass::platformInterface() const
|
||||
// template instantiation of the native interface accessor.
|
||||
#define QT_DEFINE_NATIVE_INTERFACE3(Namespace, InterfaceClass, PublicClass) \
|
||||
QT_DEFINE_NATIVE_INTERFACE2(Namespace, InterfaceClass); \
|
||||
template Q_DECL_EXPORT QT_PREPEND_NAMESPACE(Namespace)::InterfaceClass *PublicClass::nativeInterface() const
|
||||
|
||||
#define QT_DEFINE_PLATFORM_INTERFACE(...) QT_OVERLOADED_MACRO(QT_DEFINE_PLATFORM_INTERFACE, QPlatformInterface, __VA_ARGS__)
|
||||
#define QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(...) QT_OVERLOADED_MACRO(QT_DEFINE_PLATFORM_INTERFACE, QPlatformInterface::Private, __VA_ARGS__)
|
||||
#define QT_DEFINE_NATIVE_INTERFACE(...) QT_OVERLOADED_MACRO(QT_DEFINE_NATIVE_INTERFACE, QNativeInterface, __VA_ARGS__)
|
||||
#define QT_DEFINE_PRIVATE_NATIVE_INTERFACE(...) QT_OVERLOADED_MACRO(QT_DEFINE_NATIVE_INTERFACE, QNativeInterface::Private, __VA_ARGS__)
|
||||
|
||||
// This macro can be used to calculate member offsets for types with a non standard layout.
|
||||
// It uses the fact that offsetof() is allowed to support those types since C++17 as an optional
|
||||
|
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\namespace QPlatformInterface::Private
|
||||
\namespace QNativeInterface::Private
|
||||
\inmodule QtGui
|
||||
\since 6.0
|
||||
\brief Contains the classes providing native interfaces.
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::QCocoaGLContext
|
||||
\class QNativeInterface::QCocoaGLContext
|
||||
\since 6.0
|
||||
\brief Native interface to QPlatformOpenGLContext.
|
||||
\inmodule QtGui
|
||||
@ -50,7 +50,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::Private::QCocoaMenu
|
||||
\class QNativeInterface::Private::QCocoaMenu
|
||||
\since 6.0
|
||||
\brief Native interface to QPlatformMenu.
|
||||
\inmodule QtGui
|
||||
@ -58,7 +58,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::Private::QCocoaWindow
|
||||
\class QNativeInterface::Private::QCocoaWindow
|
||||
\since 6.0
|
||||
\brief Native interface to QPlatformWindow.
|
||||
\inmodule QtGui
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::QEGLContext
|
||||
\class QNativeInterface::QEGLContext
|
||||
\since 6.0
|
||||
\brief Native interface to QPlatformOpenGLContext.
|
||||
\inmodule QtGui
|
||||
@ -74,7 +74,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::Private::QEvdevKeyMapper
|
||||
\class QNativeInterface::Private::QEvdevKeyMapper
|
||||
\since 6.0
|
||||
\brief Native interface to QKeyMapper.
|
||||
\inmodule QtGui
|
||||
@ -82,7 +82,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::QGLXContext
|
||||
\class QNativeInterface::QGLXContext
|
||||
\since 6.0
|
||||
\brief Native interface to QPlatformOpenGLContext.
|
||||
\inmodule QtGui
|
||||
@ -90,7 +90,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::QWGLContext
|
||||
\class QNativeInterface::QWGLContext
|
||||
\since 6.0
|
||||
\brief Native interface to QPlatformOpenGLContext.
|
||||
\inmodule QtGui
|
||||
@ -98,7 +98,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::Private::QWindowsApplication
|
||||
\class QNativeInterface::Private::QWindowsApplication
|
||||
\since 6.0
|
||||
\brief Native interface to QGuiApplication, to be retrieved from QPlatformIntegration.
|
||||
\inmodule QtGui
|
||||
@ -106,7 +106,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\enum QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchType
|
||||
\enum QNativeInterface::Private::QWindowsApplication::TouchWindowTouchType
|
||||
|
||||
This enum represents the supported TouchWindow touch flags for registerTouchWindow().
|
||||
|
||||
@ -116,19 +116,19 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformInterface::Private::QWindowsApplication::setTouchWindowTouchType(QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchTypes type)
|
||||
\fn void QNativeInterface::Private::QWindowsApplication::setTouchWindowTouchType(QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes type)
|
||||
|
||||
Sets the touch window type for all windows to \a type.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchTypes QPlatformInterface::Private::QWindowsApplication::touchWindowTouchType() const
|
||||
\fn QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes QNativeInterface::Private::QWindowsApplication::touchWindowTouchType() const
|
||||
|
||||
Returns the currently set the touch window type.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\enum QPlatformInterface::Private::QWindowsApplication::WindowActivationBehavior
|
||||
\enum QNativeInterface::Private::QWindowsApplication::WindowActivationBehavior
|
||||
|
||||
This enum specifies the behavior of QWidget::activateWindow() and
|
||||
QWindow::requestActivate().
|
||||
@ -144,7 +144,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformInterface::Private::QWindowsApplication::setWindowActivationBehavior(QPlatformInterface::Private::QWindowsApplication::WindowActivationBehavior behavior)
|
||||
\fn void QNativeInterface::Private::QWindowsApplication::setWindowActivationBehavior(QNativeInterface::Private::QWindowsApplication::WindowActivationBehavior behavior)
|
||||
|
||||
Sets the window activation behavior to \a behavior.
|
||||
|
||||
@ -152,13 +152,13 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QPlatformInterface::Private::QWindowsApplication::WindowActivationBehavior QPlatformInterface::Private::QWindowsApplication::windowActivationBehavior() const
|
||||
\fn QNativeInterface::Private::QWindowsApplication::WindowActivationBehavior QNativeInterface::Private::QWindowsApplication::windowActivationBehavior() const
|
||||
|
||||
Returns the currently set the window activation behavior.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsApplication::isTabletMode() const
|
||||
\fn bool QNativeInterface::Private::QWindowsApplication::isTabletMode() const
|
||||
|
||||
Returns \c true if Windows 10 operates in \e{Tablet Mode}.
|
||||
In this mode, Windows forces all application main windows to open in maximized
|
||||
@ -169,7 +169,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\enum QPlatformInterface::Private::QWindowsApplication::DarkModeHandlingFlag
|
||||
\enum QNativeInterface::Private::QWindowsApplication::DarkModeHandlingFlag
|
||||
|
||||
This enum specifies the behavior of the application when Windows
|
||||
is configured to use dark mode for applications.
|
||||
@ -182,32 +182,32 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsApplication::isDarkMode() const
|
||||
\fn bool QNativeInterface::Private::QWindowsApplication::isDarkMode() const
|
||||
|
||||
Returns \c true if Windows 10 is configured to use dark mode for
|
||||
applications.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformInterface::Private::QWindowsApplication::setDarkModeHandling(DarkModeHandling handling)
|
||||
\fn void QNativeInterface::Private::QWindowsApplication::setDarkModeHandling(DarkModeHandling handling)
|
||||
|
||||
Sets the dark mode handling to \a handling.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QPlatformInterface::Private::QWindowsApplication::DarkModeHandling QPlatformInterface::Private::QWindowsApplication::darkModeHandling() const
|
||||
\fn QNativeInterface::Private::QWindowsApplication::DarkModeHandling QNativeInterface::Private::QWindowsApplication::darkModeHandling() const
|
||||
|
||||
Returns the currently set dark mode handling.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsApplication::isWinTabEnabled() const
|
||||
\fn bool QNativeInterface::Private::QWindowsApplication::isWinTabEnabled() const
|
||||
|
||||
Returns whether the \e{Tablet WinTab Driver} (\c Wintab32.dll) is used.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsApplication::setWinTabEnabled(bool enabled)
|
||||
\fn bool QNativeInterface::Private::QWindowsApplication::setWinTabEnabled(bool enabled)
|
||||
|
||||
Sets whether the \e{Tablet WinTab Driver} (\c Wintab32.dll) should be used to \a enabled.
|
||||
|
||||
@ -215,55 +215,55 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsApplication::registerMime(QWindowsMime *mime)
|
||||
\fn bool QNativeInterface::Private::QWindowsApplication::registerMime(QWindowsMime *mime)
|
||||
|
||||
Registers the converter \a mime to the system.
|
||||
|
||||
\sa QPlatformInterface::Private::QWindowsMime, unregisterMime()
|
||||
\sa QNativeInterface::Private::QWindowsMime, unregisterMime()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformInterface::Private::QWindowsApplication::unregisterMime(QWindowsMime *mime)
|
||||
\fn void QNativeInterface::Private::QWindowsApplication::unregisterMime(QWindowsMime *mime)
|
||||
|
||||
Unregisters the converter \a mime from the system.
|
||||
|
||||
\sa QPlatformInterface::Private::QWindowsMime, registerMime()
|
||||
\sa QNativeInterface::Private::QWindowsMime, registerMime()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn int QPlatformInterface::Private::QWindowsApplication::registerMimeType(const QString &mime)
|
||||
\fn int QNativeInterface::Private::QWindowsApplication::registerMimeType(const QString &mime)
|
||||
|
||||
Registers the MIME type \a mime, and returns an ID number
|
||||
identifying the format on Windows.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn HWND QPlatformInterface::Private::QWindowsApplication::createMessageWindow(const QString &, const QString &, QFunctionPointer) const
|
||||
\fn HWND QNativeInterface::Private::QWindowsApplication::createMessageWindow(const QString &, const QString &, QFunctionPointer) const
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsApplication::asyncExpose() const
|
||||
\fn bool QNativeInterface::Private::QWindowsApplication::asyncExpose() const
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformInterface::Private::QWindowsApplication::setAsyncExpose(bool)
|
||||
\fn void QNativeInterface::Private::QWindowsApplication::setAsyncExpose(bool)
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVariant QPlatformInterface::Private::QWindowsApplication::gpu()
|
||||
\fn QVariant QNativeInterface::Private::QWindowsApplication::gpu()
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVariant QPlatformInterface::Private::QWindowsApplication::gpuList()
|
||||
\fn QVariant QNativeInterface::Private::QWindowsApplication::gpuList()
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::Private::QWindowsMime
|
||||
\class QNativeInterface::Private::QWindowsMime
|
||||
\since 6.0
|
||||
\brief The QWindowsMime class maps open-standard MIME to Window Clipboard formats.
|
||||
\inmodule QtGui
|
||||
@ -305,13 +305,13 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QPlatformInterface::Private::QWindowsMime::~QWindowsMime()
|
||||
\fn QNativeInterface::Private::QWindowsMime::~QWindowsMime()
|
||||
|
||||
Destroys the conversion object.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsMime::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
|
||||
\fn bool QNativeInterface::Private::QWindowsMime::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
|
||||
|
||||
Returns \c true if the converter can convert from the \a mimeData to
|
||||
the format specified in \a formatetc.
|
||||
@ -320,7 +320,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsMime::canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
|
||||
\fn bool QNativeInterface::Private::QWindowsMime::canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
|
||||
|
||||
Returns \c true if the converter can convert to the \a mimeType from
|
||||
the available formats in \a pDataObj.
|
||||
@ -329,7 +329,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QString QPlatformInterface::Private::QWindowsMime::mimeForFormat(const FORMATETC &formatetc) const
|
||||
\fn QString QNativeInterface::Private::QWindowsMime::mimeForFormat(const FORMATETC &formatetc) const
|
||||
|
||||
Returns the mime type that will be created form the format specified
|
||||
in \a formatetc, or an empty string if this converter does not support
|
||||
@ -339,7 +339,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QList<FORMATETC> QPlatformInterface::Private::QWindowsMime::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
|
||||
\fn QList<FORMATETC> QNativeInterface::Private::QWindowsMime::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
|
||||
|
||||
Returns a QList of FORMATETC structures representing the different windows clipboard
|
||||
formats that can be provided for the \a mimeType from the \a mimeData.
|
||||
@ -348,7 +348,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVariant QPlatformInterface::Private::QWindowsMime::convertToMime(const QString &mimeType, IDataObject *pDataObj,
|
||||
\fn QVariant QNativeInterface::Private::QWindowsMime::convertToMime(const QString &mimeType, IDataObject *pDataObj,
|
||||
QVariant::Type preferredType) const
|
||||
|
||||
Returns a QVariant containing the converted data for \a mimeType from \a pDataObj.
|
||||
@ -358,7 +358,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsMime::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const
|
||||
\fn bool QNativeInterface::Private::QWindowsMime::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const
|
||||
|
||||
Convert the \a mimeData to the format specified in \a formatetc.
|
||||
The converted data should then be placed in \a pmedium structure.
|
||||
@ -369,7 +369,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::Private::QWindowsWindow
|
||||
\class QNativeInterface::Private::QWindowsWindow
|
||||
\since 6.0
|
||||
\brief Native interface to QPlatformWindow.
|
||||
\inmodule QtGui
|
||||
@ -377,7 +377,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformInterface::Private::QWindowsWindow::setHasBorderInFullScreen(bool border)
|
||||
\fn void QNativeInterface::Private::QWindowsWindow::setHasBorderInFullScreen(bool border)
|
||||
|
||||
Sets whether the WS_BORDER flag will be set for the window in full screen mode
|
||||
to \a border.
|
||||
@ -386,27 +386,27 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn bool QPlatformInterface::Private::QWindowsWindow::hasBorderInFullScreen() const
|
||||
\fn bool QNativeInterface::Private::QWindowsWindow::hasBorderInFullScreen() const
|
||||
|
||||
Returns whether the WS_BORDER flag will be set for the window in full screen
|
||||
mode.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QMargins QPlatformInterface::Private::QWindowsWindow::customMargins() const
|
||||
\fn QMargins QNativeInterface::Private::QWindowsWindow::customMargins() const
|
||||
|
||||
Returns the margin to be used when handling the \c WM_NCCALCSIZE message.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformInterface::Private::QWindowsWindow::setCustomMargins(const QMargins &margins)
|
||||
\fn void QNativeInterface::Private::QWindowsWindow::setCustomMargins(const QMargins &margins)
|
||||
|
||||
Sets the\a margins to be used when handling the \c WM_NCCALCSIZE message. It is
|
||||
possible to remove a frame border by specifying a negative value.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::Private::QXcbScreen
|
||||
\class QNativeInterface::Private::QXcbScreen
|
||||
\since 6.0
|
||||
\brief Native interface to QPlatformScreen.
|
||||
\inmodule QtGui
|
||||
@ -414,7 +414,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\class QPlatformInterface::Private::QXcbWindow
|
||||
\class QNativeInterface::Private::QXcbWindow
|
||||
\since 6.0
|
||||
\brief Native interface to QPlatformWindow.
|
||||
\inmodule QtGui
|
||||
|
@ -350,9 +350,9 @@ private:
|
||||
static qreal m_maxDevicePixelRatio;
|
||||
};
|
||||
|
||||
// ----------------- QPlatformInterface -----------------
|
||||
// ----------------- QNativeInterface -----------------
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
namespace QNativeInterface::Private {
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
|
||||
|
||||
@ -360,7 +360,7 @@ class QWindowsMime;
|
||||
|
||||
struct Q_GUI_EXPORT QWindowsApplication
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QWindowsApplication)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QWindowsApplication)
|
||||
|
||||
enum WindowActivationBehavior {
|
||||
DefaultActivateWindow,
|
||||
@ -415,11 +415,11 @@ struct Q_GUI_EXPORT QWindowsApplication
|
||||
};
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
} // QNativeInterface::Private
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchTypes)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QPlatformInterface::Private::QWindowsApplication::DarkModeHandling)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QNativeInterface::Private::QWindowsApplication::DarkModeHandling)
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -72,8 +72,7 @@ public:
|
||||
static void changeKeyboard();
|
||||
static QList<int> possibleKeys(QKeyEvent *e);
|
||||
|
||||
template <typename T>
|
||||
T *platformInterface() const;
|
||||
QT_DECLARE_NATIVE_INTERFACE_ACCESSOR
|
||||
|
||||
private:
|
||||
friend QKeyMapperPrivate *qt_keymapper_private();
|
||||
@ -99,20 +98,20 @@ public:
|
||||
|
||||
QKeyMapperPrivate *qt_keymapper_private(); // from qkeymapper.cpp
|
||||
|
||||
// ----------------- QPlatformInterface -----------------
|
||||
// ----------------- QNativeInterface -----------------
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
namespace QNativeInterface::Private {
|
||||
|
||||
#if QT_CONFIG(evdev) || defined(Q_CLANG_QDOC)
|
||||
struct Q_GUI_EXPORT QEvdevKeyMapper
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QEvdevKeyMapper)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QEvdevKeyMapper)
|
||||
virtual void loadKeymap(const QString &filename) = 0;
|
||||
virtual void switchLang() = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
} // QNativeInterface::Private
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -52,12 +52,12 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
/*!
|
||||
\fn T QOffScreenSurface::platformInterface<T>()
|
||||
\fn template <typename NativeInterface> NativeInterface *QOffScreenSurface::nativeInterface()
|
||||
|
||||
Returns a platform interface of type T for the surface.
|
||||
Returns a native interface of type \c NativeInterface for the surface.
|
||||
|
||||
This function provides access to platform specific functionality
|
||||
of QOffScreenSurface, as defined in the QPlatformInterface namespace.
|
||||
of QOffScreenSurface, as defined in the QNativeInterface namespace.
|
||||
|
||||
If the requested interface is not available a \nullptr is returned.
|
||||
*/
|
||||
|
@ -79,8 +79,7 @@ public:
|
||||
|
||||
QPlatformOffscreenSurface *handle() const;
|
||||
|
||||
template <typename T>
|
||||
T *platformInterface() const;
|
||||
QT_DECLARE_NATIVE_INTERFACE_ACCESSOR
|
||||
|
||||
Q_SIGNALS:
|
||||
void screenChanged(QScreen *screen);
|
||||
|
@ -49,18 +49,18 @@ QT_FORWARD_DECLARE_CLASS(ANativeWindow);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QPlatformInterface {
|
||||
namespace QNativeInterface {
|
||||
|
||||
#if defined(Q_OS_ANDROID)
|
||||
struct Q_GUI_EXPORT QAndroidOffscreenSurface
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QAndroidOffscreenSurface)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QAndroidOffscreenSurface)
|
||||
static QOffscreenSurface *fromNative(ANativeWindow *nativeSurface);
|
||||
virtual ANativeWindow *nativeSurface() const = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface
|
||||
} // QNativeInterface
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -347,12 +347,12 @@ void QOpenGLContextPrivate::_q_screenDestroyed(QObject *object)
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn template <typename T> T *QOpenGLContext::platformInterface() const
|
||||
\fn template <typename NativeInterface> NativeInterface *QOpenGLContext::nativeInterface() const
|
||||
|
||||
Returns a platform interface of type T for the context.
|
||||
Returns a native interface of type \c NativeInterface for the context.
|
||||
|
||||
This function provides access to platform specific functionality
|
||||
of QOpenGLContext, as defined in the QPlatformInterface namespace.
|
||||
of QOpenGLContext, as defined in the QNativeInterface namespace.
|
||||
|
||||
If the requested interface is not available a \nullptr is returned.
|
||||
*/
|
||||
|
@ -152,8 +152,7 @@ public:
|
||||
static bool supportsThreadedOpenGL();
|
||||
static QOpenGLContext *globalShareContext();
|
||||
|
||||
template <typename T>
|
||||
T *platformInterface() const;
|
||||
QT_DECLARE_NATIVE_INTERFACE_ACCESSOR
|
||||
|
||||
Q_SIGNALS:
|
||||
void aboutToBeDestroyed();
|
||||
|
@ -64,12 +64,12 @@ typedef void *NSOpenGLContext;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QPlatformInterface {
|
||||
namespace QNativeInterface {
|
||||
|
||||
#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC)
|
||||
struct Q_GUI_EXPORT QCocoaGLContext
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaGLContext)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QCocoaGLContext)
|
||||
static QOpenGLContext *fromNative(QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *, QOpenGLContext *shareContext = nullptr);
|
||||
virtual QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *nativeContext() const = 0;
|
||||
};
|
||||
@ -78,7 +78,7 @@ struct Q_GUI_EXPORT QCocoaGLContext
|
||||
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
|
||||
struct Q_GUI_EXPORT QWGLContext
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QWGLContext)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QWGLContext)
|
||||
static HMODULE openGLModuleHandle();
|
||||
static QOpenGLContext *fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr);
|
||||
virtual HGLRC nativeContext() const = 0;
|
||||
@ -88,7 +88,7 @@ struct Q_GUI_EXPORT QWGLContext
|
||||
#if defined(Q_OS_LINUX) || defined(Q_CLANG_QDOC)
|
||||
struct Q_GUI_EXPORT QGLXContext
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QGLXContext)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QGLXContext)
|
||||
static QOpenGLContext *fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext = nullptr);
|
||||
static QOpenGLContext *fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext = nullptr);
|
||||
virtual GLXContext nativeContext() const = 0;
|
||||
@ -98,13 +98,13 @@ struct Q_GUI_EXPORT QGLXContext
|
||||
#if QT_CONFIG(egl)
|
||||
struct Q_GUI_EXPORT QEGLContext
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QEGLContext)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QEGLContext)
|
||||
static QOpenGLContext *fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext = nullptr);
|
||||
virtual EGLContext nativeContext() const = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface
|
||||
} // QNativeInterface
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -81,7 +81,7 @@ class QOffscreenSurface;
|
||||
class QPlatformVulkanInstance;
|
||||
class QVulkanInstance;
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
namespace QNativeInterface::Private {
|
||||
|
||||
template <typename R, typename I, auto func, typename... Args>
|
||||
struct QInterfaceProxyImp
|
||||
@ -103,7 +103,7 @@ struct QInterfaceProxy<func> : public QInterfaceProxyImp<R, I, func, Args...> {}
|
||||
template <typename R, typename I, typename... Args, R(I::*func)(Args...) const>
|
||||
struct QInterfaceProxy<func> : public QInterfaceProxyImp<R, I, func, Args...> {};
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
} // QNativeInterface::Private
|
||||
|
||||
class Q_GUI_EXPORT QPlatformIntegration
|
||||
{
|
||||
@ -229,7 +229,7 @@ public:
|
||||
template <auto func, typename... Args>
|
||||
auto call(Args... args)
|
||||
{
|
||||
using namespace QPlatformInterface::Private;
|
||||
using namespace QNativeInterface::Private;
|
||||
return QInterfaceProxy<func>::apply(this, args...);
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// ----------------- QPlatformInterface -----------------
|
||||
// ----------------- QNativeInterface -----------------
|
||||
|
||||
#if !defined(Q_OS_MACOS) && defined(Q_CLANG_QDOC)
|
||||
typedef void NSMenu;
|
||||
@ -65,24 +65,24 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSMenu);
|
||||
QT_BEGIN_NAMESPACE
|
||||
#endif
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
namespace QNativeInterface::Private {
|
||||
|
||||
#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC)
|
||||
struct Q_GUI_EXPORT QCocoaMenu
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaMenu)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QCocoaMenu)
|
||||
virtual NSMenu *nsMenu() const = 0;
|
||||
virtual void setAsDockMenu() const = 0;
|
||||
};
|
||||
|
||||
struct Q_GUI_EXPORT QCocoaMenuBar
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaMenuBar)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QCocoaMenuBar)
|
||||
virtual NSMenu *nsMenu() const = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
} // QNativeInterface::Private
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -81,23 +81,23 @@ private:
|
||||
Q_DISABLE_COPY(QPlatformOffscreenSurface)
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
T *QOffscreenSurface::platformInterface() const
|
||||
template <typename NativeInterface>
|
||||
NativeInterface *QOffscreenSurface::nativeInterface() const
|
||||
{
|
||||
return dynamic_cast<T*>(surfaceHandle());
|
||||
return dynamic_cast<NativeInterface*>(surfaceHandle());
|
||||
}
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
namespace QNativeInterface::Private {
|
||||
|
||||
#if defined(Q_OS_ANDROID)
|
||||
struct Q_GUI_EXPORT QAndroidOffScreenIntegration
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QAndroidOffScreenIntegration)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QAndroidOffScreenIntegration)
|
||||
virtual QOffscreenSurface *createOffscreenSurface(ANativeWindow *nativeSurface) const = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
} // QNativeInterface::Private
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -102,18 +102,18 @@ private:
|
||||
Q_DISABLE_COPY(QPlatformOpenGLContext)
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
T *QOpenGLContext::platformInterface() const
|
||||
template <typename NativeInterface>
|
||||
NativeInterface *QOpenGLContext::nativeInterface() const
|
||||
{
|
||||
return dynamic_cast<T*>(handle());
|
||||
return dynamic_cast<NativeInterface*>(handle());
|
||||
}
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
namespace QNativeInterface::Private {
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
struct Q_GUI_EXPORT QCocoaGLIntegration
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaGLIntegration)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QCocoaGLIntegration)
|
||||
virtual QOpenGLContext *createOpenGLContext(NSOpenGLContext *, QOpenGLContext *shareContext) const = 0;
|
||||
};
|
||||
#endif
|
||||
@ -121,7 +121,7 @@ struct Q_GUI_EXPORT QCocoaGLIntegration
|
||||
#if defined(Q_OS_WIN)
|
||||
struct Q_GUI_EXPORT QWindowsGLIntegration
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QWindowsGLIntegration)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QWindowsGLIntegration)
|
||||
virtual HMODULE openGLModuleHandle() const = 0;
|
||||
virtual QOpenGLContext *createOpenGLContext(HGLRC context, HWND window, QOpenGLContext *shareContext) const = 0;
|
||||
};
|
||||
@ -130,7 +130,7 @@ struct Q_GUI_EXPORT QWindowsGLIntegration
|
||||
#if defined(Q_OS_LINUX)
|
||||
struct Q_GUI_EXPORT QGLXIntegration
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QGLXIntegration)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QGLXIntegration)
|
||||
virtual QOpenGLContext *createOpenGLContext(GLXContext context, void *visualInfo, QOpenGLContext *shareContext) const = 0;
|
||||
};
|
||||
#endif
|
||||
@ -138,12 +138,12 @@ struct Q_GUI_EXPORT QGLXIntegration
|
||||
#if QT_CONFIG(egl)
|
||||
struct Q_GUI_EXPORT QEGLIntegration
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QEGLIntegration)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QEGLIntegration)
|
||||
virtual QOpenGLContext *createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
} // QNativeInterface::Private
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -65,14 +65,14 @@ public:
|
||||
QPointer<QScreen> screen;
|
||||
};
|
||||
|
||||
// ----------------- QPlatformInterface -----------------
|
||||
// ----------------- QNativeInterface -----------------
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
namespace QNativeInterface::Private {
|
||||
|
||||
#if QT_CONFIG(xcb)
|
||||
struct Q_GUI_EXPORT QXcbScreen
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QXcbScreen)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QXcbScreen)
|
||||
virtual int virtualDesktopNumber() const = 0;
|
||||
};
|
||||
#endif
|
||||
@ -80,7 +80,7 @@ struct Q_GUI_EXPORT QXcbScreen
|
||||
#if QT_CONFIG(vsp2)
|
||||
struct Q_GUI_EXPORT QVsp2Screen
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QVsp2Screen)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QVsp2Screen)
|
||||
virtual int addLayer(int dmabufFd, const QSize &size, const QPoint &position, uint drmPixelFormat, uint bytesPerLine) = 0;
|
||||
virtual void setLayerBuffer(int id, int dmabufFd) = 0;
|
||||
virtual void setLayerPosition(int id, const QPoint &position) = 0;
|
||||
@ -90,7 +90,7 @@ struct Q_GUI_EXPORT QVsp2Screen
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
} // QNativeInterface::Private
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -66,14 +66,14 @@ public:
|
||||
QBasicTimer updateTimer;
|
||||
};
|
||||
|
||||
// ----------------- QPlatformInterface -----------------
|
||||
// ----------------- QNativeInterface -----------------
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
namespace QNativeInterface::Private {
|
||||
|
||||
#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC)
|
||||
struct Q_GUI_EXPORT QCocoaWindow
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaWindow)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QCocoaWindow)
|
||||
virtual void setContentBorderEnabled(bool enable) = 0;
|
||||
virtual QPoint bottomLeftClippedByNSWindowOffset() const = 0;
|
||||
};
|
||||
@ -82,7 +82,7 @@ struct Q_GUI_EXPORT QCocoaWindow
|
||||
#if QT_CONFIG(xcb) || defined(Q_CLANG_QDOC)
|
||||
struct Q_GUI_EXPORT QXcbWindow
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QXcbWindow)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QXcbWindow)
|
||||
|
||||
enum WindowType {
|
||||
None = 0x000000,
|
||||
@ -114,7 +114,7 @@ struct Q_GUI_EXPORT QXcbWindow
|
||||
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
|
||||
struct Q_GUI_EXPORT QWindowsWindow
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QWindowsWindow)
|
||||
QT_DECLARE_NATIVE_INTERFACE(QWindowsWindow)
|
||||
|
||||
virtual void setHasBorderInFullScreen(bool border) = 0;
|
||||
virtual bool hasBorderInFullScreen() const = 0;
|
||||
@ -124,7 +124,7 @@ struct Q_GUI_EXPORT QWindowsWindow
|
||||
};
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
} // QNativeInterface::Private
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QEGLPlatformContext : public QPlatformOpenGLContext,
|
||||
public QPlatformInterface::QEGLContext
|
||||
public QNativeInterface::QEGLContext
|
||||
{
|
||||
public:
|
||||
enum Flag {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -72,8 +72,8 @@ protected:
|
||||
};
|
||||
|
||||
class QAndroidPlatformIntegration : public QPlatformIntegration
|
||||
, QPlatformInterface::Private::QEGLIntegration
|
||||
, QPlatformInterface::Private::QAndroidOffScreenIntegration
|
||||
, QNativeInterface::Private::QEGLIntegration
|
||||
, QNativeInterface::Private::QAndroidOffScreenIntegration
|
||||
{
|
||||
friend class QAndroidPlatformScreen;
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QOffscreenSurface;
|
||||
class QAndroidPlatformOffscreenSurface : public QPlatformOffscreenSurface,
|
||||
public QPlatformInterface::QAndroidOffscreenSurface
|
||||
public QNativeInterface::QAndroidOffscreenSurface
|
||||
{
|
||||
public:
|
||||
QAndroidPlatformOffscreenSurface(ANativeWindow *nativeSurface, EGLDisplay display, QOffscreenSurface *offscreenSurface);
|
||||
|
@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QCocoaWindow;
|
||||
|
||||
class QCocoaGLContext : public QPlatformOpenGLContext, public QPlatformInterface::QCocoaGLContext
|
||||
class QCocoaGLContext : public QPlatformOpenGLContext, public QNativeInterface::QCocoaGLContext
|
||||
{
|
||||
public:
|
||||
QCocoaGLContext(QOpenGLContext *context);
|
||||
|
@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QCocoaIntegration : public QObject, public QPlatformIntegration
|
||||
#ifndef QT_NO_OPENGL
|
||||
, public QPlatformInterface::Private::QCocoaGLIntegration
|
||||
, public QNativeInterface::Private::QCocoaGLIntegration
|
||||
#endif
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
class QCocoaMenuBar;
|
||||
|
||||
class QCocoaMenu : public QPlatformMenu, public QCocoaMenuObject
|
||||
, public QPlatformInterface::Private::QCocoaMenu
|
||||
, public QNativeInterface::Private::QCocoaMenu
|
||||
{
|
||||
public:
|
||||
QCocoaMenu();
|
||||
|
@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
|
||||
class QCocoaWindow;
|
||||
|
||||
class QCocoaMenuBar : public QPlatformMenuBar
|
||||
, public QPlatformInterface::Private::QCocoaMenuBar
|
||||
, public QNativeInterface::Private::QCocoaMenuBar
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -100,7 +100,7 @@ class QDebug;
|
||||
class QCocoaMenuBar;
|
||||
|
||||
class QCocoaWindow : public QObject, public QPlatformWindow,
|
||||
public QPlatformInterface::Private::QCocoaWindow
|
||||
public QNativeInterface::Private::QCocoaWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -70,10 +70,10 @@ class QEvdevKeyboardManager;
|
||||
|
||||
class Q_EGLFS_EXPORT QEglFSIntegration : public QPlatformIntegration, public QPlatformNativeInterface
|
||||
#if QT_CONFIG(evdev)
|
||||
, public QPlatformInterface::Private::QEvdevKeyMapper
|
||||
, public QNativeInterface::Private::QEvdevKeyMapper
|
||||
#endif
|
||||
#ifndef QT_NO_OPENGL
|
||||
, public QPlatformInterface::Private::QEGLIntegration
|
||||
, public QNativeInterface::Private::QEGLIntegration
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
|
@ -53,7 +53,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSKmsVsp2Screen : public QEglFSKmsScreen
|
||||
, public QPlatformInterface::Private::QVsp2Screen
|
||||
, public QNativeInterface::Private::QVsp2Screen
|
||||
{
|
||||
public:
|
||||
QEglFSKmsVsp2Screen(QEglFSKmsDevice *device, const QKmsOutput &output);
|
||||
|
@ -53,7 +53,7 @@ class QEvdevKeyboardManager;
|
||||
|
||||
class QLinuxFbIntegration : public QPlatformIntegration, public QPlatformNativeInterface
|
||||
#if QT_CONFIG(evdev)
|
||||
, public QPlatformInterface::Private::QEvdevKeyMapper
|
||||
, public QNativeInterface::Private::QEvdevKeyMapper
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
|
@ -90,7 +90,7 @@ private:
|
||||
class QOffscreenX11GLXContextData;
|
||||
|
||||
class QOffscreenX11GLXContext : public QPlatformOpenGLContext
|
||||
, public QPlatformInterface::QGLXContext
|
||||
, public QNativeInterface::QGLXContext
|
||||
{
|
||||
public:
|
||||
QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGLContext *context);
|
||||
|
@ -112,13 +112,13 @@ void QWindowsApplication::setDarkModeHandling(QWindowsApplication::DarkModeHandl
|
||||
m_darkModeHandling = handling;
|
||||
}
|
||||
|
||||
void QWindowsApplication::registerMime(QPlatformInterface::Private::QWindowsMime *mime)
|
||||
void QWindowsApplication::registerMime(QNativeInterface::Private::QWindowsMime *mime)
|
||||
{
|
||||
if (auto ctx = QWindowsContext::instance())
|
||||
ctx->mimeConverter().registerMime(mime);
|
||||
}
|
||||
|
||||
void QWindowsApplication::unregisterMime(QPlatformInterface::Private::QWindowsMime *mime)
|
||||
void QWindowsApplication::unregisterMime(QNativeInterface::Private::QWindowsMime *mime)
|
||||
{
|
||||
if (auto ctx = QWindowsContext::instance())
|
||||
ctx->mimeConverter().unregisterMime(mime);
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QWindowsApplication : public QPlatformInterface::Private::QWindowsApplication
|
||||
class QWindowsApplication : public QNativeInterface::Private::QWindowsApplication
|
||||
{
|
||||
public:
|
||||
void setTouchWindowTouchType(TouchWindowTouchTypes type) override;
|
||||
@ -62,8 +62,8 @@ public:
|
||||
DarkModeHandling darkModeHandling() const override;
|
||||
void setDarkModeHandling(DarkModeHandling handling) override;
|
||||
|
||||
void registerMime(QPlatformInterface::Private::QWindowsMime *mime) override;
|
||||
void unregisterMime(QPlatformInterface::Private::QWindowsMime *mime) override;
|
||||
void registerMime(QNativeInterface::Private::QWindowsMime *mime) override;
|
||||
void unregisterMime(QNativeInterface::Private::QWindowsMime *mime) override;
|
||||
|
||||
int registerMimeType(const QString &mime) override;
|
||||
|
||||
|
@ -200,7 +200,7 @@ public:
|
||||
static QWindowsOpengl32DLL opengl32;
|
||||
};
|
||||
|
||||
class QWindowsGLContext : public QWindowsOpenGLContext, public QPlatformInterface::QWGLContext
|
||||
class QWindowsGLContext : public QWindowsOpenGLContext, public QNativeInterface::QWGLContext
|
||||
{
|
||||
public:
|
||||
explicit QWindowsGLContext(QOpenGLStaticContext *staticContext, QOpenGLContext *context);
|
||||
|
@ -183,8 +183,8 @@ bool parseIntOption(const QString ¶meter,const QLatin1String &option,
|
||||
return true;
|
||||
}
|
||||
|
||||
using DarkModeHandlingFlag = QPlatformInterface::Private::QWindowsApplication::DarkModeHandlingFlag;
|
||||
using DarkModeHandling = QPlatformInterface::Private::QWindowsApplication::DarkModeHandling;
|
||||
using DarkModeHandlingFlag = QNativeInterface::Private::QWindowsApplication::DarkModeHandlingFlag;
|
||||
using DarkModeHandling = QNativeInterface::Private::QWindowsApplication::DarkModeHandling;
|
||||
|
||||
static inline unsigned parseOptions(const QStringList ¶mList,
|
||||
int *tabletAbsoluteRange,
|
||||
|
@ -58,7 +58,7 @@ class QWindowsStaticOpenGLContext;
|
||||
|
||||
class QWindowsIntegration : public QPlatformIntegration
|
||||
#ifndef QT_NO_OPENGL
|
||||
, public QPlatformInterface::Private::QWindowsGLIntegration
|
||||
, public QNativeInterface::Private::QWindowsGLIntegration
|
||||
#endif
|
||||
, public QWindowsApplication
|
||||
{
|
||||
|
@ -544,7 +544,7 @@ QDebug operator<<(QDebug d, IDataObject *dataObj)
|
||||
All subclasses must reimplement this pure virtual function.
|
||||
*/
|
||||
|
||||
class QWindowsMimeText : public QPlatformInterface::Private::QWindowsMime
|
||||
class QWindowsMimeText : public QNativeInterface::Private::QWindowsMime
|
||||
{
|
||||
public:
|
||||
bool canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const override;
|
||||
@ -700,7 +700,7 @@ QVariant QWindowsMimeText::convertToMime(const QString &mime, LPDATAOBJECT pData
|
||||
return ret;
|
||||
}
|
||||
|
||||
class QWindowsMimeURI : public QPlatformInterface::Private::QWindowsMime
|
||||
class QWindowsMimeURI : public QNativeInterface::Private::QWindowsMime
|
||||
{
|
||||
public:
|
||||
QWindowsMimeURI();
|
||||
@ -866,7 +866,7 @@ QVariant QWindowsMimeURI::convertToMime(const QString &mimeType, LPDATAOBJECT pD
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
class QWindowsMimeHtml : public QPlatformInterface::Private::QWindowsMime
|
||||
class QWindowsMimeHtml : public QNativeInterface::Private::QWindowsMime
|
||||
{
|
||||
public:
|
||||
QWindowsMimeHtml();
|
||||
@ -1004,7 +1004,7 @@ bool QWindowsMimeHtml::convertFromMime(const FORMATETC &formatetc, const QMimeDa
|
||||
|
||||
|
||||
#ifndef QT_NO_IMAGEFORMAT_BMP
|
||||
class QWindowsMimeImage : public QPlatformInterface::Private::QWindowsMime
|
||||
class QWindowsMimeImage : public QNativeInterface::Private::QWindowsMime
|
||||
{
|
||||
public:
|
||||
QWindowsMimeImage();
|
||||
@ -1158,7 +1158,7 @@ QVariant QWindowsMimeImage::convertToMime(const QString &mimeType, IDataObject *
|
||||
}
|
||||
#endif
|
||||
|
||||
class QBuiltInMimes : public QPlatformInterface::Private::QWindowsMime
|
||||
class QBuiltInMimes : public QNativeInterface::Private::QWindowsMime
|
||||
{
|
||||
public:
|
||||
QBuiltInMimes();
|
||||
@ -1279,7 +1279,7 @@ QString QBuiltInMimes::mimeForFormat(const FORMATETC &formatetc) const
|
||||
}
|
||||
|
||||
|
||||
class QLastResortMimes : public QPlatformInterface::Private::QWindowsMime
|
||||
class QLastResortMimes : public QNativeInterface::Private::QWindowsMime
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -56,7 +56,7 @@ class QWindowsMimeConverter
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(QWindowsMimeConverter)
|
||||
public:
|
||||
using QWindowsMime = QPlatformInterface::Private::QWindowsMime;
|
||||
using QWindowsMime = QNativeInterface::Private::QWindowsMime;
|
||||
|
||||
QWindowsMimeConverter();
|
||||
~QWindowsMimeConverter();
|
||||
|
@ -125,12 +125,12 @@ struct QWindowsWindowData
|
||||
};
|
||||
|
||||
class QWindowsBaseWindow : public QPlatformWindow,
|
||||
public QPlatformInterface::Private::QWindowsWindow
|
||||
public QNativeInterface::Private::QWindowsWindow
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(QWindowsBaseWindow)
|
||||
public:
|
||||
using TouchWindowTouchType = QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchType;
|
||||
using TouchWindowTouchTypes = QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchTypes;
|
||||
using TouchWindowTouchType = QNativeInterface::Private::QWindowsApplication::TouchWindowTouchType;
|
||||
using TouchWindowTouchTypes = QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes;
|
||||
|
||||
explicit QWindowsBaseWindow(QWindow *window) : QPlatformWindow(window) {}
|
||||
|
||||
|
@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
|
||||
class QXcbEglNativeInterfaceHandler;
|
||||
|
||||
class QXcbEglIntegration : public QXcbGlIntegration
|
||||
, public QPlatformInterface::Private::QEGLIntegration
|
||||
, public QNativeInterface::Private::QEGLIntegration
|
||||
{
|
||||
public:
|
||||
QXcbEglIntegration();
|
||||
|
@ -54,7 +54,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGLXContext : public QPlatformOpenGLContext,
|
||||
public QPlatformInterface::QGLXContext
|
||||
public QNativeInterface::QGLXContext
|
||||
{
|
||||
public:
|
||||
QGLXContext(Display *display, QXcbScreen *screen, const QSurfaceFormat &format, QPlatformOpenGLContext *share);
|
||||
|
@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
|
||||
class QXcbNativeInterfaceHandler;
|
||||
|
||||
class QXcbGlxIntegration : public QXcbGlIntegration,
|
||||
public QPlatformInterface::Private::QGLXIntegration
|
||||
public QNativeInterface::Private::QGLXIntegration
|
||||
{
|
||||
public:
|
||||
QXcbGlxIntegration();
|
||||
|
@ -276,7 +276,7 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
|
||||
|
||||
QOpenGLContext *QXcbIntegration::createOpenGLContext(GLXContext context, void *visualInfo, QOpenGLContext *shareContext) const
|
||||
{
|
||||
using namespace QPlatformInterface::Private;
|
||||
using namespace QNativeInterface::Private;
|
||||
if (auto *glxIntegration = dynamic_cast<QGLXIntegration*>(m_connection->glIntegration()))
|
||||
return glxIntegration->createOpenGLContext(context, visualInfo, shareContext);
|
||||
else
|
||||
@ -286,7 +286,7 @@ QOpenGLContext *QXcbIntegration::createOpenGLContext(GLXContext context, void *v
|
||||
#if QT_CONFIG(egl)
|
||||
QOpenGLContext *QXcbIntegration::createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const
|
||||
{
|
||||
using namespace QPlatformInterface::Private;
|
||||
using namespace QNativeInterface::Private;
|
||||
if (auto *eglIntegration = dynamic_cast<QEGLIntegration*>(m_connection->glIntegration()))
|
||||
return eglIntegration->createOpenGLContext(context, display, shareContext);
|
||||
else
|
||||
|
@ -57,9 +57,9 @@ class QXcbNativeInterface;
|
||||
|
||||
class Q_XCB_EXPORT QXcbIntegration : public QPlatformIntegration
|
||||
#ifndef QT_NO_OPENGL
|
||||
, public QPlatformInterface::Private::QGLXIntegration
|
||||
, public QNativeInterface::Private::QGLXIntegration
|
||||
# if QT_CONFIG(egl)
|
||||
, public QPlatformInterface::Private::QEGLIntegration
|
||||
, public QNativeInterface::Private::QEGLIntegration
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
|
@ -139,7 +139,7 @@ private:
|
||||
};
|
||||
|
||||
class Q_XCB_EXPORT QXcbScreen : public QXcbObject, public QPlatformScreen
|
||||
, public QPlatformInterface::Private::QXcbScreen
|
||||
, public QNativeInterface::Private::QXcbScreen
|
||||
{
|
||||
public:
|
||||
QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop,
|
||||
|
@ -57,7 +57,7 @@ class QXcbSyncWindowRequest;
|
||||
class QIcon;
|
||||
|
||||
class Q_XCB_EXPORT QXcbWindow : public QXcbObject, public QXcbWindowEventListener, public QPlatformWindow
|
||||
, public QPlatformInterface::Private::QXcbWindow
|
||||
, public QNativeInterface::Private::QXcbWindow
|
||||
{
|
||||
public:
|
||||
enum NetWmState {
|
||||
|
@ -279,7 +279,7 @@ void QWindowsXPStylePrivate::cleanup(bool force)
|
||||
|
||||
static inline HWND createTreeViewHelperWindow()
|
||||
{
|
||||
using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication;
|
||||
using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
|
||||
|
||||
HWND result = nullptr;
|
||||
if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration()))
|
||||
|
@ -168,7 +168,7 @@ QVistaHelper::~QVistaHelper()
|
||||
|
||||
void QVistaHelper::updateCustomMargins(bool vistaMargins)
|
||||
{
|
||||
using namespace QPlatformInterface::Private;
|
||||
using namespace QNativeInterface::Private;
|
||||
|
||||
if (QWindow *window = wizard->windowHandle()) {
|
||||
// Reduce top frame to zero since we paint it ourselves. Use
|
||||
|
@ -121,7 +121,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace QPlatformInterface::Private;
|
||||
using namespace QNativeInterface::Private;
|
||||
|
||||
Q_LOGGING_CATEGORY(lcWidgetPainting, "qt.widgets.painting", QtWarningMsg);
|
||||
|
||||
|
@ -133,7 +133,7 @@ bool QWindowsStylePrivate::isDarkMode()
|
||||
{
|
||||
bool result = false;
|
||||
#ifdef Q_OS_WIN
|
||||
using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication;
|
||||
using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
|
||||
// Windows only: Return whether dark mode style support is desired and
|
||||
// dark mode is in effect.
|
||||
if (auto windowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
|
||||
|
@ -1360,7 +1360,7 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool enabled)
|
||||
d->useUnifiedToolBar = enabled;
|
||||
createWinId();
|
||||
|
||||
using namespace QPlatformInterface::Private;
|
||||
using namespace QNativeInterface::Private;
|
||||
if (auto *platformWindow = dynamic_cast<QCocoaWindow*>(window()->windowHandle()->handle()))
|
||||
platformWindow->setContentBorderEnabled(enabled);
|
||||
|
||||
|
@ -56,7 +56,7 @@ QT_USE_NAMESPACE
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
#include <qpa/qplatformmenu_p.h>
|
||||
|
||||
using namespace QPlatformInterface::Private;
|
||||
using namespace QNativeInterface::Private;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -446,8 +446,8 @@ void tst_QClipboard::clearBeforeSetText()
|
||||
|
||||
# ifdef Q_OS_WIN
|
||||
|
||||
using QWindowsMime = QPlatformInterface::Private::QWindowsMime;
|
||||
using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication;
|
||||
using QWindowsMime = QNativeInterface::Private::QWindowsMime;
|
||||
using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
|
||||
|
||||
class TestMime : public QWindowsMime
|
||||
{
|
||||
|
@ -1472,7 +1472,7 @@ void tst_QOpenGL::defaultSurfaceFormat()
|
||||
QCOMPARE(context->format(), fmt);
|
||||
}
|
||||
|
||||
using namespace QPlatformInterface;
|
||||
using namespace QNativeInterface;
|
||||
|
||||
#ifdef USE_GLX
|
||||
void tst_QOpenGL::glxContextWrap()
|
||||
@ -1490,7 +1490,7 @@ void tst_QOpenGL::glxContextWrap()
|
||||
QOpenGLContext *ctx0 = new QOpenGLContext;
|
||||
ctx0->setFormat(window->format());
|
||||
QVERIFY(ctx0->create());
|
||||
auto *glxContextIf = ctx0->platformInterface<QGLXContext>();
|
||||
auto *glxContextIf = ctx0->nativeInterface<QGLXContext>();
|
||||
QVERIFY(glxContextIf);
|
||||
GLXContext context = glxContextIf->nativeContext();
|
||||
QVERIFY(context);
|
||||
@ -1524,7 +1524,7 @@ void tst_QOpenGL::wglContextWrap()
|
||||
window->show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(window.data()));
|
||||
|
||||
auto *wglContext = ctx->platformInterface<QWGLContext>();
|
||||
auto *wglContext = ctx->nativeInterface<QWGLContext>();
|
||||
QVERIFY(wglContext);
|
||||
QVERIFY(wglContext->nativeContext());
|
||||
|
||||
|
@ -97,8 +97,8 @@ void QOpenGLContextWindow::createForeignContext()
|
||||
// underlying native context. This way the texture, that belongs to the context
|
||||
// created here, will be accessible from m_context too.
|
||||
|
||||
using namespace QPlatformInterface;
|
||||
auto *eglContext = m_context->platformInterface<QEGLContext>();
|
||||
using namespace QNativeInterface;
|
||||
auto *eglContext = m_context->nativeInterface<QEGLContext>();
|
||||
if (!eglContext)
|
||||
qFatal("Not running with EGL backend");
|
||||
|
||||
@ -132,7 +132,7 @@ void QOpenGLContextWindow::createForeignContext()
|
||||
|
||||
// Wrap ctx into a QOpenGLContext.
|
||||
QOpenGLContext *ctxWrap = QEGLContext::fromNative(ctx, dpy, m_context);
|
||||
Q_ASSERT(ctxWrap->platformInterface<QEGLContext>()->nativeContext() == ctx);
|
||||
Q_ASSERT(ctxWrap->nativeInterface<QEGLContext>()->nativeContext() == ctx);
|
||||
|
||||
QOffscreenSurface surface;
|
||||
surface.setFormat(fmt);
|
||||
|
@ -52,7 +52,7 @@ enum TabletPointType {
|
||||
};
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication;
|
||||
using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
|
||||
|
||||
static void setWinTabEnabled(bool e)
|
||||
{
|
||||
|
@ -430,7 +430,7 @@ private slots:
|
||||
void touchTypeToggled();
|
||||
|
||||
private:
|
||||
using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication;
|
||||
using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
|
||||
using TouchWindowTouchType = QWindowsApplication::TouchWindowTouchType;
|
||||
using TouchWindowTouchTypes = QWindowsApplication::QWindowsApplication::TouchWindowTouchTypes;
|
||||
|
||||
|
@ -118,7 +118,7 @@ int main(int argc, char **argv)
|
||||
MainWindow *mainWindow = new MainWindow;
|
||||
mainWindow->setGeometry(screen->geometry());
|
||||
mainWindow->winId();
|
||||
using namespace QPlatformInterface::Private;
|
||||
using namespace QNativeInterface::Private;
|
||||
if (auto *windowsWindow = dynamic_cast<QWindowsWindow *>(mainWindow->windowHandle()->handle()))
|
||||
windowsWindow->setHasBorderInFullScreen(true);
|
||||
mainWindow->showMaximized();
|
||||
|
Loading…
Reference in New Issue
Block a user