[doxygen] Convert Lua documentation

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Michael Gehring 2008-06-10 20:12:51 +02:00 committed by Julien Danjou
parent 88c76cadf4
commit 1ca55927f0
7 changed files with 285 additions and 73 deletions

View File

@ -47,9 +47,13 @@ __luaA_keystore(keybinding_t *key, const char *str)
}
/** Define a global key binding. This key binding will always be available.
* \param A table with modifier keys.
* \param A key name.
* \param A function to execute.
* \param L The Lua VM state.
*
* \luastack
* \lparam A table with modifier keys.
* \lparam A key name.
* \lparam A function to execute.
* \lreturn The keybinding.
*/
static int
luaA_keybinding_new(lua_State *L)
@ -84,6 +88,10 @@ luaA_keybinding_new(lua_State *L)
}
/** Add a global key binding. This key binding will always be available.
* \param L The Lua VM state.
*
* \luastack
* \lparam A keybinding.
*/
static int
luaA_keybinding_add(lua_State *L)
@ -105,6 +113,10 @@ luaA_keybinding_add(lua_State *L)
}
/** Remove a global key binding.
* \param L The Lua VM state.
*
* \luastack
* \lparam A keybinding.
*/
static int
luaA_keybinding_remove(lua_State *L)

92
lua.c
View File

