cdp_driver/methods/input.rs
1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! The `Input` domain.
5//!
6//! Method names for the `Input` domain, for use with
7//! [`CdpClient::call`](crate::CdpClient::call).
8
9/// Dispatches a drag event into the page.
10///
11/// Experimental: may change without notice.
12///
13/// Parameters:
14/// - `type`: string
15/// - `x`: number
16/// - `y`: number
17/// - `data`: DragData
18/// - `modifiers`: integer (optional)
19pub const DISPATCH_DRAG_EVENT: &str = "Input.dispatchDragEvent";
20
21/// Dispatches a key event to the page.
22///
23/// Parameters:
24/// - `type`: string
25/// - `modifiers`: integer (optional)
26/// - `timestamp`: TimeSinceEpoch (optional)
27/// - `text`: string (optional)
28/// - `unmodifiedText`: string (optional)
29/// - `keyIdentifier`: string (optional)
30/// - `code`: string (optional)
31/// - `key`: string (optional)
32/// - `windowsVirtualKeyCode`: integer (optional)
33/// - `nativeVirtualKeyCode`: integer (optional)
34/// - `autoRepeat`: boolean (optional)
35/// - `isKeypad`: boolean (optional)
36/// - `isSystemKey`: boolean (optional)
37/// - `location`: integer (optional)
38/// - `commands`: array (optional)
39pub const DISPATCH_KEY_EVENT: &str = "Input.dispatchKeyEvent";
40
41/// This method emulates inserting text that doesn't come from a key press,
42/// for example an emoji keyboard or an IME.
43///
44/// Experimental: may change without notice.
45///
46/// Parameters:
47/// - `text`: string
48pub const INSERT_TEXT: &str = "Input.insertText";
49
50/// This method sets the current candidate text for IME. Use
51/// imeCommitComposition to commit the final text. Use imeSetComposition with
52/// empty string as text to cancel composition.
53///
54/// Experimental: may change without notice.
55///
56/// Parameters:
57/// - `text`: string
58/// - `selectionStart`: integer
59/// - `selectionEnd`: integer
60/// - `replacementStart`: integer (optional)
61/// - `replacementEnd`: integer (optional)
62pub const IME_SET_COMPOSITION: &str = "Input.imeSetComposition";
63
64/// Dispatches a mouse event to the page.
65///
66/// Parameters:
67/// - `type`: string
68/// - `x`: number
69/// - `y`: number
70/// - `modifiers`: integer (optional)
71/// - `timestamp`: TimeSinceEpoch (optional)
72/// - `button`: MouseButton (optional)
73/// - `buttons`: integer (optional)
74/// - `clickCount`: integer (optional)
75/// - `force`: number (optional)
76/// - `tangentialPressure`: number (optional)
77/// - `tiltX`: number (optional)
78/// - `tiltY`: number (optional)
79/// - `twist`: integer (optional)
80/// - `deltaX`: number (optional)
81/// - `deltaY`: number (optional)
82/// - `pointerType`: string (optional)
83pub const DISPATCH_MOUSE_EVENT: &str = "Input.dispatchMouseEvent";
84
85/// Dispatches a touch event to the page.
86///
87/// Parameters:
88/// - `type`: string
89/// - `touchPoints`: array
90/// - `modifiers`: integer (optional)
91/// - `timestamp`: TimeSinceEpoch (optional)
92pub const DISPATCH_TOUCH_EVENT: &str = "Input.dispatchTouchEvent";
93
94/// Cancels any active dragging in the page.
95pub const CANCEL_DRAGGING: &str = "Input.cancelDragging";
96
97/// Emulates touch event from the mouse event parameters.
98///
99/// Experimental: may change without notice.
100///
101/// Parameters:
102/// - `type`: string
103/// - `x`: integer
104/// - `y`: integer
105/// - `button`: MouseButton
106/// - `timestamp`: TimeSinceEpoch (optional)
107/// - `deltaX`: number (optional)
108/// - `deltaY`: number (optional)
109/// - `modifiers`: integer (optional)
110/// - `clickCount`: integer (optional)
111pub const EMULATE_TOUCH_FROM_MOUSE_EVENT: &str = "Input.emulateTouchFromMouseEvent";
112
113/// Ignores input events (useful while auditing page).
114///
115/// Parameters:
116/// - `ignore`: boolean
117pub const SET_IGNORE_INPUT_EVENTS: &str = "Input.setIgnoreInputEvents";
118
119/// Prevents default drag and drop behavior and instead emits
120/// `Input.dragIntercepted` events. Drag and drop behavior can be directly
121/// controlled via `Input.dispatchDragEvent`.
122///
123/// Experimental: may change without notice.
124///
125/// Parameters:
126/// - `enabled`: boolean
127pub const SET_INTERCEPT_DRAGS: &str = "Input.setInterceptDrags";
128
129/// Synthesizes a pinch gesture over a time period by issuing appropriate
130/// touch events.
131///
132/// Experimental: may change without notice.
133///
134/// Parameters:
135/// - `x`: number
136/// - `y`: number
137/// - `scaleFactor`: number
138/// - `relativeSpeed`: integer (optional)
139/// - `gestureSourceType`: GestureSourceType (optional)
140pub const SYNTHESIZE_PINCH_GESTURE: &str = "Input.synthesizePinchGesture";
141
142/// Synthesizes a scroll gesture over a time period by issuing appropriate
143/// touch events.
144///
145/// Experimental: may change without notice.
146///
147/// Parameters:
148/// - `x`: number
149/// - `y`: number
150/// - `xDistance`: number (optional)
151/// - `yDistance`: number (optional)
152/// - `xOverscroll`: number (optional)
153/// - `yOverscroll`: number (optional)
154/// - `preventFling`: boolean (optional)
155/// - `speed`: integer (optional)
156/// - `gestureSourceType`: GestureSourceType (optional)
157/// - `repeatCount`: integer (optional)
158/// - `repeatDelayMs`: integer (optional)
159/// - `interactionMarkerName`: string (optional)
160pub const SYNTHESIZE_SCROLL_GESTURE: &str = "Input.synthesizeScrollGesture";
161
162/// Synthesizes a tap gesture over a time period by issuing appropriate touch
163/// events.
164///
165/// Experimental: may change without notice.
166///
167/// Parameters:
168/// - `x`: number
169/// - `y`: number
170/// - `duration`: integer (optional)
171/// - `tapCount`: integer (optional)
172/// - `gestureSourceType`: GestureSourceType (optional)
173pub const SYNTHESIZE_TAP_GESTURE: &str = "Input.synthesizeTapGesture";