Updating INI configuration file to work with most cameras.
[profile/ivi/camera.git] / edc / cam_toolbar_layout_inverse_inc.edc
1 /*\r
2  * Copyright 2012  Samsung Electronics Co., Ltd\r
3  *\r
4  * Licensed under the Flora License, Version 1.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *        http://www.tizenopensource.org/license\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 \r
18 #ifndef __H_EDC_CAM_TOOLBAR_LAYOUT_INC_EDC_H__\r
19 #define __H_EDC_CAM_TOOLBAR_LAYOUT_INC_EDC_H__\r
20 \r
21 #define SETTING_TOOLBAR_W 1156\r
22 #define SETTING_TOOLBAR_H 116\r
23 \r
24 #define TOOLBAR_ITEM_W    86\r
25 #define TOOLBAR_ITEM_H    86\r
26 \r
27 #define TOOLBAR_0_X             38\r
28 #define TOOLBAR_0_Y             593\r
29 \r
30 #define TOOLBAR_1_X             38\r
31 #define TOOLBAR_1_Y             455\r
32 \r
33 #define TOOLBAR_2_X             38\r
34 #define TOOLBAR_2_Y             317\r
35 \r
36 #define TOOLBAR_3_X             38\r
37 #define TOOLBAR_3_Y             179\r
38 \r
39 #define TOOLBAR_4_X             38\r
40 #define TOOLBAR_4_Y             41\r
41 \r
42 \r
43 #define SHUTTER_X               1160\r
44 #define SHUTTER_Y               254\r
45 #define SHUTTER_W               108\r
46 #define SHUTTER_H               214\r
47 \r
48 #define QUICKVIEW_X             1162\r
49 #define QUICKVIEW_Y             604\r
50 #define QUICKVIEW_W     108\r
51 #define QUICKVIEW_H     108\r
52 \r
53 #define BACKBTN_X               1173\r
54 #define BACKBTN_Y               615\r
55 #define BACKBTN_W               86\r
56 #define BACKBTN_H               86\r
57 \r
58 #define CAPTUREBTN_X    1162\r
59 #define CAPTUREBTN_Y    68\r
60 \r
61 /*NOTE:below is for toolbar mode item*/\r
62 #define TOOLBAR_MODE_ITEM_BG_X  33\r
63 #define TOOLBAR_MODE_ITEM_BG_Y  58\r
64 #define TOOLBAR_MODE_ITEM_BG_W  71\r
65 #define TOOLBAR_MODE_ITEM_BG_H  119\r
66 \r
67 #define CAMERA_BUTTON_X         38\r
68 #define CAMERA_BUTTON_Y         65\r
69 #define CAMERA_BUTTON_W         61\r
70 #define CAMERA_BUTTON_H         61\r
71 #define CAMCORDER_BUTTON_X      38\r
72 #define CAMCORDER_BUTTON_Y      109\r
73 #define CAMCORDER_BUTTON_W      61\r
74 #define CAMCORDER_BUTTON_H      61\r
75 #define CAMERA_ICON_X 38\r
76 #define CAMERA_ICON_Y 10\r
77 #define CAMERA_ICON_W 56\r
78 #define CAMERA_ICON_H 48\r
79 #define CAMCORDER_ICON_X 38\r
80 #define CAMCORDER_ICON_Y 170\r
81 #define CAMCORDER_ICON_W 56\r
82 #define CAMCORDER_ICON_H 48\r
83 \r
84 #define TOOLBAR_MODE_ITEM_W TOOLBAR_W\r
85 #define TOOLBAR_MODE_ITEM_H TOOLBAR_RIGHT_ITEM_H\r
86 \r
87 images {\r
88         /*item_button*/\r
89         image: BUTTON_BG_NORMAL_IMAGE COMP;\r
90         image: BUTTON_BG_PRESS_IMAGE COMP;\r
91 \r
92         image: SNAPSHOT_PRESS_IMAGE COMP;\r
93         image: SNAPSHOT_NORMAL_IMAGE COMP;\r
94         image: LEFT_TOOLBAR_BG_IMAGE COMP;\r
95         image: RIGHT_TOOLBAR_BG_IMAGE COMP;\r
96 }\r
97 \r
98 #define TOOLBAR_BACKGROUND_IMAGE(part_name, x, y, w, h, img) \\r
99                         part {                          \\r
100                                 name: part_name;        \\r
101                                 type: IMAGE;    \\r
102                                 description {   \\r
103                                         state: "default" 0.0;\\r
104                                        rel1 { relative: (1 - (x+w)/MAIN_W) (1 - (y+h)/MAIN_H); }                \\r
105                                        rel2 { relative: (1 - (x)/MAIN_W) (1 - (y)/MAIN_H); }             \\r
106                                         image { normal: img; }  \\r
107                                 }     \\r
108                                 description{ \\r
109                                         state: "hide" 0.0; \\r
110                                         inherit:"default" 0.0; \\r
111                                         visible: 0; \\r
112                                 } \\r
113                         }\r
114 \r
115 \r
116 #define TOOLBAR_ITEM_BUTTON_WITH_BG(button_name, x, y, bg_w, bg_h) \\r
117         part { name: button_name; \\r
118                 type: IMAGE; \\r
119                 mouse_events: 1; \\r
120                 description { \\r
121                         state: "default" 0.0; \\r
122                         rel1 { relative: (1 - (x+TOOLBAR_ITEM_W)/(bg_w)) (1 - (y+TOOLBAR_ITEM_H)/(bg_h));} \\r
123                         rel2 { relative: (1 - (x)/(bg_w))   (1 - (y)/(bg_h));} \\r
124                         visible: 0; \\r
125                 } \\r
126                 description { \\r
127                         state: "normal" 0.0; \\r
128                         inherit: "default" 0.0; \\r
129                         visible: 1; \\r
130                         image { normal: BUTTON_BG_NORMAL_IMAGE; } \\r
131                 } \\r
132                 description { \\r
133                         state: "press" 0.0; \\r
134                         inherit: "default" 0.0; \\r
135                         visible: 1; \\r
136                         image { normal: BUTTON_BG_PRESS_IMAGE; } \\r
137                 } \\r
138                 description { \\r
139                         state: "dim" 0.0; \\r
140                         inherit: "default" 0.0; \\r
141                         visible: 0; \\r
142                 } \\r
143         }\r
144 \r
145 #define TOOLBAR_ITEM_ICON_WITH_BG(icon_name, x, y, w, h, bg_w, bg_h, img_normal, img_press) \\r
146         part { name: icon_name; \\r
147                 type: IMAGE; \\r
148                 mouse_events: 1; \\r
149                 description { \\r
150                         state: "default" 0.0; \\r
151                         rel1 { relative: (1 - (x)/(bg_w)) (1 - (y+h)/(bg_h));} \\r
152                         rel2 { relative: (1 - (x+w)/(bg_w)) (1 - (y)/(bg_h));} \\r
153                         visible: 0; \\r
154                 } \\r
155                 description { \\r
156                         state: "normal" 0.0; \\r
157                         inherit: "default" 0.0; \\r
158                         visible: 1; \\r
159                         image { normal: img_normal; } \\r
160                 } \\r
161                 description { \\r
162                         state: "press" 0.0; \\r
163                         inherit: "default" 0.0; \\r
164                         visible: 1; \\r
165                         image { normal: img_press; } \\r
166                 } \\r
167                 description { \\r
168                         state: "dim" 0.0; \\r
169                         inherit: "default" 0.0; \\r
170                         visible: 0; \\r
171                 } \\r
172         }\r
173 \r
174 #define TOOLBAR_ITEM_SWALLOW_ICON_WITH_BG(icon_name, x, y, w, h, bg_w, bg_h) \\r
175         part { name: icon_name; \\r
176                 type: SWALLOW; \\r
177                 mouse_events: 1; \\r
178                 description { \\r
179                         state: "default" 0.0; \\r
180                         aspect: 1.0 1.0; \\r
181                         align: 0.5 0.5; \\r
182                         rel1 { relative: (1 - (x+w)/(bg_w)) (1 - (y+h)/(bg_h)); } \\r
183                         rel2 { relative: (1 - (x)/(bg_w))  (1 - (y)/(bg_h)); } \\r
184                         visible: 0; \\r
185                 } \\r
186                 description { \\r
187                         state: "normal" 0.0; \\r
188                         inherit: "default" 0.0; \\r
189                         visible: 1; \\r
190                 } \\r
191                 description { \\r
192                         state: "dim" 0.0; \\r
193                         inherit: "default" 0.0; \\r
194                         visible: 1; \\r
195                 } \\r
196         }\r
197 \r
198 #define TOOLBAR_ITEM_ICON_WITH_DIM(icon_name, x, y, w, h, bg_w, bg_h, img_normal, img_press, img_dim) \\r
199         part { name: icon_name; \\r
200                 type: IMAGE; \\r
201                 mouse_events: 1; \\r
202                 description { \\r
203                         state: "default" 0.0; \\r
204                         rel1 { relative: (1 - (x+w)/(bg_w))  (1 - (y+h)/(bg_h));} \\r
205                         rel2 { relative: (1 - (x)/(bg_w)) (1 - (y)/(bg_h));} \\r
206                         visible: 0; \\r
207                 } \\r
208                 description { \\r
209                         state: "normal" 0.0; \\r
210                         inherit: "default" 0.0; \\r
211                         visible: 1; \\r
212                         image { normal: img_normal; } \\r
213                 } \\r
214                 description { \\r
215                         state: "press" 0.0; \\r
216                         inherit: "default" 0.0; \\r
217                         visible: 1; \\r
218                         image { normal: img_press; } \\r
219                 } \\r
220                 description { \\r
221                         state: "dim" 0.0; \\r
222                         inherit: "default" 0.0; \\r
223                         visible: 1; \\r
224                         image { normal: img_dim; } \\r
225                 } \\r
226         }\r
227 \r
228 #define TOOLBAR_LEFT_ITEM_PROGRAM(button_name, icon_name, press_signal, release_signal, click_signal) \\r
229         program {       \\r
230                 name: "mouse_down_"icon_name; \\r
231                 signal: "mouse,down,1"; \\r
232                 source: icon_name; \\r
233                 script {\\r
234                         new st[31];\\r
235                         new Float:vl;\\r
236                         get_state(PART:icon_name, st, 30, vl);\\r
237                         if (strcmp(st, "dim") != 0) { \\r
238                                 emit( press_signal, "toolbar_signal" );\\r
239                         } \\r
240                 }\\r
241         } \\r
242         program { \\r
243                 name: "mouse_up_"icon_name; \\r
244                 signal: "mouse,up,1"; \\r
245                 source: icon_name; \\r
246                 script {\\r
247                         new st[31];\\r
248                         new Float:vl;\\r
249                         get_state(PART:icon_name, st, 30, vl);\\r
250                         if (strcmp(st, "dim") != 0) { \\r
251                                 emit( release_signal, "toolbar_signal" );\\r
252                         } \\r
253                 }\\r
254         }\\r
255         program { \\r
256                 name: "mouse_clicked_"icon_name;  \\r
257                 signal: "mouse,clicked,1"; \\r
258                 source: icon_name; \\r
259                 script {\\r
260                         new st[31];\\r
261                         new Float:vl;\\r
262                         get_state(PART:icon_name, st, 30, vl);\\r
263                         if (strcmp(st, "dim") != 0) \\r
264                                 emit( click_signal, "toolbar_signal" );\\r
265                 }\\r
266         }\\r
267         program { \\r
268                 name: icon_name",invisible"; \\r
269                 source: "prog"; \\r
270                 signal: icon_name",invisible"; \\r
271                 script: { \\r
272                         set_state(PART:button_name, "default", 0.0); \\r
273                         set_state(PART:icon_name, "default", 0.0); \\r
274                 } \\r
275         } \\r
276         program { \\r
277                 name: icon_name",normal"; \\r
278                 source: "prog"; \\r
279                 signal: icon_name",normal"; \\r
280                 script: { \\r
281                         set_state(PART:button_name, "default", 0.0); \\r
282                         set_state(PART:icon_name, "normal", 0.0); \\r
283                 } \\r
284         } \\r
285         program { \\r
286                 name: icon_name",edit"; \\r
287                 source: "prog"; \\r
288                 signal: icon_name",edit"; \\r
289                 script: { \\r
290                         set_state(PART:button_name, "normal", 0.0); \\r
291                         set_state(PART:icon_name, "normal", 0.0); \\r
292                 } \\r
293         } \\r
294         program { \\r
295                 name: icon_name",dim"; \\r
296                 source: "prog"; \\r
297                 signal: icon_name",dim"; \\r
298                 script: { \\r
299                         set_state(PART:button_name, "default", 0.0); \\r
300                         set_state(PART:icon_name, "dim", 0.0); \\r
301                 } \\r
302         }\r
303 \r
304 \r
305 #define TOOLBAR_RIGHT_ITEM_PROGRAM(icon_name, press_signal_name, release_signal_name, move_signal_name) \\r
306         program {       \\r
307                 name: "mouse_down_"icon_name; \\r
308                 signal: "mouse,down,1"; \\r
309                 source: icon_name; \\r
310                 script {\\r
311                         new st[31];\\r
312                         new Float:vl;\\r
313                         get_state(PART:icon_name, st, 30, vl);\\r
314                         if (strcmp(st, "dim") != 0) { \\r
315                                 set_state(PART:icon_name, "press", 0.0);\\r
316                                 emit( press_signal_name, "toolbar_signal" );\\r
317                         } \\r
318                 }\\r
319         } \\r
320         program { \\r
321                 name: "mouse_up_"icon_name; \\r
322                 signal: "mouse,up,1"; \\r
323                 source: icon_name; \\r
324                 script {\\r
325                         new st[31];\\r
326                         new Float:vl;\\r
327                         get_state(PART:icon_name, st, 30, vl);\\r
328                         if (strcmp(st, "dim") != 0) { \\r
329                                 set_state(PART:icon_name, "normal", 0.0);\\r
330                         } \\r
331                 }\\r
332         }\\r
333         program { \\r
334                 name: "mouse_move_"icon_name;  \\r
335                 signal: "mouse,move"; \\r
336                 source: icon_name; \\r
337                 script {\\r
338                         new st[31];\\r
339                         new Float:vl;\\r
340                         get_state(PART:icon_name, st, 30, vl);\\r
341                         if (strcmp(st, "dim") != 0) \\r
342                                 emit( move_signal_name, "toolbar_signal" );\\r
343                 }\\r
344         }\\r
345         program { \\r
346                 name: "mouse_clicked_"icon_name;  \\r
347                 signal: "mouse,clicked,1"; \\r
348                 source: icon_name; \\r
349                 script {\\r
350                         new st[31];\\r
351                         new Float:vl;\\r
352                         get_state(PART:icon_name, st, 30, vl);\\r
353                         if (strcmp(st, "dim") != 0) \\r
354                                 emit( release_signal_name, "toolbar_signal" );\\r
355                 }\\r
356         }\\r
357         program { \\r
358             name: icon_name",invisible"; \\r
359             source: "prog"; \\r
360             signal: icon_name",invisible"; \\r
361                 script: { \\r
362                         set_state(PART:icon_name, "default", 0.0); \\r
363                 } \\r
364         } \\r
365         program { \\r
366             name: icon_name",normal"; \\r
367             source: "prog"; \\r
368             signal: icon_name",normal"; \\r
369                 script: { \\r
370                         set_state(PART:icon_name, "normal", 0.0); \\r
371                 } \\r
372         } \\r
373         program { \\r
374             name: icon_name",dim"; \\r
375             source: "prog"; \\r
376             signal: icon_name",dim"; \\r
377                 script: { \\r
378                         set_state(PART:icon_name, "dim", 0.0); \\r
379                 } \\r
380         }\r
381 \r
382 #define TOOLBAR_ITEM_BUTTON(name, x, y) \\r
383         TOOLBAR_ITEM_BUTTON_WITH_BG(name, x, y, MAIN_W, MAIN_H)\r
384 \r
385 #define TOOLBAR_ITEM_ICON(name, x, y, w, h, img_normal, img_press) \\r
386         TOOLBAR_ITEM_ICON_WITH_BG(name, x, y, w, h, MAIN_W, MAIN_H, img_normal, img_press)\r
387 \r
388 #define TOOLBAR_ITEM_SWALLOW_ICON(name, x, y, w, h) \\r
389         TOOLBAR_ITEM_SWALLOW_ICON_WITH_BG(name, x, y, w, h, MAIN_W, MAIN_H)\r
390 \r
391 #endif /*__H_EDC_CAM_TOOLBAR_LAYOUT_INC_EDC_H__*/\r
392 //end files\r