@ -61,9 +61,12 @@ extern const struct luaL_reg awesome_keybinding_meta[];
/** Define a global mouse binding. This binding will be available wehn you
* click on root window.
* \param A table with modifiers keys.
* \param A mouse button number.
* \param A function to execute.
* \param L The Lua VM state.
*
* \luastack
* \lparam A table with modifiers keys.
* \lparam A mouse button number.
* \lparam A function to execute.
*/
static int
luaA_mouse(lua_State *L)
@ -99,7 +102,10 @@ luaA_mouse(lua_State *L)
/** Set the floating placement algorithm. This will be used to compute the
* initial floating position of floating windows.
* \param An algorith name, either `none', `smart' or `mouse'.
* \param L The Lua VM state.
*
* \luastack
* \lparam An algorith name, either `none', `smart' or `mouse'.
*/
static int
luaA_floating_placement_set(lua_State *L)
@ -120,7 +126,10 @@ luaA_quit(lua_State *L __attribute__ ((unused)))
/** Execute another application, probably a window manager, to replace
* awesome.
* \param The command line to execute.
* \param L The Lua VM state.
*
* \luastack
* \lparam The command line to execute.
*/
static int
luaA_exec(lua_State *L)
@ -149,7 +158,11 @@ luaA_restart(lua_State *L __attribute__ ((unused)))
/** Set the screen padding. This can be used to define margin around the
* screen. awesome will not use this area.
* \param A table with a list of margin for `right', `left', `top' and
* \param L The Lua VM state.
*
* \luastack
* \lparam A screen number.
* \lparam A table with a list of margin for `right', `left', `top' and
* `bottom'.
*/
static int
@ -173,7 +186,10 @@ luaA_padding_set(lua_State *L)
/** Define if awesome should respect applications size hints when resizing
* windows in tiled mode. If you set this to true, you will experience gaps
* between windows, but they will have the best size they can have.
* \param A boolean value, true to enable, false to disable.
* \param L The Lua VM state.
*
* \luastack
* \lparam A boolean value, true to enable, false to disable.
*/
static int
luaA_resizehints_set(lua_State *L)
@ -183,7 +199,10 @@ luaA_resizehints_set(lua_State *L)
}
/** Get the screen count.
* \return The screen count, at least 1.
* \param L The Lua VM state.
*
* \luastack
* \lreturn The screen count, at least 1.
*/
static int
luaA_screen_count(lua_State *L)
@ -193,7 +212,10 @@ luaA_screen_count(lua_State *L)
}
/** Give the focus to a screen.
* \param A screen number
* \param L The Lua VM state.
*
* \luastack
* \lparam A screen number
*/
static int
luaA_screen_focus(lua_State *L)
@ -224,7 +246,10 @@ luaA_screen_coords_get(lua_State *L)
/** Set the function called each time a client gets focus. This function is
* called with the client object as argument.
* \param A function to call each time a client gets focus.
* \param L The Lua VM state.
*
* \luastack
* \lparam A function to call each time a client gets focus.
*/
static int
luaA_hooks_focus(lua_State *L)
@ -238,7 +263,10 @@ luaA_hooks_focus(lua_State *L)
/** Set the function called each time a client loses focus. This function is
* called with the client object as argument.
* \param A function to call each time a client loses focus.
* \param L The Lua VM state.
*
* \luastack
* \lparam A function to call each time a client loses focus.
*/
static int
luaA_hooks_unfocus(lua_State *L)
@ -255,7 +283,6 @@ luaA_hooks_unfocus(lua_State *L)
* \param L The Lua VM state.
*
* \luastack
*
* \lparam A function to call on each new client.
*/
static int
@ -273,8 +300,7 @@ luaA_hooks_manage(lua_State *L)
* \param L The Lua VM state.
*
* \luastack
*
* \lparam A function to call on each new client.
* \lparam A function to call when a client goes away.
*/
static int
luaA_hooks_unmanage(lua_State *L)
@ -288,7 +314,10 @@ luaA_hooks_unmanage(lua_State *L)
/** Set the function called each time the mouse enter a new window. This
* function is called with the client object as argument.
* \param A function to call each time a client gets mouse over it.
* \param L The Lua VM state.
*
* \luastack
* \lparam A function to call each time a client gets mouse over it.
*/
static int
luaA_hooks_mouseover(lua_State *L)
@ -302,7 +331,10 @@ luaA_hooks_mouseover(lua_State *L)
/** Set the function called on each screen arrange. This function is called
* with the screen number as argument.
* \param A function to call on each screen arrange.
* \param L The Lua VM state.
*
* \luastack
* \lparam A function to call on each screen arrange.
*/
static int
luaA_hooks_arrange(lua_State *L)
@ -316,7 +348,10 @@ luaA_hooks_arrange(lua_State *L)
/** Set the function called on each title update. This function is called with
* the client object as argument.
* \param A function to call on each title update of each client.
* \param L The Lua VM state.
*
* \luastack
* \lparam A function to call on each title update of each client.
*/
static int
luaA_hooks_titleupdate(lua_State *L)
@ -330,7 +365,10 @@ luaA_hooks_titleupdate(lua_State *L)
/** Set the function called when a client get urgency flag. This function is called with
* the client object as argument.
* \param A function to call when a client get the urgent flag.
* \param L The Lua VM state.
*
* \luastack
* \lparam A function to call when a client get the urgent flag.
*/
static int
luaA_hooks_urgent(lua_State *L)
@ -343,8 +381,11 @@ luaA_hooks_urgent(lua_State *L)
}
/** Set the function to be called every N seconds.
* \param The number of seconds to run function every. Set 0 to disable.
* \param A function to call every N seconds (optionnal).
* \param L The Lua VM state.
*
* \luastack
* \lparam The number of seconds to run function every. Set 0 to disable.
* \lparam A function to call every N seconds (optionnal).
*/
static int
luaA_hooks_timer(lua_State *L)
@ -363,7 +404,10 @@ luaA_hooks_timer(lua_State *L)
}
/** Set default font.
* \param A string with a font name in Pango format.
* \param L The Lua VM state.
*
* \luastack
* \lparam A string with a font name in Pango format.
*/
static int
luaA_font_set(lua_State *L)
@ -376,7 +420,10 @@ luaA_font_set(lua_State *L)
}
/** Set default colors.
* \param A table with `fg' and `bg' elements, containing colors.
* \param L The Lua VM state.
*
* \luastack
* \lparam A table with `fg' and `bg' elements, containing colors.
*/
static int
luaA_colors_set(lua_State *L)
@ -393,7 +440,6 @@ luaA_colors_set(lua_State *L)
}
/** Push a pointer onto the stack according to its type.
* \param L The Lua state.
* \param p The pointer.
* \param type Its type.
*/

View File

@ -460,7 +460,7 @@ mouse_track_mouse_drag(int *x, int *y)
/** Resize a floating client with the mouse.
* \param c The client to resize.
* \param c The corner to resize with.
* \param corner The corner to resize with.
*/
static void
mouse_client_resize_floating(client_t *c, corner_t corner)
@ -720,6 +720,7 @@ mouse_client_resize(client_t *c, corner_t corner)
* \param L The Lua VM state.
*
* \luastack
* \lparam A client.
* \lparam The x coordinate.
* \lparam The y coordinate.
*/
@ -739,6 +740,7 @@ luaA_mouse_coords_set(lua_State *L)
* \param L The Lua VM state.
*
* \luastack
* \lparam A client.
* \lparam An optionnal corner, such as bottomleft, topright, etc.
*/
int
@ -758,6 +760,7 @@ luaA_client_mouse_resize(lua_State *L)
* \param L The Lua VM state.
*
* \luastack
* \lparam A client.
* \lparam The pixel to snap.
*/
int

