| Index: ppapi/api/ppb_input_event.idl
|
| diff --git a/ppapi/api/ppb_input_event.idl b/ppapi/api/ppb_input_event.idl
|
| index 809efc2a2ec5f3e5338f7ec78cc1e7d75735f48c..fac153c1f4089496eb12be7b5aa42ed3d5eac2e8 100644
|
| --- a/ppapi/api/ppb_input_event.idl
|
| +++ b/ppapi/api/ppb_input_event.idl
|
| @@ -100,7 +100,35 @@ enum PP_InputEvent_Type {
|
| *
|
| * Register for this event using the PP_INPUTEVENT_CLASS_MOUSE class.
|
| */
|
| - PP_INPUTEVENT_TYPE_CONTEXTMENU = 10
|
| + PP_INPUTEVENT_TYPE_CONTEXTMENU = 10,
|
| +
|
| + /**
|
| + * Notification that an input method composition process has just started.
|
| + *
|
| + * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
|
| + */
|
| + PP_INPUTEVENT_TYPE_COMPOSITION_START = 11,
|
| +
|
| + /**
|
| + * Notification that the input method composition string is updated.
|
| + *
|
| + * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
|
| + */
|
| + PP_INPUTEVENT_TYPE_COMPOSITION_UPDATE = 12,
|
| +
|
| + /**
|
| + * Notification that an input method composition process has completed.
|
| + *
|
| + * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
|
| + */
|
| + PP_INPUTEVENT_TYPE_COMPOSITION_END = 13,
|
| +
|
| + /**
|
| + * Notification that an input method committed a string.
|
| + *
|
| + * Register for this event using the PP_INPUTEVENT_CLASS_IME class.
|
| + */
|
| + PP_INPUTEVENT_TYPE_IME_TEXT = 14
|
| };
|
|
|
| /**
|
| @@ -701,3 +729,60 @@ interface PPB_KeyboardInputEvent {
|
| PP_Var GetCharacterText([in] PP_Resource character_event);
|
| };
|
|
|
| +
|
| +/**
|
| + * The <code>PPB_CompositionInputEvent</code> interface contains pointers to
|
| + * several functions related to composition input events.
|
| + */
|
| +[version=1.0, macro="PPB_COMPOSITION_INPUT_EVENT_INTERFACE"]
|
| +interface PPB_CompositionInputEvent {
|
| + /**
|
| + * IsCompositionInputEvent() determines if a resource is a composition event.
|
| + *
|
| + * @param[in] resource A <code>PP_Resource</code> corresponding to an event.
|
| + *
|
| + * @return <code>PP_TRUE</code> if the given resource is a valid input event.
|
| + */
|
| + PP_Bool IsCompositionInputEvent([in] PP_Resource resource);
|
| +
|
| + /**
|
| + * GetText() returns the composition text as a UTF-8 string for the given
|
| + * composition event.
|
| + *
|
| + * @param[in] composition_event A <code>PP_Resource</code> corresponding to a
|
| + * composition event.
|
| + *
|
| + * @return A string var representing the composition text. For non-composition
|
| + * input events the return value will be an undefined var.
|
| + */
|
| + PP_Var GetText([in] PP_Resource composition_event);
|
| +
|
| + /**
|
| + * GetTargetSegment() returns the index in the array retrieved by GetSegments
|
| + * indicating the segment currently under composition.
|
| + *
|
| + * @param[in] composition_event A <code>PP_Resource</code> corresponding to a
|
| + * composition event.
|
| + *
|
| + * @return An integer indicating the index of the target segment.
|
| + * For events other than COMPOSITION_UPDATE, returns 0.
|
| + */
|
| + uint32_t GetTargetSegment([in] PP_Resource composition_event);
|
| +
|
| + /**
|
| + * GetSegments() returns the segmentation information by a list of indices of
|
| + * a UTF-8 string returned by GetText. For events other than
|
| + * COMPOSITION_UPDATE, it does nothing.
|
| + *
|
| + * @param[in] composition_event A <code>PP_Resource</code> corresponding to a
|
| + * composition event.
|
| + *
|
| + * @param[out] segments A pointer to an array containing the list of uint32_t
|
| + * indices of the segmentation.
|
| + *
|
| + * @param[out] segments The length of the array <code>segments</code>.
|
| + */
|
| + void GetSegments([in] PP_Resource composition_event,
|
| + [out] mem_t segments,
|
| + [out] uint32_t size);
|
| +};
|
|
|