mobile

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: BSD-3-Clause Imports: 50 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

This directory is a fork of the golang.org/x/mobile package. It has largely
deviated from the original package to better support bellui.

The full project, its license can be found at https://github.com/golang/mobile

This package is for the purpose of removing the dependency of mobile drivers
and will be removed in due course.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClipboard

func NewClipboard() bellui.Clipboard

func NewGoMobileDriver

func NewGoMobileDriver() bellui.Driver

NewGoMobileDriver sets up a new Driver instance implemented using the Go Mobile extension and OpenGL bindings.

func ShowFileOpenMultiplePicker

func ShowFileOpenMultiplePicker(callback func([]bellui.URIReadCloser, error), filter storage.FileFilter) bool

ShowFileOpenMultiplePicker loads the native file open dialog in multi-select mode and returns the chosen files via the callback func. It reports false — and the callback never fires — when the platform app provides no multi-select picker, so callers can fall back to the canvas dialog instead of silently dropping the request. A cancelled picker calls back (nil, nil); a failure to open any chosen file reports the error rather than a partial set, matching the desktop native backends.

func ShowFileOpenPicker

func ShowFileOpenPicker(callback func(bellui.URIReadCloser, error), filter storage.FileFilter) bool

ShowFileOpenPicker loads the native file open dialog and returns the chosen file path via the callback func. It reports false — and the callback never fires — when the platform app provides no picker, so callers can fall back to the canvas dialog instead of silently dropping the request.

func ShowFileSavePicker

func ShowFileSavePicker(callback func(bellui.URIWriteCloser, error), filter storage.FileFilter, filename string) bool

ShowFileSavePicker loads the native file save dialog and returns the chosen file path via the callback func. It reports false — and the callback never fires — when the platform app provides no picker, so callers can fall back to the canvas dialog instead of silently dropping the request.

func ShowFolderOpenPicker

func ShowFolderOpenPicker(callback func(bellui.ListableURI, error)) bool

ShowFolderOpenPicker loads the native folder open dialog and calls back the chosen directory path as a ListableURI. It reports false — and the callback never fires — when the platform app provides no picker, so callers can fall back to the canvas dialog instead of silently dropping the request.

Types

type Configuration

type Configuration struct {
	SystemTheme bellui.ThemeVariant
}

Configuration is the system information about the current device

type ConfiguredDriver

type ConfiguredDriver interface {
	SetOnConfigurationChanged(func(*Configuration))
}

ConfiguredDriver is a simple type that allows packages to hook into configuration changes of this driver.

Directories

Path Synopsis
Package app lets you write portable all-Go apps for Android and iOS.
Package app lets you write portable all-Go apps for Android and iOS.
event
composition
Package composition defines the IME composition (preedit) event used by the mobile driver to carry input-method composition state from the native platform layer to the focused widget.
Package composition defines the IME composition (preedit) event used by the mobile driver to carry input-method composition state from the native platform layer to the focused widget.
config
Package config defines the event that reports an in-place configuration change to the mobile driver.
Package config defines the event that reports an in-place configuration change to the mobile driver.
key
Package key defines an event for physical keyboard keys.
Package key defines an event for physical keyboard keys.
lifecycle
Package lifecycle defines an event for an app's lifecycle.
Package lifecycle defines an event for an app's lifecycle.
paint
Package paint defines an event for the app being ready to paint.
Package paint defines an event for the app being ready to paint.
size
Package size defines an event for the dimensions, physical resolution and orientation of the app's window.
Package size defines an event for the dimensions, physical resolution and orientation of the app's window.
textedit
Package textedit defines the committed text-edit event used by the mobile driver to carry a native IME/keyboard edit — a range replacement — from the platform layer to the focused editor through the text-input mirror seam (pre-rebrand tracker #771).
Package textedit defines the committed text-edit event used by the mobile driver to carry a native IME/keyboard edit — a range replacement — from the platform layer to the focused editor through the text-input mirror seam (pre-rebrand tracker #771).
touch
Package touch defines an event for touch input.
Package touch defines an event for touch input.
undoredo
Package undoredo defines the native undo/redo invocation event used by the mobile driver to carry a platform-initiated undo or redo — the iPad soft keyboard's undo/redo bar keys, the three-finger swipe gestures or shake-to-undo, all of which drive the first responder's NSUndoManager — from the platform layer to the focused editor (pre-rebrand tracker #1134).
Package undoredo defines the native undo/redo invocation event used by the mobile driver to carry a platform-initiated undo or redo — the iPad soft keyboard's undo/redo bar keys, the three-finger swipe gestures or shake-to-undo, all of which drive the first responder's NSUndoManager — from the platform layer to the focused editor (pre-rebrand tracker #1134).
Package gl implements Go bindings for OpenGL ES 2.0 and ES 3.0.
Package gl implements Go bindings for OpenGL ES 2.0 and ES 3.0.
Package mobileinit contains common initialization logic for mobile platforms that is relevant to both all-Go apps and gobind-based apps.
Package mobileinit contains common initialization logic for mobile platforms that is relevant to both all-Go apps and gobind-based apps.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL