[Title] Initial upload the browser for tizen 2.0
[profile/ivi/org.tizen.browser.git] / edc / browser-define.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
18 #include "browser-macro.edc"
19
20 /* define of buttons & icons */
21
22 collections {
23         group {
24                 name: "elm/icon/browser_control_bar_multi_window/default";
25                 min: 56 56;
26                 images.image: "icon/I01_title_icon_multiview.png" COMP;
27                 images.image: "icon/I01_title_icon_multiview_press.png" COMP;
28                 parts {
29                         part {
30                                 name: "base";
31                                 scale: 1;
32                                 description {
33                                         state: "default" 0.0;
34                                         min: 56 56;
35                                         max: 56 56;
36                                         fixed: 1 1;
37                                         aspect: 1.0 1.0;
38                                         aspect_preference: BOTH;
39                                         image.normal: "icon/I01_title_icon_multiview.png";
40                                 }
41                                 description {
42                                         state: "pressed" 0.0;
43                                         min: 56 56;
44                                         max: 56 56;
45                                         fixed: 1 1;
46                                         aspect: 1.0 1.0;
47                                         aspect_preference: BOTH;
48                                         image.normal: "icon/I01_title_icon_multiview_press.png";
49                                 }
50                         }
51                  part { name: "elm.text";
52                     type: TEXT;
53                     mouse_events:  0;
54                     scale: 1;
55                     description { state: "default" 0.0;
56                        visible: 0;
57                        rel1 { relative: 0.0 0.0; to: "base"; }
58                        rel2 { relative: 1.0 1.0; to: "base"; }
59                        align: 0.4 0.5;
60                        color: 57 57 57 255;
61                        text {
62                           font: "SLP:style=Medium";
63                           size: 25;
64                           min:  0 0;
65                           align: 0.5 0.4;
66                           max: 1 0;
67                        }
68                     }
69                     description { state: "1" 0.0;
70                        inherit: "default" 0.0;
71                        visible: 1;
72                        text {
73                           font: "SLP:style=Medium";
74                           size: 25;
75                           text: "1";
76                           min:  0 0;
77                           align: 0.5 0.4;
78                           max: 1 0;
79                        }
80                     }
81                     description { state: "2" 0.0;
82                        inherit: "default" 0.0;
83                        visible: 1;
84                        text {
85                           font: "SLP:style=Medium";
86                           size: 25;
87                           text: "2";
88                           min:  0 0;
89                           align: 0.5 0.4;
90                           max: 1 0;
91                        }
92                     }
93                     description { state: "3" 0.0;
94                        inherit: "default" 0.0;
95                        visible: 1;
96                        text {
97                           font: "SLP:style=Medium";
98                           size: 25;
99                           text: "3";
100                           min:  0 0;
101                           align: 0.5 0.4;
102                           max: 1 0;
103                        }
104                     }
105                     description { state: "4" 0.0;
106                        inherit: "default" 0.0;
107                        visible: 1;
108                        text {
109                           font: "SLP:style=Medium";
110                           size: 25;
111                           text: "4";
112                           min:  0 0;
113                           align: 0.5 0.4;
114                           max: 1 0;
115                        }
116                     }
117                     description { state: "5" 0.0;
118                        inherit: "default" 0.0;
119                        visible: 1;
120                        text {
121                           font: "SLP:style=Medium";
122                           size: 25;
123                           text: "5";
124                           min:  0 0;
125                           align: 0.5 0.4;
126                           max: 1 0;
127                        }
128                     }
129                     description { state: "6" 0.0;
130                        inherit: "default" 0.0;
131                        visible: 1;
132                        text {
133                           font: "SLP:style=Medium";
134                           size: 25;
135                           text: "6";
136                           min:  0 0;
137                           align: 0.5 0.4;
138                           max: 1 0;
139                        }
140                     }
141                     description { state: "7" 0.0;
142                        inherit: "default" 0.0;
143                        visible: 1;
144                        text {
145                           font: "SLP:style=Medium";
146                           size: 25;
147                           text: "7";
148                           min:  0 0;
149                           align: 0.5 0.4;
150                           max: 1 0;
151                        }
152                     }
153                     description { state: "8" 0.0;
154                        inherit: "default" 0.0;
155                        visible: 1;
156                        text {
157                           font: "SLP:style=Medium";
158                           size: 25;
159                           text: "8";
160                           min:  0 0;
161                           align: 0.5 0.4;
162                           max: 1 0;
163                        }
164                     }
165                     description { state: "9" 0.0;
166                        inherit: "default" 0.0;
167                        visible: 1;
168                        text {
169                           font: "SLP:style=Medium";
170                           size: 25;
171                           text: "9";
172                           min:  0 0;
173                           align: 0.5 0.4;
174                           max: 1 0;
175                        }
176                     }
177                  }
178                         programs {
179                                 program { name: "hide,multi_window_text";
180                                         signal: "hide,multi_window_text,signal";
181                                         action: STATE_SET "default" 0.0;
182                                         target: "elm.text";
183                                 }
184                                 program { name: "show,multi_window_1";
185                                         signal: "show,multi_window_1,signal";
186                                         action: STATE_SET "1" 0.0;
187                                         target: "elm.text";
188                                 }
189                                 program { name: "show,multi_window_2";
190                                         signal: "show,multi_window_2,signal";
191                                         action: STATE_SET "2" 0.0;
192                                         target: "elm.text";
193                                 }
194                                 program { name: "show,multi_window_3";
195                                         signal: "show,multi_window_3,signal";
196                                         action: STATE_SET "3" 0.0;
197                                         target: "elm.text";
198                                 }
199                                 program { name: "show,multi_window_4";
200                                         signal: "show,multi_window_4,signal";
201                                         action: STATE_SET "4" 0.0;
202                                         target: "elm.text";
203                                 }
204                                 program { name: "show,multi_window_5";
205                                         signal: "show,multi_window_5,signal";
206                                         action: STATE_SET "5" 0.0;
207                                         target: "elm.text";
208                                 }
209                                 program { name: "show,multi_window_6";
210                                         signal: "show,multi_window_6,signal";
211                                         action: STATE_SET "6" 0.0;
212                                         target: "elm.text";
213                                 }
214                                 program { name: "show,multi_window_7";
215                                         signal: "show,multi_window_7,signal";
216                                         action: STATE_SET "7" 0.0;
217                                         target: "elm.text";
218                                 }
219                                 program { name: "show,multi_window_8";
220                                         signal: "show,multi_window_8,signal";
221                                         action: STATE_SET "8" 0.0;
222                                         target: "elm.text";
223                                 }
224                                 program { name: "show,multi_window_9";
225                                         signal: "show,multi_window_9,signal";
226                                         action: STATE_SET "9" 0.0;
227                                         target: "elm.text";
228                                 }
229                                 program { name: "multi_window,pressed";
230                                         signal: "mouse,down,1";
231                                         source: "base";
232                                         action: STATE_SET "pressed" 0.0;
233                                         target: "base";
234                                 }
235                                 program { name: "multi_window,default";
236                                         signal: "mouse,up,1";
237                                         source: "base";
238                                         action: STATE_SET "default" 0.0;
239                                         target: "base";
240                                 }
241                         }
242                 }
243         }
244
245 BUTTON_WITH_BG(title_back, "icon/I01_title_btn.png",
246                 "icon/I01_title_btn_press.png", "icon/I01_btn_back.png", "icon/I01_btn_back.png", 6, 6, 6, 6, 124, 74, 56, 56);
247
248 BUTTON_WITH_BG(bookmark_controlbar_back, "icon/I01_Back_btn_normal.png",
249                 "icon/I01_Back_btn_press.png", "icon/I01_btn_back.png", "icon/I01_btn_back.png", 7, 7, 7, 7, 112, 82, 56, 56);
250
251 BUTTON_WITH_BG(browser_view_controlbar_back, "icon/I01_title_btn.png",
252                 "icon/I01_title_btn_press.png", "icon/I01_btn_back.png", "icon/I01_btn_back.png", 6, 6, 6, 6, 112, 82, 56, 56);
253
254 BUTTON_WITH_BG(most_visited_sites_setting, "icon/I01_picker_btn_normal.png",
255                 "icon/I01_picker_btn_press.png", "icon/I01_icon_setting.png", "icon/I01_icon_setting.png", 6, 6, 6, 6, 144, 60, 42, 42);
256
257 BUTTON(most_visited_sites_done, "icon/I01_picker_btn_normal.png",
258                 "icon/I01_picker_btn_press.png", 6, 6, 6, 6);
259
260 BUTTON_WITH_BG(find_word_prev, "icon/I01_btn_normal.png",
261                 "icon/I01_btn_press.png", "icon/I01_picker_arrow_left.png", "icon/I01_picker_arrow_left.png", 0, 0, 0, 0, 64, 64, 64, 64);
262
263 BUTTON_WITH_BG(find_word_next, "icon/I01_btn_normal.png",
264                 "icon/I01_btn_press.png", "icon/I01_picker_arrow_right.png", "icon/I01_picker_arrow_right.png", 0, 0, 0, 0, 64, 64, 64, 64);
265
266 FIND_BUTTON_WITH_BG(find_word_prev_but, "icon/I01_btn_normal.png",
267                 "icon/I01_btn_press.png", "icon/I01_picker_arrow_left.png", "icon/I01_btn_dim.png",  0, 0, 0, 0, 64, 64, 64, 64);
268
269 FIND_BUTTON_WITH_BG(find_word_next_but, "icon/I01_btn_normal.png",
270                 "icon/I01_btn_press.png", "icon/I01_picker_arrow_right.png", "icon/I01_btn_dim.png",  0, 0, 0, 0, 64, 64, 64, 64);
271
272 BUTTON_WITH_BG(reader_icon, "icon/I01_title_btn.png",
273                 "icon/I01_title_btn_press.png", "icon/I01_fit_screen.png", "icon/I01_fit_screen.png", 7, 7, 7, 7, 74, 64, 74, 64);
274
275 TITLE_BUTTON(title_button, "icon/I01_title_btn_blue.png",
276                 "icon/I01_title_btn_blue_press.png", 6, 6, 6, 6);
277
278 TITLE_BUTTON(cancel_button, "icon/I01_title_btn.png",
279                 "icon/I01_title_btn_press.png", 7, 7, 7, 7);
280
281 BUTTON_WITH_TEXT(multi_window_cancel_button, "icon/I01_title_btn.png",
282                 "icon/I01_title_btn_press.png", 6, 6, 6, 6, 112, 82);
283
284 BUTTON_WITH_BG(backward, "icon/I01_title_btn.png",
285                 "icon/I01_title_btn_press.png", "icon/I01_title_btn_icon_previous.png", "icon/I01_title_btn_icon_previous_disable.png", 7, 7, 7, 7, 78, 66, 42, 42);
286 BUTTON_WITH_BG(forward, "icon/I01_title_btn.png",
287                 "icon/I01_title_btn_press.png", "icon/I01_title_btn_icon_next.png", "icon/I01_title_btn_icon_next_disable.png", 7, 7, 7, 7, 78, 66, 42, 42);
288
289 BUTTON(ok_button, "browser-view-images/most-visited-sites/I01_button_popup_normal.png",
290                 "browser-view-images/most-visited-sites/I01_button_popup_press.png", 4, 4, 4, 4);
291
292 /* ifdef ZOOM_BUTTON */
293 ZOOM_BUTTON(zoom_out, "browser-view-images/00_zoom_out.png",
294                 "browser-view-images/00_zoom_out_press.png", "browser-view-images/00_zoom_out_disable.png", 0, 0, 0, 0);
295 ZOOM_BUTTON(zoom_in, "browser-view-images/00_zoom_in.png",
296                 "browser-view-images/00_zoom_in_press.png", "browser-view-images/00_zoom_in_disable.png", 0, 0, 0, 0);
297 /* endif ZOOM_BUTTON */
298
299 #define BUTTON_STATE_ENABLED  0
300 #define BUTTON_STATE_DISABLED 1
301         group { name: "elm/button/base/browser/navigationbar_control/button";
302       script {
303          public button_state = BUTTON_STATE_ENABLED;
304       }
305       images.image: "icon/I01_Option_header_bt.png" COMP;
306       images.image: "icon/I01_Option_header_bt_dim.png" COMP;
307       images.image: "icon/I01_Option_header_bt_press.png" COMP;
308       parts {
309          part { name: "button_image";
310             type: IMAGE;
311             mouse_events: 1;
312             scale: 1;
313             description { state: "default" 0.0;
314                min: 30 75;
315                color: 0 0 0 0;
316                rel1.offset: 7 12;
317                rel2.offset: -9 -4;
318                image.normal: "icon/I01_Option_header_bt.png";
319                image.border: 4 4 4 4;
320                color: 255 255 255 255;
321             }
322             description { state: "disabled" 0.0;
323                inherit: "default" 0.0;
324                image.normal: "icon/I01_Option_header_bt_dim.png";
325             }
326             description { state: "clicked" 0.0;
327                inherit: "default" 0.0;
328                image.normal: "icon/I01_Option_header_bt_press.png";
329             }
330          }
331          part {
332             name: "padding_left_top";
333             type: RECT;
334             scale: 1;
335             mouse_events: 0;
336             description { state: "default" 0.0;
337                align: 0.0 0.0;
338                rel1.relative: 0.0 0.0;
339                rel2.relative: 0.0 0.0;
340                min: 15 7;
341                fixed: 1 1;
342                visible: 0;
343             }
344          }
345          part {
346             name: "padding_right_bottom";
347             type: RECT;
348             scale: 1;
349             mouse_events: 0;
350             description { state: "default" 0.0;
351                align: 1.0 1.0;
352                rel1.relative: 1.0 1.0;
353                rel2.relative: 1.0 1.0;
354                min: 15 7;
355                fixed: 1 1;
356                visible: 0;
357             }
358          }
359          part {
360             name: "icon_rect";
361             type: RECT;
362             scale: 1;
363             mouse_events: 0;
364             description { state: "default" 0.0;
365                visible: 1;
366                min: 0 0;
367                fixed: 1 0;
368                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
369                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
370                align: 0.0 0.5;
371                color: 0 0 0 0;
372             }
373             description { state: "visible" 0.0;
374                visible: 1;
375                min: 33 33;
376                fixed: 1 0;
377                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
378                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
379                align: 0.0 0.5;
380                color: 0 0 0 0;
381             }
382             description { state: "icononly" 0.0;
383                inherit: "default" 0.0;
384             }
385          }
386          part {
387             name: "padding_after_icon";
388             type: RECT;
389             scale: 1;
390             mouse_events: 0;
391             description { state: "default" 0.0; //when only icon or no icon is there
392                align: 0.0 0.0;
393                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
394                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
395                fixed: 1 0;
396                min: 0 0;
397                color: 0 0 0 0;
398             }
399             description { state: "visible" 0.0;
400                visible: 1;
401                align: 0.0 0.0;
402                rel1 { relative: 1.0 0.0; to: "icon_rect"; }
403                rel2 { relative: 1.0 1.0; to: "icon_rect"; }
404                fixed: 1 0;
405                min: 9 0;
406                color: 0 0 0 0;
407             }
408             description { state: "icononly" 0.0;
409                inherit: "default" 0.0;
410             }
411          }
412          part {
413             name: "padding_before_text";
414             type: RECT;
415             scale: 1;
416             mouse_events: 0;
417             description { state: "default" 0.0; //when only icon or no icon is there
418                align: 1.0 0.5;
419                rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
420                rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
421                fixed: 1 0;
422                min: 9 0;
423                color: 0 0 0 0;
424             }
425          }
426          part { name: "elm.swallow.content";
427             type: SWALLOW;
428             scale: 1;
429             clip_to: "disabler";
430             description { state: "default" 0.0;
431                visible: 0;
432                align: 0.0 0.5;
433                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
434                rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
435                fixed: 1 0;
436             }
437             description { state: "visible" 0.0;
438                fixed: 1 0;
439                visible: 1;
440                min: 33 33;
441                max: 33 33;
442                align: 1.0 0.5;
443                rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
444                rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
445                aspect: 1.0 1.0;
446                aspect_preference: VERTICAL;
447             }
448             description { state: "icononly" 0.0;
449                visible: 1;
450                min: 45 45;
451                max: 45 45;
452                rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
453                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
454                align: 0.5 0.5;
455                aspect: 1.0 1.0;
456                aspect_preference: VERTICAL;
457             }
458          }
459          part { name: "elm.text";
460             type: TEXT;
461             mouse_events:  0;
462             scale: 1;
463             clip_to: "disabler";
464             description { state: "default" 0.0;
465                visible: 0;
466                rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
467                rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
468                align: 0.5 0.5;
469                color: 255 255 255 255;
470                text {
471                   font: "SLP:style=Medium";
472                   size: 30;
473                   min:  0 0;
474                   align: 0.5 0.6;
475                   max: 1 0;
476                }
477             }
478             description { state: "visible" 0.0;
479                inherit: "default" 0.0;
480                visible: 1;
481             }
482             description { state: "clicked" 0.0;
483                inherit: "default" 0.0;
484                visible: 1;
485                min: 0 0;
486                color2: 0 0 0 102;
487             }
488             description { state: "focused" 0.0;
489                inherit: "default" 0.0;
490                visible: 1;
491                min: 0 0;
492                color: 255 255 255 255;
493                color2: 0 0 0 102;
494             }
495          }
496          part { name: "over2";
497             type: RECT;
498             mouse_events: 1;
499             repeat_events: 1;
500             ignore_flags: ON_HOLD;
501             description { state: "default" 0.0;
502                color: 0 0 0 0;
503             }
504             description { state: "disabled" 0.0;
505                inherit:  "default" 0.0;
506                visible: 0;
507             }
508          }
509          part { name: "over3";
510             type: RECT;
511             mouse_events: 1;
512             repeat_events: 1;
513             description { state: "default" 0.0;
514                color: 0 0 0 0;
515             }
516             description { state: "clicked" 0.0;
517                inherit:  "default" 0.0;
518                visible: 1;
519             }
520          }
521          part { name: "disabler";
522             type: RECT;
523             description { state: "default" 0.0;
524                color: 255 255 255 255;
525             }
526             description { state: "disabled" 0.0;
527                color: 255 255 255 127;
528             }
529          }
530       }
531       programs {
532          program { name: "button_click";
533             signal: "mouse,down,1";
534             source: "over2";
535             action: SIGNAL_EMIT "elm,action,press" "";
536             after: "button_click_anim";
537          }
538          program { name: "button_click_anim";
539             action: STATE_SET "clicked" 0.0;
540             target: "button_image";
541             after: "text_clicked";
542          }
543          program { name: "text_clicked";
544             script {
545                new st[31];
546                new Float:vl;
547                get_state(PART:"elm.text", st, 30, vl);
548                if (!strcmp(st, "visible"))
549                   set_state(PART:"elm.text", "clicked", 0.0);
550             }
551          }
552          program { name: "button_unpress";
553             action: SIGNAL_EMIT "elm,action,unpress" "";
554          }
555          program { name: "button_mouseout_clicked";
556             signal: "mouse,up,1";
557             source: "over3";
558             script {
559                new st[31];
560                new Float:vl;
561                get_state(PART:"elm.swallow.content", st, 30, vl);
562                if (strcmp(st, "icononly"))
563                  {
564                     emit("elm,action,default,text,set", "");
565                     set_state(PART:"elm.text", "visible", 0.0);
566                  }
567                if(get_int(button_state) != BUTTON_STATE_DISABLED)
568                   set_state(PART:"button_image", "default", 0.0);
569             }
570             after: button_unpress;
571          }
572          program { name: "button_click2";
573             signal: "mouse,down,1";
574             source: "over3";
575             action: STATE_SET "clicked" 0.0;
576             target: "over3";
577          }
578          program { name: "button_unclick2";
579             signal: "mouse,clicked,1";
580             source: "over3";
581             action: STATE_SET "default" 0.0;
582             target: "over3";
583          }
584          program { name: "button_unclick3";
585             signal: "mouse,clicked,1";
586             source: "over2";
587             action: SIGNAL_EMIT "elm,action,click" "";
588          }
589          program { name: "text_show";
590             signal: "elm,state,text,visible";
591             source: "elm";
592             script {
593                new st[31];
594                new Float:vl;
595                get_state(PART:"elm.swallow.content", st, 30, vl);
596                if (!strcmp(st, "icononly"))
597                {
598                   set_state(PART:"elm.swallow.content", "visible", 0.0);
599                   set_state(PART:"icon_rect", "visible", 0.0);
600                   set_state(PART:"padding_after_icon", "visible", 0.0);
601                }
602                set_state(PART:"elm.text", "visible", 0.0);
603             }
604          }
605          program { name: "text_hide";
606             signal: "elm,state,text,hidden";
607             source: "elm";
608             script {
609                new st[31];
610                new Float:vl;
611                get_state(PART:"elm.swallow.content", st, 30, vl);
612                if (!strcmp(st, "visible"))
613                {
614                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
615                   set_state(PART:"icon_rect", "icononly", 0.0);
616                   set_state(PART:"padding_after_icon", "icononly", 0.0);
617                }
618                set_state(PART:"elm.text", "default", 0.0);
619             }
620          }
621          program { name: "icon_show";
622             signal: "elm,state,icon,visible";
623             source: "elm";
624             script {
625                new st[31];
626                new Float:vl;
627                get_state(PART:"elm.text", st, 30, vl);
628                if (!strcmp(st, "visible"))
629                {
630                   set_state(PART:"elm.swallow.content", "visible", 0.0);
631                   set_state(PART:"icon_rect", "visible", 0.0);
632                   set_state(PART:"padding_after_icon", "visible", 0.0);
633                }
634                else
635                {
636                   set_state(PART:"elm.swallow.content", "icononly", 0.0);
637                   set_state(PART:"icon_rect", "icononly", 0.0);
638                   set_state(PART:"padding_after_icon", "icononly", 0.0);
639                }
640             }
641          }
642          program { name: "icon_hide";
643             signal: "elm,state,icon,hidden";
644             source: "elm";
645             action:  STATE_SET "default" 0.0;
646             target: "elm.swallow.content";
647          }
648          program { name: "disable";
649             signal: "elm,state,disabled";
650             source: "elm";
651             action: STATE_SET "disabled" 0.0;
652             target: "button_image";
653             target: "over2";
654             target: "disabler";
655             after: "disable_text";
656          }
657          program { name: "disable_text";
658             script {
659                set_int(button_state, BUTTON_STATE_DISABLED);
660                set_state(PART:"elm.text", "visible", 0.0);
661             }
662          }
663          program { name: "enable";
664             signal: "elm,state,enabled";
665             source: "elm";
666             action: STATE_SET "default" 0.0;
667             target: "button_image";
668             target: "over2";
669             target: "disabler";
670             after: "enable_text";
671          }
672          program { name: "enable_text";
673             script {
674                set_int(button_state, BUTTON_STATE_ENABLED);
675                set_state(PART:"elm.text", "visible", 0.0);
676             }
677          }
678          program { name: "focused";
679             action: STATE_SET "focused" 0.0;
680             target: "button_image";
681             target: "elm.text";
682          }
683          program { name: "unfocused";
684             action: STATE_SET "default" 0.0;
685             target: "button_image";
686             after: "unfocus_text";
687          }
688          program { name: "unfocus_text";
689             action: STATE_SET "visible" 0.0;
690             target: "elm.text";
691          }
692       }
693    }
694
695 #define BUTTON_NAVIBAR_BACK_BUTTON_BUTTON_IMAGE_MIN_INC 100 60
696 #define BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC 33 30
697 #define NAVIBAR_TITLE_RIGHT_SEPARATOR_COLOR_INC 84 93 110 255
698 #define NAVIBAR_TITLE_LEFT_SEPARATOR_COLOR_INC 35 45 61 255
699
700    group { name: "elm/button/base/naviframe/back_btn/browser/default";
701        alias: "elm/button/base/naviframe_end_btn/browser/default";
702        //TODO: Remove this alias later
703        alias: "elm/button/base/navigationbar_prev_btn/browser/default";
704        alias: "elm/button/base/navigationbar_backbutton/browser/default";
705        alias: "elm/button/base/navigationbar_end_btn/browser/default";
706        images {
707          image: "browser-view-images/I01_btn_prev.png" COMP;
708          image: "browser-view-images/I01_btn_prev_press.png" COMP;
709       }
710       parts {
711          part { name: "button_image";
712             type: RECT;
713             mouse_events: 1;
714             scale: 1;
715             description { state: "default" 0.0;
716                min: BUTTON_NAVIBAR_BACK_BUTTON_BUTTON_IMAGE_MIN_INC;
717                color: 0 0 0 0;
718             }
719             description {
720                state: "clicked" 0.0;
721                inherit: "default" 0.0;
722             }
723             description {
724                state: "disabled" 0.0;
725                inherit: "default" 0.0;
726             }
727          }
728          part {name: "padding_right";
729             type: RECT;
730             mouse_events: 0;
731             description { state: "default" 0.0;
732                align: 1 0;
733                min: 1 0;
734                rel1 { relative: 1 0.2; }
735                rel2 { relative: 1 0.8; }
736                fixed: 1 0;
737                color: NAVIBAR_TITLE_RIGHT_SEPARATOR_COLOR_INC;
738             }
739          }
740          part {name: "padding_before_right";
741             type: RECT;
742             mouse_events: 0;
743             description { state: "default" 0.0;
744                align: 1 0;
745                min: 1 0;
746                rel1 { relative: 0 0; to: "padding_right"; }
747                rel2 { relative: 0 1; to: "padding_right"; }
748                fixed: 1 0;
749                color: NAVIBAR_TITLE_LEFT_SEPARATOR_COLOR_INC;
750             }
751          }
752          part { name: "button_center_part";
753             mouse_events: 0;
754             scale: 1;
755             description { state: "default" 0.0;
756                min: BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC;
757                max: BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC;
758                align: 0.5 0.5;
759                rel2 { relative: 0 1; to_x: "padding_before_right"; }
760                image {
761                   normal: "browser-view-images/I01_btn_prev.png";
762                }
763             }
764             description {
765                state: "clicked" 0.0;
766                inherit: "default" 0.0;
767                image.normal: "browser-view-images/I01_btn_prev_press.png";
768             }
769          }
770          part { name: "over1";
771             type: RECT;
772             mouse_events: 1;
773             repeat_events: 1;
774             ignore_flags: ON_HOLD;
775             description { state: "default" 0.0;
776                color: 0 0 0 0;
777             }
778          }
779          part { name: "over2";
780             mouse_events: 1;
781             repeat_events: 1;
782             description { state: "default" 0.0;
783                color: 0 0 0 0;
784             }
785          }
786          part { name: "disabler";
787             type: RECT;
788             description { state: "default" 0.0;
789                color: 0 0 0 0;
790                visible: 0;
791             }
792             description { state: "disabled" 0.0;
793                inherit: "default" 0.0;
794                visible: 1;
795             }
796          }
797       }
798       programs {
799          program { name: "button_click";
800             signal: "mouse,down,1";
801             source: "over1";
802             action: SIGNAL_EMIT "elm,action,press" "";
803             after: "button_click_anim";
804          }
805          program { name: "button_click_anim";
806             action: STATE_SET "clicked" 0.0;
807             target: "button_image";
808             target: "button_center_part";
809          }
810          program { name: "button_unclick";
811             signal: "mouse,up,1";
812             source: "over2";
813             action: SIGNAL_EMIT "elm,action,unpress" "";
814             after: "button_unclick_anim";
815          }
816          program { name: "button_unclick_anim";
817             action: STATE_SET "default" 0.0;
818             target: "button_image";
819             target: "button_center_part";
820          }
821          program { name: "button_unclick2";
822             signal: "mouse,clicked,1";
823             source: "over1";
824             action: SIGNAL_EMIT "elm,action,click" "";
825          }
826          program { name: "disable";
827             signal: "elm,state,disabled";
828             source: "elm";
829             action: STATE_SET "disabled" 0.0;
830             target: "disabler";
831             target: "button_image";
832          }
833          program { name: "enable";
834             signal: "elm,state,enabled";
835             source: "elm";
836             action: STATE_SET "default" 0.0;
837             target: "disabler";
838             target: "button_image";
839          }
840       }
841    }
842 }