@illgrenoble/webx-client 1.9.2 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/dist/input/GuacamoleKeyboard.js +118 -99
  2. package/dist/input/WebXKeyboard.d.ts +0 -16
  3. package/dist/input/WebXKeyboard.js +3 -27
  4. package/dist/input/WebXKeyboard.js.map +1 -1
  5. package/package.json +1 -1
  6. package/dist/display/WebXMaterialProvider.d.ts +0 -8
  7. package/dist/display/WebXMaterialProvider.js +0 -71
  8. package/dist/display/WebXMaterialProvider.js.map +0 -1
  9. package/dist/input/WebXNewKeyboard.d.ts +0 -62
  10. package/dist/input/WebXNewKeyboard.js +0 -94
  11. package/dist/input/WebXNewKeyboard.js.map +0 -1
  12. package/dist/input/keyboard/WebXKeyEvent.d.ts +0 -79
  13. package/dist/input/keyboard/WebXKeyEvent.js +0 -324
  14. package/dist/input/keyboard/WebXKeyEvent.js.map +0 -1
  15. package/dist/input/keyboard/WebXKeyPressEvent.d.ts +0 -30
  16. package/dist/input/keyboard/WebXKeyPressEvent.js +0 -44
  17. package/dist/input/keyboard/WebXKeyPressEvent.js.map +0 -1
  18. package/dist/input/keyboard/WebXKeyUpEvent.d.ts +0 -33
  19. package/dist/input/keyboard/WebXKeyUpEvent.js +0 -31
  20. package/dist/input/keyboard/WebXKeyUpEvent.js.map +0 -1
  21. package/dist/input/keyboard/WebXKeyboardModifierState.d.ts +0 -108
  22. package/dist/input/keyboard/WebXKeyboardModifierState.js +0 -148
  23. package/dist/input/keyboard/WebXKeyboardModifierState.js.map +0 -1
  24. package/dist/input/keyboard/WebXKeyboardUtils.d.ts +0 -25
  25. package/dist/input/keyboard/WebXKeyboardUtils.js +0 -63
  26. package/dist/input/keyboard/WebXKeyboardUtils.js.map +0 -1
  27. package/dist/input/keyboard/WebXKeydownEvent.d.ts +0 -46
  28. package/dist/input/keyboard/WebXKeydownEvent.js +0 -66
  29. package/dist/input/keyboard/WebXKeydownEvent.js.map +0 -1
  30. package/dist/input/keyboard/index.d.ts +0 -6
  31. package/dist/input/keyboard/index.js +0 -23
  32. package/dist/input/keyboard/index.js.map +0 -1
  33. package/dist/lib/GuacamoleKeyboard.js +0 -1290
  34. package/dist/lib/GuacamoleKeyboard.js.map +0 -1
  35. package/dist/message/WebXPollMessage.d.ts +0 -4
  36. package/dist/message/WebXPollMessage.js +0 -12
  37. package/dist/message/WebXPollMessage.js.map +0 -1
  38. package/dist/src/WebXClient.d.ts +0 -261
  39. package/dist/src/WebXClient.js +0 -571
  40. package/dist/src/WebXClient.js.map +0 -1
  41. package/dist/src/WebXEngine.d.ts +0 -4
  42. package/dist/src/WebXEngine.js +0 -7
  43. package/dist/src/WebXEngine.js.map +0 -1
  44. package/dist/src/display/WebXCursor.d.ts +0 -88
  45. package/dist/src/display/WebXCursor.js +0 -150
  46. package/dist/src/display/WebXCursor.js.map +0 -1
  47. package/dist/src/display/WebXCursorFactory.d.ts +0 -36
  48. package/dist/src/display/WebXCursorFactory.js +0 -59
  49. package/dist/src/display/WebXCursorFactory.js.map +0 -1
  50. package/dist/src/display/WebXDisplay.d.ts +0 -226
  51. package/dist/src/display/WebXDisplay.js +0 -424
  52. package/dist/src/display/WebXDisplay.js.map +0 -1
  53. package/dist/src/display/WebXMaterial.d.ts +0 -14
  54. package/dist/src/display/WebXMaterial.js +0 -140
  55. package/dist/src/display/WebXMaterial.js.map +0 -1
  56. package/dist/src/display/WebXSubImage.d.ts +0 -50
  57. package/dist/src/display/WebXSubImage.js +0 -26
  58. package/dist/src/display/WebXSubImage.js.map +0 -1
  59. package/dist/src/display/WebXTextureFactory.d.ts +0 -54
  60. package/dist/src/display/WebXTextureFactory.js +0 -160
  61. package/dist/src/display/WebXTextureFactory.js.map +0 -1
  62. package/dist/src/display/WebXWindow.d.ts +0 -241
  63. package/dist/src/display/WebXWindow.js +0 -438
  64. package/dist/src/display/WebXWindow.js.map +0 -1
  65. package/dist/src/display/WebXWindowProperties.d.ts +0 -44
  66. package/dist/src/display/WebXWindowProperties.js +0 -25
  67. package/dist/src/display/WebXWindowProperties.js.map +0 -1
  68. package/dist/src/display/index.d.ts +0 -7
  69. package/dist/src/display/index.js +0 -24
  70. package/dist/src/display/index.js.map +0 -1
  71. package/dist/src/index.d.ts +0 -7
  72. package/dist/src/index.js +0 -24
  73. package/dist/src/index.js.map +0 -1
  74. package/dist/src/input/WebXKeyboard.d.ts +0 -265
  75. package/dist/src/input/WebXKeyboard.js +0 -632
  76. package/dist/src/input/WebXKeyboard.js.map +0 -1
  77. package/dist/src/input/WebXMouse.d.ts +0 -125
  78. package/dist/src/input/WebXMouse.js +0 -231
  79. package/dist/src/input/WebXMouse.js.map +0 -1
  80. package/dist/src/input/index.d.ts +0 -4
  81. package/dist/src/input/index.js +0 -21
  82. package/dist/src/input/index.js.map +0 -1
  83. package/dist/src/input/keyboard/WebXKeyEvent.d.ts +0 -79
  84. package/dist/src/input/keyboard/WebXKeyEvent.js +0 -324
  85. package/dist/src/input/keyboard/WebXKeyEvent.js.map +0 -1
  86. package/dist/src/input/keyboard/WebXKeyPressEvent.d.ts +0 -30
  87. package/dist/src/input/keyboard/WebXKeyPressEvent.js +0 -44
  88. package/dist/src/input/keyboard/WebXKeyPressEvent.js.map +0 -1
  89. package/dist/src/input/keyboard/WebXKeyUpEvent.d.ts +0 -33
  90. package/dist/src/input/keyboard/WebXKeyUpEvent.js +0 -31
  91. package/dist/src/input/keyboard/WebXKeyUpEvent.js.map +0 -1
  92. package/dist/src/input/keyboard/WebXKeyboardModifierState.d.ts +0 -108
  93. package/dist/src/input/keyboard/WebXKeyboardModifierState.js +0 -148
  94. package/dist/src/input/keyboard/WebXKeyboardModifierState.js.map +0 -1
  95. package/dist/src/input/keyboard/WebXKeyboardUtils.d.ts +0 -25
  96. package/dist/src/input/keyboard/WebXKeyboardUtils.js +0 -63
  97. package/dist/src/input/keyboard/WebXKeyboardUtils.js.map +0 -1
  98. package/dist/src/input/keyboard/WebXKeydownEvent.d.ts +0 -46
  99. package/dist/src/input/keyboard/WebXKeydownEvent.js +0 -66
  100. package/dist/src/input/keyboard/WebXKeydownEvent.js.map +0 -1
  101. package/dist/src/input/keyboard/index.d.ts +0 -6
  102. package/dist/src/input/keyboard/index.js +0 -23
  103. package/dist/src/input/keyboard/index.js.map +0 -1
  104. package/dist/src/input/mouse/WebXMouseState.d.ts +0 -190
  105. package/dist/src/input/mouse/WebXMouseState.js +0 -217
  106. package/dist/src/input/mouse/WebXMouseState.js.map +0 -1
  107. package/dist/src/input/mouse/index.d.ts +0 -1
  108. package/dist/src/input/mouse/index.js +0 -18
  109. package/dist/src/input/mouse/index.js.map +0 -1
  110. package/dist/src/instruction/WebXClipboardInstruction.d.ts +0 -18
  111. package/dist/src/instruction/WebXClipboardInstruction.js +0 -23
  112. package/dist/src/instruction/WebXClipboardInstruction.js.map +0 -1
  113. package/dist/src/instruction/WebXConnectInstruction.d.ts +0 -19
  114. package/dist/src/instruction/WebXConnectInstruction.js +0 -24
  115. package/dist/src/instruction/WebXConnectInstruction.js.map +0 -1
  116. package/dist/src/instruction/WebXCursorImageInstruction.d.ts +0 -18
  117. package/dist/src/instruction/WebXCursorImageInstruction.js +0 -23
  118. package/dist/src/instruction/WebXCursorImageInstruction.js.map +0 -1
  119. package/dist/src/instruction/WebXDataAckInstruction.d.ts +0 -25
  120. package/dist/src/instruction/WebXDataAckInstruction.js +0 -26
  121. package/dist/src/instruction/WebXDataAckInstruction.js.map +0 -1
  122. package/dist/src/instruction/WebXImageInstruction.d.ts +0 -18
  123. package/dist/src/instruction/WebXImageInstruction.js +0 -23
  124. package/dist/src/instruction/WebXImageInstruction.js.map +0 -1
  125. package/dist/src/instruction/WebXInstruction.d.ts +0 -29
  126. package/dist/src/instruction/WebXInstruction.js +0 -28
  127. package/dist/src/instruction/WebXInstruction.js.map +0 -1
  128. package/dist/src/instruction/WebXInstructionResponse.d.ts +0 -66
  129. package/dist/src/instruction/WebXInstructionResponse.js +0 -78
  130. package/dist/src/instruction/WebXInstructionResponse.js.map +0 -1
  131. package/dist/src/instruction/WebXInstructionType.d.ts +0 -63
  132. package/dist/src/instruction/WebXInstructionType.js +0 -96
  133. package/dist/src/instruction/WebXInstructionType.js.map +0 -1
  134. package/dist/src/instruction/WebXKeyboardInstruction.d.ts +0 -23
  135. package/dist/src/instruction/WebXKeyboardInstruction.js +0 -25
  136. package/dist/src/instruction/WebXKeyboardInstruction.js.map +0 -1
  137. package/dist/src/instruction/WebXMouseInstruction.d.ts +0 -28
  138. package/dist/src/instruction/WebXMouseInstruction.js +0 -27
  139. package/dist/src/instruction/WebXMouseInstruction.js.map +0 -1
  140. package/dist/src/instruction/WebXPongInstruction.d.ts +0 -18
  141. package/dist/src/instruction/WebXPongInstruction.js +0 -23
  142. package/dist/src/instruction/WebXPongInstruction.js.map +0 -1
  143. package/dist/src/instruction/WebXQualityInstruction.d.ts +0 -19
  144. package/dist/src/instruction/WebXQualityInstruction.js +0 -24
  145. package/dist/src/instruction/WebXQualityInstruction.js.map +0 -1
  146. package/dist/src/instruction/WebXScreenInstruction.d.ts +0 -12
  147. package/dist/src/instruction/WebXScreenInstruction.js +0 -20
  148. package/dist/src/instruction/WebXScreenInstruction.js.map +0 -1
  149. package/dist/src/instruction/WebXShapeInstruction.d.ts +0 -18
  150. package/dist/src/instruction/WebXShapeInstruction.js +0 -23
  151. package/dist/src/instruction/WebXShapeInstruction.js.map +0 -1
  152. package/dist/src/instruction/WebXWindowsInstruction.d.ts +0 -13
  153. package/dist/src/instruction/WebXWindowsInstruction.js +0 -21
  154. package/dist/src/instruction/WebXWindowsInstruction.js.map +0 -1
  155. package/dist/src/instruction/index.d.ts +0 -15
  156. package/dist/src/instruction/index.js +0 -32
  157. package/dist/src/instruction/index.js.map +0 -1
  158. package/dist/src/message/WebXClipboardMessage.d.ts +0 -19
  159. package/dist/src/message/WebXClipboardMessage.js +0 -23
  160. package/dist/src/message/WebXClipboardMessage.js.map +0 -1
  161. package/dist/src/message/WebXConnectionMessage.d.ts +0 -12
  162. package/dist/src/message/WebXConnectionMessage.js +0 -20
  163. package/dist/src/message/WebXConnectionMessage.js.map +0 -1
  164. package/dist/src/message/WebXCursorImageMessage.d.ts +0 -46
  165. package/dist/src/message/WebXCursorImageMessage.js +0 -35
  166. package/dist/src/message/WebXCursorImageMessage.js.map +0 -1
  167. package/dist/src/message/WebXImageMessage.d.ts +0 -41
  168. package/dist/src/message/WebXImageMessage.js +0 -33
  169. package/dist/src/message/WebXImageMessage.js.map +0 -1
  170. package/dist/src/message/WebXMessage.d.ts +0 -24
  171. package/dist/src/message/WebXMessage.js +0 -23
  172. package/dist/src/message/WebXMessage.js.map +0 -1
  173. package/dist/src/message/WebXMessageType.d.ts +0 -59
  174. package/dist/src/message/WebXMessageType.js +0 -64
  175. package/dist/src/message/WebXMessageType.js.map +0 -1
  176. package/dist/src/message/WebXMouseMessage.d.ts +0 -30
  177. package/dist/src/message/WebXMouseMessage.js +0 -29
  178. package/dist/src/message/WebXMouseMessage.js.map +0 -1
  179. package/dist/src/message/WebXNopMessage.d.ts +0 -10
  180. package/dist/src/message/WebXNopMessage.js +0 -18
  181. package/dist/src/message/WebXNopMessage.js.map +0 -1
  182. package/dist/src/message/WebXPingMessage.d.ts +0 -13
  183. package/dist/src/message/WebXPingMessage.js +0 -21
  184. package/dist/src/message/WebXPingMessage.js.map +0 -1
  185. package/dist/src/message/WebXQualityMessage.d.ts +0 -39
  186. package/dist/src/message/WebXQualityMessage.js +0 -32
  187. package/dist/src/message/WebXQualityMessage.js.map +0 -1
  188. package/dist/src/message/WebXScreenMessage.d.ts +0 -37
  189. package/dist/src/message/WebXScreenMessage.js +0 -29
  190. package/dist/src/message/WebXScreenMessage.js.map +0 -1
  191. package/dist/src/message/WebXShapeMessage.d.ts +0 -31
  192. package/dist/src/message/WebXShapeMessage.js +0 -29
  193. package/dist/src/message/WebXShapeMessage.js.map +0 -1
  194. package/dist/src/message/WebXSubImagesMessage.d.ts +0 -31
  195. package/dist/src/message/WebXSubImagesMessage.js +0 -29
  196. package/dist/src/message/WebXSubImagesMessage.js.map +0 -1
  197. package/dist/src/message/WebXWindowsMessage.d.ts +0 -21
  198. package/dist/src/message/WebXWindowsMessage.js +0 -25
  199. package/dist/src/message/WebXWindowsMessage.js.map +0 -1
  200. package/dist/src/message/index.d.ts +0 -14
  201. package/dist/src/message/index.js +0 -31
  202. package/dist/src/message/index.js.map +0 -1
  203. package/dist/src/tracer/WebXDebugImageMessageHandler.d.ts +0 -48
  204. package/dist/src/tracer/WebXDebugImageMessageHandler.js +0 -102
  205. package/dist/src/tracer/WebXDebugImageMessageHandler.js.map +0 -1
  206. package/dist/src/tracer/WebXHandler.d.ts +0 -14
  207. package/dist/src/tracer/WebXHandler.js +0 -3
  208. package/dist/src/tracer/WebXHandler.js.map +0 -1
  209. package/dist/src/tracer/WebXInstructionHandler.d.ts +0 -21
  210. package/dist/src/tracer/WebXInstructionHandler.js +0 -13
  211. package/dist/src/tracer/WebXInstructionHandler.js.map +0 -1
  212. package/dist/src/tracer/WebXMessageHandler.d.ts +0 -21
  213. package/dist/src/tracer/WebXMessageHandler.js +0 -13
  214. package/dist/src/tracer/WebXMessageHandler.js.map +0 -1
  215. package/dist/src/tracer/WebXStatsHandler.d.ts +0 -23
  216. package/dist/src/tracer/WebXStatsHandler.js +0 -13
  217. package/dist/src/tracer/WebXStatsHandler.js.map +0 -1
  218. package/dist/src/tracer/index.d.ts +0 -5
  219. package/dist/src/tracer/index.js +0 -22
  220. package/dist/src/tracer/index.js.map +0 -1
  221. package/dist/src/transport/WebXBinarySerializer.d.ts +0 -31
  222. package/dist/src/transport/WebXBinarySerializer.js +0 -63
  223. package/dist/src/transport/WebXBinarySerializer.js.map +0 -1
  224. package/dist/src/transport/WebXInstructionBuffer.d.ts +0 -55
  225. package/dist/src/transport/WebXInstructionBuffer.js +0 -109
  226. package/dist/src/transport/WebXInstructionBuffer.js.map +0 -1
  227. package/dist/src/transport/WebXInstructionEncoder.d.ts +0 -181
  228. package/dist/src/transport/WebXInstructionEncoder.js +0 -294
  229. package/dist/src/transport/WebXInstructionEncoder.js.map +0 -1
  230. package/dist/src/transport/WebXMessageBuffer.d.ts +0 -80
  231. package/dist/src/transport/WebXMessageBuffer.js +0 -104
  232. package/dist/src/transport/WebXMessageBuffer.js.map +0 -1
  233. package/dist/src/transport/WebXMessageDecoder.d.ts +0 -108
  234. package/dist/src/transport/WebXMessageDecoder.js +0 -332
  235. package/dist/src/transport/WebXMessageDecoder.js.map +0 -1
  236. package/dist/src/transport/index.d.ts +0 -5
  237. package/dist/src/transport/index.js +0 -22
  238. package/dist/src/transport/index.js.map +0 -1
  239. package/dist/src/tunnel/WebXTunnel.d.ts +0 -93
  240. package/dist/src/tunnel/WebXTunnel.js +0 -156
  241. package/dist/src/tunnel/WebXTunnel.js.map +0 -1
  242. package/dist/src/tunnel/WebXWebSocketTunnel.d.ts +0 -40
  243. package/dist/src/tunnel/WebXWebSocketTunnel.js +0 -88
  244. package/dist/src/tunnel/WebXWebSocketTunnel.js.map +0 -1
  245. package/dist/src/tunnel/index.d.ts +0 -2
  246. package/dist/src/tunnel/index.js +0 -19
  247. package/dist/src/tunnel/index.js.map +0 -1
  248. package/dist/src/utils/WebXColorGenerator.d.ts +0 -24
  249. package/dist/src/utils/WebXColorGenerator.js +0 -46
  250. package/dist/src/utils/WebXColorGenerator.js.map +0 -1
  251. package/dist/src/utils/WebXVersion.d.ts +0 -34
  252. package/dist/src/utils/WebXVersion.js +0 -25
  253. package/dist/src/utils/WebXVersion.js.map +0 -1
  254. package/dist/src/utils/index.d.ts +0 -2
  255. package/dist/src/utils/index.js +0 -19
  256. package/dist/src/utils/index.js.map +0 -1
  257. package/dist/tracer/DemoVisualMessageHandler.d.ts +0 -15
  258. package/dist/tracer/DemoVisualMessageHandler.js +0 -55
  259. package/dist/tracer/DemoVisualMessageHandler.js.map +0 -1
  260. package/dist/tracer/WebXVisualMessageHandler.d.ts +0 -15
  261. package/dist/tracer/WebXVisualMessageHandler.js +0 -55
  262. package/dist/tracer/WebXVisualMessageHandler.js.map +0 -1
  263. package/dist/tunnel/WebXDefaultQoSHandler.d.ts +0 -16
  264. package/dist/tunnel/WebXDefaultQoSHandler.js +0 -57
  265. package/dist/tunnel/WebXDefaultQoSHandler.js.map +0 -1
  266. package/dist/tunnel/WebXQoSHandler.d.ts +0 -6
  267. package/dist/tunnel/WebXQoSHandler.js +0 -7
  268. package/dist/tunnel/WebXQoSHandler.js.map +0 -1
  269. package/dist/tunnel/WebXSocketIOTunnel.d.ts +0 -15
  270. package/dist/tunnel/WebXSocketIOTunnel.js +0 -41
  271. package/dist/tunnel/WebXSocketIOTunnel.js.map +0 -1
  272. package/dist/utils/ColorGenerator.d.ts +0 -24
  273. package/dist/utils/ColorGenerator.js +0 -46
  274. package/dist/utils/ColorGenerator.js.map +0 -1
  275. package/dist/utils/Config.d.ts +0 -4
  276. package/dist/utils/Config.js +0 -10
  277. package/dist/utils/Config.js.map +0 -1
  278. package/dist/utils/WebXAsyncExec.d.ts +0 -5
  279. package/dist/utils/WebXAsyncExec.js +0 -18
  280. package/dist/utils/WebXAsyncExec.js.map +0 -1
  281. package/dist/utils/WebXColourGenerator.d.ts +0 -5
  282. package/dist/utils/WebXColourGenerator.js +0 -27
  283. package/dist/utils/WebXColourGenerator.js.map +0 -1
  284. package/dist/utils/WebXFileSize.d.ts +0 -3
  285. package/dist/utils/WebXFileSize.js +0 -14
  286. package/dist/utils/WebXFileSize.js.map +0 -1
