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
QWindowSystemInterfacePrivate Class Reference

#include <qwindowsysteminterface_p.h>

+ Collaboration diagram for QWindowSystemInterfacePrivate:

Classes

class  ApplicationStateChangedEvent
 
class  CloseEvent
 
class  ContextMenuEvent
 
class  EnterEvent
 
class  ExposeEvent
 
class  FileOpenEvent
 
class  FlushEventsEvent
 
class  FocusWindowEvent
 
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 , FocusWindow = 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 WindowSystemEventgetWindowSystemEvent ()
 
static WindowSystemEventgetNonUserInputWindowSystemEvent ()
 
static WindowSystemEventpeekWindowSystemEvent (EventType t)
 
static void removeWindowSystemEvent (WindowSystemEvent *event)
 
static QList< QEventPointfromNativeTouchPoints (const QList< QWindowSystemInterface::TouchPoint > &points, const QWindow *window, QEvent::Type *type=nullptr)
 
template<class EventPointList >
static QList< QWindowSystemInterface::TouchPointtoNativeTouchPoints (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 QWindowSystemEventHandlereventHandler
 

Detailed Description

Definition at line 35 of file qwindowsysteminterface_p.h.

Member Enumeration Documentation

◆ EventType

Enumerator
UserInputEvent 
Close 
GeometryChange 
Enter 
Leave 
FocusWindow 
WindowStateChanged 
Mouse 
Wheel 
Key 
Touch 
ScreenOrientation 
ScreenGeometry 
ScreenAvailableGeometry 
ScreenLogicalDotsPerInch 
ScreenRefreshRate 
ThemeChange 
Expose 
FileOpen 
Tablet 
TabletEnterProximity 
TabletLeaveProximity 
PlatformPanel 
ContextMenu 
EnterWhatsThisMode 
Gesture 
ApplicationStateChanged 
FlushEvents 
WindowScreenChanged 
SafeAreaMarginsChanged 
ApplicationTermination 
Paint 
WindowDevicePixelRatioChanged 

Definition at line 37 of file qwindowsysteminterface_p.h.

Member Function Documentation

◆ fromNativeTouchPoints()

QList< QEventPoint > QWindowSystemInterfacePrivate::fromNativeTouchPoints ( const QList< QWindowSystemInterface::TouchPoint > & points,
const QWindow * window,
QEvent::Type * type = nullptr )
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 QHighDpi::fromNativePixels(), QPointingDeviceUniqueId::fromNumericId(), QEventPoint::Pressed, QEventPoint::Released, QEvent::TouchBegin, QEvent::TouchEnd, QEvent::TouchUpdate, and window().

Referenced by QGuiApplicationPrivate::processMouseEvent(), and QT_DEFINE_QPA_EVENT_HANDLER().

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

◆ getNonUserInputWindowSystemEvent()

QWindowSystemInterfacePrivate::WindowSystemEvent * QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent ( )
static

Definition at line 156 of file qwindowsysteminterface.cpp.

Referenced by QWindowSystemInterface::sendWindowSystemEvents().

+ Here is the caller graph for this function:

◆ getWindowSystemEvent()

QWindowSystemInterfacePrivate::WindowSystemEvent * QWindowSystemInterfacePrivate::getWindowSystemEvent ( )
static

Definition at line 151 of file qwindowsysteminterface.cpp.

Referenced by QWindowSystemInterface::sendWindowSystemEvents().

+ Here is the caller graph for this function:

◆ installWindowSystemEventHandler()

void QWindowSystemInterfacePrivate::installWindowSystemEventHandler ( QWindowSystemEventHandler * handler)
static

Definition at line 171 of file qwindowsysteminterface.cpp.

Referenced by QWaylandCompositorPrivate::QWaylandCompositorPrivate().

+ Here is the caller graph for this function:

◆ nonUserInputEventsQueued()

bool QWindowSystemInterfacePrivate::nonUserInputEventsQueued ( )
static

Definition at line 146 of file qwindowsysteminterface.cpp.

Referenced by QWindowSystemInterface::nonUserInputEventsQueued().

+ Here is the caller graph for this function:

◆ peekWindowSystemEvent()

QWindowSystemInterfacePrivate::WindowSystemEvent * QWindowSystemInterfacePrivate::peekWindowSystemEvent ( EventType t)
static

Definition at line 161 of file qwindowsysteminterface.cpp.

Referenced by focusWindowChangeQueued(), and QWidgetWindow::handleEnterLeaveEvent().

+ Here is the caller graph for this function:

◆ removeWindowSystemEvent()

void QWindowSystemInterfacePrivate::removeWindowSystemEvent ( WindowSystemEvent * event)
static

Definition at line 166 of file qwindowsysteminterface.cpp.

Referenced by QWidgetWindow::handleEnterLeaveEvent().

+ Here is the caller graph for this function:

◆ removeWindowSystemEventhandler()

void QWindowSystemInterfacePrivate::removeWindowSystemEventhandler ( QWindowSystemEventHandler * handler)
static

Definition at line 177 of file qwindowsysteminterface.cpp.

Referenced by QWindowSystemEventHandler::~QWindowSystemEventHandler().

+ Here is the caller graph for this function:

◆ toNativeTouchPoint()

QWindowSystemInterface::TouchPoint QWindowSystemInterfacePrivate::toNativeTouchPoint ( const QEventPoint & point,
const QWindow * window )
static

Definition at line 651 of file qwindowsysteminterface.cpp.

References area(), QEventPoint::ellipseDiameters, QEventPoint::globalPosition, QEventPoint::id, QWindowSystemInterface::TouchPoint::id, QEventPoint::pressure, QEventPoint::state, QHighDpi::toNativePixels(), QEventPoint::velocity, and window().

+ Here is the call graph for this function:

◆ toNativeTouchPoints()

template<class EventPointList >
static QList< QWindowSystemInterface::TouchPoint > QWindowSystemInterfacePrivate::toNativeTouchPoints ( const EventPointList & pointList,
const QWindow * window )
inlinestatic

Definition at line 524 of file qwindowsysteminterface_p.h.

References window().

Referenced by qt_handleTouchEventv2().

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

◆ windowSystemEventsQueued()

qsizetype QWindowSystemInterfacePrivate::windowSystemEventsQueued ( )
static

Definition at line 141 of file qwindowsysteminterface.cpp.

Referenced by QWindowSystemInterface::sendWindowSystemEvents(), and QWindowSystemInterface::windowSystemEventsQueued().

+ Here is the caller graph for this function:

Member Data Documentation

◆ eventAccepted

Q_CONSTINIT QAtomicInt QWindowSystemInterfacePrivate::eventAccepted
static

◆ eventHandler

QWindowSystemEventHandler * QWindowSystemInterfacePrivate::eventHandler
static

◆ eventsFlushed

QWaitCondition QWindowSystemInterfacePrivate::eventsFlushed
static

◆ eventTime

◆ flushEventMutex

Q_CONSTINIT QMutex QWindowSystemInterfacePrivate::flushEventMutex
static

◆ platformFiltersEvents

bool QWindowSystemInterfacePrivate::platformFiltersEvents
static

Definition at line 513 of file qwindowsysteminterface_p.h.

◆ synchronousWindowSystemEvents

bool QWindowSystemInterfacePrivate::synchronousWindowSystemEvents = false
static

◆ windowSystemEventQueue


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