zenity/zenity_windows.go

19 lines
367 B
Go
Raw Normal View History

2022-06-28 09:52:02 -04:00
package zenity
import (
"reflect"
2024-07-10 00:06:01 -04:00
"git.bigun.dev/evan/zenity/internal/win"
2022-06-28 09:52:02 -04:00
)
2022-12-14 18:53:30 -05:00
func isAvailable() bool { return true }
func attach(id any) Option {
2022-06-28 09:52:02 -04:00
if v := reflect.ValueOf(id); v.Kind() == reflect.Uintptr {
id = win.HWND(uintptr(v.Uint()))
} else {
panic("interface conversion: expected uintptr")
}
return funcOption(func(o *options) { o.attach = id })
}