| 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 /* From dev/ppb_keyboard_input_event_dev.idl, |
| 7 * modified Mon Feb 13 15:43:28 2012. |
| 8 */ |
| 9 |
| 10 #ifndef PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_ |
| 11 #define PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_ |
| 12 |
| 13 #include "ppapi/c/pp_bool.h" |
| 14 #include "ppapi/c/pp_macros.h" |
| 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/c/pp_stdint.h" |
| 17 |
| 18 #define PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE_0_1 \ |
| 19 "PPB_KeyboardInputEvent(Dev);0.1" |
| 20 #define PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE \ |
| 21 PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE_0_1 |
| 22 |
| 23 /** |
| 24 * @file |
| 25 * This file defines the <code>PPB_KeyboardInputEvent_Dev</code> interface, |
| 26 * which provides access to the raw USB scancodes for key input events. |
| 27 */ |
| 28 |
| 29 |
| 30 /** |
| 31 * @addtogroup Interfaces |
| 32 * @{ |
| 33 */ |
| 34 /** |
| 35 * The <code>PPB_KeyboardInputEvent_Dev</code> interface is an extension to the |
| 36 * PPB_KeyboardInputEvent</code> interface that provides |
| 37 */ |
| 38 struct PPB_KeyboardInputEvent_Dev_0_1 { |
| 39 /** |
| 40 * This sets the usb_scan_code in the given <code>resource</code>. It is |
| 41 * intended that this method be called immediately after any call to |
| 42 * <code>Create</code>. |
| 43 * |
| 44 * When GetUsbScanCode moves out of this _Dev interface, then the |
| 45 * <code>usb_scan_code</code> param will be added to the <code>Create</code> |
| 46 * method and this method will be removed. |
| 47 * |
| 48 * @param[in] key_event A <code>PP_Resource</code> created by |
| 49 * <code>PPB_KeyboardInputEvent</code>'s <code>Create</code> method. |
| 50 * |
| 51 * @param[in] usb_scan_code The USB scancode to assign for this |
| 52 * <code>key_event</code>. |
| 53 * |
| 54 * @return <code>PP_TRUE</code> if the usb scancode was set successfully. |
| 55 */ |
| 56 PP_Bool (*SetUsbScanCode)(PP_Resource key_event, uint32_t usb_scan_code); |
| 57 /** |
| 58 * GetUsbScanCode() returns the USB scancode that corresponds to the key |
| 59 * that generated this keyboard event. |
| 60 * |
| 61 * @param[in] key_event A <code>PP_Resource</code> corresponding to a |
| 62 * keyboard event. |
| 63 * |
| 64 * @return The USB scancode field for the keyboard event. |
| 65 */ |
| 66 uint32_t (*GetUsbScanCode)(PP_Resource key_event); |
| 67 }; |
| 68 |
| 69 typedef struct PPB_KeyboardInputEvent_Dev_0_1 PPB_KeyboardInputEvent_Dev; |
| 70 /** |
| 71 * @} |
| 72 */ |
| 73 |
| 74 #endif /* PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_ */ |
| 75 |
| OLD | NEW |