View File

@ -274,7 +274,11 @@ statusbar_position_update(statusbar_t *statusbar, position_t position)
}
/** Check for statusbar equality.
* \param A statusbar.
* \param L The Lua VM state.
*
* \luastack
* \lparam A statusbar.
* \lparam Another statusbar.
* \return True if statusbar are equals, false otherwise.
*/
static int
@ -287,7 +291,11 @@ luaA_statusbar_eq(lua_State *L)
}
/** Set the statusbar position.
* \param A position: left, right, top, bottom or off.
* \param L The Lua VM state.
*
* \luastack
* \lparam A statusbar.
* \lparam A position: left, right, top, bottom or off.
*/
static int
luaA_statusbar_position_set(lua_State *L)
@ -307,7 +315,11 @@ luaA_statusbar_position_set(lua_State *L)
}
/** Get the statusbar position.
* \return The statusbar position.
* \param L The Lua VM state.
*
* \luastack
* \lparam A statusbar.
* \lreturn The statusbar position.
*/
static int
luaA_statusbar_position_get(lua_State *L)
@ -318,7 +330,11 @@ luaA_statusbar_position_get(lua_State *L)
}
/** Set the statusbar alignment on screen.
* \param An alignment: right, left or center.
* \param L The Lua VM state.
*
* \luastack
* \lparam A statusbar,
* \lparam An alignment: right, left or center.
*/
static int
luaA_statusbar_align_set(lua_State *L)
@ -334,6 +350,10 @@ luaA_statusbar_align_set(lua_State *L)
}
/** Convert a statusbar to a printable string.
* \param L The Lua VM state.
*
* \luastack
* \lparam A statusbar.
*/
static int
luaA_statusbar_tostring(lua_State *L)
@ -344,7 +364,11 @@ luaA_statusbar_tostring(lua_State *L)
}
/** Add a widget to a statusbar.
* \param A widget.
* \param L The Lua VM state.
*
* \luastack
* \lparam A statusbar.
* \lparam A widget.
*/
static int
luaA_statusbar_widget_add(lua_State *L)
@ -362,7 +386,11 @@ luaA_statusbar_widget_add(lua_State *L)
}
/** Add the statusbar on a screen.
* \param A screen number.
* \param L The Lua VM state.
*
* \luastack
* \lparam A stausbar
* \lparam A screen number.
*/
static int
luaA_statusbar_add(lua_State *L)
@ -422,9 +450,12 @@ luaA_statusbar_remove(lua_State *L)
}
/** Create a new statusbar.
* \param A table with at least a name attribute. Optionnaly defined values are:
* \param L The Lua VM state.
*
* \luastack
* \lparam A table with at least a name attribute. Optionnaly defined values are:
* position, align, fg, bg, width and height.
* \return A brand new statusbar.
* \lreturn A brand new statusbar.
*/
static int
luaA_statusbar_new(lua_State *L)
@ -480,7 +511,10 @@ luaA_statusbar_userdata_new(statusbar_t *t)
}
/** Get all widget from a statusbar.
* \return A table with all widgets from the statusbar.
* \param L The Lua VM state.
*
* \luastack
* \lreturn A table with all widgets from the statusbar.
*/
static int
luaA_statusbar_widget_get(lua_State *L)

106
tag.c
View File

