input

package
v0.0.0-...-076f285 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DispatchKeyEventCommand

type DispatchKeyEventCommand struct {
	DestinationTargetID string

	Type                  DispatchKeyEventTypeEnum `json:"type"`                            // Type of the key event.
	Modifiers             *int64                   `json:"modifiers,omitempty"`             // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Timestamp             *float64                 `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 <code>keyUp</code> and <code>rawKeyDown</code> 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).
	// contains filtered or unexported fields
}

func (*DispatchKeyEventCommand) Initalize

func (c *DispatchKeyEventCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DispatchKeyEventCommand) Respond

func (c *DispatchKeyEventCommand) Respond()

func (*DispatchKeyEventCommand) RespondWithError

func (c *DispatchKeyEventCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DispatchKeyEventCommandFn

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

func (*DispatchKeyEventCommandFn) Load

func (*DispatchKeyEventCommandFn) Store

type DispatchKeyEventReturn

type DispatchKeyEventReturn struct {
}

type DispatchKeyEventTypeEnum

type DispatchKeyEventTypeEnum string
const (
	DispatchKeyEventTypeKeyDown    DispatchKeyEventTypeEnum = "keyDown"
	DispatchKeyEventTypeKeyUp      DispatchKeyEventTypeEnum = "keyUp"
	DispatchKeyEventTypeRawKeyDown DispatchKeyEventTypeEnum = "rawKeyDown"
	DispatchKeyEventTypeChar       DispatchKeyEventTypeEnum = "char"
)

type DispatchMouseEventButtonEnum

type DispatchMouseEventButtonEnum string
const (
	DispatchMouseEventButtonNone   DispatchMouseEventButtonEnum = "none"
	DispatchMouseEventButtonLeft   DispatchMouseEventButtonEnum = "left"
	DispatchMouseEventButtonMiddle DispatchMouseEventButtonEnum = "middle"
	DispatchMouseEventButtonRight  DispatchMouseEventButtonEnum = "right"
)

type DispatchMouseEventCommand

type DispatchMouseEventCommand struct {
	DestinationTargetID string

	Type       DispatchMouseEventTypeEnum    `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  *int64                        `json:"modifiers,omitempty"`  // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Timestamp  *float64                      `json:"timestamp,omitempty"`  // Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time).
	Button     *DispatchMouseEventButtonEnum `json:"button,omitempty"`     // Mouse button (default: "none").
	ClickCount *int64                        `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0).
	// contains filtered or unexported fields
}

func (*DispatchMouseEventCommand) Initalize

func (c *DispatchMouseEventCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DispatchMouseEventCommand) Respond

func (c *DispatchMouseEventCommand) Respond()

func (*DispatchMouseEventCommand) RespondWithError

