feat(v2): migrate UI from Walk to Gio
Rewrites internal/ui/window.go in Gio, keeping the Window interface (NewWindow/Run/Present/PresentAlert/ReportIssue) and the pure-Go ViewModel. Background updates mutate shared state under a lock and Invalidate; the Gio loop renders the latest frame. Dual tabs, widget.Image for render's RGBA, a self-drawn confirm dialog and a MessageBeep sound. Drops lxn/walk (and the TTM_ADDTOOL/comctl class of problems). Verified via GOOS=windows CGO_ENABLED=0 build of the UI packages; full app build needs Windows+CGo for onnxruntime. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
//go:build windows
|
||||
|
||||
package ui
|
||||
|
||||
import "golang.org/x/sys/windows"
|
||||
|
||||
// MB_ICONHAND selects the system critical-stop sound for a confirmed fall.
|
||||
const mbIconHand = 0x00000010
|
||||
|
||||
var (
|
||||
user32 = windows.NewLazySystemDLL("user32.dll")
|
||||
procMessageBeep = user32.NewProc("MessageBeep")
|
||||
)
|
||||
|
||||
func playAlertSound() {
|
||||
_, _, _ = procMessageBeep.Call(uintptr(mbIconHand))
|
||||
}
|
||||
Reference in New Issue
Block a user