summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2018-04-12 21:42:38 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2018-04-19 23:40:06 +0900
commit6c65b6368ab021426dde708d1acf4c705c25f645 (patch)
tree3bb236f66c28e667d576ca4a1d1fd0bd2ad944df
parent7e8722be00f9ce7d1d9f5b43c622fb71baf2fe82 (diff)
efl_ui_navigation_bar: Add Efl.Ui.Navigation_Bar class
Efl.Ui.Navigation_Bar is a widget which provides a bar form useful for navigation.
-rw-r--r--data/elementary/themes/Makefile.am1
-rw-r--r--data/elementary/themes/default.edc1
-rw-r--r--data/elementary/themes/edc/efl/navigation_bar.edc114
-rw-r--r--src/Makefile_Elementary.am5
-rw-r--r--src/lib/elementary/Elementary.h3
-rw-r--r--src/lib/elementary/efl_ui_navigation_bar.c210
-rw-r--r--src/lib/elementary/efl_ui_navigation_bar.eo30
-rw-r--r--src/lib/elementary/efl_ui_navigation_bar_part.eo9
-rw-r--r--src/lib/elementary/efl_ui_navigation_bar_part_back_button.eo11
-rw-r--r--src/lib/elementary/efl_ui_navigation_bar_private.h20
-rw-r--r--src/lib/elementary/efl_ui_navigation_layout.eo1
11 files changed, 405 insertions, 0 deletions
diff --git a/data/elementary/themes/Makefile.am b/data/elementary/themes/Makefile.am
index a52bd65..565e050 100644
--- a/data/elementary/themes/Makefile.am
+++ b/data/elementary/themes/Makefile.am
@@ -1022,6 +1022,7 @@ elementary/themes/edc/efl/uiclock.edc \
1022elementary/themes/edc/efl/cursor.edc \ 1022elementary/themes/edc/efl/cursor.edc \
1023elementary/themes/edc/efl/focus.edc \ 1023elementary/themes/edc/efl/focus.edc \
1024elementary/themes/edc/efl/frame.edc \ 1024elementary/themes/edc/efl/frame.edc \
1025elementary/themes/edc/efl/navigation_bar.edc \
1025elementary/themes/edc/efl/navigation_layout.edc \ 1026elementary/themes/edc/efl/navigation_layout.edc \
1026elementary/themes/edc/efl/multibuttonentry.edc \ 1027elementary/themes/edc/efl/multibuttonentry.edc \
1027elementary/themes/edc/efl/nstate.edc \ 1028elementary/themes/edc/efl/nstate.edc \
diff --git a/data/elementary/themes/default.edc b/data/elementary/themes/default.edc
index 29733f6..a677be4 100644
--- a/data/elementary/themes/default.edc
+++ b/data/elementary/themes/default.edc
@@ -168,6 +168,7 @@ collections {
168#include "edc/efl/bg.edc" 168#include "edc/efl/bg.edc"
169#include "edc/efl/button.edc" 169#include "edc/efl/button.edc"
170#include "edc/efl/calendar.edc" 170#include "edc/efl/calendar.edc"
171#include "edc/efl/navigation_bar.edc"
171#include "edc/efl/navigation_layout.edc" 172#include "edc/efl/navigation_layout.edc"
172#include "edc/efl/nstate.edc" 173#include "edc/efl/nstate.edc"
173// XXX: mobile mode needs invisible scrollers... make signals that do this 174// XXX: mobile mode needs invisible scrollers... make signals that do this
diff --git a/data/elementary/themes/edc/efl/navigation_bar.edc b/data/elementary/themes/edc/efl/navigation_bar.edc
new file mode 100644
index 0000000..212ddd8
--- /dev/null
+++ b/data/elementary/themes/edc/efl/navigation_bar.edc
@@ -0,0 +1,114 @@
1//Efl.Ui.Navigation_Bar Themes
2group { "efl/navigation_bar";
3 styles {
4 style { name: "navigation_bar_text";
5 base: "font="FNBD" font_size=10 text_class=label align=center color=#fff color_class=navigation_bar_text style=shadow,bottom shadow_color=#00000080 ellipsis=1.0 wrap=mixed";
6 tag: "br" "\n";
7 tag: "hilight" "+ font="FNBD" text_class=label_light";
8 tag: "b" "+ font="FNBD" text_class=label_light";
9 tag: "whitecolor" "+ color=#fff";
10 tag: "tab" "\t";
11 }
12 }
13 parts {
14 spacer { "base";
15 desc { "default";
16 }
17 }
18 swallow { "back_button";
19 desc { "default";
20 fixed: 1 0;
21 min: 0 0;
22 max: 0 -1;
23 rel.to: "base";
24 rel2.relative: 0.0 1.0;
25 align: 0.0 0.5;
26 hid;
27 }
28 desc { "visible";
29 inherit: "default";
30 min: 40 0;
31 max: 40 -1;
32 vis;
33 }
34 }
35 swallow { "left_content";
36 desc { "default";
37 rel.to: "base";
38 rel2.relative: 0.0 1.0;
39 align: 0.0 0.5;
40 }
41 }
42 swallow { "right_content";
43 desc { "default";
44 rel.to: "base";
45 rel1.relative: 1.0 0.0;
46 align: 1.0 0.5;
47 }
48 }
49 spacer { "text_base";
50 desc { "default";
51 rel1 {
52 to: "back_button";
53 relative: 1.0 0.0;
54 }
55 rel2 {
56 to: "right_content";
57 relative: 0.0 1.0;
58 }
59 }
60 desc { "left_content";
61 inherit: "default";
62 rel1 {
63 to: "left_content";
64 relative: 1.0 0.0;
65 }
66 }
67 }
68 textblock { "text";
69 scale;
70 desc { "default";
71 text {
72 style: "navigation_bar_text";
73 }
74 rel.to: "text_base";
75 }
76 }
77 programs {
78 program {
79 signal: "elm,state,back_button,visible"; source: "elm";
80 action: STATE_SET "visible" 0.0;
81 target: "back_button";
82 }
83 program {
84 signal: "elm,state,back_button,hidden"; source: "elm";
85 action: STATE_SET "default" 0.0;
86 target: "back_button";
87 }
88 program {
89 signal: "elm,state,left_content,visible"; source: "elm";
90 action: STATE_SET "left_content" 0.0;
91 target: "text_base";
92 }
93 program {
94 signal: "elm,state,left_content,hidden"; source: "elm";
95 action: STATE_SET "default" 0.0;
96 target: "text_base";
97 }
98 }
99 }
100}
101
102group { name: "efl/navigation_bar/back_button";
103 inherit: "efl/button";
104 images.image: "icon_arrow_left.png" COMP;
105 parts {
106 image { name: "icon_arrow_left";
107 insert_before: "elm.swallow.content";
108 desc { "default";
109 image.normal: "icon_arrow_left.png";
110 fill.smooth: 0;
111 }
112 }
113 }
114}
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index e86f93d..b42a0ce 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -16,6 +16,9 @@ elm_public_eolian_files = \
16 lib/elementary/efl_ui_image_zoomable.eo \ 16 lib/elementary/efl_ui_image_zoomable.eo \
17 lib/elementary/efl_ui_layout.eo \ 17 lib/elementary/efl_ui_layout.eo \
18 lib/elementary/efl_ui_nstate.eo \ 18 lib/elementary/efl_ui_nstate.eo \
19 lib/elementary/efl_ui_navigation_bar.eo \
20 lib/elementary/efl_ui_navigation_bar_part.eo \
21 lib/elementary/efl_ui_navigation_bar_part_back_button.eo \
19 lib/elementary/efl_ui_navigation_layout.eo \ 22 lib/elementary/efl_ui_navigation_layout.eo \
20 lib/elementary/efl_ui_panes.eo \ 23 lib/elementary/efl_ui_panes.eo \
21 lib/elementary/efl_ui_progressbar.eo \ 24 lib/elementary/efl_ui_progressbar.eo \
@@ -352,6 +355,7 @@ includesunstable_HEADERS = \
352 lib/elementary/elm_widget_menu.h \ 355 lib/elementary/elm_widget_menu.h \
353 lib/elementary/elm_widget_multibuttonentry.h \ 356 lib/elementary/elm_widget_multibuttonentry.h \
354 lib/elementary/elm_widget_naviframe.h \ 357 lib/elementary/elm_widget_naviframe.h \
358 lib/elementary/efl_ui_navigation_bar_private.h \
355 lib/elementary/efl_ui_navigation_layout_private.h \ 359 lib/elementary/efl_ui_navigation_layout_private.h \
356 lib/elementary/elm_widget_notify.h \ 360 lib/elementary/elm_widget_notify.h \
357 lib/elementary/elm_widget_panel.h \ 361 lib/elementary/elm_widget_panel.h \
@@ -627,6 +631,7 @@ lib_elementary_libelementary_la_SOURCES = \
627 lib/elementary/elc_hoversel.c \ 631 lib/elementary/elc_hoversel.c \
628 lib/elementary/elc_multibuttonentry.c \ 632 lib/elementary/elc_multibuttonentry.c \
629 lib/elementary/elc_naviframe.c \ 633 lib/elementary/elc_naviframe.c \
634 lib/elementary/efl_ui_navigation_bar.c \
630 lib/elementary/efl_ui_navigation_layout.c \ 635 lib/elementary/efl_ui_navigation_layout.c \
631 lib/elementary/elc_player.c \ 636 lib/elementary/elc_player.c \
632 lib/elementary/elc_popup.c \ 637 lib/elementary/elc_popup.c \
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 38b814c..76b9b0a 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -336,6 +336,9 @@ typedef Eo Efl_Ui_Focus_Manager;
336# include <efl_selection.eo.h> 336# include <efl_selection.eo.h>
337# include <efl_ui_dnd.eo.h> 337# include <efl_ui_dnd.eo.h>
338# include <efl_ui_dnd_container.eo.h> 338# include <efl_ui_dnd_container.eo.h>
339# include <efl_ui_navigation_bar.eo.h>
340# include <efl_ui_navigation_bar_part.eo.h>
341# include <efl_ui_navigation_bar_part_back_button.eo.h>
339# include <efl_ui_navigation_layout.eo.h> 342# include <efl_ui_navigation_layout.eo.h>
340# include <efl_ui_stack.eo.h> 343# include <efl_ui_stack.eo.h>
341#endif 344#endif
diff --git a/src/lib/elementary/efl_ui_navigation_bar.c b/src/lib/elementary/efl_ui_navigation_bar.c
new file mode 100644
index 0000000..911f338
--- /dev/null
+++ b/src/lib/elementary/efl_ui_navigation_bar.c
@@ -0,0 +1,210 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#include <Elementary.h>
6
7#include "elm_priv.h"
8#include "efl_ui_navigation_bar_private.h"
9#include "efl_ui_navigation_bar_part.eo.h"
10#include "elm_part_helper.h"
11
12#define MY_CLASS EFL_UI_NAVIGATION_BAR_CLASS
13#define MY_CLASS_NAME "Efl.Ui.Navigation_Bar"
14
15static void
16_back_button_clicked_cb(void *data, const Efl_Event *ev EINA_UNUSED)
17{
18 Eo *navigation_bar = data;
19
20 Eo *stack = efl_provider_find(navigation_bar, EFL_UI_STACK_CLASS);
21 if (!stack)
22 {
23 ERR("Cannot find EFL_UI_STACK_CLASS instance!");
24 return;
25 }
26
27 efl_ui_stack_pop(stack);
28}
29
30EOLIAN static Eo *
31_efl_ui_navigation_bar_efl_object_constructor(Eo *obj, Efl_Ui_Navigation_Bar_Data *pd)
32{
33 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
34
35 if (!elm_widget_theme_klass_get(obj))
36 elm_widget_theme_klass_set(obj, "navigation_bar");
37 obj = efl_constructor(efl_super(obj, MY_CLASS));
38 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
39
40 elm_widget_sub_object_parent_add(obj);
41
42 elm_widget_can_focus_set(obj, EINA_TRUE);
43 if (!elm_widget_theme_object_set(obj, wd->resize_obj,
44 elm_widget_theme_klass_get(obj),
45 elm_widget_theme_element_get(obj),
46 elm_widget_theme_style_get(obj)))
47 CRI("Failed to set layout!");
48
49 Eo *back_button = efl_add(EFL_UI_BUTTON_CLASS, obj,
50 elm_widget_element_update(obj, efl_added, "back_button"),
51 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _back_button_clicked_cb, obj),
52 efl_gfx_visible_set(efl_added, EINA_FALSE));
53
54 pd->back_button = back_button;
55
56 return obj;
57}
58
59
60/* Standard widget overrides */
61ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_navigation_bar, Efl_Ui_Navigation_Bar_Data)
62ELM_PART_TEXT_DEFAULT_GET(efl_ui_navigation_bar, "text")
63ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_navigation_bar, Efl_Ui_Navigation_Bar_Data)
64
65#define EFL_UI_NAVIGATION_BAR_EXTRA_OPS \
66ELM_PART_TEXT_DEFAULT_OPS(efl_ui_navigation_bar)
67
68static Eina_Bool
69_efl_ui_navigation_bar_content_set(Eo *obj, Efl_Ui_Navigation_Bar_Data *_pd EINA_UNUSED, const char *part, Efl_Gfx *content)
70{
71 if (eina_streq(part, "left_content"))
72 {
73 if (content)
74 efl_layout_signal_emit(obj, "elm,state,left_content,visible", "elm");
75 else
76 efl_layout_signal_emit(obj, "elm,state,left_content,hidden", "elm");
77 efl_layout_signal_process(obj, EINA_FALSE);
78 }
79 return efl_content_set(efl_part(efl_super(obj, MY_CLASS), part), content);
80}
81
82static Efl_Gfx *
83_efl_ui_navigation_bar_content_get(const Eo *obj, Efl_Ui_Navigation_Bar_Data *_pd EINA_UNUSED, const char *part)
84{
85 return efl_content_get(efl_part(efl_super(obj, MY_CLASS), part));
86}
87
88static Efl_Gfx *
89_efl_ui_navigation_bar_content_unset(Eo *obj, Efl_Ui_Navigation_Bar_Data *_pd EINA_UNUSED, const char *part)
90{
91 if (eina_streq(part, "left_content"))
92 {
93 efl_layout_signal_emit(obj, "elm,state,left_content,hidden", "elm");
94 efl_layout_signal_process(obj, EINA_FALSE);
95 }
96 return efl_content_unset(efl_part(efl_super(obj, MY_CLASS), part));
97}
98
99
100/* Efl.Part begin */
101EOLIAN static Efl_Object *
102_efl_ui_navigation_bar_efl_part_part(const Eo *obj, Efl_Ui_Navigation_Bar_Data *priv EINA_UNUSED, const char *part)
103{
104 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
105
106 if (eina_streq(part, "back_button"))
107 return ELM_PART_IMPLEMENT(EFL_UI_NAVIGATION_BAR_PART_BACK_BUTTON_CLASS, obj, part);
108 else if (eina_streq(part, "left_content") || eina_streq(part, "right_content"))
109 return ELM_PART_IMPLEMENT(EFL_UI_NAVIGATION_BAR_PART_CLASS, obj, part);
110
111 return efl_part(efl_super(obj, MY_CLASS), part);
112}
113
114EOLIAN static void
115_efl_ui_navigation_bar_part_back_button_efl_gfx_visible_set(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool visible)
116{
117 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
118 EFL_UI_NAVIGATION_BAR_DATA_GET_OR_RETURN(pd->obj, ppd);
119
120 if (visible)
121 {
122 if (!efl_content_set(efl_part(efl_super(pd->obj, MY_CLASS), "back_button"), ppd->back_button))
123 ERR("Part for back button(i.e. \"back_button\") does not exist!");
124 else
125 efl_layout_signal_emit(pd->obj, "elm,state,back_button,visible", "elm");
126 }
127 else
128 {
129 efl_content_unset(efl_part(efl_super(pd->obj, MY_CLASS), "back_button"));
130 efl_gfx_visible_set(ppd->back_button, visible);
131 efl_layout_signal_emit(pd->obj, "elm,state,back_button,hidden", "elm");
132 }
133
134 efl_layout_signal_process(pd->obj, EINA_FALSE);
135}
136
137EOLIAN static Eina_Bool
138_efl_ui_navigation_bar_part_back_button_efl_gfx_visible_get(const Eo *obj, void *_pd EINA_UNUSED)
139{
140 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
141 EFL_UI_NAVIGATION_BAR_DATA_GET_OR_RETURN(pd->obj, ppd, EINA_FALSE);
142
143 return efl_gfx_visible_get(ppd->back_button);
144}
145
146EOLIAN static void
147_efl_ui_navigation_bar_part_back_button_efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *label)
148{
149 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
150 EFL_UI_NAVIGATION_BAR_DATA_GET_OR_RETURN(pd->obj, ppd);
151
152 efl_text_set(ppd->back_button, label);
153}
154
155EOLIAN static const char *
156_efl_ui_navigation_bar_part_back_button_efl_text_text_get(const Eo *obj, void *_pd EINA_UNUSED)
157{
158 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
159 EFL_UI_NAVIGATION_BAR_DATA_GET_OR_RETURN(pd->obj, ppd, EINA_FALSE);
160
161 return efl_text_get(ppd->back_button);
162}
163
164static Eina_Bool
165_efl_ui_navigation_bar_part_back_button_efl_content_content_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *content)
166{
167 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
168 EFL_UI_NAVIGATION_BAR_DATA_GET_OR_RETURN(pd->obj, ppd, EINA_FALSE);
169
170 if (content == ppd->back_button) return EINA_FALSE;
171
172 efl_event_callback_add(content, EFL_UI_EVENT_CLICKED, _back_button_clicked_cb, pd->obj);
173 ppd->back_button = content;
174
175 return _efl_ui_navigation_bar_content_set(pd->obj, ppd, pd->part, content);
176}
177
178static Efl_Gfx*
179_efl_ui_navigation_bar_part_back_button_efl_content_content_get(const Eo *obj, void *_pd EINA_UNUSED)
180{
181 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
182 EFL_UI_NAVIGATION_BAR_DATA_GET_OR_RETURN(pd->obj, ppd, NULL);
183
184 return _efl_ui_navigation_bar_content_get(pd->obj, ppd, pd->part);
185}
186
187static Efl_Gfx*
188_efl_ui_navigation_bar_part_back_button_efl_content_content_unset(Eo *obj, void *_pd EINA_UNUSED)
189{
190 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
191 EFL_UI_NAVIGATION_BAR_DATA_GET_OR_RETURN(pd->obj, ppd, NULL);
192
193 efl_event_callback_del(ppd->back_button, EFL_UI_EVENT_CLICKED, _back_button_clicked_cb, pd->obj);
194 ppd->back_button = NULL;
195
196 return _efl_ui_navigation_bar_content_unset(pd->obj, ppd, pd->part);
197}
198
199ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_navigation_bar, EFL_UI_NAVIGATION_BAR, Efl_Ui_Navigation_Bar_Data)
200ELM_PART_OVERRIDE_CONTENT_GET(efl_ui_navigation_bar, EFL_UI_NAVIGATION_BAR, Efl_Ui_Navigation_Bar_Data)
201ELM_PART_OVERRIDE_CONTENT_UNSET(efl_ui_navigation_bar, EFL_UI_NAVIGATION_BAR, Efl_Ui_Navigation_Bar_Data)
202#include "efl_ui_navigation_bar_part.eo.c"
203/* Efl.Part end */
204
205
206/* Efl.Part Back_Button begin */
207#include "efl_ui_navigation_bar_part_back_button.eo.c"
208/* Efl.Part Back_Button end */
209
210#include "efl_ui_navigation_bar.eo.c"
diff --git a/src/lib/elementary/efl_ui_navigation_bar.eo b/src/lib/elementary/efl_ui_navigation_bar.eo
new file mode 100644
index 0000000..764eaa8
--- /dev/null
+++ b/src/lib/elementary/efl_ui_navigation_bar.eo
@@ -0,0 +1,30 @@
1class Efl.Ui.Navigation_Bar (Efl.Ui.Layout, Efl.Content, Efl.Text, Efl.Ui.Translatable)
2{
3 [[Navigation_Bar widget.
4
5 Navigation_Bar widget provides a bar form useful for navigation.
6 Navigation_Bar has a back button which is used to navigate to the previous
7 content in the stack.
8 ]]
9 parts {
10 back_button: Efl.Ui.Navigation_Bar.Part_Back_Button;
11 [[Back button to navigate to the previous content in the stack.
12
13 The back button works only if the Navigation_Bar widget is contained
14 in the Stack widget(Efl.Ui.Stack class).
15 e.g. The Navigation_Bar widget is set in the Navigation_Layout widget
16 and the Navigation_Layout widget is pushed to the Stack widget.
17
18 The back button is hidden by default and it can be visible.
19 e.g. efl_gfx_visible_set(efl_part(navigation_bar, "back_button"), EINA_TRUE);
20 ]]
21 }
22 implements {
23 Efl.Object.constructor;
24 Efl.Content.content { set; get; }
25 Efl.Content.content_unset;
26 Efl.Text.text { set; get; }
27 Efl.Ui.Translatable.translatable_text { set; get; }
28 Efl.Part.part;
29 }
30}
diff --git a/src/lib/elementary/efl_ui_navigation_bar_part.eo b/src/lib/elementary/efl_ui_navigation_bar_part.eo
new file mode 100644
index 0000000..461e82c
--- /dev/null
+++ b/src/lib/elementary/efl_ui_navigation_bar_part.eo
@@ -0,0 +1,9 @@
1class Efl.Ui.Navigation_Bar.Part (Efl.Ui.Layout.Part_Content)
2{
3 [[Efl UI Navigation_Bar internal part class]]
4 data: null;
5 implements {
6 Efl.Content.content { set; get; }
7 Efl.Content.content_unset;
8 }
9}
diff --git a/src/lib/elementary/efl_ui_navigation_bar_part_back_button.eo b/src/lib/elementary/efl_ui_navigation_bar_part_back_button.eo
new file mode 100644
index 0000000..9001768
--- /dev/null
+++ b/src/lib/elementary/efl_ui_navigation_bar_part_back_button.eo
@@ -0,0 +1,11 @@
1class Efl.Ui.Navigation_Bar.Part_Back_Button (Efl.Ui.Widget.Part, Efl.Ui.Button)
2{
3 [[Efl Ui Navigation_Bar internal part back button class]]
4 data: null;
5 implements {
6 Efl.Gfx.visible { set; get; }
7 Efl.Text.text { set; get; }
8 Efl.Content.content { set; get; }
9 Efl.Content.content_unset;
10 }
11}
diff --git a/src/lib/elementary/efl_ui_navigation_bar_private.h b/src/lib/elementary/efl_ui_navigation_bar_private.h
new file mode 100644
index 0000000..a4ba779
--- /dev/null
+++ b/src/lib/elementary/efl_ui_navigation_bar_private.h
@@ -0,0 +1,20 @@
1#ifndef EFL_UI_WIDGET_NAVIGATION_BAR_H
2#define EFL_UI_WIDGET_NAVIGATION_BAR_H
3
4typedef struct _Efl_Ui_Navigation_Bar_Data Efl_Ui_Navigation_Bar_Data;
5struct _Efl_Ui_Navigation_Bar_Data
6{
7 Eo *back_button;
8};
9
10#define EFL_UI_NAVIGATION_BAR_DATA_GET_OR_RETURN(o, ptr, ...) \
11 Efl_Ui_Navigation_Bar_Data *ptr; \
12 ptr = efl_data_scope_get(o, EFL_UI_NAVIGATION_BAR_CLASS); \
13 if (EINA_UNLIKELY(!ptr)) \
14 { \
15 CRI("no ui frame navigation data for object %p (%s)", \
16 o, evas_object_type_get(o)); \
17 return __VA_ARGS__; \
18 }
19
20#endif
diff --git a/src/lib/elementary/efl_ui_navigation_layout.eo b/src/lib/elementary/efl_ui_navigation_layout.eo
index aea7b8b..846fbf6 100644
--- a/src/lib/elementary/efl_ui_navigation_layout.eo
+++ b/src/lib/elementary/efl_ui_navigation_layout.eo
@@ -9,6 +9,7 @@ class Efl.Ui.Navigation_Layout (Efl.Ui.Layout, Efl.Content)
9 methods { 9 methods {
10 @property bar { 10 @property bar {
11 [[The bar object which is located at the top area as a title. 11 [[The bar object which is located at the top area as a title.
12 e.g. Navigation_Bar widget(Efl.Ui.Navigation_Bar) can be used as $bar.
12 ]] 13 ]]
13 set { 14 set {
14 } 15 }