Files
Reims-Go/internal/host/stubs_window_other.go
T
千川白浪 107a8d73e0 refactor: 收拢核心管线、强化错误处理、优化热路径与更新体积 (#200)
* refactor: 收拢核心管线、强化错误处理、优化热路径与更新体积

* fix: preserve download recovery and bound PBZX decoding

Keep VM diagnostics available during plugin initialization failures and verify settings through the unified driver lifecycle.
2026-12-05 20:54:41 +08:00

77 lines
2.3 KiB
Go

//go:build !windows
package host
import (
"context"
"errors"
"github.com/Nwflower/reims-go/internal/i18n"
)
type VMCloseChoice uint8
const (
VMCloseCancel VMCloseChoice = iota
VMCloseShutdown
VMCloseSuspend
)
func ConfirmVMClose(context.Context, uintptr, string, i18n.Locale, string, bool) (VMCloseChoice, error) {
return VMCloseCancel, errors.ErrUnsupported
}
func probeDisplays() []DisplayInfo { return nil }
func MoveProcessWindowToDisplay(pid uint32, displayName string, borderless bool) (bool, error) {
return false, nil
}
func MoveProcessTreeWindowToDisplay(pids []uint32, displayName string, borderless bool) (bool, error) {
return false, nil
}
// ForegroundPID is not implemented off Windows and always reports no owner.
func ForegroundPID() uint32 { return 0 }
// FocusProcessTreeWindow is not implemented off Windows.
func FocusProcessTreeWindow([]uint32) bool { return false }
// ForegroundInPIDs is not implemented off Windows and always reports false.
func ForegroundInPIDs([]uint32) bool { return false }
// IsProcessTreeWindowFullscreen is not implemented off Windows.
func IsProcessTreeWindowFullscreen([]uint32) bool { return false }
// ToggleProcessTreeWindowFullscreen is not implemented off Windows.
func ToggleProcessTreeWindowFullscreen([]uint32) (bool, error) {
return false, errors.New("toggling a VM window's full screen mode is only supported on Windows")
}
type fullscreenHotkeyHook struct{}
func startFullscreenHotkeyHook(_ *FullscreenHotkeyService) *fullscreenHotkeyHook { return nil }
func (h *fullscreenHotkeyHook) Close() {}
func (h *fullscreenHotkeyHook) active() bool { return false }
func IsForegroundDisplayWindow(_ uintptr, _ uint32) bool { return false }
// IMEBridge is a no-op stub on non-Windows hosts.
type IMEBridge struct{}
func StartIMEBridge(onText func(target IMETarget, text string)) (*IMEBridge, error) {
return &IMEBridge{}, nil
}
func (b *IMEBridge) SetTargets(targets []IMETarget) {}
func (b *IMEBridge) SetEnabled(enabled bool) {}
func (b *IMEBridge) Close() {}
type mouseWheelHook struct{}
func startMouseWheelHook(_ *InputService) (*mouseWheelHook, error) {
return &mouseWheelHook{}, nil
}
func (h *mouseWheelHook) Close() {}