summaryrefslogtreecommitdiff
path: root/layout/mp-play-current-playing.edc
blob: aa35411175bd28fd797bb1494f2abdac43cb2eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
/*
 * Copyright 2012  Samsung Electronics Co., Ltd
 *
 * Licensed under the Flora License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.tizenopensource.org/license
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */



#define MP_NOW_PLAYING

#define MP_NOW_PLAYING_W 		720.
#define MP_NOW_PLAYING_H 		100.

#define MP_NOW_PLAYING_THUMB_SX		32
#define MP_NOW_PLAYING_THUMB_SY		12
#define MP_NOW_PLAYING_THUMB_SIZE		72
#define MP_NOW_PLAYING_THUMB_EX		(MP_NOW_PLAYING_THUMB_SX+MP_NOW_PLAYING_THUMB_SIZE)
#define MP_NOW_PLAYING_THUMB_EY		(MP_NOW_PLAYING_THUMB_SY+MP_NOW_PLAYING_THUMB_SIZE)

#define MP_NOW_PLAYING_LABEL_SX		140
#define MP_NOW_PLAYING_LABEL_SY		14
#define MP_NOW_PLAYING_LABEL_EX		(686)
#define MP_NOW_PLAYING_LABEL_EY		(MP_NOW_PLAYING_LABEL_SY+38)

#define MP_NOW_PLAYING_PROGRESS_SX		MP_NOW_PLAYING_LABEL_SX
#define MP_NOW_PLAYING_PROGRESS_SY		70
#define MP_NOW_PLAYING_PROGRESS_EX		(MP_NOW_PLAYING_PROGRESS_SX+490)
#define MP_NOW_PLAYING_PROGRESS_EY		(MP_NOW_PLAYING_PROGRESS_SY+10)

#define MP_NOW_PLAYING_PLAYING_ICON_SX		(670)
#define MP_NOW_PLAYING_PLAYING_ICON_SY		(65)
#define MP_NOW_PLAYING_PLAYING_ICON_EX		(MP_NOW_PLAYING_PLAYING_ICON_SX+20)
#define MP_NOW_PLAYING_PLAYING_ICON_EY		(MP_NOW_PLAYING_PLAYING_ICON_SY+20)

#define MP_NOW_PLAYING_FONT_SIZE 		32


