@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.
- package/dist/input/GuacamoleKeyboard.js +118 -99
- package/dist/input/WebXKeyboard.d.ts +0 -16
- package/dist/input/WebXKeyboard.js +3 -27
- package/dist/input/WebXKeyboard.js.map +1 -1
- package/package.json +1 -1
- package/dist/display/WebXMaterialProvider.d.ts +0 -8
- package/dist/display/WebXMaterialProvider.js +0 -71
- package/dist/display/WebXMaterialProvider.js.map +0 -1
- package/dist/input/WebXNewKeyboard.d.ts +0 -62
- package/dist/input/WebXNewKeyboard.js +0 -94
- package/dist/input/WebXNewKeyboard.js.map +0 -1
- package/dist/input/keyboard/WebXKeyEvent.d.ts +0 -79
- package/dist/input/keyboard/WebXKeyEvent.js +0 -324
- package/dist/input/keyboard/WebXKeyEvent.js.map +0 -1
- package/dist/input/keyboard/WebXKeyPressEvent.d.ts +0 -30
- package/dist/input/keyboard/WebXKeyPressEvent.js +0 -44
- package/dist/input/keyboard/WebXKeyPressEvent.js.map +0 -1
- package/dist/input/keyboard/WebXKeyUpEvent.d.ts +0 -33
- package/dist/input/keyboard/WebXKeyUpEvent.js +0 -31
- package/dist/input/keyboard/WebXKeyUpEvent.js.map +0 -1
- package/dist/input/keyboard/WebXKeyboardModifierState.d.ts +0 -108
- package/dist/input/keyboard/WebXKeyboardModifierState.js +0 -148
- package/dist/input/keyboard/WebXKeyboardModifierState.js.map +0 -1
- package/dist/input/keyboard/WebXKeyboardUtils.d.ts +0 -25
- package/dist/input/keyboard/WebXKeyboardUtils.js +0 -63
- package/dist/input/keyboard/WebXKeyboardUtils.js.map +0 -1
- package/dist/input/keyboard/WebXKeydownEvent.d.ts +0 -46
- package/dist/input/keyboard/WebXKeydownEvent.js +0 -66
- package/dist/input/keyboard/WebXKeydownEvent.js.map +0 -1
- package/dist/input/keyboard/index.d.ts +0 -6
- package/dist/input/keyboard/index.js +0 -23
- package/dist/input/keyboard/index.js.map +0 -1
- package/dist/lib/GuacamoleKeyboard.js +0 -1290
- package/dist/lib/GuacamoleKeyboard.js.map +0 -1
- package/dist/message/WebXPollMessage.d.ts +0 -4
- package/dist/message/WebXPollMessage.js +0 -12
- package/dist/message/WebXPollMessage.js.map +0 -1
- package/dist/src/WebXClient.d.ts +0 -261
- package/dist/src/WebXClient.js +0 -571
- package/dist/src/WebXClient.js.map +0 -1
- package/dist/src/WebXEngine.d.ts +0 -4
- package/dist/src/WebXEngine.js +0 -7
- package/dist/src/WebXEngine.js.map +0 -1
- package/dist/src/display/WebXCursor.d.ts +0 -88
- package/dist/src/display/WebXCursor.js +0 -150
- package/dist/src/display/WebXCursor.js.map +0 -1
- package/dist/src/display/WebXCursorFactory.d.ts +0 -36
- package/dist/src/display/WebXCursorFactory.js +0 -59
- package/dist/src/display/WebXCursorFactory.js.map +0 -1
- package/dist/src/display/WebXDisplay.d.ts +0 -226
- package/dist/src/display/WebXDisplay.js +0 -424
- package/dist/src/display/WebXDisplay.js.map +0 -1
- package/dist/src/display/WebXMaterial.d.ts +0 -14
- package/dist/src/display/WebXMaterial.js +0 -140
- package/dist/src/display/WebXMaterial.js.map +0 -1
- package/dist/src/display/WebXSubImage.d.ts +0 -50
- package/dist/src/display/WebXSubImage.js +0 -26
- package/dist/src/display/WebXSubImage.js.map +0 -1
- package/dist/src/display/WebXTextureFactory.d.ts +0 -54
- package/dist/src/display/WebXTextureFactory.js +0 -160
- package/dist/src/display/WebXTextureFactory.js.map +0 -1
- package/dist/src/display/WebXWindow.d.ts +0 -241
- package/dist/src/display/WebXWindow.js +0 -438
- package/dist/src/display/WebXWindow.js.map +0 -1
- package/dist/src/display/WebXWindowProperties.d.ts +0 -44
- package/dist/src/display/WebXWindowProperties.js +0 -25
- package/dist/src/display/WebXWindowProperties.js.map +0 -1
- package/dist/src/display/index.d.ts +0 -7
- package/dist/src/display/index.js +0 -24
- package/dist/src/display/index.js.map +0 -1
- package/dist/src/index.d.ts +0 -7
- package/dist/src/index.js +0 -24
- package/dist/src/index.js.map +0 -1
- package/dist/src/input/WebXKeyboard.d.ts +0 -265
- package/dist/src/input/WebXKeyboard.js +0 -632
- package/dist/src/input/WebXKeyboard.js.map +0 -1
- package/dist/src/input/WebXMouse.d.ts +0 -125
- package/dist/src/input/WebXMouse.js +0 -231
- package/dist/src/input/WebXMouse.js.map +0 -1
- package/dist/src/input/index.d.ts +0 -4
- package/dist/src/input/index.js +0 -21
- package/dist/src/input/index.js.map +0 -1
- package/dist/src/input/keyboard/WebXKeyEvent.d.ts +0 -79
- package/dist/src/input/keyboard/WebXKeyEvent.js +0 -324
- package/dist/src/input/keyboard/WebXKeyEvent.js.map +0 -1
- package/dist/src/input/keyboard/WebXKeyPressEvent.d.ts +0 -30
- package/dist/src/input/keyboard/WebXKeyPressEvent.js +0 -44
- package/dist/src/input/keyboard/WebXKeyPressEvent.js.map +0 -1
- package/dist/src/input/keyboard/WebXKeyUpEvent.d.ts +0 -33
- package/dist/src/input/keyboard/WebXKeyUpEvent.js +0 -31
- package/dist/src/input/keyboard/WebXKeyUpEvent.js.map +0 -1
- package/dist/src/input/keyboard/WebXKeyboardModifierState.d.ts +0 -108
- package/dist/src/input/keyboard/WebXKeyboardModifierState.js +0 -148
- package/dist/src/input/keyboard/WebXKeyboardModifierState.js.map +0 -1
- package/dist/src/input/keyboard/WebXKeyboardUtils.d.ts +0 -25
- package/dist/src/input/keyboard/WebXKeyboardUtils.js +0 -63
- package/dist/src/input/keyboard/WebXKeyboardUtils.js.map +0 -1
- package/dist/src/input/keyboard/WebXKeydownEvent.d.ts +0 -46
- package/dist/src/input/keyboard/WebXKeydownEvent.js +0 -66
- package/dist/src/input/keyboard/WebXKeydownEvent.js.map +0 -1
- package/dist/src/input/keyboard/index.d.ts +0 -6
- package/dist/src/input/keyboard/index.js +0 -23
- package/dist/src/input/keyboard/index.js.map +0 -1
- package/dist/src/input/mouse/WebXMouseState.d.ts +0 -190
- package/dist/src/input/mouse/WebXMouseState.js +0 -217
- package/dist/src/input/mouse/WebXMouseState.js.map +0 -1
- package/dist/src/input/mouse/index.d.ts +0 -1
- package/dist/src/input/mouse/index.js +0 -18
- package/dist/src/input/mouse/index.js.map +0 -1
- package/dist/src/instruction/WebXClipboardInstruction.d.ts +0 -18
- package/dist/src/instruction/WebXClipboardInstruction.js +0 -23
- package/dist/src/instruction/WebXClipboardInstruction.js.map +0 -1
- package/dist/src/instruction/WebXConnectInstruction.d.ts +0 -19
- package/dist/src/instruction/WebXConnectInstruction.js +0 -24
- package/dist/src/instruction/WebXConnectInstruction.js.map +0 -1
- package/dist/src/instruction/WebXCursorImageInstruction.d.ts +0 -18
- package/dist/src/instruction/WebXCursorImageInstruction.js +0 -23
- package/dist/src/instruction/WebXCursorImageInstruction.js.map +0 -1
- package/dist/src/instruction/WebXDataAckInstruction.d.ts +0 -25
- package/dist/src/instruction/WebXDataAckInstruction.js +0 -26
- package/dist/src/instruction/WebXDataAckInstruction.js.map +0 -1
- package/dist/src/instruction/WebXImageInstruction.d.ts +0 -18
- package/dist/src/instruction/WebXImageInstruction.js +0 -23
- package/dist/src/instruction/WebXImageInstruction.js.map +0 -1
- package/dist/src/instruction/WebXInstruction.d.ts +0 -29
- package/dist/src/instruction/WebXInstruction.js +0 -28
- package/dist/src/instruction/WebXInstruction.js.map +0 -1
- package/dist/src/instruction/WebXInstructionResponse.d.ts +0 -66
- package/dist/src/instruction/WebXInstructionResponse.js +0 -78
- package/dist/src/instruction/WebXInstructionResponse.js.map +0 -1
- package/dist/src/instruction/WebXInstructionType.d.ts +0 -63
- package/dist/src/instruction/WebXInstructionType.js +0 -96
- package/dist/src/instruction/WebXInstructionType.js.map +0 -1
- package/dist/src/instruction/WebXKeyboardInstruction.d.ts +0 -23
- package/dist/src/instruction/WebXKeyboardInstruction.js +0 -25
- package/dist/src/instruction/WebXKeyboardInstruction.js.map +0 -1
- package/dist/src/instruction/WebXMouseInstruction.d.ts +0 -28
- package/dist/src/instruction/WebXMouseInstruction.js +0 -27
- package/dist/src/instruction/WebXMouseInstruction.js.map +0 -1
- package/dist/src/instruction/WebXPongInstruction.d.ts +0 -18
- package/dist/src/instruction/WebXPongInstruction.js +0 -23
- package/dist/src/instruction/WebXPongInstruction.js.map +0 -1
- package/dist/src/instruction/WebXQualityInstruction.d.ts +0 -19
- package/dist/src/instruction/WebXQualityInstruction.js +0 -24
- package/dist/src/instruction/WebXQualityInstruction.js.map +0 -1
- package/dist/src/instruction/WebXScreenInstruction.d.ts +0 -12
- package/dist/src/instruction/WebXScreenInstruction.js +0 -20
- package/dist/src/instruction/WebXScreenInstruction.js.map +0 -1
- package/dist/src/instruction/WebXShapeInstruction.d.ts +0 -18
- package/dist/src/instruction/WebXShapeInstruction.js +0 -23
- package/dist/src/instruction/WebXShapeInstruction.js.map +0 -1
- package/dist/src/instruction/WebXWindowsInstruction.d.ts +0 -13
- package/dist/src/instruction/WebXWindowsInstruction.js +0 -21
- package/dist/src/instruction/WebXWindowsInstruction.js.map +0 -1
- package/dist/src/instruction/index.d.ts +0 -15
- package/dist/src/instruction/index.js +0 -32
- package/dist/src/instruction/index.js.map +0 -1
- package/dist/src/message/WebXClipboardMessage.d.ts +0 -19
- package/dist/src/message/WebXClipboardMessage.js +0 -23
- package/dist/src/message/WebXClipboardMessage.js.map +0 -1
- package/dist/src/message/WebXConnectionMessage.d.ts +0 -12
- package/dist/src/message/WebXConnectionMessage.js +0 -20
- package/dist/src/message/WebXConnectionMessage.js.map +0 -1
- package/dist/src/message/WebXCursorImageMessage.d.ts +0 -46
- package/dist/src/message/WebXCursorImageMessage.js +0 -35
- package/dist/src/message/WebXCursorImageMessage.js.map +0 -1
- package/dist/src/message/WebXImageMessage.d.ts +0 -41
- package/dist/src/message/WebXImageMessage.js +0 -33
- package/dist/src/message/WebXImageMessage.js.map +0 -1
- package/dist/src/message/WebXMessage.d.ts +0 -24
- package/dist/src/message/WebXMessage.js +0 -23
- package/dist/src/message/WebXMessage.js.map +0 -1
- package/dist/src/message/WebXMessageType.d.ts +0 -59
- package/dist/src/message/WebXMessageType.js +0 -64
- package/dist/src/message/WebXMessageType.js.map +0 -1
- package/dist/src/message/WebXMouseMessage.d.ts +0 -30
- package/dist/src/message/WebXMouseMessage.js +0 -29
- package/dist/src/message/WebXMouseMessage.js.map +0 -1
- package/dist/src/message/WebXNopMessage.d.ts +0 -10
- package/dist/src/message/WebXNopMessage.js +0 -18
- package/dist/src/message/WebXNopMessage.js.map +0 -1
- package/dist/src/message/WebXPingMessage.d.ts +0 -13
- package/dist/src/message/WebXPingMessage.js +0 -21
- package/dist/src/message/WebXPingMessage.js.map +0 -1
- package/dist/src/message/WebXQualityMessage.d.ts +0 -39
- package/dist/src/message/WebXQualityMessage.js +0 -32
- package/dist/src/message/WebXQualityMessage.js.map +0 -1
- package/dist/src/message/WebXScreenMessage.d.ts +0 -37
- package/dist/src/message/WebXScreenMessage.js +0 -29
- package/dist/src/message/WebXScreenMessage.js.map +0 -1
- package/dist/src/message/WebXShapeMessage.d.ts +0 -31
- package/dist/src/message/WebXShapeMessage.js +0 -29
- package/dist/src/message/WebXShapeMessage.js.map +0 -1
- package/dist/src/message/WebXSubImagesMessage.d.ts +0 -31
- package/dist/src/message/WebXSubImagesMessage.js +0 -29
- package/dist/src/message/WebXSubImagesMessage.js.map +0 -1
- package/dist/src/message/WebXWindowsMessage.d.ts +0 -21
- package/dist/src/message/WebXWindowsMessage.js +0 -25
- package/dist/src/message/WebXWindowsMessage.js.map +0 -1
- package/dist/src/message/index.d.ts +0 -14
- package/dist/src/message/index.js +0 -31
- package/dist/src/message/index.js.map +0 -1
- package/dist/src/tracer/WebXDebugImageMessageHandler.d.ts +0 -48
- package/dist/src/tracer/WebXDebugImageMessageHandler.js +0 -102
- package/dist/src/tracer/WebXDebugImageMessageHandler.js.map +0 -1
- package/dist/src/tracer/WebXHandler.d.ts +0 -14
- package/dist/src/tracer/WebXHandler.js +0 -3
- package/dist/src/tracer/WebXHandler.js.map +0 -1
- package/dist/src/tracer/WebXInstructionHandler.d.ts +0 -21
- package/dist/src/tracer/WebXInstructionHandler.js +0 -13
- package/dist/src/tracer/WebXInstructionHandler.js.map +0 -1
- package/dist/src/tracer/WebXMessageHandler.d.ts +0 -21
- package/dist/src/tracer/WebXMessageHandler.js +0 -13
- package/dist/src/tracer/WebXMessageHandler.js.map +0 -1
- package/dist/src/tracer/WebXStatsHandler.d.ts +0 -23
- package/dist/src/tracer/WebXStatsHandler.js +0 -13
- package/dist/src/tracer/WebXStatsHandler.js.map +0 -1
- package/dist/src/tracer/index.d.ts +0 -5
- package/dist/src/tracer/index.js +0 -22
- package/dist/src/tracer/index.js.map +0 -1
- package/dist/src/transport/WebXBinarySerializer.d.ts +0 -31
- package/dist/src/transport/WebXBinarySerializer.js +0 -63
- package/dist/src/transport/WebXBinarySerializer.js.map +0 -1
- package/dist/src/transport/WebXInstructionBuffer.d.ts +0 -55
- package/dist/src/transport/WebXInstructionBuffer.js +0 -109
- package/dist/src/transport/WebXInstructionBuffer.js.map +0 -1
- package/dist/src/transport/WebXInstructionEncoder.d.ts +0 -181
- package/dist/src/transport/WebXInstructionEncoder.js +0 -294
- package/dist/src/transport/WebXInstructionEncoder.js.map +0 -1
- package/dist/src/transport/WebXMessageBuffer.d.ts +0 -80
- package/dist/src/transport/WebXMessageBuffer.js +0 -104
- package/dist/src/transport/WebXMessageBuffer.js.map +0 -1
- package/dist/src/transport/WebXMessageDecoder.d.ts +0 -108
- package/dist/src/transport/WebXMessageDecoder.js +0 -332
- package/dist/src/transport/WebXMessageDecoder.js.map +0 -1
- package/dist/src/transport/index.d.ts +0 -5
- package/dist/src/transport/index.js +0 -22
- package/dist/src/transport/index.js.map +0 -1
- package/dist/src/tunnel/WebXTunnel.d.ts +0 -93
- package/dist/src/tunnel/WebXTunnel.js +0 -156
- package/dist/src/tunnel/WebXTunnel.js.map +0 -1
- package/dist/src/tunnel/WebXWebSocketTunnel.d.ts +0 -40
- package/dist/src/tunnel/WebXWebSocketTunnel.js +0 -88
- package/dist/src/tunnel/WebXWebSocketTunnel.js.map +0 -1
- package/dist/src/tunnel/index.d.ts +0 -2
- package/dist/src/tunnel/index.js +0 -19
- package/dist/src/tunnel/index.js.map +0 -1
- package/dist/src/utils/WebXColorGenerator.d.ts +0 -24
- package/dist/src/utils/WebXColorGenerator.js +0 -46
- package/dist/src/utils/WebXColorGenerator.js.map +0 -1
- package/dist/src/utils/WebXVersion.d.ts +0 -34
- package/dist/src/utils/WebXVersion.js +0 -25
- package/dist/src/utils/WebXVersion.js.map +0 -1
- package/dist/src/utils/index.d.ts +0 -2
- package/dist/src/utils/index.js +0 -19
- package/dist/src/utils/index.js.map +0 -1
- package/dist/tracer/DemoVisualMessageHandler.d.ts +0 -15
- package/dist/tracer/DemoVisualMessageHandler.js +0 -55
- package/dist/tracer/DemoVisualMessageHandler.js.map +0 -1
- package/dist/tracer/WebXVisualMessageHandler.d.ts +0 -15
- package/dist/tracer/WebXVisualMessageHandler.js +0 -55
- package/dist/tracer/WebXVisualMessageHandler.js.map +0 -1
- package/dist/tunnel/WebXDefaultQoSHandler.d.ts +0 -16
- package/dist/tunnel/WebXDefaultQoSHandler.js +0 -57
- package/dist/tunnel/WebXDefaultQoSHandler.js.map +0 -1
- package/dist/tunnel/WebXQoSHandler.d.ts +0 -6
- package/dist/tunnel/WebXQoSHandler.js +0 -7
- package/dist/tunnel/WebXQoSHandler.js.map +0 -1
- package/dist/tunnel/WebXSocketIOTunnel.d.ts +0 -15
- package/dist/tunnel/WebXSocketIOTunnel.js +0 -41
- package/dist/tunnel/WebXSocketIOTunnel.js.map +0 -1
- package/dist/utils/ColorGenerator.d.ts +0 -24
- package/dist/utils/ColorGenerator.js +0 -46
- package/dist/utils/ColorGenerator.js.map +0 -1
- package/dist/utils/Config.d.ts +0 -4
- package/dist/utils/Config.js +0 -10
- package/dist/utils/Config.js.map +0 -1
- package/dist/utils/WebXAsyncExec.d.ts +0 -5
- package/dist/utils/WebXAsyncExec.js +0 -18
- package/dist/utils/WebXAsyncExec.js.map +0 -1
- package/dist/utils/WebXColourGenerator.d.ts +0 -5
- package/dist/utils/WebXColourGenerator.js +0 -27
- package/dist/utils/WebXColourGenerator.js.map +0 -1
- package/dist/utils/WebXFileSize.d.ts +0 -3
- package/dist/utils/WebXFileSize.js +0 -14
- 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,CAAC,IAAI,CAAC,CAAC;QAO7D,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,mBAAmB,EAA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C,UAA0B,IAAU,CAAC;IAE/C;;;;;OAKG;IACH,UAAU,CAAC,UAA0B,IAAU,CAAC;CAEjD;AA9PD,8BA8PC"}
|
package/dist/src/input/index.js
DELETED
|
@@ -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
|
-
}
|