luaobject: import signals meta methods in objects

Signed-off-by: Julien Danjou <julien@danjou.info>

Conflicts:
This commit is contained in:
Julien Danjou 2009-07-29 15:22:33 +02:00
parent 7ecce446ad
commit dea2b6303a
8 changed files with 12 additions and 0 deletions

View File

@ -149,6 +149,7 @@ const struct luaL_reg awesome_button_methods[] =
};
const struct luaL_reg awesome_button_meta[] =
{
LUA_OBJECT_META
{ "__index", luaA_button_index },
{ "__newindex", luaA_button_newindex },
{ "__gc", luaA_object_gc },

View File

@ -1963,6 +1963,7 @@ const struct luaL_reg awesome_client_methods[] =
};
const struct luaL_reg awesome_client_meta[] =
{
LUA_OBJECT_META
{ "isvisible", luaA_client_isvisible },
{ "geometry", luaA_client_geometry },
{ "struts", luaA_client_struts },

View File

@ -214,6 +214,11 @@ luaA_object_gc(lua_State *L)
return 0;
}
#define LUA_OBJECT_META \
{ "add_signal", luaA_object_add_signal_simple }, \
{ "remove_signal", luaA_object_remove_signal_simple }, \
{ "emit_signal", luaA_object_emit_signal_simple },
#endif
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

View File

@ -776,6 +776,7 @@ const struct luaL_reg awesome_image_methods[] =
};
const struct luaL_reg awesome_image_meta[] =
{
LUA_OBJECT_META
{ "__index", luaA_image_index },
{ "rotate", luaA_image_rotate },
{ "orientate", luaA_image_orientate },

1
key.c
View File

@ -1151,6 +1151,7 @@ const struct luaL_reg awesome_key_methods[] =
};
const struct luaL_reg awesome_key_meta[] =
{
LUA_OBJECT_META
{ "__tostring", luaA_key_tostring },
{ "__index", luaA_key_index },
{ "__newindex", luaA_key_newindex },

1
tag.c
View File

@ -410,6 +410,7 @@ const struct luaL_reg awesome_tag_methods[] =
};
const struct luaL_reg awesome_tag_meta[] =
{
LUA_OBJECT_META
{ "clients", luaA_tag_clients },
{ "__index", luaA_tag_index },
{ "__newindex", luaA_tag_newindex },

View File

@ -1206,6 +1206,7 @@ const struct luaL_reg awesome_wibox_methods[] =
};
const struct luaL_reg awesome_wibox_meta[] =
{
LUA_OBJECT_META
{ "geometry", luaA_wibox_geometry },
{ "__index", luaA_wibox_index },
{ "__newindex", luaA_wibox_newindex },

View File

@ -557,6 +557,7 @@ const struct luaL_reg awesome_widget_methods[] =
};
const struct luaL_reg awesome_widget_meta[] =
{
LUA_OBJECT_META
{ "extents", luaA_widget_extents },
{ "__index", luaA_widget_index },
{ "__newindex", luaA_widget_newindex },