1 ! Copyright (C) 2010 Niklas Waern.
2 ! See http://factorcode.org/license.txt for BSD license.
4 IN: x11.xinput2.constants
10 CONSTANT: XI_2_Major 2
11 CONSTANT: XI_2_Minor 0
13 ! Property event flags
14 CONSTANT: XIPropertyDeleted 0
15 CONSTANT: XIPropertyCreated 1
16 CONSTANT: XIPropertyModified 2
18 ! Enter/Leave and Focus In/Out modes
19 CONSTANT: XINotifyNormal 0
20 CONSTANT: XINotifyGrab 1
21 CONSTANT: XINotifyUngrab 2
22 CONSTANT: XINotifyWhileGrabbed 3
23 CONSTANT: XINotifyPassiveGrab 4
24 CONSTANT: XINotifyPassiveUngrab 5
26 ! Enter/Leave and Focus In/Out detail
27 CONSTANT: XINotifyAncestor 0
28 CONSTANT: XINotifyVirtual 1
29 CONSTANT: XINotifyInferior 2
30 CONSTANT: XINotifyNonlinear 3
31 CONSTANT: XINotifyNonlinearVirtual 4
32 CONSTANT: XINotifyPointer 5
33 CONSTANT: XINotifyPointerRoot 6
34 CONSTANT: XINotifyDetailNone 7
37 CONSTANT: XIGrabtypeButton 0
38 CONSTANT: XIGrabtypeKeycode 1
39 CONSTANT: XIGrabtypeEnter 2
40 CONSTANT: XIGrabtypeFocusIn 3
42 ! Passive grab modifier
43 : XIAnyModifier ( -- n ) 31 2^ ; inline
44 : XIAnyButton ( -- n ) 0 ; inline
45 : XIAnyKeycode ( -- n ) 0 ; inline
47 ! XIAllowEvents event-modes
48 CONSTANT: XIAsyncDevice 0
49 CONSTANT: XISyncDevice 1
50 CONSTANT: XIReplayDevice 2
51 CONSTANT: XIAsyncPairedDevice 3
52 CONSTANT: XIAsyncPair 4
53 CONSTANT: XISyncPair 5
55 ! DeviceChangedEvent change reasons
56 CONSTANT: XISlaveSwitch 1
57 CONSTANT: XIDeviceChange 2
60 : XIMasterAdded ( -- n ) 0 2^ ; inline
61 : XIMasterRemoved ( -- n ) 1 2^ ; inline
62 : XISlaveAdded ( -- n ) 2 2^ ; inline
63 : XISlaveRemoved ( -- n ) 3 2^ ; inline
64 : XISlaveAttached ( -- n ) 4 2^ ; inline
65 : XISlaveDetached ( -- n ) 5 2^ ; inline
66 : XIDeviceEnabled ( -- n ) 6 2^ ; inline
67 : XIDeviceDisabled ( -- n ) 7 2^ ; inline
69 ! ChangeHierarchy constants
70 CONSTANT: XIAddMaster 1
71 CONSTANT: XIRemoveMaster 2
72 CONSTANT: XIAttachSlave 3
73 CONSTANT: XIDetachSlave 4
75 CONSTANT: XIAttachToMaster 1
76 CONSTANT: XIFloating 2
79 CONSTANT: XIModeRelative 0
80 CONSTANT: XIModeAbsolute 1
83 CONSTANT: XIMasterPointer 1
84 CONSTANT: XIMasterKeyboard 2
85 CONSTANT: XISlavePointer 3
86 CONSTANT: XISlaveKeyboard 4
87 CONSTANT: XIFloatingSlave 5
90 CONSTANT: XIKeyClass 0
91 CONSTANT: XIButtonClass 1
92 CONSTANT: XIValuatorClass 2
94 ! Device event flags (common)
95 ! Device event flags (key events only)
96 : XIKeyRepeat ( -- n ) 16 2^ ; inline
97 ! Device event flags (pointer events only)
99 ! Fake device ID's for event selection
100 CONSTANT: XIAllDevices 0
101 CONSTANT: XIAllMasterDevices 1
104 CONSTANT: XI_DeviceChanged 1
105 CONSTANT: XI_KeyPress 2
106 CONSTANT: XI_KeyRelease 3
107 CONSTANT: XI_ButtonPress 4
108 CONSTANT: XI_ButtonRelease 5
109 CONSTANT: XI_Motion 6
112 CONSTANT: XI_FocusIn 9
113 CONSTANT: XI_FocusOut 10
114 CONSTANT: XI_HierarchyChanged 11
115 CONSTANT: XI_PropertyEvent 12
116 CONSTANT: XI_RawKeyPress 13
117 CONSTANT: XI_RawKeyRelease 14
118 CONSTANT: XI_RawButtonPress 15
119 CONSTANT: XI_RawButtonRelease 16
120 CONSTANT: XI_RawMotion 17
121 : XI_LASTEVENT ( -- n ) XI_RawMotion ; inline
124 : XI_DeviceChangedMask ( -- n ) XI_DeviceChanged 2^ ; inline
125 : XI_KeyPressMask ( -- n ) XI_KeyPress 2^ ; inline
126 : XI_KeyReleaseMask ( -- n ) XI_KeyRelease 2^ ; inline
127 : XI_ButtonPressMask ( -- n ) XI_ButtonPress 2^ ; inline
128 : XI_ButtonReleaseMask ( -- n ) XI_ButtonRelease 2^ ; inline
129 : XI_MotionMask ( -- n ) XI_Motion 2^ ; inline
130 : XI_EnterMask ( -- n ) XI_Enter 2^ ; inline
131 : XI_LeaveMask ( -- n ) XI_Leave 2^ ; inline
132 : XI_FocusInMask ( -- n ) XI_FocusIn 2^ ; inline
133 : XI_FocusOutMask ( -- n ) XI_FocusOut 2^ ; inline
134 : XI_HierarchyChangedMask ( -- n ) XI_HierarchyChanged 2^ ; inline
135 : XI_PropertyEventMask ( -- n ) XI_PropertyEvent 2^ ; inline
136 : XI_RawKeyPressMask ( -- n ) XI_RawKeyPress 2^ ; inline
137 : XI_RawKeyReleaseMask ( -- n ) XI_RawKeyRelease 2^ ; inline
138 : XI_RawButtonPressMask ( -- n ) XI_RawButtonPress 2^ ; inline
139 : XI_RawButtonReleaseMask ( -- n ) XI_RawButtonRelease 2^ ; inline
140 : XI_RawMotionMask ( -- n ) XI_RawMotion 2^ ; inline