Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
|
This class handles mouse events. More...
#include <input_event.h>
Public Member Functions | |
MouseInputEvent () | |
Constructs an is_null() mouse input event object. | |
MouseInputEvent (const InputEvent &event) | |
MouseInputEvent (const InstanceHandle &instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, PP_InputEvent_MouseButton mouse_button, const Point &mouse_position, int32_t click_count, const Point &mouse_movement) | |
PP_InputEvent_MouseButton | GetButton () const |
Point | GetPosition () const |
int32_t | GetClickCount () const |
Point | GetMovement () const |
![]() | |
InputEvent () | |
Default constructor that creates an is_null() InputEvent object. | |
InputEvent (PP_Resource input_event_resource) | |
PP_InputEvent_Type | GetType () const |
PP_TimeTicks | GetTimeStamp () const |
uint32_t | GetModifiers () const |
![]() | |
Resource () | |
The default constructor. | |
Resource (const Resource &other) | |
virtual | ~Resource () |
Destructor. | |
Resource & | operator= (const Resource &other) |
bool | is_null () const |
PP_Resource | pp_resource () const |
PP_Resource | detach () |
Additional Inherited Members | |
![]() | |
Resource (PP_Resource resource) | |
Resource (PassRef, PP_Resource resource) | |
void | PassRefFromConstructor (PP_Resource resource) |
void | Clear () |
Sets this resource to null. This releases ownership of the resource. | |
This class handles mouse events.
|
explicit |
This constructor constructs a mouse input event object from the provided generic input event. If the given event is itself is_null() or is not a mouse input event, the mouse object will be is_null().
event | An InputEvent . |
pp::MouseInputEvent::MouseInputEvent | ( | const InstanceHandle & | instance, |
PP_InputEvent_Type | type, | ||
PP_TimeTicks | time_stamp, | ||
uint32_t | modifiers, | ||
PP_InputEvent_MouseButton | mouse_button, | ||
const Point & | mouse_position, | ||
int32_t | click_count, | ||
const Point & | mouse_movement | ||
) |
This constructor manually constructs a mouse event from the provided parameters.
[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] | click_count@param[in] | mouse_movement The change in position of the mouse. |
PP_InputEvent_MouseButton pp::MouseInputEvent::GetButton | ( | ) | const |
GetButton() returns the mouse position for a mouse input event.
Point pp::MouseInputEvent::GetMovement | ( | ) | const |
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.
Point pp::MouseInputEvent::GetPosition | ( | ) | const |
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.