Pointer Events

The following events are generated in response to a device such as a mouse or a touchscreen.  These events are targeted at specific controls based upon the controls location and sensitivity.

gre.press

A mouse/touchscreen has been pressed.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
GR_EVENT_BTN_MIDDLE - 0x0002
GR_EVENT_BTN_RIGHT - 0x0004
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.motion

A touch contact has moved.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
GR_EVENT_BTN_MIDDLE - 0x0002
GR_EVENT_BTN_RIGHT - 0x0004
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.release

A mouse/touchscreen has been released.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
GR_EVENT_BTN_MIDDLE - 0x0002
GR_EVENT_BTN_RIGHT - 0x0004
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.touch

If a mouse/touchscreen presses and then releases on the same control then a touch event will be generated.  This is useful for activating button style elements.  If the release is found to intersect a different control then a touch event is not generated.

Note

This event is synthetically generated by the framework based on incoming gre.press and gre.release events. Event redirectors should generally not include this event in their list of redirection events.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
GR_EVENT_BTN_MIDDLE - 0x0002
GR_EVENT_BTN_RIGHT - 0x0004
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.mtevent

A touchscreen contact has changed and there is information for more than one touch contact. A gre.mtevent will only be delivered to the application and screen. Storyboard Engine will divide the event into discrete gre.mtpress, gre.mtmotion and gre.mtrelease events which are then delivered to the appropriate model elements.

Data

uint32_t         timestamp
int16_t          npoints
int16_t[npoints] x
int16_t[npoints] y
int16_t[npoints] z
int16_t[npoints] id
int16_t[npoints] state
int16_t[npoints] spare
                    

Where:

timestamp

This is an event timestamp in milliseconds since application start

npoints

This is the number of points included in this event and may not correlate to the number of fingers currently in contact with the touchscreen.

x

This is an array of x values for npoints touch contacts

y

This is an array of y values for npoints touch contacts

z

This is an array of z values for npoints touch contacts. This parameter is dependent on the availability of z-co-ordinate information

id

This is an array of id values for npoints touch contacts. This parameter is used to track multi-touch presses as they come in

state

This is an array of state values for npoints touch contacts.

GR_PTR_STATE_PRESS - 0x01: as a finger makes contact with the touchscreen.
GR_PTR_STATE_MOTION - 0x02: as a finger moves on the touchscreen.
GR_PTR_STATE_RELEASE - 0x03: as a finger is lifted from the touchscreen.
spare

This is padding and should be 0

gre.mtpress

A touchscreen has been pressed. This event is emitted where are two or more contact points.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.mtmotion

A touch contact has moved. This event is emitted when there are two or more contact points.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.mtrelease

A touchscreen has been released. This event is emitted when there are two or more contact points.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.inbound

A mouse/touch has entered a control (if dragging a pointer or finger) which has no other mouse/touch points in the control boundary. This event is generated once the coordinates enter a control boundary. If mouse motion events are not supported on the platform then this event will not be generated.

Note

Control groups can not receive inbound events.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
GR_EVENT_BTN_MIDDLE - 0x0002
GR_EVENT_BTN_RIGHT - 0x0004
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.outbound

A mouse/touch has left a control (if dragging a pointer or finger) and there are no remaining fingers in the control boundary. This event is generated once the coordinates leave a control boundary. If mouse motion events are not supported on the platform then this event will not be generated.

Note

Control groups can not receive outbound events.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                        

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
GR_EVENT_BTN_MIDDLE - 0x0002
GR_EVENT_BTN_RIGHT - 0x0004
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.mtinbound

A mouse/touch has entered a control (if dragging a pointer or finger) while other mouse/touch points are currently in the control boundary. This event is generated once the coordinates enter a control boundary. If mouse motion events are not supported on the platform then this event will not be generated.

Note

Control groups can not receive outbound events.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
GR_EVENT_BTN_MIDDLE - 0x0002
GR_EVENT_BTN_RIGHT - 0x0004
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

gre.mtoutbound

A mouse/touch has left a control (if dragging a pointer or finger) while other mouse/touch points remain in the control bounds. This event is generated once the coordinates leave a control boundary. If mouse motion events are not supported on the platform then this event will not be generated.

Note

Control groups can not receive outbound events.

Data

uint32_t    button
uint32_t    timestamp
int16_t     subtype
int16_t     x
int16_t     y
int16_t     z
int16_t     id
int16_t     spare
                    

Where:

button
GR_EVENT_BTN_LEFT - 0x0001: if this is a touchscreen then the button is always left
GR_EVENT_BTN_MIDDLE - 0x0002
GR_EVENT_BTN_RIGHT - 0x0004
timestamp

This is an event timestamp in milliseconds since application start

subtype
GR_EVENT_RELEASE_IN
GR_EVENT_RELEASE_OUT
z

This parameter is dependent on the availability of z- co-ordinate information

id

This parameter is used to track multi-touch presses as they come in

spare

This is padding and should be 0

Was this article helpful?
0 out of 0 found this helpful