diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | data/themes/widgets/progressbar.edc | 434 | ||||
-rw-r--r-- | src/bin/test.c | 2 | ||||
-rw-r--r-- | src/bin/test_progressbar.c | 116 | ||||
-rw-r--r-- | src/lib/elm_authors.h | 1 | ||||
-rw-r--r-- | src/lib/elm_progressbar.c | 123 | ||||
-rw-r--r-- | src/lib/elm_progressbar_eo.h | 34 | ||||
-rw-r--r-- | src/lib/elm_progressbar_legacy.h | 33 | ||||
-rw-r--r-- | src/lib/elm_widget_progressbar.h | 9 |
11 files changed, 750 insertions, 9 deletions
@@ -81,3 +81,4 @@ Stefan Schmidt <stefan@datenfreihafen.org> | |||
81 | Ryuan Choi (ryuan) <ryuan.choi@samsung.com> <ryuan.choi@gmail.com> | 81 | Ryuan Choi (ryuan) <ryuan.choi@samsung.com> <ryuan.choi@gmail.com> |
82 | Hosang Kim <hosang12.kim@samsung.com> | 82 | Hosang Kim <hosang12.kim@samsung.com> |
83 | Youngbok Shin <youngb.shin@samsung.com> | 83 | Youngbok Shin <youngb.shin@samsung.com> |
84 | Niraj Kumar <niraj.kr@samsung.com> <niraj.kumar.ait@gmail.com> | ||
@@ -1593,3 +1593,8 @@ | |||
1593 | 2013-09-07 Shinwoo Kim | 1593 | 2013-09-07 Shinwoo Kim |
1594 | 1594 | ||
1595 | * elm_access : delete access object in job when its hover object is deleted | 1595 | * elm_access : delete access object in job when its hover object is deleted |
1596 | |||
1597 | 2013-09-10 Niraj Kumar | ||
1598 | |||
1599 | * ProgressBar: Added support for more than one progress status in a | ||
1600 | single progress bar | ||
@@ -86,6 +86,7 @@ Additions: | |||
86 | * Add selectraise feature to gengrid. | 86 | * Add selectraise feature to gengrid. |
87 | * Add bg reset feature. | 87 | * Add bg reset feature. |
88 | * Add elm_object_item_object_get(). | 88 | * Add elm_object_item_object_get(). |
89 | * Added support for more than one progress status in a progressbar. | ||
89 | 90 | ||
90 | Improvements: | 91 | Improvements: |
91 | 92 | ||
diff --git a/data/themes/widgets/progressbar.edc b/data/themes/widgets/progressbar.edc index 1f88ef21d..ff3b53514 100644 --- a/data/themes/widgets/progressbar.edc +++ b/data/themes/widgets/progressbar.edc | |||
@@ -848,3 +848,437 @@ group { name: "elm/progressbar/horizontal/wheel"; | |||
848 | 848 | ||
849 | 849 | ||
850 | /////////////////////////////////////////////////////////////////////////////// | 850 | /////////////////////////////////////////////////////////////////////////////// |
851 | group { name: "elm/progressbar/horizontal/recording"; | ||
852 | images { | ||
853 | image: "shelf_inset.png" COMP; | ||
854 | image: "bt_sm_base2.png" COMP; | ||
855 | image: "flip_shad.png" COMP; | ||
856 | } | ||
857 | parts { | ||
858 | part { name: "elm.background.progressbar"; | ||
859 | type: RECT; | ||
860 | mouse_events: 0; | ||
861 | description { state: "default" 0.0; | ||
862 | rel1 { | ||
863 | relative: 0.0 0.0; | ||
864 | offset: 0 0; | ||
865 | } | ||
866 | rel2 { | ||
867 | relative: 1.0 1.0; | ||
868 | } | ||
869 | } | ||
870 | } | ||
871 | part { name: "elm.swallow.bar"; | ||
872 | mouse_events: 0; | ||
873 | scale: 1; | ||
874 | type: SWALLOW; | ||
875 | description { | ||
876 | min: 48 28; | ||
877 | max: 99999 28; state: "default" 0.0; | ||
878 | rel1 { | ||
879 | to_x: "elm.text"; | ||
880 | to_y: "elm.background.progressbar"; | ||
881 | relative: 1.0 0.0; | ||
882 | } | ||
883 | rel2 { | ||
884 | to: "elm.background.progressbar"; | ||
885 | relative: 1.0 1.0; | ||
886 | } | ||
887 | } | ||
888 | } | ||
889 | part { name: "elm.swallow.content"; | ||
890 | type: SWALLOW; | ||
891 | description { state: "default" 0.0; | ||
892 | visible: 0; | ||
893 | align: 0.0 0.5; | ||
894 | rel1 { | ||
895 | offset: 4 0; | ||
896 | to_y: "elm.background.progressbar"; | ||
897 | } | ||
898 | rel2 { | ||
899 | offset: 3 -1; | ||
900 | relative: 0.0 1.0; | ||
901 | to_y: "elm.background.progressbar"; | ||
902 | } | ||
903 | } | ||
904 | description { state: "visible" 0.0; | ||
905 | inherit: "default" 0.0; | ||
906 | visible: 1; | ||
907 | aspect: 1.0 1.0; | ||
908 | aspect_preference: VERTICAL; | ||
909 | rel2.offset: 4 -1; | ||
910 | } | ||
911 | } | ||
912 | part { name: "elm.text"; | ||
913 | type: TEXT; | ||
914 | mouse_events: 0; | ||
915 | scale: 1; | ||
916 | description { state: "default" 0.0; | ||
917 | visible: 0; | ||
918 | fixed: 1 1; | ||
919 | align: 0.0 0.5; | ||
920 | rel1.to_x: "elm.swallow.content"; | ||
921 | rel1.relative: 1.0 0.0; | ||
922 | rel1.offset: -1 4; | ||
923 | rel2.to_x: "elm.swallow.content"; | ||
924 | rel2.relative: 1.0 1.0; | ||
925 | rel2.offset: -1 -5; | ||
926 | color: 0 0 0 255; | ||
927 | text { | ||
928 | font: "Sans,Edje-Vera"; | ||
929 | size: 10; | ||
930 | min: 0 0; | ||
931 | align: 0.0 0.5; | ||
932 | } | ||
933 | } | ||
934 | description { state: "visible" 0.0; | ||
935 | inherit: "default" 0.0; | ||
936 | visible: 1; | ||
937 | text.min: 1 1; | ||
938 | rel1.offset: 0 4; | ||
939 | rel2.offset: 0 -5; | ||
940 | } | ||
941 | } | ||
942 | part { name: "background"; | ||
943 | mouse_events: 0; | ||
944 | clip_to: "elm.background.progressbar"; | ||
945 | description { | ||
946 | state: "default" 0.0; | ||
947 | rel1 { | ||
948 | to: "elm.swallow.bar"; | ||
949 | relative: 0.0 0.0; | ||
950 | } | ||
951 | rel2 { | ||
952 | to: "elm.swallow.bar"; | ||
953 | relative: 1.0 1.0; | ||
954 | offset: -1 -1; | ||
955 | } | ||
956 | image { | ||
957 | normal: "shelf_inset.png"; | ||
958 | border: 7 7 7 7; | ||
959 | } | ||
960 | } | ||
961 | } | ||
962 | part { name: "elm.text.status"; | ||
963 | type: TEXT; | ||
964 | mouse_events: 0; | ||
965 | description { state: "default" 0.0; | ||
966 | fixed: 1 1; | ||
967 | visible: 0; | ||
968 | rel1 { | ||
969 | to: "background"; | ||
970 | relative: 0.5 0.5; | ||
971 | } | ||
972 | rel2 { | ||
973 | to: "background"; | ||
974 | relative: 0.5 0.5; | ||
975 | } | ||
976 | text { | ||
977 | font: "Sans:style=Bold,Edje-Vera-Bold"; | ||
978 | size: 10; | ||
979 | min: 1 1; | ||
980 | align: 0.5 0.0; | ||
981 | } | ||
982 | color: 0 0 0 255; | ||
983 | } | ||
984 | description { state: "hidden" 0.0; | ||
985 | inherit: "default" 0.0; | ||
986 | visible: 0; | ||
987 | text.min: 0 0; | ||
988 | } | ||
989 | } | ||
990 | part { name: "elm.progress.progressbar"; | ||
991 | mouse_events: 0; | ||
992 | clip_to: "elm.background.progressbar"; | ||
993 | description { | ||
994 | state: "default" 0.0; | ||
995 | min: 14 28; | ||
996 | fixed: 1 1; | ||
997 | rel1 { | ||
998 | to: "elm.swallow.bar"; | ||
999 | relative: 0.0 0.0; | ||
1000 | } | ||
1001 | rel2 { | ||
1002 | to_y: "elm.swallow.bar"; | ||
1003 | to_x: "elm.cur.progressbar"; | ||
1004 | offset: -1 -1; | ||
1005 | } | ||
1006 | image { | ||
1007 | normal: "flip_shad.png"; | ||
1008 | border: 6 6 6 6; | ||
1009 | } | ||
1010 | } | ||
1011 | description { | ||
1012 | state: "invert" 0.0; | ||
1013 | inherit: "default" 0.0; | ||
1014 | rel1 { | ||
1015 | to_y: "elm.swallow.bar"; | ||
1016 | to_x: "elm.cur.progressbar"; | ||
1017 | } | ||
1018 | rel2 { | ||
1019 | to: "elm.swallow.bar"; | ||
1020 | relative: 1.0 1.0; | ||
1021 | } | ||
1022 | } | ||
1023 | description { | ||
1024 | state: "state_begin" 0.0; | ||
1025 | inherit: "default" 0.0; | ||
1026 | rel1 { | ||
1027 | to: "elm.swallow.bar"; | ||
1028 | relative: 0.0 0.0; | ||
1029 | } | ||
1030 | rel2 { | ||
1031 | to: "elm.swallow.bar"; | ||
1032 | relative: 0.1 1.0; | ||
1033 | } | ||
1034 | } | ||
1035 | description { | ||
1036 | state: "state_end" 0.0; | ||
1037 | inherit: "default" 0.0; | ||
1038 | rel1 { | ||
1039 | to: "elm.swallow.bar"; | ||
1040 | relative: 0.9 0.0; | ||
1041 | } | ||
1042 | rel2 { | ||
1043 | to: "elm.swallow.bar"; | ||
1044 | relative: 1.0 1.0; | ||
1045 | } | ||
1046 | } | ||
1047 | } | ||
1048 | part { name: "elm.progress.progressbar1"; | ||
1049 | mouse_events: 0; | ||
1050 | clip_to: "elm.background.progressbar"; | ||
1051 | description { | ||
1052 | state: "default" 0.0; | ||
1053 | min: 14 28; | ||
1054 | fixed: 1 1; | ||
1055 | rel1 { | ||
1056 | to: "elm.swallow.bar"; | ||
1057 | relative: 0.0 0.0; | ||
1058 | } | ||
1059 | rel2 { | ||
1060 | to_y: "elm.swallow.bar"; | ||
1061 | to_x: "elm.cur.progressbar1"; | ||
1062 | offset: -1 -1; | ||
1063 | } | ||
1064 | image { | ||
1065 | normal: "bt_sm_base2.png"; | ||
1066 | border: 6 6 6 6; | ||
1067 | } | ||
1068 | } | ||
1069 | description { | ||
1070 | state: "invert" 0.0; | ||
1071 | inherit: "default" 0.0; | ||
1072 | rel1 { | ||
1073 | to_y: "elm.swallow.bar"; | ||
1074 | to_x: "elm.cur.progressbar1"; | ||
1075 | } | ||
1076 | rel2 { | ||
1077 | to: "elm.swallow.bar"; | ||
1078 | relative: 1.0 1.0; | ||
1079 | } | ||
1080 | } | ||
1081 | description { | ||
1082 | state: "state_begin" 0.0; | ||
1083 | inherit: "default" 0.0; | ||
1084 | rel1 { | ||
1085 | to: "elm.swallow.bar"; | ||
1086 | relative: 0.0 0.0; | ||
1087 | } | ||
1088 | rel2 { | ||
1089 | to: "elm.swallow.bar"; | ||
1090 | relative: 0.1 1.0; | ||
1091 | } | ||
1092 | } | ||
1093 | description { | ||
1094 | state: "state_end" 0.0; | ||
1095 | inherit: "default" 0.0; | ||
1096 | rel1 { | ||
1097 | to: "elm.swallow.bar"; | ||
1098 | relative: 0.9 0.0; | ||
1099 | } | ||
1100 | rel2 { | ||
1101 | to: "elm.swallow.bar"; | ||
1102 | relative: 1.0 1.0; | ||
1103 | } | ||
1104 | } | ||
1105 | } | ||
1106 | part { name: "text-bar"; | ||
1107 | type: TEXT; | ||
1108 | mouse_events: 0; | ||
1109 | clip_to: "progress-rect"; | ||
1110 | effect: SOFT_SHADOW; | ||
1111 | scale: 1; | ||
1112 | description { state: "default" 0.0; | ||
1113 | align: 0.0 0.0; | ||
1114 | fixed: 1 1; | ||
1115 | visible: 0; | ||
1116 | rel1.to: "elm.text.status"; | ||
1117 | rel1.offset: -1 -1; | ||
1118 | rel2.to: "elm.text.status"; | ||
1119 | text { | ||
1120 | text_source: "elm.text.status"; | ||
1121 | font: "Sans:style=Bold,Edje-Vera-Bold"; | ||
1122 | size: 10; | ||
1123 | min: 1 1; | ||
1124 | align: 0.0 0.0; | ||
1125 | } | ||
1126 | color: 224 224 224 255; | ||
1127 | color3: 0 0 0 64; | ||
1128 | } | ||
1129 | description { state: "hidden" 0.0; | ||
1130 | inherit: "default" 0.0; | ||
1131 | visible: 0; | ||
1132 | text.min: 0 0; | ||
1133 | } | ||
1134 | } | ||
1135 | part { name: "elm.cur.progressbar"; | ||
1136 | mouse_events: 0; | ||
1137 | dragable { | ||
1138 | confine: "background"; | ||
1139 | x: 1 1 1; | ||
1140 | y: 0 0 0; | ||
1141 | } | ||
1142 | description { state: "default" 0.0; | ||
1143 | min: 14 28; | ||
1144 | fixed: 1 1; | ||
1145 | visible: 0; | ||
1146 | rel1 { | ||
1147 | to: "background"; | ||
1148 | relative: 0 0; | ||
1149 | } | ||
1150 | rel2.to: "background"; | ||
1151 | } | ||
1152 | } | ||
1153 | part { name: "elm.cur.progressbar1"; | ||
1154 | mouse_events: 0; | ||
1155 | dragable { | ||
1156 | confine: "background"; | ||
1157 | x: 1 1 1; | ||
1158 | y: 0 0 0; | ||
1159 | } | ||
1160 | description { state: "default" 0.0; | ||
1161 | min: 14 28; | ||
1162 | fixed: 1 1; | ||
1163 | visible: 0; | ||
1164 | rel1 { | ||
1165 | to: "background"; | ||
1166 | relative: 0 0; | ||
1167 | } | ||
1168 | rel2.to: "background"; | ||
1169 | } | ||
1170 | } | ||
1171 | part { name: "progress-rect"; | ||
1172 | type: RECT; | ||
1173 | mouse_events: 0; | ||
1174 | description { state: "default" 0.0; | ||
1175 | rel1.to: "elm.progress.progressbar"; | ||
1176 | rel2.to: "elm.progress.progressbar"; | ||
1177 | } | ||
1178 | } | ||
1179 | } | ||
1180 | programs { | ||
1181 | program { name: "label_show"; | ||
1182 | signal: "elm,state,text,visible"; | ||
1183 | source: "elm"; | ||
1184 | action: STATE_SET "visible" 0.0; | ||
1185 | target: "elm.text"; | ||
1186 | } | ||
1187 | program { name: "label_hide"; | ||
1188 | signal: "elm,state,text,hidden"; | ||
1189 | source: "elm"; | ||
1190 | action: STATE_SET "default" 0.0; | ||
1191 | target: "elm.text"; | ||
1192 | } | ||
1193 | program { name: "icon_show"; | ||
1194 | signal: "elm,state,icon,visible"; | ||
1195 | source: "elm"; | ||
1196 | action: STATE_SET "visible" 0.0; | ||
1197 | target: "elm.swallow.content"; | ||
1198 | } | ||
1199 | program { name: "icon_hide"; | ||
1200 | signal: "elm,state,icon,hidden"; | ||
1201 | source: "elm"; | ||
1202 | action: STATE_SET "default" 0.0; | ||
1203 | target: "elm.swallow.content"; | ||
1204 | } | ||
1205 | program { name: "units_show"; | ||
1206 | signal: "elm,state,units,visible"; | ||
1207 | source: "elm"; | ||
1208 | action: STATE_SET "default" 0.0; | ||
1209 | target: "text-bar"; | ||
1210 | target: "elm.text.status"; | ||
1211 | } | ||
1212 | program { name: "units_hide"; | ||
1213 | signal: "elm,state,units,hidden"; | ||
1214 | source: "elm"; | ||
1215 | action: STATE_SET "hidden" 0.0; | ||
1216 | target: "text-bar"; | ||
1217 | target: "elm.text.status"; | ||
1218 | } | ||
1219 | program { name: "slide_to_end"; | ||
1220 | action: STATE_SET "state_end" 0.0; | ||
1221 | transition: LINEAR 0.5; | ||
1222 | target: "elm.progress.progressbar"; | ||
1223 | target: "elm.progress.progressbar1"; | ||
1224 | after: "slide_to_begin"; | ||
1225 | } | ||
1226 | program { name: "slide_to_begin"; | ||
1227 | signal: "elm,state,slide,begin"; | ||
1228 | action: STATE_SET "state_begin" 0.0; | ||
1229 | target: "elm.progress.progressbar"; | ||
1230 | target: "elm.progress.progressbar1"; | ||
1231 | transition: LINEAR 0.5; | ||
1232 | after: "slide_to_end"; | ||
1233 | } | ||
1234 | program { name: "start_pulse"; | ||
1235 | signal: "elm,state,pulse,start"; | ||
1236 | source: "elm"; | ||
1237 | after: "slide_to_end"; | ||
1238 | } | ||
1239 | program { name: "stop_pulse"; | ||
1240 | signal: "elm,state,pulse,stop"; | ||
1241 | source: "elm"; | ||
1242 | action: ACTION_STOP; | ||
1243 | target: "slide_to_begin"; | ||
1244 | target: "slide_to_end"; | ||
1245 | target: "start_pulse"; | ||
1246 | after: "state_pulse"; | ||
1247 | } | ||
1248 | program { name: "state_pulse"; | ||
1249 | signal: "elm,state,pulse"; | ||
1250 | source: "elm"; | ||
1251 | action: STATE_SET "state_begin" 0.0; | ||
1252 | target: "elm.progress.progressbar"; | ||
1253 | target: "elm.progress.progressbar1"; | ||
1254 | after: "units_hide"; | ||
1255 | } | ||
1256 | program { name: "state_fraction"; | ||
1257 | signal: "elm,state,fraction"; | ||
1258 | source: "elm"; | ||
1259 | action: ACTION_STOP; | ||
1260 | target: "slide_to_begin"; | ||
1261 | target: "slide_to_end"; | ||
1262 | target: "start_pulse"; | ||
1263 | action: STATE_SET "default" 0.0; | ||
1264 | target: "elm.progress.progressbar"; | ||
1265 | target: "elm.progress.progressbar1"; | ||
1266 | } | ||
1267 | program { name: "set_invert_on"; | ||
1268 | signal: "elm,state,inverted,on"; | ||
1269 | source: "elm"; | ||
1270 | action: STATE_SET "invert" 0.0; | ||
1271 | target: "elm.progress.progressbar"; | ||
1272 | target: "elm.progress.progressbar1"; | ||
1273 | } | ||
1274 | program { name: "set_invert_off"; | ||
1275 | signal: "elm,state,inverted,off"; | ||
1276 | source: "elm"; | ||
1277 | action: STATE_SET "default" 0.0; | ||
1278 | target: "elm.progress.progressbar"; | ||
1279 | target: "elm.progress.progressbar1"; | ||
1280 | } | ||
1281 | } | ||
1282 | } | ||
1283 | |||
1284 | /////////////////////////////////////////////////////////////////////////////// | ||
diff --git a/src/bin/test.c b/src/bin/test.c index 9bbec156e..2e69866b8 100644 --- a/src/bin/test.c +++ b/src/bin/test.c | |||
@@ -127,6 +127,7 @@ void test_gengrid4(void *data, Evas_Object *obj, void *event_info); | |||
127 | void test_win_state(void *data, Evas_Object *obj, void *event_info); | 127 | void test_win_state(void *data, Evas_Object *obj, void *event_info); |
128 | void test_win_state2(void *data, Evas_Object *obj, void *event_info); | 128 | void test_win_state2(void *data, Evas_Object *obj, void *event_info); |
129 | void test_progressbar(void *data, Evas_Object *obj, void *event_info); | 129 | void test_progressbar(void *data, Evas_Object *obj, void *event_info); |
130 | void test_progressbar2(void *data, Evas_Object *obj, void *event_info); | ||
130 | void test_fileselector(void *data, Evas_Object *obj, void *event_info); | 131 | void test_fileselector(void *data, Evas_Object *obj, void *event_info); |
131 | void test_separator(void *data, Evas_Object *obj, void *event_info); | 132 | void test_separator(void *data, Evas_Object *obj, void *event_info); |
132 | void test_scroller(void *data, Evas_Object *obj, void *event_info); | 133 | void test_scroller(void *data, Evas_Object *obj, void *event_info); |
@@ -715,6 +716,7 @@ add_tests: | |||
715 | ADD_TEST(NULL, "Range Values", "Spinner", test_spinner); | 716 | ADD_TEST(NULL, "Range Values", "Spinner", test_spinner); |
716 | ADD_TEST(NULL, "Range Values", "Slider", test_slider); | 717 | ADD_TEST(NULL, "Range Values", "Slider", test_slider); |
717 | ADD_TEST(NULL, "Range Values", "Progressbar", test_progressbar); | 718 | ADD_TEST(NULL, "Range Values", "Progressbar", test_progressbar); |
719 | ADD_TEST(NULL, "Range Values", "Progressbar 2", test_progressbar2); | ||
718 | 720 | ||
719 | //------------------------------// | 721 | //------------------------------// |
720 | ADD_TEST(NULL, "Booleans", "Check", test_check); | 722 | ADD_TEST(NULL, "Booleans", "Check", test_check); |
diff --git a/src/bin/test_progressbar.c b/src/bin/test_progressbar.c index 6f63d32b3..13ac94f1e 100644 --- a/src/bin/test_progressbar.c +++ b/src/bin/test_progressbar.c | |||
@@ -38,6 +38,26 @@ _my_progressbar_value_set (void *data EINA_UNUSED) | |||
38 | return ECORE_CALLBACK_CANCEL; | 38 | return ECORE_CALLBACK_CANCEL; |
39 | } | 39 | } |
40 | 40 | ||
41 | static Eina_Bool | ||
42 | _my_progressbar_value_set2(void *data EINA_UNUSED) | ||
43 | { | ||
44 | double progress; | ||
45 | |||
46 | progress = elm_progressbar_value_get (_test_progressbar.pb1); | ||
47 | if (progress < 1.0) progress += 0.0123; | ||
48 | else progress = 0.0; | ||
49 | elm_progressbar_part_value_set(_test_progressbar.pb1, "elm.cur.progressbar", progress); | ||
50 | elm_progressbar_value_set(_test_progressbar.pb2, progress); | ||
51 | elm_progressbar_part_value_set(_test_progressbar.pb2, "elm.cur.progressbar1", progress-0.15); | ||
52 | elm_progressbar_part_value_set(_test_progressbar.pb3, "elm.cur.progressbar", progress); | ||
53 | elm_progressbar_part_value_set(_test_progressbar.pb3, "elm.cur.progressbar1", progress-0.15); | ||
54 | |||
55 | if (progress < 1.0) return ECORE_CALLBACK_RENEW; | ||
56 | |||
57 | _test_progressbar.timer = NULL; | ||
58 | return ECORE_CALLBACK_CANCEL; | ||
59 | } | ||
60 | |||
41 | static void | 61 | static void |
42 | my_progressbar_test_start(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | 62 | my_progressbar_test_start(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) |
43 | { | 63 | { |
@@ -58,12 +78,37 @@ my_progressbar_test_start(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, | |||
58 | } | 78 | } |
59 | 79 | ||
60 | static void | 80 | static void |
81 | my_progressbar_test_start2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | ||
82 | { | ||
83 | fprintf(stderr, "s1\n"); | ||
84 | |||
85 | elm_object_disabled_set(_test_progressbar.btn_start, EINA_TRUE); | ||
86 | elm_object_disabled_set(_test_progressbar.btn_stop, EINA_FALSE); | ||
87 | |||
88 | if (!_test_progressbar.timer) | ||
89 | _test_progressbar.timer = ecore_timer_add(0.1, | ||
90 | _my_progressbar_value_set2, NULL); | ||
91 | } | ||
92 | |||
93 | static void | ||
61 | my_progressbar_test_stop(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | 94 | my_progressbar_test_stop(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) |
62 | { | 95 | { |
96 | elm_progressbar_pulse(_test_progressbar.pb1, EINA_FALSE); | ||
63 | elm_progressbar_pulse(_test_progressbar.pb2, EINA_FALSE); | 97 | elm_progressbar_pulse(_test_progressbar.pb2, EINA_FALSE); |
64 | elm_progressbar_pulse(_test_progressbar.pb5, EINA_FALSE); | 98 | elm_progressbar_pulse(_test_progressbar.pb3, EINA_FALSE); |
65 | elm_progressbar_pulse(_test_progressbar.pb7, EINA_FALSE); | 99 | elm_object_disabled_set(_test_progressbar.btn_start, EINA_FALSE); |
100 | elm_object_disabled_set(_test_progressbar.btn_stop, EINA_TRUE); | ||
101 | |||
102 | if (_test_progressbar.timer) | ||
103 | { | ||
104 | ecore_timer_del(_test_progressbar.timer); | ||
105 | _test_progressbar.timer = NULL; | ||
106 | } | ||
107 | } | ||
66 | 108 | ||
109 | static void | ||
110 | my_progressbar_test_stop2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | ||
111 | { | ||
67 | elm_object_disabled_set(_test_progressbar.btn_start, EINA_FALSE); | 112 | elm_object_disabled_set(_test_progressbar.btn_start, EINA_FALSE); |
68 | elm_object_disabled_set(_test_progressbar.btn_stop, EINA_TRUE); | 113 | elm_object_disabled_set(_test_progressbar.btn_stop, EINA_TRUE); |
69 | 114 | ||
@@ -226,4 +271,71 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve | |||
226 | 271 | ||
227 | evas_object_show(win); | 272 | evas_object_show(win); |
228 | } | 273 | } |
274 | |||
275 | void | ||
276 | test_progressbar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) | ||
277 | { | ||
278 | Evas_Object *win, *pb, *bx, *bt, *bt_bx; | ||
279 | |||
280 | win = elm_win_util_standard_add("progressbar", "Progressbar2"); | ||
281 | evas_object_smart_callback_add(win, "delete,request", | ||
282 | my_progressbar_destroy, NULL); | ||
283 | |||
284 | bx = elm_box_add(win); | ||
285 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
286 | elm_win_resize_object_add(win, bx); | ||
287 | evas_object_show(bx); | ||
288 | |||
289 | pb = elm_progressbar_add(win); | ||
290 | elm_object_text_set(pb, "Style: default"); | ||
291 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5); | ||
292 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
293 | elm_progressbar_span_size_set(pb, 200); | ||
294 | elm_box_pack_end(bx, pb); | ||
295 | evas_object_show(pb); | ||
296 | _test_progressbar.pb1 = pb; | ||
297 | |||
298 | pb = elm_progressbar_add(win); | ||
299 | elm_object_style_set(pb, "recording"); | ||
300 | elm_object_text_set(pb, "Style: Recording"); | ||
301 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5); | ||
302 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
303 | elm_progressbar_span_size_set(pb, 200); | ||
304 | elm_box_pack_end(bx, pb); | ||
305 | evas_object_show(pb); | ||
306 | _test_progressbar.pb2 = pb; | ||
307 | |||
308 | pb = elm_progressbar_add(win); | ||
309 | elm_object_style_set(pb, "recording"); | ||
310 | elm_object_text_set(pb, "Style: Recording 2"); | ||
311 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5); | ||
312 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
313 | elm_progressbar_span_size_set(pb, 200); | ||
314 | elm_box_pack_end(bx, pb); | ||
315 | evas_object_show(pb); | ||
316 | _test_progressbar.pb3 = pb; | ||
317 | |||
318 | bt_bx = elm_box_add(win); | ||
319 | elm_box_horizontal_set(bt_bx, EINA_TRUE); | ||
320 | evas_object_size_hint_weight_set(bt_bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
321 | elm_box_pack_end(bx, bt_bx); | ||
322 | evas_object_show(bt_bx); | ||
323 | |||
324 | bt = elm_button_add(win); | ||
325 | elm_object_text_set(bt, "Start"); | ||
326 | evas_object_smart_callback_add(bt, "clicked", my_progressbar_test_start2, NULL); | ||
327 | elm_box_pack_end(bt_bx, bt); | ||
328 | evas_object_show(bt); | ||
329 | _test_progressbar.btn_start = bt; | ||
330 | |||
331 | bt = elm_button_add(win); | ||
332 | elm_object_text_set(bt, "Stop"); | ||
333 | elm_object_disabled_set(bt, EINA_TRUE); | ||
334 | evas_object_smart_callback_add(bt, "clicked", my_progressbar_test_stop2, NULL); | ||
335 | elm_box_pack_end(bt_bx, bt); | ||
336 | evas_object_show(bt); | ||
337 | _test_progressbar.btn_stop = bt; | ||
338 | |||
339 | evas_object_show(win); | ||
340 | } | ||
229 | #endif | 341 | #endif |
diff --git a/src/lib/elm_authors.h b/src/lib/elm_authors.h index cebc5e165..3045c2923 100644 --- a/src/lib/elm_authors.h +++ b/src/lib/elm_authors.h | |||
@@ -83,6 +83,7 @@ | |||
83 | * @author Ryuan Choi (ryuan) <ryuan.choi@samsung.com> <ryuan.choi@gmail.com> | 83 | * @author Ryuan Choi (ryuan) <ryuan.choi@samsung.com> <ryuan.choi@gmail.com> |
84 | * @author Hosang Kim <hosang12.kim@@samsung.com> | 84 | * @author Hosang Kim <hosang12.kim@@samsung.com> |
85 | * @author Youngbok Shin <youngb.shin@@samsung.com> | 85 | * @author Youngbok Shin <youngb.shin@@samsung.com> |
86 | * @author Niraj Kumar <niraj.kr@@samsung.com> <niraj.kumar.ait@@gmail.com> | ||
86 | * | 87 | * |
87 | * Please contact <enlightenment-devel@lists.sourceforge.net> to get in | 88 | * Please contact <enlightenment-devel@lists.sourceforge.net> to get in |
88 | * contact with the developers and maintainers. | 89 | * contact with the developers and maintainers. |
diff --git a/src/lib/elm_progressbar.c b/src/lib/elm_progressbar.c index d48c00e2b..ef702d827 100644 --- a/src/lib/elm_progressbar.c +++ b/src/lib/elm_progressbar.c | |||
@@ -40,6 +40,22 @@ static const Elm_Layout_Part_Alias_Description _text_aliases[] = | |||
40 | {NULL, NULL} | 40 | {NULL, NULL} |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static Elm_Progress_Status * | ||
44 | _progress_status_new(const char *part_name, double val) | ||
45 | { | ||
46 | Elm_Progress_Status *ps; | ||
47 | ps = calloc(1, sizeof(Elm_Progress_Status)); | ||
48 | ps->part_name = eina_stringshare_add(part_name); | ||
49 | ps->val = val; | ||
50 | return ps; | ||
51 | } | ||
52 | |||
53 | static inline void | ||
54 | _progress_status_free(Elm_Progress_Status *ps) | ||
55 | { | ||
56 | eina_stringshare_del(ps->part_name); | ||
57 | free(ps); | ||
58 | } | ||
43 | static void | 59 | static void |
44 | _units_set(Evas_Object *obj) | 60 | _units_set(Evas_Object *obj) |
45 | { | 61 | { |
@@ -72,16 +88,21 @@ _val_set(Evas_Object *obj) | |||
72 | ELM_PROGRESSBAR_DATA_GET(obj, sd); | 88 | ELM_PROGRESSBAR_DATA_GET(obj, sd); |
73 | Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS); | 89 | Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS); |
74 | 90 | ||
75 | pos = sd->val; | ||
76 | rtl = elm_widget_mirrored_get(obj); | 91 | rtl = elm_widget_mirrored_get(obj); |
77 | 92 | Elm_Progress_Status *ps; | |
78 | if ((!rtl && sd->inverted) || | 93 | Eina_List *l; |
79 | (rtl && ((!sd->horizontal && sd->inverted) || | 94 | |
95 | EINA_LIST_FOREACH(sd->progress_status, l, ps) | ||
96 | { | ||
97 | pos = ps->val; | ||
98 | if ((!rtl && sd->inverted) || | ||
99 | (rtl && ((!sd->horizontal && sd->inverted) || | ||
80 | (sd->horizontal && !sd->inverted)))) | 100 | (sd->horizontal && !sd->inverted)))) |
81 | pos = MAX_RATIO_LVL - pos; | 101 | pos = MAX_RATIO_LVL - pos; |
82 | 102 | ||
83 | edje_object_part_drag_value_set | 103 | edje_object_part_drag_value_set |
84 | (wd->resize_obj, "elm.cur.progressbar", pos, pos); | 104 | (wd->resize_obj, ps->part_name, pos, pos); |
105 | } | ||
85 | } | 106 | } |
86 | 107 | ||
87 | static void | 108 | static void |
@@ -284,8 +305,16 @@ static void | |||
284 | _elm_progressbar_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) | 305 | _elm_progressbar_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) |
285 | { | 306 | { |
286 | Elm_Progressbar_Smart_Data *sd = _pd; | 307 | Elm_Progressbar_Smart_Data *sd = _pd; |
308 | Elm_Progress_Status *progress_obj; | ||
287 | 309 | ||
288 | if (sd->units) eina_stringshare_del(sd->units); | 310 | if (sd->units) eina_stringshare_del(sd->units); |
311 | if (sd->progress_status) | ||
312 | { | ||
313 | EINA_LIST_FREE(sd->progress_status, progress_obj) | ||
314 | { | ||
315 | _progress_status_free(progress_obj); | ||
316 | } | ||
317 | } | ||
289 | 318 | ||
290 | eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); | 319 | eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); |
291 | } | 320 | } |
@@ -388,6 +417,79 @@ _pulse(Eo *obj, void *_pd, va_list *list) | |||
388 | } | 417 | } |
389 | 418 | ||
390 | EAPI void | 419 | EAPI void |
420 | elm_progressbar_part_value_set(Evas_Object *obj, const char *part, double val) | ||
421 | { | ||
422 | ELM_PROGRESSBAR_CHECK(obj); | ||
423 | eo_do(obj, elm_obj_progressbar_part_value_set(part, val)); | ||
424 | } | ||
425 | |||
426 | static void | ||
427 | _part_value_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list) | ||
428 | { | ||
429 | const char *part_name = va_arg(*list, const char *); | ||
430 | double val = va_arg(*list, double); | ||
431 | Elm_Progressbar_Smart_Data *sd = _pd; | ||
432 | Elm_Progress_Status *ps; | ||
433 | Eina_Bool existing_ps = EINA_FALSE; | ||
434 | Eina_List *l; | ||
435 | |||
436 | if (val < MIN_RATIO_LVL) val = MIN_RATIO_LVL; | ||
437 | if (val > MAX_RATIO_LVL) val = MAX_RATIO_LVL; | ||
438 | |||
439 | if (!strcmp(part_name, "elm.cur.progressbar")) | ||
440 | sd->val = val; | ||
441 | |||
442 | EINA_LIST_FOREACH(sd->progress_status, l, ps) | ||
443 | { | ||
444 | if (!strcmp(ps->part_name, part_name)) | ||
445 | { | ||
446 | existing_ps = EINA_TRUE; | ||
447 | break; | ||
448 | } | ||
449 | } | ||
450 | |||
451 | if (!existing_ps) | ||
452 | { | ||
453 | ps = _progress_status_new(part_name, val); | ||
454 | sd->progress_status = eina_list_append(sd->progress_status, ps); | ||
455 | } | ||
456 | else | ||
457 | ps->val = val; | ||
458 | |||
459 | _val_set(obj); | ||
460 | _units_set(obj); | ||
461 | evas_object_smart_callback_call(obj, SIG_CHANGED, NULL); | ||
462 | } | ||
463 | |||
464 | EAPI double | ||
465 | elm_progressbar_part_value_get(const Evas_Object *obj, const char * part) | ||
466 | { | ||
467 | ELM_PROGRESSBAR_CHECK(obj) 0.0; | ||
468 | double ret; | ||
469 | eo_do((Eo *) obj, elm_obj_progressbar_part_value_get(part,&ret)); | ||
470 | return ret; | ||
471 | } | ||
472 | |||
473 | static void | ||
474 | _part_value_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) | ||
475 | { | ||
476 | const char* part = va_arg(*list, const char *); | ||
477 | double *ret = va_arg(*list, double *); | ||
478 | Elm_Progressbar_Smart_Data *sd = _pd; | ||
479 | Elm_Progress_Status *ps; | ||
480 | Eina_List *l; | ||
481 | |||
482 | EINA_LIST_FOREACH(sd->progress_status, l, ps) | ||
483 | { | ||
484 | if (!strcmp(ps->part_name, part)) | ||
485 | { | ||
486 | *ret = ps->val; | ||
487 | return; | ||
488 | } | ||
489 | } | ||
490 | } | ||
491 | |||
492 | EAPI void | ||
391 | elm_progressbar_value_set(Evas_Object *obj, | 493 | elm_progressbar_value_set(Evas_Object *obj, |
392 | double val) | 494 | double val) |
393 | { | 495 | { |
@@ -400,6 +502,7 @@ _value_set(Eo *obj, void *_pd, va_list *list) | |||
400 | { | 502 | { |
401 | double val = va_arg(*list, double); | 503 | double val = va_arg(*list, double); |
402 | Elm_Progressbar_Smart_Data *sd = _pd; | 504 | Elm_Progressbar_Smart_Data *sd = _pd; |
505 | Elm_Progress_Status *ps; | ||
403 | 506 | ||
404 | if (sd->val == val) return; | 507 | if (sd->val == val) return; |
405 | 508 | ||
@@ -407,6 +510,8 @@ _value_set(Eo *obj, void *_pd, va_list *list) | |||
407 | if (sd->val < MIN_RATIO_LVL) sd->val = MIN_RATIO_LVL; | 510 | if (sd->val < MIN_RATIO_LVL) sd->val = MIN_RATIO_LVL; |
408 | if (sd->val > MAX_RATIO_LVL) sd->val = MAX_RATIO_LVL; | 511 | if (sd->val > MAX_RATIO_LVL) sd->val = MAX_RATIO_LVL; |
409 | 512 | ||
513 | ps = _progress_status_new("elm.cur.progressbar", sd->val); | ||
514 | sd->progress_status = eina_list_append(sd->progress_status, ps); | ||
410 | _val_set(obj); | 515 | _val_set(obj); |
411 | _units_set(obj); | 516 | _units_set(obj); |
412 | evas_object_smart_callback_call(obj, SIG_CHANGED, NULL); | 517 | evas_object_smart_callback_call(obj, SIG_CHANGED, NULL); |
@@ -681,6 +786,8 @@ _class_constructor(Eo_Class *klass) | |||
681 | EO_OP_FUNC(ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_HORIZONTAL_GET), _horizontal_get), | 786 | EO_OP_FUNC(ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_HORIZONTAL_GET), _horizontal_get), |
682 | EO_OP_FUNC(ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_SET), _inverted_set), | 787 | EO_OP_FUNC(ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_SET), _inverted_set), |
683 | EO_OP_FUNC(ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_GET), _inverted_get), | 788 | EO_OP_FUNC(ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_GET), _inverted_get), |
789 | EO_OP_FUNC(ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_PART_VALUE_SET), _part_value_set), | ||
790 | EO_OP_FUNC(ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_PART_VALUE_GET), _part_value_get), | ||
684 | EO_OP_FUNC_SENTINEL | 791 | EO_OP_FUNC_SENTINEL |
685 | }; | 792 | }; |
686 | eo_class_funcs_set(klass, func_desc); | 793 | eo_class_funcs_set(klass, func_desc); |
@@ -702,6 +809,8 @@ static const Eo_Op_Description op_desc[] = { | |||
702 | EO_OP_DESCRIPTION(ELM_OBJ_PROGRESSBAR_SUB_ID_HORIZONTAL_GET, "Retrieve the orientation of a given progress bar widget."), | 809 | EO_OP_DESCRIPTION(ELM_OBJ_PROGRESSBAR_SUB_ID_HORIZONTAL_GET, "Retrieve the orientation of a given progress bar widget."), |
703 | EO_OP_DESCRIPTION(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_SET, "Invert a given progress bar widget's displaying values order."), | 810 | EO_OP_DESCRIPTION(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_SET, "Invert a given progress bar widget's displaying values order."), |
704 | EO_OP_DESCRIPTION(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_GET, "Get whether a given progress bar widget's displaying values are inverted or not."), | 811 | EO_OP_DESCRIPTION(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_GET, "Get whether a given progress bar widget's displaying values are inverted or not."), |
812 | EO_OP_DESCRIPTION(ELM_OBJ_PROGRESSBAR_SUB_ID_PART_VALUE_SET, "Set the progress value (in percentage) on a given progress bar widget for a part."), | ||
813 | EO_OP_DESCRIPTION(ELM_OBJ_PROGRESSBAR_SUB_ID_PART_VALUE_GET, "Get the progress value (in percentage) on a given progress bar widget for a part."), | ||
705 | EO_OP_DESCRIPTION_SENTINEL | 814 | EO_OP_DESCRIPTION_SENTINEL |
706 | }; | 815 | }; |
707 | static const Eo_Class_Description class_desc = { | 816 | static const Eo_Class_Description class_desc = { |
diff --git a/src/lib/elm_progressbar_eo.h b/src/lib/elm_progressbar_eo.h index 26f30aa96..7cfa6eb44 100644 --- a/src/lib/elm_progressbar_eo.h +++ b/src/lib/elm_progressbar_eo.h | |||
@@ -23,6 +23,8 @@ enum | |||
23 | ELM_OBJ_PROGRESSBAR_SUB_ID_HORIZONTAL_GET, | 23 | ELM_OBJ_PROGRESSBAR_SUB_ID_HORIZONTAL_GET, |
24 | ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_SET, | 24 | ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_SET, |
25 | ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_GET, | 25 | ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_GET, |
26 | ELM_OBJ_PROGRESSBAR_SUB_ID_PART_VALUE_SET, | ||
27 | ELM_OBJ_PROGRESSBAR_SUB_ID_PART_VALUE_GET, | ||
26 | ELM_OBJ_PROGRESSBAR_SUB_ID_LAST | 28 | ELM_OBJ_PROGRESSBAR_SUB_ID_LAST |
27 | }; | 29 | }; |
28 | 30 | ||
@@ -229,3 +231,35 @@ enum | |||
229 | * @ingroup Progressbar | 231 | * @ingroup Progressbar |
230 | */ | 232 | */ |
231 | #define elm_obj_progressbar_inverted_get(ret) ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_GET), EO_TYPECHECK(Eina_Bool *, ret) | 233 | #define elm_obj_progressbar_inverted_get(ret) ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_INVERTED_GET), EO_TYPECHECK(Eina_Bool *, ret) |
234 | |||
235 | /** | ||
236 | * @def elm_progressbar_part_value_set | ||
237 | * @since 1.8 | ||
238 | * | ||
239 | * Modified to support more than one progress status | ||
240 | * Set the value of the progress status a particular part | ||
241 | * | ||
242 | * @param[in] part | ||
243 | * @param[in] val | ||
244 | * | ||
245 | * @see elm_progressbar_part_value_set | ||
246 | * | ||
247 | * @ingroup Progressbar | ||
248 | */ | ||
249 | #define elm_obj_progressbar_part_value_set(part, val) ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_PART_VALUE_SET), EO_TYPECHECK(const char*, part), EO_TYPECHECK(double, val) | ||
250 | |||
251 | /** | ||
252 | * @def elm_progressbar_part_value_get | ||
253 | * @since 1.8 | ||
254 | * | ||
255 | * Modified to support more than one progress status | ||
256 | * Get the value of the progress status of a particular part | ||
257 | * | ||
258 | * @param[in] part | ||
259 | * @param[out] ret | ||
260 | * | ||
261 | * @see elm_progressbar_part_value_get | ||
262 | * | ||
263 | * @ingroup Progressbar | ||
264 | */ | ||
265 | #define elm_obj_progressbar_part_value_get(part, ret) ELM_OBJ_PROGRESSBAR_ID(ELM_OBJ_PROGRESSBAR_SUB_ID_PART_VALUE_GET), EO_TYPECHECK(const char*, part), EO_TYPECHECK(double *, ret) | ||
diff --git a/src/lib/elm_progressbar_legacy.h b/src/lib/elm_progressbar_legacy.h index 492654d1e..89667e634 100644 --- a/src/lib/elm_progressbar_legacy.h +++ b/src/lib/elm_progressbar_legacy.h | |||
@@ -249,3 +249,36 @@ EAPI void elm_progressbar_inverted_set(Evas_Object *obj, | |||
249 | * @ingroup Progressbar | 249 | * @ingroup Progressbar |
250 | */ | 250 | */ |
251 | EAPI Eina_Bool elm_progressbar_inverted_get(const Evas_Object *obj); | 251 | EAPI Eina_Bool elm_progressbar_inverted_get(const Evas_Object *obj); |
252 | |||
253 | /** | ||
254 | * Set the progress value (in percentage) on a given progress bar | ||
255 | * widget for the given part name | ||
256 | * | ||
257 | * @since 1.8 | ||
258 | * | ||
259 | * @param obj The progress bar object | ||
260 | * @param part The partname to which val have to set | ||
261 | * @param val The progress value (@b must be between @c 0.0 and @c | ||
262 | * 1.0) | ||
263 | * | ||
264 | * Use this call to set progress bar status for more than one progress status . | ||
265 | * | ||
266 | * @ingroup Progressbar | ||
267 | */ | ||
268 | EAPI void elm_progressbar_part_value_set(Evas_Object *obj, const char *part, double val); | ||
269 | |||
270 | /** | ||
271 | * Get the progress value (in percentage) on a given progress bar | ||
272 | * widget for a particular part | ||
273 | * | ||
274 | * @since 1.8 | ||
275 | * | ||
276 | * @param obj The progress bar object | ||
277 | * @param part The part name of the progress bar | ||
278 | * @return The value of the progressbar | ||
279 | * | ||
280 | * @see elm_progressbar_value_set() for more details | ||
281 | * | ||
282 | * @ingroup Progressbar | ||
283 | */ | ||
284 | EAPI double elm_progressbar_part_value_get(const Evas_Object *obj, const char *part); | ||
diff --git a/src/lib/elm_widget_progressbar.h b/src/lib/elm_widget_progressbar.h index 3747a17c5..20d78121f 100644 --- a/src/lib/elm_widget_progressbar.h +++ b/src/lib/elm_widget_progressbar.h | |||
@@ -18,6 +18,8 @@ | |||
18 | * Base layout smart data extended with progressbar instance data. | 18 | * Base layout smart data extended with progressbar instance data. |
19 | */ | 19 | */ |
20 | typedef struct _Elm_Progressbar_Smart_Data Elm_Progressbar_Smart_Data; | 20 | typedef struct _Elm_Progressbar_Smart_Data Elm_Progressbar_Smart_Data; |
21 | typedef struct _Elm_Progress_Status Elm_Progress_Status; | ||
22 | |||
21 | struct _Elm_Progressbar_Smart_Data | 23 | struct _Elm_Progressbar_Smart_Data |
22 | { | 24 | { |
23 | Evas_Object *spacer; | 25 | Evas_Object *spacer; |
@@ -30,11 +32,18 @@ struct _Elm_Progressbar_Smart_Data | |||
30 | Eina_Bool inverted : 1; | 32 | Eina_Bool inverted : 1; |
31 | Eina_Bool pulse : 1; | 33 | Eina_Bool pulse : 1; |
32 | Eina_Bool pulse_state : 1; | 34 | Eina_Bool pulse_state : 1; |
35 | Eina_List *progress_status; | ||
33 | 36 | ||
34 | char *(*unit_format_func)(double val); | 37 | char *(*unit_format_func)(double val); |
35 | void (*unit_format_free)(char *str); | 38 | void (*unit_format_free)(char *str); |
36 | }; | 39 | }; |
37 | 40 | ||
41 | struct _Elm_Progress_Status | ||
42 | { | ||
43 | const char *part_name; | ||
44 | double val; | ||
45 | }; | ||
46 | |||
38 | /** | 47 | /** |
39 | * @} | 48 | * @} |
40 | */ | 49 | */ |