recent elementary api corrections.
I changed item class's 'label_get' to 'text_get'. But 'label_get' is still
supported by union structure. So 'label_get' will just give you
deprecated warnings while compiling but it's recommended to fix your
apps to 'text_get'. Sometimes when you initialize item class using
braces, you will get 'missing braces around initializer' but ignore
this. That warning will be gone after I remove 'label_get' backport. I
will remove this 'label_get' backport after I finish below
jobs.
[TODO]
1. Fix all apps in trunk.
2. Change edc "labels" to "texts" as well. I haven't done this yet.
SVN revision: 65751
#endif
static char *
-_grid_label_get(void *data __UNUSED__,
+_grid_text_get(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
const char *part __UNUSED__)
{
Elm_Gengrid_Item_Class gic;
gic.item_style = "default";
-gic.func.label_get = _grid_label_get;
+gic.func.text_get = _grid_text_get;
gic.func.content_get = _grid_content_get;
gic.func.state_get = NULL;
gic.func.del = NULL;
#endif
static char *
-_label_get(void *data __UNUSED__,
+_text_get(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
const char *part __UNUSED__)
{
Elm_Genlist_Item_Class gic;
Elm_Genlist_Item *it, *top;
gic.item_style = "default";
-gic.func.label_get = _label_get;
+gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
gic.func.state_get = NULL;
gic.func.del = NULL;
#endif
static char *
-_label_get(void *data __UNUSED__,
+_text_get(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
const char *part)
{
Elm_Genlist_Item_Class gic;
gic.item_style = "double_label";
-gic.func.label_get = _label_get;
+gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
gic.func.state_get = NULL;
gic.func.del = NULL;
#endif
static char *
-_label_get(void *data __UNUSED__,
+_text_get(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
const char *part)
{
Elm_Genlist_Item_Class gic;
gic.item_style = "icon_top_text_bottom";
-gic.func.label_get = _label_get;
+gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
gic.func.state_get = NULL;
gic.func.del = NULL;
#endif
static char *
-_label_get(void *data __UNUSED__,
+_text_get(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
const char *part)
{
Elm_Genlist_Item_Class gic;
gic.item_style = "group_index";
-gic.func.label_get = _label_get;
+gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
gic.func.state_get = NULL;
gic.func.del = NULL;
#endif
static char *
-_label_get(void *data __UNUSED__,
+_text_get(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
const char *part)
{
Elm_Genlist_Item_Class gic;
gic.item_style = "default";
-gic.func.label_get = _label_get;
+gic.func.text_get = _text_get;
gic.func.content_get = _content_get;
gic.func.state_get = NULL;
gic.func.del = NULL;
}
char *
-glt_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+glt_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
char buf[256];
snprintf(buf, sizeof(buf), "Item mode %i", (int)(long)data);
evas_object_show(gl);
itct.item_style = "default";
- itct.func.label_get = glt_label_get;
+ itct.func.text_get = glt_text_get;
it1 = elm_genlist_item_append(gl, &itct, (void *) 1, NULL,
ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
evas_object_size_hint_fill_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
gic.item_style = "default";
- gic.func.label_get = grd_lbl_get;
+ gic.func.text_get = grd_lbl_get;
gic.func.content_get = grd_content_get;
n = 0;
static void _ls_done_cb(void *data, Eio_File *handler);
static void _ls_error_cb(void *data, Eio_File *handler, int error);
static void _file_chosen(void *data, Evas_Object *obj, void *event_info);
-static char *_gl_label_get(void *data, Evas_Object *obj, const char *part);
+static char *_gl_text_get(void *data, Evas_Object *obj, const char *part);
static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *part);
static Eina_Bool _gl_state_get(void *data, Evas_Object *obj, const char *part);
static void _gl_del(void *data, Evas_Object *obj);
}
static char *
-_gl_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+_gl_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "Item # %s", (char*)data);
Evas_Object *win, *bg, *vbox, *hbox, *ic, *bt, *fs_bt, *gl;
it_eio.item_style = "default";
- it_eio.func.label_get = _gl_label_get;
+ it_eio.func.text_get = _gl_text_get;
it_eio.func.content_get = _gl_content_get;
it_eio.func.state_get = _gl_state_get;
it_eio.func.del = _gl_del;
static Elm_Genlist_Item_Class itc1;
-static char *glf_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+static char *glf_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
char buf[256];
snprintf(buf, sizeof(buf), "Item # %i", (int)(long)data);
evas_object_show(gl);
itc1.item_style = "default";
- itc1.func.label_get = glf_label_get;
+ itc1.func.text_get = glf_text_get;
itc1.func.content_get = glf_content_get;
itc1.func.state_get = glf_state_get;
itc1.func.del = glf_del;
}
char *
-grid_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+grid_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
const Testitem *ti = data;
char buf[256];
evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
gic.item_style = "default";
- gic.func.label_get = grid_label_get;
+ gic.func.text_get = grid_text_get;
gic.func.content_get = grid_content_get;
gic.func.state_get = grid_state_get;
gic.func.del = grid_del;
evas_object_show(ck);
gic.item_style = "default";
- gic.func.label_get = grid_label_get;
+ gic.func.text_get = grid_text_get;
gic.func.content_get = grid_content_get;
gic.func.state_get = grid_state_get;
gic.func.del = grid_del;
evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
gic.item_style = "default";
- gic.func.label_get = grid_label_get;
+ gic.func.text_get = grid_text_get;
gic.func.content_get = grid_content_get;
gic.func.state_get = grid_state_get;
gic.func.del = grid_del;
ggic.item_style = "group_index";
- ggic.func.label_get = grid_label_get;
+ ggic.func.text_get = grid_text_get;
ggic.func.content_get = NULL;
ggic.func.state_get = NULL;
ggic.func.del = NULL;
static Elm_Genlist_Item_Class itc1;
-char *gl_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+char *gl_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
char buf[256];
snprintf(buf, sizeof(buf), "Item # %i", (int)(long)data);
elm_win_resize_object_add(win, over);
itc1.item_style = "default";
- itc1.func.label_get = gl_label_get;
+ itc1.func.text_get = gl_text_get;
itc1.func.content_get = gl_content_get;
itc1.func.state_get = gl_state_get;
itc1.func.del = gl_del;
static int i = 0;
itc1.item_style = "default";
- itc1.func.label_get = gl_label_get;
+ itc1.func.text_get = gl_text_get;
itc1.func.content_get = gl_content_get;
itc1.func.state_get = gl_state_get;
itc1.func.del = gl_del;
Elm_Genlist_Item *gli_selected;
itc1.item_style = "default";
- itc1.func.label_get = gl_label_get;
+ itc1.func.text_get = gl_text_get;
itc1.func.content_get = gl_content_get;
itc1.func.state_get = gl_state_get;
itc1.func.del = gl_del;
Elm_Genlist_Item *gli_selected;
itc1.item_style = "default";
- itc1.func.label_get = gl_label_get;
+ itc1.func.text_get = gl_text_get;
itc1.func.content_get = gl_content_get;
itc1.func.state_get = gl_state_get;
itc1.func.del = gl_del;
evas_object_show(gl);
itc1.item_style = "default";
- itc1.func.label_get = gl_label_get;
+ itc1.func.text_get = gl_text_get;
itc1.func.content_get = gl_content_get;
itc1.func.state_get = gl_state_get;
itc1.func.del = gl_del;
/*************/
static Elm_Genlist_Item_Class itc2;
-char *gl2_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+char *gl2_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
const Testitem *tit = data;
char buf[256];
evas_object_show(gl);
itc2.item_style = "default";
- itc2.func.label_get = gl2_label_get;
+ itc2.func.text_get = gl2_text_get;
itc2.func.content_get = gl2_content_get;
itc2.func.state_get = gl2_state_get;
itc2.func.del = gl2_del;
}
static Elm_Genlist_Item_Class itc3;
-char *gl3_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+char *gl3_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
const Testitem *tit = data;
char buf[256];
evas_object_show(gl);
itc3.item_style = "default";
- itc3.func.label_get = gl3_label_get;
+ itc3.func.text_get = gl3_text_get;
itc3.func.content_get = gl3_content_get;
itc3.func.state_get = gl3_state_get;
itc3.func.del = gl3_del;
}
static Elm_Genlist_Item_Class itc5;
-char *gl5_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part)
+char *gl5_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part)
{
const Testitem *tit = data;
char buf[256];
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(gl);
itc5.item_style = "double_label";
- itc5.func.label_get = gl5_label_get;
+ itc5.func.text_get = gl5_text_get;
itc5.func.content_get = gl5_content_get;
itc5.func.state_get = gl5_state_get;
itc5.func.del = gl5_del;
elm_genlist_item_expanded_set(it, 0);
}
-char *gl4_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+char *gl4_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
char buf[256];
snprintf(buf, sizeof(buf), "Item mode %i", (int)(long)data);
evas_object_show(gl);
itc4.item_style = "default";
- itc4.func.label_get = gl4_label_get;
+ itc4.func.text_get = gl4_text_get;
itc4.func.content_get = gl4_content_get;
itc4.func.state_get = gl4_state_get;
itc4.func.del = gl4_del;
elm_pager_content_push(pager, gl);
itc2.item_style = "default";
- itc2.func.label_get = gl2_label_get;
+ itc2.func.text_get = gl2_text_get;
itc2.func.content_get = gl2_content_get;
itc2.func.state_get = gl2_state_get;
itc2.func.del = gl2_del;
itc7.item_style = "double_label";
- itc7.func.label_get = gl5_label_get;
+ itc7.func.text_get = gl5_text_get;
itc7.func.content_get = gl5_content_get;
itc7.func.state_get = gl5_state_get;
itc7.func.del = gl5_del;
/*************/
static Elm_Genlist_Item_Class itc_group;
-char *gl8_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+char *gl8_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
char buf[256];
snprintf(buf, sizeof(buf), "Group Index # %i (Item # %i)", (int)((long)data / 10), (int)(long)data);
evas_object_show(gl);
itc1.item_style = "default";
- itc1.func.label_get = gl_label_get;
+ itc1.func.text_get = gl_text_get;
itc1.func.content_get = gl_content_get;
itc1.func.state_get = gl_state_get;
itc1.func.del = gl_del;
itc_group.item_style = "group_index";
- itc_group.func.label_get = gl8_label_get;
+ itc_group.func.text_get = gl8_text_get;
itc_group.func.content_get = NULL;
itc_group.func.state_get = NULL;
itc_group.func.del = gl_del;
evas_object_show(gl);
itc1.item_style = "default";
- itc1.func.label_get = gl_label_get;
+ itc1.func.text_get = gl_text_get;
itc1.func.content_get = gl_content_get;
itc1.func.state_get = gl_state_get;
itc1.func.del = gl_del;
itc_group.item_style = "group_index";
- itc_group.func.label_get = gl8_label_get;
+ itc_group.func.text_get = gl8_text_get;
itc_group.func.content_get = NULL;
itc_group.func.state_get = NULL;
itc_group.func.del = gl_del;
static Elm_Genlist_Item_Class itc10;
static char *mode_type[] = { "slide", "rotate" };
-char *gl10_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part)
+char *gl10_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part)
{
char buf[256];
if (!strcmp(part, "elm.text.mode"))
evas_object_show(gl);
itc10.item_style = "default";
- itc10.func.label_get = gl10_label_get;
+ itc10.func.text_get = gl10_text_get;
itc10.func.content_get = gl10_content_get;
itc10.func.state_get = gl_state_get;
itc10.func.del = gl_del;
evas_object_show(tg);
itc1.item_style = "default";
- itc1.func.label_get = gl_label_get;
+ itc1.func.text_get = gl_text_get;
itc1.func.content_get = gl_content_get;
itc1.func.state_get = gl_state_get;
itc1.func.del = gl_del;
evas_object_show(win);
}
-char *gl12_label_get(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+char *gl12_text_get(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
return strdup("Enlightenment is not just a window manager for Linux/X11 and others, but also a whole suite of libraries to help you create beautiful user interfaces with much less work than doing it the old fashioned way and fighting with traditional toolkits, not to mention a traditional window manager. It covers uses from small mobile devices like phones all the way to powerful multi-core desktops (which are the primary development environment).");
}
evas_object_show(gl);
itc1.item_style = "message";
- itc1.func.label_get = gl12_label_get;
+ itc1.func.text_get = gl12_text_get;
itc1.func.content_get = gl_content_get;
itc1.func.state_get = gl_state_get;
itc1.func.del = gl_del;
static Elm_Genlist_Item_Class it_desk;
static char *
-desk_gl_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+desk_gl_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
#ifdef ELM_EFREET
Efreet_Desktop *d = (Efreet_Desktop *)data;
evas_object_show(bg);
it_desk.item_style = "default";
- it_desk.func.label_get = desk_gl_label_get;
+ it_desk.func.text_get = desk_gl_text_get;
it_desk.func.content_get = desk_gl_content_get;
it_desk.func.state_get = NULL;
it_desk.func.del = desk_gl_del;
#endif
#ifndef ELM_LIB_QUICKLAUNCH
static Elm_Genlist_Item_Class itci;
-char *gli_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
+char *gli_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
{
char buf[256];
int j = (long)data;
evas_object_show(id);
itci.item_style = "default";
- itci.func.label_get = gli_label_get;
+ itci.func.text_get = gli_text_get;
itci.func.content_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
static void _bstatus(void *data, Evas_Object *obj, void *event_info);
static void _tstatus(void *data, Evas_Object *obj, void *event_info);
-static char *_label_get(void *data, Evas_Object *obj, const char *source);
+static char *_text_get(void *data, Evas_Object *obj, const char *source);
static Evas_Object *_content_get(void *data, Evas_Object *obj, const char *source);
static Eina_Bool _state_get(void *data, Evas_Object *obj, const char *source);
static void _item_del(void *data, Evas_Object *obj);
}
static char *
-_label_get(void *data, Evas_Object *obj __UNUSED__, const char *source __UNUSED__)
+_text_get(void *data, Evas_Object *obj __UNUSED__, const char *source __UNUSED__)
{
return strdup(ecore_file_file_get(data));
}
evas_object_size_hint_align_set(panel, 0, EVAS_HINT_FILL);
itc.item_style = "default";
- itc.func.label_get = _label_get;
+ itc.func.text_get = _text_get;
itc.func.content_get = _content_get;
itc.func.state_get = _state_get;
itc.func.del = _item_del;
}
char *
-gltt_label_get(void *data,
+gltt_text_get(void *data,
Evas_Object *obj __UNUSED__,
const char *part __UNUSED__)
{
EVAS_HINT_EXPAND);
gic.item_style = "default";
- gic.func.label_get = grdt_lbl_get;
+ gic.func.text_get = grdt_lbl_get;
gic.func.content_get = grdt_content_get;
n = 0;
EVAS_HINT_EXPAND);
itct.item_style = "default";
- itct.func.label_get = gltt_label_get;
+ itct.func.text_get = gltt_text_get;
it1 = elm_genlist_item_append(gl, &itct, (void *)1, NULL,
ELM_GENLIST_ITEM_SUBITEMS, NULL, NULL);
typedef struct Elm_Gen_Item Elm_Gen_Item;
typedef struct _Elm_Gen_Item_Class Elm_Gen_Item_Class;
typedef struct _Elm_Gen_Item_Class_Func Elm_Gen_Item_Class_Func; /**< Class functions for gen item classes. */
- typedef char *(*Elm_Gen_Item_Label_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< Label fetching class function for gen item classes. */
+ typedef char *(*Elm_Gen_Item_Text_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< Label fetching class function for gen item classes. */
typedef Evas_Object *(*Elm_Gen_Item_Content_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< Content(swallowed object) fetching class function for gen item classes. */
typedef Eina_Bool (*Elm_Gen_Item_State_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< State fetching class function for gen item classes. */
typedef void (*Elm_Gen_Item_Del_Cb) (void *data, Evas_Object *obj); /**< Deletion class function for gen item classes. */
const char *item_style;
struct _Elm_Gen_Item_Class_Func
{
- Elm_Gen_Item_Label_Get_Cb label_get;
+ union /* temporary compatibility code */
+ {
+ Elm_Gen_Item_Text_Get_Cb label_get EINA_DEPRECATED;
+ Elm_Gen_Item_Text_Get_Cb text_get;
+ };
Elm_Gen_Item_Content_Get_Cb content_get;
Elm_Gen_Item_State_Get_Cb state_get;
Elm_Gen_Item_Del_Cb del;
*
* @section Gengrid_Items Gengrid items
*
- * An item in a gengrid can have 0 or more text labels (they can be
+ * An item in a gengrid can have 0 or more texts (they can be
* regular text or textblock Evas objects - that's up to the style
* to determine), 0 or more icons (which are simply objects
* swallowed into the gengrid item's theming Edje object) and 0 or
* more <b>boolean states</b>, which have the behavior left to the
* user to define. The Edje part names for each of these properties
* will be looked up, in the theme file for the gengrid, under the
- * Edje (string) data items named @c "labels", @c "icons" and @c
+ * Edje (string) data items named @c "texts", @c "icons" and @c
* "states", respectively. For each of those properties, if more
* than one part is provided, they must have names listed separated
* by spaces in the data fields. For the default gengrid item
- * theme, we have @b one label part (@c "elm.text"), @b two icon
+ * theme, we have @b one text part (@c "elm.text"), @b two icon
* parts (@c "elm.swalllow.icon" and @c "elm.swallow.end") and @b
* no state parts.
*
* - @c item_style - This is a constant string and simply defines
* the name of the item style. It @b must be specified and the
* default should be @c "default".
- * - @c func.label_get - This function is called when an item
+ * - @c func.text_get - This function is called when an item
* object is actually created. The @c data parameter will point to
* the same data passed to elm_gengrid_item_append() and related
* item creation functions. The @c obj parameter is the gengrid
* of the existing text parts in the Edje group implementing the
* item's theme. This function @b must return a strdup'()ed string,
* as the caller will free() it when done. See
- * #Elm_Gengrid_Item_Label_Get_Cb.
+ * #Elm_Gengrid_Item_Text_Get_Cb.
* - @c func.content_get - This function is called when an item object
* is actually created. The @c data parameter will point to the
* same data passed to elm_gengrid_item_append() and related item
* modified (added, deleted, selected or unselected) of child items
* on a gengrid.
*
- * If an item changes (internal (boolean) state, label or content
+ * If an item changes (internal (boolean) state, text or content
* changes), then use elm_gengrid_item_update() to have gengrid
* update the item with the new state. A gengrid will re-"realize"
* the item, thus calling the functions in the
#define Elm_Gengrid_Item Elm_Gen_Item /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */
typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func; /**< Class functions for gengrid item classes. */
/**
- * Label fetching class function for Elm_Gen_Item_Class.
+ * Text fetching class function for Elm_Gen_Item_Class.
* @param data The data passed in the item creation function
* @param obj The base widget object
* @param part The part name of the swallow
- * @return The allocated (NOT stringshared) string to set as the label
+ * @return The allocated (NOT stringshared) string to set as the text
*/
- typedef char *(*Elm_Gengrid_Item_Label_Get_Cb) (void *data, Evas_Object *obj, const char *part);
+ typedef char *(*Elm_Gengrid_Item_Text_Get_Cb) (void *data, Evas_Object *obj, const char *part);
/**
* Content (swallowed object) fetching class function for Elm_Gen_Item_Class.
* @param data The data passed in the item creation function
const char *item_style;
struct _Elm_Gengrid_Item_Class_Func
{
- Elm_Gengrid_Item_Label_Get_Cb label_get;
+ union /* temporary compatibility code */
+ {
+ Elm_Gengrid_Item_Text_Get_Cb label_get EINA_DEPRECATED;
+ Elm_Gengrid_Item_Text_Get_Cb text_get; /**< Text fetching class function for gengrid item classes.*/
+ };
Elm_Gengrid_Item_Content_Get_Cb content_get;
Elm_Gengrid_Item_State_Get_Cb state_get;
Elm_Gengrid_Item_Del_Cb del;
* @param item The gengrid item
*
* This updates an item by calling all the item class functions
- * again to get the contents, labels and states. Use this when the
+ * again to get the contents, texts and states. Use this when the
* original item data has changed and you want the changes to be
* reflected.
*
* elm_genlist_item_append() and related item creation functions, and a @c
* obj parameter that points to the genlist object itself.
*
- * The function pointers inside @c func are @c label_get, @c icon_get, @c
+ * The function pointers inside @c func are @c text_get, @c icon_get, @c
* state_get and @c del. The 3 first functions also receive a @c part
* parameter described below. A brief description of these functions follows:
*
- * - @c label_get - The @c part parameter is the name string of one of the
+ * - @c text_get - The @c part parameter is the name string of one of the
* existing text parts in the Edje group implementing the item's theme.
* This function @b must return a strdup'()ed string, as the caller will
- * free() it when done. See #Elm_Genlist_Item_Label_Get_Cb.
+ * free() it when done. See #Elm_Genlist_Item_Text_Get_Cb.
* - @c content_get - The @c part parameter is the name string of one of the
* existing (content) swallow parts in the Edje group implementing the item's
* theme. It must return @c NULL, when no content is desired, or a valid
#define Elm_Genlist_Item Elm_Gen_Item /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */
typedef struct _Elm_Genlist_Item_Class_Func Elm_Genlist_Item_Class_Func; /**< Class functions for genlist item class */
/**
- * Label fetching class function for Elm_Gen_Item_Class.
+ * Text fetching class function for Elm_Gen_Item_Class.
* @param data The data passed in the item creation function
* @param obj The base widget object
* @param part The part name of the swallow
- * @return The allocated (NOT stringshared) string to set as the label
+ * @return The allocated (NOT stringshared) string to set as the text
*/
- typedef char *(*Elm_Genlist_Item_Label_Get_Cb) (void *data, Evas_Object *obj, const char *part);
+ typedef char *(*Elm_Genlist_Item_Text_Get_Cb) (void *data, Evas_Object *obj, const char *part);
/**
* Content (swallowed object) fetching class function for Elm_Gen_Item_Class.
* @param data The data passed in the item creation function
const char *item_style; /**< style of this class. */
struct Elm_Genlist_Item_Class_Func
{
- Elm_Genlist_Item_Label_Get_Cb label_get; /**< Label fetching class function for genlist item classes.*/
+ union /* temporary compatibility code */
+ {
+ Elm_Genlist_Item_Text_Get_Cb label_get EINA_DEPRECATED;
+ Elm_Genlist_Item_Text_Get_Cb text_get; /**< Text fetching class function for genlist item classes.*/
+ };
Elm_Genlist_Item_Content_Get_Cb content_get; /**< Content fetching class function for genlist item classes. */
Elm_Genlist_Item_State_Get_Cb state_get; /**< State fetching class function for genlist item classes. */
Elm_Genlist_Item_Del_Cb del; /**< Deletion class function for genlist item classes. */
/*** GENLIST "MODEL" ***/
static char *
-_itc_label_get(void *data,
+_itc_text_get(void *data,
Evas_Object *obj __UNUSED__,
const char *source __UNUSED__)
{
for (i = 0; i < ELM_FILE_LAST; ++i)
{
- list_itc[i].func.label_get = grid_itc[i].func.label_get = _itc_label_get;
+ list_itc[i].func.text_get = grid_itc[i].func.text_get = _itc_text_get;
list_itc[i].func.state_get = grid_itc[i].func.state_get = _itc_state_get;
list_itc[i].func.del = grid_itc[i].func.del = _itc_del;
}
evas_object_size_hint_min_set(it->spacer, 2 * _elm_config->scale, 1);
edje_object_part_swallow(VIEW(it), "elm.swallow.pad", it->spacer);
- if (it->itc->func.label_get)
+ if (it->itc->func.text_get)
{
const Eina_List *l;
const char *key;
"labels"));
EINA_LIST_FOREACH(it->labels, l, key)
{
- char *s = it->itc->func.label_get
+ char *s = it->itc->func.text_get
((void *)it->base.data, WIDGET(it), key);
if (s)
{
Eina_List **source,
const char *parts)
{
- if (it->itc->func.label_get)
+ if (it->itc->func.text_get)
{
const Eina_List *l;
const char *key;
if (parts && fnmatch(parts, key, FNM_PERIOD))
continue;
- char *s = it->itc->func.label_get
+ char *s = it->itc->func.text_get
((void *)it->base.data, WIDGET(it), key);
if (s)
evas_object_event_callback_add(it->item->mode_view, EVAS_CALLBACK_MOUSE_MOVE,
_mouse_move, it);
- /* label_get, content_get, state_get */
+ /* text_get, content_get, state_get */
/* FIXME: If you see that assert, please notify us and we
will clean our mess */
assert(eina_list_count(it->item->mode_content_objs) == 0);
static const char *
_item_label_hook(Elm_Gen_Item *it, const char *part)
{
- if (!it->itc->func.label_get) return NULL;
+ if (!it->itc->func.text_get) return NULL;
return edje_object_part_text_get(VIEW(it), part);
}
}
static char *
-_store_item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part)
+_store_item_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part)
{
Elm_Store_Item *sti = data;
const char *s = "";
if (!itc) itc = &_store_item_class;
else
{
- itc->func.label_get = _store_item_label_get;
+ itc->func.text_get = _store_item_text_get;
itc->func.content_get = _store_item_content_get;
itc->func.state_get = NULL; // FIXME: support state gets later
itc->func.del = _store_item_del;
eina_magic_string_set(ELM_STORE_ITEM_MAGIC, "Elm_Store_Item");
// setup default item class (always the same) if list cb doesnt provide one
_store_item_class.item_style = "default";
- _store_item_class.func.label_get = _store_item_label_get;
+ _store_item_class.func.text_get = _store_item_text_get;
_store_item_class.func.content_get = _store_item_content_get;
_store_item_class.func.state_get = NULL; // FIXME: support state gets later
_store_item_class.func.del = _store_item_del;