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

Side by Side Diff: ppapi/c/dev/ppb_keyboard_input_event_dev.h

Issue 9353013: Add GetUsbKeyCode dev interface for Pepper key events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More header updates to fix all presubmit problems. 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 /* From dev/ppb_keyboard_input_event_dev.idl,
7 * modified Tue Feb 21 08:56:59 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 USB key codes that identify the physical key being
27 * pressed.
28 */
29
30
31 /**
32 * @addtogroup Interfaces
33 * @{
34 */
35 /**
36 * The <code>PPB_KeyboardInputEvent_Dev</code> interface is an extension to the
37 * PPB_KeyboardInputEvent</code> interface that provides
38 */
39 struct PPB_KeyboardInputEvent_Dev_0_1 {
40 /**
41 * This sets a USB key code in the given <code>PP_Resource</code>. It is
42 * intended that this method be called immediately after any call to
43 * <code>Create</code>.
44 *
45 * @param[in] key_event A <code>PP_Resource</code> created by
46 * <code>PPB_KeyboardInputEvent</code>'s <code>Create</code> method.
47 *
48 * @param[in] usb_key_code The USB key code to associate with this
49 * <code>key_event</code>.
50 *
51 * @return <code>PP_TRUE</code> if the USB key code was set successfully.
52 */
53 PP_Bool (*SetUsbKeyCode)(PP_Resource key_event, uint32_t usb_key_code);
54 /**
55 * GetUsbKeyCode() returns the USB key code associated with this keyboard
56 * event.
57 *
58 * @param[in] key_event The key event for which to return the key code.
59 *
60 * @return The USB key code field for the keyboard event. If there is no
61 * USB scancode associated with this event, or if the PP_Resource does not
62 * support the PPB_InputEvent_API (i.e., it is not an input event), then
63 * a 0 is returned.
64 */
65 uint32_t (*GetUsbKeyCode)(PP_Resource key_event);
66 };
67
68 typedef struct PPB_KeyboardInputEvent_Dev_0_1 PPB_KeyboardInputEvent_Dev;
69 /**
70 * @}
71 */
72
73 #endif /* PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_ */
74
OLDNEW
« no previous file with comments | « ppapi/api/dev/ppb_keyboard_input_event_dev.idl ('k') | ppapi/native_client/src/shared/ppapi_proxy/input_event_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698