Files
silver_pose/v2/internal/ui/sound_windows.go
T
ilaandClaude Opus 4.8 4188a2b06c 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>
2026-07-23 14:26:19 +08:00

18 lines
369 B
Go

//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))
}