![]() |
Qt 6.x
The Qt SDK
|
#include <qwindowsysteminterface_p.h>
Classes | |
class | ActivatedWindowEvent |
class | ApplicationStateChangedEvent |
class | CloseEvent |
class | ContextMenuEvent |
class | EnterEvent |
class | ExposeEvent |
class | FileOpenEvent |
class | FlushEventsEvent |
class | GeometryChangeEvent |
class | GestureEvent |
class | InputEvent |
class | KeyEvent |
class | LeaveEvent |
class | MouseEvent |
class | PaintEvent |
class | PlatformPanelEvent |
class | PointerEvent |
class | SafeAreaMarginsChangedEvent |
class | ScreenGeometryEvent |
class | ScreenLogicalDotsPerInchEvent |
class | ScreenOrientationEvent |
class | ScreenRefreshRateEvent |
class | TabletEnterProximityEvent |
class | TabletEvent |
class | TabletLeaveProximityEvent |
class | ThemeChangeEvent |
class | TouchEvent |
class | UserEvent |
class | WheelEvent |
class | WindowDevicePixelRatioChangedEvent |
class | WindowScreenChangedEvent |
class | WindowStateChangedEvent |
class | WindowSystemEvent |
class | WindowSystemEventList |
Public Types | |
enum | EventType { UserInputEvent = 0x100 , Close = UserInputEvent | 0x01 , GeometryChange = 0x02 , Enter = UserInputEvent | 0x03 , Leave = UserInputEvent | 0x04 , ActivatedWindow = 0x05 , WindowStateChanged = 0x06 , Mouse = UserInputEvent | 0x07 , Wheel = UserInputEvent | 0x09 , Key = UserInputEvent | 0x0a , Touch = UserInputEvent | 0x0b , ScreenOrientation = 0x0c , ScreenGeometry = 0x0d , ScreenAvailableGeometry = 0x0e , ScreenLogicalDotsPerInch = 0x0f , ScreenRefreshRate = 0x10 , ThemeChange = 0x11 , Expose = 0x12 , FileOpen = UserInputEvent | 0x13 , Tablet = UserInputEvent | 0x14 , TabletEnterProximity = UserInputEvent | 0x15 , TabletLeaveProximity = UserInputEvent | 0x16 , PlatformPanel = UserInputEvent | 0x17 , ContextMenu = UserInputEvent | 0x18 , EnterWhatsThisMode = UserInputEvent | 0x19 , Gesture = UserInputEvent | 0x1a , ApplicationStateChanged = 0x19 , FlushEvents = 0x20 , WindowScreenChanged = 0x21 , SafeAreaMarginsChanged = 0x22 , ApplicationTermination = 0x23 , Paint = 0x24 , WindowDevicePixelRatioChanged = 0x25 } |
Static Public Member Functions | |
static qsizetype | windowSystemEventsQueued () |
static bool | nonUserInputEventsQueued () |
static WindowSystemEvent * | getWindowSystemEvent () |
static WindowSystemEvent * | getNonUserInputWindowSystemEvent () |
static WindowSystemEvent * | peekWindowSystemEvent (EventType t) |
static void | removeWindowSystemEvent (WindowSystemEvent *event) |
static QList< QEventPoint > | fromNativeTouchPoints (const QList< QWindowSystemInterface::TouchPoint > &points, const QWindow *window, QEvent::Type *type=nullptr) |
template<class EventPointList > | |
static QList< QWindowSystemInterface::TouchPoint > | toNativeTouchPoints (const EventPointList &pointList, const QWindow *window) |
static QWindowSystemInterface::TouchPoint | toNativeTouchPoint (const QEventPoint &point, const QWindow *window) |
static void | installWindowSystemEventHandler (QWindowSystemEventHandler *handler) |
static void | removeWindowSystemEventhandler (QWindowSystemEventHandler *handler) |
Static Public Attributes | |
static WindowSystemEventList | windowSystemEventQueue |
static QElapsedTimer | eventTime |
static bool | synchronousWindowSystemEvents = false |
static bool | platformFiltersEvents |
static QWaitCondition | eventsFlushed |
static QMutex | flushEventMutex |
static QAtomicInt | eventAccepted |
static QWindowSystemEventHandler * | eventHandler |
Definition at line 35 of file qwindowsysteminterface_p.h.
Definition at line 37 of file qwindowsysteminterface_p.h.
|
static |
Convert a list of \l QWindowSystemInterface::TouchPoint points to a list of temporary QEventPoint instances, scaled (but not localized) for delivery to the given window.
This is called from QWindowSystemInterface::handleTouchEvent(): that is too early to update the QEventPoint instances in QPointingDevice, because we want those to hold "current" state from the applcation's point of view. The QWindowSystemInterfacePrivate::TouchEvent, to which the returned touchpoints will "belong", might go through the queue before being processed; the application doesn't see the equivalent QTouchEvent until later on. Therefore the responsibility to update the QEventPoint instances in QPointingDevice is in QGuiApplication, not here.
QGuiApplicationPrivate::processMouseEvent() also calls this function when it synthesizes a touch event from a mouse event. But that's outside the normal use case.
It might be better if we change all the platform plugins to create temporary instances of QEventPoint directly, and remove QWindowSystemInterface::TouchPoint completely. Then we will no longer need this function either. But that's only possible as long as QEventPoint remains a Q_GADGET, not a QObject, so that it continues to be small and suitable for temporary stack allocation. QEventPoint is a little bigger than QWindowSystemInterface::TouchPoint, though.
Definition at line 611 of file qwindowsysteminterface.cpp.
References QList< T >::append(), QHighDpi::fromNativePixels(), QPointingDeviceUniqueId::fromNumericId(), QEventPoint::Pressed, QEventPoint::Released, QList< T >::reserve(), QEvent::TouchBegin, QEvent::TouchEnd, QEvent::TouchUpdate, and window().
Referenced by QGuiApplicationPrivate::processMouseEvent(), and QT_DEFINE_QPA_EVENT_HANDLER().
|
static |
Definition at line 156 of file qwindowsysteminterface.cpp.
References QWindowSystemInterfacePrivate::WindowSystemEventList::takeFirstNonUserInputOrReturnNull(), and windowSystemEventQueue.
Referenced by QWindowSystemInterface::sendWindowSystemEvents().
|
static |
Definition at line 151 of file qwindowsysteminterface.cpp.
References QWindowSystemInterfacePrivate::WindowSystemEventList::takeFirstOrReturnNull(), and windowSystemEventQueue.
Referenced by QWindowSystemInterface::sendWindowSystemEvents().
|
static |
Definition at line 171 of file qwindowsysteminterface.cpp.
References eventHandler.
Referenced by QWaylandCompositorPrivate::QWaylandCompositorPrivate().
|
static |
Definition at line 146 of file qwindowsysteminterface.cpp.
References QWindowSystemInterfacePrivate::WindowSystemEventList::nonUserInputEventsQueued(), and windowSystemEventQueue.
Referenced by QWindowSystemInterface::nonUserInputEventsQueued().
|
static |
Definition at line 161 of file qwindowsysteminterface.cpp.
References QWindowSystemInterfacePrivate::WindowSystemEventList::peekAtFirstOfType(), and windowSystemEventQueue.
Referenced by activeWindowChangeQueued(), and QWidgetWindow::handleEnterLeaveEvent().
|
static |
Definition at line 166 of file qwindowsysteminterface.cpp.
References QWindowSystemInterfacePrivate::WindowSystemEventList::remove(), and windowSystemEventQueue.
Referenced by QWidgetWindow::handleEnterLeaveEvent().
|
static |
Definition at line 177 of file qwindowsysteminterface.cpp.
References eventHandler.
Referenced by QWindowSystemEventHandler::~QWindowSystemEventHandler().
|
static |
Definition at line 651 of file qwindowsysteminterface.cpp.
References area(), QEventPoint::ellipseDiameters, QEventPoint::globalPosition, QEventPoint::id, QEventPoint::pressure, QEventPoint::state, QHighDpi::toNativePixels(), QEventPoint::velocity, and window().
|
inlinestatic |
Definition at line 524 of file qwindowsysteminterface_p.h.
References QList< T >::append(), QList< T >::reserve(), and window().
Referenced by qt_handleTouchEventv2().
|
static |
Definition at line 141 of file qwindowsysteminterface.cpp.
References QWindowSystemInterfacePrivate::WindowSystemEventList::count(), and windowSystemEventQueue.
Referenced by QWindowSystemInterface::sendWindowSystemEvents(), and QWindowSystemInterface::windowSystemEventsQueued().
|
static |
Definition at line 517 of file qwindowsysteminterface_p.h.
Referenced by QWindowSystemInterface::flushWindowSystemEvents(), and QWindowSystemInterface::sendWindowSystemEvents().
|
static |
Definition at line 538 of file qwindowsysteminterface_p.h.
Referenced by QWindowSystemHelper< Delivery >::handleEvent(), installWindowSystemEventHandler(), removeWindowSystemEventhandler(), and QWindowSystemInterface::sendWindowSystemEvents().
|
static |
Definition at line 515 of file qwindowsysteminterface_p.h.
Referenced by QWindowSystemInterface::deferredFlushWindowSystemEvents(), and QWindowSystemInterface::flushWindowSystemEvents().
|
static |
Definition at line 511 of file qwindowsysteminterface_p.h.
Referenced by QWindowSystemInterface::handleExtendedKeyEvent(), QWindowSystemInterface::handleTabletEnterLeaveProximityEvent(), QWindowSystemInterface::handleTabletEnterProximityEvent(), QWindowSystemInterface::handleTabletEvent(), QWindowSystemInterface::handleTabletEvent(), QWindowSystemInterface::handleTabletLeaveProximityEvent(), QWindowSystemInterface::handleWheelEvent(), Q_TRACE_INSTRUMENT(), QT_DEFINE_QPA_EVENT_HANDLER(), QT_DEFINE_QPA_EVENT_HANDLER(), QT_DEFINE_QPA_EVENT_HANDLER(), QT_DEFINE_QPA_EVENT_HANDLER(), QT_DEFINE_QPA_EVENT_HANDLER(), and qt_handleKeyEvent().
|
static |
Definition at line 516 of file qwindowsysteminterface_p.h.
Referenced by QWindowSystemInterface::deferredFlushWindowSystemEvents(), and QWindowSystemInterface::flushWindowSystemEvents().
|
static |
Definition at line 513 of file qwindowsysteminterface_p.h.
|
static |
Definition at line 512 of file qwindowsysteminterface_p.h.
Referenced by QWindowSystemHelper< Delivery >::handleEvent(), and QWindowSystemInterface::setSynchronousWindowSystemEvents().
|
static |
Definition at line 501 of file qwindowsysteminterface_p.h.
Referenced by QWindowSystemInterface::flushWindowSystemEvents(), getNonUserInputWindowSystemEvent(), getWindowSystemEvent(), QWindowSystemHelper< Delivery >::handleEvent(), nonUserInputEventsQueued(), peekWindowSystemEvent(), removeWindowSystemEvent(), and windowSystemEventsQueued().