Remove security-server dependency
[apps/core/preloaded/lockscreen.git] / res / edje / swipe_lock.edc
1 /*
2  * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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 group {
18         styles {
19                 style {
20                         name: "time_style_default";
21                         base: "style=far_shadow,bottom shadow_color=#00000033 font=SamsungNeoNum-3T:style=Regular color=#FFFFFF font_size=106 wrap=none";
22                         tag: "small_font" "+ font_size=40 font=SamsungNeoNum-3T:style=Light";
23                 }
24                 style {
25                         name: "date_style_default";
26                         base: "style=far_shadow,bottom shadow_color=#00000033 font=Tizen:style=Regular font_size=44 color=#FFFFFF wrap=none align=left text_class=ATO003";
27                         tag: "small_font" "+ font_size=32";
28                 }
29                 style {
30                         name: "time_style_contextual";
31                         base: "style=far_shadow,bottom shadow_color=#00000033 font=SamsungNeoNum-3T:style=Regular color=#FFFFFF font_size=34 align=center wrap=none";
32                 }
33         }
34         name: "swipe-lock";
35         parts {
36                 part {
37                         name: "bg";
38                         type: SPACER;
39                         description {
40                                 state: "default" 0.0;
41                         }
42                 }
43                 part {
44                         name: "vi_clipper";
45                         type: RECT;
46                         description {
47                                 state: "default" 0.0;
48                                 color: 255 255 255 255;
49                         }
50                         description {
51                                 state: "effect" 0.0;
52                                 color: 255 255 255 20;
53                         }
54                 }
55                 part {
56                         name: "padding.status_bar";
57                         type: SPACER;
58                         description {
59                                 state: "default" 0.0;
60                                 align: 0 0;
61                                 rel1 { relative: 0.0 0.0; to: "bg"; }
62                                 rel2 { relative: 1.0 INDICATOR_HEIGHT/WIN_HEIGHT; to: "bg"; }
63                         }
64                 }
65                 part {
66                         name: "padding.top";
67                         type: SPACER;
68                         description {
69                                 state: "default" 0.0;
70                                 align: 0 0;
71                                 rel1 { relative: 0.0 INDICATOR_HEIGHT/WIN_HEIGHT; to: "bg"; }
72                                 rel2 { relative: 1.0 (INDICATOR_HEIGHT+SWIPE_LOCK_PADDING_TOP)/WIN_HEIGHT; to: "bg"; }
73                         }
74                         description {
75                                 state: "effect_start" 0.0;
76                                 inherit: "default" 0.0;
77                                 rel1 { relative: 0.0 (INDICATOR_HEIGHT-SWIPE_LOCK_BOUNCE_EFFECT_OFFSET)/WIN_HEIGHT; to: "bg"; }
78                                 rel2 { relative: 1.0 (INDICATOR_HEIGHT+SWIPE_LOCK_PADDING_TOP-SWIPE_LOCK_BOUNCE_EFFECT_OFFSET)/WIN_HEIGHT; to: "bg"; }
79                         }
80                         description {
81                                 state: "effect" 0.0;
82                                 inherit: "default" 0.0;
83                                 rel1 { offset: 0 -SWIPE_LOCK_EFFECT_HEIGHT; }
84                                 rel2 { offset: 0 -SWIPE_LOCK_EFFECT_HEIGHT; }
85                         }
86                 }
87                 part {
88                         name: "padding.bottom";
89                         type: SPACER;
90                         description {
91                                 state: "default" 0.0;
92                                 align: 0 0;
93                                 rel1 { relative: 0.0 (WIN_HEIGHT-SWIPE_LOCK_PADDING_BOTTOM)/WIN_HEIGHT; to: "bg"; }
94                                 rel2 { relative: 1.0 1.0; to: "bg"; }
95                         }
96                         description {
97                                 state: "effect_start" 0.0;
98                                 inherit: "default" 0.0;
99                                 rel1 { relative: 0.0 (WIN_HEIGHT-SWIPE_LOCK_PADDING_BOTTOM+SWIPE_LOCK_BOUNCE_EFFECT_OFFSET)/WIN_HEIGHT; to: "bg"; }
100                                 rel2 { relative: 1.0 (WIN_HEIGHT+SWIPE_LOCK_BOUNCE_EFFECT_OFFSET)/WIN_HEIGHT; to: "bg"; }
101                         }
102                         description {
103                                 state: "effect" 0.0;
104                                 inherit: "default" 0.0;
105                                 rel1 { offset: 0 SWIPE_LOCK_EFFECT_HEIGHT; }
106                                 rel2 { offset: 0 SWIPE_LOCK_EFFECT_HEIGHT; }
107                         }
108                 }
109                 part {
110                         name: "padding.left";
111                         type: SPACER;
112                         description {
113                                 state: "default" 0.0;
114                                 align: 0 0;
115                                 rel1 { relative: 0.0 0.0; to: "bg"; }
116                                 rel2 { relative: SWIPE_LOCK_PADDING_LEFT/WIN_WIDTH 1.0; to: "bg"; }
117                         }
118                 }
119                 part {
120                         name: "padding.right";
121                         type: SPACER;
122                         description {
123                                 state: "default" 0.0;
124                                 align: 0 0;
125                                 rel1 { relative: (WIN_WIDTH-SWIPE_LOCK_PADDING_RIGHT)/WIN_WIDTH 0.0; to: "bg"; }
126                                 rel2 { relative: 1.0 1.0; to: "bg"; }
127                         }
128                 }
129                 part {
130                         name: "txt.timedate";
131                         type: TEXTBLOCK;
132                         description {
133                                 state: "default" 0.0;
134                                 align: 0.5 0.5;
135                                 visible: 0;
136                                 fixed: 0 0;
137                                 rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding.top"; offset: 0 45; }
138                                 rel2 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "padding.top"; }
139                                 text {
140                                         style: "time_style_contextual";
141                                         align: 0.5 0.5;
142                                         min: 1 1;
143                                         ellipsis: -1;
144                                         text: "12:45 PM     Wed, 3 August";
145                                 }
146                         }
147                         description {
148                                 inherit: "default" 0.0;
149                                 state: "contextual_event" 0.0;
150                                 visible: 1;
151                         }
152                 }
153                 part {
154                         name: "txt.time";
155                         type: TEXTBLOCK;
156                         clip_to: "vi_clipper";
157                         scale: 1;
158                         description {
159                                 state: "default" 0.0;
160                                 align: 0 0;
161                                 fixed: 1 1;
162                                 rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding.top"; }
163                                 rel2 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding.top"; }
164                                 text {
165                                         style: "time_style_default";
166                                         align: 0.5 0.5;
167                                         min: 1 1;
168                                         ellipsis: -1;
169                                         text: "12:45 <small_font>PM</samll_font>";
170                                 }
171                         }
172                         description {
173                                 inherit: "default" 0.0;
174                                 state: "contextual_event" 0.0;
175                                 visible: 0;
176                         }
177                 }
178                 part {
179                         name: "txt.date";
180                         type: TEXTBLOCK;
181                         clip_to: "vi_clipper";
182                         scale: 1;
183                         description {
184                                 state: "default" 0.0;
185                                 align: 0 0;
186                                 fixed: 1 1;
187                                 rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "txt.time"; offset: 0 -13; }
188                                 rel2 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "txt.time"; offset: 0 -13; }
189                                 text {
190                                         style: "date_style_default";
191                                         align: 0.5 0.5;
192                                         min: 1 1;
193                                         ellipsis: -1;
194                                         text: "Wed 1 December";
195                                 }
196                         }
197                         description {
198                                 inherit: "default" 0.0;
199                                 state: "contextual_event" 0.0;
200                                 visible: 0;
201                         }
202                 }
203                 part {
204                         name: "padding.txt.battery";
205                         type: SPACER;
206                         scale: 1;
207                         description {
208                                 state: "default" 0.0;
209                                 min: WIN_WIDTH 62;
210                                 max: WIN_WIDTH 62;
211                                 fixed: 1 1;
212                                 align: 0 0;
213                                 rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "txt.date"; }
214                                 rel2 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "txt.date"; }
215                         }
216                 }
217                 part {
218                         name: "txt.battery";
219                         type: TEXT;
220                         scale: 1;
221                         clip_to: "vi_clipper";
222                         description {
223                                 state: "default" 0.0;
224                                 min: 314 40;
225                                 max: 314 40;
226                                 fixed: 1 1;
227                                 align: 0 0;
228                                 visible: 1;
229                                 rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding.txt.battery"; }
230                                 rel2 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding.txt.battery"; }
231                                 text {
232                                         align: 0.0 0.5;
233                                         min: 1 1;
234                                         ellipsis: -1;
235                                         text: "Charging: 50%";
236                                         size: 34;
237                                 }
238                         }
239                         description {
240                                 state: "contextual_event" 0.0;
241                                 inherit: "default" 0.0;
242                                 align: 0 0;
243                                 rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "sw.contextual_event"; offset: 0 5; }
244                                 rel2 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "sw.contextual_event"; offset: 0 5; }
245                         }
246                         description {
247                                 state: "default_hidden" 0.0;
248                                 inherit: "default" 0.0;
249                                 visible: 0;
250                         }
251                         description {
252                                 state: "contextual_event_hidden" 0.0;
253                                 inherit: "contextual_event" 0.0;
254                                 visible: 0;
255                         }
256                 }
257                 part {
258                         name: "padding.txt.plmn";
259                         type: SPACER;
260                         description {
261                                 state: "default" 0.0;
262                                 min: WIN_WIDTH 14;
263                                 max: WIN_WIDTH 14;
264                                 fixed: 1 1;
265                                 align: 0 1;
266                                 rel1 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding.bottom"; }
267                                 rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding.bottom"; }
268                         }
269                 }
270                 part {
271                         name: "txt.plmn";
272                         type: SWALLOW;
273                         scale: 1;
274                         clip_to: "vi_clipper";
275                         description {
276                                 state: "default" 0.0;
277                                 min: 314 40;
278                                 max: 314 40;
279                                 fixed: 1 1;
280                                 align: 0 1;
281                                 visible: 1;
282                                 rel1 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding.txt.plmn"; }
283                                 rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding.txt.plmn"; }
284                         }
285                         description {
286                                 state: "hide" 0.0;
287                                 inherit: "default" 0.0;
288                                 visible: 0;
289                         }
290                 }
291                 part {
292                         name: "event";
293                         type: RECT;
294                         repeat_events: 1;
295                         description {
296                                 state: "default" 0.0;
297                                 color: 0 0 0 0;
298                                 rel1.relative: 0.0 0.0;
299                                 rel2.relative: 1.0 1.0;
300                         }
301                         description {
302                                 state: "blocked" 1.0;
303                                 inherit : "default";
304                         }
305                 }
306                 part {
307                         name: "sw.contextual_event";
308                         type: SWALLOW;
309                         clip_to: "vi_clipper";
310                         description {
311                                 state: "default" 0.0;
312                                 align: 0 0;
313                                 rel1 { relative: 0.5 1.0; to_x: "padding.left"; to_y: "txt.timedate"; offset: 0 15; }
314                                 rel2 { relative: 0.5 (INDICATOR_HEIGHT+CONTEXTUAL_INFO_HEIGHT)/WIN_HEIGHT; to_x: "padding.right"; to_y: "bg"; }
315                         }
316                         description {
317                                 state: "effect_start" 0.0;
318                                 inherit: "default" 0.0;
319                                 rel1 { offset: 0 -6; }
320                                 rel2 { offset: 0 -6; }
321                         }
322                         description {
323                                 state: "effect" 0.0;
324                                 inherit: "default" 0.0;
325                                 rel1 { offset: 0 -SWIPE_LOCK_EFFECT_HEIGHT; }
326                                 rel2 { offset: 0 -SWIPE_LOCK_EFFECT_HEIGHT; }
327                         }
328                 }
329                 part {
330                         name: "sw.camera";
331                         type: SWALLOW;
332                         scale: 1;
333                         clip_to: "vi_clipper";
334                         description {
335                                 state: "default" 0.0;
336                                 max: 500 500;
337                                 align: 1 1;
338                                 fixed: 1 1;
339                                 rel2 { to: "padding.bottom"; };
340                         }
341                 }
342         }
343         programs {
344                 program {
345                         name: "vi_effect_start.top";
346                         signal: "vi_effect_start.top";
347                         source: "padding.top";
348                         action: STATE_SET "effect_start" 0.0;
349                         target: "padding.top";
350                         target: "sw.contextual_event";
351                 }
352                 program {
353                         name: "vi_effect_start.bottom";
354                         signal: "vi_effect_start.bottom";
355                         source: "padding.bottom";
356                         action: STATE_SET "effect_start" 0.0;
357                         target: "padding.bottom";
358                 }
359                 program {
360                         name: "vi_effect_start";
361                         signal: "vi_effect_start";
362                         source: "padding.top";
363                         action: STATE_SET "effect_start" 0.0;
364                         target: "padding.top";
365                         target: "sw.contextual_event";
366                         target: "padding.bottom";
367                 }
368                 program {
369                         name: "unlock,anim,start";
370                         signal: "unlock,anim,start";
371                         source: "lockscreen";
372                         action: STATE_SET "blocked" 1.0;
373                         target: "event";
374                         after: "vi_effect_anim";
375                 }
376                 program {
377                         name: "vi_effect_anim";
378                         action: STATE_SET "effect" 0.0;
379                         target: "padding.top";
380                         target: "sw.contextual_event";
381                         target: "padding.bottom";
382                         target: "vi_clipper";
383                         transition: DECEL 0.5;
384                         after: "vi_effect_end";
385                 }
386                 program {
387                         name: "vi_effect_end";
388                         signal: "vi_effect_end";
389                         source: "vi_clipper";
390                         action: SIGNAL_EMIT "unlock,anim,end" "swipe-layout";
391                 }
392                 /* Handle battery status updates
393                 program {
394                         name: "hide,txt,battery";
395                         signal: "hide,txt,battery";
396                         source: "lockscreen";
397                         filter: "txt.battery" "default";
398                         action: STATE_SET "default_hidden" 0.0;
399                         target: "txt.battery";
400                 }
401                 program {
402                         name: "show,txt,battery";
403                         signal: "show,txt,battery";
404                         source: "lockscreen";
405                         filter: "txt.battery" "default_hidden";
406                         action: STATE_SET "default" 0.0;
407                         target: "txt.battery";
408                 }
409                 /* Handle contextual layout transformation */
410                 program {
411                         name: "contextual,events,show";
412                         signal: "contextual,events,show";
413                         source: "lockscreen";
414                         action: STATE_SET "contextual_event" 0.0;
415                         target: "txt.battery";
416                         target: "txt.time";
417                         target: "txt.date";
418                         target: "txt.timedate";
419                 }
420                 program {
421                         name: "contextual,events,hide";
422                         signal: "contextual,events,hide";
423                         source: "lockscreen";
424                         action: STATE_SET "default" 0.0;
425                         target: "txt.battery";
426                         target: "txt.time";
427                         target: "txt.date";
428                         target: "txt.timedate";
429                 }
430                 program {
431                         name: "hide,txt,plmn";
432                         signal: "hide,txt,plmn";
433                         source: "lockscreen";
434                         action: STATE_SET "hide" 0.0;
435                         target: "txt.plmn";
436                 }
437                 program {
438                         name: "show,txt,plmn";
439                         signal: "show,txt,plmn";
440                         source: "lockscreen";
441                         action: STATE_SET "default" 0.0;
442                         target: "txt.plmn";
443                 }
444                 program {
445                         name: "bounce,start";
446                         signal: "mouse,down,1";
447                         source: "event";
448                         filter: "event" "default";
449                         action: STATE_SET "effect_start" 0.0;
450                         target: "padding.top";
451                         target: "sw.contextual_event";
452                         target: "padding.bottom";
453                         target: "vi_clipper";
454                         transition: DECEL 0.2;
455                 }
456                 program {
457                         name: "bounce,end";
458                         signal: "mouse,up,1";
459                         source: "event";
460                         filter: "event" "default";
461                         action: STATE_SET "default" 0.0;
462                         target: "padding.top";
463                         target: "sw.contextual_event";
464                         target: "padding.bottom";
465                         target: "vi_clipper";
466                         transition: BOUNCE 0.6 2.5 3.0;
467                 }
468         }
469 }