summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-10-24 18:33:36 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-24 18:33:36 -0700
commit236568999411214ef440cabc6d12e3bf5f19d8f4 (patch)
treebd7f442be4bc3b6ebbdd7c5ca0dbadc081033a8c /native
parent860c2df4132a2a0be9bcb0e91bfb7e79588c000f (diff)
parente21d91c694e828e6285cc50e79b2a6be6e8c692b (diff)
downloadframeworks_base-236568999411214ef440cabc6d12e3bf5f19d8f4.zip
frameworks_base-236568999411214ef440cabc6d12e3bf5f19d8f4.tar.gz
frameworks_base-236568999411214ef440cabc6d12e3bf5f19d8f4.tar.bz2
Merge "Fix issue #3126018: No way to specify NativeActivity's native method" into gingerbread
Diffstat (limited to 'native')
-rw-r--r--native/include/android/native_activity.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/native/include/android/native_activity.h b/native/include/android/native_activity.h
index a8f11c9..d89bc8b 100644
--- a/native/include/android/native_activity.h
+++ b/native/include/android/native_activity.h
@@ -223,18 +223,34 @@ typedef void ANativeActivity_createFunc(ANativeActivity* activity,
/**
* The name of the function that NativeInstance looks for when launching its
- * native code.
+ * native code. This is the default function that is used, you can specify
+ * "android.app.func_name" string meta-data in your manifest to use a different
+ * function.
*/
extern ANativeActivity_createFunc ANativeActivity_onCreate;
/**
* Finish the given activity. Its finish() method will be called, causing it
- * to be stopped and destroyed.
+ * to be stopped and destroyed. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
*/
void ANativeActivity_finish(ANativeActivity* activity);
+/**
+ * Change the window format of the given activity. Calls getWindow().setFormat()
+ * of the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
void ANativeActivity_setWindowFormat(ANativeActivity* activity, int32_t format);
+/**
+ * Change the window flags of the given activity. Calls getWindow().setFlags()
+ * of the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place. See window.h for flag constants.
+ */
void ANativeActivity_setWindowFlags(ANativeActivity* activity,
uint32_t addFlags, uint32_t removeFlags);
@@ -247,6 +263,12 @@ enum {
ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED = 0x0002,
};
+/**
+ * Show the IME while in the given activity. Calls InputMethodManager.showSoftInput()
+ * for the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
void ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags);
/**
@@ -258,6 +280,12 @@ enum {
ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = 0x0002,
};
+/**
+ * Hide the IME while in the given activity. Calls InputMethodManager.hideSoftInput()
+ * for the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
void ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags);
#ifdef __cplusplus