int version; /**< Set by elementary if you alloc an item class using elm_genlist/gengrid_item_class_new(), or if you set your own class (must be const) then set it to ELM_GENLIST/GENGRID_ITEM_CLASS_VERSION */
unsigned int refcount; /**< Set it to 0 if you use your own const class, or its managed for you by class ref/unref calls */
Eina_Bool delete_me : 1; /**< Leave this alone - set it to 0 if you have a const class of your own */
+// TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ Eina_Bool homogeneous : 1;
+//
const char *item_style; /**< Name of the visual style to use for this item. If you don't know use "default" */
const char *decorate_item_style; /**< Style used if item is set to a decorate mode. @see elm_genlist_item_decorate_mode_set() or NULL if you don't care. currently it's used only in genlist. */
const char *decorate_all_item_style; /**< Style to use when in edit mode, or NULL if you don't care. currently it's used only in genlist. */
size = eina_hash_find(sd->size_caches, &(it->itc));
/* homogeneous genlist shortcut */
- if ((calc) && (sd->homogeneous) && (!it->item->mincalcd) && size)
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ if ((calc) && (sd->homogeneous || it->itc->homogeneous) && (!it->item->mincalcd) && size)
{
GL_IT(it)->w = GL_IT(it)->minw = size->minw;
GL_IT(it)->h = GL_IT(it)->minh = size->minh;
if (!it->item->mincalcd)
{
- if (sd->homogeneous && size)
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ if ((sd->homogeneous || it->itc->homogeneous) && size)
{
GL_IT(it)->w = GL_IT(it)->minw = size->minw;
GL_IT(it)->h = GL_IT(it)->minh = size->minh;
it->item->h = it->item->minh = mh;
it->item->mincalcd = EINA_TRUE;
- if (sd->homogeneous)
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ if (sd->homogeneous || it->itc->homogeneous)
{
if (size)
eina_hash_del_by_key(sd->size_caches, &(it->itc));
ELM_SAFE_FREE(sd->queue_idle_enterer, ecore_idle_enterer_del);
_queue_process(sd);
}
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
while ((sd->queue) && (sd->blocks) &&
- (sd->homogeneous) && (sd->mode == ELM_LIST_COMPRESS))
+ ((sd->homogeneous) || it->itc->homogeneous) && (sd->mode == ELM_LIST_COMPRESS))
{
ELM_SAFE_FREE(sd->queue_idle_enterer, ecore_idle_enterer_del);
_queue_process(sd);
}
if (!itb->realized)
{
- if (itb->sd->homogeneous &&
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ if ((itb->sd->homogeneous || it->itc->homogeneous) &&
((!size) || it->itc != size->itc))
size = eina_hash_find(itb->sd->size_caches, &(it->itc));
- if (qadd || (itb->sd->homogeneous && !size))
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ if (qadd || ((itb->sd->homogeneous || it->itc->homogeneous) && !size))
{
if (!it->item->mincalcd) changed = EINA_TRUE;
if (changed)
}
else
{
- if ((itb->sd->homogeneous) && size &&
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ if ((itb->sd->homogeneous || it->itc->homogeneous) && size &&
(itb->sd->mode == ELM_LIST_COMPRESS))
{
it->item->w = it->item->minw = size->minw;
Evas_Coord gith = 0;
ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
if ((sd->queue) ||
- (!((sd->homogeneous) &&
+ (!((sd->homogeneous || it->itc->homogeneous) &&
(sd->mode == ELM_LIST_COMPRESS))))
{
if ((it->item->queued) || (!it->item->mincalcd) || (sd->queue))
sd->update_job = ecore_job_add(_update_job, sd->obj);
// reset homogeneous item size
- if (sd->homogeneous)
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ if (sd->homogeneous || it->itc->homogeneous)
{
Item_Size *size =
eina_hash_find(sd->size_caches, &(it->itc));
if ((sd->mode != ELM_LIST_LIMIT) && vw && mw < vw)
mw = vw;
- if (sd->homogeneous)
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ if (sd->homogeneous || it->itc->homogeneous)
{
Size_Cache *size, *tmp;
tmp = eina_hash_find(sd->size_caches, it->itc->item_style);
p_minw = GL_IT(it)->minw;
p_minh = GL_IT(it)->minh;
- if (sd->homogeneous)
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ if (sd->homogeneous || it->itc->homogeneous)
size = eina_hash_find(sd->size_caches, it->itc->item_style);
if (size)
{
itc->version = CLASS_ALLOCATED;
itc->refcount = 1;
itc->delete_me = EINA_FALSE;
+ // TIZEN ONLY(20160630): Support homogeneous mode in item class.
+ itc->homogeneous = EINA_FALSE;
+ //
return itc;
}