go-flutter-desktop-embedder: github.com/Drakirus/go-flutter-desktop-embedder Index | Files | Directories

package gutter

import "github.com/Drakirus/go-flutter-desktop-embedder"

Index

Package Files

gutter.go keyboard.go option.go plugin_receiver.go system_plugins.go text_model.go

Constants

const (
    ModNone         int = 0
    ModShift        int = 1
    ModControl      int = 2
    ModShiftControl int = 3
    ModAlt          int = 4
    ModSuper        int = 8
)

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)

func Run Uses

func Run(options ...Option) (err error)

Run executes a flutter application with the provided options. given limitations this method must be called by the main function directly.

type ArgsAppSwitcherDescription Uses

type ArgsAppSwitcherDescription struct {
    Label        string `json:"label"`
    PrimaryColor int64  `json:"primaryColor"`
}

ArgsAppSwitcherDescription Args content

type KeyboardShortcuts Uses

type KeyboardShortcuts struct {
    Cut       glfw.Key
    Copy      glfw.Key
    Paste     glfw.Key
    SelectAll glfw.Key
}

KeyboardShortcuts Struct where user can define his own keyboard shortcut. This will allow application to support keyboard layout different from US layout

type Option Uses

type Option func(*config)

Option for gutter

func ApplicationICUDataPath Uses

func ApplicationICUDataPath(p string) Option

ApplicationICUDataPath specify the path to the ICUData.

func ApplicationWindowDimension Uses

func ApplicationWindowDimension(x int, y int) Option

ApplicationWindowDimension specify the startup's dimention of the window.

func OptionAddPluginReceiver Uses

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 Uses

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 Uses

func OptionPixelRatio(ratio float64) Option

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 Uses

func OptionVMArguments(a []string) Option

OptionVMArguments specify the arguments to the Dart VM.

func OptionWindowInitializer Uses

func OptionWindowInitializer(ini func(*glfw.Window) error) Option

OptionWindowInitializer allow initializing the window.

func ProjectAssetPath Uses

func ProjectAssetPath(p string) Option

ProjectAssetPath specify the flutter asset directory.

type PluginReceivers Uses

type PluginReceivers func(
    message *flutter.PlatformMessage,
    flutterEngine *flutter.EngineOpenGL,
    window *glfw.Window,
) bool

PluginReceivers do stuff when receiving Message from the Engine, send result with `flutterEngine.SendPlatformMessageResponse`

Directories

PathSynopsis
flutter
flutter/library

Package gutter imports 10 packages (graph). Updated 2019-02-21. Refresh now. Tools for package owners.