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

Side by Side Diff: ppapi/api/ppb_ime_input_event.idl

Issue 18671004: PPAPI: Move IMEInputEvent and TextInput to stable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comments Created 7 years, 5 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</code> interface.
8 */ 8 */
9 9
10 label Chrome { 10 label Chrome {
11 M16 = 0.1, 11 M30 = 1.0
12 M21 = 0.2
13 }; 12 };
14 13
15 [macro="PPB_IME_INPUT_EVENT_DEV_INTERFACE"] 14 [macro="PPB_IME_INPUT_EVENT_INTERFACE"]
16 interface PPB_IMEInputEvent_Dev { 15 interface PPB_IMEInputEvent {
17 /** 16 /**
18 * Create() creates an IME input event with the given parameters. Normally 17 * Create() creates an IME input event with the given parameters. Normally
19 * you will get an IME event passed through the <code>HandleInputEvent</code> 18 * you will get an IME event passed through the <code>HandleInputEvent</code>
20 * and will not need to create them, but some applications may want to create 19 * and will not need to create them, but some applications may want to create
21 * their own for internal use. 20 * their own for internal use.
22 * 21 *
23 * @param[in] instance The instance for which this event occurred. 22 * @param[in] instance The instance for which this event occurred.
24 * 23 *
25 * @param[in] type A <code>PP_InputEvent_Type</code> identifying the type of 24 * @param[in] type A <code>PP_InputEvent_Type</code> identifying the type of
26 * input event. The type must be one of the IME event types. 25 * input event. The type must be one of the IME event types.
27 * 26 *
28 * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time 27 * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time
29 * when the event occurred. 28 * when the event occurred.
30 * 29 *
31 * @param[in] text The string returned by <code>GetText</code>. 30 * @param[in] text The string returned by <code>GetText</code>.
32 * 31 *
33 * @param[in] segment_number The number returned by 32 * @param[in] segment_number The number returned by
34 * <code>GetSegmentNumber</code>. 33 * <code>GetSegmentCount</code>.
35 * 34 *
36 * @param[in] segment_offsets The array of numbers returned by 35 * @param[in] segment_offsets The array of numbers returned by
37 * <code>GetSegmentOffset</code>. If <code>segment_number</code> is zero, 36 * <code>GetSegmentOffset</code>. If <code>segment_number</code> is zero,
38 * the number of elements of the array should be zero. If 37 * the number of elements of the array should be zero. If
39 * <code>segment_number</code> is non-zero, the length of the array must be 38 * <code>segment_number</code> is non-zero, the length of the array must be
40 * <code>segment_number</code> + 1. 39 * <code>segment_number</code> + 1.
41 * 40 *
42 * @param[in] target_segment The number returned by 41 * @param[in] target_segment The number returned by
43 * <code>GetTargetSegment</code>. 42 * <code>GetTargetSegment</code>.
44 * 43 *
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 * 75 *
77 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME 76 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME
78 * event. 77 * event.
79 * 78 *
80 * @return A string var representing the composition text. For non-IME input 79 * @return A string var representing the composition text. For non-IME input
81 * events the return value will be an undefined var. 80 * events the return value will be an undefined var.
82 */ 81 */
83 PP_Var GetText([in] PP_Resource ime_event); 82 PP_Var GetText([in] PP_Resource ime_event);
84 83
85 /** 84 /**
86 * GetSegmentNumber() returns the number of segments in the composition text. 85 * GetSegmentCount() returns the number of segments in the composition text.
87 * 86 *
88 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME 87 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME
89 * event. 88 * event.
90 * 89 *
91 * @return The number of segments. For events other than COMPOSITION_UPDATE, 90 * @return The number of segments. For events other than COMPOSITION_UPDATE,
92 * returns 0. 91 * returns 0.
93 */ 92 */
94 uint32_t GetSegmentNumber([in] PP_Resource ime_event); 93 uint32_t GetSegmentCount([in] PP_Resource ime_event);
95 94
96 /** 95 /**
97 * GetSegmentOffset() returns the position of the index-th segmentation point 96 * GetSegmentOffset() returns the position of the index-th segmentation point
98 * in the composition text. The position is given by a byte-offset (not a 97 * in the composition text. The position is given by a byte-offset (not a
99 * character-offset) of the string returned by GetText(). It always satisfies 98 * character-offset) of the string returned by GetText(). It always satisfies
100 * 0=GetSegmentOffset(0) < ... < GetSegmentOffset(i) < GetSegmentOffset(i+1) 99 * 0=GetSegmentOffset(0) < ... < GetSegmentOffset(i) < GetSegmentOffset(i+1)
101 * < ... < GetSegmentOffset(GetSegmentNumber())=(byte-length of GetText()). 100 * < ... < GetSegmentOffset(GetSegmentCount())=(byte-length of GetText()).
102 * Note that [GetSegmentOffset(i), GetSegmentOffset(i+1)) represents the range 101 * Note that [GetSegmentOffset(i), GetSegmentOffset(i+1)) represents the range
103 * of the i-th segment, and hence GetSegmentNumber() can be a valid argument 102 * of the i-th segment, and hence GetSegmentCount() can be a valid argument
104 * to this function instead of an off-by-1 error. 103 * to this function instead of an off-by-1 error.
105 * 104 *
106 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME 105 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME
107 * event. 106 * event.
108 * 107 *
109 * @param[in] index An integer indicating a segment. 108 * @param[in] index An integer indicating a segment.
110 * 109 *
111 * @return The byte-offset of the segmentation point. If the event is not 110 * @return The byte-offset of the segmentation point. If the event is not
112 * COMPOSITION_UPDATE or index is out of range, returns 0. 111 * COMPOSITION_UPDATE or index is out of range, returns 0.
113 */ 112 */
(...skipping 20 matching lines...) Expand all
134 * event. 133 * event.
135 * 134 *
136 * @param[out] start The start position of the current selection. 135 * @param[out] start The start position of the current selection.
137 * 136 *
138 * @param[out] end The end position of the current selection. 137 * @param[out] end The end position of the current selection.
139 */ 138 */
140 void GetSelection([in] PP_Resource ime_event, 139 void GetSelection([in] PP_Resource ime_event,
141 [out] uint32_t start, 140 [out] uint32_t start,
142 [out] uint32_t end); 141 [out] uint32_t end);
143 }; 142 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698