awesome: Add get_* and set_xproperty
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
b57b19b831
commit
ec484b700a
2
luaa.c
2
luaa.c
|
@ -358,6 +358,8 @@ luaA_init(xdgHandle* xdg)
|
|||
{ "systray", luaA_systray },
|
||||
{ "load_image", luaA_load_image },
|
||||
{ "register_xproperty", luaA_register_xproperty },
|
||||
{ "set_xproperty", luaA_set_xproperty },
|
||||
{ "get_xproperty", luaA_get_xproperty },
|
||||
{ "__index", luaA_awesome_index },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
|
|
@ -44,6 +44,17 @@ module("awesome")
|
|||
-- @name register_xproperty
|
||||
-- @class function
|
||||
|
||||
--- Change a xproperty.
|
||||
-- @param name The name of the X11 property
|
||||
-- @param value The new value for the property
|
||||
-- @name set_xproperty
|
||||
-- @class function
|
||||
|
||||
--- Get the value of a xproperty.
|
||||
-- @param name The name of the X11 property
|
||||
-- @name get_xproperty
|
||||
-- @class function
|
||||
|
||||
--- Add a global signal.
|
||||
-- @param name A string with the event name.
|
||||
-- @param func The function to call.
|
||||
|
|
20
property.c
20
property.c
|
@ -525,4 +525,24 @@ luaA_register_xproperty(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** Set an xproperty.
|
||||
* \param L The Lua VM state.
|
||||
* \return The number of elements pushed on stack.
|
||||
*/
|
||||
int
|
||||
luaA_set_xproperty(lua_State *L)
|
||||
{
|
||||
return window_set_xproperty(L, globalconf.screen->root, 1, 2);
|
||||
}
|
||||
|
||||
/** Get an xproperty.
|
||||
* \param L The Lua VM state.
|
||||
* \return The number of elements pushed on stack.
|
||||
*/
|
||||
int
|
||||
luaA_get_xproperty(lua_State *L)
|
||||
{
|
||||
return window_get_xproperty(L, globalconf.screen->root, 1);
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -47,6 +47,8 @@ PROPERTY(net_wm_icon);
|
|||
|
||||
void property_handle_propertynotify(xcb_property_notify_event_t *ev);
|
||||
int luaA_register_xproperty(lua_State *L);
|
||||
int luaA_set_xproperty(lua_State *L);
|
||||
int luaA_get_xproperty(lua_State *L);
|
||||
|
||||
struct xproperty {
|
||||
xcb_atom_t atom;
|
||||
|
|
Loading…
Reference in New Issue