@ -236,8 +236,12 @@ tag_view_only_byindex(int screen, int dindex)
}
/** Check for tag equality.
* \param Another tag.
* \return True if tags are equals.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lparam Another tag.
* \lreturn True if tags are equals.
*/
static int
luaA_tag_eq(lua_State *L)
@ -249,7 +253,11 @@ luaA_tag_eq(lua_State *L)
}
/** Convert a tag to a printable string.
* \return A string.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lreturn A string.
*/
static int
luaA_tag_tostring(lua_State *L)
@ -260,7 +268,11 @@ luaA_tag_tostring(lua_State *L)
}
/** Add a tag to a screen.
* \param A screen number.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lparam A screen number.
*/
static int
luaA_tag_add(lua_State *L)
@ -280,8 +292,11 @@ luaA_tag_add(lua_State *L)
}
/** Get all tags from a screen.
* \param A screen number.
* \return A table with all tags from the screen specified.
* \param L The Lua VM state.
*
* \luastack
* \lparam A screen number.
* \lreturn A table with all tags from the screen specified.
*/
static int
luaA_tag_get(lua_State *L)
@ -304,9 +319,12 @@ luaA_tag_get(lua_State *L)
}
/** Create a new tag.
* \param A table with at least a name attribute.
* \param L The Lua VM state.
*
* \luastack
* \lparam A table with at least a name attribute.
* Optionnal attributes are: mwfact, ncol, nmaster and layout.
* \return A new tag object.
* \lreturn A new tag object.
*/
static int
luaA_tag_new(lua_State *L)
@ -335,7 +353,11 @@ luaA_tag_new(lua_State *L)
}
/** Add or remove a tag from the current view.
* \param A boolean value, true to view tag, false otherwise.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lparam A boolean value, true to view tag, false otherwise.
*/
static int
luaA_tag_view(lua_State *L)
@ -347,7 +369,11 @@ luaA_tag_view(lua_State *L)
}
/** Get the tag selection attribute.
* \return True if the tag is viewed, false otherwise.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lreturn True if the tag is viewed, false otherwise.
*/
static int
luaA_tag_isselected(lua_State *L)
@ -359,7 +385,11 @@ luaA_tag_isselected(lua_State *L)
/** Set the tag master width factor. This value is used in various layouts to
* determine the size of the master window.
* \param The master width ratio value, between 0 and 1.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lparam The master width ratio value, between 0 and 1.
*/
static int
luaA_tag_mwfact_set(lua_State *L)
@ -379,7 +409,11 @@ luaA_tag_mwfact_set(lua_State *L)
}
/** Get the tag master width factor.
* \return The master width ratio value.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lreturn The master width ratio value.
*/
static int
luaA_tag_mwfact_get(lua_State *L)
@ -391,7 +425,11 @@ luaA_tag_mwfact_get(lua_State *L)
/** Set the number of columns. This is used in various layouts to set the number
* of columns used to display non-master windows.
* \param The number of columns, at least 1.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lparam The number of columns, at least 1.
*/
static int
luaA_tag_ncol_set(lua_State *L)
@ -411,7 +449,11 @@ luaA_tag_ncol_set(lua_State *L)
}
/** Get the number of columns used to display non-master windows on this tag.
* \return The number of column.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lreturn The number of column.
*/
static int
luaA_tag_ncol_get(lua_State *L)
@ -423,7 +465,11 @@ luaA_tag_ncol_get(lua_State *L)
/** Set the number of master windows. This is used in various layouts to
* determine how many windows are in the master area.
* \param The number of master windows.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lparam The number of master windows.
*/
static int
luaA_tag_nmaster_set(lua_State *L)
@ -443,7 +489,11 @@ luaA_tag_nmaster_set(lua_State *L)
}
/** Get the number of master windows of the tag.
* \return The number of master windows.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lreturn The number of master windows.
*/
static int
luaA_tag_nmaster_get(lua_State *L)
@ -454,7 +504,11 @@ luaA_tag_nmaster_get(lua_State *L)
}
/** Get the tag name.
* \return The tag name.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lreturn The tag name.
*/
static int
luaA_tag_name_get(lua_State *L)
@ -465,7 +519,11 @@ luaA_tag_name_get(lua_State *L)
}
/** Set the tag name.
* \param A string with the new tag name.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lparam A string with the new tag name.
*/
static int
luaA_tag_name_set(lua_State *L)
@ -489,7 +547,11 @@ luaA_tag_gc(lua_State *L)
}
/** Get the layout of the tag.
* \return The layout name.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lreturn The layout name.
*/
static int
luaA_tag_layout_get(lua_State *L)
@ -501,7 +563,11 @@ luaA_tag_layout_get(lua_State *L)
}
/** Set the layout of the tag.
* \param A layout name.
* \param L The Lua VM state.
*
* \luastack
* \lparam A tag.
* \lparam A layout name.
*/
static int
luaA_tag_layout_set(lua_State *L)

View File

