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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
|
/*
* Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
*
* PROPRIETARY/CONFIDENTIAL
*
* This software is the confidential and proprietary information of SAMSUNG
* ELECTRONICS ("Confidential Information"). You agree and acknowledge that this
* software is owned by Samsung and you shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the license
* agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
* representations or warranties about the suitability of the software, either
* express or implied, including but not limited to the implied warranties of
* merchantability, fitness for a particular purpose, or non-infringement.
* SAMSUNG shall not be liable for any damages suffered by licensee arising out
* of or releated to this software.
*
*/
#define DAYSELECOR_DAY_POS_LEFT 1
#define DAYSELECOR_DAY_POS_RIGHT 2
#define DAYSELECOR_DAY_POS_MIDDLE 3
#define DAYSELECOR_DAY_TYPE_WEEKDAY 1
#define DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT 2
#define DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1 3
#define DAYSELECOR_DAY_STATE_DEFAULT 1
#define DAYSELECOR_DAY_STATE_PRESSED 2
#define DAYSELECOR_DAY_STATE_SELECTED 3
#define DAYSELECTOR_DAY(_pos, _after)\
part {\
name: "day"#_pos;\
type: SWALLOW;\
scale: 1;\
clip_to: "clipper";\
description { state: "default" 0.0;\
visible: 0;\
min: 0 0;\
align: 0.0 0.5;\
fixed: 1 0;\
rel1 {\
relative: 1.0 0.0;\
to: "day"#_after;\
offset: 1 0;\
}\
rel2 {\
relative: 1.0 1.0;\
to: "day"#_after;\
}\
}\
description { state: "visible" 0.0;\
inherit: "default" 0.0;\
visible: 1;\
min: DAYSELECTOR_CHECK_WIDTH_INC DAYSELECTOR_CHECK_HEIGHT_INC;\
}\
}\
programs{\
program {\
name: "day"#_pos"visible";\
signal: "day"#_pos",visible";\
source: "elm";\
action: STATE_SET "visible" 0.0;\
target: "day"#_pos;\
}\
program {\
name: "day"#_pos"notvisible";\
signal: "day"#_pos",default";\
source: "elm";\
action: STATE_SET "default" 0.0;\
target: "day"#_pos;\
}\
}
group {
name: "elm/dayselector/base/default";
parts {
part {
name: "bg";
type: RECT;
mouse_events: 0;
clip_to: "clipper";
description {
state: "default" 0.0;
rel1 {
relative: 0.5 0.0;
to: "day0";
}
rel2 {
relative: 0.5 1.0;
to: "day6";
}
color: DAYSELECTOR_BACKGROUND_COLOR_INC;
}
}
part {
name: "day0";
type: SWALLOW;
scale: 1;
clip_to: "clipper";
description {
state: "default" 0.0;
visible: 0;
min: 0 0;
align: 0.0 0.5;
fixed: 1 0;
rel2.relative: 0.0 1.0;
}
description {
state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
min: DAYSELECTOR_CHECK_WIDTH_INC DAYSELECTOR_CHECK_HEIGHT_INC;
}
}
DAYSELECTOR_DAY(1, 0)
DAYSELECTOR_DAY(2, 1)
DAYSELECTOR_DAY(3, 2)
DAYSELECTOR_DAY(4, 3)
DAYSELECTOR_DAY(5, 4)
DAYSELECTOR_DAY(6, 5)
part {
name: "clipper";
type: RECT;
description {
state: "default" 0.0;
rel1.to: "day0";
rel2.to: "day6";
color: 255 255 255 255;
}
description {
state: "visible" 0.0;
inherit: "default" 0.0;
color: 200 200 200 255;
}
}
part {
name: "disabler";
type: RECT;
description {
state: "default" 0.0;
color: 0 0 0 0;
visible: 0;
}
description {
state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
}
programs {
program {
name: "disble_dayselector";
signal: "elm,state,disabled";
source: "elm";
action: STATE_SET "visible" 0.0;
target: "disabler";
target: "clipper";
}
program {
name: "enable_dayselector";
signal: "elm,state,enabled";
source: "elm";
action: STATE_SET "default" 0.0;
target: "disabler";
target: "clipper";
}
program {
name: "day0_visible";
signal: "day0,visible";
source: "elm";
action: STATE_SET "visible" 0.0;
target: "day0";
}
program {
name: "day0_default";
signal: "day0,default";
source: "elm";
action: STATE_SET "default" 0.0;
target: "day0";
}
}
}
group {
name: "elm/check/base/dayselector/default";
images {
image: "00_alarm_repeat_button_normal_01.png" COMP;
image: "00_alarm_repeat_button_press_01.png" COMP;
image: "00_alarm_repeat_button_normal_02.png" COMP;
image: "00_alarm_repeat_button_press_02.png" COMP;
image: "00_alarm_repeat_button_normal_03.png" COMP;
image: "00_alarm_repeat_button_press_03.png" COMP;
}
script {
public check_pos; // Left, Right, Middle.
public check_type; // Weekday, Weekend.
public check_state = DAYSELECOR_DAY_STATE_DEFAULT; // Default, Pressed, Selected.
public check_bg_show() {
if(get_int(check_pos) == DAYSELECOR_DAY_POS_LEFT) {
if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT)
set_state(PART:"bg", "default_left", 0.0);
else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED)
set_state(PART:"bg", "pressed_left", 0.0);
else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED)
set_state(PART:"bg", "selected_left", 0.0);
}
else if(get_int(check_pos) == DAYSELECOR_DAY_POS_RIGHT) {
if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT)
set_state(PART:"bg", "default_right", 0.0);
else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED)
set_state(PART:"bg", "pressed_right", 0.0);
else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED)
set_state(PART:"bg", "selected_right", 0.0);
}
else if(get_int(check_pos) == DAYSELECOR_DAY_POS_MIDDLE) {
if(get_int(check_state) == DAYSELECOR_DAY_STATE_DEFAULT)
set_state(PART:"bg", "default_middle", 0.0);
else if(get_int(check_state) == DAYSELECOR_DAY_STATE_PRESSED)
set_state(PART:"bg", "pressed_middle", 0.0);
else if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED)
set_state(PART:"bg", "selected_middle", 0.0);
}
}
public check_text_show() {
if(get_int(check_state) == DAYSELECOR_DAY_STATE_SELECTED)
set_state(PART:"elm.text", "selected", 0.0);
else {
if(get_int(check_type) == DAYSELECOR_DAY_TYPE_WEEKDAY)
set_state(PART:"elm.text", "default", 0.0);
else if (get_int(check_type) == DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT)
set_state(PART:"elm.text", "weekend_default", 0.0);
else if (get_int(check_type) == DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1)
set_state(PART:"elm.text", "weekend_style1", 0.0);
}
}
}
parts {
part {
name: "bg";
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
//color: DAYSELECTOR_BACKGROUND_COLOR_INC;
}
description { state: "default_left" 0.0;
inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_normal_01.png";
border: 4 0 4 4;
border_scale: 1;
}
}
description { state: "default_right" 0.0;
inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_normal_03.png";
border: 0 4 4 4;
border_scale: 1;
}
}
description { state: "default_middle" 0.0;
inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_normal_02.png";
border: 0 0 4 4;
border_scale: 1;
}
}
description { state: "pressed_left" 0.0;
inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_press_01.png";
border: 4 0 4 4;
border_scale: 1;
}
}
description { state: "pressed_right" 0.0;
inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_press_03.png";
border: 0 4 4 4;
border_scale: 1;
}
}
description { state: "pressed_middle" 0.0;
inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_press_02.png";
border: 0 0 4 4;
border_scale: 1;
}
}
description { state: "selected_left" 0.0;
inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_press_01.png";
border: 4 0 4 4;
border_scale: 1;
}
}
description { state: "selected_right" 0.0;
inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_press_03.png";
border: 0 4 4 4;
border_scale: 1;
}
}
description { state: "selected_middle" 0.0;
inherit: "default" 0.0;
image {
normal: "00_alarm_repeat_button_press_02.png";
border: 0 0 4 4;
border_scale: 1;
}
}
}
part {
name: "elm.text";
type: TEXT;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
rel1.to: "bg";
rel2.to: "bg";
color: DAYSELECTOR_WEEKDAY_COLOR_INC;
text {
font: "SLP:style=Medium";
size: DAYSELECTOR_DAY_FONT_SIZE_INC;
min: 1 1;
align: 0.5 0.5;
text_class: "slp_medium";
}
}
description {
state: "weekend_default" 0.0;
inherit: "default" 0.0;
color: DAYSELECTOR_SATURDAY_COLOR_INC;
}
description {
state: "weekend_style1" 0.0;
inherit: "default" 0.0;
color: DAYSELECTOR_SUNDAY_COLOR_INC;
}
description {
state: "selected" 0.0;
inherit: "default" 0.0;
color: DAYSELECTOR_DAY_PRESSED_COLOR_INC;
}
}
part {
name: "events";
type: RECT;
ignore_flags: ON_HOLD;
description {
state: "default" 0.0;
rel1.to: "bg";
rel2.to: "bg";
color: 0 0 0 0;
}
}
}
programs {
program {
name: "check,pressed";
signal: "mouse,down,1";
source: "events";
script {
set_int(check_state, DAYSELECOR_DAY_STATE_PRESSED);
check_bg_show();
}
}
program {
name: "check,toggle";
signal: "mouse,up,1";
source: "events";
action: SIGNAL_EMIT "elm,action,check,toggle" "";
}
program {
name: "check,on";
signal: "elm,state,check,on";
source: "elm";
script {
set_int(check_state, DAYSELECOR_DAY_STATE_SELECTED);
check_bg_show();
check_text_show();
}
}
program {
name: "check,off";
signal: "elm,state,check,off";
source: "elm";
script {
set_int(check_state, DAYSELECOR_DAY_STATE_DEFAULT);
check_bg_show();
check_text_show();
}
}
program { name: "check,left";
signal: "elm,pos,check,left";
source: "elm";
script {
set_int(check_pos, DAYSELECOR_DAY_POS_LEFT);
check_bg_show();
}
}
program { name: "check,right";
signal: "elm,pos,check,right";
source: "elm";
script {
set_int(check_pos, DAYSELECOR_DAY_POS_RIGHT);
check_bg_show();
}
}
program { name: "check,middle";
signal: "elm,pos,check,middle";
source: "elm";
script {
set_int(check_pos, DAYSELECOR_DAY_POS_MIDDLE);
check_bg_show();
}
}
program { name: "check,weekday";
signal: "elm,type,weekday,default";
source: "";
script {
set_int(check_type, DAYSELECOR_DAY_TYPE_WEEKDAY);
check_text_show();
}
}
program { name: "check,weekend,default";
signal: "elm,type,weekend,default";
source: "";
script {
set_int(check_type, DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT);
check_text_show();
}
}
program { name: "check,weekend,style1";
signal: "elm,type,weekend,style1";
source: "";
script {
set_int(check_type, DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1);
check_text_show();
}
}
}
}
#undef DAYSELECOR_DAY_POS_LEFT
#undef DAYSELECOR_DAY_POS_RIGHT
#undef DAYSELECOR_DAY_POS_MIDDLE
#undef DAYSELECOR_DAY_TYPE_WEEKDAY
#undef DAYSELECOR_DAY_TYPE_WEEKEND_DEFAULT
#undef DAYSELECOR_DAY_TYPE_WEEKEND_STYLE1
#undef DAYSELECOR_DAY_STATE_DEFAULT
#undef DAYSELECOR_DAY_STATE_PRESSED
#undef DAYSELECOR_DAY_STATE_SELECTED
#undef DAYSELECTOR_DAY
|