The source code moved from the SPIN with license changed to Flora 1.1
[apps/native/home/homescreen-efl.git] / res / edje / home.edc
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 "../../inc/conf.h"
18
19 images {
20         image: "../images/home_button_bg.png" COMP;
21         image: "../images/home_icon_home.png" COMP;
22         image: "../images/home_icon_menu.png" COMP;
23         image: "../images/all_apps_icon_menu.png" COMP;
24         image: "../images/home_icon_reorder.png" COMP;
25 }
26
27 collections {
28         group {
29                 name: "home_ly";
30                 parts {
31                         part {
32                                 name: "bg_spacer";
33                                 type: SPACER;
34                                 scale: 0;
35                                 description {
36                                         state: "default" 0.0;
37                                         rel1.relative: 0.0 0.0;
38                                         rel2.relative: 1.0 1.0;
39                                 }
40                         }
41                         part {
42                                 name: "content";
43                                 type: SWALLOW;
44                                 mouse_events: 1;
45                                 repeat_events: 1;
46                                 scale: 0;
47                                 description {
48                                         state: "default" 0.0;
49                                         rel1.relative: 0.0 0.0/*HOME_WGT_MIN_Y*/;
50                                         rel2.relative: 1.0 1.0/*HOME_WGT_MAX_Y*/;
51                                 }
52                         }
53
54                         /*======================CHOOSER CAPTION=========================*/
55                         part {
56                                 name: "chooser_caption";
57                                 type: SPACER;
58                                 scale: 0;
59                                 description {
60                                         state: "default" 0.0;
61                                         rel1.relative: 0.0 HOME_CHOOSER_CAPTION_Y_MIN;
62                                         rel2.relative: 1.0 HOME_CHOOSER_CAPTION_Y_MAX;
63                                 }
64                         }
65                         part {
66                                 name: PART_CHOOSER_CAPTION_MIDDLE_LABEL;
67                                 type: TEXT;
68                                 scale: 1;
69                                 description
70                                 {
71                                         state: "default" 0.0;
72                                         visible: 0;
73                                         color: 255 255 255 255;
74                                         text
75                                         {
76                                                 align: 0.5 0.90;
77                                                 text:"999 selected";
78                                                 size: 36;
79                                         }
80                                         rel1
81                                         {
82                                                 relative: 0.30 0.0;
83                                                 to: "chooser_caption";
84                                         }
85                                         rel2
86                                         {
87                                                 relative: 0.70 1.0;
88                                                 to: "chooser_caption";
89                                         }
90                                 }
91                                 description {
92                                         state: "chooser_activated" 0.0;
93                                         inherit: "default" 0.0;
94                                         visible: 1;
95                                 }
96                          }
97                          part {
98                                 name: PART_CHOOSER_CAPTION_LEFT_LABEL;
99                                 type: TEXT;
100                                 scale: 1;
101                                 description
102                                 {
103                                         color: 255 255 255 255;
104                                         state: "default" 0.0;
105                                         visible: 0;
106                                         text
107                                         {
108                                                 align: 0.25 0.90;
109                                                 size: 28;
110                                                 text: "CANCEL";
111                                         }
112                                         rel1
113                                         {
114                                                 relative: 0.0 0.0;
115                                                 to: "chooser_caption";
116                                         }
117                                         rel2
118                                         {
119                                                 relative: 0.33 1.0;
120                                                 to: "chooser_caption";
121                                         }
122                                 }
123                                 description {
124                                         state: "chooser_activated" 0.0;
125                                         inherit: "default" 0.0;
126                                         visible: 1;
127                                 }
128                          }
129                          part {
130                                 name: "chooser_caption_left_clickable_space";
131                                 type: RECT;
132                                 mouse_events: 1;
133                                 scale: 0;
134                                 description
135                                 {
136                                         state: "default" 0.0;
137                                         color: 0 0 0 0;
138                                         visible: 0;
139                                         rel1
140                                         {
141                                                 to: "chooser_caption_left_label";
142                                                 relative: 0.0 0.0;
143                                         }
144                                         rel2
145                                         {
146                                                 to: "chooser_caption_left_label";
147                                                 relative: 1.0 1.0;
148                                         }
149                                 }
150                                 description {
151                                         state: "chooser_activated" 0.0;
152                                         inherit: "default" 0.0;
153                                         visible: 1;
154                                 }
155                         }
156                         part {
157                                 name: PART_CHOOSER_CAPTION_RIGHT_LABEL;
158                                 type: TEXT;
159                                 scale: 1;
160                                 description
161                                 {
162                                         state: "default" 0.0;
163                                         visible: 0;
164                                         color: 255 255 255 255;
165                                         text
166                                         {
167                                                 align: (1.0 - 0.25) 0.90;
168                                                 size: 28;
169                                                 text: "DONE";
170                                         }
171                                         rel1
172                                         {
173                                                 relative: 0.66 0.0;
174                                                 to: "chooser_caption";
175                                         }
176                                         rel2
177                                         {
178                                                 relative: 1.0 1.0;
179                                                 to: "chooser_caption";
180                                         }
181                                 }
182                                 description {
183                                         state: "chooser_activated" 0.0;
184                                         inherit: "default" 0.0;
185                                         visible: 1;
186                                 }
187                         }
188                         part {
189                                 name: "chooser_caption_right_clickable_space";
190                                 type: RECT;
191                                 mouse_events: 1;
192                                 scale: 0;
193                                 description
194                                 {
195                                         state: "default" 0.0;
196                                         visible: 0;
197                                         color: 0 0 0 0;
198                                         rel1
199                                         {
200                                                 to: "chooser_caption_right_label";
201                                                 relative: 0.0 0.0;
202                                         }
203                                         rel2
204                                         {
205                                                 to: "chooser_caption_right_label";
206                                                 relative: 1.0 1.0;
207                                         }
208                                 }
209                                 description {
210                                         state: "chooser_activated" 0.0;
211                                         inherit: "default" 0.0;
212                                         visible: 1;
213                                 }
214                         }
215
216                         /*==================== BUTTON : MENU IMPLEMENATION ===============*/
217                         part {
218                                 name: "menu_btn";
219                                 type: SPACER;
220                                 scale: 0;
221                                 description {
222                                         state: "default" 0.0;
223                                         rel1.relative: HOME_MENU_BTN_X_MIN HOME_BTNS_Y_MIN;
224                                         rel2.relative: HOME_MENU_BTN_X_MAX HOME_BTNS_Y_MAX;
225                                 }
226                         }
227                         part {
228                                 name: "menu_btn_bg";
229                                 type: IMAGE;
230                                 scale: 0;
231                                 description {
232                                         state: "default" 0.0;
233                                         rel1 { relative: 0.0 0.0; to: "menu_btn"; }
234                                         rel2 { relative: 1.0 1.0; to: "menu_btn"; }
235                                         color: 0 0 0 40;
236                                         visible: 1;
237                                         image {
238                                                 normal: "../images/home_button_bg.png";
239                                         }
240                                 }
241                                 description {
242                                         state: "press" 0.0;
243                                         inherit: "default" 0.0;
244                                         color: 255 255 255 40;
245                                 }
246                                 description {
247                                         state: "chooser_activated" 0.0;
248                                         visible: 0;
249                                 }
250                                 description
251                                 {
252                                         state: "all_apps_view_state" 0.0;
253                                         inherit: "default" 0.0;
254                                 }
255                                 description
256                                 {
257                                         state: "home_view_state" 0.0;
258                                         inherit: "default" 0.0;
259                                 }
260                                 description
261                                 {
262                                         state: "all_apps_edit_state" 0.0;
263                                         inherit: "default" 0.0;
264                                         visible: 0;
265                                 }
266                         }
267                         part {
268                                 name: "home_view_menu_icon";
269                                 type: IMAGE;
270                                 mouse_events: 0;
271                                 repeat_events: 1;
272                                 scale: 0;
273                                 description
274                                 {
275                                         state: "default" 0.0;
276                                         rel1 { relative: 0.27 0.1; to: "menu_btn"; }
277                                         rel2 { relative: 0.73 0.9; to: "menu_btn"; }
278                                         color: 255 255 255 255;
279                                         visible: 1;
280                                         image
281                                         {
282                                                 normal: "../images/home_icon_menu.png";
283                                         }
284                                 }
285                                 description
286                                 {
287                                         state: "all_apps_view_state" 0.0;
288                                         inherit: "default" 0.0;
289                                         color: 255 255 255 0;
290                                 }
291                                 description
292                                 {
293                                         state: "home_view_state" 0.0;
294                                         inherit: "default" 0.0;
295                                 }
296                                 description
297                                 {
298                                         state: "all_apps_edit_state" 0.0;
299                                         inherit: "all_apps_view_state" 0.0;
300                                         visible: 0;
301                                 }
302                         }
303                         part
304                         {
305                                 name: "all_apps_view_menu_icon";
306                                 type: IMAGE;
307                                 mouse_events: 0;
308                                 repeat_events: 1;
309                                 scale: 0;
310                                 description
311                                 {
312                                         state: "default" 0.0;
313                                         rel1 { relative: 0.27 0.1; to: "menu_btn"; }
314                                         rel2 { relative: 0.73 0.9; to: "menu_btn"; }
315                                         color: 255 255 255 0;
316                                         visible: 1;
317                                         image
318                                         {
319                                                 normal: "../images/all_apps_icon_menu.png";
320                                         }
321                                 }
322                                 description
323                                 {
324                                         state: "chooser_activated" 0.0;
325                                         visible: 0;
326                                 }
327                                 description
328                                 {
329                                         state: "all_apps_view_state" 0.0;
330                                         inherit: "default" 0.0;
331                                         color: 255 255 255 255;
332                                 }
333                                 description
334                                 {
335                                         state: "home_view_state" 0.0;
336                                         inherit: "default" 0.0;
337                                 }
338                                 description
339                                 {
340                                         state: "all_apps_edit_state" 0.0;
341                                         inherit: "all_apps_view_state" 0.0;
342                                         visible: 0;
343                                 }
344                         }
345
346                         /*==================== BUTTON : HOME ICON IMPLEMENTATION ===============*/
347                         part {
348                                 name: "home";
349                                 type: SPACER;
350                                 scale: 0;
351                                 description {
352                                         state: "default" 0.0;
353                                         rel1.relative: HOME_HOME_BTN_X_MIN HOME_BTNS_Y_MIN;
354                                         rel2.relative: HOME_HOME_BTN_X_MAX HOME_BTNS_Y_MAX;
355                                 }
356                         }
357                         part {
358                                 name: "home_btn_bg";
359                                 type: IMAGE;
360                                 scale: 0;
361                                 description {
362                                         state: "default" 0.0;
363                                         rel1 { relative: 0.0 0.0; to: "home"; }
364                                         rel2 { relative: 1.0 1.0; to: "home"; }
365                                         color: 0 0 0 40;
366                                         visible: 1;
367                                         image {
368                                                 normal: "../images/home_button_bg.png";
369                                         }
370                                 }
371                                 description {
372                                         state: "press" 0.0;
373                                         inherit: "default" 0.0;
374                                         color: 255 255 255 40;
375                                 }
376                                 description {
377                                         state: "chooser_activated" 0.0;
378                                         visible: 0;
379                                 }
380                                 description
381                                 {
382                                         state: "all_apps_view_state" 0.0;
383                                         inherit: "default" 0.0;
384                                 }
385                                 description
386                                 {
387                                         state: "home_view_state" 0.0;
388                                         inherit: "default" 0.0;
389                                 }
390                                 description
391                                 {
392                                         state: "all_apps_edit_state" 0.0;
393                                         inherit: "default" 0.0;
394                                         visible: 0;
395                                 }
396                         }
397                         part
398                         {
399                                 name: "home_view_home_icon";
400                                 type: IMAGE;
401                                 mouse_events: 0;
402                                 repeat_events: 1;
403                                 scale: 0;
404                                 description
405                                 {
406                                         state: "default" 0.0;
407                                         rel1 { relative: 0.27 0.1; to: "home"; }
408                                         rel2 { relative: 0.73 0.9; to: "home"; }
409                                         color: 255 255 255 255;
410                                         visible: 1;
411                                         image
412                                         {
413                                                 normal: "../images/home_icon_reorder.png";
414                                         }
415                                 }
416                                 description
417                                 {
418                                         state: "chooser_activated" 0.0;
419                                         visible: 0;
420                                 }
421                                 description
422                                 {
423                                         state: "all_apps_view_state" 0.0;
424                                         inherit: "default" 0.0;
425                                         color: 255 255 255 0;
426                                 }
427                                 description
428                                 {
429                                         state: "home_view_state" 0.0;
430                                         inherit: "default" 0.0;
431                                 }
432                                 description
433                                 {
434                                         state: "all_apps_edit_state" 0.0;
435                                         inherit: "all_apps_view_state" 0.0;
436                                         visible: 0;
437                                 }
438                         }
439
440                         part
441                         {
442                                 name: "all_apps_view_home_icon";
443                                 type: IMAGE;
444                                 mouse_events: 0;
445                                 repeat_events: 1;
446                                 scale: 0;
447                                 description
448                                 {
449                                         state: "default" 0.0;
450                                         rel1 { relative: 0.27 0.1; to: "home"; }
451                                         rel2 { relative: 0.73 0.9; to: "home"; }
452                                         color: 255 255 255 0;
453                                         visible: 1;
454                                         image
455                                         {
456                                                 normal: "../images/home_icon_home.png";
457                                         }
458                                 }
459                                 description
460                                 {
461                                         state: "chooser_activated" 0.0;
462                                         visible: 0;
463                                 }
464                                 description
465                                 {
466                                         state: "all_apps_view_state" 0.0;
467                                         inherit: "default" 0.0;
468                                         color: 255 255 255 255;
469                                 }
470                                 description
471                                 {
472                                         state: "home_view_state" 0.0;
473                                         inherit: "default" 0.0;
474                                         color: 255 255 255 0;
475                                 }
476                                 description
477                                 {
478                                         state: "all_apps_edit_state" 0.0;
479                                         inherit: "all_apps_view_state" 0.0;
480                                         visible: 0;
481                                 }
482                         }
483
484                         /*==================== DYNAMIC INDEX: ===============*/
485                         part {
486                                 name: PART_INDEX;
487                                 type: SWALLOW;
488                                 scale: 0;
489                                 description {
490                                         state: "default" 0.0;
491                                         rel1.relative: HOME_PG_INDEX_X_MIN HOME_BTNS_Y_MIN;
492                                         rel2.relative: HOME_PG_INDEX_X_MAX HOME_BTNS_Y_MAX;
493                                 }
494                         }
495
496                         part {
497                                 name: PART_NEXT_PAGE_INDICE;
498                                 type: RECT;
499                                 scale: 0;
500                                 description {
501                                         state: "default" 0.0;
502                                         color: 20 20 100 100;
503                                         rel1.relative: INDICE_NEXT_PAGE_X_MIN HOME_WGT_MIN_Y;
504                                         rel2.relative: INDICE_NEXT_PAGE_X_MAX HOME_WGT_EDIT_MAX_Y;
505                                         visible: 0;
506                                 }
507                                 description {
508                                         state: "visible" 0.0;
509                                         inherit: "default" 0.0;
510                                         visible: 1;
511                                 }
512                         }
513                         part {
514                                 name: PART_PREV_PAGE_INDICE;
515                                 type: RECT;
516                                 scale: 0;
517                                 description {
518                                         state: "default" 0.0;
519                                         color: 20 20 100 100;
520                                         rel1.relative: INDICE_PREV_PAGE_X_MIN HOME_WGT_MIN_Y;
521                                         rel2.relative: INDICE_PREV_PAGE_X_MAX HOME_WGT_EDIT_MAX_Y;
522                                         visible: 0;
523                                 }
524                                 description {
525                                         state: "visible" 0.0;
526                                         inherit: "default" 0.0;
527                                         visible: 1;
528                                 }
529                         }
530                         part {
531                                 name: PART_EVENT_BLOCKER;
532                                 type: RECT;
533                                 mouse_events:  1;
534                                 repeat_events: 0;
535                                 description {
536                                         state: "default" 0.0;
537                                         visible: 0;
538                                         rel1 {relative: 0.0 0.0; to: "bg_spacer";}
539                                         rel2 {relative: 1.0 1.0; to: "bg_spacer";}
540                                         color: 0 0 0 0;
541                                 }
542                                 description {
543                                         state: "blocked" 0.0;
544                                         inherit: "default" 0.0;
545                                         visible: 1;
546                                 }
547                         }
548                 }
549                 /*============== PROGRAMS TO OPERATE ON bottom buttons =============*/
550                 programs {
551                         program {
552                                 name: "menu_btn_down";
553                                 signal: "mouse,down,1";
554                                 source: "menu_btn_bg";
555                                 action: STATE_SET "press" 0.0;
556                                 target: "menu_btn_bg";
557                                 transition: DECELERATE 0.1;
558                         }
559                         program {
560                                 name: "menu_btn_up";
561                                 signal: "mouse,up,1";
562                                 source: "menu_btn_bg";
563                                 action: STATE_SET "default" 0.0;
564                                 target: "menu_btn_bg";
565                                 transition: DECELERATE 0.1;
566                         }
567                         program {
568                                 name: "menu_btn_click";
569                                 signal: "mouse,clicked,1";
570                                 source: "menu_btn_bg";
571                                 action: SIGNAL_EMIT SIGNAL_MENU_BTN_CLICKED SIGNAL_SOURCE;
572                         }
573                         program {
574                                 name: "home_btn_down";
575                                 signal: "mouse,down,1";
576                                 source: "home_btn_bg";
577                                 action: STATE_SET "press" 0.0;
578                                 target: "home_btn_bg";
579                                 transition: DECELERATE 0.1;
580                         }
581                         program {
582                                 name: "home_btn_up";
583                                 signal: "mouse,up,1";
584                                 source: "home_btn_bg";
585                                 action: STATE_SET "default" 0.0;
586                                 target: "home_btn_bg";
587                                 transition: DECELERATE 0.1;
588                         }
589                         program {
590                                 name: "home_btn_click";
591                                 signal: "mouse,clicked,1";
592                                 source: "home_btn_bg";
593                                 action: SIGNAL_EMIT SIGNAL_HOME_BTN_CLICKED SIGNAL_SOURCE;
594                         }
595                         program
596                         {
597                                 name: "menu_icon_home_view_state_set";
598                                 signal: SIGNAL_BOTTOM_BUTTONS_HOME_STATE_SET;
599                                 source: SIGNAL_SOURCE;
600                                 action: STATE_SET "home_view_state" 0.0;
601                                 target: "home_view_menu_icon";
602                                 target: "all_apps_view_menu_icon";
603                                 target: "home_view_home_icon";
604                                 target: "all_apps_view_home_icon";
605                                 target: "menu_btn_bg";
606                                 target: "home_btn_bg";
607                                 transition: LINEAR 0.3;
608                         }
609                         program
610                         {
611                                 name: "menu_icon_all_apps_view_state_set";
612                                 signal: SIGNAL_BOTTOM_BUTTONS_ALL_APPS_STATE_SET;
613                                 source: SIGNAL_SOURCE;
614                                 action: STATE_SET "all_apps_view_state" 0.0;
615                                 target: "home_view_menu_icon";
616                                 target: "all_apps_view_menu_icon";
617                                 target: "home_view_home_icon";
618                                 target: "all_apps_view_home_icon";
619                                 target: "menu_btn_bg";
620                                 target: "home_btn_bg";
621                                 transition: LINEAR 0.3;
622                         }
623                         program
624                         {
625                                 name: "menu_icon_all_apps_edit_state_set";
626                                 signal: SIGNAL_BOTTOM_BUTTONS_ALL_APPS_EDIT_STATE_SET;
627                                 source: SIGNAL_SOURCE;
628                                 action: STATE_SET "all_apps_edit_state" 0.0;
629                                 target: "home_view_menu_icon";
630                                 target: "all_apps_view_menu_icon";
631                                 target: "home_view_home_icon";
632                                 target: "all_apps_view_home_icon";
633                                 target: "menu_btn_bg";
634                                 target: "home_btn_bg";
635                         }
636
637                         /*============== PROGRAMS TO OPERATE ON CHOOSER CAPTION =============*/
638                         program {
639                                 name: "chooser_caption_activate";
640                                 signal: SIGNAL_CHOOSER_CAPTION_ACTIVATE;
641                                 source: SIGNAL_SOURCE;
642                                 action: STATE_SET "chooser_activated" 0.0;
643                                 target: "chooser_caption_middle_label";
644                                 target: "chooser_caption_left_label";
645                                 target: "chooser_caption_left_clickable_space";
646                                 target: "chooser_caption_right_label";
647                                 target: "chooser_caption_right_clickable_space";
648                                 target: "all_apps_view_menu_icon";
649                                 target: "menu_btn_bg";
650                                 target: "home_btn_bg";
651                                 target: "all_apps_view_home_icon";
652                         }
653                         program {
654                                 name: "chooser_caption_deactivate";
655                                 signal: SIGNAL_CHOOSER_CAPTION_DEACTIVATE;
656                                 source: SIGNAL_SOURCE;
657                                 action: STATE_SET "default" 0.0;
658                                 target: "chooser_caption_middle_label";
659                                 target: "chooser_caption_left_label";
660                                 target: "chooser_caption_left_clickable_space";
661                                 target: "chooser_caption_right_label";
662                                 target: "chooser_caption_right_clickable_space";
663                                 target: "menu_btn_bg";
664                                 target: "all_apps_view_menu_icon";
665                                 target: "home_btn_bg";
666                                 target: "all_apps_view_home_icon";
667                         }
668                         /*============= PROGRAMS TO OPERATOE ON INDICES =====================*/
669                         program {
670                                 name: "next_page_indice_show";
671                                 signal: SIGNAL_NEXT_PAGE_INDICE_SHOW;
672                                 source: SIGNAL_SOURCE;
673                                 action: STATE_SET "visible" 0.0;
674                                 target: PART_NEXT_PAGE_INDICE;
675                         }
676                         program {
677                                 name: "prev_page_indice_show";
678                                 signal: SIGNAL_PREV_PAGE_INDICE_SHOW;
679                                 source: SIGNAL_SOURCE;
680                                 action: STATE_SET "visible" 0.0;
681                                 target: PART_PREV_PAGE_INDICE;
682                         }
683                         program {
684                                 name: "indice_off_program";
685                                 signal: SIGNAL_INDICE_HIDE;
686                                 source: SIGNAL_SOURCE;
687                                 action: STATE_SET "default" 0.0;
688                                 target: PART_PREV_PAGE_INDICE;
689                                 target: PART_NEXT_PAGE_INDICE;
690                         }
691                         program {
692                                 name: "block_events";
693                                 signal: SIGNAL_BLOCK_EVENTS;
694                                 source: SIGNAL_SOURCE;
695                                 action: STATE_SET "blocked" 0.0;
696                                 target: PART_EVENT_BLOCKER;
697                         }
698                         program {
699                                 name: "unblock_events";
700                                 signal: SIGNAL_UNBLOCK_EVENTS;
701                                 source: SIGNAL_SOURCE;
702                                 action: STATE_SET "default" 0.0;
703                                 target: PART_EVENT_BLOCKER;
704                                 in: 0.1 0.0;
705                         }
706                 }
707         }
708 }