Documentation
¶
Index ¶
- Constants
- Variables
- func Run(options ...Option) (err error)
- type ArgsAppSwitcherDescription
- type KeyboardShortcuts
- type Option
- func ApplicationICUDataPath(p string) Option
- func ApplicationWindowDimension(x int, y int) Option
- func OptionAddPluginReceiver(handler PluginReceivers, channelName string) Option
- func OptionKeyboardLayout(keyboardLayout KeyboardShortcuts) Option
- func OptionPixelRatio(ratio float64) Option
- func OptionVMArguments(a []string) Option
- func OptionWindowInitializer(ini func(*glfw.Window) error) Option
- func ProjectAssetPath(p string) Option
- func ProjectAssetsPath(p string) Option
- func WindowIcon(iconProivder func() ([]image.Image, error)) Option
- type PluginReceivers
Constants ¶
const ( ModNone int = 0 ModShift int = 1 ModControl int = 2 ModShiftControl int = 3 ModAlt int = 4 ModShiftAlt int = 5 ModSuper int = 8 ModShiftSuper int = 9 )
Modifier keys from glfw
Variables ¶
var KeyboardAzertyLayout = KeyboardShortcuts{ Cut: glfw.KeyX, Copy: glfw.KeyC, Paste: glfw.KeyV, SelectAll: glfw.KeyQ, }
KeyboardAzertyLayout gives an Azerty layout (french)
var KeyboardQwertyLayout = KeyboardShortcuts{ Cut: glfw.KeyX, Copy: glfw.KeyC, Paste: glfw.KeyV, SelectAll: glfw.KeyA, }
KeyboardQwertyLayout is the default key for shortcuts (US-layout)
Functions ¶
Types ¶
type ArgsAppSwitcherDescription ¶
type ArgsAppSwitcherDescription struct { Label string `json:"label"` PrimaryColor int64 `json:"primaryColor"` }
ArgsAppSwitcherDescription Args content
type KeyboardShortcuts ¶
KeyboardShortcuts Struct where user can define his own keyboard shortcut. This will allow application to support keyboard layout different from US layout
type Option ¶
type Option func(*config)
Option for gutter
func ApplicationICUDataPath ¶
ApplicationICUDataPath specify the path to the ICUData.
func ApplicationWindowDimension ¶
ApplicationWindowDimension specify the startup's dimention of the window.
func OptionAddPluginReceiver ¶
func OptionAddPluginReceiver(handler PluginReceivers, channelName string) Option
OptionAddPluginReceiver add a new function that will be trigger when the FlutterEngine send a PlatformMessage to the Embedder
func OptionKeyboardLayout ¶
func OptionKeyboardLayout(keyboardLayout KeyboardShortcuts) Option
OptionKeyboardLayout allow application to support keyboard that have a different layout when the FlutterEngine send a PlatformMessage to the Embedder
func OptionPixelRatio ¶
OptionPixelRatio forces the the scale factor for the screen. By default, go-flutter will calculate the correct pixel ratio for the user, based on their monitor DPI. Setting this option is not advised.
func OptionVMArguments ¶
OptionVMArguments specify the arguments to the Dart VM.
func OptionWindowInitializer ¶
OptionWindowInitializer allow initializing the window.
func ProjectAssetPath ¶
ProjectAssetPath specify the flutter assets directory.
func ProjectAssetsPath ¶
ProjectAssetsPath specify the flutter assets directory.
func WindowIcon ¶
WindowIcon sets an icon provider func, which is called during window initialization. For tips on the kind of images to provide, see https://godoc.org/github.com/go-gl/glfw/v3.2/glfw#Window.SetIcon
type PluginReceivers ¶
type PluginReceivers func( message *embedder.PlatformMessage, flutterEngine *embedder.FlutterEngine, window *glfw.Window, ) bool
PluginReceivers do stuff when receiving Message from the Engine, send result with `flutterEngine.SendPlatformMessageResponse`