mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Apply clang-format to all C, C++ and ObjC files (issue #2171)
This commit is contained in:
@ -33,6 +33,8 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=4119ecd62e8c308a5876e6a7ac92cf3ff7df6425$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
|
||||
@ -67,64 +69,64 @@ typedef struct _cef_value_t {
|
||||
// object can be re-used by calling Set*() even if the underlying data is
|
||||
// invalid.
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_value_t* self);
|
||||
int(CEF_CALLBACK* is_valid)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the underlying data is owned by another object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_owned)(struct _cef_value_t* self);
|
||||
int(CEF_CALLBACK* is_owned)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the underlying data is read-only. Some APIs may expose
|
||||
// read-only objects.
|
||||
///
|
||||
int (CEF_CALLBACK *is_read_only)(struct _cef_value_t* self);
|
||||
int(CEF_CALLBACK* is_read_only)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object and |that| object have the same underlying
|
||||
// data. If true (1) modifications to this object will also affect |that|
|
||||
// object and vice-versa.
|
||||
///
|
||||
int (CEF_CALLBACK *is_same)(struct _cef_value_t* self,
|
||||
struct _cef_value_t* that);
|
||||
int(CEF_CALLBACK* is_same)(struct _cef_value_t* self,
|
||||
struct _cef_value_t* that);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object and |that| object have an equivalent
|
||||
// underlying value but are not necessarily the same object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_equal)(struct _cef_value_t* self,
|
||||
struct _cef_value_t* that);
|
||||
int(CEF_CALLBACK* is_equal)(struct _cef_value_t* self,
|
||||
struct _cef_value_t* that);
|
||||
|
||||
///
|
||||
// Returns a copy of this object. The underlying data will also be copied.
|
||||
///
|
||||
struct _cef_value_t* (CEF_CALLBACK *copy)(struct _cef_value_t* self);
|
||||
struct _cef_value_t*(CEF_CALLBACK* copy)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Returns the underlying value type.
|
||||
///
|
||||
cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_value_t* self);
|
||||
cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Returns the underlying value as type bool.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_value_t* self);
|
||||
int(CEF_CALLBACK* get_bool)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Returns the underlying value as type int.
|
||||
///
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_value_t* self);
|
||||
int(CEF_CALLBACK* get_int)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Returns the underlying value as type double.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_value_t* self);
|
||||
double(CEF_CALLBACK* get_double)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Returns the underlying value as type string.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string)(struct _cef_value_t* self);
|
||||
cef_string_userfree_t(CEF_CALLBACK* get_string)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Returns the underlying value as type binary. The returned reference may
|
||||
@ -134,7 +136,7 @@ typedef struct _cef_value_t {
|
||||
// the set_value() function instead of passing the returned reference to
|
||||
// set_binary().
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
|
||||
struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)(
|
||||
struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
@ -145,7 +147,7 @@ typedef struct _cef_value_t {
|
||||
// the set_value() function instead of passing the returned reference to
|
||||
// set_dictionary().
|
||||
///
|
||||
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
|
||||
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
|
||||
struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
@ -156,71 +158,69 @@ typedef struct _cef_value_t {
|
||||
// the set_value() function instead of passing the returned reference to
|
||||
// set_list().
|
||||
///
|
||||
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(struct _cef_value_t* self);
|
||||
struct _cef_list_value_t*(CEF_CALLBACK* get_list)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Sets the underlying value as type null. Returns true (1) if the value was
|
||||
// set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_null)(struct _cef_value_t* self);
|
||||
int(CEF_CALLBACK* set_null)(struct _cef_value_t* self);
|
||||
|
||||
///
|
||||
// Sets the underlying value as type bool. Returns true (1) if the value was
|
||||
// set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_value_t* self, int value);
|
||||
int(CEF_CALLBACK* set_bool)(struct _cef_value_t* self, int value);
|
||||
|
||||
///
|
||||
// Sets the underlying value as type int. Returns true (1) if the value was
|
||||
// set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_value_t* self, int value);
|
||||
int(CEF_CALLBACK* set_int)(struct _cef_value_t* self, int value);
|
||||
|
||||
///
|
||||
// Sets the underlying value as type double. Returns true (1) if the value was
|
||||
// set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_value_t* self, double value);
|
||||
int(CEF_CALLBACK* set_double)(struct _cef_value_t* self, double value);
|
||||
|
||||
///
|
||||
// Sets the underlying value as type string. Returns true (1) if the value was
|
||||
// set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_value_t* self,
|
||||
const cef_string_t* value);
|
||||
int(CEF_CALLBACK* set_string)(struct _cef_value_t* self,
|
||||
const cef_string_t* value);
|
||||
|
||||
///
|
||||
// Sets the underlying value as type binary. Returns true (1) if the value was
|
||||
// set successfully. This object keeps a reference to |value| and ownership of
|
||||
// the underlying data remains unchanged.
|
||||
///
|
||||
int (CEF_CALLBACK *set_binary)(struct _cef_value_t* self,
|
||||
struct _cef_binary_value_t* value);
|
||||
int(CEF_CALLBACK* set_binary)(struct _cef_value_t* self,
|
||||
struct _cef_binary_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the underlying value as type dict. Returns true (1) if the value was
|
||||
// set successfully. This object keeps a reference to |value| and ownership of
|
||||
// the underlying data remains unchanged.
|
||||
///
|
||||
int (CEF_CALLBACK *set_dictionary)(struct _cef_value_t* self,
|
||||
struct _cef_dictionary_value_t* value);
|
||||
int(CEF_CALLBACK* set_dictionary)(struct _cef_value_t* self,
|
||||
struct _cef_dictionary_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the underlying value as type list. Returns true (1) if the value was
|
||||
// set successfully. This object keeps a reference to |value| and ownership of
|
||||
// the underlying data remains unchanged.
|
||||
///
|
||||
int (CEF_CALLBACK *set_list)(struct _cef_value_t* self,
|
||||
struct _cef_list_value_t* value);
|
||||
int(CEF_CALLBACK* set_list)(struct _cef_value_t* self,
|
||||
struct _cef_list_value_t* value);
|
||||
} cef_value_t;
|
||||
|
||||
|
||||
///
|
||||
// Creates a new object.
|
||||
///
|
||||
CEF_EXPORT cef_value_t* cef_value_create();
|
||||
|
||||
|
||||
///
|
||||
// Structure representing a binary value. Can be used on any process and thread.
|
||||
///
|
||||
@ -236,54 +236,54 @@ typedef struct _cef_binary_value_t {
|
||||
// and that other object is then modified or destroyed. Do not call any other
|
||||
// functions if this function returns false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_binary_value_t* self);
|
||||
int(CEF_CALLBACK* is_valid)(struct _cef_binary_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is currently owned by another object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_owned)(struct _cef_binary_value_t* self);
|
||||
int(CEF_CALLBACK* is_owned)(struct _cef_binary_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object and |that| object have the same underlying
|
||||
// data.
|
||||
///
|
||||
int (CEF_CALLBACK *is_same)(struct _cef_binary_value_t* self,
|
||||
struct _cef_binary_value_t* that);
|
||||
int(CEF_CALLBACK* is_same)(struct _cef_binary_value_t* self,
|
||||
struct _cef_binary_value_t* that);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object and |that| object have an equivalent
|
||||
// underlying value but are not necessarily the same object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_equal)(struct _cef_binary_value_t* self,
|
||||
struct _cef_binary_value_t* that);
|
||||
int(CEF_CALLBACK* is_equal)(struct _cef_binary_value_t* self,
|
||||
struct _cef_binary_value_t* that);
|
||||
|
||||
///
|
||||
// Returns a copy of this object. The data in this object will also be copied.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *copy)(
|
||||
struct _cef_binary_value_t*(CEF_CALLBACK* copy)(
|
||||
struct _cef_binary_value_t* self);
|
||||
|
||||
///
|
||||
// Returns the data size.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_size)(struct _cef_binary_value_t* self);
|
||||
size_t(CEF_CALLBACK* get_size)(struct _cef_binary_value_t* self);
|
||||
|
||||
///
|
||||
// Read up to |buffer_size| number of bytes into |buffer|. Reading begins at
|
||||
// the specified byte |data_offset|. Returns the number of bytes read.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_data)(struct _cef_binary_value_t* self,
|
||||
void* buffer, size_t buffer_size, size_t data_offset);
|
||||
size_t(CEF_CALLBACK* get_data)(struct _cef_binary_value_t* self,
|
||||
void* buffer,
|
||||
size_t buffer_size,
|
||||
size_t data_offset);
|
||||
} cef_binary_value_t;
|
||||
|
||||
|
||||
///
|
||||
// Creates a new object that is not owned by any other object. The specified
|
||||
// |data| will be copied.
|
||||
///
|
||||
CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data,
|
||||
size_t data_size);
|
||||
|
||||
size_t data_size);
|
||||
|
||||
///
|
||||
// Structure representing a dictionary value. Can be used on any process and
|
||||
@ -301,75 +301,76 @@ typedef struct _cef_dictionary_value_t {
|
||||
// and that other object is then modified or destroyed. Do not call any other
|
||||
// functions if this function returns false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_dictionary_value_t* self);
|
||||
int(CEF_CALLBACK* is_valid)(struct _cef_dictionary_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is currently owned by another object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_owned)(struct _cef_dictionary_value_t* self);
|
||||
int(CEF_CALLBACK* is_owned)(struct _cef_dictionary_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the values of this object are read-only. Some APIs may
|
||||
// expose read-only objects.
|
||||
///
|
||||
int (CEF_CALLBACK *is_read_only)(struct _cef_dictionary_value_t* self);
|
||||
int(CEF_CALLBACK* is_read_only)(struct _cef_dictionary_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object and |that| object have the same underlying
|
||||
// data. If true (1) modifications to this object will also affect |that|
|
||||
// object and vice-versa.
|
||||
///
|
||||
int (CEF_CALLBACK *is_same)(struct _cef_dictionary_value_t* self,
|
||||
struct _cef_dictionary_value_t* that);
|
||||
int(CEF_CALLBACK* is_same)(struct _cef_dictionary_value_t* self,
|
||||
struct _cef_dictionary_value_t* that);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object and |that| object have an equivalent
|
||||
// underlying value but are not necessarily the same object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_equal)(struct _cef_dictionary_value_t* self,
|
||||
struct _cef_dictionary_value_t* that);
|
||||
int(CEF_CALLBACK* is_equal)(struct _cef_dictionary_value_t* self,
|
||||
struct _cef_dictionary_value_t* that);
|
||||
|
||||
///
|
||||
// Returns a writable copy of this object. If |exclude_NULL_children| is true
|
||||
// (1) any NULL dictionaries or lists will be excluded from the copy.
|
||||
///
|
||||
struct _cef_dictionary_value_t* (CEF_CALLBACK *copy)(
|
||||
struct _cef_dictionary_value_t* self, int exclude_empty_children);
|
||||
struct _cef_dictionary_value_t*(CEF_CALLBACK* copy)(
|
||||
struct _cef_dictionary_value_t* self,
|
||||
int exclude_empty_children);
|
||||
|
||||
///
|
||||
// Returns the number of values.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_size)(struct _cef_dictionary_value_t* self);
|
||||
size_t(CEF_CALLBACK* get_size)(struct _cef_dictionary_value_t* self);
|
||||
|
||||
///
|
||||
// Removes all values. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *clear)(struct _cef_dictionary_value_t* self);
|
||||
int(CEF_CALLBACK* clear)(struct _cef_dictionary_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the current dictionary has a value for the given key.
|
||||
///
|
||||
int (CEF_CALLBACK *has_key)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
int(CEF_CALLBACK* has_key)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Reads all keys for this dictionary into the specified vector.
|
||||
///
|
||||
int (CEF_CALLBACK *get_keys)(struct _cef_dictionary_value_t* self,
|
||||
cef_string_list_t keys);
|
||||
int(CEF_CALLBACK* get_keys)(struct _cef_dictionary_value_t* self,
|
||||
cef_string_list_t keys);
|
||||
|
||||
///
|
||||
// Removes the value at the specified key. Returns true (1) is the value was
|
||||
// removed successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *remove)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
int(CEF_CALLBACK* remove)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value type for the specified key.
|
||||
///
|
||||
cef_value_type_t (CEF_CALLBACK *get_type)(
|
||||
struct _cef_dictionary_value_t* self, const cef_string_t* key);
|
||||
cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value at the specified key. For simple types the returned value
|
||||
@ -378,56 +379,61 @@ typedef struct _cef_dictionary_value_t {
|
||||
// will reference existing data and modifications to the value will modify
|
||||
// this object.
|
||||
///
|
||||
struct _cef_value_t* (CEF_CALLBACK *get_value)(
|
||||
struct _cef_dictionary_value_t* self, const cef_string_t* key);
|
||||
struct _cef_value_t*(CEF_CALLBACK* get_value)(
|
||||
struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value at the specified key as type bool.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
int(CEF_CALLBACK* get_bool)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value at the specified key as type int.
|
||||
///
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
int(CEF_CALLBACK* get_int)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value at the specified key as type double.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
double(CEF_CALLBACK* get_double)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value at the specified key as type string.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string)(
|
||||
struct _cef_dictionary_value_t* self, const cef_string_t* key);
|
||||
cef_string_userfree_t(CEF_CALLBACK* get_string)(
|
||||
struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value at the specified key as type binary. The returned value
|
||||
// will reference existing data.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
|
||||
struct _cef_dictionary_value_t* self, const cef_string_t* key);
|
||||
struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)(
|
||||
struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value at the specified key as type dictionary. The returned
|
||||
// value will reference existing data and modifications to the value will
|
||||
// modify this object.
|
||||
///
|
||||
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
|
||||
struct _cef_dictionary_value_t* self, const cef_string_t* key);
|
||||
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
|
||||
struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Returns the value at the specified key as type list. The returned value
|
||||
// will reference existing data and modifications to the value will modify
|
||||
// this object.
|
||||
///
|
||||
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(
|
||||
struct _cef_dictionary_value_t* self, const cef_string_t* key);
|
||||
struct _cef_list_value_t*(CEF_CALLBACK* get_list)(
|
||||
struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Sets the value at the specified key. Returns true (1) if the value was set
|
||||
@ -437,43 +443,48 @@ typedef struct _cef_dictionary_value_t {
|
||||
// underlying data will be referenced and modifications to |value| will modify
|
||||
// this object.
|
||||
///
|
||||
int (CEF_CALLBACK *set_value)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key, struct _cef_value_t* value);
|
||||
int(CEF_CALLBACK* set_value)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key,
|
||||
struct _cef_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified key as type null. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_null)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
int(CEF_CALLBACK* set_null)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key);
|
||||
|
||||
///
|
||||
// Sets the value at the specified key as type bool. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key, int value);
|
||||
int(CEF_CALLBACK* set_bool)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified key as type int. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key, int value);
|
||||
int(CEF_CALLBACK* set_int)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified key as type double. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key, double value);
|
||||
int(CEF_CALLBACK* set_double)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key,
|
||||
double value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified key as type string. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key, const cef_string_t* value);
|
||||
int(CEF_CALLBACK* set_string)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key,
|
||||
const cef_string_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified key as type binary. Returns true (1) if the
|
||||
@ -482,8 +493,9 @@ typedef struct _cef_dictionary_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_binary)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key, struct _cef_binary_value_t* value);
|
||||
int(CEF_CALLBACK* set_binary)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key,
|
||||
struct _cef_binary_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified key as type dict. Returns true (1) if the
|
||||
@ -492,8 +504,9 @@ typedef struct _cef_dictionary_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_dictionary)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key, struct _cef_dictionary_value_t* value);
|
||||
int(CEF_CALLBACK* set_dictionary)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key,
|
||||
struct _cef_dictionary_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified key as type list. Returns true (1) if the
|
||||
@ -502,17 +515,16 @@ typedef struct _cef_dictionary_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_list)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key, struct _cef_list_value_t* value);
|
||||
int(CEF_CALLBACK* set_list)(struct _cef_dictionary_value_t* self,
|
||||
const cef_string_t* key,
|
||||
struct _cef_list_value_t* value);
|
||||
} cef_dictionary_value_t;
|
||||
|
||||
|
||||
///
|
||||
// Creates a new object that is not owned by any other object.
|
||||
///
|
||||
CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create();
|
||||
|
||||
|
||||
///
|
||||
// Structure representing a list value. Can be used on any process and thread.
|
||||
///
|
||||
@ -528,66 +540,65 @@ typedef struct _cef_list_value_t {
|
||||
// and that other object is then modified or destroyed. Do not call any other
|
||||
// functions if this function returns false (0).
|
||||
///
|
||||
int (CEF_CALLBACK *is_valid)(struct _cef_list_value_t* self);
|
||||
int(CEF_CALLBACK* is_valid)(struct _cef_list_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object is currently owned by another object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_owned)(struct _cef_list_value_t* self);
|
||||
int(CEF_CALLBACK* is_owned)(struct _cef_list_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if the values of this object are read-only. Some APIs may
|
||||
// expose read-only objects.
|
||||
///
|
||||
int (CEF_CALLBACK *is_read_only)(struct _cef_list_value_t* self);
|
||||
int(CEF_CALLBACK* is_read_only)(struct _cef_list_value_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object and |that| object have the same underlying
|
||||
// data. If true (1) modifications to this object will also affect |that|
|
||||
// object and vice-versa.
|
||||
///
|
||||
int (CEF_CALLBACK *is_same)(struct _cef_list_value_t* self,
|
||||
struct _cef_list_value_t* that);
|
||||
int(CEF_CALLBACK* is_same)(struct _cef_list_value_t* self,
|
||||
struct _cef_list_value_t* that);
|
||||
|
||||
///
|
||||
// Returns true (1) if this object and |that| object have an equivalent
|
||||
// underlying value but are not necessarily the same object.
|
||||
///
|
||||
int (CEF_CALLBACK *is_equal)(struct _cef_list_value_t* self,
|
||||
struct _cef_list_value_t* that);
|
||||
int(CEF_CALLBACK* is_equal)(struct _cef_list_value_t* self,
|
||||
struct _cef_list_value_t* that);
|
||||
|
||||
///
|
||||
// Returns a writable copy of this object.
|
||||
///
|
||||
struct _cef_list_value_t* (CEF_CALLBACK *copy)(
|
||||
struct _cef_list_value_t* self);
|
||||
struct _cef_list_value_t*(CEF_CALLBACK* copy)(struct _cef_list_value_t* self);
|
||||
|
||||
///
|
||||
// Sets the number of values. If the number of values is expanded all new
|
||||
// value slots will default to type null. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *set_size)(struct _cef_list_value_t* self, size_t size);
|
||||
int(CEF_CALLBACK* set_size)(struct _cef_list_value_t* self, size_t size);
|
||||
|
||||
///
|
||||
// Returns the number of values.
|
||||
///
|
||||
size_t (CEF_CALLBACK *get_size)(struct _cef_list_value_t* self);
|
||||
size_t(CEF_CALLBACK* get_size)(struct _cef_list_value_t* self);
|
||||
|
||||
///
|
||||
// Removes all values. Returns true (1) on success.
|
||||
///
|
||||
int (CEF_CALLBACK *clear)(struct _cef_list_value_t* self);
|
||||
int(CEF_CALLBACK* clear)(struct _cef_list_value_t* self);
|
||||
|
||||
///
|
||||
// Removes the value at the specified index.
|
||||
///
|
||||
int (CEF_CALLBACK *remove)(struct _cef_list_value_t* self, size_t index);
|
||||
int(CEF_CALLBACK* remove)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value type at the specified index.
|
||||
///
|
||||
cef_value_type_t (CEF_CALLBACK *get_type)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index. For simple types the returned
|
||||
@ -596,54 +607,55 @@ typedef struct _cef_list_value_t {
|
||||
// returned value will reference existing data and modifications to the value
|
||||
// will modify this object.
|
||||
///
|
||||
struct _cef_value_t* (CEF_CALLBACK *get_value)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
struct _cef_value_t*(CEF_CALLBACK* get_value)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type bool.
|
||||
///
|
||||
int (CEF_CALLBACK *get_bool)(struct _cef_list_value_t* self, size_t index);
|
||||
int(CEF_CALLBACK* get_bool)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type int.
|
||||
///
|
||||
int (CEF_CALLBACK *get_int)(struct _cef_list_value_t* self, size_t index);
|
||||
int(CEF_CALLBACK* get_int)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type double.
|
||||
///
|
||||
double (CEF_CALLBACK *get_double)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
double(CEF_CALLBACK* get_double)(struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type string.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string)(
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
cef_string_userfree_t(
|
||||
CEF_CALLBACK* get_string)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type binary. The returned value
|
||||
// will reference existing data.
|
||||
///
|
||||
struct _cef_binary_value_t* (CEF_CALLBACK *get_binary)(
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
struct _cef_binary_value_t*(
|
||||
CEF_CALLBACK* get_binary)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type dictionary. The returned
|
||||
// value will reference existing data and modifications to the value will
|
||||
// modify this object.
|
||||
///
|
||||
struct _cef_dictionary_value_t* (CEF_CALLBACK *get_dictionary)(
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
|
||||
struct _cef_list_value_t* self,
|
||||
size_t index);
|
||||
|
||||
///
|
||||
// Returns the value at the specified index as type list. The returned value
|
||||
// will reference existing data and modifications to the value will modify
|
||||
// this object.
|
||||
///
|
||||
struct _cef_list_value_t* (CEF_CALLBACK *get_list)(
|
||||
struct _cef_list_value_t* self, size_t index);
|
||||
struct _cef_list_value_t*(
|
||||
CEF_CALLBACK* get_list)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index. Returns true (1) if the value was
|
||||
@ -653,42 +665,47 @@ typedef struct _cef_list_value_t {
|
||||
// then the underlying data will be referenced and modifications to |value|
|
||||
// will modify this object.
|
||||
///
|
||||
int (CEF_CALLBACK *set_value)(struct _cef_list_value_t* self, size_t index,
|
||||
struct _cef_value_t* value);
|
||||
int(CEF_CALLBACK* set_value)(struct _cef_list_value_t* self,
|
||||
size_t index,
|
||||
struct _cef_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type null. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_null)(struct _cef_list_value_t* self, size_t index);
|
||||
int(CEF_CALLBACK* set_null)(struct _cef_list_value_t* self, size_t index);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type bool. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_bool)(struct _cef_list_value_t* self, size_t index,
|
||||
int value);
|
||||
int(CEF_CALLBACK* set_bool)(struct _cef_list_value_t* self,
|
||||
size_t index,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type int. Returns true (1) if the
|
||||
// value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_int)(struct _cef_list_value_t* self, size_t index,
|
||||
int value);
|
||||
int(CEF_CALLBACK* set_int)(struct _cef_list_value_t* self,
|
||||
size_t index,
|
||||
int value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type double. Returns true (1) if
|
||||
// the value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_double)(struct _cef_list_value_t* self, size_t index,
|
||||
double value);
|
||||
int(CEF_CALLBACK* set_double)(struct _cef_list_value_t* self,
|
||||
size_t index,
|
||||
double value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type string. Returns true (1) if
|
||||
// the value was set successfully.
|
||||
///
|
||||
int (CEF_CALLBACK *set_string)(struct _cef_list_value_t* self, size_t index,
|
||||
const cef_string_t* value);
|
||||
int(CEF_CALLBACK* set_string)(struct _cef_list_value_t* self,
|
||||
size_t index,
|
||||
const cef_string_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type binary. Returns true (1) if
|
||||
@ -697,8 +714,9 @@ typedef struct _cef_list_value_t {
|
||||
// change. Otherwise, ownership will be transferred to this object and the
|
||||
// |value| reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_binary)(struct _cef_list_value_t* self, size_t index,
|
||||
struct _cef_binary_value_t* value);
|
||||
int(CEF_CALLBACK* set_binary)(struct _cef_list_value_t* self,
|
||||
size_t index,
|
||||
struct _cef_binary_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type dict. Returns true (1) if the
|
||||
@ -707,8 +725,9 @@ typedef struct _cef_list_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_dictionary)(struct _cef_list_value_t* self,
|
||||
size_t index, struct _cef_dictionary_value_t* value);
|
||||
int(CEF_CALLBACK* set_dictionary)(struct _cef_list_value_t* self,
|
||||
size_t index,
|
||||
struct _cef_dictionary_value_t* value);
|
||||
|
||||
///
|
||||
// Sets the value at the specified index as type list. Returns true (1) if the
|
||||
@ -717,17 +736,16 @@ typedef struct _cef_list_value_t {
|
||||
// Otherwise, ownership will be transferred to this object and the |value|
|
||||
// reference will be invalidated.
|
||||
///
|
||||
int (CEF_CALLBACK *set_list)(struct _cef_list_value_t* self, size_t index,
|
||||
struct _cef_list_value_t* value);
|
||||
int(CEF_CALLBACK* set_list)(struct _cef_list_value_t* self,
|
||||
size_t index,
|
||||
struct _cef_list_value_t* value);
|
||||
} cef_list_value_t;
|
||||
|
||||
|
||||
///
|
||||
// Creates a new object that is not owned by any other object.
|
||||
///
|
||||
CEF_EXPORT cef_list_value_t* cef_list_value_create();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user