1 /**
2 * @typedef Elm_Naviframe_Item_Pop_Cb
3 *
4 * Pop callback called when @c it is going to be popped. @c data is user
5 * specific data. If it returns the @c EINA_FALSE in the callback, item popping
6 * will be cancelled.
7 *
8 * @see elm_naviframe_item_pop_cb_set()
9 *
10 * @since 1.8
11 */
12 typedef Eina_Bool (*Elm_Naviframe_Item_Pop_Cb)(void *data, Elm_Object_Item *it);
13
14 /**
15 * @brief Add a new Naviframe object to the parent.
16 *
17 * @param parent Parent object
18 * @return New object or @c NULL, if it cannot be created
19 *
20 * @ingroup Elm_Naviframe_Group
21 */
22 EAPI Evas_Object *elm_naviframe_add(Evas_Object *parent);
23
24 EAPI void elm_naviframe_item_title_enabled_set(Elm_Object_Item *it, Eina_Bool enabled, Eina_Bool transition);
25
26 /**
27 * @brief Push a new item to the top of the naviframe stack (and show it).
28 *
29 * The item pushed becomes one page of the naviframe, this item will be deleted
30 * when it is popped.
31 *
32 * When push transition animation is in progress, pop operation is blocked
33 * until push is complete.
34 *
35 * The following styles are available for this item: "default"
36 *
37 * @param[in] obj The object.
38 * @param[in] title_label The label in the title area. The name of the title
39 * label part is "elm.text.title"
40 * @param[in] prev_btn The button to go to the previous item. If it is NULL,
41 * then naviframe will create a back button automatically. The name of the
42 * prev_btn part is "elm.swallow.prev_btn"
43 * @param[in] next_btn The button to go to the next item. Or It could be just
44 * an extra function button. The name of the next_btn part is
45 * "elm.swallow.next_btn"
46 * @param[in] content The main content object. The name of content part is
47 * "elm.swallow.content"
48 * @param[in] item_style The current item style name. @c NULL would be default.
49 *
50 * @return The created item or @c NULL upon failure.
51 *
52 * @ingroup Elm_Naviframe_Group
53 */
54 EAPI Elm_Object_Item *elm_naviframe_item_push(Evas_Object *obj, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style);
55
56 /**
57 * @brief Simple version of item_push.
58 *
59 * @see elm_naviframe_item_push
60 */
61 static inline Elm_Object_Item *
elm_naviframe_item_simple_push(Evas_Object * obj,Evas_Object * content)62 elm_naviframe_item_simple_push(Evas_Object *obj, Evas_Object *content)
63 {
64 Elm_Object_Item *it;
65 it = elm_naviframe_item_push(obj, NULL, NULL, NULL, content, NULL);
66 elm_naviframe_item_title_enabled_set(it, EINA_FALSE, EINA_FALSE);
67 return it;
68 }
69