| OLD | NEW |
| (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 key codes that identify the physical key being |
| 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. |
| 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 The key event for which to return the key code. |
| 43 * |
| 44 * @return The USB key code field for the keyboard event. If there is no |
| 45 * USB scancode associated with this event, or if the PP_Resource does not |
| 46 * support the PPB_InputEvent_API (i.e., it is not an input event), then |
| 47 * a 0 is returned. |
| 48 */ |
| 49 uint32_t GetUsbKeyCode([in] PP_Resource key_event); |
| 50 }; |
| OLD | NEW |