elm_widget_item_content_get_hook_set(it, _item_content_get_hook);
elm_widget_item_content_set_hook_set(it, _item_content_set_hook);
elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook);
+ elm_widget_item_text_get_hook_set(it, _item_text_hook);
elm_widget_item_disable_hook_set(it, _item_disable_hook);
elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook);
/* TEMPORARY */
it->sel_cb = (Ecore_Cb)_item_select;
- elm_widget_item_text_get_hook_set(it, _item_text_hook);
return it;
}
int cmp_result;
l = eina_list_search_sorted_near_list(it->parent->item->items,
- _elm_genlist_item_list_compare, it,
+ _elm_genlist_item_list_compare,
+ it,
&cmp_result);
if (l)
rel = eina_list_data_get(l);
if (wd->walking > 0)
{
- wd->clear_me = 1;
+ wd->clear_me = EINA_TRUE;
return;
}
evas_event_freeze(evas_object_evas_get(wd->obj));
if (itn) itn->walking--;
}
}
- wd->clear_me = 0;
+ wd->clear_me = EINA_FALSE;
wd->pan_changed = EINA_TRUE;
if (wd->calc_job)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- wd->multi = multi;
+ wd->multi = !!multi;
}
EAPI Eina_Bool
Eina_List *l;
Elm_Gen_Item *it;
- done = 1;
+ done = EINA_TRUE;
EINA_LIST_FOREACH(itb->items, l, it)
{
if (it->realized) list = eina_list_append(list, it);
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
+ expanded = !!expanded;
if (_it->item->expanded == expanded) return;
_it->item->expanded = expanded;
if (_it->item->expanded)
return ((Elm_Gen_Item *) it)->item->expanded_depth;
}
-EAPI void
+EINA_DEPRECATED EAPI void
elm_genlist_item_disabled_set(Elm_Object_Item *it,
Eina_Bool disabled)
{
elm_object_item_disabled_set(it, disabled);
}
-EAPI Eina_Bool
+EINA_DEPRECATED EAPI Eina_Bool
elm_genlist_item_disabled_get(const Elm_Object_Item *it)
{
return elm_object_item_disabled_get(it);
}
EAPI int
-elm_genlist_item_index_get(Elm_Object_Item *it)
+elm_genlist_item_index_get(const Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, -1);
Elm_Gen_Item *_it = (Elm_Gen_Item *) it;
return wd->mode;
}
-EAPI Elm_List_Mode
+EINA_DEPRECATED EAPI Elm_List_Mode
elm_genlist_horizontal_get(const Evas_Object *obj)
{
return elm_genlist_mode_get(obj);
}
-EAPI Elm_List_Mode
+EINA_DEPRECATED EAPI Elm_List_Mode
elm_genlist_horizontal_mode_get(const Evas_Object *obj)
{
return elm_genlist_mode_get(obj);
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- wd->always_select = always_select;
+ wd->always_select = !!always_select;
}
EAPI Eina_Bool
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- wd->no_select = no_select;
+ wd->no_select = !!no_select;
}
EAPI Eina_Bool
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- wd->compress = compress;
+ wd->compress = !!compress;
if (!compress) elm_genlist_homogeneous_set(obj, EINA_FALSE);
}
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
- wd->h_bounce = h_bounce;
- wd->v_bounce = v_bounce;
+ wd->h_bounce = !!h_bounce;
+ wd->v_bounce = !!v_bounce;
+ elm_smart_scroller_bounce_allow_set(wd->scr, wd->h_bounce, wd->v_bounce);
}
EAPI void
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (homogeneous) elm_genlist_compress_mode_set(obj, EINA_TRUE);
- wd->homogeneous = homogeneous;
+ wd->homogeneous = !!homogeneous;
}
EAPI Eina_Bool
EAPI void
elm_genlist_block_count_set(Evas_Object *obj,
- int n)
+ int count)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- wd->max_items_per_block = n;
+ wd->max_items_per_block = count;
wd->item_cache_max = wd->max_items_per_block * 2;
_item_cache_clean(wd);
}
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
+ edit_mode = !!edit_mode;
if (wd->edit_mode == edit_mode) return;
- wd->edit_mode = !!edit_mode;
list = elm_genlist_realized_items_get(obj);
if (!wd->edit_mode)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- wd->reorder_mode = reorder_mode;
+ wd->reorder_mode = !!reorder_mode;
}
EAPI Eina_Bool
*
* @ingroup Genlist
*/
-typedef enum
+//XXX: Elm_Genlist_Item_Type
+ typedef enum
{
ELM_GENLIST_ITEM_NONE = 0, /**< simple item */
ELM_GENLIST_ITEM_SUBITEMS = (1 << 0), /**< may expand and have child items */
ELM_GENLIST_ITEM_MAX = (1 << 2)
} Elm_Genlist_Item_Flags;
+//XXX: Elm_Genlist_Item_Field_Type
typedef enum
{
ELM_GENLIST_ITEM_FIELD_ALL = 0,
+ //XXX:ELM_GENLSIT_ITEM_FIELD_TEXT
ELM_GENLIST_ITEM_FIELD_LABEL = (1 << 0),
ELM_GENLIST_ITEM_FIELD_CONTENT = (1 << 1),
ELM_GENLIST_ITEM_FIELD_STATE = (1 << 2)
*
* @ingroup Genlist
*/
+//XXX: How about elm_genlist_select_mode_set() ?
EAPI void elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
/**
*
* @ingroup Genlist
*/
+//XXX: How about elm_genlist_select_mode_get() ?
EAPI Eina_Bool elm_genlist_always_select_mode_get(const Evas_Object *obj);
/**
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_always_select_mode_set and elm_genlist_no_select_mode_set API could be merged to elm_genlist_select_mode_set()
EAPI void elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select);
/**
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_always_select_mode_get and elm_genlist_no_select_mode_get API could be merged to elm_genlist_select_mode_get()
EAPI Eina_Bool elm_genlist_no_select_mode_get(const Evas_Object *obj);
/**
*
* @ingroup Genlist
*/
+//XXX: API name is ambiguous.. How about elm_genlist_mode_fixed_width_set?
EAPI void elm_genlist_height_for_width_mode_set(Evas_Object *obj, Eina_Bool height_for_width);
/**
*
* @ingroup Genlist
*/
+//XXX: API name is ambigious elm_genlist_mode_fixed_width_get() ?????
EAPI Eina_Bool elm_genlist_height_for_width_mode_get(const Evas_Object *obj);
/**
* Set the maximum number of items within an item block
*
* @param obj The genlist object
- * @param n Maximum number of items within an item block. Default is 32.
+ * @param count Maximum number of items within an item block. Default is 32.
*
- * This will configure the block count to tune to the target with
- * particular performance matrix.
+ * This will configure the block count to tune to the target with particular
+ * performance matrix.
*
* A block of objects will be used to reduce the number of operations due to
* many objects in the screen. It can determine the visibility, or if the
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_block_count_set(Evas_Object *obj, int n);
+EAPI void elm_genlist_block_count_set(Evas_Object *obj, int count);
/**
* Get the maximum number of items within an item block
* Set the timeout in seconds for the longpress event.
*
* @param obj The genlist object
- * @param timeout timeout in seconds. Default is 1.
+ * @param timeout timeout in seconds. Default is elm config value(1.0)
*
* This option will change how long it takes to send an event "longpressed"
* after the mouse down signal is sent to the list. If this event occurs, no
* "clicked" event will be sent.
*
+ * @warning If you set the longpress timeout value with this API, your genlist
+ * will not be affected by the longpress value of elementary config value
+ * later.
+ *
* @see elm_genlist_longpress_timeout_set()
*
* @ingroup Genlist
* @ingroup Genlist
*/
// XXX: deprecate elm_genlist_item_sorted_insert() and rename
-// elm_genlist_item_direct_sorted_insert()
+// elm_genlist_item_direct_sorted_insert()
+// XXX: direct_sorted?? how about deprecating elm_genlist_item_direct_sorted_insert insetead?
EAPI Elm_Object_Item *elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
EAPI Elm_Object_Item *elm_genlist_item_direct_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_item_event_freeze_set()?
EAPI void elm_genlist_item_display_only_set(Elm_Object_Item *it, Eina_Bool display_only);
/**
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_item_event_freeze_get()?
EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_Object_Item *it);
/**
* @param it The item to display
*
* This causes genlist to jump to the given item @p it and show it (by
- * immediately scrolling to that position), if it is not fully visible.
+ * jumping to that position), if it is not fully visible.
*
* @see elm_genlist_item_bring_in()
* @see elm_genlist_item_top_show()
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_item_show(it, TOP/MIDDLE/BOTTOM/...); this kind of API would cover all similar APIs - item_show, item_top_show...
EAPI void elm_genlist_item_show(Elm_Object_Item *it);
/**
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_item_bring_in(it, TOP/MIDDLE/BOTTOM/...); this kind of API would cover all similar APIs - bring_in, top_bring_in ...
EAPI void elm_genlist_item_bring_in(Elm_Object_Item *it);
/**
* @param it The item to display
*
* This causes genlist to jump to the given item @p it and show it (by
- * immediately scrolling to that position), if it is not fully visible.
+ * jumping to the top position), if it is not fully visible.
*
* The item will be positioned at the top of the genlist viewport.
*
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_item_show(it, TOP/MIDDLE/BOTTOM/...); this kind of API would cover all similar APIs - item_show, item_top_show...
EAPI void elm_genlist_item_top_show(Elm_Object_Item *it);
/**
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_item_bring_in(it, TOP/MIDDLE/BOTTOM/...); this kind of API would cover all similar APIs - bring_in, top_bring_in ...
EAPI void elm_genlist_item_top_bring_in(Elm_Object_Item *it);
/**
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_item_show(it, TOP/MIDDLE/BOTTOM/...); this kind of API would cover all similar APIs - item_show, item_top_show...
EAPI void elm_genlist_item_middle_show(Elm_Object_Item *it);
/**
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_item_bring_in(it, TOP/MIDDLE/BOTTOM/...); this kind of API would cover all similar APIs - bring_in, top_bring_in ...
EAPI void elm_genlist_item_middle_bring_in(Elm_Object_Item *it);
/**
*
* @ingroup Genlist
*/
+//XXX: elm_genlist_item_all_contents_unset() ??
EAPI void elm_genlist_item_contents_orphan(Elm_Object_Item *it);
/**
*
* @ingroup Genlist
*/
+//XXX: Should be deprecated
EAPI const Evas_Object *elm_genlist_item_object_get(const Elm_Object_Item *it);
/**
*
* @ingroup Genlist
*/
+//XXX: Need to review tooltip & cursor APIs
EAPI void elm_genlist_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
/**
*
* @ingroup Genlist
*/
-EAPI int elm_genlist_item_index_get(Elm_Object_Item *it);
+EAPI int elm_genlist_item_index_get(const Elm_Object_Item *it);
/**
* Update the contents of all realized items.
*
* @ingroup Genlist
*/
+//XXX: How bout elm_genlist_mode_item_set
EAPI void elm_genlist_item_mode_set(Elm_Object_Item *it, const char *mode_type, Eina_Bool mode_set);
/**
*
* @ingroup Genlist
*/
+//XXX: looks weird... set the mode type to item and get the mode type from object...
EAPI const char *elm_genlist_mode_type_get(const Evas_Object *obj);
/**
*
* @ingroup Genlist
*/
+//XXX: type would be more intuitive...
EAPI Elm_Genlist_Item_Flags elm_genlist_item_flags_get(const Elm_Object_Item *it);
#define ELM_GENLIST_ITEM_CLASS_VERSION 2 /* current version number */