Updating INI configuration file to work with most cameras.
[profile/ivi/camera.git] / edc / cam_main_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 "cam_funcs.edc"
19 #include "../include/edc_image_name.h"
20
21 collections {
22         group {
23                 name: "main_layout";
24                 min: MAIN_W MAIN_H;
25                 parts {
26
27                         part { name: "main_bg";
28                                 type: RECT;
29                                 mouse_events: 1;
30                                 description {
31                                            state: "default" 0.0;
32                                            rel1 { relative: 0.0 0.0; offset: 0 0; }
33                                            rel2 { relative: 1.0 1.0; offset: -1 -1; }
34                                            color : 0 0 0 0;
35                                 }
36                         }
37                 }
38         }
39
40 #include "cam_guideline_edje.edc"
41
42         group {
43                 name: "progressbar";
44                 min: MAIN_W MAIN_H;
45
46                 parts {
47
48 #define PROGRESS_BAR_X 320
49 #define PROGRESS_BAR_Y 657
50 #define PROGRESS_BAR_W 639
51 #define PROGRESS_BAR_H 20
52
53                         part {
54                                 name: "progressbar";
55                                 type: SWALLOW;
56                                 description {
57                                         state: "default" 0.0;
58                                         fixed:1 1;
59                                         rel1 { relative: PROGRESS_BAR_X/MAIN_W PROGRESS_BAR_Y/MAIN_H; }
60                                         rel2 { relative: (PROGRESS_BAR_X+PROGRESS_BAR_W)/MAIN_W (PROGRESS_BAR_Y+PROGRESS_BAR_H)/MAIN_H; }
61                                 }
62                         }
63
64                         part {
65                                 name: "progressbar_text";
66                                 type: TEXT;
67                                 scale: 1;
68                                 description {
69                                         state: "default" 0.0;
70                                         rel1 { relative: 1.0 (-20)/PROGRESS_BAR_H; to: "progressbar"; }
71                                         rel2 { relative: (1.0+90/PROGRESS_BAR_W) (1.0+20/PROGRESS_BAR_H); to: "progressbar"; }
72                                         color: FONT_COLOR;
73                                         text {
74                                                 font : FONT_NAME;
75                                                 size : 28;
76                                                 align: 0.5 0.5;
77                                         }
78                                 }
79                         }
80                 }
81         }
82
83         group {
84                 name: "black_screen";
85                 min: MAIN_W MAIN_H;
86
87                 parts {
88                         part { name: "black_screen_bg";
89                                 type: RECT;
90                                 description {
91                                         state: "default" 0.0;
92                                         rel1 { relative: 0.0 0.0; offset: 0 0; }
93                                         rel2 { relative: 1.0 1.0; offset: -1 -1; }
94                                         color : 0 0 0 255;
95                                 }
96                         }
97                 }
98         }
99
100         group {
101                 name: "shutter_image";
102                 min: MAIN_W MAIN_H;
103
104                 parts {
105                         part {
106                                 name: "camera_image_bg";
107                                 type: RECT;
108                                 description {
109                                         state: "default" 0.0;
110                                         rel1 { relative: 0.0 0.0; offset: 0 0; }
111                                         rel2 { relative: 1.0 1.0; offset: -1 -1; }
112                                         color : 0 0 0 0;
113                                 }
114                                 description {
115                                         state: "gray" 0.0;
116                                         rel1 { relative: 0.0 0.0; offset: 0 0; }
117                                         rel2 { relative: 1.0 1.0; offset: -1 -1; }
118                                         color : 0 0 0 180;
119                                 }
120                         }
121                         part {
122                                 name: "up_part";
123                                 type: RECT;
124                                 description {
125                                         state: "default" 0.0;
126                                         rel1 { relative: 0.0 0.0; offset: 0 0; to : camera_image_bg; }
127                                         rel2 { relative: 1.0 0.0; offset: -1 0; to : camera_image_bg; }
128                                         color : 0 0 0 255;
129 //                                      visible: 1;
130                                 }
131                                 description {
132                                         state: "middle" 0.0;
133                                         rel1 { relative: 0.0 0.0; offset: 0 0; to : camera_image_bg; }
134                                         rel2 { relative: 1.0 0.5; offset: -1 -1; to : camera_image_bg; }
135                                         color : 0 0 0 255;
136 //                                      visible: 0;
137                                 }
138                         }
139
140                         part { name: "down_part";
141                                 type: RECT;
142                                 description {
143                                         state: "default" 0.0;
144                                         rel1 { relative: 0.0 1.0; offset: 0 -1; to : camera_image_bg; }
145                                         rel2 { relative: 1.0 1.0; offset: -1 -1; to : camera_image_bg; }
146                                         color : 0 0 0 255;
147 //                                      visible: 1;
148                                 }
149                                 description {
150                                         state: "middle" 0.0;
151                                         rel1 { relative: 0.0 0.5; offset: 0 -1; to : camera_image_bg; }
152                                         rel2 { relative: 1.0 1.0; offset: -1 -1; to : camera_image_bg; }
153                                         color : 0 0 0 255;
154 //                                      visible: 0;
155                                 }
156                         }
157                 }
158
159                 programs {
160                         program {
161                                 name: "close";
162                                 signal: "start_animation";
163                                 source: "*";
164                                 action: STATE_SET "middle" 0.0;
165                                 target: "up_part" ;
166                                 target: "down_part" ;
167                                 transition: ACCELERATE 0.25;
168                                 after: "open";
169                         }
170                         program {
171                                 name: "open";
172                                 signal: "open";
173                                 source: "*";
174                                 action: STATE_SET "default" 0.0;
175                                 target: "up_part" ;
176                                 target: "down_part" ;
177                                 transition: DECELERATE 0.25;
178                         }
179                         program {
180                                 name: "dim";
181                                 signal: "dim";
182                                 source: "*";
183                                 action: STATE_SET "gray" 0.0;
184                                 target: "camera_image_bg" ;
185                         }
186
187                         program {
188                                 name: "bright";
189                                 signal: "bright";
190                                 source: "*";
191                                 action: STATE_SET "default" 0.0;
192                                 target: "camera_image_bg" ;
193                                 transition: DECELERATE 0.2;
194                                 after: "animation_finish";
195                         }
196                         program {
197                                 name: "animation_finish";
198                                 signal: "animation_finish";
199                                 source: "*";
200                                 action: SIGNAL_EMIT "animation_finish" "*";
201                         }
202                 }
203         }
204
205         /*#include "cam_recording_edje.edc"*/
206 }
207
208