Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QtWaylandClient::QWaylandIntegration Class Reference

#include <qwaylandintegration_p.h>

+ Inheritance diagram for QtWaylandClient::QWaylandIntegration:
+ Collaboration diagram for QtWaylandClient::QWaylandIntegration:

Public Member Functions

 QWaylandIntegration ()
 
 ~QWaylandIntegration () override
 
bool init ()
 
bool hasCapability (QPlatformIntegration::Capability cap) const override
 
QPlatformWindowcreatePlatformWindow (QWindow *window) const override
 Factory function for QPlatformWindow.
 
QPlatformBackingStorecreatePlatformBackingStore (QWindow *window) const override
 Factory function for QPlatformBackingStore.
 
QAbstractEventDispatchercreateEventDispatcher () const override
 Factory function for the GUI event dispatcher.
 
void initialize () override
 Performs initialization steps that depend on having an event dispatcher available.
 
QPlatformFontDatabasefontDatabase () const override
 Accessor for the platform integration's fontdatabase.
 
QPlatformNativeInterfacenativeInterface () const override
 
QPlatformInputContextinputContext () const override
 Returns the platforms input context.
 
QVariant styleHint (StyleHint hint) const override
 
QPlatformServicesservices () const override
 
QWaylandDisplaydisplay () 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
 
QPlatformThemecreatePlatformTheme (const QString &name) const override
 
void setApplicationBadge (qint64 number) override
 
virtual QWaylandInputDevicecreateInputDevice (QWaylandDisplay *display, int version, uint32_t id) const
 
virtual QWaylandScreencreatePlatformScreen (QWaylandDisplay *waylandDisplay, int version, uint32_t id) const
 
virtual QWaylandCursor * createPlatformCursor (QWaylandDisplay *display) const
 
virtual QWaylandClientBufferIntegrationclientBufferIntegration () const
 
virtual QWaylandServerBufferIntegrationserverBufferIntegration () const
 
virtual QWaylandShellIntegrationshellIntegration () const
 
void reconfigureInputContext ()
 
- Public Member Functions inherited from QPlatformIntegration
virtual ~QPlatformIntegration ()
 
virtual QPlatformPixmapcreatePlatformPixmap (QPlatformPixmap::PixelType type) const
 Factory function for QPlatformPixmap.
 
virtual QPlatformWindowcreateForeignWindow (QWindow *, WId) const
 
virtual QPlatformOpenGLContextcreatePlatformOpenGLContext (QOpenGLContext *context) const
 Factory function for QPlatformOpenGLContext.
 
virtual QPlatformSharedGraphicsCachecreatePlatformSharedGraphicsCache (const char *cacheId) const
 Factory function for QPlatformSharedGraphicsCache.
 
virtual QPaintEnginecreateImagePaintEngine (QPaintDevice *paintDevice) const
 Factory function for QPaintEngine.
 
virtual void destroy ()
 Called before the platform integration is deleted.
 
virtual QPlatformClipboardclipboard () const
 Accessor for the platform integration's clipboard.
 
virtual Qt::WindowState defaultWindowState (Qt::WindowFlags) const
 
virtual QPlatformKeyMapperkeyMapper () const
 Accessor for the platform integration's key mapper.
 
virtual QPlatformOffscreenSurfacecreatePlatformOffscreenSurface (QOffscreenSurface *surface) const
 Factory function for QOffscreenSurface.
 
