awesome: Add get_* and set_xproperty
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
2869cdc860
commit
a6fb932bbc
2
luaa.c
2
luaa.c
|
@ -358,6 +358,8 @@ luaA_init(xdgHandle* xdg)
|
||||||
{ "systray", luaA_systray },
|
{ "systray", luaA_systray },
|
||||||
{ "load_image", luaA_load_image },
|
{ "load_image", luaA_load_image },
|
||||||
{ "register_xproperty", luaA_register_xproperty },
|
{ "register_xproperty", luaA_register_xproperty },
|
||||||
|
{ "set_xproperty", luaA_set_xproperty },
|
||||||
|
{ "get_xproperty", luaA_get_xproperty },
|
||||||
{ "__index", luaA_awesome_index },
|
{ "__index", luaA_awesome_index },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
|
@ -44,6 +44,17 @@ module("awesome")
|
||||||
-- @name register_xproperty
|
-- @name register_xproperty
|
||||||
-- @class function
|
-- @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.
|
--- Add a global signal.
|
||||||
-- @param name A string with the event name.
|
-- @param name A string with the event name.
|
||||||
-- @param func The function to call.
|
-- @param func The function to call.
|
||||||
|
|
20
property.c
20
property.c
|
@ -525,4 +525,24 @@ luaA_register_xproperty(lua_State *L)
|
||||||
return 0;
|
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
|
// 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);
|
void property_handle_propertynotify(xcb_property_notify_event_t *ev);
|
||||||
int luaA_register_xproperty(lua_State *L);
|
int luaA_register_xproperty(lua_State *L);
|
||||||
|
int luaA_set_xproperty(lua_State *L);
|
||||||
|
int luaA_get_xproperty(lua_State *L);
|
||||||
|
|
||||||
struct xproperty {
|
struct xproperty {
|
||||||
xcb_atom_t atom;
|
xcb_atom_t atom;
|
||||||
|
|
Loading…
Reference in New Issue