From 8b7fec175f4f88d33b3128a076f5734226ce1eaa Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 11 Dec 2007 14:57:46 +0000 Subject: [PATCH] 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 --- src/bin/e_fm.c | 16 ++++++++++++++++ src/bin/e_fm.h | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index 5e270ef8a..fa3015c1f 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -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; diff --git a/src/bin/e_fm.h b/src/bin/e_fm.h index a29709acc..3dc5acac4 100644 --- a/src/bin/e_fm.h +++ b/src/bin/e_fm.h @@ -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);