1 // Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2 // 3 // Redistribution and use in source and binary forms, with or without 4 // modification, are permitted provided that the following conditions are 5 // met: 6 // 7 // * Redistributions of source code must retain the above copyright 8 // notice, this list of conditions and the following disclaimer. 9 // * Redistributions in binary form must reproduce the above 10 // copyright notice, this list of conditions and the following disclaimer 11 // in the documentation and/or other materials provided with the 12 // distribution. 13 // * Neither the name of Google Inc. nor the name Chromium Embedded 14 // Framework nor the names of its contributors may be used to endorse 15 // or promote products derived from this software without specific prior 16 // written permission. 17 // 18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // 30 // --------------------------------------------------------------------------- 31 // 32 // This file was generated by the CEF translator tool and should not edited 33 // by hand. See the translator.README.txt file in the tools directory for 34 // more information. 35 // 36 // $hash=c557496bdc1403b25b22ca9354a942478131c7ce$ 37 // 38 39 #ifndef CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ 40 #define CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ 41 #pragma once 42 43 #include "include/capi/cef_base_capi.h" 44 45 #ifdef __cplusplus 46 extern "C" { 47 #endif 48 49 struct _cef_binary_value_t; 50 struct _cef_dictionary_value_t; 51 struct _cef_list_value_t; 52 53 /// 54 // Structure that wraps other data value types. Complex types (binary, 55 // dictionary and list) will be referenced but not owned by this object. Can be 56 // used on any process and thread. 57 /// 58 typedef struct _cef_value_t { 59 /// 60 // Base structure. 61 /// 62 cef_base_ref_counted_t base; 63 64 /// 65 // Returns true (1) if the underlying data is valid. This will always be true 66 // (1) for simple types. For complex types (binary, dictionary and list) the 67 // underlying data may become invalid if owned by another object (e.g. list or 68 // dictionary) and that other object is then modified or destroyed. This value 69 // object can be re-used by calling Set*() even if the underlying data is 70 // invalid. 71 /// 72 int(CEF_CALLBACK* is_valid)(struct _cef_value_t* self); 73 74 /// 75 // Returns true (1) if the underlying data is owned by another object. 76 /// 77 int(CEF_CALLBACK* is_owned)(struct _cef_value_t* self); 78 79 /// 80 // Returns true (1) if the underlying data is read-only. Some APIs may expose 81 // read-only objects. 82 /// 83 int(CEF_CALLBACK* is_read_only)(struct _cef_value_t* self); 84 85 /// 86 // Returns true (1) if this object and |that| object have the same underlying 87 // data. If true (1) modifications to this object will also affect |that| 88 // object and vice-versa. 89 /// 90 int(CEF_CALLBACK* is_same)(struct _cef_value_t* self, 91 struct _cef_value_t* that); 92 93 /// 94 // Returns true (1) if this object and |that| object have an equivalent 95 // underlying value but are not necessarily the same object. 96 /// 97 int(CEF_CALLBACK* is_equal)(struct _cef_value_t* self, 98 struct _cef_value_t* that); 99 100 /// 101 // Returns a copy of this object. The underlying data will also be copied. 102 /// 103 struct _cef_value_t*(CEF_CALLBACK* copy)(struct _cef_value_t* self); 104 105 /// 106 // Returns the underlying value type. 107 /// 108 cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_value_t* self); 109 110 /// 111 // Returns the underlying value as type bool. 112 /// 113 int(CEF_CALLBACK* get_bool)(struct _cef_value_t* self); 114 115 /// 116 // Returns the underlying value as type int. 117 /// 118 int(CEF_CALLBACK* get_int)(struct _cef_value_t* self); 119 120 /// 121 // Returns the underlying value as type double. 122 /// 123 double(CEF_CALLBACK* get_double)(struct _cef_value_t* self); 124 125 /// 126 // Returns the underlying value as type string. 127 /// 128 // The resulting string must be freed by calling cef_string_userfree_free(). 129 cef_string_userfree_t(CEF_CALLBACK* get_string)(struct _cef_value_t* self); 130 131 /// 132 // Returns the underlying value as type binary. The returned reference may 133 // become invalid if the value is owned by another object or if ownership is 134 // transferred to another object in the future. To maintain a reference to the 135 // value after assigning ownership to a dictionary or list pass this object to 136 // the set_value() function instead of passing the returned reference to 137 // set_binary(). 138 /// 139 struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)( 140 struct _cef_value_t* self); 141 142 /// 143 // Returns the underlying value as type dictionary. The returned reference may 144 // become invalid if the value is owned by another object or if ownership is 145 // transferred to another object in the future. To maintain a reference to the 146 // value after assigning ownership to a dictionary or list pass this object to 147 // the set_value() function instead of passing the returned reference to 148 // set_dictionary(). 149 /// 150 struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)( 151 struct _cef_value_t* self); 152 153 /// 154 // Returns the underlying value as type list. The returned reference may 155 // become invalid if the value is owned by another object or if ownership is 156 // transferred to another object in the future. To maintain a reference to the 157 // value after assigning ownership to a dictionary or list pass this object to 158 // the set_value() function instead of passing the returned reference to 159 // set_list(). 160 /// 161 struct _cef_list_value_t*(CEF_CALLBACK* get_list)(struct _cef_value_t* self); 162 163 /// 164 // Sets the underlying value as type null. Returns true (1) if the value was 165 // set successfully. 166 /// 167 int(CEF_CALLBACK* set_null)(struct _cef_value_t* self); 168 169 /// 170 // Sets the underlying value as type bool. Returns true (1) if the value was 171 // set successfully. 172 /// 173 int(CEF_CALLBACK* set_bool)(struct _cef_value_t* self, int value); 174 175 /// 176 // Sets the underlying value as type int. Returns true (1) if the value was 177 // set successfully. 178 /// 179 int(CEF_CALLBACK* set_int)(struct _cef_value_t* self, int value); 180 181 /// 182 // Sets the underlying value as type double. Returns true (1) if the value was 183 // set successfully. 184 /// 185 int(CEF_CALLBACK* set_double)(struct _cef_value_t* self, double value); 186 187 /// 188 // Sets the underlying value as type string. Returns true (1) if the value was 189 // set successfully. 190 /// 191 int(CEF_CALLBACK* set_string)(struct _cef_value_t* self, 192 const cef_string_t* value); 193 194 /// 195 // Sets the underlying value as type binary. Returns true (1) if the value was 196 // set successfully. This object keeps a reference to |value| and ownership of 197 // the underlying data remains unchanged. 198 /// 199 int(CEF_CALLBACK* set_binary)(struct _cef_value_t* self, 200 struct _cef_binary_value_t* value); 201 202 /// 203 // Sets the underlying value as type dict. Returns true (1) if the value was 204 // set successfully. This object keeps a reference to |value| and ownership of 205 // the underlying data remains unchanged. 206 /// 207 int(CEF_CALLBACK* set_dictionary)(struct _cef_value_t* self, 208 struct _cef_dictionary_value_t* value); 209 210 /// 211 // Sets the underlying value as type list. Returns true (1) if the value was 212 // set successfully. This object keeps a reference to |value| and ownership of 213 // the underlying data remains unchanged. 214 /// 215 int(CEF_CALLBACK* set_list)(struct _cef_value_t* self, 216 struct _cef_list_value_t* value); 217 } cef_value_t; 218 219 /// 220 // Creates a new object. 221 /// 222 CEF_EXPORT cef_value_t* cef_value_create(); 223 224 /// 225 // Structure representing a binary value. Can be used on any process and thread. 226 /// 227 typedef struct _cef_binary_value_t { 228 /// 229 // Base structure. 230 /// 231 cef_base_ref_counted_t base; 232 233 /// 234 // Returns true (1) if this object is valid. This object may become invalid if 235 // the underlying data is owned by another object (e.g. list or dictionary) 236 // and that other object is then modified or destroyed. Do not call any other 237 // functions if this function returns false (0). 238 /// 239 int(CEF_CALLBACK* is_valid)(struct _cef_binary_value_t* self); 240 241 /// 242 // Returns true (1) if this object is currently owned by another object. 243 /// 244 int(CEF_CALLBACK* is_owned)(struct _cef_binary_value_t* self); 245 246 /// 247 // Returns true (1) if this object and |that| object have the same underlying 248 // data. 249 /// 250 int(CEF_CALLBACK* is_same)(struct _cef_binary_value_t* self, 251 struct _cef_binary_value_t* that); 252 253 /// 254 // Returns true (1) if this object and |that| object have an equivalent 255 // underlying value but are not necessarily the same object. 256 /// 257 int(CEF_CALLBACK* is_equal)(struct _cef_binary_value_t* self, 258 struct _cef_binary_value_t* that); 259 260 /// 261 // Returns a copy of this object. The data in this object will also be copied. 262 /// 263 struct _cef_binary_value_t*(CEF_CALLBACK* copy)( 264 struct _cef_binary_value_t* self); 265 266 /// 267 // Returns the data size. 268 /// 269 size_t(CEF_CALLBACK* get_size)(struct _cef_binary_value_t* self); 270 271 /// 272 // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at 273 // the specified byte |data_offset|. Returns the number of bytes read. 274 /// 275 size_t(CEF_CALLBACK* get_data)(struct _cef_binary_value_t* self, 276 void* buffer, 277 size_t buffer_size, 278 size_t data_offset); 279 } cef_binary_value_t; 280 281 /// 282 // Creates a new object that is not owned by any other object. The specified 283 // |data| will be copied. 284 /// 285 CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data, 286 size_t data_size); 287 288 /// 289 // Structure representing a dictionary value. Can be used on any process and 290 // thread. 291 /// 292 typedef struct _cef_dictionary_value_t { 293 /// 294 // Base structure. 295 /// 296 cef_base_ref_counted_t base; 297 298 /// 299 // Returns true (1) if this object is valid. This object may become invalid if 300 // the underlying data is owned by another object (e.g. list or dictionary) 301 // and that other object is then modified or destroyed. Do not call any other 302 // functions if this function returns false (0). 303 /// 304 int(CEF_CALLBACK* is_valid)(struct _cef_dictionary_value_t* self); 305 306 /// 307 // Returns true (1) if this object is currently owned by another object. 308 /// 309 int(CEF_CALLBACK* is_owned)(struct _cef_dictionary_value_t* self); 310 311 /// 312 // Returns true (1) if the values of this object are read-only. Some APIs may 313 // expose read-only objects. 314 /// 315 int(CEF_CALLBACK* is_read_only)(struct _cef_dictionary_value_t* self); 316 317 /// 318 // Returns true (1) if this object and |that| object have the same underlying 319 // data. If true (1) modifications to this object will also affect |that| 320 // object and vice-versa. 321 /// 322 int(CEF_CALLBACK* is_same)(struct _cef_dictionary_value_t* self, 323 struct _cef_dictionary_value_t* that); 324 325 /// 326 // Returns true (1) if this object and |that| object have an equivalent 327 // underlying value but are not necessarily the same object. 328 /// 329 int(CEF_CALLBACK* is_equal)(struct _cef_dictionary_value_t* self, 330 struct _cef_dictionary_value_t* that); 331 332 /// 333 // Returns a writable copy of this object. If |exclude_NULL_children| is true 334 // (1) any NULL dictionaries or lists will be excluded from the copy. 335 /// 336 struct _cef_dictionary_value_t*(CEF_CALLBACK* copy)( 337 struct _cef_dictionary_value_t* self, 338 int exclude_empty_children); 339 340 /// 341 // Returns the number of values. 342 /// 343 size_t(CEF_CALLBACK* get_size)(struct _cef_dictionary_value_t* self); 344 345 /// 346 // Removes all values. Returns true (1) on success. 347 /// 348 int(CEF_CALLBACK* clear)(struct _cef_dictionary_value_t* self); 349 350 /// 351 // Returns true (1) if the current dictionary has a value for the given key. 352 /// 353 int(CEF_CALLBACK* has_key)(struct _cef_dictionary_value_t* self, 354 const cef_string_t* key); 355 356 /// 357 // Reads all keys for this dictionary into the specified vector. 358 /// 359 int(CEF_CALLBACK* get_keys)(struct _cef_dictionary_value_t* self, 360 cef_string_list_t keys); 361 362 /// 363 // Removes the value at the specified key. Returns true (1) is the value was 364 // removed successfully. 365 /// 366 int(CEF_CALLBACK* remove)(struct _cef_dictionary_value_t* self, 367 const cef_string_t* key); 368 369 /// 370 // Returns the value type for the specified key. 371 /// 372 cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_dictionary_value_t* self, 373 const cef_string_t* key); 374 375 /// 376 // Returns the value at the specified key. For simple types the returned value 377 // will copy existing data and modifications to the value will not modify this 378 // object. For complex types (binary, dictionary and list) the returned value 379 // will reference existing data and modifications to the value will modify 380 // this object. 381 /// 382 struct _cef_value_t*(CEF_CALLBACK* get_value)( 383 struct _cef_dictionary_value_t* self, 384 const cef_string_t* key); 385 386 /// 387 // Returns the value at the specified key as type bool. 388 /// 389 int(CEF_CALLBACK* get_bool)(struct _cef_dictionary_value_t* self, 390 const cef_string_t* key); 391 392 /// 393 // Returns the value at the specified key as type int. 394 /// 395 int(CEF_CALLBACK* get_int)(struct _cef_dictionary_value_t* self, 396 const cef_string_t* key); 397 398 /// 399 // Returns the value at the specified key as type double. 400 /// 401 double(CEF_CALLBACK* get_double)(struct _cef_dictionary_value_t* self, 402 const cef_string_t* key); 403 404 /// 405 // Returns the value at the specified key as type string. 406 /// 407 // The resulting string must be freed by calling cef_string_userfree_free(). 408 cef_string_userfree_t(CEF_CALLBACK* get_string)( 409 struct _cef_dictionary_value_t* self, 410 const cef_string_t* key); 411 412 /// 413 // Returns the value at the specified key as type binary. The returned value 414 // will reference existing data. 415 /// 416 struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)( 417 struct _cef_dictionary_value_t* self, 418 const cef_string_t* key); 419 420 /// 421 // Returns the value at the specified key as type dictionary. The returned 422 // value will reference existing data and modifications to the value will 423 // modify this object. 424 /// 425 struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)( 426 struct _cef_dictionary_value_t* self, 427 const cef_string_t* key); 428 429 /// 430 // Returns the value at the specified key as type list. The returned value 431 // will reference existing data and modifications to the value will modify 432 // this object. 433 /// 434 struct _cef_list_value_t*(CEF_CALLBACK* get_list)( 435 struct _cef_dictionary_value_t* self, 436 const cef_string_t* key); 437 438 /// 439 // Sets the value at the specified key. Returns true (1) if the value was set 440 // successfully. If |value| represents simple data then the underlying data 441 // will be copied and modifications to |value| will not modify this object. If 442 // |value| represents complex data (binary, dictionary or list) then the 443 // underlying data will be referenced and modifications to |value| will modify 444 // this object. 445 /// 446 int(CEF_CALLBACK* set_value)(struct _cef_dictionary_value_t* self, 447 const cef_string_t* key, 448 struct _cef_value_t* value); 449 450 /// 451 // Sets the value at the specified key as type null. Returns true (1) if the 452 // value was set successfully. 453 /// 454 int(CEF_CALLBACK* set_null)(struct _cef_dictionary_value_t* self, 455 const cef_string_t* key); 456 457 /// 458 // Sets the value at the specified key as type bool. Returns true (1) if the 459 // value was set successfully. 460 /// 461 int(CEF_CALLBACK* set_bool)(struct _cef_dictionary_value_t* self, 462 const cef_string_t* key, 463 int value); 464 465 /// 466 // Sets the value at the specified key as type int. Returns true (1) if the 467 // value was set successfully. 468 /// 469 int(CEF_CALLBACK* set_int)(struct _cef_dictionary_value_t* self, 470 const cef_string_t* key, 471 int value); 472 473 /// 474 // Sets the value at the specified key as type double. Returns true (1) if the 475 // value was set successfully. 476 /// 477 int(CEF_CALLBACK* set_double)(struct _cef_dictionary_value_t* self, 478 const cef_string_t* key, 479 double value); 480 481 /// 482 // Sets the value at the specified key as type string. Returns true (1) if the 483 // value was set successfully. 484 /// 485 int(CEF_CALLBACK* set_string)(struct _cef_dictionary_value_t* self, 486 const cef_string_t* key, 487 const cef_string_t* value); 488 489 /// 490 // Sets the value at the specified key as type binary. Returns true (1) if the 491 // value was set successfully. If |value| is currently owned by another object 492 // then the value will be copied and the |value| reference will not change. 493 // Otherwise, ownership will be transferred to this object and the |value| 494 // reference will be invalidated. 495 /// 496 int(CEF_CALLBACK* set_binary)(struct _cef_dictionary_value_t* self, 497 const cef_string_t* key, 498 struct _cef_binary_value_t* value); 499 500 /// 501 // Sets the value at the specified key as type dict. Returns true (1) if the 502 // value was set successfully. If |value| is currently owned by another object 503 // then the value will be copied and the |value| reference will not change. 504 // Otherwise, ownership will be transferred to this object and the |value| 505 // reference will be invalidated. 506 /// 507 int(CEF_CALLBACK* set_dictionary)(struct _cef_dictionary_value_t* self, 508 const cef_string_t* key, 509 struct _cef_dictionary_value_t* value); 510 511 /// 512 // Sets the value at the specified key as type list. Returns true (1) if the 513 // value was set successfully. If |value| is currently owned by another object 514 // then the value will be copied and the |value| reference will not change. 515 // Otherwise, ownership will be transferred to this object and the |value| 516 // reference will be invalidated. 517 /// 518 int(CEF_CALLBACK* set_list)(struct _cef_dictionary_value_t* self, 519 const cef_string_t* key, 520 struct _cef_list_value_t* value); 521 } cef_dictionary_value_t; 522 523 /// 524 // Creates a new object that is not owned by any other object. 525 /// 526 CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create(); 527 528 /// 529 // Structure representing a list value. Can be used on any process and thread. 530 /// 531 typedef struct _cef_list_value_t { 532 /// 533 // Base structure. 534 /// 535 cef_base_ref_counted_t base; 536 537 /// 538 // Returns true (1) if this object is valid. This object may become invalid if 539 // the underlying data is owned by another object (e.g. list or dictionary) 540 // and that other object is then modified or destroyed. Do not call any other 541 // functions if this function returns false (0). 542 /// 543 int(CEF_CALLBACK* is_valid)(struct _cef_list_value_t* self); 544 545 /// 546 // Returns true (1) if this object is currently owned by another object. 547 /// 548 int(CEF_CALLBACK* is_owned)(struct _cef_list_value_t* self); 549 550 /// 551 // Returns true (1) if the values of this object are read-only. Some APIs may 552 // expose read-only objects. 553 /// 554 int(CEF_CALLBACK* is_read_only)(struct _cef_list_value_t* self); 555 556 /// 557 // Returns true (1) if this object and |that| object have the same underlying 558 // data. If true (1) modifications to this object will also affect |that| 559 // object and vice-versa. 560 /// 561 int(CEF_CALLBACK* is_same)(struct _cef_list_value_t* self, 562 struct _cef_list_value_t* that); 563 564 /// 565 // Returns true (1) if this object and |that| object have an equivalent 566 // underlying value but are not necessarily the same object. 567 /// 568 int(CEF_CALLBACK* is_equal)(struct _cef_list_value_t* self, 569 struct _cef_list_value_t* that); 570 571 /// 572 // Returns a writable copy of this object. 573 /// 574 struct _cef_list_value_t*(CEF_CALLBACK* copy)(struct _cef_list_value_t* self); 575 576 /// 577 // Sets the number of values. If the number of values is expanded all new 578 // value slots will default to type null. Returns true (1) on success. 579 /// 580 int(CEF_CALLBACK* set_size)(struct _cef_list_value_t* self, size_t size); 581 582 /// 583 // Returns the number of values. 584 /// 585 size_t(CEF_CALLBACK* get_size)(struct _cef_list_value_t* self); 586 587 /// 588 // Removes all values. Returns true (1) on success. 589 /// 590 int(CEF_CALLBACK* clear)(struct _cef_list_value_t* self); 591 592 /// 593 // Removes the value at the specified index. 594 /// 595 int(CEF_CALLBACK* remove)(struct _cef_list_value_t* self, size_t index); 596 597 /// 598 // Returns the value type at the specified index. 599 /// 600 cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_list_value_t* self, 601 size_t index); 602 603 /// 604 // Returns the value at the specified index. For simple types the returned 605 // value will copy existing data and modifications to the value will not 606 // modify this object. For complex types (binary, dictionary and list) the 607 // returned value will reference existing data and modifications to the value 608 // will modify this object. 609 /// 610 struct _cef_value_t*(CEF_CALLBACK* get_value)(struct _cef_list_value_t* self, 611 size_t index); 612 613 /// 614 // Returns the value at the specified index as type bool. 615 /// 616 int(CEF_CALLBACK* get_bool)(struct _cef_list_value_t* self, size_t index); 617 618 /// 619 // Returns the value at the specified index as type int. 620 /// 621 int(CEF_CALLBACK* get_int)(struct _cef_list_value_t* self, size_t index); 622 623 /// 624 // Returns the value at the specified index as type double. 625 /// 626 double(CEF_CALLBACK* get_double)(struct _cef_list_value_t* self, 627 size_t index); 628 629 /// 630 // Returns the value at the specified index as type string. 631 /// 632 // The resulting string must be freed by calling cef_string_userfree_free(). 633 cef_string_userfree_t( 634 CEF_CALLBACK* get_string)(struct _cef_list_value_t* self, size_t index); 635 636 /// 637 // Returns the value at the specified index as type binary. The returned value 638 // will reference existing data. 639 /// 640 struct _cef_binary_value_t*( 641 CEF_CALLBACK* get_binary)(struct _cef_list_value_t* self, size_t index); 642 643 /// 644 // Returns the value at the specified index as type dictionary. The returned 645 // value will reference existing data and modifications to the value will 646 // modify this object. 647 /// 648 struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)( 649 struct _cef_list_value_t* self, 650 size_t index); 651 652 /// 653 // Returns the value at the specified index as type list. The returned value 654 // will reference existing data and modifications to the value will modify 655 // this object. 656 /// 657 struct _cef_list_value_t*( 658 CEF_CALLBACK* get_list)(struct _cef_list_value_t* self, size_t index); 659 660 /// 661 // Sets the value at the specified index. Returns true (1) if the value was 662 // set successfully. If |value| represents simple data then the underlying 663 // data will be copied and modifications to |value| will not modify this 664 // object. If |value| represents complex data (binary, dictionary or list) 665 // then the underlying data will be referenced and modifications to |value| 666 // will modify this object. 667 /// 668 int(CEF_CALLBACK* set_value)(struct _cef_list_value_t* self, 669 size_t index, 670 struct _cef_value_t* value); 671 672 /// 673 // Sets the value at the specified index as type null. Returns true (1) if the 674 // value was set successfully. 675 /// 676 int(CEF_CALLBACK* set_null)(struct _cef_list_value_t* self, size_t index); 677 678 /// 679 // Sets the value at the specified index as type bool. Returns true (1) if the 680 // value was set successfully. 681 /// 682 int(CEF_CALLBACK* set_bool)(struct _cef_list_value_t* self, 683 size_t index, 684 int value); 685 686 /// 687 // Sets the value at the specified index as type int. Returns true (1) if the 688 // value was set successfully. 689 /// 690 int(CEF_CALLBACK* set_int)(struct _cef_list_value_t* self, 691 size_t index, 692 int value); 693 694 /// 695 // Sets the value at the specified index as type double. Returns true (1) if 696 // the value was set successfully. 697 /// 698 int(CEF_CALLBACK* set_double)(struct _cef_list_value_t* self, 699 size_t index, 700 double value); 701 702 /// 703 // Sets the value at the specified index as type string. Returns true (1) if 704 // the value was set successfully. 705 /// 706 int(CEF_CALLBACK* set_string)(struct _cef_list_value_t* self, 707 size_t index, 708 const cef_string_t* value); 709 710 /// 711 // Sets the value at the specified index as type binary. Returns true (1) if 712 // the value was set successfully. If |value| is currently owned by another 713 // object then the value will be copied and the |value| reference will not 714 // change. Otherwise, ownership will be transferred to this object and the 715 // |value| reference will be invalidated. 716 /// 717 int(CEF_CALLBACK* set_binary)(struct _cef_list_value_t* self, 718 size_t index, 719 struct _cef_binary_value_t* value); 720 721 /// 722 // Sets the value at the specified index as type dict. Returns true (1) if the 723 // value was set successfully. If |value| is currently owned by another object 724 // then the value will be copied and the |value| reference will not change. 725 // Otherwise, ownership will be transferred to this object and the |value| 726 // reference will be invalidated. 727 /// 728 int(CEF_CALLBACK* set_dictionary)(struct _cef_list_value_t* self, 729 size_t index, 730 struct _cef_dictionary_value_t* value); 731 732 /// 733 // Sets the value at the specified index as type list. Returns true (1) if the 734 // value was set successfully. If |value| is currently owned by another object 735 // then the value will be copied and the |value| reference will not change. 736 // Otherwise, ownership will be transferred to this object and the |value| 737 // reference will be invalidated. 738 /// 739 int(CEF_CALLBACK* set_list)(struct _cef_list_value_t* self, 740 size_t index, 741 struct _cef_list_value_t* value); 742 } cef_list_value_t; 743 744 /// 745 // Creates a new object that is not owned by any other object. 746 /// 747 CEF_EXPORT cef_list_value_t* cef_list_value_create(); 748 749 #ifdef __cplusplus 750 } 751 #endif 752 753 #endif // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ 754