#define PART_DETAIL_CONTENT_INFO "part.detail_content_info"
#define PART_DETAIL_THUMBNAIL_AREA "part.detail_thumbnail_area"
#define PART_DETAIL_PLAY_INFO "part.detail_play_info"
+#define PART_PLAY_INFO_STATUS "part.play_info_status"
/* signal */
#define SIG_SHOW_THUMBNAIL "show,thumbnail"
#define SIG_SET_STATUS_STOP "set,stop"
/* images */
-#define IMAGE_MINI_PLAYER_PLAY "ic_mini_player_play_nor.png"
-#define IMAGE_MINI_PLAYER_PAUSE "ic_mini_player_pause.png"
+#define IMAGE_MINI_PLAYER_PLAY_NOR "ic_mini_player_play_nor.png"
+#define IMAGE_MINI_PLAYER_PLAY_FOC "ic_mini_player_play_foc.png"
+#define IMAGE_MINI_PLAYER_PAUSE_NOR "ic_mini_player_pause.png"
+#define IMAGE_MINI_PLAYER_PAUSE_FOC "ic_mini_player_pause_foc.png"
/* style */
#define STYLE_BTN_PLAY_INFO "detail_btn_play_info"
#define STATE_PLAY 0
#define STATE_PAUSE 1
+#define STATE_STOP 2
#define STATE_EN 0
#define STATE_DIS 1
name: "elm/button/base/detail_btn_play_info";
data.item: "focus_highlight" "on";
images {
- image: IMAGE_MINI_PLAYER_PLAY COMP;
- image: IMAGE_MINI_PLAYER_PAUSE COMP;
+ image: IMAGE_MINI_PLAYER_PLAY_NOR COMP;
+ image: IMAGE_MINI_PLAYER_PLAY_FOC COMP;
+ image: IMAGE_MINI_PLAYER_PAUSE_NOR COMP;
+ image: IMAGE_MINI_PLAYER_PAUSE_FOC COMP;
+ }
+ script {
+ public cur_state;
}
parts {
part {
relative: 1.0 1.0;
}
rel2.to: "padding_status";
- image.normal: IMAGE_MINI_PLAYER_PLAY;
+ image.normal: IMAGE_MINI_PLAYER_PLAY_NOR;
min: 0 54;
align: 0.0 0.0;
fixed: 1 1;
min: 54 54;
}
description {
+ state: "focused_play" 0.0;
+ inherit: "play" 0.0;
+ image.normal: IMAGE_MINI_PLAYER_PLAY_FOC;
+ }
+ description {
state: "pause" 0.0;
inherit: "play" 0.0;
- image.normal: IMAGE_MINI_PLAYER_PAUSE;
+ image.normal: IMAGE_MINI_PLAYER_PAUSE_NOR;
+ }
+ description {
+ state: "focused_pause" 0.0;
+ inherit: "play";
+ image.normal: IMAGE_MINI_PLAYER_PAUSE_FOC;
}
}
part {
}
programs {
program {
+ name: "load";
+ signal: "load";
+ source: "";
+ script {
+ set_int(cur_state, STATE_STOP);
+ }
+ }
+ program {
name: "button_clicked";
signal: "mouse,clicked,1";
source: "event";
action: SIGNAL_EMIT "elm.action,click" "";
}
program {
- name: "focused";
- signal: "elm,action,focus";
- source: "elm";
+ name: "go_active";
+ signal: SIG_ELM_FOCUS;
+ source: SIG_SOURCE_ELM;
+ script {
+ new state;
+ state = get_int(cur_state);
+
+ if (state == STATE_PLAY) {
+ set_state(PART:PART_PLAY_INFO_STATUS,
+ "focused_play", 0.0);
+ } else if (state == STATE_PAUSE) {
+ set_state(PART:PART_PLAY_INFO_STATUS,
+ "focused_pause", 0.0);
+ }
+
+ run_program(PROGRAM:"focus,anim");
+ }
+ }
+ program {
+ name: "go_passive";
+ signal: SIG_ELM_UNFOCUS;
+ source: SIG_SOURCE_ELM;
+ script {
+ new state;
+ state = get_int(cur_state);
+
+ if (state == STATE_PLAY) {
+ set_state(PART:PART_PLAY_INFO_STATUS,
+ "play", 0.0);
+ } else if (state == STATE_PAUSE) {
+ set_state(PART:PART_PLAY_INFO_STATUS,
+ "pause", 0.0);
+ }
+
+ run_program(PROGRAM:"unfocus,anim");
+ }
+ }
+ program {
+ name: "focus,anim";
action: STATE_SET "focused" 0.0;
target: "bg";
target: "elm.text";
transition: TRANSITION_FOCUS;
}
program {
- name: "unfocused";
- signal: "elm,action,unfocus";
- source: "elm";
+ name: "unfocus,anim";
action: STATE_SET "default" 0.0;
target: "bg";
target: "elm.text";
name: SIG_SET_STATUS_PLAY;
signal: SIG_SET_STATUS_PLAY;
source: SIG_SOURCE_SRC;
- action: STATE_SET "play" 0.0;
- target: PART_PLAY_INFO_STATUS;
- target: "padding_text";
+ script {
+ set_int(cur_state, STATE_PLAY);
+ set_state(PART:PART_PLAY_INFO_STATUS, "play", 0.0);
+ set_state(PART:"padding_text", "play", 0.0);
+ }
}
program {
name: SIG_SET_STATUS_PAUSE;
signal: SIG_SET_STATUS_PAUSE;
source: SIG_SOURCE_SRC;
- action: STATE_SET "pause" 0.0;
- target: PART_PLAY_INFO_STATUS;
- target: "padding_text";
+ script {
+ set_int(cur_state, STATE_PAUSE);
+ set_state(PART:PART_PLAY_INFO_STATUS, "pause", 0.0);
+ set_state(PART:"padding_text", "pause", 0.0);
+ }
}
program {
name: SIG_SET_STATUS_STOP;
signal: SIG_SET_STATUS_STOP;
source: SIG_SOURCE_SRC;
- action: STATE_SET "default" 0.0;
- target: PART_PLAY_INFO_STATUS;
- target: "padding_text";
+ script {
+ set_int(cur_state, STATE_STOP);
+ set_state(PART:PART_PLAY_INFO_STATUS, "default", 0.0);
+ set_state(PART:"padding_text", "default", 0.0);
+ }
}
}
}