QtBase
v6.3.1
|
#include <qplatformintegration.h>
Protected Member Functions | |
QPlatformIntegration ()=default | |
Definition at line 108 of file qplatformintegration.h.
Capabilities are used to determing specific features of a platform integration
\value ThreadedPixmaps The platform uses a pixmap implementation that is reentrant and can be used from multiple threads, like the raster paint engine and QImage based pixmaps.
\value OpenGL The platform supports OpenGL
\value ThreadedOpenGL The platform supports using OpenGL outside the GUI thread.
\value SharedGraphicsCache The platform supports a shared graphics cache
\value BufferQueueingOpenGL Deprecated. The OpenGL implementation on the platform will queue up buffers when swapBuffers() is called and block only when its buffer pipeline is full, rather than block immediately.
\value MultipleWindows The platform supports multiple QWindows, i.e. does some kind of compositing either client or server side. Some platforms might only support a single fullscreen window.
\value ApplicationState The platform handles the application state explicitly. This means that QEvent::ApplicationActivate and QEvent::ApplicationDeativate will not be posted automatically. Instead, the platform must handle application state explicitly by using QWindowSystemInterface::handleApplicationStateChanged(). If not set, application state will follow window activation, which is the normal behavior for desktop platforms.
\value ForeignWindows The platform allows creating QWindows which represent native windows created by other processes or by using native libraries.
\value NonFullScreenWindows The platform supports top-level windows which do not fill the screen. The default implementation returns true
. Returning false for this will cause all windows, including dialogs and popups, to be resized to fill the screen.
\value WindowManagement The platform is based on a system that performs window management. This includes the typical desktop platforms. Can be set to false on platforms where no window management is available, meaning for example that windows are never repositioned by the window manager. The default implementation returns true
.
\value AllGLFunctionsQueryable Deprecated. Used to indicate whether the QOpenGLContext backend provided by the platform is able to return function pointers from getProcAddress() even for standard OpenGL functions, for example OpenGL 1 functions like glClear() or glDrawArrays(). This is important because the OpenGL specifications do not require this ability from the getProcAddress implementations of the windowing system interfaces (EGL, WGL, GLX). The platform plugins may however choose to enhance the behavior in the backend implementation for QOpenGLContext::getProcAddress() and support returning a function pointer also for the standard, non-extension functions. This capability is a prerequisite for dynamic OpenGL loading. Starting with Qt 5.7, the platform plugin is required to have this capability.
\value ApplicationIcon The platform supports setting the application icon. (since 5.5)
\value TopStackedNativeChildWindows The platform supports native child windows via QWindowContainer without having to punch a transparent hole in the backingstore. (since 5.10)
\value OpenGLOnRasterSurface The platform supports making a QOpenGLContext current in combination with a QWindow of type RasterSurface.
\value PaintEvents The platform sends paint events instead of expose events when the window needs repainting. Expose events are only sent when a window is toggled from a non-exposed to exposed state or back.
\value RhiBasedRendering The platform supports one or more of the 3D rendering APIs that Qt Quick and other components can use via the Qt Rendering Hardware Interface. On platforms where it is clear upfront that the platform cannot, or does not want to, support rendering via 3D graphics APIs such as OpenGL, Vulkan, Direct 3D, or Metal, this capability can be reported as false
. That in effect means that in modules where there is an alternative, such as Qt Quick with its software
backend, an automatic fallback to that alternative may occur, if applicable. The default implementation of hasCapability() returns true
.
Definition at line 113 of file qplatformintegration.h.
Definition at line 176 of file qplatformintegration.h.
|
inlinevirtual |
Definition at line 139 of file qplatformintegration.h.
|
protecteddefault |
|
virtual |
Returns the platforms accessibility.
The default implementation returns QPlatformAccessibility which delegates handling of accessibility to accessiblebridge plugins.
Reimplemented in QXcbIntegration, QIOSIntegration, QCocoaIntegration, and QAndroidPlatformIntegration.
Definition at line 384 of file qplatformintegration.cpp.
|
virtual |
Should sound a bell, using the default volume and sound.
Reimplemented in QXcbIntegration, QWindowsIntegration, QIOSIntegration, and QCocoaIntegration.
Definition at line 540 of file qplatformintegration.cpp.
|
inline |
Definition at line 231 of file qplatformintegration.h.
|
virtual |
Accessor for the platform integration's clipboard.
Default implementation returns a default QPlatformClipboard.
Reimplemented in QXcbIntegration, QWasmIntegration, QQnxIntegration, QIOSIntegration, QHaikuIntegration, QCocoaIntegration, and QAndroidPlatformIntegration.
Definition at line 87 of file qplatformintegration.cpp.
|
pure virtual |
Factory function for the GUI event dispatcher. The platform plugin should create and return a QAbstractEventDispatcher subclass when this function is called.
If the platform plugin for some reason creates the event dispatcher outside of this function (for example in the constructor), it needs to handle the case where this function is never called, ensuring that the event dispatcher is still deleted at some point (typically in the destructor).
Note that the platform plugin should never explicitly set the event dispatcher itself, using QCoreApplication::setEventDispatcher(), but let QCoreApplication decide when and which event dispatcher to create.
Implemented in QXcbIntegration, QWindowsIntegration, QWasmIntegration, QVncIntegration, QVkKhrDisplayIntegration, QQnxIntegration, QOffscreenIntegration, QMinimalEglIntegration, QMinimalIntegration, QLinuxFbIntegration, QIOSIntegration, QIntegrityFbIntegration, QHaikuIntegration, QEglFSIntegration, QCocoaIntegration, QBsdFbIntegration, QAndroidPlatformIntegration, and QDirectFbIntegration.
|
inlinevirtual |
Reimplemented in QXcbIntegration, QWindowsIntegration, QQnxIntegration, QCocoaIntegration, and QAndroidPlatformIntegration.
Definition at line 145 of file qplatformintegration.h.
|
virtual |
Factory function for QPaintEngine. This function will return 0 if the platform integration does not support creating any paint engine the given paintDevice.
Definition at line 338 of file qplatformintegration.cpp.
|
pure virtual |
Factory function for QPlatformBackingStore. The QWindow parameter is a pointer to the top level widget(tlw) the window surface is created for. A QPlatformWindow is always created before the QPlatformBackingStore for tlw where the widget also requires a backing store.
Implemented in QXcbIntegration, QWindowsGdiIntegration, QWasmIntegration, QVncIntegration, QVkKhrDisplayIntegration, QQnxIntegration, QOffscreenIntegration, QMinimalEglIntegration, QMinimalIntegration, QLinuxFbIntegration, QIOSIntegration, QIntegrityFbIntegration, QHaikuIntegration, QEglFSIntegration, QWindowsDirect2DIntegration, QBsdFbIntegration, QAndroidPlatformIntegration, QDirectFbIntegration, and QCocoaIntegration.
|
virtual |
Factory function for QOffscreenSurface. An offscreen surface will typically be implemented with a pixel buffer (pbuffer). If the platform doesn't support offscreen surfaces, an invisible window will be used by QOffscreenSurface instead.
Reimplemented in QXcbIntegration, QWasmIntegration, QIOSIntegration, QEglFSIntegration, QCocoaIntegration, and QAndroidPlatformIntegration.
Definition at line 500 of file qplatformintegration.cpp.
|
virtual |
Factory function for QPlatformOpenGLContext. The context parameter is a pointer to the context for which a platform-specific context backend needs to be created. Configuration settings like the format, share context and screen have to be taken from this QOpenGLContext and the resulting platform context is expected to be backed by a native context that fulfills these criteria.
If the context has native handles set, no new native context is expected to be created. Instead, the provided handles have to be used. In this case the ownership of the handle must not be taken and the platform implementation is not allowed to destroy the native context. Configuration parameters like the format are also to be ignored. Instead, the platform implementation is responsible for querying the configuriation from the provided native context.
Returns a pointer to a QPlatformOpenGLContext instance or \nullptr if the context could not be created.
Reimplemented in QXcbIntegration, QWindowsIntegration, QWasmIntegration, QMinimalEglIntegration, QIOSIntegration, QEglFSIntegration, QCocoaIntegration, and QAndroidPlatformIntegration.
Definition at line 315 of file qplatformintegration.cpp.
|
virtual |
Factory function for QPlatformPixmap. PixelType can be either PixmapType or BitmapType.
Reimplemented in QXcbIntegration, QWindowsGdiIntegration, QWindowsDirect2DIntegration, and QDirectFbIntegration.
Definition at line 290 of file qplatformintegration.cpp.
|
virtual |
Factory function for QPlatformSessionManager. The default QPlatformSessionManager provides the same functionality as the QSessionManager.
Definition at line 513 of file qplatformintegration.cpp.
|
virtual |
Factory function for QPlatformSharedGraphicsCache. This function will return 0 if the platform integration does not support any shared graphics cache mechanism for the given cacheId.
Definition at line 327 of file qplatformintegration.cpp.
|
virtual |
Reimplemented in QXcbIntegration, QWindowsIntegration, QWasmIntegration, QVkKhrDisplayIntegration, QOffscreenIntegration, QIOSIntegration, QEglFSIntegration, QCocoaIntegration, and QAndroidPlatformIntegration.
Definition at line 489 of file qplatformintegration.cpp.
|
pure virtual |
Factory function for QPlatformWindow. The window parameter is a pointer to the window which the QPlatformWindow is supposed to be created for.
All windows have to have a QPlatformWindow, and it will be created on-demand when the QWindow is made visible for the first time, or explicitly through calling QWindow::create().
In the constructor, of the QPlatformWindow, the window flags, state, title and geometry of the window should be applied to the underlying window. If the resulting flags or state differs, the resulting values should be set on the window using QWindow::setWindowFlags() or QWindow::setWindowState(), respectively.
Implemented in QXcbIntegration, QWindowsIntegration, QWasmIntegration, QVncIntegration, QVkKhrDisplayIntegration, QQnxIntegration, QOffscreenIntegration, QMinimalEglIntegration, QMinimalIntegration, QLinuxFbIntegration, QIOSIntegration, QIntegrityFbIntegration, QHaikuIntegration, QEglFSIntegration, QCocoaIntegration, QBsdFbIntegration, QAndroidPlatformIntegration, and QDirectFbIntegration.
|
virtual |
Reimplemented in QWasmIntegration, and QAndroidPlatformIntegration.
Definition at line 447 of file qplatformintegration.cpp.
|
virtual |
Called before the platform integration is deleted. Useful when cleanup relies on virtual functions.
Reimplemented in QEglFSIntegration.
Definition at line 362 of file qplatformintegration.cpp.
|
virtual |
Accessor for the platform integration's fontdatabase.
Default implementation returns a default QPlatformFontDatabase.
Reimplemented in QXcbIntegration, QWindowsIntegration, QWasmIntegration, QVncIntegration, QVkKhrDisplayIntegration, QQnxIntegration, QOffscreenIntegration, QMinimalEglIntegration, QMinimalIntegration, QLinuxFbIntegration, QIOSIntegration, QIntegrityFbIntegration, QHaikuIntegration, QEglFSIntegration, QCocoaIntegration, QBsdFbIntegration, QAndroidPlatformIntegration, and QDirectFbIntegration.
Definition at line 67 of file qplatformintegration.cpp.
|
virtual |
Reimplemented in QWindowsIntegration, QWasmIntegration, QVncIntegration, QVkKhrDisplayIntegration, QQnxIntegration, QOffscreenX11Integration, QOffscreenIntegration, QMinimalEglIntegration, QMinimalIntegration, QLinuxFbIntegration, QIntegrityFbIntegration, QHaikuIntegration, QEglFSIntegration, QCocoaIntegration, QBsdFbIntegration, QAndroidPlatformIntegration, QXcbIntegration, QIOSIntegration, and QDirectFbIntegration.
Definition at line 284 of file qplatformintegration.cpp.
|
virtual |
Performs initialization steps that depend on having an event dispatcher available. Called after the event dispatcher has been created.
Tasks that require an event dispatcher, for example creating socket notifiers, cannot be performed in the constructor. Instead, they should be performed here. The default implementation does nothing.
Reimplemented in QXcbIntegration, QWindowsIntegration, QWasmIntegration, QVncIntegration, QVkKhrDisplayIntegration, QOffscreenIntegration, QLinuxFbIntegration, QIOSIntegration, QIntegrityFbIntegration, QEglFSIntegration, QBsdFbIntegration, and QAndroidPlatformIntegration.
Definition at line 352 of file qplatformintegration.cpp.
|
virtual |
Returns the platforms input context.
The default implementation returns \nullptr, implying no input method support.
Reimplemented in QXcbIntegration, QWindowsIntegration, QWasmIntegration, QVncIntegration, QVkKhrDisplayIntegration, QOffscreenIntegration, QLinuxFbIntegration, QIOSIntegration, QIntegrityFbIntegration, QEglFSIntegration, QCocoaIntegration, QBsdFbIntegration, QAndroidPlatformIntegration, and QDirectFbIntegration.
Definition at line 371 of file qplatformintegration.cpp.
|
virtual |
Reimplemented in QXcbIntegration, QWindowsGdiIntegration, QVncIntegration, QVkKhrDisplayIntegration, QQnxIntegration, QOffscreenX11Integration, QOffscreenIntegration, QLinuxFbIntegration, QIOSIntegration, QIntegrityFbIntegration, QEglFSIntegration, QWindowsDirect2DIntegration, QCocoaIntegration, QBsdFbIntegration, QAndroidPlatformIntegration, and QDirectFbIntegration.
Definition at line 115 of file qplatformintegration.cpp.
|
virtual |
Platform integration function for querying the OpenGL implementation type.
Used only when dynamic OpenGL implementation loading is enabled.
Subclasses should reimplement this function and return a value based on the OpenGL implementation they have chosen to load.
Reimplemented in QWindowsIntegration.
Definition at line 576 of file qplatformintegration.cpp.
Should be used to obtain a list of possible shortcuts for the given key event. Shortcuts should be encoded as int(Qt::Key + Qt::KeyboardModifiers).
One example for more than one possibility is the key combination of Shift+5. That one might trigger a shortcut which is set as "Shift+5" as well as one using %. These combinations depend on the currently set keyboard layout.
Reimplemented in QCocoaIntegration, QXcbIntegration, and QWindowsIntegration.
Definition at line 479 of file qplatformintegration.cpp.
|
virtual |
Reimplemented in QXcbIntegration, QWindowsIntegration, and QCocoaIntegration.
Definition at line 464 of file qplatformintegration.cpp.
|
virtual |
Asks the platform to terminate the application.
Overrides should ensure there's a callback into the QWSI function handleApplicationTermination so that the quit can be propagated to QtGui and the application.
Reimplemented in QCocoaIntegration.
Definition at line 553 of file qplatformintegration.cpp.
|
virtual |
Reimplemented in QXcbIntegration, QWindowsIntegration, QWasmIntegration, QVncIntegration, QVkKhrDisplayIntegration, QQnxIntegration, QOffscreenIntegration, QLinuxFbIntegration, QIOSIntegration, QIntegrityFbIntegration, QHaikuIntegration, QEglFSIntegration, QCocoaIntegration, QBsdFbIntegration, QAndroidPlatformIntegration, and QDirectFbIntegration.
Definition at line 120 of file qplatformintegration.cpp.
Platform integration function for setting the application icon.
Reimplemented in QCocoaIntegration.
Definition at line 590 of file qplatformintegration.cpp.
Reimplemented in QXcbIntegration, QWindowsIntegration, QQnxIntegration, QIOSIntegration, QCocoaIntegration, QAndroidPlatformIntegration, QWasmIntegration, and QMinimalEglIntegration.
Definition at line 395 of file qplatformintegration.cpp.
|
virtual |
Function to sync the platform integrations state with the window system.
This is often implemented as a roundtrip from the platformintegration to the window system.
This function should not call QWindowSystemInterface::flushWindowSystemEvents() or QCoreApplication::processEvents()
Reimplemented in QXcbIntegration.
Definition at line 529 of file qplatformintegration.cpp.
|
virtual |
Reimplemented in QXcbIntegration, QWindowsIntegration, QWasmIntegration, QOffscreenIntegration, QIOSIntegration, QCocoaIntegration, and QAndroidPlatformIntegration.
Definition at line 484 of file qplatformintegration.cpp.