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

Side by Side Diff: ppapi/cpp/input_event.h

Issue 9353013: Add GetUsbKeyCode dev interface for Pepper key events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add GetUsbScanCode_Dev to Pepper/NaCl interface Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 /// @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time 274 /// @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time
275 /// when the event occured. 275 /// when the event occured.
276 /// 276 ///
277 /// @param[in] modifiers A bit field combination of the 277 /// @param[in] modifiers A bit field combination of the
278 /// <code>PP_InputEvent_Modifier</code> flags. 278 /// <code>PP_InputEvent_Modifier</code> flags.
279 /// 279 ///
280 /// @param[in] key_code This value reflects the DOM KeyboardEvent 280 /// @param[in] key_code This value reflects the DOM KeyboardEvent
281 /// <code>keyCode</code> field. Chrome populates this with the Windows-style 281 /// <code>keyCode</code> field. Chrome populates this with the Windows-style
282 /// Virtual Key code of the key. 282 /// Virtual Key code of the key.
283 /// 283 ///
284 /// @param[in] usb_scan_code The USB scancode that corresponds to the key
285 /// that generated this keyboard event.
286 ///
284 /// @param[in] character_text This value represents the typed character as a 287 /// @param[in] character_text This value represents the typed character as a
285 /// UTF-8 string. 288 /// UTF-8 string.
286 KeyboardInputEvent(Instance* instance, 289 KeyboardInputEvent(Instance* instance,
287 PP_InputEvent_Type type, 290 PP_InputEvent_Type type,
288 PP_TimeTicks time_stamp, 291 PP_TimeTicks time_stamp,
289 uint32_t modifiers, 292 uint32_t modifiers,
290 uint32_t key_code, 293 uint32_t key_code,
294 uint32_t usb_scan_code,
291 const Var& character_text); 295 const Var& character_text);
292 296
293 /// Returns the DOM keyCode field for the keyboard event. 297 /// Returns the DOM keyCode field for the keyboard event.
294 /// Chrome populates this with the Windows-style Virtual Key code of the key. 298 /// Chrome populates this with the Windows-style Virtual Key code of the key.
295 uint32_t GetKeyCode() const; 299 uint32_t GetKeyCode() const;
296 300
301 /// Returns the USB scancode that corresponds to the key that generated this
302 /// keyboard event.
303 uint32_t GetUsbScanCode_Dev() const;
304
297 /// Returns the typed character for the given character event. 305 /// Returns the typed character for the given character event.
298 /// 306 ///
299 /// @return A string var representing a single typed character for character 307 /// @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 308 /// input events. For non-character input events the return value will be an
301 /// undefined var. 309 /// undefined var.
302 Var GetCharacterText() const; 310 Var GetCharacterText() const;
303 }; 311 };
304 312
305 } // namespace pp 313 } // namespace pp
306 314
307 #endif // PPAPI_CPP_INPUT_EVENT_H_ 315 #endif // PPAPI_CPP_INPUT_EVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698