diff options
Diffstat (limited to 'chromium/ppapi/api/ppb_input_event.idl')
-rw-r--r-- | chromium/ppapi/api/ppb_input_event.idl | 69 |
1 files changed, 60 insertions, 9 deletions
diff --git a/chromium/ppapi/api/ppb_input_event.idl b/chromium/ppapi/api/ppb_input_event.idl index 2ed2e25ecb0..b9224fa584a 100644 --- a/chromium/ppapi/api/ppb_input_event.idl +++ b/chromium/ppapi/api/ppb_input_event.idl @@ -9,7 +9,8 @@ label Chrome { M13 = 1.0, - M14 = 1.1 + M14 = 1.1, + M34 = 1.2 }; /** @@ -312,12 +313,10 @@ interface PPB_InputEvent { * the page. * * Note that synthetic mouse events will be generated from touch events if - * (and only if) the you do not request touch events. + * (and only if) you do not request touch events. * * When requesting input events through this function, the events will be - * delivered and <i>not</i> bubbled to the page. This means that even if you - * aren't interested in the message, no other parts of the page will get - * a crack at the message. + * delivered and <i>not</i> bubbled to the default handlers. * * <strong>Example:</strong> * @code @@ -352,8 +351,8 @@ interface PPB_InputEvent { * By default, no input events are delivered. In most cases you would * register to receive events by calling RequestInputEvents(). In some cases, * however, you may wish to filter events such that they can be bubbled up - * to the DOM. In this case, register for those classes of events using - * this function instead of RequestInputEvents(). + * to the default handlers. In this case, register for those classes of + * events using this function instead of RequestInputEvents(). * * Filtering input events requires significantly more overhead than just * delivering them to the instance. As such, you should only request @@ -733,8 +732,8 @@ interface PPB_KeyboardInputEvent { * <code>PP_InputEvent_Modifier</code> flags. * * @param[in] key_code This value reflects the DOM KeyboardEvent - * <code>keyCode</code> field. Chrome populates this with the Windows-style - * Virtual Key code of the key. + * <code>keyCode</code> field, which is the Windows-style Virtual Key + * code of the key. * * @param[in] character_text This value represents the typed character as a * UTF-8 string. @@ -742,6 +741,7 @@ interface PPB_KeyboardInputEvent { * @return A <code>PP_Resource</code> containing the new keyboard input * event. */ + [deprecate=1.2] PP_Resource Create([in] PP_Instance instance, [in] PP_InputEvent_Type type, [in] PP_TimeTicks time_stamp, @@ -750,6 +750,45 @@ interface PPB_KeyboardInputEvent { [in] PP_Var character_text); /** + * Creates a keyboard input event with the given parameters. Normally you + * will get a keyboard event passed through the HandleInputEvent and will not + * need to create them, but some applications may want to create their own + * for internal use. The type must be one of the keyboard event types. + * + * @param[in] instance The instance for which this event occurred. + * + * @param[in] type A <code>PP_InputEvent_Type</code> identifying the type of + * input event. + * + * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time + * when the event occurred. + * + * @param[in] modifiers A bit field combination of the + * <code>PP_InputEvent_Modifier</code> flags. + * + * @param[in] key_code This value reflects the DOM KeyboardEvent + * <code>keyCode</code> field, which is the Windows-style Virtual Key + * code of the key. + * + * @param[in] character_text This value represents the typed character as a + * UTF-8 string. + * + * @param[in] code This value represents the DOM3 |code| string that + * corresponds to the physical key being pressed. + * + * @return A <code>PP_Resource</code> containing the new keyboard input + * event. + */ + [version=1.2] + PP_Resource Create([in] PP_Instance instance, + [in] PP_InputEvent_Type type, + [in] PP_TimeTicks time_stamp, + [in] uint32_t modifiers, + [in] uint32_t key_code, + [in] PP_Var character_text, + [in] PP_Var code); + + /** * IsKeyboardInputEvent() determines if a resource is a keyboard event. * * @param[in] resource A <code>PP_Resource</code> corresponding to an event. @@ -781,6 +820,18 @@ interface PPB_KeyboardInputEvent { * undefined var. */ PP_Var GetCharacterText([in] PP_Resource character_event); + + /** + * GetCode() returns the DOM |code| field for this keyboard event, as + * defined in the DOM3 Events spec: + * http://www.w3.org/TR/DOM-Level-3-Events/ + * + * @param[in] key_event The key event for which to return the key code. + * + * @return The string that contains the DOM |code| for the keyboard event. + */ + [version=1.2] + PP_Var GetCode([in] PP_Resource key_event); }; [assert_size(4)] |