forked from enlightenment/efl
Lots of fixes:
Add UNUSED where needed. Remove unused variables. Fix lots of compiler warnings. Formatting. SVN revision: 51320
This commit is contained in:
parent
7966765d77
commit
bc583d718c
|
@ -152,15 +152,16 @@ _parent_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
|
|||
}
|
||||
|
||||
static Evas_Object *
|
||||
_item_provider(void *data, Evas_Object *entry, const char *item)
|
||||
_item_provider(void *data, Evas_Object *entry __UNUSED__, const char *item)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Evas_Object *o;
|
||||
Eina_List *l;
|
||||
Elm_Anchorblock_Item_Provider *ip;
|
||||
|
||||
|
||||
EINA_LIST_FOREACH(wd->item_providers, l, ip)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
o = ip->func(ip->data, data, item);
|
||||
if (o) return o;
|
||||
}
|
||||
|
|
|
@ -143,15 +143,16 @@ _parent_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
|
|||
}
|
||||
|
||||
static Evas_Object *
|
||||
_item_provider(void *data, Evas_Object *entry, const char *item)
|
||||
_item_provider(void *data, Evas_Object *entry __UNUSED__, const char *item)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Evas_Object *o;
|
||||
Eina_List *l;
|
||||
Elm_Anchorview_Item_Provider *ip;
|
||||
|
||||
EINA_LIST_FOREACH(wd->item_providers, l, ip)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
o = ip->func(ip->data, data, item);
|
||||
if (o) return o;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
|
||||
/**
|
||||
* @addtogroup Animator Animator
|
||||
|
@ -129,7 +130,7 @@ _animator_animate_cb(void *data)
|
|||
}
|
||||
|
||||
static void
|
||||
_animator_parent_del(void *data, Evas *evas, Evas_Object *obj, void *event)
|
||||
_animator_parent_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
|
||||
{
|
||||
elm_animator_del(data);
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@ _elm_cnp_init(void){
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
selection_clear(void *udata __UNUSED__, int type, void *event){
|
||||
selection_clear(void *udata __UNUSED__, int type __UNUSED__, void *event){
|
||||
Ecore_X_Event_Selection_Clear *ev = event;
|
||||
struct _elm_cnp_selection *sel;
|
||||
int i;
|
||||
|
@ -416,7 +416,7 @@ printf("selection request callback: %d\n",ev->target);
|
|||
* else it's the data we want.
|
||||
*/
|
||||
static Eina_Bool
|
||||
selection_notify(void *udata __UNUSED__, int type, void *event){
|
||||
selection_notify(void *udata __UNUSED__, int type __UNUSED__, void *event){
|
||||
Ecore_X_Event_Selection_Notify *ev = event;
|
||||
struct _elm_cnp_selection *sel;
|
||||
int i;
|
||||
|
@ -457,9 +457,9 @@ selection_notify(void *udata __UNUSED__, int type, void *event){
|
|||
|
||||
|
||||
static int
|
||||
targets_converter(char *target, void *data, int size,
|
||||
void **data_ret, int *size_ret,
|
||||
Ecore_X_Atom *ttype, int *typesize){
|
||||
targets_converter(char *target __UNUSED__, void *data, int size __UNUSED__,
|
||||
void **data_ret, int *size_ret,
|
||||
Ecore_X_Atom *ttype, int *typesize){
|
||||
int i,count;
|
||||
Ecore_X_Atom *aret;
|
||||
struct _elm_cnp_selection *sel;
|
||||
|
@ -486,10 +486,10 @@ targets_converter(char *target, void *data, int size,
|
|||
}
|
||||
|
||||
static int
|
||||
png_converter(char *target, void *data, int size,
|
||||
void **data_ret, int *size_ret,
|
||||
Ecore_X_Atom *ttype, int *typesize){
|
||||
|
||||
png_converter(char *target __UNUSED__, void *data __UNUSED__, int size __UNUSED__,
|
||||
void **data_ret __UNUSED__, int *size_ret __UNUSED__,
|
||||
Ecore_X_Atom *ttype __UNUSED__, int *typesize __UNUSED__)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,8 @@ png_converter(char *target, void *data, int size,
|
|||
*/
|
||||
static int
|
||||
notify_handler_targets(struct _elm_cnp_selection *sel,
|
||||
Ecore_X_Event_Selection_Notify *notify){
|
||||
Ecore_X_Event_Selection_Notify *notify)
|
||||
{
|
||||
Ecore_X_Selection_Data_Targets *targets;
|
||||
Ecore_X_Atom *atomlist;
|
||||
int i,j;
|
||||
|
@ -533,7 +534,8 @@ notify_handler_targets(struct _elm_cnp_selection *sel,
|
|||
|
||||
static int
|
||||
response_handler_targets(struct _elm_cnp_selection *sel,
|
||||
Ecore_X_Event_Selection_Notify *notify){
|
||||
Ecore_X_Event_Selection_Notify *notify)
|
||||
{
|
||||
Ecore_X_Selection_Data_Targets *targets;
|
||||
Ecore_X_Atom *atomlist;
|
||||
Evas_Object *top;
|
||||
|
@ -574,7 +576,8 @@ response_handler_targets(struct _elm_cnp_selection *sel,
|
|||
|
||||
static int
|
||||
notify_handler_text(struct _elm_cnp_selection *sel,
|
||||
Ecore_X_Event_Selection_Notify *notify){
|
||||
Ecore_X_Event_Selection_Notify *notify)
|
||||
{
|
||||
Ecore_X_Selection_Data *data;
|
||||
char *str;
|
||||
|
||||
|
@ -624,18 +627,19 @@ notify_handler_uri(struct _elm_cnp_selection *sel,
|
|||
}
|
||||
|
||||
static int
|
||||
notify_handler_png(struct _elm_cnp_selection *sel,
|
||||
Ecore_X_Event_Selection_Notify *notify)
|
||||
notify_handler_png(struct _elm_cnp_selection *sel __UNUSED__,
|
||||
Ecore_X_Event_Selection_Notify *notify __UNUSED__)
|
||||
{
|
||||
cnp_debug("got a png!\n");
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
text_converter(char *target, void *data, int size,
|
||||
void **data_ret, int *size_ret,
|
||||
Ecore_X_Atom *ttype, int *typesize){
|
||||
text_converter(char *target __UNUSED__, void *data, int size __UNUSED__,
|
||||
void **data_ret, int *size_ret,
|
||||
Ecore_X_Atom *ttype __UNUSED__, int *typesize __UNUSED__)
|
||||
{
|
||||
struct _elm_cnp_selection *sel;
|
||||
|
||||
sel = selections + *(int *)data;
|
||||
|
@ -658,8 +662,10 @@ text_converter(char *target, void *data, int size,
|
|||
}
|
||||
|
||||
static int
|
||||
edje_converter(char *target, void *data, int size, void **data_ret,
|
||||
int *size_ret, Ecore_X_Atom *ttype, int *typesize){
|
||||
edje_converter(char *target __UNUSED__, void *data, int size __UNUSED__,
|
||||
void **data_ret, int *size_ret, Ecore_X_Atom *ttype __UNUSED__,
|
||||
int *typesize __UNUSED__)
|
||||
{
|
||||
struct _elm_cnp_selection *sel;
|
||||
|
||||
sel = selections + *(int *)data;
|
||||
|
@ -671,19 +677,24 @@ edje_converter(char *target, void *data, int size, void **data_ret,
|
|||
|
||||
|
||||
static int
|
||||
html_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize){
|
||||
struct _elm_cnp_selection *sel;
|
||||
html_converter(char *target __UNUSED__, void *data, int size __UNUSED__,
|
||||
void **data_ret, int *size_ret, Ecore_X_Atom *ttype __UNUSED__,
|
||||
int *typesize __UNUSED__)
|
||||
{
|
||||
struct _elm_cnp_selection *sel;
|
||||
|
||||
sel = selections + *(int *)data;
|
||||
if (data_ret) *data_ret = strdup(sel->selbuf);
|
||||
if (size_ret) *size_ret = strlen(sel->selbuf);
|
||||
sel = selections + *(int *)data;
|
||||
if (data_ret) *data_ret = strdup(sel->selbuf);
|
||||
if (size_ret) *size_ret = strlen(sel->selbuf);
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
uri_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize){
|
||||
|
||||
uri_converter(char *target __UNUSED__, void *data, int size __UNUSED__,
|
||||
void **data_ret, int *size_ret, Ecore_X_Atom *ttype __UNUSED__,
|
||||
int *typesize __UNUSED__)
|
||||
{
|
||||
struct _elm_cnp_selection *sel;
|
||||
sel = selections + *(int *)data;
|
||||
cnp_debug("Uri converter\n");
|
||||
|
@ -700,7 +711,7 @@ uri_converter(char *target, void *data, int size, void **data_ret, int *size_ret
|
|||
/* FIXME: Should add provider for each pated item: Use data to store it
|
||||
* much easier */
|
||||
static Evas_Object *
|
||||
image_provider(void *images, Evas_Object *entry, const char *item)
|
||||
image_provider(void *images __UNUSED__, Evas_Object *entry, const char *item)
|
||||
{
|
||||
struct pasteimage *pi;
|
||||
Eina_List *l;
|
||||
|
@ -724,7 +735,7 @@ image_provider(void *images, Evas_Object *entry, const char *item)
|
|||
}
|
||||
|
||||
static void
|
||||
entry_deleted(void *images, Evas *e, Evas_Object *entry, void *unused)
|
||||
entry_deleted(void *images __UNUSED__, Evas *e __UNUSED__, Evas_Object *entry, void *unused __UNUSED__)
|
||||
{
|
||||
struct pasteimage *pi;
|
||||
Eina_List *l,*next;
|
||||
|
|
|
@ -1210,11 +1210,11 @@ _event_selection_notify(void *data, int type __UNUSED__, void *event)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_event_selection_clear(void *data, int type __UNUSED__, void *event)
|
||||
_event_selection_clear(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||
{
|
||||
/*
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Ecore_X_Event_Selection_Clear *ev = event;
|
||||
/*
|
||||
if (!wd) return 1;
|
||||
if (!wd->have_selection) return 1;
|
||||
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
|
||||
|
@ -1228,7 +1228,7 @@ _event_selection_clear(void *data, int type __UNUSED__, void *event)
|
|||
#endif
|
||||
|
||||
static Evas_Object *
|
||||
_get_item(void *data, Evas_Object *edje, const char *part, const char *item)
|
||||
_get_item(void *data, Evas_Object *edje __UNUSED__, const char *part __UNUSED__, const char *item)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Evas_Object *o;
|
||||
|
|
|
@ -923,7 +923,6 @@ elm_gengrid_add(Evas_Object *parent)
|
|||
{
|
||||
Evas_Object *obj;
|
||||
Evas *e;
|
||||
Evas_Coord minw, minh;
|
||||
Widget_Data *wd;
|
||||
static Evas_Smart *smart = NULL;
|
||||
|
||||
|
|
|
@ -619,17 +619,16 @@ elm_label_text_align_set(Evas_Object *obj, const char *alignmode)
|
|||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
char *label;
|
||||
int len;
|
||||
|
||||
|
||||
if (!wd) return;
|
||||
_elm_dangerous_call_check(__FUNCTION__);
|
||||
len = strlen(wd->label);
|
||||
if (len <= 0) return;
|
||||
|
||||
|
||||
if (_stringshare_key_value_replace(&wd->label, "align", alignmode, 0) == 0)
|
||||
edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
|
||||
|
||||
|
||||
wd->changed = 1;
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
|
|
@ -66,35 +66,38 @@ _notify_theme_apply(Evas_Object *obj)
|
|||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
const char *style = elm_widget_style_get(obj);
|
||||
|
||||
switch (wd->orient)
|
||||
{
|
||||
case ELM_NOTIFY_ORIENT_TOP:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_CENTER:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "center", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "center", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_BOTTOM:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_LEFT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "left", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "left", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_RIGHT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "right", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "right", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_TOP_LEFT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top_left", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top_left", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_TOP_RIGHT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top_right", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "top_right", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_BOTTOM_LEFT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom_left", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom_left", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom_right", style);
|
||||
break;
|
||||
_elm_theme_object_set(obj, wd->notify, "notify", "bottom_right", style);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_LAST:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,6 +182,7 @@ _calc(Evas_Object *obj)
|
|||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Coord minw = -1, minh = -1;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
if (!wd) return;
|
||||
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
||||
edje_object_size_min_get(wd->notify, &minw, &minh);
|
||||
|
@ -218,6 +222,8 @@ _calc(Evas_Object *obj)
|
|||
case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
|
||||
evas_object_move(wd->notify, x + w - minw, y + h - minh);
|
||||
break;
|
||||
case ELM_NOTIFY_ORIENT_LAST:
|
||||
break;
|
||||
}
|
||||
evas_object_resize(wd->notify, minw, minh);
|
||||
}
|
||||
|
@ -402,9 +408,8 @@ elm_notify_content_get(const Evas_Object *obj)
|
|||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Object *content;
|
||||
if (!wd) return NULL;
|
||||
if (!wd->content) return NULL;
|
||||
|
||||
if ((!wd) || (!wd->content)) return NULL;
|
||||
return wd->content;
|
||||
}
|
||||
|
||||
|
@ -483,10 +488,10 @@ elm_notify_orient_set(Evas_Object *obj, Elm_Notify_Orient orient)
|
|||
EAPI Elm_Notify_Orient
|
||||
elm_notify_orient_get(const Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return (Elm_Notify_Orient)-1;
|
||||
return wd->orient;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) -1;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return -1;
|
||||
return wd->orient;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -513,10 +518,10 @@ elm_notify_timeout_set(Evas_Object *obj, int timeout)
|
|||
EAPI int
|
||||
elm_notify_timeout_get(const Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return -1;
|
||||
return wd->timeout;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) -1;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return -1;
|
||||
return wd->timeout;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -571,9 +576,9 @@ elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
|
|||
EAPI Eina_Bool
|
||||
elm_notify_repeat_events_get(const Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return EINA_FALSE;
|
||||
return wd->repeat_events;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return EINA_FALSE;
|
||||
return wd->repeat_events;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ static void
|
|||
_sizing_eval(Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Coord minw = -1, minh = -1;
|
||||
if (!wd) return;
|
||||
}
|
||||
|
||||
|
|
|
@ -165,15 +165,15 @@ elm_photo_add(Evas_Object *parent)
|
|||
EAPI Eina_Bool
|
||||
elm_photo_file_set(Evas_Object *obj, const char *file)
|
||||
{
|
||||
Evas_Object *icon;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return EINA_FALSE;
|
||||
if (!_els_smart_icon_file_key_set(wd->img, file, NULL))
|
||||
return EINA_FALSE;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
_sizing_eval(obj);
|
||||
return EINA_TRUE;
|
||||
if (!wd) return EINA_FALSE;
|
||||
if (!_els_smart_icon_file_key_set(wd->img, file, NULL))
|
||||
return EINA_FALSE;
|
||||
|
||||
_sizing_eval(obj);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -130,63 +130,59 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __
|
|||
static void
|
||||
_item_realize(Elm_Slideshow_Item *item)
|
||||
{
|
||||
Elm_Slideshow_Item *_item;
|
||||
Evas_Object *obj = item->obj;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Coord w, h;
|
||||
Elm_Slideshow_Item *_item;
|
||||
Evas_Object *obj = item->obj;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
|
||||
if (!wd) return;
|
||||
if (!wd) return;
|
||||
if ((!item->o) && (item->itc->func.get))
|
||||
{
|
||||
item->o = item->itc->func.get((void*)item->data, obj);
|
||||
evas_object_smart_member_add(item->o, obj);
|
||||
item->l_built = eina_list_append(NULL, item);
|
||||
wd->items_built = eina_list_merge(wd->items_built, item->l_built);
|
||||
evas_object_hide(item->o);
|
||||
}
|
||||
else if (item->l_built)
|
||||
wd->items_built = eina_list_demote_list(wd->items_built, item->l_built);
|
||||
|
||||
if (!item->o && item->itc->func.get)
|
||||
{
|
||||
item->o = item->itc->func.get((void*)item->data, obj);
|
||||
evas_object_smart_member_add(item->o, obj);
|
||||
item->l_built = eina_list_append(NULL, item);
|
||||
wd->items_built = eina_list_merge(wd->items_built, item->l_built);
|
||||
evas_object_hide(item->o);
|
||||
}
|
||||
else if (item->l_built)
|
||||
wd->items_built = eina_list_demote_list(wd->items_built, item->l_built);
|
||||
//pre-create previous and next item
|
||||
_item = _item_next_get(item);
|
||||
if ((_item) && (!_item->o) && (_item->itc->func.get))
|
||||
{
|
||||
_item->o = _item->itc->func.get((void*)_item->data, obj);
|
||||
evas_object_smart_member_add(_item->o, obj);
|
||||
_item->l_built = eina_list_append(NULL, _item);
|
||||
wd->items_built = eina_list_merge(wd->items_built, _item->l_built);
|
||||
evas_object_hide(_item->o);
|
||||
}
|
||||
else if ((_item) && (_item->l_built))
|
||||
wd->items_built = eina_list_demote_list(wd->items_built, _item->l_built);
|
||||
|
||||
//pre-create previous and next item
|
||||
_item = _item_next_get(item);
|
||||
if (_item && !_item->o && _item->itc->func.get)
|
||||
{
|
||||
_item->o = _item->itc->func.get((void*)_item->data, obj);
|
||||
evas_object_smart_member_add(_item->o, obj);
|
||||
_item->l_built = eina_list_append(NULL, _item);
|
||||
wd->items_built = eina_list_merge(wd->items_built, _item->l_built);
|
||||
evas_object_hide(_item->o);
|
||||
}
|
||||
else if (_item && _item->l_built)
|
||||
wd->items_built = eina_list_demote_list(wd->items_built, _item->l_built);
|
||||
_item = _item_prev_get(item);
|
||||
if ((_item) && (!_item->o) && (_item->itc->func.get))
|
||||
{
|
||||
_item->o = _item->itc->func.get((void*)_item->data, obj);
|
||||
evas_object_smart_member_add(_item->o, obj);
|
||||
_item->l_built = eina_list_append(NULL, _item);
|
||||
wd->items_built = eina_list_merge(wd->items_built, _item->l_built);
|
||||
evas_object_hide(_item->o);
|
||||
}
|
||||
else if ((_item) && (_item->l_built))
|
||||
wd->items_built = eina_list_demote_list(wd->items_built, _item->l_built);
|
||||
|
||||
|
||||
_item = _item_prev_get(item);
|
||||
if (_item && !_item->o && _item->itc->func.get)
|
||||
{
|
||||
_item->o = _item->itc->func.get((void*)_item->data, obj);
|
||||
evas_object_smart_member_add(_item->o, obj);
|
||||
_item->l_built = eina_list_append(NULL, _item);
|
||||
wd->items_built = eina_list_merge(wd->items_built, _item->l_built);
|
||||
evas_object_hide(_item->o);
|
||||
}
|
||||
else if (_item && _item->l_built)
|
||||
wd->items_built = eina_list_demote_list(wd->items_built, _item->l_built);
|
||||
|
||||
//delete unused items
|
||||
while (eina_list_count(wd->items_built) > 3)
|
||||
{
|
||||
_item = eina_list_data_get(wd->items_built);
|
||||
wd->items_built = eina_list_remove_list(wd->items_built, wd->items_built);
|
||||
if(item->itc->func.del)
|
||||
item->itc->func.del((void*)item->data, _item->o);
|
||||
evas_object_del(_item->o);
|
||||
_item->o = NULL;
|
||||
}
|
||||
//delete unused items
|
||||
while (eina_list_count(wd->items_built) > 3)
|
||||
{
|
||||
_item = eina_list_data_get(wd->items_built);
|
||||
wd->items_built = eina_list_remove_list(wd->items_built, wd->items_built);
|
||||
if(item->itc->func.del)
|
||||
item->itc->func.del((void*)item->data, _item->o);
|
||||
evas_object_del(_item->o);
|
||||
_item->o = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
|
||||
{
|
||||
|
@ -239,8 +235,6 @@ _timer_cb(void *data)
|
|||
EAPI Evas_Object *
|
||||
elm_slideshow_add(Evas_Object *parent)
|
||||
{
|
||||
Eina_List *layouts;
|
||||
const char *s;
|
||||
Evas_Object *obj;
|
||||
Evas *e;
|
||||
Widget_Data *wd;
|
||||
|
|
|
@ -343,13 +343,13 @@ _smart_reconfigure(Smart_Data *sd)
|
|||
}
|
||||
|
||||
static void
|
||||
_preloaded(void *data, Evas *e, Evas_Object *obj, void *event)
|
||||
_preloaded(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
|
||||
{
|
||||
Smart_Data *sd = data;
|
||||
Smart_Data *sd = data;
|
||||
|
||||
sd->preloading = 0;
|
||||
if(sd->show)
|
||||
evas_object_show(sd->obj);
|
||||
sd->preloading = 0;
|
||||
if(sd->show)
|
||||
evas_object_show(sd->obj);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1413,7 +1413,7 @@ _smart_hold_animator(void *data)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_smart_event_post_up(void *data, Evas *e)
|
||||
_smart_event_post_up(void *data, Evas *e __UNUSED__)
|
||||
{
|
||||
Smart_Data *sd = data;
|
||||
if (sd->widget)
|
||||
|
@ -1638,13 +1638,14 @@ _smart_onhold_animator(void *data)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_smart_event_post_move(void *data, Evas *e)
|
||||
_smart_event_post_move(void *data, Evas *e __UNUSED__)
|
||||
{
|
||||
Smart_Data *sd = data;
|
||||
|
||||
if (sd->down.want_dragged)
|
||||
{
|
||||
int start = 0;
|
||||
|
||||
|
||||
if (sd->down.hold_parent)
|
||||
{
|
||||
if ((sd->down.dir_x) && !can_scroll(sd, sd->down.hdir))
|
||||
|
|
Loading…
Reference in New Issue