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 private/ppb_flash_font_file.idl modified Thu Dec 13 10:56:15 2012. */ | 6 /* From private/ppb_flash_font_file.idl modified Fri Oct 23 10:34:57 2015. */ |
7 | 7 |
8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_FONT_FILE_H_ | 8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_FONT_FILE_H_ |
9 #define PPAPI_C_PRIVATE_PPB_FLASH_FONT_FILE_H_ | 9 #define PPAPI_C_PRIVATE_PPB_FLASH_FONT_FILE_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_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
16 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
17 #include "ppapi/c/private/pp_private_font_charset.h" | 17 #include "ppapi/c/private/pp_private_font_charset.h" |
18 #include "ppapi/c/trusted/ppb_browser_font_trusted.h" | 18 #include "ppapi/c/trusted/ppb_browser_font_trusted.h" |
19 | 19 |
20 #define PPB_FLASH_FONTFILE_INTERFACE_0_1 "PPB_Flash_FontFile;0.1" | 20 #define PPB_FLASH_FONTFILE_INTERFACE_0_1 "PPB_Flash_FontFile;0.1" |
21 #define PPB_FLASH_FONTFILE_INTERFACE PPB_FLASH_FONTFILE_INTERFACE_0_1 | 21 #define PPB_FLASH_FONTFILE_INTERFACE_0_2 "PPB_Flash_FontFile;0.2" |
| 22 #define PPB_FLASH_FONTFILE_INTERFACE PPB_FLASH_FONTFILE_INTERFACE_0_2 |
22 | 23 |
23 /** | 24 /** |
24 * @file | 25 * @file |
25 * This file contains the <code>PPB_Flash_FontFile</code> interface. | 26 * This file contains the <code>PPB_Flash_FontFile</code> interface. |
26 */ | 27 */ |
27 | 28 |
28 | 29 |
29 /** | 30 /** |
30 * @addtogroup Interfaces | 31 * @addtogroup Interfaces |
31 * @{ | 32 * @{ |
32 */ | 33 */ |
33 struct PPB_Flash_FontFile_0_1 { | 34 struct PPB_Flash_FontFile_0_2 { |
34 /* Returns a resource identifying a font file corresponding to the given font | 35 /* Returns a resource identifying a font file corresponding to the given font |
35 * request after applying the browser-specific fallback. | 36 * request after applying the browser-specific fallback. |
36 */ | 37 */ |
37 PP_Resource (*Create)( | 38 PP_Resource (*Create)( |
38 PP_Instance instance, | 39 PP_Instance instance, |
39 const struct PP_BrowserFont_Trusted_Description* description, | 40 const struct PP_BrowserFont_Trusted_Description* description, |
40 PP_PrivateFontCharset charset); | 41 PP_PrivateFontCharset charset); |
41 /* Determines if a given resource is Flash font file. | 42 /* Determines if a given resource is Flash font file. |
42 */ | 43 */ |
43 PP_Bool (*IsFlashFontFile)(PP_Resource resource); | 44 PP_Bool (*IsFlashFontFile)(PP_Resource resource); |
44 /* Returns the requested font table. | 45 /* Returns the requested font table. |
45 * |output_length| should pass in the size of |output|. And it will return | 46 * |output_length| should pass in the size of |output|. And it will return |
46 * the actual length of returned data. |output| could be NULL in order to | 47 * the actual length of returned data. |output| could be NULL in order to |
47 * query the size of the buffer size needed. In that case, the input value of | 48 * query the size of the buffer size needed. In that case, the input value of |
48 * |output_length| is ignored. | 49 * |output_length| is ignored. |
49 * Note: it is Linux only and fails directly on other platforms. | 50 * Note: it is Linux only and fails directly on other platforms. |
50 */ | 51 */ |
51 PP_Bool (*GetFontTable)(PP_Resource font_file, | 52 PP_Bool (*GetFontTable)(PP_Resource font_file, |
52 uint32_t table, | 53 uint32_t table, |
53 void* output, | 54 void* output, |
54 uint32_t* output_length); | 55 uint32_t* output_length); |
| 56 /** |
| 57 * Returns whether <code>PPB_Flash_FontFile</code> is supported on Windows. |
| 58 */ |
| 59 PP_Bool (*IsSupportedForWindows)(void); |
| 60 }; |
| 61 |
| 62 typedef struct PPB_Flash_FontFile_0_2 PPB_Flash_FontFile; |
| 63 |
| 64 struct PPB_Flash_FontFile_0_1 { |
| 65 PP_Resource (*Create)( |
| 66 PP_Instance instance, |
| 67 const struct PP_BrowserFont_Trusted_Description* description, |
| 68 PP_PrivateFontCharset charset); |
| 69 PP_Bool (*IsFlashFontFile)(PP_Resource resource); |
| 70 PP_Bool (*GetFontTable)(PP_Resource font_file, |
| 71 uint32_t table, |
| 72 void* output, |
| 73 uint32_t* output_length); |
55 }; | 74 }; |
56 | |
57 typedef struct PPB_Flash_FontFile_0_1 PPB_Flash_FontFile; | |
58 /** | 75 /** |
59 * @} | 76 * @} |
60 */ | 77 */ |
61 | 78 |
62 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_FONT_FILE_H_ */ | 79 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_FONT_FILE_H_ */ |
63 | 80 |
OLD | NEW |