[client] Add ishidden() method
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
4573147196
commit
c5c75bf960
17
client.c
17
client.c
|
@ -1261,6 +1261,22 @@ luaA_client_unhide(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Guess if a client has been hidden.
|
||||||
|
* \param L The Lua VM state.
|
||||||
|
*
|
||||||
|
* \luastack
|
||||||
|
*
|
||||||
|
* \lreturn A boolean, true if the client has been hidden with hide(), false
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
luaA_client_ishidden(lua_State *L)
|
||||||
|
{
|
||||||
|
client_t **c = luaA_checkudata(L, 1, "client");
|
||||||
|
lua_pushboolean(L, (*c)->ishidden);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
luaA_client_userdata_new(client_t *c)
|
luaA_client_userdata_new(client_t *c)
|
||||||
{
|
{
|
||||||
|
@ -1305,6 +1321,7 @@ const struct luaL_reg awesome_client_meta[] =
|
||||||
{ "unmanage", luaA_client_unmanage },
|
{ "unmanage", luaA_client_unmanage },
|
||||||
{ "hide", luaA_client_hide },
|
{ "hide", luaA_client_hide },
|
||||||
{ "unhide", luaA_client_unhide },
|
{ "unhide", luaA_client_unhide },
|
||||||
|
{ "ishidden", luaA_client_ishidden },
|
||||||
{ "__eq", luaA_client_eq },
|
{ "__eq", luaA_client_eq },
|
||||||
{ "__tostring", luaA_client_tostring },
|
{ "__tostring", luaA_client_tostring },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
|
|
Loading…
Reference in New Issue