Updating INI configuration file to work with most cameras.
[profile/ivi/camera.git] / edc / cam_indicator_layout.edc
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.0 (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://www.tizenopensource.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
18 #include "../include/edc_string.h"
19
20 //indicator
21 #define INDI_BATTERY_X  1044
22 #define INDICATOR_Y     12
23 #define INDICATOR_W     48
24 #define INDICATOR_H     48
25
26 //portrait
27 #define INDI_PORTRAIT_BATTERY_X 660
28 #define INDICATOR_PORTRAIT_Y 172
29
30 // portrait & recording
31 #define INDI_PORTRAIT_REC_Y 28
32
33
34 #define INDICATOR(part_name, x, y) \
35                 part { \
36                         name: part_name; \
37                         type: SWALLOW; \
38                         description { \
39                                 state: "default" 0.0; \
40                                 rel1 { relative: x/MAIN_W y/MAIN_H; }                \
41                                 rel2 { relative: (x+INDICATOR_W)/MAIN_W (y+INDICATOR_H)/MAIN_H; }             \
42                         } \
43                 }
44
45 #define INDICATOR_INVERSE(part_name, x, y) \
46                 part { \
47                         name: part_name; \
48                         type: SWALLOW; \
49                         description { \
50                                 state: "default" 0.0; \
51                                 rel1 { relative: (1 - (x+INDICATOR_W)/MAIN_W) (1 - (y+INDICATOR_H)/MAIN_H); }                \
52                                 rel2 { relative: (1 - x/MAIN_W) (1 - y/MAIN_H); }             \
53                         } \
54                 }
55
56
57 #define INDICATOR_PORTRAIT(part_name, x, y) \
58                 part { \
59                         name: part_name; \
60                         type: SWALLOW; \
61                         description { \
62                                 state: "default" 0.0; \
63                                 rel1 { relative: x/MAIN_H y/MAIN_W; }                \
64                                 rel2 { relative: (x+INDICATOR_W)/MAIN_H (y+INDICATOR_H)/MAIN_W; }             \
65                         } \
66                 }
67
68 #define INDICATOR_PORTRAIT_INVERSE(part_name, x, y) \
69                 part { \
70                         name: part_name; \
71                         type: SWALLOW; \
72                         description { \
73                                 state: "default" 0.0; \
74                                 rel1 { relative: (1 - (x+INDICATOR_W)/MAIN_H) (1 - (y+INDICATOR_H)/MAIN_W); } \
75                                 rel2 { relative: (1 - x/MAIN_H) (1 - (y/MAIN_W)); }             \
76                         } \
77                 }
78
79
80 collections {
81         group { name: "indicator_landscape";
82         min: MAIN_W MAIN_H;
83
84                 parts{
85                         INDICATOR(INDICATOR_BATTERY, INDI_BATTERY_X, INDICATOR_Y)
86                         INDICATOR(INDI_REC_BATTERY, INDI_BATTERY_X, INDICATOR_Y)
87                 }
88         }
89
90         group { name: "indicator_landscape_inverse";
91                 min: MAIN_W MAIN_H;
92                 parts{
93                         INDICATOR(INDICATOR_BATTERY, INDI_BATTERY_X, INDICATOR_Y)
94                         INDICATOR(INDI_REC_BATTERY, INDI_BATTERY_X, INDICATOR_Y)
95                 }
96         }
97
98         group { name: "indicator_portrait";
99                 min: MAIN_H MAIN_W;
100                 parts{
101                         INDICATOR_PORTRAIT(INDICATOR_BATTERY, INDI_PORTRAIT_BATTERY_X, INDICATOR_PORTRAIT_Y)
102                         INDICATOR_PORTRAIT(INDI_REC_BATTERY, INDI_PORTRAIT_BATTERY_X, INDI_PORTRAIT_REC_Y)
103                 }
104         }
105
106         group { name: "indicator_portrait_inverse";
107                 min: MAIN_H MAIN_W;
108                 parts{
109                         INDICATOR_PORTRAIT(INDICATOR_BATTERY, INDI_PORTRAIT_BATTERY_X, INDICATOR_PORTRAIT_Y)
110                         INDICATOR_PORTRAIT(INDI_REC_BATTERY, INDI_PORTRAIT_BATTERY_X, INDI_PORTRAIT_REC_Y)
111                 }
112         }
113
114 }//end collections
115 //end file