 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func EngineFlushPendingTasksNow()
- type ArgsAppSwitcherDescription
- type ArgsEditingState
- type CharExportedType
- type EngineOpenGL
- func (flu *EngineOpenGL) EngineSendPlatformMessage(Message PlatformMessage) Result
- func (flu *EngineOpenGL) EngineSendPointerEvent(Event PointerEvent) Result
- func (flu *EngineOpenGL) EngineSendWindowMetricsEvent(Metric WindowMetricsEvent) Result
- func (flu *EngineOpenGL) Run(window uintptr, vmArgs []string) Result
- func (flu *EngineOpenGL) Shutdown() Result
 
- type Message
- type PlatformMessage
- type PointerEvent
- type PointerPhase
- type Result
- type WindowMetricsEvent
Constants ¶
const ( // channel PlatformChannel = "flutter/platform" TextInputChannel = "flutter/textinput" // Args -> struct AppSwitcherDescription SetDescriptionMethod = "SystemChrome.setApplicationSwitcherDescription" // Args -> struct ArgsEditingState TextUpdateStateMethod = "TextInputClient.updateEditingState" // text TextInputClientSet = "TextInput.setClient" TextInputClientClear = "TextInput.clearClient" TextInputSetEditState = "TextInput.setEditingState" )
Constant values used to read/send messages to the Flutter Engine.
Variables ¶
This section is empty.
Functions ¶
func EngineFlushPendingTasksNow ¶
func EngineFlushPendingTasksNow()
EngineFlushPendingTasksNow flush tasks on a message loop not controlled by the Flutter engine. deprecated soon.
Types ¶
type ArgsAppSwitcherDescription ¶
type ArgsAppSwitcherDescription struct {
	Label        string `json:"label"`
	PrimaryColor int64  `json:"primaryColor"`
}
    ArgsAppSwitcherDescription Args content
type ArgsEditingState ¶
type ArgsEditingState struct {
	Text                   string `json:"text"`
	SelectionBase          int    `json:"selectionBase"`
	SelectionExtent        int    `json:"selectionExtent"`
	SelectionAffinity      string `json:"selectionAffinity"`
	SelectionIsDirectional bool   `json:"selectionIsDirectional"`
	ComposingBase          int    `json:"composingBase"`
	ComposingExtent        int    `json:"composingExtent"`
}
    ArgsEditingState Args content
type EngineOpenGL ¶
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
	PixelRatio  float64
	AssetsPath  *CharExportedType
	IcuDataPath *CharExportedType
}
    EngineOpenGL corresponds to the C.FlutterEngine with his associated callback's method.
func (*EngineOpenGL) EngineSendPlatformMessage ¶
func (flu *EngineOpenGL) EngineSendPlatformMessage(Message PlatformMessage) Result
EngineSendPlatformMessage is used to send a PlatformMessage to the Flutter engine.
func (*EngineOpenGL) EngineSendPointerEvent ¶
func (flu *EngineOpenGL) EngineSendPointerEvent(Event PointerEvent) Result
EngineSendPointerEvent is used to send an PointerEvent to the Flutter engine.
func (*EngineOpenGL) EngineSendWindowMetricsEvent ¶
func (flu *EngineOpenGL) EngineSendWindowMetricsEvent(Metric WindowMetricsEvent) Result
EngineSendWindowMetricsEvent is used to send a WindowMetricsEvent to the Flutter Engine.
func (*EngineOpenGL) Run ¶
func (flu *EngineOpenGL) Run(window uintptr, vmArgs []string) Result
Run launches the Flutter Engine in a background thread.
func (*EngineOpenGL) Shutdown ¶
func (flu *EngineOpenGL) Shutdown() Result
Shutdown stops the Flutter engine.
type Message ¶
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 ¶
type PlatformMessage struct {
	Channel        string
	Message        Message
	ResponseHandle *platformMessageResponseHandle
}
    PlatformMessage represents a message from or to the Flutter Engine (and thus the dart code)
type PointerEvent ¶
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 ¶
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 ¶
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 ¶
WindowMetricsEvent represents a window's resolution.