Documentation ¶
Index ¶
- func Export(machine gui.ModalStateMachine, info string, callback func(string), ...)
- func ExportAudio(machine gui.ModalStateMachine, filename string, sound audio.L8)
- func ExportImage(machine gui.ModalStateMachine, filename string, bmp bitmap.Bitmap)
- func Import(machine gui.ModalStateMachine, info string, types []TypeInfo, ...)
- func ImportAudio(machine gui.ModalStateMachine, callback func(l8 audio.L8))
- func ImportImage(machine gui.ModalStateMachine, paletteRetriever func() (bitmap.Palette, error), ...)
- func LoadFile(machine gui.ModalStateMachine, types []TypeInfo, callback SingleFileHandler)
- func SaveFile(machine gui.ModalStateMachine, types []TypeInfo, callback SingleFileHandler)
- type Clipboard
- type SingleFileHandler
- type TypeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Export ¶ added in v0.5.0
func Export(machine gui.ModalStateMachine, info string, callback func(string), lastFailed bool)
Export starts an export dialog series, calling the given callback with a folder name.
func ExportAudio ¶ added in v0.5.0
func ExportAudio(machine gui.ModalStateMachine, filename string, sound audio.L8)
ExportAudio is a helper wrapper for exporting audio.
func ExportImage ¶ added in v1.1.0
func ExportImage(machine gui.ModalStateMachine, filename string, bmp bitmap.Bitmap)
ExportImage is a helper wrapper for exporting single images.
func Import ¶ added in v0.5.0
func Import(machine gui.ModalStateMachine, info string, types []TypeInfo, callback func(string), lastFailed bool)
Import starts an import dialog series, calling the given callback with a file name.
func ImportAudio ¶ added in v0.5.0
func ImportAudio(machine gui.ModalStateMachine, callback func(l8 audio.L8))
ImportAudio is a helper to handle audio file import. The callback is called with the loaded audio.
func ImportImage ¶ added in v1.1.0
func ImportImage(machine gui.ModalStateMachine, paletteRetriever func() (bitmap.Palette, error), callback func(bitmap.Bitmap))
ImportImage is a helper to handle image file import. The callback is called with the loaded image.
func LoadFile ¶ added in v1.7.0
func LoadFile(machine gui.ModalStateMachine, types []TypeInfo, callback SingleFileHandler)
LoadFile starts a dialog series to load a file.
func SaveFile ¶ added in v1.7.0
func SaveFile(machine gui.ModalStateMachine, types []TypeInfo, callback SingleFileHandler)
SaveFile starts a dialog series to save a file.
Types ¶
type Clipboard ¶
type Clipboard interface { // String returns the current value of the clipboard, if it is compatible with UTF-8. String() (string, error) // SetString sets the current value of the clipboard as UTF-8 string. SetString(value string) }
Clipboard represents a temporary storage.
type SingleFileHandler ¶ added in v1.7.0
SingleFileHandler is a callback for a single selected file.