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_font_dev.idl modified Mon Jun 25 14:54:48 2012. */ | 6 /* From dev/ppb_font_dev.idl modified Thu Mar 28 10:56:39 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_DEV_PPB_FONT_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPB_FONT_DEV_H_ |
9 #define PPAPI_C_DEV_PPB_FONT_DEV_H_ | 9 #define PPAPI_C_DEV_PPB_FONT_DEV_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
14 #include "ppapi/c/pp_point.h" | 14 #include "ppapi/c/pp_point.h" |
15 #include "ppapi/c/pp_rect.h" | 15 #include "ppapi/c/pp_rect.h" |
16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 * This var must either be a string or a null/undefined var (which will be | 138 * This var must either be a string or a null/undefined var (which will be |
139 * treated as a 0-length string). | 139 * treated as a 0-length string). |
140 */ | 140 */ |
141 struct PP_Var text; | 141 struct PP_Var text; |
142 /** | 142 /** |
143 * Set to PP_TRUE if the text is right-to-left. | 143 * Set to PP_TRUE if the text is right-to-left. |
144 * | 144 * |
145 * When <code>override_direction</code> is false, the browser will perform | 145 * When <code>override_direction</code> is false, the browser will perform |
146 * the Unicode Bidirectional Algorithm (http://unicode.org/reports/tr9/) on | 146 * the Unicode Bidirectional Algorithm (http://unicode.org/reports/tr9/) on |
147 * the text. The value of the <code>rtl</code> flag specifies the | 147 * the text. The value of the <code>rtl</code> flag specifies the |
148 * direcionality of the surrounding environment. This means that Hebrew | 148 * directionality of the surrounding environment. This means that Hebrew |
149 * word will always display right to left, even if <code>rtl</code> is false. | 149 * word will always display right to left, even if <code>rtl</code> is false. |
150 * | 150 * |
151 * When <code>override_direction</code> is true, no autodetection will be done | 151 * When <code>override_direction</code> is true, no autodetection will be done |
152 * and <code>rtl</code> specifies the direction of the text. | 152 * and <code>rtl</code> specifies the direction of the text. |
153 * | 153 * |
154 * TODO(brettw) note that autodetection with rtl = true is currently | 154 * TODO(brettw) note that autodetection with rtl = true is currently |
155 * unimplemented. | 155 * unimplemented. |
156 */ | 156 */ |
157 PP_Bool rtl; | 157 PP_Bool rtl; |
158 /** | 158 /** |
159 * Set to PP_TRUE to force the directionality of the text regardless of | 159 * Set to PP_TRUE to force the directionality of the text regardless of |
160 * content. | 160 * content. |
161 * | 161 * |
162 * If this flag is set, the browser will skip autodetection of the content | 162 * If this flag is set, the browser will skip autodetection of the content |
163 * and will display all text in the direction speficied by the | 163 * and will display all text in the direction specified by the |
164 * <code>rtl</code> flag. | 164 * <code>rtl</code> flag. |
165 */ | 165 */ |
166 PP_Bool override_direction; | 166 PP_Bool override_direction; |
167 }; | 167 }; |
168 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_TextRun_Dev, 24); | 168 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_TextRun_Dev, 24); |
169 /** | 169 /** |
170 * @} | 170 * @} |
171 */ | 171 */ |
172 | 172 |
173 /** | 173 /** |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 * Draws the text to the image buffer. | 217 * Draws the text to the image buffer. |
218 * | 218 * |
219 * The given point represents the baseline of the left edge of the font, | 219 * The given point represents the baseline of the left edge of the font, |
220 * regardless of whether it is left-to-right or right-to-left (in the case of | 220 * regardless of whether it is left-to-right or right-to-left (in the case of |
221 * RTL text, this will actually represent the logical end of the text). | 221 * RTL text, this will actually represent the logical end of the text). |
222 * | 222 * |
223 * The clip is optional and may be NULL. In this case, the text will be | 223 * The clip is optional and may be NULL. In this case, the text will be |
224 * clipped to the image. | 224 * clipped to the image. |
225 * | 225 * |
226 * The image_data_is_opaque flag indicates whether subpixel antialiasing can | 226 * The image_data_is_opaque flag indicates whether subpixel antialiasing can |
227 * be performend, if it is supported. When the image below the text is | 227 * be performed, if it is supported. When the image below the text is |
228 * opaque, subpixel antialiasing is supported and you should set this to | 228 * opaque, subpixel antialiasing is supported and you should set this to |
229 * PP_TRUE to pick up the user's default preferences. If your plugin is | 229 * PP_TRUE to pick up the user's default preferences. If your plugin is |
230 * partially transparent, then subpixel antialiasing is not possible and | 230 * partially transparent, then subpixel antialiasing is not possible and |
231 * grayscale antialiasing will be used instead (assuming the user has | 231 * grayscale antialiasing will be used instead (assuming the user has |
232 * antialiasing enabled at all). | 232 * antialiasing enabled at all). |
233 */ | 233 */ |
234 PP_Bool (*DrawTextAt)(PP_Resource font, | 234 PP_Bool (*DrawTextAt)(PP_Resource font, |
235 PP_Resource image_data, | 235 PP_Resource image_data, |
236 const struct PP_TextRun_Dev* text, | 236 const struct PP_TextRun_Dev* text, |
237 const struct PP_Point* position, | 237 const struct PP_Point* position, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 uint32_t char_offset); | 269 uint32_t char_offset); |
270 }; | 270 }; |
271 | 271 |
272 typedef struct PPB_Font_Dev_0_6 PPB_Font_Dev; | 272 typedef struct PPB_Font_Dev_0_6 PPB_Font_Dev; |
273 /** | 273 /** |
274 * @} | 274 * @} |
275 */ | 275 */ |
276 | 276 |
277 #endif /* PPAPI_C_DEV_PPB_FONT_DEV_H_ */ | 277 #endif /* PPAPI_C_DEV_PPB_FONT_DEV_H_ */ |
278 | 278 |
OLD | NEW |