ns

package
v0.0.0-...-6ff2563 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MPL-2.0 Imports: 8 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

func HideApplication()

func HideOtherApplications

func HideOtherApplications()

func InstallAppDelegate

func InstallAppDelegate(urlOpener func([]string))

func InstallSystemThemeChangedCallback

func InstallSystemThemeChangedCallback(f func())

func IsDarkModeEnabled

func IsDarkModeEnabled() bool

func SetActivationPolicy

func SetActivationPolicy(policy ActivationPolicy)

func SetHelpMenu

func SetHelpMenu(menu Menu)

func SetMainMenu

func SetMainMenu(menu Menu)

func SetServicesMenu

func SetServicesMenu(menu Menu)

func SetWindowsMenu

func SetWindowsMenu(menu Menu)

func UnhideAllApplications

func UnhideAllApplications()

Types

type ActivationPolicy

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

type Array

type Array C.CFArrayRef

func NewArrayFromStringSlice

func NewArrayFromStringSlice(slice []string) Array

func (Array) ArrayOfStringToStringSlice

func (a Array) ArrayOfStringToStringSlice() []string

func (Array) ArrayOfURLToStringSlice

func (a Array) ArrayOfURLToStringSlice() []string

func (Array) Count

func (a Array) Count() int

func (Array) Release

func (a Array) Release()

func (Array) StringAtIndex

func (a Array) StringAtIndex(index int) String

func (Array) URLAtIndex

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

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

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

func (p OpenPanel) DirectoryURL() URL

func (OpenPanel) ResolvesAliases

func (p OpenPanel) ResolvesAliases() bool

func (OpenPanel) RunModal

func (p OpenPanel) RunModal() bool

func (OpenPanel) SetAllowedFileTypes

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

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) InitialFileName

func (p SavePanel) InitialFileName() string

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) SetInitialFileName

func (p SavePanel) SetInitialFileName(name string)

func (SavePanel) URL

func (p SavePanel) URL() URL

type String

type String C.CFStringRef

func NewString

func NewString(str string) String

func (String) Release

func (s String) Release()

func (String) String

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

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