PointerEvent

Table of contents

Represent a stylus events

Inherit members from MouseEvent

type PointerEvent struct {
    MouseEvent
    Height float64
    IsPrimary bool
    PointerID int
    PointerType string
    Pressure float64
    TangentialPressure float64
    TiltX float64
    TiltY float64
    Twist float64
    Width float64
}
Member Type Description
Height float64 Height (magnitude on the Y axis), in pixels, of the contact geometry of the pointer
IsPrimary bool Indicates if the pointer represents the primary pointer of this pointer type
PointerID int Unique identifier for the pointer causing the event
PointerType string Indicates the device type that caused the event ("mouse", "pen", "touch", etc.)
Pressure float64 Normalized pressure of the pointer input in the range 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively
TangentialPressure float64 Normalized tangential pressure of the pointer input (also known as barrel pressure or cylinder stress) in the range -1 to 1, where 0 is the neutral position of the control
TiltX float64 Plane angle (in degrees, in the range of -90 to 90) between the Y–Z plane and the plane containing both the pointer (e.g. pen stylus) axis and the Y axis
TiltY float64 Plane angle (in degrees, in the range of -90 to 90) between the X–Z plane and the plane containing both the pointer (e.g. pen stylus) axis and the X axis
Twist float64 Clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, with a value in the range 0 to 359
Width float64 Width (magnitude on the X axis), in pixels, of the contact geometry of the pointer
func GetPointerCancelListeners(view View, subviewID ...string) []func(View, PointerEvent)

Returns the "pointer-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 GetPointerDownListeners(view View, subviewID ...string) []func(View, PointerEvent)

Returns the "pointer-down" 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 GetPointerMoveListeners(view View, subviewID ...string) []func(View, PointerEvent)

Returns the "pointer-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 GetPointerOutListeners(view View, subviewID ...string) []func(View, PointerEvent)

Returns the "pointer-out" 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 GetPointerOverListeners(view View, subviewID ...string) []func(View, PointerEvent)

Returns the "pointer-over" 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 GetPointerUpListeners(view View, subviewID ...string) []func(View, PointerEvent)

Returns the "pointer-up" 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.