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.idl modified Mon Dec 19 19:43:03 2011. */ | 6 /* From private/ppb_flash.idl modified Fri Feb 17 15:52:14 2012. */ |
7 | 7 |
8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_H_ | 8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_H_ |
9 #define PPAPI_C_PRIVATE_PPB_FLASH_H_ | 9 #define PPAPI_C_PRIVATE_PPB_FLASH_H_ |
10 | 10 |
11 #include "ppapi/c/dev/ppb_font_dev.h" | 11 #include "ppapi/c/dev/ppb_font_dev.h" |
12 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.h" |
13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
14 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
15 #include "ppapi/c/pp_module.h" | 15 #include "ppapi/c/pp_module.h" |
16 #include "ppapi/c/pp_point.h" | 16 #include "ppapi/c/pp_point.h" |
17 #include "ppapi/c/pp_rect.h" | 17 #include "ppapi/c/pp_rect.h" |
18 #include "ppapi/c/pp_resource.h" | 18 #include "ppapi/c/pp_resource.h" |
19 #include "ppapi/c/pp_size.h" | 19 #include "ppapi/c/pp_size.h" |
20 #include "ppapi/c/pp_stdint.h" | 20 #include "ppapi/c/pp_stdint.h" |
21 #include "ppapi/c/pp_time.h" | 21 #include "ppapi/c/pp_time.h" |
22 #include "ppapi/c/pp_var.h" | 22 #include "ppapi/c/pp_var.h" |
23 | 23 |
24 #define PPB_FLASH_INTERFACE_12_0 "PPB_Flash;12.0" | 24 #define PPB_FLASH_INTERFACE_12_0 "PPB_Flash;12.0" |
25 #define PPB_FLASH_INTERFACE PPB_FLASH_INTERFACE_12_0 | 25 #define PPB_FLASH_INTERFACE_12_1 "PPB_Flash;12.1" |
| 26 #define PPB_FLASH_INTERFACE PPB_FLASH_INTERFACE_12_1 |
26 | 27 |
27 /** | 28 /** |
28 * @file | 29 * @file |
29 * This file contains the <code>PPB_Flash</code> interface. | 30 * This file contains the <code>PPB_Flash</code> interface. |
30 */ | 31 */ |
31 | 32 |
32 | 33 |
33 /** | 34 /** |
34 * @addtogroup Interfaces | 35 * @addtogroup Interfaces |
35 * @{ | 36 * @{ |
36 */ | 37 */ |
37 /** | 38 /** |
38 * The <code>PPB_Flash</code> interface contains pointers to various functions | 39 * The <code>PPB_Flash</code> interface contains pointers to various functions |
39 * that are only needed to support Pepper Flash. | 40 * that are only needed to support Pepper Flash. |
40 */ | 41 */ |
41 struct PPB_Flash_12_0 { | 42 struct PPB_Flash_12_1 { |
42 /** | 43 /** |
43 * Sets or clears the rendering hint that the given plugin instance is always | 44 * Sets or clears the rendering hint that the given plugin instance is always |
44 * on top of page content. Somewhat more optimized painting can be used in | 45 * on top of page content. Somewhat more optimized painting can be used in |
45 * this case. | 46 * this case. |
46 */ | 47 */ |
47 void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top); | 48 void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top); |
48 /** | 49 /** |
49 * Draws the given pre-laid-out text. It is almost equivalent to Windows' | 50 * Draws the given pre-laid-out text. It is almost equivalent to Windows' |
50 * ExtTextOut with the addition of the transformation (a 3x3 matrix given the | 51 * ExtTextOut with the addition of the transformation (a 3x3 matrix given the |
51 * transform to apply before drawing). It also adds the allow_subpixel_aa | 52 * transform to apply before drawing). It also adds the allow_subpixel_aa |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 /** | 101 /** |
101 * Loads the given font in a more priviledged process on Windows. Call this if | 102 * Loads the given font in a more priviledged process on Windows. Call this if |
102 * Windows is giving errors for font calls. See | 103 * Windows is giving errors for font calls. See |
103 * content/renderer/font_cache_dispatcher_win.cc | 104 * content/renderer/font_cache_dispatcher_win.cc |
104 * | 105 * |
105 * The parameter is a pointer to a LOGFONTW structure. | 106 * The parameter is a pointer to a LOGFONTW structure. |
106 * | 107 * |
107 * On non-Windows platforms, this function does nothing. | 108 * On non-Windows platforms, this function does nothing. |
108 */ | 109 */ |
109 void (*PreloadFontWin)(const void* logfontw); | 110 void (*PreloadFontWin)(const void* logfontw); |
| 111 /** |
| 112 * Returns whether the given rectangle (in the plugin) is topmost, i.e., above |
| 113 * all other web content. |
| 114 */ |
| 115 PP_Bool (*IsRectTopmost)(PP_Instance instance, const struct PP_Rect* rect); |
| 116 /** |
| 117 * Invokes printing for the given instance. |
| 118 */ |
| 119 int32_t (*InvokePrinting)(PP_Instance instance); |
| 120 /** |
| 121 * Indicates that there's activity and, e.g., the screensaver shouldn't kick |
| 122 * in. |
| 123 */ |
| 124 void (*UpdateActivity)(PP_Instance instance); |
110 }; | 125 }; |
111 | 126 |
112 typedef struct PPB_Flash_12_0 PPB_Flash; | 127 typedef struct PPB_Flash_12_1 PPB_Flash; |
| 128 |
| 129 struct PPB_Flash_12_0 { |
| 130 void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top); |
| 131 PP_Bool (*DrawGlyphs)(PP_Instance instance, |
| 132 PP_Resource pp_image_data, |
| 133 const struct PP_FontDescription_Dev* font_desc, |
| 134 uint32_t color, |
| 135 const struct PP_Point* position, |
| 136 const struct PP_Rect* clip, |
| 137 const float transformation[3][3], |
| 138 PP_Bool allow_subpixel_aa, |
| 139 uint32_t glyph_count, |
| 140 const uint16_t glyph_indices[], |
| 141 const struct PP_Point glyph_advances[]); |
| 142 struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url); |
| 143 int32_t (*Navigate)(PP_Resource request_info, |
| 144 const char* target, |
| 145 PP_Bool from_user_action); |
| 146 void (*RunMessageLoop)(PP_Instance instance); |
| 147 void (*QuitMessageLoop)(PP_Instance instance); |
| 148 double (*GetLocalTimeZoneOffset)(PP_Instance instance, PP_Time t); |
| 149 struct PP_Var (*GetCommandLineArgs)(PP_Module module); |
| 150 void (*PreloadFontWin)(const void* logfontw); |
| 151 }; |
113 /** | 152 /** |
114 * @} | 153 * @} |
115 */ | 154 */ |
116 | 155 |
117 /** | 156 /** |
118 * The old version of the interface, which cannot be generated from IDL. | 157 * The old version of the interface, which cannot be generated from IDL. |
119 * TODO(viettrungluu): Remove this when enough time has passed. crbug.com/104184 | 158 * TODO(viettrungluu): Remove this when enough time has passed. crbug.com/104184 |
120 */ | 159 */ |
121 #define PPB_FLASH_INTERFACE_11_0 "PPB_Flash;11" | 160 #define PPB_FLASH_INTERFACE_11_0 "PPB_Flash;11" |
122 struct PPB_Flash_11 { | 161 struct PPB_Flash_11 { |
(...skipping 12 matching lines...) Expand all Loading... |
135 int32_t (*Navigate)(PP_Resource request_info, | 174 int32_t (*Navigate)(PP_Resource request_info, |
136 const char* target, | 175 const char* target, |
137 bool from_user_action); | 176 bool from_user_action); |
138 void (*RunMessageLoop)(PP_Instance instance); | 177 void (*RunMessageLoop)(PP_Instance instance); |
139 void (*QuitMessageLoop)(PP_Instance instance); | 178 void (*QuitMessageLoop)(PP_Instance instance); |
140 double (*GetLocalTimeZoneOffset)(PP_Instance instance, PP_Time t); | 179 double (*GetLocalTimeZoneOffset)(PP_Instance instance, PP_Time t); |
141 struct PP_Var (*GetCommandLineArgs)(PP_Module module); | 180 struct PP_Var (*GetCommandLineArgs)(PP_Module module); |
142 }; | 181 }; |
143 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_H_ */ | 182 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_H_ */ |
144 | 183 |
OLD | NEW |