cocoa

package module
v0.0.0-...-92b97b7 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2017 License: MIT Imports: 4 Imported by: 0

README

cocoa

Some common Cocoa functionality accessible with Go.

Documentation

Overview

+build darwin

Index

Constants

View Source
const (
	// NSAlertFirstButtonReturn return value when first button in a prompt is clicked
	NSAlertFirstButtonReturn = 1000
	// NSAlertSecondButtonReturn return value when second buttion in a prompt is clicked
	NSAlertSecondButtonReturn = 1001
	// NSAlertThirdButtonReturn return value when third button in a prompt is clicked
	NSAlertThirdButtonReturn = 1002
)

Variables

This section is empty.

Functions

func AddStartCallback

func AddStartCallback(c startCallback)

AddStartCallback adds callback function which is called when app starts.

func AddUrlCallback

func AddUrlCallback(c urlCallback)

AddUrlCallback adds a callback which will receive the URL app was started with.

func AutoStart

func AutoStart(flag bool)

AutoStart sets whether app starts automatically at login.

func BundleIdentifier

func BundleIdentifier() string

BundleIdentifier returns this app's bundle identifier in reverse RFC 1034 (e.g. com.bitbucket.djlawhead)

func BundlePath

func BundlePath() string

BundlePath path of bundle on filesystem

func Log

func Log(message string)

Log logs a message to OS X console

func ShowDialog

func ShowDialog(message string)

ShowDialog shows a dialog/alert message

func ShowFileDialog

func ShowFileDialog(title, defaultDirectory string,
	fileTypes []string,
	forFiles bool, multiselect bool) []string

ShowFileDialog shows a file-system dialog

func ShowPrompt

func ShowPrompt(message, buttonLabel, altButtonLabel string) int

ShowPrompt shows a yes/no dialog prompt

func Start

func Start()

Start runs main app thread

func Stop

func Stop()

Stop stops main app thread

Types

This section is empty.

Jump to

Keyboard shortcuts

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