mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[linux] add missing implementations
This commit is contained in:
parent
c21784037d
commit
716f4af808
2 changed files with 19 additions and 3 deletions
|
|
@ -1100,6 +1100,10 @@ func (w *linuxWebviewWindow) setAlwaysOnTop(alwaysOnTop bool) {
|
|||
C.gtk_window_set_keep_above(w.gtkWindow(), gtkBool(alwaysOnTop))
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) flash(_ bool) {
|
||||
// Not supported on Linux
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) setTitle(title string) {
|
||||
if !w.parent.options.Frameless {
|
||||
cTitle := C.CString(title)
|
||||
|
|
@ -1181,9 +1185,9 @@ func (w *linuxWebviewWindow) setupSignalHandlers(emit func(e events.WindowEventT
|
|||
|
||||
contentManager := C.webkit_web_view_get_user_content_manager(w.webKitWebView())
|
||||
C.signal_connect(unsafe.Pointer(contentManager), c.String("script-message-received::external"), C.sendMessageToBackend, nil)
|
||||
C.signal_connect(unsafe.Pointer(webview), c.String("button-press-event"), C.onButtonEvent, winID)
|
||||
C.signal_connect(unsafe.Pointer(webview), c.String("button-release-event"), C.onButtonEvent, winID)
|
||||
C.signal_connect(unsafe.Pointer(webview), c.String("key-press-event"), C.onKeyPressEvent, winID)
|
||||
C.signal_connect(unsafe.Pointer(w.webview), c.String("button-press-event"), C.onButtonEvent, winID)
|
||||
C.signal_connect(unsafe.Pointer(w.webview), c.String("button-release-event"), C.onButtonEvent, winID)
|
||||
C.signal_connect(unsafe.Pointer(w.webview), c.String("key-press-event"), C.onKeyPressEvent, winID)
|
||||
}
|
||||
|
||||
func getMouseButtons() (bool, bool, bool) {
|
||||
|
|
|
|||
|
|
@ -75,10 +75,22 @@ func (w *linuxWebviewWindow) isNormal() bool {
|
|||
return !w.isMinimised() && !w.isMaximised() && !w.isFullscreen()
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) setCloseButtonEnabled(enabled bool) {
|
||||
// C.enableCloseButton(w.nsWindow, C.bool(enabled))
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) setFullscreenButtonEnabled(enabled bool) {
|
||||
// Not implemented
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) setMinimiseButtonEnabled(enabled bool) {
|
||||
//C.enableMinimiseButton(w.nsWindow, C.bool(enabled))
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) setMaximiseButtonEnabled(enabled bool) {
|
||||
//C.enableMaximiseButton(w.nsWindow, C.bool(enabled))
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) disableSizeConstraints() {
|
||||
x, y, width, height, scale := w.getCurrentMonitorGeometry()
|
||||
w.setMinMaxSize(x, y, width*scale, height*scale)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue