Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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 614 of file qwindowsysteminterface.cpp.

◆ getNonUserInputWindowSystemEvent()

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

Definition at line 156 of file qwindowsysteminterface.cpp.

◆ getWindowSystemEvent()

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

Definition at line 151 of file qwindowsysteminterface.cpp.

◆ installWindowSystemEventHandler()

void QWindowSystemInterfacePrivate::installWindowSystemEventHandler ( QWindowSystemEventHandler * handler)
static

Definition at line 171 of file qwindowsysteminterface.cpp.

◆ nonUserInputEventsQueued()

bool QWindowSystemInterfacePrivate::nonUserInputEventsQueued ( )
static

Definition at line 146 of file qwindowsysteminterface.cpp.

◆ peekWindowSystemEvent()

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

Definition at line 161 of file qwindowsysteminterface.cpp.

◆ removeWindowSystemEvent()

void QWindowSystemInterfacePrivate::removeWindowSystemEvent ( WindowSystemEvent * event)
static

Definition at line 166 of file qwindowsysteminterface.cpp.

◆ removeWindowSystemEventhandler()

void QWindowSystemInterfacePrivate::removeWindowSystemEventhandler ( QWindowSystemEventHandler * handler)
static

Definition at line 177 of file qwindowsysteminterface.cpp.

◆ toNativeTouchPoint()

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

Definition at line 654 of file qwindowsysteminterface.cpp.

◆ toNativeTouchPoints()

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

Definition at line 526 of file qwindowsysteminterface_p.h.

◆ windowSystemEventsQueued()

qsizetype QWindowSystemInterfacePrivate::windowSystemEventsQueued ( )
static

Definition at line 141 of file qwindowsysteminterface.cpp.

Member Data Documentation

◆ eventAccepted

Q_CONSTINIT QAtomicInt QWindowSystemInterfacePrivate::eventAccepted
static

Definition at line 519 of file qwindowsysteminterface_p.h.

◆ eventHandler

QWindowSystemEventHandler * QWindowSystemInterfacePrivate::eventHandler
static

Definition at line 540 of file qwindowsysteminterface_p.h.

◆ eventsFlushed

QWaitCondition QWindowSystemInterfacePrivate::eventsFlushed
static

Definition at line 517 of file qwindowsysteminterface_p.h.

◆ eventTime

Q_CONSTINIT QElapsedTimer QWindowSystemInterfacePrivate::eventTime
static

Definition at line 513 of file qwindowsysteminterface_p.h.

◆ flushEventMutex

Q_CONSTINIT QMutex QWindowSystemInterfacePrivate::flushEventMutex
static

Definition at line 518 of file qwindowsysteminterface_p.h.

◆ platformFiltersEvents

bool QWindowSystemInterfacePrivate::platformFiltersEvents
static

Definition at line 515 of file qwindowsysteminterface_p.h.

◆ synchronousWindowSystemEvents

bool QWindowSystemInterfacePrivate::synchronousWindowSystemEvents = false
static

Definition at line 514 of file qwindowsysteminterface_p.h.

◆ windowSystemEventQueue

QWindowSystemInterfacePrivate::WindowSystemEventList QWindowSystemInterfacePrivate::windowSystemEventQueue
static

Definition at line 503 of file qwindowsysteminterface_p.h.


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