KVMote.go/internal/input/input.go
Ricardo Carneiro 5d016d7087 WIP: mini-window approach for scroll capture
Tentativa de capturar scroll via mini janela sempre-no-topo.
Inclui: MoveWindow/GetMonitorWorkArea via Win32, park consistente
em wx+150/wy+50, ShowCursor loop no goroutine pós-resize.
Revertível: git checkout HEAD~1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 16:51:00 -03:00

35 lines
665 B
Go

package input
import "context"
type Point struct {
X, Y int32
}
type MouseEvent struct {
Message uint32
Point Point
Data uint32
}
type KeyboardEvent struct {
Message uint32
VKCode uint32
ScanCode uint32
Flags uint32
}
type InputHandler interface {
Install(ctx context.Context, onMouse func(MouseEvent) bool, onKey func(KeyboardEvent) bool) error
Uninstall()
SetCursorPos(x, y int32) bool
ShowCursor(show bool)
GetScreenResolution() (int32, int32)
RequestFocus()
SetCursorClip(clip bool)
GetWindowPos() (int32, int32)
GetWindowSize() (int32, int32)
GetMonitorWorkArea() (x, y, w, h int32)
MoveWindow(x, y, w, h int32, topmost bool)
}