--- /dev/null
+#include "widget_preview_tmpl_head.c"
+
+Evas_Object *o = elm_frame_add(win);
+evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+elm_win_resize_object_add(win, o);
+evas_object_show(o);
+
+elm_object_text_set(o, "Frame");
+
+Evas_Object *o2 = elm_label_add(win);
+evas_object_size_hint_weight_set(o2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+evas_object_show(o2);
+elm_object_text_set(o2, "Frame content");
+
+elm_object_content_set(o, o2);
+
+#include "widget_preview_tmpl_foot.c"
--- /dev/null
+#include "widget_preview_tmpl_head.c"
+
+Evas_Object *o = elm_mapbuf_add(win);
+evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+elm_win_resize_object_add(win, o);
+evas_object_show(o);
+
+Evas_Object *tb = elm_table_add(win);
+evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+evas_object_size_hint_fill_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
+evas_object_show(tb);
+
+unsigned int i, j;
+for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 8; j++)
+ {
+ Evas_Object *ic = elm_icon_add(win);
+ elm_icon_standard_set(ic, "home");
+ elm_icon_scale_set(ic, EINA_FALSE, EINA_FALSE);
+ evas_object_show(ic);
+ elm_table_pack(tb, ic, i, j, 1, 1);
+ }
+ }
+
+elm_object_content_set(o, tb);
+elm_mapbuf_enabled_set(o, EINA_TRUE);
+
+#include "widget_preview_tmpl_foot.c"
--- /dev/null
+#include "widget_preview_tmpl_head.c"
+
+Evas_Object *o = elm_notify_add(win);
+evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+elm_win_resize_object_add(win, o);
+evas_object_show(o);
+
+Evas_Object *o2 = elm_label_add(win);
+elm_object_text_set(o2, "content");
+evas_object_show(o2);
+
+elm_object_content_set(o, o2);
+
+
+#include "widget_preview_tmpl_foot.c"
--- /dev/null
+#include "widget_preview_tmpl_head.c"
+
+Evas_Object *o = elm_panel_add(win);
+evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+elm_win_resize_object_add(win, o);
+evas_object_show(o);
+
+Evas_Object *o2 = elm_label_add(win);
+elm_object_text_set(o2, "content");
+evas_object_show(o2);
+
+elm_object_content_set(o, o2);
+
+
+#include "widget_preview_tmpl_foot.c"
evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); \
evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); \
elm_object_text_set(lb, label); \
- elm_frame_content_set(pd, lb); \
+ elm_object_content_set(pd, lb); \
evas_object_show(lb); \
} \
while (0)
elm_object_text_set(lb,
"Applying configuration change"
);
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
}
// FIXME: add theme selector (basic mode and advanced for fallbacks)
// FIXME: save config
// FIXME: profile selector / creator etc.
- elm_frame_content_set(fr, bx);
+ elm_object_content_set(fr, bx);
evas_object_show(bx);
}
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, 1.0, 1.0);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
elm_list_item_append(li, "List Item 1", NULL, NULL, NULL, NULL);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, 1.0, 1.0);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(pd, li);
+ elm_object_content_set(pd, li);
evas_object_show(li);
list = elm_theme_name_available_list_new();
elm_object_text_set(bt, "Browse...");
evas_object_size_hint_weight_set(bt, 1.0, 1.0);
evas_object_size_hint_align_set(bt, 0.9, 0.9);
- elm_frame_content_set(pd, bt);
+ elm_object_content_set(pd, bt);
evas_object_show(bt);
*/
pd = elm_frame_add(win);
elm_object_text_set(fr, "Preview");
evas_object_size_hint_weight_set(fr, 1.0, 1.0);
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(pd, fr);
+ elm_object_content_set(pd, fr);
evas_object_show(fr);
sc = elm_scroller_add(win);
elm_scroller_bounce_set(sc, 0, 0);
evas_object_size_hint_weight_set(sc, 1.0, 1.0);
evas_object_size_hint_align_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, sc);
+ elm_object_content_set(fr, sc);
evas_object_show(sc);
sample = _sample_theme_new(win);
elm_object_text_set(bt, "Use Theme");
evas_object_size_hint_weight_set(bt, 1.0, 0.0);
evas_object_size_hint_align_set(bt, 0.5, 0.5);
- elm_frame_content_set(pd, bt);
+ elm_object_content_set(pd, bt);
evas_object_show(bt);
evas_object_data_set(win, "themes", tb);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
evas_object_data_set(win, "font_classes_list", li);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
evas_object_data_set(win, "font_names_list", li);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
evas_object_data_set(win, "font_styles_list", li);
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_show(li);
evas_object_data_set(win, "font_sizes_list", li);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
- elm_frame_content_set(pd, bx);
+ elm_object_content_set(pd, bx);
evas_object_data_set(win, "fonts", base);
elm_object_text_set(fr, "Available Profiles");
evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, fr_bx1);
+ elm_object_content_set(fr, fr_bx1);
elm_box_pack_end(bx, fr);
evas_object_show(fr);
elm_box_pack_end(btn_bx, bt);
evas_object_show(bt);
- elm_frame_content_set(pd, btn_bx);
+ elm_object_content_set(pd, btn_bx);
evas = evas_object_evas_get(li);
evas_event_freeze(evas);
evas_object_show(fr);
li = elm_list_add(win);
- elm_frame_content_set(fr, li);
+ elm_object_content_set(fr, li);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(bt, "Use Engine");
evas_object_size_hint_weight_set(bt, 0.0, 0.0);
evas_object_size_hint_align_set(bt, 0.5, 0.5);
- elm_frame_content_set(pd, bt);
+ elm_object_content_set(pd, bt);
evas_object_show(bt);
evas_object_data_set(win, "rendering", bx);
"Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
tg = elm_toggle_add(win);
elm_layout_file_set(ly, buf, "main");
evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, ly);
+ elm_object_content_set(fr, ly);
evas_object_show(ly);
re = evas_object_rectangle_add(evas_object_evas_get(win));
elm_colorselector_color_set(cp, r, g, b, a);
evas_object_size_hint_weight_set(cp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(cp, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_frame_content_set(fr, cp);
+ elm_object_content_set(fr, cp);
evas_object_show(cp);
evas_object_smart_callback_add(cp, "changed", _colorselector_clicked_cb, re);
fl_f = elm_flip_add(win);
evas_object_size_hint_align_set(fl_f, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(fl_f, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, fl_f);
+ elm_object_content_set(fr, fl_f);
evas_object_show(fl_f);
o = elm_bg_add(win);
fl_b = elm_flip_add(win);
evas_object_size_hint_align_set(fl_b, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(fl_b, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, fl_b);
+ elm_object_content_set(fr, fl_b);
evas_object_show(fl_b);
o = elm_bg_add(win);
{
Evas_Object *tb = elm_table_add(win);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, tb);
+ elm_object_content_set(fr, tb);
my_show(tb);
for (j = 0; j < 1; j++)
for (i = 0; i < 2; i++)
evas_object_show(fr);
bx2 = elm_box_add(win);
- elm_frame_content_set(fr, bx2);
+ elm_object_content_set(fr, bx2);
evas_object_show(bx2);
lb = elm_label_add(win);
elm_object_text_set(lb,
"Enable reorder mode if you want to move item.<br>"
"Then long press and drag item.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
gl = elm_genlist_add(win);
elm_table_pack(tb, pad, 6, 1, 1, 10);
mb = elm_mapbuf_add(win);
- elm_mapbuf_content_set(mb, tb);
+ elm_object_content_set(mb, tb);
evas_object_show(tb);
for (j = 0; j < 5; j++)
evas_object_show(bt);
mb = elm_mapbuf_add(win);
- elm_mapbuf_content_set(mb, ly);
+ elm_object_content_set(mb, ly);
evas_object_show(ly);
elm_box_pack_end(bx, mb);
mb = elm_mapbuf_add(win);
mbs = eina_list_append(mbs, mb);
- elm_mapbuf_content_set(mb, tb);
+ elm_object_content_set(mb, tb);
evas_object_show(tb);
elm_box_pack_end(bx, mb);
evas_object_show(mb);
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
evas_object_smart_callback_add(notify, "block,clicked", _notify_block, NULL);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
evas_object_smart_callback_add(notify, "timeout", _notify_timeout, NULL);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
evas_object_smart_callback_add(notify, "timeout", _notify_timeout, NULL);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_RIGHT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_TOP_LEFT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_TOP_RIGHT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM_LEFT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM_RIGHT);
bx = elm_box_add(win);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
evas_object_show(bx);
elm_toolbar_item_append(toolbar, "home", "Hello", _tstatus, panel);
- elm_panel_content_set(panel, toolbar);
+ elm_object_content_set(panel, toolbar);
elm_box_pack_end(vbx, panel);
evas_object_show(panel);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(list);
- elm_panel_content_set(panel, list);
+ elm_object_content_set(panel, list);
elm_box_pack_end(bx, panel);
evas_object_show(panel);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(list);
- elm_panel_content_set(panel, list);
+ elm_object_content_set(panel, list);
elm_box_pack_end(bx, panel);
evas_object_show(panel);
elm_toolbar_item_append(toolbar, "home", "Hello", _bstatus, panel);
- elm_panel_content_set(panel, toolbar);
+ elm_object_content_set(panel, toolbar);
elm_box_pack_end(vbx, panel);
evas_object_show(panel);
"Parent frame scale<br>"
"is 0.5. Child should<br>"
"inherit it.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
elm_box_pack_end(bx, fr);
evas_object_show(fr);
"Parent frame scale<br>"
"is 1.0. Child should<br>"
"inherit it.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
elm_object_scale_set(fr, 1.0);
elm_box_pack_end(bx, fr);
"Parent frame scale<br>"
"is 2.0. Child should<br>"
"inherit it.");
- elm_frame_content_set(fr, lb);
+ elm_object_content_set(fr, lb);
evas_object_show(lb);
elm_object_scale_set(fr, 2.0);
elm_box_pack_end(bx, fr);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_TRUE);
- elm_notify_content_set(notify, bx);
+ elm_object_content_set(notify, bx);
evas_object_show(bx);
evas_object_event_callback_add(bx, EVAS_CALLBACK_MOUSE_IN, _mouse_in,
else return;
if (p->content) {
- elm_notify_content_set(obj, p->content);
+ elm_object_content_set(obj, p->content);
}
if (p->repeat_events_exists)
elm_notify_repeat_events_set(obj, p->repeat_events);
Evas_Object *content = external_common_param_edje_object_get(obj, param);
if ((strcmp(param->s, "")) && (!content))
return EINA_FALSE;
- elm_notify_content_set(obj, content);
+ elm_object_content_set(obj, content);
return EINA_TRUE;
}
else if ((!strcmp(param->name, "repeat_events"))
* continuous look across its options.
* @li hoversel_vertical_entry: Another internal for @ref Hoversel.
*
+ * Default contents parts of the button widget that you can use for are:
+ * @li "elm.swallow.content" - A icon of the button
+ *
+ * Default text parts of the button widget that you can use for are:
+ * @li "elm.text" - Label of the button
+ *
* Follow through a complete example @ref button_example_01 "here".
* @{
*/
*
* Of all this styles only default shows the title. Frame emits no signals.
*
+ * Default contents parts of the frame widget that you can use for are:
+ * @li "elm.swallow.content" - A content of the frame
+ *
+ * Default text parts of the frame widget that you can use for are:
+ * @li "elm.text" - Label of the frame
+ *
* For a detailed example see the @ref tutorial_frame.
*
* @{
* @param obj The frame object
* @param content The content will be filled in this frame object
*/
- EAPI void elm_frame_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_frame_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
* @brief Get the content of the frame widget
*
* @param obj The frame object
* @return The content that is being used
*/
- EAPI Evas_Object *elm_frame_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Unset the content of the frame widget
*
* @param obj The frame object
* @return The content that was being used
*/
- EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @}
*/
* you want to keep that old content object, use the
* elm_notify_content_unset() function.
*/
- EAPI void elm_notify_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_notify_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
* @brief Unset the content of the notify widget
*
*
* @see elm_notify_content_set()
*/
- EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Return the content of the notify widget
*
*
* @see elm_notify_content_set()
*/
- EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Set the notify parent
*
* If you want to keep that old content object, use the
* elm_panel_content_unset() function.
*/
- EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
* @brief Get the content of the panel.
*
*
* @see elm_panel_content_set()
*/
- EAPI Evas_Object *elm_panel_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_panel_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Unset the content of the panel.
*
*
* @see elm_panel_content_set()
*/
- EAPI Evas_Object *elm_panel_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_panel_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @brief Set the state of the panel.
*
*
* @ingroup Mapbuf
*/
- EAPI void elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
* Get the content of the mapbuf.
*
* @ingroup Mapbuf
*/
- EAPI Evas_Object *elm_mapbuf_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_mapbuf_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Unset the content of the mapbuf.
*
* @ingroup Mapbuf
*/
- EAPI Evas_Object *elm_mapbuf_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_mapbuf_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Enable or disable the map.
EAPI Evas_Object *elm_genscroller_add(Evas_Object *parent);
EAPI void elm_genscroller_world_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
+ EAPI Evas_Object *elm_factory_add(Evas_Object *parent);
+ EINA_DEPRECATED EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content);
+ EINA_DEPRECATED EAPI Evas_Object *elm_factory_content_get(const Evas_Object *obj);
+ EAPI void elm_factory_maxmin_mode_set(Evas_Object *obj, Eina_Bool enabled);
+ EAPI Eina_Bool elm_factory_maxmin_mode_get(const Evas_Object *obj);
+ EAPI void elm_factory_maxmin_reset_set(Evas_Object *obj);
+
+
/**
* @defgroup Video Video
*
* application.
*
* Signals that you can add callback for are:
- *
* @li "transition,finished" - When the transition is finished in changing
* the item
* @li "title,clicked" - User clicked title area
static void _resize(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
static void _child_change(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
static void _child_del(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
+static void _content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content);
+static Evas_Object *_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__);
static const char SIG_REALIZE[] = "realize";
static const char SIG_UNREALIZE[] = "unrealize";
// printf("FAC-- = %i\n", fac);
}
-EAPI Evas_Object *
-elm_factory_add(Evas_Object *parent)
-{
- Evas_Object *obj;
- Evas *e;
- Widget_Data *wd;
-
- ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-
- ELM_SET_WIDTYPE(widtype, "factory");
- elm_widget_type_set(obj, "factory");
- elm_widget_sub_object_add(parent, obj);
- elm_widget_data_set(obj, wd);
- elm_widget_del_hook_set(obj, _del_hook);
- elm_widget_focus_next_hook_set(obj, _focus_next_hook);
- elm_widget_can_focus_set(obj, EINA_FALSE);
- elm_widget_changed_hook_set(obj, _changed);
-
- evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move, NULL);
- evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, NULL);
-
- evas_object_smart_callbacks_descriptions_set(obj, _signals);
-
- wd->obj = obj;
- wd->last_calc_count = -1;
- return obj;
-}
-
-EAPI void
-elm_factory_content_set(Evas_Object *obj, Evas_Object *content)
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
}
}
-EAPI Evas_Object *
-elm_factory_content_get(const Evas_Object *obj)
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
return wd->content;
}
+EAPI Evas_Object *
+elm_factory_add(Evas_Object *parent)
+{
+ Evas_Object *obj;
+ Evas *e;
+ Widget_Data *wd;
+
+ ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
+
+ ELM_SET_WIDTYPE(widtype, "factory");
+ elm_widget_type_set(obj, "factory");
+ elm_widget_sub_object_add(parent, obj);
+ elm_widget_data_set(obj, wd);
+ elm_widget_del_hook_set(obj, _del_hook);
+ elm_widget_focus_next_hook_set(obj, _focus_next_hook);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_can_focus_set(obj, EINA_FALSE);
+ elm_widget_changed_hook_set(obj, _changed);
+
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move, NULL);
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, NULL);
+
+ evas_object_smart_callbacks_descriptions_set(obj, _signals);
+
+ wd->obj = obj;
+ wd->last_calc_count = -1;
+ return obj;
+}
+
+EAPI void
+elm_factory_content_set(Evas_Object *obj, Evas_Object *content)
+{
+ _content_set_hook(obj, NULL, content);
+}
+
+EAPI Evas_Object *
+elm_factory_content_get(const Evas_Object *obj)
+{
+ return _content_get_hook(obj, NULL);
+}
+
EAPI void
elm_factory_maxmin_mode_set(Evas_Object *obj, Eina_Bool enabled)
{
return wd->label;
}
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (wd->content == content) return;
+ if (wd->content) evas_object_del(wd->content);
+ wd->content = content;
+ if (content)
+ {
+ elm_widget_sub_object_add(obj, content);
+ evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints, obj);
+ edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
+ }
+ _sizing_eval(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->content;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content;
+ if (!wd) return NULL;
+ if (!wd->content) return NULL;
+ content = wd->content;
+ elm_widget_sub_object_del(obj, wd->content);
+ edje_object_part_unswallow(wd->frm, wd->content);
+ wd->content = NULL;
+ return content;
+}
+
EAPI Evas_Object *
elm_frame_add(Evas_Object *parent)
{
elm_widget_can_focus_set(obj, EINA_FALSE);
elm_widget_text_set_hook_set(obj, _elm_frame_label_set);
elm_widget_text_get_hook_set(obj, _elm_frame_label_get);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
wd->frm = edje_object_add(e);
_elm_theme_object_set(obj, wd->frm, "frame", "base", "default");
EAPI void
elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->content == content) return;
- if (wd->content) evas_object_del(wd->content);
- wd->content = content;
- if (content)
- {
- elm_widget_sub_object_add(obj, content);
- evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, obj);
- edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
- }
- _sizing_eval(obj);
+ _content_set_hook(obj, NULL, content);
}
EAPI Evas_Object *
elm_frame_content_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->content;
+ return _content_get_hook(obj, NULL);
}
EAPI Evas_Object *
elm_frame_content_unset(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *content;
- if (!wd) return NULL;
- if (!wd->content) return NULL;
- content = wd->content;
- elm_widget_sub_object_del(obj, wd->content);
- edje_object_part_unswallow(wd->frm, wd->content);
- wd->content = NULL;
- return content;
+ return _content_unset_hook(obj, NULL);
}
_configure(data);
}
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (wd->content == content) return;
+ if (wd->content) evas_object_del(wd->content);
+ wd->content = content;
+ if (content)
+ {
+ evas_object_data_set(content, "_elm_leaveme", (void *)1);
+ elm_widget_sub_object_add(content, obj);
+ evas_object_smart_member_add(content, obj);
+ evas_object_clip_set(content, wd->clip);
+ evas_object_color_set(wd->clip, 255, 255, 255, 255);
+ evas_object_event_callback_add(content,
+ EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints, obj);
+ }
+ else
+ evas_object_color_set(wd->clip, 0, 0, 0, 0);
+ _sizing_eval(obj);
+ _configure(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->content;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content;
+ if (!wd) return NULL;
+ if (!wd->content) return NULL;
+ content = wd->content;
+ elm_widget_sub_object_del(obj, content);
+ evas_object_smart_member_del(content);
+ evas_object_color_set(wd->clip, 0, 0, 0, 0);
+ evas_object_clip_unset(content);
+ evas_object_data_del(content, "_elm_leaveme");
+ wd->content = NULL;
+ return content;
+}
+
EAPI Evas_Object *
elm_mapbuf_add(Evas_Object *parent)
{
elm_widget_data_set(obj, wd);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
wd->clip = evas_object_rectangle_add(e);
EAPI void
elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->content == content) return;
- if (wd->content) evas_object_del(wd->content);
- wd->content = content;
- if (content)
- {
- evas_object_data_set(content, "_elm_leaveme", (void *)1);
- elm_widget_sub_object_add(content, obj);
- evas_object_smart_member_add(content, obj);
- evas_object_clip_set(content, wd->clip);
- evas_object_color_set(wd->clip, 255, 255, 255, 255);
- evas_object_event_callback_add(content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, obj);
- }
- else
- evas_object_color_set(wd->clip, 0, 0, 0, 0);
- _sizing_eval(obj);
- _configure(obj);
+ _content_set_hook(obj, NULL, content);
}
EAPI Evas_Object *
elm_mapbuf_content_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->content;
+ return _content_get_hook(obj, NULL);
}
EAPI Evas_Object *
elm_mapbuf_content_unset(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *content;
- if (!wd) return NULL;
- if (!wd->content) return NULL;
- content = wd->content;
- elm_widget_sub_object_del(obj, content);
- evas_object_smart_member_del(content);
- evas_object_color_set(wd->clip, 0, 0, 0, 0);
- evas_object_clip_unset(content);
- evas_object_data_del(content, "_elm_leaveme");
- wd->content = NULL;
- return content;
+ return _content_unset_hook(obj, NULL);
}
EAPI void
return elm_widget_focus_next_get(cur, dir, next);
}
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (wd->content == content) return;
+ if (wd->content) evas_object_del(wd->content);
+ wd->content = content;
+
+ if (content)
+ {
+ elm_widget_sub_object_add(obj, content);
+ evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints, obj);
+ evas_object_event_callback_add(content, EVAS_CALLBACK_RESIZE,
+ _content_resize, obj);
+ edje_object_part_swallow(wd->notify, "elm.swallow.content", content);
+ }
+ _sizing_eval(obj);
+ _calc(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+
+ if (!wd) return NULL;
+ return wd->content;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content;
+ if (!wd) return NULL;
+ if (!wd->content) return NULL;
+ content = wd->content;
+ elm_widget_sub_object_del(obj, wd->content);
+ edje_object_part_unswallow(wd->notify, wd->content);
+ wd->content = NULL;
+ return content;
+}
+
EAPI Evas_Object *
elm_notify_add(Evas_Object *parent)
{
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
elm_widget_focus_next_hook_set(obj, _elm_notify_focus_next_hook);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
wd->repeat_events = EINA_TRUE;
EAPI void
elm_notify_content_set(Evas_Object *obj, Evas_Object *content)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->content == content) return;
- if (wd->content) evas_object_del(wd->content);
- wd->content = content;
-
- if (content)
- {
- elm_widget_sub_object_add(obj, content);
- evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, obj);
- evas_object_event_callback_add(content, EVAS_CALLBACK_RESIZE,
- _content_resize, obj);
- edje_object_part_swallow(wd->notify, "elm.swallow.content", content);
- }
- _sizing_eval(obj);
- _calc(obj);
+ _content_set_hook(obj, NULL, content);
}
EAPI Evas_Object *
elm_notify_content_unset(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *content;
- if (!wd) return NULL;
- if (!wd->content) return NULL;
- content = wd->content;
- elm_widget_sub_object_del(obj, wd->content);
- edje_object_part_unswallow(wd->notify, wd->content);
- wd->content = NULL;
- return content;
+ return _content_unset_hook(obj, NULL);
}
EAPI Evas_Object *
elm_notify_content_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
-
- if (!wd) return NULL;
- return wd->content;
+ return _content_get_hook(obj, NULL);
}
EAPI void
return EINA_TRUE;
}
+static void
+_content_set_hook(Evas_Object *obj, const char *part __UNUSED__, Evas_Object *content)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ if (wd->content == content) return;
+ if (wd->content)
+ evas_object_box_remove_all(wd->bx, EINA_TRUE);
+ wd->content = content;
+ if (content)
+ {
+ evas_object_box_append(wd->bx, wd->content);
+ evas_object_show(wd->content);
+ }
+ _sizing_eval(obj);
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->content;
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part __UNUSED__)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *content;
+ if (!wd) return NULL;
+ if (!wd->content) return NULL;
+ content = wd->content;
+ evas_object_box_remove_all(wd->bx, EINA_FALSE);
+ wd->content = NULL;
+ return content;
+}
+
EAPI Evas_Object *
elm_panel_add(Evas_Object *parent)
{
elm_widget_focus_next_hook_set(obj, _elm_panel_focus_next_hook);
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_event_hook_set(obj, _event_hook);
+ elm_widget_content_set_hook_set(obj, _content_set_hook);
+ elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_content_unset_hook_set(obj, _content_unset_hook);
wd->scr = elm_smart_scroller_add(e);
elm_smart_scroller_widget_set(wd->scr, obj);
EAPI void
elm_panel_content_set(Evas_Object *obj, Evas_Object *content)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
- if (wd->content == content) return;
- if (wd->content)
- evas_object_box_remove_all(wd->bx, EINA_TRUE);
- wd->content = content;
- if (content)
- {
- evas_object_box_append(wd->bx, wd->content);
- evas_object_show(wd->content);
- }
- _sizing_eval(obj);
+ _content_set_hook(obj, NULL, content);
}
EAPI Evas_Object *
elm_panel_content_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->content;
+ return _content_get_hook(obj, NULL);
}
EAPI Evas_Object *
elm_panel_content_unset(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Object *content;
- if (!wd) return NULL;
- if (!wd->content) return NULL;
- content = wd->content;
- evas_object_box_remove_all(wd->bx, EINA_FALSE);
- wd->content = NULL;
- return content;
+ return _content_unset_hook(obj, NULL);
}
EAPI void