elementary/dayselector - New widget Elc_dayselector
[framework/uifw/elementary.git] / data / themes / default.edc
1 // LICENSE NOTE:
2 // This file (and only this one) is licenses under public-domain. The reason
3 // is that this is meant to serve as a template for making your own themes and
4 // Elementary's LGPL license is not intended to follow. The images used do come
5 // under LGPL, but this file specifically for the structure of your theme is
6 // public-domain. This means you can take, use, re-license and otherwise
7 // have zero restrictions on using this file as a base for your theme.
8
9 externals.external: "elm";
10
11 collections {
12
13 ///////////////////////////////////////////////////////////////////////////////
14    group { name: "elm/focus_highlight/top/default";
15       images {
16          image: "emo-unhappy.png" COMP;
17       }
18
19       data {
20          item: "animate" "on";
21       }
22
23       script {
24          public s_x, s_y, s_w, s_h; /* source */
25          public difx, dify, difw, difh;
26          public rot_dir;
27
28          public animator1(val, Float:pos) {
29             new x, y, w, h, dx, dy, dw, dh, Float:rot;
30
31             dx = round(float_mul(float(get_int(difx)), pos));
32             x = get_int(s_x) + dx;
33             dy = round(float_mul(float(get_int(dify)), pos));
34             y = get_int(s_y) + dy;
35             dw = round(float_mul(float(get_int(difw)), pos));
36             w = get_int(s_w) + dw;
37             dy = round(float_mul(float(get_int(difh)), pos));
38             h = get_int(s_h) + dh;
39
40             update_offset(x, y, w, h);
41
42             rot = 360.0 * pos * float(get_int(rot_dir));
43             set_state_val(PART:"shine", STATE_MAP_ROT_Z, rot);
44
45             if (pos >= 1.0) {
46                emit("elm,action,focus,anim,end", "");
47                set_state(PART:"shine", "default", 0.0);
48             }
49          }
50
51          public update_offset(x, y, w, h) {
52             new x1, y1, x2, y2;
53             x1 = x + w - 15;
54             y1 = y - 15;
55             x2 = x + w + 14;
56             y2 = y + 14;
57             set_state_val(PART:"shine", STATE_REL1_OFFSET, x1, y1);
58             set_state_val(PART:"shine", STATE_REL2_OFFSET, x2, y2);
59          }
60
61          public message(Msg_Type:type, id, ...) {
62             if ((type == MSG_INT_SET) && (id == 1)) {
63                new x1, y1, w1, h1;
64                new x2, y2, w2, h2;
65                new px1, px2, py1, py2;
66                new rd;
67
68                x1 = getarg(2);
69                y1 = getarg(3);
70                w1 = getarg(4);
71                h1 = getarg(5);
72                x2 = getarg(6);
73                y2 = getarg(7);
74                w2 = getarg(8);
75                h2 = getarg(9);
76
77                set_int(s_x, x1);
78                set_int(s_y, y1);
79                set_int(s_w, w1);
80                set_int(s_h, h1);
81                set_int(difx, x2 - x1);
82                set_int(dify, y2 - y1);
83                set_int(difw, w2 - w1);
84                set_int(difh, h2 - h1);
85
86                px1 = x1 + w1;
87                px2 = x2 + w2;
88                py1 = y1 + h1;
89                py2 = y2 + h2;
90                if (px2 > px1) {
91                   rd = 1;
92                } else if (px1 > px2) {
93                   rd = -1;
94                } else {
95                   if (py2 > py1) {
96                      rd = 1;
97                   } else {
98                      rd = -1;
99                   }
100                }
101                set_int(rot_dir, rd);
102
103                custom_state(PART:"shine", "default", 0.0);
104                set_state_val(PART:"shine", STATE_REL1, 0.0, 0.0);
105                set_state_val(PART:"shine", STATE_REL2, 0.0, 0.0);
106                set_state_val(PART:"shine", STATE_MAP_ON, 1);
107                set_state_val(PART:"shine", STATE_MAP_ROT_Z, 0.0);
108                update_offset(x1, y1, w1, h1);
109                set_state(PART:"shine", "custom", 0.0);
110
111                anim(0.2, "animator1", 1);
112             }
113          }
114       }
115
116       parts {
117          part { name: "base";
118             type: RECT;
119             repeat_events: 1;
120             description { state: "default" 0.0;
121                rel1.relative: 0.0 0.0;
122                rel2.relative: 1.0 1.0;
123                visible: 0;
124             }
125          }
126          part { name: "shine";
127             type: IMAGE;
128             mouse_events: 1;
129             repeat_events: 1;
130             ignore_flags: ON_HOLD;
131             description { state: "default" 0.0;
132                image {
133                   normal: "emo-unhappy.png";
134                }
135                rel1.to: "base";
136                rel1.relative: 1.0 0.0;
137                rel1.offset: -15 -15;
138                rel2.to: "base";
139                rel2.relative: 1.0 0.0;
140                rel2.offset: 14 14;
141             }
142             description { state: "disabled" 0.0;
143                inherit:  "default" 0.0;
144                color: 0 0 0 0;
145             }
146          }
147
148          program { name: "show";
149             signal: "elm,action,focus,show";
150             source: "elm";
151             action: ACTION_STOP;
152             target: "hide";
153             target: "hide_start";
154             target: "hide_end";
155             after: "show_start";
156          }
157          program { name: "show_start";
158             action:  STATE_SET "default" 0.0;
159             transition: LINEAR 0.2;
160             target: "shine";
161             after: "show_end";
162          }
163          program { name: "show_end";
164             action: SIGNAL_EMIT "elm,action,focus,show,end" "";
165          }
166          program { name: "hide";
167             signal: "elm,action,focus,hide";
168             source: "elm";
169             action: ACTION_STOP;
170             target: "show";
171             target: "show_start";
172             target: "show_end";
173             after: "hide_start";
174          }
175          program { name: "hide_start";
176             action:  STATE_SET "disabled" 0.0;
177             transition: LINEAR 0.2;
178             target: "shine";
179             after: "hide_end";
180          }
181          program { name: "hide_end";
182             action: SIGNAL_EMIT "elm,action,focus,hide,end" "";
183          }
184       }
185    }
186
187 ///////////////////////////////////////////////////////////////////////////////
188    group { name: "elm/focus_highlight/bottom/default";
189       parts {
190          part { name: "shine";
191             type: RECT;
192             mouse_events: 1;
193             repeat_events: 1;
194             ignore_flags: ON_HOLD;
195             description { state: "default" 0.0;
196                color: 0 255 0 50;
197                rel1.offset: 0 0;
198                rel2.offset: 0 0;
199             }
200             description { state: "disabled" 0.0;
201                inherit:  "default" 0.0;
202                color: 0 0 0 0;
203             }
204          }
205
206          program { name: "show";
207             signal: "elm,action,focus,show";
208             source: "elm";
209             action: ACTION_STOP;
210             target: "hide";
211             target: "hide_start";
212             target: "hide_end";
213             after: "show_start";
214          }
215          program { name: "show_start";
216             action:  STATE_SET "default" 0.0;
217             transition: LINEAR 0.2;
218             target: "shine";
219             after: "show_end";
220          }
221          program { name: "show_end";
222             action: SIGNAL_EMIT "elm,action,focus,show,end" "";
223          }
224          program { name: "hide";
225             signal: "elm,action,focus,hide";
226             source: "elm";
227             action: ACTION_STOP;
228             target: "show";
229             target: "show_start";
230             target: "show_end";
231             after: "hide_start";
232          }
233          program { name: "hide_start";
234             action:  STATE_SET "disabled" 0.0;
235             transition: LINEAR 0.2;
236             target: "shine";
237             after: "hide_end";
238          }
239          program { name: "hide_end";
240             action: SIGNAL_EMIT "elm,action,focus,hide,end" "";
241          }
242       }
243    }
244
245 ///////////////////////////////////////////////////////////////////////////////
246    group { name: "elm/access/base/default";
247       images {
248          image: "access_glow.png" LOSSY 85;
249       }
250       parts {
251          part { name: "block1"; type: RECT;
252             mouse_events:  0;
253             description { state: "default" 0.0;
254                color: 0 0 0 200;
255                rel1 { to: "base";
256                   relative: 0.0 0.0;
257                   offset: -100000 -100000;
258                }
259                rel2 { to: "base";
260                   relative: 1.0 0.0;
261                   offset: 100000 96;
262                }
263             }
264          }
265          part { name: "block2"; type: RECT;
266             mouse_events:  0;
267             description { state: "default" 0.0;
268                color: 0 0 0 200;
269                rel1 { to: "base";
270                   relative: 0.0 1.0;
271                   offset: -100000 -97;
272                }
273                rel2 { to: "base";
274                   relative: 1.0 1.0;
275                   offset: 100000 100000;
276                }
277             }
278          }
279          part { name: "block3"; type: RECT;
280             mouse_events:  0;
281             description { state: "default" 0.0;
282                color: 0 0 0 200;
283                rel1 { to: "block1";
284                   relative: 0.0 1.0;
285                   offset: 0 0;
286                }
287                rel2 { to_x: "base"; to_y: "block2";
288                   relative: 0.0 0.0;
289                   offset: 96 -1;
290                }
291             }
292          }
293          part { name: "block4"; type: RECT;
294             mouse_events:  0;
295             description { state: "default" 0.0;
296                color: 0 0 0 200;
297                rel1 { to_x: "base"; to_y: "block1";
298                   relative: 1.0 1.0;
299                   offset: -97 0;
300                }
301                rel2 { to: "block2";
302                   relative: 1.0 0.0;
303                   offset: -1 -1;
304                }
305             }
306          }
307          part { name: "base";
308             mouse_events:  0;
309             description { state: "default" 0.0;
310                image.normal: "access_glow.png";
311                image.border: 112 112 112 112;
312                rel1.offset: -102 -102;
313                rel2.offset:  101  101;
314                fill.smooth: 0;
315             }
316          }
317       }
318    }
319
320 #include "widgets/bg.edc"
321 #include "widgets/border.edc"
322 #include "widgets/scroller.edc"
323 #include "widgets/label.edc"
324 #include "widgets/button.edc"
325 #include "widgets/toggle.edc"
326 #include "widgets/clock.edc"
327 #include "widgets/datetime.edc"
328 #include "widgets/dayselector.edc"
329 #include "widgets/menu.edc"
330 #include "widgets/frame.edc"
331 #include "widgets/tooltip.edc"
332 #include "widgets/hover.edc"
333 #include "widgets/ctxpopup.edc"
334 #include "widgets/entry.edc"
335 #include "widgets/bubble.edc"
336 #include "widgets/photo.edc"
337 #include "widgets/thumb.edc"
338 #include "widgets/icon.edc"
339 #include "widgets/toolbar.edc"
340 #include "widgets/notify.edc"
341 #include "widgets/slideshow.edc"
342 #include "widgets/win.edc"
343 #include "widgets/list.edc"
344 #include "widgets/slider.edc"
345 #include "widgets/actionslider.edc"
346 #include "widgets/genlist.edc"
347 #include "widgets/check.edc"
348 #include "widgets/radio.edc"
349 #include "widgets/progressbar.edc"
350 #include "widgets/separator.edc"
351 #include "widgets/spinner.edc"
352 #include "widgets/index.edc"
353 #include "widgets/gengrid.edc"
354 #include "widgets/photocam.edc"
355 #include "widgets/map.edc"
356 #include "widgets/panes.edc"
357 #include "widgets/panel.edc"
358 #include "widgets/conformant.edc"
359 #include "widgets/calendar.edc"
360 #include "widgets/colorselector.edc"
361 #include "widgets/flipselector.edc"
362 #include "widgets/diskselector.edc"
363 #include "widgets/fileselector.edc"
364 #include "widgets/layout.edc"
365 #include "widgets/segment_control.edc"
366 #include "widgets/player.edc"
367 #include "widgets/video.edc"
368 #include "widgets/naviframe.edc"
369 #include "widgets/multibuttonentry.edc"
370 #include "widgets/popup.edc"
371 #include "ews.edc"
372 #include "widgets/pointer.edc"
373 }