TouchEvent

Table of contents

Contains parameters of a touch event

type TouchEvent struct {
    AltKey bool
    CtrlKey bool
    MetaKey bool
    ShiftKey bool
    TimeStamp uint64
    Touches []Touch
}
Member Type Description
AltKey bool true if the alt key was down when the event was fired, false otherwise
CtrlKey bool true if the control key was down when the event was fired, false otherwise
MetaKey bool true if the meta key was down when the event was fired, false otherwise
ShiftKey bool true if the shift key was down when the event was fired, false otherwise
TimeStamp uint64 Time at which the event was created (in milliseconds). This value is time since epoch—but in reality, browsers' definitions vary
Touches []Touch Touches is the array of all the Touch objects representing all current points of contact with the surface, regardless of target or changed status
func GetTouchCancelListeners(view View, subviewID ...string) []func(View, TouchEvent)

Returns the "touch-cancel" listener list. If there are no listeners then the empty list is returned. If the second argument (subviewID) is not specified or is an empty string then a value from the first argument (view) is returned

func GetTouchEndListeners(view View, subviewID ...string) []func(View, TouchEvent)

Returns the "touch-end" listener list. If there are no listeners then the empty list is returned. If the second argument (subviewID) is not specified or is an empty string then a value from the first argument (view) is returned

func GetTouchMoveListeners(view View, subviewID ...string) []func(View, TouchEvent)

Returns the "touch-move" listener list. If there are no listeners then the empty list is returned. If the second argument (subviewID) is not specified or is an empty string then a value from the first argument (view) is returned

func GetTouchStartListeners(view View, subviewID ...string) []func(View, TouchEvent)

Returns the "touch-start" listener list. If there are no listeners then the empty list is returned. If the second argument (subviewID) is not specified or is an empty string then a value from the first argument (view) is returned