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

package flutter

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

Index

Package Files

build.go flutter.go flutter_proxy_glfw.go

func EngineFlushPendingTasksNow Uses

func EngineFlushPendingTasksNow()

EngineFlushPendingTasksNow flush tasks on a message loop not controlled by the Flutter engine. deprecated soon.

func NumberOfEngines Uses

func NumberOfEngines() C.int

NumberOfEngines return the number of engine registered into this embedder

type EngineOpenGL Uses

type EngineOpenGL struct {
    // Flutter Engine.
    Engine C.FlutterEngine

    // Necessary callbacks for rendering.
    FMakeCurrent         func(v unsafe.Pointer) bool
    FClearCurrent        func(v unsafe.Pointer) bool
    FPresent             func(v unsafe.Pointer) bool
    FFboCallback         func(v unsafe.Pointer) int32
    FMakeResourceCurrent func(v unsafe.Pointer) bool

    // platform message callback.
    FPlatfromMessage func(message *PlatformMessage, window unsafe.Pointer) bool

    // Engine arguments
    AssetsPath  string
    IcuDataPath string
    // contains filtered or unexported fields
}

EngineOpenGL corresponds to the C.FlutterEngine with his associated callback's method.

func NewEngineOpenGL Uses

func NewEngineOpenGL() *EngineOpenGL

NewEngineOpenGL creates an empty EngineOpenGL and assigns it an index for global lookup.

func SelectEngine Uses

func SelectEngine(index int) *EngineOpenGL

SelectEngine return a EngineOpenGL from an index

func (*EngineOpenGL) EngineSendPointerEvent Uses

func (flu *EngineOpenGL) EngineSendPointerEvent(Event PointerEvent) Result

EngineSendPointerEvent is used to send an PointerEvent to the Flutter engine.

func (*EngineOpenGL) EngineSendWindowMetricsEvent Uses

func (flu *EngineOpenGL) EngineSendWindowMetricsEvent(Metric WindowMetricsEvent) Result

EngineSendWindowMetricsEvent is used to send a WindowMetricsEvent to the Flutter Engine.

func (*EngineOpenGL) Index Uses

func (flu *EngineOpenGL) Index() int

Index returns the index of the engine in the global flutterEngines slice

func (*EngineOpenGL) Run Uses

func (flu *EngineOpenGL) Run(window uintptr, vmArgs []string) Result

Run launches the Flutter Engine in a background thread.

func (*EngineOpenGL) SendPlatformMessage Uses

func (flu *EngineOpenGL) SendPlatformMessage(Message *PlatformMessage) Result

SendPlatformMessage is used to send a PlatformMessage to the Flutter engine.

func (*EngineOpenGL) SendPlatformMessageResponse Uses

func (flu *EngineOpenGL) SendPlatformMessageResponse(
    responseTo *PlatformMessage,
    data []byte,
) Result

SendPlatformMessageResponse is used to send a message to the Flutter side using the correct ResponseHandle!

func (*EngineOpenGL) Shutdown Uses

func (flu *EngineOpenGL) Shutdown() Result

Shutdown stops the Flutter engine.

type Message Uses

type Message struct {
    // Describe the method
    Method string `json:"method"`
    // Actual datas
    Args json.RawMessage `json:"args"`
}

Message is the json content of a PlatformMessage

type PlatformMessage Uses

type PlatformMessage struct {
    Channel        string
    Message        Message
    ResponseHandle *C.FlutterPlatformMessageResponseHandle
}

PlatformMessage represents a `MethodChannel` serialized with the `JSONMethodCodec` TODO Support for `StandardMethodCodec`

type PointerEvent Uses

type PointerEvent struct {
    Phase     PointerPhase
    Timestamp int64
    X         float64
    Y         float64
}

PointerEvent represents the position and phase of the mouse at a given time.

type PointerPhase Uses

type PointerPhase int32

PointerPhase corresponds to the C.enum describing phase of the mouse pointer.

const (
    KCancel PointerPhase = C.kCancel
    KUp     PointerPhase = C.kUp
    KDown   PointerPhase = C.kDown
    KMove   PointerPhase = C.kMove
)

Values representing the mouse phase.

type Result Uses

type Result int32

Result corresponds to the C.enum retuned by the shared flutter library whenever we call it.

const (
    KSuccess               Result = C.kSuccess
    KInvalidLibraryVersion Result = C.kInvalidLibraryVersion
    KInvalidArguments      Result = C.kInvalidArguments
)

Values representing the status of an Result.

type WindowMetricsEvent Uses

type WindowMetricsEvent struct {
    Width      int
    Height     int
    PixelRatio float64
}

WindowMetricsEvent represents a window's resolution.

Directories

PathSynopsis
library

Package flutter imports 6 packages (graph) and is imported by 1 packages. Updated 2019-03-25. Refresh now. Tools for package owners. This is a quick bug-fix fork (has fewer than three commits, and only during the week it was created).