virtual QPlatformSessionManagercreatePlatformSessionManager (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 beep () const
 
virtual void quit () const
 
template<auto func, typename... Args>
auto call (Args... args)
 

Static Public Member Functions

static QWaylandIntegrationinstance ()
 

Protected Member Functions

void reset ()
 
virtual QPlatformNativeInterfacecreatePlatformNativeInterface ()
 
- Protected Member Functions inherited from QPlatformIntegration
 QPlatformIntegration ()=default
 

Protected Attributes

QScopedPointer< QWaylandDisplaymDisplay
 
QScopedPointer< QWaylandClientBufferIntegrationmClientBufferIntegration
 
QScopedPointer< QWaylandServerBufferIntegrationmServerBufferIntegration
 
QScopedPointer< QWaylandShellIntegrationmShellIntegration
 
QScopedPointer< QWaylandInputDeviceIntegrationmInputDeviceIntegration
 
QScopedPointer< QPlatformInputContextmInputContext
 

Friends

class QWaylandDisplay
 

Additional Inherited Members

- Public Types inherited from QPlatformIntegration
enum  Capability {
  ThreadedPixmaps = 1 , OpenGL , ThreadedOpenGL , SharedGraphicsCache ,
  BufferQueueingOpenGL , WindowMasks , MultipleWindows , ApplicationState ,
  ForeignWindows , NonFullScreenWindows , NativeWidgets , WindowManagement ,
  WindowActivation , SyncState , RasterGLSurface , AllGLFunctionsQueryable ,
  ApplicationIcon , SwitchableWidgetComposition , TopStackedNativeChildWindows , OpenGLOnRasterSurface ,
  MaximizeUsingFullscreenGeometry , PaintEvents , RhiBasedRendering , ScreenWindowGrabbing ,
  BackingStoreStaticContents
}
 Capabilities are used to determine specific features of a platform integration. More...
 
enum  StyleHint {
  CursorFlashTime , KeyboardInputInterval , MouseDoubleClickInterval , StartDragDistance ,
  StartDragTime , KeyboardAutoRepeatRate , ShowIsFullScreen , PasswordMaskDelay ,
  FontSmoothingGamma , StartDragVelocity , UseRtlExtensions , PasswordMaskCharacter ,
  SetFocusOnTouchRelease , ShowIsMaximized , MousePressAndHoldInterval , TabFocusBehavior ,
  ReplayMousePressOutsidePopup , ItemViewActivateItemOnSingleClick , UiEffects , WheelScrollLines ,
  ShowShortcutsInContextMenus , MouseQuickSelectionThreshold , MouseDoubleClickDistance , FlickStartDistance ,
  FlickMaximumVelocity , FlickDeceleration , UnderlineShortcut
}
 

Detailed Description

Definition at line 38 of file qwaylandintegration_p.h.

Constructor & Destructor Documentation

◆ QWaylandIntegration()

QtWaylandClient::QWaylandIntegration::QWaylandIntegration ( )

Definition at line 78 of file qwaylandintegration.cpp.

References QtWaylandClient::QWaylandWindow::fixedToplevelPositions, and qEnvironmentVariableIsSet().

+ Here is the call graph for this function:

◆ ~QWaylandIntegration()

QtWaylandClient::QWaylandIntegration::~QWaylandIntegration ( )
override

Definition at line 93 of file qwaylandintegration.cpp.

Member Function Documentation

◆ clientBufferIntegration()

QWaylandClientBufferIntegration * QtWaylandClient::QWaylandIntegration::clientBufferIntegration ( ) const
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().

+ Here is the caller graph for this function:

◆ createEventDispatcher()

QAbstractEventDispatcher * QtWaylandClient::QWaylandIntegration::createEventDispatcher ( ) const
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.

Since
5.2

Implements QPlatformIntegration.

Definition at line 159 of file qwaylandintegration.cpp.

◆ createInputDevice()

QWaylandInputDevice * QtWaylandClient::QWaylandIntegration::createInputDevice ( QWaylandDisplay * display,
int version,
uint32_t id ) const
virtual

Definition at line 429 of file qwaylandintegration.cpp.

References mInputDeviceIntegration.

Referenced by QtWaylandClient::QWaylandDisplay::registry_global().

+ Here is the caller graph for this function:

◆ createPlatformBackingStore()

QPlatformBackingStore * QtWaylandClient::QWaylandIntegration::createPlatformBackingStore ( QWindow * window) const
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.

See also
QBackingStore
createPlatformWindow()

Implements QPlatformIntegration.

Definition at line 154 of file qwaylandintegration.cpp.

References mDisplay, and window().

+ Here is the call graph for this function:

◆ createPlatformCursor()

QWaylandCursor * QtWaylandClient::QWaylandIntegration::createPlatformCursor ( QWaylandDisplay * display) const
virtual

Definition at line 287 of file qwaylandintegration.cpp.

◆ createPlatformNativeInterface()

QPlatformNativeInterface * QtWaylandClient::QWaylandIntegration::createPlatformNativeInterface ( )
protectedvirtual

Definition at line 164 of file qwaylandintegration.cpp.

◆ createPlatformScreen()

QWaylandScreen * QtWaylandClient::QWaylandIntegration::createPlatformScreen ( QWaylandDisplay * waylandDisplay,
int version,
uint32_t id ) const
virtual

Definition at line 282 of file qwaylandintegration.cpp.

Referenced by QtWaylandClient::QWaylandDisplay::registry_global().

+ Here is the caller graph for this function:

◆ createPlatformTheme()

QPlatformTheme * QtWaylandClient::QWaylandIntegration::createPlatformTheme ( const QString & name) const
overridevirtual

Reimplemented from QPlatformIntegration.

Definition at line 277 of file qwaylandintegration.cpp.

References QGenericUnixTheme::createUnixTheme().

+ Here is the call graph for this function:

◆ createPlatformWindow()

QPlatformWindow * QtWaylandClient::QWaylandIntegration::createPlatformWindow ( QWindow * window) const
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.

See also
QPlatformWindow, QPlatformWindowFormat
createPlatformBackingStore()

Implements QPlatformIntegration.

Definition at line 131 of file qwaylandintegration.cpp.

References mDisplay, QSurface::OpenGLSurface, QSurface::RasterGLSurface, QSurface::VulkanSurface, and window().

+ Here is the call graph for this function:

◆ display()

QWaylandDisplay * QtWaylandClient::QWaylandIntegration::display ( ) const

◆ fontDatabase()

QPlatformFontDatabase * QtWaylandClient::QWaylandIntegration::fontDatabase ( ) const
overridevirtual

Accessor for the platform integration's fontdatabase.

Default implementation returns a default QPlatformFontDatabase.

See also
QPlatformFontDatabase

Reimplemented from QPlatformIntegration.

Definition at line 199 of file qwaylandintegration.cpp.

References QScopedPointer< T, Cleanup >::data().

+ Here is the call graph for this function:

◆ hasCapability()

bool QtWaylandClient::QWaylandIntegration::hasCapability ( QPlatformIntegration::Capability cap) const
overridevirtual

◆ init()

bool QtWaylandClient::QWaylandIntegration::init ( )

Definition at line 98 of file qwaylandintegration.cpp.

References mDisplay.

◆ initialize()

void QtWaylandClient::QWaylandIntegration::initialize ( )
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.

+ Here is the call graph for this function:

◆ inputContext()

QPlatformInputContext * QtWaylandClient::QWaylandIntegration::inputContext ( ) const
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instance()

static QWaylandIntegration * QtWaylandClient::QWaylandIntegration::instance ( )
inlinestatic

Definition at line 44 of file qwaylandintegration_p.h.

Referenced by QWaylandClientExtensionPrivate::QWaylandClientExtensionPrivate().

+ Here is the caller graph for this function:

◆ nativeInterface()

QPlatformNativeInterface * QtWaylandClient::QWaylandIntegration::nativeInterface ( ) const
overridevirtual

Reimplemented from QPlatformIntegration.

Definition at line 103 of file qwaylandintegration.cpp.

References QScopedPointer< T, Cleanup >::data().

+ Here is the call graph for this function:

◆ possibleKeys()

QList< int > QtWaylandClient::QWaylandIntegration::possibleKeys ( const QKeyEvent * ) const
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.

Note
This function should be called only from key event handlers.

Reimplemented from QPlatformIntegration.

Definition at line 265 of file qwaylandintegration.cpp.

References mDisplay.

◆ queryKeyboardModifiers()

Qt::KeyboardModifiers QtWaylandClient::QWaylandIntegration::queryKeyboardModifiers ( ) const
overridevirtual

Reimplemented from QPlatformIntegration.

Definition at line 257 of file qwaylandintegration.cpp.

References mDisplay, and Qt::NoModifier.

◆ reconfigureInputContext()

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, Q_ASSERT, qCDebug, qCWarning, QStringLiteral, QPlatformInputContextFactory::requested(), QScopedPointer< T, Cleanup >::reset(), QXkbCommon::setXkbContext(), and WAYLAND_IM_KEY.

Referenced by QtWaylandClient::QWaylandDisplay::registry_global(), and QtWaylandClient::QWaylandDisplay::registry_global_remove().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset()

void QtWaylandClient::QWaylandIntegration::reset ( )
protected

◆ serverBufferIntegration()

QWaylandServerBufferIntegration * QtWaylandClient::QWaylandIntegration::serverBufferIntegration ( ) const
virtual

Definition at line 310 of file qwaylandintegration.cpp.

References mServerBufferIntegration.

Referenced by QtWaylandClient::QWaylandNativeInterface::nativeResourceForIntegration().

+ Here is the caller graph for this function:

◆ services()

QPlatformServices * QtWaylandClient::QWaylandIntegration::services ( ) const
overridevirtual

Reimplemented from QPlatformIntegration.

Definition at line 247 of file qwaylandintegration.cpp.

References mDisplay.

◆ setApplicationBadge()

void QtWaylandClient::QWaylandIntegration::setApplicationBadge ( qint64 number)
overridevirtual
Since
6.5

Should set the application's badge to number.

If the number is 0 the badge should be cleared.

See also
QGuiApplication::setBadge()

Reimplemented from QPlatformIntegration.

Definition at line 526 of file qwaylandintegration.cpp.

References mDisplay, and number.

◆ shellIntegration()

QWaylandShellIntegration * QtWaylandClient::QWaylandIntegration::shellIntegration ( ) const
virtual

Definition at line 318 of file qwaylandintegration.cpp.

References mShellIntegration.

Referenced by QtWaylandClient::QWaylandDisplay::shellIntegration().

+ Here is the caller graph for this function:

◆ styleHint()

QVariant QtWaylandClient::QWaylandIntegration::styleHint ( StyleHint hint) const
overridevirtual

Reimplemented from QPlatformIntegration.

Definition at line 223 of file qwaylandintegration.cpp.

References hint(), mDisplay, QPlatformIntegration::ShowIsFullScreen, and QPlatformIntegration::styleHint().

+ Here is the call graph for this function:

◆ themeNames()

QStringList QtWaylandClient::QWaylandIntegration::themeNames ( ) const
overridevirtual

Reimplemented from QPlatformIntegration.

Definition at line 272 of file qwaylandintegration.cpp.

References QGenericUnixTheme::themeNames().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QWaylandDisplay

friend class QWaylandDisplay
friend

Definition at line 146 of file qwaylandintegration_p.h.

Member Data Documentation

◆ mClientBufferIntegration

QScopedPointer<QWaylandClientBufferIntegration> QtWaylandClient::QWaylandIntegration::mClientBufferIntegration
protected

Definition at line 113 of file qwaylandintegration_p.h.

Referenced by clientBufferIntegration(), and reset().

◆ mDisplay

◆ mInputContext

QScopedPointer<QPlatformInputContext> QtWaylandClient::QWaylandIntegration::mInputContext
protected

Definition at line 118 of file qwaylandintegration_p.h.

Referenced by inputContext(), and reconfigureInputContext().

◆ mInputDeviceIntegration

QScopedPointer<QWaylandInputDeviceIntegration> QtWaylandClient::QWaylandIntegration::mInputDeviceIntegration
protected

Definition at line 116 of file qwaylandintegration_p.h.

Referenced by createInputDevice(), and reset().

◆ mServerBufferIntegration

QScopedPointer<QWaylandServerBufferIntegration> QtWaylandClient::QWaylandIntegration::mServerBufferIntegration
protected

Definition at line 114 of file qwaylandintegration_p.h.

Referenced by reset(), and serverBufferIntegration().

◆ mShellIntegration

QScopedPointer<QWaylandShellIntegration> QtWaylandClient::QWaylandIntegration::mShellIntegration
protected

Definition at line 115 of file qwaylandintegration_p.h.

Referenced by shellIntegration().


The documentation for this class was generated from the following files: