Add property::geometry to drawin/drawable [#411]

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2015-10-14 19:35:23 +02:00
parent fbfa6b8995
commit 438a10973b
2 changed files with 10 additions and 0 deletions

View File

@ -104,6 +104,7 @@ drawable_set_geometry(lua_State *L, int didx, area_t geom)
luaA_object_emit_signal(L, didx, "property::surface", 0);
}
luaA_object_emit_signal(L, didx, "property::geometry", 0);
if (old.x != geom.x)
luaA_object_emit_signal(L, didx, "property::x", 0);
if (old.y != geom.y)
@ -202,6 +203,10 @@ drawable_class_setup(lua_State *L)
* @signal mouse::move
*/
signal_add(&drawable_class.signals, "mouse::move");
/**
* @signal property::geometry
*/
signal_add(&drawable_class.signals, "property::geometry");
/**
* @signal property::height
*/

View File

@ -188,6 +188,7 @@ drawin_moveresize(lua_State *L, int udx, area_t geometry)
w->geometry_dirty = true;
drawin_update_drawing(L, udx);
luaA_object_emit_signal(L, udx, "property::geometry", 0);
if (old_geometry.x != w->geometry.x)
luaA_object_emit_signal(L, udx, "property::x", 0);
if (old_geometry.y != w->geometry.y)
@ -690,6 +691,10 @@ drawin_class_setup(lua_State *L)
(lua_class_propfunc_t) luaA_drawin_get_shape_clip,
(lua_class_propfunc_t) luaA_drawin_set_shape_clip);
/**
* @signal property::geometry
*/
signal_add(&drawin_class.signals, "property::geometry");
/**
* @signal property::shape_bounding
*/