2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://floralicense.org/license/
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.
17 #include "../../inc/conf.h"
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;
32 base: "font=Samsung Condensed:style=Regular align=center color=#FFFFFFFF font_size=28 wrap=mixed";
35 name: "icon_label_edit";
36 base: "font=Samsung Condensed:style=Regular align=center color=#FFFFFFFF font_size=25 wrap=mixed";
42 name: "app_icon_layout";
44 public checkbox_state;
47 public message(Msg_Type:type, id, ...) {
48 if(type == MSG_INT_SET)
50 set_int(alpha, getarg(2));
51 send_message(type, id, getarg(2));
64 rel1{relative: 0.0 0.0; }
65 rel2{relative: 1.0 1.0; }
69 inherit: "default" 0.0;
73 inherit: "default" 0.0;
77 state: "manage_state" 0.0;
78 inherit: "default" 0.0;
82 part { //PART_ICON_CONTENT
83 name: PART_ICON_CONTENT;
90 rel1{relative: ICON_X_MIN ICON_Y_MIN; to: "icon_bg";}
91 rel2{relative: ICON_X_MAX ICON_Y_MAX; to: "icon_bg";}
96 part { //"icon_content_touch"
97 name: "icon_content_touch";
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;}
107 aspect_preference: BOTH;
110 normal: "app_press_117.png";
114 state: "icon_touched" 0.0;
115 inherit: "default" 0.0;
120 part { //PART_ICON_NAME
121 name: PART_ICON_NAME;
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;
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";}
142 style: "icon_label_edit";
146 state: "black_text" 0.0;
147 inherit: "default" 0.0;
151 state: "black_edit" 0.0;
152 inherit: "black_text" 0.0;
154 style: "icon_label_edit";
160 /*************************** BADGE *************************************/
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";}
175 normal: "icon_badge_container.png";
181 state: "visible" 0.0;
182 inherit: "default" 0.0;
189 name: "icon_badge_text";
194 state: "default" 0.0;
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";}
205 text_class: "ATO002";
213 state: "visible" 0.0;
214 inherit: "default" 0.0;
219 /*************************** END OF BADGE *************************************/
221 part { //"icon_uninstall_button";
222 name: "icon_uninstall_button";
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;
232 aspect_preference: BOTH;
234 normal: "btn_delete_nor.png";
239 inherit: "default" 0.0;
240 color: 255 255 255 255;
245 inherit: "default" 0.0;
246 color: 255 255 255 255;
248 normal: "btn_delete_press.png";
254 /*Icons checkboxes in choose state:*/
255 part { //"icon_checkbox_bg";
256 name: "icon_checkbox_bg";
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;
266 aspect_preference: BOTH;
267 //TODO: image from home-lite is used...
269 normal: "app_icon_checkbox_bg.png";
274 inherit: "default" 0.0;
278 state: "checked" 0.0;
279 inherit: "default" 0.0;
280 //color_class: "ATO005";
281 color: 255 255 255 255;
286 part { //"icon_checkbox_border";
287 name: "icon_checkbox_border";
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;
297 aspect_preference: BOTH;
299 normal: "app_icon_checkbox_border.png";
304 inherit: "default" 0.0;
305 color: 255 255 255 255;
309 state: "checked" 0.0;
310 inherit: "default" 0.0;
311 color: 255 255 255 120;
316 part { //"icon_checkbox"
317 name: "icon_checkbox";
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;
327 aspect_preference: BOTH;
329 normal: "app_icon_checkbox_on.png";
334 inherit: "default" 0.0;
335 color: 255 255 255 255;
339 state: "checked" 0.0;
340 inherit: "default" 0.0;
341 color: 255 255 255 255;
346 part { //checkbox_click_area
347 name: "checkbox_click_area";
351 state: "default" 0.0;
364 state: "visible" 0.0;
365 inherit: "default" 0.0;
373 name: "group_loaded";
377 set_int(checkbox_state, 0);
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!
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
474 name: "checkbox_show_unchecked";
475 signal: SIGNAL_CHECKBOX_SHOW_UNCHECKED;
476 source: SIGNAL_SOURCE;
478 set_int(checkbox_state, 0);
479 emit("checkbox,blank,show", SIGNAL_SOURCE);
481 after: "checkbox_area_visible";
484 name: "checkbox_show_checked";
485 signal: SIGNAL_CHECKBOX_SHOW_CHECKED;
486 source: SIGNAL_SOURCE;
488 set_int(checkbox_state, 1);
489 emit("checkbox,checked,show", SIGNAL_SOURCE);
491 after: "checkbox_area_visible";
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";
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";
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;
524 name: "checkbox_clicked";
525 signal: "mouse,clicked,1";
526 source: "checkbox_click_area";
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
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
540 /*This is when ALLs are in management mode:*/
542 name: "set_manage_state_program";
543 signal: "set_manage_state";
544 source: SIGNAL_SOURCE;
545 action: STATE_SET "manage_state" 0.0;
547 transition: DECELERATE 0.2;
549 /*This is default for ALLs: */
551 name: "unset_manage_state_program";
552 signal: "unset_manage_state";
553 source: SIGNAL_SOURCE;
554 action: STATE_SET "default" 0.0;
556 transition: DECELERATE 0.2;
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;
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;
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;
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";
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";
597 name: "checkbox_area_visible";
598 action: STATE_SET "visible" 0.0;
599 target: "checkbox_click_area";
602 name: "checkbox_area_hide";
603 action: STATE_SET "default" 0.0;
604 target: "checkbox_click_area";
607 name: "area,clicked";
608 signal: "mouse,clicked,1";
609 source: "checkbox_click_area";
610 action: SIGNAL_EMIT "mouse,clicked,1" "icon_checkbox";
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";
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";