summaryrefslogtreecommitdiff
path: root/edc/cam_toolbar_layout_inc.edc
blob: ae6e1c82b1414aadef131829568250e94d34d87a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
/*
 * Copyright 2012  Samsung Electronics Co., Ltd
 *
 * Licensed under the Flora License, Version 1.1 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *	  http://floralicense.org/license/
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


#ifndef __H_EDC_CAM_TOOLBAR_LAYOUT_INC_EDC_H__
#define __H_EDC_CAM_TOOLBAR_LAYOUT_INC_EDC_H__

#define SETTING_TOOLBAR_W 1156
#define SETTING_TOOLBAR_H 116

#define TOOLBAR_ITEM_W    86
#define TOOLBAR_ITEM_H    86

#define TOOLBAR_0_X		38
#define TOOLBAR_0_Y		594

#define TOOLBAR_1_X		38
#define TOOLBAR_1_Y		454

#define TOOLBAR_2_X		38
#define TOOLBAR_2_Y		317

#define TOOLBAR_3_X		38
#define TOOLBAR_3_Y		180

#define TOOLBAR_4_X		38
#define TOOLBAR_4_Y		40

#define SHUTTER_X		1146
#define SHUTTER_Y		194
#define SHUTTER_W		108
#define SHUTTER_H		214

#define BACKBTN_X	1146
#define BACKBTN_Y	18
#define BACKBTN_W	108
#define BACKBTN_H	108

#define QUICKVIEW_X		1146
#define QUICKVIEW_Y		604
#define QUICKVIEW_W 	108
#define QUICKVIEW_H 	108

#define RECORDINGBTN_X	1146
#define RECORDINGBTN_Y	418
#define RECORDINGBTN_W	108
#define RECORDINGBTN_H	108

#define REC_STOP_BTN_X	1146
#define REC_STOP_BTN_Y	594
#define REC_STOP_BTN_W	108
#define REC_STOP_BTN_H	108

#define CAF_BUTTON_X	38
#define CAF_BUTTON_Y	606
#define CAF_BUTTON_W	87
#define CAF_BUTTON_H	88

#define CAMERA_BUTTON_X		38
#define CAMERA_BUTTON_Y		65
#define CAMERA_BUTTON_W		61
#define CAMERA_BUTTON_H		61
#define CAMCORDER_BUTTON_X	38
#define CAMCORDER_BUTTON_Y	109
#define CAMCORDER_BUTTON_W	61
#define CAMCORDER_BUTTON_H	61
#define CAMERA_ICON_X 38
#define CAMERA_ICON_Y 10
#define CAMERA_ICON_W 56
#define CAMERA_ICON_H 48

images {
	/*item_button*/
	image: BUTTON_BG_NORMAL_IMAGE COMP;
	image: BUTTON_BG_PRESS_IMAGE COMP;

	image: SNAPSHOT_PRESS_IMAGE COMP;
	image: SNAPSHOT_NORMAL_IMAGE COMP;
	image: LEFT_TOOLBAR_BG_IMAGE COMP;
	image: RIGHT_TOOLBAR_BG_IMAGE COMP;

	image: CAF_BUTTON_NORMAL_IMAGE COMP;
	image: CAF_BUTTON_PRESS_IMAGE COMP;
}

#define TOOLBAR_BACKGROUND_IMAGE(part_name, x, y, w, h, img) \
	part {				\
		name: part_name;	\
		type: IMAGE;	\
		scale: 1;\
		description {	\
			state: "default" 0.0;\
			rel1 { relative: (x)/MAIN_W (y)/MAIN_H; }		\
			rel2 { relative: (x+w)/MAIN_W (y+h)/MAIN_H; }	\
			image { normal: img; }	\
		}\
		description{ \
			state: "hide" 0.0; \
			inherit:"default" 0.0; \
			visible: 0; \
		} \
	}

