lib/android: clean up whitespaces in native_app_glue
[nit.git] / lib / android / native_app_glue.nit
index af3c797..31e5430 100644 (file)
 #   is on the same thread as Nit and manages the synchronization with the
 #   main Android thread.
 #
-# * `NativeActivity` is implemented in Java by `android.app.NativeActivity`,
+# * `NativeNativeActivity` is implemented in Java by `android.app.NativeActivity`,
 #   which is a subclass of `Activity` and `Context` (in Java). It represent
 #   main activity of the running application. Use it to get anything related
 #   to the `Context` and as anchor to execute Java UI code.
-module native_app_glue
+module native_app_glue is ldflags "-landroid"
 
 import platform
 import log
+import activities
 
 in "C header" `{
        #include <android_native_app_glue.h>
@@ -114,22 +115,12 @@ in "C body" `{
        }
 `}
 
-# An Android activity context
-extern class NativeContext in "Java" `{ android.content.Context `}
-       super JavaObject
-end
-
-# A wrapper of context
-extern class NativeContextWrapper in "Java" `{ android.content.ContextWrapper `}
-       super NativeContext
-end
-
 # Android SDK's `android.app.NativeActivity`.
 #
 # Can be used to get anything related to the `Context` of the activity in Java
 # and as anchor to execute Java UI code.
-extern class NativeActivity in "Java" `{ android.app.NativeActivity `}
-       super NativeContextWrapper
+extern class NativeNativeActivity in "Java" `{ android.app.NativeActivity `}
+       super NativeActivity
 end
 
 redef class App
@@ -157,7 +148,7 @@ redef class App
        `}
 
        # Notification from the Android framework to generate a new saved state
-       # 
+       #
        # You can use the `shared_preferences` module or `NativeAppGlue::saved_state`.
        fun save_state do end
 
@@ -184,7 +175,7 @@ redef class App
        fun stop do end
 
        # Notification from the Android framework, `native_activity` is being destroyed
-       # 
+       #
        # Clean up and exit.
        fun destroy do end
 
@@ -206,7 +197,7 @@ redef class App
        fun input_changed do end
 
        # Notification from the Android framework, the window has been resized.
-       # 
+       #
        # Please redraw with its new size.
        fun window_resized do end
 
@@ -214,7 +205,7 @@ redef class App
        fun window_redraw_needed do end
 
        # Notification from the Android framework, the content area of the window has changed
-       # 
+       #
        # Raised when the soft input window being shown or hidden, and similar events.
        fun content_rect_changed do end
 
@@ -236,7 +227,7 @@ redef class App
 
                struct android_app *app_glue = App_native_app_glue(recv);
                struct android_poll_source* source = (struct android_poll_source*)data;
-               
+
                // Process this event.
                if (source != NULL) source->process(app_glue, source);
        `}
@@ -264,13 +255,13 @@ extern class NdkNativeActivity `{ ANativeActivity * `}
 
        # Path to this application's internal data directory.
        fun internal_data_path: NativeString `{ return (char*)recv->internalDataPath; `}
-    
+
        # Path to this application's external (removable/mountable) data directory.
        fun external_data_path: NativeString `{ return (char*)recv->externalDataPath; `}
-    
+
        # The platform's SDK version code.
        fun sdk_version: Int `{ return recv->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.