From 096170fa723ab394749bdb735fc015723dc1b0a7 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 5 Nov 2008 11:23:04 +0100 Subject: [PATCH] mouse: add compatibility code for mouse() Signed-off-by: Julien Danjou --- mouse.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mouse.c b/mouse.c index 3591c422c..e0f313146 100644 --- a/mouse.c +++ b/mouse.c @@ -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 },