f913e3492cdcb48f70a3b2ef163ceff7c10216c3
[profile/ivi/efl-theme-tizen.git] / themes / widgets / conformant.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18
19
20 /////////////////////////////////////////////////////////////////////////////
21  group { name: "elm/conformant/base/default";
22      script {
23         public indicator_visible = 0;     //Indicator visible check
24         public indicator_opacity = 0;     //0=opaque, 1=translucent, 2=transparent
25      }
26      parts {
27         part { name: "elm.swallow.bg";
28            type: SWALLOW;
29            scale: 1;
30            description { state: "default" 0.0;
31            }
32         }
33         part { name: "elm.swallow.content";
34            type: SWALLOW;
35            scale: 1;
36            description { state: "default" 0.0;
37               align: 0.5 0.5;
38               rel1.relative: 0.0 1.0;
39               rel1.to: "elm.swallow.indicator";
40               rel2.relative: 1.0 0.0;
41               rel2.to: "elm.swallow.clipboard";
42            }
43            description { state: "disable_clipboard" 0.0;
44               inherit: "default" 0.0;
45               align: 0.5 0.5;
46               rel1.relative: 0.0 1.0;
47               rel1.to: "elm.swallow.indicator";
48               rel2.relative: 1.0 0.0;
49               rel2.to: "elm.swallow.virtualkeypad";
50            }
51         }
52         part { name: "elm.swallow.ug";
53            type: SWALLOW;
54            scale: 1;
55            description { state: "default" 0.0;
56               align: 0.5 0.5;
57               rel1.relative: 0.0 1.0;
58               rel1.to: "elm.swallow.indicator";
59               rel2.relative: 1.0 0.0;
60               rel2.to: "elm.swallow.clipboard";
61            }
62            description { state: "overlap" 0.0;
63               inherit: "default" 0.0;
64               align: 0.5 0.5;
65               rel1.relative: 0.0 0.0;
66               rel1.to: "elm.swallow.indicator";
67               rel2.relative: 1.0 0.0;
68               rel2.to: "elm.swallow.clipboard";
69            }
70         }
71         part { name: "indicator_bg";
72            type: RECT;
73            scale: 1;
74            description { state: "default" 0.0;
75               fixed: 0 1;
76               align: 0.5 0.0;
77               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
78               rel2.relative: 1.0 0.0;
79               visible: 1;
80               color: CONFORMANT_INDICATOR_BG_DEFAULT_COLOR_INC;
81            }
82            description { state: "translucent" 0.0;
83               fixed: 0 1;
84               align: 0.5 0.0;
85               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
86               rel2.relative: 1.0 0.0;
87               visible: 1;
88               color: CONFORMANT_INDICATOR_BG_TRANSLUCENT_COLOR_INC;
89            }
90            description { state: "transparent" 0.0;
91               fixed: 0 1;
92               align: 0.5 0.0;
93               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
94               rel2.relative: 1.0 0.0;
95               visible: 1;
96               color: CONFORMANT_INDICATOR_BG_TRANSPARENT_COLOR_INC;
97            }
98             description { state: "hide" 0.0;
99               inherit: "default" 0.0;
100               visible: 0;
101               min: 0 0;
102            }
103         }
104         part { name: "elm.swallow.indicator";
105            type: SWALLOW;
106            scale: 1;
107            description { state: "default" 0.0;
108               fixed: 0 1;
109               align: 0.5 0.0;
110               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
111               rel2.relative: 1.0 0.0;
112               visible: 1;
113            }
114             description { state: "hide" 0.0;
115               inherit: "default" 0.0;
116               visible: 0;
117               min: 0 0;
118            }
119         }
120         part { name: "access"; type: RECT;
121            repeat_events: 1;
122            description { state: "default" 0.0;
123              fixed: 1 1;
124              rel1 { relative: 0.9 0.0; to: "elm.swallow.indicator"; }
125              rel2 { relative: 1.0 1.0; to: "elm.swallow.indicator"; }
126              color: 0 0 0 0;
127              visible: 0;
128            }
129            description { state: "visible" 0.0;
130               inherit: "default" 0.0;
131               visible: 1;
132            }
133         }
134         part { name: "elm.swallow.clipboard";
135            type: SWALLOW;
136            description { state: "default" 0.0;
137               fixed: 0 1;
138               align: 0.0 1.0;
139               rel1.relative: 0.0 0.0;
140               rel1.to_y: "elm.swallow.virtualkeypad";
141               rel2.relative: 1.0 0.0;
142               rel2.to_y: "elm.swallow.virtualkeypad";
143            }
144         }
145         part { name: "elm.swallow.virtualkeypad";
146            type: SWALLOW;
147            description { state: "default" 0.0;
148               fixed: 0 1;
149               align: 0.0 1.0;
150               rel1.relative: 0.0 1.0;
151            }
152         }
153      }
154      programs {
155         program {
156             name: "show_indicator";
157             signal: "elm,state,indicator,show";
158             source: "elm";
159             script {
160                set_int(indicator_visible, 1);
161                set_state(PART:"elm.swallow.indicator", "default", 0.0);
162                if (get_int(indicator_opacity) == 0)
163                   set_state(PART:"indicator_bg", "opaque", 0.0);
164                if (get_int(indicator_opacity) == 1)
165                   set_state(PART:"indicator_bg", "translucent", 0.0);
166                if (get_int(indicator_opacity) == 2)
167                   set_state(PART:"indicator_bg", "transparent", 0.0);
168             }
169         }
170         program {
171             name: "hide_indicator";
172             signal: "elm,state,indicator,hide";
173             source: "elm";
174             script {
175                set_int(indicator_visible, 0);
176                set_state(PART:"elm.swallow.indicator", "hide", 0.0);
177                set_state(PART:"indicator_bg", "hide", 0.0);
178             }
179         }
180         program {
181             name: "opaque_indicator";
182             signal: "elm,state,indicator,opaque";
183             source: "elm";
184             script {
185                set_int(indicator_opacity, 0);
186                if (get_int(indicator_visible) == 1)
187                   set_state(PART:"indicator_bg", "opaque", 0.0);
188             }
189         }
190         program {
191             name: "translucent_indicator";
192             signal: "elm,state,indicator,translucent";
193             source: "elm";
194             script {
195                set_int(indicator_opacity, 1);
196                if (get_int(indicator_visible) == 1)
197                   set_state(PART:"indicator_bg", "translucent", 0.0);
198             }
199         }
200         program {
201             name: "transparent_indicator";
202             signal: "elm,state,indicator,transparent";
203             source: "elm";
204             script {
205                set_int(indicator_opacity, 2);
206                if (get_int(indicator_visible) == 1)
207                   set_state(PART:"indicator_bg", "transparent", 0.0);
208             }
209         }
210         program {
211             name: "overlap_indicator";
212             signal: "elm,state,indicator,overlap";
213             source: "";
214             script {
215                set_state(PART:"elm.swallow.ug", "overlap", 0.0);
216             }
217         }
218         program {
219             name: "nooverlap_indicator";
220             signal: "elm,state,indicator,nooverlap";
221             source: "";
222             script {
223                set_state(PART:"elm.swallow.ug", "default", 0.0);
224             }
225         }
226          program { name: "access_on";
227             signal: "elm,state,access,on";
228             source: "elm";
229             action: STATE_SET "visible" 0.0;
230             target: "access";
231          }
232          program { name: "access_off";
233             signal: "elm,state,access,off";
234             source: "elm";
235             action: STATE_SET "default" 0.0;
236             target: "access";
237          }
238          program { name: "enable_clipboard";
239             signal: "elm,state,clipboard,enable";
240             source: "";
241             action: STATE_SET "default" 0.0;
242             target: "elm.swallow.content";
243          }
244          program { name: "disable_clipboard";
245             signal: "elm,state,clipboard,disable";
246             source: "";
247             action: STATE_SET "disable_clipboard" 0.0;
248             target: "elm.swallow.content";
249          }
250      }
251   }
252  group { name: "elm/conformant/base/indicator_overlap";
253      script {
254         public indicator_visible = 0;     //Indicator visible check
255         public indicator_opacity = 0;     //0=opaque, 1=translucent, 2=transparent
256      }
257      parts {
258         part { name: "elm.swallow.bg";
259            type: SWALLOW;
260            scale: 1;
261            description { state: "default" 0.0;
262            }
263         }
264         part { name: "elm.swallow.content";
265            type: SWALLOW;
266            scale: 1;
267            description { state: "default" 0.0;
268               align: 0.5 0.5;
269               rel2.relative: 1.0 0.0;
270               rel2.to: "elm.swallow.clipboard";
271            }
272         }
273         part { name: "elm.swallow.ug";
274            type: SWALLOW;
275            scale: 1;
276            description { state: "default" 0.0;
277               align: 0.5 0.5;
278               rel1.relative: 0.0 1.0;
279               rel1.to: "elm.swallow.indicator";
280               rel2.relative: 1.0 0.0;
281               rel2.to: "elm.swallow.clipboard";
282            }
283         }
284         part { name: "indicator_bg";
285            type: RECT;
286            scale: 1;
287            description { state: "default" 0.0;
288               fixed: 0 1;
289               align: 0.5 0.0;
290               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
291               rel2.relative: 1.0 0.0;
292               visible: 1;
293               color: CONFORMANT_INDICATOR_BG_DEFAULT_COLOR_INC;
294            }
295            description { state: "translucent" 0.0;
296               fixed: 0 1;
297               align: 0.5 0.0;
298               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
299               rel2.relative: 1.0 0.0;
300               visible: 1;
301               color: CONFORMANT_INDICATOR_BG_TRANSLUCENT_COLOR_INC;
302            }
303            description { state: "transparent" 0.0;
304               fixed: 0 1;
305               align: 0.5 0.0;
306               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
307               rel2.relative: 1.0 0.0;
308               visible: 1;
309               color: CONFORMANT_INDICATOR_BG_TRANSPARENT_COLOR_INC;
310            }
311             description { state: "hide" 0.0;
312               inherit: "default" 0.0;
313               visible: 0;
314               min: 0 0;
315            }
316         }
317         part { name: "elm.swallow.indicator";
318            type: SWALLOW;
319            scale: 1;
320            description { state: "default" 0.0;
321               fixed: 0 1;
322               align: 0.5 0.0;
323               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
324               rel2.relative: 1.0 0.0;
325               visible: 1;
326            }
327             description { state: "hide" 0.0;
328               inherit: "default" 0.0;
329               visible: 0;
330               min: 0 0;
331            }
332         }
333         part { name: "elm.swallow.clipboard";
334            type: SWALLOW;
335            description { state: "default" 0.0;
336               fixed: 0 1;
337               align: 0.0 1.0;
338               rel1.relative: 0.0 0.0;
339               rel1.to_y: "elm.swallow.virtualkeypad";
340               rel2.relative: 1.0 0.0;
341               rel2.to_y: "elm.swallow.virtualkeypad";
342            }
343         }
344         part { name: "elm.swallow.virtualkeypad";
345            type: SWALLOW;
346            description { state: "default" 0.0;
347               fixed: 0 1;
348               align: 0.0 1.0;
349               rel1.relative: 0.0 1.0;
350            }
351         }
352      }
353      programs {
354         program {
355             name: "show_indicator";
356             signal: "elm,state,indicator,show";
357             source: "elm";
358             script {
359                set_int(indicator_visible, 1);
360                set_state(PART:"elm.swallow.indicator", "default", 0.0);
361                if (get_int(indicator_opacity) == 0)
362                   set_state(PART:"indicator_bg", "opaque", 0.0);
363                if (get_int(indicator_opacity) == 1)
364                   set_state(PART:"indicator_bg", "translucent", 0.0);
365                if (get_int(indicator_opacity) == 2)
366                   set_state(PART:"indicator_bg", "transparent", 0.0);
367             }
368         }
369         program {
370             name: "hide_indicator";
371             signal: "elm,state,indicator,hide";
372             source: "elm";
373             script {
374                set_int(indicator_visible, 0);
375                set_state(PART:"elm.swallow.indicator", "hide", 0.0);
376                set_state(PART:"indicator_bg", "hide", 0.0);
377             }
378         }
379         program {
380             name: "opaque_indicator";
381             signal: "elm,state,indicator,opaque";
382             source: "elm";
383             script {
384                set_int(indicator_opacity, 0);
385                if (get_int(indicator_visible) == 1)
386                   set_state(PART:"indicator_bg", "opaque", 0.0);
387             }
388         }
389         program {
390             name: "translucent_indicator";
391             signal: "elm,state,indicator,translucent";
392             source: "elm";
393             script {
394                set_int(indicator_opacity, 1);
395                if (get_int(indicator_visible) == 1)
396                   set_state(PART:"indicator_bg", "translucent", 0.0);
397             }
398         }
399         program {
400             name: "transparent_indicator";
401             signal: "elm,state,indicator,transparent";
402             source: "elm";
403             script {
404                set_int(indicator_opacity, 2);
405                if (get_int(indicator_visible) == 1)
406                   set_state(PART:"indicator_bg", "transparent", 0.0);
407             }
408         }
409      }
410   }
411
412   group { name: "elm/conformant/base/nokeypad";
413      script {
414         public indicator_visible = 0;     //Indicator visible check
415         public indicator_opacity = 0;     //0=opaque, 1=translucent, 2=transparent
416      }
417      parts {
418         part { name: "elm.swallow.bg";
419            type: SWALLOW;
420            scale: 1;
421            description { state: "default" 0.0;
422            }
423         }
424         part { name: "elm.swallow.content";
425            type: SWALLOW;
426            scale: 1;
427            description { state: "default" 0.0;
428               align: 0.5 0.5;
429               rel1.relative: 0.0 1.0;
430               rel1.to: "elm.swallow.indicator";
431            }
432         }
433         part { name: "elm.swallow.ug";
434            type: SWALLOW;
435            scale: 1;
436            description { state: "default" 0.0;
437               align: 0.5 0.5;
438               rel1.relative: 0.0 1.0;
439               rel1.to: "elm.swallow.indicator";
440            }
441         }
442         part { name: "indicator_bg";
443            type: RECT;
444            scale: 1;
445            description { state: "default" 0.0;
446               fixed: 0 1;
447               align: 0.5 0.0;
448               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
449               rel2.relative: 1.0 0.0;
450               visible: 1;
451               color: CONFORMANT_INDICATOR_BG_DEFAULT_COLOR_INC;
452            }
453            description { state: "translucent" 0.0;
454               fixed: 0 1;
455               align: 0.5 0.0;
456               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
457               rel2.relative: 1.0 0.0;
458               visible: 1;
459               color: CONFORMANT_INDICATOR_BG_TRANSLUCENT_COLOR_INC;
460            }
461            description { state: "transparent" 0.0;
462               fixed: 0 1;
463               align: 0.5 0.0;
464               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
465               rel2.relative: 1.0 0.0;
466               visible: 1;
467               color: CONFORMANT_INDICATOR_BG_TRANSPARENT_COLOR_INC;
468            }
469             description { state: "hide" 0.0;
470               inherit: "default" 0.0;
471               visible: 0;
472               min: 0 0;
473            }
474         }
475         part { name: "elm.swallow.indicator";
476            type: SWALLOW;
477            scale: 1;
478            description { state: "default" 0.0;
479               fixed: 0 1;
480               align: 0.5 0.0;
481               min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
482               rel2.relative: 1.0 0.0;
483               visible: 1;
484            }
485             description { state: "hide" 0.0;
486               inherit: "default" 0.0;
487               visible: 0;
488               min: 0 0;
489            }
490         }
491      }
492      programs {
493         program {
494             name: "show_indicator";
495             signal: "elm,state,indicator,show";
496             source: "elm";
497             script {
498                set_int(indicator_visible, 1);
499                set_state(PART:"elm.swallow.indicator", "default", 0.0);
500                if (get_int(indicator_opacity) == 0)
501                   set_state(PART:"indicator_bg", "opaque", 0.0);
502                if (get_int(indicator_opacity) == 1)
503                   set_state(PART:"indicator_bg", "translucent", 0.0);
504                if (get_int(indicator_opacity) == 2)
505                   set_state(PART:"indicator_bg", "transparent", 0.0);
506             }
507         }
508         program {
509             name: "hide_indicator";
510             signal: "elm,state,indicator,hide";
511             source: "elm";
512             script {
513                set_int(indicator_visible, 0);
514                set_state(PART:"elm.swallow.indicator", "hide", 0.0);
515                set_state(PART:"indicator_bg", "hide", 0.0);
516             }
517         }
518         program {
519             name: "opaque_indicator";
520             signal: "elm,state,indicator,opaque";
521             source: "elm";
522             script {
523                set_int(indicator_opacity, 0);
524                if (get_int(indicator_visible) == 1)
525                   set_state(PART:"indicator_bg", "opaque", 0.0);
526             }
527         }
528         program {
529             name: "translucent_indicator";
530             signal: "elm,state,indicator,translucent";
531             source: "elm";
532             script {
533                set_int(indicator_opacity, 1);
534                if (get_int(indicator_visible) == 1)
535                   set_state(PART:"indicator_bg", "translucent", 0.0);
536             }
537         }
538         program {
539             name: "transparent_indicator";
540             signal: "elm,state,indicator,transparent";
541             source: "elm";
542             script {
543                set_int(indicator_opacity, 2);
544                if (get_int(indicator_visible) == 1)
545                   set_state(PART:"indicator_bg", "transparent", 0.0);
546             }
547         }
548      }
549   }