![]() |
Qt 6.x
The Qt SDK
|
#include <qwaylandintegration_p.h>
Public Member Functions | |
QWaylandIntegration () | |
~QWaylandIntegration () override | |
bool | init () |
bool | hasCapability (QPlatformIntegration::Capability cap) const override |
QPlatformWindow * | createPlatformWindow (QWindow *window) const override |
Factory function for QPlatformWindow. | |
QPlatformBackingStore * | createPlatformBackingStore (QWindow *window) const override |
Factory function for QPlatformBackingStore. | |
QAbstractEventDispatcher * | createEventDispatcher () const override |
Factory function for the GUI event dispatcher. | |
void | initialize () override |
Performs initialization steps that depend on having an event dispatcher available. | |
QPlatformFontDatabase * | fontDatabase () const override |
Accessor for the platform integration's fontdatabase. | |
QPlatformNativeInterface * | nativeInterface () const override |
QPlatformInputContext * | inputContext () const override |
Returns the platforms input context. | |
QVariant | styleHint (StyleHint hint) const override |
QPlatformServices * | services () const override |
QWaylandDisplay * | display () const |
Qt::KeyboardModifiers | queryKeyboardModifiers () const override |
QList< int > | possibleKeys (const QKeyEvent *event) const override |
Should be used to obtain a list of possible shortcuts for the given key event. | |
QStringList | themeNames () const override |
QPlatformTheme * | createPlatformTheme (const QString &name) const override |
void | setApplicationBadge (qint64 number) override |
virtual QWaylandInputDevice * | createInputDevice (QWaylandDisplay *display, int version, uint32_t id) const |
virtual QWaylandScreen * | createPlatformScreen (QWaylandDisplay *waylandDisplay, int version, uint32_t id) const |
virtual QWaylandCursor * | createPlatformCursor (QWaylandDisplay *display) const |
virtual QWaylandClientBufferIntegration * | clientBufferIntegration () const |
virtual QWaylandServerBufferIntegration * | serverBufferIntegration () const |
virtual QWaylandShellIntegration * | shellIntegration () const |
void | reconfigureInputContext () |
![]() | |
virtual | ~QPlatformIntegration () |
virtual bool | hasCapability (Capability cap) const |
virtual QPlatformPixmap * | createPlatformPixmap (QPlatformPixmap::PixelType type) const |
Factory function for QPlatformPixmap. | |
virtual QPlatformWindow * | createPlatformWindow (QWindow *window) const =0 |
Factory function for QPlatformWindow. | |
virtual QPlatformWindow * | createForeignWindow (QWindow *, WId) const |
virtual QPlatformBackingStore * | createPlatformBackingStore (QWindow *window) const =0 |
Factory function for QPlatformBackingStore. | |
virtual QPlatformOpenGLContext * | createPlatformOpenGLContext (QOpenGLContext *context) const |
Factory function for QPlatformOpenGLContext. | |
virtual QPlatformSharedGraphicsCache * | createPlatformSharedGraphicsCache (const char *cacheId) const |
Factory function for QPlatformSharedGraphicsCache. | |
virtual QPaintEngine * | createImagePaintEngine (QPaintDevice *paintDevice) const |
Factory function for QPaintEngine. | |
virtual QAbstractEventDispatcher * | createEventDispatcher () const =0 |
Factory function for the GUI event dispatcher. | |
virtual void | initialize () |
Performs initialization steps that depend on having an event dispatcher available. | |
virtual void | destroy () |
Called before the platform integration is deleted. | |
virtual QPlatformFontDatabase * | fontDatabase () const |
Accessor for the platform integration's fontdatabase. | |
virtual QPlatformClipboard * | clipboard () const |
Accessor for the platform integration's clipboard. | |
virtual QPlatformInputContext * | inputContext () const |
Returns the platforms input context. | |
virtual QPlatformNativeInterface * | nativeInterface () const |
virtual QPlatformServices * | services () const |
virtual QVariant | styleHint (StyleHint hint) const |
virtual Qt::WindowState | defaultWindowState (Qt::WindowFlags) const |
virtual Qt::KeyboardModifiers | queryKeyboardModifiers () const |
virtual QList< int > | possibleKeys (const QKeyEvent *) const |
Should be used to obtain a list of possible shortcuts for the given key event. | |
virtual QStringList | themeNames () const |
virtual QPlatformTheme * | createPlatformTheme (const QString &name) const |
virtual QPlatformOffscreenSurface * | createPlatformOffscreenSurface (QOffscreenSurface *surface) const |
Factory function for QOffscreenSurface. | |
virtual QPlatformSessionManager * | createPlatformSessionManager (const QString &id, const QString &key) const |
virtual void | sync () |
virtual QOpenGLContext::OpenGLModuleType | openGLModuleType () |
Platform integration function for querying the OpenGL implementation type. | |
virtual void | setApplicationIcon (const QIcon &icon) const |
virtual void | setApplicationBadge (qint64 number) |
virtual void | beep () const |
virtual void | quit () const |
template<auto func, typename... Args> | |
auto | call (Args... args) |
Static Public Member Functions | |
static QWaylandIntegration * | instance () |
Protected Member Functions | |
void | reset () |
virtual QPlatformNativeInterface * | createPlatformNativeInterface () |
![]() | |
QPlatformIntegration ()=default | |
Friends | |
class | QWaylandDisplay |
Definition at line 38 of file qwaylandintegration_p.h.
QtWaylandClient::QWaylandIntegration::QWaylandIntegration | ( | ) |
Definition at line 78 of file qwaylandintegration.cpp.
References QtWaylandClient::QWaylandWindow::fixedToplevelPositions, and qEnvironmentVariableIsSet().
|
override |
Definition at line 93 of file qwaylandintegration.cpp.
|
virtual |
Reimplemented in QtWaylandClient::QWaylandBrcmEglPlatformIntegration, and QtWaylandClient::QWaylandEglPlatformIntegration.
Definition at line 300 of file qwaylandintegration.cpp.
References mClientBufferIntegration, Q_ASSERT, and Q_UNLIKELY.
Referenced by QtWaylandClient::QWaylandDisplay::clientBufferIntegration(), QtWaylandClient::QWaylandNativeInterface::nativeResourceForIntegration(), and QtWaylandClient::QWaylandNativeInterface::nativeResourceForWindow().
|
overridevirtual |
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.
Implements QPlatformIntegration.
Definition at line 159 of file qwaylandintegration.cpp.
|
virtual |
Definition at line 429 of file qwaylandintegration.cpp.
References mInputDeviceIntegration.
Referenced by QtWaylandClient::QWaylandDisplay::registry_global().
|
overridevirtual |
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.
Implements QPlatformIntegration.
Definition at line 154 of file qwaylandintegration.cpp.
References mDisplay, and window().
|
virtual |
Definition at line 287 of file qwaylandintegration.cpp.
|
protectedvirtual |
Definition at line 164 of file qwaylandintegration.cpp.
|
virtual |
Definition at line 282 of file qwaylandintegration.cpp.
Referenced by QtWaylandClient::QWaylandDisplay::registry_global().
|
overridevirtual |
Reimplemented from QPlatformIntegration.
Definition at line 277 of file qwaylandintegration.cpp.
References QGenericUnixTheme::createUnixTheme().
|
overridevirtual |
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.
Implements QPlatformIntegration.
Definition at line 131 of file qwaylandintegration.cpp.
References mDisplay, QSurface::OpenGLSurface, QSurface::RasterGLSurface, QSurface::VulkanSurface, and window().
QWaylandDisplay * QtWaylandClient::QWaylandIntegration::display | ( | ) | const |
Definition at line 252 of file qwaylandintegration.cpp.
References mDisplay.
Referenced by QtWaylandClient::QWaylandBrcmEglPlatformIntegration::QWaylandBrcmEglPlatformIntegration(), QtWaylandClient::QWaylandEglPlatformIntegration::QWaylandEglPlatformIntegration(), QtWaylandClient::QWaylandNativeInterface::nativeResourceForIntegration(), and QtWaylandClient::QWaylandNativeInterface::nativeResourceForWindow().
|
overridevirtual |
Accessor for the platform integration's fontdatabase.
Default implementation returns a default QPlatformFontDatabase.
Reimplemented from QPlatformIntegration.
Definition at line 199 of file qwaylandintegration.cpp.
References QScopedPointer< T, Cleanup >::data().
|
overridevirtual |
Reimplemented from QPlatformIntegration.
Definition at line 108 of file qwaylandintegration.cpp.
References QPlatformIntegration::BufferQueueingOpenGL, QPlatformIntegration::hasCapability(), mDisplay, QPlatformIntegration::MultipleWindows, QPlatformIntegration::NonFullScreenWindows, QPlatformIntegration::OpenGL, QPlatformIntegration::RasterGLSurface, QPlatformIntegration::ScreenWindowGrabbing, QPlatformIntegration::ThreadedOpenGL, QPlatformIntegration::ThreadedPixmaps, and QPlatformIntegration::WindowActivation.
bool QtWaylandClient::QWaylandIntegration::init | ( | ) |
Definition at line 98 of file qwaylandintegration.cpp.
References mDisplay.
|
overridevirtual |
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 from QPlatformIntegration.
Definition at line 186 of file qwaylandintegration.cpp.
References QObject::connect(), QCoreApplicationPrivate::eventDispatcher, mDisplay, SIGNAL, and SLOT.
|
overridevirtual |
Returns the platforms input context.
The default implementation returns \nullptr, implying no input method support.
Reimplemented from QPlatformIntegration.
Definition at line 218 of file qwaylandintegration.cpp.
References QScopedPointer< T, Cleanup >::data(), and mInputContext.
Referenced by reconfigureInputContext().
|
inlinestatic |
Definition at line 44 of file qwaylandintegration_p.h.
Referenced by QWaylandClientExtensionPrivate::QWaylandClientExtensionPrivate().
|
overridevirtual |
Reimplemented from QPlatformIntegration.
Definition at line 103 of file qwaylandintegration.cpp.
References QScopedPointer< T, Cleanup >::data().
|
overridevirtual |
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 from QPlatformIntegration.
Definition at line 265 of file qwaylandintegration.cpp.
References mDisplay.
|
overridevirtual |
Reimplemented from QPlatformIntegration.
Definition at line 257 of file qwaylandintegration.cpp.
References mDisplay, and Qt::NoModifier.
void QtWaylandClient::QWaylandIntegration::reconfigureInputContext | ( | ) |
Definition at line 455 of file qwaylandintegration.cpp.
References QPlatformInputContextFactory::create(), QScopedPointer< T, Cleanup >::data(), QScopedPointer< T, Cleanup >::get(), inputContext(), QPlatformInputContext::isValid(), mDisplay, mInputContext, qCDebug, qCWarning, QStringLiteral, QPlatformInputContextFactory::requested(), QScopedPointer< T, Cleanup >::reset(), and QXkbCommon::setXkbContext().
Referenced by QtWaylandClient::QWaylandDisplay::registry_global(), and QtWaylandClient::QWaylandDisplay::registry_global_remove().
|
protected |
Definition at line 507 of file qwaylandintegration.cpp.
References mClientBufferIntegration, mInputDeviceIntegration, and mServerBufferIntegration.
|
virtual |
Definition at line 310 of file qwaylandintegration.cpp.
References mServerBufferIntegration.
Referenced by QtWaylandClient::QWaylandNativeInterface::nativeResourceForIntegration().
|
overridevirtual |
Reimplemented from QPlatformIntegration.
Definition at line 247 of file qwaylandintegration.cpp.
References mDisplay.
Should set the application's badge to number.
If the number is 0 the badge should be cleared.
Reimplemented from QPlatformIntegration.
Definition at line 518 of file qwaylandintegration.cpp.
|
virtual |
Definition at line 318 of file qwaylandintegration.cpp.
References mShellIntegration.
Referenced by QtWaylandClient::QWaylandDisplay::shellIntegration().
Reimplemented from QPlatformIntegration.
Definition at line 223 of file qwaylandintegration.cpp.
References hint(), mDisplay, QPlatformIntegration::ShowIsFullScreen, and QPlatformIntegration::styleHint().
|
overridevirtual |
Reimplemented from QPlatformIntegration.
Definition at line 272 of file qwaylandintegration.cpp.
References QGenericUnixTheme::themeNames().
|
friend |
Definition at line 146 of file qwaylandintegration_p.h.
|
protected |
Definition at line 113 of file qwaylandintegration_p.h.
Referenced by clientBufferIntegration(), and reset().
|
protected |
Definition at line 107 of file qwaylandintegration_p.h.
Referenced by createPlatformBackingStore(), createPlatformWindow(), display(), hasCapability(), init(), initialize(), possibleKeys(), queryKeyboardModifiers(), reconfigureInputContext(), services(), setApplicationBadge(), and styleHint().
|
protected |
Definition at line 118 of file qwaylandintegration_p.h.
Referenced by inputContext(), and reconfigureInputContext().
|
protected |
Definition at line 116 of file qwaylandintegration_p.h.
Referenced by createInputDevice(), and reset().
|
protected |
Definition at line 114 of file qwaylandintegration_p.h.
Referenced by reset(), and serverBufferIntegration().
|
protected |
Definition at line 115 of file qwaylandintegration_p.h.
Referenced by shellIntegration().