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

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: Init new fields in InputEventData 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
« no previous file with comments | « ppapi/c/dev/ppb_keyboard_input_event_dev.h ('k') | ppapi/cpp/input_event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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.
brettw 2012/02/15 00:42:44 I prefer not to have Dev interfaces in the C++ wra
Wez 2012/02/16 19:18:51 Agreed; the API is sufficiently simple that this s
garykac 2012/02/16 20:45:03 Done (patchset 13)
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_
OLDNEW
« no previous file with comments | « ppapi/c/dev/ppb_keyboard_input_event_dev.h ('k') | ppapi/cpp/input_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698