doc(client_get_some_icon) Improve description

This commit is contained in:
Aire-One 2021-11-15 19:06:36 +01:00
parent 0246c44d4f
commit ea349cee6a
1 changed files with 14 additions and 0 deletions

View File

@ -4313,11 +4313,25 @@ luaA_client_get_icon_sizes(lua_State *L, client_t *c)
}
/** Get the client's n-th icon.
*
* The icon index can be deternined by inspecting the `icon_sizes` property first.
*
* The user has the responsibility to test the value returned by this function
* to ensure an icon have been returned.
*
* It is recommended to use the `awful.widget.clienticon` widget when the
* client icon is used in a widget structure.
*
* Note that this function tests the provided index and raise an "invalid icon
* index" error if the provided index doesn't exist in the client's icons list
* (by raising this error, the function will return `nil` to the caller).
*
* @tparam interger index The index in the list of icons to get.
* @treturn surface A lightuserdata for a cairo surface. This reference must be
* destroyed!
* @method get_icon
* @see icon_sizes
* @see awful.widget.clienticon
*/
static int
luaA_client_get_some_icon(lua_State *L)