# An Android activity implemented in C. This is the C part of `NativeActivity`
# which is the Java part.
#
# The callbacks at this level are synchronous on the UI thread. Thus app.nit
# do not use them, and instead rely on `NativeAppGlue`.
extern class NdkNativeActivity `{ ANativeActivity * `}
# Callbacks on the main thread
# FIXME This would not yet be usable, to implement when Nit has threads
#fun set_callbacks_handler(handler: App) or callbacks= ...
# Java VM associated to `self`
fun vm: JavaVM `{ return self->vm; `}
# JNI environmnet associated to `self`
fun env: JniEnv `{ return self->env; `}
# The `NativeActivity`, as in the Java object, associated to `self`
fun java_native_activity: NativeActivity `{ return self->clazz; `}
# Path to this application's internal data directory.
fun internal_data_path: CString `{ return (char*)self->internalDataPath; `}
# Path to this application's external (removable/mountable) data directory.
fun external_data_path: CString `{ return (char*)self->externalDataPath; `}
# The platform's SDK version code.
fun sdk_version: Int `{ return self->sdkVersion; `}
# This is the native instance of the application. It is not used by
# the framework, but can be set by the application to its own instance
# state.
fun instance: Pointer `{ return self->instance; `}
# Pointer to the Asset Manager instance for the application. The application
# uses this to access binary assets bundled inside its own .apk file.
#
# TODO activate in a future `asset_manager` module if it cannot be done in Java
#fun asset_manager: AssetManager `{ return self->assetManager; `}
# Available starting with Honeycomb: path to the directory containing
# the application's OBB files (if any). If the app doesn't have any
# OBB files, this directory may not exist.
# api?
#
# TODO activate in a future module at API 11
#fun obb_path: CString `{ return (char*)self->obbPath; `}
end
lib/android/native_app_glue.nit:267,1--314,3