#define TOOLBAR_ITEM_BUTTON_WITH_BG(button_name, x, y, bg_w, bg_h) \
	part { name: button_name; \
		type: IMAGE; \
		mouse_events: 1; \
		scale: 1;\
		description { \
			state: "default" 0.0; \
			rel1 { relative: (x)/(bg_w) (y)/(bg_h); offset: 0 0;} \
			rel2 { relative: (x+TOOLBAR_ITEM_W)/(bg_w) (y+TOOLBAR_ITEM_H)/(bg_h); offset: 0 0;} \
			visible: 0; \
		} \
		description { \
			state: "normal" 0.0; \
			inherit: "default" 0.0; \
			visible: 1; \
			image { normal: BUTTON_BG_NORMAL_IMAGE; } \
		} \
		description { \
			state: "press" 0.0; \
			inherit: "default" 0.0; \
			visible: 1; \
			image { normal: BUTTON_BG_PRESS_IMAGE; } \
		} \
		description { \
			state: "dim" 0.0; \
			inherit: "default" 0.0; \
			visible: 0; \
		} \
	}

#define TOOLBAR_ITEM_SWALLOW_ICON_WITH_BG(icon_name, x, y, w, h, bg_w, bg_h) \
	part { name: icon_name; \
		type: SWALLOW; \
		mouse_events: 1; \
		scale: 1;\
		description { \
			state: "default" 0.0; \
			rel1 { relative: (x)/(bg_w) (y)/(bg_h); offset: 0 0;} \
			rel2 { relative: (x+w)/(bg_w) (y+h)/(bg_h); offset: 0 0;} \
			visible: 0; \
		} \
		description { \
			state: "normal" 0.0; \
			inherit: "default" 0.0; \
			visible: 1; \
		} \
		description { \
			state: "dim" 0.0; \
			inherit: "default" 0.0; \
			visible: 1; \
		} \
	} \
	part { name: icon_name"_event"; \
		type: RECT; \
		mouse_events: 1; \
		scale: 1;\
		description { \
			state: "default" 0.0; \
			rel1.to: icon_name; \
			rel2.to: icon_name; \
			color: 0 0 0 0; \
			visible: 1; \
		} \
	}

#define TOOLBAR_ITEM_SWALLOW_BUTTON_WITH_BG(icon_name, x, y, w, h, bg_w, bg_h) \
	part { name: icon_name; \
		type: SWALLOW; \
		mouse_events: 1; \
		scale: 1;\
		description { \
			state: "default" 0.0; \
			rel1 { relative: (x)/(bg_w) (y)/(bg_h); offset: 0 0;} \
			rel2 { relative: (x+w)/(bg_w) (y+h)/(bg_h); offset: -1 -1;} \
		} \
	}

#define TOOLBAR_LEFT_ITEM_PROGRAM(button_name, icon_name, press_signal, release_signal, click_signal) \
	program { 	\
		name: "mouse_down_"icon_name; \
		signal: "mouse,down,1"; \
		source: icon_name"_event"; \
		script {\
			new st[31];\
			new Float:vl;\
			get_state(PART:icon_name, st, 30, vl);\
			if (strcmp(st, "normal") == 0) { \
				emit( press_signal, "toolbar_signal" );\
			} \
		}\
	} \
	program { \
		name: "mouse_up_"icon_name; \
		signal: "mouse,up,1"; \
		source: icon_name"_event"; \
		script {\
			new st[31];\
			new Float:vl;\
			get_state(PART:icon_name, st, 30, vl);\
			if (strcmp(st, "normal") == 0) { \
				emit( release_signal, "toolbar_signal" );\
			} \
		}\
	}\
	program { \
		name: "mouse_clicked_"icon_name;  \
		signal: "mouse,clicked,1"; \
		source: icon_name"_event"; \
		script {\
			new st[31];\
			new Float:vl;\
			get_state(PART:icon_name, st, 30, vl);\
			if (strcmp(st, "normal") == 0) { \
				emit( click_signal, "toolbar_signal" );\
			} \
		}\
	}\
	program { \
		name: icon_name",invisible"; \
		source: "prog"; \
		signal: icon_name",invisible"; \
		script: { \
			set_state(PART:button_name, "default", 0.0); \
			set_state(PART:icon_name, "default", 0.0); \
		} \
	} \
	program { \
		name: icon_name",normal"; \
		source: "prog"; \
		signal: icon_name",normal"; \
		script: { \
			set_state(PART:button_name, "default", 0.0); \
			set_state(PART:icon_name, "normal", 0.0); \
		} \
	} \
	program { \
		name: icon_name",edit"; \
		source: "prog"; \
		signal: icon_name",edit"; \
		script: { \
			set_state(PART:button_name, "normal", 0.0); \
			set_state(PART:icon_name, "normal", 0.0); \
		} \
	} \
	program { \
		name: icon_name",dim"; \
		source: "prog"; \
		signal: icon_name",dim"; \
		script: { \
			set_state(PART:button_name, "default", 0.0); \
			set_state(PART:icon_name, "dim", 0.0); \
		} \
	}

