Updating license in spec file
[pkgs/u/ug-calendar-picker.git] / ug-calendar-picker-efl.edc
1 /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   *
8   *    http://www.tizenopensource.org/license
9   *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 #define MAIN_W 480
18 #define MAIN_H 800
19
20 #include "ug-calendar-picker-efl_macro.edc"
21
22 collections {
23         group {
24                 name: "picker_view";
25                 //min: MAIN_W MAIN_H;
26                 images {
27                         image: "00_calend_picker_panel.png" COMP;
28                         image: "00_picker_bg_brown.png" COMP;
29                 }
30
31                 parts {
32                         part { name: "background";
33                                 type: RECT;
34                                 mouse_events: 0;
35                                 description {
36                                         state: "default" 0.0;
37                                         visible: 0;
38                                         rel1 { relative: 0.0 0.0; }
39                                         rel2 { relative: 1.0 1.0; }
40                                         color: 0 0 0 0;
41                                 }
42                         }
43
44                         part { name: "panel";
45                                 type: IMAGE;
46                                 scale: 1;
47                                 mouse_events: 0;
48                                 description {
49                                         state: "default" 0.0;
50                                         visible: 1;
51                                         min: 0 66;
52                                         fixed: 0 1;
53                                         align: 0.0 0.0;
54                                         rel1 { relative: 0.0 0.0; to: background; }
55                                         rel2 { relative: 1.0 0.0; to: background; }
56                                         image.normal: "00_calend_picker_panel.png";
57                                 }
58                         }
59
60                         PADDING("padding.top", 0, 8, 0, 1, 0.0, 0.0,
61                                         0.0, 0.0, 1.0, 1.0, panel, panel)
62                         PADDING("padding.left", 5, 0, 1, 0, 0.0, 0.0,
63                                         0.0, 0.0, 1.0, 1.0, panel, panel)
64                         PADDING("padding.right", 5, 0, 1, 0, 1.0, 0.0,
65                                         0.0, 0.0, 1.0, 1.0, panel, panel)
66
67                         part { name: "btn_prev";
68                                 type: SWALLOW;
69                                 mouse_events: 1;
70                                 description {
71                                         state: "default" 0.0;
72                                         min: 98 50;
73                                         max: 98 50;
74                                         fixed: 1 1;
75                                         align: 0.0 0.0;
76                                         rel1 { relative: 1.0 1.0; to_x:padding.left; to_y: padding.top; }
77                                         rel2 { relative: 1.0 1.0; to_x: padding.left; to_y: padding.top; }
78                                 }
79                         }
80
81                         PADDING("padding.btn_prev.right", 5, 0, 1, 0, 0.0, 0.0,
82                                         1.0, 0.0, 1.0, 1.0, btn_prev, btn_prev)
83
84                         part { name: "btn_next";
85                                 type: SWALLOW;
86                                 mouse_events: 1;
87                                 description {
88                                         state: "default" 0.0;
89                                         min: 98 50;
90                                         max: 98 50;
91                                         fixed: 1 1;
92                                         align: 0.0 0.0;
93                                         rel1 { relative: 1.0 1.0; to_x: padding.btn_prev.right; to_y: padding.top; }
94                                         rel2 { relative: 1.0 1.0; to_x: padding.btn_prev.right; to_y: padding.top; }
95                                 }
96                         }
97
98                         part { name: "btn_done";
99                                 type: SWALLOW;
100                                 mouse_events: 1;
101                                 description {
102                                         state: "default" 0.0;
103                                         min: 98 50;
104                                         max: 98 50;
105                                         fixed: 1 1;
106                                         align: 1.0 0.0;
107                                         rel1 { relative: 0.0 1.0; to_x:padding.right; to_y: padding.top; }
108                                         rel2 { relative: 0.0 1.0; to_x: padding.right; to_y: padding.top; }
109                                 }
110                         }
111
112                         part { name: "separation_line";
113                                 type: RECT;
114                                 mouse_events: 0;
115                                 description {
116                                         state: "default" 0.0;
117                                         visible: 1;
118                                         min: 0 2;
119                                         max: 0 2;
120                                         fixed: 0 1;
121                                         align: 0.0 1.0;
122                                         color: 104 97 92 255;
123                                         rel1 { relative: 0.0 1.0; to: panel; }
124                                         rel2 { relative: 1.0 1.0; to: panel; }
125                             }
126                         }
127
128                         part { name: "list_bg";
129                                 type: IMAGE;
130                                 mouse_events: 0;
131                                 description {
132                                         state: "default" 0.0;
133                                         visible: 1;
134                                         align: 0.0 0.0;
135                                         rel1 { relative: 0.0 1.0; to: separation_line; }
136                                         rel2 { relative: 1.0 1.0; to: background; }
137                                         image.normal: "00_picker_bg_brown.png";
138                                 }
139                         }
140
141                         part { name: "list_options";
142                                 type: SWALLOW;
143                                 mouse_events: 1;
144                                 description {
145                                         state: "default" 0.0;
146                                         align: 0.0 0.0;
147                                         rel1 { relative: 0.0 0.0; to: list_bg; }
148                                         rel2 { relative: 1.0 1.0; to: list_bg; }
149                                 }
150                         }
151                 }
152         }
153
154 #define CAL_BTN_W 170
155 #define CAL_BTN_H 100
156 #define CAL_PADDING_H 20
157 #define CAL_SHOW_H 335
158 #define PICKER_SHOW_H 400
159 #define CAL_BTN_BASE_H 66
160 #define CAL_BTN_BASE_NBEAT_H 54
161
162         group {
163       name: "calendar_picker";
164       images {
165          image: "00_picker_arrow_left.png" COMP;
166          image: "00_picker_arrow_left_press.png" COMP;
167          image: "00_picker_arrow_right.png" COMP;
168          image: "00_picker_arrow_right_press.png" COMP;
169          image: "00_calend_picker_bar_button.png" COMP;
170          image: "00_calend_picker_bar_button_press.png" COMP;
171          image: "00_picker_btn_normal.png" COMP;
172          image: "00_picker_btn_press.png" COMP;
173       }
174       parts{
175          part { name: "base";
176             type: RECT;
177             scale: 1;
178             description { state: "default" 0.0;
179                 rel1 { relative: 0 0; }
180                 rel2 { relative: 1 1; }
181                 color: 0 0 0 0;
182             }
183          }
184
185          part { name: "picker_base";
186             type: RECT;
187             scale: 1;
188             description { state: "default" 0.0;
189                visible: 0;
190                min: 0 PICKER_SHOW_H;
191                fixed: 0 1;
192                rel1 { relative: 0.0 1.1; to: "base"; }
193                rel2 { relative: 1.0 1.0; to: "base"; }
194                align: 0.0 0.0;
195                color: 255 0 0 0;
196            }
197            description {
198                state: "show" 0.0;
199                inherit: "default" 0.0;
200                rel1 { relative: 0.0 350/800; to: "base"; }
201                rel2 { relative: 1.0 1.0; to: "base"; }
202                visible: 1;
203                align: 0.0 1.0;
204             }
205          }
206          part { name: "swallow.calendar";
207             type: SWALLOW;
208             scale: 1;
209             description { state: "default" 0.0;
210                visible: 0;
211                min: 0 CAL_SHOW_H;
212                fixed: 0 1;
213 //               rel1 { relative: 0.0 1.0; to: "button_base"; }
214                            rel1 { relative: 0.0 1.0; to: "picker_base"; }
215                rel2 { relative: 1.0 1.0; to: "picker_base"; }
216                align: 0.0 1.0;
217             }
218             description {
219                state: "show" 0.0;
220                inherit: "default" 0.0;
221                visible: 1;
222             }
223          }
224          part { name: "button_base";
225             type: RECT;
226             mouse_events: 1;
227             scale: 1;
228             description { state: "default" 0.0;
229                visible: 0;
230                min: 24 CAL_BTN_BASE_NBEAT_H;
231                max: 800 CAL_BTN_BASE_NBEAT_H;
232                fixed: 1 1;
233 //               rel2 { relative: 1.0 54/400; to: "picker_base"; }
234 //                         rel2 { relative: 1.0 0.0; to: "picker_base"; }
235                            rel1 { relative: 0.0 0.0; to: "swallow.calendar"; }
236                            rel2 { relative: 1.0 0.0; to: "swallow.calendar"; }
237                color: 176 176 176 255;
238 //               align: 0.0 0.0;
239                            align: 0.0 1.0;
240             }
241             description { state: "show" 0.0;
242                inherit: "default" 0.0;
243                visible: 1;
244             }
245          }
246          part { name: "btn_prev";
247             mouse_events: 1;
248             scale: 1;
249             description { state: "default" 0.0;
250                visible: 0;
251                min: 46 42;
252                max: 46 42;
253                fixed: 1 1;
254                rel1.to: "button_base";
255                rel1.offset: 6 0;
256                rel2.to: "button_base";
257                image {
258                   normal: "00_picker_btn_normal.png";
259                   border: 4 4 4 4;
260                   border_scale: 1;
261                }
262                align: 0.0 0.5;
263             }
264             description { state: "show" 0.0;
265                inherit: "default" 0.0;
266                visible: 1;
267             }
268             description { state: "clicked" 0.0;
269                inherit: "default" 0.0;
270                visible: 1;
271                image {
272                   normal: "00_picker_btn_press.png";
273                   border: 4 4 4 4;
274                   border_scale: 1;
275                }
276             }
277          }
278          part { name: "btn_prev_icon";
279             repeat_events: 1;
280             scale: 1;
281             description { state: "default" 0.0;
282                visible: 0;
283                min: 20 20;
284                max: 20 20;
285                fixed: 1 1;
286                rel1.to: "btn_prev";
287                rel2.to: "btn_prev";
288                align: 0.5 0.5;
289                image {
290                    normal: "00_picker_arrow_left.png";
291                    border: 4 4 4 4;
292                    border_scale: 1;
293                }
294                fill.smooth : 0;
295             }
296             description { state: "show" 0.0;
297                inherit: "default" 0.0;
298                visible: 1;
299             }
300             description { state: "clicked" 0.0;
301                inherit: "show" 0.0;
302                image.normal: "00_picker_arrow_left_press.png";
303             }
304          }
305          part { name: "btn_next";
306             mouse_events: 1;
307             scale: 1;
308             description { state: "default" 0.0;
309                visible: 0;
310                min: 46 42;
311                max: 46 42;
312                fixed: 1 1;
313                rel1.to: "btn_prev";
314                rel1.relative: 1 0;
315                rel1.offset: 6 0;
316                rel2.to: "btn_prev";
317                rel2.relative: 1 1;
318                image {
319                   normal: "00_picker_btn_normal.png";
320                   border: 4 4 4 4;
321                   border_scale: 1;
322                }
323                align: 0.0 0.5;
324             }
325             description { state: "show" 0.0;
326                inherit: "default" 0.0;
327                visible: 1;
328             }
329             description { state: "clicked" 0.0;
330                inherit: "default" 0.0;
331                visible: 1;
332                image {
333                   normal: "00_picker_btn_press.png";
334                   border: 4 4 4 4;
335                   border_scale: 1;
336                }
337             }
338          }
339          part { name: "btn_next_icon";
340             repeat_events: 1;
341             scale: 1;
342             description { state: "default" 0.0;
343                visible: 0;
344                min: 20 20;
345                max: 20 20;
346                fixed: 1 1;
347                rel1.to: "btn_next";
348                rel2.to: "btn_next";
349                align: 0.5 0.5;
350                image {
351                   normal: "00_picker_arrow_right.png";
352                   border: 4 4 4 4;
353                   border_scale: 1;
354                }
355                fill.smooth : 0;
356             }
357             description { state: "show" 0.0;
358                inherit: "default" 0.0;
359                visible: 1;
360             }
361             description { state: "clicked" 0.0;
362                inherit: "show" 0.0;
363                image.normal: "00_picker_arrow_right_press.png";
364             }
365          }
366          part { name: "btn_done";
367             mouse_events: 1;
368             scale: 1;
369             description { state: "default" 0.0;
370                visible: 0;
371                min: 90 42;
372                max: 90 42;
373                fixed: 1 1;
374                rel1.to: "button_base";
375                rel2.to: "button_base";
376                rel2.offset: -6 0;
377                align: 1.0 0.5;
378                image {
379                   normal: "00_picker_btn_normal.png";
380                   border: 4 4 4 4;
381                   border_scale: 1;
382                }
383             }
384             description { state: "show" 0.0;
385                inherit: "default" 0.0;
386                visible: 1;
387             }
388             description { state: "clicked" 0.0;
389                inherit: "default" 0.0;
390                visible: 1;
391                image {
392                   normal: "00_picker_btn_press.png";
393                   border: 4 4 4 4;
394                   border_scale: 1;
395                }
396             }
397          }
398          part { name: "btn_done_text";
399             type: TEXT;
400             repeat_events: 1;
401             scale: 1;
402             description { state: "default" 0.0;
403                visible: 0;
404                fixed: 1 1;
405                rel1.to: "btn_done";
406                rel2.to: "btn_done";
407                color: 0 0 0 255;
408                text {
409                   font: "SLP:style=Medium";
410                   size: 22;
411                   min: 1 1;
412                   align: 0.5 0.5;
413                }
414             }
415             description { state: "show" 0.0;
416                inherit: "default" 0.0;
417                visible: 1;
418             }
419          }
420       }
421       programs {
422          program {
423             name: "calendar.show.effect";
424             signal: "calendar.show";
425             source: "show";
426             action: STATE_SET "show" 0.0;
427             target: "button_base";
428             target: "btn_prev";
429             target: "btn_prev_icon";
430             target: "btn_next";
431             target: "btn_next_icon";
432             target: "btn_done";
433             target: "btn_done_text";
434             target: "swallow.calendar";
435             after : "calendar.show.transition";
436          }
437          program {
438             name: "calendar.hide.effect";
439             action: STATE_SET "default" 0.0;
440             target: "swallow.calendar";
441             target: "button_base";
442             target: "btn_prev";
443             target: "btn_prev_icon";
444             target: "btn_next";
445             target: "btn_next_icon";
446             target: "btn_done";
447             target: "btn_done_text";
448          }
449          program {
450             name: "calendar.show.transition";
451             action: STATE_SET "show" 0.0;
452             target: "picker_base";
453 //            transition: SINUSOIDAL 0.5;
454                         transition: DECELERATE 0.5;
455          }
456          program {
457             name: "calendar.hide.transition";
458             signal: "calendar.hide";
459             source: "hide";
460             action: STATE_SET "default" 0.0;
461             target: "picker_base";
462             transition: SINUSOIDAL 0.6;
463             after : "calendar.hide.effect";
464          }
465          program {
466             name:   "prev_bt_click";
467             signal: "mouse,down,1";
468             source: "btn_prev";
469             action: STATE_SET "clicked" 0.0;
470             target: "btn_prev";
471          }
472          program {
473             name: "prev_bt_unclick";
474             signal: "mouse,up,1";
475             source: "btn_prev";
476             action: STATE_SET "show" 0.0;
477             target: "btn_prev";
478          }
479          program {
480             name:   "next_bt_click";
481             signal: "mouse,down,1";
482             source: "btn_next";
483             action: STATE_SET "clicked" 0.0;
484             target: "btn_next";
485          }
486          program {
487             name:   "next_bt_unclick";
488             signal: "mouse,up,1";
489             source: "btn_next";
490             action: STATE_SET "show" 0.0;
491             target: "btn_next";
492          }
493          program {
494             name:   "done_bt_click";
495             signal: "mouse,down,1";
496             source: "btn_done";
497             action: STATE_SET "clicked" 0.0;
498             target: "btn_done";
499          }
500          program {
501             name:   "done_bt_unclick";
502             signal: "mouse,up,1";
503             source: "btn_done";
504             action: STATE_SET "show" 0.0;
505             target: "btn_done";
506          }
507       }
508    }
509 }