summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2012-11-18 14:41:17 +0000
committerBoris Faure <billiob@gmail.com>2012-11-18 14:41:17 +0000
commit3e30d35a96a3a7ff97653a06c3301d099fb3ff8a (patch)
tree795d12442afa0fba0529050908ad7f8bb6d08417
parentc96b3f0cfc398392bc8968636a6296b55a0718a5 (diff)
efenniht: adapt clock from dark
SVN revision: 79429
-rw-r--r--e/clock.edc873
-rw-r--r--images/digit_0.pngbin0 -> 6522 bytes
-rw-r--r--images/digit_1.pngbin0 -> 5423 bytes
-rw-r--r--images/digit_2.pngbin0 -> 6681 bytes
-rw-r--r--images/digit_3.pngbin0 -> 6364 bytes
-rw-r--r--images/digit_4.pngbin0 -> 6234 bytes
-rw-r--r--images/digit_5.pngbin0 -> 6677 bytes
-rw-r--r--images/digit_6.pngbin0 -> 6825 bytes
-rw-r--r--images/digit_7.pngbin0 -> 6012 bytes
-rw-r--r--images/digit_8.pngbin0 -> 6416 bytes
-rw-r--r--images/digit_9.pngbin0 -> 6199 bytes
-rw-r--r--images/digit_am.pngbin0 -> 1364 bytes
-rw-r--r--images/digit_na.pngbin0 -> 4209 bytes
-rw-r--r--images/digit_pm.pngbin0 -> 1787 bytes
-rw-r--r--images/dot_pattern.pngbin0 -> 975 bytes
-rw-r--r--images/hole_tiny.pngbin0 -> 128 bytes
-rw-r--r--images/separator_horiz.pngbin0 -> 199 bytes
17 files changed, 801 insertions, 72 deletions
diff --git a/e/clock.edc b/e/clock.edc
index cd76faf..93c8e3b 100644
--- a/e/clock.edc
+++ b/e/clock.edc
@@ -1,85 +1,814 @@
1collections { 1collections {
2 group { name: "e/modules/clock/main"; 2#define FIXED_SIZE(_WIDTH, _HEIGHT) \
3 script { 3 min: _WIDTH _HEIGHT; max: _WIDTH _HEIGHT; fixed: 1 1;
4 public clock_cb(val) { 4group { name: "e/modules/clock/digital";
5 new buffer[6]; 5 min: 64 16;
6 new year, month, day, yearday, weekday, hour, minute; 6 max: 512 128;
7 new Float:second; 7 images.image: "digit_na.png" COMP;
8 8 images.image: "digit_0.png" COMP;
9 date(year, month, day, yearday, weekday, hour, minute, second); 9 images.image: "digit_1.png" COMP;
10 timer(60.0 - (second), "clock_cb", 1); 10 images.image: "digit_2.png" COMP;
11 11 images.image: "digit_3.png" COMP;
12 buffer[0] = 0; 12 images.image: "digit_4.png" COMP;
13 13 images.image: "digit_5.png" COMP;
14 if (minute < 10 && hour < 10) { snprintf(buffer, 10, "0%i:0%i", hour, minute); } 14 images.image: "digit_6.png" COMP;
15 else if (minute < 10) { snprintf(buffer, 10, "%i:0%i", hour, minute); } 15 images.image: "digit_7.png" COMP;
16 else if (hour < 10) { snprintf(buffer, 10, "0%i:%i", hour, minute); } 16 images.image: "digit_8.png" COMP;
17 else { snprintf(buffer, 10, "%i:%i", hour, minute); } 17 images.image: "digit_9.png" COMP;
18 set_text(PART:"time", buffer); 18 images.image: "digit_am.png" COMP;
19 19 images.image: "digit_pm.png" COMP;
20 buffer[0] = 0; 20 images.image: "hole_tiny.png" COMP;
21 21 script {
22 if (day < 10 && month < 10) { snprintf(buffer, 10, "0%i/0%i", day, month); } 22 public do_seconds, do_24h, do_date;
23 else if (day < 10) { snprintf(buffer, 10, "0%i/%i", day, month); } 23 new tick_timer;
24 else if (month < 10) { snprintf(buffer, 10, "%i/0%i", day, month); } 24
25 else { snprintf(buffer, 10, "%i/%i", day, month); } 25 valset(id, v) {
26 set_text(PART:"date", buffer); 26 if ((v >= 0) && (v <= 9)) {
27 27 new buf[20];
28 } 28 snprintf(buf, 20, "%i", v);
29 } 29 set_state(id, buf, 0.0);
30 parts { 30 } else {
31 part { name: "eventarea"; 31 set_state(id, "default", 0.0);
32 type: RECT; 32 }
33 mouse_events: 1; 33 }
34 description { state: "default" 0.0; 34 apvalset(id, pm) {
35 min: 45 1; 35 if (pm) set_state(id, "active", 0.0);
36 color: 0 0 0 0; 36 else set_state(id, "default", 0.0);
37 visible: 1; 37 }
38 evalsize() {
39 new do24h, dosec, v[14], i, tot, mul;
40 new parts[] = {
41 PART:"hours1", PART:"hours1",
42 PART:"hours2", PART:"hours2",
43 PART:"mins1", PART:"mins1",
44 PART:"mins2", PART:"mins2",
45 PART:"secs1", PART:"secs1",
46 PART:"secs2", PART:"secs2",
47 PART:"ampm", PART:"ampm"
48 };
49
50 mul = 4;
51 if (get_int(do_date)) {
52 mul = 3;
53 }
54
55 for (i = 0; i < 14; i += 2) {
56 custom_state(parts[i], "default", 0.0);
57 }
58 v[0] = 0; v[1] = 2; v[2] = 2; v[3] = 4; // hrs
59 v[4] = 5; v[5] = 7; v[6] = 7; v[7] = 9; // mins
60 tot = 9;
61
62 dosec = get_int(do_seconds);
63 do24h = get_int(do_24h);
64 if ((dosec) && (!do24h)) { // sec + ampm
65 tot += 7;
66 v[8] = 10; v[9] = 12; v[10] = 12; v[11] = 14;
67 v[12] = 14; v[13] = 16;
68 }
69 else if ((dosec) && (do24h)) { // sec + -
70 tot += 5;
71 v[8] = 10; v[9] = 12; v[10] = 12; v[11] = 14;
72 v[12] = 0; v[13] = 0;
73 }
74 else if ((!dosec) && (!do24h)) { // - + ampm
75 tot += 2;
76 v[8] = 0; v[9] = 0; v[10] = 0; v[11] = 0;
77 v[12] = 9; v[13] = 11;
78 }
79 else if ((!dosec) && (do24h)) { // - + -
80 tot += 0;
81 v[8] = 0; v[9] = 0; v[10] = 0; v[11] = 0;
82 v[12] = 0; v[13] = 0;
83 }
84 for (i = 0; i < 14; i += 2) {
85 set_state_val(parts[i], STATE_REL1,
86 float(v[i]) / float(tot), 0.0);
87 set_state_val(parts[i + 1], STATE_REL2,
88 float(v[i + 1]) / float(tot), 1.0);
89 }
90 for (i = 0; i < 14; i += 2) {
91 set_state(parts[i], "custom", 0.0);
92 }
93 set_min_size(tot * mul, 16);
94 set_max_size(tot * 8 * mul, 128);
95 emit("e,state,sizing,changed", "");
96 }
97 reset() {
98 new tim;
99
100 evalsize();
101 tim = get_int(tick_timer);
102 if (tim) {
103 cancel_timer(tim);
104 set_int(tick_timer, 0);
105 }
106 clock_cb(0);
107 }
108
109 public clock_cb(val) {
110 new year, month, day, yearday, weekday, hour, minute;
111 new Float:second;
112 new v, dosec, do24h, tim;
113
114 date(year, month, day, yearday, weekday, hour, minute, second);
115 dosec = get_int(do_seconds);
116 dosec = 1;
117 if (dosec) {
118 v = round(second);
119 tim = timer(1.0 - (second - v), "clock_cb", 1);
120 // set seconds to v
121 valset(PART:"s0", v / 10);
122 valset(PART:"s1", v % 10);
123 }
124 else {
125 tim = timer(60.0 - (second), "clock_cb", 1);
126 }
127 set_int(tick_timer, tim);
128
129 // set minutes to minute
130 valset(PART:"m0", minute / 10);
131 valset(PART:"m1", minute % 10);
132
133 // set hours to hour
134 do24h = get_int(do_24h);
135 if (do24h) {
136 valset(PART:"h0", hour / 10);
137 valset(PART:"h1", hour % 10);
138 }
139 else {
140 new pm;
141
142 // if 12 or later, its pm
143 if (hour >= 12) {
144 pm = 1;
145 // if we are after 12 (1, 2, 3 etc.) then mod by 12
146 if (hour > 12) hour = hour % 12;
147 }
148 else {
149 pm = 0;
150 // make after midnight be 12:XX AM :)
151 if (hour == 0) hour = 12;
152 }
153 valset(PART:"h0", hour / 10);
154 valset(PART:"h1", hour % 10);
155 apvalset(PART:"ap", pm);
156 }
157 }
158 }
159 parts {
160 part { name: "secclip"; type: RECT;
161 description { state: "default" 0.0;
162 }
163 description { state: "hidden" 0.0;
164 visible: 0;
165 }
166 }
167 part { name: "ampmclip"; type: RECT;
168 description { state: "default" 0.0;
169 }
170 description { state: "hidden" 0.0;
171 visible: 0;
172 }
173 }
174 // XXX: hours1/2, mins1/2, secs1/2 and ampm SHOULD be spacers... but
175 // if they are calculations go weird. this shouldnt happen, but does.
176 part { name: "timearea"; type: RECT;
177 description { state: "default" 0.0;
178 visible: 0;
179 }
180 description { state: "date" 0.0;
181 inherit: "default" 0.0;
182 rel2.relative: 1.0 0.0;
183 rel2.offset: -1 4;
184 rel2.to_y: "e.text.today";
185 }
186 }
187 part { name: "hours1"; type: RECT;
188 description { state: "default" 0.0;
189 rel1.relative: (0/16) 0.0;
190 rel2.relative: (2/16) 1.0;
191 rel1.to: "timearea";
192 rel2.to: "timearea";
193 visible: 0;
194 }
195 }
196 part { name: "hours2"; type: RECT;
197 description { state: "default" 0.0;
198 rel1.relative: (2/16) 0.0;
199 rel2.relative: (4/16) 1.0;
200 rel1.to: "timearea";
201 rel2.to: "timearea";
202 visible: 0;
203 }
204 }
205 part { name: "mins1"; type: RECT;
206 description { state: "default" 0.0;
207 rel1.relative: (5/16) 0.0;
208 rel2.relative: (7/16) 1.0;
209 rel1.to: "timearea";
210 rel2.to: "timearea";
211 visible: 0;
212 }
213 }
214 part { name: "mins2"; type: RECT;
215 description { state: "default" 0.0;
216 rel1.relative: (7/16) 0.0;
217 rel2.relative: (9/16) 1.0;
218 rel1.to: "timearea";
219 rel2.to: "timearea";
220 visible: 0;
221 }
222 }
223 part { name: "secs1"; type: RECT;
224 description { state: "default" 0.0;
225 rel1.relative: (10/16) 0.0;
226 rel2.relative: (12/16) 1.0;
227 rel1.to: "timearea";
228 rel2.to: "timearea";
229 visible: 0;
230 }
231 }
232 part { name: "secs2"; type: RECT;
233 description { state: "default" 0.0;
234 rel1.relative: (12/16) 0.0;
235 rel2.relative: (14/16) 1.0;
236 rel1.to: "timearea";
237 rel2.to: "timearea";
238 visible: 0;
239 }
240 }
241 part { name: "ampm"; type: RECT;
242 description { state: "default" 0.0;
243 rel1.relative: (14/16) 0.0;
244 rel2.relative: (16/16) 1.0;
245 rel1.to: "timearea";
246 rel2.to: "timearea";
247 visible: 0;
248 }
249 }
250 part { name: "c00";
251 description { state: "default" 0.0;
252 rel1.to: "hours2";
253 rel1.relative: 1.0 0.5;
254 rel1.offset: 0 -2;
255 rel2.to: "mins1";
256 rel2.relative: 0.0 0.5;
257 rel2.offset: 0 -2;
258 align: 0.5 1.0;
259 FIXED_SIZE(4, 4)
260 image.normal: "hole_tiny.png";
261 }
262 }
263 part { name: "c01";
264 description { state: "default" 0.0;
265 rel1.to: "hours2";
266 rel1.relative: 1.0 0.5;
267 rel1.offset: 0 1;
268 rel2.to: "mins1";
269 rel2.relative: 0.0 0.5;
270 rel2.offset: 0 1;
271 align: 0.5 0.0;
272 FIXED_SIZE(4, 4)
273 image.normal: "hole_tiny.png";
274 }
275 }
276 part { name: "c10";
277 clip_to: "secclip";
278 description { state: "default" 0.0;
279 rel1.to: "mins2";
280 rel1.relative: 1.0 0.5;
281 rel1.offset: 0 -2;
282 rel2.to: "secs1";
283 rel2.relative: 0.0 0.5;
284 rel2.offset: 0 -2;
285 align: 0.5 1.0;
286 FIXED_SIZE(4, 4)
287 image.normal: "hole_tiny.png";
288 }
289 }
290 part { name: "c11";
291 clip_to: "secclip";
292 description { state: "default" 0.0;
293 rel1.to: "mins2";
294 rel1.relative: 1.0 0.5;
295 rel1.offset: 0 1;
296 rel2.to: "secs1";
297 rel2.relative: 0.0 0.5;
298 rel2.offset: 0 1;
299 align: 0.5 0.0;
300 FIXED_SIZE(4, 4)
301 image.normal: "hole_tiny.png";
302 }
303 }
304#define DIGIT(_NAME, _TO) \
305 part { name: _NAME; \
306 description { state: "default" 0.0; \
307 rel1.to: _TO; rel2.to: _TO; \
308 aspect: (52/72) (52/72); aspect_preference: BOTH; \
309 image.normal: "digit_na.png"; \
310 } \
311 description { state: "0" 0.0; inherit: "default" 0.0; image.normal: "digit_0.png"; } \
312 description { state: "1" 0.0; inherit: "default" 0.0; image.normal: "digit_1.png"; } \
313 description { state: "2" 0.0; inherit: "default" 0.0; image.normal: "digit_2.png"; } \
314 description { state: "3" 0.0; inherit: "default" 0.0; image.normal: "digit_3.png"; } \
315 description { state: "4" 0.0; inherit: "default" 0.0; image.normal: "digit_4.png"; } \
316 description { state: "5" 0.0; inherit: "default" 0.0; image.normal: "digit_5.png"; } \
317 description { state: "6" 0.0; inherit: "default" 0.0; image.normal: "digit_6.png"; } \
318 description { state: "7" 0.0; inherit: "default" 0.0; image.normal: "digit_7.png"; } \
319 description { state: "8" 0.0; inherit: "default" 0.0; image.normal: "digit_8.png"; } \
320 description { state: "9" 0.0; inherit: "default" 0.0; image.normal: "digit_9.png"; } \
321 }
322#define DIGITC(_NAME, _TO, _CLIP) \
323 part { name: _NAME; \
324 clip_to: _CLIP; \
325 description { state: "default" 0.0; \
326 rel1.to: _TO; rel2.to: _TO; \
327 aspect: (52/72) (52/72); aspect_preference: BOTH; \
328 image.normal: "digit_na.png"; \
329 } \
330 description { state: "0" 0.0; inherit: "default" 0.0; image.normal: "digit_0.png"; } \
331 description { state: "1" 0.0; inherit: "default" 0.0; image.normal: "digit_1.png"; } \
332 description { state: "2" 0.0; inherit: "default" 0.0; image.normal: "digit_2.png"; } \
333 description { state: "3" 0.0; inherit: "default" 0.0; image.normal: "digit_3.png"; } \
334 description { state: "4" 0.0; inherit: "default" 0.0; image.normal: "digit_4.png"; } \
335 description { state: "5" 0.0; inherit: "default" 0.0; image.normal: "digit_5.png"; } \
336 description { state: "6" 0.0; inherit: "default" 0.0; image.normal: "digit_6.png"; } \
337 description { state: "7" 0.0; inherit: "default" 0.0; image.normal: "digit_7.png"; } \
338 description { state: "8" 0.0; inherit: "default" 0.0; image.normal: "digit_8.png"; } \
339 description { state: "9" 0.0; inherit: "default" 0.0; image.normal: "digit_9.png"; } \
340 }
341#define TAG(_NAME, _TO, _CLIP) \
342 part { name: _NAME; \
343 clip_to: _CLIP; \
344 description { state: "default" 0.0; \
345 rel1.to: _TO; rel2.to: _TO; \
346 aspect: (48/31) (48/31); aspect_preference: BOTH; \
347 image.normal: "digit_am.png"; \
348 } \
349 description { state: "active" 0.0; \
350 inherit: "default" 0.0; \
351 image.normal: "digit_pm.png"; \
352 } \
353 }
354
355 DIGIT ("h0", "hours1")
356 DIGIT ("h1", "hours2")
357 DIGIT ("m0", "mins1")
358 DIGIT ("m1", "mins2")
359 DIGITC("s0", "secs1", "secclip")
360 DIGITC("s1", "secs2", "secclip")
361 TAG("ap", "ampm", "ampmclip")
362#undef TAG
363#undef DIGIT
364
365 part { name: "e.text.today"; type: TEXT;
366 effect: GLOW;
367 description { state: "default" 0.0;
368 rel1.relative: 0.0 1.0;
369 rel1.offset: 0 1;
370 rel2.offset: -1 1;
371 align: 0.5 1.0;
372 color: 51 153 255 255;
373 color2: 51 153 255 24;
374 color3: 51 153 255 18;
375 text { font: "Sans"; size: 8;
376 text_class: "module_small";
377 align: 0.5 0.5;
378 min: 0 1;
379 }
380 fixed: 0 1;
381 }
382 }
383
384 part { name: "event"; type: RECT;
385 description { state: "default" 0.0;
386 color: 0 0 0 0;
387 }
388 }
389 }
390 programs {
391 program {
392 signal: "load"; source: "";
393 script {
394 clock_cb(0);
395 }
396 }
397 program {
398 signal: "e,state,date,on"; source: "e";
399 script {
400 set_int(do_date, 1);
401 set_state(PART:"timearea", "date", 0.0);
402 reset();
403 }
404 }
405 program {
406 signal: "e,state,date,off"; source: "e";
407 script {
408 set_int(do_date, 0);
409 set_state(PART:"timearea", "default", 0.0);
410 reset();
411 }
412 }
413 program {
414 signal: "e,state,seconds,on"; source: "e";
415 script {
416 set_int(do_seconds, 1);
417 set_state(PART:"secclip", "default", 0.0);
418 reset();
419 }
420 }
421 program {
422 signal: "e,state,seconds,off"; source: "e";
423 script {
424 set_int(do_seconds, 0);
425 set_state(PART:"secclip", "hidden", 0.0);
426 reset();
427 }
428 }
429 program {
430 signal: "e,state,24h,on"; source: "e";
431 script {
432 set_int(do_24h, 1);
433 set_state(PART:"ampmclip", "hidden", 0.0);
434 reset();
435 }
436 }
437 program {
438 signal: "e,state,24h,off"; source: "e";
439 script {
440 set_int(do_24h, 0);
441 set_state(PART:"ampmclip", "default", 0.0);
442 reset();
443 }
444 }
445 }
446}
447
448group { name: "e/modules/clock/calendar/dayname";
449 parts {
450 part { name: "e.text.label"; type: TEXT; mouse_events: 0;
451 effect: SHADOW BOTTOM;
452 scale: 1;
453 description { state: "default" 0.0;
454 color: 255 255 255 255;
455 color3: 255 255 255 25;
456 text { font: "Sans"; size: 8;
457 min: 1 1;
458 align: 0.5 0.5;
459 text_class: "module_small";
460 }
461 }
462 description { state: "weekend" 0.0;
463 inherit: "default" 0.0;
464 color: 128 128 128 255;
465 }
466 }
467 }
468 programs {
469 program {
470 signal: "e,state,weekend"; source: "e";
471 action: STATE_SET "weekend" 0.0;
472 target: "e.text.label";
473 }
474 program {
475 signal: "e,state,weekday"; source: "e";
476 action: STATE_SET "default" 0.0;
477 target: "e.text.label";
478 }
479 }
480}
481
482group { name: "e/modules/clock/calendar/day";
483 script {
484 public day_state = 0;
485 evalstate() {
486 new vv = get_int(day_state);
487
488 if (vv & 2)
489 {
490 set_state(PART:"e.text.label", "today", 0.0);
491 set_state(PART:"label2", "today", 0.0);
492 }
493 else if (vv & 4)
494 {
495 set_state(PART:"e.text.label", "hidden", 0.0);
496 set_state(PART:"label2", "default", 0.0);
497 }
498 else if (vv & 1)
499 {
500 set_state(PART:"e.text.label", "weekend", 0.0);
501 set_state(PART:"label2", "default", 0.0);
502 }
503 else
504 {
505 set_state(PART:"e.text.label", "default", 0.0);
506 set_state(PART:"label2", "default", 0.0);
507 }
508 }
509 }
510 parts {
511 part { name: "e.text.label"; type: TEXT; mouse_events: 0;
512 effect: SHADOW BOTTOM;
513 scale: 1;
514 description { state: "default" 0.0;
515 color: 255 255 255 255;
516 color3: 0 0 0 128;
517 text { font: "Sans"; size: 10;
518 min: 1 1;
519 align: 0.5 0.5;
520 }
521 }
522 description { state: "today" 0.0;
523 inherit: "default" 0.0;
524 visible: 0;
525 }
526 description { state: "weekend" 0.0;
527 inherit: "default" 0.0;
528 color: 128 128 128 255;
529 }
530 description { state: "hidden" 0.0;
531 inherit: "default" 0.0;
532 color: 55 55 55 255;
533 color3: 255 255 255 25;
534 }
535 }
536 part { name: "label2"; type: TEXT; mouse_events: 0;
537 effect: GLOW;
538 scale: 1;
539 description { state: "default" 0.0;
540 rel1.offset: -3 -3;
541 rel1.to: "e.text.label";
542 rel2.offset: 2 1;
543 rel2.to: "e.text.label";
544 color: 255 121 0 255;
545 color2: 255 121 0 24;
546 color3: 255 121 0 18;
547 text { font: "Sans"; size: 10;
548 text_source: "e.text.label";
549 min: 1 1;
550 align: 0.5 0.5;
551 }
552 visible: 0;
553 }
554 description { state: "today" 0.0;
555 inherit: "default" 0.0;
556 visible: 1;
557 }
558 }
559 }
560 programs {
561 program {
562 signal: "e,state,weekend"; source: "e";
563 script {
564 new vv = get_int(day_state);
565 set_int(day_state, vv | 1);
566 evalstate();
567 }
568 }
569 program {
570 signal: "e,state,weekday"; source: "e";
571 script {
572 new vv = get_int(day_state);
573 set_int(day_state, vv & (~1));
574 evalstate();
575 }
576 }
577
578 program {
579 signal: "e,state,today"; source: "e";
580 script {
581 new vv = get_int(day_state);
582 set_int(day_state, vv | 2);
583 evalstate();
584 }
585 }
586 program {
587 signal: "e,state,someday"; source: "e";
588 script {
589 new vv = get_int(day_state);
590 set_int(day_state, vv & (~2));
591 evalstate();
592 }
593 }
594
595 program {
596 signal: "e,state,hidden"; source: "e";
597 script {
598 new vv = get_int(day_state);
599 set_int(day_state, vv | 4);
600 evalstate();
601 }
602 }
603 program {
604 signal: "e,state,visible"; source: "e";
605 script {
606 new vv = get_int(day_state);
607 set_int(day_state, vv & (~4));
608 evalstate();
609 }
610 }
611 }
612}
613
614group { name: "e/modules/clock/calendar";
615 images.image: "separator_horiz.png" COMP;
616 images.image: "icon_arrow_left.png" COMP;
617 images.image: "icon_arrow_right.png" COMP;
618 images.image: "icon_arrow_left_selected.png" COMP;
619 images.image: "icon_arrow_right_selected.png" COMP;
620 parts {
621 part { name: "e.text.month"; type: TEXT;
622 effect: SHADOW BOTTOM;
623 mouse_events: 1;
624 scale: 1;
625 description { state: "default" 0.0;
626 fixed: 0 1;
627 align: 0.0 0.0;
628 rel1.to_x: "prev";
629 rel1.relative: 1.0 0.0;
630 rel2.relative: 1.0 0.0;
631 color: 255 255 255 255;
632 color3: 0 0 0 128;
633 text { font: "Sans:style=Bold"; size: 10;
634 align: 0.0 0.5;
635 min: 0 1;
636 text_class: "module_normal";
38 } 637 }
39 } 638 }
40 part { name: "date"; 639 }
41 type: TEXT; 640 part { name: "e.text.year"; type: TEXT; mouse_events: 0;
42 mouse_events: 0; 641 effect: SHADOW BOTTOM;
43 description { state: "default" 0.0; 642 scale: 1;
44 align: 0.5 1.0; 643 description { state: "default" 0.0;
45 rel1.to_y: "eventarea"; 644 fixed: 0 1;
46 rel2.to_y: "eventarea"; 645 align: 1.0 0.0;
47 color_class: "clock_date"; 646 rel1.relative: 0.0 0.0;
48 text { 647 rel2.to_x: "next";
49 font: "DejaVu Sans,Sans"; 648 rel2.relative: 0.0 0.0;
50 size: 10; 649 color: 255 255 255 255;
51 min: 1 1; 650 color3: 0 0 0 128;
52 align: 0.5 1.0; 651 text { font: "Sans:style=Bold"; size: 10;
53 text_class: "clock_date"; 652 align: 1.0 0.5;
54 } 653 min: 0 1;
654 text_class: "module_normal";
55 } 655 }
56 } 656 }
57 part { name: "time"; 657 }
58 type: TEXT; 658 part { name: "previm"; mouse_events: 0;
59 mouse_events: 0; 659 description { state: "default" 0.0;
60 description { state: "default" 0.0; 660 min: 15 15;
61 align: 0.5 0.0; 661 max: 15 15;
62 rel1.to_y: "eventarea"; 662 rel1.to: "prev";
63 rel2.to_y: "eventarea"; 663 rel2.to: "prev";
64 color_class: "clock_time"; 664 image.normal: "icon_arrow_left.png";
65 text { 665 }
66 font: "DejaVu Sans,Sans"; 666 description { state: "pressed" 0.0;
67 size: 14; 667 inherit: "default" 0.0;
68 min: 1 1; 668 image.normal: "icon_arrow_left_selected.png";
69 align: 0.5 0.0; 669 }
70 text_class: "clock_time"; 670 }
71 } 671 part { name: "prev"; type: RECT;
672 description { state: "default" 0.0;
673 align: 0.0 0.5;
674 color: 0 0 0 0;
675 aspect: 1.0 1.0; aspect_preference: VERTICAL;
676 rel1.to_y: "e.text.month";
677 rel1.relative: 0.0 0.0;
678 rel2.to_y: "e.text.month";
679 rel2.relative: 0.0 1.0;
680 }
681 program { name: "prev_down";
682 signal: "mouse,down,1*"; source: "prev";
683 action: STATE_SET "pressed" 0.0;
684 target: "previm";
685 }
686 program { name: "prev_up";
687 signal: "mouse,up,1"; source: "prev";
688 action: STATE_SET "default" 0.0;
689 target: "previm";
690 }
691 program { name: "prev_clicked";
692 signal: "mouse,clicked,1*"; source: "prev";
693 action: SIGNAL_EMIT "e,action,prev" "";
694 }
695 }
696 part { name: "nextim"; mouse_events: 0;
697 description { state: "default" 0.0;
698 min: 15 15;
699 max: 15 15;
700 rel1.to: "next";
701 rel2.to: "next";
702 image.normal: "icon_arrow_right.png";
703 }
704 description { state: "pressed" 0.0;
705 inherit: "default" 0.0;
706 image.normal: "icon_arrow_right_selected.png";
707 }
708 }
709 part { name: "next"; type: RECT;
710 description { state: "default" 0.0;
711 align: 1.0 0.5;
712 color: 0 0 0 0;
713 aspect: 1.0 1.0; aspect_preference: VERTICAL;
714 rel1.to_y: "e.text.month";
715 rel1.relative: 1.0 0.0;
716 rel2.to_y: "e.text.month";
717 rel2.relative: 1.0 1.0;
718 }
719 program { name: "next_down";
720 signal: "mouse,down,1"; source: "next";
721 action: STATE_SET "pressed" 0.0;
722 target: "nextim";
723 }
724 program { name: "next_up";
725 signal: "mouse,up,1"; source: "next";
726 action: STATE_SET "default" 0.0;
727 target: "nextim";
728 }
729 program { name: "next_clicked";
730 signal: "mouse,clicked,1"; source: "next";
731 action: SIGNAL_EMIT "e,action,next" "";
732 }
733 }
734 part { name: "sel";
735 description { state: "default" 0.0;
736 image.normal: "separator_horiz.png";
737 rel1.relative: 0.0 1.0;
738 rel1.offset: 0 0;
739 rel1.to: "e.table.daynames";
740 rel2.offset: -1 1;
741 rel2.to: "e.table.daynames";
742 min: 0 2;
743 fill.smooth: 0;
744 }
745 }
746
747 part { name: "e.table.daynames"; type: TABLE;
748 description { state: "default" 0.0;
749 fixed: 0 1;
750 align: 0.5 0.0;
751 rel1.to_y: "e.text.month";
752 rel1.relative: 0.0 1.0;
753 rel1.offset: 2 2;
754 rel2.to_y: "e.text.month";
755 rel2.relative: 1.0 1.0;
756 rel2.offset: -3 2;
757 step: 7 1;
758 table { homogeneous: TABLE;
759 padding: 1 1;
760 align: 0.5 0.5;
761 min: 1 1;
762 }
763 }
764 table {
765 items {
766#define D(x) \
767item { \
768 position: x 0; \
769 span: 1 1; \
770 source: "e/modules/clock/calendar/dayname"; \
771 weight: 1.0 1.0; \
772 align: -1.0 -1.0; \
773}
774 D(0) D(1) D(2) D(3) D(4) D(5) D(6)
775#undef D
72 } 776 }
73 } 777 }
74 } 778 }
75 programs { 779 part { name: "e.table.days"; type: TABLE;
76 program { name: "init"; 780 description { state: "default" 0.0;
77 signal: "load"; 781 rel1.to_y: "e.table.daynames";
78 source: ""; 782 rel1.relative: 0.0 1.0;
79 script { 783 rel1.offset: 2 2;
80 clock_cb(0); 784 rel2.offset: -3 -3;
785 step: 7 5;
786 table { homogeneous: TABLE;
787 padding: 1 1;
788 align: 0.5 0.5;
789 min: 1 1;
790 }
791 }
792 table {
793 items {
794#define D(x, y) \
795item { \
796 position: x y; \
797 span: 1 1; \
798 source: "e/modules/clock/calendar/day"; \
799 weight: 1.0 1.0; \
800 align: -1.0 -1.0; \
801}
802 D(0, 0) D(1, 0) D(2, 0) D(3, 0) D(4, 0) D(5, 0) D(6, 0)
803 D(0, 1) D(1, 1) D(2, 1) D(3, 1) D(4, 1) D(5, 1) D(6, 1)
804 D(0, 2) D(1, 2) D(2, 2) D(3, 2) D(4, 2) D(5, 2) D(6, 2)
805 D(0, 3) D(1, 3) D(2, 3) D(3, 3) D(4, 3) D(5, 3) D(6, 3)
806 D(0, 4) D(1, 4) D(2, 4) D(3, 4) D(4, 4) D(5, 4) D(6, 4)
807 D(0, 5) D(1, 5) D(2, 5) D(3, 5) D(4, 5) D(5, 5) D(6, 5)
808#undef D
81 } 809 }
82 } 810 }
83 } 811 }
84 } 812 }
85} 813}
814}
diff --git a/images/digit_0.png b/images/digit_0.png
new file mode 100644
index 0000000..3badb9e
--- /dev/null
+++ b/images/digit_0.png
Binary files differ
diff --git a/images/digit_1.png b/images/digit_1.png
new file mode 100644
index 0000000..0704105
--- /dev/null
+++ b/images/digit_1.png
Binary files differ
diff --git a/images/digit_2.png b/images/digit_2.png
new file mode 100644
index 0000000..d23a8a9
--- /dev/null
+++ b/images/digit_2.png
Binary files differ
diff --git a/images/digit_3.png b/images/digit_3.png
new file mode 100644
index 0000000..a8d70f4
--- /dev/null
+++ b/images/digit_3.png
Binary files differ
diff --git a/images/digit_4.png b/images/digit_4.png
new file mode 100644
index 0000000..3933606
--- /dev/null
+++ b/images/digit_4.png
Binary files differ
diff --git a/images/digit_5.png b/images/digit_5.png
new file mode 100644
index 0000000..83920bb
--- /dev/null
+++ b/images/digit_5.png
Binary files differ
diff --git a/images/digit_6.png b/images/digit_6.png
new file mode 100644
index 0000000..28d4e39
--- /dev/null
+++ b/images/digit_6.png
Binary files differ
diff --git a/images/digit_7.png b/images/digit_7.png
new file mode 100644
index 0000000..aeffbef
--- /dev/null
+++ b/images/digit_7.png
Binary files differ
diff --git a/images/digit_8.png b/images/digit_8.png
new file mode 100644
index 0000000..e2ac914
--- /dev/null
+++ b/images/digit_8.png
Binary files differ
diff --git a/images/digit_9.png b/images/digit_9.png
new file mode 100644
index 0000000..db81257
--- /dev/null
+++ b/images/digit_9.png
Binary files differ
diff --git a/images/digit_am.png b/images/digit_am.png
new file mode 100644
index 0000000..47ba267
--- /dev/null
+++ b/images/digit_am.png
Binary files differ
diff --git a/images/digit_na.png b/images/digit_na.png
new file mode 100644
index 0000000..643bd0b
--- /dev/null
+++ b/images/digit_na.png
Binary files differ
diff --git a/images/digit_pm.png b/images/digit_pm.png
new file mode 100644
index 0000000..17ca9c9
--- /dev/null
+++ b/images/digit_pm.png
Binary files differ
diff --git a/images/dot_pattern.png b/images/dot_pattern.png
new file mode 100644
index 0000000..391f2ea
--- /dev/null
+++ b/images/dot_pattern.png
Binary files differ
diff --git a/images/hole_tiny.png b/images/hole_tiny.png
new file mode 100644
index 0000000..49f7648
--- /dev/null
+++ b/images/hole_tiny.png
Binary files differ
diff --git a/images/separator_horiz.png b/images/separator_horiz.png
new file mode 100644
index 0000000..6593346
--- /dev/null
+++ b/images/separator_horiz.png
Binary files differ