Making changes to make gstreamer calls work correctly on IVI
[profile/ivi/camera.git] / edc / cam_recording_edje_inverse.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
19 #include "cam_recording_edje_inverse_inc.edc"
20
21 collections {
22
23         group {
24                 name: "recording_layout";
25                 min: MAIN_W MAIN_H;
26
27                 parts {
28
29                         part {
30                                 name: RECORDING_IMAGE;
31                                 type: IMAGE;
32                                 description {
33                                         state: "default" 0.0;
34                                         rel1 { relative: RECORDING_IMAGE_X/MAIN_W RECORDING_IMAGE_Y/MAIN_H; }
35                                         rel2 { relative: (RECORDING_IMAGE_X+RECORDING_IMAGE_W)/MAIN_W (RECORDING_IMAGE_Y+RECORDING_IMAGE_H)/MAIN_H; }
36                                 }
37                                 description {
38                                         state: "rec" 0.0;
39                                         inherit: "default" 0.0;
40                                         image { normal: RECORDING_IMAGE_REC_IMAGE; }
41                                 }
42                                 description {
43                                         state: "rec1" 0.0;
44                                         inherit: "default" 0.0;
45                                         image { normal: RECORDING_IMAGE_REC_IMAGE; }
46                                 }
47                                 description {
48                                         state: "invisible" 0.0;
49                                         inherit: "default" 0.0;
50                                         visible: 0;
51                                 }
52                         }
53
54                         part {
55                                 name: RECORDING_TEXT;
56                                 type: TEXT;
57                                 scale: 1;
58                                 description {
59                                         state: "default" 0.0;
60                                         rel1 { relative: RECORDING_TEXT_X/MAIN_W RECORDING_TEXT_Y/MAIN_H; }
61                                         rel2 { relative: 1.0 1.0; offset: -1 -1; }
62                                         color: FONT_COLOR;
63                                         text {
64                                                 font : FONT_NAME;
65                                                 size : 35;
66                                                 align: 0.0 0.0;
67                                         }
68                                 }
69                                 description {
70                                         state: "invisible" 0.0;
71                                         inherit: "default" 0.0;
72                                         visible: 0;
73                                 }
74                         }
75
76
77                         part {
78                                 name: RECORDING_LEFT_TEXT;
79                                 type: TEXT;
80                                 scale: 1;
81                                 description {
82                                         state: "default" 0.0;
83                                         rel1 { relative: 0.0 0.0; }
84                                         rel2 { relative: (1.0 - RECORDING_LEFT_TEXT_X/MAIN_W) (1.0 - RECORDING_LEFT_TEXT_Y/MAIN_H); offset: -1 -1; }
85                                         color: FONT_COLOR;
86                                         text {
87                                                 font : FONT_NAME;
88                                                 size : 35;
89                                                 align: 1.0 1.0;
90                                         }
91                                 }
92                                 description {
93                                         state: "invisible" 0.0;
94                                         inherit:  "default" 0.0;
95                                         visible : 0;
96                                 }
97                         }
98
99                         part { name: RECORDING_STOP_BUTTON;
100                                 type: IMAGE;
101                                 mouse_events: 1;
102                                 description {
103                                         state: "default" 0.0;
104                                         rel1 { relative: (1 - (RECBTN_X+RECBTN_W)/(MAIN_W)) (1 - (RECBTN_Y+RECBTN_H)/(MAIN_H)); offset: 0 0; }
105                                         rel2 { relative: (1 - (RECBTN_X)/(MAIN_W)) (1 - (RECBTN_Y)/(MAIN_H)); offset: -1 -1; }
106                                         image { normal: SHUTTER_REC_NORMAL_IMAGE; }
107                                 }
108                                 description {
109                                         state: "rec" 0.0;
110                                         inherit:  "default" 0.0;
111                                         image { normal: SHUTTER_REC_NORMAL_IMAGE; }
112                                 }
113                                 description {
114                                         state: "rec1" 0.0;
115                                         inherit:  "default" 0.0;
116                                         image { normal: RECORDING_PRESS_IMAGE_ANI ; }
117                                 }
118                                         description {
119                                         state: "press" 0.0;
120                                         inherit:  "default" 0.0;
121                                         image { normal: SHUTTER_REC_PRESS_IMAGE ; }
122                                 }
123                         }
124
125                         part { name: "progressbar";
126                                 type: SWALLOW;
127                                 description {
128                                         state: "default" 0.0;
129                                         fixed:1 1;
130                                         rel1 { relative: PROGRESS_BAR_X/MAIN_W PROGRESS_BAR_Y/MAIN_H; }
131                                         rel2 { relative: (PROGRESS_BAR_X+PROGRESS_BAR_W)/MAIN_W (PROGRESS_BAR_Y+PROGRESS_BAR_H)/MAIN_H; }
132                                 }
133                         }
134
135                         part {
136                                 name: "progressbar_text";
137                                 type: TEXT;
138                                 scale: 1;
139                                 description {
140                                         state: "default" 0.0;
141                                         rel1 { relative: 1.0 (-20)/PROGRESS_BAR_H; to: "progressbar"; }
142                                         rel2 { relative: (1.0+90/PROGRESS_BAR_W) (1.0+20/PROGRESS_BAR_H); to: "progressbar"; }
143                                         color: FONT_COLOR;
144                                         text {
145                                                 font : FONT_NAME;
146                                                 size : 28;
147                                                 align: 0.5 0.5;
148                                         }
149                                 }
150                         }
151
152                         part{
153                                 name: "file_size_text";
154                                 type: TEXT;
155                                 scale: 1;
156                                 description{
157                                         state: "default" 0.0;
158                                         rel1 { relative: (0.0-100/PROGRESS_BAR_W) (-20)/PROGRESS_BAR_H; to: "progressbar"; }
159                                         rel2 { relative: (0.0-10/PROGRESS_BAR_W) (1.0+20/PROGRESS_BAR_H); to: "progressbar"; }
160                                         color: FONT_COLOR;
161                                         text {
162                                                 font : FONT_NAME;
163                                                 size : 28;
164                                                 align : 1.0 0.5;
165                                         }
166                                 }
167                         }
168                 }
169
170                 programs {
171
172                         program {
173                                 name: "recording_stop_button,clicked";
174                                 signal: "mouse,clicked,1";
175                                 source: "recording_stop_button";
176                                 script {
177                                         emit( REC_STOP_SIG, REC_SIG_SRC );
178                                 }
179                         }
180
181 #ifdef NEW_RECORDING_LAYOUT
182
183                         program { name: "set_rec_state";
184                                 source: "program";
185                                 signal: "state,rec";
186                                 script {
187                                         set_state(PART:RECORDING_IMAGE, "rec", 0.0);
188                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
189                                         //set_state(PART:REC_REC, "invisible", 0.0);
190                                         //set_state(PART:REC_STOP, "default", 0.0);
191                                         //set_state(PART:REC_PAUSE, "default", 0.0);
192                                 }
193                         }
194                         program { name: "set_rec_state1";
195                                 source: "program";
196                                 signal: "state,rec1";
197                                 script {
198                                         set_state(PART:RECORDING_IMAGE, "rec1", 0.0);
199                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
200                                         //set_state(PART:REC_REC, "invisible", 0.0);
201                                         //set_state(PART:REC_STOP, "default", 0.0);
202                                         //set_state(PART:REC_PAUSE, "default", 0.0);
203                                 }
204                         }
205                         program { name: "set_pause_state";
206                                 source: "program";
207                                 signal: "state,pause";
208                                 script {
209                                         set_state(PART:RECORDING_IMAGE, "pause", 0.0);
210                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
211                                         //set_state(PART:REC_REC, "default", 0.0);
212                                         //set_state(PART:REC_STOP, "invisible", 0.0);
213                                         //set_state(PART:REC_PAUSE, "dim", 0.0);
214                                 }
215                         }
216
217 #else
218
219                         program { name: "set_rec_state";
220                                 source: "program";
221                                 signal: "state,rec";
222                                 script {
223                                         set_state(PART:RECORDING_IMAGE, "rec", 0.0);
224                                         set_state(PART:RECORDING_STOP_BUTTON, "rec",0.0);
225                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
226                                         //set_state(PART:REC_PAUSE, "default", 0.0);
227                                         //set_state(PART:REC_REC, "invisible", 0.0);
228                                 }
229                         }
230                         program { name: "set_rec_state1";
231                                 source: "program";
232                                 signal: "state,rec1";
233                                 script {
234                                         set_state(PART:RECORDING_IMAGE, "rec1", 0.0);
235                                         set_state(PART:RECORDING_STOP_BUTTON, "rec1",0.0);
236                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
237                                         //set_state(PART:REC_PAUSE, "default", 0.0);
238                                         //set_state(PART:REC_REC, "invisible", 0.0);
239                                 }
240                         }
241                         program { name: "set_pause_state";
242                                 source: "program";
243                                 signal: "state,pause";
244                                 script {
245                                         set_state(PART:RECORDING_IMAGE, "pause", 0.0);
246                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
247                                         //set_state(PART:REC_PAUSE, "invisible", 0.0);
248                                         //set_state(PART:REC_REC, "default", 0.0);
249                                 }
250                         }
251                         program{ name : "set_press";
252                                 signal : "mouse,down,1";
253                                 source: RECORDING_STOP_BUTTON;
254                                 action: STATE_SET "press" 0.0;
255                                 target: RECORDING_STOP_BUTTON;
256                         }
257 #endif
258
259                         program { name: "hide_indicator";
260                                 source: "program";
261                                 signal: "indicator,hide";
262                                 script {
263                                         set_state(PART:RECORDING_IMAGE, "invisible", 0.0);
264                                         set_state(PART:RECORDING_TEXT, "invisible", 0.0);
265                                 }
266                         }
267                         program { name: "show_indicator";
268                                 source: "program";
269                                 signal: "indicator,show";
270                                 script {
271                                         set_state(PART:RECORDING_IMAGE, "pause", 0.0);
272                                         set_state(PART:RECORDING_TEXT, "default", 0.0);
273                                 }
274                         }
275                 }
276         }
277 }
278 //endfile