nativeactivity

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Raw CGo bindings for Android NativeActivity

Index

Constants

View Source
const (
	ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY = 1
	ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS    = 2
)
View Source
const (
	ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT = 1
	ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED   = 2
)

Variables

This section is empty.

Functions

func ANativeActivity_finish

func ANativeActivity_finish(activity *ANativeActivity)

func ANativeActivity_hideSoftInput

func ANativeActivity_hideSoftInput(activity *ANativeActivity, flags uint32)

func ANativeActivity_onCreate

func ANativeActivity_onCreate(
	activity *C.ANativeActivity,
	savedState unsafe.Pointer,
	savedStateSize C.size_t,
)

func ANativeActivity_setWindowFlags

func ANativeActivity_setWindowFlags(activity *ANativeActivity, addFlags uint32, removeFlags uint32)

func ANativeActivity_setWindowFormat

func ANativeActivity_setWindowFormat(activity *ANativeActivity, format int32)

func ANativeActivity_showSoftInput

func ANativeActivity_showSoftInput(activity *ANativeActivity, flags uint32)

func BridgeInstallLifecycleCallbacks

func BridgeInstallLifecycleCallbacks(activity *ANativeActivity)

BridgeInstallLifecycleCallbacks installs the bridge callbacks into a ANativeActivity.

func BridgeSetLifecycleCallbacks

func BridgeSetLifecycleCallbacks(cb LifecycleCallbacks)

BridgeSetLifecycleCallbacks registers callbacks for the lifecycle events.

Types

type AAssetManager

type AAssetManager C.AAssetManager

type ANativeActivity

type ANativeActivity C.ANativeActivity

type ANativeActivityCallbacks

type ANativeActivityCallbacks C.ANativeActivityCallbacks

type CgoAllocMap

type CgoAllocMap struct {
	// contains filtered or unexported fields
}

CgoAllocMap stores pointers to C allocated memory for future reference.

func (*CgoAllocMap) Add

func (a *CgoAllocMap) Add(ptr unsafe.Pointer)

func (*CgoAllocMap) Borrow

func (a *CgoAllocMap) Borrow(b *CgoAllocMap)

func (*CgoAllocMap) Free

func (a *CgoAllocMap) Free()

func (*CgoAllocMap) IsEmpty

func (a *CgoAllocMap) IsEmpty() bool

type JNIEnv

type JNIEnv C.JNIEnv

type JavaVM

type JavaVM C.JavaVM

type Jobject

type Jobject C.jobject

type LifecycleCallbacks

type LifecycleCallbacks struct {
	OnCreate                   func(unsafe.Pointer)
	OnStart                    func(unsafe.Pointer)
	OnResume                   func(unsafe.Pointer)
	OnSaveInstanceState        func(unsafe.Pointer, unsafe.Pointer)
	OnPause                    func(unsafe.Pointer)
	OnStop                     func(unsafe.Pointer)
	OnDestroy                  func(unsafe.Pointer)
	OnWindowFocusChanged       func(unsafe.Pointer, int32)
	OnNativeWindowCreated      func(unsafe.Pointer, unsafe.Pointer)
	OnNativeWindowResized      func(unsafe.Pointer, unsafe.Pointer)
	OnNativeWindowRedrawNeeded func(unsafe.Pointer, unsafe.Pointer)
	OnNativeWindowDestroyed    func(unsafe.Pointer, unsafe.Pointer)
	OnInputQueueCreated        func(unsafe.Pointer, unsafe.Pointer)
	OnInputQueueDestroyed      func(unsafe.Pointer, unsafe.Pointer)
	OnContentRectChanged       func(unsafe.Pointer, unsafe.Pointer)
	OnConfigurationChanged     func(unsafe.Pointer)
	OnLowMemory                func(unsafe.Pointer)
}

LifecycleCallbacks holds Go callbacks for ANativeActivity lifecycle events.

type SliceHeader

type SliceHeader struct {
	Data unsafe.Pointer
	Len  int
	Cap  int
}

Jump to

Keyboard shortcuts

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