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

Unified Diff: ppapi/api/dev/ppb_keyboard_input_event_dev.idl

Issue 9353013: Add GetUsbKeyCode dev interface for Pepper key events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-sync to remove unrelated edits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/c/dev/ppb_keyboard_input_event_dev.h » ('j') | ppapi/cpp/input_event.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0b5c417b9e3b0265dac4e5821c43e5a95a41c8b2
--- /dev/null
+++ b/ppapi/api/dev/ppb_keyboard_input_event_dev.idl
@@ -0,0 +1,51 @@
+/* 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 the raw USB scancodes for key input events.
Wez 2012/02/17 01:31:01 nit: It's not _the_ raw USB scancodes, but USB key
garykac 2012/02/17 18:25:30 Done.
+ */
+
+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 the usb_scan_code in the given <code>resource</code>. It is
Wez 2012/02/17 01:31:01 nit: ... the given PP_InputEvent resource?
Wez 2012/02/17 01:31:01 nit: ... sets the usb_scan_code ... -> ... set a U
garykac 2012/02/17 18:25:30 Done.
garykac 2012/02/17 18:25:30 Done.
+ * 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.
Wez 2012/02/17 01:31:01 nit: I don't think this comment is necessary to un
garykac 2012/02/17 18:25:30 Done.
+ *
+ * @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
Wez 2012/02/17 01:31:01 nit: assign for this -> assign to this (or associa
garykac 2012/02/17 18:25:30 Done.
+ * <code>key_event</code>.
+ *
+ * @return <code>PP_TRUE</code> if the usb scancode was set successfully.
Wez 2012/02/17 01:31:01 Under what circumstances might setting the scancod
garykac 2012/02/17 18:25:30 If the thunking can't acquire the lock to update t
+ */
+ PP_Bool SetUsbScanCode([in] PP_Resource key_event,
+ [in] uint32_t usb_scan_code);
+
+ /**
+ * GetUsbScanCode() returns the USB scancode that corresponds to the key
+ * that generated this keyboard event.
Wez 2012/02/17 01:31:01 nit: ... that corresponds ... this keyboard event
garykac 2012/02/17 18:25:30 Done.
+ *
+ * @param[in] key_event A <code>PP_Resource</code> corresponding to a
+ * keyboard event.
+ *
+ * @return The USB scancode field for the keyboard event.
Wez 2012/02/17 01:31:01 What if no USB key code was set, e.g. if the input
garykac 2012/02/17 18:25:30 Done.
+ */
+ uint32_t GetUsbScanCode([in] PP_Resource key_event);
+};
« no previous file with comments | « no previous file | ppapi/c/dev/ppb_keyboard_input_event_dev.h » ('j') | ppapi/cpp/input_event.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698