2023-01-02 23:47:15 +01:00
|
|
|
// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
|
2012-04-03 03:34:16 +02:00
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions are
|
|
|
|
// met:
|
|
|
|
//
|
|
|
|
// * Redistributions of source code must retain the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer.
|
|
|
|
// * Redistributions in binary form must reproduce the above
|
|
|
|
// copyright notice, this list of conditions and the following disclaimer
|
|
|
|
// in the documentation and/or other materials provided with the
|
|
|
|
// distribution.
|
|
|
|
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
|
|
|
// Framework nor the names of its contributors may be used to endorse
|
|
|
|
// or promote products derived from this software without specific prior
|
|
|
|
// written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool and should not edited
|
|
|
|
// by hand. See the translator.README.txt file in the tools directory for
|
|
|
|
// more information.
|
|
|
|
//
|
2023-01-02 23:47:15 +01:00
|
|
|
// $hash=1b8f7f620685c30b91c8fa656e1a01d182684ae6$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
#ifndef CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
|
|
|
|
#define CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
|
|
|
|
#pragma once
|
|
|
|
|
2014-02-10 18:20:38 +01:00
|
|
|
#include "include/capi/cef_base_capi.h"
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
struct _cef_binary_value_t;
|
2014-01-06 20:59:48 +01:00
|
|
|
struct _cef_dictionary_value_t;
|
|
|
|
struct _cef_list_value_t;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Structure that wraps other data value types. Complex types (binary,
|
|
|
|
/// dictionary and list) will be referenced but not owned by this object. Can be
|
|
|
|
/// used on any process and thread.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
|
|
|
typedef struct _cef_value_t {
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Base structure.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-02-09 23:07:43 +01:00
|
|
|
cef_base_ref_counted_t base;
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if the underlying data is valid. This will always be true
|
|
|
|
/// (1) for simple types. For complex types (binary, dictionary and list) the
|
|
|
|
/// underlying data may become invalid if owned by another object (e.g. list
|
|
|
|
/// or dictionary) and that other object is then modified or destroyed. This
|
|
|
|
/// value object can be re-used by calling Set*() even if the underlying data
|
|
|
|
/// is invalid.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_valid)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if the underlying data is owned by another object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_owned)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if the underlying data is read-only. Some APIs may expose
|
|
|
|
/// read-only objects.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_read_only)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_same)(struct _cef_value_t* self,
|
|
|
|
struct _cef_value_t* that);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object and |that| object have an equivalent
|
|
|
|
/// underlying value but are not necessarily the same object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_equal)(struct _cef_value_t* self,
|
|
|
|
struct _cef_value_t* that);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns a copy of this object. The underlying data will also be copied.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_value_t*(CEF_CALLBACK* copy)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the underlying value type.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the underlying value as type bool.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_bool)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the underlying value as type int.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_int)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the underlying value as type double.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
double(CEF_CALLBACK* get_double)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the underlying value as type string.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
|
|
|
// The resulting string must be freed by calling cef_string_userfree_free().
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_userfree_t(CEF_CALLBACK* get_string)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the underlying value as type binary. The returned reference may
|
|
|
|
/// become invalid if the value is owned by another object or if ownership is
|
|
|
|
/// transferred to another object in the future. To maintain a reference to
|
|
|
|
/// the value after assigning ownership to a dictionary or list pass this
|
|
|
|
/// object to the set_value() function instead of passing the returned
|
|
|
|
/// reference to set_binary().
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)(
|
2015-04-15 15:45:30 +02:00
|
|
|
struct _cef_value_t* self);
|
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the underlying value as type dictionary. The returned reference
|
|
|
|
/// may become invalid if the value is owned by another object or if ownership
|
|
|
|
/// is transferred to another object in the future. To maintain a reference to
|
|
|
|
/// the value after assigning ownership to a dictionary or list pass this
|
|
|
|
/// object to the set_value() function instead of passing the returned
|
|
|
|
/// reference to set_dictionary().
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
|
2015-04-15 15:45:30 +02:00
|
|
|
struct _cef_value_t* self);
|
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the underlying value as type list. The returned reference may
|
|
|
|
/// become invalid if the value is owned by another object or if ownership is
|
|
|
|
/// transferred to another object in the future. To maintain a reference to
|
|
|
|
/// the value after assigning ownership to a dictionary or list pass this
|
|
|
|
/// object to the set_value() function instead of passing the returned
|
|
|
|
/// reference to set_list().
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_list_value_t*(CEF_CALLBACK* get_list)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the underlying value as type null. Returns true (1) if the value was
|
|
|
|
/// set successfully.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_null)(struct _cef_value_t* self);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the underlying value as type bool. Returns true (1) if the value was
|
|
|
|
/// set successfully.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_bool)(struct _cef_value_t* self, int value);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the underlying value as type int. Returns true (1) if the value was
|
|
|
|
/// set successfully.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_int)(struct _cef_value_t* self, int value);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the underlying value as type double. Returns true (1) if the value
|
|
|
|
/// was set successfully.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_double)(struct _cef_value_t* self, double value);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the underlying value as type string. Returns true (1) if the value
|
|
|
|
/// was set successfully.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_string)(struct _cef_value_t* self,
|
|
|
|
const cef_string_t* value);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_binary)(struct _cef_value_t* self,
|
|
|
|
struct _cef_binary_value_t* value);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_dictionary)(struct _cef_value_t* self,
|
|
|
|
struct _cef_dictionary_value_t* value);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_list)(struct _cef_value_t* self,
|
|
|
|
struct _cef_list_value_t* value);
|
2015-04-15 15:45:30 +02:00
|
|
|
} cef_value_t;
|
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Creates a new object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2022-02-16 19:46:02 +01:00
|
|
|
CEF_EXPORT cef_value_t* cef_value_create(void);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Structure representing a binary value. Can be used on any process and
|
|
|
|
/// thread.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
|
|
|
typedef struct _cef_binary_value_t {
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Base structure.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-02-09 23:07:43 +01:00
|
|
|
cef_base_ref_counted_t base;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object is valid. This object may become invalid
|
|
|
|
/// if the underlying data is owned by another object (e.g. list or
|
|
|
|
/// dictionary) and that other object is then modified or destroyed. Do not
|
|
|
|
/// call any other functions if this function returns false (0).
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_valid)(struct _cef_binary_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object is currently owned by another object.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_owned)(struct _cef_binary_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object and |that| object have the same underlying
|
|
|
|
/// data.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_same)(struct _cef_binary_value_t* self,
|
|
|
|
struct _cef_binary_value_t* that);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object and |that| object have an equivalent
|
|
|
|
/// underlying value but are not necessarily the same object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_equal)(struct _cef_binary_value_t* self,
|
|
|
|
struct _cef_binary_value_t* that);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns a copy of this object. The data in this object will also be
|
|
|
|
/// copied.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_binary_value_t*(CEF_CALLBACK* copy)(
|
2012-04-03 03:34:16 +02:00
|
|
|
struct _cef_binary_value_t* self);
|
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the data size.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t(CEF_CALLBACK* get_size)(struct _cef_binary_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Read up to |buffer_size| number of bytes into |buffer|. Reading begins at
|
|
|
|
/// the specified byte |data_offset|. Returns the number of bytes read.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t(CEF_CALLBACK* get_data)(struct _cef_binary_value_t* self,
|
|
|
|
void* buffer,
|
|
|
|
size_t buffer_size,
|
|
|
|
size_t data_offset);
|
2012-04-03 03:34:16 +02:00
|
|
|
} cef_binary_value_t;
|
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Creates a new object that is not owned by any other object. The specified
|
|
|
|
/// |data| will be copied.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
|
|
|
CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data,
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t data_size);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Structure representing a dictionary value. Can be used on any process and
|
|
|
|
/// thread.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
|
|
|
typedef struct _cef_dictionary_value_t {
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Base structure.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-02-09 23:07:43 +01:00
|
|
|
cef_base_ref_counted_t base;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object is valid. This object may become invalid
|
|
|
|
/// if the underlying data is owned by another object (e.g. list or
|
|
|
|
/// dictionary) and that other object is then modified or destroyed. Do not
|
|
|
|
/// call any other functions if this function returns false (0).
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_valid)(struct _cef_dictionary_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object is currently owned by another object.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_owned)(struct _cef_dictionary_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if the values of this object are read-only. Some APIs may
|
|
|
|
/// expose read-only objects.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_read_only)(struct _cef_dictionary_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_same)(struct _cef_dictionary_value_t* self,
|
|
|
|
struct _cef_dictionary_value_t* that);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object and |that| object have an equivalent
|
|
|
|
/// underlying value but are not necessarily the same object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_equal)(struct _cef_dictionary_value_t* self,
|
|
|
|
struct _cef_dictionary_value_t* that);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_dictionary_value_t*(CEF_CALLBACK* copy)(
|
|
|
|
struct _cef_dictionary_value_t* self,
|
|
|
|
int exclude_empty_children);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the number of values.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t(CEF_CALLBACK* get_size)(struct _cef_dictionary_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Removes all values. Returns true (1) on success.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* clear)(struct _cef_dictionary_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if the current dictionary has a value for the given key.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* has_key)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Reads all keys for this dictionary into the specified vector.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_keys)(struct _cef_dictionary_value_t* self,
|
|
|
|
cef_string_list_t keys);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Removes the value at the specified key. Returns true (1) is the value was
|
|
|
|
/// removed successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* remove)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value type for the specified key.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified key. For simple types the returned
|
|
|
|
/// value will copy existing data and modifications to the value will not
|
|
|
|
/// modify this object. For complex types (binary, dictionary and list) the
|
|
|
|
/// returned value will reference existing data and modifications to the value
|
|
|
|
/// will modify this object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_value_t*(CEF_CALLBACK* get_value)(
|
|
|
|
struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified key as type bool.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_bool)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified key as type int.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_int)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified key as type double.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
double(CEF_CALLBACK* get_double)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified key as type string.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
|
|
|
// The resulting string must be freed by calling cef_string_userfree_free().
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_userfree_t(CEF_CALLBACK* get_string)(
|
|
|
|
struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified key as type binary. The returned value
|
|
|
|
/// will reference existing data.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)(
|
|
|
|
struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
|
|
|
|
struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_list_value_t*(CEF_CALLBACK* get_list)(
|
|
|
|
struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified key. Returns true (1) if the value was set
|
|
|
|
/// successfully. If |value| represents simple data then the underlying data
|
|
|
|
/// will be copied and modifications to |value| will not modify this object.
|
|
|
|
/// If |value| represents complex data (binary, dictionary or list) then the
|
|
|
|
/// underlying data will be referenced and modifications to |value| will
|
|
|
|
/// modify this object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_value)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key,
|
|
|
|
struct _cef_value_t* value);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified key as type null. Returns true (1) if the
|
|
|
|
/// value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_null)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified key as type bool. Returns true (1) if the
|
|
|
|
/// value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_bool)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key,
|
|
|
|
int value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified key as type int. Returns true (1) if the
|
|
|
|
/// value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_int)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key,
|
|
|
|
int value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified key as type double. Returns true (1) if
|
|
|
|
/// the value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_double)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key,
|
|
|
|
double value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified key as type string. Returns true (1) if
|
|
|
|
/// the value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_string)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key,
|
|
|
|
const cef_string_t* value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified key as type binary. Returns true (1) if
|
|
|
|
/// the value was set successfully. If |value| is currently owned by another
|
|
|
|
/// object then the value will be copied and the |value| reference will not
|
|
|
|
/// change. Otherwise, ownership will be transferred to this object and the
|
|
|
|
/// |value| reference will be invalidated.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_binary)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key,
|
|
|
|
struct _cef_binary_value_t* value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified key as type dict. Returns true (1) if the
|
|
|
|
/// value was set successfully. If |value| is currently owned by another
|
|
|
|
/// object then the value will be copied and the |value| reference will not
|
|
|
|
/// change. Otherwise, ownership will be transferred to this object and the
|
|
|
|
/// |value| reference will be invalidated.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_dictionary)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key,
|
|
|
|
struct _cef_dictionary_value_t* value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified key as type list. Returns true (1) if the
|
|
|
|
/// value was set successfully. If |value| is currently owned by another
|
|
|
|
/// object then the value will be copied and the |value| reference will not
|
|
|
|
/// change. Otherwise, ownership will be transferred to this object and the
|
|
|
|
/// |value| reference will be invalidated.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_list)(struct _cef_dictionary_value_t* self,
|
|
|
|
const cef_string_t* key,
|
|
|
|
struct _cef_list_value_t* value);
|
2012-04-03 03:34:16 +02:00
|
|
|
} cef_dictionary_value_t;
|
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Creates a new object that is not owned by any other object.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-02-16 19:46:02 +01:00
|
|
|
CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create(void);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Structure representing a list value. Can be used on any process and thread.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
|
|
|
typedef struct _cef_list_value_t {
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Base structure.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-02-09 23:07:43 +01:00
|
|
|
cef_base_ref_counted_t base;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object is valid. This object may become invalid
|
|
|
|
/// if the underlying data is owned by another object (e.g. list or
|
|
|
|
/// dictionary) and that other object is then modified or destroyed. Do not
|
|
|
|
/// call any other functions if this function returns false (0).
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_valid)(struct _cef_list_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object is currently owned by another object.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_owned)(struct _cef_list_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if the values of this object are read-only. Some APIs may
|
|
|
|
/// expose read-only objects.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_read_only)(struct _cef_list_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_same)(struct _cef_list_value_t* self,
|
|
|
|
struct _cef_list_value_t* that);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns true (1) if this object and |that| object have an equivalent
|
|
|
|
/// underlying value but are not necessarily the same object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* is_equal)(struct _cef_list_value_t* self,
|
|
|
|
struct _cef_list_value_t* that);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns a writable copy of this object.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_list_value_t*(CEF_CALLBACK* copy)(struct _cef_list_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_size)(struct _cef_list_value_t* self, size_t size);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the number of values.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t(CEF_CALLBACK* get_size)(struct _cef_list_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Removes all values. Returns true (1) on success.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* clear)(struct _cef_list_value_t* self);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Removes the value at the specified index.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* remove)(struct _cef_list_value_t* self, size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value type at the specified index.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_list_value_t* self,
|
|
|
|
size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified index. For simple types the returned
|
|
|
|
/// value will copy existing data and modifications to the value will not
|
|
|
|
/// modify this object. For complex types (binary, dictionary and list) the
|
|
|
|
/// returned value will reference existing data and modifications to the value
|
|
|
|
/// will modify this object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_value_t*(CEF_CALLBACK* get_value)(struct _cef_list_value_t* self,
|
|
|
|
size_t index);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified index as type bool.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_bool)(struct _cef_list_value_t* self, size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified index as type int.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* get_int)(struct _cef_list_value_t* self, size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified index as type double.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
double(CEF_CALLBACK* get_double)(struct _cef_list_value_t* self,
|
|
|
|
size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified index as type string.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
|
|
|
// The resulting string must be freed by calling cef_string_userfree_free().
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_userfree_t(
|
|
|
|
CEF_CALLBACK* get_string)(struct _cef_list_value_t* self, size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Returns the value at the specified index as type binary. The returned
|
|
|
|
/// value will reference existing data.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_binary_value_t*(
|
|
|
|
CEF_CALLBACK* get_binary)(struct _cef_list_value_t* self, size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
|
|
|
|
struct _cef_list_value_t* self,
|
|
|
|
size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// 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.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_list_value_t*(
|
|
|
|
CEF_CALLBACK* get_list)(struct _cef_list_value_t* self, size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified index. Returns true (1) if the value was
|
|
|
|
/// set successfully. If |value| represents simple data then the underlying
|
|
|
|
/// data will be copied and modifications to |value| will not modify this
|
|
|
|
/// object. If |value| represents complex data (binary, dictionary or list)
|
|
|
|
/// then the underlying data will be referenced and modifications to |value|
|
|
|
|
/// will modify this object.
|
2015-04-15 15:45:30 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_value)(struct _cef_list_value_t* self,
|
|
|
|
size_t index,
|
|
|
|
struct _cef_value_t* value);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified index as type null. Returns true (1) if
|
|
|
|
/// the value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_null)(struct _cef_list_value_t* self, size_t index);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified index as type bool. Returns true (1) if
|
|
|
|
/// the value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_bool)(struct _cef_list_value_t* self,
|
|
|
|
size_t index,
|
|
|
|
int value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified index as type int. Returns true (1) if the
|
|
|
|
/// value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_int)(struct _cef_list_value_t* self,
|
|
|
|
size_t index,
|
|
|
|
int value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified index as type double. Returns true (1) if
|
|
|
|
/// the value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_double)(struct _cef_list_value_t* self,
|
|
|
|
size_t index,
|
|
|
|
double value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified index as type string. Returns true (1) if
|
|
|
|
/// the value was set successfully.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_string)(struct _cef_list_value_t* self,
|
|
|
|
size_t index,
|
|
|
|
const cef_string_t* value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified index as type binary. Returns true (1) if
|
|
|
|
/// the value was set successfully. If |value| is currently owned by another
|
|
|
|
/// object then the value will be copied and the |value| reference will not
|
|
|
|
/// change. Otherwise, ownership will be transferred to this object and the
|
|
|
|
/// |value| reference will be invalidated.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_binary)(struct _cef_list_value_t* self,
|
|
|
|
size_t index,
|
|
|
|
struct _cef_binary_value_t* value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified index as type dict. Returns true (1) if
|
|
|
|
/// the value was set successfully. If |value| is currently owned by another
|
|
|
|
/// object then the value will be copied and the |value| reference will not
|
|
|
|
/// change. Otherwise, ownership will be transferred to this object and the
|
|
|
|
/// |value| reference will be invalidated.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_dictionary)(struct _cef_list_value_t* self,
|
|
|
|
size_t index,
|
|
|
|
struct _cef_dictionary_value_t* value);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Sets the value at the specified index as type list. Returns true (1) if
|
|
|
|
/// the value was set successfully. If |value| is currently owned by another
|
|
|
|
/// object then the value will be copied and the |value| reference will not
|
|
|
|
/// change. Otherwise, ownership will be transferred to this object and the
|
|
|
|
/// |value| reference will be invalidated.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2017-05-17 11:29:28 +02:00
|
|
|
int(CEF_CALLBACK* set_list)(struct _cef_list_value_t* self,
|
|
|
|
size_t index,
|
|
|
|
struct _cef_list_value_t* value);
|
2012-04-03 03:34:16 +02:00
|
|
|
} cef_list_value_t;
|
|
|
|
|
|
|
|
///
|
2022-09-01 04:03:04 +02:00
|
|
|
/// Creates a new object that is not owned by any other object.
|
2012-04-03 03:34:16 +02:00
|
|
|
///
|
2022-02-16 19:46:02 +01:00
|
|
|
CEF_EXPORT cef_list_value_t* cef_list_value_create(void);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
|