mirror of
https://github.com/danbulant/node-x11
synced 2026-06-16 13:11:11 +00:00
event mask name to value map
This commit is contained in:
parent
2ef68db43e
commit
e5cfbac8b7
2 changed files with 40 additions and 0 deletions
28
lib/x11/eventmask.js
Normal file
28
lib/x11/eventmask.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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
|
||||
// add more names for common masks combinations
|
||||
}
|
||||
12
lib/x11/xproto2js.pl
Normal file
12
lib/x11/xproto2js.pl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# convert X protocol docline
|
||||
# #x00000020 name
|
||||
# to JS line
|
||||
# name: x00000020
|
||||
while(<>) {
|
||||
my($line) = $_;
|
||||
chomp($line);
|
||||
if ($line =~ /(x[0-9]+)[ \t]+([^ ]+)/)
|
||||
{
|
||||
print "$2: 0$1,\n";
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue