Module: drawable

awesome drawable API.

Furthermore to the classes described here, one can also use signals as described in signals.

Info:

  • Copyright: 2012 Uli Schlachter
  • Originally authored by: Uli Schlachter <psychon@znc.in>
    (Full contributors list available on our github project)

Static module functions

drawable.drawable (surface) Drawable object.
drawable.instances () -> () Get the number of instances.
drawable.set_index_miss_handler (cb) Set a __index metamethod for all drawable instances.
drawable.set_newindex_miss_handler (cb) Set a __newindex metamethod for all drawable instances.

Object methods

:refresh () Refresh a drawable's content.
:geometry () -> table Get drawable geometry.

Signals

button::press
button::release
mouse::enter
mouse::leave
mouse::move
property::geometry
property::height
property::width
property::x
property::y
property::surface


Static module functions

drawable.drawable (surface)
Drawable object.

Parameters:

  • surface The drawable's cairo surface.
drawable.instances () -> ()
Get the number of instances.

Returns:

    The number of drawable objects alive.
drawable.set_index_miss_handler (cb)
Set a __index metamethod for all drawable instances.

Parameters:

  • cb function The meta-method
drawable.set_newindex_miss_handler (cb)
Set a __newindex metamethod for all drawable instances.

Parameters:

  • cb function The meta-method

Object methods

: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.

Signals

button::press
button::release
mouse::enter
mouse::leave
mouse::move
property::geometry
property::height
property::width
property::x
property::y
property::surface
generated by LDoc 1.4.6 Last updated 2021-11-13 00:35:50