detached 08629e9

Merge pull request #358 from bnema/fix/cef-canvas-background

fix(cef): keep browser canvas white, move anti-flash to presentation layer
commit
08629e9db8c0d3927d6b60bbac71329688bebd29
author
bnema · · 2026-07-22 05:43 UTC
committer
GitHub · · 2026-07-22 05:43 UTC
merge of
3b318d2 + 902c404 · diff against the first parent
signature
GPG UnverifiedB5690EEEBB952194 The key is unknown
80 files · +1985 -2004
M go.mod +1 -1
@@ -6,7 +6,7 @@ require (
66 github.com/a-h/templ v0.3.1020
77 github.com/andybalholm/brotli v1.2.2
88 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
1010 github.com/bnema/purego-cef2gtk v0.8.5
1111 github.com/bnema/purego-pipewire v0.1.5
1212 github.com/bnema/purego-sqlite v0.1.4
@@ -6,7 +6,7 @@ require (
6 github.com/a-h/templ v0.3.10206 github.com/a-h/templ v0.3.1020
7 github.com/andybalholm/brotli v1.2.27 github.com/andybalholm/brotli v1.2.2
8 github.com/bnema/purego v0.11.0-bnema.48 github.com/bnema/purego v0.11.0-bnema.4
9- github.com/bnema/purego-cef v0.13.49+ github.com/bnema/purego-cef v0.14.1
10 github.com/bnema/purego-cef2gtk v0.8.510 github.com/bnema/purego-cef2gtk v0.8.5
11 github.com/bnema/purego-pipewire v0.1.511 github.com/bnema/purego-pipewire v0.1.5
12 github.com/bnema/purego-sqlite v0.1.412 github.com/bnema/purego-sqlite v0.1.4
M go.sum +2 -2 generated file: collapsed
A internal/infrastructure/cef/background_guard.go +106 -0
@@ -0,0 +1,106 @@
1+package cef
2+
3+import (
4+ "fmt"
5+
6+ "github.com/bnema/puregotk/v4/gdk"
7+ "github.com/bnema/puregotk/v4/gtk"
8+)
9+
10+// opaqueWhiteBackground is Chromium's standard windowless canvas fallback. It is
11+// baked into every BrowserSettings.BackgroundColor so pages that paint nothing
12+// get an opaque white canvas (never a theme-dark one). A zero value must not be
13+// used: in windowless/OSR mode a zero-alpha background enables transparent
14+// painting, which this engine does not want.
15+const opaqueWhiteBackground uint32 = 0xFFFFFFFF
16+
17+// flashGuardCSSClassPrefix scopes each WebView's transient background provider to
18+// its own render widget so guards from different tabs never collide.
19+const flashGuardCSSClassPrefix = "dumber-cef-flash-guard-"
20+
21+// colorByteMask isolates a single 8-bit channel from a packed ARGB value.
22+const colorByteMask = 0xFF
23+
24+// applyBackgroundFlashGuard paints the theme background color behind the CEF
25+// render widget until the first frame is presented. It is the presentation-layer
26+// replacement for the former dark BrowserSettings.BackgroundColor: Chromium's
27+// canvas is now always opaque white, so the anti-white-flash lives here instead.
28+// The bridge widget (a GtkPicture/GtkGLArea) renders its CSS background until an
29+// opaque frame texture covers it, at which point markFirstFramePainted tears the
30+// guard down. Must run on the GTK main thread.
31+func (wv *WebView) applyBackgroundFlashGuard(widget *gtk.Widget) {
32+ if wv == nil || widget == nil {
33+ return
34+ }
35+ argb := wv.backgroundColor
36+ if argb == 0 {
37+ return // No theme color configured; nothing to guard against.
38+ }
39+ display := gdk.DisplayGetDefault()
40+ if display == nil {
41+ return
42+ }
43+
44+ a := float64((argb>>24)&colorByteMask) / colorScale
45+ r := (argb >> 16) & colorByteMask
46+ g := (argb >> 8) & colorByteMask
47+ b := argb & colorByteMask
48+ class := fmt.Sprintf("%s%d", flashGuardCSSClassPrefix, uint64(wv.id))
49+ css := fmt.Sprintf(".%s { background-color: rgba(%d, %d, %d, %.4f); }", class, r, g, b, a)
50+
51+ provider := gtk.NewCssProvider()
52+ if provider == nil {
53+ return
54+ }
55+ provider.LoadFromString(css)
56+
57+ wv.bgGuardMu.Lock()
58+ defer wv.bgGuardMu.Unlock()
59+ if wv.firstFramePainted.Load() {
60+ return // First frame already arrived before the guard could be installed.
61+ }
62+ widget.AddCssClass(class)
63+ gtk.StyleContextAddProviderForDisplay(display, provider, uint(gtk.STYLE_PROVIDER_PRIORITY_APPLICATION))
64+ wv.bgGuardProvider = provider
65+ wv.bgGuardWidget = widget
66+ wv.bgGuardClass = class
67+}
68+
69+// markFirstFramePainted records that the first CEF frame has been presented and
70+// schedules teardown of the background flash guard so later frames render
71+// normally. Safe to call from any thread and idempotent.
72+func (wv *WebView) markFirstFramePainted() {
73+ if wv == nil || !wv.firstFramePainted.CompareAndSwap(false, true) {
74+ return
75+ }
76+ wv.runOnGTK(func() {
77+ wv.removeBackgroundFlashGuard()
78+ })
79+}
80+
81+// removeBackgroundFlashGuard detaches the transient theme-background provider and
82+// clears the render widget's guard class. Must run on the GTK main thread. It is
83+// safe to call when no guard is installed.
84+func (wv *WebView) removeBackgroundFlashGuard() {
85+ if wv == nil {
86+ return
87+ }
88+ wv.bgGuardMu.Lock()
89+ provider := wv.bgGuardProvider
90+ widget := wv.bgGuardWidget
91+ class := wv.bgGuardClass
92+ wv.bgGuardProvider = nil
93+ wv.bgGuardWidget = nil
94+ wv.bgGuardClass = ""
95+ wv.bgGuardMu.Unlock()
96+
97+ if provider == nil {
98+ return
99+ }
100+ if widget != nil && class != "" {
101+ widget.RemoveCssClass(class)
102+ }
103+ if display := gdk.DisplayGetDefault(); display != nil {
104+ gtk.StyleContextRemoveProviderForDisplay(display, provider)
105+ }
106+}
@@ -0,0 +1,106 @@
1+package cef
2+
3+import (
4+ "fmt"
5+
6+ "github.com/bnema/puregotk/v4/gdk"
7+ "github.com/bnema/puregotk/v4/gtk"
8+)
9+
10+// opaqueWhiteBackground is Chromium's standard windowless canvas fallback. It is
11+// baked into every BrowserSettings.BackgroundColor so pages that paint nothing
12+// get an opaque white canvas (never a theme-dark one). A zero value must not be
13+// used: in windowless/OSR mode a zero-alpha background enables transparent
14+// painting, which this engine does not want.
15+const opaqueWhiteBackground uint32 = 0xFFFFFFFF
16+
17+// flashGuardCSSClassPrefix scopes each WebView's transient background provider to
18+// its own render widget so guards from different tabs never collide.
19+const flashGuardCSSClassPrefix = "dumber-cef-flash-guard-"
20+
21+// colorByteMask isolates a single 8-bit channel from a packed ARGB value.
22+const colorByteMask = 0xFF
23+
24+// applyBackgroundFlashGuard paints the theme background color behind the CEF
25+// render widget until the first frame is presented. It is the presentation-layer
26+// replacement for the former dark BrowserSettings.BackgroundColor: Chromium's
27+// canvas is now always opaque white, so the anti-white-flash lives here instead.
28+// The bridge widget (a GtkPicture/GtkGLArea) renders its CSS background until an
29+// opaque frame texture covers it, at which point markFirstFramePainted tears the
30+// guard down. Must run on the GTK main thread.
31+func (wv *WebView) applyBackgroundFlashGuard(widget *gtk.Widget) {
32+ if wv == nil || widget == nil {
33+ return
34+ }
35+ argb := wv.backgroundColor
36+ if argb == 0 {
37+ return // No theme color configured; nothing to guard against.
38+ }
39+ display := gdk.DisplayGetDefault()
40+ if display == nil {
41+ return
42+ }
43+
44+ a := float64((argb>>24)&colorByteMask) / colorScale
45+ r := (argb >> 16) & colorByteMask
46+ g := (argb >> 8) & colorByteMask
47+ b := argb & colorByteMask
48+ class := fmt.Sprintf("%s%d", flashGuardCSSClassPrefix, uint64(wv.id))
49+ css := fmt.Sprintf(".%s { background-color: rgba(%d, %d, %d, %.4f); }", class, r, g, b, a)
50+
51+ provider := gtk.NewCssProvider()
52+ if provider == nil {
53+ return
54+ }
55+ provider.LoadFromString(css)
56+
57+ wv.bgGuardMu.Lock()
58+ defer wv.bgGuardMu.Unlock()
59+ if wv.firstFramePainted.Load() {
60+ return // First frame already arrived before the guard could be installed.
61+ }
62+ widget.AddCssClass(class)
63+ gtk.StyleContextAddProviderForDisplay(display, provider, uint(gtk.STYLE_PROVIDER_PRIORITY_APPLICATION))
64+ wv.bgGuardProvider = provider
65+ wv.bgGuardWidget = widget
66+ wv.bgGuardClass = class
67+}
68+
69+// markFirstFramePainted records that the first CEF frame has been presented and
70+// schedules teardown of the background flash guard so later frames render
71+// normally. Safe to call from any thread and idempotent.
72+func (wv *WebView) markFirstFramePainted() {
73+ if wv == nil || !wv.firstFramePainted.CompareAndSwap(false, true) {
74+ return
75+ }
76+ wv.runOnGTK(func() {
77+ wv.removeBackgroundFlashGuard()
78+ })
79+}
80+
81+// removeBackgroundFlashGuard detaches the transient theme-background provider and
82+// clears the render widget's guard class. Must run on the GTK main thread. It is
83+// safe to call when no guard is installed.
84+func (wv *WebView) removeBackgroundFlashGuard() {
85+ if wv == nil {
86+ return
87+ }
88+ wv.bgGuardMu.Lock()
89+ provider := wv.bgGuardProvider
90+ widget := wv.bgGuardWidget
91+ class := wv.bgGuardClass
92+ wv.bgGuardProvider = nil
93+ wv.bgGuardWidget = nil
94+ wv.bgGuardClass = ""
95+ wv.bgGuardMu.Unlock()
96+
97+ if provider == nil {
98+ return
99+ }
100+ if widget != nil && class != "" {
101+ widget.RemoveCssClass(class)
102+ }
103+ if display := gdk.DisplayGetDefault(); display != nil {
104+ gtk.StyleContextRemoveProviderForDisplay(display, provider)
105+ }
106+}
M internal/infrastructure/cef/factory.go +12 -8
@@ -27,7 +27,7 @@ type WebViewFactory struct {
2727 windowlessFrameRate int32
2828 windowlessFrameRateMax int32
2929 inputConfig RuntimeInputConfig
30- bgColor atomic.Uint32 // packed ARGB for BrowserSettings.BackgroundColor
30+ bgColor atomic.Uint32 // packed ARGB theme color for the presentation-layer flash guard
3131 audioOutputFactory port.AudioOutputFactory
3232 }
3333
@@ -69,7 +69,9 @@ func newWebViewFactory(engine *Engine, opts webViewFactoryOptions) *WebViewFacto
6969 }
7070 }
7171
72-// setDefaultBackgroundColor stores a packed ARGB color for new browser creation.
72+// setDefaultBackgroundColor stores the packed ARGB theme color used by the
73+// presentation-layer flash guard on newly-created WebViews. It no longer feeds
74+// BrowserSettings.BackgroundColor, which is always opaque white.
7375 func (f *WebViewFactory) setDefaultBackgroundColor(r, g, b, a float64) {
7476 const s = colorScale
7577 argb := uint32(a*s)<<24 | uint32(r*s)<<16 | uint32(g*s)<<8 | uint32(b*s)
@@ -96,9 +98,9 @@ func (f *WebViewFactory) Create(ctx context.Context) (port.WebView, error) {
9698 settings := purecef.NewBrowserSettings()
9799 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})
98100 settings.LocalStorage = 1 // CEF_STATE_ENABLED
99- if bg := f.bgColor.Load(); bg != 0 {
100- settings.BackgroundColor = bg
101- }
101+ // Always opaque white: Chromium's standard canvas fallback. The theme
102+ // background is applied at the presentation layer as a flash guard instead.
103+ settings.BackgroundColor = opaqueWhiteBackground
102104
103105 // Defer browser creation until the bridge view has a non-zero size.
104106 // CEF requires GetViewRect to return a non-empty rect, but the GL area
@@ -142,6 +144,8 @@ func (f *WebViewFactory) newWebView(ctx context.Context) (*WebView, error) {
142144 wv.nativeWidget = popupRoot
143145 }
144146 }
147+ // Guard the render widget with the theme background until the first frame.
148+ wv.applyBackgroundFlashGuard(nativeWidget)
145149 })
146150 if !result.Completed() {
147151 wv.destroyViewBridgeOnGTKAsync()
@@ -383,9 +387,9 @@ func (f *WebViewFactory) CreateRelated(ctx context.Context, parentID port.WebVie
383387 settings := purecef.NewBrowserSettings()
384388 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})
385389 settings.LocalStorage = 1 // CEF_STATE_ENABLED
386- if bg := f.bgColor.Load(); bg != 0 {
387- settings.BackgroundColor = bg
388- }
390+ // Always opaque white: the theme background is applied as a presentation-layer
391+ // flash guard, not baked into Chromium's canvas.
392+ settings.BackgroundColor = opaqueWhiteBackground
389393
390394 if err := f.configureInitialBrowserCreation(ctx, popupWV, popupWV.client, &windowInfo, &settings, func(w, h int32) {
391395 f.handlePopupShellInitialResize(ctx, popupWV, func(w, h int32) {
@@ -27,7 +27,7 @@ type WebViewFactory struct {
27 windowlessFrameRate int3227 windowlessFrameRate int32
28 windowlessFrameRateMax int3228 windowlessFrameRateMax int32
29 inputConfig RuntimeInputConfig29 inputConfig RuntimeInputConfig
30- bgColor atomic.Uint32 // packed ARGB for BrowserSettings.BackgroundColor30+ bgColor atomic.Uint32 // packed ARGB theme color for the presentation-layer flash guard
31 audioOutputFactory port.AudioOutputFactory31 audioOutputFactory port.AudioOutputFactory
32 }32 }
33 33
@@ -69,7 +69,9 @@ func newWebViewFactory(engine *Engine, opts webViewFactoryOptions) *WebViewFacto
69 }69 }
70 }70 }
71 71
72-// setDefaultBackgroundColor stores a packed ARGB color for new browser creation.72+// setDefaultBackgroundColor stores the packed ARGB theme color used by the
73+// presentation-layer flash guard on newly-created WebViews. It no longer feeds
74+// BrowserSettings.BackgroundColor, which is always opaque white.
73 func (f *WebViewFactory) setDefaultBackgroundColor(r, g, b, a float64) {75 func (f *WebViewFactory) setDefaultBackgroundColor(r, g, b, a float64) {
74 const s = colorScale76 const s = colorScale
75 argb := uint32(a*s)<<24 | uint32(r*s)<<16 | uint32(g*s)<<8 | uint32(b*s)77 argb := uint32(a*s)<<24 | uint32(r*s)<<16 | uint32(g*s)<<8 | uint32(b*s)
@@ -96,9 +98,9 @@ func (f *WebViewFactory) Create(ctx context.Context) (port.WebView, error) {
96 settings := purecef.NewBrowserSettings()98 settings := purecef.NewBrowserSettings()
97 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})99 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})
98 settings.LocalStorage = 1 // CEF_STATE_ENABLED100 settings.LocalStorage = 1 // CEF_STATE_ENABLED
99- if bg := f.bgColor.Load(); bg != 0 {101+ // Always opaque white: Chromium's standard canvas fallback. The theme
100- settings.BackgroundColor = bg102+ // background is applied at the presentation layer as a flash guard instead.
101- }103+ settings.BackgroundColor = opaqueWhiteBackground
102 104
103 // Defer browser creation until the bridge view has a non-zero size.105 // Defer browser creation until the bridge view has a non-zero size.
104 // CEF requires GetViewRect to return a non-empty rect, but the GL area106 // CEF requires GetViewRect to return a non-empty rect, but the GL area
@@ -142,6 +144,8 @@ func (f *WebViewFactory) newWebView(ctx context.Context) (*WebView, error) {
142 wv.nativeWidget = popupRoot144 wv.nativeWidget = popupRoot
143 }145 }
144 }146 }
147+ // Guard the render widget with the theme background until the first frame.
148+ wv.applyBackgroundFlashGuard(nativeWidget)
145 })149 })
146 if !result.Completed() {150 if !result.Completed() {
147 wv.destroyViewBridgeOnGTKAsync()151 wv.destroyViewBridgeOnGTKAsync()
@@ -383,9 +387,9 @@ func (f *WebViewFactory) CreateRelated(ctx context.Context, parentID port.WebVie
383 settings := purecef.NewBrowserSettings()387 settings := purecef.NewBrowserSettings()
384 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})388 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})
385 settings.LocalStorage = 1 // CEF_STATE_ENABLED389 settings.LocalStorage = 1 // CEF_STATE_ENABLED
386- if bg := f.bgColor.Load(); bg != 0 {390+ // Always opaque white: the theme background is applied as a presentation-layer
387- settings.BackgroundColor = bg391+ // flash guard, not baked into Chromium's canvas.
388- }392+ settings.BackgroundColor = opaqueWhiteBackground
389 393
390 if err := f.configureInitialBrowserCreation(ctx, popupWV, popupWV.client, &windowInfo, &settings, func(w, h int32) {394 if err := f.configureInitialBrowserCreation(ctx, popupWV, popupWV.client, &windowInfo, &settings, func(w, h int32) {
391 f.handlePopupShellInitialResize(ctx, popupWV, func(w, h int32) {395 f.handlePopupShellInitialResize(ctx, popupWV, func(w, h int32) {
M internal/infrastructure/cef/render_handler_adapter.go +9 -0
@@ -51,6 +51,15 @@ func newDumberRenderHandler(wv *WebView) purecef.RenderHandler {
5151
5252 var unsupportedPaintOnce sync.Once
5353 hooks := startupPresentationHooks(activeStartupTrace())
54+ // Tear down the theme background flash guard once the first frame is
55+ // presented, without dropping the startup trace mark the bridge already set.
56+ firstAcceleratedPaint := hooks.OnFirstAcceleratedPaint
57+ hooks.OnFirstAcceleratedPaint = func() {
58+ if firstAcceleratedPaint != nil {
59+ firstAcceleratedPaint()
60+ }
61+ wv.markFirstFramePainted()
62+ }
5463 hooks.OnUnsupportedPaint = func() {
5564 unsupportedPaintOnce.Do(func() {
5665 if wv.ctx != nil {
@@ -51,6 +51,15 @@ func newDumberRenderHandler(wv *WebView) purecef.RenderHandler {
51 51
52 var unsupportedPaintOnce sync.Once52 var unsupportedPaintOnce sync.Once
53 hooks := startupPresentationHooks(activeStartupTrace())53 hooks := startupPresentationHooks(activeStartupTrace())
54+ // Tear down the theme background flash guard once the first frame is
55+ // presented, without dropping the startup trace mark the bridge already set.
56+ firstAcceleratedPaint := hooks.OnFirstAcceleratedPaint
57+ hooks.OnFirstAcceleratedPaint = func() {
58+ if firstAcceleratedPaint != nil {
59+ firstAcceleratedPaint()
60+ }
61+ wv.markFirstFramePainted()
62+ }
54 hooks.OnUnsupportedPaint = func() {63 hooks.OnUnsupportedPaint = func() {
55 unsupportedPaintOnce.Do(func() {64 unsupportedPaintOnce.Do(func() {
56 if wv.ctx != nil {65 if wv.ctx != nil {
M internal/infrastructure/cef/webview.go +20 -11
@@ -239,6 +239,18 @@ type WebView struct {
239239 backgroundColor uint32
240240 inputConfig RuntimeInputConfig
241241
242+ // Background flash guard: a theme-colored CSS provider painted behind the
243+ // render widget until the first CEF frame is presented. It replaces the
244+ // former dark BrowserSettings.BackgroundColor anti-white-flash, whose canvas
245+ // is now always opaque white. State is guarded by bgGuardMu; firstFramePainted
246+ // gates the one-shot teardown and resets naturally when a fresh WebView is
247+ // created after a browser recreation.
248+ firstFramePainted atomic.Bool
249+ bgGuardMu sync.Mutex
250+ bgGuardProvider *gtk.CssProvider
251+ bgGuardWidget *gtk.Widget
252+ bgGuardClass string
253+
242254 // Touchpad input diagnostics are debounced to avoid flooding logs while
243255 // debugging continuous scroll streams.
244256 touchpadNavigation *touchpadNavigationRecognizer
@@ -992,7 +1004,7 @@ func (wv *WebView) prepareNativePopup(
9921004 prep.parent.trackPendingNativePopup(popupID, wv)
9931005 }
9941006
995- configureNativePopupWindow(windowInfo, settings, prep.frameRate, prep.backgroundColor)
1007+ configureNativePopupWindow(windowInfo, settings, prep.frameRate)
9961008 clientSlot.Set(client)
9971009 return true
9981010 }
@@ -1007,9 +1019,8 @@ func (wv *WebView) nativePopupPreparationSnapshot() (nativePopupPreparation, boo
10071019 return nativePopupPreparation{}, false
10081020 }
10091021 return nativePopupPreparation{
1010- parent: wv.nativePopupParent,
1011- frameRate: wv.windowlessFrameRate,
1012- backgroundColor: wv.backgroundColor,
1022+ parent: wv.nativePopupParent,
1023+ frameRate: wv.windowlessFrameRate,
10131024 }, true
10141025 }
10151026
@@ -1045,7 +1056,6 @@ func configureNativePopupWindow(
10451056 windowInfo *purecef.WindowInfo,
10461057 settings *purecef.BrowserSettings,
10471058 frameRate int32,
1048- backgroundColor uint32,
10491059 ) {
10501060 cef2gtk.ConfigureWindowInfo(windowInfo, cef2gtk.WindowInfoOptions{})
10511061 if externalBeginFrameEnabled() {
@@ -1056,15 +1066,13 @@ func configureNativePopupWindow(
10561066 }
10571067 cef2gtk.ConfigureBrowserSettings(settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: frameRate})
10581068 settings.LocalStorage = 1
1059- if backgroundColor != 0 {
1060- settings.BackgroundColor = backgroundColor
1061- }
1069+ // Always opaque white; the popup shell WebView carries the theme flash guard.
1070+ settings.BackgroundColor = opaqueWhiteBackground
10621071 }
10631072
10641073 type nativePopupPreparation struct {
1065- parent *WebView
1066- frameRate int32
1067- backgroundColor uint32
1074+ parent *WebView
1075+ frameRate int32
10681076 }
10691077
10701078 func (wv *WebView) handleNativePopupAborted() {
@@ -1244,6 +1252,7 @@ func (wv *WebView) destroyViewBridgeOnGTKThread() {
12441252 if wv == nil || wv.viewBridge == nil {
12451253 return
12461254 }
1255+ wv.removeBackgroundFlashGuard()
12471256 if wv.removeSizeObserver != nil {
12481257 wv.removeSizeObserver()
12491258 wv.removeSizeObserver = nil
@@ -239,6 +239,18 @@ type WebView struct {
239 backgroundColor uint32239 backgroundColor uint32
240 inputConfig RuntimeInputConfig240 inputConfig RuntimeInputConfig
241 241
242+ // Background flash guard: a theme-colored CSS provider painted behind the
243+ // render widget until the first CEF frame is presented. It replaces the
244+ // former dark BrowserSettings.BackgroundColor anti-white-flash, whose canvas
245+ // is now always opaque white. State is guarded by bgGuardMu; firstFramePainted
246+ // gates the one-shot teardown and resets naturally when a fresh WebView is
247+ // created after a browser recreation.
248+ firstFramePainted atomic.Bool
249+ bgGuardMu sync.Mutex
250+ bgGuardProvider *gtk.CssProvider
251+ bgGuardWidget *gtk.Widget
252+ bgGuardClass string
253+
242 // Touchpad input diagnostics are debounced to avoid flooding logs while254 // Touchpad input diagnostics are debounced to avoid flooding logs while
243 // debugging continuous scroll streams.255 // debugging continuous scroll streams.
244 touchpadNavigation *touchpadNavigationRecognizer256 touchpadNavigation *touchpadNavigationRecognizer
@@ -992,7 +1004,7 @@ func (wv *WebView) prepareNativePopup(
992 prep.parent.trackPendingNativePopup(popupID, wv)1004 prep.parent.trackPendingNativePopup(popupID, wv)
993 }1005 }
994 1006
995- configureNativePopupWindow(windowInfo, settings, prep.frameRate, prep.backgroundColor)1007+ configureNativePopupWindow(windowInfo, settings, prep.frameRate)
996 clientSlot.Set(client)1008 clientSlot.Set(client)
997 return true1009 return true
998 }1010 }
@@ -1007,9 +1019,8 @@ func (wv *WebView) nativePopupPreparationSnapshot() (nativePopupPreparation, boo
1007 return nativePopupPreparation{}, false1019 return nativePopupPreparation{}, false
1008 }1020 }
1009 return nativePopupPreparation{1021 return nativePopupPreparation{
1010- parent: wv.nativePopupParent,1022+ parent: wv.nativePopupParent,
1011- frameRate: wv.windowlessFrameRate,1023+ frameRate: wv.windowlessFrameRate,
1012- backgroundColor: wv.backgroundColor,
1013 }, true1024 }, true
1014 }1025 }
1015 1026
@@ -1045,7 +1056,6 @@ func configureNativePopupWindow(
1045 windowInfo *purecef.WindowInfo,1056 windowInfo *purecef.WindowInfo,
1046 settings *purecef.BrowserSettings,1057 settings *purecef.BrowserSettings,
1047 frameRate int32,1058 frameRate int32,
1048- backgroundColor uint32,
1049 ) {1059 ) {
1050 cef2gtk.ConfigureWindowInfo(windowInfo, cef2gtk.WindowInfoOptions{})1060 cef2gtk.ConfigureWindowInfo(windowInfo, cef2gtk.WindowInfoOptions{})
1051 if externalBeginFrameEnabled() {1061 if externalBeginFrameEnabled() {
@@ -1056,15 +1066,13 @@ func configureNativePopupWindow(
1056 }1066 }
1057 cef2gtk.ConfigureBrowserSettings(settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: frameRate})1067 cef2gtk.ConfigureBrowserSettings(settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: frameRate})
1058 settings.LocalStorage = 11068 settings.LocalStorage = 1
1059- if backgroundColor != 0 {1069+ // Always opaque white; the popup shell WebView carries the theme flash guard.
1060- settings.BackgroundColor = backgroundColor1070+ settings.BackgroundColor = opaqueWhiteBackground
1061- }
1062 }1071 }
1063 1072
1064 type nativePopupPreparation struct {1073 type nativePopupPreparation struct {
1065- parent *WebView1074+ parent *WebView
1066- frameRate int321075+ frameRate int32
1067- backgroundColor uint32
1068 }1076 }
1069 1077
1070 func (wv *WebView) handleNativePopupAborted() {1078 func (wv *WebView) handleNativePopupAborted() {
@@ -1244,6 +1252,7 @@ func (wv *WebView) destroyViewBridgeOnGTKThread() {
1244 if wv == nil || wv.viewBridge == nil {1252 if wv == nil || wv.viewBridge == nil {
1245 return1253 return
1246 }1254 }
1255+ wv.removeBackgroundFlashGuard()
1247 if wv.removeSizeObserver != nil {1256 if wv.removeSizeObserver != nil {
1248 wv.removeSizeObserver()1257 wv.removeSizeObserver()
1249 wv.removeSizeObserver = nil1258 wv.removeSizeObserver = nil
M internal/infrastructure/cef/webview_handlers_test.go +2 -2
@@ -380,14 +380,14 @@ func TestConfigureNativePopupWindow_UsesSharedTextureWindowlessDefaults(t *testi
380380 windowInfo := purecef.NewWindowInfo()
381381 settings := purecef.NewBrowserSettings()
382382
383- configureNativePopupWindow(&windowInfo, &settings, 72, 0xFF112233)
383+ configureNativePopupWindow(&windowInfo, &settings, 72)
384384
385385 require.Equal(t, purecef.WindowHandle(0), windowInfo.ParentWindow)
386386 require.Equal(t, int32(1), windowInfo.WindowlessRenderingEnabled)
387387 require.Equal(t, int32(1), windowInfo.SharedTextureEnabled)
388388 require.Equal(t, int32(72), settings.WindowlessFrameRate)
389389 require.Equal(t, int32(1), settings.LocalStorage)
390- require.Equal(t, uint32(0xFF112233), settings.BackgroundColor)
390+ require.Equal(t, opaqueWhiteBackground, settings.BackgroundColor)
391391 }
392392
393393 func TestOnLoadStartFiresCommittedAndUpdatesURI(t *testing.T) {
@@ -380,14 +380,14 @@ func TestConfigureNativePopupWindow_UsesSharedTextureWindowlessDefaults(t *testi
380 windowInfo := purecef.NewWindowInfo()380 windowInfo := purecef.NewWindowInfo()
381 settings := purecef.NewBrowserSettings()381 settings := purecef.NewBrowserSettings()
382 382
383- configureNativePopupWindow(&windowInfo, &settings, 72, 0xFF112233)383+ configureNativePopupWindow(&windowInfo, &settings, 72)
384 384
385 require.Equal(t, purecef.WindowHandle(0), windowInfo.ParentWindow)385 require.Equal(t, purecef.WindowHandle(0), windowInfo.ParentWindow)
386 require.Equal(t, int32(1), windowInfo.WindowlessRenderingEnabled)386 require.Equal(t, int32(1), windowInfo.WindowlessRenderingEnabled)
387 require.Equal(t, int32(1), windowInfo.SharedTextureEnabled)387 require.Equal(t, int32(1), windowInfo.SharedTextureEnabled)
388 require.Equal(t, int32(72), settings.WindowlessFrameRate)388 require.Equal(t, int32(72), settings.WindowlessFrameRate)
389 require.Equal(t, int32(1), settings.LocalStorage)389 require.Equal(t, int32(1), settings.LocalStorage)
390- require.Equal(t, uint32(0xFF112233), settings.BackgroundColor)390+ require.Equal(t, opaqueWhiteBackground, settings.BackgroundColor)
391 }391 }
392 392
393 func TestOnLoadStartFiresCommittedAndUpdatesURI(t *testing.T) {393 func TestOnLoadStartFiresCommittedAndUpdatesURI(t *testing.T) {
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
6868 return wrapApiVersionTestRefPtrLibrary(unsafe.Pointer(ret))
6969 }
7070
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 {
7272 if obj == nil || obj.rawPtr == nil {
7373 return 0
7474 }
7575 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))
8677 return int32(ret)
8778 }
8879
@@ -144,39 +135,12 @@ func (obj *apiVersionTestImpl) SetRefPtrClientAndReturn(val ApiVersionTestRefPtr
144135 return wrapApiVersionTestRefPtrClient(unsafe.Pointer(ret))
145136 }
146137
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 {
166139 if obj == nil || obj.rawPtr == nil {
167140 return 0
168141 }
169142 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))
180144 return int32(ret)
181145 }
182146
@@ -283,24 +247,6 @@ func (obj *apiVersionTestImpl) SetOwnPtrClientAndReturn(val ApiVersionTestScoped
283247 return wrapApiVersionTestScopedClient(unsafe.Pointer(ret))
284248 }
285249
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-
304250 func (obj *apiVersionTestImpl) SetRawPtrLibrary(val ApiVersionTestScopedLibrary) int32 {
305251 if obj == nil || obj.rawPtr == nil {
306252 return 0
@@ -319,21 +265,12 @@ func (obj *apiVersionTestImpl) SetChildRawPtrLibrary(val ApiVersionTestScopedLib
319265 return int32(ret)
320266 }
321267
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 {
323269 if obj == nil || obj.rawPtr == nil {
324270 return 0
325271 }
326272 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))
337274 return int32(ret)
338275 }
339276
@@ -346,30 +283,12 @@ func (obj *apiVersionTestImpl) SetRawPtrClient(val ApiVersionTestScopedClient) i
346283 return int32(ret)
347284 }
348285
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 {
359287 if obj == nil || obj.rawPtr == nil {
360288 return 0
361289 }
362290 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))
373292 return int32(ret)
374293 }
375294
@@ -454,6 +373,19 @@ func wrapApiVersionTest(ptr unsafe.Pointer) ApiVersionTest {
454373 return impl
455374 }
456375
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+
457389 // ApiVersionTestRefPtrLibrary Library-side test object for RefPtr.
458390 type ApiVersionTestRefPtrLibrary = portin.ApiVersionTestRefPtrLibrary
459391
@@ -482,40 +414,6 @@ func (obj *apiVersionTestRefPtrLibraryImpl) SetValueLegacy(value int32) {
482414 rawPtr.CallSetValueLegacy(uintptr(value))
483415 }
484416
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-
519417 func (obj *apiVersionTestRefPtrLibraryImpl) GetValueV2() int32 {
520418 if obj == nil || obj.rawPtr == nil {
521419 return 0
@@ -533,23 +431,6 @@ func (obj *apiVersionTestRefPtrLibraryImpl) SetValueV2(value int32) {
533431 rawPtr.CallSetValueV2(uintptr(value))
534432 }
535433
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-
553434 func (obj *apiVersionTestRefPtrLibraryImpl) RawPointer() unsafe.Pointer {
554435 if obj == nil || obj.rawPtr == nil {
555436 return nil
@@ -586,6 +467,19 @@ func wrapApiVersionTestRefPtrLibrary(ptr unsafe.Pointer) ApiVersionTestRefPtrLib
586467 return impl
587468 }
588469
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+
589483 // ApiVersionTestRefPtrLibraryChild Library-side child test object for RefPtr.
590484 type ApiVersionTestRefPtrLibraryChild = portin.ApiVersionTestRefPtrLibraryChild
591485
@@ -650,131 +544,16 @@ func wrapApiVersionTestRefPtrLibraryChild(ptr unsafe.Pointer) ApiVersionTestRefP
650544 return impl
651545 }
652546
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 {
770551 if ptr == nil {
771552 return nil
772553 }
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)
778557 return impl
779558 }
780559
@@ -842,6 +621,19 @@ func wrapApiVersionTestRefPtrLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionT
842621 return impl
843622 }
844623
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+
845637 // ApiVersionTestRefPtrClient Client-side test object for RefPtr.
846638 type ApiVersionTestRefPtrClient = portin.ApiVersionTestRefPtrClient
847639
@@ -871,32 +663,6 @@ func apiVersionTestRefPtrClientGetValueLegacyCEFCallback() uintptr {
871663 })
872664 }
873665
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-
900666 var apiVersionTestRefPtrClientGetValueV2SharedOnce sync.Once
901667 var apiVersionTestRefPtrClientGetValueV2SharedCallback uintptr
902668
@@ -910,19 +676,6 @@ func apiVersionTestRefPtrClientGetValueV2CEFCallback() uintptr {
910676 })
911677 }
912678
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-
926679 // NewApiVersionTestRefPtrClient creates a CEF handler backed by the given implementation.
927680 func NewApiVersionTestRefPtrClient(impl ApiVersionTestRefPtrClient) ApiVersionTestRefPtrClient {
928681 if isNilImpl(impl) {
@@ -935,14 +688,8 @@ func NewApiVersionTestRefPtrClient(impl ApiVersionTestRefPtrClient) ApiVersionTe
935688
936689 r.OverrideGetValueLegacy(apiVersionTestRefPtrClientGetValueLegacyCEFCallback())
937690
938- r.OverrideGetValue(apiVersionTestRefPtrClientGetValueCEFCallback())
939-
940- r.OverrideGetValueV1(apiVersionTestRefPtrClientGetValueV1CEFCallback())
941-
942691 r.OverrideGetValueV2(apiVersionTestRefPtrClientGetValueV2CEFCallback())
943692
944- r.OverrideGetValueExp(apiVersionTestRefPtrClientGetValueExpCEFCallback())
945-
946693 return w
947694 }
948695
@@ -963,25 +710,7 @@ func (obj *apiVersionTestRefPtrClientImpl) GetValueLegacy() int32 {
963710 return int32(ret)
964711 }
965712
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 {
985714 if obj == nil || obj.rawPtr == nil {
986715 return 0
987716 }
@@ -990,15 +719,6 @@ func (obj *apiVersionTestRefPtrClientImpl) GetValueV2() int32 {
990719 return int32(ret)
991720 }
992721
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-
1002722 func (obj *apiVersionTestRefPtrClientImpl) RawPointer() unsafe.Pointer {
1003723 if obj == nil || obj.rawPtr == nil {
1004724 return nil
@@ -1036,128 +756,6 @@ func wrapApiVersionTestRefPtrClient(ptr unsafe.Pointer) ApiVersionTestRefPtrClie
1036756 return impl
1037757 }
1038758
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-
1161759 // ApiVersionTestRefPtrClientChildV2 Client-side child test object for RefPtr. This replaces cef_api_version_test_ref_ptr_client_child_t in version 13302.
1162760 type ApiVersionTestRefPtrClientChildV2 = portin.ApiVersionTestRefPtrClientChildV2
1163761
@@ -1307,40 +905,6 @@ func (obj *apiVersionTestScopedLibraryImpl) SetValueLegacy(value int32) {
1307905 rawPtr.CallSetValueLegacy(uintptr(value))
1308906 }
1309907
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-
1344908 func (obj *apiVersionTestScopedLibraryImpl) GetValueV2() int32 {
1345909 if obj == nil || obj.rawPtr == nil {
1346910 return 0
@@ -1358,23 +922,6 @@ func (obj *apiVersionTestScopedLibraryImpl) SetValueV2(value int32) {
1358922 rawPtr.CallSetValueV2(uintptr(value))
1359923 }
1360924
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-
1378925 func (obj *apiVersionTestScopedLibraryImpl) RawPointer() unsafe.Pointer {
1379926 if obj == nil || obj.rawPtr == nil {
1380927 return nil
@@ -1454,131 +1001,16 @@ func wrapApiVersionTestScopedLibraryChild(ptr unsafe.Pointer) ApiVersionTestScop
14541001 return impl
14551002 }
14561003
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 {
15101008 if ptr == nil {
15111009 return nil
15121010 }
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)
15821014 return impl
15831015 }
15841016
@@ -1646,6 +1078,19 @@ func wrapApiVersionTestScopedLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionT
16461078 return impl
16471079 }
16481080
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+
16491094 // ApiVersionTestScopedClient Client-side test object for OwnPtr/RawPtr.
16501095 type ApiVersionTestScopedClient = portin.ApiVersionTestScopedClient
16511096
@@ -1675,32 +1120,6 @@ func apiVersionTestScopedClientGetValueLegacyCEFCallback() uintptr {
16751120 })
16761121 }
16771122
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-
17041123 var apiVersionTestScopedClientGetValueV2SharedOnce sync.Once
17051124 var apiVersionTestScopedClientGetValueV2SharedCallback uintptr
17061125
@@ -1714,19 +1133,6 @@ func apiVersionTestScopedClientGetValueV2CEFCallback() uintptr {
17141133 })
17151134 }
17161135
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-
17301136 // NewApiVersionTestScopedClient creates a CEF handler backed by the given implementation.
17311137 func NewApiVersionTestScopedClient(impl ApiVersionTestScopedClient) ApiVersionTestScopedClient {
17321138 if isNilImpl(impl) {
@@ -1739,14 +1145,8 @@ func NewApiVersionTestScopedClient(impl ApiVersionTestScopedClient) ApiVersionTe
17391145
17401146 r.OverrideGetValueLegacy(apiVersionTestScopedClientGetValueLegacyCEFCallback())
17411147
1742- r.OverrideGetValue(apiVersionTestScopedClientGetValueCEFCallback())
1743-
1744- r.OverrideGetValueV1(apiVersionTestScopedClientGetValueV1CEFCallback())
1745-
17461148 r.OverrideGetValueV2(apiVersionTestScopedClientGetValueV2CEFCallback())
17471149
1748- r.OverrideGetValueExp(apiVersionTestScopedClientGetValueExpCEFCallback())
1749-
17501150 return w
17511151 }
17521152
@@ -1766,24 +1166,6 @@ func (obj *apiVersionTestScopedClientImpl) GetValueLegacy() int32 {
17661166 return int32(ret)
17671167 }
17681168
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-
17871169 func (obj *apiVersionTestScopedClientImpl) GetValueV2() int32 {
17881170 if obj == nil || obj.rawPtr == nil {
17891171 return 0
@@ -1793,15 +1175,6 @@ func (obj *apiVersionTestScopedClientImpl) GetValueV2() int32 {
17931175 return int32(ret)
17941176 }
17951177
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-
18051178 func (obj *apiVersionTestScopedClientImpl) RawPointer() unsafe.Pointer {
18061179 if obj == nil || obj.rawPtr == nil {
18071180 return nil
@@ -1817,128 +1190,6 @@ func wrapApiVersionTestScopedClient(ptr unsafe.Pointer) ApiVersionTestScopedClie
18171190 return &apiVersionTestScopedClientImpl{rawPtr: r}
18181191 }
18191192
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-
19421193 // ApiVersionTestScopedClientChildV2 Client-side child test object for OwnPtr/RawPtr. This replaces cef_api_version_test_scoped_client_child_t in version 13302.
19431194 type ApiVersionTestScopedClientChildV2 = portin.ApiVersionTestScopedClientChildV2
19441195
@@ -2064,61 +1315,43 @@ func wrapApiVersionTestScopedClientChildV2(ptr unsafe.Pointer) ApiVersionTestSco
20641315 // ApiVersionTestCreate Create the test object.
20651316 func ApiVersionTestCreate() ApiVersionTest {
20661317 ret := capi.CEFApiVersionTestCreate()
2067- return wrapApiVersionTest(ret)
1318+ return takeApiVersionTest(ret)
20681319 }
20691320
20701321 // ApiVersionTestRefPtrLibraryCreate Create the test object.
20711322 func ApiVersionTestRefPtrLibraryCreate() ApiVersionTestRefPtrLibrary {
20721323 ret := capi.CEFApiVersionTestRefPtrLibraryCreate()
2073- return wrapApiVersionTestRefPtrLibrary(ret)
1324+ return takeApiVersionTestRefPtrLibrary(ret)
20741325 }
20751326
20761327 // ApiVersionTestRefPtrLibraryCreateWithDefault Create the test object with default value.
20771328 func ApiVersionTestRefPtrLibraryCreateWithDefault(value int32) ApiVersionTestRefPtrLibrary {
20781329 ret := capi.CEFApiVersionTestRefPtrLibraryCreateWithDefault(value)
2079- return wrapApiVersionTestRefPtrLibrary(ret)
1330+ return takeApiVersionTestRefPtrLibrary(ret)
20801331 }
20811332
20821333 // ApiVersionTestRefPtrLibraryChildCreate Create the test object.
20831334 func ApiVersionTestRefPtrLibraryChildCreate() ApiVersionTestRefPtrLibraryChild {
20841335 ret := capi.CEFApiVersionTestRefPtrLibraryChildCreate()
2085- return wrapApiVersionTestRefPtrLibraryChild(ret)
1336+ return takeApiVersionTestRefPtrLibraryChild(ret)
20861337 }
20871338
20881339 // ApiVersionTestRefPtrLibraryChildCreateWithDefault Create the test object with default value.
20891340 func ApiVersionTestRefPtrLibraryChildCreateWithDefault(value int32, otherValue int32) ApiVersionTestRefPtrLibraryChild {
20901341 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)
21101343 }
21111344
21121345 // ApiVersionTestRefPtrLibraryChildChildV2Create Create the test object.
21131346 func ApiVersionTestRefPtrLibraryChildChildV2Create() ApiVersionTestRefPtrLibraryChildChildV2 {
21141347 ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV2Create()
2115- return wrapApiVersionTestRefPtrLibraryChildChildV2(ret)
1348+ return takeApiVersionTestRefPtrLibraryChildChildV2(ret)
21161349 }
21171350
21181351 // ApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault Create the test object with default value.
21191352 func ApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestRefPtrLibraryChildChildV2 {
21201353 ret := capi.CEFApiVersionTestRefPtrLibraryChildChildV2CreateWithDefault(value, otherValue, otherOtherValue)
2121- return wrapApiVersionTestRefPtrLibraryChildChildV2(ret)
1354+ return takeApiVersionTestRefPtrLibraryChildChildV2(ret)
21221355 }
21231356
21241357 // ApiVersionTestScopedLibraryCreate Create the test object.
@@ -2136,41 +1369,23 @@ func ApiVersionTestScopedLibraryCreateWithDefault(value int32) ApiVersionTestSco
21361369 // ApiVersionTestScopedLibraryChildCreate Create the test object.
21371370 func ApiVersionTestScopedLibraryChildCreate() ApiVersionTestScopedLibraryChild {
21381371 ret := capi.CEFApiVersionTestScopedLibraryChildCreate()
2139- return wrapApiVersionTestScopedLibraryChild(ret)
1372+ return takeApiVersionTestScopedLibraryChild(ret)
21401373 }
21411374
21421375 // ApiVersionTestScopedLibraryChildCreateWithDefault Create the test object with default value.
21431376 func ApiVersionTestScopedLibraryChildCreateWithDefault(value int32, otherValue int32) ApiVersionTestScopedLibraryChild {
21441377 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)
21641379 }
21651380
21661381 // ApiVersionTestScopedLibraryChildChildV2Create Create the test object.
21671382 func ApiVersionTestScopedLibraryChildChildV2Create() ApiVersionTestScopedLibraryChildChildV2 {
21681383 ret := capi.CEFApiVersionTestScopedLibraryChildChildV2Create()
2169- return wrapApiVersionTestScopedLibraryChildChildV2(ret)
1384+ return takeApiVersionTestScopedLibraryChildChildV2(ret)
21701385 }
21711386
21721387 // ApiVersionTestScopedLibraryChildChildV2CreateWithDefault Create the test object with default value.
21731388 func ApiVersionTestScopedLibraryChildChildV2CreateWithDefault(value int32, otherValue int32, otherOtherValue int32) ApiVersionTestScopedLibraryChildChildV2 {
21741389 ret := capi.CEFApiVersionTestScopedLibraryChildChildV2CreateWithDefault(value, otherValue, otherOtherValue)
2175- return wrapApiVersionTestScopedLibraryChildChildV2(ret)
1390+ return takeApiVersionTestScopedLibraryChildChildV2(ret)
21761391 }
@@ -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 073 return 0
74 }74 }
75 rawPtr := obj.rawPtr75 rawPtr := obj.rawPtr
76- var valRaw []uintptr76+ 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 0140 return 0
168 }141 }
169 rawPtr := obj.rawPtr142 rawPtr := obj.rawPtr
170- var valRaw []uintptr143+ 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 0252 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 0270 return 0
325 }271 }
326 rawPtr := obj.rawPtr272 rawPtr := obj.rawPtr
327- var valRaw []uintptr273+ 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 0288 return 0
361 }289 }
362 rawPtr := obj.rawPtr290 rawPtr := obj.rawPtr
363- var valRaw []uintptr291+ 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 impl373 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.ApiVersionTestRefPtrLibrary390 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 0419 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 nil436 return nil
@@ -586,6 +467,19 @@ func wrapApiVersionTestRefPtrLibrary(ptr unsafe.Pointer) ApiVersionTestRefPtrLib
586 return impl467 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.ApiVersionTestRefPtrLibraryChild484 type ApiVersionTestRefPtrLibraryChild = portin.ApiVersionTestRefPtrLibraryChild
591 485
@@ -650,131 +544,16 @@ func wrapApiVersionTestRefPtrLibraryChild(ptr unsafe.Pointer) ApiVersionTestRefP
650 return impl544 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.ApiVersionTestRefPtrLibraryChildChild548+// 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 nil552 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 impl557 return impl
779 }558 }
780 559
@@ -842,6 +621,19 @@ func wrapApiVersionTestRefPtrLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionT
842 return impl621 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.ApiVersionTestRefPtrClient638 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.Once666 var apiVersionTestRefPtrClientGetValueV2SharedOnce sync.Once
901 var apiVersionTestRefPtrClientGetValueV2SharedCallback uintptr667 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 w693 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 0715 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 nil724 return nil
@@ -1036,128 +756,6 @@ func wrapApiVersionTestRefPtrClient(ptr unsafe.Pointer) ApiVersionTestRefPtrClie
1036 return impl756 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.ApiVersionTestRefPtrClientChildV2760 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 0910 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 nil927 return nil
@@ -1454,131 +1001,16 @@ func wrapApiVersionTestScopedLibraryChild(ptr unsafe.Pointer) ApiVersionTestScop
1454 return impl1001 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.ApiVersionTestScopedLibraryChildChild1005+// 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 nil1009 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 impl1014 return impl
1583 }1015 }
1584 1016
@@ -1646,6 +1078,19 @@ func wrapApiVersionTestScopedLibraryChildChildV2(ptr unsafe.Pointer) ApiVersionT
1646 return impl1078 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.ApiVersionTestScopedClient1095 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.Once1123 var apiVersionTestScopedClientGetValueV2SharedOnce sync.Once
1705 var apiVersionTestScopedClientGetValueV2SharedCallback uintptr1124 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 w1150 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 01171 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 nil1180 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.ApiVersionTestScopedClientChildV21194 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 }
M vendor/github.com/bnema/purego-cef/cef/test_cef_test_server_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/test_cef_translator_test__gen.go +92 -50 generated file: collapsed
A vendor/github.com/bnema/purego-cef/cef/v8_helpers.go +19 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_browser_view_gen.go +15 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_display_gen.go +17 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_label_button_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_menu_button_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_panel_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_scroll_view_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_textfield_gen.go +14 -60 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_window_gen.go +14 -1 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/capi/cef_component_updater_gen.go +130 -0 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/capi/cef_types_component_gen.go +11 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/cef_types_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/cef_v8_gen.go +44 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/register_gen.go +2 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/test_cef_api_version_test__gen.go +0 -459 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/views_cef_textfield_gen.go +33 -107 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/cefapi/contract.go +11 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/loader/loader.go +23 -18 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/ports/in/cef_component_updater_gen.go +24 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_media_router_gen.go +2 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_shared_memory_region_gen.go +1 -5 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_shared_process_message_builder_gen.go +1 -5 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/ports/in/cef_types_component_gen.go +9 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_v8_gen.go +8 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_values_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/test_cef_api_version_test__gen.go +8 -63 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/test_cef_translator_test__gen.go +8 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/views_cef_textfield_gen.go +0 -7 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/ports/out/cef_component_updater_gen.go +29 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_parser_gen.go +3 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_preference_gen.go +2 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_shared_process_message_builder_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_stream_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_v8_gen.go +11 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_values_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/test_cef_api_version_test__gen.go +4 -51 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/test_cef_translator_test__gen.go +4 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/views_cef_textfield_gen.go +0 -7 generated file: collapsed
M vendor/modules.txt +2 -1 generated file: collapsed

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close