Remove edje_cc warnings
[apps/native/home/homescreen-efl.git] / res / edje / icon.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: "app_press_117.png" COMP;
21         image: "btn_delete_nor.png" COMP;
22         image: "btn_delete_press.png" COMP;
23         image: "app_icon_checkbox_bg.png" COMP;
24         image: "app_icon_checkbox_on.png" COMP;
25         image: "app_icon_checkbox_border.png" COMP;
26         image: "icon_badge_container.png" COMP;
27 }
28
29 styles {
30         style{
31                 name: "icon_label";
32                 base: "font=Samsung Condensed:style=Regular align=center color=#FFFFFFFF font_size=28 wrap=mixed";
33         }
34         style{
35                 name: "icon_label_edit";
36                 base: "font=Samsung Condensed:style=Regular align=center color=#FFFFFFFF font_size=25 wrap=mixed";
37         }
38 }
39
40 collections {
41         group {
42                 name: "app_icon_layout";
43                 script {
44                         public checkbox_state;
45                         public alpha;
46
47                         public message(Msg_Type:type, id, ...) {
48                                 if(type == MSG_INT_SET)
49                                 {
50                                         set_int(alpha, getarg(2));
51                                         send_message(type, id, getarg(2));
52                                 }
53                         }
54                 }
55                 parts {
56                         part { //"icon_bg"
57                                 name: "icon_bg";
58                                 type: SPACER;
59                                 mouse_events: 1;
60                                 repeat_events: 1;
61                                 scale: 0;
62                                 description {
63                                         state: "default" 0.0;
64                                         rel1{relative: 0.0 0.0; }
65                                         rel2{relative: 1.0 1.0; }
66                                 }
67                                 description {
68                                         state: "moved" 0.0;
69                                         inherit: "default" 0.0;
70                                 }
71                                 description {
72                                         state: "edit" 0.0;
73                                         inherit: "default" 0.0;
74                                 }
75                                 description
76                                 {
77                                         state: "manage_state" 0.0;
78                                         inherit: "default" 0.0;
79                                 }
80                         }
81
82                         part { //PART_ICON_CONTENT
83                                 name: PART_ICON_CONTENT;
84                                 type: SWALLOW;
85                                 mouse_events: 1;
86                                 repeat_events: 1;
87                                 scale: 0;
88                                 description {
89                                         state: "default" 0.0;
90                                         rel1{relative: ICON_X_MIN ICON_Y_MIN; to: "icon_bg";}
91                                         rel2{relative: ICON_X_MAX ICON_Y_MAX; to: "icon_bg";}
92                                 }
93                         }
94
95
96                         part { //"icon_content_touch"
97                                 name: "icon_content_touch";
98                                 type: IMAGE;
99                                 mouse_events: 1;
100                                 repeat_events: 1;
101                                 scale: 0;
102                                 description {
103                                         state: "default" 0.0;
104                                         rel1{relative: 0.0 0.0; to: PART_ICON_CONTENT;}
105                                         rel2{relative: 1.0 1.0; to: PART_ICON_CONTENT;}
106                                         aspect: 1.0 1.0;
107                                         aspect_preference: BOTH;
108                                         color: 0 0 0 0;
109                                         image {
110                                                 normal: "app_press_117.png";
111                                         }
112                                 }
113                                 description{
114                                         state: "icon_touched" 0.0;
115                                         inherit: "default" 0.0;
116                                         color: 0 0 0 150;
117                                 }
118                         }
119
120                         part { //PART_ICON_NAME
121                                 name: PART_ICON_NAME;
122                                 type: TEXTBLOCK;
123                                 mouse_events: 1;
124                                 repeat_events: 1;
125                                 scale: 1;
126                                 description {
127                                         state: "default" 0.0;
128                                         rel1{relative: ICON_NAME_X_MIN ICON_NAME_Y_MIN; to: "icon_bg";}
129                                         rel2{relative: ICON_NAME_X_MAX ICON_NAME_Y_MAX; to: "icon_bg";}
130                                         color: 255 255 255 255;
131                                         text {
132                                                 style: "icon_label";
133                                                 align: 0.5 0.0;
134                                         }
135                                 }
136                                 description {
137                                         state: "edit" 0.0;
138                                         inherit: "default" 0.0;
139                                         rel1{relative: ICON_NAME_X_MIN ICON_NAME_Y_MIN; to: "icon_bg";}
140                                         rel2{relative: ICON_NAME_X_MAX 1.0; to: "icon_bg";}
141                                         text {
142                                                 style: "icon_label_edit";
143                                         }
144                                 }
145                                 description {
146                                         state: "black_text" 0.0;
147                                         inherit: "default" 0.0;
148                                         color: 0 0 0 255;
149                                 }
150                                 description {
151                                         state: "black_edit" 0.0;
152                                         inherit: "black_text" 0.0;
153                                         text {
154                                                 style: "icon_label_edit";
155                                         }
156                                 }
157                         }
158
159
160                         /*************************** BADGE *************************************/
161
162                         part
163                         {
164                                 name: "icon_badge";
165                                 type: IMAGE;
166                                 scale: 0;
167                                 description
168                                 {
169                                         state: "default" 0.0;
170                                         rel1{relative: 0.0 0.0; offset: -10 -1; to: "icon_badge_text";}
171                                         rel2{relative: 1.0 1.0; offset: 9 1; to: "icon_badge_text";}
172                                         visible: 0;
173                                         image
174                                         {
175                                                 normal: "icon_badge_container.png";
176                                                 border: 15 14 0 0;
177                                         }
178                                 }
179                                 description
180                                 {
181                                         state: "visible" 0.0;
182                                         inherit: "default" 0.0;
183                                         visible: 1;
184                                 }
185                         }
186
187                         part
188                         {
189                                 name: "icon_badge_text";
190                                 type: TEXT;
191                                 scale: 1;
192                                 description
193                                 {
194                                         state: "default" 0.0;
195                                         visible: 0;
196                                         fixed: 1 1;
197                                         color: 255 255 255 255;
198                                         rel1{relative: BADGE_REL_X BADGE_REL_Y; to: "icon_bg";}
199                                         rel2{relative: BADGE_REL_X BADGE_REL_Y; to: "icon_bg";}
200                                         align: 1.0 0.0;
201                                         text
202                                         {
203                                                 font: "arial";
204                                                 size: 32;
205                                                 text_class: "ATO002";
206                                                 min: 1 1;
207                                                 max: 1 1;
208                                                 ellipsis: -1;
209                                         }
210                                 }
211                                 description
212                                 {
213                                         state: "visible" 0.0;
214                                         inherit: "default" 0.0;
215                                         visible: 1;
216                                 }
217                         }
218
219                         /*************************** END OF BADGE *************************************/
220
221                         part { //"icon_uninstall_button";
222                                 name: "icon_uninstall_button";
223                                 type: IMAGE;
224                                 scale: 0;
225                                 description {
226                                         state: "default" 0.0;
227                                         rel1{relative: 0.0 0.0; to: "icon_bg";}
228                                         rel2{relative: ICON_UNINSTALL_BTN_X_MAX ICON_UNINSTALL_BTN_Y_MAX; to: "icon_bg";}
229                                         color: 255 255 255 0;
230                                         visible: 0;
231                                         aspect: 1.0 1.0;
232                                         aspect_preference: BOTH;
233                                         image {
234                                                 normal: "btn_delete_nor.png";
235                                         }
236                                 }
237                                 description {
238                                         state: "show" 0.0;
239                                         inherit: "default" 0.0;
240                                         color: 255 255 255 255;
241                                         visible: 1;
242                                 }
243                                 description {
244                                         state: "press" 0.0;
245                                         inherit: "default" 0.0;
246                                         color: 255 255 255 255;
247                                         image {
248                                                 normal: "btn_delete_press.png";
249                                         }
250                                         visible: 1;
251                                 }
252                         }
253
254                         /*Icons checkboxes in choose state:*/
255                         part { //"icon_checkbox_bg";
256                                 name: "icon_checkbox_bg";
257                                 type: IMAGE;
258                                 scale: 0;
259                                 description {
260                                         state: "default" 0.0;
261                                         rel1{relative: ICON_BADGE_CHECKBOX_REL1_X ICON_BADGE_CHECKBOX_REL1_Y; to: "icon_bg";}
262                                         rel2{relative: ICON_BADGE_CHECKBOX_REL2_X ICON_BADGE_CHECKBOX_REL2_Y; to: "icon_bg";}
263                                         color: 255 255 255 120;
264                                         visible: 0;
265                                         aspect: 1.0 1.0;
266                                         aspect_preference: BOTH;
267                                         //TODO: image from home-lite is used...
268                                         image {
269                                                 normal: "app_icon_checkbox_bg.png";
270                                         }
271                                 }
272                                 description {
273                                         state: "blank" 0.0;
274                                         inherit: "default" 0.0;
275                                         visible: 1;
276                                 }
277                                 description {
278                                         state: "checked" 0.0;
279                                         inherit: "default" 0.0;
280                                         //color_class: "ATO005";
281                                         color: 255 255 255 255;
282                                         visible: 1;
283                                 }
284                         }
285
286                         part { //"icon_checkbox_border";
287                                 name: "icon_checkbox_border";
288                                 type: IMAGE;
289                                 scale: 0;
290                                 description {
291                                         state: "default" 0.0;
292                                         rel1{relative: 0.0 0.0; to: "icon_checkbox_bg";}
293                                         rel2{relative: 1.0 1.0; to: "icon_checkbox_bg";}
294                                         color: 255 255 255 0;
295                                         visible: 0;
296                                         aspect: 1.0 1.0;
297                                         aspect_preference: BOTH;
298                                         image {
299                                                 normal: "app_icon_checkbox_border.png";
300                                         }
301                                 }
302                                 description {
303                                         state: "blank" 0.0;
304                                         inherit: "default" 0.0;
305                                         color: 255 255 255 255;
306                                         visible: 1;
307                                 }
308                                 description {
309                                         state: "checked" 0.0;
310                                         inherit: "default" 0.0;
311                                         color: 255 255 255 120;
312                                         visible: 1;
313                                 }
314                         }
315
316                         part { //"icon_checkbox"
317                                 name: "icon_checkbox";
318                                 type: IMAGE;
319                                 scale: 0;
320                                 description {
321                                         state: "default" 0.0;
322                                         rel1{relative: 0.0 0.0; to: "icon_checkbox_bg";}
323                                         rel2{relative: 1.0 1.0; to: "icon_checkbox_bg";}
324                                         color: 255 255 255 0;
325                                         visible: 0;
326                                         aspect: 1.0 1.0;
327                                         aspect_preference: BOTH;
328                                         image {
329                                                 normal: "app_icon_checkbox_on.png";
330                                         }
331                                 }
332                                 description {
333                                         state: "blank" 0.0;
334                                         inherit: "default" 0.0;
335                                         color: 255 255 255 255;
336                                         visible: 0;
337                                 }
338                                 description {
339                                         state: "checked" 0.0;
340                                         inherit: "default" 0.0;
341                                         color: 255 255 255 255;
342                                         visible: 1;
343                                 }
344                         }
345
346                         part { //checkbox_click_area
347                                 name: "checkbox_click_area";
348                                 type: RECT;
349                                 scale: 0;
350                                 description {
351                                         state: "default" 0.0;
352                                         color: 0 0 0 0;
353                                         rel1 {
354                                                 relative: -0.2 -0.2;
355                                                 to: "icon_checkbox";
356                                         }
357                                         rel2 {
358                                                 relative: 1.2 1.2;
359                                                 to: "icon_checkbox";
360                                         }
361                                         visible: 0;
362                                 }
363                                 description {
364                                         state: "visible" 0.0;
365                                         inherit: "default" 0.0;
366                                         visible: 1;
367                                 }
368                         }
369                 }
370
371                 programs {
372                         program {
373                                 name: "group_loaded";
374                                 signal: "load";
375                                 source: "";
376                                 script {
377                                         set_int(checkbox_state, 0);
378                                 }
379                         }
380                         program {
381                                 name: "icon_clicked_program";
382                                 signal :"mouse,clicked,1";
383                                 source: "icon_content";
384                                 action: SIGNAL_EMIT SIGNAL_ICON_CLICKED SIGNAL_SOURCE;
385                                 //after: program with change the icon shadow state to clicked!
386                         }
387
388                         program {
389                                 name: "icon_touch_program";
390                                 signal: SIGNAL_ICON_PRESS;
391                                 source: SIGNAL_PRESS_SOURCE;
392                                 action: STATE_SET "icon_touched" 0.0;
393                                 target: "icon_content_touch";
394                                 transition: LINEAR 0.1;
395                         }
396
397                         program {
398                                 name: "icon_touch_release_program";
399                                 signal: "mouse,up,1";
400                                 source: "icon_content_touch";
401                                 action: STATE_SET "default" 0.0;
402                                 target: "icon_content_touch";
403                                 transition: LINEAR 0.1;
404                         }
405                         program {
406                                 name: "edit_mode_on";
407                                 signal: SIGNAL_EDIT_MODE_ON;
408                                 source: SIGNAL_SOURCE;
409                                 action: STATE_SET "edit" 0.0;
410                                 target: PART_ICON_NAME;
411                         }
412                         program {
413                                 name: "edit_mode_off";
414                                 signal: SIGNAL_EDIT_MODE_OFF;
415                                 source: SIGNAL_SOURCE;
416                                 action: STATE_SET "default" 0.0;
417                                 target: PART_ICON_NAME;
418                         }
419                         program {
420                                 name: "edit_mode_black_on";
421                                 signal: SIGNAL_EDIT_MODE_BLACK_ON;
422                                 source: SIGNAL_SOURCE;
423                                 action: STATE_SET "black_edit" 0.0;
424                                 target: PART_ICON_NAME;
425                         }
426                         program {
427                                 name: "edit_mode_black_off";
428                                 signal: SIGNAL_EDIT_MODE_BLACK_OFF;
429                                 source: SIGNAL_SOURCE;
430                                 action: STATE_SET "black_text" 0.0;
431                                 target: PART_ICON_NAME;
432                         }
433                         program {
434                                 name: "uninstall_button_show";
435                                 signal: SIGNAL_UNINSTALL_BUTTON_SHOW;
436                                 source: SIGNAL_SOURCE;
437                                 action: STATE_SET "show" 0.0;
438                                 target: "icon_uninstall_button";
439                                 transition: DECELERATE 0.20;
440                         }
441                         program {
442                                 name: "uninstall_button_hide";
443                                 signal: SIGNAL_UNINSTALL_BUTTON_HIDE;
444                                 source: SIGNAL_SOURCE;
445                                 action: STATE_SET "default" 0.0;
446                                 target: "icon_uninstall_button";
447                                 transition: DECELERATE 0.20;
448                         }
449                         program {
450                                 name: "uninstall_button_clicked";
451                                 signal: "mouse,clicked,1";
452                                 source: "icon_uninstall_button";
453                                 action: SIGNAL_EMIT SIGNAL_UNINSTALL_BUTTON_CLICKED SIGNAL_SOURCE;
454                         }
455                         program {
456                                 name: "uninstall_button_mouse_down";
457                                 signal: "mouse,down,1";
458                                 source: "icon_uninstall_button";
459                                 action: STATE_SET "press" 0.0;
460                                 target: "icon_uninstall_button";
461                                 transition: DECELERATE 0.20;
462                         }
463                         program {
464                                 name: "uninstall_button_mouse_up";
465                                 signal: "mouse,up,1";
466                                 source: "icon_uninstall_button";
467                                 action: STATE_SET "show" 0.0;
468                                 target: "icon_uninstall_button";
469                                 transition: DECELERATE 0.20;
470                         }
471
472                         //Checkbox
473                         program {
474                                 name: "checkbox_show_unchecked";
475                                 signal: SIGNAL_CHECKBOX_SHOW_UNCHECKED;
476                                 source: SIGNAL_SOURCE;
477                                 script {
478                                         set_int(checkbox_state, 0);
479                                         emit("checkbox,blank,show", SIGNAL_SOURCE);
480                                 }
481                                 after: "checkbox_area_visible";
482                         }
483                         program {
484                                 name: "checkbox_show_checked";
485                                 signal: SIGNAL_CHECKBOX_SHOW_CHECKED;
486                                 source: SIGNAL_SOURCE;
487                                 script {
488                                         set_int(checkbox_state, 1);
489                                         emit("checkbox,checked,show", SIGNAL_SOURCE);
490                                 }
491                                 after: "checkbox_area_visible";
492                         }
493                         program {
494                                 name: "checkbox_blank_show";
495                                 signal: "checkbox,blank,show";
496                                 source: SIGNAL_SOURCE;
497                                 action: STATE_SET "blank" 0.0;
498                                 target: "icon_checkbox";
499                                 target: "icon_checkbox_border";
500                                 target: "icon_checkbox_bg";
501                         }
502                         program {
503                                 name: "checkbox_hide";
504                                 signal: SIGNAL_CHECKBOX_HIDE;
505                                 source: SIGNAL_SOURCE;
506                                 action: STATE_SET "default" 0.0;
507                                 target: "icon_checkbox";
508                                 target: "icon_checkbox_border";
509                                 target: "icon_checkbox_bg";
510                                 transition: DECELERATE 0.20;
511                                 after: "checkbox_area_hide";
512                         }
513                         program {
514                                 name: "checkbox_checked_show";
515                                 signal: "checkbox,checked,show";
516                                 source: SIGNAL_SOURCE;
517                                 action: STATE_SET "checked" 0.0;
518                                 target: "icon_checkbox";
519                                 target: "icon_checkbox_border";
520                                 target: "icon_checkbox_bg";
521                                 transition: DECELERATE 0.20;
522                         }
523                         program {
524                                 name: "checkbox_clicked";
525                                 signal: "mouse,clicked,1";
526                                 source: "checkbox_click_area";
527                                 script {
528                                         if (get_int(checkbox_state) == 0) {
529                                                 set_int(checkbox_state, 1); //isnt it deprecated?
530                                                 emit("checkbox,checked,show", SIGNAL_SOURCE); //signal for edje state change
531                                                 emit("checkbox,checked", SIGNAL_SOURCE); //signal for C listener
532                                         }
533                                         else {
534                                                 set_int(checkbox_state, 0);
535                                                 emit("checkbox,blank,show", SIGNAL_SOURCE); //signal for edje state change
536                                                 emit("checkbox,unchecked", SIGNAL_SOURCE); //signal for C listener
537                                         }
538                                 }
539                         }
540                         /*This is when ALLs are in management mode:*/
541                         program {
542                                 name: "set_manage_state_program";
543                                 signal: "set_manage_state";
544                                 source: SIGNAL_SOURCE;
545                                 action: STATE_SET "manage_state" 0.0;
546                                 target: "icon_bg";
547                                 transition: DECELERATE 0.2;
548                         }
549                         /*This is default for ALLs: */
550                         program {
551                                 name: "unset_manage_state_program";
552                                 signal: "unset_manage_state";
553                                 source: SIGNAL_SOURCE;
554                                 action: STATE_SET "default" 0.0;
555                                 target: "icon_bg";
556                                 transition: DECELERATE 0.2;
557                         }
558                         program {
559                                 name: "program_no_text";
560                                 signal: SIGNAL_LABEL_HIDE;
561                                 source: SIGNAL_SOURCE;
562                                 action: STATE_SET "no_text" 0.0;
563                                 target: PART_ICON_NAME;
564                         }
565                         program {
566                                 name: "program_black_text";
567                                 signal: "label,text,black";
568                                 source: SIGNAL_SOURCE;
569                                 action: STATE_SET "black_text" 0.0;
570                                 target: PART_ICON_NAME;
571                         }
572                         program {
573                                 name: "program_default";
574                                 signal: SIGNAL_LABEL_SHOW;
575                                 source: SIGNAL_SOURCE;
576                                 action: STATE_SET "default" 0.0;
577                                 target: PART_ICON_NAME;
578                                 transition: DECELERATE 0.20;
579                         }
580                         program {
581                                 name: "icon_badge_show";
582                                 signal: SIGNAL_BADGE_SHOW;
583                                 source: SIGNAL_SOURCE;
584                                 action: STATE_SET "visible" 0.0;
585                                 target: "icon_badge";
586                                 target: "icon_badge_text";
587                         }
588                         program {
589                                 name: "icon_badge_hide";
590                                 signal: SIGNAL_BADGE_HIDE;
591                                 source: SIGNAL_SOURCE;
592                                 action: STATE_SET "default" 0.0;
593                                 target: "icon_badge";
594                                 target: "icon_badge_text";
595                         }
596                         program {
597                                 name: "checkbox_area_visible";
598                                 action: STATE_SET "visible" 0.0;
599                                 target: "checkbox_click_area";
600                         }
601                         program {
602                                 name: "checkbox_area_hide";
603                                 action: STATE_SET "default" 0.0;
604                                 target: "checkbox_click_area";
605                         }
606                         program {
607                                 name: "area,clicked";
608                                 signal: "mouse,clicked,1";
609                                 source: "checkbox_click_area";
610                                 action: SIGNAL_EMIT "mouse,clicked,1" "icon_checkbox";
611                         }
612                         program {
613                                 name: "checkbox,block";
614                                 signal: SIGNAL_CHECKBOX_BLOCK;
615                                 source: SIGNAL_SOURCE;
616                                 action: STATE_SET "default" 0.0;
617                                 target: "checkbox_click_area";
618                         }
619                         program {
620                                 name: "checkbox,unblock";
621                                 signal: SIGNAL_CHECKBOX_UNBLOCK;
622                                 source: SIGNAL_SOURCE;
623                                 action: STATE_SET "visible" 0.0;
624                                 target: "checkbox_click_area";
625                         }
626                 }
627         }
628 }