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

Side by Side Diff: ppapi/api/dev/ppb_keyboard_input_event_dev.idl

Issue 9353013: Add GetUsbKeyCode dev interface for Pepper key events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename to usb_key_code 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
(Empty)
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 /**
7 * This file defines the <code>PPB_KeyboardInputEvent_Dev</code> interface,
8 * which provides access to USB scancodes that identify the physical key being
Wez 2012/02/19 22:34:22 nit: scancodes -> key codes
garykac 2012/02/21 18:42:21 Done.
9 * pressed.
10 */
11
12 label Chrome {
13 M19 = 0.1
14 };
15
16 /**
17 * The <code>PPB_KeyboardInputEvent_Dev</code> interface is an extension to the
18 * PPB_KeyboardInputEvent</code> interface that provides
19 */
20 [version=0.1, macro="PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE"]
21 interface PPB_KeyboardInputEvent_Dev {
22 /**
23 * This sets a USB key code in the given <code>PP_Resource</code>. It is
24 * intended that this method be called immediately after any call to
25 * <code>Create</code>.
26 *
27 * @param[in] key_event A <code>PP_Resource</code> created by
28 * <code>PPB_KeyboardInputEvent</code>'s <code>Create</code> method.
29 *
30 * @param[in] usb_key_code The USB key code to associate with this
31 * <code>key_event</code>.
32 *
33 * @return <code>PP_TRUE</code> if the usb key code was set successfully.
Wez 2012/02/19 22:34:22 nit: usb -> USB
garykac 2012/02/21 18:42:21 Done.
34 */
35 PP_Bool SetUsbKeyCode([in] PP_Resource key_event,
36 [in] uint32_t usb_key_code);
37
38 /**
39 * GetUsbKeyCode() returns the USB key code associated with this keyboard
40 * event.
41 *
42 * @param[in] key_event A <code>PP_Resource</code> corresponding to a
Wez 2012/02/19 22:34:22 nit: The event for which to return the key code.
garykac 2012/02/21 18:42:21 Done.
43 * keyboard event.
44 *
45 * @return The USB key code field for the keyboard event, or 0 if there is
46 * no USB scancode associated with this event.
Wez 2012/02/19 22:34:22 What does it return if you pass a non key event?
garykac 2012/02/21 18:42:21 Done.
47 */
48 uint32_t GetUsbKeyCode([in] PP_Resource key_event);
49 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698