Now need to widgets use them.
SVN revision: 61802
#define elm_object_text_get(obj) elm_object_text_part_get((obj), NULL)
/**
+ * Set a content of an object
+ *
+ * @param obj The Elementary object
+ * @param item The content id to set (NULL for the default content)
+ * @param content The new content of the object
+ *
+ * @note Elementary objects may have many contents
+ *
+ * @ingroup General
+ */
+ EAPI void elm_object_content_part_set(Evas_Object *obj, const char *item, Evas_Object *content);
+
+#define elm_object_content_set(obj, content) elm_object_content_part_set((obj), NULL, (content))
+
+ /**
+ * Get a content of an object
+ *
+ * @param obj The Elementary object
+ * @param item The content id to get (NULL for the default content)
+ * @return content of the object or
+ * NULL for any error
+ *
+ * @note Elementary objects may have many contents
+ *
+ * @ingroup General
+ */
+ EAPI Evas_Object *elm_object_content_part_get(const Evas_Object *obj, const char *item);
+
+#define elm_object_content_get(obj) elm_object_content_part_get((obj), NULL)
+
+ /**
+ * Unset a content of an object
+ *
+ * @param obj The Elementary object
+ * @param item The content id to unset (NULL for the default content)
+ *
+ * @note Elementary objects may have many contents
+ *
+ * @ingroup General
+ */
+ EAPI Evas_Object *elm_object_content_part_unset(Evas_Object *obj, const char *item);
+
+#define elm_object_content_unset(obj) elm_object_content_part_unset((obj), NULL)
+
+ /**
* @}
*/
return elm_widget_text_part_get(obj, item);
}
+EAPI void
+elm_object_content_part_set(Evas_Object *obj, const char *item, Evas_Object *content)
+{
+ EINA_SAFETY_ON_NULL_RETURN(obj);
+ elm_widget_content_part_set(obj, item, content);
+}
+
+EAPI Evas_Object *
+elm_object_content_part_get(const Evas_Object *obj, const char *item)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
+ return elm_widget_content_part_get(obj, item);
+}
+
+EAPI Evas_Object *
+elm_object_content_part_unset(Evas_Object *obj, const char *item)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
+ return elm_widget_content_part_unset(obj, item);
+}
+
/**
* Get the global scaling factor
*
const char *text);
const char *(*on_text_get_func)(const Evas_Object *obj,
const char *item);
+ void (*on_content_set_func)(Evas_Object *obj,
+ const char *item,
+ Evas_Object *content);
+ Evas_Object *(*on_content_get_func)(const Evas_Object *obj,
+ const char *item);
+ Evas_Object *(*on_content_unset_func)(Evas_Object *obj,
+ const char *item);
void *data;
Evas_Coord rx, ry, rw, rh;
int scroll_hold;
}
EAPI void
+elm_widget_content_set_hook_set(Evas_Object *obj,
+ void (*func)(Evas_Object *obj,
+ const char *item,
+ Evas_Object *content))
+{
+ API_ENTRY return;
+ sd->on_content_set_func = func;
+}
+
+EAPI void
+elm_widget_content_get_hook_set(Evas_Object *obj,
+ Evas_Object *(*func)(const Evas_Object *obj, const char *item))
+{
+ API_ENTRY return;
+ sd->on_content_get_func = func;
+}
+
+EAPI void
+elm_widget_content_unset_hook_set(Evas_Object *obj,
+ Evas_Object *(*func)(Evas_Object *obj,
+ const char *item))
+{
+ API_ENTRY return;
+ sd->on_content_unset_func = func;
+}
+
+EAPI void
elm_widget_changed_hook_set(Evas_Object *obj,
void (*func)(Evas_Object *obj))
{
return sd->on_text_get_func(obj, item);
}
+EAPI void
+elm_widget_content_part_set(Evas_Object *obj, const char *item, Evas_Object *content)
+{
+ API_ENTRY return;
+
+ if (!sd->on_content_set_func) return;
+ sd->on_content_set_func(obj, item, content);
+}
+
+EAPI Evas_Object *
+elm_widget_content_part_get(const Evas_Object *obj, const char *item)
+{
+ API_ENTRY return NULL;
+
+ if (!sd->on_content_get_func) return NULL;
+ return sd->on_content_get_func(obj, item);
+}
+
+EAPI Evas_Object *
+elm_widget_content_part_unset(Evas_Object *obj, const char *item)
+{
+ API_ENTRY return NULL;
+
+ if (!sd->on_content_unset_func) return NULL;
+ return sd->on_content_unset_func(obj, item);
+}
+
EAPI Elm_Theme *
elm_widget_theme_get(const Evas_Object *obj)
{
EAPI void elm_widget_focus_region_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h));
EAPI void elm_widget_text_set_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *item, const char *text));
EAPI void elm_widget_text_get_hook_set(Evas_Object *obj, const char *(*func)(const Evas_Object *obj, const char *item));
+EAPI void elm_widget_content_set_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *item, Evas_Object *content));
+EAPI void elm_widget_content_get_hook_set(Evas_Object *obj, Evas_Object *(*func)(const Evas_Object *obj, const char *item));
+EAPI void elm_widget_content_unset_hook_set(Evas_Object *obj, Evas_Object *(*func)(Evas_Object *obj, const char *item));
EAPI void elm_widget_on_focus_region_hook_set(Evas_Object *obj, void (*func) (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h));
EAPI void elm_widget_data_set(Evas_Object *obj, void *data);
EAPI void *elm_widget_data_get(const Evas_Object *obj);
EAPI void elm_widget_focus_disabled_handle(Evas_Object *obj);
EAPI void elm_widget_text_part_set(Evas_Object *obj, const char *item, const char *label);
EAPI const char *elm_widget_text_part_get(const Evas_Object *obj, const char *item);
-
+EAPI void elm_widget_content_part_set(Evas_Object *obj, const char *item, Evas_Object *content);
+EAPI Evas_Object *elm_widget_content_part_get(const Evas_Object *obj, const char *item);
+EAPI Evas_Object *elm_widget_content_part_unset(Evas_Object *obj, const char *item);
EAPI Elm_Widget_Item *_elm_widget_item_new(Evas_Object *parent, size_t alloc_size);
EAPI void _elm_widget_item_del(Elm_Widget_Item *item);
EAPI void _elm_widget_item_pre_notify_del(Elm_Widget_Item *item);