Module: drawable
Low-level API to allow Cairo to draw on clients and wiboxes.
image |
image |
Drawable object.
|
|
-
🔗
drawable.instances ()
-> ()
-
Get the number of instances.
Returns:
The number of drawable objects alive.
-
🔗
drawable.disconnect_signal (name, func)
-
Disconnect from a signal.
Parameters:
name |
|
string |
The name of the signal. |
func |
|
function |
The callback that should be disconnected. |
-
🔗
drawable.emit_signal (name, ...)
-
Emit a signal.
Parameters:
name |
|
string |
The name of the signal. |
... |
|
|
Extra arguments for the callback functions. Each connected
function receives the object as first argument and then any extra
arguments that are given to emit_signal(). |
-
🔗
drawable.connect_signal (name, func)
-
Connect to a signal.
Parameters:
name |
|
string |
The name of the signal. |
func |
|
function |
The callback to call when the signal is emitted. |
-
🔗
image
image
-
Drawable object.
Constraints:
Default value
|
: Autogenerated. |
Type description:
|
string
|
: Interpreted as a path to an image file. |
string
|
: A valid SVG content. |
cairo
|
: A cairo image surface: Directly used as-is. |
librsvg
|
: A librsvg handle object: Directly used as-is. |
nil
|
: Unset the image. |
-
🔗
:refresh ()
-
Refresh a drawable's content. This has to be called whenever some drawing to
the drawable's surface has been done and should become visible.
-
🔗
:geometry ()
-> table
-
Get drawable geometry. The geometry consists of x, y, width and height.
Returns:
table
A table with drawable coordinates and geometry.
-
🔗
button::press
-
-
🔗
button::release
-
-
🔗
mouse::enter
-
-
🔗
mouse::leave
-
-
🔗
mouse::move
-
-
🔗
property::geometry
-
-
🔗
property::height
-
-
🔗
property::width
-
-
🔗
property::x
-
-
🔗
property::y
-
-
🔗
property::surface
-