summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYossi Kantor <yossi.kantor@samsung.com>2014-07-23 13:39:25 +0300
committerYossi Kantor <yossi.kantor@samsung.com>2014-08-03 14:50:41 +0300
commit28c452eab1d5e60d269b07e2c8fa321ea8fa9a00 (patch)
tree4c8af4fa73b710a0bc8385db0b0224708a4a558b
parent1b12200eaf8942aecdf924d52b26159e7e0574c8 (diff)
Integration of Naviframe Itemdevs/yossik/object_item_eo_migration
-rw-r--r--src/lib/Makefile.am7
-rw-r--r--src/lib/elc_naviframe.c713
-rw-r--r--src/lib/elm_naviframe_item.eo111
-rw-r--r--src/lib/elm_widget_naviframe.h33
4 files changed, 539 insertions, 325 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 4440bf281..50c9adfbe 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -796,7 +796,9 @@ BUILT_SOURCES = \
796 elm_index_item.eo.c \ 796 elm_index_item.eo.c \
797 elm_index_item.eo.h \ 797 elm_index_item.eo.h \
798 elm_multibuttonentry_item.eo.c \ 798 elm_multibuttonentry_item.eo.c \
799 elm_multibuttonentry_item.eo.h 799 elm_multibuttonentry_item.eo.h \
800 elm_naviframe_item.eo.c \
801 elm_naviframe_item.eo.h
800 802
801elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@ 803elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@
802elementaryeolianfiles_DATA = \ 804elementaryeolianfiles_DATA = \
@@ -899,7 +901,8 @@ elementaryeolianfiles_DATA = \
899 elm_menu_item.eo \ 901 elm_menu_item.eo \
900 elm_ctxpopup_item.eo \ 902 elm_ctxpopup_item.eo \
901 elm_index_item.eo \ 903 elm_index_item.eo \
902 elm_multibuttonentry_item.eo 904 elm_multibuttonentry_item.eo \
905 elm_naviframe_item.eo
903 906
904EXTRA_DIST += \ 907EXTRA_DIST += \
905 ${elementaryeolianfiles_DATA} 908 ${elementaryeolianfiles_DATA}
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index 14d58a2b6..2d7ff5d61 100644
--- a/src/lib/elc_naviframe.c
+++ b/src/lib/elc_naviframe.c
@@ -47,21 +47,23 @@ static const Elm_Action key_actions[] = {
47}; 47};
48 48
49static void 49static void
50_resize_object_reset(Evas_Object *obj, Elm_Naviframe_Item *it) 50_resize_object_reset(Evas_Object *obj, Elm_Widobj_Item *eo_item)
51{ 51{
52 if (it) 52 if (eo_item)
53 { 53 {
54 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
54 elm_widget_resize_object_set(obj, VIEW(it), EINA_FALSE); 55 elm_widget_resize_object_set(obj, VIEW(it), EINA_FALSE);
55 evas_object_raise(VIEW(it)); 56 evas_object_raise(VIEW(it));
56 } 57 }
57} 58}
58 59
59static void 60static void
60_prev_page_focus_recover(Elm_Naviframe_Item *it) 61_prev_page_focus_recover(Elm_Widobj_Item *eo_item)
61{ 62{
62 Evas_Object *newest; 63 Evas_Object *newest;
63 unsigned int order = 0; 64 unsigned int order = 0;
64 65
66 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
65 newest = elm_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE); 67 newest = elm_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE);
66 if (newest) 68 if (newest)
67 elm_object_focus_set(newest, EINA_TRUE); 69 elm_object_focus_set(newest, EINA_TRUE);
@@ -77,10 +79,11 @@ _prev_page_focus_recover(Elm_Naviframe_Item *it)
77EOLIAN static Eina_Bool 79EOLIAN static Eina_Bool
78_elm_naviframe_elm_widget_translate(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd) 80_elm_naviframe_elm_widget_translate(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd)
79{ 81{
80 Elm_Naviframe_Item *it; 82 Elm_Widobj_Item *it;
83 Eina_List *l;
81 84
82 EINA_INLIST_FOREACH(sd->stack, it) 85 EINA_LIST_FOREACH(sd->stack, l, it)
83 elm_widget_item_translate(it); 86 eo_do(it, elm_wdg_item_translate());
84 87
85 eo_do_super(obj, MY_CLASS, elm_obj_widget_translate()); 88 eo_do_super(obj, MY_CLASS, elm_obj_widget_translate());
86 89
@@ -93,8 +96,7 @@ _item_content_del_cb(void *data,
93 Evas_Object *obj EINA_UNUSED, 96 Evas_Object *obj EINA_UNUSED,
94 void *event_info EINA_UNUSED) 97 void *event_info EINA_UNUSED)
95{ 98{
96 Elm_Naviframe_Item *it = data; 99 ELM_NAVIFRAME_ITEM_DATA_GET((Elm_Widobj_Item *)data, it);
97
98 it->content = NULL; 100 it->content = NULL;
99 elm_object_signal_emit(VIEW(it), "elm,state,content,hide", "elm"); 101 elm_object_signal_emit(VIEW(it), "elm,state,content,hide", "elm");
100} 102}
@@ -105,7 +107,7 @@ _item_title_prev_btn_del_cb(void *data,
105 Evas_Object *obj EINA_UNUSED, 107 Evas_Object *obj EINA_UNUSED,
106 void *event_info EINA_UNUSED) 108 void *event_info EINA_UNUSED)
107{ 109{
108 Elm_Naviframe_Item *it = data; 110 ELM_NAVIFRAME_ITEM_DATA_GET((Elm_Widobj_Item *)data, it);
109 111
110 it->title_prev_btn = NULL; 112 it->title_prev_btn = NULL;
111 elm_object_signal_emit(VIEW(it), "elm,state,prev_btn,hide", "elm"); 113 elm_object_signal_emit(VIEW(it), "elm,state,prev_btn,hide", "elm");
@@ -117,7 +119,7 @@ _item_title_next_btn_del_cb(void *data,
117 Evas_Object *obj EINA_UNUSED, 119 Evas_Object *obj EINA_UNUSED,
118 void *event_info EINA_UNUSED) 120 void *event_info EINA_UNUSED)
119{ 121{
120 Elm_Naviframe_Item *it = data; 122 ELM_NAVIFRAME_ITEM_DATA_GET((Elm_Widobj_Item *)data, it);
121 123
122 it->title_next_btn = NULL; 124 it->title_next_btn = NULL;
123 elm_object_signal_emit(VIEW(it), "elm,state,next_btn,hide", "elm"); 125 elm_object_signal_emit(VIEW(it), "elm,state,next_btn,hide", "elm");
@@ -129,7 +131,7 @@ _item_title_icon_del_cb(void *data,
129 Evas_Object *obj EINA_UNUSED, 131 Evas_Object *obj EINA_UNUSED,
130 void *event_info EINA_UNUSED) 132 void *event_info EINA_UNUSED)
131{ 133{
132 Elm_Naviframe_Item *it = data; 134 ELM_NAVIFRAME_ITEM_DATA_GET((Elm_Widobj_Item *)data, it);
133 135
134 it->title_icon = NULL; 136 it->title_icon = NULL;
135 elm_object_signal_emit(VIEW(it), "elm,state,icon,hide", "elm"); 137 elm_object_signal_emit(VIEW(it), "elm,state,icon,hide", "elm");
@@ -143,8 +145,10 @@ _title_content_del(void *data,
143{ 145{
144 char buf[1024]; 146 char buf[1024];
145 Elm_Naviframe_Content_Item_Pair *pair = data; 147 Elm_Naviframe_Content_Item_Pair *pair = data;
146 Elm_Naviframe_Item *it = pair->it; 148 Elm_Widobj_Item *eo_item = pair->it;
147 snprintf(buf, sizeof(buf), "elm,state,%s,hide", pair->part); 149 snprintf(buf, sizeof(buf), "elm,state,%s,hide", pair->part);
150
151 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
148 elm_object_signal_emit(VIEW(it), buf, "elm"); 152 elm_object_signal_emit(VIEW(it), buf, "elm");
149 it->content_list = eina_inlist_remove(it->content_list, 153 it->content_list = eina_inlist_remove(it->content_list,
150 EINA_INLIST_GET(pair)); 154 EINA_INLIST_GET(pair));
@@ -153,12 +157,13 @@ _title_content_del(void *data,
153} 157}
154 158
155static void 159static void
156_item_free(Elm_Naviframe_Item *it) 160_item_free(Elm_Widobj_Item *eo_item)
157{ 161{
158 Eina_Inlist *l; 162 Eina_Inlist *l;
159 Elm_Naviframe_Content_Item_Pair *content_pair; 163 Elm_Naviframe_Content_Item_Pair *content_pair;
160 Elm_Naviframe_Text_Item_Pair *text_pair; 164 Elm_Naviframe_Text_Item_Pair *text_pair;
161 165
166 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
162 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); 167 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
163 168
164 eina_stringshare_del(it->style); 169 eina_stringshare_del(it->style);
@@ -197,10 +202,12 @@ _item_free(Elm_Naviframe_Item *it)
197} 202}
198 203
199static void 204static void
200_item_content_signals_emit(Elm_Naviframe_Item *it) 205_item_content_signals_emit(Elm_Widobj_Item *eo_item)
201{ 206{
202 Elm_Naviframe_Content_Item_Pair *content_pair; 207 Elm_Naviframe_Content_Item_Pair *content_pair;
203 char buf[1024]; 208 char buf[1024];
209
210 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
204 //content 211 //content
205 if (it->content) 212 if (it->content)
206 elm_object_signal_emit(VIEW(it), "elm,state,content,show", "elm"); 213 elm_object_signal_emit(VIEW(it), "elm,state,content,show", "elm");
@@ -235,11 +242,12 @@ _item_content_signals_emit(Elm_Naviframe_Item *it)
235} 242}
236 243
237static void 244static void
238_item_text_signals_emit(Elm_Naviframe_Item *it) 245_item_text_signals_emit(Elm_Widobj_Item *eo_item)
239{ 246{
240 Elm_Naviframe_Text_Item_Pair *text_pair; 247 Elm_Naviframe_Text_Item_Pair *text_pair;
241 char buf[1024]; 248 char buf[1024];
242 249
250 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
243 if ((it->title_label) && (it->title_label[0])) 251 if ((it->title_label) && (it->title_label[0]))
244 elm_object_signal_emit(VIEW(it), "elm,state,title_label,show", "elm"); 252 elm_object_signal_emit(VIEW(it), "elm,state,title_label,show", "elm");
245 else 253 else
@@ -261,10 +269,11 @@ _item_text_signals_emit(Elm_Naviframe_Item *it)
261} 269}
262 270
263static Evas_Object * 271static Evas_Object *
264_access_object_get(Elm_Naviframe_Item *it, const char* part) 272_access_object_get(Elm_Widobj_Item *eo_item, const char* part)
265{ 273{
266 Evas_Object *po, *ao; 274 Evas_Object *po, *ao;
267 275
276 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
268 po = (Evas_Object *)edje_object_part_object_get 277 po = (Evas_Object *)edje_object_part_object_get
269 (elm_layout_edje_get(VIEW(it)), part); 278 (elm_layout_edje_get(VIEW(it)), part);
270 ao = evas_object_data_get(po, "_part_access_obj"); 279 ao = evas_object_data_get(po, "_part_access_obj");
@@ -273,7 +282,7 @@ _access_object_get(Elm_Naviframe_Item *it, const char* part)
273} 282}
274 283
275static void 284static void
276_item_signals_emit(Elm_Naviframe_Item *it) 285_item_signals_emit(Elm_Widobj_Item *it)
277{ 286{
278 _item_text_signals_emit(it); 287 _item_text_signals_emit(it);
279 _item_content_signals_emit(it); 288 _item_content_signals_emit(it);
@@ -282,11 +291,12 @@ _item_signals_emit(Elm_Naviframe_Item *it)
282/* FIXME: we need to handle the case when this function is called 291/* FIXME: we need to handle the case when this function is called
283 * during a transition */ 292 * during a transition */
284static void 293static void
285_item_style_set(Elm_Naviframe_Item *it, 294_item_style_set(Elm_Widobj_Item *eo_item,
286 const char *item_style) 295 const char *item_style)
287{ 296{
288 char buf[256]; 297 char buf[256];
289 298
299 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
290 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); 300 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
291 301
292 if (!item_style) 302 if (!item_style)
@@ -314,14 +324,14 @@ _on_item_title_transition_finished(void *data,
314 const char *emission EINA_UNUSED, 324 const char *emission EINA_UNUSED,
315 const char *source EINA_UNUSED) 325 const char *source EINA_UNUSED)
316{ 326{
317 Elm_Naviframe_Item *it = data; 327 ELM_NAVIFRAME_ITEM_DATA_GET((Elm_Widobj_Item *)data, it);
318
319 evas_object_smart_callback_call(WIDGET(it), SIG_TITLE_TRANSITION_FINISHED, data); 328 evas_object_smart_callback_call(WIDGET(it), SIG_TITLE_TRANSITION_FINISHED, data);
320} 329}
321 330
322static void 331static void
323_item_title_enabled_update(Elm_Naviframe_Item *nit, Eina_Bool transition) 332_item_title_enabled_update(Elm_Widobj_Item *eo_item, Eina_Bool transition)
324{ 333{
334 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, nit);
325 transition = !!transition; 335 transition = !!transition;
326 if (transition) 336 if (transition)
327 { 337 {
@@ -342,18 +352,20 @@ _item_title_enabled_update(Elm_Naviframe_Item *nit, Eina_Bool transition)
342EOLIAN static Eina_Bool 352EOLIAN static Eina_Bool
343_elm_naviframe_elm_widget_theme_apply(Eo *obj, Elm_Naviframe_Data *sd) 353_elm_naviframe_elm_widget_theme_apply(Eo *obj, Elm_Naviframe_Data *sd)
344{ 354{
345 Elm_Naviframe_Item *it; 355 Elm_Widobj_Item *eo_item;
346 const char *style = NULL, *sstyle = NULL; 356 const char *style = NULL, *sstyle = NULL;
357 Eina_List *l;
347 358
348 eo_do(obj, style = elm_obj_widget_style_get()); 359 eo_do(obj, style = elm_obj_widget_style_get());
349 360
350 EINA_INLIST_FOREACH(sd->stack, it) 361 EINA_LIST_FOREACH(sd->stack, l, eo_item)
351 { 362 {
363 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
352 eo_do(VIEW(it), sstyle = elm_obj_widget_style_get()); 364 eo_do(VIEW(it), sstyle = elm_obj_widget_style_get());
353 if ((style && sstyle) && strcmp(style, sstyle)) 365 if ((style && sstyle) && strcmp(style, sstyle))
354 _item_style_set(it, it->style); 366 _item_style_set(eo_item, it->style);
355 _item_signals_emit(it); 367 _item_signals_emit(eo_item);
356 _item_title_enabled_update(it, EINA_FALSE); 368 _item_title_enabled_update(eo_item, EINA_FALSE);
357 } 369 }
358 370
359 elm_layout_sizing_eval(obj); 371 elm_layout_sizing_eval(obj);
@@ -363,16 +375,16 @@ _elm_naviframe_elm_widget_theme_apply(Eo *obj, Elm_Naviframe_Data *sd)
363static char * 375static char *
364_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED) 376_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
365{ 377{
366 Elm_Naviframe_Item *nit;
367 Evas_Object *layout; 378 Evas_Object *layout;
368 Eina_Strbuf *buf; 379 Eina_Strbuf *buf;
369 const char *info; 380 const char *info;
370 char *ret; 381 char *ret;
371 382
372 nit = data; 383 ELM_NAVIFRAME_ITEM_DATA_GET((Elm_Widobj_Item *)data, it);
373 if (!nit->title_enabled) return NULL; 384
385 if (!it->title_enabled) return NULL;
374 386
375 layout = VIEW(nit); 387 layout = VIEW(it);
376 info = elm_object_part_text_get(layout, TITLE_PART); 388 info = elm_object_part_text_get(layout, TITLE_PART);
377 if (!info) return NULL; 389 if (!info) return NULL;
378 390
@@ -391,13 +403,14 @@ end:
391} 403}
392 404
393static void 405static void
394_access_obj_process(Elm_Naviframe_Item *it, Eina_Bool is_access) 406_access_obj_process(Elm_Widobj_Item *eo_item, Eina_Bool is_access)
395{ 407{
396 Evas_Object *ao, *eo; 408 Evas_Object *ao, *eo;
397 409
410 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
398 if (is_access && (it->title_label || it->subtitle_label)) 411 if (is_access && (it->title_label || it->subtitle_label))
399 { 412 {
400 if (!_access_object_get(it, TITLE_ACCESS_PART)) 413 if (!_access_object_get(eo_item, TITLE_ACCESS_PART))
401 { 414 {
402 eo = elm_layout_edje_get(VIEW(it)); 415 eo = elm_layout_edje_get(VIEW(it));
403 ao =_elm_access_edje_object_part_object_register(WIDGET(it), eo, 416 ao =_elm_access_edje_object_part_object_register(WIDGET(it), eo,
@@ -405,15 +418,15 @@ _access_obj_process(Elm_Naviframe_Item *it, Eina_Bool is_access)
405 _elm_access_text_set(_elm_access_info_get(ao), 418 _elm_access_text_set(_elm_access_info_get(ao),
406 ELM_ACCESS_TYPE, E_("Title")); 419 ELM_ACCESS_TYPE, E_("Title"));
407 _elm_access_callback_set(_elm_access_info_get(ao), 420 _elm_access_callback_set(_elm_access_info_get(ao),
408 ELM_ACCESS_INFO, _access_info_cb, it); 421 ELM_ACCESS_INFO, _access_info_cb, eo_item);
409 /* to access title access object, any idea? */ 422 /* to access title access object, any idea? */
410 ((Elm_Widget_Item *)it)->access_obj = ao; 423 it->base->access_obj = ao;
411 } 424 }
412 } 425 }
413 else 426 else
414 { 427 {
415 /* to access title access object, any idea? */ 428 /* to access title access object, any idea? */
416 ao = ((Elm_Widget_Item *)it)->access_obj; 429 ao = it->base->access_obj;
417 if (!ao) return; 430 if (!ao) return;
418 431
419 if (it->title_label || it->subtitle_label) 432 if (it->title_label || it->subtitle_label)
@@ -423,12 +436,12 @@ _access_obj_process(Elm_Naviframe_Item *it, Eina_Bool is_access)
423 } 436 }
424} 437}
425 438
426static void 439EOLIAN static void
427_item_text_set_hook(Elm_Object_Item *it, 440_elm_naviframe_item_elm_widget_item_part_text_set(Eo *eo_item,
428 const char *part, 441 Elm_Naviframe_Item_Data *nit,
429 const char *label) 442 const char *part,
443 const char *label)
430{ 444{
431 Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
432 Elm_Naviframe_Text_Item_Pair *pair = NULL; 445 Elm_Naviframe_Text_Item_Pair *pair = NULL;
433 char buf[1024]; 446 char buf[1024];
434 447
@@ -437,19 +450,19 @@ _item_text_set_hook(Elm_Object_Item *it,
437 { 450 {
438 eina_stringshare_replace(&nit->title_label, label); 451 eina_stringshare_replace(&nit->title_label, label);
439 if (label) 452 if (label)
440 elm_object_signal_emit(VIEW(it), "elm,state,title_label,show", "elm"); 453 elm_object_signal_emit(VIEW(nit), "elm,state,title_label,show", "elm");
441 else 454 else
442 elm_object_signal_emit(VIEW(it), "elm,state,title_label,hide", "elm"); 455 elm_object_signal_emit(VIEW(nit), "elm,state,title_label,hide", "elm");
443 elm_object_part_text_set(VIEW(it), TITLE_PART, label); 456 elm_object_part_text_set(VIEW(nit), TITLE_PART, label);
444 } 457 }
445 else if (!strcmp("subtitle", part)) 458 else if (!strcmp("subtitle", part))
446 { 459 {
447 eina_stringshare_replace(&nit->subtitle_label, label); 460 eina_stringshare_replace(&nit->subtitle_label, label);
448 if (label) 461 if (label)
449 elm_object_signal_emit(VIEW(it), "elm,state,subtitle,show", "elm"); 462 elm_object_signal_emit(VIEW(nit), "elm,state,subtitle,show", "elm");
450 else 463 else
451 elm_object_signal_emit(VIEW(it), "elm,state,subtitle,hide", "elm"); 464 elm_object_signal_emit(VIEW(nit), "elm,state,subtitle,hide", "elm");
452 elm_object_part_text_set(VIEW(it), SUBTITLE_PART, label); 465 elm_object_part_text_set(VIEW(nit), SUBTITLE_PART, label);
453 } 466 }
454 else 467 else
455 { 468 {
@@ -462,7 +475,7 @@ _item_text_set_hook(Elm_Object_Item *it,
462 if (!pair) 475 if (!pair)
463 { 476 {
464 ERR("Failed to allocate new text part of the item! : naviframe=%p", 477 ERR("Failed to allocate new text part of the item! : naviframe=%p",
465 WIDGET(it)); 478 WIDGET(nit));
466 return; 479 return;
467 } 480 }
468 eina_stringshare_replace(&pair->part, part); 481 eina_stringshare_replace(&pair->part, part);
@@ -473,20 +486,21 @@ _item_text_set_hook(Elm_Object_Item *it,
473 snprintf(buf, sizeof(buf), "elm,state,%s,show", part); 486 snprintf(buf, sizeof(buf), "elm,state,%s,show", part);
474 else 487 else
475 snprintf(buf, sizeof(buf), "elm,state,%s,hide", part); 488 snprintf(buf, sizeof(buf), "elm,state,%s,hide", part);
476 elm_object_signal_emit(VIEW(it), buf, "elm"); 489 elm_object_signal_emit(VIEW(nit), buf, "elm");
477 elm_object_part_text_set(VIEW(it), part, label); 490 elm_object_part_text_set(VIEW(nit), part, label);
478 } 491 }
479 492
480 /* access */ 493 /* access */
481 if (_elm_config->access_mode) 494 if (_elm_config->access_mode)
482 _access_obj_process(nit, EINA_TRUE); 495 _access_obj_process(eo_item, EINA_TRUE);
483 496
484 elm_layout_sizing_eval(WIDGET(nit)); 497 elm_layout_sizing_eval(WIDGET(nit));
485} 498}
486 499
487static const char * 500EOLIAN static const char *
488_item_text_get_hook(const Elm_Object_Item *it, 501_elm_naviframe_item_elm_widget_item_part_text_get(Eo *nit EINA_UNUSED,
489 const char *part) 502 Elm_Naviframe_Item_Data *it,
503 const char *part)
490{ 504{
491 char buf[1024]; 505 char buf[1024];
492 506
@@ -500,13 +514,13 @@ _item_text_get_hook(const Elm_Object_Item *it,
500 return elm_object_part_text_get(VIEW(it), buf); 514 return elm_object_part_text_get(VIEW(it), buf);
501} 515}
502 516
503static Eina_Bool 517EOLIAN static Eina_Bool
504_item_del_pre_hook(Elm_Object_Item *it) 518_elm_naviframe_item_elm_widget_item_del_pre(Eo *eo_item,
519 Elm_Naviframe_Item_Data *nit)
505{ 520{
506 Elm_Naviframe_Item *nit, *prev_it = NULL; 521 Elm_Widobj_Item *eo_prev_it = NULL;
507 Eina_Bool top; 522 Eina_Bool top;
508 523
509 nit = (Elm_Naviframe_Item *)it;
510 ELM_NAVIFRAME_DATA_GET(WIDGET(nit), sd); 524 ELM_NAVIFRAME_DATA_GET(WIDGET(nit), sd);
511 525
512 nit->delete_me = EINA_TRUE; 526 nit->delete_me = EINA_TRUE;
@@ -514,42 +528,46 @@ _item_del_pre_hook(Elm_Object_Item *it)
514 528
515 ecore_animator_del(nit->animator); 529 ecore_animator_del(nit->animator);
516 530
517 top = (it == elm_naviframe_top_item_get(WIDGET(nit))); 531 top = (eo_item == (Elm_Widobj_Item *)elm_naviframe_top_item_get(WIDGET(nit)));
518 if (evas_object_data_get(VIEW(nit), "out_of_list")) 532 if (evas_object_data_get(VIEW(nit), "out_of_list"))
519 goto end; 533 goto end;
520 534
521 sd->stack = eina_inlist_remove(sd->stack, EINA_INLIST_GET(nit)); 535 sd->stack = eina_list_remove(sd->stack, eo_item);
522 536
523 if (top && !sd->on_deletion) /* must raise another one */ 537 if (top && !sd->on_deletion) /* must raise another one */
524 { 538 {
525 if (sd->stack && sd->stack->last) 539 if (sd->stack && eina_list_last(sd->stack))
526 prev_it = EINA_INLIST_CONTAINER_GET(sd->stack->last, 540 eo_prev_it = eina_list_last_data_get(sd->stack);
527 Elm_Naviframe_Item); 541
528 if (!prev_it) goto end; 542 if (!eo_prev_it) goto end;
543
544 ELM_NAVIFRAME_ITEM_DATA_GET(eo_prev_it, prev_it);
529 545
530 elm_widget_tree_unfocusable_set(VIEW(prev_it), EINA_FALSE); 546 elm_widget_tree_unfocusable_set(VIEW(prev_it), EINA_FALSE);
531 elm_widget_tree_unfocusable_set(VIEW(nit), EINA_TRUE); 547 elm_widget_tree_unfocusable_set(VIEW(nit), EINA_TRUE);
532 548
533 if (sd->freeze_events) 549 if (sd->freeze_events)
534 evas_object_freeze_events_set(VIEW(prev_it), EINA_FALSE); 550 evas_object_freeze_events_set(VIEW(prev_it), EINA_FALSE);
535 _resize_object_reset(WIDGET(prev_it), prev_it); 551 _resize_object_reset(WIDGET(prev_it), eo_prev_it);
536 evas_object_show(VIEW(prev_it)); 552 evas_object_show(VIEW(prev_it));
537 553
538 _prev_page_focus_recover(prev_it); 554 _prev_page_focus_recover(eo_prev_it);
539 555
540 elm_object_signal_emit(VIEW(prev_it), "elm,state,visible", "elm"); 556 elm_object_signal_emit(VIEW(prev_it), "elm,state,visible", "elm");
541 } 557 }
542 558
543end: 559end:
544 _item_free(nit); 560 _item_free(eo_item);
545 561
546 return EINA_TRUE; 562 return EINA_TRUE;
547} 563}
548 564
549static void 565static void
550_item_content_set(Elm_Naviframe_Item *it, 566_item_content_set(Elm_Widobj_Item *eo_item,
551 Evas_Object *content) 567 Evas_Object *content)
552{ 568{
569 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
570
553 if (it->content == content) return; 571 if (it->content == content) return;
554 572
555 evas_object_del(it->content); 573 evas_object_del(it->content);
@@ -561,13 +579,15 @@ _item_content_set(Elm_Naviframe_Item *it,
561 elm_object_signal_emit(VIEW(it), "elm,state,content,show", "elm"); 579 elm_object_signal_emit(VIEW(it), "elm,state,content,show", "elm");
562 580
563 evas_object_event_callback_add 581 evas_object_event_callback_add
564 (content, EVAS_CALLBACK_DEL, _item_content_del_cb, it); 582 (content, EVAS_CALLBACK_DEL, _item_content_del_cb, eo_item);
565} 583}
566 584
567static void 585static void
568_item_title_prev_btn_set(Elm_Naviframe_Item *it, 586_item_title_prev_btn_set(Elm_Widobj_Item *eo_item,
569 Evas_Object *btn) 587 Evas_Object *btn)
570{ 588{
589 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
590
571 if (it->title_prev_btn == btn) return; 591 if (it->title_prev_btn == btn) return;
572 evas_object_del(it->title_prev_btn); 592 evas_object_del(it->title_prev_btn);
573 it->title_prev_btn = btn; 593 it->title_prev_btn = btn;
@@ -576,15 +596,17 @@ _item_title_prev_btn_set(Elm_Naviframe_Item *it,
576 elm_object_part_content_set(VIEW(it), PREV_BTN_PART, btn); 596 elm_object_part_content_set(VIEW(it), PREV_BTN_PART, btn);
577 elm_object_signal_emit(VIEW(it), "elm,state,prev_btn,show", "elm"); 597 elm_object_signal_emit(VIEW(it), "elm,state,prev_btn,show", "elm");
578 evas_object_event_callback_add 598 evas_object_event_callback_add
579 (btn, EVAS_CALLBACK_DEL, _item_title_prev_btn_del_cb, it); 599 (btn, EVAS_CALLBACK_DEL, _item_title_prev_btn_del_cb, eo_item);
580 600
581 //FIXME: set back button callback here after elm 2.0 601 //FIXME: set back button callback here after elm 2.0
582} 602}
583 603
584static void 604static void
585_item_title_next_btn_set(Elm_Naviframe_Item *it, 605_item_title_next_btn_set(Elm_Widobj_Item *eo_item,
586 Evas_Object *btn) 606 Evas_Object *btn)
587{ 607{
608 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
609
588 if (it->title_next_btn == btn) return; 610 if (it->title_next_btn == btn) return;
589 evas_object_del(it->title_next_btn); 611 evas_object_del(it->title_next_btn);
590 it->title_next_btn = btn; 612 it->title_next_btn = btn;
@@ -594,13 +616,15 @@ _item_title_next_btn_set(Elm_Naviframe_Item *it,
594 elm_object_signal_emit(VIEW(it), "elm,state,next_btn,show", "elm"); 616 elm_object_signal_emit(VIEW(it), "elm,state,next_btn,show", "elm");
595 617
596 evas_object_event_callback_add 618 evas_object_event_callback_add
597 (btn, EVAS_CALLBACK_DEL, _item_title_next_btn_del_cb, it); 619 (btn, EVAS_CALLBACK_DEL, _item_title_next_btn_del_cb, eo_item);
598} 620}
599 621
600static void 622static void
601_item_title_icon_set(Elm_Naviframe_Item *it, 623_item_title_icon_set(Elm_Widobj_Item *eo_item,
602 Evas_Object *icon) 624 Evas_Object *icon)
603{ 625{
626 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
627
604 if (it->title_icon == icon) return; 628 if (it->title_icon == icon) return;
605 evas_object_del(it->title_icon); 629 evas_object_del(it->title_icon);
606 it->title_icon = icon; 630 it->title_icon = icon;
@@ -610,12 +634,14 @@ _item_title_icon_set(Elm_Naviframe_Item *it,
610 elm_object_signal_emit(VIEW(it), "elm,state,icon,show", "elm"); 634 elm_object_signal_emit(VIEW(it), "elm,state,icon,show", "elm");
611 635
612 evas_object_event_callback_add 636 evas_object_event_callback_add
613 (icon, EVAS_CALLBACK_DEL, _item_title_icon_del_cb, it); 637 (icon, EVAS_CALLBACK_DEL, _item_title_icon_del_cb, eo_item);
614} 638}
615 639
616static Evas_Object * 640static Evas_Object *
617_item_content_unset(Elm_Naviframe_Item *it) 641_item_content_unset(Elm_Widobj_Item *eo_item)
618{ 642{
643 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
644
619 Evas_Object *content = it->content; 645 Evas_Object *content = it->content;
620 646
621 if (!content) return NULL; 647 if (!content) return NULL;
@@ -631,8 +657,10 @@ _item_content_unset(Elm_Naviframe_Item *it)
631} 657}
632 658
633static Evas_Object * 659static Evas_Object *
634_item_title_prev_btn_unset(Elm_Naviframe_Item *it) 660_item_title_prev_btn_unset(Elm_Widobj_Item *eo_item)
635{ 661{
662 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
663
636 Evas_Object *content = it->title_prev_btn; 664 Evas_Object *content = it->title_prev_btn;
637 665
638 if (!content) return NULL; 666 if (!content) return NULL;
@@ -649,8 +677,10 @@ _item_title_prev_btn_unset(Elm_Naviframe_Item *it)
649} 677}
650 678
651static Evas_Object * 679static Evas_Object *
652_item_title_next_btn_unset(Elm_Naviframe_Item *it) 680_item_title_next_btn_unset(Elm_Widobj_Item *eo_item)
653{ 681{
682 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
683
654 Evas_Object *content = it->title_next_btn; 684 Evas_Object *content = it->title_next_btn;
655 685
656 if (!content) return NULL; 686 if (!content) return NULL;
@@ -666,8 +696,10 @@ _item_title_next_btn_unset(Elm_Naviframe_Item *it)
666} 696}
667 697
668static Evas_Object * 698static Evas_Object *
669_item_title_icon_unset(Elm_Naviframe_Item *it) 699_item_title_icon_unset(Elm_Widobj_Item *eo_item)
670{ 700{
701 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
702
671 Evas_Object *content = it->title_icon; 703 Evas_Object *content = it->title_icon;
672 704
673 if (!content) return NULL; 705 if (!content) return NULL;
@@ -698,13 +730,15 @@ _part_aliasing_eval(const char **part)
698} 730}
699 731
700static void 732static void
701_title_content_set(Elm_Naviframe_Item *it, 733_title_content_set(Elm_Widobj_Item *eo_item,
702 const char *part, 734 const char *part,
703 Evas_Object *content) 735 Evas_Object *content)
704{ 736{
705 Elm_Naviframe_Content_Item_Pair *pair = NULL; 737 Elm_Naviframe_Content_Item_Pair *pair = NULL;
706 char buf[1024]; 738 char buf[1024];
707 739
740 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
741
708 EINA_INLIST_FOREACH(it->content_list, pair) 742 EINA_INLIST_FOREACH(it->content_list, pair)
709 if (!strcmp(part, pair->part)) break; 743 if (!strcmp(part, pair->part)) break;
710 if (pair) 744 if (pair)
@@ -744,7 +778,7 @@ _title_content_set(Elm_Naviframe_Item *it,
744 WIDGET(it)); 778 WIDGET(it));
745 return; 779 return;
746 } 780 }
747 pair->it = it; 781 pair->it = eo_item;
748 eina_stringshare_replace(&pair->part, part); 782 eina_stringshare_replace(&pair->part, part);
749 it->content_list = eina_inlist_append(it->content_list, 783 it->content_list = eina_inlist_append(it->content_list,
750 EINA_INLIST_GET(pair)); 784 EINA_INLIST_GET(pair));
@@ -759,13 +793,12 @@ _title_content_set(Elm_Naviframe_Item *it,
759 pair); 793 pair);
760} 794}
761 795
762static void 796EOLIAN static void
763_item_content_set_hook(Elm_Object_Item *it, 797_elm_naviframe_item_elm_widget_item_part_content_set(Eo *nit,
764 const char *part, 798 Elm_Naviframe_Item_Data *it,
765 Evas_Object *content) 799 const char *part,
800 Evas_Object *content)
766{ 801{
767 Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
768
769 _part_aliasing_eval(&part); 802 _part_aliasing_eval(&part);
770 803
771 //specified parts 804 //specified parts
@@ -783,12 +816,11 @@ _item_content_set_hook(Elm_Object_Item *it,
783 elm_layout_sizing_eval(WIDGET(it)); 816 elm_layout_sizing_eval(WIDGET(it));
784} 817}
785 818
786static Evas_Object * 819EOLIAN static Evas_Object *
787_item_content_get_hook(const Elm_Object_Item *it, 820_elm_naviframe_item_elm_widget_item_part_content_get(Eo *eo_item EINA_UNUSED,
788 const char *part) 821 Elm_Naviframe_Item_Data *nit,
822 const char *part)
789{ 823{
790 Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
791
792 _part_aliasing_eval(&part); 824 _part_aliasing_eval(&part);
793 825
794 //specified parts 826 //specified parts
@@ -806,12 +838,14 @@ _item_content_get_hook(const Elm_Object_Item *it,
806} 838}
807 839
808static Evas_Object * 840static Evas_Object *
809_title_content_unset(Elm_Naviframe_Item *it, const char *part) 841_title_content_unset(Elm_Widobj_Item *eo_item, const char *part)
810{ 842{
811 Elm_Naviframe_Content_Item_Pair *pair = NULL; 843 Elm_Naviframe_Content_Item_Pair *pair = NULL;
812 char buf[1028]; 844 char buf[1028];
813 Evas_Object *content = NULL; 845 Evas_Object *content = NULL;
814 846
847 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
848
815 EINA_INLIST_FOREACH(it->content_list, pair) 849 EINA_INLIST_FOREACH(it->content_list, pair)
816 { 850 {
817 if (!strcmp(part, pair->part)) 851 if (!strcmp(part, pair->part))
@@ -836,11 +870,11 @@ _title_content_unset(Elm_Naviframe_Item *it, const char *part)
836 return content; 870 return content;
837} 871}
838 872
839static Evas_Object * 873EOLIAN static Evas_Object *
840_item_content_unset_hook(Elm_Object_Item *it, 874_elm_naviframe_item_elm_widget_item_part_content_unset(Eo *nit,
841 const char *part) 875 Elm_Naviframe_Item_Data *it,
876 const char *part)
842{ 877{
843 Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
844 Evas_Object *o = NULL; 878 Evas_Object *o = NULL;
845 879
846 _part_aliasing_eval(&part); 880 _part_aliasing_eval(&part);
@@ -862,10 +896,11 @@ _item_content_unset_hook(Elm_Object_Item *it,
862 return o; 896 return o;
863} 897}
864 898
865static void 899EOLIAN static void
866_item_signal_emit_hook(Elm_Object_Item *it, 900_elm_naviframe_item_elm_widget_item_signal_emit(Eo *nit EINA_UNUSED,
867 const char *emission, 901 Elm_Naviframe_Item_Data *it,
868 const char *source) 902 const char *emission,
903 const char *source)
869{ 904{
870 elm_object_signal_emit(VIEW(it), emission, source); 905 elm_object_signal_emit(VIEW(it), emission, source);
871} 906}
@@ -874,20 +909,22 @@ EOLIAN static void
874_elm_naviframe_elm_layout_sizing_eval(Eo *obj, Elm_Naviframe_Data *sd) 909_elm_naviframe_elm_layout_sizing_eval(Eo *obj, Elm_Naviframe_Data *sd)
875{ 910{
876 Evas_Coord minw = -1, minh = -1; 911 Evas_Coord minw = -1, minh = -1;
877 Elm_Naviframe_Item *it, *top; 912 Elm_Widobj_Item *eo_item, *top;
878 Evas_Coord x, y, w, h; 913 Evas_Coord x, y, w, h;
914 Eina_List *l;
879 915
880 if (sd->on_deletion) return; 916 if (sd->on_deletion) return;
881 if (!sd->stack) return; 917 if (!sd->stack) return;
882 918
883 top = (EINA_INLIST_CONTAINER_GET(sd->stack->last, Elm_Naviframe_Item)); 919 top = eina_list_last_data_get(sd->stack);
884 evas_object_geometry_get(obj, &x, &y, &w, &h); 920 evas_object_geometry_get(obj, &x, &y, &w, &h);
885 EINA_INLIST_FOREACH(sd->stack, it) 921 EINA_LIST_FOREACH(sd->stack, l, eo_item)
886 { 922 {
923 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
887 evas_object_move(VIEW(it), x, y); 924 evas_object_move(VIEW(it), x, y);
888 evas_object_resize(VIEW(it), w, h); 925 evas_object_resize(VIEW(it), w, h);
889 926
890 if (it == top) 927 if (eo_item == top)
891 { 928 {
892 edje_object_size_min_calc(elm_layout_edje_get(VIEW(it)), 929 edje_object_size_min_calc(elm_layout_edje_get(VIEW(it)),
893 &it->minw, &it->minh); 930 &it->minw, &it->minh);
@@ -1028,9 +1065,9 @@ _on_item_title_clicked(void *data,
1028 const char *emission EINA_UNUSED, 1065 const char *emission EINA_UNUSED,
1029 const char *source EINA_UNUSED) 1066 const char *source EINA_UNUSED)
1030{ 1067{
1031 Elm_Naviframe_Item *it = data; 1068 Elm_Widobj_Item *eo_item = data;
1032 1069 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1033 evas_object_smart_callback_call(WIDGET(it), SIG_TITLE_CLICKED, it); 1070 evas_object_smart_callback_call(WIDGET(it), SIG_TITLE_CLICKED, eo_item);
1034} 1071}
1035 1072
1036/* "elm,state,cur,pushed" 1073/* "elm,state,cur,pushed"
@@ -1041,10 +1078,11 @@ _on_item_push_finished(void *data,
1041 const char *emission EINA_UNUSED, 1078 const char *emission EINA_UNUSED,
1042 const char *source EINA_UNUSED) 1079 const char *source EINA_UNUSED)
1043{ 1080{
1044 Elm_Naviframe_Item *it = data; 1081 Elm_Widobj_Item *eo_item = data;
1045 1082
1046 if (!it) return; 1083 if (!eo_item) return;
1047 1084
1085 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1048 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); 1086 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
1049 1087
1050 evas_object_hide(VIEW(it)); 1088 evas_object_hide(VIEW(it));
@@ -1063,15 +1101,16 @@ _on_item_pop_finished(void *data,
1063 const char *emission EINA_UNUSED, 1101 const char *emission EINA_UNUSED,
1064 const char *source EINA_UNUSED) 1102 const char *source EINA_UNUSED)
1065{ 1103{
1066 Elm_Naviframe_Item *it = data; 1104 Elm_Widobj_Item *eo_item = data;
1067 1105
1106 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1068 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); 1107 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
1069 1108
1070 if (sd->preserve) 1109 if (sd->preserve)
1071 elm_widget_tree_unfocusable_set(VIEW(it), EINA_FALSE); 1110 elm_widget_tree_unfocusable_set(VIEW(it), EINA_FALSE);
1072 sd->popping = eina_list_remove(sd->popping, it); 1111 sd->popping = eina_list_remove(sd->popping, eo_item);
1073 1112
1074 elm_widget_item_del(data); 1113 eo_do(eo_item, elm_wdg_item_del());
1075} 1114}
1076 1115
1077/* "elm,state,new,pushed", 1116/* "elm,state,new,pushed",
@@ -1083,13 +1122,14 @@ _on_item_show_finished(void *data,
1083 const char *emission EINA_UNUSED, 1122 const char *emission EINA_UNUSED,
1084 const char *source EINA_UNUSED) 1123 const char *source EINA_UNUSED)
1085{ 1124{
1086 Elm_Naviframe_Item *it = data; 1125 Elm_Widobj_Item *eo_item = data;
1087 1126
1127 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1088 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); 1128 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
1089 1129
1090 elm_object_signal_emit(VIEW(it), "elm,state,visible", "elm"); 1130 elm_object_signal_emit(VIEW(it), "elm,state,visible", "elm");
1091 1131
1092 _prev_page_focus_recover(it); 1132 _prev_page_focus_recover(eo_item);
1093 1133
1094 if (sd->freeze_events) 1134 if (sd->freeze_events)
1095 evas_object_freeze_events_set(VIEW(it), EINA_FALSE); 1135 evas_object_freeze_events_set(VIEW(it), EINA_FALSE);
@@ -1107,8 +1147,9 @@ _on_item_size_hints_changed(void *data,
1107} 1147}
1108 1148
1109static void 1149static void
1110_item_dispmode_set(Elm_Naviframe_Item *it, Evas_Display_Mode dispmode) 1150_item_dispmode_set(Elm_Widobj_Item *eo_item, Evas_Display_Mode dispmode)
1111{ 1151{
1152 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1112 if (it->dispmode == dispmode) return; 1153 if (it->dispmode == dispmode) return;
1113 switch (dispmode) 1154 switch (dispmode)
1114 { 1155 {
@@ -1128,101 +1169,106 @@ _access_prev_btn_info_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED)
1128 return strdup(E_("Back")); 1169 return strdup(E_("Back"));
1129} 1170}
1130 1171
1131static Elm_Naviframe_Item * 1172EOLIAN static void
1173_elm_naviframe_item_eo_base_constructor(Eo *eo_item, Elm_Naviframe_Item_Data *it)
1174{
1175 eo_do_super(eo_item, ELM_NAVIFRAME_ITEM_CLASS, eo_constructor());
1176 it->base = eo_data_scope_get(eo_item, ELM_WIDGET_ITEM_CLASS);
1177
1178 Evas_Object *parent;
1179 eo_do (eo_item, parent = eo_parent_get());
1180
1181 VIEW(it) = elm_layout_add(parent);
1182 evas_object_smart_member_add(VIEW(it), parent);
1183
1184 if (!elm_widget_sub_object_add(parent, VIEW(it)))
1185 ERR("could not add %p as sub object of %p", VIEW(it), parent);
1186
1187 evas_object_event_callback_add
1188 (VIEW(it), EVAS_CALLBACK_CHANGED_SIZE_HINTS,
1189 _on_item_size_hints_changed, parent);
1190
1191 elm_object_signal_callback_add
1192 (VIEW(it), "elm,action,show,finished", "*", _on_item_show_finished, eo_item);
1193 elm_object_signal_callback_add
1194 (VIEW(it), "elm,action,pushed,finished", "*", _on_item_push_finished, eo_item);
1195 elm_object_signal_callback_add
1196 (VIEW(it), "elm,action,popped,finished", "*", _on_item_pop_finished, eo_item);
1197 elm_object_signal_callback_add
1198 (VIEW(it), "elm,action,title,transition,finished", "*", _on_item_title_transition_finished, eo_item);
1199 elm_object_signal_callback_add
1200 (VIEW(it), "elm,action,title,clicked", "*", _on_item_title_clicked, eo_item);
1201}
1202
1203static Elm_Widobj_Item *
1132_item_new(Evas_Object *obj, 1204_item_new(Evas_Object *obj,
1133 const Elm_Naviframe_Item *prev_it, 1205 const Elm_Widobj_Item *eo_prev_it,
1134 const char *title_label, 1206 const char *title_label,
1135 Evas_Object *prev_btn, 1207 Evas_Object *prev_btn,
1136 Evas_Object *next_btn, 1208 Evas_Object *next_btn,
1137 Evas_Object *content, 1209 Evas_Object *content,
1138 const char *item_style) 1210 const char *item_style)
1139{ 1211{
1140 Elm_Naviframe_Item *it; 1212 Elm_Widobj_Item *eo_item;
1141 1213
1142 ELM_NAVIFRAME_DATA_GET(obj, sd); 1214 ELM_NAVIFRAME_DATA_GET(obj, sd);
1143 1215
1144 it = elm_widget_item_new(obj, Elm_Naviframe_Item); 1216 eo_item = eo_add(ELM_NAVIFRAME_ITEM_CLASS, obj);
1145 if (!it) 1217
1218 if (!eo_item)
1146 { 1219 {
1147 ERR("Failed to allocate new item! : naviframe=%p", obj); 1220 ERR("Failed to allocate new item! : naviframe=%p", obj);
1148 return NULL; 1221 return NULL;
1149 } 1222 }
1150 1223
1151 elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook); 1224 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1152 elm_widget_item_text_set_hook_set(it, _item_text_set_hook);
1153 elm_widget_item_text_get_hook_set(it, _item_text_get_hook);
1154 elm_widget_item_content_set_hook_set(it, _item_content_set_hook);
1155 elm_widget_item_content_get_hook_set(it, _item_content_get_hook);
1156 elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook);
1157 elm_widget_item_signal_emit_hook_set(it, _item_signal_emit_hook);
1158
1159 //item base layout
1160 VIEW(it) = elm_layout_add(obj);
1161 evas_object_smart_member_add(VIEW(it), obj);
1162
1163 if (!elm_widget_sub_object_add(obj, VIEW(it)))
1164 ERR("could not add %p as sub object of %p", VIEW(it), obj);
1165 1225
1166 evas_object_event_callback_add 1226 _item_style_set(eo_item, item_style);
1167 (VIEW(it), EVAS_CALLBACK_CHANGED_SIZE_HINTS,
1168 _on_item_size_hints_changed, obj);
1169
1170 elm_object_signal_callback_add
1171 (VIEW(it), "elm,action,show,finished", "*", _on_item_show_finished, it);
1172 elm_object_signal_callback_add
1173 (VIEW(it), "elm,action,pushed,finished", "*", _on_item_push_finished, it);
1174 elm_object_signal_callback_add
1175 (VIEW(it), "elm,action,popped,finished", "*", _on_item_pop_finished, it);
1176 elm_object_signal_callback_add
1177 (VIEW(it), "elm,action,title,transition,finished", "*", _on_item_title_transition_finished, it);
1178 elm_object_signal_callback_add
1179 (VIEW(it), "elm,action,title,clicked", "*", _on_item_title_clicked, it);
1180
1181 _item_style_set(it, item_style);
1182 1227
1183 if (title_label) 1228 if (title_label)
1184 _item_text_set_hook((Elm_Object_Item *)it, TITLE_PART, title_label); 1229 eo_do(eo_item, elm_wdg_item_part_text_set(TITLE_PART, title_label));
1185 1230
1186 //title buttons 1231 //title buttons
1187 if ((!prev_btn) && sd->auto_pushed && prev_it) 1232 if ((!prev_btn) && sd->auto_pushed && eo_prev_it)
1188 { 1233 {
1234 ELM_NAVIFRAME_ITEM_DATA_GET(eo_prev_it, prev_it);
1189 const char *prev_title = prev_it->title_label; 1235 const char *prev_title = prev_it->title_label;
1190 prev_btn = _back_btn_new(obj, prev_title); 1236 prev_btn = _back_btn_new(obj, prev_title);
1191 } 1237 }
1192 1238
1193 if (prev_btn) 1239 if (prev_btn)
1194 { 1240 {
1195 _item_content_set_hook((Elm_Object_Item *)it, PREV_BTN_PART, prev_btn); 1241 eo_do(eo_item, elm_wdg_item_part_content_set(PREV_BTN_PART, prev_btn));
1196
1197 if (!elm_layout_text_get(prev_btn, NULL)) 1242 if (!elm_layout_text_get(prev_btn, NULL))
1198 _elm_access_callback_set 1243 _elm_access_callback_set
1199 (_elm_access_info_get(prev_btn), ELM_ACCESS_INFO, 1244 (_elm_access_info_get(prev_btn), ELM_ACCESS_INFO,
1200 _access_prev_btn_info_cb, it); 1245 _access_prev_btn_info_cb, eo_item);
1201 } 1246 }
1202 1247
1203 if (next_btn) 1248 if (next_btn)
1204 { 1249 {
1205 _item_content_set_hook((Elm_Object_Item *)it, NEXT_BTN_PART, next_btn); 1250 eo_do(eo_item, elm_wdg_item_part_content_set(NEXT_BTN_PART, next_btn));
1206 1251
1207 if (!elm_layout_text_get(next_btn, NULL)) 1252 if (!elm_layout_text_get(next_btn, NULL))
1208 _elm_access_text_set 1253 _elm_access_text_set
1209 (_elm_access_info_get(next_btn), ELM_ACCESS_INFO, E_("Next")); 1254 (_elm_access_info_get(next_btn), ELM_ACCESS_INFO, E_("Next"));
1210 } 1255 }
1211 1256
1212 _item_content_set(it, content); 1257 _item_content_set(eo_item, content);
1213 _item_dispmode_set(it, sd->dispmode); 1258 _item_dispmode_set(eo_item, sd->dispmode);
1214 1259
1215 it->title_enabled = EINA_TRUE; 1260 it->title_enabled = EINA_TRUE;
1216 1261
1217 return it; 1262 return eo_item;
1218} 1263}
1219 1264
1220static void 1265static void
1221_on_obj_size_hints_changed(void *data EINA_UNUSED, Evas *e EINA_UNUSED, 1266_on_obj_size_hints_changed(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
1222 Evas_Object *obj, void *event_info EINA_UNUSED) 1267 Evas_Object *obj, void *event_info EINA_UNUSED)
1223{ 1268{
1224 Elm_Naviframe_Item *it; 1269 Elm_Widobj_Item *eo_item;
1225 Evas_Display_Mode dispmode; 1270 Evas_Display_Mode dispmode;
1271 Eina_List *l;
1226 1272
1227 ELM_NAVIFRAME_DATA_GET(obj, sd); 1273 ELM_NAVIFRAME_DATA_GET(obj, sd);
1228 1274
@@ -1231,8 +1277,8 @@ _on_obj_size_hints_changed(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
1231 1277
1232 sd->dispmode = dispmode; 1278 sd->dispmode = dispmode;
1233 1279
1234 EINA_INLIST_FOREACH(sd->stack, it) 1280 EINA_LIST_FOREACH(sd->stack, l, eo_item)
1235 _item_dispmode_set(it, dispmode); 1281 _item_dispmode_set(eo_item, dispmode);
1236} 1282}
1237 1283
1238EOLIAN static Eina_Bool 1284EOLIAN static Eina_Bool
@@ -1241,17 +1287,18 @@ _elm_naviframe_elm_widget_focus_next(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED
1241 Evas_Object *ao; 1287 Evas_Object *ao;
1242 1288
1243 Eina_List *l = NULL; 1289 Eina_List *l = NULL;
1244 Elm_Naviframe_Item *top_it; 1290 Elm_Widobj_Item *top_it;
1245 void *(*list_data_get)(const Eina_List *list); 1291 void *(*list_data_get)(const Eina_List *list);
1246 1292
1247 Eina_Bool int_ret = EINA_FALSE; 1293 Eina_Bool int_ret = EINA_FALSE;
1248 1294
1249 top_it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj); 1295 top_it = (Elm_Widobj_Item *)elm_naviframe_top_item_get(obj);
1250 if (!top_it) goto end; 1296 if (!top_it) goto end;
1251 1297
1252 list_data_get = eina_list_data_get; 1298 list_data_get = eina_list_data_get;
1253 1299
1254 l = eina_list_append(l, VIEW(top_it)); 1300 ELM_NAVIFRAME_ITEM_DATA_GET(top_it, top_it_data);
1301 l = eina_list_append(l, VIEW(top_it_data));
1255 1302
1256 /* access */ 1303 /* access */
1257 if (_elm_config->access_mode) 1304 if (_elm_config->access_mode)
@@ -1285,14 +1332,15 @@ _elm_naviframe_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Naviframe_Dat
1285 Eina_Bool int_ret; 1332 Eina_Bool int_ret;
1286 1333
1287 Eina_List *l = NULL; 1334 Eina_List *l = NULL;
1288 Elm_Naviframe_Item *top_it; 1335 Elm_Widobj_Item *eo_top_it;
1289 void *(*list_data_get)(const Eina_List *list); 1336 void *(*list_data_get)(const Eina_List *list);
1290 1337
1291 top_it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj); 1338 eo_top_it = (Elm_Widobj_Item *)elm_naviframe_top_item_get(obj);
1292 if (!top_it) return EINA_FALSE; 1339 if (!eo_top_it) return EINA_FALSE;
1293 1340
1294 list_data_get = eina_list_data_get; 1341 list_data_get = eina_list_data_get;
1295 1342
1343 ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_it, top_it);
1296 l = eina_list_append(l, VIEW(top_it)); 1344 l = eina_list_append(l, VIEW(top_it));
1297 1345
1298 int_ret = elm_widget_focus_list_direction_get 1346 int_ret = elm_widget_focus_list_direction_get
@@ -1325,14 +1373,15 @@ _elm_naviframe_evas_object_smart_add(Eo *obj, Elm_Naviframe_Data *priv)
1325static Eina_Bool 1373static Eina_Bool
1326_pop_transition_cb(void *data) 1374_pop_transition_cb(void *data)
1327{ 1375{
1328 Elm_Naviframe_Item *prev_it, *it; 1376 Elm_Widobj_Item *eo_prev_it;
1329 it = (Elm_Naviframe_Item *)data;
1330 1377
1378 ELM_NAVIFRAME_ITEM_DATA_GET((Elm_Widobj_Item *)data, it);
1331 it->animator = NULL; 1379 it->animator = NULL;
1332 1380
1333 prev_it = (Elm_Naviframe_Item *) elm_naviframe_top_item_get(WIDGET(it)); 1381 eo_prev_it = (Elm_Widobj_Item *) elm_naviframe_top_item_get(WIDGET(it));
1334 if (prev_it) 1382 if (eo_prev_it)
1335 { 1383 {
1384 ELM_NAVIFRAME_ITEM_DATA_GET(eo_prev_it, prev_it);
1336 elm_object_signal_emit(VIEW(prev_it), "elm,state,prev,popped,deferred", 1385 elm_object_signal_emit(VIEW(prev_it), "elm,state,prev,popped,deferred",
1337 "elm"); 1386 "elm");
1338 edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it))); 1387 edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it)));
@@ -1346,21 +1395,22 @@ _pop_transition_cb(void *data)
1346EOLIAN static void 1395EOLIAN static void
1347_elm_naviframe_evas_object_smart_del(Eo *obj, Elm_Naviframe_Data *sd) 1396_elm_naviframe_evas_object_smart_del(Eo *obj, Elm_Naviframe_Data *sd)
1348{ 1397{
1349 Elm_Naviframe_Item *it; 1398 Elm_Widobj_Item *eo_item;
1350 1399
1351 sd->on_deletion = EINA_TRUE; 1400 sd->on_deletion = EINA_TRUE;
1352 1401
1353 while (sd->stack) 1402 while (sd->stack)
1354 { 1403 {
1355 it = EINA_INLIST_CONTAINER_GET(sd->stack, Elm_Naviframe_Item); 1404 eo_item = eina_list_data_get(sd->stack);
1356 elm_widget_item_del(it); 1405 eo_do(eo_item, elm_wdg_item_del());
1357 } 1406 }
1358 1407
1359 //All popping items which are not called yet by animator. 1408 //All popping items which are not called yet by animator.
1360 EINA_LIST_FREE(sd->popping, it) 1409 EINA_LIST_FREE(sd->popping, eo_item)
1361 { 1410 {
1411 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1362 ecore_animator_del(it->animator); 1412 ecore_animator_del(it->animator);
1363 elm_widget_item_del(it); 1413 eo_do(eo_item, elm_wdg_item_del());
1364 } 1414 }
1365 1415
1366 evas_object_del(sd->dummy_edje); 1416 evas_object_del(sd->dummy_edje);
@@ -1372,22 +1422,25 @@ _elm_naviframe_evas_object_smart_del(Eo *obj, Elm_Naviframe_Data *sd)
1372EOLIAN static void 1422EOLIAN static void
1373_elm_naviframe_evas_object_smart_show(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED) 1423_elm_naviframe_evas_object_smart_show(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED)
1374{ 1424{
1375 Elm_Naviframe_Item *top; 1425 Elm_Widobj_Item *eo_top;
1426
1427 eo_top = (Elm_Widobj_Item *)elm_naviframe_top_item_get(obj);
1428 ELM_NAVIFRAME_ITEM_DATA_GET(eo_top, top);
1376 1429
1377 top = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj); 1430 if (eo_top && !top->delete_me)
1378 if (top && !top->delete_me)
1379 evas_object_show(VIEW(top)); 1431 evas_object_show(VIEW(top));
1380} 1432}
1381 1433
1382static Eina_Bool 1434static Eina_Bool
1383_key_action_top_item_get(Evas_Object *obj, const char *params EINA_UNUSED) 1435_key_action_top_item_get(Evas_Object *obj, const char *params EINA_UNUSED)
1384{ 1436{
1385 Elm_Naviframe_Item *it = NULL; 1437 Elm_Widobj_Item *eo_item = NULL;
1386 eo_do(obj, it = (Elm_Naviframe_Item *) elm_obj_naviframe_top_item_get()); 1438 eo_do(obj, eo_item = (Elm_Widobj_Item *) elm_obj_naviframe_top_item_get());
1387 if (!it) return EINA_FALSE; 1439 if (!eo_item) return EINA_FALSE;
1388 1440
1389 //FIXME: Replace this below code to elm_naviframe_item_pop() at elm 2.0. 1441 //FIXME: Replace this below code to elm_naviframe_item_pop() at elm 2.0.
1390 ///Leave for compatibility. 1442 ///Leave for compatibility.
1443 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1391 if (it->title_prev_btn) 1444 if (it->title_prev_btn)
1392 evas_object_smart_callback_call(it->title_prev_btn, SIG_CLICKED, NULL); 1445 evas_object_smart_callback_call(it->title_prev_btn, SIG_CLICKED, NULL);
1393 1446
@@ -1411,23 +1464,28 @@ _elm_naviframe_elm_widget_event(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, Eva
1411EOLIAN static void 1464EOLIAN static void
1412_elm_naviframe_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Eina_Bool is_access) 1465_elm_naviframe_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Eina_Bool is_access)
1413{ 1466{
1414 Elm_Naviframe_Item *it; 1467 Elm_Widobj_Item *eo_item;
1468 Eina_List *l;
1415 1469
1416 EINA_INLIST_FOREACH(sd->stack, it) 1470 EINA_LIST_FOREACH(sd->stack, l, eo_item)
1417 _access_obj_process(it, is_access); 1471 _access_obj_process(eo_item, is_access);
1418} 1472}
1419 1473
1420static Eina_Bool 1474static Eina_Bool
1421_push_transition_cb(void *data) 1475_push_transition_cb(void *data)
1422{ 1476{
1423 Elm_Naviframe_Item *prev_it, *it = data; 1477 Elm_Widobj_Item *eo_prev_it;
1478 Elm_Widobj_Item *eo_item = (Elm_Widobj_Item *)data;
1479 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1480 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
1424 1481
1425 it->animator = NULL; 1482 it->animator = NULL;
1426 1483
1427 if (EINA_INLIST_GET(it)->prev) 1484 if (eina_list_prev(eina_list_data_find_list(sd->stack, eo_item)))
1428 { 1485 {
1429 prev_it = EINA_INLIST_CONTAINER_GET(EINA_INLIST_GET(it)->prev, 1486 eo_prev_it = eina_list_data_get(eina_list_prev(eina_list_data_find_list(sd->stack, eo_item)));
1430 Elm_Naviframe_Item); 1487
1488 ELM_NAVIFRAME_ITEM_DATA_GET(eo_prev_it, prev_it);
1431 elm_object_signal_emit(VIEW(prev_it), "elm,state,cur,pushed,deferred", 1489 elm_object_signal_emit(VIEW(prev_it), "elm,state,cur,pushed,deferred",
1432 "elm"); 1490 "elm");
1433 edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it))); 1491 edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it)));
@@ -1439,17 +1497,21 @@ _push_transition_cb(void *data)
1439} 1497}
1440 1498
1441static void 1499static void
1442_item_push_helper(Elm_Naviframe_Item *item) 1500_item_push_helper(Elm_Widobj_Item *eo_item)
1443{ 1501{
1444 Elm_Naviframe_Item *top_item; 1502 Elm_Widobj_Item *eo_top_item;
1503 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, item);
1504
1445 Evas_Object *obj = WIDGET(item); 1505 Evas_Object *obj = WIDGET(item);
1446 ELM_NAVIFRAME_DATA_GET(obj, sd); 1506 ELM_NAVIFRAME_DATA_GET(obj, sd);
1447 top_item = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj); 1507
1508 eo_top_item = (Elm_Widobj_Item *)elm_naviframe_top_item_get(obj);
1448 evas_object_show(VIEW(item)); 1509 evas_object_show(VIEW(item));
1449 1510
1450 if (top_item) elm_widget_focused_object_clear(VIEW(top_item)); 1511 ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_item, top_item);
1451 _resize_object_reset(obj, item); 1512 if (eo_top_item) elm_widget_focused_object_clear(VIEW(top_item));
1452 if (top_item) 1513 _resize_object_reset(obj, eo_item);
1514 if (eo_top_item)
1453 { 1515 {
1454 elm_widget_tree_unfocusable_set(VIEW(item), EINA_FALSE); 1516 elm_widget_tree_unfocusable_set(VIEW(item), EINA_FALSE);
1455 elm_widget_tree_unfocusable_set(VIEW(top_item), EINA_TRUE); 1517 elm_widget_tree_unfocusable_set(VIEW(top_item), EINA_TRUE);
@@ -1465,7 +1527,7 @@ _item_push_helper(Elm_Naviframe_Item *item)
1465 edje_object_message_signal_process(elm_layout_edje_get(VIEW(item))); 1527 edje_object_message_signal_process(elm_layout_edje_get(VIEW(item)));
1466 1528
1467 ecore_animator_del(item->animator); 1529 ecore_animator_del(item->animator);
1468 item->animator = ecore_animator_add(_push_transition_cb, item); 1530 item->animator = ecore_animator_add(_push_transition_cb, eo_item);
1469 } 1531 }
1470 else 1532 else
1471 { 1533 {
@@ -1475,9 +1537,9 @@ _item_push_helper(Elm_Naviframe_Item *item)
1475 elm_object_focus_set(WIDGET(item), EINA_TRUE); 1537 elm_object_focus_set(WIDGET(item), EINA_TRUE);
1476 } 1538 }
1477 1539
1478 sd->stack = eina_inlist_append(sd->stack, EINA_INLIST_GET(item)); 1540 sd->stack = eina_list_append(sd->stack, eo_item);
1479 1541
1480 if (!top_item) 1542 if (!eo_top_item)
1481 elm_object_signal_emit(VIEW(item), "elm,state,visible", "elm"); 1543 elm_object_signal_emit(VIEW(item), "elm,state,visible", "elm");
1482 1544
1483 elm_layout_sizing_eval(obj); 1545 elm_layout_sizing_eval(obj);
@@ -1504,9 +1566,9 @@ _elm_naviframe_eo_base_constructor(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED)
1504EOLIAN static Elm_Object_Item* 1566EOLIAN static Elm_Object_Item*
1505_elm_naviframe_item_push(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style) 1567_elm_naviframe_item_push(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
1506{ 1568{
1507 Elm_Naviframe_Item *top_item, *item; 1569 Elm_Widobj_Item *top_item, *item;
1508 1570
1509 top_item = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj); 1571 top_item = (Elm_Widobj_Item *)elm_naviframe_top_item_get(obj);
1510 item = _item_new(obj, top_item, 1572 item = _item_new(obj, top_item,
1511 title_label, prev_btn, next_btn, content, item_style); 1573 title_label, prev_btn, next_btn, content, item_style);
1512 if (!item) return NULL; 1574 if (!item) return NULL;
@@ -1517,53 +1579,56 @@ _elm_naviframe_item_push(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char
1517EOLIAN static Elm_Object_Item* 1579EOLIAN static Elm_Object_Item*
1518_elm_naviframe_item_insert_before(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Item *before, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style) 1580_elm_naviframe_item_insert_before(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Item *before, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
1519{ 1581{
1520 Elm_Naviframe_Item *it, *prev_it = NULL; 1582 Elm_Widobj_Item *eo_item, *prev_it = NULL;
1583
1584 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN((Elm_Widobj_Item *)before, NULL);
1521 1585
1522 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(before, NULL); 1586 eo_item = (Elm_Widobj_Item *)before;
1523 1587
1524 it = (Elm_Naviframe_Item *)before; 1588 if (eina_list_prev(eina_list_data_find_list(sd->stack, eo_item)))
1525 if (EINA_INLIST_GET(it)->prev) 1589 prev_it = eina_list_data_get(eina_list_prev(eina_list_data_find_list(sd->stack, eo_item)));
1526 prev_it = EINA_INLIST_CONTAINER_GET(EINA_INLIST_GET(it)->prev, 1590
1527 Elm_Naviframe_Item); 1591 eo_item = _item_new(obj, prev_it,
1528 it = _item_new(obj, prev_it,
1529 title_label, prev_btn, next_btn, content, item_style); 1592 title_label, prev_btn, next_btn, content, item_style);
1530 if (!it) return NULL; 1593 if (!eo_item) return NULL;
1531 1594
1532 sd->stack = eina_inlist_prepend_relative 1595 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1533 (sd->stack, EINA_INLIST_GET(it), 1596
1534 EINA_INLIST_GET(((Elm_Naviframe_Item *)before))); 1597 sd->stack = eina_list_prepend_relative(sd->stack, eo_item, before);
1535 1598
1536 elm_widget_tree_unfocusable_set(VIEW(it), EINA_TRUE); 1599 elm_widget_tree_unfocusable_set(VIEW(it), EINA_TRUE);
1537 elm_object_signal_emit(VIEW(it), "elm,state,invisible", "elm"); 1600 elm_object_signal_emit(VIEW(it), "elm,state,invisible", "elm");
1538 1601
1539 elm_layout_sizing_eval(obj); 1602 elm_layout_sizing_eval(obj);
1540 1603
1541 return (Elm_Object_Item *)it; 1604 return (Elm_Object_Item *)eo_item;
1542} 1605}
1543 1606
1544EOLIAN static Elm_Object_Item* 1607EOLIAN static Elm_Object_Item*
1545_elm_naviframe_item_insert_after(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Item *after, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style) 1608_elm_naviframe_item_insert_after(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Item *eo_after, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
1546{ 1609{
1547 Elm_Naviframe_Item *it; 1610 Elm_Widobj_Item *eo_item;
1548 Eina_Bool top_inserted = EINA_FALSE; 1611 Eina_Bool top_inserted = EINA_FALSE;
1549 1612
1550 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(after, NULL); 1613 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN((Elm_Widobj_Item *)eo_after, NULL);
1614
1615 ELM_NAVIFRAME_ITEM_DATA_GET((Elm_Widobj_Item *)eo_after, after);
1551 1616
1552 it = _item_new(obj, (Elm_Naviframe_Item *)after, 1617 eo_item = _item_new(obj, (Elm_Widobj_Item *)eo_after,
1553 title_label, prev_btn, next_btn, content, item_style); 1618 title_label, prev_btn, next_btn, content, item_style);
1554 if (!it) return NULL; 1619 if (!eo_item) return NULL;
1555 1620
1556 if (elm_naviframe_top_item_get(obj) == after) top_inserted = EINA_TRUE; 1621 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1557 1622
1558 sd->stack = eina_inlist_append_relative 1623 if (elm_naviframe_top_item_get(obj) == eo_after) top_inserted = EINA_TRUE;
1559 (sd->stack, EINA_INLIST_GET(it), 1624
1560 EINA_INLIST_GET(((Elm_Naviframe_Item *)after))); 1625 sd->stack = eina_list_append_relative(sd->stack, eo_item, eo_after);
1561 1626
1562 if (top_inserted) 1627 if (top_inserted)
1563 { 1628 {
1564 elm_widget_focused_object_clear(VIEW(after)); 1629 elm_widget_focused_object_clear(VIEW(after));
1565 elm_widget_tree_unfocusable_set(VIEW(after), EINA_TRUE); 1630 elm_widget_tree_unfocusable_set(VIEW(after), EINA_TRUE);
1566 _resize_object_reset(obj, it); 1631 _resize_object_reset(obj, eo_item);
1567 evas_object_show(VIEW(it)); 1632 evas_object_show(VIEW(it));
1568 evas_object_hide(VIEW(after)); 1633 evas_object_hide(VIEW(after));
1569 if (elm_object_focus_allow_get(VIEW(it))) 1634 if (elm_object_focus_allow_get(VIEW(it)))
@@ -1578,19 +1643,21 @@ _elm_naviframe_item_insert_after(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Ite
1578 1643
1579 elm_layout_sizing_eval(obj); 1644 elm_layout_sizing_eval(obj);
1580 1645
1581 return (Elm_Object_Item *)it; 1646 return (Elm_Object_Item *)eo_item;
1582} 1647}
1583 1648
1584EOLIAN static Evas_Object* 1649EOLIAN static Evas_Object*
1585_elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd) 1650_elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd)
1586{ 1651{
1587 Elm_Naviframe_Item *it, *prev_it = NULL; 1652 Elm_Widobj_Item *eo_item, *eo_prev_it = NULL;
1588 Evas_Object *content = NULL; 1653 Evas_Object *content = NULL;
1589 1654
1590 if (sd->freeze_events && sd->popping) return NULL; 1655 if (sd->freeze_events && sd->popping) return NULL;
1591 1656
1592 it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj); 1657 eo_item = (Elm_Widobj_Item *)elm_naviframe_top_item_get(obj);
1593 if (!it) return NULL; 1658 if (!eo_item) return NULL;
1659
1660 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1594 1661
1595 if (it->popping) return NULL; 1662 if (it->popping) return NULL;
1596 it->popping = EINA_TRUE; 1663 it->popping = EINA_TRUE;
@@ -1599,11 +1666,11 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd)
1599 if (it->pop_cb) 1666 if (it->pop_cb)
1600 { 1667 {
1601 it->ref++; 1668 it->ref++;
1602 if (!it->pop_cb(it->pop_data, (Elm_Object_Item *)it)) 1669 if (!it->pop_cb(it->pop_data, (Elm_Object_Item *)eo_item))
1603 { 1670 {
1604 it->ref--; 1671 it->ref--;
1605 if (it->delete_me) 1672 if (it->delete_me)
1606 elm_widget_item_del(it); 1673 eo_do(eo_item, elm_wdg_item_del());
1607 else 1674 else
1608 it->popping = EINA_FALSE; 1675 it->popping = EINA_FALSE;
1609 evas_object_unref(obj); 1676 evas_object_unref(obj);
@@ -1618,14 +1685,15 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd)
1618 1685
1619 evas_object_data_set(VIEW(it), "out_of_list", (void *)1); 1686 evas_object_data_set(VIEW(it), "out_of_list", (void *)1);
1620 1687
1621 if (sd->stack->last->prev) 1688 if (eina_list_prev(eina_list_last(sd->stack)))
1622 prev_it = EINA_INLIST_CONTAINER_GET 1689 eo_prev_it = eina_list_data_get(eina_list_prev(eina_list_last(sd->stack)));
1623 (sd->stack->last->prev, Elm_Naviframe_Item);
1624 1690
1625 sd->stack = eina_inlist_remove(sd->stack, EINA_INLIST_GET(it)); 1691 sd->stack = eina_list_remove(sd->stack, eo_item);
1626 1692
1627 if (prev_it) 1693 if (eo_prev_it)
1628 { 1694 {
1695 ELM_NAVIFRAME_ITEM_DATA_GET(eo_prev_it, prev_it);
1696
1629 elm_widget_tree_unfocusable_set(VIEW(prev_it), EINA_FALSE); 1697 elm_widget_tree_unfocusable_set(VIEW(prev_it), EINA_FALSE);
1630 elm_widget_tree_unfocusable_set(VIEW(it), EINA_TRUE); 1698 elm_widget_tree_unfocusable_set(VIEW(it), EINA_TRUE);
1631 1699
@@ -1635,7 +1703,7 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd)
1635 evas_object_freeze_events_set(VIEW(prev_it), EINA_TRUE); 1703 evas_object_freeze_events_set(VIEW(prev_it), EINA_TRUE);
1636 } 1704 }
1637 1705
1638 _resize_object_reset(obj, prev_it); 1706 _resize_object_reset(obj, eo_prev_it);
1639 1707
1640 /* these 2 signals MUST take place simultaneously */ 1708 /* these 2 signals MUST take place simultaneously */
1641 elm_object_signal_emit(VIEW(it), "elm,state,cur,popped", "elm"); 1709 elm_object_signal_emit(VIEW(it), "elm,state,cur,popped", "elm");
@@ -1646,73 +1714,65 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd)
1646 edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it))); 1714 edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it)));
1647 1715
1648 ecore_animator_del(it->animator); 1716 ecore_animator_del(it->animator);
1649 it->animator = ecore_animator_add(_pop_transition_cb, it); 1717 it->animator = ecore_animator_add(_pop_transition_cb, eo_item);
1650 sd->popping = eina_list_append(sd->popping, it); 1718 sd->popping = eina_list_append(sd->popping, eo_item);
1651 } 1719 }
1652 else 1720 else
1653 elm_widget_item_del(it); 1721 eo_do(eo_item, elm_wdg_item_del());
1654 1722
1655 return content; 1723 return content;
1656} 1724}
1657 1725
1658EAPI void 1726EOLIAN static void
1659elm_naviframe_item_pop_to(Elm_Object_Item *it) 1727_elm_naviframe_item_pop_to(Eo *nit, Elm_Naviframe_Item_Data *it)
1660{ 1728{
1661 Elm_Naviframe_Item *nit; 1729 Eina_List *l;
1662 Eina_Inlist *l;
1663
1664 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(it);
1665 1730
1666 nit = (Elm_Naviframe_Item *)it; 1731 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
1667 ELM_NAVIFRAME_DATA_GET(WIDGET(nit), sd);
1668 1732
1669 if (it == elm_naviframe_top_item_get(WIDGET(nit))) return; 1733 if (nit == (Elm_Widobj_Item *)elm_naviframe_top_item_get(WIDGET(it))) return;
1670 1734
1671 l = sd->stack->last->prev; 1735 l = eina_list_prev(eina_list_last(sd->stack));
1672 1736
1673 sd->on_deletion = EINA_TRUE; 1737 sd->on_deletion = EINA_TRUE;
1674 1738
1675 while (l) 1739 while (l)
1676 { 1740 {
1677 Elm_Naviframe_Item *iit = EINA_INLIST_CONTAINER_GET 1741 Elm_Widobj_Item *iit = eina_list_data_get(l);
1678 (l, Elm_Naviframe_Item);
1679 1742
1680 if (iit == nit) break; 1743 if (iit == nit) break;
1681 1744
1682 l = l->prev; 1745 l = eina_list_prev(l);
1683 1746
1684 elm_widget_item_del(iit); 1747 eo_do(iit, elm_wdg_item_del());
1685 } 1748 }
1686 1749
1687 sd->on_deletion = EINA_FALSE; 1750 sd->on_deletion = EINA_FALSE;
1688 1751
1689 elm_naviframe_item_pop(WIDGET(nit)); 1752 elm_naviframe_item_pop(WIDGET(it));
1690} 1753}
1691 1754
1692EAPI void 1755EOLIAN static void
1693elm_naviframe_item_promote(Elm_Object_Item *it) 1756_elm_naviframe_item_promote(Eo *nit, Elm_Naviframe_Item_Data *it)
1694{ 1757{
1695 Elm_Object_Item *prev_top; 1758 Elm_Object_Item *prev_top;
1696 Elm_Naviframe_Item *nit;
1697 1759
1698 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(it); 1760 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
1699
1700 nit = (Elm_Naviframe_Item *)it;
1701 ELM_NAVIFRAME_DATA_GET(WIDGET(nit), sd);
1702 1761
1703 prev_top = elm_naviframe_top_item_get(WIDGET(nit)); 1762 prev_top = elm_naviframe_top_item_get(WIDGET(it));
1704 if (it == prev_top) return; 1763 if (nit == (Elm_Widobj_Item *)prev_top) return;
1705 1764
1706 sd->stack = eina_inlist_remove(sd->stack, EINA_INLIST_GET(nit)); 1765 sd->stack = eina_list_remove(sd->stack, nit);
1707 _item_push_helper(nit); 1766 _item_push_helper(nit);
1708} 1767}
1709 1768
1710EOLIAN static void 1769EOLIAN static void
1711_elm_naviframe_item_simple_promote(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Evas_Object *content) 1770_elm_naviframe_item_simple_promote(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Evas_Object *content)
1712{ 1771{
1713 Elm_Naviframe_Item *itr; 1772 Elm_Widobj_Item *itr;
1773 Eina_List *l;
1714 1774
1715 EINA_INLIST_FOREACH(sd->stack, itr) 1775 EINA_LIST_FOREACH(sd->stack, l, itr)
1716 { 1776 {
1717 if (elm_object_item_content_get((Elm_Object_Item *)itr) == content) 1777 if (elm_object_item_content_get((Elm_Object_Item *)itr) == content)
1718 { 1778 {
@@ -1738,43 +1798,35 @@ EOLIAN static Elm_Object_Item*
1738_elm_naviframe_top_item_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd) 1798_elm_naviframe_top_item_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd)
1739{ 1799{
1740 if (!sd->stack) return NULL; 1800 if (!sd->stack) return NULL;
1741 return (Elm_Object_Item *)(EINA_INLIST_CONTAINER_GET 1801 return (Elm_Object_Item *)eina_list_last_data_get(sd->stack);
1742 (sd->stack->last, Elm_Naviframe_Item));
1743} 1802}
1744 1803
1745EOLIAN static Elm_Object_Item* 1804EOLIAN static Elm_Object_Item*
1746_elm_naviframe_bottom_item_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd) 1805_elm_naviframe_bottom_item_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd)
1747{ 1806{
1748 if (!sd->stack) return NULL; 1807 if (!sd->stack) return NULL;
1749 return (Elm_Object_Item *)(EINA_INLIST_CONTAINER_GET 1808 return (Elm_Object_Item *)eina_list_data_get(sd->stack);
1750 (sd->stack, Elm_Naviframe_Item));
1751} 1809}
1752 1810
1753EAPI void 1811EOLIAN static void
1754elm_naviframe_item_style_set(Elm_Object_Item *it, 1812_elm_naviframe_item_style_set(Eo *eo_item,
1755 const char *item_style) 1813 Elm_Naviframe_Item_Data *nit,
1814 const char *item_style)
1756{ 1815{
1757 Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
1758
1759 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(it);
1760
1761 if (item_style && !strcmp(item_style, nit->style)) return; 1816 if (item_style && !strcmp(item_style, nit->style)) return;
1762 1817
1763 if (!item_style) 1818 if (!item_style)
1764 if (!strcmp("basic", nit->style)) return; 1819 if (!strcmp("basic", nit->style)) return;
1765 1820
1766 _item_style_set(nit, item_style); 1821 _item_style_set(eo_item, item_style);
1767 _item_signals_emit(nit); 1822 _item_signals_emit(eo_item);
1768 _item_title_enabled_update(nit, EINA_FALSE); 1823 _item_title_enabled_update(eo_item, EINA_FALSE);
1769} 1824}
1770 1825
1771EAPI const char * 1826EOLIAN static const char *
1772elm_naviframe_item_style_get(const Elm_Object_Item *it) 1827_elm_naviframe_item_style_get(Eo *eo_item EINA_UNUSED,
1828 Elm_Naviframe_Item_Data *nit)
1773{ 1829{
1774 Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
1775
1776 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(it, NULL);
1777
1778 return nit->style; 1830 return nit->style;
1779} 1831}
1780 1832
@@ -1791,41 +1843,33 @@ elm_naviframe_item_title_visible_get(const Elm_Object_Item *it)
1791 return elm_naviframe_item_title_enabled_get(it); 1843 return elm_naviframe_item_title_enabled_get(it);
1792} 1844}
1793 1845
1794EAPI void 1846EOLIAN static void
1795elm_naviframe_item_title_enabled_set(Elm_Object_Item *it, 1847_elm_naviframe_item_title_enabled_set(Eo *eo_item,
1796 Eina_Bool enabled, 1848 Elm_Naviframe_Item_Data *nit,
1797 Eina_Bool transition) 1849 Eina_Bool enabled,
1850 Eina_Bool transition)
1798{ 1851{
1799 Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
1800
1801 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(it);
1802
1803 enabled = !!enabled; 1852 enabled = !!enabled;
1804 if (nit->title_enabled == enabled) return; 1853 if (nit->title_enabled == enabled) return;
1805 1854
1806 nit->title_enabled = enabled; 1855 nit->title_enabled = enabled;
1807 1856
1808 transition = !!transition; 1857 transition = !!transition;
1809 _item_title_enabled_update(nit, transition); 1858 _item_title_enabled_update(eo_item, transition);
1810} 1859}
1811 1860
1812EAPI Eina_Bool 1861EOLIAN static Eina_Bool
1813elm_naviframe_item_title_enabled_get(const Elm_Object_Item *it) 1862_elm_naviframe_item_title_enabled_get(Eo *eo_item EINA_UNUSED, Elm_Naviframe_Item_Data *nit)
1814{ 1863{
1815 Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
1816
1817 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
1818
1819 return nit->title_enabled; 1864 return nit->title_enabled;
1820} 1865}
1821 1866
1822EAPI void 1867EOLIAN static void
1823elm_naviframe_item_pop_cb_set(Elm_Object_Item *it, Elm_Naviframe_Item_Pop_Cb func, void *data) 1868_elm_naviframe_item_pop_cb_set(Eo *eo_item EINA_UNUSED,
1869 Elm_Naviframe_Item_Data *nit,
1870 Elm_Naviframe_Item_Pop_Cb func,
1871 void *data)
1824{ 1872{
1825 Elm_Naviframe_Item *nit = (Elm_Naviframe_Item *)it;
1826
1827 ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(it);
1828
1829 nit->pop_cb = func; 1873 nit->pop_cb = func;
1830 nit->pop_data = data; 1874 nit->pop_data = data;
1831} 1875}
@@ -1846,9 +1890,10 @@ EOLIAN static Eina_List*
1846_elm_naviframe_items_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd) 1890_elm_naviframe_items_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd)
1847{ 1891{
1848 Eina_List *ret = NULL; 1892 Eina_List *ret = NULL;
1849 Elm_Naviframe_Item *itr; 1893 Elm_Widobj_Item *itr;
1894 Eina_List *l;
1850 1895
1851 EINA_INLIST_FOREACH(sd->stack, itr) 1896 EINA_LIST_FOREACH(sd->stack, l, itr)
1852 ret = eina_list_append(ret, itr); 1897 ret = eina_list_append(ret, itr);
1853 1898
1854 return ret; 1899 return ret;
@@ -1880,4 +1925,54 @@ _elm_naviframe_class_constructor(Eo_Class *klass)
1880 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 1925 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
1881} 1926}
1882 1927
1883#include "elc_naviframe.eo.c" 1928EAPI void
1929elm_naviframe_item_pop_to(Elm_Object_Item *it)
1930{
1931 eo_do((Eo*)it, elm_obj_naviframe_item_pop_to());
1932}
1933
1934EAPI void
1935elm_naviframe_item_promote(Elm_Object_Item *it)
1936{
1937 eo_do((Eo*)it, elm_obj_naviframe_item_promote());
1938}
1939
1940EAPI void
1941elm_naviframe_item_style_set(Elm_Object_Item *it,
1942 const char *item_style)
1943{
1944 eo_do((Eo*)it, elm_obj_naviframe_item_style_set(item_style));
1945}
1946
1947EAPI const char *
1948elm_naviframe_item_style_get(const Elm_Object_Item *it)
1949{
1950 const char *ret = NULL;
1951 eo_do((Eo*)it, ret = elm_obj_naviframe_item_style_get());
1952 return ret;
1953}
1954
1955EAPI void
1956elm_naviframe_item_pop_cb_set(Elm_Object_Item *it, Elm_Naviframe_Item_Pop_Cb func, void *data)
1957{
1958 eo_do((Eo*)it, elm_obj_naviframe_item_pop_cb_set(func, data));
1959}
1960
1961EAPI void
1962elm_naviframe_item_title_enabled_set(Elm_Object_Item *it,
1963 Eina_Bool enabled,
1964 Eina_Bool transition)
1965{
1966 eo_do((Eo*)it, elm_obj_naviframe_item_title_enabled_set(enabled, transition));
1967}
1968
1969EAPI Eina_Bool
1970elm_naviframe_item_title_enabled_get(const Elm_Object_Item *it)
1971{
1972 Eina_Bool ret;
1973 eo_do((Eo*)it, ret = elm_obj_naviframe_item_title_enabled_get());
1974 return ret;
1975}
1976
1977#include "elm_naviframe_item.eo.c"
1978#include "elc_naviframe.eo.c" \ No newline at end of file
diff --git a/src/lib/elm_naviframe_item.eo b/src/lib/elm_naviframe_item.eo
new file mode 100644
index 000000000..6b0fec5ca
--- /dev/null
+++ b/src/lib/elm_naviframe_item.eo
@@ -0,0 +1,111 @@
1class Elm_Naviframe_Item(Elm_Widget_Item)
2{
3 legacy_prefix: null;
4 eo_prefix: elm_obj_naviframe_item;
5 properties {
6 style {
7 get {
8 /*@
9 Get an item style
10
11 @see also elm_naviframe_item_style_set()
12
13 @ingroup Naviframe
14 */
15 }
16 set {
17 /*@
18 Set an item style
19
20 The following styles are available for this item:
21 @li @c "default"
22
23 @see also elm_naviframe_item_style_get()
24
25 @ingroup Naviframe
26 */
27 }
28 values {
29 const char *style; /*@ The current item style name. @c NULL would be default */
30 }
31 }
32 }
33 methods {
34 pop_to {
35 /*@
36 Pop the items between the top and the above one on the given item.
37
38 The items between the top and the given item will be deleted first,
39 and then the top item will be popped at last.
40
41 @ingroup Naviframe
42 */
43 }
44 title_enabled_get {
45 /*@
46 Get a value whether title area is enabled or not.
47
48 @see also elm_naviframe_item_title_enabled_set()
49
50 @ingroup Naviframe
51 */
52 return Eina_Bool; /*@ If @c EINA_TRUE, title area will be enabled, disabled otherwise */
53 }
54 title_enabled_set {
55 /*@
56 Enable/Disable the title area with transition effect
57
58 When the title area is disabled, then the controls would be hidden so as
59 to expand the content area to full-size.
60
61 @see also elm_naviframe_item_title_enabled_get()
62 @see also elm_naviframe_item_title_visible_set()
63
64 @ingroup Naviframe
65 */
66 params {
67 @in Eina_Bool enable; /*@ If @c EINA_TRUE, title area will be enabled, disabled otherwise */
68 @in Eina_Bool transition; /*@ If @c EINA_TRUE, transition effect of the title will be visible, invisible otherwise */
69 }
70 }
71 promote {
72 /*@
73 Promote an item already in the naviframe stack to the top of the stack
74
75 This will take the indicated item and promote it to the top of the stack
76 as if it had been pushed there. The item must already be inside the
77 naviframe stack to work.
78 */
79 }
80
81 pop_cb_set {
82 /*@
83 Set a function to be called when @c it of the naviframe is going to be
84 popped.
85
86 @param func the callback function.
87
88 @warning Don't set "clicked" callback to the prev button additionally if the
89 function does an exact same logic with this @c func. When hardware back key
90 is pressed then both callbacks will be called.
91
92 @since 1.8
93 @ingroup Naviframe
94 */
95 params {
96 @in Elm_Naviframe_Item_Pop_Cb func; /*@ The callback function */
97 @in void *data; /*@ Data to be passed to func */
98 }
99 }
100 }
101 implements {
102 Eo_Base::constructor;
103 Elm_Widget_Item::del_pre;
104 Elm_Widget_Item::signal_emit;
105 Elm_Widget_Item::part_text::set;
106 Elm_Widget_Item::part_text::get;
107 Elm_Widget_Item::part_content::get;
108 Elm_Widget_Item::part_content::set;
109 Elm_Widget_Item::part_content_unset;
110 }
111} \ No newline at end of file
diff --git a/src/lib/elm_widget_naviframe.h b/src/lib/elm_widget_naviframe.h
index e26279108..d2a8b5845 100644
--- a/src/lib/elm_widget_naviframe.h
+++ b/src/lib/elm_widget_naviframe.h
@@ -2,7 +2,9 @@
2#define ELM_WIDGET_NAVIFRAME_H 2#define ELM_WIDGET_NAVIFRAME_H
3 3
4#include "Elementary.h" 4#include "Elementary.h"
5#include "elm_naviframe_item.eo.h"
5 6
7#include "elm_object_item_migration_temp.h"
6/** 8/**
7 * @addtogroup Widget 9 * @addtogroup Widget
8 * @{ 10 * @{
@@ -20,7 +22,7 @@
20typedef struct _Elm_Naviframe_Data Elm_Naviframe_Data; 22typedef struct _Elm_Naviframe_Data Elm_Naviframe_Data;
21struct _Elm_Naviframe_Data 23struct _Elm_Naviframe_Data
22{ 24{
23 Eina_Inlist *stack; /* top item is the list's LAST item */ 25 Eina_List *stack;
24 Eina_List *popping; 26 Eina_List *popping;
25 Evas_Object *dummy_edje; 27 Evas_Object *dummy_edje;
26 Evas_Display_Mode dispmode; 28 Evas_Display_Mode dispmode;
@@ -31,13 +33,13 @@ struct _Elm_Naviframe_Data
31 Eina_Bool freeze_events : 1; 33 Eina_Bool freeze_events : 1;
32}; 34};
33 35
34typedef struct _Elm_Naviframe_Item Elm_Naviframe_Item; 36typedef struct _Elm_Naviframe_Item_Data Elm_Naviframe_Item_Data;
35struct _Elm_Naviframe_Item 37struct _Elm_Naviframe_Item_Data
36{ 38{
37 ELM_WIDGET_ITEM; 39 Elm_Widget_Item_Data *base;
38 EINA_INLIST;
39 40
40 Eina_Inlist *content_list; 41 Eina_Inlist *content_list;
42
41 Eina_Inlist *text_list; 43 Eina_Inlist *text_list;
42 Evas_Object *content; 44 Evas_Object *content;
43 Evas_Object *title_prev_btn; 45 Evas_Object *title_prev_btn;
@@ -67,7 +69,7 @@ struct _Elm_Naviframe_Content_Item_Pair
67 EINA_INLIST; 69 EINA_INLIST;
68 const char *part; 70 const char *part;
69 Evas_Object *content; 71 Evas_Object *content;
70 Elm_Naviframe_Item *it; 72 Elm_Widobj_Item *it;
71}; 73};
72 74
73typedef struct _Elm_Naviframe_Text_Item_Pair Elm_Naviframe_Text_Item_Pair; 75typedef struct _Elm_Naviframe_Text_Item_Pair Elm_Naviframe_Text_Item_Pair;
@@ -102,16 +104,19 @@ struct _Elm_Naviframe_Text_Item_Pair
102 return val; \ 104 return val; \
103 } 105 }
104 106
105#define ELM_NAVIFRAME_CHECK(obj) \ 107#define ELM_NAVIFRAME_CHECK(obj) \
106 if (EINA_UNLIKELY(!eo_isa((obj), ELM_NAVIFRAME_CLASS))) \ 108 if (EINA_UNLIKELY(!eo_isa((obj), ELM_NAVIFRAME_CLASS))) \
107 return 109 return
108 110
109#define ELM_NAVIFRAME_ITEM_CHECK(it) \ 111#define ELM_NAVIFRAME_ITEM_DATA_GET(o, sd) \
110 ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, ); \ 112 Elm_Naviframe_Item_Data * sd = eo_data_scope_get(o, ELM_NAVIFRAME_ITEM_CLASS)
111 ELM_NAVIFRAME_CHECK(it->base.widget); 113
114#define ELM_NAVIFRAME_ITEM_CHECK(obj) \
115 if (EINA_UNLIKELY(!eo_isa((obj), ELM_NAVIFRAME_ITEM_CLASS))) \
116 return
112 117
113#define ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(it, ...) \ 118#define ELM_NAVIFRAME_ITEM_CHECK_OR_RETURN(obj, ...) \
114 ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ 119 if (EINA_UNLIKELY(!eo_isa((obj), ELM_NAVIFRAME_ITEM_CLASS))) \
115 ELM_NAVIFRAME_CHECK(it->base.widget) __VA_ARGS__; 120 return __VA_ARGS__;
116 121
117#endif 122#endif