![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include "qwindowsysteminterface.h"#include <qpa/qplatformwindow.h>#include "qwindowsysteminterface_p.h"#include "private/qguiapplication_p.h"#include "private/qevent_p.h"#include "private/qeventpoint_p.h"#include "private/qpointingdevice_p.h"#include "private/qscreen_p.h"#include <QAbstractEventDispatcher>#include <qpa/qplatformintegration.h>#include <qdebug.h>#include "qhighdpiscaling_p.h"#include <QtCore/qscopedvaluerollback.h>#include <QtCore/private/qlocking_p.h>Go to the source code of this file.
Classes | |
| struct | QWindowSystemHelper< Delivery > |
Namespaces | |
| namespace | QTest |
| [15] | |
Macros | |
| #define | QT_DEFINE_QPA_EVENT_HANDLER(ReturnType, HandlerName, ...) |
Functions | |
| template<typename EventType, typename Delivery = QWindowSystemInterface::DefaultDelivery, typename ... Args> | |
| static bool | handleWindowSystemEvent (Args ...args) |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleEnterEvent, QWindow *window, const QPointF &local, const QPointF &global) | |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleLeaveEvent, QWindow *window) | |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleFocusWindowChanged, QWindow *window, Qt::FocusReason r) | |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleWindowStateChanged, QWindow *window, Qt::WindowStates newState, int oldState) | |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleWindowScreenChanged, QWindow *window, QScreen *screen) | |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleWindowDevicePixelRatioChanged, QWindow *window) | |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleSafeAreaMarginsChanged, QWindow *window) | |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleApplicationStateChanged, Qt::ApplicationState newState, bool forcePropagate) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleApplicationTermination) | |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleGeometryChange, QWindow *window, const QRect &newRect) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleExposeEvent, QWindow *window, const QRegion ®ion) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handlePaintEvent, QWindow *window, const QRegion ®ion) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleCloseEvent, QWindow *window) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleMouseEvent, QWindow *window, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods, Qt::MouseEventSource source) | |
| w == 0 means that the event is in global coords only, local will be ignored in this case | |
| QT_DEFINE_QPA_EVENT_HANDLER (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::MouseEventSource source) | |
| QT_DEFINE_QPA_EVENT_HANDLER (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::MouseEventSource source) | |
| QT_DEFINE_QPA_EVENT_HANDLER (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::MouseEventSource source) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleKeyEvent, QWindow *window, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text, bool autorep, ushort count) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleKeyEvent, QWindow *window, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text, bool autorep, ushort count) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleTouchEvent, QWindow *window, const QPointingDevice *device, const QList< TouchPoint > &points, Qt::KeyboardModifiers mods) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleTouchEvent, QWindow *window, ulong timestamp, const QPointingDevice *device, const QList< TouchPoint > &points, Qt::KeyboardModifiers mods) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleTouchCancelEvent, QWindow *window, const QPointingDevice *device, Qt::KeyboardModifiers mods) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleTouchCancelEvent, QWindow *window, ulong timestamp, const QPointingDevice *device, Qt::KeyboardModifiers mods) | |
| QT_DEFINE_QPA_EVENT_HANDLER (void, handleThemeChange) | |
| QT_DEFINE_QPA_EVENT_HANDLER (bool, handleContextMenuEvent, QWindow *window, bool mouseTriggered, const QPoint &pos, const QPoint &globalPos, Qt::KeyboardModifiers modifiers) | |
| Q_GUI_EXPORT QDebug | operator<< (QDebug dbg, const QWindowSystemInterface::TouchPoint &p) |
| Q_GUI_EXPORT void | qt_handleMouseEvent (QWindow *window, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods, int timestamp) |
| Q_GUI_EXPORT void | qt_handleKeyEvent (QWindow *window, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1) |
| Q_GUI_EXPORT bool | qt_sendShortcutOverrideEvent (QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1) |
| Q_GUI_EXPORT void | qt_handleWheelEvent (QWindow *window, const QPointF &local, const QPointF &global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase) |
| Q_GUI_EXPORT QPointingDevice * | QTest::createTouchDevice (QInputDevice::DeviceType devType=QInputDevice::DeviceType::TouchScreen, QInputDevice::Capabilities caps=QInputDevice::Capability::Position) |
| Q_GUI_EXPORT bool | qt_handleTouchEventv2 (QWindow *window, const QPointingDevice *device, const QList< QEventPoint > &points, Qt::KeyboardModifiers mods) |
| Q_GUI_EXPORT void | qt_handleTouchEvent (QWindow *window, const QPointingDevice *device, const QList< QEventPoint > &points, Qt::KeyboardModifiers mods) |
Variables | |
| QPointer< QWindow > | qt_last_mouse_receiver = nullptr |
| #define QT_DEFINE_QPA_EVENT_HANDLER | ( | ReturnType, | |
| HandlerName, | |||
| ... ) |
Definition at line 200 of file qwindowsysteminterface.cpp.
|
static |
Definition at line 137 of file qwindowsysteminterface.cpp.
| Q_GUI_EXPORT QDebug operator<< | ( | QDebug | dbg, |
| const QWindowSystemInterface::TouchPoint & | p ) |
Definition at line 1053 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleApplicationTermination | ) |
Definition at line 280 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleCloseEvent | , | ||
| QWindow * | window ) |
Definition at line 353 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleContextMenuEvent | , | ||
| QWindow * | window, | ||
| bool | mouseTriggered, | ||
| const QPoint & | pos, | ||
| const QPoint & | globalPos, | ||
| Qt::KeyboardModifiers | modifiers ) |
Definition at line 1035 of file qwindowsysteminterface.cpp.
Handles an expose event.
The platform plugin sends expose events when an area of the window is invalidated or window exposure changes. region is in window local coordinates. An empty region indicates that the window is obscured, but note that the exposed property of the QWindow will be set based on what QPlatformWindow::isExposed() returns at the time of this call, not based on what the region is. // FIXME: this should probably be fixed.
The platform plugin may omit sending expose events (or send obscure events) for windows that are on screen but where the client area is completely covered by other windows or otherwise not visible. Expose event consumers can then use this to disable updates for such windows. This is required behavior on platforms where OpenGL swapbuffers stops blocking for obscured windows (like macOS).
Definition at line 340 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleKeyEvent | , | ||
| QWindow * | window, | ||
| QEvent::Type | t, | ||
| int | k, | ||
| Qt::KeyboardModifiers | mods, | ||
| const QString & | text, | ||
| bool | autorep, | ||
| ushort | count ) |
Definition at line 470 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleKeyEvent | , | ||
| QWindow * | window, | ||
| ulong | timestamp, | ||
| QEvent::Type | t, | ||
| int | k, | ||
| Qt::KeyboardModifiers | mods, | ||
| const QString & | text, | ||
| bool | autorep, | ||
| ushort | count ) |
Definition at line 475 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleMouseEvent | , | ||
| QWindow * | window, | ||
| const QPointF & | local, | ||
| const QPointF & | global, | ||
| Qt::MouseButtons | state, | ||
| Qt::MouseButton | button, | ||
| QEvent::Type | type, | ||
| Qt::KeyboardModifiers | mods, | ||
| Qt::MouseEventSource | source ) |
w == 0 means that the event is in global coords only, local will be ignored in this case
Definition at line 365 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | 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::MouseEventSource | source ) |
Definition at line 374 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | 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::MouseEventSource | source ) |
Definition at line 383 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | 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::MouseEventSource | source ) |
Definition at line 392 of file qwindowsysteminterface.cpp.
Definition at line 346 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleTouchCancelEvent | , | ||
| QWindow * | window, | ||
| const QPointingDevice * | device, | ||
| Qt::KeyboardModifiers | mods ) |
Definition at line 693 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleTouchCancelEvent | , | ||
| QWindow * | window, | ||
| ulong | timestamp, | ||
| const QPointingDevice * | device, | ||
| Qt::KeyboardModifiers | mods ) |
Definition at line 700 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleTouchEvent | , | ||
| QWindow * | window, | ||
| const QPointingDevice * | device, | ||
| const QList< TouchPoint > & | points, | ||
| Qt::KeyboardModifiers | mods ) |
Definition at line 669 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | bool | , |
| handleTouchEvent | , | ||
| QWindow * | window, | ||
| ulong | timestamp, | ||
| const QPointingDevice * | device, | ||
| const QList< TouchPoint > & | points, | ||
| Qt::KeyboardModifiers | mods ) |
Definition at line 676 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | void | , |
| handleApplicationStateChanged | , | ||
| Qt::ApplicationState | newState, | ||
| bool | forcePropagate ) |
Definition at line 274 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | void | , |
| handleEnterEvent | , | ||
| QWindow * | window, | ||
| const QPointF & | local, | ||
| const QPointF & | global ) |
Definition at line 218 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | void | , |
| handleFocusWindowChanged | , | ||
| QWindow * | window, | ||
| Qt::FocusReason | r ) |
Definition at line 244 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | void | , |
| handleGeometryChange | , | ||
| QWindow * | window, | ||
| const QRect & | newRect ) |
Definition at line 296 of file qwindowsysteminterface.cpp.
Definition at line 226 of file qwindowsysteminterface.cpp.
Definition at line 269 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | void | , |
| handleThemeChange | ) |
Definition at line 836 of file qwindowsysteminterface.cpp.
Definition at line 263 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | void | , |
| handleWindowScreenChanged | , | ||
| QWindow * | window, | ||
| QScreen * | screen ) |
Definition at line 258 of file qwindowsysteminterface.cpp.
| QT_DEFINE_QPA_EVENT_HANDLER | ( | void | , |
| handleWindowStateChanged | , | ||
| QWindow * | window, | ||
| Qt::WindowStates | newState, | ||
| int | oldState ) |
Definition at line 249 of file qwindowsysteminterface.cpp.
| Q_GUI_EXPORT void qt_handleKeyEvent | ( | QWindow * | window, |
| QEvent::Type | t, | ||
| int | k, | ||
| Qt::KeyboardModifiers | mods, | ||
| const QString & | text = QString(), | ||
| bool | autorep = false, | ||
| ushort | count = 1 ) |
Definition at line 1168 of file qwindowsysteminterface.cpp.
| QT_BEGIN_NAMESPACE Q_GUI_EXPORT void qt_handleMouseEvent | ( | QWindow * | window, |
| const QPointF & | local, | ||
| const QPointF & | global, | ||
| Qt::MouseButtons | state, | ||
| Qt::MouseButton | button, | ||
| QEvent::Type | type, | ||
| Qt::KeyboardModifiers | mods, | ||
| int | timestamp ) |
Definition at line 1155 of file qwindowsysteminterface.cpp.
| Q_GUI_EXPORT void qt_handleTouchEvent | ( | QWindow * | window, |
| const QPointingDevice * | device, | ||
| const QList< QEventPoint > & | points, | ||
| Qt::KeyboardModifiers | mods ) |
Definition at line 1246 of file qwindowsysteminterface.cpp.
| Q_GUI_EXPORT bool qt_handleTouchEventv2 | ( | QWindow * | window, |
| const QPointingDevice * | device, | ||
| const QList< QEventPoint > & | points, | ||
| Qt::KeyboardModifiers | mods ) |
Definition at line 1238 of file qwindowsysteminterface.cpp.
| Q_GUI_EXPORT void qt_handleWheelEvent | ( | QWindow * | window, |
| const QPointF & | local, | ||
| const QPointF & | global, | ||
| QPoint | pixelDelta, | ||
| QPoint | angleDelta, | ||
| Qt::KeyboardModifiers | mods, | ||
| Qt::ScrollPhase | phase ) |
Definition at line 1217 of file qwindowsysteminterface.cpp.
| QT_BEGIN_NAMESPACE Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent | ( | QObject * | o, |
| ulong | timestamp, | ||
| int | k, | ||
| Qt::KeyboardModifiers | mods, | ||
| const QString & | text = QString(), | ||
| bool | autorep = false, | ||
| ushort | count = 1 ) |
Definition at line 1180 of file qwindowsysteminterface.cpp.
Definition at line 39 of file qwindowsysteminterface.cpp.
Referenced by QWidgetWindow::handleMouseEvent().