I have developed a genlist. There are two sub-items in each item.
1. text 2. checkbox
/*callback for item text*/ static char* item_text_get_cb(void *data, Evas_Object *obj, const char *part) { if (!strcmp("elm.text", part)) return strdup("Sample Text"); return NULL; } /*create checkbox*/ static Evas_Object* create_check(Evas_Object *parent, void *data) { Evas_Object *check; check = elm_check_add(parent); evas_object_smart_callback_add(check, "changed", check_changed_item_cb, data); return check; } /*callback for adding checkbox*/ static Evas_Object* type1_1line_content_get_cb(void *data, Evas_Object *obj, const char *part) { if (!strcmp("elm.swallow.end", part)) return create_check(obj, data); return NULL; } /*create genlist*/ create_genlist() { itc = elm_genlist_item_class_new(); itc->item_style = "type1"; itc->func.content_get = type1_1line_content_get_cb; itc->func.text_get = item_text_get_cb; for (int index = 0; index < num_of_rows; index++) { it = elm_genlist_item_append(genlist, // genlist object itc, // item class data, // item class user data NULL, ELM_GENLIST_ITEM_NONE, // item type genlist_item_selected_cb, // select smart callback data); // smart callback user data } elm_genlist_item_class_free(itc); elm_object_part_content_set(layout, PART_HISTORY_CONTENT, genlist); } /*end of genlist creation*/
I need to separate both genlist item selection and checkbox change callback.
Problem is, when I press checkbox, it calls two callback. One for checkbox changed another for genlist item selection. How can I stop calling genlist item selection when changing (select/de-select) checkbox?
Don't ask me to set elm_genlist_no_select_mode_set(). I also need this selection.