From 3fbceec8de833416bf1ae049f959f222c3f1a4a0 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Tue, 02 Jun 2026 14:05:59 +0800
Subject: [PATCH] Prepare Round 1 model profile QA baseline
---
privatevoice.src/internal/overlay/overlay_windows.go | 55 ++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 38 insertions(+), 17 deletions(-)
diff --git a/VoiceSnapGo/internal/overlay/overlay_windows.go b/privatevoice.src/internal/overlay/overlay_windows.go
similarity index 96%
rename from VoiceSnapGo/internal/overlay/overlay_windows.go
rename to privatevoice.src/internal/overlay/overlay_windows.go
index 251be9e..8bd89f6 100755
--- a/VoiceSnapGo/internal/overlay/overlay_windows.go
+++ b/privatevoice.src/internal/overlay/overlay_windows.go
@@ -96,18 +96,18 @@
pt wPoint
}
type wWndClassEx struct {
- cbSize uint32
- style uint32
- wndProc uintptr
- clsExtra int32
- wndExtra int32
- hInstance uintptr
- hIcon uintptr
- hCursor uintptr
- hbrBg uintptr
- menuName *uint16
- className *uint16
- hIconSm uintptr
+ cbSize uint32
+ style uint32
+ wndProc uintptr
+ clsExtra int32
+ wndExtra int32
+ hInstance uintptr
+ hIcon uintptr
+ hCursor uintptr
+ hbrBg uintptr
+ menuName *uint16
+ className *uint16
+ hIconSm uintptr
}
type gdipSI struct {
ver uint32
@@ -300,13 +300,34 @@
func (o *winOverlay) SetVolume(vol float64) { trySendF(o.volCh, vol) }
func (o *winOverlay) SetPosition(x, y int) { trySendP(o.posCh, [2]int{x, y}) }
func (o *winOverlay) GetPosition() (int, int) { return o.posX, o.posY }
+func (o *winOverlay) Size() (int, int) { return capW, capH }
func (o *winOverlay) OnDragged(fn func(x, y int)) { o.dragCb = fn }
func (o *winOverlay) Close() { close(o.closeCh); <-o.done }
-func trySend(ch chan bool, v bool) { select { case ch <- v: default: } }
-func trySendS(ch chan statusCmd, v statusCmd) { select { case ch <- v: default: } }
-func trySendF(ch chan float64, v float64) { select { case ch <- v: default: } }
-func trySendP(ch chan [2]int, v [2]int) { select { case ch <- v: default: } }
+func trySend(ch chan bool, v bool) {
+ select {
+ case ch <- v:
+ default:
+ }
+}
+func trySendS(ch chan statusCmd, v statusCmd) {
+ select {
+ case ch <- v:
+ default:
+ }
+}
+func trySendF(ch chan float64, v float64) {
+ select {
+ case ch <- v:
+ default:
+ }
+}
+func trySendP(ch chan [2]int, v [2]int) {
+ select {
+ case ch <- v:
+ default:
+ }
+}
// ---- Main render thread ----
@@ -336,7 +357,7 @@
// Register window class
hInst, _, _ := kGetModuleHandle.Call(0)
- cls, _ := syscall.UTF16PtrFromString("VoiceSnapOverlay")
+ cls, _ := syscall.UTF16PtrFromString("PrivateVoiceInputOverlay")
wc := wWndClassEx{
cbSize: uint32(unsafe.Sizeof(wWndClassEx{})),
wndProc: syscall.NewCallback(overlayWndProc),
--
Gitblit v1.9.3