OLD | NEW |
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 /* From dev/ppb_text_input_dev.idl modified Tue Mar 13 21:18:47 2012. */ | 6 /* From dev/ppb_text_input_dev.idl modified Thu Mar 28 10:54:47 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ |
9 #define PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ | 9 #define PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ |
10 | 10 |
11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
12 #include "ppapi/c/pp_macros.h" | 12 #include "ppapi/c/pp_macros.h" |
13 #include "ppapi/c/pp_point.h" | 13 #include "ppapi/c/pp_point.h" |
14 #include "ppapi/c/pp_rect.h" | 14 #include "ppapi/c/pp_rect.h" |
15 #include "ppapi/c/pp_size.h" | 15 #include "ppapi/c/pp_size.h" |
16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const struct PP_Rect* bounding_box); | 86 const struct PP_Rect* bounding_box); |
87 /** | 87 /** |
88 * Cancels the current composition in IME. | 88 * Cancels the current composition in IME. |
89 */ | 89 */ |
90 void (*CancelCompositionText)(PP_Instance instance); | 90 void (*CancelCompositionText)(PP_Instance instance); |
91 /** | 91 /** |
92 * In response to the <code>PPP_TextInput_Dev::RequestSurroundingText</code> | 92 * In response to the <code>PPP_TextInput_Dev::RequestSurroundingText</code> |
93 * call, informs the browser about the current text selection and surrounding | 93 * call, informs the browser about the current text selection and surrounding |
94 * text. <code>text</code> is a UTF-8 string that contains the current range | 94 * text. <code>text</code> is a UTF-8 string that contains the current range |
95 * of text selection in the plugin. <code>caret</code> is the byte-index of | 95 * of text selection in the plugin. <code>caret</code> is the byte-index of |
96 * the caret poisition within <code>text</code>. <code>anchor</code> is the | 96 * the caret position within <code>text</code>. <code>anchor</code> is the |
97 * byte-index of the anchor position (i.e., if a range of text is selected, | 97 * byte-index of the anchor position (i.e., if a range of text is selected, |
98 * it is the other edge of selection diffrent from <code>caret</code>. If | 98 * it is the other edge of selection different from <code>caret</code>. If |
99 * there are no selection, <code>anchor</code> is equal to <code>caret</code>. | 99 * there are no selection, <code>anchor</code> is equal to <code>caret</code>. |
100 * | 100 * |
101 * Typical use of this information in the browser is to enable "reconversion" | 101 * Typical use of this information in the browser is to enable "reconversion" |
102 * features of IME that puts back the already committed text into the | 102 * features of IME that puts back the already committed text into the |
103 * pre-commit composition state. Another use is to improve the precision | 103 * pre-commit composition state. Another use is to improve the precision |
104 * of suggestion of IME by taking the context into account (e.g., if the caret | 104 * of suggestion of IME by taking the context into account (e.g., if the caret |
105 * looks to be on the begining of a sentense, suggest capital letters in a | 105 * looks to be on the beginning of a sentence, suggest capital letters in a |
106 * virtual keyboard). | 106 * virtual keyboard). |
107 * | 107 * |
108 * When the focus is not on text, call this function setting <code>text</code> | 108 * When the focus is not on text, call this function setting <code>text</code> |
109 * to an empty string and <code>caret</code> and <code>anchor</code> to zero. | 109 * to an empty string and <code>caret</code> and <code>anchor</code> to zero. |
110 * Also, the plugin should send the empty text when it does not want to reveal | 110 * Also, the plugin should send the empty text when it does not want to reveal |
111 * the selection to IME (e.g., when the surrounding text is containing | 111 * the selection to IME (e.g., when the surrounding text is containing |
112 * password text). | 112 * password text). |
113 */ | 113 */ |
114 void (*UpdateSurroundingText)(PP_Instance instance, | 114 void (*UpdateSurroundingText)(PP_Instance instance, |
115 const char* text, | 115 const char* text, |
(...skipping 17 matching lines...) Expand all Loading... |
133 const struct PP_Rect* caret, | 133 const struct PP_Rect* caret, |
134 const struct PP_Rect* bounding_box); | 134 const struct PP_Rect* bounding_box); |
135 void (*CancelCompositionText)(PP_Instance instance); | 135 void (*CancelCompositionText)(PP_Instance instance); |
136 }; | 136 }; |
137 /** | 137 /** |
138 * @} | 138 * @} |
139 */ | 139 */ |
140 | 140 |
141 #endif /* PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ */ | 141 #endif /* PPAPI_C_DEV_PPB_TEXT_INPUT_DEV_H_ */ |
142 | 142 |
OLD | NEW |