func (c *DispatchMouseEventCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DispatchMouseEventCommandFn

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

func (*DispatchMouseEventCommandFn) Load

func (*DispatchMouseEventCommandFn) Store

type DispatchMouseEventReturn

type DispatchMouseEventReturn struct {
}

type DispatchMouseEventTypeEnum

type DispatchMouseEventTypeEnum string
const (
	DispatchMouseEventTypeMousePressed  DispatchMouseEventTypeEnum = "mousePressed"
	DispatchMouseEventTypeMouseReleased DispatchMouseEventTypeEnum = "mouseReleased"
	DispatchMouseEventTypeMouseMoved    DispatchMouseEventTypeEnum = "mouseMoved"
)

type DispatchTouchEventCommand

type DispatchTouchEventCommand struct {
	DestinationTargetID string

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

func (*DispatchTouchEventCommand) Initalize

func (c *DispatchTouchEventCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DispatchTouchEventCommand) Respond

func (c *DispatchTouchEventCommand) Respond()

func (*DispatchTouchEventCommand) RespondWithError

func (c *DispatchTouchEventCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DispatchTouchEventCommandFn

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

func (*DispatchTouchEventCommandFn) Load

func (*DispatchTouchEventCommandFn) Store

type DispatchTouchEventReturn

type DispatchTouchEventReturn struct {
}

type DispatchTouchEventTypeEnum

type DispatchTouchEventTypeEnum string
const (
	DispatchTouchEventTypeTouchStart DispatchTouchEventTypeEnum = "touchStart"
	DispatchTouchEventTypeTouchEnd   DispatchTouchEventTypeEnum = "touchEnd"
	DispatchTouchEventTypeTouchMove  DispatchTouchEventTypeEnum = "touchMove"
)

type EmulateTouchFromMouseEventButtonEnum

type EmulateTouchFromMouseEventButtonEnum string
const (
	EmulateTouchFromMouseEventButtonNone   EmulateTouchFromMouseEventButtonEnum = "none"
	EmulateTouchFromMouseEventButtonLeft   EmulateTouchFromMouseEventButtonEnum = "left"
	EmulateTouchFromMouseEventButtonMiddle EmulateTouchFromMouseEventButtonEnum = "middle"
	EmulateTouchFromMouseEventButtonRight  EmulateTouchFromMouseEventButtonEnum = "right"
)

type EmulateTouchFromMouseEventCommand

type EmulateTouchFromMouseEventCommand struct {
	DestinationTargetID string

	Type       EmulateTouchFromMouseEventTypeEnum   `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  float64                              `json:"timestamp"`            // Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970.
	Button     EmulateTouchFromMouseEventButtonEnum `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  *int64                               `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).
	// contains filtered or unexported fields
}

func (*EmulateTouchFromMouseEventCommand) Initalize

func (c *EmulateTouchFromMouseEventCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*EmulateTouchFromMouseEventCommand) Respond

func (c *EmulateTouchFromMouseEventCommand) Respond()

func (*EmulateTouchFromMouseEventCommand) RespondWithError

func (c *EmulateTouchFromMouseEventCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type EmulateTouchFromMouseEventCommandFn

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

func (*EmulateTouchFromMouseEventCommandFn) Load

func (*EmulateTouchFromMouseEventCommandFn) Store

type EmulateTouchFromMouseEventReturn

type EmulateTouchFromMouseEventReturn struct {
}

type EmulateTouchFromMouseEventTypeEnum

type EmulateTouchFromMouseEventTypeEnum string
const (
	EmulateTouchFromMouseEventTypeMousePressed  EmulateTouchFromMouseEventTypeEnum = "mousePressed"
	EmulateTouchFromMouseEventTypeMouseReleased EmulateTouchFromMouseEventTypeEnum = "mouseReleased"
	EmulateTouchFromMouseEventTypeMouseMoved    EmulateTouchFromMouseEventTypeEnum = "mouseMoved"
	EmulateTouchFromMouseEventTypeMouseWheel    EmulateTouchFromMouseEventTypeEnum = "mouseWheel"
)

type GestureSourceType

type GestureSourceType string
const (
	GestureSourceTypeDefault GestureSourceType = "default"
	GestureSourceTypeTouch   GestureSourceType = "touch"
	GestureSourceTypeMouse   GestureSourceType = "mouse"
)

type InputAgent

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

func NewAgent

func NewAgent(conn *shared.Connection) *InputAgent

func (*InputAgent) Name

func (agent *InputAgent) Name() string

func (*InputAgent) ProcessCommand

func (agent *InputAgent) ProcessCommand(id int64, targetId string, funcName string, data *json.RawMessage)

func (*InputAgent) SetDispatchKeyEventHandler

func (agent *InputAgent) SetDispatchKeyEventHandler(handler func(DispatchKeyEventCommand))

Commands Sent From Frontend

func (*InputAgent) SetDispatchMouseEventHandler

func (agent *InputAgent) SetDispatchMouseEventHandler(handler func(DispatchMouseEventCommand))

func (*InputAgent) SetDispatchTouchEventHandler

func (agent *InputAgent) SetDispatchTouchEventHandler(handler func(DispatchTouchEventCommand))

func (*InputAgent) SetEmulateTouchFromMouseEventHandler

func (agent *InputAgent) SetEmulateTouchFromMouseEventHandler(handler func(EmulateTouchFromMouseEventCommand))

func (*InputAgent) SetSynthesizePinchGestureHandler

func (agent *InputAgent) SetSynthesizePinchGestureHandler(handler func(SynthesizePinchGestureCommand))

func (*InputAgent) SetSynthesizeScrollGestureHandler

func (agent *InputAgent) SetSynthesizeScrollGestureHandler(handler func(SynthesizeScrollGestureCommand))

func (*InputAgent) SetSynthesizeTapGestureHandler

func (agent *InputAgent) SetSynthesizeTapGestureHandler(handler func(SynthesizeTapGestureCommand))

type SynthesizePinchGestureCommand

type SynthesizePinchGestureCommand struct {
	DestinationTargetID string

	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 *GestureSourceType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
	// contains filtered or unexported fields
}

func (*SynthesizePinchGestureCommand) Initalize

func (c *SynthesizePinchGestureCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SynthesizePinchGestureCommand) Respond

func (c *SynthesizePinchGestureCommand) Respond()

func (*SynthesizePinchGestureCommand) RespondWithError

func (c *SynthesizePinchGestureCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SynthesizePinchGestureCommandFn

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

func (*SynthesizePinchGestureCommandFn) Load

func (*SynthesizePinchGestureCommandFn) Store

type SynthesizePinchGestureReturn

type SynthesizePinchGestureReturn struct {
}

type SynthesizeScrollGestureCommand

type SynthesizeScrollGestureCommand struct {
	DestinationTargetID string

	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     *GestureSourceType `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: "").
	// contains filtered or unexported fields
}

func (*SynthesizeScrollGestureCommand) Initalize

func (c *SynthesizeScrollGestureCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SynthesizeScrollGestureCommand) Respond

func (c *SynthesizeScrollGestureCommand) Respond()

func (*SynthesizeScrollGestureCommand) RespondWithError

func (c *SynthesizeScrollGestureCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SynthesizeScrollGestureCommandFn

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

func (*SynthesizeScrollGestureCommandFn) Load

func (*SynthesizeScrollGestureCommandFn) Store

type SynthesizeScrollGestureReturn

type SynthesizeScrollGestureReturn struct {
}

type SynthesizeTapGestureCommand

type SynthesizeTapGestureCommand struct {
	DestinationTargetID string

	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 *GestureSourceType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
	// contains filtered or unexported fields
}

func (*SynthesizeTapGestureCommand) Initalize

func (c *SynthesizeTapGestureCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SynthesizeTapGestureCommand) Respond

func (c *SynthesizeTapGestureCommand) Respond()

func (*SynthesizeTapGestureCommand) RespondWithError

func (c *SynthesizeTapGestureCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SynthesizeTapGestureCommandFn

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

func (*SynthesizeTapGestureCommandFn) Load

func (*SynthesizeTapGestureCommandFn) Store

type SynthesizeTapGestureReturn

type SynthesizeTapGestureReturn struct {
}

type TouchPoint

type TouchPoint struct {
	State         TouchPointStateEnum `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.
}

type TouchPointStateEnum

type TouchPointStateEnum string
const (
	TouchPointStateTouchPressed    TouchPointStateEnum = "touchPressed"
	TouchPointStateTouchReleased   TouchPointStateEnum = "touchReleased"
	TouchPointStateTouchMoved      TouchPointStateEnum = "touchMoved"
	TouchPointStateTouchStationary TouchPointStateEnum = "touchStationary"
	TouchPointStateTouchCancelled  TouchPointStateEnum = "touchCancelled"
)

Jump to

Keyboard shortcuts

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