4#include <qpa/qplatformwindow.h>
6#include "private/qguiapplication_p.h"
7#include "private/qevent_p.h"
8#include "private/qeventpoint_p.h"
9#include "private/qpointingdevice_p.h"
10#include "private/qscreen_p.h"
11#include <QAbstractEventDispatcher>
12#include <qpa/qplatformintegration.h>
16#include <QtCore/qscopedvaluerollback.h>
17#include <QtCore/private/qlocking_p.h>
19#if QT_CONFIG(draganddrop)
20#include <qpa/qplatformdrag.h>
53template<typename Delivery>
56 template<
typename EventType,
typename ...Args>
76template<
typename EventType,
typename ...Args>
95template<
typename EventType,
typename ...Args>
107 return event.eventAccepted;
126template<
typename EventType,
typename ...Args>
131 dispatcher->wakeUp();
143 return windowSystemEventQueue.count();
148 return windowSystemEventQueue.nonUserInputEventsQueued();
153 return windowSystemEventQueue.takeFirstOrReturnNull();
158 return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull();
163 return windowSystemEventQueue.peekAtFirstOfType(
t);
168 windowSystemEventQueue.remove(
event);
174 eventHandler = handler;
179 if (eventHandler == handler)
180 eventHandler =
nullptr;
199#define QT_DEFINE_QPA_EVENT_HANDLER(ReturnType, HandlerName, ...) \
200 template Q_GUI_EXPORT ReturnType QWindowSystemInterface::HandlerName<QWindowSystemInterface::DefaultDelivery>(__VA_ARGS__); \
201 template Q_GUI_EXPORT ReturnType QWindowSystemInterface::HandlerName<QWindowSystemInterface::SynchronousDelivery>(__VA_ARGS__); \
202 template Q_GUI_EXPORT ReturnType QWindowSystemInterface::HandlerName<QWindowSystemInterface::AsynchronousDelivery>(__VA_ARGS__); \
203 template<typename Delivery> ReturnType QWindowSystemInterface::HandlerName(__VA_ARGS__)
220 handleWindowSystemEvent<QWindowSystemInterfacePrivate::EnterEvent, Delivery>(
window,
227 handleWindowSystemEvent<QWindowSystemInterfacePrivate::LeaveEvent, Delivery>(
window);
239 handleLeaveEvent<AsynchronousDelivery>(
leave);
240 handleEnterEvent(enter, local,
global);
245 handleWindowSystemEvent<QWindowSystemInterfacePrivate::FocusWindowEvent, Delivery>(
window,
r);
252 oldState =
window->windowStates();
254 handleWindowSystemEvent<QWindowSystemInterfacePrivate::WindowStateChangedEvent, Delivery>(
window,
newState, Qt::WindowStates(oldState));
259 handleWindowSystemEvent<QWindowSystemInterfacePrivate::WindowScreenChangedEvent, Delivery>(
window,
screen);
264 handleWindowSystemEvent<QWindowSystemInterfacePrivate::WindowDevicePixelRatioChangedEvent, Delivery>(
window);
270 handleWindowSystemEvent<QWindowSystemInterfacePrivate::SafeAreaMarginsChangedEvent, Delivery>(
window);
276 handleWindowSystemEvent<QWindowSystemInterfacePrivate::ApplicationStateChangedEvent, Delivery>(
newState, forcePropagate);
281 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::WindowSystemEvent, Delivery>(
288 , newGeometry(newGeometry)
291 const auto nativeGeometry = pw->QPlatformWindow::geometry();
302 window->handle()->QPlatformWindow::setGeometry(newRect);
307 handleWindowSystemEvent<QWindowSystemInterfacePrivate::GeometryChangeEvent, Delivery>(
window, newRectDi);
337 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::ExposeEvent, Delivery>(
window,
343 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::PaintEvent, Delivery>(
window,
351 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::CloseEvent, Delivery>(
window);
393 bool isNonClientArea = {};
398 Q_ASSERT_X(
false,
"QWindowSystemInterface::handleMouseEvent",
399 "QTBUG-71263: Native double clicks are not implemented.");
404 isNonClientArea =
false;
409 isNonClientArea =
true;
418 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::MouseEvent, Delivery>(
window,
425#if QT_CONFIG(shortcut)
436 bool overridden = handleWindowSystemEvent<QWindowSystemInterfacePrivate::KeyEvent, SynchronousDelivery>
438 nativeVirtualKey, nativeModifiers,
text, autorepeat,
count);
447 nativeVirtualKey, nativeModifiers,
text, autorepeat,
count);
449 return shortcutMap.tryShortcut(&keyEvent);
472 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::KeyEvent, Delivery>(
window,
494 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::KeyEvent>(
window,
508 pixelDelta, angleDelta, mods, phase,
source, invertedScrolling);
530 if (angleDelta.
y() != 0 && angleDelta.
x() == 0) {
531 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::WheelEvent>(
window,
537 if (angleDelta.
y() == 0 && angleDelta.
x() != 0) {
538 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::WheelEvent>(
window,
548 acceptVert = handleWindowSystemEvent<QWindowSystemInterfacePrivate::WheelEvent>(
window,
554 acceptHorz = handleWindowSystemEvent<QWindowSystemInterfacePrivate::WheelEvent>(
window,
558 return acceptVert || acceptHorz;
614 QList<QEventPoint> touchPoints;
615 QEventPoint::States
states;
617 touchPoints.reserve(
points.size());
620 while (point !=
end) {
622 QEventPoint p(point->id, point->state, globalPos, globalPos);
624 if (point->uniqueId >= 0)
626 QMutableEventPoint::setPressure(
p, point->pressure);
627 QMutableEventPoint::setRotation(
p, point->rotation);
634 touchPoints.append(
p);
666 const QList<TouchPoint> &
points, Qt::KeyboardModifiers mods)
673 const QList<TouchPoint> &
points, Qt::KeyboardModifiers mods)
682 QList<QEventPoint> touchPoints =
685 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::TouchEvent, Delivery>(
window,
690 Qt::KeyboardModifiers mods)
697 Qt::KeyboardModifiers mods)
699 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::TouchEvent, Delivery>(
window,
725 screen->d_func()->updateGeometry();
752 if (wasPrimary && newPrimaryScreen)
753 emit qGuiApp->primaryScreenChanged(newPrimaryScreen);
760 bool movingFromVirtualSibling = newPrimaryScreen
761 && newPrimaryScreen->handle()->virtualSiblings().contains(platformScreen);
769 const bool wasVisible =
window->isVisible();
770 window->setScreen(newPrimaryScreen);
774 if (movingFromVirtualSibling)
775 window->setVisible(wasVisible);
782 delete platformScreen;
793 QScreen *newPrimaryScreen = newPrimary->screen();
796 if (indexOfScreen == 0)
800 emit qGuiApp->primaryScreenChanged(newPrimaryScreen);
805 handleWindowSystemEvent<QWindowSystemInterfacePrivate::ScreenOrientationEvent>(
screen, orientation);
810 handleWindowSystemEvent<QWindowSystemInterfacePrivate::ScreenGeometryEvent>(
screen,
823 handleWindowSystemEvent<QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent>(
screen,
824 effectiveDpi.first, effectiveDpi.second);
829 handleWindowSystemEvent<QWindowSystemInterfacePrivate::ScreenRefreshRateEvent>(
screen, newRefreshRate);
834 handleWindowSystemEvent<QWindowSystemInterfacePrivate::ThemeChangeEvent, Delivery>(
window);
837#if QT_CONFIG(draganddrop)
846 const QPoint &
p, Qt::DropActions supportedActions,
847 Qt::MouseButtons buttons, Qt::KeyboardModifiers
modifiers)
850 return QGuiApplicationPrivate::processDrag(
window, dropData,
pos, supportedActions, buttons,
modifiers);
854 const QPoint &
p, Qt::DropActions supportedActions,
855 Qt::MouseButtons buttons, Qt::KeyboardModifiers
modifiers)
858 return QGuiApplicationPrivate::processDrop(
window, dropData,
pos, supportedActions, buttons,
modifiers);
888 platformSynthesizesMouse =
v;
893 Qt::MouseButtons buttons,
qreal pressure,
int xTilt,
int yTilt,
897 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::TabletEvent>(
window,
901 device, buttons, pressure,
902 xTilt, yTilt, tangentialPressure, rotation,
z,
modifiers);
907 Qt::MouseButtons buttons,
qreal pressure,
int xTilt,
int yTilt,
913 buttons, pressure, xTilt, yTilt, tangentialPressure,
924 return handleTabletEvent(
window, timestamp, dev, local,
global, buttons, pressure,
925 xTilt, yTilt, tangentialPressure, rotation,
z,
modifiers);
935 xTilt, yTilt, tangentialPressure, rotation,
z, uid,
modifiers);
940 Qt::MouseButtons buttons,
int xTilt,
int yTilt,
955 ? handleWindowSystemEvent<QWindowSystemInterfacePrivate::TabletEnterProximityEvent>(timestamp,
device)
956 : handleWindowSystemEvent<QWindowSystemInterfacePrivate::TabletLeaveProximityEvent>(timestamp,
device);
961 Qt::MouseButtons buttons,
int xTilt,
int yTilt,
966 return handleTabletEnterLeaveProximityEvent(
window,
time,
device, inProximity,
967 local,
global, buttons, xTilt, yTilt,
977 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::TabletEnterProximityEvent>(timestamp,
device);
991 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::TabletLeaveProximityEvent>(timestamp,
device);
1000#ifndef QT_NO_GESTURES
1004 return handleGestureEventWithValueAndDelta(
window, timestamp,
device,
type, {}, {}, local,
global, fingerCount);
1020 return handleWindowSystemEvent<QWindowSystemInterfacePrivate::GestureEvent>(
window,
1021 timestamp,
type,
device, fingerCount, localPos, globalPos,
value, delta);
1027 handleWindowSystemEvent<QWindowSystemInterfacePrivate::PlatformPanelEvent>(
w);
1030#ifndef QT_NO_CONTEXTMENU
1035 handleWindowSystemEvent<QWindowSystemInterfacePrivate::ContextMenuEvent>(
window,
1040#if QT_CONFIG(whatsthis)
1041void QWindowSystemInterface::handleEnterWhatsThisEvent()
1043 handleWindowSystemEvent<QWindowSystemInterfacePrivate::WindowSystemEvent>(
1048#ifndef QT_NO_DEBUG_STREAM
1052 dbg.nospace() <<
"TouchPoint(" <<
p.id <<
" @" <<
p.area <<
" normalized " <<
p.normalPosition
1053 <<
" press " <<
p.pressure <<
" vel " <<
p.velocity <<
" state " << (int)
p.state;
1071 <<
"QWindowSystemInterface::flushWindowSystemEvents() invoked after "
1072 "QGuiApplication destruction, discarding " <<
count <<
" events.";
1080 handleWindowSystemEvent<QWindowSystemInterfacePrivate::FlushEventsEvent, AsynchronousDelivery>(
flags);
1083 sendWindowSystemEvents(
flags);
1093 sendWindowSystemEvents(
flags);
1126 return (nevents > 0);
1157 QWindowSystemInterface::handleMouseEvent<QWindowSystemInterface::SynchronousDelivery>(
window,
1166#if defined(Q_OS_MACOS)
1173 QWindowSystemInterface::handleKeyEvent<QWindowSystemInterface::SynchronousDelivery>(
window,
t, k, mods,
text, autorep,
count);
1178#if QT_CONFIG(shortcut)
1189 qevent.setTimestamp(timestamp);
1195 if (qevent.isAccepted())
1200 return shortcutMap.tryShortcut(&qevent);
1214 QPoint pixelDelta,
QPoint angleDelta, Qt::KeyboardModifiers mods,
1223 QInputDevice::Capabilities caps)
1235 const QList<QEventPoint> &
points,
1236 Qt::KeyboardModifiers mods)
1238 return QWindowSystemInterface::handleTouchEvent<QWindowSystemInterface::SynchronousDelivery>(
window,
device,
1243 const QList<QEventPoint> &
points,
1244 Qt::KeyboardModifiers mods)
IOBluetoothDevice * device
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
static bool closingDown()
Returns true if the application objects are being destroyed; otherwise returns false.
The QEventPoint class provides information about a point in a QPointerEvent.
QPointF globalPosition
the global position of this point.
qreal pressure
the pressure of this point.
int id
the ID number of this event point.
State state
the current state of the event point.
QSizeF ellipseDiameters
the width and height of the bounding ellipse of the touch point.
QVector2D velocity
a velocity vector, in units of pixels per second, in the coordinate.
Type
This enum type defines the valid event types in Qt.
@ NonClientAreaMouseButtonDblClick
@ NonClientAreaMouseButtonRelease
@ NonClientAreaMouseButtonPress
static bool processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result)
static Qt::KeyboardModifiers modifier_buttons
static QPlatformIntegration * platformIntegration()
static QList< QScreen * > screen_list
static QAbstractEventDispatcher * qt_qpa_core_dispatcher()
static void processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e)
static void resetCachedDevicePixelRatio()
static QGuiApplicationPrivate * instance()
static QWindowList allWindows()
Returns a list of all the windows in the application.
QScreen * primaryScreen
the primary (or default) screen of the application.
static QWindow * focusWindow()
Returns the QWindow that receives events tied to focus, such as key events.
static void updateHighDpiScaling()
The QKeyEvent class describes a key event.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr bool isNull() const noexcept
Returns true if both the x and y coordinates are set to 0, otherwise returns false.
constexpr int x() const noexcept
Returns the x coordinate of this point.
constexpr int y() const noexcept
Returns the y coordinate of this point.
static const QPointingDevice * tabletDevice(QInputDevice::DeviceType deviceType, QPointingDevice::PointerType pointerType, QPointingDeviceUniqueId uniqueId)
static QPointingDeviceUniqueId fromNumericId(qint64 id)
Constructs a unique pointer ID from numeric ID id.
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
static const QPointingDevice * primaryPointingDevice(const QString &seatName=QString())
Returns the primary pointing device (the core pointer, traditionally assumed to be a mouse) on the gi...
PointerType
This enum represents what is interacting with the pointing device.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QPoint topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
The QRegion class specifies a clip region for a painter.
The QScreen class is used to query screen properties. \inmodule QtGui.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QThread * currentThread()
virtual ~QWindowSystemEventHandler()
virtual bool sendEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *event)
ExposeEvent(QWindow *window, const QRegion ®ion)
GeometryChangeEvent(QWindow *window, const QRect &newGeometry)
QPointer< QWindow > window
static void setPlatformSynthesizesMouse(bool v)
static bool nonUserInputEventsQueued()
static QWindowSystemEventHandler * eventHandler
static void installWindowSystemEventHandler(QWindowSystemEventHandler *handler)
static WindowSystemEvent * getWindowSystemEvent()
static void removeWindowSystemEvent(WindowSystemEvent *event)
static qsizetype windowSystemEventsQueued()
static QWindowSystemInterface::TouchPoint toNativeTouchPoint(const QEventPoint &point, const QWindow *window)
static void removeWindowSystemEventhandler(QWindowSystemEventHandler *handler)
static WindowSystemEventList windowSystemEventQueue
static WindowSystemEvent * getNonUserInputWindowSystemEvent()
static QAtomicInt eventAccepted
static WindowSystemEvent * peekWindowSystemEvent(EventType t)
static QList< QWindowSystemInterface::TouchPoint > toNativeTouchPoints(const EventPointList &pointList, const QWindow *window)
static QList< QEventPoint > fromNativeTouchPoints(const QList< QWindowSystemInterface::TouchPoint > &points, const QWindow *window, QEvent::Type *type=nullptr)
static QMutex flushEventMutex
static bool synchronousWindowSystemEvents
static QWaitCondition eventsFlushed
static QElapsedTimer eventTime
static bool flushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags=QEventLoop::AllEvents)
Make Qt Gui process all events on the event queue immediately.
static bool handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result)
Passes a native event identified by eventType to the window.
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 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 void handleScreenGeometryChange(QScreen *screen, const QRect &newGeometry, const QRect &newAvailableGeometry)
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 sendWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)
static bool nonUserInputEventsQueued()
static void handleFileOpenEvent(const QString &fileName)
static void handleContextMenuEvent(QWindow *window, bool mouseTriggered, const QPoint &pos, const QPoint &globalPos, Qt::KeyboardModifiers modifiers)
static void handlePrimaryScreenChanged(QPlatformScreen *newPrimary)
Should be called whenever the primary screen changes.
static void deferredFlushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)
static void setSynchronousWindowSystemEvents(bool enable)
static void registerInputDevice(const QInputDevice *device)
static bool handleTabletLeaveProximityEvent(ulong timestamp, int deviceType, int pointerType, qint64 uid)
static void handleScreenAdded(QPlatformScreen *screen, bool isPrimary=false)
Should be called by the implementation whenever a new screen is added.
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 void handlePlatformPanelEvent(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 QWind...
static int windowSystemEventsQueued()
static void handleScreenRemoved(QPlatformScreen *screen)
Should be called by the implementation whenever a screen is removed.
static bool handleTabletEnterProximityEvent(ulong timestamp, int deviceType, int pointerType, qint64 uid)
static void handleScreenOrientationChange(QScreen *screen, Qt::ScreenOrientation newOrientation)
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)
static bool handleGestureEvent(QWindow *window, ulong timestamp, const QPointingDevice *device, Qt::NativeGestureType type, const QPointF &local, const QPointF &global, int fingerCount=0)
static void handleScreenRefreshRateChange(QScreen *screen, qreal newRefreshRate)
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 void handleScreenLogicalDotsPerInchChange(QScreen *screen, qreal newDpiX, qreal newDpiY)
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)
EGLImageKHR int int EGLuint64KHR * modifiers
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
T toNativePixels(const T &value, const C *context)
T toNativeLocalPosition(const T &value, const C *context)
T toNativeGlobalPosition(const T &value, const C *context)
T fromNativeLocalPosition(const T &value, const C *context)
T fromNativeGlobalPosition(const T &value, const C *context)
QRect fromNativeScreenGeometry(const QRect &nativeScreenGeometry, const QScreen *screen)
QRegion fromNativeLocalExposedRegion(const QRegion &pixelRegion, const QWindow *window)
T fromNativePixels(const T &value, const C *context)
T fromNative(const T &value, qreal scaleFactor, QPoint origin=QPoint(0, 0))
T fromNativeWindowGeometry(const T &value, const C *context)
Combined button and popup list for selecting options.
Q_GUI_EXPORT QPointingDevice * createTouchDevice(QInputDevice::DeviceType devType=QInputDevice::DeviceType::TouchScreen, QInputDevice::Capabilities caps=QInputDevice::Capability::Position)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
QPair< qreal, qreal > QDpi
static int area(const QSize &s)
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
GLsizei const GLfloat * v
[13]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLuint64 GLenum void * handle
GLfloat GLfloat GLfloat w
[0]
GLenum GLenum GLsizei count
GLuint GLsizei const GLchar * message
GLsizei GLsizei GLchar * source
GLfixed GLfixed GLint GLint GLfixed points
#define Q_ASSERT_X(cond, x, msg)
Q_GUI_EXPORT bool qt_handleTouchEventv2(QWindow *w, const QPointingDevice *device, const QList< QEventPoint > &points, Qt::KeyboardModifiers mods=Qt::NoModifier)
Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *w, const QPointingDevice *device, const QList< QEventPoint > &points, Qt::KeyboardModifiers mods=Qt::NoModifier)
static QPointingDevice::PointerType pointerType(unsigned currentCursor)
static QInputDevice::DeviceType deviceType(const UINT cursorType)
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 void qt_handleWheelEvent(QWindow *window, const QPointF &local, const QPointF &global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase)
QPointer< QWindow > qt_last_mouse_receiver
static bool handleWindowSystemEvent(Args ...args)
#define QT_DEFINE_QPA_EVENT_HANDLER(ReturnType, HandlerName,...)
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 bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
QUrl url("example.com")
[constructor-url-reference]
static bool handleEvent(Args ...)