2010-10-06 20:49:30 +02:00
|
|
|
--- awesome drawin API
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @author Julien Danjou <julien@danjou.info>
|
|
|
|
-- @copyright 2008-2009 Julien Danjou
|
2010-10-06 20:49:30 +02:00
|
|
|
module("drawin")
|
2009-08-20 16:18:52 +02:00
|
|
|
|
2010-10-06 20:49:30 +02:00
|
|
|
--- Drawin object.
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @field screen Screen number.
|
|
|
|
-- @field border_width Border width.
|
|
|
|
-- @field border_color Border color.
|
|
|
|
-- @field ontop On top of other windows.
|
|
|
|
-- @field cursor The mouse cursor.
|
|
|
|
-- @field visible Visibility.
|
2010-10-06 20:49:30 +02:00
|
|
|
-- @field opacity The opacity of the drawin, between 0 and 1.
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @field x The x coordinates.
|
|
|
|
-- @field y The y coordinates.
|
2010-10-06 20:49:30 +02:00
|
|
|
-- @field width The width of the drawin.
|
|
|
|
-- @field height The height of the drawin.
|
|
|
|
-- @field surface A oocairo surface that can be used for drawing.
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @class table
|
2010-10-06 20:49:30 +02:00
|
|
|
-- @name drawin
|
2009-08-20 16:18:52 +02:00
|
|
|
|
2010-10-06 20:49:30 +02:00
|
|
|
--- Get or set mouse buttons bindings to a drawin.
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @param buttons_table A table of buttons objects, or nothing.
|
|
|
|
-- @name buttons
|
|
|
|
-- @class function
|
|
|
|
|
2010-10-06 20:49:30 +02:00
|
|
|
--- Get or set drawin struts.
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @param strut A table with new strut, or nothing
|
2010-10-06 20:49:30 +02:00
|
|
|
-- @return The drawin strut in a table.
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @name struts
|
|
|
|
-- @class function
|
|
|
|
|
2010-10-06 20:49:30 +02:00
|
|
|
--- Get or set drawin geometry. That's the same as accessing or setting the x, y, width or height
|
|
|
|
-- properties of a drawin.
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @param A table with coordinates to modify.
|
2010-10-06 20:49:30 +02:00
|
|
|
-- @return A table with drawin coordinates and geometry.
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @name geometry
|
|
|
|
-- @class function
|
|
|
|
|
2010-10-06 20:49:30 +02:00
|
|
|
--- Refresh the drawin. When you are drawing to the window's surface, you have
|
|
|
|
-- call this function when you are done to make the result visible.
|
|
|
|
-- @param no_params luadoc is buggy.
|
|
|
|
-- @name refresh
|
|
|
|
-- @class function
|
|
|
|
|
2009-08-20 16:18:52 +02:00
|
|
|
--- Add a signal.
|
|
|
|
-- @param name A signal name.
|
2009-08-30 06:20:52 +02:00
|
|
|
-- @param func A function to call when the signal is emitted.
|
2010-08-25 20:37:49 +02:00
|
|
|
-- @name connect_signal
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @class function
|
|
|
|
|
|
|
|
--- Remove a signal.
|
|
|
|
-- @param name A signal name.
|
|
|
|
-- @param func A function to remove.
|
2010-08-25 20:37:49 +02:00
|
|
|
-- @name disconnect_signal
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @class function
|
|
|
|
|
|
|
|
--- Emit a signal.
|
|
|
|
-- @param name A signal name.
|
|
|
|
-- @param ... Various arguments, optional.
|
|
|
|
-- @name emit_signal
|
|
|
|
-- @class function
|
2010-09-17 17:10:53 +02:00
|
|
|
|
|
|
|
--- Get the number of instances.
|
2010-09-28 11:12:02 +02:00
|
|
|
-- @param no_params luadoc is buggy.
|
2010-10-06 20:49:30 +02:00
|
|
|
-- @return The number of drawin objects alive.
|
2010-09-17 17:10:53 +02:00
|
|
|
-- @name instances
|
|
|
|
-- @class function
|