Add convenience function for getting an icon's geometry. This is used in

placing the new fwin next to the icon that spawned it.


SVN revision: 33097
This commit is contained in:
Christopher Michael 2007-12-11 14:57:46 +00:00
parent 689ca0c0b0
commit 8b7fec175f
2 changed files with 18 additions and 1 deletions

View File

@ -1388,6 +1388,22 @@ e_fm2_icon_file_info_get(E_Fm2_Icon *ic)
return &(ic->info);
}
EAPI void
e_fm2_icon_geometry_get(E_Fm2_Icon *ic, int *x, int *y, int *w, int *h)
{
int xx, yy, ww, hh;
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
if (ic)
{
evas_object_geometry_get(ic->obj, &xx, &yy, &ww, &hh);
if (x) *x = xx;
if (y) *y = yy;
if (w) *w = ww;
if (h) *h = hh;
}
}
/* FIXME: track real exe with exe del events etc. */
static int _e_fm2_client_spawning = 0;

View File

@ -154,7 +154,8 @@ EAPI Evas_Object *
void (*gen_func) (void *data, Evas_Object *obj, void *event_info),
void *data, int force_gen, const char **type_ret);
EAPI E_Fm2_Icon_Info *e_fm2_icon_file_info_get(E_Fm2_Icon *ic);
EAPI void e_fm2_icon_geometry_get(E_Fm2_Icon *ic, int *x, int *y, int *w, int *h);
EAPI void e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e);
EAPI void e_fm2_client_del(Ecore_Ipc_Event_Client_Del *e);