+++ /dev/null
-#include <Elementary.h>
-#ifdef HAVE_CONFIG_H
-# include "elementary_config.h"
-#endif
-#ifndef ELM_LIB_QUICKLAUNCH
-typedef struct _Pginfo Pginfo;
-
-struct _Pginfo
-{
- Evas_Object *win, *pager, *pg1, *pg2, *pg3, *pg4;
-};
-
-static void
-my_pager_1(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Pginfo *info = data;
- elm_pager_content_promote(info->pager, info->pg2);
-}
-
-static void
-my_pager_2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Pginfo *info = data;
- elm_pager_content_promote(info->pager, info->pg3);
-}
-
-static void
-my_pager_3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Pginfo *info = data;
- elm_pager_content_promote(info->pager, info->pg4);
-}
-
-
-static void
-my_pager_4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Pginfo *info = data;
- elm_pager_content_promote(info->pager, info->pg1);
-}
-
-
-static void
-my_pager_pop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Pginfo *info = data;
- elm_pager_content_pop(info->pager);
-}
-
-struct style_tuple {
- const char *label;
- const char *name;
-};
-static const struct style_tuple styles[] = {
- { "Default", "default"},
- { "Slide", "slide"},
- { "Slide Invisible", "slide_invisible"},
- { "Fade", "fade"},
- { "Fade Translucide", "fade_translucide"},
- { "Fade Invisible", "fade_invisible"},
- { "Flip", "flip"},
-};
-
-static void
-_style(void *data, Evas_Object *obj, void *event_info __UNUSED__)
-{
- Evas_Object *pg = data;
- elm_object_style_set(pg, styles[elm_radio_value_get(obj)].name);
-}
-
-void
-test_pager(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Evas_Object *win, *bg, *pg, *bx, *lb, *bt;
- static Pginfo info;
-
- win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
- elm_win_title_set(win, "Pager");
- elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
- elm_win_autodel_set(win, EINA_TRUE);
- info.win = win;
-
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
- pg = elm_pager_add(win);
- evas_object_size_hint_weight_set(pg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, pg);
- evas_object_show(pg);
-
- info.pager = pg;
-
- bx = elm_box_add(win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
-
- lb = elm_label_add(win);
- elm_object_text_set(lb,
- "This is page 1 in a pager stack.<br/>"
- "<br/>"
- "So what is a pager stack? It is a stack<br/>"
- "of pages that hold widgets in it. The<br/>"
- "pages can be pushed and popped on and<br/>"
- "off the stack, activated and otherwise<br/>"
- "activated if already in the stack<br/>"
- "(activated means promoted to the top of<br/>"
- "the stack).<br/>"
- "<br/>"
- "The theme may define the animation how<br/>"
- "show and hide of pages. Select one theme style:");
- elm_box_pack_end(bx, lb);
- evas_object_show(lb);
-
- unsigned int i = 0;
- Evas_Object *rdg = NULL, *rd;
- for (i = 0; i < (sizeof(styles) / sizeof(struct style_tuple)); i++)
- {
- rd = elm_radio_add(win);
- elm_object_text_set(rd, styles[i].label);
- elm_radio_state_value_set(rd, i);
- if (rdg)
- elm_radio_group_add(rd, rdg);
- else
- rdg = rd;
- evas_object_smart_callback_add(rd, "changed", _style, pg);
- elm_box_pack_end(bx, rd);
- evas_object_show(rd);
- }
- elm_radio_value_set(rd, 0);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Flip to 2");
- evas_object_smart_callback_add(bt, "clicked", my_pager_1, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Popme");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
- elm_pager_content_push(pg, bx);
- info.pg1 = bx;
-
- bx = elm_box_add(win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
-
- lb = elm_label_add(win);
- elm_object_text_set(lb,
- "This is page 2 in a pager stack.<br/>"
- "<br/>"
- "This is just like the previous page in<br/>"
- "the pager stack."
- );
- elm_box_pack_end(bx, lb);
- evas_object_show(lb);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Flip to 3");
- evas_object_smart_callback_add(bt, "clicked", my_pager_2, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Popme");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
- elm_pager_content_push(pg, bx);
- info.pg2 = bx;
-
- bx = elm_box_add(win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
-
- lb = elm_label_add(win);
- elm_object_text_set(lb,
- "This is page 3 in a pager stack.<br/>"
- "<br/>"
- "This is just like the previous page in<br/>"
- "the pager stack.");
- elm_box_pack_end(bx, lb);
- evas_object_show(lb);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Flip to 1");
- evas_object_smart_callback_add(bt, "clicked", my_pager_3, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Popme");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
- elm_pager_content_push(pg, bx);
- info.pg3 = bx;
-
- Evas_Object *ly, *ly2;
- char buf[4096];
-
- ly = elm_layout_add(win);
- snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
- elm_layout_file_set(ly, buf, "test/layout");
- evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(ly);
-
- ly2 = elm_layout_add(win);
- snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
- elm_layout_file_set(ly2, buf, "layout2");
- evas_object_size_hint_weight_set(ly2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- //elm_win_resize_object_add(win, ly2);
- evas_object_show(ly2);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Flip to 1");
- evas_object_smart_callback_add(bt, "clicked", my_pager_4, &info);
- elm_object_part_content_set(ly2, "element1", bt);
- evas_object_show(bt);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Popme");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
- evas_object_show(bt);
- elm_object_part_content_set(ly2, "element2", bt);
-
- elm_object_part_content_set(ly, "swallow", ly2);
- evas_object_show(ly);
-
- elm_pager_content_push(pg, ly);
- info.pg4 = ly2;
-
-
- evas_object_show(win);
-}
-
-static void
-my_pager_push(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Pginfo *info = data;
- Evas_Object *bx, *bt, *lb;
- static int count = 2;
- char buf[32];
-
- bx = elm_box_add(info->win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
-
- lb = elm_label_add(info->win);
- snprintf(buf, sizeof(buf), "This is page %d in the slide pager<br/><br/>", count++);
- elm_object_text_set(lb, buf);
- elm_box_pack_end(bx, lb);
- evas_object_show(lb);
-
- bt = elm_button_add(info->win);
- elm_object_text_set(bt, "Push a new page");
- evas_object_smart_callback_add(bt, "clicked", my_pager_push, info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
-
- bt = elm_button_add(info->win);
- elm_object_text_set(bt, "Go back (pop)");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
- elm_pager_content_push(info->pager, bx);
-}
-
-void
-_hide_finished(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- //To prevent the window size become zero.
- Pginfo *info = data;
- if (elm_pager_content_top_get(info->pager)) return;
- elm_win_resize_object_del(info->win, info->pager);
-}
-
-void
-test_pager_slide(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- Evas_Object *win, *bg, *pg, *bx, *lb, *bt;
- static Pginfo info;
-
- win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
- elm_win_title_set(win, "Pager Slide");
- elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
- elm_win_autodel_set(win, EINA_TRUE);
- info.win = win;
-
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
- pg = elm_pager_add(win);
- elm_win_resize_object_add(win, pg);
- evas_object_smart_callback_add(pg, "hide,finished",
- _hide_finished, &info);
- elm_object_style_set(pg, "slide");
- evas_object_show(pg);
- info.pager = pg;
- bx = elm_box_add(win);
- evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bx);
-
- lb = elm_label_add(win);
- elm_object_text_set(lb,
- "This is page 1 in a slide pager.<br/>"
- "<br/>"
- "The slide pager style is useful for browsing<br/>"
- "a hierarchy of objects, as it makes clear<br/>"
- "the direction of the browse.<br/>"
- "This is the 'slide' style, also available<br/>"
- "a fully transparent style named 'slide_invisble'.<br/>"
- "<br/>");
- elm_box_pack_end(bx, lb);
- evas_object_show(lb);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Push a new page");
- evas_object_smart_callback_add(bt, "clicked", my_pager_push, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
-
- bt = elm_button_add(win);
- elm_object_text_set(bt, "Go back (pop)");
- evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
- elm_box_pack_end(bx, bt);
- evas_object_show(bt);
- elm_pager_content_push(pg, bx);
-
- evas_object_show(win);
-}
-#endif
*/
EINA_DEPRECATED EAPI Eina_Bool elm_flip_front_get(const Evas_Object *obj);
+/*
+ * Add a new pager to the parent
+ *
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ *
+ * @ingroup Pager
+ * @deprecated Use naviframe instead
+ */
+EINA_DEPRECATED EAPI Evas_Object *elm_pager_add(Evas_Object *parent);
+
+/**
+ * @brief Push an object to the top of the pager stack (and show it).
+ *
+ * @param obj The pager object
+ * @param content The object to push
+ *
+ * The object pushed becomes a child of the pager, it will be controlled and
+ * deleted when the pager is deleted.
+ *
+ * @note If the content is already in the stack use
+ * elm_pager_content_promote().
+ * @warning Using this function on @p content already in the stack results in
+ * undefined behavior.
+ * @deprecated Use naviframe instead
+ */
+EINA_DEPRECATED EAPI void elm_pager_content_push(Evas_Object *obj, Evas_Object *content);
+
+/**
+ * @brief Pop the object that is on top of the stack
+ *
+ * @param obj The pager object
+ *
+ * This pops the object that is on the top(visible) of the pager, makes it
+ * disappear, then deletes the object. The object that was underneath it on
+ * the stack will become visible.
+ * @deprecated Use naviframe instead
+ */
+EINA_DEPRECATED EAPI void elm_pager_content_pop(Evas_Object *obj);
+
+/**
+ * @brief Moves an object already in the pager stack to the top of the stack.
+ *
+ * @param obj The pager object
+ * @param content The object to promote
+ *
+ * This will take the @p content and move it to the top of the stack as
+ * if it had been pushed there.
+ *
+ * @note If the content isn't already in the stack use
+ * elm_pager_content_push().
+ * @warning Using this function on @p content not already in the stack
+ * results in undefined behavior.
+ * @deprecated Use naviframe instead
+ */
+EINA_DEPRECATED EAPI void elm_pager_content_promote(Evas_Object *obj, Evas_Object *content);
+/**
+ * @brief Return the object at the bottom of the pager stack
+ *
+ * @param obj The pager object
+ * @return The bottom object or NULL if none
+ * @deprecated Use naviframe instead
+ */
+EINA_DEPRECATED EAPI Evas_Object *elm_pager_content_bottom_get(const Evas_Object *obj);
+
+/**
+ * @brief Return the object at the top of the pager stack
+ *
+ * @param obj The pager object
+ * @return The top object or NULL if none
+ * @deprecated Use naviframe instead
+ */
+EINA_DEPRECATED EAPI Evas_Object *elm_pager_content_top_get(const Evas_Object *obj);
+
+/**
+ * @brief Set the default item style.
+ *
+ * Default item style will be used with items who's style is NULL
+ *
+ * @param obj The pager object
+ * @param style The style
+ * @deprecated Use naviframe instead
+ */
+EINA_DEPRECATED EAPI void elm_pager_item_style_default_set(Evas_Object *obj, const char *style);
+
+/**
+ * @brief Get the default item style
+ *
+ * @param obj The pager object
+ * @return the default item style
+ *
+ * @see elm_pager_item_style_default_set()
+ * @deprecated Use naviframe instead
+ */
+EINA_DEPRECATED EAPI const char *elm_pager_item_style_default_get(const Evas_Object *obj);
+
+
+/**
+ * @}
+ */
+++ /dev/null
-/**
- * @defgroup Pager Pager
- *
- * @image html img/widget/pager/preview-00.png
- * @image latex img/widget/pager/preview-00.eps
- *
- * @brief Widget that allows flipping between one or more “pages”
- * of objects.
- *
- * The flipping between pages of objects is animated. All content
- * in the pager is kept in a stack, the top being the last content added
- * (visible one) on the top of that stack.
- *
- * Objects can be pushed or popped from the stack or deleted as
- * well. Pushes and pops will animate the widget according to its
- * style (a pop will also delete the child object once the
- * animation is finished). Any object already in the pager can be
- * promoted to the top (from its current stacking position) through
- * the use of elm_pager_content_promote(). New objects are pushed
- * to the top with elm_pager_content_push(). When the top item is
- * no longer wanted, simply pop it with elm_pager_content_pop() and
- * it will also be deleted. If an object is no longer needed and is
- * not the top item, just delete it as normal. You can get the objects
- * at the top and bottom with
- * elm_pager_content_top_get() and elm_pager_content_bottom_get()
- * respectively.
- *
- * Signals that you can add callbacks for are:
- * - @c "show,finished" - when a new page is actually shown on the top
- * - @c "hide,finished" - when a previous page is hidden
- *
- * Only after the first of that signals the child object is
- * guaranteed to be visible, as in @c evas_object_visible_get().
- *
- * This widget has the following styles available:
- * - @c "default"
- *
- * @note These styles affect only the flipping animations on the
- * default theme; the appearance when not animating is unaffected
- * by them.
- *
- * @ref tutorial_pager gives a good overview of the usage of the API.
- * @{
- */
-
-/**
- * Add a new pager to the parent
- *
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
- *
- * @ingroup Pager
- */
-EAPI Evas_Object *elm_pager_add(Evas_Object *parent);
-
-/**
- * @brief Push an object to the top of the pager stack (and show it).
- *
- * @param obj The pager object
- * @param content The object to push
- *
- * The object pushed becomes a child of the pager, it will be controlled and
- * deleted when the pager is deleted.
- *
- * @note If the content is already in the stack use
- * elm_pager_content_promote().
- * @warning Using this function on @p content already in the stack results in
- * undefined behavior.
- */
-EAPI void elm_pager_content_push(Evas_Object *obj, Evas_Object *content);
-
-/**
- * @brief Pop the object that is on top of the stack
- *
- * @param obj The pager object
- *
- * This pops the object that is on the top(visible) of the pager, makes it
- * disappear, then deletes the object. The object that was underneath it on
- * the stack will become visible.
- */
-EAPI void elm_pager_content_pop(Evas_Object *obj);
-
-/**
- * @brief Moves an object already in the pager stack to the top of the stack.
- *
- * @param obj The pager object
- * @param content The object to promote
- *
- * This will take the @p content and move it to the top of the stack as
- * if it had been pushed there.
- *
- * @note If the content isn't already in the stack use
- * elm_pager_content_push().
- * @warning Using this function on @p content not already in the stack
- * results in undefined behavior.
- */
-EAPI void elm_pager_content_promote(Evas_Object *obj, Evas_Object *content);
-
-/**
- * @brief Return the object at the bottom of the pager stack
- *
- * @param obj The pager object
- * @return The bottom object or NULL if none
- */
-EAPI Evas_Object *elm_pager_content_bottom_get(const Evas_Object *obj);
-
-/**
- * @brief Return the object at the top of the pager stack
- *
- * @param obj The pager object
- * @return The top object or NULL if none
- */
-EAPI Evas_Object *elm_pager_content_top_get(const Evas_Object *obj);
-
-/**
- * @brief Set the default item style.
- *
- * Default item style will be used with items who's style is NULL
- *
- * @param obj The pager object
- * @param style The style
- */
-EAPI void elm_pager_item_style_default_set(Evas_Object *obj, const char *style);
-
-/**
- * @brief Get the default item style
- *
- * @param obj The pager object
- * @return the default item style
- *
- * @see elm_pager_item_style_default_set()
- */
-EAPI const char *elm_pager_item_style_default_get(const Evas_Object *obj);
-
-
-/**
- * @}
- */