| Index: ppapi/c/dev/ppb_keyboard_input_event_dev.h
|
| diff --git a/ppapi/c/dev/ppb_keyboard_input_event_dev.h b/ppapi/c/dev/ppb_keyboard_input_event_dev.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..56f5f580c3ca72940602cebb38b46c280f8bdd11
|
| --- /dev/null
|
| +++ b/ppapi/c/dev/ppb_keyboard_input_event_dev.h
|
| @@ -0,0 +1,75 @@
|
| +/* 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.
|
| + */
|
| +
|
| +/* From dev/ppb_keyboard_input_event_dev.idl,
|
| + * modified Mon Feb 13 15:43:28 2012.
|
| + */
|
| +
|
| +#ifndef PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_
|
| +#define PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_
|
| +
|
| +#include "ppapi/c/pp_bool.h"
|
| +#include "ppapi/c/pp_macros.h"
|
| +#include "ppapi/c/pp_resource.h"
|
| +#include "ppapi/c/pp_stdint.h"
|
| +
|
| +#define PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE_0_1 \
|
| + "PPB_KeyboardInputEvent(Dev);0.1"
|
| +#define PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE \
|
| + PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE_0_1
|
| +
|
| +/**
|
| + * @file
|
| + * This file defines the <code>PPB_KeyboardInputEvent_Dev</code> interface,
|
| + * which provides access to the raw USB scancodes for key input events.
|
| + */
|
| +
|
| +
|
| +/**
|
| + * @addtogroup Interfaces
|
| + * @{
|
| + */
|
| +/**
|
| + * The <code>PPB_KeyboardInputEvent_Dev</code> interface is an extension to the
|
| + * PPB_KeyboardInputEvent</code> interface that provides
|
| + */
|
| +struct PPB_KeyboardInputEvent_Dev_0_1 {
|
| + /**
|
| + * This sets the usb_scan_code in the given <code>resource</code>. It is
|
| + * intended that this method be called immediately after any call to
|
| + * <code>Create</code>.
|
| + *
|
| + * When GetUsbScanCode moves out of this _Dev interface, then the
|
| + * <code>usb_scan_code</code> param will be added to the <code>Create</code>
|
| + * method and this method will be removed.
|
| + *
|
| + * @param[in] key_event A <code>PP_Resource</code> created by
|
| + * <code>PPB_KeyboardInputEvent</code>'s <code>Create</code> method.
|
| + *
|
| + * @param[in] usb_scan_code The USB scancode to assign for this
|
| + * <code>key_event</code>.
|
| + *
|
| + * @return <code>PP_TRUE</code> if the usb scancode was set successfully.
|
| + */
|
| + PP_Bool (*SetUsbScanCode)(PP_Resource key_event, uint32_t usb_scan_code);
|
| + /**
|
| + * GetUsbScanCode() returns the USB scancode that corresponds to the key
|
| + * that generated this keyboard event.
|
| + *
|
| + * @param[in] key_event A <code>PP_Resource</code> corresponding to a
|
| + * keyboard event.
|
| + *
|
| + * @return The USB scancode field for the keyboard event.
|
| + */
|
| + uint32_t (*GetUsbScanCode)(PP_Resource key_event);
|
| +};
|
| +
|
| +typedef struct PPB_KeyboardInputEvent_Dev_0_1 PPB_KeyboardInputEvent_Dev;
|
| +/**
|
| + * @}
|
| + */
|
| +
|
| +#endif /* PPAPI_C_DEV_PPB_KEYBOARD_INPUT_EVENT_DEV_H_ */
|
| +
|
|
|