From fd11b69ad54b3dbd0744cd51e36870ae3a5d4644 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 19 Feb 2013 10:57:32 +0000 Subject: [PATCH] Add edje callbacks to frame for resize_start & resize_stop. Add code to delete edje callbacks from frame when object is deleted. Add start of code for resize_start & resize_stop frame events. Signed-off-by: Christopher Michael SVN revision: 84166 --- src/modules/conf_randr/e_smart_monitor.c | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c index 72057434d..a5e6a4ab9 100644 --- a/src/modules/conf_randr/e_smart_monitor.c +++ b/src/modules/conf_randr/e_smart_monitor.c @@ -92,6 +92,9 @@ static void _e_smart_monitor_frame_cb_rotate_out(void *data EINA_UNUSED, Evas_Ob static void _e_smart_monitor_frame_cb_indicator_in(void *data EINA_UNUSED, Evas_Object *obj, const char *emission EINA_UNUSED, const char *source EINA_UNUSED); static void _e_smart_monitor_frame_cb_indicator_out(void *data EINA_UNUSED, Evas_Object *obj, const char *emission EINA_UNUSED, const char *source EINA_UNUSED); +static void _e_smart_monitor_frame_cb_resize_start(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED); +static void _e_smart_monitor_frame_cb_resize_stop(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED); + /* external functions exposed by this widget */ Evas_Object * e_smart_monitor_add(Evas *evas) @@ -335,6 +338,11 @@ _e_smart_add(Evas_Object *obj) edje_object_signal_callback_add(sd->o_frame, "e,action,indicator,out", "e", _e_smart_monitor_frame_cb_indicator_out, NULL); + edje_object_signal_callback_add(sd->o_frame, "e,action,resize,start", "e", + _e_smart_monitor_frame_cb_resize_start, obj); + edje_object_signal_callback_add(sd->o_frame, "e,action,resize,stop", "e", + _e_smart_monitor_frame_cb_resize_stop, obj); + /* create the stand */ sd->o_stand = edje_object_add(sd->evas); e_theme_edje_object_set(sd->o_stand, "base/theme/widgets", @@ -412,6 +420,11 @@ _e_smart_del(Evas_Object *obj) edje_object_signal_callback_del(sd->o_frame, "e,action,indicator,out", "e", _e_smart_monitor_frame_cb_indicator_out); + edje_object_signal_callback_del(sd->o_frame, "e,action,resize,start", "e", + _e_smart_monitor_frame_cb_resize_start); + edje_object_signal_callback_del(sd->o_frame, "e,action,resize,stop", "e", + _e_smart_monitor_frame_cb_resize_stop); + /* delete the object */ evas_object_del(sd->o_frame); } @@ -779,3 +792,29 @@ _e_smart_monitor_frame_cb_indicator_out(void *data EINA_UNUSED, Evas_Object *obj /* set the mouse pointer back to default */ _e_smart_monitor_pointer_pop(obj, "plus"); } + +static void +_e_smart_monitor_frame_cb_resize_start(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED) +{ + Evas_Object *mon; + E_Smart_Data *sd; + + /* try to get the monitor object */ + if (!(mon = data)) return; + + /* try to get the monitor smart data */ + if (!(sd = evas_object_smart_data_get(mon))) return; +} + +static void +_e_smart_monitor_frame_cb_resize_stop(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED) +{ + Evas_Object *mon; + E_Smart_Data *sd; + + /* try to get the monitor object */ + if (!(mon = data)) return; + + /* try to get the monitor smart data */ + if (!(sd = evas_object_smart_data_get(mon))) return; +}