Open rocket049 opened 6 years ago
I add a function in webview.go,it seems work correct.
// WidgetToWebView convert a Widget(it must be converted from WebView) back to WebView
func WidgetToWebView(widget *gtk.Widget) *WebView {
obj := widget.Object
p := unsafe.Pointer(widget.Native())
return &WebView{>k.Widget{glib.InitiallyUnowned{obj}}, C.to_WebKitWebView((*C.GtkWidget)(p))}
}
i can't find any way to convert a gtk.Widget object to WebView object? help!