event

package
v0.0.0-...-2824937 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package event defines user input events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Touch

type Touch struct {
	Type TouchType
	Loc  geom.Point
}

Touch is a user touch event.

On Android, this is an AInputEvent with AINPUT_EVENT_TYPE_MOTION. On iOS, it is the UIEvent delivered to a UIView.

func (Touch) String

func (t Touch) String() string

type TouchType

type TouchType byte

TouchType describes the type of a touch event.

const (
	// TouchStart is a user first touching the device.
	//
	// On Android, this is a AMOTION_EVENT_ACTION_DOWN.
	// On iOS, this is a call to touchesBegan.
	TouchStart TouchType = iota

	// TouchMove is a user dragging across the device.
	//
	// A TouchMove is delivered between a TouchStart and TouchEnd.
	//
	// On Android, this is a AMOTION_EVENT_ACTION_MOVE.
	// On iOS, this is a call to touchesMoved.
	TouchMove

	// TouchEnd is a user no longer touching the device.
	//
	// On Android, this is a AMOTION_EVENT_ACTION_UP.
	// On iOS, this is a call to touchesEnded.
	TouchEnd
)

Directories

Path Synopsis
Package key defines an event for physical keyboard keys.
Package key defines an event for physical keyboard keys.
Package lifecycle defines an event for an app's lifecycle.
Package lifecycle defines an event for an app's lifecycle.
Package mouse defines an event for mouse input.
Package mouse defines an event for mouse input.
Package paint defines an event for the app being ready to paint.
Package paint defines an event for the app being ready to paint.
Package size defines an event for the dimensions, physical resolution and orientation of the app's window.
Package size defines an event for the dimensions, physical resolution and orientation of the app's window.
Package touch defines an event for touch input.
Package touch defines an event for touch input.

Jump to

Keyboard shortcuts

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