}
}
}
-
-#define CIRCLE_PROGRESSING_DELAY 0.03
-#define PROGRESS_CIRCLE_TOTAL_STATES 50
-
-#define PROGRESS_CIRCLE_BG_DESC( param_num ) \
- description { state: "progress" 0.#param_num; \
- inherit: "default" 0.0; \
- image { \
- normal: "00_progress_circle_bg_"#param_num".png"; \
- } \
- }
-
- group { name: "elm/progressbar/horizontal/progress_circle";
- images {
- image: "00_progress_circle_bg.png" COMP;
- image: "00_progress_circle_bg_01.png" COMP;
- image: "00_progress_circle_bg_02.png" COMP;
- image: "00_progress_circle_bg_03.png" COMP;
- image: "00_progress_circle_bg_04.png" COMP;
- image: "00_progress_circle_bg_05.png" COMP;
- image: "00_progress_circle_bg_06.png" COMP;
- image: "00_progress_circle_bg_07.png" COMP;
- image: "00_progress_circle_bg_08.png" COMP;
- image: "00_progress_circle_bg_09.png" COMP;
- image: "00_progress_circle_bg_10.png" COMP;
- image: "00_progress_circle_bg_11.png" COMP;
- image: "00_progress_circle_bg_12.png" COMP;
- image: "00_progress_circle_bg_13.png" COMP;
- image: "00_progress_circle_bg_14.png" COMP;
- image: "00_progress_circle_bg_15.png" COMP;
- image: "00_progress_circle_bg_16.png" COMP;
- image: "00_progress_circle_bg_17.png" COMP;
- image: "00_progress_circle_bg_18.png" COMP;
- image: "00_progress_circle_bg_19.png" COMP;
- image: "00_progress_circle_bg_20.png" COMP;
- image: "00_progress_circle_bg_21.png" COMP;
- image: "00_progress_circle_bg_22.png" COMP;
- image: "00_progress_circle_bg_23.png" COMP;
- image: "00_progress_circle_bg_24.png" COMP;
- image: "00_progress_circle_bg_25.png" COMP;
- image: "00_progress_circle_bg_26.png" COMP;
- image: "00_progress_circle_bg_27.png" COMP;
- image: "00_progress_circle_bg_28.png" COMP;
- image: "00_progress_circle_bg_29.png" COMP;
- image: "00_progress_circle_bg_30.png" COMP;
- image: "00_progress_circle_bg_31.png" COMP;
- image: "00_progress_circle_bg_32.png" COMP;
- image: "00_progress_circle_bg_33.png" COMP;
- image: "00_progress_circle_bg_34.png" COMP;
- image: "00_progress_circle_bg_35.png" COMP;
- image: "00_progress_circle_bg_36.png" COMP;
- image: "00_progress_circle_bg_37.png" COMP;
- image: "00_progress_circle_bg_38.png" COMP;
- image: "00_progress_circle_bg_39.png" COMP;
- image: "00_progress_circle_bg_40.png" COMP;
- image: "00_progress_circle_bg_41.png" COMP;
- image: "00_progress_circle_bg_42.png" COMP;
- image: "00_progress_circle_bg_43.png" COMP;
- image: "00_progress_circle_bg_44.png" COMP;
- image: "00_progress_circle_bg_45.png" COMP;
- image: "00_progress_circle_bg_46.png" COMP;
- image: "00_progress_circle_bg_47.png" COMP;
- image: "00_progress_circle_bg_48.png" COMP;
- image: "00_progress_circle_bg_49.png" COMP;
- image: "00_progress_circle_bg_50.png" COMP;
- }
- parts {
- part { name: "access";
- type: RECT;
- description { state: "default" 0.0;
- fixed: 1 1;
- color: 0 0 0 0;
- }
- }
- part { name: "elm.background.progressbar";
- mouse_events: 0;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- }
- }
- part { name: "elm.swallow.bar";
- mouse_events: 0;
- scale: 1;
- type: SWALLOW;
- description { state: "default" 0.0;
- min: 0 0;
- max: 0 0;
- visible: 0;
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 0;
- max: 0 0;
- visible: 0;
- }
- }
- part { name: "elm.cur.progressbar";
- mouse_events: 0;
- scale: 1;
- dragable {
- confine: "background";
- x: 1 1 1;
- y: 0 0 0;
- }
- description { state: "default" 0.0;
- min: 1 1;
- fixed: 1 1;
- visible: 0;
- rel1.to: "background";
- rel2.to: "background";
- }
- }
- part { name: "background";
- mouse_events: 0;
- scale: 1;
- clip_to: "elm.background.progressbar";
- description {
- state: "default" 0.0;
- min: PROGRESSBAR_PROGRESS_CIRCLE_BG_SIZE_INC;
- max: PROGRESSBAR_PROGRESS_CIRCLE_BG_SIZE_INC;
- aspect: 1.0 1.0;
- aspect_preference: BOTH;
- image {
- normal: "00_progress_circle_bg.png";
- }
- }
- }
- part { name: "progress_circle_img";
- mouse_events: 0;
- scale: 1;
- clip_to: "elm.background.progressbar";
- description {
- state: "default" 0.0;
- rel1 {
- to: "background";
- }
- rel2 {
- to: "background";
- }
- aspect: 1.0 1.0;
- aspect_preference: BOTH;
- image {
- normal: "00_progress_circle_bg.png";
- }
- }
- description { state: "progress" 0.0;
- inherit: "default" 0.0;
- image {
- normal: "00_progress_circle_bg.png";
- }
- }
- PROGRESS_CIRCLE_BG_DESC( 01 )
- PROGRESS_CIRCLE_BG_DESC( 02 )
- PROGRESS_CIRCLE_BG_DESC( 03 )
- PROGRESS_CIRCLE_BG_DESC( 04 )
- PROGRESS_CIRCLE_BG_DESC( 05 )
- PROGRESS_CIRCLE_BG_DESC( 06 )
- PROGRESS_CIRCLE_BG_DESC( 07 )
- PROGRESS_CIRCLE_BG_DESC( 08 )
- PROGRESS_CIRCLE_BG_DESC( 09 )
- PROGRESS_CIRCLE_BG_DESC( 10 )
- PROGRESS_CIRCLE_BG_DESC( 11 )
- PROGRESS_CIRCLE_BG_DESC( 12 )
- PROGRESS_CIRCLE_BG_DESC( 13 )
- PROGRESS_CIRCLE_BG_DESC( 14 )
- PROGRESS_CIRCLE_BG_DESC( 15 )
- PROGRESS_CIRCLE_BG_DESC( 16 )
- PROGRESS_CIRCLE_BG_DESC( 17 )
- PROGRESS_CIRCLE_BG_DESC( 18 )
- PROGRESS_CIRCLE_BG_DESC( 19 )
- PROGRESS_CIRCLE_BG_DESC( 20 )
- PROGRESS_CIRCLE_BG_DESC( 21 )
- PROGRESS_CIRCLE_BG_DESC( 22 )
- PROGRESS_CIRCLE_BG_DESC( 23 )
- PROGRESS_CIRCLE_BG_DESC( 24 )
- PROGRESS_CIRCLE_BG_DESC( 25 )
- PROGRESS_CIRCLE_BG_DESC( 26 )
- PROGRESS_CIRCLE_BG_DESC( 27 )
- PROGRESS_CIRCLE_BG_DESC( 28 )
- PROGRESS_CIRCLE_BG_DESC( 29 )
- PROGRESS_CIRCLE_BG_DESC( 30 )
- PROGRESS_CIRCLE_BG_DESC( 31 )
- PROGRESS_CIRCLE_BG_DESC( 32 )
- PROGRESS_CIRCLE_BG_DESC( 33 )
- PROGRESS_CIRCLE_BG_DESC( 34 )
- PROGRESS_CIRCLE_BG_DESC( 35 )
- PROGRESS_CIRCLE_BG_DESC( 36 )
- PROGRESS_CIRCLE_BG_DESC( 37 )
- PROGRESS_CIRCLE_BG_DESC( 38 )
- PROGRESS_CIRCLE_BG_DESC( 39 )
- PROGRESS_CIRCLE_BG_DESC( 40 )
- PROGRESS_CIRCLE_BG_DESC( 41 )
- PROGRESS_CIRCLE_BG_DESC( 42 )
- PROGRESS_CIRCLE_BG_DESC( 43 )
- PROGRESS_CIRCLE_BG_DESC( 44 )
- PROGRESS_CIRCLE_BG_DESC( 45 )
- PROGRESS_CIRCLE_BG_DESC( 46 )
- PROGRESS_CIRCLE_BG_DESC( 47 )
- PROGRESS_CIRCLE_BG_DESC( 48 )
- PROGRESS_CIRCLE_BG_DESC( 49 )
- PROGRESS_CIRCLE_BG_DESC( 50 )
- }
- }
- programs {
- script {
- public curr_state = 0;
- public final_state = 0;
- public prev_state = 0;
- public max_state = 0; // maximum possible state, a normalized value
- public circle_zero_cross = 0; // whether circle crosses its Zero state or not.
-
- public progress_circle_state_change(){
- new Float:x, Float:y, Float:final, Float:max;
- max = PROGRESS_CIRCLE_TOTAL_STATES / 100.0;
- set_float(max_state, max);
- get_drag(PART:"elm.cur.progressbar", x, y);
- final = x * max; // calculate final state as per the set drag value
- set_float(final_state, final);
- if( final < get_float(prev_state) )
- set_int(circle_zero_cross, 1); // high value to low value, crosses zero state.
- else
- set_int(circle_zero_cross, 0); // low value to high value, no need for zero state crossing.
- }
- }
- program { name: "circle_progress";
- script {
- new Float:curr, Float:final, Float:max;
- new zero_cross;
- zero_cross = get_int(circle_zero_cross);
- max = get_float(max_state);
- curr = get_float(curr_state);
- set_state(PART:"progress_circle_img", "progress", curr);
- curr += 0.01; // for next immediate state.
- if( (curr > max) && (zero_cross == 1) )
- {
- curr = 0.00; // once it crosses Zero state, reset its state.
- set_int(circle_zero_cross, 0);
- }
- else if( curr > max ) return;
-
- final = get_float(final_state);
- zero_cross = get_int(circle_zero_cross);
- if( (curr > final) && (zero_cross == 0) )
- {
- set_float(prev_state, get_float(curr_state));
- return;
- }
- set_float(curr_state, curr);
- }
- after: "delay";
- }
- program { name: "delay";
- action: STATE_SET "progress" 0.10;
- target: "progress_circle_img";
- in: CIRCLE_PROGRESSING_DELAY 0.0;
- after: "circle_progress";
- }
- program { name: "circle_start";
- signal: "elm,state,pulse,start";
- source: "elm";
- script {
- set_float(curr_state, 0.0);
- }
- after: "circle_progress";
- }
- program { name: "circle_stop";
- signal: "elm,state,pulse,stop";
- source: "elm";
- action: ACTION_STOP;
- target: "circle_progress";
- target: "delay";
- target: "circle_start";
- }
- program { name: "circle_state_change";
- signal: "elm,state,change";
- source: "elm";
- script {
- progress_circle_state_change()
- }
- after: "circle_progress";
- }
- }
- }