Chromium Code Reviews| Index: ppapi/api/dev/ppb_keyboard_input_event_dev.idl |
| diff --git a/ppapi/api/dev/ppb_keyboard_input_event_dev.idl b/ppapi/api/dev/ppb_keyboard_input_event_dev.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a8c1bd0bd51271b3d1a52e22ab5f6409b5fe35ad |
| --- /dev/null |
| +++ b/ppapi/api/dev/ppb_keyboard_input_event_dev.idl |
| @@ -0,0 +1,49 @@ |
| +/* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +/** |
| + * This file defines the <code>PPB_KeyboardInputEvent_Dev</code> interface, |
| + * 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.
|
| + * pressed. |
| + */ |
| + |
| +label Chrome { |
| + M19 = 0.1 |
| +}; |
| + |
| +/** |
| + * The <code>PPB_KeyboardInputEvent_Dev</code> interface is an extension to the |
| + * PPB_KeyboardInputEvent</code> interface that provides |
| + */ |
| +[version=0.1, macro="PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE"] |
| +interface PPB_KeyboardInputEvent_Dev { |
| + /** |
| + * This sets a USB key code in the given <code>PP_Resource</code>. It is |
| + * intended that this method be called immediately after any call to |
| + * <code>Create</code>. |
| + * |
| + * @param[in] key_event A <code>PP_Resource</code> created by |
| + * <code>PPB_KeyboardInputEvent</code>'s <code>Create</code> method. |
| + * |
| + * @param[in] usb_key_code The USB key code to associate with this |
| + * <code>key_event</code>. |
| + * |
| + * @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.
|
| + */ |
| + PP_Bool SetUsbKeyCode([in] PP_Resource key_event, |
| + [in] uint32_t usb_key_code); |
| + |
| + /** |
| + * GetUsbKeyCode() returns the USB key code associated with this keyboard |
| + * event. |
| + * |
| + * @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.
|
| + * keyboard event. |
| + * |
| + * @return The USB key code field for the keyboard event, or 0 if there is |
| + * 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.
|
| + */ |
| + uint32_t GetUsbKeyCode([in] PP_Resource key_event); |
| +}; |