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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/c/private/ppb_flash.h
diff --git a/ppapi/c/private/ppb_flash.h b/ppapi/c/private/ppb_flash.h
index d0bff42e2d07ae6c969058043e381d35e9378da0..c3b8f558c2c3f82dac270a3ae9198edf80065d3a 100644
--- a/ppapi/c/private/ppb_flash.h
+++ b/ppapi/c/private/ppb_flash.h
@@ -3,19 +3,26 @@
* found in the LICENSE file.
*/
+/* From private/ppb_flash.idl modified Mon Dec 12 14:07:40 2011. */
+
#ifndef PPAPI_C_PRIVATE_PPB_FLASH_H_
#define PPAPI_C_PRIVATE_PPB_FLASH_H_
+#include "ppapi/c/dev/ppb_font_dev.h"
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_point.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_time.h"
#include "ppapi/c/pp_var.h"
-#define PPB_FLASH_INTERFACE "PPB_Flash;11"
+#define PPB_FLASH_INTERFACE_12_0 "PPB_Flash;12.0"
+#define PPB_FLASH_INTERFACE PPB_FLASH_INTERFACE_12_0
/**
* @file
@@ -38,13 +45,22 @@ struct PPB_Flash {
* this case.
*/
void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top);
+ /**
+ * Draws the given pre-laid-out text. It is almost equivalent to Windows'
+ * ExtTextOut with the addition of the transformation (a 3x3 matrix given the
+ * transform to apply before drawing). It also adds the allow_subpixel_aa
+ * flag which when true, will use subpixel antialiasing if enabled in the
+ * system settings. For this to work properly, the graphics layer that the
+ * text is being drawn into must be opaque.
+ */
PP_Bool (*DrawGlyphs)(PP_Instance instance,
PP_Resource pp_image_data,
const struct PP_FontDescription_Dev* font_desc,
uint32_t color,
- struct PP_Point position,
- struct PP_Rect clip,
+ const struct PP_Point* position,
+ const struct PP_Rect* clip,
const float transformation[3][3],
+ PP_Bool allow_subpixel_aa,
uint32_t glyph_count,
const uint16_t glyph_indices[],
const struct PP_Point glyph_advances[]);
@@ -54,12 +70,13 @@ struct PPB_Flash {
*/
struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url);
/**
- * Navigate to the URL given by the given URLRequestInfo. (This supports GETs,
viettrungluu 2011/12/14 18:10:45 You wanted the comment in the header, which is mor
- * POSTs, and javascript: URLs.) May open a new tab if target is not "_self".
+ * Navigate to URL. May open a new tab if target is not "_self". Return true
+ * if success. This differs from javascript:window.open() in that it bypasses
+ * the popup blocker, even when this is not called from an event handler.
*/
int32_t (*Navigate)(PP_Resource request_info,
const char* target,
- bool from_user_action);
+ PP_Bool from_user_action);
/**
* Runs a nested message loop. The plugin will be reentered from this call.
* This function is used in places where Flash would normally enter a nested
@@ -68,8 +85,7 @@ struct PPB_Flash {
* |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|.
*/
void (*RunMessageLoop)(PP_Instance instance);
- /**
- * Posts a quit message for the outermost nested message loop. Use this to
+ /* Posts a quit message for the outermost nested message loop. Use this to
* exit and return back to the caller after you call RunMessageLoop.
*/
void (*QuitMessageLoop)(PP_Instance instance);
@@ -82,9 +98,46 @@ struct PPB_Flash {
* run-time debugging parameters, etc.
*/
struct PP_Var (*GetCommandLineArgs)(PP_Module module);
+ /**
+ * Loads the given font in a more privledged process on Windows. Call this if
+ * Windows is giving errors for font calls. See
+ * content/renderer/font_cache_dispatcher_win.cc
+ *
+ * The parameter is a pointer to a LOGFONTW structure.
+ *
+ * On non-Windows platforms, this function does nothing.
+ */
+ void (*PreLoadFontInWindows)(const void* logfontw);
};
/**
* @}
*/
+/**
+ * The old version of the interface, which cannot be generated from IDL.
+ * TODO(viettrungluu): Remove this when enough time has passed. crbug.com/104184
+ */
+#define PPB_FLASH_INTERFACE_11_0 "PPB_Flash;11"
+struct PPB_Flash_11 {
+ void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top);
+ PP_Bool (*DrawGlyphs)(PP_Instance instance,
+ PP_Resource pp_image_data,
+ const struct PP_FontDescription_Dev* font_desc,
+ uint32_t color,
+ struct PP_Point position,
+ struct PP_Rect clip,
+ const float transformation[3][3],
+ uint32_t glyph_count,
+ const uint16_t glyph_indices[],
+ const struct PP_Point glyph_advances[]);
+ struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url);
+ int32_t (*Navigate)(PP_Resource request_info,
+ const char* target,
+ bool from_user_action);
+ void (*RunMessageLoop)(PP_Instance instance);
+ void (*QuitMessageLoop)(PP_Instance instance);
+ double (*GetLocalTimeZoneOffset)(PP_Instance instance, PP_Time t);
+ struct PP_Var (*GetCommandLineArgs)(PP_Module module);
+};
#endif /* PPAPI_C_PRIVATE_PPB_FLASH_H_ */
+

Powered by Google App Engine
This is Rietveld 408576698