summaryrefslogtreecommitdiffstats
path: root/ppapi/c/private/ppb_flash.h
blob: cb338516bbdbd5e38ffbe6734285197f73f99c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PPAPI_C_PRIVATE_PPB_FLASH_H_
#define PPAPI_C_PRIVATE_PPB_FLASH_H_

#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_point.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_time.h"
#include "ppapi/c/pp_var.h"

#define PPB_FLASH_INTERFACE "PPB_Flash;9"

struct PPB_Flash {
  // Sets or clears the rendering hint that the given plugin instance is always
  // on top of page content. Somewhat more optimized painting can be used in
  // this case.
  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[]);

  // Retrieves the proxy that will be used for the given URL. The result will
  // be a string in PAC format, or an undefined var on error.
  struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url);

  // Navigate to the URL given by the given URLRequestInfo. (This supports GETs,
  // POSTs, and javascript: URLs.) May open a new tab if target is not "_self".
  int32_t (*Navigate)(PP_Resource request_info,
                      const char* target,
                      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
  // message loop (e.g., when displaying context menus), but Pepper provides
  // only an asynchronous call. After performing that asynchronous call, call
  // |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|.
  void (*RunMessageLoop)(PP_Instance instance);

  // 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);

  // Retrieves the local time zone offset from GM time for the given UTC time.
  double (*GetLocalTimeZoneOffset)(PP_Time t);
};

#endif  // PPAPI_C_PRIVATE_PPB_FLASH_H_