2 * Copyright 2012 Samsung Electronics Co., Ltd
\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
8 * http://www.tizenopensource.org/license
\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
18 #ifndef __H_EDC_CAM_TOOLBAR_LAYOUT_INC_EDC_H__
\r
19 #define __H_EDC_CAM_TOOLBAR_LAYOUT_INC_EDC_H__
\r
21 #define SETTING_TOOLBAR_W 1156
\r
22 #define SETTING_TOOLBAR_H 116
\r
24 #define TOOLBAR_ITEM_W 86
\r
25 #define TOOLBAR_ITEM_H 86
\r
27 #define TOOLBAR_0_X 38
\r
28 #define TOOLBAR_0_Y 593
\r
30 #define TOOLBAR_1_X 38
\r
31 #define TOOLBAR_1_Y 455
\r
33 #define TOOLBAR_2_X 38
\r
34 #define TOOLBAR_2_Y 317
\r
36 #define TOOLBAR_3_X 38
\r
37 #define TOOLBAR_3_Y 179
\r
39 #define TOOLBAR_4_X 38
\r
40 #define TOOLBAR_4_Y 41
\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
48 #define QUICKVIEW_X 1162
\r
49 #define QUICKVIEW_Y 604
\r
50 #define QUICKVIEW_W 108
\r
51 #define QUICKVIEW_H 108
\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
58 #define CAPTUREBTN_X 1162
\r
59 #define CAPTUREBTN_Y 68
\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
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
84 #define TOOLBAR_MODE_ITEM_W TOOLBAR_W
\r
85 #define TOOLBAR_MODE_ITEM_H TOOLBAR_RIGHT_ITEM_H
\r
89 image: BUTTON_BG_NORMAL_IMAGE COMP;
\r
90 image: BUTTON_BG_PRESS_IMAGE COMP;
\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
98 #define TOOLBAR_BACKGROUND_IMAGE(part_name, x, y, w, h, img) \
\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
109 state: "hide" 0.0; \
\r
110 inherit:"default" 0.0; \
\r
116 #define TOOLBAR_ITEM_BUTTON_WITH_BG(button_name, x, y, bg_w, bg_h) \
\r
117 part { name: button_name; \
\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
127 state: "normal" 0.0; \
\r
128 inherit: "default" 0.0; \
\r
130 image { normal: BUTTON_BG_NORMAL_IMAGE; } \
\r
133 state: "press" 0.0; \
\r
134 inherit: "default" 0.0; \
\r
136 image { normal: BUTTON_BG_PRESS_IMAGE; } \
\r
139 state: "dim" 0.0; \
\r
140 inherit: "default" 0.0; \
\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
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
156 state: "normal" 0.0; \
\r
157 inherit: "default" 0.0; \
\r
159 image { normal: img_normal; } \
\r
162 state: "press" 0.0; \
\r
163 inherit: "default" 0.0; \
\r
165 image { normal: img_press; } \
\r
168 state: "dim" 0.0; \
\r
169 inherit: "default" 0.0; \
\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
179 state: "default" 0.0; \
\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
187 state: "normal" 0.0; \
\r
188 inherit: "default" 0.0; \
\r
192 state: "dim" 0.0; \
\r
193 inherit: "default" 0.0; \
\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
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
209 state: "normal" 0.0; \
\r
210 inherit: "default" 0.0; \
\r
212 image { normal: img_normal; } \
\r
215 state: "press" 0.0; \
\r
216 inherit: "default" 0.0; \
\r
218 image { normal: img_press; } \
\r
221 state: "dim" 0.0; \
\r
222 inherit: "default" 0.0; \
\r
224 image { normal: img_dim; } \
\r
228 #define TOOLBAR_LEFT_ITEM_PROGRAM(button_name, icon_name, press_signal, release_signal, click_signal) \
\r
230 name: "mouse_down_"icon_name; \
\r
231 signal: "mouse,down,1"; \
\r
232 source: icon_name; \
\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
243 name: "mouse_up_"icon_name; \
\r
244 signal: "mouse,up,1"; \
\r
245 source: icon_name; \
\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
256 name: "mouse_clicked_"icon_name; \
\r
257 signal: "mouse,clicked,1"; \
\r
258 source: icon_name; \
\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
268 name: icon_name",invisible"; \
\r
270 signal: icon_name",invisible"; \
\r
272 set_state(PART:button_name, "default", 0.0); \
\r
273 set_state(PART:icon_name, "default", 0.0); \
\r
277 name: icon_name",normal"; \
\r
279 signal: icon_name",normal"; \
\r
281 set_state(PART:button_name, "default", 0.0); \
\r
282 set_state(PART:icon_name, "normal", 0.0); \
\r
286 name: icon_name",edit"; \
\r
288 signal: icon_name",edit"; \
\r
290 set_state(PART:button_name, "normal", 0.0); \
\r
291 set_state(PART:icon_name, "normal", 0.0); \
\r
295 name: icon_name",dim"; \
\r
297 signal: icon_name",dim"; \
\r
299 set_state(PART:button_name, "default", 0.0); \
\r
300 set_state(PART:icon_name, "dim", 0.0); \
\r
305 #define TOOLBAR_RIGHT_ITEM_PROGRAM(icon_name, press_signal_name, release_signal_name, move_signal_name) \
\r
307 name: "mouse_down_"icon_name; \
\r
308 signal: "mouse,down,1"; \
\r
309 source: icon_name; \
\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
321 name: "mouse_up_"icon_name; \
\r
322 signal: "mouse,up,1"; \
\r
323 source: icon_name; \
\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
334 name: "mouse_move_"icon_name; \
\r
335 signal: "mouse,move"; \
\r
336 source: icon_name; \
\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
346 name: "mouse_clicked_"icon_name; \
\r
347 signal: "mouse,clicked,1"; \
\r
348 source: icon_name; \
\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
358 name: icon_name",invisible"; \
\r
360 signal: icon_name",invisible"; \
\r
362 set_state(PART:icon_name, "default", 0.0); \
\r
366 name: icon_name",normal"; \
\r
368 signal: icon_name",normal"; \
\r
370 set_state(PART:icon_name, "normal", 0.0); \
\r
374 name: icon_name",dim"; \
\r
376 signal: icon_name",dim"; \
\r
378 set_state(PART:icon_name, "dim", 0.0); \
\r
382 #define TOOLBAR_ITEM_BUTTON(name, x, y) \
\r
383 TOOLBAR_ITEM_BUTTON_WITH_BG(name, x, y, MAIN_W, MAIN_H)
\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
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
391 #endif /*__H_EDC_CAM_TOOLBAR_LAYOUT_INC_EDC_H__*/
\r