summaryrefslogtreecommitdiffstats
path: root/ppapi/api/dev/ppb_ime_input_event_dev.idl
diff options
context:
space:
mode:
authorkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-21 07:09:32 +0000
committerkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-21 07:09:32 +0000
commit397c2396865ba5bd314827141f647a47d1cbb3fb (patch)
treea6b3972a4d3904940df315b8385aa77b625d4541 /ppapi/api/dev/ppb_ime_input_event_dev.idl
parent455258051a2cb4591155cd099e959ce593340736 (diff)
downloadchromium_src-397c2396865ba5bd314827141f647a47d1cbb3fb.zip
chromium_src-397c2396865ba5bd314827141f647a47d1cbb3fb.tar.gz
chromium_src-397c2396865ba5bd314827141f647a47d1cbb3fb.tar.bz2
Test for Pepper IME events.
This patch adds a way to simulate IME composition events inside the renderer process, and tests that IME events are properly passed between the renderer and plugins. ppapi/tests/test_ime_input_event.cc: is the actual test case ppapi/{api,c,cpp}/dev/*ime_input_event_dev*: implements an API to create IME events from plugins for testing. other files: wire necessary stuff for simulating IME events. Since Pepper IME events are not delivered through WebKit/DOM layer but rather directly sent from renderer to plugins, the simulation part also follows the similar code path. BUG=126714 TEST=browser_tests PPAPITest.ImeInputEvent Review URL: https://chromiumcodereview.appspot.com/10391101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api/dev/ppb_ime_input_event_dev.idl')
-rw-r--r--ppapi/api/dev/ppb_ime_input_event_dev.idl52
1 files changed, 50 insertions, 2 deletions
diff --git a/ppapi/api/dev/ppb_ime_input_event_dev.idl b/ppapi/api/dev/ppb_ime_input_event_dev.idl
index 3e2deba..9e728d6 100644
--- a/ppapi/api/dev/ppb_ime_input_event_dev.idl
+++ b/ppapi/api/dev/ppb_ime_input_event_dev.idl
@@ -8,12 +8,60 @@
*/
label Chrome {
- M16 = 0.1
+ M16 = 0.1,
+ M21 = 0.2
};
-[version=0.1, macro="PPB_IME_INPUT_EVENT_DEV_INTERFACE"]
+[macro="PPB_IME_INPUT_EVENT_DEV_INTERFACE"]
interface PPB_IMEInputEvent_Dev {
/**
+ * Create() creates an IME input event with the given parameters. Normally
+ * you will get an IME event passed through the <code>HandleInputEvent</code>
+ * and will not need to create them, but some applications may want to create
+ * their own for internal use.
+ *
+ * @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. The type must be one of the IME event types.
+ *
+ * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time
+ * when the event occurred.
+ *
+ * @param[in] text The string returned by <code>GetText</code>.
+ *
+ * @param[in] segment_number The number returned by
+ * <code>GetSegmentNumber</code>.
+ *
+ * @param[in] segment_offsets The array of numbers returned by
+ * <code>GetSegmentOffset</code>. If <code>segment_number</code> is zero,
+ * the number of elements of the array should be zero. If
+ * <code>segment_number</code> is non-zero, the length of the array must be
+ * <code>segment_number</code> + 1.
+ *
+ * @param[in] target_segment The number returned by
+ * <code>GetTargetSegment</code>.
+ *
+ * @param[in] selection_start The start index returned by
+ * <code>GetSelection</code>.
+ *
+ * @param[in] selection_end The end index returned by
+ * <code>GetSelection</code>.
+ *
+ * @return A <code>PP_Resource</code> containing the new IME input event.
+ */
+ [version=0.2]
+ PP_Resource Create([in] PP_Instance instance,
+ [in] PP_InputEvent_Type type,
+ [in] PP_TimeTicks time_stamp,
+ [in] PP_Var text,
+ [in] uint32_t segment_number,
+ [in] uint32_t[] segment_offsets,
+ [in] int32_t target_segment,
+ [in] uint32_t selection_start,
+ [in] uint32_t selection_end);
+
+ /**
* IsIMEInputEvent() determines if a resource is an IME event.
*
* @param[in] resource A <code>PP_Resource</code> corresponding to an event.