package driver

import "fyne.io/fyne/v2/driver"

Index

Functions

func RunNative

func RunNative(fn func(interface{}) error) error

RunNative provides a way to execute code within the platform-specific runtime context for various runtimes. This is mostly useful for Android where the JVM provides functionality that is not accessible directly in CGo. The call for most platforms will just execute passing an `UnknownContext` and returning any error reported.

Since: 2.3

Types

type AndroidContext

type AndroidContext struct {
	VM, Env, Ctx uintptr
}

AndroidContext is passed to the `RunNative` callback when it is executed on an Android device. The VM, Env and Ctx pointers are reqiured to make various calls into JVM methods.

Since: 2.3

type UnknownContext

type UnknownContext struct{}

UnknownContext is passed to the `RunNative` callback when it is executed on devices without special native context.

Since: 2.3

Source Files

native.go native_other.go

Directories

PathSynopsis
driver/desktopPackage desktop provides desktop specific driver functionality.
driver/mobilePackage mobile provides mobile specific driver functionality.
driver/software
Version
v2.3.1-rc1
Published
Feb 8, 2023
Platform
windows/amd64
Last checked
8 minutes ago

Tools for package owners.