zenity/zenity_darwin.go

17 lines
442 B
Go
Raw Normal View History

2022-06-28 09:52:02 -04:00
package zenity
// Attach returns an Option to set the parent window to attach to.
//
// Attach accepts:
2022-07-28 20:16:15 -04:00
// - a window id (int) on Unix
// - a window handle (~uintptr) on Windows
// - an application name (string) or process id (int) on macOS
2022-06-28 09:52:02 -04:00
func Attach(id any) Option {
switch id.(type) {
case int, string:
default:
panic("interface conversion: expected int or string")
}
return funcOption(func(o *options) { o.attach = id })
}