{{+bindTo:partials.standard_nacl_article}}
PP_Resource(* | Create )(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers) |
void(* | AddTouchPoint )(PP_Resource touch_event, PP_TouchListType list, const struct PP_TouchPoint *point) |
PP_Bool(* | IsTouchInputEvent )(PP_Resource resource) |
uint32_t(* | GetTouchCount )(PP_Resource resource, PP_TouchListType list) |
struct PP_TouchPoint(* | GetTouchByIndex )(PP_Resource resource, PP_TouchListType list, uint32_t index) |
struct PP_TouchPoint(* | GetTouchById )(PP_Resource resource, PP_TouchListType list, uint32_t touch_id) |
The PPB_TouchInputEvent
interface contains pointers to several functions related to touch events.
void(* PPB_TouchInputEvent::AddTouchPoint)(PP_Resource touch_event, PP_TouchListType list, const struct PP_TouchPoint *point) |
Adds a touch point to the touch event in the specified touch-list.
[in] | touch_event | A PP_Resource corresponding to a touch event. |
[in] | list | The list to add the touch point to. |
[in] | point | The point to add to the list. |
PP_Resource(* PPB_TouchInputEvent::Create)(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers) |
Creates a touch input event with the given parameters.
Normally you will get a touch event passed through the HandleInputEvent and will not need to create them, but some applications may want to create their own for internal use. The type must be one of the touch event types. This newly created touch input event does not have any touch point in any of the touch-point lists. AddTouchPoint
should be called to add the touch-points.
[in] | instance | The instance for which this event occurred. |
[in] | type | A PP_InputEvent_Type identifying the type of input event. |
[in] | time_stamp | A PP_TimeTicks indicating the time when the event occurred. |
[in] | modifiers | A bit field combination of the PP_InputEvent_Modifier flags. |
PP_Resource
containing the new touch input event. struct PP_TouchPoint(* PPB_TouchInputEvent::GetTouchById)(PP_Resource resource, PP_TouchListType list, uint32_t touch_id) [read] |
Returns the touch-point with the specified touch-id in the specified list.
[in] | resource | A PP_Resource corresponding to a touch event. |
[in] | list | The list. |
[in] | touch_id | The id of the touch-point. |
PP_TouchPoint
representing the touch-point. struct PP_TouchPoint(* PPB_TouchInputEvent::GetTouchByIndex)(PP_Resource resource, PP_TouchListType list, uint32_t index) [read] |
Returns the touch-point at the specified index from the specified list.
[in] | resource | A PP_Resource corresponding to a touch event. |
[in] | list | The list. |
[in] | index | The index. |
PP_TouchPoint
representing the touch-point. uint32_t(* PPB_TouchInputEvent::GetTouchCount)(PP_Resource resource, PP_TouchListType list) |
Returns the number of touch-points in the specified list.
[in] | resource | A PP_Resource corresponding to a touch event. |
[in] | list | The list. |
PP_Bool(* PPB_TouchInputEvent::IsTouchInputEvent)(PP_Resource resource) |
IsTouchInputEvent() determines if a resource is a touch event.
[in] | resource | A PP_Resource corresponding to an event. |
PP_TRUE
if the given resource is a valid touch input event, otherwise PP_FALSE
.