Making changes to make gstreamer calls work correctly on IVI
[profile/ivi/camera.git] / edc / cam_utils.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 #define CAM_FOCUS_IMG "CAMERA_FOCUS_IMG"
22
23 images {
24         image: FOCUS_GUIDE_NOTREADY_IMAGE COMP;
25         image: FOCUS_GUIDE_FOCUSED_IMAGE COMP;
26         image: FOCUS_GUIDE_FAILED_IMAGE COMP;
27         image: SHOTTING_MODE_POPUP_BG_IMAGE COMP;
28         image: TIMER_ICON_BG_IMAGE COMP;
29 }
30
31 styles {
32         style {
33                 name: "textblock_style";
34                 base: "font=system_content  font_size=34 align=center valign=top color=#ffffff  wrap=word";
35                 tag:  "br"        "  \n";
36         }
37 }
38
39 collections {
40         group { name: "focus_image";
41                 min: CAMERA_FOCUS_W CAMERA_FOCUS_H;
42                 max: CAMERA_FOCUS_W CAMERA_FOCUS_H;
43                 parts{
44                         part {
45                                 name: CAM_FOCUS_IMG;
46                                 type: IMAGE;
47                                 mouse_events: 0;
48                                 description {
49                                         state: "default" 0.0;
50                                         visible: 0;
51                                         rel1 { relative: 0.0 0.0; }
52                                         rel2 { relative: 1.0 1.0; }
53                                 }
54                                 description {
55                                         state: "notready" 0.0;
56                                         inherit: "default" 0.0;
57                                         visible: 1;
58                                         image{ normal: FOCUS_GUIDE_NOTREADY_IMAGE; }
59                                 }
60                                 description {
61                                         state: "focused" 0.0;
62                                         inherit: "default" 0.0;
63                                         visible: 1;
64                                         image{ normal: FOCUS_GUIDE_FOCUSED_IMAGE; }
65                                 }
66                                 description {
67                                         state: "failed" 0.0;
68                                         inherit: "default" 0.0;
69                                         visible: 1;
70                                         image{ normal: FOCUS_GUIDE_FAILED_IMAGE; }
71                                 }
72                         }
73                 }
74
75                 programs {
76                         program { name: "focus,hide";
77                                 source: "program";
78                                 signal: "focus,hide";
79                                 action: STATE_SET "default" 0.0;
80                                 target: CAM_FOCUS_IMG;
81                         }
82                         program { name: "focus,notready";
83                                 source: "program";
84                                 signal: "focus,notready";
85                                 action: STATE_SET "notready" 0.0;
86                                 target: CAM_FOCUS_IMG;
87                         }
88                         program { name: "focus,focused";
89                                 source: "program";
90                                 signal: "focus,focused";
91                                 action: STATE_SET "focused" 0.0;
92                                 target: CAM_FOCUS_IMG;
93                         }
94                         program { name: "focus,failed";
95                                 source: "program";
96                                 signal: "focus,failed";
97                                 action: STATE_SET "failed" 0.0;
98                                 target: CAM_FOCUS_IMG;
99                         }
100                 }
101         }
102
103 #define PX_POPUP_BOX_X 180
104 #define PX_POPUP_BOX_Y 84
105 #define PX_POPUP_BOX_W 440
106 #define PX_POPUP_BOX_H 242
107
108 #define PX_POPUP_TEXT_Y 40
109
110 #define PX_POPUP_BAR_X 40
111 #define PX_POPUP_BAR_Y 182
112 #define PX_POPUP_BAR_W 350
113 #define PX_POPUP_BAR_H 14
114
115         group { name: "progress_popup";
116                 parts {
117                         part {
118                                 name: "progress_popup_bg";
119                                 type: IMAGE;
120                                 mouse_events: 0;
121                                 description {
122                                         state: "default" 0.0;
123                                         rel1 { relative: PX_POPUP_BOX_X/MAIN_W_AUTO PX_POPUP_BOX_Y/MAIN_H_AUTO; }
124                                         rel2 { relative: (PX_POPUP_BOX_X+PX_POPUP_BOX_W)/MAIN_W_AUTO (PX_POPUP_BOX_Y+PX_POPUP_BOX_H)/MAIN_H_AUTO; }
125                                         image{ normal: SHOTTING_MODE_POPUP_BG_IMAGE; }
126                                 }
127                         }
128                         part {
129                                 name: "progress_popup_text";
130                                 type: TEXTBLOCK;
131                                 description {
132                                                 state: "default" 0.0;
133                                                 fixed: 1 1;
134                                                 rel1 { relative: 0.0 PX_POPUP_TEXT_Y/PX_POPUP_BOX_H; to:  progress_popup_bg; }
135                                                 rel2 { relative: 1.0 1.0;  to:  progress_popup_bg; }
136                                                 color: FONT_COLOR;
137                                                 text {
138                                                         style: "textblock_style";
139                                                         min: 0 1;
140                                                 }
141                                 }
142                         }
143                         //to swallow progressbar
144                         part {
145                                 name: "progress_popup_bar";
146                                 type: SWALLOW;
147                                 description {
148                                                 state: "default" 0.0;
149                                                 fixed: 1 1;
150                                                 rel1 { relative: PX_POPUP_BAR_X/PX_POPUP_BOX_W  PX_POPUP_BAR_Y/PX_POPUP_BOX_H;
151                                                                         to:  progress_popup_bg; }
152                                                 rel2 { relative: (PX_POPUP_BAR_X+PX_POPUP_BAR_W)/PX_POPUP_BOX_W         (PX_POPUP_BAR_Y+PX_POPUP_BAR_H)/PX_POPUP_BOX_H;
153                                                                         to:  progress_popup_bg; }
154                                 }
155                         }
156                 }
157         }
158
159 #define TIMER_ICON_W 188
160 #define TIMER_ICON_H 158
161         group{ name: "timer_icon_landscape";
162
163                 parts{
164                         part {
165                                 name: "icon";
166                                 type: IMAGE;
167                                 description {
168                                         state: "default" 0.0;
169                                         rel1 { relative: (1 - TIMER_ICON_W/MAIN_W)/2 (1 - TIMER_ICON_H/MAIN_H)/2; offset: 0 0; }
170                                         rel2 { relative: (1 + TIMER_ICON_W/MAIN_W)/2 (1 + TIMER_ICON_H/MAIN_H)/2; offset: -1 -1; }
171                                         image { normal: TIMER_ICON_BG_IMAGE; }
172                                 }
173                         }
174                         part {
175                                 name: "text";
176                                 type: TEXT;
177                                 scale: 1;
178                                 description {
179                                         state: "default" 0.0;
180                                         rel1 { relative: 0.0 0.0; offset: 0 0; to:  "icon"; }
181                                         rel2 { relative: 1.0 1.0; offset: -1 -1;  to:  "icon"; }
182                                         color: COLOR_1;
183                                         text {
184                                                 font: FONT_NAME;
185                                                 size: 60;
186                                                 min: 1 1;
187                                                 align: 0.8 0.8;
188                                         }
189                                 }
190                         }
191                 }
192         }
193
194         group{ name: "timer_icon_portrait";
195
196                 parts{
197                         part {
198                                 name: "icon";
199                                 type: IMAGE;
200                                 description {
201                                         state: "default" 0.0;
202                                         rel1 { relative: (1 - TIMER_ICON_W/MAIN_H)/2 (1 - TIMER_ICON_H/MAIN_W)/2; offset: 0 0; }
203                                         rel2 { relative: (1 + TIMER_ICON_W/MAIN_H)/2 (1 + TIMER_ICON_H/MAIN_W)/2; offset: -1 -1; }
204                                         image { normal: TIMER_ICON_BG_IMAGE; }
205                                 }
206                         }
207                         part {
208                                 name: "text";
209                                 type: TEXT;
210                                 scale: 1;
211                                 description {
212                                         state: "default" 0.0;
213                                         rel1 { relative: 0.0 0.0; offset: 0 0; to:      "icon"; }
214                                         rel2 { relative: 1.0 1.0; offset: -1 -1;  to:  "icon"; }
215                                         color: COLOR_1;
216                                         text {
217                                                 font: FONT_NAME;
218                                                 size: 60;
219                                                 min: 1 1;
220                                                 align: 0.8 0.8;
221                                         }
222                                 }
223                         }
224                 }
225         }
226 }
227