@@ -1,125 +0,0 @@
1
- import { WebXMouseState } from './mouse';
2
- export declare class WebXMouse {
3
- private _element;
4
- /**
5
- * The current mouse state. The properties of this state are updated when
6
- * mouse events fire. This state object is also passed in as a parameter to
7
- * the handler of any mouse events.
8
- */
9
- private _currentState;
10
- private _contextMenuHandler;
11
- private _mouseMoveHandler;
12
- private _mouseDownHandler;
13
- private _mouseUpHandler;
14
- private _mouseOutHandler;
15
- private _mouseWheelHandler;
16
- /**
17
- * Provides cross-browser mouse events for a given element
18
- * @param _element The element to use to provide mouse events
19
- */
20
- constructor(_element: HTMLElement);
21
- /**
22
- * Called when the client is disposed: removes any bound listeners
23
- */
24
- dispose(): void;
25
- /**
26
- * Cancel an event
27
- * @param event the event to cancel
28
- */
29
- private _cancelEvent;
30
- /**
31
- * Bind the mouse listeners to the given element
32
- */
33
- private _bindListeners;
34
- /**
35
- * Unbinds the mouse listeners
36
- */
37
- private _unbindListeners;
38
- /**
39
- * Creates the default state
40
- */
41
- private _createDefaultState;
42
- /**
43
- * Process mouse up event
44
- * @param event the mouse event
45
- */
46
- private _handleMouseUp;
47
- /**
48
- * Process mouse down event
49
- * @param event the mouse event
50
- */
51
- private _handleMouseDown;
52
- /**
53
- * Process mouse wheel event
54
- * @param event the mouse event
55
- */
56
- private _handleMouseWheel;
57
- /**
58
- * Process mouse out event
59
- */
60
- private _handleMouseOut;
61
- /**
62
- * Process the mouse move event
63
- * @param event the mouse event
64
- */
65
- private _handleMouseMove;
66
- /**
67
- * Resets the mouse state
68
- */
69
- reset(): void;
70
- /**
71
- * Process the context menu event
72
- * Block context menu so right-click gets sent properly
73
- * @param event the mouse event
74
- */
75
- private _handleContextMenu;
76
- /**
77
- * Notify listener of the mouse move event
78
- * @Note: Sends a clone of the current state to avoid mutating the state
79
- */
80
- private _notifyMouseMove;
81
- /**
82
- * Notify listener of the mouse up event
83
- * @Note: Sends a clone of the current state to avoid mutating the state
84
- */
85
- private _notifyMouseUp;
86
- /**
87
- * Notify listener of the mouse down event
88
- * @Note: Sends a clone of the current state to avoid mutating the state
89
- */
90
- private _notifyMouseDown;
91
- /**
92
- * Notify listener of the mouse out event
93
- * @Note: Sends a clone of the current state to avoid mutating the state
94
- */
95
- private _notifyMouseOut;
96
- /**
97
- * Fired whenever the user moves the mouse
98
- * @param mouseState the current mouse state
99
- */
100
- onMouseMove(mouseState: WebXMouseState): void;
101
- /**
102
- * Fired whenever a mouse button is effectively pressed. This can happen
103
- * as part of a "click" gesture initiated by the user by tapping one
104
- * or more fingers over the touchpad element, as part of a "scroll"
105
- * gesture initiated by dragging two fingers up or down, etc.
106
- *
107
- * @param mouseState the current mouse state
108
- */
109
- onMouseDown(mouseState: WebXMouseState): void;
110
- /**
111
- * Fired whenever a mouse button is effectively released. This can happen
112
- * as part of a "click" gesture initiated by the user by tapping one
113
- * or more fingers over the touchpad element, as part of a "scroll"
114
- * gesture initiated by dragging two fingers up or down, etc.
115
- * @param mouseState the current mouse state
116
- */
117
- onMouseUp(mouseState: WebXMouseState): void;
118
- /**
119
- * Fired whenever the mouse leaves the boundaries of the element associated
120
- * with this mouse
121
- *
122
- * @param mouseState the current mouse state
123
- */
124
- onMouseOut(mouseState: WebXMouseState): void;
125
- }
@@ -1,231 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebXMouse = void 0;
4
- const mouse_1 = require("./mouse");
5
- class WebXMouse {
6
- /**
7
- * Provides cross-browser mouse events for a given element
8
- * @param _element The element to use to provide mouse events
9
- */
10
- constructor(_element) {
11
- this._element = _element;
12
- this._contextMenuHandler = this._handleContextMenu.bind(this);
13
- this._mouseMoveHandler = this._handleMouseMove.bind(this);
14
- this._mouseDownHandler = this._handleMouseDown.bind(this);
15
- this._mouseUpHandler = this._handleMouseUp.bind(this);
16
- this._mouseOutHandler = this._handleMouseOut.bind(this);
17
- this._mouseWheelHandler = this._handleMouseWheel.bind(this);
18
- this._bindListeners();
19
- this._createDefaultState();
20
- }
21
- /**
22
- * Called when the client is disposed: removes any bound listeners
23
- */
24
- dispose() {
25
- this._unbindListeners();
26
- }
27
- /**
28
- * Cancel an event
29
- * @param event the event to cancel
30
- */
31
- _cancelEvent(event) {
32
- event.stopPropagation();
33
- if (event.preventDefault) {
34
- event.preventDefault();
35
- }
36
- event.returnValue = false;
37
- }
38
- /**
39
- * Bind the mouse listeners to the given element
40
- */
41
- _bindListeners() {
42
- const element = this._element;
43
- element.addEventListener('contextmenu', this._contextMenuHandler, false);
44
- element.addEventListener('mousemove', this._mouseMoveHandler);
45
- element.addEventListener('mousedown', this._mouseDownHandler);
46
- element.addEventListener('mouseup', this._mouseUpHandler);
47
- element.addEventListener('mouseout', this._mouseOutHandler);
48
- ['DOMMouseScroll', 'mousewheel', 'wheel'].forEach(listener => {
49
- element.addEventListener(listener, this._mouseWheelHandler, { passive: false });
50
- });
51
- this.reset = this.reset.bind(this);
52
- }
53
- /**
54
- * Unbinds the mouse listeners
55
- */
56
- _unbindListeners() {
57
- const element = this._element;
58
- element.removeEventListener('contextmenu', this._contextMenuHandler, false);
59
- element.removeEventListener('mousemove', this._mouseMoveHandler);
60
- element.removeEventListener('mousedown', this._mouseDownHandler);
61
- element.removeEventListener('mouseup', this._mouseUpHandler);
62
- element.removeEventListener('mouseout', this._mouseOutHandler);
63
- ['DOMMouseScroll', 'mousewheel', 'wheel'].forEach(listener => {
64
- element.removeEventListener(listener, this._mouseWheelHandler);
65
- });
66
- this.reset = this.reset.bind(this);
67
- }
68
- /**
69
- * Creates the default state
70
- */
71
- _createDefaultState() {
72
- this._currentState = new mouse_1.WebXMouseState({
73
- x: 0,
74
- y: 0,
75
- left: false,
76
- middle: false,
77
- right: false,
78
- up: false,
79
- down: false
80
- });
81
- }
82
- /**
83
- * Process mouse up event
84
- * @param event the mouse event
85
- */
86
- _handleMouseUp(event) {
87
- switch (event.button) {
88
- case 0:
89
- this._currentState.left = false;
90
- break;
91
- case 1:
92
- this._currentState.middle = false;
93
- break;
94
- case 2:
95
- this._currentState.right = false;
96
- break;
97
- }
98
- this._notifyMouseUp();
99
- }
100
- /**
101
- * Process mouse down event
102
- * @param event the mouse event
103
- */
104
- _handleMouseDown(event) {
105
- this._cancelEvent(event);
106
- switch (event.button) {
107
- case 0:
108
- this._currentState.left = true;
109
- break;
110
- case 1:
111
- this._currentState.middle = true;
112
- break;
113
- case 2:
114
- this._currentState.right = true;
115
- break;
116
- }
117
- this._notifyMouseDown();
118
- }
119
- /**
120
- * Process mouse wheel event
121
- * @param event the mouse event
122
- */
123
- _handleMouseWheel(event) {
124
- if (event.deltaY < 0) {
125
- this._currentState.up = true;
126
- this._notifyMouseDown();
127
- this._currentState.up = false;
128
- this._notifyMouseUp();
129
- }
130
- if (event.deltaY > 0) {
131
- this._currentState.down = true;
132
- this._notifyMouseDown();
133
- this._currentState.down = false;
134
- this._notifyMouseUp();
135
- }
136
- this._cancelEvent(event);
137
- }
138
- /**
139
- * Process mouse out event
140
- */
141
- _handleMouseOut() {
142
- // reset all buttons
143
- this._currentState.releaseButtons();
144
- this._notifyMouseOut();
145
- }
146
- /**
147
- * Process the mouse move event
148
- * @param event the mouse event
149
- */
150
- _handleMouseMove(event) {
151
- this._cancelEvent(event);
152
- // get the container wrapping the display canvas element
153
- const bounds = this._element.firstElementChild.getBoundingClientRect();
154
- this._currentState.x = event.clientX - bounds.left;
155
- this._currentState.y = event.clientY - bounds.top;
156
- this._notifyMouseMove();
157
- }
158
- /**
159
- * Resets the mouse state
160
- */
161
- reset() {
162
- this._currentState.releaseButtons();
163
- }
164
- /**
165
- * Process the context menu event
166
- * Block context menu so right-click gets sent properly
167
- * @param event the mouse event
168
- */
169
- _handleContextMenu(event) {
170
- this._cancelEvent(event);
171
- }
172
- /**
173
- * Notify listener of the mouse move event
174
- * @Note: Sends a clone of the current state to avoid mutating the state
175
- */
176
- _notifyMouseMove() {
177
- this.onMouseMove(this._currentState.clone());
178
- }
179
- /**
180
- * Notify listener of the mouse up event
181
- * @Note: Sends a clone of the current state to avoid mutating the state
182
- */
183
- _notifyMouseUp() {
184
- this.onMouseUp(this._currentState.clone());
185
- }
186
- /**
187
- * Notify listener of the mouse down event
188
- * @Note: Sends a clone of the current state to avoid mutating the state
189
- */
190
- _notifyMouseDown() {
191
- this.onMouseDown(this._currentState.clone());
192
- }
193
- /**
194
- * Notify listener of the mouse out event
195
- * @Note: Sends a clone of the current state to avoid mutating the state
196
- */
197
- _notifyMouseOut() {
198
- this.onMouseOut(this._currentState.clone());
199
- }
200
- /**
201
- * Fired whenever the user moves the mouse
202
- * @param mouseState the current mouse state
203
- */
204
- onMouseMove(mouseState) { }
205
- /**
206
- * Fired whenever a mouse button is effectively pressed. This can happen
207
- * as part of a "click" gesture initiated by the user by tapping one
208
- * or more fingers over the touchpad element, as part of a "scroll"
209
- * gesture initiated by dragging two fingers up or down, etc.
210
- *
211
- * @param mouseState the current mouse state
212
- */
213
- onMouseDown(mouseState) { }
214
- /**
215
- * Fired whenever a mouse button is effectively released. This can happen
216
- * as part of a "click" gesture initiated by the user by tapping one
217
- * or more fingers over the touchpad element, as part of a "scroll"
218
- * gesture initiated by dragging two fingers up or down, etc.
219
- * @param mouseState the current mouse state
220
- */
221
- onMouseUp(mouseState) { }
222
- /**
223
- * Fired whenever the mouse leaves the boundaries of the element associated
224
- * with this mouse
225
- *
226
- * @param mouseState the current mouse state
227
- */
228
- onMouseOut(mouseState) { }
229
- }
230
- exports.WebXMouse = WebXMouse;
231
- //# sourceMappingURL=WebXMouse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WebXMouse.js","sourceRoot":"","sources":["../../../src/input/WebXMouse.ts"],"names":[],"mappings":";;;AAAA,mCAAyC;AAEzC,MAAa,SAAS;IAepB;;;OAGG;IACH,YAAoB,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAXjC,wBAAmB,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,sBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,sBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,oBAAe,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,qBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnD,uBAAkB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,C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IAEjD;;;;;;;OAOG;IACH,WAAW,CAAC,UAA0B,IAAU,CAAC;IAEjD;;;;;;OAMG;IACH,SAAS,CAAC,UAA0B,IAAU,CAAC;IAE/C;;;;;OAKG;IACH,UAAU,CAAC,UAA0B,IAAU,CAAC;CAEjD;AA9PD,8BA8PC"}
@@ -1,4 +0,0 @@
1
- export * from './WebXKeyboard';
2
- export * from './WebXMouse';
3
- export * from './mouse';
4
- export * from './keyboard';
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./WebXKeyboard"), exports);
18
- __exportStar(require("./WebXMouse"), exports);
19
- __exportStar(require("./mouse"), exports);
20
- __exportStar(require("./keyboard"), exports);
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/input/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,8CAA4B;AAC5B,0CAAwB;AACxB,6CAA2B"}
@@ -1,79 +0,0 @@
1
- /**
2
- * A key event having a corresponding timestamp. This event is non-specific.
3
- * Its subclasses should be used instead when recording specific key
4
- * events.
5
- *
6
- * Base class for all keyboard events in the WebX client.
7
- *
8
- * This class provides common properties and methods for handling keyboard events.
9
- */
10
- export declare abstract class WebXKeyEvent {
11
- /**
12
- * Map of known JavaScript keyidentifiers which do not map to typable
13
- * characters to their unshifted X11 keysym equivalents.
14
- */
15
- static keyidentifier_keysym: {
16
- [index: string]: Array<number>;
17
- };
18
- /**
19
- * Map of known JavaScript keycodes which do not map to typable characters
20
- * to their X11 keysym equivalents.
21
- */
22
- static keycodeKeysyms: {
23
- [index: number]: Array<number>;
24
- };
25
- /**
26
- * Whether the default action of this key event should be prevented.
27
- */
28
- protected _defaultPrevented: boolean;
29
- /**
30
- * The keysym of the key associated with this key event, as determined
31
- * by a best-effort guess using available event properties and keyboard
32
- * state.
33
- */
34
- protected _keysym: number;
35
- /**
36
- * Whether the keysym value of this key event is known to be reliable.
37
- * If false, the keysym may still be valid, but it's only a best guess,
38
- * and future key events may be a better source of information.
39
- */
40
- protected _reliable: boolean;
41
- /**
42
- * Gets whether the default action of this key event should be prevented.
43
- */
44
- get defaultPrevented(): boolean;
45
- /**
46
- * Sets whether the default action of this key event should be prevented.
47
- */
48
- set defaultPrevented(defaultPrevented: boolean);
49
- /**
50
- * Gets the keysym of the key associated with this key event.
51
- */
52
- get keysym(): number;
53
- /**
54
- * Sets the keysym of the key associated with this key event.
55
- */
56
- set keysym(keysym: number);
57
- /**
58
- * Gets whether the keysym value of this key event is reliable.
59
- */
60
- get reliable(): boolean;
61
- /**
62
- * Sets whether the keysym value of this key event is reliable.
63
- */
64
- set reliable(reliable: boolean);
65
- /**
66
- * Returns true if the given keysym corresponds to a printable character,
67
- * false otherwise.
68
- *
69
- * @returns {Boolean}
70
- * true if the given keysym corresponds to a printable character,
71
- * false otherwise.
72
- */
73
- isPrintable(): boolean;
74
- isControlCharacter(codepoint: number): boolean;
75
- keysymFromKeycode(keyCode: number, location: number): number;
76
- getKeysym(keysyms: Array<number>, location: number): number;
77
- keysymFromKeyIdentifier(identifier: any, location: any, shifted?: any): number;
78
- keyIdentifierSane(keyCode: number, keyIdentifier: string): boolean;
79
- }