Pepper_47_C_interfaces
Public Attributes | List of all members
PPB_MouseInputEvent_1_1 Struct Reference

#include <ppb_input_event.h>

Collaboration diagram for PPB_MouseInputEvent_1_1:
Collaboration graph

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)
 

Detailed Description

The PPB_MouseInputEvent interface contains pointers to several functions related to mouse input events.

Definition at line 476 of file ppb_input_event.h.

Member Data Documentation

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.

Parameters
[in]instanceThe instance for which this event occurred.
[in]typeA PP_InputEvent_Type identifying the type of input event.
[in]time_stampA PP_TimeTicks indicating the time when the event occurred.
[in]modifiersA bit field combination of the PP_InputEvent_Modifier flags.
[in]mouse_buttonThe 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_positionA Point containing the x and y position of the mouse when the event occurred.
[in]mouse_movementThe change in position of the mouse.
Returns
A PP_Resource containing the new mouse input event.

Definition at line 506 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.

Parameters
[in]mouse_eventA PP_Resource corresponding to a mouse event.
Returns
The mouse button associated with mouse down and up events. This value will be PP_EVENT_MOUSEBUTTON_NONE for mouse move, enter, and leave events, and for all non-mouse events.

Definition at line 534 of file ppb_input_event.h.

int32_t(* PPB_MouseInputEvent_1_1::GetClickCount)(PP_Resource mouse_event)

Definition at line 551 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.

Parameters
[in]mouse_eventA PP_Resource corresponding to a mouse event.
Returns
The change in position of the mouse, relative to the previous position.

Definition at line 564 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.

Parameters
[in]mouse_eventA PP_Resource corresponding to a mouse event.
Returns
The point associated with the mouse event, relative to the upper- left of the instance receiving the event. These values can be negative for mouse drags. The return value will be (0, 0) for non-mouse events.

Definition at line 547 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.

Parameters
[in]resourceA PP_Resource corresponding to an event.
Returns
PP_TRUE if the given resource is a valid mouse input event, otherwise PP_FALSE.

Definition at line 522 of file ppb_input_event.h.


The documentation for this struct was generated from the following file: