line breaks for readability

This commit is contained in:
TrianguloY 2019-02-16 23:41:24 +01:00
parent 82cf1bbce7
commit 9ea924b7fa

View file

@ -34,7 +34,8 @@ public class LL {
/**
* Returns the currently displayed desktop.
*
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#getCurrentDesktop()} instead together with {@link Lightning#getActiveScreen()} <code>LL.getCurrentDesktop() -> getActiveScreen().getCurrentDesktop()</code>
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#getCurrentDesktop()} instead together with {@link Lightning#getActiveScreen()}
* <br><code>LL.getCurrentDesktop() -> getActiveScreen().getCurrentDesktop()</code>
*/
public Desktop getCurrentDesktop() {
int id = mLightning.getEngine().readCurrentPage(mLightning.getConfiguration().getHomeDesktopId());
@ -114,7 +115,9 @@ public class LL {
/**
* Returns an array of desktop identifiers.
*
* @deprecated use {@link Configuration#getAllDesktops()} instead together with {@link Lightning#getConfiguration()} (Difference: returns a java array instead of {@link Array}, convert if necessary) <code>LL.getAllDesktops() ~> getConfiguration().getAllDesktops()</code>
* @deprecated use {@link Configuration#getAllDesktops()} instead together with {@link Lightning#getConfiguration()}
* (Difference: returns a java array instead of {@link Array}, convert if necessary)
* <br><code>LL.getAllDesktops() ~> getConfiguration().getAllDesktops()</code>
*/
public Array getAllDesktops() {
int[] so = mLightning.getConfiguration().getAllDesktops();
@ -129,7 +132,8 @@ public class LL {
/**
* Returns a container by its id.
*
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#getContainerById(int)} instead with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen} <code>LL.getContainerById(id) -> getEvent().getScreen().getContainerById(id)</code>
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#getContainerById(int)} instead with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen}
* <br><code>LL.getContainerById(id) -> getEvent().getScreen().getContainerById(id)</code>
*/
public Container getContainerById(int id) {
Screen screen;
@ -150,7 +154,8 @@ public class LL {
*
* @param name name of the desktop
*
* @deprecated use {@link HomeScreen#getDesktopByName(String)} instead together with {@link Lightning#getHomeScreen()} <code>LL.getDesktopByName(name) -> getHomeScreen().getDesktopByName(name)</code>
* @deprecated use {@link HomeScreen#getDesktopByName(String)} instead together with {@link Lightning#getHomeScreen()}
* <br><code>LL.getDesktopByName(name) -> getHomeScreen().getDesktopByName(name)</code>
*/
public Desktop getDesktopByName(String name) {
Screen dashboardScreen = LLApp.get().getScreen(Screen.Identity.HOME);
@ -166,7 +171,8 @@ public class LL {
*
* @param id desktop identifier
*
* @deprecated use {@link HomeScreen#goToDesktop(int)} instead together with {@link Lightning#getHomeScreen()} <code>LL.goToDesktop(id) -> getHomeScreen().goToDesktop(id)</code>
* @deprecated use {@link HomeScreen#goToDesktop(int)} instead together with {@link Lightning#getHomeScreen()}
* <br><code>LL.goToDesktop(id) -> getHomeScreen().goToDesktop(id)</code>
*/
public void goToDesktop(int id) {
LLApp.get().displayPagerPage(id, false);
@ -179,7 +185,8 @@ public class LL {
* @param x absolute X position, in pixel
* @param y absolute Y position, in pixel
*
* @deprecated use {@link HomeScreen#goToDesktopPosition(int, float, float)} instead together with {@link Lightning#getHomeScreen()} <code>LL.goToDesktopPosition(id, x, y) -> getHomeScreen().goToDesktopPosition(id, x, y)</code>
* @deprecated use {@link HomeScreen#goToDesktopPosition(int, float, float)} instead together with {@link Lightning#getHomeScreen()}
* <br><code>LL.goToDesktopPosition(id, x, y) -> getHomeScreen().goToDesktopPosition(id, x, y)</code>
*/
public void goToDesktopPosition(int id, float x, float y) {
goToDesktopPosition(id, x, y, 1, true);
@ -194,7 +201,8 @@ public class LL {
* @param scale zoom factor (1=100%, 0.5=50%, negative values are acceptable, 0 is not very useful)
* @param animate whether to animate the move
*
* @deprecated use {@link HomeScreen#goToDesktopPosition(int, float, float, float, boolean)} instead together with {@link Lightning#getHomeScreen()} <code>LL.goToDesktopPosition(id, x, y, scale, animate) -> getHomeScreen().goToDesktopPosition(id, x, y, scale, animate)</code>
* @deprecated use {@link HomeScreen#goToDesktopPosition(int, float, float, float, boolean)} instead together with {@link Lightning#getHomeScreen()}
* <br><code>LL.goToDesktopPosition(id, x, y, scale, animate) -> getHomeScreen().goToDesktopPosition(id, x, y, scale, animate)</code>
*/
public void goToDesktopPosition(int id, float x, float y, float scale, boolean animate) {
net.pierrox.lightning_launcher.script.api.screen.Screen screen = mLightning.getScriptScreen();
@ -205,7 +213,8 @@ public class LL {
* Returns the event object associated with this script execution.
* The event provides contextual data, such as the current desktop, which item has been tapped, and so on.
*
* @deprecated use {@link Lightning#getEvent_()} instead <code>LL.getEvent() -> getEvent()</code>
* @deprecated use {@link Lightning#getEvent_()} instead
* <br><code>LL.getEvent() -> getEvent()</code>
*/
public Event getEvent() {
return mLightning.findEventInStack();
@ -216,7 +225,8 @@ public class LL {
/**
* Same as #runAction(int,String) with a null data.
*
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#runAction(int)} instead together with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen} <code>LL.runAction(action) -> getEvent().getScreen().runAction(action)</code>
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#runAction(int)} instead together with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen}
* <br><code>LL.runAction(action) -> getEvent().getScreen().runAction(action)</code>
*/
public void runAction(int action) {
mLightning.getScriptScreen().runAction(action);
@ -225,7 +235,8 @@ public class LL {
/**
* Same as #runAction(int,Item,String) with a null item and data.
*
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#runAction(int, String)} instead together with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen} <code>LL.runAction(action, data) -> getEvent().getScreen().runAction(action, data)</code>
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#runAction(int, String)} instead together with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen}
* <br><code>LL.runAction(action, data) -> getEvent().getScreen().runAction(action, data)</code>
*/
public void runAction(int action, String data) {
mLightning.getScriptScreen().runAction(action, data);
@ -238,7 +249,8 @@ public class LL {
* @param item item to be used as the target (only useful with actions requiring an item)
* @param data optional data to send to be used by the action, use null if none
*
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#runAction(int, Item, String)} instead together with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen} <code>LL.runAction(action, item, data) -> getEvent().getScreen().runAction(action, item, data)</code>
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#runAction(int, Item, String)} instead together with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen}
* <br><code>LL.runAction(action, item, data) -> getEvent().getScreen().runAction(action, item, data)</code>
*/
public void runAction(int action, Item item, String data) {
mLightning.getScriptScreen().runAction(action, item, data);
@ -251,21 +263,24 @@ public class LL {
* @param name name of the script as found in the script editor
* @param data optional data to send to the script. Use JSON to pass more than a string.
*
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#runScript(String, String)} instead together with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen} <code>LL.runScript(name, data) -> getEvent().getScreen().runScript(name, data)</code>
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#runScript(String, String)} instead together with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen}
* <br><code>LL.runScript(name, data) -> getEvent().getScreen().runScript(name, data)</code>
*/
public void runScript(final String name, final String data) {
mLightning.getScriptScreen().runScript(name, data);
}
/**
* @deprecated use {@link Script#setTag(String)} instead together with {@link Lightning#getCurrentScript()} <code>LL.setScriptTag(tag) -> getCurrentScript().setTag(tag)</code>
* @deprecated use {@link Script#setTag(String)} instead together with {@link Lightning#getCurrentScript()}
* <br><code>LL.setScriptTag(tag) -> getCurrentScript().setTag(tag)</code>
*/
public void setScriptTag(String tag) {
getCurrentScript().setTag(tag);
}
/**
* @deprecated use {@link Script#getTag()} instead together with {@link Lightning#getCurrentScript()} <code>LL.getScriptTag() -> getCurrentScript().getTag()</code>
* @deprecated use {@link Script#getTag()} instead together with {@link Lightning#getCurrentScript()}
* <br><code>LL.getScriptTag() -> getCurrentScript().getTag()</code>
*/
public String getScriptTag() {
return getCurrentScript().getTag();
@ -274,7 +289,8 @@ public class LL {
/**
* Retrieve the currently executed script.
*
* @deprecated use {@link Lightning#getCurrentScript()} instead <code>LL.getCurrentScript() -> getCurrentScript()</code>
* @deprecated use {@link Lightning#getCurrentScript()} instead
* <br><code>LL.getCurrentScript() -> getCurrentScript()</code>
*/
public Script getCurrentScript() {
return mLightning.getCurrentScript();
@ -286,7 +302,8 @@ public class LL {
* @param name as given by Script#getName()
* @return a script or null if not found
*
* @deprecated use {@link Lightning#getScriptByName(String)} instead <code>LL.getScriptByName(name) -> getScriptByName(name)</code>
* @deprecated use {@link Lightning#getScriptByName(String)} instead
* <br><code>LL.getScriptByName(name) -> getScriptByName(name)</code>
*/
public Script getScriptByName(String name) {
return mLightning.getScriptByName(name);
@ -298,7 +315,8 @@ public class LL {
* @param id identifier as given by Script#getId()
* @return a script or null if no script with this id
*
* @deprecated use {@link Lightning#getScriptById(String)} instead <code>LL.getScriptById(id) -> getScriptById(id)</code>
* @deprecated use {@link Lightning#getScriptById(String)} instead
* <br><code>LL.getScriptById(id) -> getScriptById(id)</code>
*/
public Script getScriptById(String id) {
return mLightning.getScriptById(id);
@ -307,7 +325,8 @@ public class LL {
/**
* Delete a script.
*
* @deprecated use {@link Lightning#deleteScript(Script)} instead <code>LL.deleteScript(script) -> deleteScript(script)</code>
* @deprecated use {@link Lightning#deleteScript(Script)} instead
* <br><code>LL.deleteScript(script) -> deleteScript(script)</code>
*/
public void deleteScript(Script script) {
mLightning.deleteScript(script);
@ -316,7 +335,8 @@ public class LL {
/**
* Create a new script. Use this API wisely.
*
* @deprecated use {@link Lightning#createScript(String, String, int)} instead <code>LL.createScript(name, text, flags) -> createScript(name, text, flags)</code>
* @deprecated use {@link Lightning#createScript(String, String, int)} instead
* <br><code>LL.createScript(name, text, flags) -> createScript(name, text, flags)</code>
*/
public Script createScript(String name, String text, int flags) {
return mLightning.createScript(name, text, flags);
@ -326,7 +346,9 @@ public class LL {
* Return the collection of scripts matching some flags.
* @param flags see Script#FLAG_*
*
* @deprecated use {@link Lightning#getAllScriptMatching(int)} (Difference: returns a java array instead of {@link Array}, convert if necessary) <code>LL.getAllScriptMatching(flags) ~> getAllScriptMatching(flags)</code>
* @deprecated use {@link Lightning#getAllScriptMatching(int)}
* (Difference: returns a java array instead of {@link Array}, convert if necessary)
* <br><code>LL.getAllScriptMatching(flags) ~> getAllScriptMatching(flags)</code>
*/
public Array getAllScriptMatching(int flags) {
Script[] array = mLightning.getAllScriptMatching(flags);
@ -336,7 +358,8 @@ public class LL {
/**
* Unlock the screen.
*
* @deprecated use {@link Lightning#unlock()} instead <code>LL.unlock() -> unlock()</code>
* @deprecated use {@link Lightning#unlock()} instead
* <br><code>LL.unlock() -> unlock()</code>
*/
public void unlock() {
mLightning.unlock();
@ -345,7 +368,8 @@ public class LL {
/**
* Returns true if the screen is currently locked using the Lightning lock screen.
*
* @deprecated use {@link Lightning#isLocked()} instead <code>LL.isLocked() -> isLocked()</code>
* @deprecated use {@link Lightning#isLocked()} instead
* <br><code>LL.isLocked() -> isLocked()</code>
*/
public boolean isLocked() {
return mLightning.isLocked();
@ -358,7 +382,8 @@ public class LL {
* @param data text to write to the file
* @param append whether to clear the file before to write data, or append data to the existing content
*
* @deprecated use {@link Lightning#writeToLogFile(String, boolean)} instead <code>LL.writeToLogFile(data, append) -> writeToLogFile(data, append)</code>
* @deprecated use {@link Lightning#writeToLogFile(String, boolean)} instead
* <br><code>LL.writeToLogFile(data, append) -> writeToLogFile(data, append)</code>
*/
public void writeToLogFile(String data, boolean append) {
mLightning.writeToLogFile(data, append);
@ -387,7 +412,9 @@ public class LL {
*
* @return an Array of Folder items, sorted top to bottom (topmost folder is at index 0).
*
* @deprecated use {@link Screen#getOpenFolders()} instead together with {@link Lightning#getActiveScreen()} (Difference: returns a java array instead of {@link Array}, convert if necessary) <code>LL.getOpenFolders() ~> getActiveScreen().getOpenFolders()</code>
* @deprecated use {@link Screen#getOpenFolders()} instead together with {@link Lightning#getActiveScreen()}
* (Difference: returns a java array instead of {@link Array}, convert if necessary)
* <br><code>LL.getOpenFolders() ~> getActiveScreen().getOpenFolders()</code>
*/
public Array getOpenFolders() {
net.pierrox.lightning_launcher.script.api.screen.Screen screen = mLightning.getActiveScreen();
@ -404,7 +431,8 @@ public class LL {
* @param id item identifier
* @return an item, or null if this id is not known.
*
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#getItemById(int)} instead together with a {@link Screen} <code>LL.getItemById(id) -> getEvent().getScreen().getItemById(id)</code>
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#getItemById(int)} instead together with a {@link Screen}
* <br><code>LL.getItemById(id) -> getEvent().getScreen().getItemById(id)</code>
*/
public Item getItemById(int id) {
return mLightning.getScriptScreen().getItemById(id);
@ -416,7 +444,8 @@ public class LL {
*
* @return can return null if not enough memory
*
* @deprecated use {@link Image#createImage(int, int)} instead <code>LL.createImage(width, height) -> Image.createImage(width, height)</code>
* @deprecated use {@link Image#createImage(int, int)} instead
* <br><code>LL.createImage(width, height) -> Image.createImage(width, height)</code>
*/
public ImageBitmap createImage(int width, int height) {
return Image.createImage(width, height);
@ -428,7 +457,8 @@ public class LL {
* @param path path of the image
* @return can return null if an image cannot be read from the file (not an image or not enough memory)
*
* @deprecated use {@link Image#createImage(String)} instead <code>LL.createImage(path) -> Image.createImage(path)</code>
* @deprecated use {@link Image#createImage(String)} instead
* <br><code>LL.createImage(path) -> Image.createImage(path)</code>
*/
public Image createImage(String path) {
return Image.createImage(path);
@ -436,14 +466,15 @@ public class LL {
/**
* Create an image from a package and a resource name.
* For instance: <code>LL.createImage("net.pierrox.lightning_launcher_extreme", "icon")</code>
* For instance: <br><code>LL.createImage("net.pierrox.lightning_launcher_extreme", "icon")</code>
* The density used is either the one given by ActivityManager.getLauncherLargeIconDensity if available, or the current one.
*
* @param pkg name of the package, use "android" to access system resources.
* @param name name of the drawable resource
* @return can return null if an image cannot be read from the package (unknown package, wrong resource name or not enough memory)
*
* @deprecated use {@link Image#createImage(String, String)} instead <code>LL.createImage(pkg, name) -> Image.createImage(pkg, name)</code>
* @deprecated use {@link Image#createImage(String, String)} instead
* <br><code>LL.createImage(pkg, name) -> Image.createImage(pkg, name)</code>
*/
public Image createImage(String pkg, String name) {
return Image.createImage(pkg, name);
@ -458,7 +489,8 @@ public class LL {
* @param width the prefered image width, use -1 for as big as possible
* @param height the prefered image height, use -1 for as big as possible
*
* @deprecated use {@link Image#createImage(Scriptable, int, int)} instead <code>LL.createImage(object, width, height) -> Image.createImage(object, width, height)</code>
* @deprecated use {@link Image#createImage(Scriptable, int, int)} instead
* <br><code>LL.createImage(object, width, height) -> Image.createImage(object, width, height)</code>
*/
public ImageScript createImage(Scriptable object, int width, int height) {
return Image.createImage(object, width, height);
@ -475,7 +507,8 @@ public class LL {
* @param loopCount initial number of loops to play, use 0 for infinite
* @return an animation or null in case of error (most likely out of memory)
*
* @deprecated use {@link Image#createAnimation(int, int, int, int, int)} instead <code>LL.createAnimation(width, height, count, duration, loopCount) -> Image.createImage(width, height, count, duration, loopCount)</code>
* @deprecated use {@link Image#createAnimation(int, int, int, int, int)} instead
* <br><code>LL.createAnimation(width, height, count, duration, loopCount) -> Image.createImage(width, height, count, duration, loopCount)</code>
*/
public ImageAnimation createAnimation(int width, int height, int count, int duration, int loopCount) {
return Image.createAnimation(width, height, count, duration, loopCount);
@ -493,7 +526,8 @@ public class LL {
* @param name name of the raw resource. It must not contain the extension of the raw file, this is the Android identifier.
* @return a string or null if the resource cannot be found or read
*
* @deprecated use {@link Lightning#loadRawResource(String, String)} instead <code>LL.loadRawResources(pkg, name) -> loadRawResources(pkg, name)</code>
* @deprecated use {@link Lightning#loadRawResource(String, String)} instead
* <br><code>LL.loadRawResources(pkg, name) -> loadRawResources(pkg, name)</code>
*/
public String loadRawResource(String pkg, String name) {
return mLightning.loadRawResource(pkg, name);
@ -502,7 +536,8 @@ public class LL {
/**
* Persist launcher data now.
*
* @deprecated use {@link Lightning#save()} instead <code>LL.save() -> save()</code>
* @deprecated use {@link Lightning#save()} instead
* <br><code>LL.save() -> save()</code>
*/
public void save() {
mLightning.save();
@ -517,7 +552,8 @@ public class LL {
* @param intent intent to start the activity
* @return true if launch is successful, false if activity not found or permission denied
*
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#startActivity(Intent)} instead together with {@link Lightning#getActiveScreen()} <code>LL.startActivity(intent) -> getActiveScreen().startActivity(intent)</code>
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#startActivity(Intent)} instead together with {@link Lightning#getActiveScreen()}
* <br><code>LL.startActivity(intent) -> getActiveScreen().startActivity(intent)</code>
*/
public boolean startActivity(Intent intent) {
net.pierrox.lightning_launcher.script.api.screen.Screen screen = mLightning.getActiveScreen();
@ -539,7 +575,8 @@ public class LL {
* @param token an optional string data that you can transmit to the receiver script
* @return true if the activity has been started
*
* @deprecated use {@link ActivityScreen#startActivityForResult(Intent, Script, String)} instead together with an {@link ActivityScreen} <code>LL.startActivityForResult(intent, receiver, token) -> 'startActivityForResult' in getActiveScreen() ? getActiveScreen().startActivityForResult(intent, receiver, token) : false</code>
* @deprecated use {@link ActivityScreen#startActivityForResult(Intent, Script, String)} instead together with an {@link ActivityScreen}
* <br><code>LL.startActivityForResult(intent, receiver, token) -> 'startActivityForResult' in getActiveScreen() ? getActiveScreen().startActivityForResult(intent, receiver, token) : false</code>
*/
public boolean startActivityForResult(Intent intent, Script receiver, String token) {
net.pierrox.lightning_launcher.script.api.screen.Screen screen = mLightning.getActiveScreen();
@ -557,7 +594,8 @@ public class LL {
* @param synchronous when true, Lightning will wait for Tasker task completion before to return, otherwise it will return immediately
* @return when synchronous is true returns true if the intent has been sent successfully and Tasker reports a success too, when synchronous is false this method always returns true..
*
* @deprecated use {@link Lightning#sendTaskerIntent(TaskerIntent, boolean)} instead <code>LL.sendTaskerIntent(intent, synchronous) -> sendTaskerIntent(intent, synchronous)</code>
* @deprecated use {@link Lightning#sendTaskerIntent(TaskerIntent, boolean)} instead
* <br><code>LL.sendTaskerIntent(intent, synchronous) -> sendTaskerIntent(intent, synchronous)</code>
*/
public boolean sendTaskerIntent(TaskerIntent intent, boolean synchronous) {
return mLightning.sendTaskerIntent(intent, synchronous);
@ -567,7 +605,8 @@ public class LL {
* Return the Android Context this script is linked with (an activity context).
* This is meant to be used with Android services.
*
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#getContext()} instead with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen} <code>LL.getContext() -> getActiveScreen().getContext()</code>
* @deprecated use {@link net.pierrox.lightning_launcher.script.api.screen.Screen#getContext()} instead with a {@link net.pierrox.lightning_launcher.script.api.screen.Screen}
* <br><code>LL.getContext() -> getActiveScreen().getContext()</code>
*/
public Context getContext() {
Screen screen = LLApp.get().getActiveScreen();
@ -585,7 +624,8 @@ public class LL {
* @param name fully qualified class name
* @return true if the operation succeeded, false if the class cannot be loaded or if already bound
*
* @deprecated use {@link Lightning#bindClass(String)} instead <code>LL.bindClass(name) -> bindClass(name)</code>
* @deprecated use {@link Lightning#bindClass(String)} instead
* <br><code>LL.bindClass(name) -> bindClass(name)</code>
*/
public boolean bindClass(String name) {
return mLightning.getEngine().getScriptExecutor().bindClass(name);
@ -599,7 +639,8 @@ public class LL {
* @param hasAlpha whether to display the transparency slider. It will not enforce a fully opaque color, it only acts on the slider visibility.
* @return either the selected color, or undefined if the dialog has been canceled
*
* @deprecated use {@link ActivityScreen#pickColor(String, int, boolean)} instead together with an {@link ActivityScreen} <code>LL.pickColor(title, color, hasAlpha) -> 'pickColor' in getActiveScreen() ? getActiveScreen().pickColor(title, color, hasAlpha) : 0</code>
* @deprecated use {@link ActivityScreen#pickColor(String, int, boolean)} instead together with an {@link ActivityScreen}
* <br><code>LL.pickColor(title, color, hasAlpha) -> 'pickColor' in getActiveScreen() ? getActiveScreen().pickColor(title, color, hasAlpha) : 0</code>
*/
public int pickColor(String title, int color, boolean hasAlpha) {
net.pierrox.lightning_launcher.script.api.screen.Screen screen = mLightning.getActiveScreen();
@ -624,7 +665,8 @@ public class LL {
* @param unit text to display after the value (for instance "%" or "px"). When using "%" with FLOAT, scale value by 100
* @return either the selected value, or undefined if the dialog has been canceled
*
* @deprecated use {@link ActivityScreen#pickNumericValue(String, float, String, float, float, float, String)} instead together with an {@link ActivityScreen} <code>LL.pickNumericValue(title, value, valueType, min, max, interval, unit) -> 'pickNumericValue' in getActiveScreen() ? getActiveScreen().pickNumericValue(title, value, valueType, min, max, interval, unit) : 0</code>
* @deprecated use {@link ActivityScreen#pickNumericValue(String, float, String, float, float, float, String)} instead together with an {@link ActivityScreen}
* <br><code>LL.pickNumericValue(title, value, valueType, min, max, interval, unit) -> 'pickNumericValue' in getActiveScreen() ? getActiveScreen().pickNumericValue(title, value, valueType, min, max, interval, unit) : 0</code>
*/
public float pickNumericValue(String title, float value, String valueType, float min, float max, float interval, String unit) {
net.pierrox.lightning_launcher.script.api.screen.Screen screen = mLightning.getActiveScreen();
@ -644,7 +686,8 @@ public class LL {
* @param maxPixels maximum number of pixels in the returned image (width x height), 0 for no limit, 1048576 is one mega pixels (1024 x 1024)
* @return an {@link net.pierrox.lightning_launcher.script.api.Image}, or null if the user canceled the operation, or if the image cannot be loaded
*
* @deprecated use {@link ActivityScreen#pickImage(int)} instead together with an {@link ActivityScreen} <code>LL.pickImage(maxPixels) -> 'pickImage' in getActiveScreen() ? getActiveScreen().pickImage(maxPixels) : null</code>
* @deprecated use {@link ActivityScreen#pickImage(int)} instead together with an {@link ActivityScreen}
* <br><code>LL.pickImage(maxPixels) -> 'pickImage' in getActiveScreen() ? getActiveScreen().pickImage(maxPixels) : null</code>
*/
public Image pickImage(int maxPixels) {
net.pierrox.lightning_launcher.script.api.screen.Screen screen = mLightning.getActiveScreen();
@ -663,7 +706,8 @@ public class LL {
* @param full_size handling big images can be slow or request too much memory, by setting full_size to false this will allow this method to downscale images (approx. the size of the screen)
* @return a cropped image, or null if the operation failed or the user canceled it
*
* @deprecated use {@link ActivityScreen#cropImage(ImageBitmap, boolean)} instead together with an {@link ActivityScreen} <code>LL.cropImage(image, full_size) -> 'cropImage' in getActiveScreen() ? getActiveScreen().cropImage(image, full_size) : null</code>
* @deprecated use {@link ActivityScreen#cropImage(ImageBitmap, boolean)} instead together with an {@link ActivityScreen}
* <br><code>LL.cropImage(image, full_size) -> 'cropImage' in getActiveScreen() ? getActiveScreen().cropImage(image, full_size) : null</code>
*/
public ImageBitmap cropImage(ImageBitmap image, boolean full_size) {
net.pierrox.lightning_launcher.script.api.screen.Screen screen = mLightning.getActiveScreen();
@ -675,36 +719,40 @@ public class LL {
}
/**
* Set a boolean variable. This is a shortcut for <code>LL.getVariables().edit().setBoolean(name, value).commit();</code>. When modifying several at once, consider using the {@link net.pierrox.lightning_launcher.script.api.PropertyEditor} object instead for best efficiency.
* Set a boolean variable. This is a shortcut for <br><code>LL.getVariables().edit().setBoolean(name, value).commit();</code>. When modifying several at once, consider using the {@link net.pierrox.lightning_launcher.script.api.PropertyEditor} object instead for best efficiency.
*
* @deprecated use {@link Lightning#setVariableBoolean(String, boolean)} instead <code>LL.setVariableBoolean(name, value) -> setVariableBoolean(name, value)</code>
* @deprecated use {@link Lightning#setVariableBoolean(String, boolean)} instead
* <br><code>LL.setVariableBoolean(name, value) -> setVariableBoolean(name, value)</code>
*/
public void setVariableBoolean(String name, boolean value) {
mLightning.setVariableBoolean(name, value);
}
/**
* Set a boolean variable. This is a shortcut for <code>LL.getVariables().edit().setInteger(name, value).commit();</code>. When modifying several at once, consider using the {@link net.pierrox.lightning_launcher.script.api.PropertyEditor} object instead for best efficiency.
* Set a boolean variable. This is a shortcut for <br><code>LL.getVariables().edit().setInteger(name, value).commit();</code>. When modifying several at once, consider using the {@link net.pierrox.lightning_launcher.script.api.PropertyEditor} object instead for best efficiency.
*
* @deprecated use {@link Lightning#setVariableInteger(String, long)} instead <code>LL.setVariableInteger(name, value) -> setVariableInteger(name, value)</code>
* @deprecated use {@link Lightning#setVariableInteger(String, long)} instead
* <br><code>LL.setVariableInteger(name, value) -> setVariableInteger(name, value)</code>
*/
public void setVariableInteger(String name, long value) {
mLightning.setVariableInteger(name, (int)value);
}
/**
* Set a boolean variable. This is a shortcut for <code>LL.getVariables().edit().setFloat(name, value).commit();</code>. When modifying several at once, consider using the {@link net.pierrox.lightning_launcher.script.api.PropertyEditor} object instead for best efficiency.
* Set a boolean variable. This is a shortcut for <br><code>LL.getVariables().edit().setFloat(name, value).commit();</code>. When modifying several at once, consider using the {@link net.pierrox.lightning_launcher.script.api.PropertyEditor} object instead for best efficiency.
*
* @deprecated use {@link Lightning#setVariableFloat(String, float)} instead <code>LL.setVariableFloat(name, value) -> setVariableFloat(name, value)</code>
* @deprecated use {@link Lightning#setVariableFloat(String, float)} instead
* <br><code>LL.setVariableFloat(name, value) -> setVariableFloat(name, value)</code>
*/
public void setVariableFloat(String name, float value) {
mLightning.setVariableFloat(name, value);
}
/**
* Set a string variable. This is a shortcut for <code>LL.getVariables().edit().setString(name, value).commit();</code>. When modifying several at once, consider using the {@link net.pierrox.lightning_launcher.script.api.PropertyEditor} object instead for best efficiency.
* Set a string variable. This is a shortcut for <br><code>LL.getVariables().edit().setString(name, value).commit();</code>. When modifying several at once, consider using the {@link net.pierrox.lightning_launcher.script.api.PropertyEditor} object instead for best efficiency.
*
* @deprecated use {@link Lightning#setVariableString(String, String)} instead <code>LL.setVariableString(name, value) -> setVariableString(name, value)</code>
* @deprecated use {@link Lightning#setVariableString(String, String)} instead
* <br><code>LL.setVariableString(name, value) -> setVariableString(name, value)</code>
*/
public void setVariableString(String name, String value) {
mLightning.setVariableString(name, value);
@ -713,7 +761,8 @@ public class LL {
/**
* Retrieve the whole set of known variables (builtins and user ones).
*
* @deprecated use {@link Lightning#getVariables()} instead <code>LL.getVariables() -> getVariables()</code>
* @deprecated use {@link Lightning#getVariables()} instead
* <br><code>LL.getVariables() -> getVariables()</code>
*/
public VariableSet getVariables() {
return mLightning.getVariables();