CopperSpice API
1.9.2
|
Entry point for the WindowSystem specific functionality. More...
Public Types | |
enum | Capability |
Protected Methods | |
void | destroyScreen (QPlatformScreen *screen) |
void | screenAdded (QPlatformScreen *screen, bool isPrimary=false) |
void | setPrimaryScreen (QPlatformScreen *newPrimary) |
QPlatformIntegration is the single entry point for the window system specific functionality. This class contains various methods for creating platform specific functionality for areas such as fonts and text rendering. This class is a singleton which means it is only instantiated one time. This occurs in the QApplication constructor.
Every method in this class which starts with the word create allocates a new object which the caller is responsible for deleting. QPlatformIntegration does not take ownership of these objects.
Capabilities are used to determine specific features of a platform integration.
Value | Description |
---|---|
ThreadedPixmaps | Platform supports using a pixmap from multiple threads |
OpenGL | Platform supports OpenGL |
ThreadedOpenGL | Platform supports using OpenGL outside the main thread |
SharedGraphicsCache | Platform supports a shared graphics cache |
BufferQueueingOpenGL | |
WindowMasks | |
MultipleWindows | Platform supports multiple top level windows |
ApplicationState | |
ForeignWindows | Platform supports creating a QWindow to represent a native window |
NonFullScreenWindows | Platform supports top level windows which do not fill the screen |
NativeWidgets | |
WindowManagement | |
SyncState | |
RasterGLSurface | |
AllGLFunctionsQueryable | |
ApplicationIcon | Platform supports setting the application icon |
SwitchableWidgetComposition |
|
virtual |
Returns the platforms accessibility. The default implementation returns a nullptr implying no accessibility support.
|
virtual |
Return the platform clipboard. The default implementation returns a default QPlatformClipboard.
|
pure virtual |
The is the factory method for the GUI event dispatcher. The platform plugin should create and return a QAbstractEventDispatcher subclass when this method is called. If the platform plugin creates the event dispatcher before this method is called, it also needs to handle the case where this method is never called. Ensure that even if this method is never called the event dispatcher is still destroyed.
The platform plugin should never explicitly set the event dispatcher itself using QCoreApplication::setEventDispatcher(), rather let QCoreApplication decide when and which event dispatcher to create.
|
virtual |
The is the factory method for QPaintEngine. Returns a nullptr if the platform integration does not support creating any paint engine the given paintDevice.
|
pure virtual |
The is the factory method or QPlatformBackingStore. The given window is a pointer to the top level widget surface. A QPlatformWindow is always created before the QPlatformBackingStore when one is required.
|
virtual |
The is the factory method for QOffscreenSurface. An offscreen surface will typically be implemented with a pixel buffer (pbuffer). If the platform does not support offscreen surfaces, an invisible window will be used by QOffscreenSurface instead.
|
virtual |
The is the factory method for QPlatformOpenGLContext. The context parameter is a pointer which must be used to create a platform specific context backend. Configuration settings, like the format share context and screen, are taken from the QOpenGLContext. The resulting QPlatformOpenGLContext must contain a handle to a native OpenGL context.
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 confirmation from the provided native context.
Returns a pointer to a QPlatformOpenGLContext instance or a nullptr if the context could not be created.
|
virtual |
The is the factory method for QPlatformPixmap. The value for type can be either PixmapType or BitmapType.
|
virtual |
The is the factory method for QPlatformSessionManager. The default QPlatformSessionManager provides the same functionality as the QSessionManager.
|
virtual |
The is the factory method for QPlatformSharedGraphicsCache. This method will return a nullptr if the platform integration does not support any shared graphics cache mechanism for the given cacheId.
|
virtual |
Sets the platform theme to the given name.
|
pure virtual |
The is the factory method for QPlatformWindow. The window parameter is a pointer to the top level window which the QPlatformWindow is supposed to be created for.
All top level windows have to have a QPlatformWindow and it will be created when the QPlatformWindow is set to be visible for the first time. If the top level window's flags are changed then the top level window's QPlatformWindow is deleted and a new one is created.
In the constructor of the QPlatformWindow the window flags, state, title and geometry of the given 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.
|
virtual |
Additional documentation pending.
|
virtual |
Called before the platform integration is deleted. Useful when cleanup relies on virtual functions.
|
protected |
This method removes the given screen from QApplication::screens() and deletes the screen. Failing to call this method and manually deleting the QPlatformScreen is undefined behavior.
|
virtual |
Additional documentation pending.
|
virtual |
Returns the platform fontdatabase. The default implementation returns a default QPlatformFontDatabase.
|
virtual |
Returns true if the platform supports the given cap.
|
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, can not be performed in the constructor. Instead, they should be performed here. The default implementation does nothing.
|
virtual |
Returns the platforms input context. The default implementation returns a nullptr implying no input method support.
|
virtual |
Returns a pointer to the current QPlatformNativeInterface.
|
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.
The return value does not indicate or limit the types of contexts that can be created by a given implementation. For example a desktop OpenGL implementation may be capable of creating OpenGL ES-compatible contexts too.
Can be used to obtain a list of possible shortcuts for the given key event. For example, the key combination of Shift+5 might trigger a shortcut which is set as "Shift+5" as well as one using "%". These combinations depend on the currently set keyboard layout and must be handled by the platform integration.
|
virtual |
Additional documentation pending.
void QPlatformIntegration::removeScreen | ( | QScreen * | screen | ) |
Removes the given screen and then calls destroyScreen().
|
protected |
Should be called by the platform integration when a new screen is added. The first screen added will automatically be the primary screen which is used for default created windows, an OpenGL context, and other resources unless otherwise specified. If isPrimary is true the new screen becomes the primary screen.
Calling this method adds the screen to QApplication::screens() and emits the QApplication::screenAdded() signal. The screen should be deleted by calling destroyScreen().
|
virtual |
Additional documentation pending.
|
virtual |
This is a platform integration method for setting the application icon.
|
protected |
Should be called when the newPrimary screen changes. When the screen specified as primary changes, this method will notify QApplication and emit the QApplication::primaryScreenChanged signal.
|
virtual |
Additional documentation pending.
|
virtual |
This method synchronizes the platform integration state with the window system. This method should not call QWindowSystemInterface::flushWindowSystemEvents() or QCoreApplication::processEvents().
|
virtual |
Additional documentation pending.