utility

package
v0.0.0-...-0c5ae8d Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AppearanceChangedNotification foundation.NotificationName = "AppleInterfaceThemeChangedNotification"
View Source
const Identifier = "com.charlie.proxies"
View Source
const Infinity = math.MaxFloat64

Variables

Functions

func Active

func Active(constraints ...appkit.LayoutConstraint)

func AddAppearanceObserver

func AddAppearanceObserver(observer Observer)

func ColorHex

func ColorHex(hex string) appkit.Color

func ColorWithAppearance

func ColorWithAppearance(light, dark appkit.Color) appkit.Color

func ColorWithRGBA

func ColorWithRGBA(r, g, b, a float64) appkit.Color

func Controller

func Controller(view appkit.IView) appkit.ViewController

func FontAttribute

func FontAttribute(size float64) map[foundation.AttributedStringKey]objc.IObject

func ImageHierarchical

func ImageHierarchical() appkit.ImageSymbolConfiguration

func IsDark

func IsDark() bool
func MenuItem(title, icon string, handler action.Handler, configurations ...appkit.ImageSymbolConfiguration) appkit.MenuItem

func RectOf

func RectOf(size foundation.Size) foundation.Rect

func SeparatorLine

func SeparatorLine(opt SeparatorOption) appkit.Box

func ShowAlert

func ShowAlert(opts ...AlertOption)

func SizeOf

func SizeOf(width, height float64) foundation.Size

func SupportPath

func SupportPath(sub ...string) string

func SymbolButton

func SymbolButton(symbol string, super appkit.IView) appkit.Button

func SymbolImage

func SymbolImage(name string, cfg ...appkit.ImageSymbolConfiguration) appkit.Image

func TableColumn

func TableColumn(identifier appkit.UserInterfaceItemIdentifier, title string) appkit.TableColumn

func Ternary

func Ternary[T any](b bool, t, f T) T

Types

type AlertOption

type AlertOption func(*alertOpts)

func WithAlertAccessoryView

func WithAlertAccessoryView(view appkit.IView) AlertOption

func WithAlertButtons

func WithAlertButtons(buttons ...string) AlertOption

func WithAlertHandler

func WithAlertHandler(h func(returnCode appkit.ModalResponse)) AlertOption

func WithAlertHelpAnchor

func WithAlertHelpAnchor(anchor appkit.HelpAnchorName) AlertOption

func WithAlertIcon

func WithAlertIcon(icon appkit.IImage) AlertOption

func WithAlertMessage

func WithAlertMessage(message string) AlertOption

func WithAlertOnHelpClicked

func WithAlertOnHelpClicked(clicked func(appkit.Alert) bool) AlertOption

func WithAlertShowHelp

func WithAlertShowHelp(show bool) AlertOption

func WithAlertShowSuppression

func WithAlertShowSuppression(show bool) AlertOption

func WithAlertStyle

func WithAlertStyle(style appkit.AlertStyle) AlertOption

func WithAlertTitle

func WithAlertTitle(title string) AlertOption

func WithAlertWindow

func WithAlertWindow(w appkit.IWindow) AlertOption

type Observer

type Observer func()

type ObserverObj

type ObserverObj struct {
	// contains filtered or unexported fields
}

func (*ObserverObj) AddAppearanceObserver

func (c *ObserverObj) AddAppearanceObserver(observer Observer)

func (*ObserverObj) Start

func (c *ObserverObj) Start(types foundation.NotificationName)

type SeparatorOption

type SeparatorOption struct {
	Super  appkit.IView
	Color  appkit.Color
	Dark   appkit.Color
	Light  appkit.Color
	Width  float64
	Height float64
}

Jump to

Keyboard shortcuts

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