Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: ppapi/c/private/ppb_flash.h

Issue 8930023: Rev the Flash interface to add new functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2011 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 12 14:07:40 2011. */
7
6 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_H_ 8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_H_
7 #define PPAPI_C_PRIVATE_PPB_FLASH_H_ 9 #define PPAPI_C_PRIVATE_PPB_FLASH_H_
8 10
11 #include "ppapi/c/dev/ppb_font_dev.h"
9 #include "ppapi/c/pp_bool.h" 12 #include "ppapi/c/pp_bool.h"
10 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h"
11 #include "ppapi/c/pp_module.h" 15 #include "ppapi/c/pp_module.h"
12 #include "ppapi/c/pp_point.h" 16 #include "ppapi/c/pp_point.h"
13 #include "ppapi/c/pp_rect.h" 17 #include "ppapi/c/pp_rect.h"
14 #include "ppapi/c/pp_resource.h" 18 #include "ppapi/c/pp_resource.h"
19 #include "ppapi/c/pp_size.h"
20 #include "ppapi/c/pp_stdint.h"
15 #include "ppapi/c/pp_time.h" 21 #include "ppapi/c/pp_time.h"
16 #include "ppapi/c/pp_var.h" 22 #include "ppapi/c/pp_var.h"
17 23
18 #define PPB_FLASH_INTERFACE "PPB_Flash;11" 24 #define PPB_FLASH_INTERFACE_12_0 "PPB_Flash;12.0"
25 #define PPB_FLASH_INTERFACE PPB_FLASH_INTERFACE_12_0
19 26
20 /** 27 /**
21 * @file 28 * @file
22 * This file contains the <code>PPB_Flash</code> interface. 29 * This file contains the <code>PPB_Flash</code> interface.
23 */ 30 */
24 31
25 32
26 /** 33 /**
27 * @addtogroup Interfaces 34 * @addtogroup Interfaces
28 * @{ 35 * @{
29 */ 36 */
30 /** 37 /**
31 * The <code>PPB_Flash</code> interface contains pointers to various functions 38 * The <code>PPB_Flash</code> interface contains pointers to various functions
32 * that are only needed to support Pepper Flash. 39 * that are only needed to support Pepper Flash.
33 */ 40 */
34 struct PPB_Flash { 41 struct PPB_Flash {
35 /** 42 /**
36 * Sets or clears the rendering hint that the given plugin instance is always 43 * Sets or clears the rendering hint that the given plugin instance is always
37 * on top of page content. Somewhat more optimized painting can be used in 44 * on top of page content. Somewhat more optimized painting can be used in
38 * this case. 45 * this case.
39 */ 46 */
40 void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top); 47 void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top);
48 /**
49 * 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 * transform to apply before drawing). It also adds the allow_subpixel_aa
52 * flag which when true, will use subpixel antialiasing if enabled in the
53 * system settings. For this to work properly, the graphics layer that the
54 * text is being drawn into must be opaque.
55 */
41 PP_Bool (*DrawGlyphs)(PP_Instance instance, 56 PP_Bool (*DrawGlyphs)(PP_Instance instance,
42 PP_Resource pp_image_data, 57 PP_Resource pp_image_data,
43 const struct PP_FontDescription_Dev* font_desc, 58 const struct PP_FontDescription_Dev* font_desc,
44 uint32_t color, 59 uint32_t color,
45 struct PP_Point position, 60 const struct PP_Point* position,
46 struct PP_Rect clip, 61 const struct PP_Rect* clip,
47 const float transformation[3][3], 62 const float transformation[3][3],
63 PP_Bool allow_subpixel_aa,
48 uint32_t glyph_count, 64 uint32_t glyph_count,
49 const uint16_t glyph_indices[], 65 const uint16_t glyph_indices[],
50 const struct PP_Point glyph_advances[]); 66 const struct PP_Point glyph_advances[]);
51 /** 67 /**
52 * Retrieves the proxy that will be used for the given URL. The result will 68 * Retrieves the proxy that will be used for the given URL. The result will
53 * be a string in PAC format, or an undefined var on error. 69 * be a string in PAC format, or an undefined var on error.
54 */ 70 */
55 struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url); 71 struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url);
56 /** 72 /**
57 * Navigate to the URL given by the given URLRequestInfo. (This supports GETs, 73 * Navigate to URL. May open a new tab if target is not "_self". Return true
viettrungluu 2011/12/14 18:10:45 You wanted the comment in the header, which is mor
58 * POSTs, and javascript: URLs.) May open a new tab if target is not "_self". 74 * if success. This differs from javascript:window.open() in that it bypasses
75 * the popup blocker, even when this is not called from an event handler.
59 */ 76 */
60 int32_t (*Navigate)(PP_Resource request_info, 77 int32_t (*Navigate)(PP_Resource request_info,
61 const char* target, 78 const char* target,
62 bool from_user_action); 79 PP_Bool from_user_action);
63 /** 80 /**
64 * Runs a nested message loop. The plugin will be reentered from this call. 81 * Runs a nested message loop. The plugin will be reentered from this call.
65 * This function is used in places where Flash would normally enter a nested 82 * This function is used in places where Flash would normally enter a nested
66 * message loop (e.g., when displaying context menus), but Pepper provides 83 * message loop (e.g., when displaying context menus), but Pepper provides
67 * only an asynchronous call. After performing that asynchronous call, call 84 * only an asynchronous call. After performing that asynchronous call, call
68 * |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|. 85 * |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|.
69 */ 86 */
70 void (*RunMessageLoop)(PP_Instance instance); 87 void (*RunMessageLoop)(PP_Instance instance);
71 /** 88 /* Posts a quit message for the outermost nested message loop. Use this to
72 * Posts a quit message for the outermost nested message loop. Use this to
73 * exit and return back to the caller after you call RunMessageLoop. 89 * exit and return back to the caller after you call RunMessageLoop.
74 */ 90 */
75 void (*QuitMessageLoop)(PP_Instance instance); 91 void (*QuitMessageLoop)(PP_Instance instance);
76 /** 92 /**
77 * Retrieves the local time zone offset from GM time for the given UTC time. 93 * Retrieves the local time zone offset from GM time for the given UTC time.
78 */ 94 */
79 double (*GetLocalTimeZoneOffset)(PP_Instance instance, PP_Time t); 95 double (*GetLocalTimeZoneOffset)(PP_Instance instance, PP_Time t);
80 /** 96 /**
81 * Gets a (string) with "command-line" options for Flash; used to pass 97 * Gets a (string) with "command-line" options for Flash; used to pass
82 * run-time debugging parameters, etc. 98 * run-time debugging parameters, etc.
83 */ 99 */
84 struct PP_Var (*GetCommandLineArgs)(PP_Module module); 100 struct PP_Var (*GetCommandLineArgs)(PP_Module module);
101 /**
102 * Loads the given font in a more privledged process on Windows. Call this if
103 * Windows is giving errors for font calls. See
104 * content/renderer/font_cache_dispatcher_win.cc
105 *
106 * The parameter is a pointer to a LOGFONTW structure.
107 *
108 * On non-Windows platforms, this function does nothing.
109 */
110 void (*PreLoadFontInWindows)(const void* logfontw);
85 }; 111 };
86 /** 112 /**
87 * @} 113 * @}
88 */ 114 */
89 115
116 /**
117 * The old version of the interface, which cannot be generated from IDL.
118 * TODO(viettrungluu): Remove this when enough time has passed. crbug.com/104184
119 */
120 #define PPB_FLASH_INTERFACE_11_0 "PPB_Flash;11"
121 struct PPB_Flash_11 {
122 void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top);
123 PP_Bool (*DrawGlyphs)(PP_Instance instance,
124 PP_Resource pp_image_data,
125 const struct PP_FontDescription_Dev* font_desc,
126 uint32_t color,
127 struct PP_Point position,
128 struct PP_Rect clip,
129 const float transformation[3][3],
130 uint32_t glyph_count,
131 const uint16_t glyph_indices[],
132 const struct PP_Point glyph_advances[]);
133 struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url);
134 int32_t (*Navigate)(PP_Resource request_info,
135 const char* target,
136 bool from_user_action);
137 void (*RunMessageLoop)(PP_Instance instance);
138 void (*QuitMessageLoop)(PP_Instance instance);
139 double (*GetLocalTimeZoneOffset)(PP_Instance instance, PP_Time t);
140 struct PP_Var (*GetCommandLineArgs)(PP_Module module);
141 };
90 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_H_ */ 142 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_H_ */
143
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698