Pepper_31_C_interfaces
|
#include <ppb_input_event.h>
Public Attributes | |
PP_Resource(* | Create )(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, PP_InputEvent_MouseButton mouse_button, const struct PP_Point *mouse_position, int32_t click_count, const struct PP_Point *mouse_movement) |
PP_Bool(* | IsMouseInputEvent )(PP_Resource resource) |
PP_InputEvent_MouseButton(* | GetButton )(PP_Resource mouse_event) |
struct PP_Point(* | GetPosition )(PP_Resource mouse_event) |
int32_t(* | GetClickCount )(PP_Resource mouse_event) |
struct PP_Point(* | GetMovement )(PP_Resource mouse_event) |
The PPB_MouseInputEvent
interface contains pointers to several functions related to mouse input events.
Definition at line 477 of file ppb_input_event.h.
PP_Resource(* PPB_MouseInputEvent_1_1::Create)(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, PP_InputEvent_MouseButton mouse_button, const struct PP_Point *mouse_position, int32_t click_count, const struct PP_Point *mouse_movement) |
Create() creates a mouse input event with the given parameters. Normally you will get a mouse 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 mouse event types.
[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. |
[in] | mouse_button | The button that changed for mouse down or up events. This value will be PP_EVENT_MOUSEBUTTON_NONE for mouse move, enter, and leave events. |
[in] | mouse_position | A Point containing the x and y position of the mouse when the event occurred. |
[in] | mouse_movement | The change in position of the mouse. |
PP_Resource
containing the new mouse input event. Definition at line 507 of file ppb_input_event.h.
PP_InputEvent_MouseButton(* PPB_MouseInputEvent_1_1::GetButton)(PP_Resource mouse_event) |
GetButton() returns the mouse button that generated a mouse down or up event.
[in] | mouse_event | A PP_Resource corresponding to a mouse event. |
PP_EVENT_MOUSEBUTTON_NONE
for mouse move, enter, and leave events, and for all non-mouse events. Definition at line 535 of file ppb_input_event.h.
int32_t(* PPB_MouseInputEvent_1_1::GetClickCount)(PP_Resource mouse_event) |
Definition at line 552 of file ppb_input_event.h.
struct PP_Point(* PPB_MouseInputEvent_1_1::GetMovement)(PP_Resource mouse_event) |
Returns the change in position of the mouse. When the mouse is locked, although the mouse position doesn't actually change, this function still provides movement information, which indicates what the change in position would be had the mouse not been locked.
[in] | mouse_event | A PP_Resource corresponding to a mouse event. |
Definition at line 565 of file ppb_input_event.h.
struct PP_Point(* PPB_MouseInputEvent_1_1::GetPosition)(PP_Resource mouse_event) |
GetPosition() returns the pixel location of a mouse input event. When the mouse is locked, it returns the last known mouse position just as mouse lock was entered.
[in] | mouse_event | A PP_Resource corresponding to a mouse event. |
Definition at line 548 of file ppb_input_event.h.
PP_Bool(* PPB_MouseInputEvent_1_1::IsMouseInputEvent)(PP_Resource resource) |
IsMouseInputEvent() determines if a resource is a mouse event.
[in] | resource | A PP_Resource corresponding to an event. |
PP_TRUE
if the given resource is a valid mouse input event, otherwise PP_FALSE
. Definition at line 523 of file ppb_input_event.h.