Add status icon
[profile/tv/apps/native/air_livetv.git] / data / view / channelinfo.edc
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http,//www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #include "../../include/define.h"
18
19 group {
20         name, GRP_VIEW_CHANNELINFO;
21         parts {
22                 part {
23                         name, PART_CONTENT;
24                         type, SWALLOW;
25                         scale, 1;
26                         description {
27                                 state, "default" 0.0;
28                                 rel1.relative, 1.0 0.0;
29                                 rel2.relative, 1.0 1.0;
30                                 min, 536 0;
31                                 align, 1.0 0.5;
32                                 fixed, 1 0;
33                         }
34                 }
35         }
36 }
37
38 group {
39         name, GRP_CHANNELINFO_LIST;
40         images {
41                 image, "btn_navigation_up.png" COMP;
42                 image, "btn_navigation_down.png" COMP;
43         }
44         parts {
45                 part {
46                         name, "bg";
47                         type, SPACER;
48                         scale, 1;
49                         description {
50                                 state, "default" 0.0;
51                                 rel1.relative, 0.0 0.5;
52                                 rel2.relative, 0.0 0.5;
53                                 min, 536 486;
54                                 align, 0.0 0.5;
55                                 fixed, 1 1;
56                         }
57                 }
58                 part {
59                         name, "part.navigation_up";
60                         type, IMAGE;
61                         scale, 1;
62                         description {
63                                 image.normal, "btn_navigation_up.png";
64                                 rel1 {
65                                         to, "bg";
66                                         relative, 0.5 0.0;
67                                 }
68                                 rel2 {
69                                         to, "bg";
70                                         relative, 0.5 0.0;
71                                 }
72                                 min, 98 34;
73                                 align, 0.5 0.0;
74                                 fixed, 1 1;
75                                 visible, 1;
76                         }
77                 }
78                 part {
79                         name, "padding.next_channel";
80                         type, SPACER;
81                         description {
82                                 rel1 {
83                                         to_y, "part.navigation_up";
84                                         relative, 0.0 1.0;
85                                 }
86                                 rel2 {
87                                         to_y, "part.navigation_up";
88                                         relative, 1.0 1.0;
89                                 }
90                                 min, 0 20;
91                                 align, 0.0 0.0;
92                                 fixed, 1 1;
93                         }
94                 }
95                 part {
96                         name, PART_CHANNELINFO_LIST_NEXT;
97                         type, SWALLOW;
98                         description {
99                                 rel1 {
100                                         to_y, "padding.next_channel";
101                                         relative, 0.0 1.0;
102                                 }
103                                 rel2 {
104                                         to_y, "padding.next_channel";
105                                         relative, 1.0 1.0;
106                                 }
107                                 min, 536 70;
108                                 align, 0.0 0.0;
109                                 fixed, 1 1;
110                         }
111                 }
112                 part {
113                         name, "padding.current_channel";
114                         type, SPACER;
115                         description {
116                                 rel1 {
117                                         to_y, PART_CHANNELINFO_LIST_NEXT;
118                                         relative, 0.0 1.0;
119                                 }
120                                 rel2 {
121                                         to_y, PART_CHANNELINFO_LIST_NEXT;
122                                         relative, 1.0 1.0;
123                                 }
124                                 min, 0 32;
125                                 align, 0.0 0.0;
126                                 fixed, 1 1;
127                         }
128                 }
129                 part {
130                         name, PART_CHANNELINFO_LIST_CURRENT;
131                         type, SWALLOW;
132                         description {
133                                 rel1 {
134                                         to_y, "padding.current_channel";
135                                         relative, 0.0 1.0;
136                                 }
137                                 rel2 {
138                                         to_y, "padding.current_channel";
139                                         relative, 1.0 1.0;
140                                 }
141                                 min, 536 174;
142                                 align, 0.0 0.0;
143                                 fixed, 1 1;
144                         }
145                 }
146                 part {
147                         name, "padding.prev_channel";
148                         type, SPACER;
149                         description {
150                                 rel1 {
151                                         to_y, PART_CHANNELINFO_LIST_CURRENT;
152                                         relative, 0.0 1.0;
153                                 }
154                                 rel2 {
155                                         to_y, PART_CHANNELINFO_LIST_CURRENT;
156                                         relative, 1.0 1.0;
157                                 }
158                                 min, 0 32;
159                                 align, 0.0 0.0;
160                                 fixed, 1 1;
161                         }
162                 }
163                 part {
164                         name, PART_CHANNELINFO_LIST_PREV;
165                         type, SWALLOW;
166                         description {
167                                 rel1 {
168                                         to_y, "padding.prev_channel";
169                                         relative, 0.0 1.0;
170                                 }
171                                 rel2 {
172                                         to_y, "padding.prev_channel";
173                                         relative, 1.0 1.0;
174                                 }
175                                 min, 536 70;
176                                 align, 0.0 0.0;
177                                 fixed, 1 1;
178                         }
179                 }
180                 part {
181                         name, "padding.navigation_down";
182                         type, SPACER;
183                         description {
184                                 rel1 {
185                                         to_y, PART_CHANNELINFO_LIST_PREV;
186                                         relative, 0.0 1.0;
187                                 }
188                                 rel2 {
189                                         to_y, PART_CHANNELINFO_LIST_PREV;
190                                         relative, 1.0 1.0;
191                                 }
192                                 min, 0 20;
193                                 align, 0.0 0.0;
194                                 fixed, 1 1;
195                         }
196                 }
197                 part {
198                         name, "part.navigation_down";
199                         type, IMAGE;
200                         scale, 1;
201                         description {
202                                 image.normal, "btn_navigation_down.png";
203                                 rel1 {
204                                         to_y, "padding.navigation_down";
205                                         relative, 0.5 1.0;
206                                 }
207                                 rel2 {
208                                         to_y, "padding.navigation_down";
209                                         relative, 0.5 1.0;
210                                 }
211                                 min, 98 34;
212                                 align, 0.5 0.0;
213                                 fixed, 1 1;
214                                 visible, 1;
215                         }
216                 }
217         }
218 }
219
220 group {
221         name, GRP_CHANNELINFO;
222         images {
223                 image, "ic_thumbnail_favorite_01.png" COMP;
224                 image, "ic_thumbnail_lock_01_foc.png" COMP;
225                 image, "ic_thumbnail_lock_01_nor.png" COMP;
226         }
227         script {
228                 public is_locked=0, is_favorite=0, is_focused=0;
229
230                 public set_states() {
231                         new focused;
232                         new locked;
233                         new favorite;
234
235                         focused = get_int(is_focused);
236                         locked = get_int(is_locked);
237                         favorite = get_int(is_favorite);
238
239                         if (locked == 1) {
240                                 if (focused == 1)
241                                         run_program(PROGRAM:"do_focus_locked");
242                                 else
243                                         run_program(PROGRAM:"do_locked");
244                         }
245
246                         if (favorite == 1)
247                                 run_program(PROGRAM:"do_favorite");
248                 }
249         }
250         parts {
251                 part {
252                         name, "bg";
253                         type, RECT;
254                         scale, 1;
255                         description {
256                                 state, "default" 0.0;
257                                 rel1.relative, 0.0 0.5;
258                                 rel2.relative, 0.0 0.5;
259                                 min, 536 174;
260                                 align, 0.0 0.5;
261                         }
262                         description {
263                                 state, "focused" 0.0;
264                                 inherit, "default" 0.0;
265                                 color, COLOR_BG_FOCUSED;
266                         }
267                 }
268                 part {
269                         name, "padding.left_top";
270                         type, SPACER;
271                         scale, 1;
272                         description {
273                                 state, "default" 0.0;
274                                 rel1 {
275                                         to, "bg";
276                                         relative, 0.0 0.0;
277                                 }
278                                 rel2 {
279                                         to, "bg";
280                                         relative, 0.0 0.0;
281                                 }
282                                 min, 28 26;
283                                 align, 0.0 0.0;
284                                 fixed, 1 1;
285                         }
286                 }
287                 part {
288                         name, PART_CHANNELINFO_CHANNEL;
289                         type, TEXT;
290                         scale, 1;
291                         description {
292                                 state, "default" 0.0;
293                                 rel1 {
294                                         to, "padding.left_top";
295                                         relative, 1.0 1.0;
296                                 }
297                                 rel2 {
298                                         to, "padding.left_top";
299                                         relative, 1.0 1.0;
300                                 }
301                                 text {
302                                         font, FONT_LIGHT;
303                                         size, 28;
304                                         align, 0.0 0.5;
305                                 }
306                                 color, COLOR_TEXT_NORMAL;
307                                 min, 344 32;
308                                 align, 0.0 0.0;
309                                 fixed, 1 1;
310                         }
311                         description {
312                                 state, "focused" 0.0;
313                                 inherit, "default" 0.0;
314                                 color, COLOR_TEXT_FOCUSED;
315                         }
316                 }
317                 part {
318                         name, "padding.title";
319                         type, SPACER;
320                         scale, 1;
321                         description {
322                                 state, "default" 0.0;
323                                 rel1 {
324                                         to, PART_CHANNELINFO_CHANNEL;
325                                         relative, 0.0 1.0;
326                                 }
327                                 rel2 {
328                                         to, PART_CHANNELINFO_CHANNEL;
329                                         relative, 0.0 1.0;
330                                 }
331                                 min, 0 6;
332                                 align, 0.0 0.0;
333                                 fixed, 1 1;
334                         }
335                 }
336                 part {
337                         name, PART_CHANNELINFO_TITLE;
338                         type, TEXT;
339                         scale, 1;
340                         description {
341                                 state, "default" 0.0;
342                                 rel1 {
343                                         to, "padding.title";
344                                         relative, 0.0 1.0;
345                                 }
346                                 rel2 {
347                                         to, "padding.title";
348                                         relative, 0.0 1.0;
349                                 }
350                                 text {
351                                         font, FONT_LIGHT;
352                                         size, 28;
353                                         align, 0.0 0.5;
354                                 }
355                                 color, COLOR_TEXT_NORMAL;
356                                 min, 484 32;
357                                 align, 0.0 0.0;
358                                 fixed, 1 1;
359                         }
360                         description {
361                                 state, "focused" 0.0;
362                                 inherit, "default" 0.0;
363                                 color, COLOR_TEXT_FOCUSED;
364                         }
365                 }
366                 part {
367                         name, "padding.time";
368                         type, SPACER;
369                         scale, 1;
370                         description {
371                                 state, "default" 0.0;
372                                 rel1 {
373                                         to, PART_CHANNELINFO_TITLE;
374                                         relative, 0.0 1.0;
375                                 }
376                                 rel2 {
377                                         to, PART_CHANNELINFO_TITLE;
378                                         relative, 0.0 1.0;
379                                 }
380                                 min, 0 24;
381                                 align, 0.0 0.0;
382                                 fixed, 1 1;
383                         }
384                 }
385                 part {
386                         name, PART_CHANNELINFO_TIME;
387                         type, TEXT;
388                         scale, 1;
389                         description {
390                                 state, "default" 0.0;
391                                 rel1 {
392                                         to, "padding.time";
393                                         relative, 0.0 1.0;
394                                 }
395                                 rel2 {
396                                         to, "padding.time";
397                                         relative, 0.0 1.0;
398                                 }
399                                 text {
400                                         font, FONT_LIGHT;
401                                         size, 28;
402                                         align, 0.0 0.5;
403                                 }
404                                 color, 112 112 112 255;
405                                 min, 484 28;
406                                 align, 0.0 0.0;
407                                 fixed, 1 1;
408                         }
409                         description {
410                                 state, "focused" 0.0;
411                                 inherit, "default" 0.0;
412                                 color, COLOR_TEXT_FOCUSED;
413                         }
414                 }
415                 part {
416                         name, "padding.right_top";
417                         type, SPACER;
418                         scale, 1;
419                         description {
420                                 state, "default" 0.0;
421                                 rel1 {
422                                         to, "bg";
423                                         relative, 1.0 0.0;
424                                 }
425                                 rel2 {
426                                         to, "bg";
427                                         relative, 1.0 0.0;
428                                 }
429                                 min, 22 28;
430                                 align, 1.0 0.0;
431                                 fixed, 1 1;
432                         }
433                 }
434                 part {
435                         name, PART_CHANNELINFO_STATUS;
436                         type, SPACER;
437                         scale, 1;
438                         description {
439                                 state, "default" 0.0;
440                                 rel1 {
441                                         to, "padding.right_top";
442                                         relative, 0.0 1.0;
443                                 }
444                                 rel2 {
445                                         to, "padding.right_top";
446                                         relative, 0.0 1.0;
447                                 }
448                                 min, 142 28;
449                                 align, 1.0 0.0;
450                                 fixed, 1 1;
451                         }
452
453                         part {
454                                 name, PART_CHANNELINFO_LOCKED;
455                                 type, IMAGE;
456                                 scale, 1;
457                                 description {
458                                         state, "default" 0.0;
459                                         image.normal, "ic_thumbnail_lock_01_nor.png";
460                                         rel1.relative, 1.0 0.0;
461                                         rel2.relative, 1.0 0.0;
462                                         min, 0 0;
463                                         align, 1.0 0.0;
464                                         fixed, 1 1;
465                                         visible, 0;
466                                 }
467                                 description {
468                                         state, "visible" 0.0;
469                                         inherit, "default" 0.0;
470                                         min, 28 28;
471                                         visible, 1;
472                                 }
473                                 description {
474                                         state, "focused" 0.0;
475                                         inherit, "default" 0.0;
476                                         image.normal, "ic_thumbnail_lock_01_foc.png";
477                                         min, 28 28;
478                                         visible, 1;
479                                 }
480                         }
481                         part {
482                                 name, "padding.channelinfo.locked";
483                                 type, SPACER;
484                                 scale, 1;
485                                 description {
486                                         state, "default" 0.0;
487                                         rel1 {
488                                                 to, PART_CHANNELINFO_LOCKED;
489                                                 relative, 0.0 0.0;
490                                         }
491                                         rel2 {
492                                                 to, PART_CHANNELINFO_LOCKED;
493                                                 relative, 0.0 0.0;
494                                         }
495                                         min, 0 0;
496                                         align, 1.0 0.0;
497                                         fixed, 1 1;
498                                 }
499                                 description {
500                                         state, "visible" 0.0;
501                                         inherit, "default" 0.0;
502                                         min, 10 0;
503                                 }
504                                 description {
505                                         state, "focused" 0.0;
506                                         inherit, "default" 0.0;
507                                         min, 10 0;
508                                 }
509                         }
510                         part {
511                                 name, PART_CHANNELINFO_FAVORITE;
512                                 type, IMAGE;
513                                 scale, 1;
514                                 description {
515                                         state, "default" 0.0;
516                                         image.normal, "ic_thumbnail_favorite_01.png";
517                                         rel1 {
518                                                 to, "padding.channelinfo.locked";
519                                                 relative, 0.0 0.0;
520                                         }
521                                         rel2 {
522                                                 to, "padding.channelinfo.locked";
523                                                 relative, 0.0 0.0;
524                                         }
525                                         min, 0 0;
526                                         align, 1.0 0.0;
527                                         fixed, 1 1;
528                                         visible, 0;
529                                 }
530                                 description {
531                                         state, "visible" 0.0;
532                                         inherit, "default" 0.0;
533                                         min, 28 28;
534                                         visible, 1;
535                                 }
536                         }
537                         part {
538                                 name, "padding.channelinfo.favorite";
539                                 type, SPACER;
540                                 scale, 1;
541                                 description {
542                                         state, "default" 0.0;
543                                         rel1 {
544                                                 to, PART_CHANNELINFO_FAVORITE;
545                                                 relative, 0.0 0.0;
546                                         }
547                                         rel2 {
548                                                 to, PART_CHANNELINFO_FAVORITE;
549                                                 relative, 0.0 0.0;
550                                         }
551                                         min, 0 0;
552                                         align, 1.0 0.0;
553                                         fixed, 1 1;
554                                 }
555                                 description {
556                                         state, "visible" 0.0;
557                                         inherit, "default" 0.0;
558                                         min, 10 0;
559                                 }
560                         }
561                 }
562         }
563         programs {
564                 program {
565                         name, "focused";
566                         signal, SIGNAL_FOCUSED;
567                         source, SOURCE_ELM;
568                         script {
569                                 set_int(is_focused, 1);
570                                 set_states();
571                                 run_program(PROGRAM:"do_focused");
572                         }
573                 }
574                 program {
575                         name, "do_focused";
576                         action, STATE_SET "focused" 0.0;
577                         target, "bg";
578                         target, PART_CHANNELINFO_CHANNEL;
579                         target, PART_CHANNELINFO_TITLE;
580                         target, PART_CHANNELINFO_TIME;
581                 }
582                 program {
583                         name, "unfocused";
584                         signal, SIGNAL_UNFOCUSED;
585                         source, SOURCE_ELM;
586                         script {
587                                 set_int(is_focused, 0);
588                                 set_states();
589                                 run_program(PROGRAM:"do_unfocused");
590                         }
591                 }
592                 program {
593                         name, "do_unfocused";
594                         action, STATE_SET "default" 0.0;
595                         target, "bg";
596                         target, PART_CHANNELINFO_CHANNEL;
597                         target, PART_CHANNELINFO_TITLE;
598                         target, PART_CHANNELINFO_TIME;
599                 }
600                 program {
601                         name, "reset";
602                         signal, SIGNAL_RESET;
603                         source, SOURCE_PROGRAM;
604                         script {
605                                 set_int(is_locked, 0);
606                                 set_int(is_favorite, 0);
607                                 run_program(PROGRAM:"do_reset");
608                         }
609                 }
610                 program {
611                         name, "do_reset";
612                         action, STATE_SET "default" 0.0;
613                         target, PART_CHANNELINFO_FAVORITE;
614                         target, "padding.channelinfo.favorite";
615                         target, PART_CHANNELINFO_LOCKED;
616                         target, "padding.channelinfo.locked";
617                 }
618                 program {
619                         name, "set_locked";
620                         signal, SIGNAL_LOCKED;
621                         source, SOURCE_PROGRAM;
622                         script {
623                                 set_int(is_locked, 1);
624                                 set_states();
625                         }
626                 }
627                 program {
628                         name, "set_favorite";
629                         signal, SIGNAL_FAVORITE;
630                         source, SOURCE_PROGRAM;
631                         script {
632                                 set_int(is_favorite, 1);
633                                 set_states();
634                         }
635                 }
636                 program {
637                         name, "do_favorite";
638                         action, STATE_SET "visible" 0.0;
639                         target, PART_CHANNELINFO_FAVORITE;
640                         target, "padding.channelinfo.favorite";
641                 }
642                 program {
643                         name, "do_locked";
644                         action, STATE_SET "visible" 0.0;
645                         target, PART_CHANNELINFO_LOCKED;
646                         target, "padding.channelinfo.locked";
647                 }
648                 program {
649                         name, "do_focus_locked";
650                         action, STATE_SET "focused" 0.0;
651                         target, PART_CHANNELINFO_LOCKED;
652                         target, "padding.channelinfo.locked";
653                 }
654         }
655 }
656
657 group {
658         name, GRP_CHANNELINFO_SIMPLE;
659         parts {
660                 part {
661                         name, "bg";
662                         type, RECT;
663                         scale, 1;
664                         description {
665                                 state, "default" 0.0;
666                                 min, 536 70;
667                                 align, 0.0 0.0;
668                                 fixed, 1 1;
669                                 visible, 0;
670                         }
671                 }
672                 part {
673                         name, "padding.left";
674                         type, SPACER;
675                         scale, 1;
676                         description {
677                                 state, "default" 0.0;
678                                 rel1 {
679                                         to, "bg";
680                                         relative, 0.0 0.0;
681                                 }
682                                 rel2 {
683                                         to, "bg";
684                                         relative, 0.0 0.0;
685                                 }
686                                 min, 28 0;
687                                 align, 0.0 0.0;
688                                 fixed, 1 1;
689                         }
690                 }
691                 part {
692                         name, PART_CHANNELINFO_CHANNEL;
693                         type, TEXT;
694                         scale, 1;
695                         description {
696                                 state, "default" 0.0;
697                                 rel1 {
698                                         to, "padding.left";
699                                         relative, 1.0 0.0;
700                                 }
701                                 rel2 {
702                                         to, "padding.left";
703                                         relative, 1.0 0.0;
704                                 }
705                                 text {
706                                         font, FONT_LIGHT;
707                                         size, 32;
708                                         align, 0.0 0.5;
709                                 }
710                                 color, COLOR_TEXT_TRANS;
711                                 min, 480 32;
712                                 align, 0.0 0.0;
713                                 fixed, 1 1;
714                         }
715                 }
716                 part {
717                         name, "padding.title";
718                         type, SPACER;
719                         scale, 1;
720                         description {
721                                 state, "default" 0.0;
722                                 rel1 {
723                                         to, PART_CHANNELINFO_CHANNEL;
724                                         relative, 0.0 1.0;
725                                 }
726                                 rel2 {
727                                         to, PART_CHANNELINFO_CHANNEL;
728                                         relative, 0.0 1.0;
729                                 }
730                                 min, 0 6;
731                                 align, 0.0 0.0;
732                                 fixed, 1 1;
733                         }
734                 }
735                 part {
736                         name, PART_CHANNELINFO_TITLE;
737                         type, TEXT;
738                         scale, 1;
739                         description {
740                                 state, "default" 0.0;
741                                 rel1 {
742                                         to, "padding.title";
743                                         relative, 0.0 1.0;
744                                 }
745                                 rel2 {
746                                         to, "padding.title";
747                                         relative, 0.0 1.0;
748                                 }
749                                 text {
750                                         font, FONT_LIGHT;
751                                         size, 32;
752                                         align, 0.0 0.5;
753                                 }
754                                 color, COLOR_TEXT_TRANS;
755                                 min, 480 32;
756                                 align, 0.0 0.0;
757                                 fixed, 1 1;
758                         }
759                 }
760                 part {
761                         name, PART_CHANNELINFO_TIME;
762                         type, TEXT;
763                         scale, 1;
764                         description {
765                                 state, "default" 0.0;
766                                 visible, 0;
767                         }
768                 }
769         }
770 }