/* * Copyright 2012 Samsung Electronics Co., Ltd * * Licensed under the Flora License, Version 1.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.tizenopensource.org/license * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "../include/edc_string.h" //indicator #define INDI_BATTERY_X 1044 #define INDICATOR_Y 12 #define INDICATOR_W 48 #define INDICATOR_H 48 //portrait #define INDI_PORTRAIT_BATTERY_X 660 #define INDICATOR_PORTRAIT_Y 172 // portrait & recording #define INDI_PORTRAIT_REC_Y 28 #define INDICATOR(part_name, x, y) \ part { \ name: part_name; \ type: SWALLOW; \ description { \ state: "default" 0.0; \ rel1 { relative: x/MAIN_W y/MAIN_H; } \ rel2 { relative: (x+INDICATOR_W)/MAIN_W (y+INDICATOR_H)/MAIN_H; } \ } \ } #define INDICATOR_INVERSE(part_name, x, y) \ part { \ name: part_name; \ type: SWALLOW; \ description { \ state: "default" 0.0; \ rel1 { relative: (1 - (x+INDICATOR_W)/MAIN_W) (1 - (y+INDICATOR_H)/MAIN_H); } \ rel2 { relative: (1 - x/MAIN_W) (1 - y/MAIN_H); } \ } \ } #define INDICATOR_PORTRAIT(part_name, x, y) \ part { \ name: part_name; \ type: SWALLOW; \ description { \ state: "default" 0.0; \ rel1 { relative: x/MAIN_H y/MAIN_W; } \ rel2 { relative: (x+INDICATOR_W)/MAIN_H (y+INDICATOR_H)/MAIN_W; } \ } \ } #define INDICATOR_PORTRAIT_INVERSE(part_name, x, y) \ part { \ name: part_name; \ type: SWALLOW; \ description { \ state: "default" 0.0; \ rel1 { relative: (1 - (x+INDICATOR_W)/MAIN_H) (1 - (y+INDICATOR_H)/MAIN_W); } \ rel2 { relative: (1 - x/MAIN_H) (1 - (y/MAIN_W)); } \ } \ } collections { group { name: "indicator_landscape"; min: MAIN_W MAIN_H; parts{ INDICATOR(INDICATOR_BATTERY, INDI_BATTERY_X, INDICATOR_Y) INDICATOR(INDI_REC_BATTERY, INDI_BATTERY_X, INDICATOR_Y) } } group { name: "indicator_landscape_inverse"; min: MAIN_W MAIN_H; parts{ INDICATOR(INDICATOR_BATTERY, INDI_BATTERY_X, INDICATOR_Y) INDICATOR(INDI_REC_BATTERY, INDI_BATTERY_X, INDICATOR_Y) } } group { name: "indicator_portrait"; min: MAIN_H MAIN_W; parts{ INDICATOR_PORTRAIT(INDICATOR_BATTERY, INDI_PORTRAIT_BATTERY_X, INDICATOR_PORTRAIT_Y) INDICATOR_PORTRAIT(INDI_REC_BATTERY, INDI_PORTRAIT_BATTERY_X, INDI_PORTRAIT_REC_Y) } } group { name: "indicator_portrait_inverse"; min: MAIN_H MAIN_W; parts{ INDICATOR_PORTRAIT(INDICATOR_BATTERY, INDI_PORTRAIT_BATTERY_X, INDICATOR_PORTRAIT_Y) INDICATOR_PORTRAIT(INDI_REC_BATTERY, INDI_PORTRAIT_BATTERY_X, INDI_PORTRAIT_REC_Y) } } }//end collections //end file