pp::MouseInputEvent Class Reference
Public Member Functions
|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|
This class handles mouse events.
Constructor & Destructor Documentation
|pp::MouseInputEvent::MouseInputEvent||(||const InstanceHandle &||instance,|
|const Point &||mouse_position,|
|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_Typeidentifying the type of input event.
[in] time_stamp A
PP_TimeTicksindicating the time when the event occurred.
[in] modifiers A bit field combination of the
[in] mouse_button The button that changed for mouse down or up events. This value will be
PP_EVENT_MOUSEBUTTON_NONEfor mouse move, enter, and leave events.
[in] mouse_position A
Pointcontaining the x and y position of the mouse when the event occurred.
[in] click_count [in] mouse_movement The change in position of the mouse.
Member Function Documentation
GetButton() returns the mouse position for a mouse input event.
- 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.
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.
- The change in position of the mouse, relative to the previous position.
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.
- 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.
The documentation for this class was generated from the following file: