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

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

Issue 8059006: Additional update on Pepper IME API and boilerplate thunk/proxy implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win_shared happy. Created 9 years, 2 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
« no previous file with comments | « no previous file | ppapi/api/dev/ppb_text_input_dev.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2011 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 {
(...skipping 28 matching lines...) Expand all
39 * 39 *
40 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME 40 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME
41 * event. 41 * event.
42 * 42 *
43 * @return The number of segments. For events other than COMPOSITION_UPDATE, 43 * @return The number of segments. For events other than COMPOSITION_UPDATE,
44 * returns 0. 44 * returns 0.
45 */ 45 */
46 uint32_t GetSegmentNumber([in] PP_Resource ime_event); 46 uint32_t GetSegmentNumber([in] PP_Resource ime_event);
47 47
48 /** 48 /**
49 * GetSegmentAt() returns the start and the end position of the index-th 49 * GetSegmentOffset() returns the position of the index-th segmentation point
50 * segment in the composition text. The positions are given by byte-offsets 50 * in the composition text. The position is given by a byte-offset (not a
51 * (not character-offsets) of the string returned by GetText(). The range of 51 * character-offset) of the string returned by GetText(). It always satisfies
52 * the segment extends from start (inclusive) to end (exclusive). They satisfy 52 * 0=GetSegmentOffset(0) < ... < GetSegmentOffset(i) < GetSegmentOffset(i+1)
53 * 0 <= start < end <= (byte-length of GetText()). When the event is not 53 * < ... < GetSegmentOffset(GetSegmentNumber())=(byte-length of GetText()).
54 * COMPOSITION_UPDATE or index >= GetSegmentNumber(), the function returns 54 * Note that [GetSegmentOffset(i), GetSegmentOffset(i+1)) represents the range
55 * PP_FALSE and nothing else happens. 55 * of the i-th segment, and hence GetSegmentNumber() can be a valid argument
56 * to this function instead of an off-by-1 error.
56 * 57 *
57 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME 58 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME
58 * event. 59 * event.
59 * 60 *
60 * @param[in] index An integer indicating a segment. 61 * @param[in] index An integer indicating a segment.
61 * 62 *
62 * @param[out] start The start position of the index-th segment. 63 * @return The byte-offset of the segmentation point. If the event is not
63 * 64 * COMPOSITION_UPDATE or index is out of range, returns 0.
64 * @param[out] end The end position of the index-th segment.
65 *
66 * @return PP_TRUE when the start and the end position is successfully
67 * obtained, and PP_FALSE otherwise.
68 */ 65 */
69 PP_Bool GetSegmentAt([in] PP_Resource ime_event, 66 uint32_t GetSegmentOffset([in] PP_Resource ime_event,
70 [in] uint32_t index, 67 [in] uint32_t index);
71 [out] uint32_t start,
72 [out] uint32_t end);
73 68
74 /** 69 /**
75 * GetTargetSegment() returns the index of the current target segment of 70 * GetTargetSegment() returns the index of the current target segment of
76 * composition. 71 * composition.
77 * 72 *
78 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME 73 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME
79 * event. 74 * event.
80 * 75 *
81 * @return An integer indicating the index of the target segment. When there 76 * @return An integer indicating the index of the target segment. When there
82 * is no active target segment, or the event is not COMPOSITION_UPDATE, 77 * is no active target segment, or the event is not COMPOSITION_UPDATE,
83 * returns -1. 78 * returns -1.
84 */ 79 */
85 int32_t GetTargetSegment([in] PP_Resource ime_event); 80 int32_t GetTargetSegment([in] PP_Resource ime_event);
86 81
87 /** 82 /**
88 * GetSelection() returns the range selected by caret in the composition text. 83 * GetSelection() returns the range selected by caret in the composition text.
89 * 84 *
90 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME 85 * @param[in] ime_event A <code>PP_Resource</code> corresponding to an IME
91 * event. 86 * event.
92 * 87 *
93 * @param[out] start The start position of the current selection. 88 * @param[out] start The start position of the current selection.
94 * 89 *
95 * @param[out] end The end position of the current selection. 90 * @param[out] end The end position of the current selection.
96 */ 91 */
97 void GetSelection([in] PP_Resource ime_event, 92 void GetSelection([in] PP_Resource ime_event,
98 [out] uint32_t start, 93 [out] uint32_t start,
99 [out] uint32_t end); 94 [out] uint32_t end);
100 }; 95 };
OLDNEW
« no previous file with comments | « no previous file | ppapi/api/dev/ppb_text_input_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698