| OLD | NEW |
| 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 dev/ppb_buffer_dev.idl modified Fri Aug 26 13:58:06 2011. */ | 6 /* From dev/ppb_buffer_dev.idl modified Wed Oct 5 14:06:02 2011. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_DEV_PPB_BUFFER_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPB_BUFFER_DEV_H_ |
| 9 #define PPAPI_C_DEV_PPB_BUFFER_DEV_H_ | 9 #define PPAPI_C_DEV_PPB_BUFFER_DEV_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
| 15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
| 16 | 16 |
| 17 #define PPB_BUFFER_DEV_INTERFACE_0_4 "PPB_Buffer(Dev);0.4" | 17 #define PPB_BUFFER_DEV_INTERFACE_0_4 "PPB_Buffer(Dev);0.4" |
| 18 #define PPB_BUFFER_DEV_INTERFACE PPB_BUFFER_DEV_INTERFACE_0_4 | 18 #define PPB_BUFFER_DEV_INTERFACE PPB_BUFFER_DEV_INTERFACE_0_4 |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * @file | 21 * @file |
| 22 * This file defines the <code>PPB_Buffer_Dev</code> interface. | 22 * This file defines the <code>PPB_Buffer_Dev</code> interface. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * @addtogroup Interfaces | 27 * @addtogroup Interfaces |
| 28 * @{ | 28 * @{ |
| 29 */ | 29 */ |
| 30 struct PPB_Buffer_Dev { | 30 struct PPB_Buffer_Dev_0_4 { |
| 31 /** | 31 /** |
| 32 * Allocates a buffer of the given size in bytes. The return value will have | 32 * Allocates a buffer of the given size in bytes. The return value will have |
| 33 * a non-zero ID on success, or zero on failure. Failure means the module | 33 * a non-zero ID on success, or zero on failure. Failure means the module |
| 34 * handle was invalid. The buffer will be initialized to contain zeroes. | 34 * handle was invalid. The buffer will be initialized to contain zeroes. |
| 35 */ | 35 */ |
| 36 PP_Resource (*Create)(PP_Instance instance, uint32_t size_in_bytes); | 36 PP_Resource (*Create)(PP_Instance instance, uint32_t size_in_bytes); |
| 37 /** | 37 /** |
| 38 * Returns PP_TRUE if the given resource is a Buffer. Returns PP_FALSE if the | 38 * Returns PP_TRUE if the given resource is a Buffer. Returns PP_FALSE if the |
| 39 * resource is invalid or some type other than a Buffer. | 39 * resource is invalid or some type other than a Buffer. |
| 40 */ | 40 */ |
| 41 PP_Bool (*IsBuffer)(PP_Resource resource); | 41 PP_Bool (*IsBuffer)(PP_Resource resource); |
| 42 /** | 42 /** |
| 43 * Gets the size of the buffer. Returns PP_TRUE on success, PP_FALSE | 43 * Gets the size of the buffer. Returns PP_TRUE on success, PP_FALSE |
| 44 * if the resource is not a buffer. On failure, |*size_in_bytes| is not set. | 44 * if the resource is not a buffer. On failure, |*size_in_bytes| is not set. |
| 45 */ | 45 */ |
| 46 PP_Bool (*Describe)(PP_Resource resource, uint32_t* size_in_bytes); | 46 PP_Bool (*Describe)(PP_Resource resource, uint32_t* size_in_bytes); |
| 47 /** | 47 /** |
| 48 * Maps this buffer into the plugin address space and returns a pointer to | 48 * Maps this buffer into the plugin address space and returns a pointer to |
| 49 * the beginning of the data. | 49 * the beginning of the data. |
| 50 */ | 50 */ |
| 51 void* (*Map)(PP_Resource resource); | 51 void* (*Map)(PP_Resource resource); |
| 52 /** | 52 /** |
| 53 * Unmaps this buffer. | 53 * Unmaps this buffer. |
| 54 */ | 54 */ |
| 55 void (*Unmap)(PP_Resource resource); | 55 void (*Unmap)(PP_Resource resource); |
| 56 }; | 56 }; |
| 57 |
| 58 typedef struct PPB_Buffer_Dev_0_4 PPB_Buffer_Dev; |
| 57 /** | 59 /** |
| 58 * @} | 60 * @} |
| 59 */ | 61 */ |
| 60 | 62 |
| 61 #endif /* PPAPI_C_DEV_PPB_BUFFER_DEV_H_ */ | 63 #endif /* PPAPI_C_DEV_PPB_BUFFER_DEV_H_ */ |
| 62 | 64 |
| OLD | NEW |