*
* "clicked" - the user clicked the hoversel button and popped up the sel
* "selected" - an item in the hoversel list is selected. event_info is the item
- * "selected" - Elm_Hoversel_Item
* "dismissed" - the hover is dismissed
*/
typedef struct _Widget_Data Widget_Data;
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static const char SIG_CLICKED[] = "clicked";
+static const char SIG_SELECTED[] = "selected";
+static const char SIG_DISMISSED[] = "dismissed";
+
+static const Evas_Smart_Cb_Description _signals[] = {
+ {SIG_CLICKED, ""},
+ {SIG_SELECTED, ""},
+ {SIG_DISMISSED, ""},
+ {NULL, NULL}
+};
+
static void
_del_pre_hook(Evas_Object *obj)
{
elm_hoversel_hover_end(obj2);
if (item->func) item->func((void *)item->base.data, obj2, item);
- evas_object_smart_callback_call(obj2, "selected", item);
+ evas_object_smart_callback_call(obj2, SIG_SELECTED, item);
}
static void
evas_object_show(bx);
evas_object_show(wd->hover);
- evas_object_smart_callback_call(obj, "clicked", NULL);
+ evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
// if (wd->horizontal) evas_object_hide(wd->btn);
}
evas_object_event_callback_add(wd->btn, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
evas_object_smart_callback_add(wd->btn, "clicked", _button_clicked, obj);
+ evas_object_smart_callbacks_descriptions_set(obj, _signals);
+
elm_widget_sub_object_add(obj, wd->btn);
elm_hoversel_hover_parent_set(obj, parent);
_theme_hook(obj);
+
return obj;
}
wd->expanded = EINA_FALSE;
evas_object_del(wd->hover);
wd->hover = NULL;
- evas_object_smart_callback_call(obj, "dismissed", NULL);
+ evas_object_smart_callback_call(obj, SIG_DISMISSED, NULL);
}
/**
static const char *widtype = NULL;
-#define SIG_CHANGED "pos_changed"
-#define SIG_SELECTED "selected"
+static const char SIG_CHANGED[] = "pos_changed";
+static const char SIG_SELECTED[] = "selected";
static const Evas_Smart_Cb_Description _signals[] =
{
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _sub_del(void *data, Evas_Object *obj, void *event_info);
-#define SIG_CLICKED "clicked"
+static const char SIG_CLICKED[] = "clicked";
+
static const Evas_Smart_Cb_Description _signals[] =
{
{SIG_CLICKED, ""},
static void _on_focus_hook(void *data, Evas_Object *obj);
static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
+static const char SIG_CHANGED[] = "changed";
+
+static const Evas_Smart_Cb_Description _signals[] = {
+ {SIG_CHANGED, ""},
+ {NULL, NULL}
+};
+
+
/* Should not be translated, it's used if we failed
* getting from locale. */
static const char *_days_abbrev[] =
wd->selected_time.tm_mday = maxdays;
_fix_selected_time(wd);
- evas_object_smart_callback_call(obj, "changed", NULL);
+ evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
return EINA_TRUE;
}
wd->selected_time.tm_mday = day;
_select(wd, wd->selected_it);
_fix_selected_time(wd);
- evas_object_smart_callback_call(obj, "changed", NULL);
+ evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
}
static void
edje_object_signal_callback_add(wd->calendar, "elm,action,selected",
"*", _day_selected, obj);
+ evas_object_smart_callbacks_descriptions_set(obj, _signals);
+
for (i = 0; i < 7; i++)
{
/* FIXME: I'm not aware of a known max, so if it fails,
static Eina_Bool _signal_clock_val_down(void *data);
static void _time_update(Evas_Object *obj);
+static const char SIG_CHANGED[] = "changed";
+
+static const Evas_Smart_Cb_Description _signals[] = {
+ {SIG_CHANGED, ""},
+ {NULL, NULL}
+};
+
+
static void
_del_hook(Evas_Object *obj)
{
wd->interval = wd->interval / 1.05;
ecore_timer_interval_set(wd->spin, wd->interval);
_time_update(data);
- evas_object_smart_callback_call(data, "changed", NULL);
+ evas_object_smart_callback_call(data, SIG_CHANGED, NULL);
return ECORE_CALLBACK_RENEW;
clock_val_up_cancel:
wd->spin = NULL;
wd->interval = wd->interval / 1.05;
ecore_timer_interval_set(wd->spin, wd->interval);
_time_update(data);
- evas_object_smart_callback_call(data, "changed", NULL);
+ evas_object_smart_callback_call(data, SIG_CHANGED, NULL);
return ECORE_CALLBACK_RENEW;
clock_val_down_cancel:
wd->spin = NULL;
_time_update(obj);
_ticker(obj);
+ evas_object_smart_callbacks_descriptions_set(obj, _signals);
+
return obj;
}
static void _add_colorbar(Evas_Object *obj);
static void _set_color(Evas_Object *obj, int r, int g, int b, int a);
-#define SIG_CHANGED "changed"
+static const char SIG_CHANGED[] = "changed";
static const Evas_Smart_Cb_Description _signals[] =
{