java.lang.Object | |
↳ | net.pierrox.lightning_launcher.script.api.Event |
The event gather useful data dealing with the context of the event, such as which item caused the script to be executed, or what was the container at time of the event.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Container |
getContainer()
Returns the container in which the event has been triggered.
| ||||||||||
String |
getData()
Optional data that may have passed to this script when run from
runScript(String, String) . | ||||||||||
long |
getDate()
Date at which the event occurred.
| ||||||||||
Item |
getItem()
Access to the item from which this event originates.
| ||||||||||
Screen |
getScreen()
Access to the screen from which this event originates.
| ||||||||||
String |
getSource()
Return the event source as a string in the enumeration below.
| ||||||||||
float |
getTouchScreenX()
X touch position on the screen at time of event.
| ||||||||||
float |
getTouchScreenY()
Absolute Y touch position at time of event.
| ||||||||||
float |
getTouchX()
Absolute X touch position at time of event.
| ||||||||||
float |
getTouchY()
Absolute Y touch position at time of event.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns the container in which the event has been triggered. This can be either a desktop, folder or panel.
Optional data that may have passed to this script when run from runScript(String, String)
.
Date at which the event occurred.
Access to the item from which this event originates. Typically the item will be the tapped object when launching a script on tap event, but there will be no item when the event is a global one (such as desktop rotated, two finger swipe gestures, etc.).
Access to the screen from which this event originates. Scripts run in the background are linked to an invisible screen too.
Return the event source as a string in the enumeration below. Names starting with "C_" refer to a container, whereas names starting with "I_" are linked with an item. For instance "C_CLICKED" is "container clicked" and "I_CLICKED" is "item clicked".
X touch position on the screen at time of event. This data is available when touching the background and is not available when the event result of an item action or when the script is run in background.
Absolute Y touch position at time of event. This data is available when touching the background and is not available when the event result of an item action or when the script is run in background.
Absolute X touch position at time of event. This data is available when touching the background and is not available when the event result of an item action or when the script is run in background.
Absolute Y touch position at time of event. This data is available when touching the background and is not available when the event result of an item action or when the script is run in background.