Merge Aether tools

This commit is contained in:
Joshua Granick
2014-09-30 17:41:39 -07:00
parent f1e3707ad9
commit 540aa48c39
272 changed files with 35574 additions and 127 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.haxe.extension.::extensionLowerCase::" >
</manifest>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="::className::" default="help">
<property environment="env"/>
<property name="sdk.dir" value="${env.ANDROID_SDK}"/>
<property file="local.properties"/>
<property file="ant.properties"/>
<property file="project.properties"/>
<import file="${sdk.dir}/tools/ant/build.xml"/>
</project>

View File

@@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
android.library=true
android.library.reference.1=../extension-api
# Project target.
target=android-::ANDROID_TARGET_SDK_VERSION::

View File

@@ -0,0 +1,137 @@
package org.haxe.extension;
import android.app.Activity;
import android.content.res.AssetManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
/*
You can use the Android Extension class in order to hook
into the Android activity lifecycle. This is not required
for standard Java code, this is designed for when you need
deeper integration.
You can access additional references from the Extension class,
depending on your needs:
- Extension.assetManager (android.content.res.AssetManager)
- Extension.callbackHandler (android.os.Handler)
- Extension.mainActivity (android.app.Activity)
- Extension.mainContext (android.content.Context)
- Extension.mainView (android.view.View)
You can also make references to static or instance methods
and properties on Java classes. These classes can be included
as single files using <java path="to/File.java" /> within your
project, or use the full Android Library Project format (such
as this example) in order to include your own AndroidManifest
data, additional dependencies, etc.
These are also optional, though this example shows a static
function for performing a single task, like returning a value
back to Haxe from Java.
*/
public class ::className:: extends Extension {
public static int sampleMethod (int inputValue) {
return inputValue * 100;
}
/**
* Called when an activity you launched exits, giving you the requestCode
* you started it with, the resultCode it returned, and any additional data
* from it.
*/
public boolean onActivityResult (int requestCode, int resultCode, Intent data) {
return true;
}
/**
* Called when the activity is starting.
*/
public void onCreate (Bundle savedInstanceState) {
}
/**
* Perform any final cleanup before an activity is destroyed.
*/
public void onDestroy () {
}
/**
* Called as part of the activity lifecycle when an activity is going into
* the background, but has not (yet) been killed.
*/
public void onPause () {
}
/**
* Called after {@link #onStop} when the current activity is being
* re-displayed to the user (the user has navigated back to it).
*/
public void onRestart () {
}
/**
* Called after {@link #onRestart}, or {@link #onPause}, for your activity
* to start interacting with the user.
*/
public void onResume () {
}
/**
* Called after {@link #onCreate} &mdash; or after {@link #onRestart} when
* the activity had been stopped, but is now again being displayed to the
* user.
*/
public void onStart () {
}
/**
* Called when the activity is no longer visible to the user, because
* another activity has been resumed and is covering this one.
*/
public void onStop () {
}
}