From 8d6f82f0a31f13e88f832a68eb5f832f40f68331 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 26 May 2016 15:08:31 -0400 Subject: [PATCH] doc: Add gears.object common documentation --- docs/common/object.ldoc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/common/object.ldoc diff --git a/docs/common/object.ldoc b/docs/common/object.ldoc new file mode 100644 index 000000000..19dfbd03b --- /dev/null +++ b/docs/common/object.ldoc @@ -0,0 +1,35 @@ + +--- Disonnect to a signal. +-- @tparam string name The name of the signal +-- @tparam function func The callback that should be disconnected +-- @see add_signal +-- @function disconnect_signal + +--- Emit a signal. +-- +-- @tparam string name The name of the signal +-- @param ... 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() +-- @function emit_signal + +--- Add a signal to an object. All signals must be added before they can be used. +-- +-- @tparam string name The name of the new signal. +-- @function add_signal + +--- Connect to a signal. +-- @tparam string name The name of the signal +-- @tparam function func The callback to call when the signal is emitted +-- @see add_signal +-- @function connect_signal + +--- Connect to a signal weakly. This allows the callback function to be garbage +-- collected and automatically disconnects the signal when that happens. +-- +-- **Warning:** +-- Only use this function if you really, really, really know what you +-- are doing. +-- @tparam string name The name of the signal +-- @tparam function func The callback to call when the signal is emitted +-- @function weak_connect_signal