Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_CPP_INPUT_EVENT_H_ | 5 #ifndef PPAPI_CPP_INPUT_EVENT_H_ |
| 6 #define PPAPI_CPP_INPUT_EVENT_H_ | 6 #define PPAPI_CPP_INPUT_EVENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ppapi/c/ppb_input_event.h" | 10 #include "ppapi/c/ppb_input_event.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 /// <code>PP_InputEvent_Modifier</code> flags. | 114 /// <code>PP_InputEvent_Modifier</code> flags. |
| 115 /// | 115 /// |
| 116 /// @param[in] mouse_button The button that changed for mouse down or up | 116 /// @param[in] mouse_button The button that changed for mouse down or up |
| 117 /// events. This value will be <code>PP_EVENT_MOUSEBUTTON_NONE</code> for | 117 /// events. This value will be <code>PP_EVENT_MOUSEBUTTON_NONE</code> for |
| 118 /// mouse move, enter, and leave events. | 118 /// mouse move, enter, and leave events. |
| 119 /// | 119 /// |
| 120 /// @param[in] mouse_position A <code>Point</code> containing the x and y | 120 /// @param[in] mouse_position A <code>Point</code> containing the x and y |
| 121 /// position of the mouse when the eent occurred. | 121 /// position of the mouse when the eent occurred. |
| 122 /// | 122 /// |
| 123 /// @param[in] click_count | 123 /// @param[in] click_count |
| 124 /// TODO(brettw) figure out exactly what this means. | 124 // TODO(brettw) figure out exactly what this means. |
| 125 /// | 125 /// |
| 126 /// @param[in] mouse_movement The change in position of the mouse. | 126 /// @param[in] mouse_movement The change in position of the mouse. |
| 127 MouseInputEvent(Instance* instance, | 127 MouseInputEvent(Instance* instance, |
| 128 PP_InputEvent_Type type, | 128 PP_InputEvent_Type type, |
| 129 PP_TimeTicks time_stamp, | 129 PP_TimeTicks time_stamp, |
| 130 uint32_t modifiers, | 130 uint32_t modifiers, |
| 131 PP_InputEvent_MouseButton mouse_button, | 131 PP_InputEvent_MouseButton mouse_button, |
| 132 const Point& mouse_position, | 132 const Point& mouse_position, |
| 133 int32_t click_count, | 133 int32_t click_count, |
| 134 const Point& mouse_movement); | 134 const Point& mouse_movement); |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 153 int32_t GetClickCount() const; | 153 int32_t GetClickCount() const; |
| 154 | 154 |
| 155 /// Returns the change in position of the mouse. When the mouse is locked, | 155 /// Returns the change in position of the mouse. When the mouse is locked, |
| 156 /// although the mouse position doesn't actually change, this function | 156 /// although the mouse position doesn't actually change, this function |
| 157 /// still provides movement information, which indicates what the change in | 157 /// still provides movement information, which indicates what the change in |
| 158 /// position would be had the mouse not been locked. | 158 /// position would be had the mouse not been locked. |
| 159 /// | 159 /// |
| 160 /// @return The change in position of the mouse, relative to the previous | 160 /// @return The change in position of the mouse, relative to the previous |
| 161 /// position. | 161 /// position. |
| 162 /// | 162 /// |
| 163 /// TODO(yzshen): This feature hasn't been fully supported yet. For now, | 163 // TODO(yzshen): This feature hasn't been fully supported yet. For now, |
| 164 /// movement information is provided only if the mouse is locked. If the mouse | 164 /// movement information is provided only if the mouse is locked. If the mouse |
|
dmichael (off chromium)
2012/02/15 17:53:50
164 and 165 also should have "//" instead of "///"
jond
2012/02/15 22:33:53
Done.
| |
| 165 /// is not locked, the returned value is (0, 0). | 165 /// is not locked, the returned value is (0, 0). |
| 166 Point GetMovement() const; | 166 Point GetMovement() const; |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 class WheelInputEvent : public InputEvent { | 169 class WheelInputEvent : public InputEvent { |
| 170 public: | 170 public: |
| 171 /// Constructs an is_null() wheel input event object. | 171 /// Constructs an is_null() wheel input event object. |
| 172 WheelInputEvent(); | 172 WheelInputEvent(); |
| 173 | 173 |
| 174 /// This constructor constructs a wheel input event object from the | 174 /// This constructor constructs a wheel input event object from the |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 298 /// | 298 /// |
| 299 /// @return A string var representing a single typed character for character | 299 /// @return A string var representing a single typed character for character |
| 300 /// input events. For non-character input events the return value will be an | 300 /// input events. For non-character input events the return value will be an |
| 301 /// undefined var. | 301 /// undefined var. |
| 302 Var GetCharacterText() const; | 302 Var GetCharacterText() const; |
| 303 }; | 303 }; |
| 304 | 304 |
| 305 } // namespace pp | 305 } // namespace pp |
| 306 | 306 |
| 307 #endif // PPAPI_CPP_INPUT_EVENT_H_ | 307 #endif // PPAPI_CPP_INPUT_EVENT_H_ |
| OLD | NEW |