Module drawable
awesome drawable API
Info:
- Author: Uli Schlachter <psychon@znc.in>
- Copyright: 2012 Uli Schlachter
Functions
geometry () | Get drawable geometry. |
refresh () | Refresh the drawable. |
connect_signal (name, func) | Add a signal. |
disconnect_signal (name, func) | Remove a signal. |
emit_signal (name, ...) | Emit a signal. |
instances () | Get the number of instances. |
Tables
drawable | Drawable object. |
Functions
- geometry ()
-
Get drawable geometry. The geometry consists of x, y, width and height.
Returns:
-
A table with drawable coordinates and geometry.
- refresh ()
- Refresh the drawable. When you are drawing to the surface, you have call this function when you are done to make the result visible.
- connect_signal (name, func)
-
Add a signal.
Parameters:
- name A signal name.
- func A function to call when the signal is emitted.
- disconnect_signal (name, func)
-
Remove a signal.
Parameters:
- name A signal name.
- func A function to remove.
- emit_signal (name, ...)
-
Emit a signal.
Parameters:
- name A signal name.
- ... Various arguments, optional.
- instances ()
-
Get the number of instances.
Returns:
-
The number of drawable objects alive.