| 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/dev/ppb_keyboard_input_event_dev.h" |
| 10 #include "ppapi/c/ppb_input_event.h" | 11 #include "ppapi/c/ppb_input_event.h" |
| 11 #include "ppapi/cpp/resource.h" | 12 #include "ppapi/cpp/resource.h" |
| 12 | 13 |
| 13 /// @file | 14 /// @file |
| 14 /// This file defines the API used to handle mouse and keyboard input events. | 15 /// This file defines the API used to handle mouse and keyboard input events. |
| 15 | 16 |
| 16 namespace pp { | 17 namespace pp { |
| 17 | 18 |
| 18 class FloatPoint; | 19 class FloatPoint; |
| 19 class Instance; | 20 class Instance; |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 /// Returns the DOM keyCode field for the keyboard event. | 294 /// Returns the DOM keyCode field for the keyboard event. |
| 294 /// Chrome populates this with the Windows-style Virtual Key code of the key. | 295 /// Chrome populates this with the Windows-style Virtual Key code of the key. |
| 295 uint32_t GetKeyCode() const; | 296 uint32_t GetKeyCode() const; |
| 296 | 297 |
| 297 /// Returns the typed character for the given character event. | 298 /// Returns the typed character for the given character event. |
| 298 /// | 299 /// |
| 299 /// @return A string var representing a single typed character for character | 300 /// @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 | 301 /// input events. For non-character input events the return value will be an |
| 301 /// undefined var. | 302 /// undefined var. |
| 302 Var GetCharacterText() const; | 303 Var GetCharacterText() const; |
| 304 |
| 305 /// PPB_KeyboardInputEvent_Dev interface. |
| 306 |
| 307 /// Sets the USB scancode for this key event. When the USB scancode is moved |
| 308 /// out of _Dev, <code>usb_scan_code</code> will be added as a parameter |
| 309 /// to <code>Create</code> and this method will be removed. |
| 310 /// |
| 311 /// @param[in] usb_scan_code The USB scancode that corresponds to the key |
| 312 /// that generated this keyboard event. |
| 313 bool SetUsbScanCode(uint32_t usb_scan_code); |
| 314 |
| 315 /// Returns the USB scancode that corresponds to the key that generated this |
| 316 /// keyboard event. |
| 317 uint32_t GetUsbScanCode() const; |
| 303 }; | 318 }; |
| 304 | 319 |
| 305 } // namespace pp | 320 } // namespace pp |
| 306 | 321 |
| 307 #endif // PPAPI_CPP_INPUT_EVENT_H_ | 322 #endif // PPAPI_CPP_INPUT_EVENT_H_ |
| OLD | NEW |