Task TT-75 Implement "Main page loading UI" view
[profile/tv/apps/web/browser.git] / services / SimpleUI / edc / MainLayout.edc
1 #define URI_LENGTH 1720
2 #define URI_LENGTH_SHORT 1460
3 #define URI_WIDTH 82
4 #include "Spacer.edc"
5 #define DEBUG_RECT_OVER(over_part, r, g, b)                         \
6     part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__));   \
7                                                                     \
8 scale:1;                                                            \
9         type : RECT;                                                \
10         repeat_events: 1;                                           \
11         description {                                               \
12             state: "default" 0.0;                                   \
13             visible: 1;                                             \
14             color: r g b 255;                                 \
15             rel1 { to: over_part; relative: 0 0; }                  \
16             rel2 { to: over_part; relative: 1 1; }                  \
17         }                                                           \
18     }
19 collections {
20     group {
21         name: "main_layout";
22         images {
23             image: "web_shadow.png" COMP;
24         }
25         parts {
26             part { name: "uri_bar_bg";
27                 type : RECT;
28                 scale: 1;
29                 description { state: "default" 0.0;
30                     visible: 1;
31                     fixed: 1 1;
32                     align: 0 0;
33                     min: 1920 104;
34                     max: 1920 104;
35                     color: 255 255 255 255;
36                     rel1 { relative: 0.0 0.0; }
37                     rel2 { relative: 1.0 0.0; }
38                 }
39             }
40             ADD_SPACER_OVER("left_spacer", "uri_bar_bg", 7, 104)
41             part { name: "uri_bar_buttons_left";
42                 type : SWALLOW;
43                 scale: 1;
44                 description {
45                     state: "default" 0.0;
46                     visible: 1;
47                     align: 0 0.5;
48                     min: 246 102;
49                     max: 246 102;
50                     fixed: 1 1;
51                     rel1 { relative: 1.0 1.0; to: "left_spacer"; }
52                     rel2 { relative: 0.0 0.0; to: "left_spacer"; }
53                 }
54                 description {
55                     state: "hidden" 0.0;
56                     inherit: "default" 0.0;
57                     visible: 0;
58                 }
59                 description {
60                     state: "visible" 0.0;
61                     inherit: "default" 0.0;
62                     visible: 1;
63                 }
64             }
65             ADD_SPACER("left_buttons_spacer", "uri_bar_buttons_left", 0.5, 102)
66             part { name: "uri_entry";
67                 type : SWALLOW;
68                 scale: 1;
69                 description {
70                     state: "default" 0.0;
71                     visible: 1;
72                     align: 0.0 0.5;
73                     min: URI_LENGTH URI_WIDTH;
74                     max: URI_LENGTH URI_WIDTH;
75                     fixed: 1 1;
76                     rel1 { relative: 1.0 0.5; to: "left_spacer"; }
77                     rel2 { relative: 1.0 0.5; to: "left_spacer"; }
78                 }
79                 description {
80                     state: "moveright" 0.0;
81                     inherit: "default" 0.0;
82                     visible: 1;
83                     min: URI_LENGTH_SHORT URI_WIDTH;
84                     max: URI_LENGTH_SHORT URI_WIDTH;
85                     rel1 { relative: 1.0 0.5; to: "left_buttons_spacer"; }
86                     rel2 { relative: 1.0 0.5; to: "left_buttons_spacer"; }
87                 }
88                 description {
89                     state: "hidden" 0.0;
90                     inherit: "default" 0.0;
91                     visible: 0;
92                 }
93                 description {
94                     state: "visible" 0.0;
95                     inherit: "default" 0.0;
96                     visible: 1;
97                 }
98             }
99             ADD_SPACER("right_buttons_spacer", "uri_entry", 26, 102)
100             part { name: "uri_bar_buttons_right";
101                 type : SWALLOW;
102                 scale: 1;
103                 description {
104                     state: "default" 0.0;
105                     visible: 1;
106                     align: 0.0 0.5;
107                     min: 164 102;
108                     max: 164 102;
109                     fixed: 1 1;
110                     rel1 { relative: 1.0 0.5; to: "right_buttons_spacer"; }
111                     rel2 { relative: 1.0 0.5; to: "right_buttons_spacer"; }
112                 }
113                 description {
114                     state: "hidden" 0.0;
115                     inherit: "default" 0.0;
116                     visible: 0;
117                 }
118                 description {
119                     state: "visible" 0.0;
120                     inherit: "default" 0.0;
121                     visible: 1;
122                 }
123             }
124             ADD_SPACER("right_spacer", "uri_bar_buttons_right", 74, 102)
125             part { name: "web_view";
126                 type : SWALLOW;
127                 scale: 1;
128                 description {
129                     state: "default" 0.0;
130                     visible: 1;
131                     align: 0.0 0.0;
132                     fixed: 0 0;
133                     rel1 { relative: 0.0 1.0; to: "uri_bar_bg"; }
134                     rel2 { relative: 1.0 1.0; }
135                 }
136                 description {
137                     state: "hidden" 0.0;
138                     inherit: "default" 0.0;
139                     visible: 0;
140                 }
141                 description {
142                     state: "visible" 0.0;
143                     inherit: "default" 0.0;
144                     visible: 1;
145                 }
146              }
147              part { name: "shadow";
148                 type: IMAGE;
149                 scale: 1;
150                 repeat_events: 1;
151                 description {
152                     state: "default" 0.0;
153                     visible: 1;
154                     align: 0.0 0.0;
155                     fixed: 0 0;
156                     min: 1920 14;
157                     max: 1920 14;
158                     image.normal: "web_shadow.png";
159                     rel1 { relative: 0.0 0.0; to: "web_view"; }
160                     rel2 { relative: 1.0 1.0; }
161                 }
162              }
163              part { name: "progress_bar";
164                 type: SWALLOW;
165                 scale: 1;
166                 description {
167                     state: "default" 0.0;
168                     visible: 1;
169                     align: 0.0 0.0;
170                     fixed: 0 0;
171                     min: 1920 2;
172                     max: 1920 2;
173                     rel1 {
174                         relative: 0.0 0.0;
175                         offset: -12 -10;
176                         to: "web_view";
177                        }
178                     rel2 { relative: 1.0 1.0; }
179                 }
180              }
181              part { name: "progress_bar_light_bg";
182                  type: RECT;
183                  repeat_events: 1;
184                  description { state: "default" 0.0;
185                      fixed: 1 1;
186                      min: 0 8;
187                      max: 1920 8;
188                      align: 0 0;
189                      visible: 0;
190                      rel1.to: "web_view";
191                      rel1.relative: 0.0 0.0;
192                      rel2.relative: 1.0 0.0;
193                      color: 69 143 255 55;
194                 }
195                 description {state: "visible" 0.0;
196                     inherit: "default" 0.0;
197                     visible: 1;
198                 }
199              }
200              part{ name: "web_title_bar";
201                 type: SWALLOW;
202                 scale: 1;
203                 description { state: "default" 0.0;
204                     min: 1920 87;
205                     max: 1920 87;
206                     fixed: 1 1;
207                     align: 0 1;
208                     rel1 { to: "web_view"; relative: 0.0 1.0; }
209                     rel2 { to: "web_view"; relative: 1.0 1.0; }
210                 }
211             }
212
213
214     part {name: "popup_bg";
215         type: RECT;
216         scale: 1;
217         mouse_events: 1;
218         description {state: "default" 0.0;
219         visible: 0;
220         min: 1920 1080;
221         fixed: 1 1;
222         color: 100 100 100 128;
223         rel1 {relative: 0.0 0.0; }
224                 rel2 {relative: 1.0 1.0; }
225         }
226         description {state: "visible" 0.0;
227         inherit: "default" 0.0;
228         visible: 1;
229     }
230          part { name: "popup";
231              type: SWALLOW;
232              scale: 1;
233              description { state: "default" 0.0;
234                  visible: 0;
235                  min: 0 0;
236                  max: 700 800;
237                  align: 0.5 0.5;
238                  rel1 { relative: 0.0 0.0; to: "web_view";}
239                  rel2 { relative: 1.0 1.0; to: "web_view";}
240                  fixed: 1 1;
241              }
242              description { state: "visible" 0.0;
243                  inherit: "default" 0.0;
244                  visible: 1;
245                  max: 1920 1080;
246              }
247          }
248     }
249 }
250     programs {
251     program { name: "shiftright_uribar";
252         signal: "shiftright_uri";
253         source: "ui";
254         action: STATE_SET "moveright" 0.0;
255         target: "uri_entry";
256     }
257     program { name: "shiftback_uribar";
258         signal: "shiftback_uri";
259         source: "ui";
260         action: STATE_SET "default" 0.0;
261         target: "uri_entry";
262     }
263     program { name: "hide_progress";
264         signal: "hide_progressbar_bg";
265         source: "ui";
266         action: STATE_SET "default" 0.0;
267         target: "progress_bar_light_bg";
268     }
269     program { name: "show_progress";
270         signal: "show_progressbar_bg";
271         source: "ui";
272         action: STATE_SET "visible" 0.0;
273         target: "progress_bar_light_bg";
274     }
275     program {name: "show_popup";
276     signal: "elm,state,show"; source: "elm";
277     action: STATE_SET "visible" 0.0;
278     transition: LINEAR 0.0;
279     target: "popup";
280     target: "popup_bg";
281         }
282     program {name: "hide_popup";
283     signal: "elm,state,hide"; source: "elm";
284     action: STATE_SET "default" 0.0;
285     transition: LINEAR 0.0;
286     target: "popup";
287     target: "popup_bg";
288         }
289     }
290 }
291 }