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 pp_array_output.idl modified Thu Mar 28 11:07:53 2013. */ | 6 /* From pp_array_output.idl modified Tue Oct 22 13:40:12 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PP_ARRAY_OUTPUT_H_ | 8 #ifndef PPAPI_C_PP_ARRAY_OUTPUT_H_ |
9 #define PPAPI_C_PP_ARRAY_OUTPUT_H_ | 9 #define PPAPI_C_PP_ARRAY_OUTPUT_H_ |
10 | 10 |
11 #include "ppapi/c/pp_macros.h" | 11 #include "ppapi/c/pp_macros.h" |
12 #include "ppapi/c/pp_stdint.h" | 12 #include "ppapi/c/pp_stdint.h" |
13 | 13 |
14 /** | 14 /** |
15 * @file | 15 * @file |
16 * PP_ArrayOutput_GetDataBuffer is a callback function to allocate plugin | 16 * PP_ArrayOutput_GetDataBuffer is a callback function to allocate plugin |
(...skipping 19 matching lines...) Expand all Loading... |
36 * @param user_data The pointer provided in the PP_ArrayOutput structure. This | 36 * @param user_data The pointer provided in the PP_ArrayOutput structure. This |
37 * has no meaning to the browser, it is intended to be used by the | 37 * has no meaning to the browser, it is intended to be used by the |
38 * implementation to figure out where to put the data. | 38 * implementation to figure out where to put the data. |
39 * | 39 * |
40 * @param element_count The number of elements in the array. This will be 0 | 40 * @param element_count The number of elements in the array. This will be 0 |
41 * if there is no data to return. | 41 * if there is no data to return. |
42 * | 42 * |
43 * @param element_size The size of each element in bytes. | 43 * @param element_size The size of each element in bytes. |
44 * | 44 * |
45 * @return Returns a pointer to the allocated memory. On failure, returns null. | 45 * @return Returns a pointer to the allocated memory. On failure, returns null. |
46 * You can also return null if the element_count is 0. | 46 * You can also return null if the element_count is 0. If memory is allocated on |
| 47 * the heap, the plugin is responsible for freeing it after the callback runs. |
| 48 * If used with a blocking callback, the memory must remain valid until the |
| 49 * callback runs even if the plugin causes the operation to abort. |
47 */ | 50 */ |
48 | 51 |
49 | 52 |
50 /** | 53 /** |
51 * @addtogroup Typedefs | 54 * @addtogroup Typedefs |
52 * @{ | 55 * @{ |
53 */ | 56 */ |
54 typedef void* (*PP_ArrayOutput_GetDataBuffer)(void* user_data, | 57 typedef void* (*PP_ArrayOutput_GetDataBuffer)(void* user_data, |
55 uint32_t element_count, | 58 uint32_t element_count, |
56 uint32_t element_size); | 59 uint32_t element_size); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 * to communicate how the data should be stored. | 110 * to communicate how the data should be stored. |
108 */ | 111 */ |
109 void* user_data; | 112 void* user_data; |
110 }; | 113 }; |
111 /** | 114 /** |
112 * @} | 115 * @} |
113 */ | 116 */ |
114 | 117 |
115 #endif /* PPAPI_C_PP_ARRAY_OUTPUT_H_ */ | 118 #endif /* PPAPI_C_PP_ARRAY_OUTPUT_H_ */ |
116 | 119 |
OLD | NEW |