Documentation
¶
Overview ¶
Package input provides Go bindings for Android Input events.
Index ¶
- Constants
- type ALooper
- type ALooper_callbackFunc
- type Error
- type Event
- func (h *Event) AKeyEvent_getDownTime() int64
- func (h *Event) AKeyEvent_getEventTime() int64
- func (h *Event) AKeyEvent_getFlags() error
- func (h *Event) AKeyEvent_getMetaState() error
- func (h *Event) AKeyEvent_getScanCode() error
- func (h *Event) AMotionEvent_getActionButton() error
- func (h *Event) AMotionEvent_getAxisValue(axis int32, pointer_index uint64) float32
- func (h *Event) AMotionEvent_getButtonState() error
- func (h *Event) AMotionEvent_getClassification() error
- func (h *Event) AMotionEvent_getDownTime() int64
- func (h *Event) AMotionEvent_getEdgeFlags() error
- func (h *Event) AMotionEvent_getEventTime() int64
- func (h *Event) AMotionEvent_getFlags() error
- func (h *Event) AMotionEvent_getHistoricalAxisValue(axis int32, pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalEventTime(history_index uint64) int64
- func (h *Event) AMotionEvent_getHistoricalOrientation(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalPressure(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalRawX(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalRawY(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalSize(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalToolMajor(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalToolMinor(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalTouchMajor(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalTouchMinor(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalX(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistoricalY(pointer_index uint64, history_index uint64) float32
- func (h *Event) AMotionEvent_getHistorySize() uint64
- func (h *Event) AMotionEvent_getMetaState() error
- func (h *Event) AMotionEvent_getOrientation(pointer_index uint64) float32
- func (h *Event) AMotionEvent_getPointerID(pointer_index uint64) error
- func (h *Event) AMotionEvent_getRawX(pointer_index uint64) float32
- func (h *Event) AMotionEvent_getRawY(pointer_index uint64) float32
- func (h *Event) AMotionEvent_getSize(pointer_index uint64) float32
- func (h *Event) AMotionEvent_getToolMajor(pointer_index uint64) float32
- func (h *Event) AMotionEvent_getToolMinor(pointer_index uint64) float32
- func (h *Event) AMotionEvent_getToolType(pointer_index uint64) error
- func (h *Event) AMotionEvent_getTouchMajor(pointer_index uint64) float32
- func (h *Event) AMotionEvent_getTouchMinor(pointer_index uint64) float32
- func (h *Event) AMotionEvent_getXOffset() float32
- func (h *Event) AMotionEvent_getXPrecision() float32
- func (h *Event) AMotionEvent_getYOffset() float32
- func (h *Event) AMotionEvent_getYPrecision() float32
- func (h *Event) Close() error
- func (h *Event) GetDeviceID() error
- func (h *Event) KeyAction() int32
- func (h *Event) KeyCode() int32
- func (h *Event) MotionAction() int32
- func (h *Event) Pointer() unsafe.Pointer
- func (h *Event) PointerCount() uint64
- func (h *Event) Pressure(pointer_index uint64) float32
- func (h *Event) RepeatCount() int32
- func (h *Event) Source() int32
- func (h *Event) Type() int32
- func (h *Event) X(pointer_index uint64) float32
- func (h *Event) Y(pointer_index uint64) float32
- type EventType
- type INPUT_KEYBOARD_TYPE
- type INPUT_MOTION_RANGE
- type INPUT_SOURCE_CLASS
- type JNIEnv
- type Jobject
- type KEY_EVENT_FLAG
- type KEY_STATE
- type KeyAction
- type META
- type MOTION_EVENT
- type MOTION_EVENT_BUTTON
- type MOTION_EVENT_EDGE_FLAG
- type MOTION_EVENT_FLAG_WINDOW
- type MOTION_EVENT_TOOL_TYPE
- type MotionAction
- type MotionClassification
- type Queue
- type Source
Constants ¶
const (
AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT = 8
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ALooper_callbackFunc ¶
type ALooper_callbackFunc = capi.ALooper_callbackFunc
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event wraps the NDK AInputEvent handle.
func NewEventFromPointer ¶
NewEventFromPointer wraps a raw AInputEvent pointer.
func (*Event) AKeyEvent_getDownTime ¶
AKeyEvent_getDownTime returns the value directly.
func (*Event) AKeyEvent_getEventTime ¶
AKeyEvent_getEventTime returns the value directly.
func (*Event) AKeyEvent_getFlags ¶
AKeyEvent_getFlags calls the underlying NDK function.
func (*Event) AKeyEvent_getMetaState ¶
AKeyEvent_getMetaState calls the underlying NDK function.
func (*Event) AKeyEvent_getScanCode ¶
AKeyEvent_getScanCode calls the underlying NDK function.
func (*Event) AMotionEvent_getActionButton ¶
AMotionEvent_getActionButton calls the underlying NDK function.
func (*Event) AMotionEvent_getAxisValue ¶
AMotionEvent_getAxisValue returns the value directly.
func (*Event) AMotionEvent_getButtonState ¶
AMotionEvent_getButtonState calls the underlying NDK function.
func (*Event) AMotionEvent_getClassification ¶
AMotionEvent_getClassification calls the underlying NDK function.
func (*Event) AMotionEvent_getDownTime ¶
AMotionEvent_getDownTime returns the value directly.
func (*Event) AMotionEvent_getEdgeFlags ¶
AMotionEvent_getEdgeFlags calls the underlying NDK function.
func (*Event) AMotionEvent_getEventTime ¶
AMotionEvent_getEventTime returns the value directly.
func (*Event) AMotionEvent_getFlags ¶
AMotionEvent_getFlags calls the underlying NDK function.
func (*Event) AMotionEvent_getHistoricalAxisValue ¶
func (h *Event) AMotionEvent_getHistoricalAxisValue(axis int32, pointer_index uint64, history_index uint64) float32
AMotionEvent_getHistoricalAxisValue returns the value directly.
func (*Event) AMotionEvent_getHistoricalEventTime ¶
AMotionEvent_getHistoricalEventTime returns the value directly.
func (*Event) AMotionEvent_getHistoricalOrientation ¶
func (h *Event) AMotionEvent_getHistoricalOrientation(pointer_index uint64, history_index uint64) float32
AMotionEvent_getHistoricalOrientation returns the value directly.
func (*Event) AMotionEvent_getHistoricalPressure ¶
func (h *Event) AMotionEvent_getHistoricalPressure(pointer_index uint64, history_index uint64) float32
AMotionEvent_getHistoricalPressure returns the value directly.
func (*Event) AMotionEvent_getHistoricalRawX ¶
AMotionEvent_getHistoricalRawX returns the value directly.
func (*Event) AMotionEvent_getHistoricalRawY ¶
AMotionEvent_getHistoricalRawY returns the value directly.
func (*Event) AMotionEvent_getHistoricalSize ¶
AMotionEvent_getHistoricalSize returns the value directly.
func (*Event) AMotionEvent_getHistoricalToolMajor ¶
func (h *Event) AMotionEvent_getHistoricalToolMajor(pointer_index uint64, history_index uint64) float32
AMotionEvent_getHistoricalToolMajor returns the value directly.
func (*Event) AMotionEvent_getHistoricalToolMinor ¶
func (h *Event) AMotionEvent_getHistoricalToolMinor(pointer_index uint64, history_index uint64) float32
AMotionEvent_getHistoricalToolMinor returns the value directly.
func (*Event) AMotionEvent_getHistoricalTouchMajor ¶
func (h *Event) AMotionEvent_getHistoricalTouchMajor(pointer_index uint64, history_index uint64) float32
AMotionEvent_getHistoricalTouchMajor returns the value directly.
func (*Event) AMotionEvent_getHistoricalTouchMinor ¶
func (h *Event) AMotionEvent_getHistoricalTouchMinor(pointer_index uint64, history_index uint64) float32
AMotionEvent_getHistoricalTouchMinor returns the value directly.
func (*Event) AMotionEvent_getHistoricalX ¶
AMotionEvent_getHistoricalX returns the value directly.
func (*Event) AMotionEvent_getHistoricalY ¶
AMotionEvent_getHistoricalY returns the value directly.
func (*Event) AMotionEvent_getHistorySize ¶
AMotionEvent_getHistorySize returns the value directly.
func (*Event) AMotionEvent_getMetaState ¶
AMotionEvent_getMetaState calls the underlying NDK function.
func (*Event) AMotionEvent_getOrientation ¶
AMotionEvent_getOrientation returns the value directly.
func (*Event) AMotionEvent_getPointerID ¶
AMotionEvent_getPointerID calls the underlying NDK function.
func (*Event) AMotionEvent_getRawX ¶
AMotionEvent_getRawX returns the value directly.
func (*Event) AMotionEvent_getRawY ¶
AMotionEvent_getRawY returns the value directly.
func (*Event) AMotionEvent_getSize ¶
AMotionEvent_getSize returns the value directly.
func (*Event) AMotionEvent_getToolMajor ¶
AMotionEvent_getToolMajor returns the value directly.
func (*Event) AMotionEvent_getToolMinor ¶
AMotionEvent_getToolMinor returns the value directly.
func (*Event) AMotionEvent_getToolType ¶
AMotionEvent_getToolType calls the underlying NDK function.
func (*Event) AMotionEvent_getTouchMajor ¶
AMotionEvent_getTouchMajor returns the value directly.
func (*Event) AMotionEvent_getTouchMinor ¶
AMotionEvent_getTouchMinor returns the value directly.
func (*Event) AMotionEvent_getXOffset ¶
AMotionEvent_getXOffset returns the value directly.
func (*Event) AMotionEvent_getXPrecision ¶
AMotionEvent_getXPrecision returns the value directly.
func (*Event) AMotionEvent_getYOffset ¶
AMotionEvent_getYOffset returns the value directly.
func (*Event) AMotionEvent_getYPrecision ¶
AMotionEvent_getYPrecision returns the value directly.
func (*Event) GetDeviceID ¶
GetDeviceID calls the underlying NDK function.
func (*Event) MotionAction ¶
MotionAction returns the value directly.
func (*Event) PointerCount ¶
PointerCount returns the value directly.
func (*Event) RepeatCount ¶
RepeatCount returns the value directly.
type INPUT_KEYBOARD_TYPE ¶
type INPUT_KEYBOARD_TYPE int32
const ( AINPUT_KEYBOARD_TYPE_NONE INPUT_KEYBOARD_TYPE = 0 AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC INPUT_KEYBOARD_TYPE = 1 AINPUT_KEYBOARD_TYPE_ALPHABETIC INPUT_KEYBOARD_TYPE = 2 )
type INPUT_MOTION_RANGE ¶
type INPUT_MOTION_RANGE int32
const ( AINPUT_MOTION_RANGE_X INPUT_MOTION_RANGE = 0 AINPUT_MOTION_RANGE_Y INPUT_MOTION_RANGE = 1 AINPUT_MOTION_RANGE_PRESSURE INPUT_MOTION_RANGE = 2 AINPUT_MOTION_RANGE_SIZE INPUT_MOTION_RANGE = 3 AINPUT_MOTION_RANGE_TOUCH_MAJOR INPUT_MOTION_RANGE = 4 AINPUT_MOTION_RANGE_TOUCH_MINOR INPUT_MOTION_RANGE = 5 AINPUT_MOTION_RANGE_TOOL_MAJOR INPUT_MOTION_RANGE = 6 AINPUT_MOTION_RANGE_TOOL_MINOR INPUT_MOTION_RANGE = 7 AINPUT_MOTION_RANGE_ORIENTATION INPUT_MOTION_RANGE = 8 )
type INPUT_SOURCE_CLASS ¶
type INPUT_SOURCE_CLASS int32
const ( AINPUT_SOURCE_CLASS_MASK INPUT_SOURCE_CLASS = 255 AINPUT_SOURCE_CLASS_NONE INPUT_SOURCE_CLASS = 0 AINPUT_SOURCE_CLASS_BUTTON INPUT_SOURCE_CLASS = 1 AINPUT_SOURCE_CLASS_POINTER INPUT_SOURCE_CLASS = 2 AINPUT_SOURCE_CLASS_NAVIGATION INPUT_SOURCE_CLASS = 4 AINPUT_SOURCE_CLASS_POSITION INPUT_SOURCE_CLASS = 8 AINPUT_SOURCE_CLASS_JOYSTICK INPUT_SOURCE_CLASS = 16 )
type KEY_EVENT_FLAG ¶
type KEY_EVENT_FLAG int32
const ( AKEY_EVENT_FLAG_WOKE_HERE KEY_EVENT_FLAG = 1 AKEY_EVENT_FLAG_SOFT_KEYBOARD KEY_EVENT_FLAG = 2 AKEY_EVENT_FLAG_KEEP_TOUCH_MODE KEY_EVENT_FLAG = 4 AKEY_EVENT_FLAG_FROM_SYSTEM KEY_EVENT_FLAG = 8 AKEY_EVENT_FLAG_EDITOR_ACTION KEY_EVENT_FLAG = 16 AKEY_EVENT_FLAG_CANCELED KEY_EVENT_FLAG = 32 AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY KEY_EVENT_FLAG = 64 AKEY_EVENT_FLAG_LONG_PRESS KEY_EVENT_FLAG = 128 AKEY_EVENT_FLAG_CANCELED_LONG_PRESS KEY_EVENT_FLAG = 256 AKEY_EVENT_FLAG_TRACKING KEY_EVENT_FLAG = 512 AKEY_EVENT_FLAG_FALLBACK KEY_EVENT_FLAG = 1024 )
type META ¶
type META int32
const ( AMETA_NONE META = 0 AMETA_ALT_ON META = 2 AMETA_ALT_LEFT_ON META = 16 AMETA_ALT_RIGHT_ON META = 32 AMETA_SHIFT_ON META = 1 AMETA_SHIFT_LEFT_ON META = 64 AMETA_SHIFT_RIGHT_ON META = 128 AMETA_SYM_ON META = 4 AMETA_FUNCTION_ON META = 8 AMETA_CTRL_ON META = 4096 AMETA_CTRL_LEFT_ON META = 8192 AMETA_CTRL_RIGHT_ON META = 16384 AMETA_META_ON META = 65536 AMETA_META_LEFT_ON META = 131072 AMETA_META_RIGHT_ON META = 262144 AMETA_CAPS_LOCK_ON META = 1048576 AMETA_NUM_LOCK_ON META = 2097152 AMETA_SCROLL_LOCK_ON META = 4194304 )
type MOTION_EVENT ¶
type MOTION_EVENT int32
const ( AMOTION_EVENT_AXIS_X MOTION_EVENT = 0 AMOTION_EVENT_AXIS_Y MOTION_EVENT = 1 AMOTION_EVENT_AXIS_PRESSURE MOTION_EVENT = 2 AMOTION_EVENT_AXIS_SIZE MOTION_EVENT = 3 AMOTION_EVENT_AXIS_TOUCH_MAJOR MOTION_EVENT = 4 AMOTION_EVENT_AXIS_TOUCH_MINOR MOTION_EVENT = 5 AMOTION_EVENT_AXIS_TOOL_MAJOR MOTION_EVENT = 6 AMOTION_EVENT_AXIS_TOOL_MINOR MOTION_EVENT = 7 AMOTION_EVENT_AXIS_ORIENTATION MOTION_EVENT = 8 AMOTION_EVENT_AXIS_VSCROLL MOTION_EVENT = 9 AMOTION_EVENT_AXIS_HSCROLL MOTION_EVENT = 10 AMOTION_EVENT_AXIS_Z MOTION_EVENT = 11 AMOTION_EVENT_AXIS_RX MOTION_EVENT = 12 AMOTION_EVENT_AXIS_RY MOTION_EVENT = 13 AMOTION_EVENT_AXIS_RZ MOTION_EVENT = 14 AMOTION_EVENT_AXIS_HAT_X MOTION_EVENT = 15 AMOTION_EVENT_AXIS_HAT_Y MOTION_EVENT = 16 AMOTION_EVENT_AXIS_LTRIGGER MOTION_EVENT = 17 AMOTION_EVENT_AXIS_RTRIGGER MOTION_EVENT = 18 AMOTION_EVENT_AXIS_THROTTLE MOTION_EVENT = 19 AMOTION_EVENT_AXIS_RUDDER MOTION_EVENT = 20 AMOTION_EVENT_AXIS_WHEEL MOTION_EVENT = 21 AMOTION_EVENT_AXIS_GAS MOTION_EVENT = 22 AMOTION_EVENT_AXIS_BRAKE MOTION_EVENT = 23 AMOTION_EVENT_AXIS_DISTANCE MOTION_EVENT = 24 AMOTION_EVENT_AXIS_TILT MOTION_EVENT = 25 AMOTION_EVENT_AXIS_SCROLL MOTION_EVENT = 26 AMOTION_EVENT_AXIS_RELATIVE_X MOTION_EVENT = 27 AMOTION_EVENT_AXIS_RELATIVE_Y MOTION_EVENT = 28 AMOTION_EVENT_AXIS_GENERIC_1 MOTION_EVENT = 32 AMOTION_EVENT_AXIS_GENERIC_2 MOTION_EVENT = 33 AMOTION_EVENT_AXIS_GENERIC_3 MOTION_EVENT = 34 AMOTION_EVENT_AXIS_GENERIC_4 MOTION_EVENT = 35 AMOTION_EVENT_AXIS_GENERIC_5 MOTION_EVENT = 36 AMOTION_EVENT_AXIS_GENERIC_6 MOTION_EVENT = 37 AMOTION_EVENT_AXIS_GENERIC_7 MOTION_EVENT = 38 AMOTION_EVENT_AXIS_GENERIC_8 MOTION_EVENT = 39 AMOTION_EVENT_AXIS_GENERIC_9 MOTION_EVENT = 40 AMOTION_EVENT_AXIS_GENERIC_10 MOTION_EVENT = 41 AMOTION_EVENT_AXIS_GENERIC_11 MOTION_EVENT = 42 AMOTION_EVENT_AXIS_GENERIC_12 MOTION_EVENT = 43 AMOTION_EVENT_AXIS_GENERIC_13 MOTION_EVENT = 44 AMOTION_EVENT_AXIS_GENERIC_14 MOTION_EVENT = 45 AMOTION_EVENT_AXIS_GENERIC_15 MOTION_EVENT = 46 AMOTION_EVENT_AXIS_GENERIC_16 MOTION_EVENT = 47 AMOTION_EVENT_AXIS_GESTURE_X_OFFSET MOTION_EVENT = 48 AMOTION_EVENT_AXIS_GESTURE_Y_OFFSET MOTION_EVENT = 49 AMOTION_EVENT_AXIS_GESTURE_SCROLL_X_DISTANCE MOTION_EVENT = 50 AMOTION_EVENT_AXIS_GESTURE_SCROLL_Y_DISTANCE MOTION_EVENT = 51 AMOTION_EVENT_AXIS_GESTURE_PINCH_SCALE_FACTOR MOTION_EVENT = 52 AMOTION_EVENT_AXIS_GESTURE_SWIPE_FINGER_COUNT MOTION_EVENT = 53 AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE MOTION_EVENT = 53 )
type MOTION_EVENT_BUTTON ¶
type MOTION_EVENT_BUTTON int32
const ( AMOTION_EVENT_BUTTON_PRIMARY MOTION_EVENT_BUTTON = 1 AMOTION_EVENT_BUTTON_SECONDARY MOTION_EVENT_BUTTON = 2 AMOTION_EVENT_BUTTON_TERTIARY MOTION_EVENT_BUTTON = 4 AMOTION_EVENT_BUTTON_BACK MOTION_EVENT_BUTTON = 8 AMOTION_EVENT_BUTTON_FORWARD MOTION_EVENT_BUTTON = 16 AMOTION_EVENT_BUTTON_STYLUS_PRIMARY MOTION_EVENT_BUTTON = 32 AMOTION_EVENT_BUTTON_STYLUS_SECONDARY MOTION_EVENT_BUTTON = 64 )
type MOTION_EVENT_EDGE_FLAG ¶
type MOTION_EVENT_EDGE_FLAG int32
const ( AMOTION_EVENT_EDGE_FLAG_NONE MOTION_EVENT_EDGE_FLAG = 0 AMOTION_EVENT_EDGE_FLAG_TOP MOTION_EVENT_EDGE_FLAG = 1 AMOTION_EVENT_EDGE_FLAG_BOTTOM MOTION_EVENT_EDGE_FLAG = 2 AMOTION_EVENT_EDGE_FLAG_LEFT MOTION_EVENT_EDGE_FLAG = 4 AMOTION_EVENT_EDGE_FLAG_RIGHT MOTION_EVENT_EDGE_FLAG = 8 )
type MOTION_EVENT_FLAG_WINDOW ¶
type MOTION_EVENT_FLAG_WINDOW int32
const (
AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED MOTION_EVENT_FLAG_WINDOW = 1
)
type MOTION_EVENT_TOOL_TYPE ¶
type MOTION_EVENT_TOOL_TYPE int32
const ( AMOTION_EVENT_TOOL_TYPE_UNKNOWN MOTION_EVENT_TOOL_TYPE = 0 AMOTION_EVENT_TOOL_TYPE_FINGER MOTION_EVENT_TOOL_TYPE = 1 AMOTION_EVENT_TOOL_TYPE_STYLUS MOTION_EVENT_TOOL_TYPE = 2 AMOTION_EVENT_TOOL_TYPE_MOUSE MOTION_EVENT_TOOL_TYPE = 3 AMOTION_EVENT_TOOL_TYPE_ERASER MOTION_EVENT_TOOL_TYPE = 4 AMOTION_EVENT_TOOL_TYPE_PALM MOTION_EVENT_TOOL_TYPE = 5 )
type MotionAction ¶
type MotionAction int32
const ( ActionMask MotionAction = 255 ActionPointerIndexMask MotionAction = 65280 ActionDown MotionAction = 0 ActionUp MotionAction = 1 ActionMove MotionAction = 2 ActionCancel MotionAction = 3 ActionOutside MotionAction = 4 ActionPointerDown MotionAction = 5 ActionPointerUp MotionAction = 6 ActionHoverMove MotionAction = 7 ActionScroll MotionAction = 8 ActionHoverEnter MotionAction = 9 ActionHoverExit MotionAction = 10 ActionButtonPress MotionAction = 11 ActionButtonRelease MotionAction = 12 )
func (MotionAction) String ¶
func (v MotionAction) String() string
type MotionClassification ¶
type MotionClassification int32
const ( AMOTION_EVENT_CLASSIFICATION_NONE MotionClassification = 0 AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE MotionClassification = 1 AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS MotionClassification = 2 AMOTION_EVENT_CLASSIFICATION_TWO_FINGER_SWIPE MotionClassification = 3 AMOTION_EVENT_CLASSIFICATION_MULTI_FINGER_SWIPE MotionClassification = 4 AMOTION_EVENT_CLASSIFICATION_PINCH MotionClassification = 5 )
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue wraps the NDK AInputQueue handle.
func NewQueueFromPointer ¶
NewQueueFromPointer wraps a raw AInputQueue pointer.
func (*Queue) DetachLooper ¶
func (h *Queue) DetachLooper()
DetachLooper calls the underlying NDK function.
func (*Queue) FinishEvent ¶
FinishEvent calls the underlying NDK function.
func (*Queue) GetEvent ¶
GetEvent returns the next available input event from the queue. Returns nil if no events are available or an error occurred.
func (*Queue) PreDispatchEvent ¶
PreDispatchEvent performs pre-dispatching of the given event. Returns true if the event was consumed by pre-dispatching (e.g. IME) and should NOT be passed to FinishEvent.
type Source ¶
type Source int32
const ( Unknown Source = 0 Keyboard Source = 257 Dpad Source = 513 Gamepad Source = 1025 Touchscreen Source = 4098 Mouse Source = 8194 Stylus Source = 16386 BluetoothStylus Source = 49154 Trackball Source = 65540 MouseRelative Source = 131076 Touchpad Source = 1048584 Joystick Source = 16777232 Hdmi Source = 33554433 Sensor Source = 67108864 RotaryEncoder Source = 4194304 Any Source = -256 )
Source Files
¶
- alooper.go
- alooper_callback_func.go
- constants.go
- errors.go
- event.go
- event_type.go
- functions.go
- input_keyboard_type.go
- input_motion_range.go
- input_source_class.go
- jnienv.go
- jobject.go
- key_action.go
- key_event_flag.go
- key_state.go
- meta.go
- motion_action.go
- motion_classification.go
- motion_event.go
- motion_event_button.go
- motion_event_edge_flag.go
- motion_event_flag_window.go
- motion_event_tool_type.go
- package.go
- queue.go
- queue_event.go
- source.go