From 0a39c2b9ea518f91786fb36445a8f22f5cef8836 Mon Sep 17 00:00:00 2001 From: Larpon Date: Wed, 10 Mar 2021 17:38:20 +0100 Subject: [PATCH] gg: expand C.ANativeActivity struct definition (#9231) --- vlib/gg/gg_android.c.v | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/vlib/gg/gg_android.c.v b/vlib/gg/gg_android.c.v index 7c28932f31..d90216a589 100644 --- a/vlib/gg/gg_android.c.v +++ b/vlib/gg/gg_android.c.v @@ -11,8 +11,20 @@ fn C.AConfiguration_getDensity(voidptr) u32 fn C.AConfiguration_delete(voidptr) struct C.AAssetManager {} + +// See https://developer.android.com/ndk/reference/struct/a-native-activity for more info. struct C.ANativeActivity { - assetManager voidptr +pub: + assetManager voidptr // Pointer to the Asset Manager instance for the application. (AAssetManager *) + callbacks voidptr // Pointer to the callback function table of the native application. (struct ANativeActivityCallbacks *) + clazz voidptr // The NativeActivity object handle. + env voidptr // JNI context for the main thread of the app. + externalDataPath charptr // Path to this application's external (removable/mountable) data directory. + instance voidptr // This is the native instance of the application. + internalDataPath charptr // Path to this application's internal data directory. + obbPath charptr // Available starting with Honeycomb: path to the directory containing the application's OBB files (if any). + sdkVersion int // The platform's SDK version code. + vm voidptr // The global handle on the process's Java VM } pub fn android_dpi_scale() f32 {