/* * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved * * PROPRIETARY/CONFIDENTIAL * * This software is the confidential and proprietary information of SAMSUNG * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this * software is owned by Samsung and you shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the license * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no * representations or warranties about the suitability of the software, either * express or implied, including but not limited to the implied warranties of * merchantability, fitness for a particular purpose, or non-infringement. * SAMSUNG shall not be liable for any damages suffered by licensee arising out * of or releated to this software. * */ #define CH(_pos) \ part { name: "ch_"#_pos".base"; \ type: RECT; \ scale: 1;\ description { state: "default" 0.0; \ rel1 { \ relative: (_pos % 7 / 7) 0; \ to: "header"; \ } \ rel2 { \ relative: (_pos % 7 / 7 + 1 / 7) 1; \ to: "header"; \ } \ color: 0 0 0 0; \ visible: 0; \ } \ } \ part { name: "ch_"#_pos".text"; \ type: TEXT; \ mouse_events: 0; \ scale: 1; \ clip_to: "ch_"#_pos".clipper"; \ description { \ state: "default" 0.0; \ rel1.to: "ch_"#_pos".base"; \ rel2.to: "ch_"#_pos".base"; \ color: CALENDAR_WEEKDAY_FONT_COLOR_INC; \ text { \ font: "SLP:style=Roman"; \ size: CALENDAR_DAY_FONT_SIZE_INC; \ min: 1 1; \ align: 0.5 0.5; \ text_class: "slp_roman"; \ } \ } \ } \ part { name: "ch_"#_pos".clipper"; \ type: RECT; \ scale: 1; \ description { state: "default" 0.0; \ rel1.to: "ch_"#_pos".base"; \ rel2.to: "ch_"#_pos".base"; \ } \ } #define CIT(_pos) \ part { name: "cit_"#_pos".rect"; \ scale: 1;\ description { state: "default" 0.0; \ rel1 { \ relative: (_pos % 7 / 7) \ (_pos / 7 / 6 - _pos % 7 / 7 / 6); \ to: "base"; \ } \ rel2 { \ relative: (_pos % 7 / 7 + 1 / 7) \ (_pos / 7 / 6 - _pos % 7 / 7 / 6 + 1 / 6); \ to: "base"; \ offset: 0 0; \ } \ image { \ normal: "00_picker_field_bg.png"; \ } \ visible: 1; \ } \ description { state: "selected" 0.0; \ inherit: "default" 0.0; \ image { \ normal: "00_picker_btn_press.png"; \ border: 2 2 4 4; \ } \ } \ description { state: "expand" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative: (_pos % 7 / 7) \ (_pos / 7 / 5 - _pos % 7 / 7 / 5); \ to: "base"; \ } \ rel2 { \ relative: (_pos % 7 / 7 + 1 / 7) \ (_pos / 7 / 5 - _pos % 7 / 7 / 5 + 1 / 5); \ to: "base"; \ offset: 0 0; \ } \ } \ description { state: "invisible" 0.0; \ inherit: "default" 0.0; \ min: 0 0; \ max: 0 0;\ } \ description { state: "today_normal" 0.0; \ inherit: "default" 0.0; \ image { \ normal: "00_picker_btn_current.png"; \ border: 5 4 4 4; \ } \ }\ description { state: "today_expand" 0.0; \ inherit: "expand" 0.0; \ image { \ normal: "00_picker_btn_current.png"; \ border: 5 4 4 4; \ } \ } \ } \ part { \ name: "cit_"#_pos".event"; \ type: RECT; \ scale: 1;\ repeat_events: 1; \ description { \ rel1.to: "cit_"#_pos".rect"; \ rel2.to: "cit_"#_pos".rect"; \ state: "default" 0.0; \ color: 0 0 0 0; \ } \ } \ part { \ name: "cit_"#_pos".bg"; \ mouse_events: 0; \ scale: 1;\ description { state: "default" 0.0; \ visible: 0; \ color: 255 255 255 0; \ rel1 { \ to: "cit_"#_pos".rect"; \ relative: 0.0 0.0; \ } \ rel2 { \ to: "cit_"#_pos".rect"; \ relative: 1.0 1.0; \ } \ image { \ normal: "00_calend_picker_day_press.png"; \ } \ image.middle: SOLID; \ } \ description { state: "selected" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ color: 255 255 255 255; \ } \ } \ part { name: "cit_"#_pos".text"; \ type: TEXT; \ mouse_events: 0; \ scale: 1; \ description { \ state: "default" 0.0; \ rel1.to: "cit_"#_pos".rect"; \ rel2.to: "cit_"#_pos".rect"; \ color: CALENDAR_WEEKDAY_FONT_COLOR_INC; \ text { \ font: "SLP:style=Medium"; \ size: CALENDAR_DATE_FONT_SIZE_INC; \ min: 1 1; \ align: 0.5 0.5; \ text_class: "slp_medium"; \ } \ } \ description { state: "saturday" 0.0; \ inherit: "default" 0.0; \ color: CALENDAR_SATURDAY_FONT_COLOR_INC; \ } \ description { state: "sunday" 0.0; \ inherit: "default" 0.0; \ color: CALENDAR_SUNDAY_FONT_COLOR_INC; \ } \ description { state: "selected" 0.0; \ inherit: "default" 0.0; \ color: CALENDAR_SELECTED_DATE_FONT_COLOR_INC; \ } \ description { state: "selected_saturday" 0.0; \ inherit: "default" 0.0; \ color: CALENDAR_SELECTED_DATE_FONT_COLOR_INC; \ } \ description { state: "selected_sunday" 0.0; \ inherit: "default" 0.0; \ color: CALENDAR_SELECTED_DATE_FONT_COLOR_INC; \ } \ } \ part { name: "cit_"#_pos".check"; \ mouse_events: 0; \ scale: 1;\ description { state: "default" 0.0; \ rel1 { \ to: "cit_"#_pos".rect"; \ relative: 0.7 0.6; \ offset: 1 1; \ } \ rel2 { \ to: "cit_"#_pos".rect"; \ relative: 1.1 1.2; \ offset: -2 -2; \ } \ aspect: 1 1; \ visible: 0; \ image.normal: "00_check_checking.png"; \ } \ description { state: "visible" 0.0; \ inherit: "default" 0.0; \ visible: 1; \ } \ } \ programs { \ program { \ name: "cit_"#_pos".go_active"; \ signal: "cit_"#_pos",selected"; \ source: "elm"; \ script { \ new st[31]; \ new Float:vl; \ get_state(PART:"cit_"#_pos".text", st, 30, vl); \ if (!strcmp(st, "saturday")) \ set_state(PART:"cit_"#_pos".text", "selected_saturday", 0.0); \ else if (!strcmp(st, "sunday")) \ set_state(PART:"cit_"#_pos".text", "selected_sunday", 0.0); \ else \ set_state(PART:"cit_"#_pos".text", "selected", 0.0); \ set_state(PART:"cit_"#_pos".bg", "selected", 0.0); \ } \ } \ program { \ name: "cit_"#_pos".go_passive"; \ signal: "cit_"#_pos",unselected"; \ source: "elm"; \ script { \ new st[31]; \ new Float:vl; \ get_state(PART:"cit_"#_pos".text", st, 30, vl); \ if (!strcmp(st, "selected_saturday")) \ set_state(PART:"cit_"#_pos".text", "saturday", 0.0); \ else if (!strcmp(st, "selected_sunday")) \ set_state(PART:"cit_"#_pos".text", "sunday", 0.0); \ else \ set_state(PART:"cit_"#_pos".text", "default", 0.0); \ set_state(PART:"cit_"#_pos".bg", "default", 0.0); \ } \ } \ program { \ name: "cit_"#_pos".weekday"; \ signal: "cit_"#_pos",weekday"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "cit_"#_pos".text"; \ } \ program { \ name: "cit_"#_pos".saturday"; \ signal: "cit_"#_pos",saturday"; \ source: "elm"; \ action: STATE_SET "saturday" 0.0; \ target: "cit_"#_pos".text"; \ } \ program { \ name: "cit_"#_pos".sunday"; \ signal: "cit_"#_pos",sunday"; \ source: "elm"; \ action: STATE_SET "sunday" 0.0; \ target: "cit_"#_pos".text"; \ } \ program { \ name: "cit_"#_pos".is_today"; \ signal: "cit_"#_pos",today"; \ source: "elm"; \ script { \ new st[31]; \ new Float:vl; \ get_state(PART:"cit_"#_pos".rect", st, 30, vl); \ if (!strcmp(st, "expand")) \ { \ set_state(PART:"cit_"#_pos".rect", "today_expand", 0.0); \ } \ else \ { \ set_state(PART:"cit_"#_pos".rect", "today_normal", 0.0); \ } \ } \ } \ program { \ name: "cit_"#_pos".not_today"; \ signal: "cit_"#_pos",not_today"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "cit_"#_pos".rect"; \ } \ program { \ source: "cit_"#_pos".clicked"; \ signal: "mouse,clicked,1"; \ source: "cit_"#_pos".event"; \ action: SIGNAL_EMIT "elm,action,selected" #_pos; \ } \ program { \ name: "cit_"#_pos".clear"; \ signal: "cit_"#_pos",clear"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "cit_"#_pos".check"; \ } \ program { \ name: "cit_"#_pos".checked"; \ signal: "cit_"#_pos",checked"; \ source: "elm"; \ action: STATE_SET "visible" 0.0; \ target: "cit_"#_pos".check"; \ } \ program { \ name: "cit_"#_pos".go_expanded"; \ signal: "cit_"#_pos",cell_expanded"; \ source: "elm"; \ action: STATE_SET "expand" 0.0; \ target: "cit_"#_pos".rect"; \ } \ program { \ name: "cit_"#_pos".go_default"; \ signal: "cit_"#_pos",cell_default"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "cit_"#_pos".rect"; \ } \ program { \ name: "cit_"#_pos".go_invisible"; \ signal: "cit_"#_pos",cell_invisible"; \ source: "elm"; \ action: STATE_SET "invisible" 0.0; \ target: "cit_"#_pos".rect"; \ } \ } #define CSEPV(_pos) \ part { name: "csep_"#_pos".vertical"; \ type: RECT; \ scale: 1;\ description { state: "default" 0.0; \ rel1 { \ relative: (_pos / 7) 0; \ to: "base"; \ } \ rel2 { \ relative: (_pos / 7) 1; \ to: "base"; \ offset: 1 0; \ } \ color: CALENDAR_SEPERATOR_FONT_COLOR_INC; \ visible: 1; \ } \ } #define CSEPH(_pos) \ part { name: "csep_"#_pos".horizontal"; \ type: RECT; \ scale: 1;\ description { state: "default" 0.0; \ rel1 { \ relative: 0 (_pos / 6); \ to: "base"; \ } \ rel2 { \ relative: 1 (_pos / 6); \ to: "base"; \ offset: 0 1; \ } \ color: CALENDAR_SEPERATOR_FONT_COLOR_INC; \ visible: 1; \ } \ description { state: "expand" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative: 0 (_pos / 5); \ to: "base"; \ } \ rel2 { \ relative: 1 (_pos / 5); \ to: "base"; \ offset: 0 1; \ } \ } \ description { state: "invisible" 0.0; \ inherit: "default" 0.0; \ visible: 0; \ } \ } \ programs { \ program { \ name: "cseph_"_pos".go_show"; \ signal: "cseph_"#_pos",row_show"; \ source: "elm"; \ action: STATE_SET "default" 0.0; \ target: "csep_"#_pos".horizontal"; \ } \ program { \ name: "cseph_"_pos".go_hide"; \ signal: "cseph_"#_pos",row_hide"; \ source: "elm"; \ action: STATE_SET "expand" 0.0; \ target: "csep_"#_pos".horizontal"; \ } \ program { \ name: "cseph_"_pos".go_invisible"; \ signal: "cseph_"#_pos",row_invisible"; \ source: "elm"; \ action: STATE_SET "invisible" 0.0; \ target: "csep_"#_pos".horizontal"; \ } \ } group { name: "elm/calendar/base/default"; images { image: "00_check_checking.png" COMP; image: "00_picker_arrow_left.png" COMP; image: "00_picker_arrow_left_press.png" COMP; image: "00_picker_arrow_right.png" COMP; image: "00_picker_arrow_right_press.png" COMP; image: "00_picker_btn_press.png" COMP; image: "00_picker_btn_normal.png" COMP; image: "00_calend_picker_day_press.png" COMP; image: "00_picker_btn_current.png" COMP; image: "00_picker_btn_press.png" COMP; image: "00_picker_field_bg.png" COMP; } script { public day_type; } parts { part { name: "bg"; type: RECT; scale: 1; description { state: "default" 0.0; min: 0 30; color: CALENDAR_BACKGROUND_COLOR_INC; align: 0.0 0.5; } } part { name: "spinner-base"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: CALENDAR_HEADER_MIN_WIDTH_INC CALENDAR_HEADER_MIN_HEIGHT_INC; max: 999999 CALENDAR_HEADER_MIN_HEIGHT_INC; rel1.to: "bg"; rel1.offset: 5 9; rel2.to: "bg"; rel2.offset: -5 -9; color: CALENDAR_BACKGROUND_COLOR_INC; align: 0.0 0.0; } } part { name: "table-base"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: CALENDAR_BASE_MIN_WIDTH_INC CALENDAR_BASE_MIN_HEIGHT_INC; rel1.to_x: "bg"; rel1.to_y: "spinner-base"; rel1.offset: 6 0; rel1.relative: 0 1; rel2.to: "bg"; rel2.offset: -6 -3; color: CALENDAR_BACKGROUND_COLOR_INC; } } part { name: "header"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; rel1.to: "table-base"; rel1.relative: 0 0; rel2.to: "table-base"; rel2.relative: 1 0.1; color: CALENDAR_BACKGROUND_COLOR_INC; } } part { name: "sep_header"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; rel1.to: "header"; rel1.relative: 0 1; rel2.to: "header"; rel2.relative: 1 1; rel2.offset: 0 2; color: CALENDAR_SEPERATOR_FONT_COLOR_INC; } } part { name: "base"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; rel1.to_x: "table-base"; rel1.to_y: "sep_header"; rel1.relative: 0 1; rel1.offset: 3 0; rel2.to: "table-base"; rel2.relative: 1 1; rel2.offset: -3 -5; color: 202 2 2 0; } } part { name: "sep_vertical1"; type: RECT; scale: 1; description { state: "default" 0.0; rel1.to: "base"; rel1.relative: 1/7 0; rel2.to: "base"; rel2.relative: 1/7 1; rel2.offset: 1 0; color: CALENDAR_SEPERATOR_FONT_COLOR_INC; } } part { name: "left_bt"; mouse_events: 1; scale: 1; description { state: "default" 0.0; rel1 { to: "spinner-base"; offset: 0 0; } rel2 { to: "spinner-base"; offset: 0 0; } align: 0.0 0.5; min: CALENDAR_BUTTON_WIDTH_INC CALENDAR_BUTTON_HEIGHT_INC; max: CALENDAR_BUTTON_WIDTH_INC CALENDAR_BUTTON_HEIGHT_INC; fixed: 1 1; image { normal: "00_picker_btn_normal.png"; border: 4 4 4 4; border_scale: 1; } fill.smooth : 0; } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_press.png"; } } part { name: "left_arrow"; mouse_events: 0; scale: 1; description { state: "default" 0.0; rel1 { to: "left_bt"; } rel2 { to: "left_bt"; } align: 0.5 0.5; min: CALENDAR_ARROW_WIDTH_INC CALENDAR_ARROW_HEIGHT_INC; max: CALENDAR_ARROW_WIDTH_INC CALENDAR_ARROW_HEIGHT_INC; fixed: 1 1; image { normal: "00_picker_arrow_left.png"; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_arrow_left_press.png"; } } part { name: "right_bt"; mouse_events: 1; scale: 1; description { state: "default" 0.0; rel1 { to: "spinner-base"; offset: 0 0; } rel2 { to: "spinner-base"; offset: 0 0; } align: 1.0 0.5; min: CALENDAR_BUTTON_WIDTH_INC CALENDAR_BUTTON_HEIGHT_INC; max: CALENDAR_BUTTON_WIDTH_INC CALENDAR_BUTTON_HEIGHT_INC; fixed: 1 1; image { normal: "00_picker_btn_normal.png"; border: 4 4 4 4; border_scale: 1; } fill.smooth : 0; } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_btn_press.png"; } } part { name: "right_arrow"; mouse_events: 0; scale: 1; description { state: "default" 0.0; rel1 { to: "right_bt"; } rel2 { to: "right_bt"; } align: 0.5 0.5; fixed: 1 1; min: CALENDAR_ARROW_WIDTH_INC CALENDAR_ARROW_HEIGHT_INC; max: CALENDAR_ARROW_WIDTH_INC CALENDAR_ARROW_HEIGHT_INC; image { normal: "00_picker_arrow_right.png"; } } description { state: "clicked" 0.0; inherit: "default" 0.0; image.normal: "00_picker_arrow_right_press.png"; } } part { name: "month_text"; type: TEXT; mouse_events: 0; scale: 1; description { state: "default" 0.0; align: 0 0.5; fixed: 1 1; rel1 { relative: 1.0 0.0; offset: 3 2; to: "left_bt"; to_y: "spinner-base"; } rel2 { relative: 0.0 1.0; offset: -3 -2; to_x: "right_bt"; to_y: "spinner-base"; } color: CALENDAR_MONTH_FONT_COLOR_INC; text { font: "SLP:style=Medium"; size: CALENDAR_MONTH_FONT_SIZE_INC; min: 1 1; align: 0.5 0.5; text_class: "slp_medium"; } } } CH(0) CH(1) CH(2) CH(3) CH(4) CH(5) CH(6) CIT(0) CIT(1) CIT(2) CIT(3) CIT(4) CIT(5) CIT(6) CIT(7) CIT(8) CIT(9) CIT(10) CIT(11) CIT(12) CIT(13) CIT(14) CIT(15) CIT(16) CIT(17) CIT(18) CIT(19) CIT(20) CIT(21) CIT(22) CIT(23) CIT(24) CIT(25) CIT(26) CIT(27) CIT(28) CIT(29) CIT(30) CIT(31) CIT(32) CIT(33) CIT(34) CIT(35) CIT(36) CIT(37) CIT(38) CIT(39) CIT(40) CIT(41) CSEPV(1) CSEPV(2) CSEPV(3) CSEPV(4) CSEPV(5) CSEPV(6) CSEPH(1) CSEPH(2) CSEPH(3) CSEPH(4) CSEPH(5) CSEPH(6) } programs { program { name: "dec_start"; signal: "mouse,down,1"; source: "left_bt"; action: SIGNAL_EMIT "elm,action,decrement,start" ""; } program { name: "dec_stop"; signal: "mouse,up,1"; source: "left_bt"; action: SIGNAL_EMIT "elm,action,stop" ""; } program { name: "inc_start"; signal: "mouse,down,1"; source: "right_bt"; action: SIGNAL_EMIT "elm,action,increment,start" ""; } program { name: "inc_stop"; signal: "mouse,up,1"; source: "right_bt"; action: SIGNAL_EMIT "elm,action,stop" ""; } program { name: "left_bt_click"; signal: "mouse,down,1"; source: "left_bt"; action: STATE_SET "clicked" 0.0; target: "left_bt"; target: "left_arrow"; } program { name: "left_bt_unclick"; signal: "mouse,up,1"; source: "left_bt"; action: STATE_SET "default" 0.0; target: "left_bt"; target: "left_arrow"; } program { name: "right_bt_click"; signal: "mouse,down,1"; source: "right_bt"; action: STATE_SET "clicked" 0.0; target: "right_bt"; target: "right_arrow"; } program { name: "right_bt_unclick"; signal: "mouse,up,1"; source: "right_bt"; action: STATE_SET "default" 0.0; target: "right_bt"; target: "right_arrow"; } } } #undef CIT #undef CH