mirror of
https://github.com/processing/processing4.git
synced 2026-02-25 16:25:51 +01:00
rewriting event queue setup, changing default imports, general havoc
This commit is contained in:
@@ -90,9 +90,10 @@ class AndroidBuild extends JavaBuild {
|
||||
if (pkg.startsWith("org.json.")) return true;
|
||||
if (pkg.startsWith("org.w3c.dom.")) return true;
|
||||
if (pkg.startsWith("org.xml.sax.")) return true;
|
||||
|
||||
|
||||
if (pkg.startsWith("processing.core.")) return true;
|
||||
if (pkg.startsWith("processing.data.")) return true;
|
||||
if (pkg.startsWith("processing.event.")) return true;
|
||||
if (pkg.startsWith("processing.opengl.")) return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -184,6 +184,7 @@ public class AndroidPreprocessor extends PdePreprocessor {
|
||||
return new String[] {
|
||||
"processing.core.*",
|
||||
"processing.data.*",
|
||||
"processing.event.*",
|
||||
"processing.opengl.*"
|
||||
};
|
||||
}
|
||||
@@ -191,25 +192,28 @@ public class AndroidPreprocessor extends PdePreprocessor {
|
||||
|
||||
@Override
|
||||
public String[] getDefaultImports() {
|
||||
final String prefsLine = Preferences.get("android.preproc.imports.list");
|
||||
final String prefsLine = Preferences.get("android.preproc.imports");
|
||||
if (prefsLine != null) {
|
||||
return PApplet.splitTokens(prefsLine, ", ");
|
||||
}
|
||||
|
||||
// The initial values are stored in here for the day when Android
|
||||
// is broken out as a separate mode.
|
||||
|
||||
// In the future, this may include standard classes for phone or
|
||||
// accelerometer access within the Android APIs. This is currently living
|
||||
// in code rather than preferences.txt because Android mode needs to
|
||||
// maintain its independence from the rest of processing.app.
|
||||
final String[] androidImports = new String[] {
|
||||
"android.view.MotionEvent", "android.view.KeyEvent",
|
||||
"android.graphics.Bitmap", //"java.awt.Image",
|
||||
// "android.view.MotionEvent", "android.view.KeyEvent",
|
||||
// "android.graphics.Bitmap", //"java.awt.Image",
|
||||
"java.io.*", // for BufferedReader, InputStream, etc
|
||||
//"java.net.*", "java.text.*", // leaving otu for now
|
||||
"java.util.*" // for ArrayList and friends
|
||||
//"java.util.zip.*", "java.util.regex.*" // not necessary w/ newer i/o
|
||||
};
|
||||
|
||||
Preferences.set("android.preproc.imports.list",
|
||||
Preferences.set("android.preproc.imports",
|
||||
PApplet.join(androidImports, ","));
|
||||
|
||||
return androidImports;
|
||||
|
||||
@@ -521,6 +521,7 @@ public class JavaBuild {
|
||||
|
||||
if (pkg.startsWith("processing.core.")) return true;
|
||||
if (pkg.startsWith("processing.data.")) return true;
|
||||
if (pkg.startsWith("processing.event.")) return true;
|
||||
if (pkg.startsWith("processing.opengl.")) return true;
|
||||
|
||||
// // ignore core, data, and opengl packages
|
||||
|
||||
@@ -924,13 +924,14 @@ public class PdePreprocessor {
|
||||
return new String[] {
|
||||
"processing.core.*",
|
||||
"processing.data.*",
|
||||
"processing.event.*",
|
||||
"processing.opengl.*"
|
||||
};
|
||||
}
|
||||
|
||||
public String[] getDefaultImports() {
|
||||
// These may change in-between (if the prefs panel adds this option)
|
||||
String prefsLine = Preferences.get("preproc.imports.list");
|
||||
String prefsLine = Preferences.get("preproc.imports");
|
||||
return PApplet.splitTokens(prefsLine, ", ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user