コード例 #1
0
EAPI void
e_widget_button_icon_set(Evas_Object *obj, Evas_Object *icon)
{
   E_Widget_Data *wd;
   int mw, mh;

   wd = e_widget_data_get(obj);
   if (wd->o_icon)
     {
	e_widget_sub_object_del(obj, wd->o_icon);
	evas_object_hide(wd->o_icon);
	edje_object_part_unswallow(wd->o_button, wd->o_icon);
	evas_object_del(wd->o_icon);
	wd->o_icon = NULL;
     }
   if (icon)
     {
	wd->o_icon = icon;
	edje_object_part_swallow(wd->o_button, "e.swallow.icon", icon);
	evas_object_pass_events_set(icon, 1);
	evas_object_show(icon);
	e_widget_sub_object_add(obj, icon);
	wd->type |= E_WIDGET_BUTTON_ICON;
     }
   else
     wd->type = ~(wd->type & E_WIDGET_BUTTON_ICON);
   _e_wid_button_state_send(wd);
   edje_object_size_min_calc(wd->o_button, &mw, &mh);
   e_widget_size_min_set(obj, mw, mh);
}
コード例 #2
0
ファイル: e_widget_preview.c プロジェクト: Limsik/e17
EAPI int
e_widget_preview_thumb_set(Evas_Object *obj, const char *file, const char *key, int w, int h)
{
   E_Widget_Data *wd;

   wd = e_widget_data_get(obj);
   if (wd->img)
     {
        e_widget_sub_object_del(obj, wd->img);
        evas_object_del(wd->img);
     }

   wd->img = e_thumb_icon_add(evas_object_evas_get(obj));
   e_widget_sub_object_add(obj, wd->img);
   if (eina_str_has_extension(file, "edj"))
     {
        if (key)
          e_thumb_icon_file_set(wd->img, file, key);
        else
        /* FIXME: There is probably a quicker way of doing this. */
        if (edje_file_group_exists(file, "icon"))
          e_thumb_icon_file_set(wd->img, file, "icon");
        else if (edje_file_group_exists(file, "e/desktop/background"))
          e_thumb_icon_file_set(wd->img, file, "e/desktop/background");
        else if (edje_file_group_exists(file, "e/init/splash"))
          e_thumb_icon_file_set(wd->img, file, "e/init/splash");
     }
   else
     e_thumb_icon_file_set(wd->img, file, NULL);
   evas_object_smart_callback_add(wd->img, "e_thumb_gen", _e_wid_preview_thumb_gen, wd);
   e_thumb_icon_size_set(wd->img, w, h);
   e_thumb_icon_begin(wd->img);

   edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->img);
   evas_object_show(wd->img);

   e_widget_change(obj);

   return 1;
}
コード例 #3
0
ファイル: e_widget_table.c プロジェクト: Deepspeed/moksha
EAPI void
e_widget_table_unpack(Evas_Object *obj, Evas_Object *sobj)
{
   e_widget_sub_object_del(obj, sobj);
   e_table_unpack(sobj);
}