Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
ppb_graphics_2d.h
Go to the documentation of this file.
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
3  * found in the LICENSE file.
4  */
5 
6 /* From ppb_graphics_2d.idl modified Wed Nov 8 11:16:43 2017. */
7 
8 #ifndef PPAPI_C_PPB_GRAPHICS_2D_H_
9 #define PPAPI_C_PPB_GRAPHICS_2D_H_
10 
11 #include "ppapi/c/pp_bool.h"
13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_point.h"
16 #include "ppapi/c/pp_rect.h"
17 #include "ppapi/c/pp_resource.h"
18 #include "ppapi/c/pp_size.h"
19 #include "ppapi/c/pp_stdint.h"
20 
21 #define PPB_GRAPHICS_2D_INTERFACE_1_0 "PPB_Graphics2D;1.0"
22 #define PPB_GRAPHICS_2D_INTERFACE_1_1 "PPB_Graphics2D;1.1"
23 #define PPB_GRAPHICS_2D_INTERFACE_1_2 "PPB_Graphics2D;1.2"
24 #define PPB_GRAPHICS_2D_INTERFACE PPB_GRAPHICS_2D_INTERFACE_1_2
25 
64  const struct PP_Size* size,
65  PP_Bool is_always_opaque);
90  PP_Bool (*Describe)(PP_Resource graphics_2d,
91  struct PP_Size* size,
92  PP_Bool* is_always_opaque);
132  void (*PaintImageData)(PP_Resource graphics_2d,
133  PP_Resource image_data,
134  const struct PP_Point* top_left,
135  const struct PP_Rect* src_rect);
154  void (*Scroll)(PP_Resource graphics_2d,
155  const struct PP_Rect* clip_rect,
156  const struct PP_Point* amount);
189  void (*ReplaceContents)(PP_Resource graphics_2d, PP_Resource image_data);
250  int32_t (*Flush)(PP_Resource graphics_2d,
251  struct PP_CompletionCallback callback);
269  PP_Bool (*SetScale)(PP_Resource resource, float scale);
270  /***
271  * GetScale() gets the scale factor that will be applied when painting the
272  * graphics context onto the output device.
273  *
274  * @param[in] resource A <code>Graphics2D</code> context resource.
275  *
276  * @return Returns the scale factor for the graphics context. If the resource
277  * is not a valid <code>Graphics2D</code> context, this will return 0.0.
278  */
279  float (*GetScale)(PP_Resource resource);
296  float scale,
297  const struct PP_Point* origin,
298  const struct PP_Point* translate);
299 };
300 
301 typedef struct PPB_Graphics2D_1_2 PPB_Graphics2D;
302 
304  PP_Resource (*Create)(PP_Instance instance,
305  const struct PP_Size* size,
306  PP_Bool is_always_opaque);
307  PP_Bool (*IsGraphics2D)(PP_Resource resource);
308  PP_Bool (*Describe)(PP_Resource graphics_2d,
309  struct PP_Size* size,
310  PP_Bool* is_always_opaque);
311  void (*PaintImageData)(PP_Resource graphics_2d,
312  PP_Resource image_data,
313  const struct PP_Point* top_left,
314  const struct PP_Rect* src_rect);
315  void (*Scroll)(PP_Resource graphics_2d,
316  const struct PP_Rect* clip_rect,
317  const struct PP_Point* amount);
318  void (*ReplaceContents)(PP_Resource graphics_2d, PP_Resource image_data);
319  int32_t (*Flush)(PP_Resource graphics_2d,
320  struct PP_CompletionCallback callback);
321 };
322 
324  PP_Resource (*Create)(PP_Instance instance,
325  const struct PP_Size* size,
326  PP_Bool is_always_opaque);
327  PP_Bool (*IsGraphics2D)(PP_Resource resource);
328  PP_Bool (*Describe)(PP_Resource graphics_2d,
329  struct PP_Size* size,
330  PP_Bool* is_always_opaque);
331  void (*PaintImageData)(PP_Resource graphics_2d,
332  PP_Resource image_data,
333  const struct PP_Point* top_left,
334  const struct PP_Rect* src_rect);
335  void (*Scroll)(PP_Resource graphics_2d,
336  const struct PP_Rect* clip_rect,
337  const struct PP_Point* amount);
338  void (*ReplaceContents)(PP_Resource graphics_2d, PP_Resource image_data);
339  int32_t (*Flush)(PP_Resource graphics_2d,
340  struct PP_CompletionCallback callback);
341  PP_Bool (*SetScale)(PP_Resource resource, float scale);
342  float (*GetScale)(PP_Resource resource);
343 };
348 #endif /* PPAPI_C_PPB_GRAPHICS_2D_H_ */
349 
void(* ReplaceContents)(PP_Resource graphics_2d, PP_Resource image_data)
Definition: ppb_graphics_2d.h:189
PP_Bool(* IsGraphics2D)(PP_Resource resource)
Definition: ppb_graphics_2d.h:76
Definition: ppb_graphics_2d.h:40
PP_Bool(* Describe)(PP_Resource graphics_2d, struct PP_Size *size, PP_Bool *is_always_opaque)
Definition: ppb_graphics_2d.h:90
int32_t PP_Resource
Definition: pp_resource.h:40
Definition: ppb_graphics_2d.h:323
PP_Bool(* SetLayerTransform)(PP_Resource resource, float scale, const struct PP_Point *origin, const struct PP_Point *translate)
Definition: ppb_graphics_2d.h:295
Definition: pp_point.h:28
void(* PaintImageData)(PP_Resource graphics_2d, PP_Resource image_data, const struct PP_Point *top_left, const struct PP_Rect *src_rect)
Definition: ppb_graphics_2d.h:132
int32_t(* Flush)(PP_Resource graphics_2d, struct PP_CompletionCallback callback)
Definition: ppb_graphics_2d.h:250
Definition: pp_rect.h:30
Definition: ppb_graphics_2d.h:303
void(* Scroll)(PP_Resource graphics_2d, const struct PP_Rect *clip_rect, const struct PP_Point *amount)
Definition: ppb_graphics_2d.h:154
int32_t PP_Instance
Definition: pp_instance.h:34
PP_Bool
Definition: pp_bool.h:30
PP_Resource(* Create)(PP_Instance instance, const struct PP_Size *size, PP_Bool is_always_opaque)
Definition: ppb_graphics_2d.h:63
Definition: pp_completion_callback.h:139
PP_Bool(* SetScale)(PP_Resource resource, float scale)
Definition: ppb_graphics_2d.h:269
Definition: pp_size.h:27