summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2016-04-11 21:31:42 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2016-04-11 21:31:42 +0830
commit02a37da0ed835c74e6b3cc6146280eb82e6a18f2 (patch)
tree246906fac07aa456a14e3541e73a662ee5a44b5f
parent626decac682187ed7367c282d63c38bc6cf8ec07 (diff)
Elm_thumb: move all api from eo to legacy
elm_thumb,elm_icon,elm_photo will be removed.
-rw-r--r--src/lib/elementary/elm_thumb.c268
-rw-r--r--src/lib/elementary/elm_thumb.eo195
-rw-r--r--src/lib/elementary/elm_thumb_legacy.h247
3 files changed, 401 insertions, 309 deletions
diff --git a/src/lib/elementary/elm_thumb.c b/src/lib/elementary/elm_thumb.c
index 65558b419f..6ca3e30f4b 100644
--- a/src/lib/elementary/elm_thumb.c
+++ b/src/lib/elementary/elm_thumb.c
@@ -603,16 +603,6 @@ _elm_thumb_eo_base_constructor(Eo *obj, Elm_Thumb_Data *sd)
603 return obj; 603 return obj;
604} 604}
605 605
606EOLIAN static void
607_elm_thumb_reload(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd)
608{
609 eina_stringshare_replace(&(sd->thumb.file), NULL);
610 eina_stringshare_replace(&(sd->thumb.key), NULL);
611
612 if (evas_object_visible_get(obj))
613 _thumb_show(sd);
614}
615
616EOLIAN static Eina_Bool 606EOLIAN static Eina_Bool
617_elm_thumb_efl_file_file_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, const char *file, const char *key) 607_elm_thumb_efl_file_file_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, const char *file, const char *key)
618{ 608{
@@ -663,124 +653,222 @@ _elm_thumb_efl_file_file_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, const char
663 *key = sd->key; 653 *key = sd->key;
664} 654}
665 655
656EAPI void *
657elm_thumb_ethumb_client_get(void)
658{
659 return _elm_ethumb_client;
660}
661
662EAPI Eina_Bool
663elm_thumb_ethumb_client_connected_get(void)
664{
665 return _elm_ethumb_connected;
666}
667
666EOLIAN static void 668EOLIAN static void
667_elm_thumb_path_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, const char **file, const char **key) 669_elm_thumb_evas_draggable_interface_drag_target_set(Eo *obj, Elm_Thumb_Data *sd, Eina_Bool edit)
668{ 670{
669 if (file) 671 edit = !!edit;
670 *file = sd->thumb.file; 672 if (sd->edit == edit) return;
671 if (key) 673
672 *key = sd->thumb.key; 674 sd->edit = edit;
675 if (sd->edit)
676 elm_drop_target_add(obj, ELM_SEL_FORMAT_IMAGE,
677 NULL, NULL,
678 NULL, NULL,
679 NULL, NULL,
680 _elm_thumb_dnd_cb, obj);
681 else
682 elm_drop_target_del(obj, ELM_SEL_FORMAT_IMAGE,
683 NULL, NULL,
684 NULL, NULL,
685 NULL, NULL,
686 _elm_thumb_dnd_cb, obj);
687
688 return;
689}
690
691EOLIAN static Eina_Bool
692_elm_thumb_evas_draggable_interface_drag_target_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd)
693{
694 return sd->edit;
673} 695}
674 696
675EOLIAN static void 697EOLIAN static void
676_elm_thumb_aspect_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Ethumb_Thumb_Aspect aspect) 698_elm_thumb_class_constructor(Eo_Class *klass)
699{
700 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
701}
702
703EAPI void
704elm_thumb_file_set(Eo *obj, const char *file, const char *key)
705{
706 efl_file_set((Eo *) obj, file, key);
707}
708
709EAPI void
710elm_thumb_file_get(const Eo *obj, const char **file, const char **key)
711{
712 efl_file_get((Eo *) obj, file, key);
713}
714
715/* Legacy deprecated functions */
716EAPI Eina_Bool
717elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit)
718{
719 evas_draggable_interface_drag_target_set(obj, edit);
720 return EINA_TRUE;
721}
722
723EAPI Eina_Bool
724elm_thumb_editable_get(const Evas_Object *obj)
725{
726 return evas_draggable_interface_drag_target_get(obj);
727}
728
729EAPI void
730elm_thumb_aspect_set(Evas_Object *obj, Ethumb_Thumb_Aspect aspect)
677{ 731{
732 ELM_THUMB_CHECK(obj);
733 ELM_THUMB_DATA_GET(obj, sd);
678 sd->thumb.aspect = aspect; 734 sd->thumb.aspect = aspect;
679} 735}
680 736
681EOLIAN static Ethumb_Thumb_Aspect 737EAPI Ethumb_Thumb_Aspect
682_elm_thumb_aspect_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) 738elm_thumb_aspect_get(const Evas_Object *obj)
683{ 739{
740 ELM_THUMB_CHECK(obj) ETHUMB_THUMB_KEEP_ASPECT;
741 ELM_THUMB_DATA_GET(obj, sd);
684 return sd->thumb.aspect; 742 return sd->thumb.aspect;
685} 743}
686 744
687EOLIAN static void 745EAPI void
688_elm_thumb_fdo_size_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Ethumb_Thumb_FDO_Size size) 746elm_thumb_fdo_size_set(Evas_Object *obj, Ethumb_Thumb_FDO_Size size)
689{ 747{
748 ELM_THUMB_CHECK(obj);
749 ELM_THUMB_DATA_GET(obj, sd);
690 sd->thumb.size = size; 750 sd->thumb.size = size;
691} 751}
692 752
693EOLIAN static Ethumb_Thumb_FDO_Size 753EAPI Ethumb_Thumb_FDO_Size
694_elm_thumb_fdo_size_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) 754elm_thumb_fdo_size_get(const Evas_Object *obj)
695{ 755{
756 ELM_THUMB_CHECK(obj) ETHUMB_THUMB_NORMAL;
757 ELM_THUMB_DATA_GET(obj, sd);
696 return sd->thumb.size; 758 return sd->thumb.size;
697} 759}
698 760
699EOLIAN static void 761EAPI void
700_elm_thumb_format_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Ethumb_Thumb_Format format) 762elm_thumb_format_set(Evas_Object *obj, Ethumb_Thumb_Format format)
701{ 763{
764 ELM_THUMB_CHECK(obj);
765 ELM_THUMB_DATA_GET(obj, sd);
702 sd->thumb.format = format; 766 sd->thumb.format = format;
703} 767}
704 768
705EOLIAN static Ethumb_Thumb_Format 769EAPI Ethumb_Thumb_Format
706_elm_thumb_format_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) 770elm_thumb_format_get(const Evas_Object *obj)
707{ 771{
772 ELM_THUMB_CHECK(obj) ETHUMB_THUMB_FDO;
773 ELM_THUMB_DATA_GET(obj, sd);
708 return sd->thumb.format; 774 return sd->thumb.format;
709} 775}
710 776
711EOLIAN static void 777EAPI void
712_elm_thumb_orientation_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Ethumb_Thumb_Orientation orient) 778elm_thumb_orientation_set(Evas_Object *obj, Ethumb_Thumb_Orientation orient)
713{ 779{
780 ELM_THUMB_CHECK(obj);
781 ELM_THUMB_DATA_GET(obj, sd);
714 sd->thumb.orient = orient; 782 sd->thumb.orient = orient;
715} 783}
716 784
717EOLIAN static Ethumb_Thumb_Orientation 785EAPI Ethumb_Thumb_Orientation
718_elm_thumb_orientation_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) 786elm_thumb_orientation_get(const Evas_Object *obj)
719{ 787{
788 ELM_THUMB_CHECK(obj) ETHUMB_THUMB_ORIENT_NONE;
789 ELM_THUMB_DATA_GET(obj, sd);
720 return sd->thumb.orient; 790 return sd->thumb.orient;
721} 791}
722 792
723EOLIAN static void 793EAPI void
724_elm_thumb_size_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int tw, int th) 794elm_thumb_size_set(Evas_Object *obj, int tw, int th)
725{ 795{
796 ELM_THUMB_CHECK(obj);
797 ELM_THUMB_DATA_GET(obj, sd);
726 sd->thumb.tw = tw; 798 sd->thumb.tw = tw;
727 sd->thumb.th = th; 799 sd->thumb.th = th;
728} 800}
729 801
730EOLIAN static void 802EAPI void
731_elm_thumb_size_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int *tw, int *th) 803elm_thumb_size_get(const Evas_Object *obj, int *tw, int *th)
732{ 804{
805 ELM_THUMB_CHECK(obj);
806 ELM_THUMB_DATA_GET(obj, sd);
733 if (tw) 807 if (tw)
734 *tw = sd->thumb.tw; 808 *tw = sd->thumb.tw;
735 if (th) 809 if (th)
736 *th = sd->thumb.th; 810 *th = sd->thumb.th;
737} 811}
738 812
739EOLIAN static void 813EAPI void
740_elm_thumb_crop_align_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, double cropx, double cropy) 814elm_thumb_crop_align_set(Evas_Object *obj, double cropx, double cropy)
741{ 815{
816 ELM_THUMB_CHECK(obj);
817 ELM_THUMB_DATA_GET(obj, sd);
742 sd->thumb.cropx = cropx; 818 sd->thumb.cropx = cropx;
743 sd->thumb.cropy = cropy; 819 sd->thumb.cropy = cropy;
744} 820}
745 821
746EOLIAN static void 822EAPI void
747_elm_thumb_crop_align_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, double *cropx, double *cropy) 823elm_thumb_crop_align_get(const Evas_Object *obj, double *cropx, double *cropy)
748{ 824{
825 ELM_THUMB_CHECK(obj);
826 ELM_THUMB_DATA_GET(obj, sd);
749 if (cropx) 827 if (cropx)
750 *cropx = sd->thumb.cropx; 828 *cropx = sd->thumb.cropx;
751 if (cropy) 829 if (cropy)
752 *cropy = sd->thumb.cropy; 830 *cropy = sd->thumb.cropy;
753} 831}
754 832
755EOLIAN static void 833EAPI void
756_elm_thumb_compress_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int compress) 834elm_thumb_compress_set(Evas_Object *obj, int compress)
757{ 835{
836 ELM_THUMB_CHECK(obj);
837 ELM_THUMB_DATA_GET(obj, sd);
758 sd->thumb.compress = compress; 838 sd->thumb.compress = compress;
759} 839}
760 840
761EOLIAN static void 841EAPI void
762_elm_thumb_compress_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int *compress) 842elm_thumb_compress_get(const Evas_Object *obj, int *compress)
763{ 843{
844 ELM_THUMB_CHECK(obj);
845 ELM_THUMB_DATA_GET(obj, sd);
764 if (compress) 846 if (compress)
765 *compress = sd->thumb.compress; 847 *compress = sd->thumb.compress;
766} 848}
767 849
768EOLIAN static void 850EAPI void
769_elm_thumb_quality_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int quality) 851elm_thumb_quality_set(Evas_Object *obj, int quality)
770{ 852{
853 ELM_THUMB_CHECK(obj);
854 ELM_THUMB_DATA_GET(obj, sd);
771 sd->thumb.quality = quality; 855 sd->thumb.quality = quality;
772} 856}
773 857
774EOLIAN static void 858EAPI void
775_elm_thumb_quality_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, int *quality) 859elm_thumb_quality_get(const Evas_Object *obj, int *quality)
776{ 860{
861 ELM_THUMB_CHECK(obj);
862 ELM_THUMB_DATA_GET(obj, sd);
777 if (quality) 863 if (quality)
778 *quality = sd->thumb.quality; 864 *quality = sd->thumb.quality;
779} 865}
780 866
781EOLIAN static void 867EAPI void
782_elm_thumb_animate_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Elm_Thumb_Animation_Setting setting) 868elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting setting)
783{ 869{
870 ELM_THUMB_CHECK(obj);
871 ELM_THUMB_DATA_GET(obj, sd);
784 EINA_SAFETY_ON_TRUE_RETURN(setting >= ELM_THUMB_ANIMATION_LAST); 872 EINA_SAFETY_ON_TRUE_RETURN(setting >= ELM_THUMB_ANIMATION_LAST);
785 873
786 sd->anim_setting = setting; 874 sd->anim_setting = setting;
@@ -796,83 +884,35 @@ _elm_thumb_animate_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, Elm_Thumb_Animat
796 } 884 }
797} 885}
798 886
799EOLIAN static Elm_Thumb_Animation_Setting 887EAPI Elm_Thumb_Animation_Setting
800_elm_thumb_animate_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd) 888elm_thumb_animate_get(const Evas_Object *obj)
801{ 889{
890 ELM_THUMB_CHECK(obj) 0;
891 ELM_THUMB_DATA_GET(obj, sd);
802 return sd->anim_setting; 892 return sd->anim_setting;
803} 893}
804 894
805EAPI void *
806elm_thumb_ethumb_client_get(void)
807{
808 return _elm_ethumb_client;
809}
810
811EAPI Eina_Bool
812elm_thumb_ethumb_client_connected_get(void)
813{
814 return _elm_ethumb_connected;
815}
816
817EOLIAN static void
818_elm_thumb_evas_draggable_interface_drag_target_set(Eo *obj, Elm_Thumb_Data *sd, Eina_Bool edit)
819{
820 edit = !!edit;
821 if (sd->edit == edit) return;
822
823 sd->edit = edit;
824 if (sd->edit)
825 elm_drop_target_add(obj, ELM_SEL_FORMAT_IMAGE,
826 NULL, NULL,
827 NULL, NULL,
828 NULL, NULL,
829 _elm_thumb_dnd_cb, obj);
830 else
831 elm_drop_target_del(obj, ELM_SEL_FORMAT_IMAGE,
832 NULL, NULL,
833 NULL, NULL,
834 NULL, NULL,
835 _elm_thumb_dnd_cb, obj);
836
837 return;
838}
839
840EOLIAN static Eina_Bool
841_elm_thumb_evas_draggable_interface_drag_target_get(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd)
842{
843 return sd->edit;
844}
845
846EOLIAN static void
847_elm_thumb_class_constructor(Eo_Class *klass)
848{
849 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
850}
851
852EAPI void 895EAPI void
853elm_thumb_file_set(Eo *obj, const char *file, const char *key) 896elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key)
854{ 897{
855 efl_file_set((Eo *) obj, file, key); 898 ELM_THUMB_CHECK(obj);
899 ELM_THUMB_DATA_GET(obj, sd);
900 if (file)
901 *file = sd->thumb.file;
902 if (key)
903 *key = sd->thumb.key;
856} 904}
857 905
858EAPI void 906EAPI void
859elm_thumb_file_get(const Eo *obj, const char **file, const char **key) 907elm_thumb_reload(Evas_Object *obj)
860{
861 efl_file_get((Eo *) obj, file, key);
862}
863
864/* Legacy deprecated functions */
865EAPI Eina_Bool
866elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit)
867{ 908{
868 evas_draggable_interface_drag_target_set(obj, edit); 909 ELM_THUMB_CHECK(obj);
869 return EINA_TRUE; 910 ELM_THUMB_DATA_GET(obj, sd);
870} 911 eina_stringshare_replace(&(sd->thumb.file), NULL);
912 eina_stringshare_replace(&(sd->thumb.key), NULL);
871 913
872EAPI Eina_Bool 914 if (evas_object_visible_get(obj))
873elm_thumb_editable_get(const Evas_Object *obj) 915 _thumb_show(sd);
874{
875 return evas_draggable_interface_drag_target_get(obj);
876} 916}
877 917
878#include "elm_thumb.eo.c" 918#include "elm_thumb.eo.c"
diff --git a/src/lib/elementary/elm_thumb.eo b/src/lib/elementary/elm_thumb.eo
index 9c1479bfbc..6e9d0e254b 100644
--- a/src/lib/elementary/elm_thumb.eo
+++ b/src/lib/elementary/elm_thumb.eo
@@ -1,203 +1,8 @@
1enum Elm.Thumb.Animation_Setting
2{
3 [[Used to set if a video thumbnail is animating or not]]
4 legacy: elm_thumb_animation;
5 start = 0, [[Play animation once]]
6 loop, [[Keep playing animation until stop is requested]]
7 stop, [[Stop playing the animation]]
8 last
9}
10 1
11class Elm.Thumb (Elm.Layout, Efl.File, Evas.Clickable_Interface, 2class Elm.Thumb (Elm.Layout, Efl.File, Evas.Clickable_Interface,
12 Evas.Draggable_Interface) 3 Evas.Draggable_Interface)
13{ 4{
14 eo_prefix: elm_obj_thumb; 5 eo_prefix: elm_obj_thumb;
15 methods {
16 @property compress {
17 set {
18 [[Set the compression for the thumb object.
19
20 @since 1.8
21 ]]
22 }
23 get {
24 [[Get the compression of the thumb object.
25
26 @since 1.8
27 ]]
28 return: void; [[Force the return type to be sure the argument
29 doesn't become the return]]
30 }
31 values {
32 compress: int; [[The compression of the thumb.]]
33 }
34 }
35 @property format {
36 set {
37 [[Set the format for the thumb object.
38
39 @since 1.8
40 ]]
41 }
42 get {
43 [[Get the format of the thumb object.
44
45 @since 1.8
46 ]]
47 }
48 values {
49 format: Ethumb_Thumb_Format; [[The format setting.]]
50 }
51 }
52 @property animate {
53 set {
54 [[Set the animation state for the thumb object.
55
56 If its content is an animated video, you may start/stop the
57 animation or tell it o play continuously and looping.
58 ]]
59 }
60 get {
61 [[Get the animation state for the thumb object.]]
62 }
63 values {
64 setting: Elm.Thumb.Animation_Setting; [[The animation setting or
65 #ELM_THUMB_ANIMATION_LAST]]
66 }
67 }
68 @property fdo_size {
69 set {
70 [[Set the FDO size for the thumb object.
71
72 @since 1.8
73 ]]
74 }
75 get {
76 [[Get the fdo size of the thumb object.
77
78 @since 1.8
79 ]]
80 }
81 values {
82 size: Ethumb_Thumb_FDO_Size; [[The FDO size setting.]]
83 }
84 }
85 @property orientation {
86 set {
87 [[Set the orientation for the thumb object.
88
89 @since 1.8
90 ]]
91 }
92 get {
93 [[Get the orientation of the thumb object.
94
95 @since 1.8
96 ]]
97 }
98 values {
99 orient: Ethumb_Thumb_Orientation; [[The orientation setting.]]
100 }
101 }
102 @property aspect {
103 set {
104 [[Set the aspect for the thumb object.
105
106 @since 1.8
107 ]]
108 }
109 get {
110 [[Get the aspect of the thumb object.
111
112 @since 1.8
113 ]]
114 }
115 values {
116 aspect: Ethumb_Thumb_Aspect; [[The aspect setting.]]
117 }
118 }
119 @property quality {
120 set {
121 [[Set the quality for the thumb object.
122
123 @since 1.8
124 ]]
125 }
126 get {
127 [[Get the quality of the thumb object.
128
129 @since 1.8
130 ]]
131 return: void;
132 }
133 values {
134 quality: int; [[The quality of the thumb.]]
135 }
136 }
137 @property size {
138 set {
139 [[Set the size for the thumb object.
140
141 @since 1.8
142 ]]
143 }
144 get {
145 [[Get the size of the thumb object.
146
147 @since 1.8
148 ]]
149 }
150 values {
151 tw: int; [[The width of the thumb.]]
152 th: int; [[The height of the thumb.]]
153 }
154 }
155 @property crop_align {
156 set {
157 [[Set the crop alignment for the thumb object.
158
159 @since 1.8
160 ]]
161 }
162 get {
163 [[Get the crop alignment of the thumb object.
164
165 @since 1.8
166 ]]
167 }
168 values {
169 cropx: double; [[The x coordinate of the crop.]]
170 cropy: double; [[The y coordinate of the crop.]]
171 }
172 }
173 @property path {
174 get {
175 [[Get the path and key to the image or video thumbnail generated
176 by ethumb.
177
178 One just needs to make sure that the thumbnail was generated
179 before getting its path; otherwise, the path will be $null.
180 One way to do that is by asking for the path when/after the
181 "generate,stop" smart callback is called.
182 ]]
183 }
184 values {
185 file: const(char)* @optional; [[Pointer to thumb path.]]
186 key: const(char)* @optional; [[Pointer to thumb key.]]
187 }
188 }
189 reload {
190 [[Reload thumbnail if it was generated before.
191
192 This is useful if the ethumb client configuration changed, like its
193 size, aspect or any other property one set in the handle returned
194 by elm_thumb_ethumb_client_get().
195
196 If the options didn't change, the thumbnail won't be generated
197 again, but the old one will still be used.
198 ]]
199 }
200 }
201 implements { 6 implements {
202 class.constructor; 7 class.constructor;
203 Eo.Base.constructor; 8 Eo.Base.constructor;
diff --git a/src/lib/elementary/elm_thumb_legacy.h b/src/lib/elementary/elm_thumb_legacy.h
index 28b849e419..b37e395658 100644
--- a/src/lib/elementary/elm_thumb_legacy.h
+++ b/src/lib/elementary/elm_thumb_legacy.h
@@ -1,3 +1,16 @@
1/** Used to set if a video thumbnail is animating or not
2 *
3 * @ingroup Elm_Thumb
4 */
5typedef enum
6{
7 ELM_THUMB_ANIMATION_START = 0, /** Play animation once */
8 ELM_THUMB_ANIMATION_LOOP, /** Keep playing animation until stop is requested
9 */
10 ELM_THUMB_ANIMATION_STOP, /** Stop playing the animation */
11 ELM_THUMB_ANIMATION_LAST
12} Elm_Thumb_Animation_Setting;
13
1/** 14/**
2 * Add a new thumb object to the parent. 15 * Add a new thumb object to the parent.
3 * 16 *
@@ -67,4 +80,238 @@ EAPI Eina_Bool elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit);
67 * @ingroup Elm_Thumb 80 * @ingroup Elm_Thumb
68 */ 81 */
69EAPI Eina_Bool elm_thumb_editable_get(const Evas_Object *obj); 82EAPI Eina_Bool elm_thumb_editable_get(const Evas_Object *obj);
83
84/**
85 * @brief Set the compression for the thumb object.
86 *
87 * @param[in] compress The compression of the thumb.
88 *
89 * @since 1.8
90 *
91 * @ingroup Elm_Thumb
92 */
93EAPI void elm_thumb_compress_set(Evas_Object *obj, int compress);
94
95/**
96 * @brief Get the compression of the thumb object.
97 *
98 * @param[out] compress The compression of the thumb.
99 *
100 * @return Force the return type to be sure the argument doesn't become the
101 * return
102 *
103 * @since 1.8
104 *
105 * @ingroup Elm_Thumb
106 */
107EAPI void elm_thumb_compress_get(const Evas_Object *obj, int *compress);
108
109/**
110 * @brief Set the format for the thumb object.
111 *
112 * @param[in] format The format setting.
113 *
114 * @since 1.8
115 *
116 * @ingroup Elm_Thumb
117 */
118EAPI void elm_thumb_format_set(Evas_Object *obj, Ethumb_Thumb_Format format);
119
120/**
121 * @brief Get the format of the thumb object.
122 *
123 * @return The format setting.
124 *
125 * @since 1.8
126 *
127 * @ingroup Elm_Thumb
128 */
129EAPI Ethumb_Thumb_Format elm_thumb_format_get(const Evas_Object *obj);
130
131/**
132 * @brief Set the animation state for the thumb object.
133 *
134 * If its content is an animated video, you may start/stop the animation or
135 * tell it o play continuously and looping.
136 *
137 * @param[in] setting The animation setting or #ELM_THUMB_ANIMATION_LAST
138 *
139 * @ingroup Elm_Thumb
140 */
141EAPI void elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting setting);
142
143/**
144 * @brief Get the animation state for the thumb object.
145 *
146 * @return The animation setting or #ELM_THUMB_ANIMATION_LAST
147 *
148 * @ingroup Elm_Thumb
149 */
150EAPI Elm_Thumb_Animation_Setting elm_thumb_animate_get(const Evas_Object *obj);
151
152/**
153 * @brief Set the FDO size for the thumb object.
154 *
155 * @param[in] size The FDO size setting.
156 *
157 * @since 1.8
158 *
159 * @ingroup Elm_Thumb
160 */
161EAPI void elm_thumb_fdo_size_set(Evas_Object *obj, Ethumb_Thumb_FDO_Size size);
162
163/**
164 * @brief Get the fdo size of the thumb object.
165 *
166 * @return The FDO size setting.
167 *
168 * @since 1.8
169 *
170 * @ingroup Elm_Thumb
171 */
172EAPI Ethumb_Thumb_FDO_Size elm_thumb_fdo_size_get(const Evas_Object *obj);
173
174/**
175 * @brief Set the orientation for the thumb object.
176 *
177 * @param[in] orient The orientation setting.
178 *
179 * @since 1.8
180 *
181 * @ingroup Elm_Thumb
182 */
183EAPI void elm_thumb_orientation_set(Evas_Object *obj, Ethumb_Thumb_Orientation orient);
184
185/**
186 * @brief Get the orientation of the thumb object.
187 *
188 * @return The orientation setting.
189 *
190 * @since 1.8
191 *
192 * @ingroup Elm_Thumb
193 */
194EAPI Ethumb_Thumb_Orientation elm_thumb_orientation_get(const Evas_Object *obj);
195
196/**
197 * @brief Set the aspect for the thumb object.
198 *
199 * @param[in] aspect The aspect setting.
200 *
201 * @since 1.8
202 *
203 * @ingroup Elm_Thumb
204 */
205EAPI void elm_thumb_aspect_set(Evas_Object *obj, Ethumb_Thumb_Aspect aspect);
206
207/**
208 * @brief Get the aspect of the thumb object.
209 *
210 * @return The aspect setting.
211 *
212 * @since 1.8
213 *
214 * @ingroup Elm_Thumb
215 */
216EAPI Ethumb_Thumb_Aspect elm_thumb_aspect_get(const Evas_Object *obj);
217
218/**
219 * @brief Set the quality for the thumb object.
220 *
221 * @param[in] quality The quality of the thumb.
222 *
223 * @since 1.8
224 *
225 * @ingroup Elm_Thumb
226 */
227EAPI void elm_thumb_quality_set(Evas_Object *obj, int quality);
228
229/**
230 * @brief Get the quality of the thumb object.
231 *
232 * @param[out] quality The quality of the thumb.
233 *
234 * @since 1.8
235 *
236 * @ingroup Elm_Thumb
237 */
238EAPI void elm_thumb_quality_get(const Evas_Object *obj, int *quality);
239
240/**
241 * @brief Set the size for the thumb object.
242 *
243 * @param[in] tw The width of the thumb.
244 * @param[in] th The height of the thumb.
245 *
246 * @since 1.8
247 *
248 * @ingroup Elm_Thumb
249 */
250EAPI void elm_thumb_size_set(Evas_Object *obj, int tw, int th);
251
252/**
253 * @brief Get the size of the thumb object.
254 *
255 * @param[out] tw The width of the thumb.
256 * @param[out] th The height of the thumb.
257 *
258 * @since 1.8
259 *
260 * @ingroup Elm_Thumb
261 */
262EAPI void elm_thumb_size_get(const Evas_Object *obj, int *tw, int *th);
263
264/**
265 * @brief Set the crop alignment for the thumb object.
266 *
267 * @param[in] cropx The x coordinate of the crop.
268 * @param[in] cropy The y coordinate of the crop.
269 *
270 * @since 1.8
271 *
272 * @ingroup Elm_Thumb
273 */
274EAPI void elm_thumb_crop_align_set(Evas_Object *obj, double cropx, double cropy);
275
276/**
277 * @brief Get the crop alignment of the thumb object.
278 *
279 * @param[out] cropx The x coordinate of the crop.
280 * @param[out] cropy The y coordinate of the crop.
281 *
282 * @since 1.8
283 *
284 * @ingroup Elm_Thumb
285 */
286EAPI void elm_thumb_crop_align_get(const Evas_Object *obj, double *cropx, double *cropy);
287
288/**
289 * @brief Get the path and key to the image or video thumbnail generated by
290 * ethumb.
291 *
292 * One just needs to make sure that the thumbnail was generated before getting
293 * its path; otherwise, the path will be @c null. One way to do that is by
294 * asking for the path when/after the "generate,stop" smart callback is called.
295 *
296 * @param[out] file Pointer to thumb path.
297 * @param[out] key Pointer to thumb key.
298 *
299 * @ingroup Elm_Thumb
300 */
301EAPI void elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key);
302
303/**
304 * @brief Reload thumbnail if it was generated before.
305 *
306 * This is useful if the ethumb client configuration changed, like its size,
307 * aspect or any other property one set in the handle returned by
308 * elm_thumb_ethumb_client_get().
309 *
310 * If the options didn't change, the thumbnail won't be generated again, but
311 * the old one will still be used.
312 *
313 * @ingroup Elm_Thumb
314 */
315EAPI void elm_thumb_reload(Evas_Object *obj);
316
70#include "elm_thumb.eo.legacy.h" 317#include "elm_thumb.eo.legacy.h"