Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QWindowSystemInterface Class Reference

The QWindowSystemInterface provides an event queue for the QPA platform. More...

#include <qwindowsysteminterface.h>

+ Collaboration diagram for QWindowSystemInterface:

Classes

struct  AsynchronousDelivery
 
struct  DefaultDelivery
 
struct  SynchronousDelivery
 
struct  TouchPoint
 

Static Public Member Functions

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleMouseEvent (QWindow *window, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleMouseEvent (QWindow *window, const QPointingDevice *device, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleMouseEvent (QWindow *window, ulong timestamp, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleMouseEvent (QWindow *window, ulong timestamp, const QPointingDevice *device, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized)
 
static bool handleShortcutEvent (QWindow *window, ulong timestamp, int k, Qt::KeyboardModifiers mods, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleKeyEvent (QWindow *window, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleKeyEvent (QWindow *window, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
 
static bool handleExtendedKeyEvent (QWindow *window, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
 
static bool handleExtendedKeyEvent (QWindow *window, ulong timestamp, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
 
static bool handleExtendedKeyEvent (QWindow *window, ulong timestamp, const QInputDevice *device, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
 
static bool handleWheelEvent (QWindow *window, const QPointF &local, const QPointF &global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::ScrollPhase phase=Qt::NoScrollPhase, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized)
 
static bool handleWheelEvent (QWindow *window, ulong timestamp, const QPointF &local, const QPointF &global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::ScrollPhase phase=Qt::NoScrollPhase, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized, bool inverted=false)
 
static bool handleWheelEvent (QWindow *window, ulong timestamp, const QPointingDevice *device, const QPointF &local, const QPointF &global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::ScrollPhase phase=Qt::NoScrollPhase, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized, bool inverted=false)
 
static void registerInputDevice (const QInputDevice *device)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleTouchEvent (QWindow *window, const QPointingDevice *device, const QList< struct TouchPoint > &points, Qt::KeyboardModifiers mods=Qt::NoModifier)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleTouchEvent (QWindow *window, ulong timestamp, const QPointingDevice *device, const QList< struct TouchPoint > &points, Qt::KeyboardModifiers mods=Qt::NoModifier)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleTouchCancelEvent (QWindow *window, const QPointingDevice *device, Qt::KeyboardModifiers mods=Qt::NoModifier)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleTouchCancelEvent (QWindow *window, ulong timestamp, const QPointingDevice *device, Qt::KeyboardModifiers mods=Qt::NoModifier)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleGeometryChange (QWindow *window, const QRect &newRect)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleExposeEvent (QWindow *window, const QRegion &region)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handlePaintEvent (QWindow *window, const QRegion &region)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleCloseEvent (QWindow *window)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleEnterEvent (QWindow *window, const QPointF &local=QPointF(), const QPointF &global=QPointF())
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleLeaveEvent (QWindow *window)
 
static void handleEnterLeaveEvent (QWindow *enter, QWindow *leave, const QPointF &local=QPointF(), const QPointF &global=QPointF())
 This method can be used to ensure leave and enter events are both in queue when moving from one QWindow to another.
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleWindowActivated (QWindow *window, Qt::FocusReason r=Qt::OtherFocusReason)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleWindowStateChanged (QWindow *window, Qt::WindowStates newState, int oldState=-1)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleWindowScreenChanged (QWindow *window, QScreen *newScreen)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleWindowDevicePixelRatioChanged (QWindow *window)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleSafeAreaMarginsChanged (QWindow *window)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleApplicationStateChanged (Qt::ApplicationState newState, bool forcePropagate=false)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool handleApplicationTermination ()
 
static bool handleNativeEvent (QWindow *window, const QByteArray &eventType, void *message, qintptr *result)
 Passes a native event identified by eventType to the window.
 
static void handleScreenAdded (QPlatformScreen *screen, bool isPrimary=false)
 Should be called by the implementation whenever a new screen is added.
 
static void handleScreenRemoved (QPlatformScreen *screen)
 Should be called by the implementation whenever a screen is removed.
 
static void handlePrimaryScreenChanged (QPlatformScreen *newPrimary)
 Should be called whenever the primary screen changes.
 
static void handleScreenOrientationChange (QScreen *screen, Qt::ScreenOrientation newOrientation)
 
static void handleScreenGeometryChange (QScreen *screen, const QRect &newGeometry, const QRect &newAvailableGeometry)
 
static void handleScreenLogicalDotsPerInchChange (QScreen *screen, qreal newDpiX, qreal newDpiY)
 
static void handleScreenRefreshRateChange (QScreen *screen, qreal newRefreshRate)
 
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void handleThemeChange (QWindow *window=nullptr)
 
static void handleFileOpenEvent (const QString &fileName)
 
static void handleFileOpenEvent (const QUrl &url)
 
static bool handleTabletEvent (QWindow *window, ulong timestamp, const QPointingDevice *device, const QPointF &local, const QPointF &global, Qt::MouseButtons buttons, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
 
static bool handleTabletEvent (QWindow *window, const QPointingDevice *device, const QPointF &local, const QPointF &global, Qt::MouseButtons buttons, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
 
static bool handleTabletEvent (QWindow *window, ulong timestamp, const QPointF &local, const QPointF &global, int device, int pointerType, Qt::MouseButtons buttons, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, qint64 uid, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
 
static bool handleTabletEvent (QWindow *window, const QPointF &local, const QPointF &global, int device, int pointerType, Qt::MouseButtons buttons, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, qint64 uid, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
 
static bool handleTabletEnterLeaveProximityEvent (QWindow *window, ulong timestamp, const QPointingDevice *device, bool inProximity, const QPointF &local=QPointF(), const QPointF &global=QPointF(), Qt::MouseButtons buttons={}, int xTilt=0, int yTilt=0, qreal tangentialPressure=0, qreal rotation=0, int z=0, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
 
static bool handleTabletEnterLeaveProximityEvent (QWindow *window, const QPointingDevice *device, bool inProximity, const QPointF &local=QPointF(), const QPointF &global=QPointF(), Qt::MouseButtons buttons={}, int xTilt=0, int yTilt=0, qreal tangentialPressure=0, qreal rotation=0, int z=0, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
 
static bool handleTabletEnterProximityEvent (ulong timestamp, int deviceType, int pointerType, qint64 uid)
 
static void handleTabletEnterProximityEvent (int deviceType, int pointerType, qint64 uid)
 
static bool handleTabletLeaveProximityEvent (ulong timestamp, int deviceType, int pointerType, qint64 uid)
 
static void handleTabletLeaveProximityEvent (int deviceType, int pointerType, qint64 uid)
 
static bool handleGestureEvent (QWindow *window, ulong timestamp, const QPointingDevice *device, Qt::NativeGestureType type, const QPointF &local, const QPointF &global, int fingerCount=0)
 
static bool handleGestureEventWithRealValue (QWindow *window, ulong timestamp, const QPointingDevice *device, Qt::NativeGestureType type, qreal value, const QPointF &local, const QPointF &global, int fingerCount=2)
 
static bool handleGestureEventWithValueAndDelta (QWindow *window, ulong timestamp, const QPointingDevice *device, Qt::NativeGestureType type, qreal value, const QPointF &delta, const QPointF &local, const QPointF &global, int fingerCount=2)
 
static void handlePlatformPanelEvent (QWindow *window)
 
static void handleContextMenuEvent (QWindow *window, bool mouseTriggered, const QPoint &pos, const QPoint &globalPos, Qt::KeyboardModifiers modifiers)
 
static bool sendWindowSystemEvents (QEventLoop::ProcessEventsFlags flags)
 
static void setSynchronousWindowSystemEvents (bool enable)
 
static bool flushWindowSystemEvents (QEventLoop::ProcessEventsFlags flags=QEventLoop::AllEvents)
 Make Qt Gui process all events on the event queue immediately.
 
static void deferredFlushWindowSystemEvents (QEventLoop::ProcessEventsFlags flags)
 
static int windowSystemEventsQueued ()
 
static bool nonUserInputEventsQueued ()
 

Detailed Description

The QWindowSystemInterface provides an event queue for the QPA platform.

Since
5.0

\preliminary

The platform plugins call the various functions to notify about events. The events are queued until sendWindowSystemEvents() is called by the event dispatcher.

Definition at line 36 of file qwindowsysteminterface.h.

Member Function Documentation

◆ deferredFlushWindowSystemEvents()

void QWindowSystemInterface::deferredFlushWindowSystemEvents ( QEventLoop::ProcessEventsFlags  flags)
static

Definition at line 1083 of file qwindowsysteminterface.cpp.

References QThread::currentThread(), QWindowSystemInterfacePrivate::eventsFlushed, QWindowSystemInterfacePrivate::flushEventMutex, QCoreApplication::instance(), Q_ASSERT, and QWaitCondition::wakeOne().

+ Here is the call graph for this function:

◆ flushWindowSystemEvents()

bool QWindowSystemInterface::flushWindowSystemEvents ( QEventLoop::ProcessEventsFlags  flags = QEventLoop::AllEvents)
static

◆ handleApplicationStateChanged()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleApplicationStateChanged ( Qt::ApplicationState  newState,
bool  forcePropagate = false 
)
static

Referenced by QIOSApplicationState::handleApplicationStateChanged(), QtAndroid::setAndroidPlatformIntegration(), and updateApplicationState().

+ Here is the caller graph for this function:

◆ handleApplicationTermination()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleApplicationTermination ( )
static

◆ handleCloseEvent()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleCloseEvent ( QWindow window)
static

Referenced by QtWaylandClient::QWaylandWindow::~QWaylandWindow(), QtWaylandClient::QWaylandExtendedSurface::extended_surface_close(), QXcbWindow::handleClientMessageEvent(), QGuiApplicationPrivate::processKeyEvent(), EventReader::run(), and QWindowsContext::windowsProc().

+ Here is the caller graph for this function:

◆ handleContextMenuEvent()

void QWindowSystemInterface::handleContextMenuEvent ( QWindow window,
bool  mouseTriggered,
const QPoint pos,
const QPoint globalPos,
Qt::KeyboardModifiers  modifiers 
)
static

Definition at line 1026 of file qwindowsysteminterface.cpp.

References pos, and window().

Referenced by QXcbKeyboard::handleKeyEvent().

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

◆ handleEnterEvent()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleEnterEvent ( QWindow window,
const QPointF local = QPointF(),
const QPointF global = QPointF() 
)
static

Referenced by QEglFSScreen::handleCursorMove(), handleEnterLeaveEvent(), QXcbWindow::handleEnterNotifyEvent(), QtWaylandClient::QWaylandWindow::handleMouse(), QXcbWindow::hide(), QOffscreenWindow::setVisible(), and QWindowsMouseHandler::translateMouseEvent().

+ Here is the caller graph for this function:

◆ handleEnterLeaveEvent()

void QWindowSystemInterface::handleEnterLeaveEvent ( QWindow enter,
QWindow leave,
const QPointF local = QPointF(),
const QPointF global = QPointF() 
)
static

This method can be used to ensure leave and enter events are both in queue when moving from one QWindow to another.

This allows QWindow subclasses to check for a queued enter event when handling the leave event (QWindowSystemInterfacePrivate::peekWindowSystemEvent) to determine where mouse went and act accordingly. E.g. QWidgetWindow needs to know if mouse cursor moves between windows in same window hierarchy.

Definition at line 237 of file qwindowsysteminterface.cpp.

References global, handleEnterEvent(), and leave.

Referenced by QEglFSScreen::handleCursorMove(), QXcbWindow::handleLeaveNotifyEvent(), and QOffscreenCursor::setPos().

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

◆ handleExposeEvent()

◆ handleExtendedKeyEvent() [1/3]

bool QWindowSystemInterface::handleExtendedKeyEvent ( QWindow window,
QEvent::Type  type,
int  key,
Qt::KeyboardModifiers  modifiers,
quint32  nativeScanCode,
quint32  nativeVirtualKey,
quint32  nativeModifiers,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

Definition at line 476 of file qwindowsysteminterface.cpp.

References QElapsedTimer::elapsed(), QWindowSystemInterfacePrivate::eventTime, text, time, and window().

Referenced by QXcbKeyboard::handleKeyEvent(), QQnxScreenEventHandler::injectKeyboardEvent(), QLibInputKeyboard::processKey(), QBsdKeyboardHandler::processKeyEvent(), sendExtendedPressRelease(), and QtWaylandClient::QWaylandQtKeyExtension::zqt_key_v1_key().

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

◆ handleExtendedKeyEvent() [2/3]

static bool QWindowSystemInterface::handleExtendedKeyEvent ( QWindow window,
ulong  timestamp,
const QInputDevice device,
QEvent::Type  type,
int  key,
Qt::KeyboardModifiers  modifiers,
quint32  nativeScanCode,
quint32  nativeVirtualKey,
quint32  nativeModifiers,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

◆ handleExtendedKeyEvent() [3/3]

bool QWindowSystemInterface::handleExtendedKeyEvent ( QWindow window,
ulong  timestamp,
QEvent::Type  type,
int  key,
Qt::KeyboardModifiers  modifiers,
quint32  nativeScanCode,
quint32  nativeVirtualKey,
quint32  nativeModifiers,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

Definition at line 487 of file qwindowsysteminterface.cpp.

References text, and window().

+ Here is the call graph for this function:

◆ handleFileOpenEvent() [1/2]

void QWindowSystemInterface::handleFileOpenEvent ( const QString fileName)
static

Definition at line 869 of file qwindowsysteminterface.cpp.

References e, fileName, and QGuiApplicationPrivate::processWindowSystemEvent().

+ Here is the call graph for this function:

◆ handleFileOpenEvent() [2/2]

void QWindowSystemInterface::handleFileOpenEvent ( const QUrl url)
static

Definition at line 875 of file qwindowsysteminterface.cpp.

References e, QGuiApplicationPrivate::processWindowSystemEvent(), and url.

+ Here is the call graph for this function:

◆ handleGeometryChange()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleGeometryChange ( QWindow window,
const QRect newRect 
)
static

◆ handleGestureEvent()

bool QWindowSystemInterface::handleGestureEvent ( QWindow window,
ulong  timestamp,
const QPointingDevice device,
Qt::NativeGestureType  type,
const QPointF local,
const QPointF global,
int  fingerCount = 0 
)
static

Definition at line 996 of file qwindowsysteminterface.cpp.

References device, global, and window().

Referenced by QtWaylandClient::QWaylandWindow::handlePinchGesture(), and QtWaylandClient::QWaylandWindow::handleSwipeGesture().

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

◆ handleGestureEventWithRealValue()

bool QWindowSystemInterface::handleGestureEventWithRealValue ( QWindow window,
ulong  timestamp,
const QPointingDevice device,
Qt::NativeGestureType  type,
qreal  value,
const QPointF local,
const QPointF global,
int  fingerCount = 2 
)
static

Definition at line 1002 of file qwindowsysteminterface.cpp.

References device, global, and window().

Referenced by QtWaylandClient::QWaylandWindow::handlePinchGesture().

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

◆ handleGestureEventWithValueAndDelta()

bool QWindowSystemInterface::handleGestureEventWithValueAndDelta ( QWindow window,
ulong  timestamp,
const QPointingDevice device,
Qt::NativeGestureType  type,
qreal  value,
const QPointF delta,
const QPointF local,
const QPointF global,
int  fingerCount = 2 
)
static

Definition at line 1008 of file qwindowsysteminterface.cpp.

References device, QHighDpi::fromNativeGlobalPosition(), QHighDpi::fromNativeLocalPosition(), global, and window().

Referenced by QtWaylandClient::QWaylandWindow::handlePinchGesture(), and QtWaylandClient::QWaylandWindow::handleSwipeGesture().

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

◆ handleKeyEvent() [1/2]

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleKeyEvent ( QWindow window,
QEvent::Type  t,
int  k,
Qt::KeyboardModifiers  mods,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

◆ handleKeyEvent() [2/2]

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleKeyEvent ( QWindow window,
ulong  timestamp,
QEvent::Type  t,
int  k,
Qt::KeyboardModifiers  mods,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

◆ handleLeaveEvent()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleLeaveEvent ( QWindow window)
static

Referenced by QEglFSScreen::handleCursorMove(), QXcbWindow::handleLeaveNotifyEvent(), QtWaylandClient::QWaylandWindow::handleMouse(), QWindowsMouseHandler::translateMouseEvent(), and QWindowsPointerHandler::translateMouseEvent().

+ Here is the caller graph for this function:

◆ handleMouseEvent() [1/4]

◆ handleMouseEvent() [2/4]

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleMouseEvent ( QWindow window,
const QPointingDevice device,
const QPointF local,
const QPointF global,
Qt::MouseButtons  state,
Qt::MouseButton  button,
QEvent::Type  type,
Qt::KeyboardModifiers  mods = Qt::NoModifier,
Qt::MouseEventSource  source = Qt::MouseEventNotSynthesized 
)
static

◆ handleMouseEvent() [3/4]

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleMouseEvent ( QWindow window,
ulong  timestamp,
const QPointF local,
const QPointF global,
Qt::MouseButtons  state,
Qt::MouseButton  button,
QEvent::Type  type,
Qt::KeyboardModifiers  mods = Qt::NoModifier,
Qt::MouseEventSource  source = Qt::MouseEventNotSynthesized 
)
static

◆ handleMouseEvent() [4/4]

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleMouseEvent ( QWindow window,
ulong  timestamp,
const QPointingDevice device,
const QPointF local,
const QPointF global,
Qt::MouseButtons  state,
Qt::MouseButton  button,
QEvent::Type  type,
Qt::KeyboardModifiers  mods = Qt::NoModifier,
Qt::MouseEventSource  source = Qt::MouseEventNotSynthesized 
)
static

◆ handleNativeEvent()

bool QWindowSystemInterface::handleNativeEvent ( QWindow window,
const QByteArray eventType,
void message,
qintptr result 
)
static

Passes a native event identified by eventType to the window.

Note
This function can only be called from the GUI thread.

Definition at line 864 of file qwindowsysteminterface.cpp.

References QGuiApplicationPrivate::processNativeEvent(), and window().

Referenced by QXcbWindow::handleNativeEvent().

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

◆ handlePaintEvent()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handlePaintEvent ( QWindow window,
const QRegion region 
)
static

◆ handlePlatformPanelEvent()

void QWindowSystemInterface::handlePlatformPanelEvent ( QWindow window)
static

Definition at line 1020 of file qwindowsysteminterface.cpp.

◆ handlePrimaryScreenChanged()

void QWindowSystemInterface::handlePrimaryScreenChanged ( QPlatformScreen newPrimary)
static

Should be called whenever the primary screen changes.

When the screen specified as primary changes, this method will notify QGuiApplication and emit the QGuiApplication::primaryScreenChanged signal.

Definition at line 791 of file qwindowsysteminterface.cpp.

References emit, QListSpecialMethodsBase< T >::indexOf(), Q_ASSERT, qGuiApp, QPlatformScreen::screen(), QGuiApplicationPrivate::screen_list, and QList< T >::swapItemsAt().

Referenced by QWasmIntegration::removeContainerElement(), and QWasmIntegration::setContainerElements().

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

◆ handleSafeAreaMarginsChanged()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleSafeAreaMarginsChanged ( QWindow window)
static

◆ handleScreenAdded()

void QWindowSystemInterface::handleScreenAdded ( QPlatformScreen platformScreen,
bool  isPrimary = false 
)
static

Should be called by the implementation whenever a new screen is added.

The first screen added will be the primary screen, used for default-created windows, GL contexts, and other resources unless otherwise specified.

This adds the screen to QGuiApplication::screens(), and emits the QGuiApplication::screenAdded() signal.

The screen should be deleted by calling QWindowSystemInterface::handleScreenRemoved().

Definition at line 714 of file qwindowsysteminterface.cpp.

References QList< T >::append(), emit, QList< T >::prepend(), qGuiApp, QGuiApplicationPrivate::resetCachedDevicePixelRatio(), screen, QGuiApplicationPrivate::screen_list, and QHighDpiScaling::updateHighDpiScaling().

Referenced by QAndroidPlatformIntegration::QAndroidPlatformIntegration(), QHaikuIntegration::QHaikuIntegration(), QMinimalEglIntegration::QMinimalEglIntegration(), QMinimalIntegration::QMinimalIntegration(), QWasmIntegration::addContainerElement(), QQnxIntegration::createDisplay(), QtWaylandClient::QWaylandDisplay::ensureScreen(), QAndroidPlatformIntegration::handleScreenAdded(), QWindowsScreenManager::handleScreenChanges(), QtWaylandClient::QWaylandDisplay::handleScreenInitialized(), QBsdFbIntegration::initialize(), QEglFSIntegration::initialize(), QIntegrityFbIntegration::initialize(), QIOSIntegration::initialize(), QLinuxFbIntegration::initialize(), QVkKhrDisplayIntegration::initialize(), QVncIntegration::initialize(), QDirectFbIntegration::initializeScreen(), QEglFSKmsDevice::registerScreen(), QEglFSEmulatorIntegration::screenInit(), QOffscreenIntegration::setConfiguration(), and QWasmIntegration::setContainerElements().

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

◆ handleScreenGeometryChange()

void QWindowSystemInterface::handleScreenGeometryChange ( QScreen screen,
const QRect newGeometry,
const QRect newAvailableGeometry 
)
static

◆ handleScreenLogicalDotsPerInchChange()

void QWindowSystemInterface::handleScreenLogicalDotsPerInchChange ( QScreen screen,
qreal  newDpiX,
qreal  newDpiY 
)
static

Definition at line 815 of file qwindowsysteminterface.cpp.

References QPlatformScreen::overrideDpi(), and screen.

Referenced by QXcbVirtualDesktop::QXcbVirtualDesktop(), QWindowsScreen::handleChanges(), QXcbVirtualDesktop::handleScreenChange(), QOffscreenIntegration::setConfiguration(), and QWasmIntegration::updateDpi().

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

◆ handleScreenOrientationChange()

void QWindowSystemInterface::handleScreenOrientationChange ( QScreen screen,
Qt::ScreenOrientation  newOrientation 
)
static

Definition at line 803 of file qwindowsysteminterface.cpp.

References screen.

Referenced by QWindowsScreen::handleChanges(), QAndroidPlatformScreen::setOrientation(), QQnxScreen::setRotation(), QXcbScreen::updateGeometry(), QtWaylandClient::QWaylandScreen::updateOutputProperties(), and QIOSScreen::updateProperties().

+ Here is the caller graph for this function:

◆ handleScreenRefreshRateChange()

void QWindowSystemInterface::handleScreenRefreshRateChange ( QScreen screen,
qreal  newRefreshRate 
)
static

Definition at line 822 of file qwindowsysteminterface.cpp.

References screen.

Referenced by QAndroidPlatformScreen::setRefreshRate(), QtWaylandClient::QWaylandScreen::updateOutputProperties(), and QXcbScreen::updateRefreshRate().

+ Here is the caller graph for this function:

◆ handleScreenRemoved()

void QWindowSystemInterface::handleScreenRemoved ( QPlatformScreen platformScreen)
static

Should be called by the implementation whenever a screen is removed.

This removes the screen from QGuiApplication::screens(), and deletes it.

Failing to call this and manually deleting the QPlatformScreen instead may lead to a crash due to a pure virtual call.

Definition at line 741 of file qwindowsysteminterface.cpp.

References QGuiApplication::allWindows(), QCoreApplication::closingDown(), QListSpecialMethodsBase< T >::contains(), emit, QScreen::handle(), QGuiApplication::primaryScreen, qApp, qGuiApp, QList< T >::removeOne(), QGuiApplicationPrivate::resetCachedDevicePixelRatio(), QPlatformScreen::screen(), screen, QGuiApplicationPrivate::screen_list, QPlatformScreen::virtualSiblings(), and window().

Referenced by QBsdFbIntegration::~QBsdFbIntegration(), QHaikuIntegration::~QHaikuIntegration(), QIntegrityFbIntegration::~QIntegrityFbIntegration(), QIOSIntegration::~QIOSIntegration(), QLinuxFbIntegration::~QLinuxFbIntegration(), QMinimalEglIntegration::~QMinimalEglIntegration(), QMinimalIntegration::~QMinimalIntegration(), QOffscreenIntegration::~QOffscreenIntegration(), QVkKhrDisplayIntegration::~QVkKhrDisplayIntegration(), QVncIntegration::~QVncIntegration(), QtWaylandClient::QWaylandDisplay::~QWaylandDisplay(), QXcbConnection::~QXcbConnection(), QWindowsScreenManager::clearScreens(), QWasmScreen::deleteScreen(), QtWaylandClient::QWaylandDisplay::handleScreenInitialized(), QAndroidPlatformIntegration::handleScreenRemoved(), QtWaylandClient::QWaylandDisplay::registry_global_remove(), QQnxIntegration::removeDisplay(), QEglFSDeviceIntegration::screenDestroy(), and QOffscreenIntegration::setConfiguration().

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

◆ handleShortcutEvent()

bool QWindowSystemInterface::handleShortcutEvent ( QWindow window,
ulong  timestamp,
int  k,
Qt::KeyboardModifiers  mods,
quint32  nativeScanCode,
quint32  nativeVirtualKey,
quint32  nativeModifiers,
const QString text = QString(),
bool  autorep = false,
ushort  count = 1 
)
static

Definition at line 422 of file qwindowsysteminterface.cpp.

References QGuiApplication::focusWindow(), QGuiApplicationPrivate::instance(), QKeySequence::NoMatch, Q_UNUSED, QEvent::ShortcutOverride, QShortcutMap::state(), text, QShortcutMap::tryShortcut(), and window().

Referenced by QGuiApplicationPrivate::processKeyEvent(), and qt_handleKeyEvent().

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

◆ handleTabletEnterLeaveProximityEvent() [1/2]

bool QWindowSystemInterface::handleTabletEnterLeaveProximityEvent ( QWindow window,
const QPointingDevice device,
bool  inProximity,
const QPointF local = QPointF(),
const QPointF global = QPointF(),
Qt::MouseButtons  buttons = {},
int  xTilt = 0,
int  yTilt = 0,
qreal  tangentialPressure = 0,
qreal  rotation = 0,
int  z = 0,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)
static

Definition at line 954 of file qwindowsysteminterface.cpp.

References device, QElapsedTimer::elapsed(), QWindowSystemInterfacePrivate::eventTime, global, time, and window().

+ Here is the call graph for this function:

◆ handleTabletEnterLeaveProximityEvent() [2/2]

bool QWindowSystemInterface::handleTabletEnterLeaveProximityEvent ( QWindow window,
ulong  timestamp,
const QPointingDevice device,
bool  inProximity,
const QPointF local = QPointF(),
const QPointF global = QPointF(),
Qt::MouseButtons  buttons = {},
int  xTilt = 0,
int  yTilt = 0,
qreal  tangentialPressure = 0,
qreal  rotation = 0,
int  z = 0,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)
static

Definition at line 933 of file qwindowsysteminterface.cpp.

References device, global, Q_UNUSED, and window().

Referenced by QtWaylandClient::QWaylandTabletToolV2::zwp_tablet_tool_v2_frame().

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

◆ handleTabletEnterProximityEvent() [1/2]

void QWindowSystemInterface::handleTabletEnterProximityEvent ( int  deviceType,
int  pointerType,
qint64  uid 
)
static

Definition at line 975 of file qwindowsysteminterface.cpp.

References deviceType(), QElapsedTimer::elapsed(), QWindowSystemInterfacePrivate::eventTime, pointerType(), and time.

+ Here is the call graph for this function:

◆ handleTabletEnterProximityEvent() [2/2]

bool QWindowSystemInterface::handleTabletEnterProximityEvent ( ulong  timestamp,
int  deviceType,
int  pointerType,
qint64  uid 
)
static

Definition at line 967 of file qwindowsysteminterface.cpp.

References device, deviceType(), QPointingDeviceUniqueId::fromNumericId(), pointerType(), and QPointingDevicePrivate::tabletDevice().

Referenced by QEvdevTabletData::report().

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

◆ handleTabletEvent() [1/4]

bool QWindowSystemInterface::handleTabletEvent ( QWindow window,
const QPointF local,
const QPointF global,
int  device,
int  pointerType,
Qt::MouseButtons  buttons,
qreal  pressure,
int  xTilt,
int  yTilt,
qreal  tangentialPressure,
qreal  rotation,
int  z,
qint64  uid,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)
static

Definition at line 923 of file qwindowsysteminterface.cpp.

References device, QElapsedTimer::elapsed(), QWindowSystemInterfacePrivate::eventTime, global, pointerType(), time, and window().

+ Here is the call graph for this function:

◆ handleTabletEvent() [2/4]

bool QWindowSystemInterface::handleTabletEvent ( QWindow window,
const QPointingDevice device,
const QPointF local,
const QPointF global,
Qt::MouseButtons  buttons,
qreal  pressure,
int  xTilt,
int  yTilt,
qreal  tangentialPressure,
qreal  rotation,
int  z,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)
static

Definition at line 900 of file qwindowsysteminterface.cpp.

References device, QElapsedTimer::elapsed(), QWindowSystemInterfacePrivate::eventTime, global, time, and window().

+ Here is the call graph for this function:

◆ handleTabletEvent() [3/4]

bool QWindowSystemInterface::handleTabletEvent ( QWindow window,
ulong  timestamp,
const QPointF local,
const QPointF global,
int  device,
int  pointerType,
Qt::MouseButtons  buttons,
qreal  pressure,
int  xTilt,
int  yTilt,
qreal  tangentialPressure,
qreal  rotation,
int  z,
qint64  uid,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)
static

Definition at line 912 of file qwindowsysteminterface.cpp.

References device, QPointingDeviceUniqueId::fromNumericId(), global, pointerType(), QPointingDevicePrivate::tabletDevice(), and window().

+ Here is the call graph for this function:

◆ handleTabletEvent() [4/4]

bool QWindowSystemInterface::handleTabletEvent ( QWindow window,
ulong  timestamp,
const QPointingDevice device,
const QPointF local,
const QPointF global,
Qt::MouseButtons  buttons,
qreal  pressure,
int  xTilt,
int  yTilt,
qreal  tangentialPressure,
qreal  rotation,
int  z,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)
static

Definition at line 886 of file qwindowsysteminterface.cpp.

References device, QHighDpi::fromNativeGlobalPosition(), QHighDpi::fromNativeLocalPosition(), global, and window().

Referenced by QQuickTest::pointerMove(), QQuickTest::pointerPress(), QQuickTest::pointerRelease(), QEvdevTabletData::report(), QtAndroidInput::tabletEvent(), QWindowsTabletSupport::translateTabletPacketEvent(), and QtWaylandClient::QWaylandTabletToolV2::zwp_tablet_tool_v2_frame().

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

◆ handleTabletLeaveProximityEvent() [1/2]

void QWindowSystemInterface::handleTabletLeaveProximityEvent ( int  deviceType,
int  pointerType,
qint64  uid 
)
static

Definition at line 989 of file qwindowsysteminterface.cpp.

References deviceType(), QElapsedTimer::elapsed(), QWindowSystemInterfacePrivate::eventTime, pointerType(), and time.

+ Here is the call graph for this function:

◆ handleTabletLeaveProximityEvent() [2/2]

bool QWindowSystemInterface::handleTabletLeaveProximityEvent ( ulong  timestamp,
int  deviceType,
int  pointerType,
qint64  uid 
)
static

Definition at line 981 of file qwindowsysteminterface.cpp.

References device, deviceType(), QPointingDeviceUniqueId::fromNumericId(), pointerType(), and QPointingDevicePrivate::tabletDevice().

Referenced by QEvdevTabletData::report().

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

◆ handleThemeChange()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleThemeChange ( QWindow window = nullptr)
static

Referenced by QGtk3Theme::QGtk3Theme(), QGtk3Storage::handleThemeChange(), QXcbIntegration::initialize(), QAndroidPlatformTheme::updateColorScheme(), QWindowsContext::windowsProc(), and QWindowsTheme::windowsThemeChanged().

+ Here is the caller graph for this function:

◆ handleTouchCancelEvent() [1/2]

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleTouchCancelEvent ( QWindow window,
const QPointingDevice device,
Qt::KeyboardModifiers  mods = Qt::NoModifier 
)
static

Referenced by QLibInputTouch::processTouchCancel(), and QtAndroidInput::touchCancel().

+ Here is the caller graph for this function:

◆ handleTouchCancelEvent() [2/2]

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleTouchCancelEvent ( QWindow window,
ulong  timestamp,
const QPointingDevice device,
Qt::KeyboardModifiers  mods = Qt::NoModifier 
)
static

◆ handleTouchEvent() [1/2]

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleTouchEvent ( QWindow window,
const QPointingDevice device,
const QList< struct TouchPoint > &  points,
Qt::KeyboardModifiers  mods = Qt::NoModifier 
)
static

Referenced by QLibInputTouch::processTouchFrame(), QEvdevTouchScreenData::reportPoints(), QtAndroidInput::touchEnd(), and QWindowsMouseHandler::translateTouchEvent().

+ Here is the caller graph for this function:

◆ handleTouchEvent() [2/2]

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static bool QWindowSystemInterface::handleTouchEvent ( QWindow window,
ulong  timestamp,
const QPointingDevice device,
const QList< struct TouchPoint > &  points,
Qt::KeyboardModifiers  mods = Qt::NoModifier 
)
static

◆ handleWheelEvent() [1/3]

bool QWindowSystemInterface::handleWheelEvent ( QWindow window,
const QPointF local,
const QPointF global,
QPoint  pixelDelta,
QPoint  angleDelta,
Qt::KeyboardModifiers  mods = Qt::NoModifier,
Qt::ScrollPhase  phase = Qt::NoScrollPhase,
Qt::MouseEventSource  source = Qt::MouseEventNotSynthesized 
)
static

Definition at line 498 of file qwindowsysteminterface.cpp.

References QElapsedTimer::elapsed(), QWindowSystemInterfacePrivate::eventTime, global, time, and window().

Referenced by QXcbWindow::handleButtonPressEvent(), QtWaylandClient::QWaylandWindow::handleMouse(), QEvdevMouseManager::handleWheelEvent(), QtAndroidInput::mouseWheel(), QLibInputPointer::processAxis(), and redirectWheelEvent().

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

◆ handleWheelEvent() [2/3]

bool QWindowSystemInterface::handleWheelEvent ( QWindow window,
ulong  timestamp,
const QPointF local,
const QPointF global,
QPoint  pixelDelta,
QPoint  angleDelta,
Qt::KeyboardModifiers  mods = Qt::NoModifier,
Qt::ScrollPhase  phase = Qt::NoScrollPhase,
Qt::MouseEventSource  source = Qt::MouseEventNotSynthesized,
bool  inverted = false 
)
static

Definition at line 504 of file qwindowsysteminterface.cpp.

References global, QPointingDevice::primaryPointingDevice(), and window().

+ Here is the call graph for this function:

◆ handleWheelEvent() [3/3]

bool QWindowSystemInterface::handleWheelEvent ( QWindow window,
ulong  timestamp,
const QPointingDevice device,
const QPointF local,
const QPointF global,
QPoint  pixelDelta,
QPoint  angleDelta,
Qt::KeyboardModifiers  mods = Qt::NoModifier,
Qt::ScrollPhase  phase = Qt::NoScrollPhase,
Qt::MouseEventSource  source = Qt::MouseEventNotSynthesized,
bool  inverted = false 
)
static

Definition at line 511 of file qwindowsysteminterface.cpp.

References device, QHighDpi::fromNativeGlobalPosition(), QHighDpi::fromNativeLocalPosition(), global, Qt::Horizontal, QPoint::isNull(), Qt::ScrollUpdate, Qt::Vertical, window(), QPoint::x(), and QPoint::y().

+ Here is the call graph for this function:

◆ handleWindowActivated()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleWindowActivated ( QWindow window,
Qt::FocusReason  r = Qt::OtherFocusReason 
)
static

◆ handleWindowDevicePixelRatioChanged()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleWindowDevicePixelRatioChanged ( QWindow window)
static

◆ handleWindowScreenChanged()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleWindowScreenChanged ( QWindow window,
QScreen newScreen 
)
static

Referenced by QXcbWindow::create(), QCocoaWindow::createNSWindow(), QXcbWindow::handleConfigureNotifyEvent(), and QXcbWindow::setGeometry().

+ Here is the caller graph for this function:

◆ handleWindowStateChanged()

template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
static void QWindowSystemInterface::handleWindowStateChanged ( QWindow window,
Qt::WindowStates  newState,
int  oldState = -1 
)
static

Referenced by QtWaylandClient::QWaylandQtSurface::applyConfigure(), QXcbWindow::handlePropertyNotifyEvent(), QtWaylandClient::QWaylandWindow::handleWindowStatesChanged(), QIOSWindow::setGeometry(), QOffscreenWindow::setWindowState(), and QQnxScreen::windowGroupStateChanged().

+ Here is the caller graph for this function:

◆ nonUserInputEventsQueued()

bool QWindowSystemInterface::nonUserInputEventsQueued ( )
static

Definition at line 1134 of file qwindowsysteminterface.cpp.

References QWindowSystemInterfacePrivate::nonUserInputEventsQueued().

+ Here is the call graph for this function:

◆ registerInputDevice()

void QWindowSystemInterface::registerInputDevice ( const QInputDevice device)
static

Register a new input device.

It is expected that every platform plugin will discover available input devices at startup, and whenever a new device is plugged in, if possible. If that's not possible, then it at least must call this function before sending an event whose QInputEvent::source() is this device.

When a device is unplugged, the platform plugin should destroy the corresponding QInputDevice instance. There is no unregisterInputDevice() function, because it's enough for the destructor to call QInputDevicePrivate::unregisterDevice(); while other parts of Qt can connect to the QObject::destroyed() signal to be notified when a device is unplugged or otherwise destroyed.

Definition at line 577 of file qwindowsysteminterface.cpp.

References device, qCDebug, and QInputDevicePrivate::registerDevice().

Referenced by QAndroidPlatformIntegration::QAndroidPlatformIntegration(), QCocoaIntegration::QCocoaIntegration(), QQnxScreenEventHandler::QQnxScreenEventHandler(), QTuioHandler::QTuioHandler(), QWasmScreen::QWasmScreen(), createInputDevice(), QTest::createTouchDevice(), QtAndroidInput::getTouchDevice(), QCocoaTouch::getTouchDevice(), QIOSIntegration::initialize(), QNSView(Mouse)::initMouse, QWindowsContext::initTouch(), QLibInputTouch::registerDevice(), QtWaylandClient::QWaylandInputDevice::seat_capabilities(), QtWaylandClient::QWaylandTabletPadV2::zwp_tablet_pad_v2_done(), QtWaylandClient::QWaylandTabletToolV2::zwp_tablet_tool_v2_done(), and QtWaylandClient::QWaylandTabletV2::zwp_tablet_v2_done().

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

◆ sendWindowSystemEvents()

◆ setSynchronousWindowSystemEvents()

void QWindowSystemInterface::setSynchronousWindowSystemEvents ( bool  enable)
static

Definition at line 1124 of file qwindowsysteminterface.cpp.

References QWindowSystemInterfacePrivate::synchronousWindowSystemEvents.

Referenced by QIOSEventDispatcher::QIOSEventDispatcher(), QWasmCompositor::QWasmCompositor(), and QOffscreenIntegration::setConfiguration().

+ Here is the caller graph for this function:

◆ windowSystemEventsQueued()

int QWindowSystemInterface::windowSystemEventsQueued ( )
static

Definition at line 1129 of file qwindowsysteminterface.cpp.

References QWindowSystemInterfacePrivate::windowSystemEventsQueued().

+ Here is the call graph for this function:

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