input

package
v0.0.0-...-4fec7a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2017 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*rpc.Client
}

func (*Client) DispatchKeyEvent

func (d *Client) DispatchKeyEvent() *DispatchKeyEventRequest

Dispatches a key event to the page.

func (*Client) DispatchMouseEvent

func (d *Client) DispatchMouseEvent() *DispatchMouseEventRequest

Dispatches a mouse event to the page.

func (*Client) DispatchTouchEvent

func (d *Client) DispatchTouchEvent() *DispatchTouchEventRequest

Dispatches a touch event to the page. (experimental)

func (*Client) EmulateTouchFromMouseEvent

func (d *Client) EmulateTouchFromMouseEvent() *EmulateTouchFromMouseEventRequest

Emulates touch event from the mouse event parameters. (experimental)

func (*Client) SetIgnoreInputEvents

func (d *Client) SetIgnoreInputEvents() *SetIgnoreInputEventsRequest

Ignores input events (useful while auditing page).

func (*Client) SynthesizePinchGesture

func (d *Client) SynthesizePinchGesture() *SynthesizePinchGestureRequest

Synthesizes a pinch gesture over a time period by issuing appropriate touch events. (experimental)

func (*Client) SynthesizeScrollGesture

func (d *Client) SynthesizeScrollGesture() *SynthesizeScrollGestureRequest

Synthesizes a scroll gesture over a time period by issuing appropriate touch events. (experimental)

func (*Client) SynthesizeTapGesture

func (d *Client) SynthesizeTapGesture() *SynthesizeTapGestureRequest

Synthesizes a tap gesture over a time period by issuing appropriate touch events. (experimental)

type DispatchKeyEventRequest

type DispatchKeyEventRequest struct {
	// contains filtered or unexported fields
}

func (*DispatchKeyEventRequest) AutoRepeat

Whether the event was generated from auto repeat (default: false). (optional)

func (*DispatchKeyEventRequest) Code

Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: ""). (optional)

func (*DispatchKeyEventRequest) Do

func (*DispatchKeyEventRequest) IsKeypad

Whether the event was generated from the keypad (default: false). (optional)

func (*DispatchKeyEventRequest) IsSystemKey

Whether the event was a system key event (default: false). (optional)

func (*DispatchKeyEventRequest) Key

Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: ""). (optional)

func (*DispatchKeyEventRequest) KeyIdentifier

Unique key identifier (e.g., 'U+0041') (default: ""). (optional)

func (*DispatchKeyEventRequest) Modifiers

Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional)

func (*DispatchKeyEventRequest) NativeVirtualKeyCode

func (r *DispatchKeyEventRequest) NativeVirtualKeyCode(v int) *DispatchKeyEventRequest

Native virtual key code (default: 0). (optional)

func (*DispatchKeyEventRequest) Text

Text as generated by processing a virtual key code with a keyboard layout. Not needed for for <code>keyUp</code> and <code>rawKeyDown</code> events (default: "") (optional)

func (*DispatchKeyEventRequest) Timestamp

Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time). (optional)

func (*DispatchKeyEventRequest) Type

Type of the key event.

func (*DispatchKeyEventRequest) UnmodifiedText

Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: ""). (optional)

func (*DispatchKeyEventRequest) WindowsVirtualKeyCode

func (r *DispatchKeyEventRequest) WindowsVirtualKeyCode(v int) *DispatchKeyEventRequest

Windows virtual key code (default: 0). (optional)

type DispatchMouseEventRequest

type DispatchMouseEventRequest struct {
	// contains filtered or unexported fields
}

func (*DispatchMouseEventRequest) Button

Mouse button (default: "none"). (optional)

func (*DispatchMouseEventRequest) ClickCount

Number of times the mouse button was clicked (default: 0). (optional)

func (*DispatchMouseEventRequest) Do

func (*DispatchMouseEventRequest) Modifiers

Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional)

func (*DispatchMouseEventRequest) Timestamp

Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time). (optional)

func (*DispatchMouseEventRequest) Type

Type of the mouse event.

func (*DispatchMouseEventRequest) X

X coordinate of the event relative to the main frame's viewport.

func (*DispatchMouseEventRequest) Y

Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.

type DispatchTouchEventRequest

type DispatchTouchEventRequest struct {
	// contains filtered or unexported fields
}

func (*DispatchTouchEventRequest) Do

func (*DispatchTouchEventRequest) Modifiers

Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional)

func (*DispatchTouchEventRequest) Timestamp

Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time). (optional)

func (*DispatchTouchEventRequest) TouchPoints

Touch points.

func (*DispatchTouchEventRequest) Type

Type of the touch event.

type EmulateTouchFromMouseEventRequest

type EmulateTouchFromMouseEventRequest struct {
	// contains filtered or unexported fields
}

func (*EmulateTouchFromMouseEventRequest) Button

Mouse button.

func (*EmulateTouchFromMouseEventRequest) ClickCount

Number of times the mouse button was clicked (default: 0). (optional)

