EAPI void elm_tickernoti_mode_set (Evas_Object *obj, Elm_Tickernoti_Mode mode) EINA_ARG_NONNULL(1);
EAPI Elm_Tickernoti_Mode elm_tickernoti_mode_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
/* ############################################################################### */
+ /* smart callbacks called:
+ * @li "clicked" - emitted when tickernoti is clicked, except at the
+ * swallow/button region, if any.
+ * @li "hide" - emitted when the tickernoti is completelyhidden. In case of
+ * any hide animation, this signal is raised after the animation.
+ */
/* colorpalette */
typedef struct _Colorpalette_Color Elm_Colorpalette_Color;
static void _theme_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
+static const char SIG_CLICKED[] = "clicked";
+static const char SIG_HIDDEN[] = "hide";
+static const Evas_Smart_Cb_Description _signals[] = {
+ {SIG_CLICKED, ""},
+ {SIG_HIDDEN, ""},
+ {NULL, NULL}
+};
static void
_del_job(void *data)
{
_sizing_eval(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
+ Evas_Coord minw = -1, minh = -1;
if (!wd) return;
- edje_object_size_min_calc(wd->win, &minw, &minh);
-//TODO:
+ elm_coords_finger_size_adjust(1, &minw, 1, &minh);
+ edje_object_size_min_restricted_calc(wd->edje_obj, &minw, &minh, minw, minh);
+ evas_object_size_hint_min_set(obj, minw, minh);
}
#ifdef HAVE_ELEMENTARY_X
if (!wd) return;
evas_object_hide (wd->win);
- evas_object_smart_callback_call (data, "hide", NULL);
+ evas_object_smart_callback_call (data, SIG_HIDDEN, NULL);
+}
+
+static void _clicked_cb (void *data, Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+
+ if (!wd) return;
+ evas_object_smart_callback_call (data, SIG_CLICKED, NULL);
}
static Evas_Object
#endif
edje_object_signal_callback_add(wd->edje_obj, "request,hide", "", _hide_cb, obj);
+ edje_object_signal_callback_add(wd->edje_obj, "clicked", "", _clicked_cb, obj);
evas_object_show (wd->edje_obj);
}
evas_object_event_callback_add (obj, EVAS_CALLBACK_SHOW, _show, NULL);
evas_object_event_callback_add (obj, EVAS_CALLBACK_HIDE, _hide, NULL);
-
+ evas_object_smart_callbacks_descriptions_set(obj, _signals);
return obj;
}
/*
* manual calculate win_tickernoti_indi window position & size
- * - win_indi is not full size window (480 x 27)
+ * - win_indi is not full size window
*/
ecore_x_window_size_get (ecore_x_window_root_first_get(), &root_w, &root_h);