group {
	name: "mp_now_playing";

	images {
		image : "T02_now_playing_bar.png" COMP;
		image: "T02_now_playing_icon_play.png" COMP;
		image: "T02_now_playing_icon_pause.png" COMP;
	}

	parts {
		part {
			name: "now_playing_bg";
			type : IMAGE;
			scale: 1;
			mouse_events: 1;
			description {
				state: "default" 0.0;
				min: 0 MP_NOW_PLAYING_H;
				fixed: 0 1;
				align: 0 0;
				rel1 { relative: 0.0 0.0; }
				rel2 { relative: 1.0 1.0; }
				image { normal: "T02_now_playing_bar.png"; }
			}
		}	//now_playing_bg

		part { name: "thumb_image";
			type : SWALLOW;
			scale: 1;
			mouse_events: 0;
			description { state: "default" 0.0;
				visible: 1;
				fixed: 1 1;
				align: 0 0;
				rel1 { relative: MP_NOW_PLAYING_THUMB_SX/MP_NOW_PLAYING_W MP_NOW_PLAYING_THUMB_SY/MP_NOW_PLAYING_H; }
				rel2 { relative: MP_NOW_PLAYING_THUMB_EX/MP_NOW_PLAYING_W MP_NOW_PLAYING_THUMB_EY/MP_NOW_PLAYING_H; }
			}
		}

		part { name: "innerline.top";
			type: RECT;
			scale: 1;
			mouse_events: 0;
			description { state: "default" 0.0;
				visible: 1;
				fixed: 1 1;
				align: 0 0;
				min: 1 1;
				rel1 {relative: 0.0 0.0; to, "thumb_image";}
				rel2 {relative: 1.0 0.0; to, "thumb_image";}
				color: 0 0 0 255;
			}
		}

		part { name: "innerline.bottom";
			type: RECT;
			scale: 1;
			mouse_events: 0;
			description { state: "default" 0.0;
				visible: 1;
				fixed: 1 1;
				align: 0 0;
				min: 1 1;
				rel1 {relative: 0.0 1.0; to, "thumb_image";}
				rel2 {relative: 1.0 1.0; to, "thumb_image";}
				color: 0 0 0 255;
			}
		}

		part { name: "innerline.left";
			type: RECT;
			scale: 1;
			mouse_events: 0;
			description { state: "default" 0.0;
				visible: 1;
				fixed: 1 1;
				align: 0 0;
				min: 1 1;
				rel1 {relative: 0.0 0.0; to, "thumb_image";}
				rel2 {relative: 0.0 1.0; to, "thumb_image";}
				color: 0 0 0 255;
			}
		}

		part { name: "innerline.right";
			type: RECT;
			scale: 1;
			mouse_events: 0;
			description { state: "default" 0.0;
				visible: 1;
				fixed: 1 1;
				align: 0 0;
				min: 1 1;
				rel1 {relative: 1.0 0.0; to, "thumb_image";}
				rel2 {relative: 1.0 1.0; to, "thumb_image";}
				color: 0 0 0 255;
			}
		}

		part {
			name: "now_playing_label";
			type : TEXT;
			scale: 1;
			mouse_events: 0;
			description {
				state: "default" 0.0;
				color: 255 255 255 255;
				rel1 { relative: MP_NOW_PLAYING_LABEL_SX/MP_NOW_PLAYING_W MP_NOW_PLAYING_LABEL_SY/MP_NOW_PLAYING_H; }
				rel2 { relative: MP_NOW_PLAYING_LABEL_EX/MP_NOW_PLAYING_W MP_NOW_PLAYING_LABEL_EY/MP_NOW_PLAYING_H; }
				text {
					font: FONT_STYLE_MEDIUM;
					size: MP_NOW_PLAYING_FONT_SIZE;
					align: 0 0.5;
					text: "Title / Artist";
              	      		}
			}
		}

		part { name: "progress_bar";
			type : SWALLOW;
			scale: 1;
			mouse_events: 0;
			description { state: "default" 0.0;
				visible: 1;
				fixed: 1 1;
				align: 0 0;
				rel1 { relative: MP_NOW_PLAYING_PROGRESS_SX/MP_NOW_PLAYING_W MP_NOW_PLAYING_PROGRESS_SY/MP_NOW_PLAYING_H; }
				rel2 { relative: MP_NOW_PLAYING_PROGRESS_EX/MP_NOW_PLAYING_W MP_NOW_PLAYING_PROGRESS_EY/MP_NOW_PLAYING_H; }
			}
		}

		part { name: "playing_icon";
			type : IMAGE;
			scale: 1;
			mouse_events: 1;
			description {
				state: "default" 0.0;
				fixed: 0 1;
				align: 0 0;
				rel1 { relative: MP_NOW_PLAYING_PLAYING_ICON_SX/MP_NOW_PLAYING_W MP_NOW_PLAYING_PLAYING_ICON_SY/MP_NOW_PLAYING_H; }
				rel2 { relative: MP_NOW_PLAYING_PLAYING_ICON_EX/MP_NOW_PLAYING_W MP_NOW_PLAYING_PLAYING_ICON_EY/MP_NOW_PLAYING_H; }
				image { normal: "T02_now_playing_icon_play.png"; }
			}
			description {
				state: "pause" 0.0;
				fixed: 0 1;
				align: 0 0;
				rel1 { relative: MP_NOW_PLAYING_PLAYING_ICON_SX/MP_NOW_PLAYING_W MP_NOW_PLAYING_PLAYING_ICON_SY/MP_NOW_PLAYING_H; }
				rel2 { relative: MP_NOW_PLAYING_PLAYING_ICON_EX/MP_NOW_PLAYING_W MP_NOW_PLAYING_PLAYING_ICON_EY/MP_NOW_PLAYING_H; }
				image { normal: "T02_now_playing_icon_pause.png"; }
			}
		}

	}	//parts

	programs {
		program {
			name: "now_playing_clicked";
			source: "now_playing_bg";
			signal: "mouse,clicked,1";
			action: SIGNAL_EMIT "now_playing_clicked" 0.0;
		}
		program {
			name: "pause";
			source: "playing_icon";
			signal: "pause";
			action: STATE_SET "pause" 0.0;
			target: "playing_icon";
		}
		program {
			name: "play";
			source: "playing_icon";
			signal: "play";
			action: STATE_SET "default" 0.0;
			target: "playing_icon";
		}
	}

}