1 #include <Elementary.h>
3 #include "elm_widget_icon.h"
6 #define NON_EXISTING (void *)-1
7 static const char *icon_theme = NULL;
10 EAPI const char ELM_ICON_SMART_NAME[] = "elm_icon";
12 #ifdef HAVE_ELEMENTARY_ETHUMB
13 static Eina_List *_elm_icon_retry = NULL;
14 static int _icon_pending_request = 0;
17 static const char SIG_THUMB_DONE[] = "thumb,done";
18 static const char SIG_THUMB_ERROR[] = "thumb,error";
19 static const Evas_Smart_Cb_Description _smart_callbacks[] = {
21 {SIG_THUMB_ERROR, ""},
25 EVAS_SMART_SUBCLASS_NEW
26 (ELM_ICON_SMART_NAME, _elm_icon, Elm_Icon_Smart_Class,
27 Elm_Image_Smart_Class, elm_image_smart_class_get, _smart_callbacks);
29 /* FIXME: move this code to ecore */
32 _path_is_absolute(const char *path)
34 //TODO: Check if this works with all absolute paths in windows
35 return (isalpha(*path)) && (*(path + 1) == ':') &&
36 ((*(path + 2) == '\\') || (*(path + 2) == '/'));
41 _path_is_absolute(const char *path)
49 _icon_size_min_get(Evas_Object *icon)
53 elm_image_object_size_get(icon, &size, NULL);
55 return (size < 16) ? 16 : size;
58 #ifdef HAVE_ELEMENTARY_ETHUMB
60 _icon_thumb_stop(Elm_Icon_Smart_Data *sd,
63 if (sd->thumb.request)
65 ethumb_client_thumb_async_cancel(ethumbd, sd->thumb.request);
66 sd->thumb.request = NULL;
67 _icon_pending_request--;
72 _elm_icon_retry = eina_list_remove(_elm_icon_retry, sd);
73 sd->thumb.retry = EINA_FALSE;
78 _icon_thumb_display(Elm_Icon_Smart_Data *sd)
80 Eina_Bool ret = EINA_FALSE;
82 if (sd->thumb.format == ETHUMB_THUMB_EET)
85 const char **ext, *ptr;
86 static const char *extensions[] =
88 ".avi", ".mp4", ".ogv", ".mov", ".mpg", ".wmv", NULL
91 prefix_size = eina_stringshare_strlen(sd->thumb.file.path) - 4;
94 ptr = sd->thumb.file.path + prefix_size;
95 for (ext = extensions; *ext; ++ext)
96 if (!strcasecmp(ptr, *ext))
98 sd->is_video = EINA_TRUE;
103 ret = elm_image_file_set
104 (ELM_WIDGET_DATA(sd)->obj, sd->thumb.thumb.path,
105 sd->thumb.thumb.key);
107 sd->is_video = EINA_FALSE;
111 ret = elm_image_file_set
112 (ELM_WIDGET_DATA(sd)->obj, sd->thumb.thumb.path, sd->thumb.thumb.key);
115 evas_object_smart_callback_call
116 (ELM_WIDGET_DATA(sd)->obj, SIG_THUMB_DONE, NULL);
118 evas_object_smart_callback_call
119 (ELM_WIDGET_DATA(sd)->obj, SIG_THUMB_ERROR, NULL);
125 _icon_thumb_retry(Elm_Icon_Smart_Data *sd)
127 return _icon_thumb_display(sd);
131 _icon_thumb_cleanup(Ethumb_Client *ethumbd)
134 Elm_Icon_Smart_Data *sd;
136 EINA_LIST_FOREACH_SAFE(_elm_icon_retry, l, ll, sd)
137 if (_icon_thumb_retry(sd))
139 _elm_icon_retry = eina_list_remove_list(_elm_icon_retry, l);
140 sd->thumb.retry = EINA_FALSE;
143 if (_icon_pending_request == 0)
144 EINA_LIST_FREE (_elm_icon_retry, sd)
145 _icon_thumb_stop(sd, ethumbd);
149 _icon_thumb_finish(Elm_Icon_Smart_Data *sd,
150 Ethumb_Client *ethumbd)
152 const char *file = NULL, *group = NULL;
155 elm_image_file_get(ELM_WIDGET_DATA(sd)->obj, &file, &group);
156 file = eina_stringshare_ref(file);
157 group = eina_stringshare_ref(group);
159 ret = _icon_thumb_display(sd);
163 if (!sd->thumb.retry)
165 _elm_icon_retry = eina_list_append(_elm_icon_retry, sd);
166 sd->thumb.retry = EINA_TRUE;
169 /* Back to previous image */
170 elm_image_file_set(ELM_WIDGET_DATA(sd)->obj, file, group);
173 _icon_thumb_cleanup(ethumbd);
175 eina_stringshare_del(file);
176 eina_stringshare_del(group);
180 _icon_thumb_done(Ethumb_Client *client,
181 const char *thumb_path,
182 const char *thumb_key,
185 Elm_Icon_Smart_Data *sd = data;
187 if (EINA_UNLIKELY(!sd->thumb.request))
189 ERR("Something odd happened with a thumbnail request");
193 _icon_pending_request--;
194 sd->thumb.request = NULL;
196 eina_stringshare_replace(&sd->thumb.thumb.path, thumb_path);
197 eina_stringshare_replace(&sd->thumb.thumb.key, thumb_key);
198 sd->thumb.format = ethumb_client_format_get(client);
200 _icon_thumb_finish(sd, client);
204 _icon_thumb_error(Ethumb_Client *client,
207 Elm_Icon_Smart_Data *sd = data;
209 if (EINA_UNLIKELY(!sd->thumb.request))
211 ERR("Something odd happened with a thumbnail request");
215 _icon_pending_request--;
216 sd->thumb.request = NULL;
218 ERR("could not generate thumbnail for %s (key: %s)",
219 sd->thumb.file.path, sd->thumb.file.key);
221 evas_object_smart_callback_call(ELM_WIDGET_DATA(sd)->obj, SIG_THUMB_ERROR, NULL);
223 _icon_thumb_cleanup(client);
227 _icon_thumb_apply(Elm_Icon_Smart_Data *sd)
229 Ethumb_Client *ethumbd;
232 ethumbd = elm_thumb_ethumb_client_get();
234 _icon_thumb_stop(sd, ethumbd);
236 if (!sd->thumb.file.path) return;
238 _icon_pending_request++;
239 if (!ethumb_client_file_set
240 (ethumbd, sd->thumb.file.path, sd->thumb.file.key)) return;
242 min_size = _icon_size_min_get(ELM_WIDGET_DATA(sd)->obj);
243 ethumb_client_size_set(ethumbd, min_size, min_size);
245 sd->thumb.request = ethumb_client_thumb_async_get
246 (ethumbd, _icon_thumb_done, _icon_thumb_error, sd);
250 _icon_thumb_apply_cb(void *data,
254 Elm_Icon_Smart_Data *sd = data;
256 _icon_thumb_apply(sd);
258 return ECORE_CALLBACK_RENEW;
265 _icon_freedesktop_set(Evas_Object *obj,
269 _icon_freedesktop_set(Evas_Object * obj __UNUSED__,
270 const char *name __UNUSED__,
277 ELM_ICON_DATA_GET(obj, sd);
281 if (icon_theme == NON_EXISTING) return EINA_FALSE;
285 Efreet_Icon_Theme *theme;
286 /* TODO: Listen for EFREET_EVENT_ICON_CACHE_UPDATE */
287 theme = efreet_icon_theme_find(getenv("E_ICON_THEME"));
291 static const char *themes[] = {
292 "gnome", "Human", "oxygen", "hicolor", NULL
294 for (itr = themes; *itr; itr++)
296 theme = efreet_icon_theme_find(*itr);
303 icon_theme = NON_EXISTING;
307 icon_theme = eina_stringshare_add(theme->name.internal);
309 path = efreet_icon_path_find(icon_theme, name, size);
310 sd->freedesktop.use = !!path;
311 if (sd->freedesktop.use)
313 sd->freedesktop.requested_size = size;
314 elm_image_file_set(obj, path, NULL);
322 _elm_icon_smart_sizing_eval(Evas_Object *obj)
326 ELM_ICON_DATA_GET(obj, sd);
328 if (sd->in_eval) return;
331 elm_image_object_size_get(obj, &w, &h);
334 if (sd->freedesktop.use && sd->stdicon)
337 /* This icon has been set to a freedesktop icon, and the requested
338 appears to have a different size than the requested size, so try to
339 request another, higher resolution, icon.
340 FIXME: Find a better heuristic to determine if there should be
341 an icon with a different resolution. */
342 size = ((w / 16) + 1) * 16;
343 _icon_freedesktop_set(obj, sd->stdicon, size);
347 _elm_icon_parent_sc->sizing_eval(obj);
353 _edje_signals_free(Elm_Icon_Smart_Data *sd)
355 Edje_Signal_Data *esd;
357 EINA_LIST_FREE (sd->edje_signals, esd)
359 eina_stringshare_del(esd->emission);
360 eina_stringshare_del(esd->source);
366 _elm_icon_smart_file_set(Evas_Object *obj,
372 ELM_ICON_DATA_GET(obj, sd);
374 EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
376 _edje_signals_free(sd);
379 if (!sd->freedesktop.use)
381 if (sd->stdicon) eina_stringshare_del(sd->stdicon);
386 if (!sd->is_video) return _elm_icon_parent_sc->file_set(obj, file, key);
388 /* parent's edje file setting path replicated here (we got .eet
389 * extension, so bypassing it) */
390 if (ELM_IMAGE_DATA(sd)->prev_img)
391 evas_object_del(ELM_IMAGE_DATA(sd)->prev_img);
392 ELM_IMAGE_DATA(sd)->prev_img = NULL;
394 if (!ELM_IMAGE_DATA(sd)->edje)
396 pclip = evas_object_clip_get(ELM_IMAGE_DATA(sd)->img);
397 if (ELM_IMAGE_DATA(sd)->img) evas_object_del(ELM_IMAGE_DATA(sd)->img);
399 /* Edje object instead */
400 ELM_IMAGE_DATA(sd)->img = edje_object_add(evas_object_evas_get(obj));
401 evas_object_smart_member_add(ELM_IMAGE_DATA(sd)->img, obj);
402 if (ELM_IMAGE_DATA(sd)->show)
403 evas_object_show(ELM_IMAGE_DATA(sd)->img);
404 evas_object_clip_set(ELM_IMAGE_DATA(sd)->img, pclip);
407 ELM_IMAGE_DATA(sd)->edje = EINA_TRUE;
408 if (!edje_object_file_set(ELM_IMAGE_DATA(sd)->img, file, key))
410 ERR("failed to set edje file '%s', group '%s': %s", file, key,
412 (edje_object_load_error_get(ELM_IMAGE_DATA(sd)->img)));
416 evas_object_move(ELM_IMAGE_DATA(sd)->img, ELM_IMAGE_DATA(sd)->img_x,
417 ELM_IMAGE_DATA(sd)->img_y);
418 evas_object_resize(ELM_IMAGE_DATA(sd)->img, ELM_IMAGE_DATA(sd)->img_w,
419 ELM_IMAGE_DATA(sd)->img_h);
425 _elm_icon_smart_memfile_set(Evas_Object *obj,
431 ELM_ICON_DATA_GET(obj, sd);
435 EINA_SAFETY_ON_NULL_RETURN_VAL(img, EINA_FALSE);
436 EINA_SAFETY_ON_TRUE_RETURN_VAL(!size, EINA_FALSE);
437 eina_stringshare_del(sd->stdicon);
440 _edje_signals_free(sd);
442 ret = _elm_icon_parent_sc->memfile_set(obj, img, size, format, key);
448 _elm_icon_smart_theme(Evas_Object *obj)
450 ELM_ICON_DATA_GET(obj, sd);
453 _elm_theme_object_icon_set(obj, sd->stdicon, elm_widget_style_get(obj));
455 if (!ELM_WIDGET_CLASS(_elm_icon_parent_sc)->theme(obj))
462 _icon_standard_set(Evas_Object *obj,
465 ELM_ICON_DATA_GET(obj, sd);
467 if (_elm_theme_object_icon_set(obj, name, "default"))
470 /* TODO: elm_unneed_efreet() */
471 sd->freedesktop.use = EINA_FALSE;
481 _icon_file_set(Elm_Icon_Smart_Data *sd,
485 _icon_file_set(Elm_Icon_Smart_Data * sd __UNUSED__,
490 if (elm_image_file_set(obj, path, NULL))
493 /* TODO: elm_unneed_efreet() */
494 sd->freedesktop.use = EINA_FALSE;
502 _elm_icon_standard_set(Evas_Object *obj,
509 ELM_ICON_DATA_GET(obj, sd);
511 /* try locating the icon using the specified lookup order */
512 switch (sd->lookup_order)
514 case ELM_ICON_LOOKUP_FDO:
515 ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
516 if (ret && fdo) *fdo = EINA_TRUE;
519 case ELM_ICON_LOOKUP_THEME:
520 ret = _icon_standard_set(obj, name);
523 case ELM_ICON_LOOKUP_THEME_FDO:
524 ret = _icon_standard_set(obj, name);
527 ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
528 if (ret && fdo) *fdo = EINA_TRUE;
532 case ELM_ICON_LOOKUP_FDO_THEME:
534 ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
536 ret = _icon_standard_set(obj, name);
544 eina_stringshare_replace(&sd->stdicon, name);
545 _elm_icon_smart_sizing_eval(obj);
549 if (_path_is_absolute(name))
550 return _icon_file_set(sd, obj, name);
552 /* if that fails, see if icon name is in the format size/name. if so,
553 try locating a fallback without the size specification */
554 if (!(tmp = strchr(name, '/'))) return EINA_FALSE;
556 if (*tmp) return elm_icon_standard_set(obj, tmp);
562 _elm_icon_standard_resize_cb(void *data,
565 void *event_info __UNUSED__)
567 Elm_Icon_Smart_Data *sd = data;
568 const char *refup = eina_stringshare_ref(sd->stdicon);
569 Eina_Bool fdo = EINA_FALSE;
571 if (!_elm_icon_standard_set(obj, sd->stdicon, &fdo) || (!fdo))
572 evas_object_event_callback_del_full
573 (obj, EVAS_CALLBACK_RESIZE, _elm_icon_standard_resize_cb, sd);
574 eina_stringshare_del(refup);
577 #ifdef HAVE_ELEMENTARY_ETHUMB
579 _elm_icon_thumb_resize_cb(void *data,
582 void *event_info __UNUSED__)
584 Elm_Icon_Smart_Data *sd = data;
586 if (sd->thumb.file.path)
587 elm_icon_thumb_set(obj, sd->thumb.file.path, sd->thumb.file.key);
593 _elm_icon_smart_add(Evas_Object *obj)
595 EVAS_SMART_DATA_ALLOC(obj, Elm_Icon_Smart_Data);
597 ELM_WIDGET_CLASS(_elm_icon_parent_sc)->base.add(obj);
599 priv->lookup_order = ELM_ICON_LOOKUP_THEME_FDO;
601 #ifdef HAVE_ELEMENTARY_ETHUMB
602 priv->thumb.request = NULL;
607 _elm_icon_smart_del(Evas_Object *obj)
609 #ifdef HAVE_ELEMENTARY_ETHUMB
610 Ethumb_Client *ethumbd;
613 ELM_ICON_DATA_GET(obj, sd);
615 if (sd->stdicon) eina_stringshare_del(sd->stdicon);
617 #ifdef HAVE_ELEMENTARY_ETHUMB
618 ethumbd = elm_thumb_ethumb_client_get();
619 _icon_thumb_stop(sd, ethumbd);
621 eina_stringshare_del(sd->thumb.file.path);
622 eina_stringshare_del(sd->thumb.file.key);
623 eina_stringshare_del(sd->thumb.thumb.path);
624 eina_stringshare_del(sd->thumb.thumb.key);
627 ecore_event_handler_del(sd->thumb.eeh);
630 _edje_signals_free(sd);
632 ELM_WIDGET_CLASS(_elm_icon_parent_sc)->base.del(obj);
635 /* WARNING: to be deprecated */
637 _elm_icon_signal_emit(Evas_Object *obj,
638 const char *emission,
641 ELM_ICON_DATA_GET(obj, sd);
643 if (!ELM_IMAGE_DATA(sd)->edje) return;
645 edje_object_signal_emit(ELM_IMAGE_DATA(sd)->img, emission, source);
649 _edje_signal_callback(void *data,
650 Evas_Object *obj __UNUSED__,
651 const char *emission,
654 Edje_Signal_Data *esd = data;
656 esd->func(esd->data, esd->obj, emission, source);
659 /* WARNING: to be deprecated */
661 _elm_icon_signal_callback_add(Evas_Object *obj,
662 const char *emission,
664 Edje_Signal_Cb func_cb,
667 Edje_Signal_Data *esd;
669 ELM_ICON_DATA_GET(obj, sd);
671 if (!ELM_IMAGE_DATA(sd)->edje) return;
673 esd = ELM_NEW(Edje_Signal_Data);
678 esd->emission = eina_stringshare_add(emission);
679 esd->source = eina_stringshare_add(source);
682 eina_list_append(sd->edje_signals, esd);
684 edje_object_signal_callback_add
685 (ELM_IMAGE_DATA(sd)->img, emission, source, _edje_signal_callback, esd);
688 /* WARNING: to be deprecated */
690 _elm_icon_signal_callback_del(Evas_Object *obj,
691 const char *emission,
693 Edje_Signal_Cb func_cb)
695 Edje_Signal_Data *esd = NULL;
699 ELM_ICON_DATA_GET(obj, sd);
701 if (!ELM_IMAGE_DATA(sd)->edje) return NULL;
703 EINA_LIST_FOREACH(sd->edje_signals, l, esd)
705 if ((esd->func == func_cb) && (!strcmp(esd->emission, emission)) &&
706 (!strcmp(esd->source, source)))
708 sd->edje_signals = eina_list_remove_list(sd->edje_signals, l);
709 eina_stringshare_del(esd->emission);
710 eina_stringshare_del(esd->source);
714 edje_object_signal_callback_del_full
715 (ELM_IMAGE_DATA(sd)->img, emission, source,
716 _edje_signal_callback, esd);
718 return data; /* stop at 1st match */
726 _elm_icon_smart_set_user(Elm_Icon_Smart_Class *sc)
728 ELM_WIDGET_CLASS(sc)->base.add = _elm_icon_smart_add;
729 ELM_WIDGET_CLASS(sc)->base.del = _elm_icon_smart_del;
731 ELM_WIDGET_CLASS(sc)->theme = _elm_icon_smart_theme;
733 ELM_IMAGE_CLASS(sc)->file_set = _elm_icon_smart_file_set;
734 ELM_IMAGE_CLASS(sc)->memfile_set = _elm_icon_smart_memfile_set;
735 ELM_IMAGE_CLASS(sc)->sizing_eval = _elm_icon_smart_sizing_eval;
738 EAPI const Elm_Icon_Smart_Class *
739 elm_icon_smart_class_get(void)
741 static Elm_Icon_Smart_Class _sc =
742 ELM_ICON_SMART_CLASS_INIT_NAME_VERSION(ELM_ICON_SMART_NAME);
743 static const Elm_Icon_Smart_Class *class = NULL;
744 Evas_Smart_Class *esc = (Evas_Smart_Class *)&_sc;
746 if (class) return class;
748 _elm_icon_smart_set(&_sc);
749 esc->callbacks = _smart_callbacks;
756 elm_icon_add(Evas_Object *parent)
760 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
762 obj = elm_widget_add(_elm_icon_smart_class_new(), parent);
763 if (!obj) return NULL;
765 if (!elm_widget_sub_object_add(parent, obj))
766 ERR("could not add %p as sub object of %p", obj, parent);
772 elm_icon_memfile_set(Evas_Object *obj,
778 ELM_ICON_CHECK(obj) EINA_FALSE;
780 return elm_image_memfile_set(obj, img, size, format, key);
784 elm_icon_file_set(Evas_Object *obj,
788 ELM_ICON_CHECK(obj) EINA_FALSE;
790 return elm_image_file_set(obj, file, group);
794 elm_icon_file_get(const Evas_Object *obj,
800 elm_image_file_get(obj, file, group);
804 elm_icon_thumb_set(Evas_Object *obj,
810 #ifdef HAVE_ELEMENTARY_ETHUMB
811 ELM_ICON_DATA_GET(obj, sd);
813 evas_object_event_callback_del_full
814 (obj, EVAS_CALLBACK_RESIZE, _elm_icon_standard_resize_cb, sd);
815 evas_object_event_callback_del_full
816 (obj, EVAS_CALLBACK_RESIZE, _elm_icon_thumb_resize_cb, sd);
818 evas_object_event_callback_add
819 (obj, EVAS_CALLBACK_RESIZE, _elm_icon_thumb_resize_cb, sd);
821 eina_stringshare_replace(&sd->thumb.file.path, file);
822 eina_stringshare_replace(&sd->thumb.file.key, group);
824 if (elm_thumb_ethumb_client_connected_get())
826 _icon_thumb_apply(sd);
832 sd->thumb.eeh = ecore_event_handler_add
833 (ELM_ECORE_EVENT_ETHUMB_CONNECT, _icon_thumb_apply_cb, sd);
843 elm_icon_animated_available_get(const Evas_Object *obj)
845 ELM_ICON_CHECK(obj) EINA_FALSE;
847 return elm_image_animated_available_get(obj);
851 elm_icon_animated_set(Evas_Object *obj,
856 return elm_image_animated_set(obj, anim);
860 elm_icon_animated_get(const Evas_Object *obj)
862 ELM_ICON_CHECK(obj) EINA_FALSE;
864 return elm_image_animated_get(obj);
868 elm_icon_animated_play_set(Evas_Object *obj,
873 elm_image_animated_play_set(obj, play);
877 elm_icon_animated_play_get(const Evas_Object *obj)
879 ELM_ICON_CHECK(obj) EINA_FALSE;
881 return elm_image_animated_play_get(obj);
885 elm_icon_standard_set(Evas_Object *obj,
888 ELM_ICON_CHECK(obj) EINA_FALSE;
889 ELM_ICON_DATA_GET(obj, sd);
891 Eina_Bool fdo = EINA_FALSE;
894 if (!name) return EINA_FALSE;
896 evas_object_event_callback_del_full
897 (obj, EVAS_CALLBACK_RESIZE, _elm_icon_standard_resize_cb, sd);
899 ret = _elm_icon_standard_set(obj, name, &fdo);
902 evas_object_event_callback_add
903 (obj, EVAS_CALLBACK_RESIZE, _elm_icon_standard_resize_cb, sd);
909 elm_icon_standard_get(const Evas_Object *obj)
911 ELM_ICON_CHECK(obj) NULL;
912 ELM_ICON_DATA_GET(obj, sd);
918 elm_icon_order_lookup_set(Evas_Object *obj,
919 Elm_Icon_Lookup_Order order)
922 ELM_ICON_DATA_GET(obj, sd);
924 sd->lookup_order = order;
927 EAPI Elm_Icon_Lookup_Order
928 elm_icon_order_lookup_get(const Evas_Object *obj)
930 ELM_ICON_CHECK(obj) ELM_ICON_LOOKUP_THEME_FDO;
931 ELM_ICON_DATA_GET(obj, sd);
933 return sd->lookup_order;
937 elm_icon_smooth_set(Evas_Object *obj,
942 elm_image_smooth_set(obj, smooth);
946 elm_icon_smooth_get(const Evas_Object *obj)
948 ELM_ICON_CHECK(obj) EINA_FALSE;
950 return elm_image_smooth_get(obj);
954 elm_icon_no_scale_set(Evas_Object *obj,
959 elm_image_no_scale_set(obj, no_scale);
963 elm_icon_no_scale_get(const Evas_Object *obj)
965 ELM_ICON_CHECK(obj) EINA_FALSE;
967 return elm_image_no_scale_get(obj);
971 elm_icon_resizable_set(Evas_Object *obj,
977 elm_image_resizable_set(obj, size_up, size_down);
981 elm_icon_resizable_get(const Evas_Object *obj,
983 Eina_Bool *size_down)
987 elm_image_resizable_get(obj, size_up, size_down);
991 elm_icon_fill_outside_set(Evas_Object *obj,
992 Eina_Bool fill_outside)
996 elm_image_fill_outside_set(obj, fill_outside);
1000 elm_icon_fill_outside_get(const Evas_Object *obj)
1002 ELM_ICON_CHECK(obj) EINA_FALSE;
1004 return elm_image_fill_outside_get(obj);
1008 elm_icon_size_get(const Evas_Object *obj,
1012 ELM_ICON_CHECK(obj);
1014 elm_image_object_size_get(obj, w, h);
1018 elm_icon_prescale_set(Evas_Object *obj,
1021 ELM_ICON_CHECK(obj);
1023 elm_image_prescale_set(obj, size);
1027 elm_icon_prescale_get(const Evas_Object *obj)
1029 ELM_ICON_CHECK(obj) 0;
1031 return elm_image_prescale_get(obj);
1035 elm_icon_object_get(Evas_Object *obj)
1037 ELM_ICON_CHECK(obj) 0;
1039 return elm_image_object_get(obj);
1043 elm_icon_preload_disabled_set(Evas_Object *obj,
1046 ELM_ICON_CHECK(obj);
1048 elm_image_preload_disabled_set(obj, disabled);
1052 elm_icon_aspect_fixed_set(Evas_Object *obj,
1055 ELM_ICON_CHECK(obj);
1057 elm_image_aspect_fixed_set(obj, fixed);
1061 elm_icon_aspect_fixed_get(const Evas_Object *obj)
1063 ELM_ICON_CHECK(obj) EINA_FALSE;
1065 return elm_image_aspect_fixed_get(obj);