Exemplo n.º 1
0
static void
_theme_hook(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   _sizing_eval(obj);
}
Exemplo n.º 2
0
static void
_signal_clicked(void *data, Evas_Object * o, const char *emission,
		const char *source)
{
	Widget_Data *wd = elm_widget_data_get(data);
	evas_object_smart_callback_call(wd->widget, "clicked", emission[0]);
}
static void
_del_hook(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   free(wd);
}
Exemplo n.º 4
0
static void
_del_hook(Evas_Object * obj)
{
	Widget_Data *wd = elm_widget_data_get(obj);
	evas_object_del(wd->keypad);
	free(wd);
}
Exemplo n.º 5
0
static void
_theme_hook(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   _elm_widget_mirrored_reload(obj);
   _mirrored_set(obj, elm_widget_mirrored_get(obj));
   _elm_theme_object_set(obj, wd->bbl, "bubble", wd->corner,
                         elm_widget_style_get(obj));
   edje_object_part_text_set(wd->bbl, "elm.text", wd->label);
   if (wd->label) edje_object_signal_emit(wd->bbl, "elm,state,text,visible", "elm");
   else edje_object_signal_emit(wd->bbl, "elm,state,text,hidden", "elm");
   edje_object_part_text_set(wd->bbl, "elm.info", wd->info);
   if (wd->info) edje_object_signal_emit(wd->bbl, "elm,state,info,visible", "elm");
   else edje_object_signal_emit(wd->bbl, "elm,state,info,hidden", "elm");
   if (wd->content)
     {
        edje_object_part_swallow(wd->bbl, "elm.swallow.content", wd->content);
        edje_object_message_signal_process(wd->bbl);
     }
   if (wd->icon)
     edje_object_signal_emit(wd->bbl, "elm,state,icon,visible", "elm");
   else
     edje_object_signal_emit(wd->bbl, "elm,state,icon,hidden", "elm");
   edje_object_scale_set(wd->bbl,
                         elm_widget_scale_get(obj) * _elm_config->scale);
   _sizing_eval(obj);
}
Exemplo n.º 6
0
static void
_theme_hook(Evas_Object *obj)
{
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    _elm_widget_mirrored_reload(obj);
    if (wd->scr)
    {
        Evas_Object *edj;
        const char *str;

        _mirrored_set(obj, elm_widget_mirrored_get(obj));
        elm_smart_scroller_object_theme_set(obj, wd->scr, "panel", "base",
                                            elm_widget_style_get(obj));
        //   scale = (elm_widget_scale_get(obj) * _elm_config->scale);
        //   edje_object_scale_set(wd->scr, scale);
        edj = elm_smart_scroller_edje_object_get(wd->scr);
        str = edje_object_data_get(edj, "focus_highlight");
        if ((str) && (!strcmp(str, "on")))
            elm_widget_highlight_in_theme_set(obj, EINA_TRUE);
        else
            elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
    }

    _sizing_eval(obj);
}
static void
_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   edje_object_mirrored_set(wd->sep, rtl);
}
Exemplo n.º 8
0
static void
_sizing_eval(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   Evas_Coord minw = -1, minh = -1;
   int i;

   if (!wd) return;
   elm_coords_finger_size_adjust(1, &minw, 1, &minh);
   for (i = 0; i < 4; i++)
     {
        if (wd->cp[i]->bg_rect)
          _colorselector_set_size_hints(wd->cp[i]->bg_rect, 1, 1);
        _colorselector_set_size_hints(wd->cp[i]->bar, 1, 1);
        _colorselector_set_size_hints(wd->cp[i]->rbt, 1, 1);
        _colorselector_set_size_hints(wd->cp[i]->lbt, 1, 1);

        _colorselector_set_size_hints(wd->cp[i]->colorbar, 4, 1);
     }

   elm_coords_finger_size_adjust(4, &minw, 4, &minh);
   edje_object_size_min_restricted_calc(wd->base, &minw, &minh, minw, minh);
   evas_object_size_hint_min_set(obj, minw, minh);
   evas_object_size_hint_max_set(obj, -1, -1);
}
Exemplo n.º 9
0
static void
_block_events_theme_apply(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   const char *style = elm_widget_style_get(obj);
   _elm_theme_object_set(obj, wd->block_events, "notify", "block_events", style);
}
Exemplo n.º 10
0
static void
_plus_trigered(void *data)
{
	Widget_Data *wd = elm_widget_data_get(data);
	ecore_timer_del(wd->plus_timer);
	wd->plus_timer = NULL;
	evas_object_smart_callback_call(wd->widget, "clicked", '+');
}
Exemplo n.º 11
0
static void
_del_pre_hook(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);

   if (!wd) return;
   evas_object_del(wd->img);
}
Exemplo n.º 12
0
static void
_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   edje_object_mirrored_set(wd->notify, rtl);
   _notify_move_to_orientation(obj);
}
Exemplo n.º 13
0
EAPI Eina_Bool
elm_separator_horizontal_get(const Evas_Object *obj)
{
   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return EINA_FALSE;
   return wd->horizontal;
}
Exemplo n.º 14
0
static void
_del_hook(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   if (wd->label) eina_stringshare_del(wd->label);
   free(wd);
}
Exemplo n.º 15
0
static void
_zero_mouse_down(void *data, Evas_Object * o, const char *emission,
		 const char *source)
{
	Widget_Data *wd = elm_widget_data_get(data);
	if (wd->plus_timer == NULL)
		wd->plus_timer = ecore_timer_add(0.5, _plus_trigered, data);
}
Exemplo n.º 16
0
static void
_del_pre_hook(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   evas_object_event_callback_del_full(wd->btn, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
   evas_object_smart_callback_del(wd->btn, "clicked", _button_clicked);
}
Exemplo n.º 17
0
static void
_del_pre_hook(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   evas_object_event_callback_del_full
      (wd->box, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
   evas_object_box_remove_all(wd->box, EINA_FALSE);
}
Exemplo n.º 18
0
static Eina_Bool
_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   Evas_Object *cur;

   if ((!wd) || (!wd->content)) return EINA_FALSE;
   cur = wd->content;
   return elm_widget_focus_next_get(cur, dir, next);
}
Exemplo n.º 19
0
static void
_del_hook(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   int i = 0;

   if (!wd) return;
   for (i = 0; i < 4; i++) free(wd->cp[i]);
   free(wd);
}
Exemplo n.º 20
0
static void
_sizing_eval(Evas_Object * obj)
{
	Widget_Data *wd = elm_widget_data_get(obj);
	Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;

	edje_object_size_min_calc(wd->keypad, &minw, &minh);
	evas_object_size_hint_min_set(obj, minw, minh);
	evas_object_size_hint_max_set(obj, maxw, maxh);
}
Exemplo n.º 21
0
static Eina_Bool
_elm_frame_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next)
{
   Widget_Data *wd = elm_widget_data_get(obj);

   if ((!wd) || (!wd->content))
     return EINA_FALSE;

   /* Try Focus cycle in subitem */
   return elm_widget_focus_next_get(wd->content, dir, next);
}
Exemplo n.º 22
0
EAPI void
elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
{
   ELM_CHECK_WIDTYPE(obj, widtype);
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   horizontal = !!horizontal;
   if (wd->horizontal == horizontal) return;
   wd->horizontal = horizontal;
   _theme_hook(obj);
}
Exemplo n.º 23
0
static void
_sizing_eval(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   Evas_Coord x,y,w,h;
   if (!wd) return;
   if (!wd->parent) return;
   evas_object_geometry_get(wd->parent, &x, &y, &w, &h);
   evas_object_move(obj, x, y);
   evas_object_resize(obj, w, h);
}
Exemplo n.º 24
0
static void
_sizing_eval(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;

   if (!wd) return;
   //TODO: get socket object size
   evas_object_size_hint_min_set(obj, minw, minh);
   evas_object_size_hint_max_set(obj, maxw, maxh);
}
Exemplo n.º 25
0
static void
_sizing_eval(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
   if (!wd) return;
   elm_coords_finger_size_adjust(1, &minw, 1, &minh);
   edje_object_size_min_restricted_calc(wd->bbl, &minw, &minh, minw, minh);
   evas_object_size_hint_min_set(obj, minw, minh);
   evas_object_size_hint_max_set(obj, maxw, maxh);
}
Exemplo n.º 26
0
static void
_theme_hook(Evas_Object *obj)
{
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;
   if (elm_widget_focus_get(obj))
     edje_object_signal_emit(wd->clk, "elm,action,focus", "elm");
   else
     edje_object_signal_emit(wd->clk, "elm,action,unfocus", "elm");
   wd->cur.am_pm = !wd->cur.am_pm; /* hack - force update */
   _time_update(obj);
}
Exemplo n.º 27
0
static void
_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
{
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;

    if (wd->scr)
    {
        elm_widget_mirrored_set(wd->bx, rtl);
        elm_panel_orient_set(obj, elm_panel_orient_get(obj));
    }
}
Exemplo n.º 28
0
static Evas_Object *
_content_unset_hook(Evas_Object *obj, const char *part)
{
   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return NULL;
   if (!part || !strcmp(part, "default"))
     return _content_unset(obj);
   else if(!strcmp(part, "icon"))
     return _icon_unset(obj);
   return NULL;
}
Exemplo n.º 29
0
static void
_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
   ELM_CHECK_WIDTYPE(obj, widtype);
   Widget_Data *wd = elm_widget_data_get(obj);
   if (!wd) return;

   if (!part || !strcmp(part, "default"))
     _content_set(obj, content);
   else if(!strcmp(part, "icon"))
     _icon_set(obj, content);
}
Exemplo n.º 30
0
static void
_zero_mouse_up(void *data, Evas_Object * o, const char *emission,
	       const char *source)
{
	Widget_Data *wd = elm_widget_data_get(data);

	if (wd->plus_timer != NULL) {
		ecore_timer_del(wd->plus_timer);
		wd->plus_timer = NULL;
		evas_object_smart_callback_call(wd->widget, "clicked", '0');
	}
}