Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2568)

Unified Diff: ppapi/cpp/input_event.h

Issue 7715021: Add movement information to PPB_MouseInputEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/cpp/input_event.h
diff --git a/ppapi/cpp/input_event.h b/ppapi/cpp/input_event.h
index f634cb95b8c244acc7c5633babb7e46da6fb8139..f414b6f95c6327e63fe40ab926b6276ab2757f6c 100644
--- a/ppapi/cpp/input_event.h
+++ b/ppapi/cpp/input_event.h
@@ -123,13 +123,15 @@ class MouseInputEvent : public InputEvent {
/// @param[in] click_count
/// TODO(brettw) figure out exactly what this means.
///
+ /// @param[in] mouse_movement The change in position of the mouse.
MouseInputEvent(Instance* 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);
+ int32_t click_count,
+ const Point& mouse_movement);
/// GetButton() returns the mouse position for a mouse input event.
///
@@ -148,6 +150,15 @@ class MouseInputEvent : public InputEvent {
// TODO(brettw) figure out exactly what this means.
int32_t GetClickCount() const;
+
+ /// Returns the change in position of the mouse. When the cursor lock is
+ /// enabled, although the mouse position doesn't actually change, this
+ /// function continues to provide movement information as when the cursor is
+ /// unlocked.
+ ///
+ /// @return The change in position of the mouse, relative to the previous
+ /// position.
+ Point GetMovement() const;
};
class WheelInputEvent : public InputEvent {

Powered by Google App Engine
This is Rietveld 408576698