The source code moved from the SPIN with license changed to Flora 1.1
[apps/native/home/homescreen-efl.git] / res / edje / folder.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/folder_appicon_bg.png" COMP;
21         image: "../images/folder_appicon_bg_possible.png" COMP;
22         image: "../images/folder_appicon_bg_impossible.png" COMP;
23         image: "../images/folder_appicon_empty_bg.png" COMP;
24         image: "../images/folder_popup_bg.png" COMP;
25         image: "../images/btn_input_clear.png" COMP;
26         image: "../images/btn_add_nor.png" COMP;
27         image: "../images/btn_add_press.png" COMP;
28 }
29
30 collections {
31
32         group {
33                 name: GROUP_FOLDER_ICON_LAYOUT;
34                 parts {
35                         part {
36                                 name: "folder_bg";
37                                 type: SPACER;
38                                 scale: 1;
39                                 description {
40                                         state: "default" 0.0;
41                                         rel1{relative: 0.0 0.0;}
42                                         rel2{relative: 1.0 1.0;}
43                                 }
44                                 description
45                                 {
46                                         state: "manage_state" 0.0;
47                                         inherit: "default" 0.0;
48                                 }
49                         }
50
51                         part {
52                                 name: "folder_icon_exterior";
53                                 type: IMAGE;
54                                 mouse_events: 1;
55                                 scale: 1;
56                                 description {
57                                         state: "default" 0.0;
58                                         rel1{relative: 0.0 0.0; to: "folder_bg";}
59                                         rel2{relative: 1.0 1.0; to: "folder_bg";}
60                                         aspect: 1.0 1.0;
61                                         aspect_preference: BOTH;
62                                         image {
63                                                 normal: "../images/folder_appicon_bg.png";
64                                         }
65                                 }
66                                 description {
67                                         state: "frame_possible" 0.0;
68                                         inherit: "default" 0.0;
69                                         image {
70                                                 normal: "../images/folder_appicon_bg_possible.png";
71                                         }
72                                 }
73                                 description {
74                                         state: "frame_impossible" 0.0;
75                                         inherit: "default" 0.0;
76                                         image {
77                                                 normal: "../images/folder_appicon_bg_impossible.png";
78                                         }
79                                 }
80                         }
81
82                         part
83                         {
84                                 name: "folder_icon_interior";
85                                 type: IMAGE;
86                                 mouse_events: 1;
87                                 scale: 1;
88                                 description
89                                 {
90                                         state: "default" 0.0;
91                                         rel1{relative: 0.0 0.0; to: "folder_bg";}
92                                         rel2{relative: 1.0 1.0; to: "folder_bg";}
93                                         aspect: 1.0 1.0;
94                                         aspect_preference: BOTH;
95                                         visible: 0;
96                                         image
97                                         {
98                                                 normal: "../images/folder_appicon_empty_bg.png";
99                                         }
100                                 }
101                                 description
102                                 {
103                                         state: "empty_folder" 0.0;
104                                         inherit: "default" 0.0;
105                                         visible: 1;
106                                 }
107                         }
108
109                         part {
110                                 name: "miniature_0";
111                                 type: SWALLOW;
112                                 description {
113                                         state: "default" 0.0;
114                                         rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN; to: "folder_icon_exterior";}
115                                         rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX; to: "folder_icon_exterior";}
116                                 }
117                                 description {
118                                         state: "apps_1" 0.0;
119                                         inherit: "default" 0.0;
120                                         rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN;}
121                                         rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX;}
122                                 }
123                                 description {
124                                         state: "apps_2" 0.0;
125                                         inherit: "default" 0.0;
126                                         rel1{relative: MINIATURE_COL_1_MIN MINIATURE_CENTER_MIN;}
127                                         rel2{relative: MINIATURE_COL_1_MAX MINIATURE_CENTER_MAX;}
128                                 }
129                                 description {
130                                         state: "apps_4" 0.0;
131                                         inherit: "default" 0.0;
132                                         rel1{relative: MINIATURE_COL_1_MIN MINIATURE_ROW_1_MIN;}
133                                         rel2{relative: MINIATURE_COL_1_MAX MINIATURE_ROW_1_MAX;}
134                                 }
135                         }
136                         part {
137                                 name: "miniature_1";
138                                 type: SWALLOW;
139                                 description {
140                                         state: "default" 0.0;
141                                         rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN; to: "folder_icon_exterior";}
142                                         rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX; to: "folder_icon_exterior";}
143                                 }
144                                 description {
145                                         state: "apps_2" 0.0;
146                                         inherit: "default" 0.0;
147                                         rel1{relative: MINIATURE_COL_2_MIN MINIATURE_CENTER_MIN;}
148                                         rel2{relative: MINIATURE_COL_2_MAX MINIATURE_CENTER_MAX;}
149                                 }
150                                 description  {
151                                         state: "apps_4" 0.0;
152                                         inherit: "default" 0.0;
153                                         rel1{relative: MINIATURE_COL_2_MIN MINIATURE_ROW_1_MIN;}
154                                         rel2{relative: MINIATURE_COL_2_MAX MINIATURE_ROW_1_MAX;}
155                                 }
156                         }
157                         part {
158                                 name: "miniature_2";
159                                 type: SWALLOW;
160                                 description {
161                                         state: "default" 0.0;
162                                         rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN; to: "folder_icon_exterior";}
163                                         rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX; to: "folder_icon_exterior";}
164                                 }
165                                 description  {
166                                         state: "apps_4" 0.0;
167                                         inherit: "default" 0.0;
168                                         rel1{relative: MINIATURE_COL_1_MIN MINIATURE_ROW_2_MIN;}
169                                         rel2{relative: MINIATURE_COL_1_MAX MINIATURE_ROW_2_MAX;}
170                                 }
171                         }
172                         part {
173                                 name: "miniature_3";
174                                 type: SWALLOW;
175                                 description {
176                                         state: "default" 0.0;
177                                         rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN; to: "folder_icon_exterior";}
178                                         rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX; to: "folder_icon_exterior";}
179                                 }
180                                 description  {
181                                         state: "apps_4" 0.0;
182                                         inherit: "default" 0.0;
183                                         rel1{relative: MINIATURE_COL_2_MIN MINIATURE_ROW_2_MIN;}
184                                         rel2{relative: MINIATURE_COL_2_MAX MINIATURE_ROW_2_MAX;}
185                                 }
186                         }
187                 }
188
189                 programs {
190                         program {
191                                 name: "folder_clicked_program";
192                                 signal :"mouse,clicked,1";
193                                 source: "icon_content";
194                                 action: SIGNAL_EMIT SIGNAL_FOLDER_CLICKED SIGNAL_SOURCE;
195                                 //after: program with change the icon shadow state to clicked!
196                         }
197                         program {
198                                 name: "set,miniatures,1";
199                                 signal: "set,miniatures,1";
200                                 source: SIGNAL_SOURCE;
201                                 action: STATE_SET "default" 0.0;
202                                 target: "folder_icon_interior";
203                                 after: "content_update_1";
204                         }
205                         program {
206                                 name: "content_update_1";
207                                 action: STATE_SET "apps_1" 0.0;
208                                 target: "miniature_0";
209                                 transition: DECELERATE 0.2;
210                         }
211
212                         program {
213                                 name: "set,miniatures,2";
214                                 signal: "set,miniatures,2";
215                                 source: SIGNAL_SOURCE;
216                                 action: STATE_SET "default" 0.0;
217                                 target: "folder_icon_interior";
218                                 after: "content_update_2";
219                         }
220                         program {
221                                 name: "content_update_2";
222                                 action: STATE_SET "apps_2" 0.0;
223                                 target: "miniature_0";
224                                 target: "miniature_1";
225                                 transition: DECELERATE 0.2;
226                         }
227
228                         program {
229                                 name: "set,miniatures,4";
230                                 signal: "set,miniatures,4";
231                                 source: SIGNAL_SOURCE;
232                                 action: STATE_SET "default" 0.0;
233                                 target: "folder_icon_interior";
234                                 after: "content_update_4";
235                         }
236                         program {
237                                 name: "content_update_4";
238                                 action: STATE_SET "apps_4" 0.0;
239                                 target: "miniature_0";
240                                 target: "miniature_1";
241                                 target: "miniature_2";
242                                 target: "miniature_3";
243                                 transition: DECELERATE 0.2;
244                         }
245                         program {
246                                 name: "show,bg,possible";
247                                 signal: SIGNAL_FRAME_POSSIBLE_SHOW;
248                                 source: SIGNAL_SOURCE;
249                                 action: STATE_SET "frame_possible" 0.0;
250                                 target: "folder_icon_exterior";
251                         }
252                         program {
253                                 name: "show,bg,impossible";
254                                 signal: SIGNAL_FRAME_IMPOSSIBLE_SHOW;
255                                 source: SIGNAL_SOURCE;
256                                 action: STATE_SET "frame_impossible" 0.0;
257                                 target: "folder_icon_exterior";
258                         }
259                         program {
260                                 name: "show,bg,default";
261                                 signal: SIGNAL_FRAME_HIDE;
262                                 source: SIGNAL_SOURCE;
263                                 action: STATE_SET "default" 0.0;
264                                 target: "folder_icon_exterior";
265                         }
266                         program {
267                                 name: "show,bg,empty";
268                                 signal: SIGNAL_EMPTY_BG_SHOW;
269                                 source: SIGNAL_SOURCE;
270                                 action: STATE_SET "empty_folder" 0.0;
271                                 target: "folder_icon_interior";
272                         }
273                         program {
274                                 name: "hide,bg,empty";
275                                 action: STATE_SET "default" 0.0;
276                                 target: "folder_icon_interior";
277                         }
278                 }
279         }
280
281         group {
282                 name: GROUP_FOLDER_ADD_ICON;
283                 parts {
284                         part {
285                                 name: "bg";
286                                 type: SPACER;
287                                 scale: 1;
288                                 description {
289                                         state: "default" 0.0;
290                                         rel1{relative: 0.0 0.0;}
291                                         rel2{relative: 1.0 1.0;}
292                                 }
293                                 description
294                                 {
295                                         state: "manage_state" 0.0;
296                                         inherit: "default" 0.0;
297                                 }
298                         }
299                         part
300                         {
301                                 name: "add_icon";
302                                 type: IMAGE;
303                                 scale: 1;
304                                 mouse_events: 1;
305                                 description
306                                 {
307                                         state: "default" 0.0;
308                                         rel1 {relative: 0.0 0.0; to: "bg";}
309                                         rel2 {relative: 1.0 1.0; to: "bg";}
310                                         aspect: 1.0 1.0;
311                                         aspect_preference: BOTH;
312                                         image {
313                                                 normal: "../images/btn_add_nor.png";
314                                         }
315                                 }
316                                 description
317                                 {
318                                         state: "pressed" 0.0;
319                                         inherit: "default" 0.0;
320                                         image {
321                                                 normal: "../images/btn_add_press.png";
322                                         }
323                                 }
324                         }
325                 }
326                 programs {
327                         program {
328                                 name: "add_pressed";
329                                 signal: "mouse,down,1";
330                                 source: "add_icon";
331                                 action: STATE_SET "pressed" 0.0;
332                                 target: "add_icon";
333                                 transition: DECELERATE 0.2;
334                         }
335                         program {
336                                 name: "add_released";
337                                 signal: "mouse,up,1";
338                                 source: "add_icon";
339                                 action: STATE_SET "default" 0.0;
340                                 target: "add_icon";
341                                 transition: DECELERATE 0.2;
342                         }
343                 }
344         }
345
346         group {
347                 name: GROUP_FOLDER_WINDOW;
348                 parts {
349                         part {
350                                 name: "bg"; //this part should be rect because click on it should close the folder.
351                                 type: RECT;
352                                 mouse_events: 1;
353                                 repeat_events: 0;
354                                 description {
355                                         state: "default" 0.0;
356                                         color: 0 0 0 0;
357                                         rel1.relative: 0.0 0.0;
358                                         rel2.relative: 1.0 1.0;
359                                 }
360                         }
361                 }
362                 programs {
363                         program {
364                                 name: "background_clicked_cb";
365                                 signal: "mouse,clicked,1";
366                                 source: "bg";
367                                 action: SIGNAL_EMIT "bg_clicked" SIGNAL_SOURCE;
368                         }
369                 }
370         }
371
372         group
373         {
374                 name: GROUP_FOLDER_POPUP;
375                 parts
376                 {
377                         part
378                         {
379                                 name: "folder_bg";
380                                 type: IMAGE;
381                                 description
382                                 {
383                                         state: "default" 0.0;
384                                         rel1 {relative: 0.0 0.0;}
385                                         rel2 {relative: 1.0 0.0;}
386                                         image {
387                                                 normal: "../images/folder_popup_bg.png";
388                                                 border: 5 5 5 5;
389                                         }
390                                 }
391                                 description {
392                                         state: "done";
393                                         inherit: "default" 0.0;
394                                         rel1 {relative: 0.0 0.0;}
395                                         rel2 {relative: 1.0 1.0;}
396                                 }
397                         }
398                         part
399                         {
400                                 name: "separator";
401                                 type: RECT;
402                                 description
403                                 {
404                                         state: "default" 0.0;
405                                         rel1 {relative: FOLDER_LEFT_MARGIN FOLDER_SEPARATOR_Y_MIN; to: "folder_bg";}
406                                         rel2 {relative: FOLDER_RIGHT_MARGIN FOLDER_SEPARATOR_Y_MAX; to: "folder_bg";}
407                                         color: 0 0 255 150;
408                                 }
409                         }
410                         part
411                         {
412                                 name: PART_FOLDER_NAME; //align y 0.0
413                                 type: SWALLOW;
414                                 description
415                                 {
416                                         state: "default" 0.0;
417                                         rel1 {relative: 0.15 FOLDER_NAME_Y_MIN; to: "folder_bg";}
418                                         rel2 {relative: 0.85 FOLDER_NAME_Y_MAX; to: "folder_bg";}
419                                         color: 0 0 0 0;
420                                         visible: 0;
421                                 }
422                                 description {
423                                         state: "done" 0.0;
424                                         inherit: "default" 0.0;
425                                         visible: 1;
426                                 }
427                         }
428                         part {
429                                 name: PART_FOLDER_UNNAMED_TEXT;
430                                 type: TEXT;
431                                 mouse_events: 1;
432                                 repeat_events: 1;
433                                 description {
434                                         state: "default" 0.0;
435                                         rel1 { relative: 0.0 0.0; to: PART_FOLDER_NAME;}
436                                         rel2 { relative: 1.0 1.0; to: PART_FOLDER_NAME;}
437                                         color: 0 0 0 255;
438                                         visible: 0;
439                                         text {
440                                                 text: "";
441                                                 size: 26;
442                                         }
443                                 }
444                                 description {
445                                         state: "visible" 0.0;
446                                         inherit: "default" 0.0;
447                                         visible: 1;
448                                 }
449                         }
450                         part
451                         {
452                                 name: "folder_clear_text_btn";
453                                 type: IMAGE;
454                                 description {
455                                         state: "default" 0.0;
456                                         rel1 {relative: 1.02 0.12; to: PART_FOLDER_NAME;}
457                                         rel2 {relative: 1.10 0.88; to: PART_FOLDER_NAME;}
458                                         aspect_preference: BOTH;
459                                         image
460                                         {
461                                                 normal: "../images/btn_input_clear.png";
462                                         }
463                                         visible: 0;
464                                 }
465                                 description
466                                 {
467                                         state: "visible" 0.0;
468                                         inherit: "default" 0.0;
469                                         visible: 1;
470                                 }
471                                 description
472                                 {
473                                         state: "dim" 0.0;
474                                         inherit: "visible";
475                                         color: 20 20 20 255;
476                                 }
477                         }
478                         part
479                         {
480                                 name: "folder_entry_block";
481                                 type: RECT;
482                                 repeat_events: 0;
483                                 description
484                                 {
485                                         state: "default" 0.0;
486                                         rel1 {relative: 0.0 0.0; to: PART_FOLDER_NAME;}
487                                         rel2 {relative: 1.0 1.0; to: PART_FOLDER_NAME;}
488                                         color: 0 0 0 0;
489                                         visible: 0;
490                                 }
491                                 description
492                                 {
493                                         state: "block_on" 0.0;
494                                         inherit: "default" 0.0;
495                                         visible: 1;
496                                 }
497                         }
498                         part
499                         {
500                                 name: PART_FOLDER_CONTENT; //align y 1.0
501                                 type: SWALLOW;
502                                 description
503                                 {
504                                         state: "default";
505                                         rel1 {relative: FOLDER_LEFT_MARGIN FOLDER_CONTENT_Y_MIN; to: "folder_bg";}
506                                         rel2 {relative: FOLDER_RIGHT_MARGIN FOLDER_CONTENT_Y_MAX; to: "folder_bg";}
507                                         color: 0 0 0 0;
508                                 }
509                         }
510                 }
511                 programs
512                 {
513                         //Clear button programs
514                         program
515                         {
516                                 name: "clear_button_show";
517                                 signal: SIGNAL_CLEAR_BTN_SHOW;
518                                 source: SIGNAL_SOURCE;
519                                 action: STATE_SET "visible" 0.0;
520                                 target: "folder_clear_text_btn";
521                         }
522                         program
523                         {
524                                 name: "clear_button_hide";
525                                 signal: SIGNAL_CLEAR_BTN_HIDE;
526                                 source: SIGNAL_SOURCE;
527                                 action: STATE_SET "default" 0.0;
528                                 target: "folder_clear_text_btn";
529                         }
530                         program
531                         {
532                                 name: "folder_entry_block_on";
533                                 signal: SIGNAL_ENTRY_BLOCK_ON;
534                                 source: SIGNAL_SOURCE;
535                                 action: STATE_SET "block_on" 0.0;
536                                 target: "folder_entry_block";
537                         }
538                         program
539                         {
540                                 name: "folder_entry_block_off";
541                                 signal: SIGNAL_ENTRY_BLOCK_OFF;
542                                 source: SIGNAL_SOURCE;
543                                 action: STATE_SET "default" 0.0;
544                                 target: "folder_entry_block";
545                         }
546                         program
547                         {
548                                 name: "clear_btn_clicked";
549                                 signal: "mouse,clicked,1";
550                                 source: "folder_clear_text_btn";
551                                 action: SIGNAL_EMIT SIGNAL_CLEAR_BTN_CLICKED SIGNAL_SOURCE;
552                         }
553                         program
554                         {
555                                 name: "clear_btn_mouse_down";
556                                 signal: "mouse,down,1";
557                                 source: "folder_clear_text_btn";
558                                 action: STATE_SET "dim" 0.0;
559                                 target: "folder_clear_text_btn";
560                         }
561                         program
562                         {
563                                 name: "clear_btn_mouse_up";
564                                 signal: "mouse,up,1";
565                                 source: "folder_clear_text_btn";
566                                 action: STATE_SET "visible" 0.0;
567                                 target: "folder_clear_text_btn";
568                         }
569                         //Animations
570                         program {
571                                 name: "folder_open_animation";
572                                 signal: SIGNAL_FOLDER_PANEL_OPEN;
573                                 source: SIGNAL_SOURCE;
574                                 action: STATE_SET "done" 0.0;
575                                 target: "folder_bg";
576                                 after: "show_entry_program";
577                                 transition: DECELERATE 0.3;
578                         }
579                         program {
580                                 name: "show_entry_program";
581                                 action: STATE_SET "done" 0.0;
582                                 target: PART_FOLDER_NAME;
583                         }
584                         program {
585                                 name: "folder_close_animation_start";
586                                 signal: SIGNAL_FOLDER_PANEL_CLOSE;
587                                 source: SIGNAL_SOURCE;
588                                 action: STATE_SET "default" 0.0;
589                                 target: PART_FOLDER_NAME;
590                                 after: "folder_close_animation";
591                         }
592                         program {
593                                 name: "folder_close_animation";
594                                 action: STATE_SET "default" 0.0;
595                                 target: "folder_bg";
596                                 after: "folder_close_animation_done";
597                                 transition: DECELERATE 0.3;
598                         }
599                         program {
600                                 name: "folder_close_animation_done";
601                                 action: SIGNAL_EMIT SIGNAL_FOLDER_ANIM_DONE SIGNAL_SOURCE;
602                         }
603                         program {
604                                 name: "unnamed_text_show";
605                                 signal: SIGNAL_FOLDER_UNNAMED_TEXT_SHOW;
606                                 source: SIGNAL_SOURCE;
607                                 action: STATE_SET "visible" 0.0;
608                                 target: PART_FOLDER_UNNAMED_TEXT;
609                         }
610                         program {
611                                 name: "unnamed_text_hide";
612                                 signal: SIGNAL_FOLDER_UNNAMED_TEXT_HIDE;
613                                 source: SIGNAL_SOURCE;
614                                 action: STATE_SET "default" 0.0;
615                                 target: PART_FOLDER_UNNAMED_TEXT;
616                         }
617                 }
618         }
619 }