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

Side by Side Diff: ppapi/api/dev/ppb_ime_input_event_dev.idl

Issue 10391101: Test for Pepper IME events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /** 6 /**
7 * This file defines the <code>PPB_IMEInputEvent_Dev</code> interface. 7 * This file defines the <code>PPB_IMEInputEvent_Dev</code> interface.
8 */ 8 */
9 9
10 label Chrome { 10 label Chrome {
11 M16 = 0.1 11 M16 = 0.1,
12 M21 = 0.2
12 }; 13 };
13 14
14 [version=0.1, macro="PPB_IME_INPUT_EVENT_DEV_INTERFACE"] 15 [macro="PPB_IME_INPUT_EVENT_DEV_INTERFACE"]
15 interface PPB_IMEInputEvent_Dev { 16 interface PPB_IMEInputEvent_Dev {
16 /** 17 /**
17 * IsIMEInputEvent() determines if a resource is an IME event. 18 * IsIMEInputEvent() determines if a resource is an IME event.
18 * 19 *
19 * @param[in] resource A <code>PP_Resource</code> corresponding to an event. 20 * @param[in] resource A <code>PP_Resource</code> corresponding to an event.
20 * 21 *
21 * @return <code>PP_TRUE</code> if the given resource is a valid input event. 22 * @return <code>PP_TRUE</code> if the given resource is a valid input event.
22 */ 23 */
23 PP_Bool IsIMEInputEvent([in] PP_Resource resource); 24 PP_Bool IsIMEInputEvent([in] PP_Resource resource);
24 25
25 /** 26 /**
27 * Create() creates an IME input event with the given parameters. Normally
28 * you will get a mouse event passed through the
yzshen1 2012/05/15 18:03:48 This is not a mouse event.
kinaba 2012/05/16 10:13:57 Done. Copy&pasting is always harmful..:(
29 * <code>HandleInputEvent</code> and will not need to create them, but some
30 * applications may want to create their own for internal use.
31 *
32 * @param[in] instance The instance for which this event occurred.
33 *
34 * @param[in] type A <code>PP_InputEvent_Type</code> identifying the type of
35 * input event. The type must be one of the ime event types.
yzshen1 2012/05/15 18:03:48 nit: Please use 'IME' instead of 'ime' to be consi
kinaba 2012/05/16 10:13:57 Done.
36 *
37 * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time
38 * when the event occurred.
39 *
40 * @param[in] text The string returned by <code>GetText</code>.
41 *
42 * @param[in] segment_number The number returned by
43 * <code>GetSegmentNumber</code>.
44 *
45 * @param[in] segment_offsets The array of numbers returned by
46 * <code>GetSegmentOffset</code>. If <code>segment_number</code> is zero,
47 * the number of elements of the array should be zero. If
48 * <code>segment_number</code> is non-zero, the length of the array must be
49 * <code>segment_number</code> + 1.
50 *
51 * @param[in] target_segment The number returned by
52 * <code>GetTargetSegment</code>.
53 *
54 * @param[in] selection_start The start index returned by
55 * <code>GetSelection</code>.
56 *
57 * @param[in] selection_start The end index returned by
yzshen1 2012/05/15 18:03:48 selection_start -> selection_end
kinaba 2012/05/16 10:13:57 Done.
58 * <code>GetSelection</code>.
59 *
60 * @return A <code>PP_Resource</code> containing the new ime input event.
61 */
62 [version=0.2]
63 PP_Resource Create([in] PP_Instance instance,
yzshen1 2012/05/15 18:03:48 Nit: Usually Create() is placed at the top, before
kinaba 2012/05/16 10:13:57 Done.
64 [in] PP_InputEvent_Type type,
65 [in] PP_TimeTicks time_stamp,
66 [in] PP_Var text,
67 [in] uint32_t segment_number,
68 [in] uint32_t[] segment_offsets,
69 [in] int32_t target_segment,
70 [in] uint32_t selection_start,
71 [in] uint32_t selection_end);
72
73 /**
26 * GetText() returns the composition text as a UTF-8 string for the given IME 74 * GetText() returns the composition text as a UTF-8 string for the given IME
27 * event. 75 * event.
28 * 76 *
29 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME 77 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME
30 * event. 78 * event.
31 * 79 *
32 * @return A string var representing the composition text. For non-IME input 80 * @return A string var representing the composition text. For non-IME input
33 * events the return value will be an undefined var. 81 * events the return value will be an undefined var.
34 */ 82 */
35 PP_Var GetText([in] PP_Resource ime_event); 83 PP_Var GetText([in] PP_Resource ime_event);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 * event. 134 * event.
87 * 135 *
88 * @param[out] start The start position of the current selection. 136 * @param[out] start The start position of the current selection.
89 * 137 *
90 * @param[out] end The end position of the current selection. 138 * @param[out] end The end position of the current selection.
91 */ 139 */
92 void GetSelection([in] PP_Resource ime_event, 140 void GetSelection([in] PP_Resource ime_event,
93 [out] uint32_t start, 141 [out] uint32_t start,
94 [out] uint32_t end); 142 [out] uint32_t end);
95 }; 143 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698