10#include <QtCore/qglobal.h>
11#include <QtCore/qnamespace.h>
12#include <QtGui/qevent.h>
13#include <private/qstdweb_p.h>
16#include <emscripten/html5.h>
17#include <emscripten/val.h>
62 template<
typename U, EM_BOOL U::*, EM_BOOL U::*, EM_BOOL U::*, EM_BOOL U::*>
64 template<
typename U>
static char Test(
65 SFINAE<U, &U::shiftKey, &U::ctrlKey, &U::altKey, &U::metaKey>*);
66 template<
typename U>
static int Test(...);
67 static const bool value =
sizeof(Test<T>(0)) ==
sizeof(
char);
70 template<
class T,
typename Enable =
void>
74 struct Helper<T,
std::enable_if_t<IsEmscriptenEvent<T>::value>>
96 if (
event[
"shiftKey"].as<bool>())
98 if (
event[
"ctrlKey"].as<bool>())
100 if (
event[
"altKey"].as<bool>())
102 if (
event[
"metaKey"].as<bool>())
104 if (
event[
"constructor"][
"name"].as<std::string>() ==
"KeyboardEvent" &&
105 event[
"location"].as<unsigned int>() == DOM_KEY_LOCATION_NUMPAD) {
114template <
typename Event>
122 const EmscriptenKeyboardEvent&
event);
142 static std::optional<KeyEvent>
182 return Qt::MouseButtons::fromInt(webButtons);
Type
This enum type defines the valid event types in Qt.
@ NonClientAreaMouseButtonRelease
@ NonClientAreaMouseButtonPress
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
QFlags< Qt::KeyboardModifier > getForEvent< EmscriptenKeyboardEvent >(const EmscriptenKeyboardEvent &event)
QFlags< Qt::KeyboardModifier > getForEvent(const Event &event)
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
DragEvent & operator=(const DragEvent &other)
DragEvent(EventType type, emscripten::val webEvent, QWindow *targetQWindow)
DragEvent(const DragEvent &other)
DragEvent(DragEvent &&other)
static std::optional< DragEvent > fromWeb(emscripten::val webEvent, QWindow *targetQWindow)
dom::DataTransfer dataTransfer
Qt::DropAction dropAction
DragEvent & operator=(DragEvent &&other)
Event & operator=(const Event &other)
Event & operator=(Event &&other)
Event(const Event &other)
emscripten::val target() const
KeyEvent(KeyEvent &&other)
KeyEvent & operator=(const KeyEvent &other)
static std::optional< KeyEvent > fromWebWithDeadKeyTranslation(emscripten::val webEvent, QWasmDeadKeySupport *deadKeySupport)
KeyEvent(EventType type, emscripten::val webEvent)
KeyEvent & operator=(KeyEvent &&other)
KeyEvent(const KeyEvent &other)
QFlags< Qt::KeyboardModifier > modifiers
static QFlags< Qt::KeyboardModifier > getModifierForEvent(const T &event)
static QFlags< Qt::KeyboardModifier > getModifierForEvent(const emscripten::val &event)
static char Test(SFINAE< U, &U::shiftKey, &U::ctrlKey, &U::altKey, &U::metaKey > *)
static constexpr Qt::MouseButton buttonFromWeb(int webButton)
MouseEvent(MouseEvent &&other)
static constexpr QEvent::Type mouseEventTypeFromEventType(EventType eventType, WindowArea windowArea)
QFlags< Qt::KeyboardModifier > modifiers
MouseEvent(const MouseEvent &other)
Qt::MouseButton mouseButton
static constexpr Qt::MouseButtons buttonsFromWeb(unsigned short webButtons)
Qt::MouseButtons mouseButtons
MouseEvent(EventType type, emscripten::val webEvent)
MouseEvent & operator=(MouseEvent &&other)
MouseEvent & operator=(const MouseEvent &other)
PointerEvent(const PointerEvent &other)
PointerEvent(PointerEvent &&other)
PointerEvent(EventType type, emscripten::val webEvent)
static std::optional< PointerEvent > fromWeb(emscripten::val webEvent)
PointerEvent & operator=(PointerEvent &&other)
PointerEvent & operator=(const PointerEvent &other)
WheelEvent & operator=(WheelEvent &&other)
WheelEvent(const WheelEvent &other)
static std::optional< WheelEvent > fromWeb(emscripten::val webEvent)
WheelEvent(WheelEvent &&other)
WheelEvent(EventType type, emscripten::val webEvent)
bool webkitDirectionInvertedFromDevice
WheelEvent & operator=(const WheelEvent &other)