9#include <QtCore/qglobal.h>
10#include <QtCore/qnamespace.h>
11#include <QtGui/qevent.h>
15#include <emscripten/html5.h>
16#include <emscripten/val.h>
56 template<
typename U, EM_BOOL U::*, EM_BOOL U::*, EM_BOOL U::*, EM_BOOL U::*>
58 template<
typename U>
static char Test(
60 template<
typename U>
static int Test(...);
61 static const bool value =
sizeof(Test<T>(0)) ==
sizeof(
char);
64 template<
class T,
typename Enable =
void>
68 struct Helper<T,
std::enable_if_t<IsEmscriptenEvent<T>::value>>
90 if (
event[
"shiftKey"].as<bool>())
92 if (
event[
"ctrlKey"].as<bool>())
94 if (
event[
"altKey"].as<bool>())
96 if (
event[
"metaKey"].as<bool>())
98 if (
event[
"constructor"][
"name"].as<std::string>() ==
"KeyboardEvent" &&
99 event[
"location"].as<unsigned int>() == DOM_KEY_LOCATION_NUMPAD) {
108template <
typename Event>
116 const EmscriptenKeyboardEvent&
event);
130 emscripten::val
target = emscripten::val::undefined();
135 static std::optional<KeyEvent>
175 return Qt::MouseButtons::fromInt(webButtons);
205 static std::optional<PointerEvent>
fromWeb(emscripten::val webEvent);
224 static std::optional<DragEvent>
fromWeb(emscripten::val webEvent);
239 static std::optional<WheelEvent>
fromWeb(emscripten::val webEvent);
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)
static std::optional< DragEvent > fromWeb(emscripten::val webEvent)
emscripten::val dataTransfer
DragEvent(const DragEvent &other)
DragEvent(DragEvent &&other)
Qt::DropAction dropAction
DragEvent & operator=(DragEvent &&other)
Event & operator=(const Event &other)
Event & operator=(Event &&other)
Event(const Event &other)
KeyEvent(KeyEvent &&other)
KeyEvent & operator=(const KeyEvent &other)
static std::optional< KeyEvent > fromWebWithDeadKeyTranslation(emscripten::val webEvent, QWasmDeadKeySupport *deadKeySupport)
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 & operator=(MouseEvent &&other)
MouseEvent & operator=(const MouseEvent &other)
PointerEvent(const PointerEvent &other)
PointerEvent(PointerEvent &&other)
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)
bool webkitDirectionInvertedFromDevice
WheelEvent & operator=(const WheelEvent &other)