From 52b2dfa27e0017c89ab2a01b5ef601eeb2156feb Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 21 Jul 2025 22:59:53 +0200 Subject: [PATCH] Mon 21 Jul 22:43:21 CEST 2025 --- js/x11/core/eventmask.js | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 js/x11/core/eventmask.js diff --git a/js/x11/core/eventmask.js b/js/x11/core/eventmask.js new file mode 100644 index 0000000..e053cbc --- /dev/null +++ b/js/x11/core/eventmask.js @@ -0,0 +1,65 @@ +module.exports.eventMask = { + KeyPress: 0x00000001, + KeyRelease: 0x00000002, + ButtonPress: 0x00000004, + ButtonRelease: 0x00000008, + EnterWindow: 0x00000010, + LeaveWindow: 0x00000020, + PointerMotion: 0x00000040, + PointerMotionHint: 0x00000080, + Button1Motion: 0x00000100, + Button2Motion: 0x00000200, + Button3Motion: 0x00000400, + Button4Motion: 0x00000800, + Button5Motion: 0x00001000, + ButtonMotion: 0x00002000, + KeymapState: 0x00004000, + Exposure: 0x00008000, + VisibilityChange: 0x00010000, + StructureNotify: 0x00020000, + ResizeRedirect: 0x00040000, + SubstructureNotify: 0x00080000, + SubstructureRedirect: 0x00100000, + FocusChange: 0x00200000, + PropertyChange: 0x00400000, + ColormapChange: 0x00800000, + OwnerGrabButton: 0x01000000 + // TODO: add more names for common masks combinations +} + +// event.type number +module.exports.eventNumber = module.exports.eventType = { + KeyPress: 2, + KeyRelease: 3, + ButtonPress: 4, + ButtonRelease: 5, + MotionNotify: 6, + Expose: 12, + // TODO More events: + // EnterNotify: , + // LeaveNotify: , + // FocusIn: , + // FocusOut: , + // KeymapNotify: , + // Expose: , + // GraphicsExpose: , + // VisibilityNotify: , + // CreateNotify: , + // DestroyNotify: , + // MapNotify: , + // MapRequest: , + // ReparentNotify: , + // ConfigureNotify: , + // ConfigureRequest: , + // GravityNotify: , + // ResizeRequest: , + // CirculateNotify: , + // CirculateRequest: , + // PropertyNotify: , + // SelectionClear: , + // SelectionRequest: , + // SelectionNotify: , + // ColormapNotify: , + // ClientMessage: , + // MappingNotify: +}