5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-09 21:49:56 +08:00

[linux/cgo] updates

This commit is contained in:
Travis McLane 2023-05-02 11:43:05 -05:00
parent 718e89ad1e
commit a485b188b3
2 changed files with 17 additions and 2 deletions

View File

@ -381,7 +381,7 @@ func newMinimizeMenuItem() *MenuItem {
OnClick(func(ctx *Context) { OnClick(func(ctx *Context) {
currentWindow := globalApplication.CurrentWindow() currentWindow := globalApplication.CurrentWindow()
if currentWindow != nil { if currentWindow != nil {
currentWindow.Minimize() currentWindow.Minimise()
} }
}) })
} }

View File

@ -304,6 +304,17 @@ func (w *linuxWebviewWindow) hide() {
C.gtk_widget_hide((*C.GtkWidget)(w.window)) C.gtk_widget_hide((*C.GtkWidget)(w.window))
} }
func (w *linuxWebviewWindow) isNormal() bool {
return !w.isMinimised() && !w.isMaximised() && !w.isFullscreen()
}
func (w *linuxWebviewWindow) isVisible() bool {
if C.gtk_widget_is_visible((*C.GtkWidget)(w.window)) == 1 {
return true
}
return false
}
func (w *linuxWebviewWindow) setFullscreenButtonEnabled(enabled bool) { func (w *linuxWebviewWindow) setFullscreenButtonEnabled(enabled bool) {
// C.setFullscreenButtonEnabled(w.nsWindow, C.bool(enabled)) // C.setFullscreenButtonEnabled(w.nsWindow, C.bool(enabled))
fmt.Println("setFullscreenButtonEnabled - not implemented") fmt.Println("setFullscreenButtonEnabled - not implemented")
@ -714,7 +725,7 @@ func (w *linuxWebviewWindow) setTransparent() {
} }
} }
func (w *linuxWebviewWindow) setBackgroundColour(colour *RGBA) { func (w *linuxWebviewWindow) setBackgroundColour(colour RGBA) {
if colour == nil { if colour == nil {
return return
} }
@ -755,3 +766,7 @@ func (w *linuxWebviewWindow) setHTML(html string) {
uri, uri,
empty) empty)
} }
func (w *linuxWebviewWindow) nativeWindowHandle() uintptr {
return uintptr(w.window)
}