#define TOOLBAR_RIGHT_ITEM_PROGRAM(icon_name, press_signal_name, release_signal_name, click_signal_name) \
	program { 	\
		name: "mouse_down_"icon_name; \
		signal: "mouse,down,1"; \
		source: icon_name; \
		script {\
			new st[31];\
			new Float:vl;\
			get_state(PART:icon_name, st, 30, vl);\
			if (strcmp(st, "dim") != 0) { \
				emit( press_signal_name, "toolbar_signal" );\
			} \
		}\
	} \
	program { \
		name: "mouse_up_"icon_name; \
		signal: "mouse,up,1"; \
		source: icon_name; \
		script {\
			new st[31];\
			new Float:vl;\
			get_state(PART:icon_name, st, 30, vl);\
			if (strcmp(st, "dim") != 0) { \
				emit( release_signal_name, "toolbar_signal" );\
			} \
		}\
	}\
	program { \
		name: "mouse_clicked_"icon_name;  \
		signal: "mouse,clicked,1"; \
		source: icon_name; \
		script {\
			new st[31];\
			new Float:vl;\
			get_state(PART:icon_name, st, 30, vl);\
			if (strcmp(st, "dim") != 0) \
				emit( click_signal_name, "toolbar_signal" );\
		}\
	}\
	program { \
		name: icon_name",invisible"; \
		source: "prog"; \
		signal: icon_name",invisible"; \
		script: { \
			set_state(PART:icon_name, "default", 0.0); \
		} \
	} \
	program { \
		name: icon_name",normal"; \
		source: "prog"; \
		signal: icon_name",normal"; \
		script: { \
			set_state(PART:icon_name, "normal", 0.0); \
		} \
	} \
	program { \
		name: icon_name",press"; \
		source: "prog"; \
		signal: icon_name",press"; \
		script: { \
			set_state(PART:icon_name, "press", 0.0); \
		} \
	} \
	program { \
		name: icon_name",dim"; \
		source: "prog"; \
		signal: icon_name",dim"; \
		script: { \
			set_state(PART:icon_name, "dim", 0.0); \
		} \
	}

#define TOOLBAR_ITEM_BUTTON(name, x, y) \
	TOOLBAR_ITEM_BUTTON_WITH_BG(name, x, y, MAIN_W, MAIN_H)

#define TOOLBAR_ITEM_SWALLOW_ICON(name, x, y, w, h) \
	TOOLBAR_ITEM_SWALLOW_ICON_WITH_BG(name, x, y, w, h, MAIN_W, MAIN_H)

#define TOOLBAR_ITEM_SWALLOW_BUTTON(name, x, y, w, h) \
	TOOLBAR_ITEM_SWALLOW_BUTTON_WITH_BG(name, x, y, w, h, MAIN_W, MAIN_H)

#endif /*__H_EDC_CAM_TOOLBAR_LAYOUT_INC_EDC_H__*/
//end files