diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 22:04:32 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 22:04:32 +0000 |
commit | d912c698831fee8a5dd35ec603c2127663f593ed (patch) | |
tree | 2652decd8a67ee8dfe1b409006665ad21cdd0919 /ppapi/cpp/input_event.h | |
parent | 45cce16952513f09dc045533d16e0135094fc3e3 (diff) | |
download | chromium_src-d912c698831fee8a5dd35ec603c2127663f593ed.zip chromium_src-d912c698831fee8a5dd35ec603c2127663f593ed.tar.gz chromium_src-d912c698831fee8a5dd35ec603c2127663f593ed.tar.bz2 |
Convert input event to interface version 1.0. Rename some of the mouse and
wheel events to remove the redundant "Mouse" and "Wheel" in the getters.
Rename PP_INPUTEVENT_TYPE_MOUSEWHEEL to .._WHEEL so that it doesn't look
like a mouse event (it's its own type).
Add documentation to the C++ wrapper from the C wrappers. Do some minor
documentation updates.
Update IDL for some of the recent changes we've made. Update the way points
are passed for resource creation since IDL wanted to do it by pointer.
TEST=it compiles.
Review URL: http://codereview.chromium.org/7464003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93263 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/input_event.h')
-rw-r--r-- | ppapi/cpp/input_event.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ppapi/cpp/input_event.h b/ppapi/cpp/input_event.h index 40e4aa0..2b66527 100644 --- a/ppapi/cpp/input_event.h +++ b/ppapi/cpp/input_event.h @@ -94,7 +94,7 @@ class MouseInputEvent : public InputEvent { /// @return 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. - PP_InputEvent_MouseButton GetMouseButton() const; + PP_InputEvent_MouseButton GetButton() const; /// Returns the pixel location of a mouse input event. This value is in /// floating-point units to support high-resolution input events. @@ -102,10 +102,10 @@ class MouseInputEvent : public InputEvent { /// @return 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. - Point GetMousePosition() const; + Point GetPosition() const; // TODO(brettw) figure out exactly what this means. - int32_t GetMouseClickCount() const; + int32_t GetClickCount() const; }; class WheelInputEvent : public InputEvent { @@ -145,12 +145,12 @@ class WheelInputEvent : public InputEvent { /// only generate integer scroll amounts. But fractional values are also /// possible, for example, on some trackpads and newer mice that don't have /// "clicks". - FloatPoint GetWheelDelta() const; + FloatPoint GetDelta() const; /// The number of "clicks" of the scroll wheel that have produced the /// event. The value may have system-specific acceleration applied to it, /// depending on the device. The positive and negative meanings are the same - /// as for GetWheelDelta(). + /// as for GetDelta(). /// /// If you are scrolling, you probably want to use the delta values. These /// tick events can be useful if you aren't doing actual scrolling and don't @@ -163,7 +163,7 @@ class WheelInputEvent : public InputEvent { /// fractional click values from multiple messages until the total value /// reaches positive or negative one. This should represent a similar amount /// of scrolling as for a mouse that has a discrete mouse wheel. - FloatPoint GetWheelTicks() const; + FloatPoint GetTicks() const; // Indicates if the scroll delta x/y indicates pages or lines to // scroll by. |