mouse: add compatibility code for mouse()
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
6b386def45
commit
096170fa72
13
mouse.c
13
mouse.c
|
@ -1367,8 +1367,21 @@ luaA_mouse_coords(lua_State *L)
|
||||||
return 1;
|
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[] =
|
const struct luaL_reg awesome_mouse_methods[] =
|
||||||
{
|
{
|
||||||
|
/* deprecated */
|
||||||
|
{ "__call", luaA_mouse_new },
|
||||||
{ "__index", luaA_mouse_index },
|
{ "__index", luaA_mouse_index },
|
||||||
{ "__newindex", luaA_mouse_newindex },
|
{ "__newindex", luaA_mouse_newindex },
|
||||||
{ "coords", luaA_mouse_coords },
|
{ "coords", luaA_mouse_coords },
|
||||||
|
|
Loading…
Reference in New Issue