@ -395,8 +395,11 @@ titlebar_init(client_t *c)
}
/** Create a new titlebar.
* \param A table with values: align, position, fg, bg, width and height.
* \return A brand new titlebar.
* \param L The Lua VM state.
*
* \luastack
* \lparam A table with values: align, position, fg, bg, width and height.
* \lreturn A brand new titlebar.
*/
static int
luaA_titlebar_new(lua_State *L)
@ -436,7 +439,11 @@ luaA_titlebar_new(lua_State *L)
}
/** Add a widget to a titlebar.
* \param A widget.
* \param L The Lua VM state.
*
* \luastack
* \lparam A titlebar.
* \lparam A widget.
*/
static int
luaA_titlebar_widget_add(lua_State *L)
@ -461,7 +468,11 @@ luaA_titlebar_widget_add(lua_State *L)
}
/** Get all widgets from a titlebar.
* \return A table with all widgets from the titlebar.
* \param L The Lua VM state.
*
* \luastack
* \lparam A titlebar
* \lreturn A table with all widgets from the titlebar.
*/
static int
luaA_titlebar_widget_get(lua_State *L)
@ -485,7 +496,11 @@ luaA_titlebar_widget_get(lua_State *L)
/** Get the client which the titlebar is attached to. That is a the same as
* checking if every clients's titlebar is equal to titlebar.
* \return A client if the titlebar is attached, nil otherwise.
* \param L The Lua VM state.
*
* \luastack
* \lparam A titlebar.
* \lreturn A client if the titlebar is attached, nil otherwise.
*/
static int
luaA_titlebar_client_get(lua_State *L)

View File

@ -312,9 +312,12 @@ luaA_widget_userdata_new(widget_t *widget)
}
/** Create a new widget.
* \param A table with at least a name and a type value. Optionnal attributes
* \param L The Lua VM state.
*
* \luastack
* \lparam A table with at least a name and a type value. Optionnal attributes
* are: align.
* \return A brand new widget.
* \lreturn A brand new widget.
*/
static int
luaA_widget_new(lua_State *L)
@ -343,9 +346,13 @@ luaA_widget_new(lua_State *L)
}
/** Add a mouse button bindings to a widget.
* \param A table containing modifiers keys.
* \param A button number.
* \param A function to execute. Some widgets may passe arguments to this
* \param L The Lua VM state.
*
* \luastack
* \lparam A widget.
* \lparam A table containing modifiers keys.
* \lparam A button number.
* \lparam A function to execute. Some widgets may pass arguments to this
* function.
*/
static int
@ -419,8 +426,12 @@ widget_tell_managestatus(widget_t *widget, widget_tell_status_t status, const ch
}
/** Set a widget property. Each widget type has its own set of property.
* \param The property name.
* \param The property value.
* \param L The Lua VM state.
*
* \luastack
* \lparam A widget.
* \lparam The property name.
* \lparam The property value.
*/
static int
luaA_widget_set(lua_State *L)
@ -438,6 +449,10 @@ luaA_widget_set(lua_State *L)
}
/** Handle widget garbage collection.
* \param L The Lua VM state.
*
* \luastack
* \lparam A widget.
*/
static int
luaA_widget_gc(lua_State *L)
@ -449,6 +464,10 @@ luaA_widget_gc(lua_State *L)
}
/** Convert a widget into a printable string.
* \param L The Lua VM state.
*
* \luastack
* \lparam A widget.
*/
static int
luaA_widget_tostring(lua_State *L)
@ -459,7 +478,12 @@ luaA_widget_tostring(lua_State *L)
}
/** Check for widget equality.
* \param Another widget.
* \param L The Lua VM state.
*
* \luastack
* \lparam A widget.
* \lparam Another widget.
* \lreturn True if widgets are equal.
*/
static int
luaA_widget_eq(lua_State *L)
@ -471,7 +495,11 @@ luaA_widget_eq(lua_State *L)
}
/** Set the widget name.
* \param A string with the new widget name.
* \param L The Lua VM state.
*
* \luastack
* \lparam A widget.
* \lparam A string with the new widget name.
*/
static int
luaA_widget_name_set(lua_State *L)
@ -484,7 +512,11 @@ luaA_widget_name_set(lua_State *L)
}
/** Get the widget name.
* \return A string with the name of the widget.
* \param L The Lua VM state.
*
* \luastack
* \lparam A widget.
* \lreturn A string with the name of the widget.
*/
static int
luaA_widget_name_get(lua_State *L)
@ -496,7 +528,11 @@ luaA_widget_name_get(lua_State *L)
/** Set the visible attribute of a widget. If a widget is not visible, it is not
* drawn on the statusbar.
* \param A boolean value.
* \param L The Lua VM state.
*
* \luastack
* \lparam A widget.
* \lparam A boolean value.
*/
static int
luaA_widget_visible_set(lua_State *L)