| 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 ppb_graphics_2d.idl modified Sun Mar 31 14:34:56 2013. */ | 6 /* From ppb_graphics_2d.idl modified Fri Apr 26 08:49:08 2013. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPB_GRAPHICS_2D_H_ | 8 #ifndef PPAPI_C_PPB_GRAPHICS_2D_H_ |
| 9 #define PPAPI_C_PPB_GRAPHICS_2D_H_ | 9 #define PPAPI_C_PPB_GRAPHICS_2D_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.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_point.h" | 15 #include "ppapi/c/pp_point.h" |
| 16 #include "ppapi/c/pp_rect.h" | 16 #include "ppapi/c/pp_rect.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 * @param[in,out] size The size of the 2D graphics context in the browser. | 81 * @param[in,out] size The size of the 2D graphics context in the browser. |
| 82 * @param[in,out] is_always_opaque Identifies whether only opaque data | 82 * @param[in,out] is_always_opaque Identifies whether only opaque data |
| 83 * will be painted. | 83 * will be painted. |
| 84 * | 84 * |
| 85 * @return Returns <code>PP_TRUE</code> on success or <code>PP_FALSE</code> if | 85 * @return Returns <code>PP_TRUE</code> on success or <code>PP_FALSE</code> if |
| 86 * the resource is invalid. The output parameters will be set to 0 on a | 86 * the resource is invalid. The output parameters will be set to 0 on a |
| 87 * <code>PP_FALSE</code>. | 87 * <code>PP_FALSE</code>. |
| 88 */ | 88 */ |
| 89 PP_Bool (*Describe)(PP_Resource graphics_2d, | 89 PP_Bool (*Describe)(PP_Resource graphics_2d, |
| 90 struct PP_Size* size, | 90 struct PP_Size* size, |
| 91 PP_Bool* is_always_opqaue); | 91 PP_Bool* is_always_opaque); |
| 92 /** | 92 /** |
| 93 * PaintImageData() enqueues a paint of the given image into the context. | 93 * PaintImageData() enqueues a paint of the given image into the context. |
| 94 * This function has no effect until you call Flush() As a result, what | 94 * This function has no effect until you call Flush() As a result, what |
| 95 * counts is the contents of the bitmap when you call Flush(), not when | 95 * counts is the contents of the bitmap when you call Flush(), not when |
| 96 * you call this function. | 96 * you call this function. |
| 97 * | 97 * |
| 98 * The provided image will be placed at <code>top_left</code> from the top | 98 * The provided image will be placed at <code>top_left</code> from the top |
| 99 * left of the context's internal backing store. Then the pixels contained | 99 * left of the context's internal backing store. Then the pixels contained |
| 100 * in <code>src_rect</code> will be copied into the backing store. This | 100 * in <code>src_rect</code> will be copied into the backing store. This |
| 101 * means that the rectangle being painted will be at <code>src_rect</code> | 101 * means that the rectangle being painted will be at <code>src_rect</code> |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 typedef struct PPB_Graphics2D_1_1 PPB_Graphics2D; | 281 typedef struct PPB_Graphics2D_1_1 PPB_Graphics2D; |
| 282 | 282 |
| 283 struct PPB_Graphics2D_1_0 { | 283 struct PPB_Graphics2D_1_0 { |
| 284 PP_Resource (*Create)(PP_Instance instance, | 284 PP_Resource (*Create)(PP_Instance instance, |
| 285 const struct PP_Size* size, | 285 const struct PP_Size* size, |
| 286 PP_Bool is_always_opaque); | 286 PP_Bool is_always_opaque); |
| 287 PP_Bool (*IsGraphics2D)(PP_Resource resource); | 287 PP_Bool (*IsGraphics2D)(PP_Resource resource); |
| 288 PP_Bool (*Describe)(PP_Resource graphics_2d, | 288 PP_Bool (*Describe)(PP_Resource graphics_2d, |
| 289 struct PP_Size* size, | 289 struct PP_Size* size, |
| 290 PP_Bool* is_always_opqaue); | 290 PP_Bool* is_always_opaque); |
| 291 void (*PaintImageData)(PP_Resource graphics_2d, | 291 void (*PaintImageData)(PP_Resource graphics_2d, |
| 292 PP_Resource image_data, | 292 PP_Resource image_data, |
| 293 const struct PP_Point* top_left, | 293 const struct PP_Point* top_left, |
| 294 const struct PP_Rect* src_rect); | 294 const struct PP_Rect* src_rect); |
| 295 void (*Scroll)(PP_Resource graphics_2d, | 295 void (*Scroll)(PP_Resource graphics_2d, |
| 296 const struct PP_Rect* clip_rect, | 296 const struct PP_Rect* clip_rect, |
| 297 const struct PP_Point* amount); | 297 const struct PP_Point* amount); |
| 298 void (*ReplaceContents)(PP_Resource graphics_2d, PP_Resource image_data); | 298 void (*ReplaceContents)(PP_Resource graphics_2d, PP_Resource image_data); |
| 299 int32_t (*Flush)(PP_Resource graphics_2d, | 299 int32_t (*Flush)(PP_Resource graphics_2d, |
| 300 struct PP_CompletionCallback callback); | 300 struct PP_CompletionCallback callback); |
| 301 }; | 301 }; |
| 302 /** | 302 /** |
| 303 * @} | 303 * @} |
| 304 */ | 304 */ |
| 305 | 305 |
| 306 #endif /* PPAPI_C_PPB_GRAPHICS_2D_H_ */ | 306 #endif /* PPAPI_C_PPB_GRAPHICS_2D_H_ */ |
| 307 | 307 |
| OLD | NEW |