ns

package
v0.58.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Beep

func Beep()

func DoubleClickInterval

func DoubleClickInterval() time.Duration

func HideApplication added in v0.3.0

func HideApplication()

func HideOtherApplications added in v0.3.0

func HideOtherApplications()

func InstallAppDelegate added in v0.3.0

func InstallAppDelegate(urlOpener func([]string))

func InstallSystemThemeChangedCallback added in v0.3.0

func InstallSystemThemeChangedCallback(f func())

func IsDarkModeEnabled added in v0.3.0

func IsDarkModeEnabled() bool

func SetActivationPolicy added in v0.3.0

func SetActivationPolicy(policy ActivationPolicy)

func SetHelpMenu added in v0.3.0

func SetHelpMenu(menu Menu)

func SetMainMenu added in v0.3.0

func SetMainMenu(menu Menu)

func SetServicesMenu added in v0.3.0

func SetServicesMenu(menu Menu)

func SetWindowsMenu added in v0.3.0

func SetWindowsMenu(menu Menu)

func UnhideAllApplications added in v0.3.0

func UnhideAllApplications()

Types

type ActivationPolicy

type ActivationPolicy uint
const (
	ActivationPolicyRegular ActivationPolicy = iota
	ActivationPolicyAccessory
	ActivationPolicyProhibited
)

type Array

type Array C.CFArrayRef

func NewArrayFromStringSlice added in v0.3.0

func NewArrayFromStringSlice(slice []string) Array

func (Array) ArrayOfStringToStringSlice added in v0.3.0

func (a Array) ArrayOfStringToStringSlice() []string

func (Array) ArrayOfURLToStringSlice added in v0.3.0

func (a Array) ArrayOfURLToStringSlice() []string

func (Array) Count

func (a Array) Count() int

func (Array) Release added in v0.3.0

func (a Array) Release()

func (Array) StringAtIndex

func (a Array) StringAtIndex(index int) String

func (Array) URLAtIndex added in v0.3.0

func (a Array) URLAtIndex(index int) URL

type ControlStateValue

type ControlStateValue int
const (
	ControlStateValueMixed ControlStateValue = iota - 1
	ControlStateValueOff
	ControlStateValueOn
)

type EventModifierFlags

type EventModifierFlags uint
const (
	EventModifierFlagCapsLock EventModifierFlags = 1 << (16 + iota)
	EventModifierFlagShift
	EventModifierFlagControl
	EventModifierFlagOption
	EventModifierFlagCommand
)

func CurrentModifierFlags added in v0.53.0

func CurrentModifierFlags() EventModifierFlags
type Menu C.NSMenuRef

func NewMenu

func NewMenu(title string, updater func(Menu)) Menu
func (m Menu) InsertItemAtIndex(item MenuItem, index int)
func (m Menu) ItemAtIndex(index int) MenuItem
func (m Menu) NumberOfItems() int
func (m Menu) Popup(wnd Window, menu Menu, item MenuItem, bounds geom.Rect[float32])
func (m Menu) Release()
func (m Menu) RemoveAll()
func (m Menu) RemoveItemAtIndex(index int)
func (m Menu) Title() string
type MenuItem C.NSMenuItemRef

func NewMenuItem

func NewMenuItem(tag int, title string, keyEquivalent string, modifiers EventModifierFlags, validator func(MenuItem) bool, handler func(MenuItem)) MenuItem

func NewSeparatorMenuItem

func NewSeparatorMenuItem() MenuItem
func (m MenuItem) IsSeparatorItem() bool
func (m MenuItem) KeyBinding() (keyEquivalent string, modifiers EventModifierFlags)
func (m MenuItem) Menu() Menu
func (m MenuItem) SetKeyBinding(keyEquivalent string, modifiers EventModifierFlags)
func (m MenuItem) SetState(state ControlStateValue)
func (m MenuItem) SetSubMenu(menu Menu)
func (m MenuItem) SetTitle(title string)
func (m MenuItem) State() ControlStateValue
func (m MenuItem) SubMenu() Menu
func (m MenuItem) Tag() int
func (m MenuItem) Title() string

type MutableArray

type MutableArray C.CFMutableArrayRef

type OpenPanel

type OpenPanel C.NSOpenPanelRef

func NewOpenPanel

func NewOpenPanel() OpenPanel

func (OpenPanel) AllowedFileTypes added in v0.3.0

func (p OpenPanel) AllowedFileTypes() Array

func (OpenPanel) AllowsMultipleSelection

func (p OpenPanel) AllowsMultipleSelection() bool

func (OpenPanel) CanChooseDirectories

func (p OpenPanel) CanChooseDirectories() bool

func (OpenPanel) CanChooseFiles

func (p OpenPanel) CanChooseFiles() bool

func (OpenPanel) DirectoryURL added in v0.3.0

func (p OpenPanel) DirectoryURL() URL

func (OpenPanel) ResolvesAliases

func (p OpenPanel) ResolvesAliases() bool

func (OpenPanel) RunModal added in v0.3.0

func (p OpenPanel) RunModal() bool

func (OpenPanel) SetAllowedFileTypes added in v0.3.0

func (p OpenPanel) SetAllowedFileTypes(types Array)

func (OpenPanel) SetAllowsMultipleSelection

func (p OpenPanel) SetAllowsMultipleSelection(set bool)

func (OpenPanel) SetCanChooseDirectories

func (p OpenPanel) SetCanChooseDirectories(set bool)

func (OpenPanel) SetCanChooseFiles

func (p OpenPanel) SetCanChooseFiles(set bool)

func (OpenPanel) SetDirectoryURL added in v0.3.0

func (p OpenPanel) SetDirectoryURL(url URL)

func (OpenPanel) SetResolvesAliases

func (p OpenPanel) SetResolvesAliases(set bool)

func (OpenPanel) URLs

func (p OpenPanel) URLs() Array

type SavePanel

type SavePanel C.NSSavePanelRef

func NewSavePanel

func NewSavePanel() SavePanel

func (SavePanel) AllowedFileTypes

func (p SavePanel) AllowedFileTypes() Array

func (SavePanel) DirectoryURL

func (p SavePanel) DirectoryURL() URL

func (SavePanel) RunModal

func (p SavePanel) RunModal() bool

func (SavePanel) SetAllowedFileTypes

func (p SavePanel) SetAllowedFileTypes(types Array)

func (SavePanel) SetDirectoryURL

func (p SavePanel) SetDirectoryURL(url URL)

func (SavePanel) URL

func (p SavePanel) URL() URL

type String

type String C.CFStringRef

func NewString added in v0.3.0

func NewString(str string) String

func (String) Release added in v0.3.0

func (s String) Release()

func (String) String added in v0.3.0

func (s String) String() string

type URL

type URL C.CFURLRef

func NewFileURL

func NewFileURL(str string) URL

func (URL) AbsoluteString

func (u URL) AbsoluteString() string

func (URL) Release added in v0.3.0

func (u URL) Release()

type View

type View C.NSViewRef

func (View) Frame

func (v View) Frame() geom.Rect[float32]

type Window

type Window C.NSWindowRef

func (Window) ContentView

func (w Window) ContentView() View

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL