naviframe - added newly
authorChunEon Park <chuneon.park@samsung.com>
Fri, 2 Sep 2011 12:57:12 +0000 (21:57 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Wed, 7 Sep 2011 07:19:18 +0000 (16:19 +0900)
Change-Id: I6c7b0579f9ebc517957c18217a4d29be02e3e6cc

data/images/icon_right_arrow.png [new file with mode: 0644]
data/themes/default.edc
src/bin/Makefile.am
src/bin/test.c
src/bin/test_naviframe.c [new file with mode: 0644]
src/lib/Elementary.h.in
src/lib/Makefile.am
src/lib/elc_naviframe.c [new file with mode: 0644]

diff --git a/data/images/icon_right_arrow.png b/data/images/icon_right_arrow.png
new file mode 100644 (file)
index 0000000..6bbb2c6
Binary files /dev/null and b/data/images/icon_right_arrow.png differ
index 4bd1da5..116f98d 100644 (file)
@@ -2970,6 +2970,193 @@ collections {
          }
       }
    }
+   group { name: "elm/button/base/naviframe/back_btn/default";
+      images {
+         image: "bt_base1.png" COMP;
+         image: "bt_base2.png" COMP;
+         image: "bt_hilight.png" COMP;
+         image: "bt_shine.png" COMP;
+         image: "bt_glow.png" COMP;
+         image: "bt_dis_base.png" COMP;
+         image: "bt_dis_hilight.png" COMP;
+         image: "icon_left_arrow.png" COMP;
+      }
+      parts {
+         part { name: "button_image";
+            mouse_events: 1;
+            description { state: "default" 0.0;
+               min: 15 15;
+               image {
+                  normal: "bt_base2.png";
+                  border: 7 7 7 7;
+               }
+               image.middle: SOLID;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "bt_base1.png";
+            }
+            description { state: "disabled" 0.0;
+               inherit:  "default" 0.0;
+               image {
+                  normal: "bt_dis_base.png";
+                  border: 4 4 4 4;
+               }
+            }
+         }
+         part { name: "prev_image";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 30 30;
+               max: 30 30;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               image.normal: "icon_left_arrow.png";
+            }
+         }
+         part { name: "over1";
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel2.relative: 1.0 0.5;
+               image {
+                  normal: "bt_hilight.png";
+                  border: 7 7 7 0;
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit:  "default" 0.0;
+               image {
+                  normal: "bt_dis_hilight.png";
+                  border: 4 4 4 0;
+               }
+            }
+         }
+         part { name: "over2";
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               image {
+                  normal: "bt_shine.png";
+                  border: 7 7 7 7;
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit:  "default" 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "over3";
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 255 255 255 0;
+               image {
+                  normal: "bt_glow.png";
+                  border: 12 12 12 12;
+               }
+               fill.smooth : 0;
+            }
+            description { state: "clicked" 0.0;
+               inherit:  "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+          part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program {
+            name:   "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program {
+            name:   "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+         }
+         program {
+            name:   "button_unclick";
+            signal: "mouse,up,1";
+            source: "over3";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+            after: "button_unclick_anim";
+         }
+         program {
+            name:   "button_pressed_anim";
+            signal: "elm,anim,activate";
+            source: "elm";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            target: "over3";
+            after: "button_unpressed_anim";
+         }
+         program {
+            name:   "button_unpressed_anim";
+            action: STATE_SET "default" 0.0;
+            transition: DECELERATE 0.5;
+            target: "button_image";
+            target: "over3";
+         }
+         program {
+            name:   "button_unclick_anim";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+         }
+         program {
+            name:   "button_click2";
+            signal: "mouse,down,1";
+            source: "over3";
+            action: STATE_SET "clicked" 0.0;
+            target: "over3";
+         }
+         program {
+            name:   "button_unclick2";
+            signal: "mouse,up,1";
+            source: "over3";
+            action: STATE_SET "default" 0.0;
+            transition: DECELERATE 0.5;
+            target: "over3";
+         }
+         program {
+            name:   "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "over1";
+            target: "over2";
+            target: "disabler";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "over1";
+            target: "over2";
+            target: "disabler";
+         }
+      }
+   }
 
 ///////////////////////////////////////////////////////////////////////////////
    group { name: "elm/toggle/base/default";
@@ -37255,4 +37442,383 @@ collections {
          }
       }
    }
+/////////////////////////////////////////////////////////////////////////
+   group { name:"elm/naviframe/base/default";
+      images {
+         image: "frame_1.png" COMP;
+         image: "frame_2.png" COMP;
+         image: "dia_grad.png" COMP;
+      }
+      parts {
+         part { name: "base0";
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               image.normal: "dia_grad.png";
+               fill {
+                  smooth: 0;
+                  size {
+                     relative: 0.0 1.0;
+                     offset: 64 0;
+                  }
+               }
+            }
+         }
+         part { name: "base1";
+            type: IMAGE;
+            description { state: "default" 0.0;
+               image {
+                  normal: "frame_2.png";
+                  border: 5 5 32 26;
+                  middle: 0;
+               }
+               fill.smooth : 0;
+            }
+         }
+         part { name: "over";
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               rel1.offset: 4 4;
+               rel2.offset: 5 5;
+               image {
+                  normal: "frame_1.png";
+                  border: 2 2 28 22;
+                  middle: 0;
+               }
+               fill.smooth : 0;
+            }
+         }
+      }
+   }
+   group { name:"elm/naviframe/item/basic/default";
+      parts {
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               min: 1 50;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to_y: "title_clip";
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 1.0 1.0;
+               rel1.to_y: "title_clip";
+               rel2.relative: 2.0 1.0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 0.0 1.0;
+               rel2.relative: 1.0 1.0;
+            }
+            description { state: "pushed" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 1.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "popped" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 1.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "elm.swallow.title";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 1 50;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+            }
+         }
+      }
+      programs {
+         program { name: "show";
+            signal: "elm,state,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            target: "elm.swallow.content";
+            transition: DECELERATE 0.5;
+            after: "show_finished";
+         }
+         program { name: "pushed";
+            signal: "elm,state,pushed";
+            source: "elm";
+            action: STATE_SET "pushed" 0.0;
+            target: "elm.swallow.content";
+            transition: DECELERATE 0.5;
+            after: "pushed_finished";
+         }
+         program { name: "popped";
+            signal: "elm,state,popped";
+            source: "elm";
+            action: STATE_SET "popped" 0.0;
+            target: "elm.swallow.content";
+            transition: DECELERATE 0.5;
+            after: "popped_finished";
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "title_clip";
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_clip";
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+      }
+   }
+   group { name:"elm/naviframe/item/instant/default";
+      parts {
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               min: 1 50;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to_y: "title_clip";
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_y: "title_clip";
+               rel2.relative: 1.0 1.0;
+               visible: 0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+         part { name: "elm.swallow.title";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 1 50;
+               align: 0.5 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+            }
+         }
+      }
+      programs {
+         program { name: "show";
+            signal: "elm,state,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            target: "elm.swallow.content";
+            after: "show_finished";
+         }
+         program { name: "pushed";
+            signal: "elm,state,pushed";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+            after: "pushed_finished";
+         }
+         program { name: "popped";
+            signal: "elm,state,popped";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+            after: "popped_finished";
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "title_clip";
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_clip";
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+      }
+   }
+   group { name:"elm/naviframe/title/default";
+      images {
+         image: "flip_base.png" COMP;
+         image: "flip_shad.png" COMP;
+      }
+      parts {
+         part { name: "base";
+            type: IMAGE;
+            description {
+               image.normal: "flip_base.png";
+            }
+         }
+         part { name: "elm.swallow.prev_btn";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 80 40;
+               max: 80 40;
+               align: 0 0;
+               fixed: 1 1;
+               rel1.offset: 5 5;
+               rel2.offset: -1 -6;
+            }
+         }
+         part { name: "elm.swallow.next_btn";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 80 40;
+               max: 80 40;
+               align: 1 0;
+               fixed: 1 1;
+               rel1.offset: 0 5;
+               rel2.offset: -6 -6;
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 40 40;
+               max: 40 40;
+               align: 1 0.5;
+               rel1.to: "elm.text.title";
+               rel1.relative: 0 0;
+               rel2.to: "elm.text.title";
+               rel2.relative: 0 1;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               text { font: "Sans,Edje-Vera";
+                  size: 10;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+               }
+               color: 0 0 0 255;
+               align: 0.5 0.5;
+            }
+         }
+         part { name: "elm.text.subtitle";
+            type: TEXT;
+            scale: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               text { font: "Sans,Edje-Vera";
+                  size: 8;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 1;
+               }
+               rel1.to_y: "elm.text.title";
+               rel1.relative: 0 1;
+               color: 50 50 50 255;
+               align: 0.5 0;
+            }
+         }
+         part { name: "shade";
+            type: IMAGE;
+            mouse_events: 0;
+            description {
+               align: 0.5 1;
+               rel1.to_y: "elm.text.title";
+               rel1.relative: 0 1;
+               rel1.offset: 0 0;
+               rel2.offset: -1 5;
+               image.normal: "flip_shad.png";
+            }
+         }
+      }
+      programs {
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "base";
+            action: SIGNAL_EMIT "elm,action,clicked" "elm";
+         }
+      }
+   }
 }
index 581fa4f..7720933 100644 (file)
@@ -81,6 +81,7 @@ test_list.c \
 test_map.c \
 test_menu.c \
 test_multi.c \
+test_naviframe.c \
 test_notify.c \
 test_pager.c \
 test_panel.c \
index 39b9600..dd41f57 100644 (file)
@@ -139,6 +139,7 @@ void test_grid(void *data, Evas_Object *obj, void *event_info);
 void test_glview_simple(void *data, Evas_Object *obj, void *event_info);
 void test_glview(void *data, Evas_Object *obj, void *event_info);
 void test_3d(void *data, Evas_Object *obj, void *event_info);
+void test_naviframe(void *data, Evas_Object *obj, void *event_info);
 #ifdef HAVE_EIO
 void test_eio(void *data, Evas_Object *obj, void *event_info);
 #endif
@@ -416,6 +417,7 @@ my_win_main(char *autorun, Eina_Bool test_win_only)
    ADD_TEST("3D", test_3d);
    ADD_TEST("Genscroller", test_genscroller);
    ADD_TEST("Gesture Layer", test_gesture_layer);
+   ADD_TEST("Naviframe", test_naviframe);
 #undef ADD_TEST
 
    if (autorun)
diff --git a/src/bin/test_naviframe.c b/src/bin/test_naviframe.c
new file mode 100644 (file)
index 0000000..03dcae5
--- /dev/null
@@ -0,0 +1,165 @@
+#include <Elementary.h>
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+#ifndef ELM_LIB_QUICKLAUNCH
+
+void
+_navi_pop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   elm_naviframe_item_pop(data);
+}
+
+void
+_title_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   printf("Title Clicked!\n");
+}
+
+void
+_title_visible(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   elm_naviframe_item_title_visible_set(data,
+                               !elm_naviframe_item_title_visible_get(data));
+}
+
+void
+_page4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   Evas_Object *bt, *bt2, *ic, *nf = data;
+   char buf[PATH_MAX];
+   Elm_Naviframe_Item *it;
+
+   bt = elm_button_add(nf);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+   ic = elm_icon_add(nf);
+   snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.png", PACKAGE_DATA_DIR);
+   elm_icon_file_set(ic, buf, NULL);
+   evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+   elm_button_icon_set(bt, ic);
+
+   bt2 = elm_button_add(nf);
+   evas_object_size_hint_align_set(bt2, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_object_text_set(bt2, "Naviframe Test");
+
+   ic = elm_icon_add(nf);
+   snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
+   elm_icon_file_set(ic, buf, NULL);
+   evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+
+   it = elm_naviframe_item_push(nf,
+                                "Page 4",
+                                NULL,
+                                bt,
+                                bt2,
+                                NULL);
+   elm_naviframe_item_subtitle_label_set(it, "Here is sub-title part!");
+   elm_naviframe_item_icon_set(it, ic);
+   elm_naviframe_item_title_visible_set(it, EINA_FALSE);
+   evas_object_smart_callback_add(bt2, "clicked", _title_visible, it);
+}
+
+void
+_page3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   Evas_Object *bt, *bt2, *bt3, *ic, *nf = data;
+   char buf[PATH_MAX];
+   Elm_Naviframe_Item *it;
+
+   bt = elm_button_add(nf);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_object_text_set(bt, "Prev");
+   evas_object_smart_callback_add(bt, "clicked", _navi_pop, nf);
+
+   bt2 = elm_button_add(nf);
+   evas_object_size_hint_align_set(bt2, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_object_text_set(bt2, "Next");
+   evas_object_smart_callback_add(bt2, "clicked", _page4, nf);
+
+   bt3 = elm_button_add(nf);
+   evas_object_size_hint_align_set(bt3, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_object_text_set(bt3, "Naviframe Test");
+
+   ic = elm_icon_add(nf);
+   snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
+   elm_icon_file_set(ic, buf, NULL);
+   evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+
+   it = elm_naviframe_item_push(nf,
+                                "Page 3",
+                                bt,
+                                bt2,
+                                bt3,
+                                NULL);
+   elm_naviframe_item_subtitle_label_set(it, "Here is sub-title part!");
+   elm_naviframe_item_icon_set(it, ic);
+}
+
+void
+_page2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   Evas_Object *bt, *bt2, *ic, *nf = data;
+   char buf[PATH_MAX];
+   Elm_Naviframe_Item *it;
+
+   bt = elm_button_add(nf);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_smart_callback_add(bt, "clicked", _page3, nf);
+
+   bt2 = elm_button_add(nf);
+   evas_object_size_hint_align_set(bt2, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_object_text_set(bt2, "Naviframe Test");
+
+   ic = elm_icon_add(nf);
+   snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.png", PACKAGE_DATA_DIR);
+   elm_icon_file_set(ic, buf, NULL);
+   evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+   elm_button_icon_set(bt, ic);
+
+   it = elm_naviframe_item_push(nf,
+                                "Page 2",
+                                NULL,
+                                bt,
+                                bt2,
+                                NULL);
+   elm_naviframe_item_subtitle_label_set(it, "Here is sub-title part!");
+}
+
+void
+test_naviframe(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   Evas_Object *win, *bg, *nf, *btn;
+
+   win = elm_win_add(NULL, "naviframe", ELM_WIN_BASIC);
+   elm_win_title_set(win, "Naviframe");
+   elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
+   elm_win_autodel_set(win, EINA_TRUE);
+
+   bg = elm_bg_add(win);
+   elm_win_resize_object_add(win, bg);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_show(bg);
+
+   nf = elm_naviframe_add(win);
+   elm_win_resize_object_add(win, nf);
+   evas_object_show(nf);
+   evas_object_smart_callback_add(nf, "title,clicked", _title_clicked, 0);
+
+   btn = elm_button_add(nf);
+   evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_smart_callback_add(btn, "clicked", _page2, nf);
+   elm_object_text_set(btn, "Naviframe Test");
+   evas_object_show(btn);
+
+   elm_naviframe_item_push(nf,
+                           "Page 1",
+                           NULL,
+                           NULL,
+                           btn,
+                           NULL);
+
+   evas_object_resize(win, 400, 600);
+   evas_object_show(win);
+}
+#endif
index a63c307..e2738f8 100644 (file)
@@ -8069,6 +8069,42 @@ extern "C" {
    EAPI void         elm_navigationbar_ex_title_object_visible_set(Elm_Navigationbar_ex_Item* item, Eina_Bool visible);
    Eina_Bool         elm_navigationbar_ex_title_object_visible_get(Elm_Navigationbar_ex_Item* item);
 
+  /* naviframe */
+  #define NAVIFRAME_OPTIONHEADER "elm.swallow.optionheader"
+
+   typedef struct _Elm_Naviframe_Item Elm_Naviframe_Item;
+
+   typedef enum
+     {
+        ELM_NAVIFRAME_PREV_BUTTON,
+        ELM_NAVIFRAME_NEXT_BUTTON
+     } Elm_Naviframe_Button_Type;
+
+   EAPI Evas_Object        *elm_naviframe_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+   EAPI Elm_Naviframe_Item *elm_naviframe_item_push(Evas_Object *obj, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style) EINA_ARG_NONNULL(1, 5);
+   EAPI Evas_Object        *elm_naviframe_item_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI void                elm_naviframe_content_preserve_on_pop_set(Evas_Object *obj, Eina_Bool preserve) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool           elm_naviframe_content_preserve_on_pop_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI void                elm_naviframe_item_content_set(Elm_Naviframe_Item *item, Evas_Object *content) EINA_ARG_NONNULL(1, 2);
+   EAPI Evas_Object        *elm_naviframe_item_content_get(const Elm_Naviframe_Item *item) EINA_ARG_NONNULL(1);
+   EAPI Evas_Object        *elm_naviframe_item_content_unset(Elm_Naviframe_Item *it) EINA_ARG_NONNULL(1);
+   EAPI void                elm_naviframe_item_title_label_set(Elm_Naviframe_Item *it, const char *label) EINA_ARG_NONNULL(1);
+   EAPI const char         *elm_naviframe_item_title_label_get(const Elm_Naviframe_Item *it) EINA_ARG_NONNULL(1);
+   EAPI void                elm_naviframe_item_subtitle_label_set(Elm_Naviframe_Item *it, const char *label) EINA_ARG_NONNULL(1);
+   EAPI const char         *elm_naviframe_item_subtitle_label_get(const Elm_Naviframe_Item *it) EINA_ARG_NONNULL(1);
+   EAPI Elm_Naviframe_Item *elm_naviframe_top_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI Elm_Naviframe_Item *elm_naviframe_bottom_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI void                elm_naviframe_item_button_set(Elm_Naviframe_Item *it, Evas_Object *btn, Elm_Naviframe_Button_Type btn_type) EINA_ARG_NONNULL(1);
+   EAPI Evas_Object        *elm_naviframe_item_button_get(const Elm_Naviframe_Item *it, Elm_Naviframe_Button_Type btn_type) EINA_ARG_NONNULL(1);
+   EAPI void                elm_naviframe_item_icon_set(Elm_Naviframe_Item *it, Evas_Object *icon) EINA_ARG_NONNULL(1);
+   EAPI Evas_Object        *elm_naviframe_item_icon_get(const Elm_Naviframe_Item *it) EINA_ARG_NONNULL(1);
+   EAPI void                elm_naviframe_item_style_set(Elm_Naviframe_Item *it, const char *item_style) EINA_ARG_NONNULL(1);
+   EAPI const char         *elm_naviframe_item_style_get(const Elm_Naviframe_Item *it) EINA_ARG_NONNULL(1);
+   EAPI void                elm_naviframe_item_title_visible_set(Elm_Naviframe_Item *it, Eina_Bool visible) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool           elm_naviframe_item_title_visible_get(const Elm_Naviframe_Item *it) EINA_ARG_NONNULL(1);
+   EAPI void                elm_naviframe_item_extension_set(Elm_Naviframe_Item *it, const char *swallow, Evas_Object *extension) EINA_ARG_NONNULL(1, 2);
+   EAPI Evas_Object        *elm_naviframe_item_extension_unset(Elm_Naviframe_Item *it, const char *swallow) EINA_ARG_NONNULL(1);
+   EAPI Evas_Object        *elm_naviframe_item_extension_get(const Elm_Naviframe_Item *it, const char *swallow) EINA_ARG_NONNULL(1);
 
    /* Control Bar */
    #define CONTROLBAR_SYSTEM_ICON_ALBUMS "controlbar_albums"
index 39df14a..43014c9 100644 (file)
@@ -49,6 +49,7 @@ elc_fileselector_button.c \
 elc_fileselector.c \
 elc_fileselector_entry.c \
 elc_hoversel.c \
+elc_naviframe.c \
 elc_navigationbar.c \
 elc_navigationbar_ex.c\
 elc_player.c \
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
new file mode 100644 (file)
index 0000000..0c5435b
--- /dev/null
@@ -0,0 +1,821 @@
+#include <Elementary.h>
+#include "elm_priv.h"
+
+typedef struct _Widget_Data Widget_Data;
+
+struct _Widget_Data
+{
+   Eina_List    *stack;
+   Evas_Object  *base;
+   Eina_Bool     preserve: 1;
+   Eina_Bool     pass_events: 1;
+};
+
+struct _Elm_Naviframe_Item
+{
+   Elm_Widget_Item    base;
+   Evas_Object       *title;
+   Evas_Object       *content;
+   const char        *title_label;
+   const char        *title_sublabel;
+   Evas_Object       *title_prev_btn;
+   Evas_Object       *title_next_btn;
+   Evas_Object       *title_icon;
+   Evas_Object       *extension;
+   const char        *style;
+   Eina_Bool          back_btn: 1;
+   Eina_Bool          title_visible: 1;
+};
+
+static const char *widtype = NULL;
+
+static const char SIG_TRANSITION_FINISHED[] = "transition,finished";
+static const char SIG_TITLE_CLICKED[] = "title,clicked";
+
+static const Evas_Smart_Cb_Description _signals[] = {
+       {SIG_TRANSITION_FINISHED, ""},
+       {SIG_TITLE_CLICKED, ""},
+       {NULL, NULL}
+};
+
+#define ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, ...) \
+   ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *) it, __VA_ARGS__); \
+   ELM_CHECK_WIDTYPE(it->base.widget, widtype) __VA_ARGS__;
+
+static void _del_hook(Evas_Object *obj);
+static void _theme_hook(Evas_Object *obj);
+static void _disable_hook(Evas_Object *obj);
+static void _sizing_eval(Evas_Object *obj);
+static void _item_sizing_eval(Elm_Naviframe_Item *it);
+static void _move(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _resize(void *data,
+                    Evas *e,
+                    Evas_Object *obj,
+                    void *event_info);
+static void _title_clicked(void *data, Evas_Object *obj,
+                           const char *emission,
+                           const char *source);
+static void _back_btn_clicked(void *data,
+                              Evas_Object *obj,
+                              void *event_info);
+static Evas_Object *_back_btn_new(Evas_Object *obj);
+static void _title_prev_btn_del(void *data,
+                                Evas *e,
+                                Evas_Object *obj,
+                                void *event_info);
+static void _title_next_btn_del(void *data,
+                                Evas *e,
+                                Evas_Object *obj,
+                                void *event_info);
+static void _title_icon_del(void *data,
+                            Evas *e,
+                            Evas_Object *obj,
+                            void *event_info);
+static void _content_del(void *data,
+                         Evas *e,
+                         Evas_Object *obj,
+                         void *event_info);
+static void _extension_del(void *data,
+                           Evas *e,
+                           Evas_Object *obj,
+                           void *event_info);
+static void _title_prev_btn_set(Elm_Naviframe_Item *it,
+                                Evas_Object *btn,
+                                Eina_Bool back_btn);
+static void _title_next_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn);
+static void _item_del(Elm_Naviframe_Item *it);
+static void _pushed_finished(void *data,
+                             Evas_Object *obj,
+                             const char *emission,
+                             const char *source);
+static void _popped_finished(void *data,
+                             Evas_Object *obj,
+                             const char *emission,
+                             const char *source);
+static void _show_finished(void *data,
+                           Evas_Object *obj,
+                           const char *emission,
+                           const char *source);
+
+static void
+_del_hook(Evas_Object *obj)
+{
+   Widget_Data *wd;
+   Eina_List *list;
+   Elm_Naviframe_Item *it;
+
+   wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   EINA_LIST_FOREACH(wd->stack, list, it)
+     _item_del(it);
+   eina_list_free(wd->stack);
+   free(wd);
+}
+
+static void
+_theme_hook(Evas_Object *obj __UNUSED__)
+{
+   //FIXME:
+}
+
+static void
+_disable_hook(Evas_Object *obj __UNUSED__)
+{
+   //FIXME:
+}
+
+static void
+_sizing_eval(Evas_Object *obj)
+{
+   Widget_Data *wd;
+   Eina_List *list;
+   Elm_Naviframe_Item *it;
+   wd  = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   list = eina_list_last(wd->stack);
+   if (!list) return;
+
+   EINA_LIST_FOREACH(wd->stack, list, it)
+     _item_sizing_eval(it);
+}
+
+static void
+_item_sizing_eval(Elm_Naviframe_Item *it)
+{
+   Widget_Data *wd;
+   Evas_Coord x, y, w, h;
+   if (!it) return;
+
+   wd = elm_widget_data_get(it->base.widget);
+   if (!wd) return;
+
+   evas_object_geometry_get(it->base.widget, &x, &y, &w, &h);
+   evas_object_move(it->base.view, x, y);
+   evas_object_resize(it->base.view, w, h);
+}
+
+static void
+_move(void *data __UNUSED__,
+      Evas *e __UNUSED__,
+      Evas_Object *obj,
+      void *event_info __UNUSED__)
+{
+   _sizing_eval(obj);
+}
+
+static void
+_resize(void *data __UNUSED__,
+        Evas *e __UNUSED__,
+        Evas_Object *obj,
+        void *event_info __UNUSED__)
+{
+   _sizing_eval(obj);
+}
+
+static void
+_title_clicked(void *data,
+               Evas_Object *obj __UNUSED__,
+               const char *emission __UNUSED__,
+               const char *source __UNUSED__)
+{
+   Elm_Naviframe_Item *it = data;
+   evas_object_smart_callback_call(it->base.widget, SIG_TITLE_CLICKED, it);
+}
+
+static void
+_back_btn_clicked(void *data,
+                  Evas_Object *obj __UNUSED__,
+                  void *event_info __UNUSED__)
+{
+   elm_naviframe_item_pop(data);
+}
+
+static Evas_Object *
+_back_btn_new(Evas_Object *obj)
+{
+   Evas_Object *btn;
+   char buf[256];   //FIXME: How to guarantee the size of style name?
+   btn = elm_button_add(obj);
+   if (!btn) return NULL;
+   evas_object_smart_callback_add(btn, "clicked", _back_btn_clicked, obj);
+   snprintf(buf, sizeof(buf), "naviframe/back_btn/%s", elm_widget_style_get(obj));
+   elm_object_style_set(btn, buf);
+   return btn;
+}
+
+static void
+_title_prev_btn_del(void *data,
+                    Evas *e __UNUSED__,
+                    Evas_Object *obj __UNUSED__,
+                    void *event_info __UNUSED__)
+{
+   Elm_Naviframe_Item *it = data;
+   it->back_btn = EINA_FALSE;
+   it->title_prev_btn = NULL;
+}
+
+static void
+_title_next_btn_del(void *data,
+                    Evas *e __UNUSED__,
+                    Evas_Object *obj __UNUSED__,
+                    void *event_info __UNUSED__)
+{
+   Elm_Naviframe_Item *it = data;
+   it->title_next_btn = NULL;
+}
+
+static void
+_title_icon_del(void *data,
+                Evas *e __UNUSED__,
+                Evas_Object *obj __UNUSED__,
+                void *event_info __UNUSED__)
+{
+   Elm_Naviframe_Item *it = data;
+   it->title_icon = NULL;
+   edje_object_signal_emit(it->base.view, "elm,state,icon,hide", "elm");
+}
+
+static void
+_content_del(void *data,
+             Evas *e __UNUSED__,
+             Evas_Object *obj __UNUSED__,
+             void *event_info __UNUSED__)
+{
+   Elm_Naviframe_Item *it = data;
+   it->content = NULL;
+   edje_object_signal_emit(it->base.view, "elm,state,content,hide", "elm");
+}
+
+static void
+_extension_del(void *data,
+               Evas *e,
+               Evas_Object *obj __UNUSED__,
+               void *event_info __UNUSED__)
+{
+   Elm_Naviframe_Item *it = data;
+   it->extension = NULL;
+}
+
+static void
+_title_prev_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn, Eina_Bool back_btn)
+{
+   char buf[256];   //FIXME: How to guarantee the size of style name?
+
+   if (it->title_prev_btn == btn) return;
+
+   if (it->title_prev_btn)
+     evas_object_del(it->title_prev_btn);
+
+   it->title_prev_btn = btn;
+
+   if (!btn) return;
+
+   if (!back_btn)
+     {
+        snprintf(buf,
+                 sizeof(buf),
+                 "naviframe/prev_btn/%s",
+                 elm_widget_style_get(it->base.widget));
+        elm_object_style_set(btn, buf);
+     }
+   elm_widget_sub_object_add(it->base.widget, btn);
+   evas_object_event_callback_add(btn,
+                                  EVAS_CALLBACK_DEL,
+                                  _title_prev_btn_del,
+                                  it);
+   edje_object_part_swallow(it->title, "elm.swallow.prev_btn", btn);
+   it->back_btn = back_btn;
+}
+
+static void
+_title_next_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn)
+{
+   char buf[256];   //FIXME: How to guarantee the size of style name?
+
+   if (it->title_next_btn == btn) return;
+
+   if (it->title_next_btn)
+     evas_object_del(it->title_next_btn);
+
+   it->title_next_btn = btn;
+
+   if (!btn) return;
+
+   snprintf(buf,
+            sizeof(buf),
+            "naviframe/next_btn/%s",
+            elm_widget_style_get(it->base.widget));
+   elm_object_style_set(btn, buf);
+   elm_widget_sub_object_add(it->base.widget, btn);
+   evas_object_event_callback_add(btn,
+                                  EVAS_CALLBACK_DEL,
+                                  _title_next_btn_del,
+                                  it);
+   edje_object_part_swallow(it->title, "elm.swallow.next_btn", btn);
+}
+
+static void
+_item_del(Elm_Naviframe_Item *it)
+{
+   Widget_Data *wd;
+
+   if (!it) return;
+
+   wd = elm_widget_data_get(it->base.widget);
+   if (!wd) return;
+
+   if (it->title_prev_btn)
+     evas_object_del(it->title_prev_btn);
+   if (it->title_next_btn)
+     evas_object_del(it->title_next_btn);
+   if (it->title_icon)
+     evas_object_del(it->title_icon);
+   if ((it->content) && (!wd->preserve))
+     evas_object_del(it->content);
+   if (it->extension)
+     evas_object_del(it->extension);
+
+   evas_object_del(it->title);
+   evas_object_del(it->base.view);
+
+   wd->stack = eina_list_remove(wd->stack, it);
+
+   free(it);
+}
+
+static void
+_pushed_finished(void *data,
+                 Evas_Object *obj __UNUSED__,
+                 const char *emission __UNUSED__,
+                 const char *source __UNUSED__)
+{
+   Elm_Naviframe_Item *it = data;
+   if (!it) return;
+   evas_object_hide(it->base.view);
+}
+
+static void
+_popped_finished(void *data,
+                 Evas_Object *obj __UNUSED__,
+                 const char *emission __UNUSED__,
+                 const char *source __UNUSED__)
+{
+   _item_del(data);
+}
+
+static void
+_show_finished(void *data,
+               Evas_Object *obj __UNUSED__,
+               const char *emission __UNUSED__,
+               const char *source __UNUSED__)
+{
+   Elm_Naviframe_Item *it;
+   Widget_Data *wd;
+
+   it = data;
+   if (!it) return;
+   wd =  elm_widget_data_get(it->base.widget);
+   if (!wd) return;
+
+   evas_object_smart_callback_call(it->base.widget,
+                                   SIG_TRANSITION_FINISHED,
+                                   (void *) EINA_TRUE);
+   if (wd->pass_events)
+     evas_object_pass_events_set(wd->base, EINA_FALSE);
+}
+
+EAPI Evas_Object *
+elm_naviframe_add(Evas_Object *parent)
+{
+   Evas_Object *obj;
+   Evas *e;
+   Widget_Data *wd;
+
+   ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
+   ELM_SET_WIDTYPE(widtype, "naviframe");
+   elm_widget_type_set(obj, "naviframe");
+   elm_widget_sub_object_add(parent, obj);
+   elm_widget_data_set(obj, wd);
+   elm_widget_del_hook_set(obj, _del_hook);
+   elm_widget_disable_hook_set(obj, _disable_hook);
+   elm_widget_theme_hook_set(obj, _theme_hook);
+
+   //base
+   wd->base = edje_object_add(e);
+   elm_widget_resize_object_set(obj, wd->base);
+   _elm_theme_object_set(obj, wd->base, "naviframe", "base", "default");
+
+   evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move, obj);
+   evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, obj);
+   evas_object_smart_callbacks_descriptions_set(obj, _signals);
+
+   wd->pass_events = EINA_TRUE;
+
+   return obj;
+}
+
+EAPI Elm_Naviframe_Item *
+elm_naviframe_item_push(Evas_Object *obj, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd;
+   Elm_Naviframe_Item *prev_it, *it;
+
+   wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+
+   //create item
+   it = elm_widget_item_new(obj, Elm_Naviframe_Item);
+   if (!it)
+     {
+        ERR("Failed to allocate new item! : naviframe=%p", obj);
+        return NULL;
+     }
+   //item base layout
+   it->base.view = edje_object_add(evas_object_evas_get(obj));
+   evas_object_smart_member_add(it->base.view, wd->base);
+   elm_widget_sub_object_add(obj, it->base.view);
+   edje_object_signal_callback_add(it->base.view,
+                                   "elm,action,show,finished",
+                                   "",
+                                   _show_finished, it);
+   edje_object_signal_callback_add(it->base.view,
+                                   "elm,action,pushed,finished",
+                                   "",
+                                   _pushed_finished, it);
+   edje_object_signal_callback_add(it->base.view,
+                                   "elm,action,popped,finished",
+                                   "",
+                                   _popped_finished, it);
+   elm_naviframe_item_style_set(it, item_style);
+
+   //title
+   it->title = edje_object_add(evas_object_evas_get(obj));
+   elm_widget_sub_object_add(obj, it->title);
+   _elm_theme_object_set(obj,
+                         it->title, "naviframe",
+                         "title",
+                         elm_widget_style_get(obj));
+   edje_object_signal_callback_add(it->title,
+                                   "elm,action,clicked",
+                                   "elm",
+                                   _title_clicked, it);
+
+   elm_naviframe_item_title_label_set(it, title_label);
+
+   //title buttons
+   if ((!prev_btn) && (eina_list_count(wd->stack)))
+     {
+        prev_btn = _back_btn_new(obj);
+        _title_prev_btn_set(it, prev_btn, EINA_TRUE);
+     }
+   else
+     _title_prev_btn_set(it, prev_btn, EINA_FALSE);
+
+   _title_next_btn_set(it, next_btn);
+   edje_object_part_swallow(it->base.view, "elm.swallow.title", it->title);
+
+   elm_naviframe_item_content_set(it, content);
+
+   _item_sizing_eval(it);
+   evas_object_show(it->base.view);
+
+   prev_it = elm_naviframe_top_item_get(obj);
+   if (prev_it)
+     {
+        if (wd->pass_events)
+          evas_object_pass_events_set(wd->base, EINA_TRUE);
+        edje_object_signal_emit(prev_it->base.view,
+                                "elm,state,pushed",
+                                "elm");
+        edje_object_signal_emit(it->base.view,
+                                "elm,state,show",
+                                "elm");
+     }
+   else
+     edje_object_signal_emit(it->base.view, "elm,state,visible", "elm");
+   it->title_visible = EINA_TRUE;
+   wd->stack = eina_list_append(wd->stack, it);
+   return it;
+}
+
+EAPI Evas_Object *
+elm_naviframe_item_pop(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Elm_Naviframe_Item *it, *prev_it;
+   Widget_Data *wd;
+   Evas_Object *content = NULL;
+
+   wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+
+   it = elm_naviframe_top_item_get(obj);
+   if (!it) return NULL;
+   wd->stack = eina_list_remove(wd->stack, it);
+
+   if (wd->preserve)
+     content = it->content;
+
+   prev_it = elm_naviframe_top_item_get(obj);
+   if (prev_it)
+     {
+        if (wd->pass_events)
+          evas_object_pass_events_set(wd->base, EINA_TRUE);
+        evas_object_show(prev_it->base.view);
+        evas_object_raise(prev_it->base.view);
+        edje_object_signal_emit(prev_it->base.view,
+                                "elm,state,show",
+                                "elm");
+        edje_object_signal_emit(it->base.view, "elm,state,popped", "elm");
+     }
+   else
+     _item_del(it);
+
+   return content;
+}
+
+EAPI void
+elm_naviframe_content_preserve_on_pop_set(Evas_Object *obj, Eina_Bool preserve)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   wd->preserve = !!preserve;
+}
+
+EAPI Eina_Bool
+elm_naviframe_content_preserve_on_pop_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return EINA_FALSE;
+   return wd->preserve;
+}
+
+EAPI void
+elm_naviframe_item_content_set(Elm_Naviframe_Item *it, Evas_Object *content)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it);
+
+   if (it->content == content) return;
+   if (it->content) evas_object_del(it->content);
+   elm_widget_sub_object_add(it->base.widget, content);
+   edje_object_part_swallow(it->base.view, "elm.swallow.content", content);
+   if (content)
+     edje_object_signal_emit(it->base.view,
+                             "elm,state,content,show",
+                             "elm");
+   else
+     edje_object_signal_emit(it->base.view,
+                             "elm,state,content,hide",
+                             "elm");
+   evas_object_event_callback_add(content,
+                                  EVAS_CALLBACK_DEL,
+                                  _content_del,
+                                  it);
+   it->content = content;
+   _item_sizing_eval(it);
+}
+
+EAPI Evas_Object *
+elm_naviframe_item_content_get(const Elm_Naviframe_Item *it)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, NULL);
+   return it->content;
+}
+
+EAPI void
+elm_naviframe_item_title_label_set(Elm_Naviframe_Item *it, const char *label)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it);
+
+   edje_object_part_text_set(it->title, "elm.text.title", label);
+   if (label)
+     edje_object_signal_emit(it->title, "elm,state,title,show", "elm");
+   else
+     edje_object_signal_emit(it->title, "elm,state,title,hidew", "elm");
+
+   eina_stringshare_replace(&it->title_label, label);
+   _item_sizing_eval(it);
+}
+
+EAPI const char *
+elm_naviframe_item_title_label_get(const Elm_Naviframe_Item *it)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, NULL);
+   return it->title_label;
+}
+
+EAPI void
+elm_naviframe_item_subtitle_label_set(Elm_Naviframe_Item *it, const char *label)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it);
+
+   edje_object_part_text_set(it->title, "elm.text.subtitle", label);
+   if (label)
+     edje_object_signal_emit(it->title, "elm,state,subtitle,show", "elm");
+   else
+     edje_object_signal_emit(it->title, "elm,state,subtitle,hide", "elm");
+
+   eina_stringshare_replace(&it->title_sublabel, label);
+   _item_sizing_eval(it);
+}
+
+EAPI const char *
+elm_naviframe_item_subtitle_label_get(const Elm_Naviframe_Item *it)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, NULL);
+   return it->title_sublabel;
+}
+
+EAPI Elm_Naviframe_Item*
+elm_naviframe_top_item_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if ((!wd) || (!wd->stack)) return NULL;
+   return eina_list_last(wd->stack)->data;
+}
+
+EAPI Elm_Naviframe_Item*
+elm_naviframe_bottom_item_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return NULL;
+}
+
+EAPI void
+elm_naviframe_item_button_set(Elm_Naviframe_Item *it, Evas_Object *btn, Elm_Naviframe_Button_Type btn_type)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it);
+
+   switch(btn_type)
+     {
+        case ELM_NAVIFRAME_PREV_BUTTON:
+          _title_prev_btn_set(it, btn, EINA_FALSE);
+          break;
+        case ELM_NAVIFRAME_NEXT_BUTTON:
+          _title_next_btn_set(it, btn);
+          break;
+        default:
+          WRN("Button type is invalid! : naviframe=%p", it->base.widget);
+          break;
+     }
+   _item_sizing_eval(it);
+}
+
+EAPI Evas_Object *
+elm_naviframe_item_button_get(const Elm_Naviframe_Item *it, Elm_Naviframe_Button_Type btn_type)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, NULL);
+
+   switch(btn_type)
+     {
+        case ELM_NAVIFRAME_PREV_BUTTON:
+           return it->title_prev_btn;
+        case ELM_NAVIFRAME_NEXT_BUTTON:
+           return it->title_next_btn;
+        default:
+           WRN("Button type is invalid! : naviframe=%p", it->base.widget);
+           break;
+     }
+   return NULL;
+}
+
+EAPI void
+elm_naviframe_item_icon_set(Elm_Naviframe_Item *it, Evas_Object *icon)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it);
+
+   Widget_Data *wd = elm_widget_data_get(it->base.widget);
+   if (!wd) return;
+
+   if (it->title_icon == icon) return;
+   if (it->title_icon) evas_object_del(it->title_icon);
+   it->title_icon = icon;
+   if (!icon)
+     {
+        edje_object_signal_emit(it->title,
+                                "elm,state,icon,hide",
+                                "elm");
+        return;
+     }
+   elm_widget_sub_object_add(it->base.widget, icon);
+   edje_object_part_swallow(it->title, "elm.swallow.icon", icon);
+   edje_object_signal_emit(it->title, "elm,state,icon,show", "elm");
+
+   evas_object_event_callback_add(icon, EVAS_CALLBACK_DEL, _title_icon_del, it);
+   _item_sizing_eval(it);
+}
+
+EAPI Evas_Object *
+elm_naviframe_item_icon_get(const Elm_Naviframe_Item *it)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, NULL);
+   return it->title_icon;
+}
+
+EAPI void
+elm_naviframe_item_style_set(Elm_Naviframe_Item *it, const char *item_style)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it);
+
+   char buf[256];
+
+   if (!item_style) sprintf(buf, "item/basic");
+   else
+     {
+        if (strlen(item_style) > sizeof(buf))
+          WRN("too much long style name! : naviframe=%p", it->base.widget);
+        else
+          sprintf(buf, "item/%s", item_style);
+     }
+   _elm_theme_object_set(it->base.widget,
+                         it->base.view,
+                         "naviframe",
+                         buf,
+                         elm_widget_style_get(it->base.widget));
+}
+
+EAPI const char *
+elm_naviframe_item_style_get(const Elm_Naviframe_Item *it)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, NULL);
+   return it->style;
+}
+
+EAPI void
+elm_naviframe_item_title_visible_set(Elm_Naviframe_Item *it, Eina_Bool visible)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it);
+
+   visible = !!visible;
+   if (it->title_visible == visible) return;
+
+   if (visible)
+     edje_object_signal_emit(it->base.view, "elm,state,title,show", "elm");
+   else
+     edje_object_signal_emit(it->base.view, "elm,state,title,hide", "elm");
+
+   it->title_visible = visible;
+}
+
+EAPI Eina_Bool
+elm_naviframe_item_title_visible_get(const Elm_Naviframe_Item *it)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, EINA_FALSE);
+   return it->title_visible;
+}
+
+EAPI void
+elm_naviframe_item_extension_set(Elm_Naviframe_Item *it, const char *swallow, Evas_Object *extension)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it);
+   Evas_Object *prev;
+   if (!swallow)
+     {
+        WRN("swallow part should not be NULL! : naviframe=%p", it->base.widget);
+        return;
+     }
+   if (it->extension) evas_object_del(it->extension);
+   it->extension = extension;
+   if (!extension) return;
+   evas_object_event_callback_add(extension, EVAS_CALLBACK_DEL, _extension_del, it);
+   if (!edje_object_part_swallow(it->base.view, swallow, extension))
+     return;
+   elm_widget_sub_object_add(it->base.widget, extension);
+   edje_object_signal_emit(it->base.view,
+                           "elm,state,extension,show",
+                           "elm");
+   _sizing_eval(it->base.view);
+}
+
+EAPI Evas_Object *
+elm_naviframe_item_extension_unset(Elm_Naviframe_Item *it, const char *swallow)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, NULL);
+
+   Evas_Object *extension = it->extension;
+   if (!extension) return NULL;
+   edje_object_part_unswallow(it->base.view, extension);
+   elm_widget_sub_object_del(it->base.widget, extension);
+   evas_object_event_callback_del(extension, EVAS_CALLBACK_DEL, _extension_del);
+   edje_object_signal_emit(it->base.view,
+                           "elm,state,extension,hide",
+                           "elm");
+   _sizing_eval(it->base.widget);
+   it->extension = NULL;
+   return extension;
+}
+
+EAPI Evas_Object *
+elm_naviframe_item_extension_get(const Elm_Naviframe_Item *it, const char *swallow)
+{
+   ELM_NAVIFRAME_ITEM_CHECK_RETURN(it, NULL);
+   return edje_object_part_swallow_get(it->base.view, swallow);
+}