typenative 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +2 -0
- package/CHANGELOG.md +372 -0
- package/CONTRIBUTION.md +1 -1
- package/README.md +62 -22
- package/ROUND2-HANDOFF.md +200 -0
- package/bin/cli.js +2 -0
- package/bin/go/bridge.js +74 -14
- package/bin/go/convert.js +48 -0
- package/bin/go/metadata.js +13 -4
- package/bin/go/overrides.js +4 -6
- package/bin/go/stdlib.generated.js +2 -0
- package/bin/index.js +130 -2
- package/bin/main.js +2 -0
- package/bin/node/assert.js +2 -2
- package/bin/node/async_hooks.js +1 -1
- package/bin/node/buffer.js +16 -5
- package/bin/node/child_process.js +57 -9
- package/bin/node/cluster.js +44 -6
- package/bin/node/core.js +1 -1
- package/bin/node/crypto.js +205 -4
- package/bin/node/crypto_keys.js +21 -21
- package/bin/node/dgram.js +231 -7
- package/bin/node/diagnostics_channel.js +3 -3
- package/bin/node/dns.js +472 -9
- package/bin/node/errno_tables.js +445 -0
- package/bin/node/events.js +3 -3
- package/bin/node/fetch.js +2 -2
- package/bin/node/fs.js +24 -17
- package/bin/node/fs_watch.js +5 -5
- package/bin/node/http.js +131 -33
- package/bin/node/http2.js +7 -4
- package/bin/node/module_v8.js +142 -0
- package/bin/node/net.js +17 -14
- package/bin/node/path.js +17 -3
- package/bin/node/process.js +274 -9
- package/bin/node/readline.js +272 -1
- package/bin/node/registry.js +5 -1
- package/bin/node/sqlite.js +65 -17
- package/bin/node/stream.js +220 -22
- package/bin/node/stream_web.js +10 -10
- package/bin/node/system_extra.js +3 -3
- package/bin/node/test.js +834 -234
- package/bin/node/test_coverage.js +187 -0
- package/bin/node/test_report.js +1392 -0
- package/bin/node/test_run.js +575 -0
- package/bin/node/timers.js +4 -4
- package/bin/node/tls.js +5 -5
- package/bin/node/url.js +23 -5
- package/bin/node/util.js +49 -8
- package/bin/node/util_extra.js +13 -37
- package/bin/node/webview.js +654 -0
- package/bin/node/worker_threads.js +80 -20
- package/bin/node/zlib.js +3 -3
- package/bin/parse-node.js +4 -0
- package/bin/transpiler.js +14457 -1723
- package/bin/typecheck-node.js +1 -0
- package/bin/version.js +1 -1
- package/conformance.md +1153 -884
- package/examples/README.md +47 -10
- package/examples/desktop-notes/README.md +108 -0
- package/examples/desktop-notes/bench.mjs +125 -0
- package/examples/desktop-notes/main.ts +131 -0
- package/examples/desktop-notes/package-lock.json +726 -0
- package/examples/desktop-notes/package.json +9 -0
- package/examples/desktop-notes/ui.ts +176 -0
- package/examples/dupe-finder/README.md +76 -0
- package/examples/dupe-finder/bench.mjs +120 -0
- package/examples/dupe-finder/main.ts +87 -0
- package/examples/json-server/README.md +31 -29
- package/examples/json-server/bench.mjs +130 -38
- package/examples/mandelbrot-png/README.md +65 -0
- package/examples/mandelbrot-png/bench.mjs +95 -0
- package/examples/mandelbrot-png/main.ts +98 -0
- package/examples/mandelbrot-png/preview.png +0 -0
- package/examples/marked-cli/README.md +159 -0
- package/examples/marked-cli/bench.mjs +178 -0
- package/examples/marked-cli/main.ts +292 -0
- package/examples/marked-cli/parity.mjs +185 -0
- package/examples/marked-cli/vendor/marked/LICENSE +44 -0
- package/examples/marked-cli/vendor/marked/VENDOR.md +26 -0
- package/examples/todo-cli/README.md +69 -0
- package/examples/todo-cli/bench.mjs +89 -0
- package/examples/todo-cli/main.ts +92 -0
- package/examples/yaml-cli/README.md +136 -0
- package/examples/yaml-cli/bench.mjs +265 -0
- package/examples/yaml-cli/main.ts +29 -0
- package/examples/yaml-cli/parity.mjs +156 -0
- package/examples/yaml-cli/vendor/yaml/LICENSE +13 -0
- package/examples/yaml-cli/vendor/yaml/VENDOR.md +25 -0
- package/govendor/github.com/jchv/go-webview2/LICENSE +22 -0
- package/govendor/github.com/jchv/go-webview2/README.md +21 -0
- package/govendor/github.com/jchv/go-webview2/common.go +84 -0
- package/govendor/github.com/jchv/go-webview2/go.mod +3 -0
- package/govendor/github.com/jchv/go-webview2/internal/w32/w32.go +194 -0
- package/govendor/github.com/jchv/go-webview2/internal/w32/w32_386.go +14 -0
- package/govendor/github.com/jchv/go-webview2/internal/w32/w32_64bit.go +15 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/COREWEBVIEW2_COLOR.go +8 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND.go +9 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/COREWEBVIEW2_KEY_EVENT_KIND.go +10 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/COREWEBVIEW2_MOVE_FOCUS_REASON.go +9 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/COREWEBVIEW2_PHYSICAL_KEY_STATUS.go +10 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/COREWEBVIEW2_WEB_RESOURCE_CONTEXT.go +23 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2AcceleratorKeyPressedEventArgs.go +78 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2AcceleratorKeyPressedEventHandler.go +52 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2Controller.go +132 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2Controller2.go +74 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2CreateCoreWebView2ControllerCompletedHandler.go +48 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2NavigationCompletedEventArgs.go +17 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2NavigationCompletedEventHandler.go +48 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2Settings.go +270 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2WebResourceRequest.go +43 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2WebResourceRequestedEventArgs.go +51 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2WebResourceRequestedEventHandler.go +48 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2WebResourceResponse.go +21 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2_2.go +21 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2_3.go +60 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebViewSettings.go +396 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/chromium.go +361 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/chromium_386.go +24 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/chromium_amd64.go +22 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/chromium_arm64.go +26 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/comproc.go +13 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/comproc_go17.go +51 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/comproc_go18.go +16 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/corewebview2.go +411 -0
- package/govendor/github.com/jchv/go-webview2/pkg/edge/guid.go +223 -0
- package/govendor/github.com/jchv/go-webview2/webview.go +482 -0
- package/govendor/github.com/jchv/go-webview2/webviewloader/README.md +3 -0
- package/govendor/github.com/jchv/go-webview2/webviewloader/module.go +153 -0
- package/govendor/github.com/jchv/go-webview2/webviewloader/module_386.go +6 -0
- package/govendor/github.com/jchv/go-webview2/webviewloader/module_amd64.go +6 -0
- package/govendor/github.com/jchv/go-webview2/webviewloader/module_arm64.go +6 -0
- package/govendor/github.com/jchv/go-webview2/webviewloader/sdk/arm64/WebView2Loader.dll +0 -0
- package/govendor/github.com/jchv/go-webview2/webviewloader/sdk/x64/WebView2Loader.dll +0 -0
- package/govendor/github.com/jchv/go-webview2/webviewloader/sdk/x86/WebView2Loader.dll +0 -0
- package/govendor/github.com/jchv/go-winloader/LICENSE.md +7 -0
- package/govendor/github.com/jchv/go-winloader/README.md +124 -0
- package/govendor/github.com/jchv/go-winloader/common.go +11 -0
- package/govendor/github.com/jchv/go-winloader/go.mod +3 -0
- package/govendor/github.com/jchv/go-winloader/internal/loader/loader.go +25 -0
- package/govendor/github.com/jchv/go-winloader/internal/loader/machine.go +53 -0
- package/govendor/github.com/jchv/go-winloader/internal/memloader/cache.go +42 -0
- package/govendor/github.com/jchv/go-winloader/internal/memloader/loader.go +253 -0
- package/govendor/github.com/jchv/go-winloader/internal/pe/export.go +76 -0
- package/govendor/github.com/jchv/go-winloader/internal/pe/format.go +522 -0
- package/govendor/github.com/jchv/go-winloader/internal/pe/import.go +106 -0
- package/govendor/github.com/jchv/go-winloader/internal/pe/module.go +91 -0
- package/govendor/github.com/jchv/go-winloader/internal/pe/reloc.go +177 -0
- package/govendor/github.com/jchv/go-winloader/internal/pe/util.go +40 -0
- package/govendor/github.com/jchv/go-winloader/internal/vmem/common.go +55 -0
- package/govendor/github.com/jchv/go-winloader/internal/vmem/memory_other.go +71 -0
- package/govendor/github.com/jchv/go-winloader/internal/vmem/memory_windows.go +179 -0
- package/govendor/github.com/jchv/go-winloader/internal/winloader/hacks_other.go +17 -0
- package/govendor/github.com/jchv/go-winloader/internal/winloader/hacks_windows.go +73 -0
- package/govendor/github.com/jchv/go-winloader/internal/winloader/loader_windows.go +64 -0
- package/govendor/github.com/jchv/go-winloader/internal/winloader/machine_windows.go +32 -0
- package/govendor/github.com/jchv/go-winloader/internal/winloader/nativearch_386.go +9 -0
- package/govendor/github.com/jchv/go-winloader/internal/winloader/nativearch_amd64.go +9 -0
- package/govendor/github.com/jchv/go-winloader/internal/winloader/nativearch_arm64.go +9 -0
- package/govendor/github.com/jchv/go-winloader/loader_other.go +24 -0
- package/govendor/github.com/jchv/go-winloader/loader_windows.go +33 -0
- package/govendor/manifest.txt +3 -1
- package/package.json +1 -1
- package/tsparser/main.go +4 -0
- package/types/typenative-go.d.ts +23 -0
- package/types/typenative-npm.d.ts +359 -7
- package/types/typenative.d.ts +283 -42
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
package w32
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"syscall"
|
|
5
|
+
"unicode/utf16"
|
|
6
|
+
"unsafe"
|
|
7
|
+
|
|
8
|
+
"golang.org/x/sys/windows"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
var (
|
|
12
|
+
ole32 = windows.NewLazySystemDLL("ole32")
|
|
13
|
+
Ole32CoInitializeEx = ole32.NewProc("CoInitializeEx")
|
|
14
|
+
|
|
15
|
+
kernel32 = windows.NewLazySystemDLL("kernel32")
|
|
16
|
+
Kernel32GetCurrentThreadID = kernel32.NewProc("GetCurrentThreadId")
|
|
17
|
+
|
|
18
|
+
shlwapi = windows.NewLazySystemDLL("shlwapi")
|
|
19
|
+
shlwapiSHCreateMemStream = shlwapi.NewProc("SHCreateMemStream")
|
|
20
|
+
|
|
21
|
+
user32 = windows.NewLazySystemDLL("user32")
|
|
22
|
+
User32LoadImageW = user32.NewProc("LoadImageW")
|
|
23
|
+
User32GetSystemMetrics = user32.NewProc("GetSystemMetrics")
|
|
24
|
+
User32RegisterClassExW = user32.NewProc("RegisterClassExW")
|
|
25
|
+
User32CreateWindowExW = user32.NewProc("CreateWindowExW")
|
|
26
|
+
User32DestroyWindow = user32.NewProc("DestroyWindow")
|
|
27
|
+
User32ShowWindow = user32.NewProc("ShowWindow")
|
|
28
|
+
User32UpdateWindow = user32.NewProc("UpdateWindow")
|
|
29
|
+
User32SetFocus = user32.NewProc("SetFocus")
|
|
30
|
+
User32GetMessageW = user32.NewProc("GetMessageW")
|
|
31
|
+
User32TranslateMessage = user32.NewProc("TranslateMessage")
|
|
32
|
+
User32DispatchMessageW = user32.NewProc("DispatchMessageW")
|
|
33
|
+
User32DefWindowProcW = user32.NewProc("DefWindowProcW")
|
|
34
|
+
User32GetClientRect = user32.NewProc("GetClientRect")
|
|
35
|
+
User32PostQuitMessage = user32.NewProc("PostQuitMessage")
|
|
36
|
+
User32PostMessageW = user32.NewProc("PostMessageW")
|
|
37
|
+
User32SetWindowTextW = user32.NewProc("SetWindowTextW")
|
|
38
|
+
User32PostThreadMessageW = user32.NewProc("PostThreadMessageW")
|
|
39
|
+
User32GetWindowLongW = user32.NewProc("GetWindowLongW")
|
|
40
|
+
User32GetWindowLongPtrW = user32.NewProc("GetWindowLongPtrW")
|
|
41
|
+
User32SetWindowLongW = user32.NewProc("SetWindowLongW")
|
|
42
|
+
User32SetWindowLongPtrW = user32.NewProc("SetWindowLongPtrW")
|
|
43
|
+
User32AdjustWindowRect = user32.NewProc("AdjustWindowRect")
|
|
44
|
+
User32SetWindowPos = user32.NewProc("SetWindowPos")
|
|
45
|
+
User32IsDialogMessage = user32.NewProc("IsDialogMessage")
|
|
46
|
+
User32GetAncestor = user32.NewProc("GetAncestor")
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
const (
|
|
50
|
+
SM_CXSCREEN = 0
|
|
51
|
+
SM_CYSCREEN = 1
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
const (
|
|
55
|
+
CW_USEDEFAULT = 0x80000000
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
const (
|
|
59
|
+
LR_DEFAULTCOLOR = 0x0000
|
|
60
|
+
LR_MONOCHROME = 0x0001
|
|
61
|
+
LR_LOADFROMFILE = 0x0010
|
|
62
|
+
LR_LOADTRANSPARENT = 0x0020
|
|
63
|
+
LR_DEFAULTSIZE = 0x0040
|
|
64
|
+
LR_VGACOLOR = 0x0080
|
|
65
|
+
LR_LOADMAP3DCOLORS = 0x1000
|
|
66
|
+
LR_CREATEDIBSECTION = 0x2000
|
|
67
|
+
LR_SHARED = 0x8000
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
const (
|
|
71
|
+
SystemMetricsCxIcon = 11
|
|
72
|
+
SystemMetricsCyIcon = 12
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
const (
|
|
76
|
+
SWShow = 5
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
const (
|
|
80
|
+
SWPNoZOrder = 0x0004
|
|
81
|
+
SWPNoActivate = 0x0010
|
|
82
|
+
SWPNoMove = 0x0002
|
|
83
|
+
SWPFrameChanged = 0x0020
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
const (
|
|
87
|
+
WMDestroy = 0x0002
|
|
88
|
+
WMMove = 0x0003
|
|
89
|
+
WMSize = 0x0005
|
|
90
|
+
WMActivate = 0x0006
|
|
91
|
+
WMClose = 0x0010
|
|
92
|
+
WMQuit = 0x0012
|
|
93
|
+
WMGetMinMaxInfo = 0x0024
|
|
94
|
+
WMNCLButtonDown = 0x00A1
|
|
95
|
+
WMMoving = 0x0216
|
|
96
|
+
WMApp = 0x8000
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
const (
|
|
100
|
+
GAParent = 1
|
|
101
|
+
GARoot = 2
|
|
102
|
+
GARootOwner = 3
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
const (
|
|
106
|
+
GWLStyle = -16
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
const (
|
|
110
|
+
WSOverlapped = 0x00000000
|
|
111
|
+
WSMaximizeBox = 0x00010000
|
|
112
|
+
WSThickFrame = 0x00040000
|
|
113
|
+
WSCaption = 0x00C00000
|
|
114
|
+
WSSysMenu = 0x00080000
|
|
115
|
+
WSMinimizeBox = 0x00020000
|
|
116
|
+
WSOverlappedWindow = (WSOverlapped | WSCaption | WSSysMenu | WSThickFrame | WSMinimizeBox | WSMaximizeBox)
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
const (
|
|
120
|
+
WAInactive = 0
|
|
121
|
+
WAActive = 1
|
|
122
|
+
WAActiveClick = 2
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
type WndClassExW struct {
|
|
126
|
+
CbSize uint32
|
|
127
|
+
Style uint32
|
|
128
|
+
LpfnWndProc uintptr
|
|
129
|
+
CnClsExtra int32
|
|
130
|
+
CbWndExtra int32
|
|
131
|
+
HInstance windows.Handle
|
|
132
|
+
HIcon windows.Handle
|
|
133
|
+
HCursor windows.Handle
|
|
134
|
+
HbrBackground windows.Handle
|
|
135
|
+
LpszMenuName *uint16
|
|
136
|
+
LpszClassName *uint16
|
|
137
|
+
HIconSm windows.Handle
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
type Rect struct {
|
|
141
|
+
Left int32
|
|
142
|
+
Top int32
|
|
143
|
+
Right int32
|
|
144
|
+
Bottom int32
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
type MinMaxInfo struct {
|
|
148
|
+
PtReserved Point
|
|
149
|
+
PtMaxSize Point
|
|
150
|
+
PtMaxPosition Point
|
|
151
|
+
PtMinTrackSize Point
|
|
152
|
+
PtMaxTrackSize Point
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
type Point struct {
|
|
156
|
+
X, Y int32
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
type Msg struct {
|
|
160
|
+
Hwnd syscall.Handle
|
|
161
|
+
Message uint32
|
|
162
|
+
WParam uintptr
|
|
163
|
+
LParam uintptr
|
|
164
|
+
Time uint32
|
|
165
|
+
Pt Point
|
|
166
|
+
LPrivate uint32
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
func Utf16PtrToString(p *uint16) string {
|
|
170
|
+
if p == nil {
|
|
171
|
+
return ""
|
|
172
|
+
}
|
|
173
|
+
// Find NUL terminator.
|
|
174
|
+
end := unsafe.Pointer(p)
|
|
175
|
+
n := 0
|
|
176
|
+
for *(*uint16)(end) != 0 {
|
|
177
|
+
end = unsafe.Pointer(uintptr(end) + unsafe.Sizeof(*p))
|
|
178
|
+
n++
|
|
179
|
+
}
|
|
180
|
+
s := (*[(1 << 30) - 1]uint16)(unsafe.Pointer(p))[:n:n]
|
|
181
|
+
return string(utf16.Decode(s))
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
func SHCreateMemStream(data []byte) (uintptr, error) {
|
|
185
|
+
ret, _, err := shlwapiSHCreateMemStream.Call(
|
|
186
|
+
uintptr(unsafe.Pointer(&data[0])),
|
|
187
|
+
uintptr(len(data)),
|
|
188
|
+
)
|
|
189
|
+
if ret == 0 {
|
|
190
|
+
return 0, err
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return ret, nil
|
|
194
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//go:build windows && 386
|
|
2
|
+
// +build windows,386
|
|
3
|
+
|
|
4
|
+
package w32
|
|
5
|
+
|
|
6
|
+
func GetWindowLong(hwnd uintptr, index int) uintptr {
|
|
7
|
+
ret, _, _ := User32GetWindowLongW.Call(hwnd, uintptr(index))
|
|
8
|
+
return ret
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
func SetWindowLong(hwnd uintptr, index int, newLong uintptr) uintptr {
|
|
12
|
+
ret, _, _ := User32SetWindowLongW.Call(hwnd, uintptr(index), newLong)
|
|
13
|
+
return ret
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//go:build windows && (amd64 || arm64)
|
|
2
|
+
// +build windows
|
|
3
|
+
// +build amd64 arm64
|
|
4
|
+
|
|
5
|
+
package w32
|
|
6
|
+
|
|
7
|
+
func GetWindowLong(hwnd uintptr, index int) uintptr {
|
|
8
|
+
ret, _, _ := User32GetWindowLongPtrW.Call(hwnd, uintptr(index))
|
|
9
|
+
return ret
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
func SetWindowLong(hwnd uintptr, index int, newLong uintptr) uintptr {
|
|
13
|
+
ret, _, _ := User32SetWindowLongPtrW.Call(hwnd, uintptr(index), newLong)
|
|
14
|
+
return ret
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
package edge
|
|
2
|
+
|
|
3
|
+
type COREWEBVIEW2_WEB_RESOURCE_CONTEXT uint32
|
|
4
|
+
|
|
5
|
+
const (
|
|
6
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL = 0
|
|
7
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT = 1
|
|
8
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET = 2
|
|
9
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE = 3
|
|
10
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA = 4
|
|
11
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT = 5
|
|
12
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT = 6
|
|
13
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST = 7
|
|
14
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH = 8
|
|
15
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK = 9
|
|
16
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE = 10
|
|
17
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET = 11
|
|
18
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST = 12
|
|
19
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE = 13
|
|
20
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING = 14
|
|
21
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT = 15
|
|
22
|
+
COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER = 16
|
|
23
|
+
)
|
package/govendor/github.com/jchv/go-webview2/pkg/edge/ICoreWebView2AcceleratorKeyPressedEventArgs.go
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
package edge
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"unsafe"
|
|
5
|
+
|
|
6
|
+
"golang.org/x/sys/windows"
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
type _ICoreWebView2AcceleratorKeyPressedEventArgsVtbl struct {
|
|
10
|
+
_IUnknownVtbl
|
|
11
|
+
GetKeyEventKind ComProc
|
|
12
|
+
GetVirtualKey ComProc
|
|
13
|
+
GetKeyEventLParam ComProc
|
|
14
|
+
GetPhysicalKeyStatus ComProc
|
|
15
|
+
GetHandled ComProc
|
|
16
|
+
PutHandled ComProc
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
type ICoreWebView2AcceleratorKeyPressedEventArgs struct {
|
|
20
|
+
vtbl *_ICoreWebView2AcceleratorKeyPressedEventArgsVtbl
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) AddRef() uintptr {
|
|
24
|
+
r, _, _ := i.vtbl.AddRef.Call()
|
|
25
|
+
return r
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) GetKeyEventKind() (COREWEBVIEW2_KEY_EVENT_KIND, error) {
|
|
29
|
+
var err error
|
|
30
|
+
var keyEventKind COREWEBVIEW2_KEY_EVENT_KIND
|
|
31
|
+
_, _, err = i.vtbl.GetKeyEventKind.Call(
|
|
32
|
+
uintptr(unsafe.Pointer(i)),
|
|
33
|
+
uintptr(unsafe.Pointer(&keyEventKind)),
|
|
34
|
+
)
|
|
35
|
+
if err != windows.ERROR_SUCCESS {
|
|
36
|
+
return 0, err
|
|
37
|
+
}
|
|
38
|
+
return keyEventKind, nil
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) GetVirtualKey() (uint, error) {
|
|
42
|
+
var err error
|
|
43
|
+
var virtualKey uint
|
|
44
|
+
_, _, err = i.vtbl.GetVirtualKey.Call(
|
|
45
|
+
uintptr(unsafe.Pointer(i)),
|
|
46
|
+
uintptr(unsafe.Pointer(&virtualKey)),
|
|
47
|
+
)
|
|
48
|
+
if err != windows.ERROR_SUCCESS {
|
|
49
|
+
return 0, err
|
|
50
|
+
}
|
|
51
|
+
return virtualKey, nil
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) GetPhysicalKeyStatus() (COREWEBVIEW2_PHYSICAL_KEY_STATUS, error) {
|
|
55
|
+
var err error
|
|
56
|
+
var physicalKeyStatus COREWEBVIEW2_PHYSICAL_KEY_STATUS
|
|
57
|
+
_, _, err = i.vtbl.GetPhysicalKeyStatus.Call(
|
|
58
|
+
uintptr(unsafe.Pointer(i)),
|
|
59
|
+
uintptr(unsafe.Pointer(&physicalKeyStatus)),
|
|
60
|
+
)
|
|
61
|
+
if err != windows.ERROR_SUCCESS {
|
|
62
|
+
return COREWEBVIEW2_PHYSICAL_KEY_STATUS{}, err
|
|
63
|
+
}
|
|
64
|
+
return physicalKeyStatus, nil
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) PutHandled(handled bool) error {
|
|
68
|
+
var err error
|
|
69
|
+
|
|
70
|
+
_, _, err = i.vtbl.PutHandled.Call(
|
|
71
|
+
uintptr(unsafe.Pointer(i)),
|
|
72
|
+
uintptr(boolToInt(handled)),
|
|
73
|
+
)
|
|
74
|
+
if err != windows.ERROR_SUCCESS {
|
|
75
|
+
return err
|
|
76
|
+
}
|
|
77
|
+
return nil
|
|
78
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
package edge
|
|
2
|
+
|
|
3
|
+
type _ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl struct {
|
|
4
|
+
_IUnknownVtbl
|
|
5
|
+
Invoke ComProc
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type ICoreWebView2AcceleratorKeyPressedEventHandler struct {
|
|
9
|
+
vtbl *_ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl
|
|
10
|
+
impl _ICoreWebView2AcceleratorKeyPressedEventHandlerImpl
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
func (i *ICoreWebView2AcceleratorKeyPressedEventHandler) AddRef() uintptr {
|
|
14
|
+
r, _, _ := i.vtbl.AddRef.Call()
|
|
15
|
+
return r
|
|
16
|
+
}
|
|
17
|
+
func _ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownQueryInterface(this *ICoreWebView2AcceleratorKeyPressedEventHandler, refiid, object uintptr) uintptr {
|
|
18
|
+
return this.impl.QueryInterface(refiid, object)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
func _ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownAddRef(this *ICoreWebView2AcceleratorKeyPressedEventHandler) uintptr {
|
|
22
|
+
return this.impl.AddRef()
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func _ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownRelease(this *ICoreWebView2AcceleratorKeyPressedEventHandler) uintptr {
|
|
26
|
+
return this.impl.Release()
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
func _ICoreWebView2AcceleratorKeyPressedEventHandlerInvoke(this *ICoreWebView2AcceleratorKeyPressedEventHandler, sender *ICoreWebView2Controller, args *ICoreWebView2AcceleratorKeyPressedEventArgs) uintptr {
|
|
30
|
+
return this.impl.AcceleratorKeyPressed(sender, args)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type _ICoreWebView2AcceleratorKeyPressedEventHandlerImpl interface {
|
|
34
|
+
_IUnknownImpl
|
|
35
|
+
AcceleratorKeyPressed(sender *ICoreWebView2Controller, args *ICoreWebView2AcceleratorKeyPressedEventArgs) uintptr
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
var _ICoreWebView2AcceleratorKeyPressedEventHandlerFn = _ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl{
|
|
39
|
+
_IUnknownVtbl{
|
|
40
|
+
NewComProc(_ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownQueryInterface),
|
|
41
|
+
NewComProc(_ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownAddRef),
|
|
42
|
+
NewComProc(_ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownRelease),
|
|
43
|
+
},
|
|
44
|
+
NewComProc(_ICoreWebView2AcceleratorKeyPressedEventHandlerInvoke),
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
func newICoreWebView2AcceleratorKeyPressedEventHandler(impl _ICoreWebView2AcceleratorKeyPressedEventHandlerImpl) *ICoreWebView2AcceleratorKeyPressedEventHandler {
|
|
48
|
+
return &ICoreWebView2AcceleratorKeyPressedEventHandler{
|
|
49
|
+
vtbl: &_ICoreWebView2AcceleratorKeyPressedEventHandlerFn,
|
|
50
|
+
impl: impl,
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
package edge
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"unsafe"
|
|
5
|
+
|
|
6
|
+
"github.com/jchv/go-webview2/internal/w32"
|
|
7
|
+
"golang.org/x/sys/windows"
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
type _ICoreWebView2ControllerVtbl struct {
|
|
11
|
+
_IUnknownVtbl
|
|
12
|
+
GetIsVisible ComProc
|
|
13
|
+
PutIsVisible ComProc
|
|
14
|
+
GetBounds ComProc
|
|
15
|
+
PutBounds ComProc
|
|
16
|
+
GetZoomFactor ComProc
|
|
17
|
+
PutZoomFactor ComProc
|
|
18
|
+
AddZoomFactorChanged ComProc
|
|
19
|
+
RemoveZoomFactorChanged ComProc
|
|
20
|
+
SetBoundsAndZoomFactor ComProc
|
|
21
|
+
MoveFocus ComProc
|
|
22
|
+
AddMoveFocusRequested ComProc
|
|
23
|
+
RemoveMoveFocusRequested ComProc
|
|
24
|
+
AddGotFocus ComProc
|
|
25
|
+
RemoveGotFocus ComProc
|
|
26
|
+
AddLostFocus ComProc
|
|
27
|
+
RemoveLostFocus ComProc
|
|
28
|
+
AddAcceleratorKeyPressed ComProc
|
|
29
|
+
RemoveAcceleratorKeyPressed ComProc
|
|
30
|
+
GetParentWindow ComProc
|
|
31
|
+
PutParentWindow ComProc
|
|
32
|
+
NotifyParentWindowPositionChanged ComProc
|
|
33
|
+
Close ComProc
|
|
34
|
+
GetCoreWebView2 ComProc
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type ICoreWebView2Controller struct {
|
|
38
|
+
vtbl *_ICoreWebView2ControllerVtbl
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
func (i *ICoreWebView2Controller) AddRef() uintptr {
|
|
42
|
+
r, _, _ := i.vtbl.AddRef.Call()
|
|
43
|
+
return r
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
func (i *ICoreWebView2Controller) GetBounds() (*w32.Rect, error) {
|
|
47
|
+
var err error
|
|
48
|
+
var bounds w32.Rect
|
|
49
|
+
_, _, err = i.vtbl.GetBounds.Call(
|
|
50
|
+
uintptr(unsafe.Pointer(i)),
|
|
51
|
+
uintptr(unsafe.Pointer(&bounds)),
|
|
52
|
+
)
|
|
53
|
+
if err != windows.ERROR_SUCCESS {
|
|
54
|
+
return nil, err
|
|
55
|
+
}
|
|
56
|
+
return &bounds, nil
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
func (i *ICoreWebView2Controller) PutBounds(bounds w32.Rect) error {
|
|
60
|
+
var err error
|
|
61
|
+
|
|
62
|
+
_, _, err = i.vtbl.PutBounds.Call(
|
|
63
|
+
uintptr(unsafe.Pointer(i)),
|
|
64
|
+
uintptr(unsafe.Pointer(&bounds)),
|
|
65
|
+
)
|
|
66
|
+
if err != windows.ERROR_SUCCESS {
|
|
67
|
+
return err
|
|
68
|
+
}
|
|
69
|
+
return nil
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
func (i *ICoreWebView2Controller) AddAcceleratorKeyPressed(eventHandler *ICoreWebView2AcceleratorKeyPressedEventHandler, token *_EventRegistrationToken) error {
|
|
73
|
+
var err error
|
|
74
|
+
_, _, err = i.vtbl.AddAcceleratorKeyPressed.Call(
|
|
75
|
+
uintptr(unsafe.Pointer(i)),
|
|
76
|
+
uintptr(unsafe.Pointer(eventHandler)),
|
|
77
|
+
uintptr(unsafe.Pointer(&token)),
|
|
78
|
+
)
|
|
79
|
+
if err != windows.ERROR_SUCCESS {
|
|
80
|
+
return err
|
|
81
|
+
}
|
|
82
|
+
return nil
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
func (i *ICoreWebView2Controller) PutIsVisible(isVisible bool) error {
|
|
86
|
+
var err error
|
|
87
|
+
|
|
88
|
+
_, _, err = i.vtbl.PutIsVisible.Call(
|
|
89
|
+
uintptr(unsafe.Pointer(i)),
|
|
90
|
+
uintptr(boolToInt(isVisible)),
|
|
91
|
+
)
|
|
92
|
+
if err != windows.ERROR_SUCCESS {
|
|
93
|
+
return err
|
|
94
|
+
}
|
|
95
|
+
return nil
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
func (i *ICoreWebView2Controller) GetICoreWebView2Controller2() *ICoreWebView2Controller2 {
|
|
99
|
+
|
|
100
|
+
var result *ICoreWebView2Controller2
|
|
101
|
+
|
|
102
|
+
iidICoreWebView2Controller2 := NewGUID("{c979903e-d4ca-4228-92eb-47ee3fa96eab}")
|
|
103
|
+
_, _, _ = i.vtbl.QueryInterface.Call(
|
|
104
|
+
uintptr(unsafe.Pointer(i)),
|
|
105
|
+
uintptr(unsafe.Pointer(iidICoreWebView2Controller2)),
|
|
106
|
+
uintptr(unsafe.Pointer(&result)))
|
|
107
|
+
|
|
108
|
+
return result
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
func (i *ICoreWebView2Controller) NotifyParentWindowPositionChanged() error {
|
|
112
|
+
var err error
|
|
113
|
+
_, _, err = i.vtbl.NotifyParentWindowPositionChanged.Call(
|
|
114
|
+
uintptr(unsafe.Pointer(i)),
|
|
115
|
+
)
|
|
116
|
+
if err != windows.ERROR_SUCCESS {
|
|
117
|
+
return err
|
|
118
|
+
}
|
|
119
|
+
return nil
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
func (i *ICoreWebView2Controller) MoveFocus(reason uintptr) error {
|
|
123
|
+
var err error
|
|
124
|
+
_, _, err = i.vtbl.MoveFocus.Call(
|
|
125
|
+
uintptr(unsafe.Pointer(i)),
|
|
126
|
+
uintptr(reason),
|
|
127
|
+
)
|
|
128
|
+
if err != windows.ERROR_SUCCESS {
|
|
129
|
+
return err
|
|
130
|
+
}
|
|
131
|
+
return nil
|
|
132
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
package edge
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"unsafe"
|
|
5
|
+
|
|
6
|
+
"golang.org/x/sys/windows"
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
type _ICoreWebView2Controller2Vtbl struct {
|
|
10
|
+
_IUnknownVtbl
|
|
11
|
+
GetIsVisible ComProc
|
|
12
|
+
PutIsVisible ComProc
|
|
13
|
+
GetBounds ComProc
|
|
14
|
+
PutBounds ComProc
|
|
15
|
+
GetZoomFactor ComProc
|
|
16
|
+
PutZoomFactor ComProc
|
|
17
|
+
AddZoomFactorChanged ComProc
|
|
18
|
+
RemoveZoomFactorChanged ComProc
|
|
19
|
+
SetBoundsAndZoomFactor ComProc
|
|
20
|
+
MoveFocus ComProc
|
|
21
|
+
AddMoveFocusRequested ComProc
|
|
22
|
+
RemoveMoveFocusRequested ComProc
|
|
23
|
+
AddGotFocus ComProc
|
|
24
|
+
RemoveGotFocus ComProc
|
|
25
|
+
AddLostFocus ComProc
|
|
26
|
+
RemoveLostFocus ComProc
|
|
27
|
+
AddAcceleratorKeyPressed ComProc
|
|
28
|
+
RemoveAcceleratorKeyPressed ComProc
|
|
29
|
+
GetParentWindow ComProc
|
|
30
|
+
PutParentWindow ComProc
|
|
31
|
+
NotifyParentWindowPositionChanged ComProc
|
|
32
|
+
Close ComProc
|
|
33
|
+
GetCoreWebView2 ComProc
|
|
34
|
+
GetDefaultBackgroundColor ComProc
|
|
35
|
+
PutDefaultBackgroundColor ComProc
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type ICoreWebView2Controller2 struct {
|
|
39
|
+
vtbl *_ICoreWebView2Controller2Vtbl
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
func (i *ICoreWebView2Controller2) AddRef() uintptr {
|
|
43
|
+
r, _, _ := i.vtbl.AddRef.Call()
|
|
44
|
+
return r
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
func (i *ICoreWebView2Controller2) GetDefaultBackgroundColor() (*COREWEBVIEW2_COLOR, error) {
|
|
48
|
+
var err error
|
|
49
|
+
var backgroundColor *COREWEBVIEW2_COLOR
|
|
50
|
+
_, _, err = i.vtbl.GetDefaultBackgroundColor.Call(
|
|
51
|
+
uintptr(unsafe.Pointer(i)),
|
|
52
|
+
uintptr(unsafe.Pointer(&backgroundColor)),
|
|
53
|
+
)
|
|
54
|
+
if err != windows.ERROR_SUCCESS {
|
|
55
|
+
return nil, err
|
|
56
|
+
}
|
|
57
|
+
return backgroundColor, nil
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
func (i *ICoreWebView2Controller2) PutDefaultBackgroundColor(backgroundColor COREWEBVIEW2_COLOR) error {
|
|
61
|
+
var err error
|
|
62
|
+
|
|
63
|
+
// Cast to a uint32 as that's what the call is expecting
|
|
64
|
+
col := *(*uint32)(unsafe.Pointer(&backgroundColor))
|
|
65
|
+
|
|
66
|
+
_, _, err = i.vtbl.PutDefaultBackgroundColor.Call(
|
|
67
|
+
uintptr(unsafe.Pointer(i)),
|
|
68
|
+
uintptr(col),
|
|
69
|
+
)
|
|
70
|
+
if err != windows.ERROR_SUCCESS {
|
|
71
|
+
return err
|
|
72
|
+
}
|
|
73
|
+
return nil
|
|
74
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
package edge
|
|
2
|
+
|
|
3
|
+
type _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl struct {
|
|
4
|
+
_IUnknownVtbl
|
|
5
|
+
Invoke ComProc
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type iCoreWebView2CreateCoreWebView2ControllerCompletedHandler struct {
|
|
9
|
+
vtbl *_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl
|
|
10
|
+
impl _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerImpl
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
func _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownQueryInterface(this *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler, refiid, object uintptr) uintptr {
|
|
14
|
+
return this.impl.QueryInterface(refiid, object)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
func _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownAddRef(this *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler) uintptr {
|
|
18
|
+
return this.impl.AddRef()
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
func _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownRelease(this *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler) uintptr {
|
|
22
|
+
return this.impl.Release()
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerInvoke(this *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler, errorCode uintptr, createdController *ICoreWebView2Controller) uintptr {
|
|
26
|
+
return this.impl.CreateCoreWebView2ControllerCompleted(errorCode, createdController)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerImpl interface {
|
|
30
|
+
_IUnknownImpl
|
|
31
|
+
CreateCoreWebView2ControllerCompleted(errorCode uintptr, createdController *ICoreWebView2Controller) uintptr
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerFn = _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl{
|
|
35
|
+
_IUnknownVtbl{
|
|
36
|
+
NewComProc(_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownQueryInterface),
|
|
37
|
+
NewComProc(_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownAddRef),
|
|
38
|
+
NewComProc(_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownRelease),
|
|
39
|
+
},
|
|
40
|
+
NewComProc(_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerInvoke),
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
func newICoreWebView2CreateCoreWebView2ControllerCompletedHandler(impl _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerImpl) *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler {
|
|
44
|
+
return &iCoreWebView2CreateCoreWebView2ControllerCompletedHandler{
|
|
45
|
+
vtbl: &_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerFn,
|
|
46
|
+
impl: impl,
|
|
47
|
+
}
|
|
48
|
+
}
|