chore(deps): bump purego-cef to v0.14.1
v0.14.0 pinned the CEF API 15000 contract and fixed the struct ABI corruption that made BrowserSettings.BackgroundColor land on chrome_status_bubble (transparent windowless canvas). v0.14.1 restores the global function bindings dropped by that regeneration (DictionaryValueCreate, V8ContextGetCurrentContext, all *Create factories) and fixes global factory ownership so created objects are adopted without a leaked reference. This makes the white-canvas fix in this branch effective: the opaque white BrowserSettings.BackgroundColor now actually reaches libcef.
- commit
- 902c404508da47722a324d2f14b2a4cfc04a2812
- author
- brice · · 2026-07-21 19:07 UTC
- parent
- 1dc7dd4
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
75 files · +1836 -1983
M go.mod +1 -1
| @@ -6,7 +6,7 @@ require ( | |||
| 6 | 6 | github.com/a-h/templ v0.3.1020 | |
| 7 | 7 | github.com/andybalholm/brotli v1.2.2 | |
| 8 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | |
| 9 | - | github.com/bnema/purego-cef v0.13.4 | |
| 9 | + | github.com/bnema/purego-cef v0.14.1 | |
| 10 | 10 | github.com/bnema/purego-cef2gtk v0.8.5 | |
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5 | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4 | |
| @@ -6,7 +6,7 @@ require ( | |||||
| 6 | github.com/a-h/templ v0.3.1020 | 6 | github.com/a-h/templ v0.3.1020 | ||
| 7 | github.com/andybalholm/brotli v1.2.2 | 7 | github.com/andybalholm/brotli v1.2.2 | ||
| 8 | github.com/bnema/purego v0.11.0-bnema.4 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | ||
| 9 | - | github.com/bnema/purego-cef v0.13.4 | 9 | + | github.com/bnema/purego-cef v0.14.1 |
| 10 | github.com/bnema/purego-cef2gtk v0.8.5 | 10 | github.com/bnema/purego-cef2gtk v0.8.5 | ||
| 11 | github.com/bnema/purego-pipewire v0.1.5 | 11 | github.com/bnema/purego-pipewire v0.1.5 | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4 | 12 | github.com/bnema/purego-sqlite v0.1.4 | ||
M go.sum +2 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_browser_gen.go +15 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_command_line_gen.go +15 -2 generated file: collapsed
A vendor/github.com/bnema/purego-cef/cef/cef_component_updater_gen.go +323 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_cookie_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_drag_data_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_image_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_media_router_gen.go +24 -41 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_menu_model_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_parser_gen.go +10 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_preference_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_print_settings_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_process_message_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_request_context_gen.go +16 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_request_gen.go +42 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_resource_bundle_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_response_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_shared_memory_region_gen.go +3 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_shared_process_message_builder_gen.go +20 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_stream_gen.go +34 -5 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_task_gen.go +15 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_task_manager_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_thread_gen.go +14 -1 generated file: collapsed
A vendor/github.com/bnema/purego-cef/cef/cef_types_component_gen.go +45 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_types_content_settings_gen.go +72 -79 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_types_gen.go +59 -52 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_urlrequest_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_v8_gen.go +166 -19 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_values_gen.go +62 -7 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_waitable_event_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_xml_reader_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_zip_reader_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/test_cef_api_version_test__gen.go +86 -871
| @@ -68,21 +68,12 @@ func (obj *apiVersionTestImpl) SetChildRefPtrLibraryAndReturnParent(val ApiVersi | |||
| 68 | 68 | return wrapApiVersionTestRefPtrLibrary(unsafe.Pointer(ret)) | |
| 69 | 69 | } | |
| 70 | 70 | ||
| 71 | - | func (obj *apiVersionTestImpl) SetRefPtrLibraryList(val []ApiVersionTestRefPtrLibrary, val1 int32, val2 int32) int32 { | |
| 71 | + | func (obj *apiVersionTestImpl) SetRefPtrLibraryList(valcount int, val unsafe.Pointer, val1 int32, val2 int32) int32 { | |
| 72 | 72 | if obj == nil || obj.rawPtr == nil { | |
| 73 | 73 | return 0 | |
| 74 | 74 | } | |
| 75 | 75 | rawPtr := obj.rawPtr | |
| 76 | - | var valRaw []uintptr | |
| 77 | - | var valPtr unsafe.Pointer | |
| 78 | - | if len(val) > 0 { | |
| 79 | - | valRaw = make([]uintptr, len(val)) | |
| 80 | - | for i, elem := range val { | |
| 81 | - | valRaw[i] = uintptr(extractRawPointer(elem)) | |
| 82 | - | } | |
| 83 | - | valPtr = unsafe.Pointer(&valRaw[0]) | |
| 84 | - | } | |
| 85 | - | ret := rawPtr.CallSetRefPtrLibraryList(uintptr(len(val)), uintptr(valPtr), uintptr(val1), uintptr(val2)) | |
| 76 | + | ret := rawPtr.CallSetRefPtrLibraryList(uintptr(valcount), uintptr(val), uintptr(val1), uintptr(val2)) | |
| 86 | 77 | return int32(ret) | |
| 87 | 78 | } | |
| 88 | 79 | ||
| @@ -144,39 +135,12 @@ func (obj *apiVersionTestImpl) SetRefPtrClientAndReturn(val ApiVersionTestRefPtr | |||
| 144 | 135 | return wrapApiVersionTestRefPtrClient(unsafe.Pointer(ret)) | |
| 145 | 136 | } | |
| 146 | 137 | ||
| 147 | - | func (obj *apiVersionTestImpl) SetChildRefPtrClient(val ApiVersionTestRefPtrClientChild) int32 { | |
| 148 | - | if obj == nil || obj.rawPtr == nil { | |
| 149 | - | return 0 | |
| 150 | - | } | |
| 151 | - | rawPtr := obj.rawPtr | |
| 152 | - | ret := rawPtr.CallSetChildRefPtrClient(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestRefPtrClientChild(val) }))) | |
| 153 | - | return int32(ret) | |
| 154 | - | } | |
| 155 | - | ||
| 156 | - | func (obj *apiVersionTestImpl) SetChildRefPtrClientAndReturnParent(val ApiVersionTestRefPtrClientChild) ApiVersionTestRefPtrClient { | |
| 157 | - | if obj == nil || obj.rawPtr == nil { | |
| 158 | - | return nil | |
| 159 | - | } | |
| 160 | - | rawPtr := obj.rawPtr | |
| 161 | - | ret := rawPtr.CallSetChildRefPtrClientAndReturnParent(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestRefPtrClientChild(val) }))) | |
| 162 | - | return wrapApiVersionTestRefPtrClient(unsafe.Pointer(ret)) | |
| 163 | - | } | |
| 164 | - | ||
| 165 | - | func (obj *apiVersionTestImpl) SetRefPtrClientList(val []ApiVersionTestRefPtrClient, val1 int32, val2 int32) int32 { | |
| 138 | + | func (obj *apiVersionTestImpl) SetRefPtrClientList(valcount int, val unsafe.Pointer, val1 int32, val2 int32) int32 { | |
| 166 | 139 | if obj == nil || obj.rawPtr == nil { | |
| 167 | 140 | return 0 | |
| 168 | 141 | } | |
| 169 | 142 | rawPtr := obj.rawPtr | |
| 170 | - | var valRaw []uintptr | |
| 171 | - | var valPtr unsafe.Pointer | |
| 172 | - | if len(val) > 0 { | |
| 173 | - | valRaw = make([]uintptr, len(val)) | |
| 174 | - | for i, elem := range val { | |
| 175 | - | valRaw[i] = uintptr(extractRawPointer(elem)) | |
| 176 | - | } | |
| 177 | - | valPtr = unsafe.Pointer(&valRaw[0]) | |
| 178 | - | } | |
| 179 | - | ret := rawPtr.CallSetRefPtrClientList(uintptr(len(val)), uintptr(valPtr), uintptr(val1), uintptr(val2)) | |
| 143 | + | ret := rawPtr.CallSetRefPtrClientList(uintptr(valcount), uintptr(val), uintptr(val1), uintptr(val2)) | |
| 180 | 144 | return int32(ret) | |
| 181 | 145 | } | |
| 182 | 146 | ||
| @@ -283,24 +247,6 @@ func (obj *apiVersionTestImpl) SetOwnPtrClientAndReturn(val ApiVersionTestScoped | |||
| 283 | 247 | return wrapApiVersionTestScopedClient(unsafe.Pointer(ret)) | |
| 284 | 248 | } | |
| 285 | 249 | ||
| 286 | - | func (obj *apiVersionTestImpl) SetChildOwnPtrClient(val ApiVersionTestScopedClientChild) int32 { | |
| 287 | - | if obj == nil || obj.rawPtr == nil { | |
| 288 | - | return 0 | |
| 289 | - | } | |
| 290 | - | rawPtr := obj.rawPtr | |
| 291 | - | ret := rawPtr.CallSetChildOwnPtrClient(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestScopedClientChild(val) }))) | |
| 292 | - | return int32(ret) | |
| 293 | - | } | |
| 294 | - | ||
| 295 | - | func (obj *apiVersionTestImpl) SetChildOwnPtrClientAndReturnParent(val ApiVersionTestScopedClientChild) ApiVersionTestScopedClient { | |
| 296 | - | if obj == nil || obj.rawPtr == nil { | |
| 297 | - | return nil | |
| 298 | - | } | |
| 299 | - | rawPtr := obj.rawPtr | |
| 300 | - | ret := rawPtr.CallSetChildOwnPtrClientAndReturnParent(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestScopedClientChild(val) }))) | |
| 301 | - | return wrapApiVersionTestScopedClient(unsafe.Pointer(ret)) | |
| 302 | - | } | |
| 303 | - | ||
| 304 | 250 | func (obj *apiVersionTestImpl) SetRawPtrLibrary(val ApiVersionTestScopedLibrary) int32 { | |
| 305 | 251 | if obj == nil || obj.rawPtr == nil { | |
| 306 | 252 | return 0 | |
| @@ -319,21 +265,12 @@ func (obj *apiVersionTestImpl) SetChildRawPtrLibrary(val ApiVersionTestScopedLib | |||
| 319 | 265 | return int32(ret) | |
| 320 | 266 | } | |
| 321 | 267 | ||
| 322 | - | func (obj *apiVersionTestImpl) SetRawPtrLibraryList(val []ApiVersionTestScopedLibrary, val1 int32, val2 int32) int32 { | |
| 268 | + | func (obj *apiVersionTestImpl) SetRawPtrLibraryList(valcount int, val unsafe.Pointer, val1 int32, val2 int32) int32 { | |
| 323 | 269 | if obj == nil || obj.rawPtr == nil { | |
| 324 | 270 | return 0 | |
| 325 | 271 | } | |
| 326 | 272 | rawPtr := obj.rawPtr | |
| 327 | - | var valRaw []uintptr | |
| 328 | - | var valPtr unsafe.Pointer | |
| 329 | - | if len(val) > 0 { | |
| 330 | - | valRaw = make([]uintptr, len(val)) | |
| 331 | - | for i, elem := range val { | |
| 332 | - | valRaw[i] = uintptr(extractRawPointer(elem)) | |
| 333 | - | } | |
| 334 | - | valPtr = unsafe.Pointer(&valRaw[0]) | |
| 335 | - | } | |
| 336 | - | ret := rawPtr.CallSetRawPtrLibraryList(uintptr(len(val)), uintptr(valPtr), uintptr(val1), uintptr(val2)) | |
| 273 | + | ret := rawPtr.CallSetRawPtrLibraryList(uintptr(valcount), uintptr(val), uintptr(val1), uintptr(val2)) | |
| 337 | 274 | return int32(ret) | |
| 338 | 275 | } | |
| 339 | 276 | ||
| @@ -346,30 +283,12 @@ func (obj *apiVersionTestImpl) SetRawPtrClient(val ApiVersionTestScopedClient) i | |||
| 346 | 283 | return int32(ret) | |
| 347 | 284 | } | |
| 348 | 285 | ||
| 349 | - | func (obj *apiVersionTestImpl) SetChildRawPtrClient(val ApiVersionTestScopedClientChild) int32 { | |
| 350 | - | if obj == nil || obj.rawPtr == nil { | |
| 351 | - | return 0 | |
| 352 | - | } | |
| 353 | - | rawPtr := obj.rawPtr | |
| 354 | - | ret := rawPtr.CallSetChildRawPtrClient(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestScopedClientChild(val) }))) | |
| 355 | - | return int32(ret) | |
| 356 | - | } | |
| 357 | - | ||
| 358 | - | func (obj *apiVersionTestImpl) SetRawPtrClientList(val []ApiVersionTestScopedClient, val1 int32, val2 int32) int32 { | |
| 286 | + | func (obj *apiVersionTestImpl) SetRawPtrClientList(valcount int, val unsafe.Pointer, val1 int32, val2 int32) int32 { | |
| 359 | 287 | if obj == nil || obj.rawPtr == nil { | |
| 360 | 288 | return 0 | |
| 361 | 289 | } | |
| 362 | 290 | rawPtr := obj.rawPtr | |
| 363 | - | var valRaw []uintptr | |
| 364 | - | var valPtr unsafe.Pointer | |
| 365 | - | if len(val) > 0 { | |
| 366 | - | valRaw = make([]uintptr, len(val)) | |
| 367 | - | for i, elem := range val { | |
| 368 | - | valRaw[i] = uintptr(extractRawPointer(elem)) | |
| 369 | - | } | |
| 370 | - | valPtr = unsafe.Pointer(&valRaw[0]) | |
| 371 | - | } | |
| 372 | - | ret := rawPtr.CallSetRawPtrClientList(uintptr(len(val)), uintptr(valPtr), uintptr(val1), uintptr(val2)) | |
| 291 | + | ret := rawPtr.CallSetRawPtrClientList(uintptr(valcount), uintptr(val), uintptr(val1), uintptr(val2)) | |
| 373 | 292 | return int32(ret) | |
| 374 | 293 | } | |
| 375 | 294 | ||
| @@ -454,6 +373,19 @@ func wrapApiVersionTest(ptr unsafe.Pointer) ApiVersionTest { | |||
| 454 | 373 | return impl | |
| 455 | 374 | } | |
| 456 | 375 | ||
| 376 | + | // takeApiVersionTest adopts a CEF ApiVersionTest pointer whose reference is already owned by | |
| 377 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTest it | |
| 378 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 379 | + | func takeApiVersionTest(ptr unsafe.Pointer) ApiVersionTest { | |
| 380 | + | if ptr == nil { | |
| 381 | + | return nil | |
| 382 | + | } | |
| 383 | + | r := (*capi.CEFApiVersionTestT)(ptr) | |
| 384 | + | impl := &apiVersionTestImpl{rawPtr: r} | |
| 385 | + | runtime.SetFinalizer(impl, (*apiVersionTestImpl).Release) | |
| 386 | + | return impl | |
| 387 | + | } | |
| 388 | + | ||
| 457 | 389 | // ApiVersionTestRefPtrLibrary Library-side test object for RefPtr. | |
| 458 | 390 | type ApiVersionTestRefPtrLibrary = portin.ApiVersionTestRefPtrLibrary | |
| 459 | 391 | ||
| @@ -482,40 +414,6 @@ func (obj *apiVersionTestRefPtrLibraryImpl) SetValueLegacy(value int32) { | |||
| 482 | 414 | rawPtr.CallSetValueLegacy(uintptr(value)) | |
| 483 | 415 | } | |
| 484 | 416 | ||
| 485 | - | func (obj *apiVersionTestRefPtrLibraryImpl) GetValue() int32 { | |
| 486 | - | if obj == nil || obj.rawPtr == nil { | |
| 487 | - | return 0 | |
| 488 | - | } | |
| 489 | - | rawPtr := obj.rawPtr | |
| 490 | - | ret := rawPtr.CallGetValue() | |
| 491 | - | return int32(ret) | |
| 492 | - | } | |
| 493 | - | ||
| 494 | - | func (obj *apiVersionTestRefPtrLibraryImpl) SetValue(value int32) { | |
| 495 | - | if obj == nil || obj.rawPtr == nil { | |
| 496 | - | return | |
| 497 | - | } | |
| 498 | - | rawPtr := obj.rawPtr | |
| 499 | - | rawPtr.CallSetValue(uintptr(value)) | |
| 500 | - | } | |
| 501 | - | ||
| 502 | - | func (obj *apiVersionTestRefPtrLibraryImpl) GetValueV1() int32 { | |
| 503 | - | if obj == nil || obj.rawPtr == nil { | |
| 504 | - | return 0 | |
| 505 | - | } | |
| 506 | - | rawPtr := obj.rawPtr | |
| 507 | - | ret := rawPtr.CallGetValueV1() | |
| 508 | - | return int32(ret) | |
| 509 | - | } | |
| 510 | - | ||
| 511 | - | func (obj *apiVersionTestRefPtrLibraryImpl) SetValueV1(value int32) { | |
| 512 | - | if obj == nil || obj.rawPtr == nil { | |
| 513 | - | return | |
| 514 | - | } | |
| 515 | - | rawPtr := obj.rawPtr | |
| 516 | - | rawPtr.CallSetValueV1(uintptr(value)) | |
| 517 | - | } | |
| 518 | - | ||
| 519 | 417 | func (obj *apiVersionTestRefPtrLibraryImpl) GetValueV2() int32 { | |
| 520 | 418 | if obj == nil || obj.rawPtr == nil { | |
| 521 | 419 | return 0 | |
| @@ -533,23 +431,6 @@ func (obj *apiVersionTestRefPtrLibraryImpl) SetValueV2(value int32) { | |||
| 533 | 431 | rawPtr.CallSetValueV2(uintptr(value)) | |
| 534 | 432 | } | |
| 535 | 433 | ||
| 536 | - | func (obj *apiVersionTestRefPtrLibraryImpl) GetValueExp() int32 { | |
| 537 | - | if obj == nil || obj.rawPtr == nil { | |
| 538 | - | return 0 | |
| 539 | - | } | |
| 540 | - | rawPtr := obj.rawPtr | |
| 541 | - | ret := rawPtr.CallGetValueExp() | |
| 542 | - | return int32(ret) | |
| 543 | - | } | |
| 544 | - | ||
| 545 | - | func (obj *apiVersionTestRefPtrLibraryImpl) SetValueExp(value int32) { | |
| 546 | - | if obj == nil || obj.rawPtr == nil { | |
| 547 | - | return | |
| 548 | - | } | |
| 549 | - | rawPtr := obj.rawPtr | |
| 550 | - | rawPtr.CallSetValueExp(uintptr(value)) | |
| 551 | - | } | |
| 552 | - | ||
| 553 | 434 | func (obj *apiVersionTestRefPtrLibraryImpl) RawPointer() unsafe.Pointer { | |
| 554 | 435 | if obj == nil || obj.rawPtr == nil { | |
| 555 | 436 | return nil | |
| @@ -586,6 +467,19 @@ func wrapApiVersionTestRefPtrLibrary(ptr unsafe.Pointer) ApiVersionTestRefPtrLib | |||
| 586 | 467 | return impl | |
| 587 | 468 | } | |
| 588 | 469 | ||
| 470 | + | // takeApiVersionTestRefPtrLibrary adopts a CEF ApiVersionTestRefPtrLibrary pointer whose reference is already owned by | |
| 471 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestRefPtrLibrary it | |
| 472 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 473 | + | func takeApiVersionTestRefPtrLibrary(ptr unsafe.Pointer) ApiVersionTestRefPtrLibrary { | |
| 474 | + | if ptr == nil { | |
| 475 | + | return nil | |
| 476 | + | } | |
| 477 | + | r := (*capi.CEFApiVersionTestRefPtrLibraryT)(ptr) | |
| 478 | + | impl := &apiVersionTestRefPtrLibraryImpl{rawPtr: r} | |
| 479 | + | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryImpl).Release) | |
| 480 | + | return impl | |
| 481 | + | } | |
| 482 | + | ||
| 589 | 483 | // ApiVersionTestRefPtrLibraryChild Library-side child test object for RefPtr. | |
| 590 | 484 | type ApiVersionTestRefPtrLibraryChild = portin.ApiVersionTestRefPtrLibraryChild | |
| 591 | 485 | ||
| @@ -650,131 +544,16 @@ func wrapApiVersionTestRefPtrLibraryChild(ptr unsafe.Pointer) ApiVersionTestRefP | |||
| 650 | 544 | return impl | |
| 651 | 545 | } | |
| 652 | 546 | ||
| 653 | - | // ApiVersionTestRefPtrLibraryChildChild Another library-side child test object for RefPtr. This is replaced by cef_api_version_test_ref_ptr_library_child_child_v1_t in version 13301. | |
| 654 | - | type ApiVersionTestRefPtrLibraryChildChild = portin.ApiVersionTestRefPtrLibraryChildChild | |
| 655 | - | ||
| 656 | - | // apiVersionTestRefPtrLibraryChildChildImpl is a reverse wrapper for a CEF-owned ApiVersionTestRefPtrLibraryChildChild pointer. | |
| 657 | - | // Release is idempotent, but callers must externally synchronize Release with | |
| 658 | - | // concurrent method calls and must not use the wrapper after Release returns. | |
| 659 | - | type apiVersionTestRefPtrLibraryChildChildImpl struct { | |
| 660 | - | rawPtr *capi.CEFApiVersionTestRefPtrLibraryChildChildT | |
| 661 | - | releaseOnce sync.Once | |
| 662 | - | } | |
| 663 | - | ||
| 664 | - | func (obj *apiVersionTestRefPtrLibraryChildChildImpl) GetOtherOtherValue() int32 { | |
| 665 | - | if obj == nil || obj.rawPtr == nil { | |
| 666 | - | return 0 | |
| 667 | - | } | |
| 668 | - | rawPtr := obj.rawPtr | |
| 669 | - | ret := rawPtr.CallGetOtherOtherValue() | |
| 670 | - | return int32(ret) | |
| 671 | - | } | |
| 672 | - | ||
| 673 | - | func (obj *apiVersionTestRefPtrLibraryChildChildImpl) SetOtherOtherValue(value int32) { | |
| 674 | - | if obj == nil || obj.rawPtr == nil { | |
| 675 | - | return | |
| 676 | - | } | |
| 677 | - | rawPtr := obj.rawPtr | |
| 678 | - | rawPtr.CallSetOtherOtherValue(uintptr(value)) | |
| 679 | - | } | |
| 680 | - | ||
| 681 | - | func (obj *apiVersionTestRefPtrLibraryChildChildImpl) RawPointer() unsafe.Pointer { | |
| 682 | - | if obj == nil || obj.rawPtr == nil { | |
| 683 | - | return nil | |
| 684 | - | } | |
| 685 | - | return unsafe.Pointer(obj.rawPtr) | |
| 686 | - | } | |
| 687 | - | ||
| 688 | - | // Release releases the underlying CEF object. | |
| 689 | - | func (obj *apiVersionTestRefPtrLibraryChildChildImpl) Release() { | |
| 690 | - | if obj == nil { | |
| 691 | - | return | |
| 692 | - | } | |
| 693 | - | obj.releaseOnce.Do(func() { | |
| 694 | - | if obj.rawPtr == nil { | |
| 695 | - | return | |
| 696 | - | } | |
| 697 | - | rawPtr := obj.rawPtr | |
| 698 | - | obj.rawPtr = nil | |
| 699 | - | runtime.SetFinalizer(obj, nil) | |
| 700 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |
| 701 | - | base.CallRelease() | |
| 702 | - | }) | |
| 703 | - | } | |
| 704 | - | ||
| 705 | - | func wrapApiVersionTestRefPtrLibraryChildChild(ptr unsafe.Pointer) ApiVersionTestRefPtrLibraryChildChild { | |
| 706 | - | if ptr == nil { | |
| 707 | - | return nil | |
| 708 | - | } | |
| 709 | - | r := (*capi.CEFApiVersionTestRefPtrLibraryChildChildT)(ptr) | |
| 710 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |
| 711 | - | base.CallAddRef() | |
| 712 | - | impl := &apiVersionTestRefPtrLibraryChildChildImpl{rawPtr: r} | |
| 713 | - | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryChildChildImpl).Release) | |
| 714 | - | return impl | |
| 715 | - | } | |
| 716 | - | ||
| 717 | - | // ApiVersionTestRefPtrLibraryChildChildV1 Another library-side child test object for RefPtr. This replaces cef_api_version_test_ref_ptr_library_child_child_t in version 13301 and is replaced by cef_api_version_test_ref_ptr_library_child_child_v2_t in version 13302. | |
| 718 | - | type ApiVersionTestRefPtrLibraryChildChildV1 = portin.ApiVersionTestRefPtrLibraryChildChildV1 | |
| 719 | - | ||
| 720 | - | // apiVersionTestRefPtrLibraryChildChildV1Impl is a reverse wrapper for a CEF-owned ApiVersionTestRefPtrLibraryChildChildV1 pointer. | |
| 721 | - | // Release is idempotent, but callers must externally synchronize Release with | |
| 722 | - | // concurrent method calls and must not use the wrapper after Release returns. | |
| 723 | - | type apiVersionTestRefPtrLibraryChildChildV1Impl struct { | |
| 724 | - | rawPtr *capi.CEFApiVersionTestRefPtrLibraryChildChildV1T | |
| 725 | - | releaseOnce sync.Once | |
| 726 | - | } | |
| 727 | - | ||
| 728 | - | func (obj *apiVersionTestRefPtrLibraryChildChildV1Impl) GetOtherOtherValue() int32 { | |
| 729 | - | if obj == nil || obj.rawPtr == nil { | |
| 730 | - | return 0 | |
| 731 | - | } | |
| 732 | - | rawPtr := obj.rawPtr | |
| 733 | - | ret := rawPtr.CallGetOtherOtherValue() | |
| 734 | - | return int32(ret) | |
| 735 | - | } | |
| 736 | - | ||
| 737 | - | func (obj *apiVersionTestRefPtrLibraryChildChildV1Impl) SetOtherOtherValue(value int32) { | |
| 738 | - | if obj == nil || obj.rawPtr == nil { | |
| 739 | - | return | |
| 740 | - | } | |
| 741 | - | rawPtr := obj.rawPtr | |
| 742 | - | rawPtr.CallSetOtherOtherValue(uintptr(value)) | |
| 743 | - | } | |
| 744 | - | ||
| 745 | - | func (obj *apiVersionTestRefPtrLibraryChildChildV1Impl) RawPointer() unsafe.Pointer { | |
| 746 | - | if obj == nil || obj.rawPtr == nil { | |
| 747 | - | return nil | |
| 748 | - | } | |
| 749 | - | return unsafe.Pointer(obj.rawPtr) | |
| 750 | - | } | |
| 751 | - | ||
| 752 | - | // Release releases the underlying CEF object. | |
| 753 | - | func (obj *apiVersionTestRefPtrLibraryChildChildV1Impl) Release() { | |
| 754 | - | if obj == nil { | |
| 755 | - | return | |
| 756 | - | } | |
| 757 | - | obj.releaseOnce.Do(func() { | |
| 758 | - | if obj.rawPtr == nil { | |
| 759 | - | return | |
| 760 | - | } | |
| 761 | - | rawPtr := obj.rawPtr | |
| 762 | - | obj.rawPtr = nil | |
| 763 | - | runtime.SetFinalizer(obj, nil) | |
| 764 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |
| 765 | - | base.CallRelease() | |
| 766 | - | }) | |
| 767 | - | } | |
| 768 | - | ||
| 769 | - | func wrapApiVersionTestRefPtrLibraryChildChildV1(ptr unsafe.Pointer) ApiVersionTestRefPtrLibraryChildChildV1 { | |
| 547 | + | // takeApiVersionTestRefPtrLibraryChild adopts a CEF ApiVersionTestRefPtrLibraryChild pointer whose reference is already owned by | |
| 548 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestRefPtrLibraryChild it | |
| 549 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 550 | + | func takeApiVersionTestRefPtrLibraryChild(ptr unsafe.Pointer) ApiVersionTestRefPtrLibraryChild { | |
| 770 | 551 | if ptr == nil { | |
| 771 | 552 | return nil | |
| 772 | 553 | } | |
| 773 | - | r := (*capi.CEFApiVersionTestRefPtrLibraryChildChildV1T)(ptr) | |
| 774 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |
| 775 | - | base.CallAddRef() | |
| 776 | - | impl := &apiVersionTestRefPtrLibraryChildChildV1Impl{rawPtr: r} | |
| 777 | - | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryChildChildV1Impl).Release) | |
| 554 | + | r := (*capi.CEFApiVersionTestRefPtrLibraryChildT)(ptr) | |
| 555 | + | impl := &apiVersionTestRefPtrLibraryChildImpl{rawPtr: r} | |
| 556 | + | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryChildImpl).Release) | |
| 778 | 557 | return impl | |
| 779 | 558 | } | |
| 780 | 559 | ||
| @@ -842,6 +621,19 @@ func wrapApiVersionTestRefPtrLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionT | |||
| 842 | 621 | return impl | |
| 843 | 622 | } | |
| 844 | 623 | ||
| 624 | + | // takeApiVersionTestRefPtrLibraryChildChildV2 adopts a CEF ApiVersionTestRefPtrLibraryChildChildV2 pointer whose reference is already owned by | |
| 625 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestRefPtrLibraryChildChildV2 it | |
| 626 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 627 | + | func takeApiVersionTestRefPtrLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionTestRefPtrLibraryChildChildV2 { | |
| 628 | + | if ptr == nil { | |
| 629 | + | return nil | |
| 630 | + | } | |
| 631 | + | r := (*capi.CEFApiVersionTestRefPtrLibraryChildChildV2T)(ptr) | |
| 632 | + | impl := &apiVersionTestRefPtrLibraryChildChildV2Impl{rawPtr: r} | |
| 633 | + | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryChildChildV2Impl).Release) | |
| 634 | + | return impl | |
| 635 | + | } | |
| 636 | + | ||
| 845 | 637 | // ApiVersionTestRefPtrClient Client-side test object for RefPtr. | |
| 846 | 638 | type ApiVersionTestRefPtrClient = portin.ApiVersionTestRefPtrClient | |
| 847 | 639 | ||
| @@ -871,32 +663,6 @@ func apiVersionTestRefPtrClientGetValueLegacyCEFCallback() uintptr { | |||
| 871 | 663 | }) | |
| 872 | 664 | } | |
| 873 | 665 | ||
| 874 | - | var apiVersionTestRefPtrClientGetValueSharedOnce sync.Once | |
| 875 | - | var apiVersionTestRefPtrClientGetValueSharedCallback uintptr | |
| 876 | - | ||
| 877 | - | func apiVersionTestRefPtrClientGetValueCEFCallback() uintptr { | |
| 878 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientGetValueSharedOnce, &apiVersionTestRefPtrClientGetValueSharedCallback, func(self uintptr) uintptr { | |
| 879 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClient](self) | |
| 880 | - | if !ownerOK { | |
| 881 | - | return 0 | |
| 882 | - | } | |
| 883 | - | return uintptr(impl.GetValue()) | |
| 884 | - | }) | |
| 885 | - | } | |
| 886 | - | ||
| 887 | - | var apiVersionTestRefPtrClientGetValueV1SharedOnce sync.Once | |
| 888 | - | var apiVersionTestRefPtrClientGetValueV1SharedCallback uintptr | |
| 889 | - | ||
| 890 | - | func apiVersionTestRefPtrClientGetValueV1CEFCallback() uintptr { | |
| 891 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientGetValueV1SharedOnce, &apiVersionTestRefPtrClientGetValueV1SharedCallback, func(self uintptr) uintptr { | |
| 892 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClient](self) | |
| 893 | - | if !ownerOK { | |
| 894 | - | return 0 | |
| 895 | - | } | |
| 896 | - | return uintptr(impl.GetValueV1()) | |
| 897 | - | }) | |
| 898 | - | } | |
| 899 | - | ||
| 900 | 666 | var apiVersionTestRefPtrClientGetValueV2SharedOnce sync.Once | |
| 901 | 667 | var apiVersionTestRefPtrClientGetValueV2SharedCallback uintptr | |
| 902 | 668 | ||
| @@ -910,19 +676,6 @@ func apiVersionTestRefPtrClientGetValueV2CEFCallback() uintptr { | |||
| 910 | 676 | }) | |
| 911 | 677 | } | |
| 912 | 678 | ||
| 913 | - | var apiVersionTestRefPtrClientGetValueExpSharedOnce sync.Once | |
| 914 | - | var apiVersionTestRefPtrClientGetValueExpSharedCallback uintptr | |
| 915 | - | ||
| 916 | - | func apiVersionTestRefPtrClientGetValueExpCEFCallback() uintptr { | |
| 917 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientGetValueExpSharedOnce, &apiVersionTestRefPtrClientGetValueExpSharedCallback, func(self uintptr) uintptr { | |
| 918 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClient](self) | |
| 919 | - | if !ownerOK { | |
| 920 | - | return 0 | |
| 921 | - | } | |
| 922 | - | return uintptr(impl.GetValueExp()) | |
| 923 | - | }) | |
| 924 | - | } | |
| 925 | - | ||
| 926 | 679 | // NewApiVersionTestRefPtrClient creates a CEF handler backed by the given implementation. | |
| 927 | 680 | func NewApiVersionTestRefPtrClient(impl ApiVersionTestRefPtrClient) ApiVersionTestRefPtrClient { | |
| 928 | 681 | if isNilImpl(impl) { | |
| @@ -935,14 +688,8 @@ func NewApiVersionTestRefPtrClient(impl ApiVersionTestRefPtrClient) ApiVersionTe | |||
| 935 | 688 | ||
| 936 | 689 | r.OverrideGetValueLegacy(apiVersionTestRefPtrClientGetValueLegacyCEFCallback()) | |
| 937 | 690 | ||
| 938 | - | r.OverrideGetValue(apiVersionTestRefPtrClientGetValueCEFCallback()) | |
| 939 | - | ||
| 940 | - | r.OverrideGetValueV1(apiVersionTestRefPtrClientGetValueV1CEFCallback()) | |
| 941 | - | ||
| 942 | 691 | r.OverrideGetValueV2(apiVersionTestRefPtrClientGetValueV2CEFCallback()) | |
| 943 | 692 | ||
| 944 | - | r.OverrideGetValueExp(apiVersionTestRefPtrClientGetValueExpCEFCallback()) | |
| 945 | - | ||
| 946 | 693 | return w | |
| 947 | 694 | } | |
| 948 | 695 | ||
| @@ -963,25 +710,7 @@ func (obj *apiVersionTestRefPtrClientImpl) GetValueLegacy() int32 { | |||
| 963 | 710 | return int32(ret) | |
| 964 | 711 | } | |
| 965 | 712 | ||
| 966 | - | func (obj *apiVersionTestRefPtrClientImpl) GetValue() int32 { | |
| 967 | - | if obj == nil || obj.rawPtr == nil { | |
| 968 | - | return 0 | |
| 969 | - | } | |
| 970 | - | rawPtr := obj.rawPtr | |
| 971 | - | ret := rawPtr.CallGetValue() | |
| 972 | - | return int32(ret) | |
| 973 | - | } | |
| 974 | - | ||
| 975 | - | func (obj *apiVersionTestRefPtrClientImpl) GetValueV1() int32 { | |
| 976 | - | if obj == nil || obj.rawPtr == nil { | |
| 977 | - | return 0 | |
| 978 | - | } | |
| 979 | - | rawPtr := obj.rawPtr | |
| 980 | - | ret := rawPtr.CallGetValueV1() | |
| 981 | - | return int32(ret) | |
| 982 | - | } | |
| 983 | - | ||
| 984 | - | func (obj *apiVersionTestRefPtrClientImpl) GetValueV2() int32 { | |
| 713 | + | func (obj *apiVersionTestRefPtrClientImpl) GetValueV2() int32 { | |
| 985 | 714 | if obj == nil || obj.rawPtr == nil { | |
| 986 | 715 | return 0 | |
| 987 | 716 | } | |
| @@ -990,15 +719,6 @@ func (obj *apiVersionTestRefPtrClientImpl) GetValueV2() int32 { | |||
| 990 | 719 | return int32(ret) | |
| 991 | 720 | } | |
| 992 | 721 | ||
| 993 | - | func (obj *apiVersionTestRefPtrClientImpl) GetValueExp() int32 { | |
| 994 | - | if obj == nil || obj.rawPtr == nil { | |
| 995 | - | return 0 | |
| 996 | - | } | |
| 997 | - | rawPtr := obj.rawPtr | |
| 998 | - | ret := rawPtr.CallGetValueExp() | |
| 999 | - | return int32(ret) | |
| 1000 | - | } | |
| 1001 | - | ||
| 1002 | 722 | func (obj *apiVersionTestRefPtrClientImpl) RawPointer() unsafe.Pointer { | |
| 1003 | 723 | if obj == nil || obj.rawPtr == nil { | |
| 1004 | 724 | return nil | |
| @@ -1036,128 +756,6 @@ func wrapApiVersionTestRefPtrClient(ptr unsafe.Pointer) ApiVersionTestRefPtrClie | |||
| 1036 | 756 | return impl | |
| 1037 | 757 | } | |
| 1038 | 758 | ||
| 1039 | - | // ApiVersionTestRefPtrClientChild Client-side child test object for RefPtr. This is replaced with cef_api_version_test_ref_ptr_client_child_v2_t in version 13302. | |
| 1040 | - | type ApiVersionTestRefPtrClientChild = portin.ApiVersionTestRefPtrClientChild | |
| 1041 | - | ||
| 1042 | - | // apiVersionTestRefPtrClientChildWrapper wraps a user-provided ApiVersionTestRefPtrClientChild implementation together | |
| 1043 | - | // with the raw CEF struct pointer allocated by NewApiVersionTestRefPtrClientChild. It satisfies the | |
| 1044 | - | // ApiVersionTestRefPtrClientChild interface (by embedding the user impl) and core.RawPointerHolder | |
| 1045 | - | // (so extractRawPointer can recover the raw pointer). | |
| 1046 | - | type apiVersionTestRefPtrClientChildWrapper struct { | |
| 1047 | - | ApiVersionTestRefPtrClientChild // embed user impl for interface delegation | |
| 1048 | - | rawPtr *capi.CEFApiVersionTestRefPtrClientChildT | |
| 1049 | - | } | |
| 1050 | - | ||
| 1051 | - | func (w *apiVersionTestRefPtrClientChildWrapper) RawPointer() unsafe.Pointer { | |
| 1052 | - | return unsafe.Pointer(w.rawPtr) | |
| 1053 | - | } | |
| 1054 | - | ||
| 1055 | - | var apiVersionTestRefPtrClientChildGetOtherValueSharedOnce sync.Once | |
| 1056 | - | var apiVersionTestRefPtrClientChildGetOtherValueSharedCallback uintptr | |
| 1057 | - | ||
| 1058 | - | func apiVersionTestRefPtrClientChildGetOtherValueCEFCallback() uintptr { | |
| 1059 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientChildGetOtherValueSharedOnce, &apiVersionTestRefPtrClientChildGetOtherValueSharedCallback, func(self uintptr) uintptr { | |
| 1060 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClientChild](self) | |
| 1061 | - | if !ownerOK { | |
| 1062 | - | return 0 | |
| 1063 | - | } | |
| 1064 | - | return uintptr(impl.GetOtherValue()) | |
| 1065 | - | }) | |
| 1066 | - | } | |
| 1067 | - | ||
| 1068 | - | var apiVersionTestRefPtrClientChildGetOtherValueV1SharedOnce sync.Once | |
| 1069 | - | var apiVersionTestRefPtrClientChildGetOtherValueV1SharedCallback uintptr | |
| 1070 | - | ||
| 1071 | - | func apiVersionTestRefPtrClientChildGetOtherValueV1CEFCallback() uintptr { | |
| 1072 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientChildGetOtherValueV1SharedOnce, &apiVersionTestRefPtrClientChildGetOtherValueV1SharedCallback, func(self uintptr) uintptr { | |
| 1073 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClientChild](self) | |
| 1074 | - | if !ownerOK { | |
| 1075 | - | return 0 | |
| 1076 | - | } | |
| 1077 | - | return uintptr(impl.GetOtherValueV1()) | |
| 1078 | - | }) | |
| 1079 | - | } | |
| 1080 | - | ||
| 1081 | - | // NewApiVersionTestRefPtrClientChild creates a CEF handler backed by the given implementation. | |
| 1082 | - | func NewApiVersionTestRefPtrClientChild(impl ApiVersionTestRefPtrClientChild) ApiVersionTestRefPtrClientChild { | |
| 1083 | - | if isNilImpl(impl) { | |
| 1084 | - | return nil | |
| 1085 | - | } | |
| 1086 | - | r := new(capi.CEFApiVersionTestRefPtrClientChildT) | |
| 1087 | - | w := &apiVersionTestRefPtrClientChildWrapper{rawPtr: r} | |
| 1088 | - | w.ApiVersionTestRefPtrClientChild = impl | |
| 1089 | - | initRefCount(unsafe.Pointer(r), unsafe.Sizeof(*r), w) | |
| 1090 | - | ||
| 1091 | - | r.OverrideGetOtherValue(apiVersionTestRefPtrClientChildGetOtherValueCEFCallback()) | |
| 1092 | - | ||
| 1093 | - | r.OverrideGetOtherValueV1(apiVersionTestRefPtrClientChildGetOtherValueV1CEFCallback()) | |
| 1094 | - | ||
| 1095 | - | return w | |
| 1096 | - | } | |
| 1097 | - | ||
| 1098 | - | // apiVersionTestRefPtrClientChildImpl is a reverse wrapper for a CEF-owned ApiVersionTestRefPtrClientChild pointer. | |
| 1099 | - | // Release is idempotent, but callers must externally synchronize Release with | |
| 1100 | - | // concurrent method calls and must not use the wrapper after Release returns. | |
| 1101 | - | type apiVersionTestRefPtrClientChildImpl struct { | |
| 1102 | - | rawPtr *capi.CEFApiVersionTestRefPtrClientChildT | |
| 1103 | - | releaseOnce sync.Once | |
| 1104 | - | } | |
| 1105 | - | ||
| 1106 | - | func (obj *apiVersionTestRefPtrClientChildImpl) GetOtherValue() int32 { | |
| 1107 | - | if obj == nil || obj.rawPtr == nil { | |
| 1108 | - | return 0 | |
| 1109 | - | } | |
| 1110 | - | rawPtr := obj.rawPtr | |
| 1111 | - | ret := rawPtr.CallGetOtherValue() | |
| 1112 | - | return int32(ret) | |
| 1113 | - | } | |
| 1114 | - | ||
| 1115 | - | func (obj *apiVersionTestRefPtrClientChildImpl) GetOtherValueV1() int32 { | |
| 1116 | - | if obj == nil || obj.rawPtr == nil { | |
| 1117 | - | return 0 | |
| 1118 | - | } | |
| 1119 | - | rawPtr := obj.rawPtr | |
| 1120 | - | ret := rawPtr.CallGetOtherValueV1() | |
| 1121 | - | return int32(ret) | |
| 1122 | - | } | |
| 1123 | - | ||
| 1124 | - | func (obj *apiVersionTestRefPtrClientChildImpl) RawPointer() unsafe.Pointer { | |
| 1125 | - | if obj == nil || obj.rawPtr == nil { | |
| 1126 | - | return nil | |
| 1127 | - | } | |
| 1128 | - | return unsafe.Pointer(obj.rawPtr) | |
| 1129 | - | } | |
| 1130 | - | ||
| 1131 | - | // Release releases the underlying CEF object. | |
| 1132 | - | func (obj *apiVersionTestRefPtrClientChildImpl) Release() { | |
| 1133 | - | if obj == nil { | |
| 1134 | - | return | |
| 1135 | - | } | |
| 1136 | - | obj.releaseOnce.Do(func() { | |
| 1137 | - | if obj.rawPtr == nil { | |
| 1138 | - | return | |
| 1139 | - | } | |
| 1140 | - | rawPtr := obj.rawPtr | |
| 1141 | - | obj.rawPtr = nil | |
| 1142 | - | runtime.SetFinalizer(obj, nil) | |
| 1143 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |
| 1144 | - | base.CallRelease() | |
| 1145 | - | }) | |
| 1146 | - | } | |
| 1147 | - | ||
| 1148 | - | // wrapApiVersionTestRefPtrClientChild wraps a CEF handler pointer received from CEF into a thin Go façade. | |
| 1149 | - | func wrapApiVersionTestRefPtrClientChild(ptr unsafe.Pointer) ApiVersionTestRefPtrClientChild { | |
| 1150 | - | if ptr == nil { | |
| 1151 | - | return nil | |
| 1152 | - | } | |
| 1153 | - | r := (*capi.CEFApiVersionTestRefPtrClientChildT)(ptr) | |
| 1154 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |
| 1155 | - | base.CallAddRef() | |
| 1156 | - | impl := &apiVersionTestRefPtrClientChildImpl{rawPtr: r} | |
| 1157 | - | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrClientChildImpl).Release) | |
| 1158 | - | return impl | |
| 1159 | - | } | |
| 1160 | - | ||
| 1161 | 759 | // ApiVersionTestRefPtrClientChildV2 Client-side child test object for RefPtr. This replaces cef_api_version_test_ref_ptr_client_child_t in version 13302. | |
| 1162 | 760 | type ApiVersionTestRefPtrClientChildV2 = portin.ApiVersionTestRefPtrClientChildV2 | |
| 1163 | 761 | ||
| @@ -1307,40 +905,6 @@ func (obj *apiVersionTestScopedLibraryImpl) SetValueLegacy(value int32) { | |||
| 1307 | 905 | rawPtr.CallSetValueLegacy(uintptr(value)) | |
| 1308 | 906 | } | |
| 1309 | 907 | ||
| 1310 | - | func (obj *apiVersionTestScopedLibraryImpl) GetValue() int32 { | |
| 1311 | - | if obj == nil || obj.rawPtr == nil { | |
| 1312 | - | return 0 | |
| 1313 | - | } | |
| 1314 | - | rawPtr := obj.rawPtr | |
| 1315 | - | ret := rawPtr.CallGetValue() | |
| 1316 | - | return int32(ret) | |
| 1317 | - | } | |
| 1318 | - | ||
| 1319 | - | func (obj *apiVersionTestScopedLibraryImpl) SetValue(value int32) { | |
| 1320 | - | if obj == nil || obj.rawPtr == nil { | |
| 1321 | - | return | |
| 1322 | - | } | |
| 1323 | - | rawPtr := obj.rawPtr | |
| 1324 | - | rawPtr.CallSetValue(uintptr(value)) | |
| 1325 | - | } | |
| 1326 | - | ||
| 1327 | - | func (obj *apiVersionTestScopedLibraryImpl) GetValueV1() int32 { | |
| 1328 | - | if obj == nil || obj.rawPtr == nil { | |
| 1329 | - | return 0 | |
| 1330 | - | } | |
| 1331 | - | rawPtr := obj.rawPtr | |
| 1332 | - | ret := rawPtr.CallGetValueV1() | |
| 1333 | - | return int32(ret) | |
| 1334 | - | } | |
| 1335 | - | ||
| 1336 | - | func (obj *apiVersionTestScopedLibraryImpl) SetValueV1(value int32) { | |
| 1337 | - | if obj == nil || obj.rawPtr == nil { | |
| 1338 | - | return | |
| 1339 | - | } | |
| 1340 | - | rawPtr := obj.rawPtr | |
| 1341 | - | rawPtr.CallSetValueV1(uintptr(value)) | |
| 1342 | - | } | |
| 1343 | - | ||
| 1344 | 908 | func (obj *apiVersionTestScopedLibraryImpl) GetValueV2() int32 { | |
| 1345 | 909 | if obj == nil || obj.rawPtr == nil { | |
| 1346 | 910 | return 0 | |
| @@ -1358,23 +922,6 @@ func (obj *apiVersionTestScopedLibraryImpl) SetValueV2(value int32) { | |||
| 1358 | 922 | rawPtr.CallSetValueV2(uintptr(value)) | |
| 1359 | 923 | } | |
| 1360 | 924 | ||
| 1361 | - | func (obj *apiVersionTestScopedLibraryImpl) GetValueExp() int32 { | |
| 1362 | - | if obj == nil || obj.rawPtr == nil { | |
| 1363 | - | return 0 | |
| 1364 | - | } | |
| 1365 | - | rawPtr := obj.rawPtr | |
| 1366 | - | ret := rawPtr.CallGetValueExp() | |
| 1367 | - | return int32(ret) | |
| 1368 | - | } | |
| 1369 | - | ||
| 1370 | - | func (obj *apiVersionTestScopedLibraryImpl) SetValueExp(value int32) { | |
| 1371 | - | if obj == nil || obj.rawPtr == nil { | |
| 1372 | - | return | |
| 1373 | - | } | |
| 1374 | - | rawPtr := obj.rawPtr | |
| 1375 | - | rawPtr.CallSetValueExp(uintptr(value)) | |
| 1376 | - | } | |
| 1377 | - | ||
| 1378 | 925 | func (obj *apiVersionTestScopedLibraryImpl) RawPointer() unsafe.Pointer { | |
| 1379 | 926 | if obj == nil || obj.rawPtr == nil { | |
| 1380 | 927 | return nil | |
| @@ -1454,131 +1001,16 @@ func wrapApiVersionTestScopedLibraryChild(ptr unsafe.Pointer) ApiVersionTestScop | |||
| 1454 | 1001 | return impl | |
| 1455 | 1002 | } | |
| 1456 | 1003 | ||
| 1457 | - | // ApiVersionTestScopedLibraryChildChild Another library-side child test object for OwnPtr/RawPtr. This is replaced by cef_api_version_test_scoped_library_child_child_v1_t in version 13301. | |
| 1458 | - | type ApiVersionTestScopedLibraryChildChild = portin.ApiVersionTestScopedLibraryChildChild | |
| 1459 | - | ||
| 1460 | - | // apiVersionTestScopedLibraryChildChildImpl is a reverse wrapper for a CEF-owned ApiVersionTestScopedLibraryChildChild pointer. | |
| 1461 | - | // Release is idempotent, but callers must externally synchronize Release with | |
| 1462 | - | // concurrent method calls and must not use the wrapper after Release returns. | |
| 1463 | - | type apiVersionTestScopedLibraryChildChildImpl struct { | |
| 1464 | - | rawPtr *capi.CEFApiVersionTestScopedLibraryChildChildT | |
| 1465 | - | releaseOnce sync.Once | |
| 1466 | - | } | |
| 1467 | - | ||
| 1468 | - | func (obj *apiVersionTestScopedLibraryChildChildImpl) GetOtherOtherValue() int32 { | |
| 1469 | - | if obj == nil || obj.rawPtr == nil { | |
| 1470 | - | return 0 | |
| 1471 | - | } | |
| 1472 | - | rawPtr := obj.rawPtr | |
| 1473 | - | ret := rawPtr.CallGetOtherOtherValue() | |
| 1474 | - | return int32(ret) | |
| 1475 | - | } | |
| 1476 | - | ||
| 1477 | - | func (obj *apiVersionTestScopedLibraryChildChildImpl) SetOtherOtherValue(value int32) { | |
| 1478 | - | if obj == nil || obj.rawPtr == nil { | |
| 1479 | - | return | |
| 1480 | - | } | |
| 1481 | - | rawPtr := obj.rawPtr | |
| 1482 | - | rawPtr.CallSetOtherOtherValue(uintptr(value)) | |
| 1483 | - | } | |
| 1484 | - | ||
| 1485 | - | func (obj *apiVersionTestScopedLibraryChildChildImpl) RawPointer() unsafe.Pointer { | |
| 1486 | - | if obj == nil || obj.rawPtr == nil { | |
| 1487 | - | return nil | |
| 1488 | - | } | |
| 1489 | - | return unsafe.Pointer(obj.rawPtr) | |
| 1490 | - | } | |
| 1491 | - | ||
| 1492 | - | // Release releases the underlying CEF object. | |
| 1493 | - | func (obj *apiVersionTestScopedLibraryChildChildImpl) Release() { | |
| 1494 | - | if obj == nil { | |
| 1495 | - | return | |
| 1496 | - | } | |
| 1497 | - | obj.releaseOnce.Do(func() { | |
| 1498 | - | if obj.rawPtr == nil { | |
| 1499 | - | return | |
| 1500 | - | } | |
| 1501 | - | rawPtr := obj.rawPtr | |
| 1502 | - | obj.rawPtr = nil | |
| 1503 | - | runtime.SetFinalizer(obj, nil) | |
| 1504 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |
| 1505 | - | base.CallRelease() | |
| 1506 | - | }) | |
| 1507 | - | } | |
| 1508 | - | ||
| 1509 | - | func wrapApiVersionTestScopedLibraryChildChild(ptr unsafe.Pointer) ApiVersionTestScopedLibraryChildChild { | |
| 1004 | + | // takeApiVersionTestScopedLibraryChild adopts a CEF ApiVersionTestScopedLibraryChild pointer whose reference is already owned by | |
| 1005 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestScopedLibraryChild it | |
| 1006 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 1007 | + | func takeApiVersionTestScopedLibraryChild(ptr unsafe.Pointer) ApiVersionTestScopedLibraryChild { | |
| 1510 | 1008 | if ptr == nil { | |
| 1511 | 1009 | return nil | |
| 1512 | 1010 | } | |
| 1513 | - | r := (*capi.CEFApiVersionTestScopedLibraryChildChildT)(ptr) | |
| 1514 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |
| 1515 | - | base.CallAddRef() | |
| 1516 | - | impl := &apiVersionTestScopedLibraryChildChildImpl{rawPtr: r} | |
| 1517 | - | runtime.SetFinalizer(impl, (*apiVersionTestScopedLibraryChildChildImpl).Release) | |
| 1518 | - | return impl | |
| 1519 | - | } | |
| 1520 | - | ||
| 1521 | - | // ApiVersionTestScopedLibraryChildChildV1 Another library-side child test object for OwnPtr/RawPtr. This replaces cef_api_version_test_scoped_library_child_child_t in version 13301 and is replaced by cef_api_version_test_scoped_library_child_child_v2_t in version 13302. | |
| 1522 | - | type ApiVersionTestScopedLibraryChildChildV1 = portin.ApiVersionTestScopedLibraryChildChildV1 | |
| 1523 | - | ||
| 1524 | - | // apiVersionTestScopedLibraryChildChildV1Impl is a reverse wrapper for a CEF-owned ApiVersionTestScopedLibraryChildChildV1 pointer. | |
| 1525 | - | // Release is idempotent, but callers must externally synchronize Release with | |
| 1526 | - | // concurrent method calls and must not use the wrapper after Release returns. | |
| 1527 | - | type apiVersionTestScopedLibraryChildChildV1Impl struct { | |
| 1528 | - | rawPtr *capi.CEFApiVersionTestScopedLibraryChildChildV1T | |
| 1529 | - | releaseOnce sync.Once | |
| 1530 | - | } | |
| 1531 | - | ||
| 1532 | - | func (obj *apiVersionTestScopedLibraryChildChildV1Impl) GetOtherOtherValue() int32 { | |
| 1533 | - | if obj == nil || obj.rawPtr == nil { | |
| 1534 | - | return 0 | |
| 1535 | - | } | |
| 1536 | - | rawPtr := obj.rawPtr | |
| 1537 | - | ret := rawPtr.CallGetOtherOtherValue() | |
| 1538 | - | return int32(ret) | |
| 1539 | - | } | |
| 1540 | - | ||
| 1541 | - | func (obj *apiVersionTestScopedLibraryChildChildV1Impl) SetOtherOtherValue(value int32) { | |
| 1542 | - | if obj == nil || obj.rawPtr == nil { | |
| 1543 | - | return | |
| 1544 | - | } | |
| 1545 | - | rawPtr := obj.rawPtr | |
| 1546 | - | rawPtr.CallSetOtherOtherValue(uintptr(value)) | |
| 1547 | - | } | |
| 1548 | - | ||
| 1549 | - | func (obj *apiVersionTestScopedLibraryChildChildV1Impl) RawPointer() unsafe.Pointer { | |
| 1550 | - | if obj == nil || obj.rawPtr == nil { | |
| 1551 | - | return nil | |
| 1552 | - | } | |
| 1553 | - | return unsafe.Pointer(obj.rawPtr) | |
| 1554 | - | } | |
| 1555 | - | ||
| 1556 | - | // Release releases the underlying CEF object. | |
| 1557 | - | func (obj *apiVersionTestScopedLibraryChildChildV1Impl) Release() { | |
| 1558 | - | if obj == nil { | |
| 1559 | - | return | |
| 1560 | - | } | |
| 1561 | - | obj.releaseOnce.Do(func() { | |
| 1562 | - | if obj.rawPtr == nil { | |
| 1563 | - | return | |
| 1564 | - | } | |
| 1565 | - | rawPtr := obj.rawPtr | |
| 1566 | - | obj.rawPtr = nil | |
| 1567 | - | runtime.SetFinalizer(obj, nil) | |
| 1568 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |
| 1569 | - | base.CallRelease() | |
| 1570 | - | }) | |
| 1571 | - | } | |
| 1572 | - | ||
| 1573 | - | func wrapApiVersionTestScopedLibraryChildChildV1(ptr unsafe.Pointer) ApiVersionTestScopedLibraryChildChildV1 { | |
| 1574 | - | if ptr == nil { | |
| 1575 | - | return nil | |
| 1576 | - | } | |
| 1577 | - | r := (*capi.CEFApiVersionTestScopedLibraryChildChildV1T)(ptr) | |
| 1578 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |
| 1579 | - | base.CallAddRef() | |
| 1580 | - | impl := &apiVersionTestScopedLibraryChildChildV1Impl{rawPtr: r} | |
| 1581 | - | runtime.SetFinalizer(impl, (*apiVersionTestScopedLibraryChildChildV1Impl).Release) | |
| 1011 | + | r := (*capi.CEFApiVersionTestScopedLibraryChildT)(ptr) | |
| 1012 | + | impl := &apiVersionTestScopedLibraryChildImpl{rawPtr: r} | |
| 1013 | + | runtime.SetFinalizer(impl, (*apiVersionTestScopedLibraryChildImpl).Release) | |
| 1582 | 1014 | return impl | |
| 1583 | 1015 | } | |
| 1584 | 1016 | ||
| @@ -1646,6 +1078,19 @@ func wrapApiVersionTestScopedLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionT | |||
| 1646 | 1078 | return impl | |
| 1647 | 1079 | } | |
| 1648 | 1080 | ||
| 1081 | + | // takeApiVersionTestScopedLibraryChildChildV2 adopts a CEF ApiVersionTestScopedLibraryChildChildV2 pointer whose reference is already owned by | |
| 1082 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestScopedLibraryChildChildV2 it | |
| 1083 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 1084 | + | func takeApiVersionTestScopedLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionTestScopedLibraryChildChildV2 { | |
| 1085 | + | if ptr == nil { | |
| 1086 | + | return nil | |
| 1087 | + | } | |
| 1088 | + | r := (*capi.CEFApiVersionTestScopedLibraryChildChildV2T)(ptr) | |
| 1089 | + | impl := &apiVersionTestScopedLibraryChildChildV2Impl{rawPtr: r} | |
| 1090 | + | runtime.SetFinalizer(impl, (*apiVersionTestScopedLibraryChildChildV2Impl).Release) | |
| 1091 | + | return impl | |
| 1092 | + | } | |
| 1093 | + | ||
| 1649 | 1094 | // ApiVersionTestScopedClient Client-side test object for OwnPtr/RawPtr. | |
| 1650 | 1095 | type ApiVersionTestScopedClient = portin.ApiVersionTestScopedClient | |
| 1651 | 1096 | ||
| @@ -1675,32 +1120,6 @@ func apiVersionTestScopedClientGetValueLegacyCEFCallback() uintptr { | |||
| 1675 | 1120 | }) | |
| 1676 | 1121 | } | |
| 1677 | 1122 | ||
| 1678 | - | var apiVersionTestScopedClientGetValueSharedOnce sync.Once | |
| 1679 | - | var apiVersionTestScopedClientGetValueSharedCallback uintptr | |
| 1680 | - | ||
| 1681 | - | func apiVersionTestScopedClientGetValueCEFCallback() uintptr { | |
| 1682 | - | return sharedCEFCallback(&apiVersionTestScopedClientGetValueSharedOnce, &apiVersionTestScopedClientGetValueSharedCallback, func(self uintptr) uintptr { | |
| 1683 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClient](self) | |
| 1684 | - | if !ownerOK { | |
| 1685 | - | return 0 | |
| 1686 | - | } | |
| 1687 | - | return uintptr(impl.GetValue()) | |
| 1688 | - | }) | |
| 1689 | - | } | |
| 1690 | - | ||
| 1691 | - | var apiVersionTestScopedClientGetValueV1SharedOnce sync.Once | |
| 1692 | - | var apiVersionTestScopedClientGetValueV1SharedCallback uintptr | |
| 1693 | - | ||
| 1694 | - | func apiVersionTestScopedClientGetValueV1CEFCallback() uintptr { | |
| 1695 | - | return sharedCEFCallback(&apiVersionTestScopedClientGetValueV1SharedOnce, &apiVersionTestScopedClientGetValueV1SharedCallback, func(self uintptr) uintptr { | |
| 1696 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClient](self) | |
| 1697 | - | if !ownerOK { | |
| 1698 | - | return 0 | |
| 1699 | - | } | |
| 1700 | - | return uintptr(impl.GetValueV1()) | |
| 1701 | - | }) | |
| 1702 | - | } | |
| 1703 | - | ||
| 1704 | 1123 | var apiVersionTestScopedClientGetValueV2SharedOnce sync.Once | |
| 1705 | 1124 | var apiVersionTestScopedClientGetValueV2SharedCallback uintptr | |
| 1706 | 1125 | ||
| @@ -1714,19 +1133,6 @@ func apiVersionTestScopedClientGetValueV2CEFCallback() uintptr { | |||
| 1714 | 1133 | }) | |
| 1715 | 1134 | } | |
| 1716 | 1135 | ||
| 1717 | - | var apiVersionTestScopedClientGetValueExpSharedOnce sync.Once | |
| 1718 | - | var apiVersionTestScopedClientGetValueExpSharedCallback uintptr | |
| 1719 | - | ||
| 1720 | - | func apiVersionTestScopedClientGetValueExpCEFCallback() uintptr { | |
| 1721 | - | return sharedCEFCallback(&apiVersionTestScopedClientGetValueExpSharedOnce, &apiVersionTestScopedClientGetValueExpSharedCallback, func(self uintptr) uintptr { | |
| 1722 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClient](self) | |
| 1723 | - | if !ownerOK { | |
| 1724 | - | return 0 | |
| 1725 | - | } | |
| 1726 | - | return uintptr(impl.GetValueExp()) | |
| 1727 | - | }) | |
| 1728 | - | } | |
| 1729 | - | ||
| 1730 | 1136 | // NewApiVersionTestScopedClient creates a CEF handler backed by the given implementation. | |
| 1731 | 1137 | func NewApiVersionTestScopedClient(impl ApiVersionTestScopedClient) ApiVersionTestScopedClient { | |
| 1732 | 1138 | if isNilImpl(impl) { | |
| @@ -1739,14 +1145,8 @@ func NewApiVersionTestScopedClient(impl ApiVersionTestScopedClient) ApiVersionTe | |||
| 1739 | 1145 | ||
| 1740 | 1146 | r.OverrideGetValueLegacy(apiVersionTestScopedClientGetValueLegacyCEFCallback()) | |
| 1741 | 1147 | ||
| 1742 | - | r.OverrideGetValue(apiVersionTestScopedClientGetValueCEFCallback()) | |
| 1743 | - | ||
| 1744 | - | r.OverrideGetValueV1(apiVersionTestScopedClientGetValueV1CEFCallback()) | |
| 1745 | - | ||
| 1746 | 1148 | r.OverrideGetValueV2(apiVersionTestScopedClientGetValueV2CEFCallback()) | |
| 1747 | 1149 | ||
| 1748 | - | r.OverrideGetValueExp(apiVersionTestScopedClientGetValueExpCEFCallback()) | |
| 1749 | - | ||
| 1750 | 1150 | return w | |
| 1751 | 1151 | } | |
| 1752 | 1152 | ||
| @@ -1766,24 +1166,6 @@ func (obj *apiVersionTestScopedClientImpl) GetValueLegacy() int32 { | |||
| 1766 | 1166 | return int32(ret) | |
| 1767 | 1167 | } | |
| 1768 | 1168 | ||
| 1769 | - | func (obj *apiVersionTestScopedClientImpl) GetValue() int32 { | |
| 1770 | - | if obj == nil || obj.rawPtr == nil { | |
| 1771 | - | return 0 | |
| 1772 | - | } | |
| 1773 | - | rawPtr := obj.rawPtr | |
| 1774 | - | ret := rawPtr.CallGetValue() | |
| 1775 | - | return int32(ret) | |
| 1776 | - | } | |
| 1777 | - | ||
| 1778 | - | func (obj *apiVersionTestScopedClientImpl) GetValueV1() int32 { | |
| 1779 | - | if obj == nil || obj.rawPtr == nil { | |
| 1780 | - | return 0 | |
| 1781 | - | } | |
| 1782 | - | rawPtr := obj.rawPtr | |
| 1783 | - | ret := rawPtr.CallGetValueV1() | |
| 1784 | - | return int32(ret) | |
| 1785 | - | } | |
| 1786 | - | ||
| 1787 | 1169 | func (obj *apiVersionTestScopedClientImpl) GetValueV2() int32 { | |
| 1788 | 1170 | if obj == nil || obj.rawPtr == nil { | |
| 1789 | 1171 | return 0 | |
| @@ -1793,15 +1175,6 @@ func (obj *apiVersionTestScopedClientImpl) GetValueV2() int32 { | |||
| 1793 | 1175 | return int32(ret) | |
| 1794 | 1176 | } | |
| 1795 | 1177 | ||
| 1796 | - | func (obj *apiVersionTestScopedClientImpl) GetValueExp() int32 { | |
| 1797 | - | if obj == nil || obj.rawPtr == nil { | |
| 1798 | - | return 0 | |
| 1799 | - | } | |
| 1800 | - | rawPtr := obj.rawPtr | |
| 1801 | - | ret := rawPtr.CallGetValueExp() | |
| 1802 | - | return int32(ret) | |
| 1803 | - | } | |
| 1804 | - | ||
| 1805 | 1178 | func (obj *apiVersionTestScopedClientImpl) RawPointer() unsafe.Pointer { | |
| 1806 | 1179 | if obj == nil || obj.rawPtr == nil { | |
| 1807 | 1180 | return nil | |
| @@ -1817,128 +1190,6 @@ func wrapApiVersionTestScopedClient(ptr unsafe.Pointer) ApiVersionTestScopedClie | |||
| 1817 | 1190 | return &apiVersionTestScopedClientImpl{rawPtr: r} | |
| 1818 | 1191 | } | |
| 1819 | 1192 | ||
| 1820 | - | // ApiVersionTestScopedClientChild Client-side child test object for OwnPtr/RawPtr. This is replaced with cef_api_version_test_scoped_client_child_v2_t in version 13302. | |
| 1821 | - | type ApiVersionTestScopedClientChild = portin.ApiVersionTestScopedClientChild | |
| 1822 | - | ||
| 1823 | - | // apiVersionTestScopedClientChildWrapper wraps a user-provided ApiVersionTestScopedClientChild implementation together | |
| 1824 | - | // with the raw CEF struct pointer allocated by NewApiVersionTestScopedClientChild. It satisfies the | |
| 1825 | - | // ApiVersionTestScopedClientChild interface (by embedding the user impl) and core.RawPointerHolder | |
| 1826 | - | // (so extractRawPointer can recover the raw pointer). | |
| 1827 | - | type apiVersionTestScopedClientChildWrapper struct { | |
| 1828 | - | ApiVersionTestScopedClientChild // embed user impl for interface delegation | |
| 1829 | - | rawPtr *capi.CEFApiVersionTestScopedClientChildT | |
| 1830 | - | } | |
| 1831 | - | ||
| 1832 | - | func (w *apiVersionTestScopedClientChildWrapper) RawPointer() unsafe.Pointer { | |
| 1833 | - | return unsafe.Pointer(w.rawPtr) | |
| 1834 | - | } | |
| 1835 | - | ||
| 1836 | - | var apiVersionTestScopedClientChildGetOtherValueSharedOnce sync.Once | |
| 1837 | - | var apiVersionTestScopedClientChildGetOtherValueSharedCallback uintptr | |
| 1838 | - | ||
| 1839 | - | func apiVersionTestScopedClientChildGetOtherValueCEFCallback() uintptr { | |
| 1840 | - | return sharedCEFCallback(&apiVersionTestScopedClientChildGetOtherValueSharedOnce, &apiVersionTestScopedClientChildGetOtherValueSharedCallback, func(self uintptr) uintptr { | |
| 1841 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClientChild](self) | |
| 1842 | - | if !ownerOK { | |
| 1843 | - | return 0 | |
| 1844 | - | } | |
| 1845 | - | return uintptr(impl.GetOtherValue()) | |
| 1846 | - | }) | |
| 1847 | - | } | |
| 1848 | - | ||
| 1849 | - | var apiVersionTestScopedClientChildGetOtherValueV1SharedOnce sync.Once | |
| 1850 | - | var apiVersionTestScopedClientChildGetOtherValueV1SharedCallback uintptr | |
| 1851 | - | ||
| 1852 | - | func apiVersionTestScopedClientChildGetOtherValueV1CEFCallback() uintptr { | |
| 1853 | - | return sharedCEFCallback(&apiVersionTestScopedClientChildGetOtherValueV1SharedOnce, &apiVersionTestScopedClientChildGetOtherValueV1SharedCallback, func(self uintptr) uintptr { | |
| 1854 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClientChild](self) | |
| 1855 | - | if !ownerOK { | |
| 1856 | - | return 0 | |
| 1857 | - | } | |
| 1858 | - | return uintptr(impl.GetOtherValueV1()) | |
| 1859 | - | }) | |
| 1860 | - | } | |
| 1861 | - | ||
| 1862 | - | // NewApiVersionTestScopedClientChild creates a CEF handler backed by the given implementation. | |
| 1863 | - | func NewApiVersionTestScopedClientChild(impl ApiVersionTestScopedClientChild) ApiVersionTestScopedClientChild { | |
| 1864 | - | if isNilImpl(impl) { | |
| 1865 | - | return nil | |
| 1866 | - | } | |
| 1867 | - | r := new(capi.CEFApiVersionTestScopedClientChildT) | |
| 1868 | - | w := &apiVersionTestScopedClientChildWrapper{rawPtr: r} | |
| 1869 | - | w.ApiVersionTestScopedClientChild = impl | |
| 1870 | - | initRefCount(unsafe.Pointer(r), unsafe.Sizeof(*r), w) | |
| 1871 | - | ||
| 1872 | - | r.OverrideGetOtherValue(apiVersionTestScopedClientChildGetOtherValueCEFCallback()) | |
| 1873 | - | ||
| 1874 | - | r.OverrideGetOtherValueV1(apiVersionTestScopedClientChildGetOtherValueV1CEFCallback()) | |
| 1875 | - | ||
| 1876 | - | return w | |
| 1877 | - | } | |
| 1878 | - | ||
| 1879 | - | // apiVersionTestScopedClientChildImpl is a reverse wrapper for a CEF-owned ApiVersionTestScopedClientChild pointer. | |
| 1880 | - | // Release is idempotent, but callers must externally synchronize Release with | |
| 1881 | - | // concurrent method calls and must not use the wrapper after Release returns. | |
| 1882 | - | type apiVersionTestScopedClientChildImpl struct { | |
| 1883 | - | rawPtr *capi.CEFApiVersionTestScopedClientChildT | |
| 1884 | - | releaseOnce sync.Once | |
| 1885 | - | } | |
| 1886 | - | ||
| 1887 | - | func (obj *apiVersionTestScopedClientChildImpl) GetOtherValue() int32 { | |
| 1888 | - | if obj == nil || obj.rawPtr == nil { | |
| 1889 | - | return 0 | |
| 1890 | - | } | |
| 1891 | - | rawPtr := obj.rawPtr | |
| 1892 | - | ret := rawPtr.CallGetOtherValue() | |
| 1893 | - | return int32(ret) | |
| 1894 | - | } | |
| 1895 | - | ||
| 1896 | - | func (obj *apiVersionTestScopedClientChildImpl) GetOtherValueV1() int32 { | |
| 1897 | - | if obj == nil || obj.rawPtr == nil { | |
| 1898 | - | return 0 | |
| 1899 | - | } | |
| 1900 | - | rawPtr := obj.rawPtr | |
| 1901 | - | ret := rawPtr.CallGetOtherValueV1() | |
| 1902 | - | return int32(ret) | |
| 1903 | - | } | |
| 1904 | - | ||
| 1905 | - | func (obj *apiVersionTestScopedClientChildImpl) RawPointer() unsafe.Pointer { | |
| 1906 | - | if obj == nil || obj.rawPtr == nil { | |
| 1907 | - | return nil | |
| 1908 | - | } | |
| 1909 | - | return unsafe.Pointer(obj.rawPtr) | |
| 1910 | - | } | |
| 1911 | - | ||
| 1912 | - | // Release releases the underlying CEF object. | |
| 1913 | - | func (obj *apiVersionTestScopedClientChildImpl) Release() { | |
| 1914 | - | if obj == nil { | |
| 1915 | - | return | |
| 1916 | - | } | |
| 1917 | - | obj.releaseOnce.Do(func() { | |
| 1918 | - | if obj.rawPtr == nil { | |
| 1919 | - | return | |
| 1920 | - | } | |
| 1921 | - | rawPtr := obj.rawPtr | |
| 1922 | - | obj.rawPtr = nil | |
| 1923 | - | runtime.SetFinalizer(obj, nil) | |
| 1924 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |
| 1925 | - | base.CallRelease() | |
| 1926 | - | }) | |
| 1927 | - | } | |
| 1928 | - | ||
| 1929 | - | // wrapApiVersionTestScopedClientChild wraps a CEF handler pointer received from CEF into a thin Go façade. | |
| 1930 | - | func wrapApiVersionTestScopedClientChild(ptr unsafe.Pointer) ApiVersionTestScopedClientChild { | |
| 1931 | - | if ptr == nil { | |
| 1932 | - | return nil | |
| 1933 | - | } | |
| 1934 | - | r := (*capi.CEFApiVersionTestScopedClientChildT)(ptr) | |
| 1935 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |
| 1936 | - | base.CallAddRef() | |
| 1937 | - | impl := &apiVersionTestScopedClientChildImpl{rawPtr: r} | |
| 1938 | - | runtime.SetFinalizer(impl, (*apiVersionTestScopedClientChildImpl).Release) | |
| 1939 | - | return impl | |
| 1940 | - | } | |
| 1941 | - | ||
| 1942 | 1193 | // ApiVersionTestScopedClientChildV2 Client-side child test object for OwnPtr/RawPtr. This replaces cef_api_version_test_scoped_client_child_t in version 13302. | |
| 1943 | 1194 | type ApiVersionTestScopedClientChildV2 = portin.ApiVersionTestScopedClientChildV2 | |
| 1944 | 1195 | ||
| @@ -2064,61 +1315,43 @@ func wrapApiVersionTestScopedClientChildV2(ptr unsafe.Pointer) ApiVersionTestSco | |||
| 2064 | 1315 | // ApiVersionTestCreate Create the test object. | |
| 2065 | 1316 | func ApiVersionTestCreate() ApiVersionTest { | |
| 2066 | 1317 | ret := capi.CEFApiVersionTestCreate() | |
| 2067 | - | return wrapApiVersionTest(ret) | |
| 1318 | + | return takeApiVersionTest(ret) | |
| 2068 | 1319 | } | |
| 2069 | 1320 | ||
| 2070 | 1321 | // ApiVersionTestRefPtrLibraryCreate Create the test object. | |
| 2071 | 1322 | func ApiVersionTestRefPtrLibraryCreate() ApiVersionTestRefPtrLibrary { | |
| 2072 | 1323 | ret := capi.CEFApiVersionTestRefPtrLibraryCreate() | |
| 2073 | - | return wrapApiVersionTestRefPtrLibrary(ret) | |
| 1324 | + | return takeApiVersionTestRefPtrLibrary(ret) | |
| 2074 | 1325 | } | |
| 2075 | 1326 | ||
| 2076 | 1327 | // ApiVersionTestRefPtrLibraryCreateWithDefault Create the test object with default value. | |
| 2077 | 1328 | func ApiVersionTestRefPtrLibraryCreateWithDefault(value int32) ApiVersionTestRefPtrLibrary { | |
| 2078 | 1329 | ret := capi.CEFApiVersionTestRefPtrLibraryCreateWithDefault(value) | |
| 2079 | - | return wrapApiVersionTestRefPtrLibrary(ret) | |
| 1330 | + | return takeApiVersionTestRefPtrLibrary(ret) | |
| 2080 | 1331 | } | |
| 2081 | 1332 | ||
| 2082 | 1333 | // ApiVersionTestRefPtrLibraryChildCreate Create the test object. | |
| 2083 | 1334 | func ApiVersionTestRefPtrLibraryChildCreate() ApiVersionTestRefPtrLibraryChild { | |
| 2084 | 1335 | ret := capi.CEFApiVersionTestRefPtrLibraryChildCreate() | |
| 2085 | - | return wrapApiVersionTestRefPtrLibraryChild(ret) | |
| 1336 | + | return takeApiVersionTestRefPtrLibraryChild(ret) | |
| 2086 | 1337 | } | |
| 2087 | 1338 | ||
| 2088 | 1339 | // ApiVersionTestRefPtrLibraryChildCreateWithDefault Create the test object with default value. | |
| 2089 | 1340 | func ApiVersionTestRefPtrLibraryChildCreateWithDefault(value int32, otherValue int32) ApiVersionTestRefPtrLibraryChild { | |
| 2090 | 1341 | ret := capi.CEFApiVersionTestRefPtrLibraryChildCreateWithDefault(value, otherValue) | |
| 2091 | - | return wrapApiVersionTestRefPtrLibraryChild(ret) | |
| 2092 | - | } | |
| 2093 | - | ||
| 2094 | - | // ApiVersionTestRefPtrLibraryChildChildCreate Create the test object. | |
| 2095 | - | func ApiVersionTestRefPtrLibraryChildChildCreate() ApiVersionTestRefPtrLibraryChildChild { | |
| 2096 | - | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildCreate() | |
| 2097 | - | return wrapApiVersionTestRefPtrLibraryChildChild(ret) | |
| 2098 | - | } | |
| 2099 | - | ||
| 2100 | - | // ApiVersionTestRefPtrLibraryChildChildV1Create Create the test object. | |
| 2101 | - | func ApiVersionTestRefPtrLibraryChildChildV1Create() ApiVersionTestRefPtrLibraryChildChildV1 { | |
| 2102 | - | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV1Create() | |
| 2103 | - | return wrapApiVersionTestRefPtrLibraryChildChildV1(ret) | |
| 2104 | - | } | |
| 2105 | - | ||
| 2106 | - | // ApiVersionTestRefPtrLibraryChildChildV1CreateWithDefault Create the test object with default value. | |
| 2107 | - | func ApiVersionTestRefPtrLibraryChildChildV1CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestRefPtrLibraryChildChildV1 { | |
| 2108 | - | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV1CreateWithDefault(value, otherValue, otherOtherValue) | |
| 2109 | - | return wrapApiVersionTestRefPtrLibraryChildChildV1(ret) | |
| 1342 | + | return takeApiVersionTestRefPtrLibraryChild(ret) | |
| 2110 | 1343 | } | |
| 2111 | 1344 | ||
| 2112 | 1345 | // ApiVersionTestRefPtrLibraryChildChildV2Create Create the test object. | |
| 2113 | 1346 | func ApiVersionTestRefPtrLibraryChildChildV2Create() ApiVersionTestRefPtrLibraryChildChildV2 { | |
| 2114 | 1347 | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV2Create() | |
| 2115 | - | return wrapApiVersionTestRefPtrLibraryChildChildV2(ret) | |
| 1348 | + | return takeApiVersionTestRefPtrLibraryChildChildV2(ret) | |
| 2116 | 1349 | } | |
| 2117 | 1350 | ||
| 2118 | 1351 | // ApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault Create the test object with default value. | |
| 2119 | 1352 | func ApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestRefPtrLibraryChildChildV2 { | |
| 2120 | 1353 | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault(value, otherValue, otherOtherValue) | |
| 2121 | - | return wrapApiVersionTestRefPtrLibraryChildChildV2(ret) | |
| 1354 | + | return takeApiVersionTestRefPtrLibraryChildChildV2(ret) | |
| 2122 | 1355 | } | |
| 2123 | 1356 | ||
| 2124 | 1357 | // ApiVersionTestScopedLibraryCreate Create the test object. | |
| @@ -2136,41 +1369,23 @@ func ApiVersionTestScopedLibraryCreateWithDefault(value int32) ApiVersionTestSco | |||
| 2136 | 1369 | // ApiVersionTestScopedLibraryChildCreate Create the test object. | |
| 2137 | 1370 | func ApiVersionTestScopedLibraryChildCreate() ApiVersionTestScopedLibraryChild { | |
| 2138 | 1371 | ret := capi.CEFApiVersionTestScopedLibraryChildCreate() | |
| 2139 | - | return wrapApiVersionTestScopedLibraryChild(ret) | |
| 1372 | + | return takeApiVersionTestScopedLibraryChild(ret) | |
| 2140 | 1373 | } | |
| 2141 | 1374 | ||
| 2142 | 1375 | // ApiVersionTestScopedLibraryChildCreateWithDefault Create the test object with default value. | |
| 2143 | 1376 | func ApiVersionTestScopedLibraryChildCreateWithDefault(value int32, otherValue int32) ApiVersionTestScopedLibraryChild { | |
| 2144 | 1377 | ret := capi.CEFApiVersionTestScopedLibraryChildCreateWithDefault(value, otherValue) | |
| 2145 | - | return wrapApiVersionTestScopedLibraryChild(ret) | |
| 2146 | - | } | |
| 2147 | - | ||
| 2148 | - | // ApiVersionTestScopedLibraryChildChildCreate Create the test object. | |
| 2149 | - | func ApiVersionTestScopedLibraryChildChildCreate() ApiVersionTestScopedLibraryChildChild { | |
| 2150 | - | ret := capi.CEFApiVersionTestScopedLibraryChildChildCreate() | |
| 2151 | - | return wrapApiVersionTestScopedLibraryChildChild(ret) | |
| 2152 | - | } | |
| 2153 | - | ||
| 2154 | - | // ApiVersionTestScopedLibraryChildChildV1Create Create the test object. | |
| 2155 | - | func ApiVersionTestScopedLibraryChildChildV1Create() ApiVersionTestScopedLibraryChildChildV1 { | |
| 2156 | - | ret := capi.CEFApiVersionTestScopedLibraryChildChildV1Create() | |
| 2157 | - | return wrapApiVersionTestScopedLibraryChildChildV1(ret) | |
| 2158 | - | } | |
| 2159 | - | ||
| 2160 | - | // ApiVersionTestScopedLibraryChildChildV1CreateWithDefault Create the test object with default value. | |
| 2161 | - | func ApiVersionTestScopedLibraryChildChildV1CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestScopedLibraryChildChildV1 { | |
| 2162 | - | ret := capi.CEFApiVersionTestScopedLibraryChildChildV1CreateWithDefault(value, otherValue, otherOtherValue) | |
| 2163 | - | return wrapApiVersionTestScopedLibraryChildChildV1(ret) | |
| 1378 | + | return takeApiVersionTestScopedLibraryChild(ret) | |
| 2164 | 1379 | } | |
| 2165 | 1380 | ||
| 2166 | 1381 | // ApiVersionTestScopedLibraryChildChildV2Create Create the test object. | |
| 2167 | 1382 | func ApiVersionTestScopedLibraryChildChildV2Create() ApiVersionTestScopedLibraryChildChildV2 { | |
| 2168 | 1383 | ret := capi.CEFApiVersionTestScopedLibraryChildChildV2Create() | |
| 2169 | - | return wrapApiVersionTestScopedLibraryChildChildV2(ret) | |
| 1384 | + | return takeApiVersionTestScopedLibraryChildChildV2(ret) | |
| 2170 | 1385 | } | |
| 2171 | 1386 | ||
| 2172 | 1387 | // ApiVersionTestScopedLibraryChildChildV2CreateWithDefault Create the test object with default value. | |
| 2173 | 1388 | func ApiVersionTestScopedLibraryChildChildV2CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestScopedLibraryChildChildV2 { | |
| 2174 | 1389 | ret := capi.CEFApiVersionTestScopedLibraryChildChildV2CreateWithDefault(value, otherValue, otherOtherValue) | |
| 2175 | - | return wrapApiVersionTestScopedLibraryChildChildV2(ret) | |
| 1390 | + | return takeApiVersionTestScopedLibraryChildChildV2(ret) | |
| 2176 | 1391 | } | |
| @@ -68,21 +68,12 @@ func (obj *apiVersionTestImpl) SetChildRefPtrLibraryAndReturnParent(val ApiVersi | |||||
| 68 | return wrapApiVersionTestRefPtrLibrary(unsafe.Pointer(ret)) | 68 | return wrapApiVersionTestRefPtrLibrary(unsafe.Pointer(ret)) | ||
| 69 | } | 69 | } | ||
| 70 | 70 | ||||
| 71 | - | func (obj *apiVersionTestImpl) SetRefPtrLibraryList(val []ApiVersionTestRefPtrLibrary, val1 int32, val2 int32) int32 { | 71 | + | func (obj *apiVersionTestImpl) SetRefPtrLibraryList(valcount int, val unsafe.Pointer, val1 int32, val2 int32) int32 { |
| 72 | if obj == nil || obj.rawPtr == nil { | 72 | if obj == nil || obj.rawPtr == nil { | ||
| 73 | return 0 | 73 | return 0 | ||
| 74 | } | 74 | } | ||
| 75 | rawPtr := obj.rawPtr | 75 | rawPtr := obj.rawPtr | ||
| 76 | - | var valRaw []uintptr | 76 | + | ret := rawPtr.CallSetRefPtrLibraryList(uintptr(valcount), uintptr(val), uintptr(val1), uintptr(val2)) |
| 77 | - | var valPtr unsafe.Pointer | |||
| 78 | - | if len(val) > 0 { | |||
| 79 | - | valRaw = make([]uintptr, len(val)) | |||
| 80 | - | for i, elem := range val { | |||
| 81 | - | valRaw[i] = uintptr(extractRawPointer(elem)) | |||
| 82 | - | } | |||
| 83 | - | valPtr = unsafe.Pointer(&valRaw[0]) | |||
| 84 | - | } | |||
| 85 | - | ret := rawPtr.CallSetRefPtrLibraryList(uintptr(len(val)), uintptr(valPtr), uintptr(val1), uintptr(val2)) | |||
| 86 | return int32(ret) | 77 | return int32(ret) | ||
| 87 | } | 78 | } | ||
| 88 | 79 | ||||
| @@ -144,39 +135,12 @@ func (obj *apiVersionTestImpl) SetRefPtrClientAndReturn(val ApiVersionTestRefPtr | |||||
| 144 | return wrapApiVersionTestRefPtrClient(unsafe.Pointer(ret)) | 135 | return wrapApiVersionTestRefPtrClient(unsafe.Pointer(ret)) | ||
| 145 | } | 136 | } | ||
| 146 | 137 | ||||
| 147 | - | func (obj *apiVersionTestImpl) SetChildRefPtrClient(val ApiVersionTestRefPtrClientChild) int32 { | 138 | + | func (obj *apiVersionTestImpl) SetRefPtrClientList(valcount int, val unsafe.Pointer, val1 int32, val2 int32) int32 { |
| 148 | - | if obj == nil || obj.rawPtr == nil { | |||
| 149 | - | return 0 | |||
| 150 | - | } | |||
| 151 | - | rawPtr := obj.rawPtr | |||
| 152 | - | ret := rawPtr.CallSetChildRefPtrClient(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestRefPtrClientChild(val) }))) | |||
| 153 | - | return int32(ret) | |||
| 154 | - | } | |||
| 155 | - | ||||
| 156 | - | func (obj *apiVersionTestImpl) SetChildRefPtrClientAndReturnParent(val ApiVersionTestRefPtrClientChild) ApiVersionTestRefPtrClient { | |||
| 157 | - | if obj == nil || obj.rawPtr == nil { | |||
| 158 | - | return nil | |||
| 159 | - | } | |||
| 160 | - | rawPtr := obj.rawPtr | |||
| 161 | - | ret := rawPtr.CallSetChildRefPtrClientAndReturnParent(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestRefPtrClientChild(val) }))) | |||
| 162 | - | return wrapApiVersionTestRefPtrClient(unsafe.Pointer(ret)) | |||
| 163 | - | } | |||
| 164 | - | ||||
| 165 | - | func (obj *apiVersionTestImpl) SetRefPtrClientList(val []ApiVersionTestRefPtrClient, val1 int32, val2 int32) int32 { | |||
| 166 | if obj == nil || obj.rawPtr == nil { | 139 | if obj == nil || obj.rawPtr == nil { | ||
| 167 | return 0 | 140 | return 0 | ||
| 168 | } | 141 | } | ||
| 169 | rawPtr := obj.rawPtr | 142 | rawPtr := obj.rawPtr | ||
| 170 | - | var valRaw []uintptr | 143 | + | ret := rawPtr.CallSetRefPtrClientList(uintptr(valcount), uintptr(val), uintptr(val1), uintptr(val2)) |
| 171 | - | var valPtr unsafe.Pointer | |||
| 172 | - | if len(val) > 0 { | |||
| 173 | - | valRaw = make([]uintptr, len(val)) | |||
| 174 | - | for i, elem := range val { | |||
| 175 | - | valRaw[i] = uintptr(extractRawPointer(elem)) | |||
| 176 | - | } | |||
| 177 | - | valPtr = unsafe.Pointer(&valRaw[0]) | |||
| 178 | - | } | |||
| 179 | - | ret := rawPtr.CallSetRefPtrClientList(uintptr(len(val)), uintptr(valPtr), uintptr(val1), uintptr(val2)) | |||
| 180 | return int32(ret) | 144 | return int32(ret) | ||
| 181 | } | 145 | } | ||
| 182 | 146 | ||||
| @@ -283,24 +247,6 @@ func (obj *apiVersionTestImpl) SetOwnPtrClientAndReturn(val ApiVersionTestScoped | |||||
| 283 | return wrapApiVersionTestScopedClient(unsafe.Pointer(ret)) | 247 | return wrapApiVersionTestScopedClient(unsafe.Pointer(ret)) | ||
| 284 | } | 248 | } | ||
| 285 | 249 | ||||
| 286 | - | func (obj *apiVersionTestImpl) SetChildOwnPtrClient(val ApiVersionTestScopedClientChild) int32 { | |||
| 287 | - | if obj == nil || obj.rawPtr == nil { | |||
| 288 | - | return 0 | |||
| 289 | - | } | |||
| 290 | - | rawPtr := obj.rawPtr | |||
| 291 | - | ret := rawPtr.CallSetChildOwnPtrClient(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestScopedClientChild(val) }))) | |||
| 292 | - | return int32(ret) | |||
| 293 | - | } | |||
| 294 | - | ||||
| 295 | - | func (obj *apiVersionTestImpl) SetChildOwnPtrClientAndReturnParent(val ApiVersionTestScopedClientChild) ApiVersionTestScopedClient { | |||
| 296 | - | if obj == nil || obj.rawPtr == nil { | |||
| 297 | - | return nil | |||
| 298 | - | } | |||
| 299 | - | rawPtr := obj.rawPtr | |||
| 300 | - | ret := rawPtr.CallSetChildOwnPtrClientAndReturnParent(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestScopedClientChild(val) }))) | |||
| 301 | - | return wrapApiVersionTestScopedClient(unsafe.Pointer(ret)) | |||
| 302 | - | } | |||
| 303 | - | ||||
| 304 | func (obj *apiVersionTestImpl) SetRawPtrLibrary(val ApiVersionTestScopedLibrary) int32 { | 250 | func (obj *apiVersionTestImpl) SetRawPtrLibrary(val ApiVersionTestScopedLibrary) int32 { | ||
| 305 | if obj == nil || obj.rawPtr == nil { | 251 | if obj == nil || obj.rawPtr == nil { | ||
| 306 | return 0 | 252 | return 0 | ||
| @@ -319,21 +265,12 @@ func (obj *apiVersionTestImpl) SetChildRawPtrLibrary(val ApiVersionTestScopedLib | |||||
| 319 | return int32(ret) | 265 | return int32(ret) | ||
| 320 | } | 266 | } | ||
| 321 | 267 | ||||
| 322 | - | func (obj *apiVersionTestImpl) SetRawPtrLibraryList(val []ApiVersionTestScopedLibrary, val1 int32, val2 int32) int32 { | 268 | + | func (obj *apiVersionTestImpl) SetRawPtrLibraryList(valcount int, val unsafe.Pointer, val1 int32, val2 int32) int32 { |
| 323 | if obj == nil || obj.rawPtr == nil { | 269 | if obj == nil || obj.rawPtr == nil { | ||
| 324 | return 0 | 270 | return 0 | ||
| 325 | } | 271 | } | ||
| 326 | rawPtr := obj.rawPtr | 272 | rawPtr := obj.rawPtr | ||
| 327 | - | var valRaw []uintptr | 273 | + | ret := rawPtr.CallSetRawPtrLibraryList(uintptr(valcount), uintptr(val), uintptr(val1), uintptr(val2)) |
| 328 | - | var valPtr unsafe.Pointer | |||
| 329 | - | if len(val) > 0 { | |||
| 330 | - | valRaw = make([]uintptr, len(val)) | |||
| 331 | - | for i, elem := range val { | |||
| 332 | - | valRaw[i] = uintptr(extractRawPointer(elem)) | |||
| 333 | - | } | |||
| 334 | - | valPtr = unsafe.Pointer(&valRaw[0]) | |||
| 335 | - | } | |||
| 336 | - | ret := rawPtr.CallSetRawPtrLibraryList(uintptr(len(val)), uintptr(valPtr), uintptr(val1), uintptr(val2)) | |||
| 337 | return int32(ret) | 274 | return int32(ret) | ||
| 338 | } | 275 | } | ||
| 339 | 276 | ||||
| @@ -346,30 +283,12 @@ func (obj *apiVersionTestImpl) SetRawPtrClient(val ApiVersionTestScopedClient) i | |||||
| 346 | return int32(ret) | 283 | return int32(ret) | ||
| 347 | } | 284 | } | ||
| 348 | 285 | ||||
| 349 | - | func (obj *apiVersionTestImpl) SetChildRawPtrClient(val ApiVersionTestScopedClientChild) int32 { | 286 | + | func (obj *apiVersionTestImpl) SetRawPtrClientList(valcount int, val unsafe.Pointer, val1 int32, val2 int32) int32 { |
| 350 | - | if obj == nil || obj.rawPtr == nil { | |||
| 351 | - | return 0 | |||
| 352 | - | } | |||
| 353 | - | rawPtr := obj.rawPtr | |||
| 354 | - | ret := rawPtr.CallSetChildRawPtrClient(uintptr(extractOrWrapRawPointer(val, func() any { return NewApiVersionTestScopedClientChild(val) }))) | |||
| 355 | - | return int32(ret) | |||
| 356 | - | } | |||
| 357 | - | ||||
| 358 | - | func (obj *apiVersionTestImpl) SetRawPtrClientList(val []ApiVersionTestScopedClient, val1 int32, val2 int32) int32 { | |||
| 359 | if obj == nil || obj.rawPtr == nil { | 287 | if obj == nil || obj.rawPtr == nil { | ||
| 360 | return 0 | 288 | return 0 | ||
| 361 | } | 289 | } | ||
| 362 | rawPtr := obj.rawPtr | 290 | rawPtr := obj.rawPtr | ||
| 363 | - | var valRaw []uintptr | 291 | + | ret := rawPtr.CallSetRawPtrClientList(uintptr(valcount), uintptr(val), uintptr(val1), uintptr(val2)) |
| 364 | - | var valPtr unsafe.Pointer | |||
| 365 | - | if len(val) > 0 { | |||
| 366 | - | valRaw = make([]uintptr, len(val)) | |||
| 367 | - | for i, elem := range val { | |||
| 368 | - | valRaw[i] = uintptr(extractRawPointer(elem)) | |||
| 369 | - | } | |||
| 370 | - | valPtr = unsafe.Pointer(&valRaw[0]) | |||
| 371 | - | } | |||
| 372 | - | ret := rawPtr.CallSetRawPtrClientList(uintptr(len(val)), uintptr(valPtr), uintptr(val1), uintptr(val2)) | |||
| 373 | return int32(ret) | 292 | return int32(ret) | ||
| 374 | } | 293 | } | ||
| 375 | 294 | ||||
| @@ -454,6 +373,19 @@ func wrapApiVersionTest(ptr unsafe.Pointer) ApiVersionTest { | |||||
| 454 | return impl | 373 | return impl | ||
| 455 | } | 374 | } | ||
| 456 | 375 | ||||
| 376 | + | // takeApiVersionTest adopts a CEF ApiVersionTest pointer whose reference is already owned by | |||
| 377 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTest it | |||
| 378 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 379 | + | func takeApiVersionTest(ptr unsafe.Pointer) ApiVersionTest { | |||
| 380 | + | if ptr == nil { | |||
| 381 | + | return nil | |||
| 382 | + | } | |||
| 383 | + | r := (*capi.CEFApiVersionTestT)(ptr) | |||
| 384 | + | impl := &apiVersionTestImpl{rawPtr: r} | |||
| 385 | + | runtime.SetFinalizer(impl, (*apiVersionTestImpl).Release) | |||
| 386 | + | return impl | |||
| 387 | + | } | |||
| 388 | + | ||||
| 457 | // ApiVersionTestRefPtrLibrary Library-side test object for RefPtr. | 389 | // ApiVersionTestRefPtrLibrary Library-side test object for RefPtr. | ||
| 458 | type ApiVersionTestRefPtrLibrary = portin.ApiVersionTestRefPtrLibrary | 390 | type ApiVersionTestRefPtrLibrary = portin.ApiVersionTestRefPtrLibrary | ||
| 459 | 391 | ||||
| @@ -482,40 +414,6 @@ func (obj *apiVersionTestRefPtrLibraryImpl) SetValueLegacy(value int32) { | |||||
| 482 | rawPtr.CallSetValueLegacy(uintptr(value)) | 414 | rawPtr.CallSetValueLegacy(uintptr(value)) | ||
| 483 | } | 415 | } | ||
| 484 | 416 | ||||
| 485 | - | func (obj *apiVersionTestRefPtrLibraryImpl) GetValue() int32 { | |||
| 486 | - | if obj == nil || obj.rawPtr == nil { | |||
| 487 | - | return 0 | |||
| 488 | - | } | |||
| 489 | - | rawPtr := obj.rawPtr | |||
| 490 | - | ret := rawPtr.CallGetValue() | |||
| 491 | - | return int32(ret) | |||
| 492 | - | } | |||
| 493 | - | ||||
| 494 | - | func (obj *apiVersionTestRefPtrLibraryImpl) SetValue(value int32) { | |||
| 495 | - | if obj == nil || obj.rawPtr == nil { | |||
| 496 | - | return | |||
| 497 | - | } | |||
| 498 | - | rawPtr := obj.rawPtr | |||
| 499 | - | rawPtr.CallSetValue(uintptr(value)) | |||
| 500 | - | } | |||
| 501 | - | ||||
| 502 | - | func (obj *apiVersionTestRefPtrLibraryImpl) GetValueV1() int32 { | |||
| 503 | - | if obj == nil || obj.rawPtr == nil { | |||
| 504 | - | return 0 | |||
| 505 | - | } | |||
| 506 | - | rawPtr := obj.rawPtr | |||
| 507 | - | ret := rawPtr.CallGetValueV1() | |||
| 508 | - | return int32(ret) | |||
| 509 | - | } | |||
| 510 | - | ||||
| 511 | - | func (obj *apiVersionTestRefPtrLibraryImpl) SetValueV1(value int32) { | |||
| 512 | - | if obj == nil || obj.rawPtr == nil { | |||
| 513 | - | return | |||
| 514 | - | } | |||
| 515 | - | rawPtr := obj.rawPtr | |||
| 516 | - | rawPtr.CallSetValueV1(uintptr(value)) | |||
| 517 | - | } | |||
| 518 | - | ||||
| 519 | func (obj *apiVersionTestRefPtrLibraryImpl) GetValueV2() int32 { | 417 | func (obj *apiVersionTestRefPtrLibraryImpl) GetValueV2() int32 { | ||
| 520 | if obj == nil || obj.rawPtr == nil { | 418 | if obj == nil || obj.rawPtr == nil { | ||
| 521 | return 0 | 419 | return 0 | ||
| @@ -533,23 +431,6 @@ func (obj *apiVersionTestRefPtrLibraryImpl) SetValueV2(value int32) { | |||||
| 533 | rawPtr.CallSetValueV2(uintptr(value)) | 431 | rawPtr.CallSetValueV2(uintptr(value)) | ||
| 534 | } | 432 | } | ||
| 535 | 433 | ||||
| 536 | - | func (obj *apiVersionTestRefPtrLibraryImpl) GetValueExp() int32 { | |||
| 537 | - | if obj == nil || obj.rawPtr == nil { | |||
| 538 | - | return 0 | |||
| 539 | - | } | |||
| 540 | - | rawPtr := obj.rawPtr | |||
| 541 | - | ret := rawPtr.CallGetValueExp() | |||
| 542 | - | return int32(ret) | |||
| 543 | - | } | |||
| 544 | - | ||||
| 545 | - | func (obj *apiVersionTestRefPtrLibraryImpl) SetValueExp(value int32) { | |||
| 546 | - | if obj == nil || obj.rawPtr == nil { | |||
| 547 | - | return | |||
| 548 | - | } | |||
| 549 | - | rawPtr := obj.rawPtr | |||
| 550 | - | rawPtr.CallSetValueExp(uintptr(value)) | |||
| 551 | - | } | |||
| 552 | - | ||||
| 553 | func (obj *apiVersionTestRefPtrLibraryImpl) RawPointer() unsafe.Pointer { | 434 | func (obj *apiVersionTestRefPtrLibraryImpl) RawPointer() unsafe.Pointer { | ||
| 554 | if obj == nil || obj.rawPtr == nil { | 435 | if obj == nil || obj.rawPtr == nil { | ||
| 555 | return nil | 436 | return nil | ||
| @@ -586,6 +467,19 @@ func wrapApiVersionTestRefPtrLibrary(ptr unsafe.Pointer) ApiVersionTestRefPtrLib | |||||
| 586 | return impl | 467 | return impl | ||
| 587 | } | 468 | } | ||
| 588 | 469 | ||||
| 470 | + | // takeApiVersionTestRefPtrLibrary adopts a CEF ApiVersionTestRefPtrLibrary pointer whose reference is already owned by | |||
| 471 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestRefPtrLibrary it | |||
| 472 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 473 | + | func takeApiVersionTestRefPtrLibrary(ptr unsafe.Pointer) ApiVersionTestRefPtrLibrary { | |||
| 474 | + | if ptr == nil { | |||
| 475 | + | return nil | |||
| 476 | + | } | |||
| 477 | + | r := (*capi.CEFApiVersionTestRefPtrLibraryT)(ptr) | |||
| 478 | + | impl := &apiVersionTestRefPtrLibraryImpl{rawPtr: r} | |||
| 479 | + | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryImpl).Release) | |||
| 480 | + | return impl | |||
| 481 | + | } | |||
| 482 | + | ||||
| 589 | // ApiVersionTestRefPtrLibraryChild Library-side child test object for RefPtr. | 483 | // ApiVersionTestRefPtrLibraryChild Library-side child test object for RefPtr. | ||
| 590 | type ApiVersionTestRefPtrLibraryChild = portin.ApiVersionTestRefPtrLibraryChild | 484 | type ApiVersionTestRefPtrLibraryChild = portin.ApiVersionTestRefPtrLibraryChild | ||
| 591 | 485 | ||||
| @@ -650,131 +544,16 @@ func wrapApiVersionTestRefPtrLibraryChild(ptr unsafe.Pointer) ApiVersionTestRefP | |||||
| 650 | return impl | 544 | return impl | ||
| 651 | } | 545 | } | ||
| 652 | 546 | ||||
| 653 | - | // ApiVersionTestRefPtrLibraryChildChild Another library-side child test object for RefPtr. This is replaced by cef_api_version_test_ref_ptr_library_child_child_v1_t in version 13301. | 547 | + | // takeApiVersionTestRefPtrLibraryChild adopts a CEF ApiVersionTestRefPtrLibraryChild pointer whose reference is already owned by |
| 654 | - | type ApiVersionTestRefPtrLibraryChildChild = portin.ApiVersionTestRefPtrLibraryChildChild | 548 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestRefPtrLibraryChild it |
| 655 | - | 549 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 656 | - | // apiVersionTestRefPtrLibraryChildChildImpl is a reverse wrapper for a CEF-owned ApiVersionTestRefPtrLibraryChildChild pointer. | 550 | + | func takeApiVersionTestRefPtrLibraryChild(ptr unsafe.Pointer) ApiVersionTestRefPtrLibraryChild { |
| 657 | - | // Release is idempotent, but callers must externally synchronize Release with | |||
| 658 | - | // concurrent method calls and must not use the wrapper after Release returns. | |||
| 659 | - | type apiVersionTestRefPtrLibraryChildChildImpl struct { | |||
| 660 | - | rawPtr *capi.CEFApiVersionTestRefPtrLibraryChildChildT | |||
| 661 | - | releaseOnce sync.Once | |||
| 662 | - | } | |||
| 663 | - | ||||
| 664 | - | func (obj *apiVersionTestRefPtrLibraryChildChildImpl) GetOtherOtherValue() int32 { | |||
| 665 | - | if obj == nil || obj.rawPtr == nil { | |||
| 666 | - | return 0 | |||
| 667 | - | } | |||
| 668 | - | rawPtr := obj.rawPtr | |||
| 669 | - | ret := rawPtr.CallGetOtherOtherValue() | |||
| 670 | - | return int32(ret) | |||
| 671 | - | } | |||
| 672 | - | ||||
| 673 | - | func (obj *apiVersionTestRefPtrLibraryChildChildImpl) SetOtherOtherValue(value int32) { | |||
| 674 | - | if obj == nil || obj.rawPtr == nil { | |||
| 675 | - | return | |||
| 676 | - | } | |||
| 677 | - | rawPtr := obj.rawPtr | |||
| 678 | - | rawPtr.CallSetOtherOtherValue(uintptr(value)) | |||
| 679 | - | } | |||
| 680 | - | ||||
| 681 | - | func (obj *apiVersionTestRefPtrLibraryChildChildImpl) RawPointer() unsafe.Pointer { | |||
| 682 | - | if obj == nil || obj.rawPtr == nil { | |||
| 683 | - | return nil | |||
| 684 | - | } | |||
| 685 | - | return unsafe.Pointer(obj.rawPtr) | |||
| 686 | - | } | |||
| 687 | - | ||||
| 688 | - | // Release releases the underlying CEF object. | |||
| 689 | - | func (obj *apiVersionTestRefPtrLibraryChildChildImpl) Release() { | |||
| 690 | - | if obj == nil { | |||
| 691 | - | return | |||
| 692 | - | } | |||
| 693 | - | obj.releaseOnce.Do(func() { | |||
| 694 | - | if obj.rawPtr == nil { | |||
| 695 | - | return | |||
| 696 | - | } | |||
| 697 | - | rawPtr := obj.rawPtr | |||
| 698 | - | obj.rawPtr = nil | |||
| 699 | - | runtime.SetFinalizer(obj, nil) | |||
| 700 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |||
| 701 | - | base.CallRelease() | |||
| 702 | - | }) | |||
| 703 | - | } | |||
| 704 | - | ||||
| 705 | - | func wrapApiVersionTestRefPtrLibraryChildChild(ptr unsafe.Pointer) ApiVersionTestRefPtrLibraryChildChild { | |||
| 706 | - | if ptr == nil { | |||
| 707 | - | return nil | |||
| 708 | - | } | |||
| 709 | - | r := (*capi.CEFApiVersionTestRefPtrLibraryChildChildT)(ptr) | |||
| 710 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |||
| 711 | - | base.CallAddRef() | |||
| 712 | - | impl := &apiVersionTestRefPtrLibraryChildChildImpl{rawPtr: r} | |||
| 713 | - | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryChildChildImpl).Release) | |||
| 714 | - | return impl | |||
| 715 | - | } | |||
| 716 | - | ||||
| 717 | - | // ApiVersionTestRefPtrLibraryChildChildV1 Another library-side child test object for RefPtr. This replaces cef_api_version_test_ref_ptr_library_child_child_t in version 13301 and is replaced by cef_api_version_test_ref_ptr_library_child_child_v2_t in version 13302. | |||
| 718 | - | type ApiVersionTestRefPtrLibraryChildChildV1 = portin.ApiVersionTestRefPtrLibraryChildChildV1 | |||
| 719 | - | ||||
| 720 | - | // apiVersionTestRefPtrLibraryChildChildV1Impl is a reverse wrapper for a CEF-owned ApiVersionTestRefPtrLibraryChildChildV1 pointer. | |||
| 721 | - | // Release is idempotent, but callers must externally synchronize Release with | |||
| 722 | - | // concurrent method calls and must not use the wrapper after Release returns. | |||
| 723 | - | type apiVersionTestRefPtrLibraryChildChildV1Impl struct { | |||
| 724 | - | rawPtr *capi.CEFApiVersionTestRefPtrLibraryChildChildV1T | |||
| 725 | - | releaseOnce sync.Once | |||
| 726 | - | } | |||
| 727 | - | ||||
| 728 | - | func (obj *apiVersionTestRefPtrLibraryChildChildV1Impl) GetOtherOtherValue() int32 { | |||
| 729 | - | if obj == nil || obj.rawPtr == nil { | |||
| 730 | - | return 0 | |||
| 731 | - | } | |||
| 732 | - | rawPtr := obj.rawPtr | |||
| 733 | - | ret := rawPtr.CallGetOtherOtherValue() | |||
| 734 | - | return int32(ret) | |||
| 735 | - | } | |||
| 736 | - | ||||
| 737 | - | func (obj *apiVersionTestRefPtrLibraryChildChildV1Impl) SetOtherOtherValue(value int32) { | |||
| 738 | - | if obj == nil || obj.rawPtr == nil { | |||
| 739 | - | return | |||
| 740 | - | } | |||
| 741 | - | rawPtr := obj.rawPtr | |||
| 742 | - | rawPtr.CallSetOtherOtherValue(uintptr(value)) | |||
| 743 | - | } | |||
| 744 | - | ||||
| 745 | - | func (obj *apiVersionTestRefPtrLibraryChildChildV1Impl) RawPointer() unsafe.Pointer { | |||
| 746 | - | if obj == nil || obj.rawPtr == nil { | |||
| 747 | - | return nil | |||
| 748 | - | } | |||
| 749 | - | return unsafe.Pointer(obj.rawPtr) | |||
| 750 | - | } | |||
| 751 | - | ||||
| 752 | - | // Release releases the underlying CEF object. | |||
| 753 | - | func (obj *apiVersionTestRefPtrLibraryChildChildV1Impl) Release() { | |||
| 754 | - | if obj == nil { | |||
| 755 | - | return | |||
| 756 | - | } | |||
| 757 | - | obj.releaseOnce.Do(func() { | |||
| 758 | - | if obj.rawPtr == nil { | |||
| 759 | - | return | |||
| 760 | - | } | |||
| 761 | - | rawPtr := obj.rawPtr | |||
| 762 | - | obj.rawPtr = nil | |||
| 763 | - | runtime.SetFinalizer(obj, nil) | |||
| 764 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |||
| 765 | - | base.CallRelease() | |||
| 766 | - | }) | |||
| 767 | - | } | |||
| 768 | - | ||||
| 769 | - | func wrapApiVersionTestRefPtrLibraryChildChildV1(ptr unsafe.Pointer) ApiVersionTestRefPtrLibraryChildChildV1 { | |||
| 770 | if ptr == nil { | 551 | if ptr == nil { | ||
| 771 | return nil | 552 | return nil | ||
| 772 | } | 553 | } | ||
| 773 | - | r := (*capi.CEFApiVersionTestRefPtrLibraryChildChildV1T)(ptr) | 554 | + | r := (*capi.CEFApiVersionTestRefPtrLibraryChildT)(ptr) |
| 774 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | 555 | + | impl := &apiVersionTestRefPtrLibraryChildImpl{rawPtr: r} |
| 775 | - | base.CallAddRef() | 556 | + | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryChildImpl).Release) |
| 776 | - | impl := &apiVersionTestRefPtrLibraryChildChildV1Impl{rawPtr: r} | |||
| 777 | - | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryChildChildV1Impl).Release) | |||
| 778 | return impl | 557 | return impl | ||
| 779 | } | 558 | } | ||
| 780 | 559 | ||||
| @@ -842,6 +621,19 @@ func wrapApiVersionTestRefPtrLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionT | |||||
| 842 | return impl | 621 | return impl | ||
| 843 | } | 622 | } | ||
| 844 | 623 | ||||
| 624 | + | // takeApiVersionTestRefPtrLibraryChildChildV2 adopts a CEF ApiVersionTestRefPtrLibraryChildChildV2 pointer whose reference is already owned by | |||
| 625 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestRefPtrLibraryChildChildV2 it | |||
| 626 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 627 | + | func takeApiVersionTestRefPtrLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionTestRefPtrLibraryChildChildV2 { | |||
| 628 | + | if ptr == nil { | |||
| 629 | + | return nil | |||
| 630 | + | } | |||
| 631 | + | r := (*capi.CEFApiVersionTestRefPtrLibraryChildChildV2T)(ptr) | |||
| 632 | + | impl := &apiVersionTestRefPtrLibraryChildChildV2Impl{rawPtr: r} | |||
| 633 | + | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrLibraryChildChildV2Impl).Release) | |||
| 634 | + | return impl | |||
| 635 | + | } | |||
| 636 | + | ||||
| 845 | // ApiVersionTestRefPtrClient Client-side test object for RefPtr. | 637 | // ApiVersionTestRefPtrClient Client-side test object for RefPtr. | ||
| 846 | type ApiVersionTestRefPtrClient = portin.ApiVersionTestRefPtrClient | 638 | type ApiVersionTestRefPtrClient = portin.ApiVersionTestRefPtrClient | ||
| 847 | 639 | ||||
| @@ -871,32 +663,6 @@ func apiVersionTestRefPtrClientGetValueLegacyCEFCallback() uintptr { | |||||
| 871 | }) | 663 | }) | ||
| 872 | } | 664 | } | ||
| 873 | 665 | ||||
| 874 | - | var apiVersionTestRefPtrClientGetValueSharedOnce sync.Once | |||
| 875 | - | var apiVersionTestRefPtrClientGetValueSharedCallback uintptr | |||
| 876 | - | ||||
| 877 | - | func apiVersionTestRefPtrClientGetValueCEFCallback() uintptr { | |||
| 878 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientGetValueSharedOnce, &apiVersionTestRefPtrClientGetValueSharedCallback, func(self uintptr) uintptr { | |||
| 879 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClient](self) | |||
| 880 | - | if !ownerOK { | |||
| 881 | - | return 0 | |||
| 882 | - | } | |||
| 883 | - | return uintptr(impl.GetValue()) | |||
| 884 | - | }) | |||
| 885 | - | } | |||
| 886 | - | ||||
| 887 | - | var apiVersionTestRefPtrClientGetValueV1SharedOnce sync.Once | |||
| 888 | - | var apiVersionTestRefPtrClientGetValueV1SharedCallback uintptr | |||
| 889 | - | ||||
| 890 | - | func apiVersionTestRefPtrClientGetValueV1CEFCallback() uintptr { | |||
| 891 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientGetValueV1SharedOnce, &apiVersionTestRefPtrClientGetValueV1SharedCallback, func(self uintptr) uintptr { | |||
| 892 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClient](self) | |||
| 893 | - | if !ownerOK { | |||
| 894 | - | return 0 | |||
| 895 | - | } | |||
| 896 | - | return uintptr(impl.GetValueV1()) | |||
| 897 | - | }) | |||
| 898 | - | } | |||
| 899 | - | ||||
| 900 | var apiVersionTestRefPtrClientGetValueV2SharedOnce sync.Once | 666 | var apiVersionTestRefPtrClientGetValueV2SharedOnce sync.Once | ||
| 901 | var apiVersionTestRefPtrClientGetValueV2SharedCallback uintptr | 667 | var apiVersionTestRefPtrClientGetValueV2SharedCallback uintptr | ||
| 902 | 668 | ||||
| @@ -910,19 +676,6 @@ func apiVersionTestRefPtrClientGetValueV2CEFCallback() uintptr { | |||||
| 910 | }) | 676 | }) | ||
| 911 | } | 677 | } | ||
| 912 | 678 | ||||
| 913 | - | var apiVersionTestRefPtrClientGetValueExpSharedOnce sync.Once | |||
| 914 | - | var apiVersionTestRefPtrClientGetValueExpSharedCallback uintptr | |||
| 915 | - | ||||
| 916 | - | func apiVersionTestRefPtrClientGetValueExpCEFCallback() uintptr { | |||
| 917 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientGetValueExpSharedOnce, &apiVersionTestRefPtrClientGetValueExpSharedCallback, func(self uintptr) uintptr { | |||
| 918 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClient](self) | |||
| 919 | - | if !ownerOK { | |||
| 920 | - | return 0 | |||
| 921 | - | } | |||
| 922 | - | return uintptr(impl.GetValueExp()) | |||
| 923 | - | }) | |||
| 924 | - | } | |||
| 925 | - | ||||
| 926 | // NewApiVersionTestRefPtrClient creates a CEF handler backed by the given implementation. | 679 | // NewApiVersionTestRefPtrClient creates a CEF handler backed by the given implementation. | ||
| 927 | func NewApiVersionTestRefPtrClient(impl ApiVersionTestRefPtrClient) ApiVersionTestRefPtrClient { | 680 | func NewApiVersionTestRefPtrClient(impl ApiVersionTestRefPtrClient) ApiVersionTestRefPtrClient { | ||
| 928 | if isNilImpl(impl) { | 681 | if isNilImpl(impl) { | ||
| @@ -935,14 +688,8 @@ func NewApiVersionTestRefPtrClient(impl ApiVersionTestRefPtrClient) ApiVersionTe | |||||
| 935 | 688 | ||||
| 936 | r.OverrideGetValueLegacy(apiVersionTestRefPtrClientGetValueLegacyCEFCallback()) | 689 | r.OverrideGetValueLegacy(apiVersionTestRefPtrClientGetValueLegacyCEFCallback()) | ||
| 937 | 690 | ||||
| 938 | - | r.OverrideGetValue(apiVersionTestRefPtrClientGetValueCEFCallback()) | |||
| 939 | - | ||||
| 940 | - | r.OverrideGetValueV1(apiVersionTestRefPtrClientGetValueV1CEFCallback()) | |||
| 941 | - | ||||
| 942 | r.OverrideGetValueV2(apiVersionTestRefPtrClientGetValueV2CEFCallback()) | 691 | r.OverrideGetValueV2(apiVersionTestRefPtrClientGetValueV2CEFCallback()) | ||
| 943 | 692 | ||||
| 944 | - | r.OverrideGetValueExp(apiVersionTestRefPtrClientGetValueExpCEFCallback()) | |||
| 945 | - | ||||
| 946 | return w | 693 | return w | ||
| 947 | } | 694 | } | ||
| 948 | 695 | ||||
| @@ -963,25 +710,7 @@ func (obj *apiVersionTestRefPtrClientImpl) GetValueLegacy() int32 { | |||||
| 963 | return int32(ret) | 710 | return int32(ret) | ||
| 964 | } | 711 | } | ||
| 965 | 712 | ||||
| 966 | - | func (obj *apiVersionTestRefPtrClientImpl) GetValue() int32 { | 713 | + | func (obj *apiVersionTestRefPtrClientImpl) GetValueV2() int32 { |
| 967 | - | if obj == nil || obj.rawPtr == nil { | |||
| 968 | - | return 0 | |||
| 969 | - | } | |||
| 970 | - | rawPtr := obj.rawPtr | |||
| 971 | - | ret := rawPtr.CallGetValue() | |||
| 972 | - | return int32(ret) | |||
| 973 | - | } | |||
| 974 | - | ||||
| 975 | - | func (obj *apiVersionTestRefPtrClientImpl) GetValueV1() int32 { | |||
| 976 | - | if obj == nil || obj.rawPtr == nil { | |||
| 977 | - | return 0 | |||
| 978 | - | } | |||
| 979 | - | rawPtr := obj.rawPtr | |||
| 980 | - | ret := rawPtr.CallGetValueV1() | |||
| 981 | - | return int32(ret) | |||
| 982 | - | } | |||
| 983 | - | ||||
| 984 | - | func (obj *apiVersionTestRefPtrClientImpl) GetValueV2() int32 { | |||
| 985 | if obj == nil || obj.rawPtr == nil { | 714 | if obj == nil || obj.rawPtr == nil { | ||
| 986 | return 0 | 715 | return 0 | ||
| 987 | } | 716 | } | ||
| @@ -990,15 +719,6 @@ func (obj *apiVersionTestRefPtrClientImpl) GetValueV2() int32 { | |||||
| 990 | return int32(ret) | 719 | return int32(ret) | ||
| 991 | } | 720 | } | ||
| 992 | 721 | ||||
| 993 | - | func (obj *apiVersionTestRefPtrClientImpl) GetValueExp() int32 { | |||
| 994 | - | if obj == nil || obj.rawPtr == nil { | |||
| 995 | - | return 0 | |||
| 996 | - | } | |||
| 997 | - | rawPtr := obj.rawPtr | |||
| 998 | - | ret := rawPtr.CallGetValueExp() | |||
| 999 | - | return int32(ret) | |||
| 1000 | - | } | |||
| 1001 | - | ||||
| 1002 | func (obj *apiVersionTestRefPtrClientImpl) RawPointer() unsafe.Pointer { | 722 | func (obj *apiVersionTestRefPtrClientImpl) RawPointer() unsafe.Pointer { | ||
| 1003 | if obj == nil || obj.rawPtr == nil { | 723 | if obj == nil || obj.rawPtr == nil { | ||
| 1004 | return nil | 724 | return nil | ||
| @@ -1036,128 +756,6 @@ func wrapApiVersionTestRefPtrClient(ptr unsafe.Pointer) ApiVersionTestRefPtrClie | |||||
| 1036 | return impl | 756 | return impl | ||
| 1037 | } | 757 | } | ||
| 1038 | 758 | ||||
| 1039 | - | // ApiVersionTestRefPtrClientChild Client-side child test object for RefPtr. This is replaced with cef_api_version_test_ref_ptr_client_child_v2_t in version 13302. | |||
| 1040 | - | type ApiVersionTestRefPtrClientChild = portin.ApiVersionTestRefPtrClientChild | |||
| 1041 | - | ||||
| 1042 | - | // apiVersionTestRefPtrClientChildWrapper wraps a user-provided ApiVersionTestRefPtrClientChild implementation together | |||
| 1043 | - | // with the raw CEF struct pointer allocated by NewApiVersionTestRefPtrClientChild. It satisfies the | |||
| 1044 | - | // ApiVersionTestRefPtrClientChild interface (by embedding the user impl) and core.RawPointerHolder | |||
| 1045 | - | // (so extractRawPointer can recover the raw pointer). | |||
| 1046 | - | type apiVersionTestRefPtrClientChildWrapper struct { | |||
| 1047 | - | ApiVersionTestRefPtrClientChild // embed user impl for interface delegation | |||
| 1048 | - | rawPtr *capi.CEFApiVersionTestRefPtrClientChildT | |||
| 1049 | - | } | |||
| 1050 | - | ||||
| 1051 | - | func (w *apiVersionTestRefPtrClientChildWrapper) RawPointer() unsafe.Pointer { | |||
| 1052 | - | return unsafe.Pointer(w.rawPtr) | |||
| 1053 | - | } | |||
| 1054 | - | ||||
| 1055 | - | var apiVersionTestRefPtrClientChildGetOtherValueSharedOnce sync.Once | |||
| 1056 | - | var apiVersionTestRefPtrClientChildGetOtherValueSharedCallback uintptr | |||
| 1057 | - | ||||
| 1058 | - | func apiVersionTestRefPtrClientChildGetOtherValueCEFCallback() uintptr { | |||
| 1059 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientChildGetOtherValueSharedOnce, &apiVersionTestRefPtrClientChildGetOtherValueSharedCallback, func(self uintptr) uintptr { | |||
| 1060 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClientChild](self) | |||
| 1061 | - | if !ownerOK { | |||
| 1062 | - | return 0 | |||
| 1063 | - | } | |||
| 1064 | - | return uintptr(impl.GetOtherValue()) | |||
| 1065 | - | }) | |||
| 1066 | - | } | |||
| 1067 | - | ||||
| 1068 | - | var apiVersionTestRefPtrClientChildGetOtherValueV1SharedOnce sync.Once | |||
| 1069 | - | var apiVersionTestRefPtrClientChildGetOtherValueV1SharedCallback uintptr | |||
| 1070 | - | ||||
| 1071 | - | func apiVersionTestRefPtrClientChildGetOtherValueV1CEFCallback() uintptr { | |||
| 1072 | - | return sharedCEFCallback(&apiVersionTestRefPtrClientChildGetOtherValueV1SharedOnce, &apiVersionTestRefPtrClientChildGetOtherValueV1SharedCallback, func(self uintptr) uintptr { | |||
| 1073 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestRefPtrClientChild](self) | |||
| 1074 | - | if !ownerOK { | |||
| 1075 | - | return 0 | |||
| 1076 | - | } | |||
| 1077 | - | return uintptr(impl.GetOtherValueV1()) | |||
| 1078 | - | }) | |||
| 1079 | - | } | |||
| 1080 | - | ||||
| 1081 | - | // NewApiVersionTestRefPtrClientChild creates a CEF handler backed by the given implementation. | |||
| 1082 | - | func NewApiVersionTestRefPtrClientChild(impl ApiVersionTestRefPtrClientChild) ApiVersionTestRefPtrClientChild { | |||
| 1083 | - | if isNilImpl(impl) { | |||
| 1084 | - | return nil | |||
| 1085 | - | } | |||
| 1086 | - | r := new(capi.CEFApiVersionTestRefPtrClientChildT) | |||
| 1087 | - | w := &apiVersionTestRefPtrClientChildWrapper{rawPtr: r} | |||
| 1088 | - | w.ApiVersionTestRefPtrClientChild = impl | |||
| 1089 | - | initRefCount(unsafe.Pointer(r), unsafe.Sizeof(*r), w) | |||
| 1090 | - | ||||
| 1091 | - | r.OverrideGetOtherValue(apiVersionTestRefPtrClientChildGetOtherValueCEFCallback()) | |||
| 1092 | - | ||||
| 1093 | - | r.OverrideGetOtherValueV1(apiVersionTestRefPtrClientChildGetOtherValueV1CEFCallback()) | |||
| 1094 | - | ||||
| 1095 | - | return w | |||
| 1096 | - | } | |||
| 1097 | - | ||||
| 1098 | - | // apiVersionTestRefPtrClientChildImpl is a reverse wrapper for a CEF-owned ApiVersionTestRefPtrClientChild pointer. | |||
| 1099 | - | // Release is idempotent, but callers must externally synchronize Release with | |||
| 1100 | - | // concurrent method calls and must not use the wrapper after Release returns. | |||
| 1101 | - | type apiVersionTestRefPtrClientChildImpl struct { | |||
| 1102 | - | rawPtr *capi.CEFApiVersionTestRefPtrClientChildT | |||
| 1103 | - | releaseOnce sync.Once | |||
| 1104 | - | } | |||
| 1105 | - | ||||
| 1106 | - | func (obj *apiVersionTestRefPtrClientChildImpl) GetOtherValue() int32 { | |||
| 1107 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1108 | - | return 0 | |||
| 1109 | - | } | |||
| 1110 | - | rawPtr := obj.rawPtr | |||
| 1111 | - | ret := rawPtr.CallGetOtherValue() | |||
| 1112 | - | return int32(ret) | |||
| 1113 | - | } | |||
| 1114 | - | ||||
| 1115 | - | func (obj *apiVersionTestRefPtrClientChildImpl) GetOtherValueV1() int32 { | |||
| 1116 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1117 | - | return 0 | |||
| 1118 | - | } | |||
| 1119 | - | rawPtr := obj.rawPtr | |||
| 1120 | - | ret := rawPtr.CallGetOtherValueV1() | |||
| 1121 | - | return int32(ret) | |||
| 1122 | - | } | |||
| 1123 | - | ||||
| 1124 | - | func (obj *apiVersionTestRefPtrClientChildImpl) RawPointer() unsafe.Pointer { | |||
| 1125 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1126 | - | return nil | |||
| 1127 | - | } | |||
| 1128 | - | return unsafe.Pointer(obj.rawPtr) | |||
| 1129 | - | } | |||
| 1130 | - | ||||
| 1131 | - | // Release releases the underlying CEF object. | |||
| 1132 | - | func (obj *apiVersionTestRefPtrClientChildImpl) Release() { | |||
| 1133 | - | if obj == nil { | |||
| 1134 | - | return | |||
| 1135 | - | } | |||
| 1136 | - | obj.releaseOnce.Do(func() { | |||
| 1137 | - | if obj.rawPtr == nil { | |||
| 1138 | - | return | |||
| 1139 | - | } | |||
| 1140 | - | rawPtr := obj.rawPtr | |||
| 1141 | - | obj.rawPtr = nil | |||
| 1142 | - | runtime.SetFinalizer(obj, nil) | |||
| 1143 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |||
| 1144 | - | base.CallRelease() | |||
| 1145 | - | }) | |||
| 1146 | - | } | |||
| 1147 | - | ||||
| 1148 | - | // wrapApiVersionTestRefPtrClientChild wraps a CEF handler pointer received from CEF into a thin Go façade. | |||
| 1149 | - | func wrapApiVersionTestRefPtrClientChild(ptr unsafe.Pointer) ApiVersionTestRefPtrClientChild { | |||
| 1150 | - | if ptr == nil { | |||
| 1151 | - | return nil | |||
| 1152 | - | } | |||
| 1153 | - | r := (*capi.CEFApiVersionTestRefPtrClientChildT)(ptr) | |||
| 1154 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |||
| 1155 | - | base.CallAddRef() | |||
| 1156 | - | impl := &apiVersionTestRefPtrClientChildImpl{rawPtr: r} | |||
| 1157 | - | runtime.SetFinalizer(impl, (*apiVersionTestRefPtrClientChildImpl).Release) | |||
| 1158 | - | return impl | |||
| 1159 | - | } | |||
| 1160 | - | ||||
| 1161 | // ApiVersionTestRefPtrClientChildV2 Client-side child test object for RefPtr. This replaces cef_api_version_test_ref_ptr_client_child_t in version 13302. | 759 | // ApiVersionTestRefPtrClientChildV2 Client-side child test object for RefPtr. This replaces cef_api_version_test_ref_ptr_client_child_t in version 13302. | ||
| 1162 | type ApiVersionTestRefPtrClientChildV2 = portin.ApiVersionTestRefPtrClientChildV2 | 760 | type ApiVersionTestRefPtrClientChildV2 = portin.ApiVersionTestRefPtrClientChildV2 | ||
| 1163 | 761 | ||||
| @@ -1307,40 +905,6 @@ func (obj *apiVersionTestScopedLibraryImpl) SetValueLegacy(value int32) { | |||||
| 1307 | rawPtr.CallSetValueLegacy(uintptr(value)) | 905 | rawPtr.CallSetValueLegacy(uintptr(value)) | ||
| 1308 | } | 906 | } | ||
| 1309 | 907 | ||||
| 1310 | - | func (obj *apiVersionTestScopedLibraryImpl) GetValue() int32 { | |||
| 1311 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1312 | - | return 0 | |||
| 1313 | - | } | |||
| 1314 | - | rawPtr := obj.rawPtr | |||
| 1315 | - | ret := rawPtr.CallGetValue() | |||
| 1316 | - | return int32(ret) | |||
| 1317 | - | } | |||
| 1318 | - | ||||
| 1319 | - | func (obj *apiVersionTestScopedLibraryImpl) SetValue(value int32) { | |||
| 1320 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1321 | - | return | |||
| 1322 | - | } | |||
| 1323 | - | rawPtr := obj.rawPtr | |||
| 1324 | - | rawPtr.CallSetValue(uintptr(value)) | |||
| 1325 | - | } | |||
| 1326 | - | ||||
| 1327 | - | func (obj *apiVersionTestScopedLibraryImpl) GetValueV1() int32 { | |||
| 1328 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1329 | - | return 0 | |||
| 1330 | - | } | |||
| 1331 | - | rawPtr := obj.rawPtr | |||
| 1332 | - | ret := rawPtr.CallGetValueV1() | |||
| 1333 | - | return int32(ret) | |||
| 1334 | - | } | |||
| 1335 | - | ||||
| 1336 | - | func (obj *apiVersionTestScopedLibraryImpl) SetValueV1(value int32) { | |||
| 1337 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1338 | - | return | |||
| 1339 | - | } | |||
| 1340 | - | rawPtr := obj.rawPtr | |||
| 1341 | - | rawPtr.CallSetValueV1(uintptr(value)) | |||
| 1342 | - | } | |||
| 1343 | - | ||||
| 1344 | func (obj *apiVersionTestScopedLibraryImpl) GetValueV2() int32 { | 908 | func (obj *apiVersionTestScopedLibraryImpl) GetValueV2() int32 { | ||
| 1345 | if obj == nil || obj.rawPtr == nil { | 909 | if obj == nil || obj.rawPtr == nil { | ||
| 1346 | return 0 | 910 | return 0 | ||
| @@ -1358,23 +922,6 @@ func (obj *apiVersionTestScopedLibraryImpl) SetValueV2(value int32) { | |||||
| 1358 | rawPtr.CallSetValueV2(uintptr(value)) | 922 | rawPtr.CallSetValueV2(uintptr(value)) | ||
| 1359 | } | 923 | } | ||
| 1360 | 924 | ||||
| 1361 | - | func (obj *apiVersionTestScopedLibraryImpl) GetValueExp() int32 { | |||
| 1362 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1363 | - | return 0 | |||
| 1364 | - | } | |||
| 1365 | - | rawPtr := obj.rawPtr | |||
| 1366 | - | ret := rawPtr.CallGetValueExp() | |||
| 1367 | - | return int32(ret) | |||
| 1368 | - | } | |||
| 1369 | - | ||||
| 1370 | - | func (obj *apiVersionTestScopedLibraryImpl) SetValueExp(value int32) { | |||
| 1371 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1372 | - | return | |||
| 1373 | - | } | |||
| 1374 | - | rawPtr := obj.rawPtr | |||
| 1375 | - | rawPtr.CallSetValueExp(uintptr(value)) | |||
| 1376 | - | } | |||
| 1377 | - | ||||
| 1378 | func (obj *apiVersionTestScopedLibraryImpl) RawPointer() unsafe.Pointer { | 925 | func (obj *apiVersionTestScopedLibraryImpl) RawPointer() unsafe.Pointer { | ||
| 1379 | if obj == nil || obj.rawPtr == nil { | 926 | if obj == nil || obj.rawPtr == nil { | ||
| 1380 | return nil | 927 | return nil | ||
| @@ -1454,131 +1001,16 @@ func wrapApiVersionTestScopedLibraryChild(ptr unsafe.Pointer) ApiVersionTestScop | |||||
| 1454 | return impl | 1001 | return impl | ||
| 1455 | } | 1002 | } | ||
| 1456 | 1003 | ||||
| 1457 | - | // ApiVersionTestScopedLibraryChildChild Another library-side child test object for OwnPtr/RawPtr. This is replaced by cef_api_version_test_scoped_library_child_child_v1_t in version 13301. | 1004 | + | // takeApiVersionTestScopedLibraryChild adopts a CEF ApiVersionTestScopedLibraryChild pointer whose reference is already owned by |
| 1458 | - | type ApiVersionTestScopedLibraryChildChild = portin.ApiVersionTestScopedLibraryChildChild | 1005 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestScopedLibraryChild it |
| 1459 | - | 1006 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 1460 | - | // apiVersionTestScopedLibraryChildChildImpl is a reverse wrapper for a CEF-owned ApiVersionTestScopedLibraryChildChild pointer. | 1007 | + | func takeApiVersionTestScopedLibraryChild(ptr unsafe.Pointer) ApiVersionTestScopedLibraryChild { |
| 1461 | - | // Release is idempotent, but callers must externally synchronize Release with | |||
| 1462 | - | // concurrent method calls and must not use the wrapper after Release returns. | |||
| 1463 | - | type apiVersionTestScopedLibraryChildChildImpl struct { | |||
| 1464 | - | rawPtr *capi.CEFApiVersionTestScopedLibraryChildChildT | |||
| 1465 | - | releaseOnce sync.Once | |||
| 1466 | - | } | |||
| 1467 | - | ||||
| 1468 | - | func (obj *apiVersionTestScopedLibraryChildChildImpl) GetOtherOtherValue() int32 { | |||
| 1469 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1470 | - | return 0 | |||
| 1471 | - | } | |||
| 1472 | - | rawPtr := obj.rawPtr | |||
| 1473 | - | ret := rawPtr.CallGetOtherOtherValue() | |||
| 1474 | - | return int32(ret) | |||
| 1475 | - | } | |||
| 1476 | - | ||||
| 1477 | - | func (obj *apiVersionTestScopedLibraryChildChildImpl) SetOtherOtherValue(value int32) { | |||
| 1478 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1479 | - | return | |||
| 1480 | - | } | |||
| 1481 | - | rawPtr := obj.rawPtr | |||
| 1482 | - | rawPtr.CallSetOtherOtherValue(uintptr(value)) | |||
| 1483 | - | } | |||
| 1484 | - | ||||
| 1485 | - | func (obj *apiVersionTestScopedLibraryChildChildImpl) RawPointer() unsafe.Pointer { | |||
| 1486 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1487 | - | return nil | |||
| 1488 | - | } | |||
| 1489 | - | return unsafe.Pointer(obj.rawPtr) | |||
| 1490 | - | } | |||
| 1491 | - | ||||
| 1492 | - | // Release releases the underlying CEF object. | |||
| 1493 | - | func (obj *apiVersionTestScopedLibraryChildChildImpl) Release() { | |||
| 1494 | - | if obj == nil { | |||
| 1495 | - | return | |||
| 1496 | - | } | |||
| 1497 | - | obj.releaseOnce.Do(func() { | |||
| 1498 | - | if obj.rawPtr == nil { | |||
| 1499 | - | return | |||
| 1500 | - | } | |||
| 1501 | - | rawPtr := obj.rawPtr | |||
| 1502 | - | obj.rawPtr = nil | |||
| 1503 | - | runtime.SetFinalizer(obj, nil) | |||
| 1504 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |||
| 1505 | - | base.CallRelease() | |||
| 1506 | - | }) | |||
| 1507 | - | } | |||
| 1508 | - | ||||
| 1509 | - | func wrapApiVersionTestScopedLibraryChildChild(ptr unsafe.Pointer) ApiVersionTestScopedLibraryChildChild { | |||
| 1510 | if ptr == nil { | 1008 | if ptr == nil { | ||
| 1511 | return nil | 1009 | return nil | ||
| 1512 | } | 1010 | } | ||
| 1513 | - | r := (*capi.CEFApiVersionTestScopedLibraryChildChildT)(ptr) | 1011 | + | r := (*capi.CEFApiVersionTestScopedLibraryChildT)(ptr) |
| 1514 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | 1012 | + | impl := &apiVersionTestScopedLibraryChildImpl{rawPtr: r} |
| 1515 | - | base.CallAddRef() | 1013 | + | runtime.SetFinalizer(impl, (*apiVersionTestScopedLibraryChildImpl).Release) |
| 1516 | - | impl := &apiVersionTestScopedLibraryChildChildImpl{rawPtr: r} | |||
| 1517 | - | runtime.SetFinalizer(impl, (*apiVersionTestScopedLibraryChildChildImpl).Release) | |||
| 1518 | - | return impl | |||
| 1519 | - | } | |||
| 1520 | - | ||||
| 1521 | - | // ApiVersionTestScopedLibraryChildChildV1 Another library-side child test object for OwnPtr/RawPtr. This replaces cef_api_version_test_scoped_library_child_child_t in version 13301 and is replaced by cef_api_version_test_scoped_library_child_child_v2_t in version 13302. | |||
| 1522 | - | type ApiVersionTestScopedLibraryChildChildV1 = portin.ApiVersionTestScopedLibraryChildChildV1 | |||
| 1523 | - | ||||
| 1524 | - | // apiVersionTestScopedLibraryChildChildV1Impl is a reverse wrapper for a CEF-owned ApiVersionTestScopedLibraryChildChildV1 pointer. | |||
| 1525 | - | // Release is idempotent, but callers must externally synchronize Release with | |||
| 1526 | - | // concurrent method calls and must not use the wrapper after Release returns. | |||
| 1527 | - | type apiVersionTestScopedLibraryChildChildV1Impl struct { | |||
| 1528 | - | rawPtr *capi.CEFApiVersionTestScopedLibraryChildChildV1T | |||
| 1529 | - | releaseOnce sync.Once | |||
| 1530 | - | } | |||
| 1531 | - | ||||
| 1532 | - | func (obj *apiVersionTestScopedLibraryChildChildV1Impl) GetOtherOtherValue() int32 { | |||
| 1533 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1534 | - | return 0 | |||
| 1535 | - | } | |||
| 1536 | - | rawPtr := obj.rawPtr | |||
| 1537 | - | ret := rawPtr.CallGetOtherOtherValue() | |||
| 1538 | - | return int32(ret) | |||
| 1539 | - | } | |||
| 1540 | - | ||||
| 1541 | - | func (obj *apiVersionTestScopedLibraryChildChildV1Impl) SetOtherOtherValue(value int32) { | |||
| 1542 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1543 | - | return | |||
| 1544 | - | } | |||
| 1545 | - | rawPtr := obj.rawPtr | |||
| 1546 | - | rawPtr.CallSetOtherOtherValue(uintptr(value)) | |||
| 1547 | - | } | |||
| 1548 | - | ||||
| 1549 | - | func (obj *apiVersionTestScopedLibraryChildChildV1Impl) RawPointer() unsafe.Pointer { | |||
| 1550 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1551 | - | return nil | |||
| 1552 | - | } | |||
| 1553 | - | return unsafe.Pointer(obj.rawPtr) | |||
| 1554 | - | } | |||
| 1555 | - | ||||
| 1556 | - | // Release releases the underlying CEF object. | |||
| 1557 | - | func (obj *apiVersionTestScopedLibraryChildChildV1Impl) Release() { | |||
| 1558 | - | if obj == nil { | |||
| 1559 | - | return | |||
| 1560 | - | } | |||
| 1561 | - | obj.releaseOnce.Do(func() { | |||
| 1562 | - | if obj.rawPtr == nil { | |||
| 1563 | - | return | |||
| 1564 | - | } | |||
| 1565 | - | rawPtr := obj.rawPtr | |||
| 1566 | - | obj.rawPtr = nil | |||
| 1567 | - | runtime.SetFinalizer(obj, nil) | |||
| 1568 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |||
| 1569 | - | base.CallRelease() | |||
| 1570 | - | }) | |||
| 1571 | - | } | |||
| 1572 | - | ||||
| 1573 | - | func wrapApiVersionTestScopedLibraryChildChildV1(ptr unsafe.Pointer) ApiVersionTestScopedLibraryChildChildV1 { | |||
| 1574 | - | if ptr == nil { | |||
| 1575 | - | return nil | |||
| 1576 | - | } | |||
| 1577 | - | r := (*capi.CEFApiVersionTestScopedLibraryChildChildV1T)(ptr) | |||
| 1578 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |||
| 1579 | - | base.CallAddRef() | |||
| 1580 | - | impl := &apiVersionTestScopedLibraryChildChildV1Impl{rawPtr: r} | |||
| 1581 | - | runtime.SetFinalizer(impl, (*apiVersionTestScopedLibraryChildChildV1Impl).Release) | |||
| 1582 | return impl | 1014 | return impl | ||
| 1583 | } | 1015 | } | ||
| 1584 | 1016 | ||||
| @@ -1646,6 +1078,19 @@ func wrapApiVersionTestScopedLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionT | |||||
| 1646 | return impl | 1078 | return impl | ||
| 1647 | } | 1079 | } | ||
| 1648 | 1080 | ||||
| 1081 | + | // takeApiVersionTestScopedLibraryChildChildV2 adopts a CEF ApiVersionTestScopedLibraryChildChildV2 pointer whose reference is already owned by | |||
| 1082 | + | // the caller (as returned by a global factory function). Unlike wrapApiVersionTestScopedLibraryChildChildV2 it | |||
| 1083 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 1084 | + | func takeApiVersionTestScopedLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionTestScopedLibraryChildChildV2 { | |||
| 1085 | + | if ptr == nil { | |||
| 1086 | + | return nil | |||
| 1087 | + | } | |||
| 1088 | + | r := (*capi.CEFApiVersionTestScopedLibraryChildChildV2T)(ptr) | |||
| 1089 | + | impl := &apiVersionTestScopedLibraryChildChildV2Impl{rawPtr: r} | |||
| 1090 | + | runtime.SetFinalizer(impl, (*apiVersionTestScopedLibraryChildChildV2Impl).Release) | |||
| 1091 | + | return impl | |||
| 1092 | + | } | |||
| 1093 | + | ||||
| 1649 | // ApiVersionTestScopedClient Client-side test object for OwnPtr/RawPtr. | 1094 | // ApiVersionTestScopedClient Client-side test object for OwnPtr/RawPtr. | ||
| 1650 | type ApiVersionTestScopedClient = portin.ApiVersionTestScopedClient | 1095 | type ApiVersionTestScopedClient = portin.ApiVersionTestScopedClient | ||
| 1651 | 1096 | ||||
| @@ -1675,32 +1120,6 @@ func apiVersionTestScopedClientGetValueLegacyCEFCallback() uintptr { | |||||
| 1675 | }) | 1120 | }) | ||
| 1676 | } | 1121 | } | ||
| 1677 | 1122 | ||||
| 1678 | - | var apiVersionTestScopedClientGetValueSharedOnce sync.Once | |||
| 1679 | - | var apiVersionTestScopedClientGetValueSharedCallback uintptr | |||
| 1680 | - | ||||
| 1681 | - | func apiVersionTestScopedClientGetValueCEFCallback() uintptr { | |||
| 1682 | - | return sharedCEFCallback(&apiVersionTestScopedClientGetValueSharedOnce, &apiVersionTestScopedClientGetValueSharedCallback, func(self uintptr) uintptr { | |||
| 1683 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClient](self) | |||
| 1684 | - | if !ownerOK { | |||
| 1685 | - | return 0 | |||
| 1686 | - | } | |||
| 1687 | - | return uintptr(impl.GetValue()) | |||
| 1688 | - | }) | |||
| 1689 | - | } | |||
| 1690 | - | ||||
| 1691 | - | var apiVersionTestScopedClientGetValueV1SharedOnce sync.Once | |||
| 1692 | - | var apiVersionTestScopedClientGetValueV1SharedCallback uintptr | |||
| 1693 | - | ||||
| 1694 | - | func apiVersionTestScopedClientGetValueV1CEFCallback() uintptr { | |||
| 1695 | - | return sharedCEFCallback(&apiVersionTestScopedClientGetValueV1SharedOnce, &apiVersionTestScopedClientGetValueV1SharedCallback, func(self uintptr) uintptr { | |||
| 1696 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClient](self) | |||
| 1697 | - | if !ownerOK { | |||
| 1698 | - | return 0 | |||
| 1699 | - | } | |||
| 1700 | - | return uintptr(impl.GetValueV1()) | |||
| 1701 | - | }) | |||
| 1702 | - | } | |||
| 1703 | - | ||||
| 1704 | var apiVersionTestScopedClientGetValueV2SharedOnce sync.Once | 1123 | var apiVersionTestScopedClientGetValueV2SharedOnce sync.Once | ||
| 1705 | var apiVersionTestScopedClientGetValueV2SharedCallback uintptr | 1124 | var apiVersionTestScopedClientGetValueV2SharedCallback uintptr | ||
| 1706 | 1125 | ||||
| @@ -1714,19 +1133,6 @@ func apiVersionTestScopedClientGetValueV2CEFCallback() uintptr { | |||||
| 1714 | }) | 1133 | }) | ||
| 1715 | } | 1134 | } | ||
| 1716 | 1135 | ||||
| 1717 | - | var apiVersionTestScopedClientGetValueExpSharedOnce sync.Once | |||
| 1718 | - | var apiVersionTestScopedClientGetValueExpSharedCallback uintptr | |||
| 1719 | - | ||||
| 1720 | - | func apiVersionTestScopedClientGetValueExpCEFCallback() uintptr { | |||
| 1721 | - | return sharedCEFCallback(&apiVersionTestScopedClientGetValueExpSharedOnce, &apiVersionTestScopedClientGetValueExpSharedCallback, func(self uintptr) uintptr { | |||
| 1722 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClient](self) | |||
| 1723 | - | if !ownerOK { | |||
| 1724 | - | return 0 | |||
| 1725 | - | } | |||
| 1726 | - | return uintptr(impl.GetValueExp()) | |||
| 1727 | - | }) | |||
| 1728 | - | } | |||
| 1729 | - | ||||
| 1730 | // NewApiVersionTestScopedClient creates a CEF handler backed by the given implementation. | 1136 | // NewApiVersionTestScopedClient creates a CEF handler backed by the given implementation. | ||
| 1731 | func NewApiVersionTestScopedClient(impl ApiVersionTestScopedClient) ApiVersionTestScopedClient { | 1137 | func NewApiVersionTestScopedClient(impl ApiVersionTestScopedClient) ApiVersionTestScopedClient { | ||
| 1732 | if isNilImpl(impl) { | 1138 | if isNilImpl(impl) { | ||
| @@ -1739,14 +1145,8 @@ func NewApiVersionTestScopedClient(impl ApiVersionTestScopedClient) ApiVersionTe | |||||
| 1739 | 1145 | ||||
| 1740 | r.OverrideGetValueLegacy(apiVersionTestScopedClientGetValueLegacyCEFCallback()) | 1146 | r.OverrideGetValueLegacy(apiVersionTestScopedClientGetValueLegacyCEFCallback()) | ||
| 1741 | 1147 | ||||
| 1742 | - | r.OverrideGetValue(apiVersionTestScopedClientGetValueCEFCallback()) | |||
| 1743 | - | ||||
| 1744 | - | r.OverrideGetValueV1(apiVersionTestScopedClientGetValueV1CEFCallback()) | |||
| 1745 | - | ||||
| 1746 | r.OverrideGetValueV2(apiVersionTestScopedClientGetValueV2CEFCallback()) | 1148 | r.OverrideGetValueV2(apiVersionTestScopedClientGetValueV2CEFCallback()) | ||
| 1747 | 1149 | ||||
| 1748 | - | r.OverrideGetValueExp(apiVersionTestScopedClientGetValueExpCEFCallback()) | |||
| 1749 | - | ||||
| 1750 | return w | 1150 | return w | ||
| 1751 | } | 1151 | } | ||
| 1752 | 1152 | ||||
| @@ -1766,24 +1166,6 @@ func (obj *apiVersionTestScopedClientImpl) GetValueLegacy() int32 { | |||||
| 1766 | return int32(ret) | 1166 | return int32(ret) | ||
| 1767 | } | 1167 | } | ||
| 1768 | 1168 | ||||
| 1769 | - | func (obj *apiVersionTestScopedClientImpl) GetValue() int32 { | |||
| 1770 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1771 | - | return 0 | |||
| 1772 | - | } | |||
| 1773 | - | rawPtr := obj.rawPtr | |||
| 1774 | - | ret := rawPtr.CallGetValue() | |||
| 1775 | - | return int32(ret) | |||
| 1776 | - | } | |||
| 1777 | - | ||||
| 1778 | - | func (obj *apiVersionTestScopedClientImpl) GetValueV1() int32 { | |||
| 1779 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1780 | - | return 0 | |||
| 1781 | - | } | |||
| 1782 | - | rawPtr := obj.rawPtr | |||
| 1783 | - | ret := rawPtr.CallGetValueV1() | |||
| 1784 | - | return int32(ret) | |||
| 1785 | - | } | |||
| 1786 | - | ||||
| 1787 | func (obj *apiVersionTestScopedClientImpl) GetValueV2() int32 { | 1169 | func (obj *apiVersionTestScopedClientImpl) GetValueV2() int32 { | ||
| 1788 | if obj == nil || obj.rawPtr == nil { | 1170 | if obj == nil || obj.rawPtr == nil { | ||
| 1789 | return 0 | 1171 | return 0 | ||
| @@ -1793,15 +1175,6 @@ func (obj *apiVersionTestScopedClientImpl) GetValueV2() int32 { | |||||
| 1793 | return int32(ret) | 1175 | return int32(ret) | ||
| 1794 | } | 1176 | } | ||
| 1795 | 1177 | ||||
| 1796 | - | func (obj *apiVersionTestScopedClientImpl) GetValueExp() int32 { | |||
| 1797 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1798 | - | return 0 | |||
| 1799 | - | } | |||
| 1800 | - | rawPtr := obj.rawPtr | |||
| 1801 | - | ret := rawPtr.CallGetValueExp() | |||
| 1802 | - | return int32(ret) | |||
| 1803 | - | } | |||
| 1804 | - | ||||
| 1805 | func (obj *apiVersionTestScopedClientImpl) RawPointer() unsafe.Pointer { | 1178 | func (obj *apiVersionTestScopedClientImpl) RawPointer() unsafe.Pointer { | ||
| 1806 | if obj == nil || obj.rawPtr == nil { | 1179 | if obj == nil || obj.rawPtr == nil { | ||
| 1807 | return nil | 1180 | return nil | ||
| @@ -1817,128 +1190,6 @@ func wrapApiVersionTestScopedClient(ptr unsafe.Pointer) ApiVersionTestScopedClie | |||||
| 1817 | return &apiVersionTestScopedClientImpl{rawPtr: r} | 1190 | return &apiVersionTestScopedClientImpl{rawPtr: r} | ||
| 1818 | } | 1191 | } | ||
| 1819 | 1192 | ||||
| 1820 | - | // ApiVersionTestScopedClientChild Client-side child test object for OwnPtr/RawPtr. This is replaced with cef_api_version_test_scoped_client_child_v2_t in version 13302. | |||
| 1821 | - | type ApiVersionTestScopedClientChild = portin.ApiVersionTestScopedClientChild | |||
| 1822 | - | ||||
| 1823 | - | // apiVersionTestScopedClientChildWrapper wraps a user-provided ApiVersionTestScopedClientChild implementation together | |||
| 1824 | - | // with the raw CEF struct pointer allocated by NewApiVersionTestScopedClientChild. It satisfies the | |||
| 1825 | - | // ApiVersionTestScopedClientChild interface (by embedding the user impl) and core.RawPointerHolder | |||
| 1826 | - | // (so extractRawPointer can recover the raw pointer). | |||
| 1827 | - | type apiVersionTestScopedClientChildWrapper struct { | |||
| 1828 | - | ApiVersionTestScopedClientChild // embed user impl for interface delegation | |||
| 1829 | - | rawPtr *capi.CEFApiVersionTestScopedClientChildT | |||
| 1830 | - | } | |||
| 1831 | - | ||||
| 1832 | - | func (w *apiVersionTestScopedClientChildWrapper) RawPointer() unsafe.Pointer { | |||
| 1833 | - | return unsafe.Pointer(w.rawPtr) | |||
| 1834 | - | } | |||
| 1835 | - | ||||
| 1836 | - | var apiVersionTestScopedClientChildGetOtherValueSharedOnce sync.Once | |||
| 1837 | - | var apiVersionTestScopedClientChildGetOtherValueSharedCallback uintptr | |||
| 1838 | - | ||||
| 1839 | - | func apiVersionTestScopedClientChildGetOtherValueCEFCallback() uintptr { | |||
| 1840 | - | return sharedCEFCallback(&apiVersionTestScopedClientChildGetOtherValueSharedOnce, &apiVersionTestScopedClientChildGetOtherValueSharedCallback, func(self uintptr) uintptr { | |||
| 1841 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClientChild](self) | |||
| 1842 | - | if !ownerOK { | |||
| 1843 | - | return 0 | |||
| 1844 | - | } | |||
| 1845 | - | return uintptr(impl.GetOtherValue()) | |||
| 1846 | - | }) | |||
| 1847 | - | } | |||
| 1848 | - | ||||
| 1849 | - | var apiVersionTestScopedClientChildGetOtherValueV1SharedOnce sync.Once | |||
| 1850 | - | var apiVersionTestScopedClientChildGetOtherValueV1SharedCallback uintptr | |||
| 1851 | - | ||||
| 1852 | - | func apiVersionTestScopedClientChildGetOtherValueV1CEFCallback() uintptr { | |||
| 1853 | - | return sharedCEFCallback(&apiVersionTestScopedClientChildGetOtherValueV1SharedOnce, &apiVersionTestScopedClientChildGetOtherValueV1SharedCallback, func(self uintptr) uintptr { | |||
| 1854 | - | impl, ownerOK := cefCallbackOwnerAs[ApiVersionTestScopedClientChild](self) | |||
| 1855 | - | if !ownerOK { | |||
| 1856 | - | return 0 | |||
| 1857 | - | } | |||
| 1858 | - | return uintptr(impl.GetOtherValueV1()) | |||
| 1859 | - | }) | |||
| 1860 | - | } | |||
| 1861 | - | ||||
| 1862 | - | // NewApiVersionTestScopedClientChild creates a CEF handler backed by the given implementation. | |||
| 1863 | - | func NewApiVersionTestScopedClientChild(impl ApiVersionTestScopedClientChild) ApiVersionTestScopedClientChild { | |||
| 1864 | - | if isNilImpl(impl) { | |||
| 1865 | - | return nil | |||
| 1866 | - | } | |||
| 1867 | - | r := new(capi.CEFApiVersionTestScopedClientChildT) | |||
| 1868 | - | w := &apiVersionTestScopedClientChildWrapper{rawPtr: r} | |||
| 1869 | - | w.ApiVersionTestScopedClientChild = impl | |||
| 1870 | - | initRefCount(unsafe.Pointer(r), unsafe.Sizeof(*r), w) | |||
| 1871 | - | ||||
| 1872 | - | r.OverrideGetOtherValue(apiVersionTestScopedClientChildGetOtherValueCEFCallback()) | |||
| 1873 | - | ||||
| 1874 | - | r.OverrideGetOtherValueV1(apiVersionTestScopedClientChildGetOtherValueV1CEFCallback()) | |||
| 1875 | - | ||||
| 1876 | - | return w | |||
| 1877 | - | } | |||
| 1878 | - | ||||
| 1879 | - | // apiVersionTestScopedClientChildImpl is a reverse wrapper for a CEF-owned ApiVersionTestScopedClientChild pointer. | |||
| 1880 | - | // Release is idempotent, but callers must externally synchronize Release with | |||
| 1881 | - | // concurrent method calls and must not use the wrapper after Release returns. | |||
| 1882 | - | type apiVersionTestScopedClientChildImpl struct { | |||
| 1883 | - | rawPtr *capi.CEFApiVersionTestScopedClientChildT | |||
| 1884 | - | releaseOnce sync.Once | |||
| 1885 | - | } | |||
| 1886 | - | ||||
| 1887 | - | func (obj *apiVersionTestScopedClientChildImpl) GetOtherValue() int32 { | |||
| 1888 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1889 | - | return 0 | |||
| 1890 | - | } | |||
| 1891 | - | rawPtr := obj.rawPtr | |||
| 1892 | - | ret := rawPtr.CallGetOtherValue() | |||
| 1893 | - | return int32(ret) | |||
| 1894 | - | } | |||
| 1895 | - | ||||
| 1896 | - | func (obj *apiVersionTestScopedClientChildImpl) GetOtherValueV1() int32 { | |||
| 1897 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1898 | - | return 0 | |||
| 1899 | - | } | |||
| 1900 | - | rawPtr := obj.rawPtr | |||
| 1901 | - | ret := rawPtr.CallGetOtherValueV1() | |||
| 1902 | - | return int32(ret) | |||
| 1903 | - | } | |||
| 1904 | - | ||||
| 1905 | - | func (obj *apiVersionTestScopedClientChildImpl) RawPointer() unsafe.Pointer { | |||
| 1906 | - | if obj == nil || obj.rawPtr == nil { | |||
| 1907 | - | return nil | |||
| 1908 | - | } | |||
| 1909 | - | return unsafe.Pointer(obj.rawPtr) | |||
| 1910 | - | } | |||
| 1911 | - | ||||
| 1912 | - | // Release releases the underlying CEF object. | |||
| 1913 | - | func (obj *apiVersionTestScopedClientChildImpl) Release() { | |||
| 1914 | - | if obj == nil { | |||
| 1915 | - | return | |||
| 1916 | - | } | |||
| 1917 | - | obj.releaseOnce.Do(func() { | |||
| 1918 | - | if obj.rawPtr == nil { | |||
| 1919 | - | return | |||
| 1920 | - | } | |||
| 1921 | - | rawPtr := obj.rawPtr | |||
| 1922 | - | obj.rawPtr = nil | |||
| 1923 | - | runtime.SetFinalizer(obj, nil) | |||
| 1924 | - | base := (*capi.CEFBaseRefCountedT)(unsafe.Pointer(rawPtr)) | |||
| 1925 | - | base.CallRelease() | |||
| 1926 | - | }) | |||
| 1927 | - | } | |||
| 1928 | - | ||||
| 1929 | - | // wrapApiVersionTestScopedClientChild wraps a CEF handler pointer received from CEF into a thin Go façade. | |||
| 1930 | - | func wrapApiVersionTestScopedClientChild(ptr unsafe.Pointer) ApiVersionTestScopedClientChild { | |||
| 1931 | - | if ptr == nil { | |||
| 1932 | - | return nil | |||
| 1933 | - | } | |||
| 1934 | - | r := (*capi.CEFApiVersionTestScopedClientChildT)(ptr) | |||
| 1935 | - | base := (*capi.CEFBaseRefCountedT)(ptr) | |||
| 1936 | - | base.CallAddRef() | |||
| 1937 | - | impl := &apiVersionTestScopedClientChildImpl{rawPtr: r} | |||
| 1938 | - | runtime.SetFinalizer(impl, (*apiVersionTestScopedClientChildImpl).Release) | |||
| 1939 | - | return impl | |||
| 1940 | - | } | |||
| 1941 | - | ||||
| 1942 | // ApiVersionTestScopedClientChildV2 Client-side child test object for OwnPtr/RawPtr. This replaces cef_api_version_test_scoped_client_child_t in version 13302. | 1193 | // ApiVersionTestScopedClientChildV2 Client-side child test object for OwnPtr/RawPtr. This replaces cef_api_version_test_scoped_client_child_t in version 13302. | ||
| 1943 | type ApiVersionTestScopedClientChildV2 = portin.ApiVersionTestScopedClientChildV2 | 1194 | type ApiVersionTestScopedClientChildV2 = portin.ApiVersionTestScopedClientChildV2 | ||
| 1944 | 1195 | ||||
| @@ -2064,61 +1315,43 @@ func wrapApiVersionTestScopedClientChildV2(ptr unsafe.Pointer) ApiVersionTestSco | |||||
| 2064 | // ApiVersionTestCreate Create the test object. | 1315 | // ApiVersionTestCreate Create the test object. | ||
| 2065 | func ApiVersionTestCreate() ApiVersionTest { | 1316 | func ApiVersionTestCreate() ApiVersionTest { | ||
| 2066 | ret := capi.CEFApiVersionTestCreate() | 1317 | ret := capi.CEFApiVersionTestCreate() | ||
| 2067 | - | return wrapApiVersionTest(ret) | 1318 | + | return takeApiVersionTest(ret) |
| 2068 | } | 1319 | } | ||
| 2069 | 1320 | ||||
| 2070 | // ApiVersionTestRefPtrLibraryCreate Create the test object. | 1321 | // ApiVersionTestRefPtrLibraryCreate Create the test object. | ||
| 2071 | func ApiVersionTestRefPtrLibraryCreate() ApiVersionTestRefPtrLibrary { | 1322 | func ApiVersionTestRefPtrLibraryCreate() ApiVersionTestRefPtrLibrary { | ||
| 2072 | ret := capi.CEFApiVersionTestRefPtrLibraryCreate() | 1323 | ret := capi.CEFApiVersionTestRefPtrLibraryCreate() | ||
| 2073 | - | return wrapApiVersionTestRefPtrLibrary(ret) | 1324 | + | return takeApiVersionTestRefPtrLibrary(ret) |
| 2074 | } | 1325 | } | ||
| 2075 | 1326 | ||||
| 2076 | // ApiVersionTestRefPtrLibraryCreateWithDefault Create the test object with default value. | 1327 | // ApiVersionTestRefPtrLibraryCreateWithDefault Create the test object with default value. | ||
| 2077 | func ApiVersionTestRefPtrLibraryCreateWithDefault(value int32) ApiVersionTestRefPtrLibrary { | 1328 | func ApiVersionTestRefPtrLibraryCreateWithDefault(value int32) ApiVersionTestRefPtrLibrary { | ||
| 2078 | ret := capi.CEFApiVersionTestRefPtrLibraryCreateWithDefault(value) | 1329 | ret := capi.CEFApiVersionTestRefPtrLibraryCreateWithDefault(value) | ||
| 2079 | - | return wrapApiVersionTestRefPtrLibrary(ret) | 1330 | + | return takeApiVersionTestRefPtrLibrary(ret) |
| 2080 | } | 1331 | } | ||
| 2081 | 1332 | ||||
| 2082 | // ApiVersionTestRefPtrLibraryChildCreate Create the test object. | 1333 | // ApiVersionTestRefPtrLibraryChildCreate Create the test object. | ||
| 2083 | func ApiVersionTestRefPtrLibraryChildCreate() ApiVersionTestRefPtrLibraryChild { | 1334 | func ApiVersionTestRefPtrLibraryChildCreate() ApiVersionTestRefPtrLibraryChild { | ||
| 2084 | ret := capi.CEFApiVersionTestRefPtrLibraryChildCreate() | 1335 | ret := capi.CEFApiVersionTestRefPtrLibraryChildCreate() | ||
| 2085 | - | return wrapApiVersionTestRefPtrLibraryChild(ret) | 1336 | + | return takeApiVersionTestRefPtrLibraryChild(ret) |
| 2086 | } | 1337 | } | ||
| 2087 | 1338 | ||||
| 2088 | // ApiVersionTestRefPtrLibraryChildCreateWithDefault Create the test object with default value. | 1339 | // ApiVersionTestRefPtrLibraryChildCreateWithDefault Create the test object with default value. | ||
| 2089 | func ApiVersionTestRefPtrLibraryChildCreateWithDefault(value int32, otherValue int32) ApiVersionTestRefPtrLibraryChild { | 1340 | func ApiVersionTestRefPtrLibraryChildCreateWithDefault(value int32, otherValue int32) ApiVersionTestRefPtrLibraryChild { | ||
| 2090 | ret := capi.CEFApiVersionTestRefPtrLibraryChildCreateWithDefault(value, otherValue) | 1341 | ret := capi.CEFApiVersionTestRefPtrLibraryChildCreateWithDefault(value, otherValue) | ||
| 2091 | - | return wrapApiVersionTestRefPtrLibraryChild(ret) | 1342 | + | return takeApiVersionTestRefPtrLibraryChild(ret) |
| 2092 | - | } | |||
| 2093 | - | ||||
| 2094 | - | // ApiVersionTestRefPtrLibraryChildChildCreate Create the test object. | |||
| 2095 | - | func ApiVersionTestRefPtrLibraryChildChildCreate() ApiVersionTestRefPtrLibraryChildChild { | |||
| 2096 | - | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildCreate() | |||
| 2097 | - | return wrapApiVersionTestRefPtrLibraryChildChild(ret) | |||
| 2098 | - | } | |||
| 2099 | - | ||||
| 2100 | - | // ApiVersionTestRefPtrLibraryChildChildV1Create Create the test object. | |||
| 2101 | - | func ApiVersionTestRefPtrLibraryChildChildV1Create() ApiVersionTestRefPtrLibraryChildChildV1 { | |||
| 2102 | - | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV1Create() | |||
| 2103 | - | return wrapApiVersionTestRefPtrLibraryChildChildV1(ret) | |||
| 2104 | - | } | |||
| 2105 | - | ||||
| 2106 | - | // ApiVersionTestRefPtrLibraryChildChildV1CreateWithDefault Create the test object with default value. | |||
| 2107 | - | func ApiVersionTestRefPtrLibraryChildChildV1CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestRefPtrLibraryChildChildV1 { | |||
| 2108 | - | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV1CreateWithDefault(value, otherValue, otherOtherValue) | |||
| 2109 | - | return wrapApiVersionTestRefPtrLibraryChildChildV1(ret) | |||
| 2110 | } | 1343 | } | ||
| 2111 | 1344 | ||||
| 2112 | // ApiVersionTestRefPtrLibraryChildChildV2Create Create the test object. | 1345 | // ApiVersionTestRefPtrLibraryChildChildV2Create Create the test object. | ||
| 2113 | func ApiVersionTestRefPtrLibraryChildChildV2Create() ApiVersionTestRefPtrLibraryChildChildV2 { | 1346 | func ApiVersionTestRefPtrLibraryChildChildV2Create() ApiVersionTestRefPtrLibraryChildChildV2 { | ||
| 2114 | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV2Create() | 1347 | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV2Create() | ||
| 2115 | - | return wrapApiVersionTestRefPtrLibraryChildChildV2(ret) | 1348 | + | return takeApiVersionTestRefPtrLibraryChildChildV2(ret) |
| 2116 | } | 1349 | } | ||
| 2117 | 1350 | ||||
| 2118 | // ApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault Create the test object with default value. | 1351 | // ApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault Create the test object with default value. | ||
| 2119 | func ApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestRefPtrLibraryChildChildV2 { | 1352 | func ApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestRefPtrLibraryChildChildV2 { | ||
| 2120 | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault(value, otherValue, otherOtherValue) | 1353 | ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault(value, otherValue, otherOtherValue) | ||
| 2121 | - | return wrapApiVersionTestRefPtrLibraryChildChildV2(ret) | 1354 | + | return takeApiVersionTestRefPtrLibraryChildChildV2(ret) |
| 2122 | } | 1355 | } | ||
| 2123 | 1356 | ||||
| 2124 | // ApiVersionTestScopedLibraryCreate Create the test object. | 1357 | // ApiVersionTestScopedLibraryCreate Create the test object. | ||
| @@ -2136,41 +1369,23 @@ func ApiVersionTestScopedLibraryCreateWithDefault(value int32) ApiVersionTestSco | |||||
| 2136 | // ApiVersionTestScopedLibraryChildCreate Create the test object. | 1369 | // ApiVersionTestScopedLibraryChildCreate Create the test object. | ||
| 2137 | func ApiVersionTestScopedLibraryChildCreate() ApiVersionTestScopedLibraryChild { | 1370 | func ApiVersionTestScopedLibraryChildCreate() ApiVersionTestScopedLibraryChild { | ||
| 2138 | ret := capi.CEFApiVersionTestScopedLibraryChildCreate() | 1371 | ret := capi.CEFApiVersionTestScopedLibraryChildCreate() | ||
| 2139 | - | return wrapApiVersionTestScopedLibraryChild(ret) | 1372 | + | return takeApiVersionTestScopedLibraryChild(ret) |
| 2140 | } | 1373 | } | ||
| 2141 | 1374 | ||||
| 2142 | // ApiVersionTestScopedLibraryChildCreateWithDefault Create the test object with default value. | 1375 | // ApiVersionTestScopedLibraryChildCreateWithDefault Create the test object with default value. | ||
| 2143 | func ApiVersionTestScopedLibraryChildCreateWithDefault(value int32, otherValue int32) ApiVersionTestScopedLibraryChild { | 1376 | func ApiVersionTestScopedLibraryChildCreateWithDefault(value int32, otherValue int32) ApiVersionTestScopedLibraryChild { | ||
| 2144 | ret := capi.CEFApiVersionTestScopedLibraryChildCreateWithDefault(value, otherValue) | 1377 | ret := capi.CEFApiVersionTestScopedLibraryChildCreateWithDefault(value, otherValue) | ||
| 2145 | - | return wrapApiVersionTestScopedLibraryChild(ret) | 1378 | + | return takeApiVersionTestScopedLibraryChild(ret) |
| 2146 | - | } | |||
| 2147 | - | ||||
| 2148 | - | // ApiVersionTestScopedLibraryChildChildCreate Create the test object. | |||
| 2149 | - | func ApiVersionTestScopedLibraryChildChildCreate() ApiVersionTestScopedLibraryChildChild { | |||
| 2150 | - | ret := capi.CEFApiVersionTestScopedLibraryChildChildCreate() | |||
| 2151 | - | return wrapApiVersionTestScopedLibraryChildChild(ret) | |||
| 2152 | - | } | |||
| 2153 | - | ||||
| 2154 | - | // ApiVersionTestScopedLibraryChildChildV1Create Create the test object. | |||
| 2155 | - | func ApiVersionTestScopedLibraryChildChildV1Create() ApiVersionTestScopedLibraryChildChildV1 { | |||
| 2156 | - | ret := capi.CEFApiVersionTestScopedLibraryChildChildV1Create() | |||
| 2157 | - | return wrapApiVersionTestScopedLibraryChildChildV1(ret) | |||
| 2158 | - | } | |||
| 2159 | - | ||||
| 2160 | - | // ApiVersionTestScopedLibraryChildChildV1CreateWithDefault Create the test object with default value. | |||
| 2161 | - | func ApiVersionTestScopedLibraryChildChildV1CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestScopedLibraryChildChildV1 { | |||
| 2162 | - | ret := capi.CEFApiVersionTestScopedLibraryChildChildV1CreateWithDefault(value, otherValue, otherOtherValue) | |||
| 2163 | - | return wrapApiVersionTestScopedLibraryChildChildV1(ret) | |||
| 2164 | } | 1379 | } | ||
| 2165 | 1380 | ||||
| 2166 | // ApiVersionTestScopedLibraryChildChildV2Create Create the test object. | 1381 | // ApiVersionTestScopedLibraryChildChildV2Create Create the test object. | ||
| 2167 | func ApiVersionTestScopedLibraryChildChildV2Create() ApiVersionTestScopedLibraryChildChildV2 { | 1382 | func ApiVersionTestScopedLibraryChildChildV2Create() ApiVersionTestScopedLibraryChildChildV2 { | ||
| 2168 | ret := capi.CEFApiVersionTestScopedLibraryChildChildV2Create() | 1383 | ret := capi.CEFApiVersionTestScopedLibraryChildChildV2Create() | ||
| 2169 | - | return wrapApiVersionTestScopedLibraryChildChildV2(ret) | 1384 | + | return takeApiVersionTestScopedLibraryChildChildV2(ret) |
| 2170 | } | 1385 | } | ||
| 2171 | 1386 | ||||
| 2172 | // ApiVersionTestScopedLibraryChildChildV2CreateWithDefault Create the test object with default value. | 1387 | // ApiVersionTestScopedLibraryChildChildV2CreateWithDefault Create the test object with default value. | ||
| 2173 | func ApiVersionTestScopedLibraryChildChildV2CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestScopedLibraryChildChildV2 { | 1388 | func ApiVersionTestScopedLibraryChildChildV2CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestScopedLibraryChildChildV2 { | ||
| 2174 | ret := capi.CEFApiVersionTestScopedLibraryChildChildV2CreateWithDefault(value, otherValue, otherOtherValue) | 1389 | ret := capi.CEFApiVersionTestScopedLibraryChildChildV2CreateWithDefault(value, otherValue, otherOtherValue) | ||
| 2175 | - | return wrapApiVersionTestScopedLibraryChildChildV2(ret) | 1390 | + | return takeApiVersionTestScopedLibraryChildChildV2(ret) |
| 2176 | } | 1391 | } | ||