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

Unified Diff: ppapi/c/dev/ppb_ime_input_event_dev.h

Issue 10391101: Test for Pepper IME events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments from kochi & merge master. Created 8 years, 7 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 | « ppapi/api/dev/ppb_ime_input_event_dev.idl ('k') | ppapi/cpp/dev/ime_input_event_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/dev/ppb_ime_input_event_dev.h
diff --git a/ppapi/c/dev/ppb_ime_input_event_dev.h b/ppapi/c/dev/ppb_ime_input_event_dev.h
index cb1af7895e2346ca5d054faa9ca4c28ec72b4433..590a1d96e189bf4555b3615acd4c96ce80a59cbe 100644
--- a/ppapi/c/dev/ppb_ime_input_event_dev.h
+++ b/ppapi/c/dev/ppb_ime_input_event_dev.h
@@ -3,19 +3,23 @@
* found in the LICENSE file.
*/
-/* From dev/ppb_ime_input_event_dev.idl modified Wed Oct 5 14:06:02 2011. */
+/* From dev/ppb_ime_input_event_dev.idl modified Wed May 16 17:08:03 2012. */
#ifndef PPAPI_C_DEV_PPB_IME_INPUT_EVENT_DEV_H_
#define PPAPI_C_DEV_PPB_IME_INPUT_EVENT_DEV_H_
#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/pp_time.h"
#include "ppapi/c/pp_var.h"
+#include "ppapi/c/ppb_input_event.h"
#define PPB_IME_INPUT_EVENT_DEV_INTERFACE_0_1 "PPB_IMEInputEvent(Dev);0.1"
-#define PPB_IME_INPUT_EVENT_DEV_INTERFACE PPB_IME_INPUT_EVENT_DEV_INTERFACE_0_1
+#define PPB_IME_INPUT_EVENT_DEV_INTERFACE_0_2 "PPB_IMEInputEvent(Dev);0.2"
+#define PPB_IME_INPUT_EVENT_DEV_INTERFACE PPB_IME_INPUT_EVENT_DEV_INTERFACE_0_2
/**
* @file
@@ -27,7 +31,52 @@
* @addtogroup Interfaces
* @{
*/
-struct PPB_IMEInputEvent_Dev_0_1 {
+struct PPB_IMEInputEvent_Dev_0_2 {
+ /**
+ * 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.
+ */
+ PP_Resource (*Create)(PP_Instance instance,
+ PP_InputEvent_Type type,
+ PP_TimeTicks time_stamp,
+ struct PP_Var text,
+ uint32_t segment_number,
+ const uint32_t segment_offsets[],
+ int32_t target_segment,
+ uint32_t selection_start,
+ uint32_t selection_end);
/**
* IsIMEInputEvent() determines if a resource is an IME event.
*
@@ -101,7 +150,16 @@ struct PPB_IMEInputEvent_Dev_0_1 {
void (*GetSelection)(PP_Resource ime_event, uint32_t* start, uint32_t* end);
};
-typedef struct PPB_IMEInputEvent_Dev_0_1 PPB_IMEInputEvent_Dev;
+typedef struct PPB_IMEInputEvent_Dev_0_2 PPB_IMEInputEvent_Dev;
+
+struct PPB_IMEInputEvent_Dev_0_1 {
+ PP_Bool (*IsIMEInputEvent)(PP_Resource resource);
+ struct PP_Var (*GetText)(PP_Resource ime_event);
+ uint32_t (*GetSegmentNumber)(PP_Resource ime_event);
+ uint32_t (*GetSegmentOffset)(PP_Resource ime_event, uint32_t index);
+ int32_t (*GetTargetSegment)(PP_Resource ime_event);
+ void (*GetSelection)(PP_Resource ime_event, uint32_t* start, uint32_t* end);
+};
/**
* @}
*/
« no previous file with comments | « ppapi/api/dev/ppb_ime_input_event_dev.idl ('k') | ppapi/cpp/dev/ime_input_event_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698