mouse: add compatibility code for mouse()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-11-05 11:23:04 +01:00
parent 6b386def45
commit 096170fa72

13
mouse.c
View file

@ -1367,8 +1367,21 @@ luaA_mouse_coords(lua_State *L)
return 1;
}
/** Deprecated
* \param L The Lua VM state.
* \return The number of elements pushed on stack.
*/
static int
luaA_mouse_new(lua_State *L)
{
deprecate();
return luaA_button_new(L);
}
const struct luaL_reg awesome_mouse_methods[] =
{
/* deprecated */
{ "__call", luaA_mouse_new },
{ "__index", luaA_mouse_index },
{ "__newindex", luaA_mouse_newindex },
{ "coords", luaA_mouse_coords },