OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |
7 | 7 |
8 #include "third_party/ppapi/c/pp_module.h" | |
9 #include "third_party/ppapi/c/pp_var.h" | 8 #include "third_party/ppapi/c/pp_var.h" |
10 | 9 |
11 #define PPB_PRIVATE_INTERFACE "PPB_Private;1" | 10 #define PPB_PRIVATE_INTERFACE "PPB_Private;1" |
12 | 11 |
13 typedef enum _pp_ResourceString { | 12 typedef enum _pp_ResourceString { |
14 PP_RESOURCESTRING_PDFGETPASSWORD = 0, | 13 PP_RESOURCESTRING_PDFGETPASSWORD = 0, |
15 } PP_ResourceString; | 14 } PP_ResourceString; |
16 | 15 |
17 typedef enum _pp_PrivateFontPitch { | |
18 PP_PRIVATEFONTPITCH_DEFAULT = 0, | |
19 PP_PRIVATEFONTPITCH_FIXED = 1 | |
20 } PP_PrivateFontPitch; | |
21 | |
22 typedef enum _pp_PrivateFontFamily { | |
23 PP_PRIVATEFONTFAMILY_DEFAULT = 0, | |
24 PP_PRIVATEFONTFAMILY_ROMAN = 1, | |
25 PP_PRIVATEFONTFAMILY_SCRIPT = 2 | |
26 } PP_PrivateFontFamily; | |
27 | |
28 typedef enum _pp_PrivateFontCharset { | |
29 PP_PRIVATEFONTCHARSET_ANSI = 0, | |
30 PP_PRIVATEFONTCHARSET_DEFAULT = 1, | |
31 PP_PRIVATEFONTCHARSET_SYMBOL = 2, | |
32 PP_PRIVATEFONTCHARSET_MAC = 77, | |
33 PP_PRIVATEFONTCHARSET_SHIFTJIS = 128, | |
34 PP_PRIVATEFONTCHARSET_HANGUL = 129, | |
35 PP_PRIVATEFONTCHARSET_JOHAB = 130, | |
36 PP_PRIVATEFONTCHARSET_GB2312 =134, | |
37 PP_PRIVATEFONTCHARSET_CHINESEBIG5 = 136, | |
38 PP_PRIVATEFONTCHARSET_GREEK = 161, | |
39 PP_PRIVATEFONTCHARSET_TURKISH = 162, | |
40 PP_PRIVATEFONTCHARSET_VIETNAMESE = 163, | |
41 PP_PRIVATEFONTCHARSET_HEBREW = 177, | |
42 PP_PRIVATEFONTCHARSET_ARABIC = 178, | |
43 PP_PRIVATEFONTCHARSET_BALTIC = 186, | |
44 PP_PRIVATEFONTCHARSET_RUSSIAN = 204, | |
45 PP_PRIVATEFONTCHARSET_THAI = 222, | |
46 PP_PRIVATEFONTCHARSET_EASTEUROPE = 238, | |
47 PP_PRIVATEFONTCHARSET_OEM = 255 | |
48 } PP_PrivateFontCharset; | |
49 | |
50 typedef struct _pp_PrivateFontFileDescription { | |
51 const char* face; | |
52 uint32_t weight; | |
53 bool italic; | |
54 PP_PrivateFontPitch pitch; | |
55 PP_PrivateFontFamily family; | |
56 PP_PrivateFontCharset charset; | |
57 } PP_PrivateFontFileDescription; | |
58 | |
59 typedef struct _ppb_Private { | 16 typedef struct _ppb_Private { |
60 // Returns a localized string. | 17 // Returns a localized string. |
61 PP_Var (*GetLocalizedString)(PP_ResourceString string_id); | 18 PP_Var (*GetLocalizedString)(PP_ResourceString string_id); |
62 | |
63 // Returns a resource identifying a font file corresponding to the given font | |
64 // request after applying the browser-specific fallback. Linux only. | |
65 PP_Resource (*GetFontFileWithFallback)( | |
66 PP_Module module, | |
67 const PP_PrivateFontFileDescription* description); | |
68 | |
69 // Given a resource previously returned by GetFontFileWithFallback, returns | |
70 // a pointer to the requested font table. Linux only. | |
71 bool (*GetFontTableForPrivateFontFile)(PP_Resource font_file, | |
72 uint32_t table, | |
73 void* output, | |
74 uint32_t* output_length); | |
75 } PPB_Private; | 19 } PPB_Private; |
76 | 20 |
77 #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ | 21 #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |
OLD | NEW |