Pepper_31_C_interfaces
|
#include <ppb_var_array.h>
Public Attributes | |
struct PP_Var(* | Create )(void) |
struct PP_Var(* | Get )(struct PP_Var array, uint32_t index) |
PP_Bool(* | Set )(struct PP_Var array, uint32_t index, struct PP_Var value) |
uint32_t(* | GetLength )(struct PP_Var array) |
PP_Bool(* | SetLength )(struct PP_Var array, uint32_t length) |
Definition at line 30 of file ppb_var_array.h.
struct PP_Var(* PPB_VarArray_1_0::Create)(void) |
Creates an array var, i.e., a PP_Var
with type set to PP_VARTYPE_ARRAY
. The array length is set to 0.
Definition at line 38 of file ppb_var_array.h.
Gets an element from the array.
[in] | array | An array var. |
[in] | index | An index indicating which element to return. |
index
is larger than or equal to the array length, an undefined var is returned. Definition at line 50 of file ppb_var_array.h.
uint32_t(* PPB_VarArray_1_0::GetLength)(struct PP_Var array) |
Gets the array length.
[in] | array | An array var. |
Definition at line 73 of file ppb_var_array.h.
Sets the value of an element in the array.
[in] | array | An array var. |
[in] | index | An index indicating which element to modify. If index is larger than or equal to the array length, the length is updated to be index + 1. Any position in the array that hasn't been set before is set to undefined, i.e., PP_Var of type PP_VARTYPE_UNDEFINED . |
[in] | value | The value to set. The array holds a reference to it on success. |
PP_Bool
indicating whether the operation succeeds. Definition at line 65 of file ppb_var_array.h.
Sets the array length.
[in] | array | An array var. |
[in] | length | The new array length. If length is smaller than its current value, the array is truncated to the new length; any elements that no longer fit are removed and the references to them will be released. If length is larger than its current value, undefined vars are appended to increase the array to the specified length. |
PP_Bool
indicating whether the operation succeeds. Definition at line 86 of file ppb_var_array.h.