func (*EmulateTouchFromMouseEventRequest) DeltaX

X delta in DIP for mouse wheel event (default: 0). (optional)

func (*EmulateTouchFromMouseEventRequest) DeltaY

Y delta in DIP for mouse wheel event (default: 0). (optional)

func (*EmulateTouchFromMouseEventRequest) Do

func (*EmulateTouchFromMouseEventRequest) Modifiers

Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). (optional)

func (*EmulateTouchFromMouseEventRequest) Timestamp

Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970.

func (*EmulateTouchFromMouseEventRequest) Type

Type of the mouse event.

func (*EmulateTouchFromMouseEventRequest) X

X coordinate of the mouse pointer in DIP.

func (*EmulateTouchFromMouseEventRequest) Y

Y coordinate of the mouse pointer in DIP.

type GestureSourceType

type GestureSourceType string

type SetIgnoreInputEventsRequest

type SetIgnoreInputEventsRequest struct {
	// contains filtered or unexported fields
}

func (*SetIgnoreInputEventsRequest) Do

func (*SetIgnoreInputEventsRequest) Ignore

Ignores input events processing when set to true.

type SynthesizePinchGestureRequest

type SynthesizePinchGestureRequest struct {
	// contains filtered or unexported fields
}

func (*SynthesizePinchGestureRequest) Do

func (*SynthesizePinchGestureRequest) GestureSourceType

Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). (optional)

func (*SynthesizePinchGestureRequest) RelativeSpeed

Relative pointer speed in pixels per second (default: 800). (optional)

func (*SynthesizePinchGestureRequest) ScaleFactor

Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).

func (*SynthesizePinchGestureRequest) X

X coordinate of the start of the gesture in CSS pixels.

func (*SynthesizePinchGestureRequest) Y

Y coordinate of the start of the gesture in CSS pixels.

type SynthesizeScrollGestureRequest

type SynthesizeScrollGestureRequest struct {
	// contains filtered or unexported fields
}

func (*SynthesizeScrollGestureRequest) Do

func (*SynthesizeScrollGestureRequest) GestureSourceType

Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). (optional)

func (*SynthesizeScrollGestureRequest) InteractionMarkerName

The name of the interaction markers to generate, if not empty (default: ""). (optional)

func (*SynthesizeScrollGestureRequest) PreventFling

Prevent fling (default: true). (optional)

func (*SynthesizeScrollGestureRequest) RepeatCount

The number of times to repeat the gesture (default: 0). (optional)

func (*SynthesizeScrollGestureRequest) RepeatDelayMs

The number of milliseconds delay between each repeat. (default: 250). (optional)

func (*SynthesizeScrollGestureRequest) Speed

Swipe speed in pixels per second (default: 800). (optional)

func (*SynthesizeScrollGestureRequest) X

X coordinate of the start of the gesture in CSS pixels.

func (*SynthesizeScrollGestureRequest) XDistance

The distance to scroll along the X axis (positive to scroll left). (optional)

func (*SynthesizeScrollGestureRequest) XOverscroll

The number of additional pixels to scroll back along the X axis, in addition to the given distance. (optional)

func (*SynthesizeScrollGestureRequest) Y

Y coordinate of the start of the gesture in CSS pixels.

func (*SynthesizeScrollGestureRequest) YDistance

The distance to scroll along the Y axis (positive to scroll up). (optional)

func (*SynthesizeScrollGestureRequest) YOverscroll

The number of additional pixels to scroll back along the Y axis, in addition to the given distance. (optional)

type SynthesizeTapGestureRequest

type SynthesizeTapGestureRequest struct {
	// contains filtered or unexported fields
}

func (*SynthesizeTapGestureRequest) Do

func (*SynthesizeTapGestureRequest) Duration

Duration between touchdown and touchup events in ms (default: 50). (optional)

func (*SynthesizeTapGestureRequest) GestureSourceType

Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). (optional)

func (*SynthesizeTapGestureRequest) TapCount

Number of times to perform the tap (e.g. 2 for double tap, default: 1). (optional)

func (*SynthesizeTapGestureRequest) X

X coordinate of the start of the gesture in CSS pixels.

func (*SynthesizeTapGestureRequest) Y

Y coordinate of the start of the gesture in CSS pixels.

type TouchPoint

type TouchPoint struct {
	// State of the touch point.
	State string `json:"state"`

	// X coordinate of the event relative to the main frame's viewport.
	X int `json:"x"`

	// Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
	Y int `json:"y"`

	// X radius of the touch area (default: 1). (optional)
	RadiusX int `json:"radiusX,omitempty"`

	// Y radius of the touch area (default: 1). (optional)
	RadiusY int `json:"radiusY,omitempty"`

	// Rotation angle (default: 0.0). (optional)
	RotationAngle float64 `json:"rotationAngle,omitempty"`

	// Force (default: 1.0). (optional)
	Force float64 `json:"force,omitempty"`

	// Identifier used to track touch sources between events, must be unique within an event. (optional)
	Id float64 `json:"id,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL