input

package
Version: v0.0.0-...-ccdd204 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package input provides the Chrome Debugging Protocol commands, types, and events for the Input domain.

Generated by the chromedp-gen command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ButtonType

type ButtonType string

ButtonType mouse button (default: "none").

const (
	ButtonNone   ButtonType = "none"
	ButtonLeft   ButtonType = "left"
	ButtonMiddle ButtonType = "middle"
	ButtonRight  ButtonType = "right"
)

ButtonType values.

func (ButtonType) MarshalEasyJSON

func (t ButtonType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (ButtonType) MarshalJSON

func (t ButtonType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (ButtonType) String

func (t ButtonType) String() string

String returns the ButtonType as string value.

func (*ButtonType) UnmarshalEasyJSON

func (t *ButtonType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*ButtonType) UnmarshalJSON

func (t *ButtonType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type DispatchKeyEventParams

type DispatchKeyEventParams struct {
	Type                  KeyType        `json:"type"`                            // Type of the key event.
	Modifiers             Modifier       `json:"modifiers,omitempty"`             // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Timestamp             *cdp.Timestamp `json:"timestamp,omitempty"`             // Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time).
	Text                  string         `json:"text,omitempty"`                  // Text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp and rawKeyDown events (default: "")
	UnmodifiedText        string         `json:"unmodifiedText,omitempty"`        // Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").
	KeyIdentifier         string         `json:"keyIdentifier,omitempty"`         // Unique key identifier (e.g., 'U+0041') (default: "").
	Code                  string         `json:"code,omitempty"`                  // Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
	Key                   string         `json:"key,omitempty"`                   // Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
	WindowsVirtualKeyCode int64          `json:"windowsVirtualKeyCode,omitempty"` // Windows virtual key code (default: 0).
	NativeVirtualKeyCode  int64          `json:"nativeVirtualKeyCode,omitempty"`  // Native virtual key code (default: 0).
	AutoRepeat            bool           `json:"autoRepeat,omitempty"`            // Whether the event was generated from auto repeat (default: false).
	IsKeypad              bool           `json:"isKeypad,omitempty"`              // Whether the event was generated from the keypad (default: false).
	IsSystemKey           bool           `json:"isSystemKey,omitempty"`           // Whether the event was a system key event (default: false).
}

DispatchKeyEventParams dispatches a key event to the page.

func DispatchKeyEvent

func DispatchKeyEvent(typeVal KeyType) *DispatchKeyEventParams

DispatchKeyEvent dispatches a key event to the page.

parameters:

type - Type of the key event.

func (*DispatchKeyEventParams) Do

func (p *DispatchKeyEventParams) Do(ctxt context.Context, h cdp.Handler) (err error)

Do executes Input.dispatchKeyEvent against the provided context and target handler.

func (DispatchKeyEventParams) MarshalEasyJSON

func (v DispatchKeyEventParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DispatchKeyEventParams) MarshalJSON

func (v DispatchKeyEventParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DispatchKeyEventParams) UnmarshalEasyJSON

func (v *DispatchKeyEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DispatchKeyEventParams) UnmarshalJSON

func (v *DispatchKeyEventParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (DispatchKeyEventParams) WithAutoRepeat

func (p DispatchKeyEventParams) WithAutoRepeat(autoRepeat bool) *DispatchKeyEventParams

WithAutoRepeat whether the event was generated from auto repeat (default: false).

func (DispatchKeyEventParams) WithCode

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

func (DispatchKeyEventParams) WithIsKeypad

func (p DispatchKeyEventParams) WithIsKeypad(isKeypad bool) *DispatchKeyEventParams

WithIsKeypad whether the event was generated from the keypad (default: false).

func (DispatchKeyEventParams) WithIsSystemKey

func (p DispatchKeyEventParams) WithIsSystemKey(isSystemKey bool) *DispatchKeyEventParams

WithIsSystemKey whether the event was a system key event (default: false).

func (DispatchKeyEventParams) WithKey

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

func (DispatchKeyEventParams) WithKeyIdentifier

func (p DispatchKeyEventParams) WithKeyIdentifier(keyIdentifier string) *DispatchKeyEventParams

WithKeyIdentifier unique key identifier (e.g., 'U+0041') (default: "").

func (DispatchKeyEventParams) WithModifiers

func (p DispatchKeyEventParams) WithModifiers(modifiers Modifier) *DispatchKeyEventParams

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

func (DispatchKeyEventParams) WithNativeVirtualKeyCode

func (p DispatchKeyEventParams) WithNativeVirtualKeyCode(nativeVirtualKeyCode int64) *DispatchKeyEventParams

WithNativeVirtualKeyCode native virtual key code (default: 0).

func (DispatchKeyEventParams) WithText

WithText text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp and rawKeyDown events (default: "").

func (DispatchKeyEventParams) WithTimestamp

func (p DispatchKeyEventParams) WithTimestamp(timestamp *cdp.Timestamp) *DispatchKeyEventParams

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

func (DispatchKeyEventParams) WithUnmodifiedText

func (p DispatchKeyEventParams) WithUnmodifiedText(unmodifiedText string) *DispatchKeyEventParams

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

func (DispatchKeyEventParams) WithWindowsVirtualKeyCode

func (p DispatchKeyEventParams) WithWindowsVirtualKeyCode(windowsVirtualKeyCode int64) *DispatchKeyEventParams

WithWindowsVirtualKeyCode windows virtual key code (default: 0).

type DispatchMouseEventParams

type DispatchMouseEventParams struct {
	Type       MouseType      `json:"type"`                 // Type of the mouse event.
	X          int64          `json:"x"`                    // X coordinate of the event relative to the main frame's viewport.
	Y          int64          `json:"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.
	Modifiers  Modifier       `json:"modifiers,omitempty"`  // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Timestamp  *cdp.Timestamp `json:"timestamp,omitempty"`  // Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time).
	Button     ButtonType     `json:"button,omitempty"`     // Mouse button (default: "none").
	ClickCount int64          `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0).
}

DispatchMouseEventParams dispatches a mouse event to the page.

func DispatchMouseEvent

func DispatchMouseEvent(typeVal MouseType, x int64, y int64) *DispatchMouseEventParams

DispatchMouseEvent dispatches a mouse event to the page.

parameters:

type - Type of the mouse event.
x - X coordinate of the event relative to the main frame's viewport.
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.

func (*DispatchMouseEventParams) Do

Do executes Input.dispatchMouseEvent against the provided context and target handler.

func (DispatchMouseEventParams) MarshalEasyJSON

func (v DispatchMouseEventParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DispatchMouseEventParams) MarshalJSON

func (v DispatchMouseEventParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DispatchMouseEventParams) UnmarshalEasyJSON

func (v *DispatchMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DispatchMouseEventParams) UnmarshalJSON

func (v *DispatchMouseEventParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (DispatchMouseEventParams) WithButton

WithButton mouse button (default: "none").

func (DispatchMouseEventParams) WithClickCount

func (p DispatchMouseEventParams) WithClickCount(clickCount int64) *DispatchMouseEventParams

WithClickCount number of times the mouse button was clicked (default: 0).

func (DispatchMouseEventParams) WithModifiers

func (p DispatchMouseEventParams) WithModifiers(modifiers Modifier) *DispatchMouseEventParams

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

func (DispatchMouseEventParams) WithTimestamp

func (p DispatchMouseEventParams) WithTimestamp(timestamp *cdp.Timestamp) *DispatchMouseEventParams

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

type DispatchTouchEventParams

type DispatchTouchEventParams struct {
	Type        TouchType      `json:"type"`                // Type of the touch event.
	TouchPoints []*TouchPoint  `json:"touchPoints"`         // Touch points.
	Modifiers   Modifier       `json:"modifiers,omitempty"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Timestamp   *cdp.Timestamp `json:"timestamp,omitempty"` // Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time).
}

DispatchTouchEventParams dispatches a touch event to the page.

func DispatchTouchEvent

func DispatchTouchEvent(typeVal TouchType, touchPoints []*TouchPoint) *DispatchTouchEventParams

DispatchTouchEvent dispatches a touch event to the page.

parameters:

type - Type of the touch event.
touchPoints - Touch points.

func (*DispatchTouchEventParams) Do

Do executes Input.dispatchTouchEvent against the provided context and target handler.

func (DispatchTouchEventParams) MarshalEasyJSON

func (v DispatchTouchEventParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DispatchTouchEventParams) MarshalJSON

func (v DispatchTouchEventParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DispatchTouchEventParams) UnmarshalEasyJSON

func (v *DispatchTouchEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DispatchTouchEventParams) UnmarshalJSON

func (v *DispatchTouchEventParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (DispatchTouchEventParams) WithModifiers

func (p DispatchTouchEventParams) WithModifiers(modifiers Modifier) *DispatchTouchEventParams

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

func (DispatchTouchEventParams) WithTimestamp

func (p DispatchTouchEventParams) WithTimestamp(timestamp *cdp.Timestamp) *DispatchTouchEventParams

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

type EmulateTouchFromMouseEventParams

type EmulateTouchFromMouseEventParams struct {
	Type       MouseType      `json:"type"`                 // Type of the mouse event.
	X          int64          `json:"x"`                    // X coordinate of the mouse pointer in DIP.
	Y          int64          `json:"y"`                    // Y coordinate of the mouse pointer in DIP.
	Timestamp  *cdp.Timestamp `json:"timestamp"`            // Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970.
	Button     ButtonType     `json:"button"`               // Mouse button.
	DeltaX     float64        `json:"deltaX,omitempty"`     // X delta in DIP for mouse wheel event (default: 0).
	DeltaY     float64        `json:"deltaY,omitempty"`     // Y delta in DIP for mouse wheel event (default: 0).
	Modifiers  Modifier       `json:"modifiers,omitempty"`  // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	ClickCount int64          `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0).
}

EmulateTouchFromMouseEventParams emulates touch event from the mouse event parameters.

func EmulateTouchFromMouseEvent

func EmulateTouchFromMouseEvent(typeVal MouseType, x int64, y int64, timestamp *cdp.Timestamp, button ButtonType) *EmulateTouchFromMouseEventParams

EmulateTouchFromMouseEvent emulates touch event from the mouse event parameters.

parameters:

type - Type of the mouse event.
x - X coordinate of the mouse pointer in DIP.
y - Y coordinate of the mouse pointer in DIP.
timestamp - Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970.
button - Mouse button.

func (*EmulateTouchFromMouseEventParams) Do

Do executes Input.emulateTouchFromMouseEvent against the provided context and target handler.

func (EmulateTouchFromMouseEventParams) MarshalEasyJSON

func (v EmulateTouchFromMouseEventParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EmulateTouchFromMouseEventParams) MarshalJSON

func (v EmulateTouchFromMouseEventParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EmulateTouchFromMouseEventParams) UnmarshalEasyJSON

func (v *EmulateTouchFromMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EmulateTouchFromMouseEventParams) UnmarshalJSON

func (v *EmulateTouchFromMouseEventParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (EmulateTouchFromMouseEventParams) WithClickCount

WithClickCount number of times the mouse button was clicked (default: 0).

func (EmulateTouchFromMouseEventParams) WithDeltaX

WithDeltaX x delta in DIP for mouse wheel event (default: 0).

func (EmulateTouchFromMouseEventParams) WithDeltaY

WithDeltaY y delta in DIP for mouse wheel event (default: 0).

func (EmulateTouchFromMouseEventParams) WithModifiers

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

type GestureType

type GestureType string

GestureType [no description].

const (
	GestureDefault GestureType = "default"
	GestureTouch   GestureType = "touch"
	GestureMouse   GestureType = "mouse"
)

GestureType values.

func (GestureType) MarshalEasyJSON

func (t GestureType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (GestureType) MarshalJSON

func (t GestureType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (GestureType) String

func (t GestureType) String() string

String returns the GestureType as string value.

func (*GestureType) UnmarshalEasyJSON

func (t *GestureType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*GestureType) UnmarshalJSON

func (t *GestureType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type KeyType

type KeyType string

KeyType type of the key event.

const (
	KeyDown    KeyType = "keyDown"
	KeyUp      KeyType = "keyUp"
	KeyRawDown KeyType = "rawKeyDown"
	KeyChar    KeyType = "char"
)

KeyType values.

func (KeyType) MarshalEasyJSON

func (t KeyType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (KeyType) MarshalJSON

func (t KeyType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (KeyType) String

func (t KeyType) String() string

String returns the KeyType as string value.

func (*KeyType) UnmarshalEasyJSON

func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*KeyType) UnmarshalJSON

func (t *KeyType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type Modifier

type Modifier int64

Modifier input key modifier type.

const (
	ModifierNone  Modifier = 0
	ModifierAlt   Modifier = 1
	ModifierCtrl  Modifier = 2
	ModifierMeta  Modifier = 4
	ModifierShift Modifier = 8
)

Modifier values.

const ModifierCommand Modifier = ModifierMeta

ModifierCommand is an alias for ModifierMeta.

func (Modifier) Int64

func (t Modifier) Int64() int64

Int64 returns the Modifier as int64 value.

func (Modifier) MarshalEasyJSON

func (t Modifier) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (Modifier) MarshalJSON

func (t Modifier) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (Modifier) String

func (t Modifier) String() string

String returns the Modifier as string value.

func (*Modifier) UnmarshalEasyJSON

func (t *Modifier) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*Modifier) UnmarshalJSON

func (t *Modifier) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type MouseType

type MouseType string

MouseType type of the mouse event.

const (
	MousePressed  MouseType = "mousePressed"
	MouseReleased MouseType = "mouseReleased"
	MouseMoved    MouseType = "mouseMoved"
	MouseWheel    MouseType = "mouseWheel"
)

MouseType values.

func (MouseType) MarshalEasyJSON

func (t MouseType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (MouseType) MarshalJSON

func (t MouseType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (MouseType) String

func (t MouseType) String() string

String returns the MouseType as string value.

func (*MouseType) UnmarshalEasyJSON

func (t *MouseType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*MouseType) UnmarshalJSON

func (t *MouseType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type SetIgnoreInputEventsParams

type SetIgnoreInputEventsParams struct {
	Ignore bool `json:"ignore"` // Ignores input events processing when set to true.
}

SetIgnoreInputEventsParams ignores input events (useful while auditing page).

func SetIgnoreInputEvents

func SetIgnoreInputEvents(ignore bool) *SetIgnoreInputEventsParams

SetIgnoreInputEvents ignores input events (useful while auditing page).

parameters:

ignore - Ignores input events processing when set to true.

func (*SetIgnoreInputEventsParams) Do

Do executes Input.setIgnoreInputEvents against the provided context and target handler.

func (SetIgnoreInputEventsParams) MarshalEasyJSON

func (v SetIgnoreInputEventsParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetIgnoreInputEventsParams) MarshalJSON

func (v SetIgnoreInputEventsParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetIgnoreInputEventsParams) UnmarshalEasyJSON

func (v *SetIgnoreInputEventsParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetIgnoreInputEventsParams) UnmarshalJSON

func (v *SetIgnoreInputEventsParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SynthesizePinchGestureParams

type SynthesizePinchGestureParams struct {
	X                 int64       `json:"x"`                           // X coordinate of the start of the gesture in CSS pixels.
	Y                 int64       `json:"y"`                           // Y coordinate of the start of the gesture in CSS pixels.
	ScaleFactor       float64     `json:"scaleFactor"`                 // Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
	RelativeSpeed     int64       `json:"relativeSpeed,omitempty"`     // Relative pointer speed in pixels per second (default: 800).
	GestureSourceType GestureType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
}

SynthesizePinchGestureParams synthesizes a pinch gesture over a time period by issuing appropriate touch events.

func SynthesizePinchGesture

func SynthesizePinchGesture(x int64, y int64, scaleFactor float64) *SynthesizePinchGestureParams

SynthesizePinchGesture synthesizes a pinch gesture over a time period by issuing appropriate touch events.

parameters:

x - X coordinate of the start of the gesture in CSS pixels.
y - Y coordinate of the start of the gesture in CSS pixels.
scaleFactor - Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).

func (*SynthesizePinchGestureParams) Do

Do executes Input.synthesizePinchGesture against the provided context and target handler.

func (SynthesizePinchGestureParams) MarshalEasyJSON

func (v SynthesizePinchGestureParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SynthesizePinchGestureParams) MarshalJSON

func (v SynthesizePinchGestureParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SynthesizePinchGestureParams) UnmarshalEasyJSON

func (v *SynthesizePinchGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SynthesizePinchGestureParams) UnmarshalJSON

func (v *SynthesizePinchGestureParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SynthesizePinchGestureParams) WithGestureSourceType

func (p SynthesizePinchGestureParams) WithGestureSourceType(gestureSourceType GestureType) *SynthesizePinchGestureParams

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

func (SynthesizePinchGestureParams) WithRelativeSpeed

func (p SynthesizePinchGestureParams) WithRelativeSpeed(relativeSpeed int64) *SynthesizePinchGestureParams

WithRelativeSpeed relative pointer speed in pixels per second (default: 800).

type SynthesizeScrollGestureParams

type SynthesizeScrollGestureParams struct {
	X                     int64       `json:"x"`                               // X coordinate of the start of the gesture in CSS pixels.
	Y                     int64       `json:"y"`                               // Y coordinate of the start of the gesture in CSS pixels.
	XDistance             int64       `json:"xDistance,omitempty"`             // The distance to scroll along the X axis (positive to scroll left).
	YDistance             int64       `json:"yDistance,omitempty"`             // The distance to scroll along the Y axis (positive to scroll up).
	XOverscroll           int64       `json:"xOverscroll,omitempty"`           // The number of additional pixels to scroll back along the X axis, in addition to the given distance.
	YOverscroll           int64       `json:"yOverscroll,omitempty"`           // The number of additional pixels to scroll back along the Y axis, in addition to the given distance.
	PreventFling          bool        `json:"preventFling,omitempty"`          // Prevent fling (default: true).
	Speed                 int64       `json:"speed,omitempty"`                 // Swipe speed in pixels per second (default: 800).
	GestureSourceType     GestureType `json:"gestureSourceType,omitempty"`     // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
	RepeatCount           int64       `json:"repeatCount,omitempty"`           // The number of times to repeat the gesture (default: 0).
	RepeatDelayMs         int64       `json:"repeatDelayMs,omitempty"`         // The number of milliseconds delay between each repeat. (default: 250).
	InteractionMarkerName string      `json:"interactionMarkerName,omitempty"` // The name of the interaction markers to generate, if not empty (default: "").
}

SynthesizeScrollGestureParams synthesizes a scroll gesture over a time period by issuing appropriate touch events.

func SynthesizeScrollGesture

func SynthesizeScrollGesture(x int64, y int64) *SynthesizeScrollGestureParams

SynthesizeScrollGesture synthesizes a scroll gesture over a time period by issuing appropriate touch events.

parameters:

x - X coordinate of the start of the gesture in CSS pixels.
y - Y coordinate of the start of the gesture in CSS pixels.

func (*SynthesizeScrollGestureParams) Do

Do executes Input.synthesizeScrollGesture against the provided context and target handler.

func (SynthesizeScrollGestureParams) MarshalEasyJSON

func (v SynthesizeScrollGestureParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SynthesizeScrollGestureParams) MarshalJSON

func (v SynthesizeScrollGestureParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SynthesizeScrollGestureParams) UnmarshalEasyJSON

func (v *SynthesizeScrollGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SynthesizeScrollGestureParams) UnmarshalJSON

func (v *SynthesizeScrollGestureParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SynthesizeScrollGestureParams) WithGestureSourceType

func (p SynthesizeScrollGestureParams) WithGestureSourceType(gestureSourceType GestureType) *SynthesizeScrollGestureParams

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

func (SynthesizeScrollGestureParams) WithInteractionMarkerName

func (p SynthesizeScrollGestureParams) WithInteractionMarkerName(interactionMarkerName string) *SynthesizeScrollGestureParams

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

func (SynthesizeScrollGestureParams) WithPreventFling

func (p SynthesizeScrollGestureParams) WithPreventFling(preventFling bool) *SynthesizeScrollGestureParams

WithPreventFling prevent fling (default: true).

func (SynthesizeScrollGestureParams) WithRepeatCount

func (p SynthesizeScrollGestureParams) WithRepeatCount(repeatCount int64) *SynthesizeScrollGestureParams

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

func (SynthesizeScrollGestureParams) WithRepeatDelayMs

func (p SynthesizeScrollGestureParams) WithRepeatDelayMs(repeatDelayMs int64) *SynthesizeScrollGestureParams

WithRepeatDelayMs the number of milliseconds delay between each repeat. (default: 250).

func (SynthesizeScrollGestureParams) WithSpeed

WithSpeed swipe speed in pixels per second (default: 800).

func (SynthesizeScrollGestureParams) WithXDistance

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

func (SynthesizeScrollGestureParams) WithXOverscroll

func (p SynthesizeScrollGestureParams) WithXOverscroll(xOverscroll int64) *SynthesizeScrollGestureParams

WithXOverscroll the number of additional pixels to scroll back along the X axis, in addition to the given distance.

func (SynthesizeScrollGestureParams) WithYDistance

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

func (SynthesizeScrollGestureParams) WithYOverscroll

func (p SynthesizeScrollGestureParams) WithYOverscroll(yOverscroll int64) *SynthesizeScrollGestureParams

WithYOverscroll the number of additional pixels to scroll back along the Y axis, in addition to the given distance.

type SynthesizeTapGestureParams

type SynthesizeTapGestureParams struct {
	X                 int64       `json:"x"`                           // X coordinate of the start of the gesture in CSS pixels.
	Y                 int64       `json:"y"`                           // Y coordinate of the start of the gesture in CSS pixels.
	Duration          int64       `json:"duration,omitempty"`          // Duration between touchdown and touchup events in ms (default: 50).
	TapCount          int64       `json:"tapCount,omitempty"`          // Number of times to perform the tap (e.g. 2 for double tap, default: 1).
	GestureSourceType GestureType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
}

SynthesizeTapGestureParams synthesizes a tap gesture over a time period by issuing appropriate touch events.

func SynthesizeTapGesture

func SynthesizeTapGesture(x int64, y int64) *SynthesizeTapGestureParams

SynthesizeTapGesture synthesizes a tap gesture over a time period by issuing appropriate touch events.

parameters:

x - X coordinate of the start of the gesture in CSS pixels.
y - Y coordinate of the start of the gesture in CSS pixels.

func (*SynthesizeTapGestureParams) Do

Do executes Input.synthesizeTapGesture against the provided context and target handler.

func (SynthesizeTapGestureParams) MarshalEasyJSON

func (v SynthesizeTapGestureParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SynthesizeTapGestureParams) MarshalJSON

func (v SynthesizeTapGestureParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SynthesizeTapGestureParams) UnmarshalEasyJSON

func (v *SynthesizeTapGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SynthesizeTapGestureParams) UnmarshalJSON

func (v *SynthesizeTapGestureParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SynthesizeTapGestureParams) WithDuration

WithDuration duration between touchdown and touchup events in ms (default: 50).

func (SynthesizeTapGestureParams) WithGestureSourceType

func (p SynthesizeTapGestureParams) WithGestureSourceType(gestureSourceType GestureType) *SynthesizeTapGestureParams

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

func (SynthesizeTapGestureParams) WithTapCount

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

type TouchPoint

type TouchPoint struct {
	State         TouchState `json:"state"`                   // State of the touch point.
	X             int64      `json:"x"`                       // X coordinate of the event relative to the main frame's viewport.
	Y             int64      `json:"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.
	RadiusX       int64      `json:"radiusX,omitempty"`       // X radius of the touch area (default: 1).
	RadiusY       int64      `json:"radiusY,omitempty"`       // Y radius of the touch area (default: 1).
	RotationAngle float64    `json:"rotationAngle,omitempty"` // Rotation angle (default: 0.0).
	Force         float64    `json:"force,omitempty"`         // Force (default: 1.0).
	ID            float64    `json:"id,omitempty"`            // Identifier used to track touch sources between events, must be unique within an event.
}

TouchPoint [no description].

func (TouchPoint) MarshalEasyJSON

func (v TouchPoint) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (TouchPoint) MarshalJSON

func (v TouchPoint) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*TouchPoint) UnmarshalEasyJSON

func (v *TouchPoint) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TouchPoint) UnmarshalJSON

func (v *TouchPoint) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type TouchState

type TouchState string

TouchState state of the touch point.

const (
	TouchPressed    TouchState = "touchPressed"
	TouchReleased   TouchState = "touchReleased"
	TouchMoved      TouchState = "touchMoved"
	TouchStationary TouchState = "touchStationary"
	TouchCanceled   TouchState = "touchCancelled"
)

TouchState values.

func (TouchState) MarshalEasyJSON

func (t TouchState) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (TouchState) MarshalJSON

func (t TouchState) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (TouchState) String

func (t TouchState) String() string

String returns the TouchState as string value.

func (*TouchState) UnmarshalEasyJSON

func (t *TouchState) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*TouchState) UnmarshalJSON

func (t *TouchState) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type TouchType

type TouchType string

TouchType type of the touch event.

const (
	TouchStart TouchType = "touchStart"
	TouchEnd   TouchType = "touchEnd"
	TouchMove  TouchType = "touchMove"
)

TouchType values.

func (TouchType) MarshalEasyJSON

func (t TouchType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (TouchType) MarshalJSON

func (t TouchType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (TouchType) String

func (t TouchType) String() string

String returns the TouchType as string value.

func (*TouchType) UnmarshalEasyJSON

func (t *TouchType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*TouchType) UnmarshalJSON

func (t *TouchType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL